summaryrefslogtreecommitdiffstats
path: root/kexi
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi')
-rw-r--r--kexi/3rdparty/kexisql/src/btree.c52
-rw-r--r--kexi/3rdparty/kexisql/src/btree_rb.c58
-rw-r--r--kexi/3rdparty/kexisql/src/build.c10
-rw-r--r--kexi/3rdparty/kexisql/src/encode.c6
-rw-r--r--kexi/3rdparty/kexisql/src/func.c18
-rw-r--r--kexi/3rdparty/kexisql/src/insert.c12
-rw-r--r--kexi/3rdparty/kexisql/src/main.c2
-rw-r--r--kexi/3rdparty/kexisql/src/os.c38
-rw-r--r--kexi/3rdparty/kexisql/src/pager.c6
-rw-r--r--kexi/3rdparty/kexisql/src/parse.c28
-rw-r--r--kexi/3rdparty/kexisql/src/parse.h2
-rw-r--r--kexi/3rdparty/kexisql/src/parse.y12
-rw-r--r--kexi/3rdparty/kexisql/src/pragma.c8
-rw-r--r--kexi/3rdparty/kexisql/src/select.c26
-rw-r--r--kexi/3rdparty/kexisql/src/sqlite.h2
-rw-r--r--kexi/3rdparty/kexisql/src/sqliteInt.h16
-rw-r--r--kexi/3rdparty/kexisql/src/tclsqlite.c2
-rw-r--r--kexi/3rdparty/kexisql/src/threadtest.c2
-rw-r--r--kexi/3rdparty/kexisql/src/tokenize.c2
-rw-r--r--kexi/3rdparty/kexisql/src/util.c2
-rw-r--r--kexi/3rdparty/kexisql/src/vdbe.c10
-rw-r--r--kexi/3rdparty/kexisql/src/vdbeInt.h2
-rw-r--r--kexi/3rdparty/kexisql/src/where.c70
-rw-r--r--kexi/3rdparty/kexisql/tool/lemon.c36
-rw-r--r--kexi/3rdparty/kexisql/tool/lempar.c2
-rw-r--r--kexi/3rdparty/kexisql3/src/alter.c8
-rw-r--r--kexi/3rdparty/kexisql3/src/btree.c140
-rw-r--r--kexi/3rdparty/kexisql3/src/build.c42
-rw-r--r--kexi/3rdparty/kexisql3/src/expr.c26
-rw-r--r--kexi/3rdparty/kexisql3/src/func.c12
-rw-r--r--kexi/3rdparty/kexisql3/src/insert.c12
-rw-r--r--kexi/3rdparty/kexisql3/src/keywordhash.h8
-rw-r--r--kexi/3rdparty/kexisql3/src/main.c6
-rw-r--r--kexi/3rdparty/kexisql3/src/os_mac.c32
-rw-r--r--kexi/3rdparty/kexisql3/src/os_unix.c4
-rw-r--r--kexi/3rdparty/kexisql3/src/os_win.c8
-rw-r--r--kexi/3rdparty/kexisql3/src/pager.c8
-rw-r--r--kexi/3rdparty/kexisql3/src/parse.c28
-rw-r--r--kexi/3rdparty/kexisql3/src/parse.h4
-rw-r--r--kexi/3rdparty/kexisql3/src/parse.y14
-rw-r--r--kexi/3rdparty/kexisql3/src/pragma.c16
-rw-r--r--kexi/3rdparty/kexisql3/src/prepare.c4
-rw-r--r--kexi/3rdparty/kexisql3/src/select.c44
-rw-r--r--kexi/3rdparty/kexisql3/src/sqlite3.h2
-rw-r--r--kexi/3rdparty/kexisql3/src/sqliteInt.h28
-rw-r--r--kexi/3rdparty/kexisql3/src/tclsqlite.c8
-rw-r--r--kexi/3rdparty/kexisql3/src/trigger.c6
-rw-r--r--kexi/3rdparty/kexisql3/src/utf.c14
-rw-r--r--kexi/3rdparty/kexisql3/src/vacuum.c4
-rw-r--r--kexi/3rdparty/kexisql3/src/vdbe.c22
-rw-r--r--kexi/3rdparty/kexisql3/src/vdbeInt.h6
-rw-r--r--kexi/3rdparty/kexisql3/src/vdbeaux.c18
-rw-r--r--kexi/3rdparty/kexisql3/src/vdbemem.c2
-rw-r--r--kexi/3rdparty/kexisql3/src/where.c192
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp24
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutColumns.h19
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui16
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp14
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutHeader.h9
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui44
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutSize.cpp116
-rw-r--r--kexi/3rdparty/kolibs/KoPageLayoutSize.h27
-rw-r--r--kexi/3rdparty/kolibs/koGlobal.cc68
-rw-r--r--kexi/3rdparty/kolibs/koGlobal.h26
-rw-r--r--kexi/3rdparty/kolibs/koPageLayout.cpp60
-rw-r--r--kexi/3rdparty/kolibs/koPageLayout.h46
-rw-r--r--kexi/3rdparty/kolibs/koPageLayoutDia.cc194
-rw-r--r--kexi/3rdparty/kolibs/koPageLayoutDia.h70
-rw-r--r--kexi/3rdparty/kolibs/koUnit.cc58
-rw-r--r--kexi/3rdparty/kolibs/koUnit.h20
-rw-r--r--kexi/3rdparty/kolibs/koUnitWidgets.cc142
-rw-r--r--kexi/3rdparty/kolibs/koUnitWidgets.h36
-rw-r--r--kexi/Makefile.am2
-rw-r--r--kexi/core/kexi.cpp118
-rw-r--r--kexi/core/kexi.h60
-rw-r--r--kexi/core/kexiaboutdata.cpp2
-rw-r--r--kexi/core/kexiactioncategories.cpp20
-rw-r--r--kexi/core/kexiactionproxy.cpp76
-rw-r--r--kexi/core/kexiactionproxy.h58
-rw-r--r--kexi/core/kexiactionproxy_p.h5
-rw-r--r--kexi/core/kexiblobbuffer.cpp84
-rw-r--r--kexi/core/kexiblobbuffer.h55
-rw-r--r--kexi/core/kexicontexthelp.cpp12
-rw-r--r--kexi/core/kexicontexthelp.h7
-rw-r--r--kexi/core/kexicontexthelp_p.h6
-rw-r--r--kexi/core/kexidataiteminterface.cpp30
-rw-r--r--kexi/core/kexidataiteminterface.h52
-rw-r--r--kexi/core/kexidbconnectionset.cpp52
-rw-r--r--kexi/core/kexidbconnectionset.h12
-rw-r--r--kexi/core/kexidbshortcutfile.cpp66
-rw-r--r--kexi/core/kexidbshortcutfile.h18
-rw-r--r--kexi/core/kexidialogbase.cpp106
-rw-r--r--kexi/core/kexidialogbase.h65
-rw-r--r--kexi/core/kexidragobjects.cpp68
-rw-r--r--kexi/core/kexidragobjects.h46
-rw-r--r--kexi/core/kexievents.cpp16
-rw-r--r--kexi/core/kexievents.h60
-rw-r--r--kexi/core/kexiguimsghandler.cpp54
-rw-r--r--kexi/core/kexiguimsghandler.h26
-rw-r--r--kexi/core/kexiinternalpart.cpp52
-rw-r--r--kexi/core/kexiinternalpart.h55
-rw-r--r--kexi/core/keximainwindow.h27
-rw-r--r--kexi/core/kexipart.cpp82
-rw-r--r--kexi/core/kexipart.h57
-rw-r--r--kexi/core/kexipartguiclient.h6
-rw-r--r--kexi/core/kexipartinfo.cpp24
-rw-r--r--kexi/core/kexipartinfo.h18
-rw-r--r--kexi/core/kexipartinfo_p.h10
-rw-r--r--kexi/core/kexipartitem.h44
-rw-r--r--kexi/core/kexipartmanager.cpp40
-rw-r--r--kexi/core/kexipartmanager.h41
-rw-r--r--kexi/core/kexiproject.cpp134
-rw-r--r--kexi/core/kexiproject.h47
-rw-r--r--kexi/core/kexiprojectconnectiondata.cpp68
-rw-r--r--kexi/core/kexiprojectconnectiondata.h28
-rw-r--r--kexi/core/kexiprojectdata.cpp40
-rw-r--r--kexi/core/kexiprojectdata.h26
-rw-r--r--kexi/core/kexiprojectset.cpp10
-rw-r--r--kexi/core/kexiprojectset.h2
-rw-r--r--kexi/core/kexisearchandreplaceiface.h18
-rw-r--r--kexi/core/kexisharedactionhost.cpp58
-rw-r--r--kexi/core/kexisharedactionhost.h28
-rw-r--r--kexi/core/kexisharedactionhost_p.h19
-rw-r--r--kexi/core/kexistartupdata.cpp4
-rw-r--r--kexi/core/kexistartupdata.h6
-rw-r--r--kexi/core/kexistaticpart.cpp8
-rw-r--r--kexi/core/kexistaticpart.h12
-rw-r--r--kexi/core/kexitabledesignerinterface.h10
-rw-r--r--kexi/core/kexitemplateloader.cpp36
-rw-r--r--kexi/core/kexitemplateloader.h12
-rw-r--r--kexi/core/kexitextmsghandler.cpp10
-rw-r--r--kexi/core/kexitextmsghandler.h6
-rw-r--r--kexi/core/kexiuseraction.cpp18
-rw-r--r--kexi/core/kexiuseraction.h11
-rw-r--r--kexi/core/kexiuseractionmethod.cpp4
-rw-r--r--kexi/core/kexiuseractionmethod.h14
-rw-r--r--kexi/core/kexiviewbase.cpp82
-rw-r--r--kexi/core/kexiviewbase.h57
-rw-r--r--kexi/data/kde34compat/sqlite.magic2
-rw-r--r--kexi/doc/common/kde-default.css4
-rw-r--r--kexi/doc/common/kde-web.css4
-rw-r--r--kexi/doc/dev/kexi_guidelines.txt2
-rw-r--r--kexi/doc/dev/kexi_issues.txt2
-rw-r--r--kexi/doc/dev/kexidb_issues.txt2
-rw-r--r--kexi/doc/handbook/html.tmp/01_02_00_db_spreadsheet.html2
-rw-r--r--kexi/doc/handbook/html.tmp/02_04_00_differences.html2
-rw-r--r--kexi/doc/handbook/html.tmp/05_01_00_table_designing.html2
-rw-r--r--kexi/doc/handbook/html.tmp/05_04_00_form_designing.html86
-rw-r--r--kexi/doc/handbook/translation-status.txt10
-rw-r--r--kexi/doc/kexidb/kexidb.doxygen4
-rw-r--r--kexi/examples/Simple_Database.kexi.sql18
-rw-r--r--kexi/formeditor/commands.cpp514
-rw-r--r--kexi/formeditor/commands.h164
-rw-r--r--kexi/formeditor/connectiondialog.cpp128
-rw-r--r--kexi/formeditor/connectiondialog.h17
-rw-r--r--kexi/formeditor/container.cpp408
-rw-r--r--kexi/formeditor/container.h120
-rw-r--r--kexi/formeditor/editlistviewdialog.cpp160
-rw-r--r--kexi/formeditor/editlistviewdialog.h33
-rw-r--r--kexi/formeditor/events.cpp50
-rw-r--r--kexi/formeditor/events.h48
-rw-r--r--kexi/formeditor/factories/containerfactory.cpp418
-rw-r--r--kexi/formeditor/factories/containerfactory.h132
-rw-r--r--kexi/formeditor/factories/stdwidgetfactory.cpp340
-rw-r--r--kexi/formeditor/factories/stdwidgetfactory.h61
-rw-r--r--kexi/formeditor/form.cpp123
-rw-r--r--kexi/formeditor/form.h93
-rw-r--r--kexi/formeditor/formIO.cpp910
-rw-r--r--kexi/formeditor/formIO.h122
-rw-r--r--kexi/formeditor/formmanager.cpp428
-rw-r--r--kexi/formeditor/formmanager.h133
-rw-r--r--kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp248
-rw-r--r--kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h47
-rw-r--r--kexi/formeditor/kfdpixmapedit.cpp10
-rw-r--r--kexi/formeditor/kfdpixmapedit.h3
-rw-r--r--kexi/formeditor/libactionwidget.cpp8
-rw-r--r--kexi/formeditor/libactionwidget.h5
-rw-r--r--kexi/formeditor/objecttree.cpp96
-rw-r--r--kexi/formeditor/objecttree.h110
-rw-r--r--kexi/formeditor/objecttreeview.cpp110
-rw-r--r--kexi/formeditor/objecttreeview.h27
-rw-r--r--kexi/formeditor/resizehandle.cpp72
-rw-r--r--kexi/formeditor/resizehandle.h38
-rw-r--r--kexi/formeditor/richtextdialog.cpp58
-rw-r--r--kexi/formeditor/richtextdialog.h13
-rw-r--r--kexi/formeditor/scripting/formscript.cpp26
-rw-r--r--kexi/formeditor/scripting/formscript.h15
-rw-r--r--kexi/formeditor/scripting/scriptIO.cpp72
-rw-r--r--kexi/formeditor/scripting/scriptIO.h22
-rw-r--r--kexi/formeditor/scripting/scriptmanager.cpp8
-rw-r--r--kexi/formeditor/scripting/scriptmanager.h11
-rw-r--r--kexi/formeditor/spring.cpp60
-rw-r--r--kexi/formeditor/spring.h27
-rw-r--r--kexi/formeditor/tabstopdialog.cpp50
-rw-r--r--kexi/formeditor/tabstopdialog.h13
-rw-r--r--kexi/formeditor/test/kfd_mainwindow.cpp6
-rw-r--r--kexi/formeditor/test/kfd_mainwindow.h3
-rw-r--r--kexi/formeditor/test/kfd_part.cpp288
-rw-r--r--kexi/formeditor/test/kfd_part.h47
-rw-r--r--kexi/formeditor/utils.cpp103
-rw-r--r--kexi/formeditor/utils.h57
-rw-r--r--kexi/formeditor/widgetfactory.cpp240
-rw-r--r--kexi/formeditor/widgetfactory.h241
-rw-r--r--kexi/formeditor/widgetlibrary.cpp286
-rw-r--r--kexi/formeditor/widgetlibrary.h103
-rw-r--r--kexi/formeditor/widgetpropertyset.cpp374
-rw-r--r--kexi/formeditor/widgetpropertyset.h83
-rw-r--r--kexi/formeditor/widgetwithsubpropertiesinterface.cpp42
-rw-r--r--kexi/formeditor/widgetwithsubpropertiesinterface.h30
-rw-r--r--kexi/kexi_export.h2
-rw-r--r--kexi/kexi_global.h12
-rw-r--r--kexi/kexidb/admin.cpp2
-rw-r--r--kexi/kexidb/admin.h2
-rw-r--r--kexi/kexidb/alter.cpp132
-rw-r--r--kexi/kexidb/alter.h72
-rw-r--r--kexi/kexidb/connection.cpp788
-rw-r--r--kexi/kexidb/connection.h209
-rw-r--r--kexi/kexidb/connectiondata.cpp30
-rw-r--r--kexi/kexidb/connectiondata.h46
-rw-r--r--kexi/kexidb/cursor.cpp40
-rw-r--r--kexi/kexidb/cursor.h55
-rw-r--r--kexi/kexidb/cursor_p.h2
-rw-r--r--kexi/kexidb/dbobjectnamevalidator.cpp10
-rw-r--r--kexi/kexidb/dbobjectnamevalidator.h12
-rw-r--r--kexi/kexidb/dbproperties.cpp86
-rw-r--r--kexi/kexidb/dbproperties.h14
-rw-r--r--kexi/kexidb/driver.cpp112
-rw-r--r--kexi/kexidb/driver.h87
-rw-r--r--kexi/kexidb/driver_p.cpp28
-rw-r--r--kexi/kexidb/driver_p.h58
-rw-r--r--kexi/kexidb/drivermanager.cpp106
-rw-r--r--kexi/kexidb/drivermanager.h28
-rw-r--r--kexi/kexidb/drivermanager_p.h25
-rw-r--r--kexi/kexidb/drivers/mySQL/mySQL.pro6
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection.cpp44
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection.h27
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp38
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlconnection_p.h14
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlcursor.cpp32
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlcursor.h12
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqldriver.cpp54
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqldriver.h17
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp8
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.cpp8
-rw-r--r--kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.h2
-rw-r--r--kexi/kexidb/drivers/odbc/odbcconnection.cpp22
-rw-r--r--kexi/kexidb/drivers/odbc/odbcconnection.h19
-rw-r--r--kexi/kexidb/drivers/odbc/odbcdriver.cpp22
-rw-r--r--kexi/kexidb/drivers/odbc/odbcdriver.h17
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxconnection.cpp66
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxconnection.h31
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxconnection_p.h6
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.cpp32
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxcursor.h32
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxdriver.cpp44
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxdriver.h29
-rw-r--r--kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h4
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlite_common.pro2
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteadmin.cpp8
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteadmin.h2
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitealter.cpp10
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteconnection.cpp76
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteconnection.h31
-rw-r--r--kexi/kexidb/drivers/sqlite/sqliteconnection_p.h4
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitecursor.cpp116
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitecursor.h12
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitedriver.cpp36
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitedriver.h21
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitepreparedstatement.cpp14
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp42
-rw-r--r--kexi/kexidb/drivers/sqlite/sqlitevacuum.h15
-rw-r--r--kexi/kexidb/drivers/sqlite2/sqlite2.pro4
-rw-r--r--kexi/kexidb/error.h8
-rw-r--r--kexi/kexidb/expression.cpp158
-rw-r--r--kexi/kexidb/expression.h70
-rw-r--r--kexi/kexidb/field.cpp160
-rw-r--r--kexi/kexidb/field.h132
-rw-r--r--kexi/kexidb/fieldlist.cpp72
-rw-r--r--kexi/kexidb/fieldlist.h62
-rw-r--r--kexi/kexidb/fieldvalidator.cpp14
-rw-r--r--kexi/kexidb/fieldvalidator.h6
-rw-r--r--kexi/kexidb/global.cpp2
-rw-r--r--kexi/kexidb/global.h12
-rw-r--r--kexi/kexidb/indexschema.cpp34
-rw-r--r--kexi/kexidb/indexschema.h26
-rw-r--r--kexi/kexidb/kexidb.pro2
-rw-r--r--kexi/kexidb/kexidb_export.h2
-rw-r--r--kexi/kexidb/keywords.cpp2
-rw-r--r--kexi/kexidb/lookupfieldschema.cpp148
-rw-r--r--kexi/kexidb/lookupfieldschema.h50
-rw-r--r--kexi/kexidb/msghandler.cpp10
-rw-r--r--kexi/kexidb/msghandler.h24
-rw-r--r--kexi/kexidb/object.cpp34
-rw-r--r--kexi/kexidb/object.h42
-rw-r--r--kexi/kexidb/parser/parser.cpp10
-rw-r--r--kexi/kexidb/parser/parser.h24
-rw-r--r--kexi/kexidb/parser/parser_p.cpp100
-rw-r--r--kexi/kexidb/parser/parser_p.h20
-rw-r--r--kexi/kexidb/parser/sqlparser.cpp84
-rw-r--r--kexi/kexidb/parser/sqlparser.h36
-rw-r--r--kexi/kexidb/parser/sqlparser.y6
-rw-r--r--kexi/kexidb/parser/sqlscanner.cpp16
-rw-r--r--kexi/kexidb/parser/sqltypes.h16
-rw-r--r--kexi/kexidb/preparedstatement.cpp20
-rw-r--r--kexi/kexidb/preparedstatement.h14
-rw-r--r--kexi/kexidb/queryschema.cpp362
-rw-r--r--kexi/kexidb/queryschema.h108
-rw-r--r--kexi/kexidb/queryschemaparameter.cpp30
-rw-r--r--kexi/kexidb/queryschemaparameter.h22
-rw-r--r--kexi/kexidb/record.h28
-rw-r--r--kexi/kexidb/relationship.cpp2
-rw-r--r--kexi/kexidb/relationship.h4
-rw-r--r--kexi/kexidb/roweditbuffer.cpp24
-rw-r--r--kexi/kexidb/roweditbuffer.h30
-rw-r--r--kexi/kexidb/schemadata.cpp14
-rw-r--r--kexi/kexidb/schemadata.h28
-rw-r--r--kexi/kexidb/simplecommandlineapp.cpp18
-rw-r--r--kexi/kexidb/simplecommandlineapp.h2
-rw-r--r--kexi/kexidb/tableschema.cpp42
-rw-r--r--kexi/kexidb/tableschema.h30
-rw-r--r--kexi/kexidb/transaction.cpp4
-rw-r--r--kexi/kexidb/transaction.h4
-rw-r--r--kexi/kexidb/utils.cpp350
-rw-r--r--kexi/kexidb/utils.h192
-rw-r--r--kexi/kexidb/utils_p.h11
-rw-r--r--kexi/kexiutils/debuggui.cpp58
-rw-r--r--kexi/kexiutils/identifier.cpp58
-rw-r--r--kexi/kexiutils/identifier.h20
-rw-r--r--kexi/kexiutils/longlongvalidator.cpp42
-rw-r--r--kexi/kexiutils/longlongvalidator.h28
-rw-r--r--kexi/kexiutils/styleproxy.cpp12
-rw-r--r--kexi/kexiutils/styleproxy.h134
-rw-r--r--kexi/kexiutils/transliteration_table.h2
-rw-r--r--kexi/kexiutils/tristate.h16
-rw-r--r--kexi/kexiutils/utils.cpp210
-rw-r--r--kexi/kexiutils/utils.h116
-rw-r--r--kexi/kexiutils/utils_p.h19
-rw-r--r--kexi/kexiutils/validator.cpp48
-rw-r--r--kexi/kexiutils/validator.h62
-rw-r--r--kexi/main.cpp8
-rw-r--r--kexi/main/kexifinddialog.cpp112
-rw-r--r--kexi/main/kexifinddialog.h29
-rw-r--r--kexi/main/kexifinddialogbase.ui34
-rw-r--r--kexi/main/keximainwindowimpl.cpp938
-rw-r--r--kexi/main/keximainwindowimpl.h93
-rw-r--r--kexi/main/keximainwindowimpl_p.h144
-rw-r--r--kexi/main/kexinamedialog.cpp48
-rw-r--r--kexi/main/kexinamedialog.h17
-rw-r--r--kexi/main/kexinamewidget.cpp84
-rw-r--r--kexi/main/kexinamewidget.h61
-rw-r--r--kexi/main/kexinewstuff.cpp20
-rw-r--r--kexi/main/kexinewstuff.h6
-rw-r--r--kexi/main/kexistatusbar.cpp40
-rw-r--r--kexi/main/kexistatusbar.h15
-rw-r--r--kexi/main/ksplitter.h47
-rw-r--r--kexi/main/printing/kexisimpleprintingengine.cpp118
-rw-r--r--kexi/main/printing/kexisimpleprintingengine.h41
-rw-r--r--kexi/main/printing/kexisimpleprintingpagesetup.cpp162
-rw-r--r--kexi/main/printing/kexisimpleprintingpagesetup.h22
-rw-r--r--kexi/main/printing/kexisimpleprintingpagesetupbase.ui52
-rw-r--r--kexi/main/printing/kexisimpleprintingpart.cpp6
-rw-r--r--kexi/main/printing/kexisimpleprintingpart.h5
-rw-r--r--kexi/main/printing/kexisimpleprintpreviewwindow.cpp130
-rw-r--r--kexi/main/printing/kexisimpleprintpreviewwindow.h11
-rw-r--r--kexi/main/printing/kexisimpleprintpreviewwindow_p.h11
-rw-r--r--kexi/main/startup/KexiConnSelector.cpp148
-rw-r--r--kexi/main/startup/KexiConnSelector.h21
-rw-r--r--kexi/main/startup/KexiConnSelectorBase.ui34
-rw-r--r--kexi/main/startup/KexiDBTitlePage.cpp6
-rw-r--r--kexi/main/startup/KexiDBTitlePage.h5
-rw-r--r--kexi/main/startup/KexiDBTitlePageBase.ui12
-rw-r--r--kexi/main/startup/KexiNewPrjTypeSelector.ui10
-rw-r--r--kexi/main/startup/KexiNewProjectWizard.cpp112
-rw-r--r--kexi/main/startup/KexiNewProjectWizard.h21
-rw-r--r--kexi/main/startup/KexiOpenExistingFile.ui28
-rw-r--r--kexi/main/startup/KexiProjectSelector.cpp58
-rw-r--r--kexi/main/startup/KexiProjectSelector.h12
-rw-r--r--kexi/main/startup/KexiProjectSelectorBase.ui12
-rw-r--r--kexi/main/startup/KexiServerDBNamePage.ui24
-rw-r--r--kexi/main/startup/KexiStartup.cpp216
-rw-r--r--kexi/main/startup/KexiStartup.h26
-rw-r--r--kexi/main/startup/KexiStartupDialog.cpp190
-rw-r--r--kexi/main/startup/KexiStartupDialog.h29
-rw-r--r--kexi/main/startup/KexiStartupDialogTemplatesPage.cpp56
-rw-r--r--kexi/main/startup/KexiStartupDialogTemplatesPage.h17
-rw-r--r--kexi/main/startup/KexiStartupFileDialog.cpp156
-rw-r--r--kexi/main/startup/KexiStartupFileDialog.h33
-rw-r--r--kexi/main/startup/KexiStartupFileDialogBase_win.h36
-rw-r--r--kexi/main/startup/KexiStartupFileDialog_win.cpp222
-rw-r--r--kexi/main/startup/KexiStartup_p.cpp32
-rw-r--r--kexi/main/startup/KexiStartup_p.h11
-rw-r--r--kexi/migration/importoptionsdlg.cpp36
-rw-r--r--kexi/migration/importoptionsdlg.h7
-rw-r--r--kexi/migration/importwizard.cpp204
-rw-r--r--kexi/migration/importwizard.h43
-rw-r--r--kexi/migration/keximigrate.cpp162
-rw-r--r--kexi/migration/keximigrate.h73
-rw-r--r--kexi/migration/keximigratedata.h4
-rw-r--r--kexi/migration/migratemanager.cpp96
-rw-r--r--kexi/migration/migratemanager.h24
-rw-r--r--kexi/migration/migratemanager_p.h23
-rw-r--r--kexi/migration/mysql/mysqlmigrate.cpp94
-rw-r--r--kexi/migration/mysql/mysqlmigrate.h27
-rw-r--r--kexi/migration/pqxx/pg_type.h4
-rw-r--r--kexi/migration/pqxx/pqxxmigrate.cpp66
-rw-r--r--kexi/migration/pqxx/pqxxmigrate.h23
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog.cpp288
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog.h23
-rw-r--r--kexi/plugins/forms/kexiactionselectiondialog_p.h9
-rw-r--r--kexi/plugins/forms/kexidataawarewidgetinfo.cpp4
-rw-r--r--kexi/plugins/forms/kexidataawarewidgetinfo.h2
-rw-r--r--kexi/plugins/forms/kexidataprovider.cpp96
-rw-r--r--kexi/plugins/forms/kexidataprovider.h24
-rw-r--r--kexi/plugins/forms/kexidatasourcepage.cpp160
-rw-r--r--kexi/plugins/forms/kexidatasourcepage.h43
-rw-r--r--kexi/plugins/forms/kexidbfactory.cpp132
-rw-r--r--kexi/plugins/forms/kexidbfactory.h33
-rw-r--r--kexi/plugins/forms/kexidbtextwidgetinterface.cpp18
-rw-r--r--kexi/plugins/forms/kexidbtextwidgetinterface.h12
-rw-r--r--kexi/plugins/forms/kexiformdataiteminterface.cpp8
-rw-r--r--kexi/plugins/forms/kexiformdataiteminterface.h28
-rw-r--r--kexi/plugins/forms/kexiformeventhandler.cpp44
-rw-r--r--kexi/plugins/forms/kexiformeventhandler.h18
-rw-r--r--kexi/plugins/forms/kexiformmanager.cpp70
-rw-r--r--kexi/plugins/forms/kexiformmanager.h23
-rw-r--r--kexi/plugins/forms/kexiformpart.cpp222
-rw-r--r--kexi/plugins/forms/kexiformpart.h33
-rw-r--r--kexi/plugins/forms/kexiformscrollview.cpp74
-rw-r--r--kexi/plugins/forms/kexiformscrollview.h37
-rw-r--r--kexi/plugins/forms/kexiformview.cpp360
-rw-r--r--kexi/plugins/forms/kexiformview.h41
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.cpp298
-rw-r--r--kexi/plugins/forms/widgets/kexidbautofield.h107
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.cpp40
-rw-r--r--kexi/plugins/forms/widgets/kexidbcheckbox.h33
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.cpp248
-rw-r--r--kexi/plugins/forms/widgets/kexidbcombobox.h67
-rw-r--r--kexi/plugins/forms/widgets/kexidbdateedit.cpp80
-rw-r--r--kexi/plugins/forms/widgets/kexidbdateedit.h69
-rw-r--r--kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp96
-rw-r--r--kexi/plugins/forms/widgets/kexidbdatetimeedit.h47
-rw-r--r--kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp18
-rw-r--r--kexi/plugins/forms/widgets/kexidbdoublespinbox.h27
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.cpp280
-rw-r--r--kexi/plugins/forms/widgets/kexidbform.h61
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.cpp316
-rw-r--r--kexi/plugins/forms/widgets/kexidbimagebox.h123
-rw-r--r--kexi/plugins/forms/widgets/kexidbintspinbox.cpp18
-rw-r--r--kexi/plugins/forms/widgets/kexidbintspinbox.h27
-rw-r--r--kexi/plugins/forms/widgets/kexidblabel.cpp220
-rw-r--r--kexi/plugins/forms/widgets/kexidblabel.h75
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.cpp94
-rw-r--r--kexi/plugins/forms/widgets/kexidblineedit.h49
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.cpp50
-rw-r--r--kexi/plugins/forms/widgets/kexidbsubform.h19
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.cpp56
-rw-r--r--kexi/plugins/forms/widgets/kexidbtextedit.h33
-rw-r--r--kexi/plugins/forms/widgets/kexidbtimeedit.cpp46
-rw-r--r--kexi/plugins/forms/widgets/kexidbtimeedit.h35
-rw-r--r--kexi/plugins/forms/widgets/kexidbutils.cpp14
-rw-r--r--kexi/plugins/forms/widgets/kexidbutils.h18
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.cpp24
-rw-r--r--kexi/plugins/forms/widgets/kexiframe.h47
-rw-r--r--kexi/plugins/forms/widgets/kexiframeutils_p.cpp128
-rw-r--r--kexi/plugins/forms/widgets/kexipushbutton.cpp4
-rw-r--r--kexi/plugins/forms/widgets/kexipushbutton.h15
-rw-r--r--kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp20
-rw-r--r--kexi/plugins/importexport/csv/kexicsv_importexportpart.h8
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.cpp42
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexport.h12
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexportwizard.cpp112
-rw-r--r--kexi/plugins/importexport/csv/kexicsvexportwizard.h29
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportdialog.cpp508
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportdialog.h105
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp28
-rw-r--r--kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h11
-rw-r--r--kexi/plugins/importexport/csv/kexicsvwidgets.cpp114
-rw-r--r--kexi/plugins/importexport/csv/kexicsvwidgets.h55
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/datatableaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.cpp18
-rw-r--r--kexi/plugins/macros/kexiactions/executeaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.cpp2
-rw-r--r--kexi/plugins/macros/kexiactions/kexiaction.h2
-rw-r--r--kexi/plugins/macros/kexiactions/kexivariable.h4
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.cpp8
-rw-r--r--kexi/plugins/macros/kexiactions/messageaction.h1
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.cpp12
-rw-r--r--kexi/plugins/macros/kexiactions/navigateaction.h3
-rw-r--r--kexi/plugins/macros/kexiactions/objectnamevariable.h12
-rw-r--r--kexi/plugins/macros/kexiactions/objectvariable.h10
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.cpp48
-rw-r--r--kexi/plugins/macros/kexiactions/openaction.h3
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.cpp90
-rw-r--r--kexi/plugins/macros/kexipart/keximacrodesignview.h11
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerror.h9
-rw-r--r--kexi/plugins/macros/kexipart/keximacroerrorbase.ui32
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.cpp22
-rw-r--r--kexi/plugins/macros/kexipart/keximacropart.h17
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.cpp242
-rw-r--r--kexi/plugins/macros/kexipart/keximacroproperty.h44
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.cpp20
-rw-r--r--kexi/plugins/macros/kexipart/keximacrotextview.h5
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.cpp34
-rw-r--r--kexi/plugins/macros/kexipart/keximacroview.h7
-rw-r--r--kexi/plugins/macros/lib/action.cpp54
-rw-r--r--kexi/plugins/macros/lib/action.h45
-rw-r--r--kexi/plugins/macros/lib/context.cpp52
-rw-r--r--kexi/plugins/macros/lib/context.h17
-rw-r--r--kexi/plugins/macros/lib/exception.cpp16
-rw-r--r--kexi/plugins/macros/lib/exception.h12
-rw-r--r--kexi/plugins/macros/lib/macro.cpp26
-rw-r--r--kexi/plugins/macros/lib/macro.h29
-rw-r--r--kexi/plugins/macros/lib/macroitem.cpp64
-rw-r--r--kexi/plugins/macros/lib/macroitem.h24
-rw-r--r--kexi/plugins/macros/lib/manager.cpp54
-rw-r--r--kexi/plugins/macros/lib/manager.h50
-rw-r--r--kexi/plugins/macros/lib/metamethod.cpp130
-rw-r--r--kexi/plugins/macros/lib/metamethod.h50
-rw-r--r--kexi/plugins/macros/lib/metaobject.cpp44
-rw-r--r--kexi/plugins/macros/lib/metaobject.h26
-rw-r--r--kexi/plugins/macros/lib/metaparameter.cpp36
-rw-r--r--kexi/plugins/macros/lib/metaparameter.h36
-rw-r--r--kexi/plugins/macros/lib/variable.cpp76
-rw-r--r--kexi/plugins/macros/lib/variable.h86
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.cpp52
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.h16
-rw-r--r--kexi/plugins/macros/tests/actiontests.cpp32
-rw-r--r--kexi/plugins/macros/tests/actiontests.h1
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp246
-rw-r--r--kexi/plugins/macros/tests/commontests.h5
-rw-r--r--kexi/plugins/macros/tests/komacrotestbase.h18
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.cpp26
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.h1
-rw-r--r--kexi/plugins/macros/tests/macrotests.cpp32
-rw-r--r--kexi/plugins/macros/tests/macrotests.h1
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp8
-rw-r--r--kexi/plugins/macros/tests/testaction.h3
-rw-r--r--kexi/plugins/macros/tests/testobject.cpp28
-rw-r--r--kexi/plugins/macros/tests/testobject.h13
-rw-r--r--kexi/plugins/macros/tests/variabletests.cpp26
-rw-r--r--kexi/plugins/macros/tests/variabletests.h1
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp180
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.h15
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp232
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.h19
-rw-r--r--kexi/plugins/migration/keximigrationpart.cpp10
-rw-r--r--kexi/plugins/migration/keximigrationpart.h8
-rw-r--r--kexi/plugins/queries/kexiaddparamdialog.cpp8
-rw-r--r--kexi/plugins/queries/kexiaddparamdialog.h5
-rw-r--r--kexi/plugins/queries/kexiaddparamwidget.ui36
-rw-r--r--kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp24
-rw-r--r--kexi/plugins/queries/kexidynamicqueryparameterdialog.h11
-rw-r--r--kexi/plugins/queries/kexiparameterlisteditor.ui10
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.cpp446
-rw-r--r--kexi/plugins/queries/kexiquerydesignerguieditor.h43
-rw-r--r--kexi/plugins/queries/kexiquerydesignersql.cpp146
-rw-r--r--kexi/plugins/queries/kexiquerydesignersql.h17
-rw-r--r--kexi/plugins/queries/kexiquerydesignersqlhistory.cpp166
-rw-r--r--kexi/plugins/queries/kexiquerydesignersqlhistory.h59
-rw-r--r--kexi/plugins/queries/kexiquerypart.cpp50
-rw-r--r--kexi/plugins/queries/kexiquerypart.h21
-rw-r--r--kexi/plugins/queries/kexiqueryview.cpp18
-rw-r--r--kexi/plugins/queries/kexiqueryview.h7
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.cpp20
-rw-r--r--kexi/plugins/relations/kexirelationmaindlg.h9
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.cpp14
-rw-r--r--kexi/plugins/relations/kexirelationpartimpl.h13
-rw-r--r--kexi/plugins/reports/kexireportfactory.cpp62
-rw-r--r--kexi/plugins/reports/kexireportfactory.h29
-rw-r--r--kexi/plugins/reports/kexireportform.cpp92
-rw-r--r--kexi/plugins/reports/kexireportform.h27
-rw-r--r--kexi/plugins/reports/kexireportpart.cpp20
-rw-r--r--kexi/plugins/reports/kexireportpart.h23
-rw-r--r--kexi/plugins/reports/kexireportview.cpp112
-rw-r--r--kexi/plugins/reports/kexireportview.h16
-rw-r--r--kexi/plugins/reports/reportwidgets.cpp56
-rw-r--r--kexi/plugins/reports/reportwidgets.h58
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp4
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmainwindow.h8
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmodule.cpp2
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiappmodule.h6
-rw-r--r--kexi/plugins/scripting/kexiapp/kexiapppart.h6
-rw-r--r--kexi/plugins/scripting/kexidb.doxyfile4
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.cpp54
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnection.h34
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp46
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbconnectiondata.h48
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbcursor.cpp18
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbcursor.h12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdriver.cpp20
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdriver.h22
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp46
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbdrivermanager.h16
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfield.cpp30
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfield.h36
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbfieldlist.h10
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbmodule.cpp4
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbmodule.h8
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbparser.cpp12
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbparser.h14
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbschema.cpp50
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbschema.h26
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbtransaction.cpp2
-rw-r--r--kexi/plugins/scripting/kexidb/kexidbtransaction.h4
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp104
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h3
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp14
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscripteditor.h3
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp26
-rw-r--r--kexi/plugins/scripting/kexiscripting/kexiscriptpart.h19
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenter.py78
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py48
-rw-r--r--kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py36
-rw-r--r--kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py4
-rwxr-xr-xkexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py4
-rw-r--r--kexi/plugins/tables/kexilookupcolumnpage.cpp108
-rw-r--r--kexi/plugins/tables/kexilookupcolumnpage.h21
-rw-r--r--kexi/plugins/tables/kexitabledesigner_dataview.cpp6
-rw-r--r--kexi/plugins/tables/kexitabledesigner_dataview.h3
-rw-r--r--kexi/plugins/tables/kexitabledesignercommands.cpp78
-rw-r--r--kexi/plugins/tables/kexitabledesignercommands.h52
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.cpp500
-rw-r--r--kexi/plugins/tables/kexitabledesignerview.h29
-rw-r--r--kexi/plugins/tables/kexitabledesignerview_p.cpp38
-rw-r--r--kexi/plugins/tables/kexitabledesignerview_p.h25
-rw-r--r--kexi/plugins/tables/kexitablepart.cpp60
-rw-r--r--kexi/plugins/tables/kexitablepart.h17
-rw-r--r--kexi/tests/altertable/1.kexibin49150 -> 49212 bytes
-rw-r--r--kexi/tests/altertable/altertable.cpp238
-rw-r--r--kexi/tests/altertable/altertable.h23
-rw-r--r--kexi/tests/gui/finddialog/finddialog.pro4
-rw-r--r--kexi/tests/gui/finddialog/kexifinddialog.cpp10
-rw-r--r--kexi/tests/gui/finddialog/kexifinddialog.h15
-rw-r--r--kexi/tests/gui/finddialog/kexifinddialogbase.ui32
-rw-r--r--kexi/tests/newapi/dr_prop_test.h10
-rw-r--r--kexi/tests/newapi/main.cpp34
-rw-r--r--kexi/tests/newapi/mysqlcursor.cpp8
-rw-r--r--kexi/tests/newapi/parser_test.h12
-rw-r--r--kexi/tests/newapi/statements.txt2
-rw-r--r--kexi/tests/newapi/tables_test.h22
-rw-r--r--kexi/tests/newapi/tableview_test.h2
-rw-r--r--kexi/tests/parser/main.cpp14
-rw-r--r--kexi/tests/startup/main.cpp16
-rw-r--r--kexi/tests/widgets/kexidbdrivercombotest.cpp12
-rwxr-xr-xkexi/tools/delete_column/kexi_delete_column2
-rw-r--r--kexi/widget/kexibrowser.cpp216
-rw-r--r--kexi/widget/kexibrowser.h41
-rw-r--r--kexi/widget/kexibrowser_p.h7
-rw-r--r--kexi/widget/kexibrowseritem.cpp18
-rw-r--r--kexi/widget/kexibrowseritem.h18
-rw-r--r--kexi/widget/kexicharencodingcombobox.cpp34
-rw-r--r--kexi/widget/kexicharencodingcombobox.h12
-rw-r--r--kexi/widget/kexicustompropertyfactory.cpp32
-rw-r--r--kexi/widget/kexicustompropertyfactory.h4
-rw-r--r--kexi/widget/kexicustompropertyfactory_p.cpp38
-rw-r--r--kexi/widget/kexicustompropertyfactory_p.h16
-rw-r--r--kexi/widget/kexidataawareview.cpp106
-rw-r--r--kexi/widget/kexidataawareview.h27
-rw-r--r--kexi/widget/kexidatasourcecombobox.cpp60
-rw-r--r--kexi/widget/kexidatasourcecombobox.h17
-rw-r--r--kexi/widget/kexidatatable.cpp18
-rw-r--r--kexi/widget/kexidatatable.h5
-rw-r--r--kexi/widget/kexidbconnectionwidget.cpp98
-rw-r--r--kexi/widget/kexidbconnectionwidget.h21
-rw-r--r--kexi/widget/kexidbconnectionwidgetbase.ui62
-rw-r--r--kexi/widget/kexidbconnectionwidgetdetailsbase.ui30
-rw-r--r--kexi/widget/kexidbdrivercombobox.cpp24
-rw-r--r--kexi/widget/kexidbdrivercombobox.h19
-rw-r--r--kexi/widget/kexidswelcome.cpp28
-rw-r--r--kexi/widget/kexidswelcome.h7
-rw-r--r--kexi/widget/kexieditor.cpp66
-rw-r--r--kexi/widget/kexieditor.h15
-rw-r--r--kexi/widget/kexifieldcombobox.cpp72
-rw-r--r--kexi/widget/kexifieldcombobox.h19
-rw-r--r--kexi/widget/kexifieldlistview.cpp54
-rw-r--r--kexi/widget/kexifieldlistview.h23
-rw-r--r--kexi/widget/kexifilterdlg.cpp78
-rw-r--r--kexi/widget/kexifilterdlg.h23
-rw-r--r--kexi/widget/kexiprjtypeselector.cpp8
-rw-r--r--kexi/widget/kexiprjtypeselector.h3
-rw-r--r--kexi/widget/kexiprjtypeselectorbase.ui24
-rw-r--r--kexi/widget/kexiprjtypeselectorbase.ui.h2
-rw-r--r--kexi/widget/kexipropertyeditorview.cpp84
-rw-r--r--kexi/widget/kexipropertyeditorview.h41
-rw-r--r--kexi/widget/kexiquerydesignersqleditor.cpp4
-rw-r--r--kexi/widget/kexiquerydesignersqleditor.h7
-rw-r--r--kexi/widget/kexiqueryparameters.cpp58
-rw-r--r--kexi/widget/kexiqueryparameters.h6
-rw-r--r--kexi/widget/kexiscrollview.cpp138
-rw-r--r--kexi/widget/kexiscrollview.h39
-rw-r--r--kexi/widget/kexisectionheader.cpp88
-rw-r--r--kexi/widget/kexisectionheader.h17
-rw-r--r--kexi/widget/kexismalltoolbutton.cpp70
-rw-r--r--kexi/widget/kexismalltoolbutton.h31
-rw-r--r--kexi/widget/pixmapcollection.cpp224
-rw-r--r--kexi/widget/pixmapcollection.h84
-rw-r--r--kexi/widget/relations/kexirelationview.cpp148
-rw-r--r--kexi/widget/relations/kexirelationview.h59
-rw-r--r--kexi/widget/relations/kexirelationviewconnection.cpp80
-rw-r--r--kexi/widget/relations/kexirelationviewconnection.h34
-rw-r--r--kexi/widget/relations/kexirelationviewtable.cpp198
-rw-r--r--kexi/widget/relations/kexirelationviewtable.h63
-rw-r--r--kexi/widget/relations/kexirelationwidget.cpp154
-rw-r--r--kexi/widget/relations/kexirelationwidget.h37
-rw-r--r--kexi/widget/tableview/kexiblobtableedit.cpp224
-rw-r--r--kexi/widget/tableview/kexiblobtableedit.h57
-rw-r--r--kexi/widget/tableview/kexibooltableedit.cpp72
-rw-r--r--kexi/widget/tableview/kexibooltableedit.h21
-rw-r--r--kexi/widget/tableview/kexicelleditorfactory.cpp32
-rw-r--r--kexi/widget/tableview/kexicelleditorfactory.h24
-rw-r--r--kexi/widget/tableview/kexicomboboxbase.cpp130
-rw-r--r--kexi/widget/tableview/kexicomboboxbase.h36
-rw-r--r--kexi/widget/tableview/kexicomboboxpopup.cpp86
-rw-r--r--kexi/widget/tableview/kexicomboboxpopup.h11
-rw-r--r--kexi/widget/tableview/kexicomboboxtableedit.cpp110
-rw-r--r--kexi/widget/tableview/kexicomboboxtableedit.h45
-rw-r--r--kexi/widget/tableview/kexidataawareobjectiface.cpp298
-rw-r--r--kexi/widget/tableview/kexidataawareobjectiface.h116
-rw-r--r--kexi/widget/tableview/kexidataawarepropertyset.cpp50
-rw-r--r--kexi/widget/tableview/kexidataawarepropertyset.h25
-rw-r--r--kexi/widget/tableview/kexidatatableview.cpp20
-rw-r--r--kexi/widget/tableview/kexidatatableview.h9
-rw-r--r--kexi/widget/tableview/kexidatetableedit.cpp116
-rw-r--r--kexi/widget/tableview/kexidatetableedit.h21
-rw-r--r--kexi/widget/tableview/kexidatetimetableedit.cpp62
-rw-r--r--kexi/widget/tableview/kexidatetimetableedit.h19
-rw-r--r--kexi/widget/tableview/kexiinputtableedit.cpp116
-rw-r--r--kexi/widget/tableview/kexiinputtableedit.h31
-rw-r--r--kexi/widget/tableview/kexitableedit.cpp72
-rw-r--r--kexi/widget/tableview/kexitableedit.h67
-rw-r--r--kexi/widget/tableview/kexitableitem.cpp4
-rw-r--r--kexi/widget/tableview/kexitableitem.h8
-rw-r--r--kexi/widget/tableview/kexitableview.cpp690
-rw-r--r--kexi/widget/tableview/kexitableview.h171
-rw-r--r--kexi/widget/tableview/kexitableview_p.cpp8
-rw-r--r--kexi/widget/tableview/kexitableview_p.h32
-rw-r--r--kexi/widget/tableview/kexitableviewdata.cpp124
-rw-r--r--kexi/widget/tableview/kexitableviewdata.h123
-rw-r--r--kexi/widget/tableview/kexitableviewheader.cpp108
-rw-r--r--kexi/widget/tableview/kexitableviewheader.h31
-rw-r--r--kexi/widget/tableview/kexitextformatter.cpp36
-rw-r--r--kexi/widget/tableview/kexitextformatter.h14
-rw-r--r--kexi/widget/tableview/kexitimetableedit.cpp64
-rw-r--r--kexi/widget/tableview/kexitimetableedit.h21
-rw-r--r--kexi/widget/utils/kexiarrowtip.cpp68
-rw-r--r--kexi/widget/utils/kexiarrowtip.h9
-rw-r--r--kexi/widget/utils/kexicomboboxdropdownbutton.cpp44
-rw-r--r--kexi/widget/utils/kexicomboboxdropdownbutton.h10
-rw-r--r--kexi/widget/utils/kexicontextmenuutils.cpp102
-rw-r--r--kexi/widget/utils/kexicontextmenuutils.h15
-rw-r--r--kexi/widget/utils/kexidatetimeformatter.cpp186
-rw-r--r--kexi/widget/utils/kexidatetimeformatter.h80
-rw-r--r--kexi/widget/utils/kexidisplayutils.cpp66
-rw-r--r--kexi/widget/utils/kexidisplayutils.h18
-rw-r--r--kexi/widget/utils/kexidropdownbutton.cpp50
-rw-r--r--kexi/widget/utils/kexidropdownbutton.h15
-rw-r--r--kexi/widget/utils/kexiflowlayout.cpp329
-rw-r--r--kexi/widget/utils/kexiflowlayout.h52
-rw-r--r--kexi/widget/utils/kexigradientwidget.cpp134
-rw-r--r--kexi/widget/utils/kexigradientwidget.h79
-rw-r--r--kexi/widget/utils/kexirecordmarker.cpp86
-rw-r--r--kexi/widget/utils/kexirecordmarker.h19
-rw-r--r--kexi/widget/utils/kexirecordnavigator.cpp168
-rw-r--r--kexi/widget/utils/kexirecordnavigator.h47
-rw-r--r--kexi/widget/utils/kexisharedactionclient.h4
-rw-r--r--kexi/widget/utils/kexitooltip.cpp46
-rw-r--r--kexi/widget/utils/kexitooltip.h19
-rw-r--r--kexi/widget/utils/klistviewitemtemplate.h34
771 files changed, 21907 insertions, 21625 deletions
diff --git a/kexi/3rdparty/kexisql/src/btree.c b/kexi/3rdparty/kexisql/src/btree.c
index 02e01249f..3a79a6240 100644
--- a/kexi/3rdparty/kexisql/src/btree.c
+++ b/kexi/3rdparty/kexisql/src/btree.c
@@ -47,7 +47,7 @@
** the file really is a valid BTree database, a pointer to a list of unused
** pages in the file, and some meta information. The root of the first
** BTree begins on page 2 of the file. (Pages are numbered beginning with
-** 1, not 0.) Thus a minimum database contains 2 pages.
+** 1, not 0.) Thus a minimum database tqcontains 2 pages.
*/
#include "sqliteInt.h"
#include "pager.h"
@@ -101,7 +101,7 @@ typedef struct FreelistInfo FreelistInfo;
** This routine rounds up a number of bytes to the next multiple of 4.
**
** This might need to change for computer architectures that require
-** and 8-byte alignment boundry for structures.
+** and 8-byte tqalignment boundry for structures.
*/
#define ROUNDUP(X) ((X+3) & ~3)
@@ -128,7 +128,7 @@ static const char zMagicHeader[] =
/*
** The first page of the database file contains a magic header string
-** to identify the file as an SQLite database file. It also contains
+** to identify the file as an SQLite database file. It also tqcontains
** a pointer to the first free page of the file. Page 2 contains the
** root of the principle BTree. The file might contain other BTrees
** rooted on pages above 2.
@@ -313,9 +313,9 @@ struct FreelistInfo {
** page to hold as many as two more cells than it might otherwise hold.
** The extra two entries in apCell[] are an allowance for this situation.
**
-** The pParent field points back to the parent page. This allows us to
+** The pParent field points back to the tqparent page. This allows us to
** walk up the BTree from any leaf to the root. Care must be taken to
-** unref() the parent page pointer when this page is no longer referenced.
+** unref() the tqparent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.
*/
struct MemPage {
@@ -326,7 +326,7 @@ struct MemPage {
u8 isInit; /* True if auxiliary data is initialized */
u8 idxShift; /* True if apCell[] indices have changed */
u8 isOverfull; /* Some apCell[] points outside u.aDisk[] */
- MemPage *pParent; /* The parent of this page. NULL for root */
+ MemPage *pParent; /* The tqparent of this page. NULL for root */
int idxParent; /* Index in pParent->apCell[] of this node */
int nFree; /* Number of free bytes in u.aDisk[] */
int nCell; /* Number of entries on this page */
@@ -567,8 +567,8 @@ static void freeSpace(Btree *pBt, MemPage *pPage, int start, int size){
** Initialize the auxiliary information for a disk block.
**
** The pParent parameter must be a pointer to the MemPage which
-** is the parent of the page being initialized. The root of the
-** BTree (usually page 2) has no parent and so for that page,
+** is the tqparent of the page being initialized. The root of the
+** BTree (usually page 2) has no tqparent and so for that page,
** pParent==NULL.
**
** Return SQLITE_OK on success. If we see that the page does
@@ -726,7 +726,7 @@ int sqliteBtreeOpen(
}
/*
-** Close an open database and invalidate all cursors.
+** Close an open database and tqinvalidate all cursors.
*/
static int fileBtreeClose(Btree *pBt){
while( pBt->pCursor ){
@@ -1414,7 +1414,7 @@ static int moveToChild(BtCursor *pCur, int newPgno){
}
/*
-** Move the cursor up to the parent page.
+** Move the cursor up to the tqparent page.
**
** pCur->idx is set to the cell index that contains the pointer
** to the page we are coming from. If we are coming from the
@@ -1451,7 +1451,7 @@ static void moveToParent(BtCursor *pCur){
}else{
/* The MemPage.idxShift flag indicates that cell indices might have
** changed since idxParent was set and hence idxParent might be out
- ** of date. So recompute the parent cell index by scanning all cells
+ ** of date. So recompute the tqparent cell index by scanning all cells
** and locating the one that points to the child we just came from.
*/
int i;
@@ -1998,9 +1998,9 @@ static void reparentPage(Pager *pPager, Pgno pgno, MemPage *pNewParent,int idx){
}
/*
-** Reparent all children of the given page to be the given page.
+** Retqparent all tqchildren of the given page to be the given page.
** In other words, for every child of pPage, invoke reparentPage()
-** to make sure that each child knows that pPage is its parent.
+** to make sure that each child knows that pPage is its tqparent.
**
** This routine gets called after you memcpy() one page into
** another.
@@ -2141,7 +2141,7 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){
** of pPage so that all pages have about the same amount of free space.
** Usually one sibling on either side of pPage is used in the balancing,
** though both siblings might come from one side if pPage is the first
-** or last child of its parent. If pPage has fewer than two siblings
+** or last child of its tqparent. If pPage has fewer than two siblings
** (something which can only happen if pPage is the root page or a
** child of root) then all available siblings participate in the balancing.
**
@@ -2168,16 +2168,16 @@ static void copyPage(MemPage *pTo, MemPage *pFrom){
** if the page is overfull. Part of the job of this routine is to
** make sure all Cells for pPage once again fit in pPage->u.aDisk[].
**
-** In the course of balancing the siblings of pPage, the parent of pPage
+** In the course of balancing the siblings of pPage, the tqparent of pPage
** might become overfull or underfull. If that happens, then this routine
-** is called recursively on the parent.
+** is called recursively on the tqparent.
**
** If this routine fails for any reason, it might leave the database
** in a corrupted state. So if this routine fails, the database should
** be rolled back.
*/
static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
- MemPage *pParent; /* The parent of pPage */
+ MemPage *pParent; /* The tqparent of pPage */
int nCell; /* Number of cells in apCell[] */
int nOld; /* Number of pages in apOld[] */
int nNew; /* Number of pages in apNew[] */
@@ -2215,8 +2215,8 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
}
/*
- ** Find the parent of the page to be balanceed.
- ** If there is no parent, it means this page is the root page and
+ ** Find the tqparent of the page to be balanceed.
+ ** If there is no tqparent, it means this page is the root page and
** special rules apply.
*/
pParent = pPage->pParent;
@@ -2291,7 +2291,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
assert( pParent->isInit );
/*
- ** Find the Cell in the parent page whose h.leftChild points back
+ ** Find the Cell in the tqparent page whose h.leftChild points back
** to pPage. The "idx" variable is the index of that cell. If pPage
** is the rightmost child of pParent then set idx to pParent->nCell
*/
@@ -2321,7 +2321,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
** the siblings. An attempt is made to find NN siblings on either
** side of pPage. More siblings are taken from one side, however, if
** pPage there are fewer than NN siblings on the other side. If pParent
- ** has NB or fewer children then all children of pParent are taken.
+ ** has NB or fewer tqchildren then all tqchildren of pParent are taken.
*/
nxDiv = idx - NN;
if( nxDiv + NB > pParent->nCell ){
@@ -2547,7 +2547,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
}
/*
- ** Reparent children of all cells.
+ ** Retqparent tqchildren of all cells.
*/
for(i=0; i<nNew; i++){
reparentChildPages(pBt, apNew[i]);
@@ -2555,7 +2555,7 @@ static int balance(Btree *pBt, MemPage *pPage, BtCursor *pCur){
reparentChildPages(pBt, pParent);
/*
- ** balance the parent page.
+ ** balance the tqparent page.
*/
rc = balance(pBt, pParent, pCur);
@@ -2794,7 +2794,7 @@ static int fileBtreeCreateTable(Btree *pBt, int *piTable){
}
/*
-** Erase the given database page and all its children. Return
+** Erase the given database page and all its tqchildren. Return
** the page to the freelist.
*/
static int clearDatabasePage(Btree *pBt, Pgno pgno, int freePageFlag){
@@ -3274,8 +3274,8 @@ static int keyCompare(
** 3. Make sure no key is less than or equal to zLowerBound.
** 4. Make sure no key is greater than or equal to zUpperBound.
** 5. Check the integrity of overflow pages.
-** 6. Recursively call checkTreePage on all children.
-** 7. Verify that the depth of all children is the same.
+** 6. Recursively call checkTreePage on all tqchildren.
+** 7. Verify that the depth of all tqchildren is the same.
** 8. Make sure this page is at least 33% full or else it is
** the root of the tree.
*/
diff --git a/kexi/3rdparty/kexisql/src/btree_rb.c b/kexi/3rdparty/kexisql/src/btree_rb.c
index 3954fe6d4..8d905ef0b 100644
--- a/kexi/3rdparty/kexisql/src/btree_rb.c
+++ b/kexi/3rdparty/kexisql/src/btree_rb.c
@@ -123,7 +123,7 @@ struct BtRbNode {
int nData;
void *pData;
u8 isBlack; /* true for a black node, 0 for a red node */
- BtRbNode *pParent; /* Nodes parent node, NULL for the tree head */
+ BtRbNode *pParent; /* Nodes tqparent node, NULL for the tree head */
BtRbNode *pLeft; /* Nodes left child, or NULL */
BtRbNode *pRight; /* Nodes right child, or NULL */
@@ -319,7 +319,7 @@ static void print_node(BtRbNode *pNode)
/*
* Check the following properties of the red-black tree:
- * (1) - If a node is red, both of it's children are black
+ * (1) - If a node is red, both of it's tqchildren are black
* (2) - Each path from a given node to a leaf (NULL) node passes thru the
* same number of black nodes
*
@@ -329,7 +329,7 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg)
{
BtRbNode *pNode;
- /* 0 -> came from parent
+ /* 0 -> came from tqparent
* 1 -> came from left
* 2 -> came from right */
int prev_step = 0;
@@ -400,34 +400,34 @@ static void check_redblack_tree(BtRbTree * tree, char ** msg)
/*
* Node pX has just been inserted into pTree (by code in sqliteRbtreeInsert()).
- * It is possible that pX is a red node with a red parent, which is a violation
+ * It is possible that pX is a red node with a red tqparent, which is a violation
* of the red-black tree properties. This function performs rotations and
* color changes to rebalance the tree
*/
static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX)
{
/* In the first iteration of this loop, pX points to the red node just
- * inserted in the tree. If the parent of pX exists (pX is not the root
+ * inserted in the tree. If the tqparent of pX exists (pX is not the root
* node) and is red, then the properties of the red-black tree are
* violated.
*
* At the start of any subsequent iterations, pX points to a red node
- * with a red parent. In all other respects the tree is a legal red-black
+ * with a red tqparent. In all other respects the tree is a legal red-black
* binary tree. */
while( pX != pTree->pHead && !pX->pParent->isBlack ){
BtRbNode *pUncle;
- BtRbNode *pGrandparent;
+ BtRbNode *pGrandtqparent;
- /* Grandparent of pX must exist and must be black. */
- pGrandparent = pX->pParent->pParent;
- assert( pGrandparent );
- assert( pGrandparent->isBlack );
+ /* Grandtqparent of pX must exist and must be black. */
+ pGrandtqparent = pX->pParent->pParent;
+ assert( pGrandtqparent );
+ assert( pGrandtqparent->isBlack );
/* Uncle of pX may or may not exist. */
- if( pX->pParent == pGrandparent->pLeft )
- pUncle = pGrandparent->pRight;
+ if( pX->pParent == pGrandtqparent->pLeft )
+ pUncle = pGrandtqparent->pRight;
else
- pUncle = pGrandparent->pLeft;
+ pUncle = pGrandtqparent->pLeft;
/* If the uncle of pX exists and is red, we do the following:
* | |
@@ -438,16 +438,16 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX)
* X(r) X(r)
*
* BEFORE AFTER
- * pX is then set to G. If the parent of G is red, then the while loop
+ * pX is then set to G. If the tqparent of G is red, then the while loop
* will run again. */
if( pUncle && !pUncle->isBlack ){
- pGrandparent->isBlack = 0;
+ pGrandtqparent->isBlack = 0;
pUncle->isBlack = 1;
pX->pParent->isBlack = 1;
- pX = pGrandparent;
+ pX = pGrandtqparent;
}else{
- if( pX->pParent == pGrandparent->pLeft ){
+ if( pX->pParent == pGrandtqparent->pLeft ){
if( pX == pX->pParent->pRight ){
/* If pX is a right-child, do the following transform, essentially
* to change pX into a left-child:
@@ -474,10 +474,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX)
*
* BEFORE AFTER
*/
- assert( pGrandparent == pX->pParent->pParent );
- pGrandparent->isBlack = 0;
+ assert( pGrandtqparent == pX->pParent->pParent );
+ pGrandtqparent->isBlack = 0;
pX->pParent->isBlack = 1;
- rightRotate( pTree, pGrandparent );
+ rightRotate( pTree, pGrandtqparent );
}else{
/* This code is symetric to the illustrated case above. */
@@ -485,10 +485,10 @@ static void do_insert_balancing(BtRbTree *pTree, BtRbNode *pX)
pX = pX->pParent;
rightRotate(pTree, pX);
}
- assert( pGrandparent == pX->pParent->pParent );
- pGrandparent->isBlack = 0;
+ assert( pGrandtqparent == pX->pParent->pParent );
+ pGrandtqparent->isBlack = 0;
pX->pParent->isBlack = 1;
- leftRotate( pTree, pGrandparent );
+ leftRotate( pTree, pGrandtqparent );
}
}
}
@@ -768,7 +768,7 @@ static int memRbtreeInsert(
memcpy(pData, pDataInput, nData);
/* Move the cursor to a node near the key to be inserted. If the key already
- * exists in the table, then (match == 0). In this case we can just replace
+ * exists in the table, then (match == 0). In this case we can just tqreplace
* the data associated with the entry, we don't need to manipulate the tree.
*
* If there is no exact match, then the cursor points at what would be either
@@ -951,10 +951,10 @@ static int memRbtreeDelete(RbtCursor* pCur)
}
/* First do a standard binary-tree delete (node pZ is to be deleted). How
- * to do this depends on how many children pZ has:
+ * to do this depends on how many tqchildren pZ has:
*
- * If pZ has no children or one child, then splice out pZ. If pZ has two
- * children, splice out the successor of pZ and replace the key and data of
+ * If pZ has no tqchildren or one child, then splice out pZ. If pZ has two
+ * tqchildren, splice out the successor of pZ and replace the key and data of
* pZ with the key and data of the spliced out successor. */
if( pZ->pLeft && pZ->pRight ){
BtRbNode *pTmp;
@@ -1008,7 +1008,7 @@ static int memRbtreeDelete(RbtCursor* pCur)
}
/* pZ now points at the spliced out node. pChild is the only child of pZ, or
- * NULL if pZ has no children. If pZ is black, and not the tree root, then we
+ * NULL if pZ has no tqchildren. If pZ is black, and not the tree root, then we
* will have violated the "same number of black nodes in every path to a
* leaf" property of the red-black tree. The code in do_delete_balancing()
* repairs this. */
diff --git a/kexi/3rdparty/kexisql/src/build.c b/kexi/3rdparty/kexisql/src/build.c
index 1dece406e..2fb190644 100644
--- a/kexi/3rdparty/kexisql/src/build.c
+++ b/kexi/3rdparty/kexisql/src/build.c
@@ -526,7 +526,7 @@ void sqliteStartTable(
/* Begin generating the code that will insert the table record into
** the SQLITE_MASTER table. Note in particular that we must go ahead
** and allocate the record number for the table entry now. Before any
- ** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause
+ ** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause
** indices to be created and the table record must come before the
** indices. Hence, the record number for the table must be allocated
** now.
@@ -1461,7 +1461,7 @@ void sqliteDeferForeignKey(Parse *pParse, int isDeferred){
** Create a new index for an SQL table. pIndex is the name of the index
** and pTable is the name of the table that is to be indexed. Both will
** be NULL for a primary key or an index that is created to satisfy a
-** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
+** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** as the table to be indexed. pParse->pNewTable is a table that is
** currently being constructed by a CREATE TABLE statement.
**
@@ -1531,7 +1531,7 @@ void sqliteCreateIndex(
** index, then we will continue to process this index.
**
** If pName==0 it means that we are
- ** dealing with a primary key or UNIQUE constraint. We have to invent our
+ ** dealing with a primary key or UNITQUE constraint. We have to invent our
** own name.
*/
if( pName && !db->init.busy ){
@@ -1673,7 +1673,7 @@ void sqliteCreateIndex(
** we don't want to recreate it.
**
** If pTable==0 it means this index is generated as a primary key
- ** or UNIQUE constraint of a CREATE TABLE statement. Since the table
+ ** or UNITQUE constraint of a CREATE TABLE statement. Since the table
** has just been created, it contains no data and the index initialization
** step can be skipped.
*/
@@ -1767,7 +1767,7 @@ void sqliteDropIndex(Parse *pParse, SrcList *pName){
goto exit_drop_index;
}
if( pIndex->autoIndex ){
- sqliteErrorMsg(pParse, "index associated with UNIQUE "
+ sqliteErrorMsg(pParse, "index associated with UNITQUE "
"or PRIMARY KEY constraint cannot be dropped", 0);
goto exit_drop_index;
}
diff --git a/kexi/3rdparty/kexisql/src/encode.c b/kexi/3rdparty/kexisql/src/encode.c
index 899901b52..3e14e641b 100644
--- a/kexi/3rdparty/kexisql/src/encode.c
+++ b/kexi/3rdparty/kexisql/src/encode.c
@@ -67,7 +67,7 @@
** (2) Copy each input character into the output buffer, one by
** one, adding the offset value as you copy.
**
-** (3) If the value of an input character plus offset is 0x00, replace
+** (3) If the value of an input character plus offset is 0x00, tqreplace
** that one character by the two-character sequence 0x01 0x01.
** If the sum is 0x01, replace it with 0x01 0x02. If the sum
** is 0x27, replace it with 0x01 0x03.
@@ -101,7 +101,7 @@
*/
/*
-** Encode a binary buffer "in" of size n bytes so that it contains
+** Encode a binary buffer "in" of size n bytes so that it tqcontains
** no instances of characters '\'' or '\000'. The output is
** null-terminated and can be used as a string value in an INSERT
** or UPDATE statement. Use sqlite_decode_binary() to convert the
@@ -231,7 +231,7 @@ int main(int argc, char **argv){
}
for(j=0; out[j]; j++){
if( out[j]=='\'' ){
- printf(" ERROR contains (')\n");
+ printf(" ERROR tqcontains (')\n");
exit(1);
}
}
diff --git a/kexi/3rdparty/kexisql/src/func.c b/kexi/3rdparty/kexisql/src/func.c
index 1e176258c..cf0b8bafa 100644
--- a/kexi/3rdparty/kexisql/src/func.c
+++ b/kexi/3rdparty/kexisql/src/func.c
@@ -32,10 +32,10 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){
const char *zBest;
int i;
int (*xCompare)(const char*, const char*);
- int mask; /* 0 for min() or 0xffffffff for max() */
+ int tqmask; /* 0 for min() or 0xffffffff for max() */
if( argc==0 ) return;
- mask = (int)sqlite_user_data(context);
+ tqmask = (int)sqlite_user_data(context);
zBest = argv[0];
if( zBest==0 ) return;
if( argv[1][0]=='n' ){
@@ -45,7 +45,7 @@ static void minmaxFunc(sqlite_func *context, int argc, const char **argv){
}
for(i=2; i<argc; i+=2){
if( argv[i]==0 ) return;
- if( (xCompare(argv[i], zBest)^mask)<0 ){
+ if( (xCompare(argv[i], zBest)^tqmask)<0 ){
zBest = argv[i];
}
}
@@ -285,7 +285,7 @@ static void versionFunc(sqlite_func *context, int argc, const char **argv){
** change. This function may disappear. Do not write code that depends
** on this function.
**
-** Implementation of the QUOTE() function. This function takes a single
+** Implementation of the TQUOTE() function. This function takes a single
** argument. If the argument is numeric, the return value is the same as
** the argument. If the argument is NULL, the return value is the string
** "NULL". Otherwise, the argument is enclosed in single quotes with
@@ -365,7 +365,7 @@ static void soundexFunc(sqlite_func *context, int argc, const char **argv){
static void randStr(sqlite_func *context, int argc, const char **argv){
static const unsigned char zSrc[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789"
".-!,:*^+=_|?/<> ";
int iMin, iMax, n, r, i;
@@ -514,7 +514,7 @@ struct MinMaxCtx {
static void minmaxStep(sqlite_func *context, int argc, const char **argv){
MinMaxCtx *p;
int (*xCompare)(const char*, const char*);
- int mask; /* 0 for min() or 0xffffffff for max() */
+ int tqmask; /* 0 for min() or 0xffffffff for max() */
assert( argc==2 );
if( argv[0]==0 ) return; /* Ignore NULL values */
@@ -523,11 +523,11 @@ static void minmaxStep(sqlite_func *context, int argc, const char **argv){
}else{
xCompare = strcmp;
}
- mask = (int)sqlite_user_data(context);
- assert( mask==0 || mask==-1 );
+ tqmask = (int)sqlite_user_data(context);
+ assert( tqmask==0 || tqmask==-1 );
p = sqlite_aggregate_context(context, sizeof(*p));
if( p==0 || argc<1 ) return;
- if( p->z==0 || (xCompare(argv[0],p->z)^mask)<0 ){
+ if( p->z==0 || (xCompare(argv[0],p->z)^tqmask)<0 ){
int len;
if( p->zBuf[0] ){
sqliteFree(p->z);
diff --git a/kexi/3rdparty/kexisql/src/insert.c b/kexi/3rdparty/kexisql/src/insert.c
index 660a2a568..8c303573a 100644
--- a/kexi/3rdparty/kexisql/src/insert.c
+++ b/kexi/3rdparty/kexisql/src/insert.c
@@ -541,7 +541,7 @@ insert_cleanup:
/*
** Generate code to do a constraint check prior to an INSERT or an UPDATE.
**
-** When this routine is called, the stack contains (from bottom to top)
+** When this routine is called, the stack tqcontains (from bottom to top)
** the following values:
**
** 1. The recno of the row to be updated before the update. This
@@ -567,7 +567,7 @@ insert_cleanup:
** aIdxUsed!=0 and aIdxUsed[i]!=0.
**
** This routine also generates code to check constraints. NOT NULL,
-** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
+** CHECK, and UNITQUE constraints are all checked. If a constraint fails,
** then the appropriate action is performed. There are five possible
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
**
@@ -595,7 +595,7 @@ insert_cleanup:
** value for that column. If the default value
** is NULL, the action is the same as ABORT.
**
-** UNIQUE REPLACE The other row that conflicts with the row
+** UNITQUE REPLACE The other row that conflicts with the row
** being inserted is removed.
**
** CHECK REPLACE Illegal. The results in an exception.
@@ -753,7 +753,7 @@ void sqliteGenerateConstraintChecks(
}
}
- /* Test all UNIQUE constraints by creating entries for each UNIQUE
+ /* Test all UNITQUE constraints by creating entries for each UNITQUE
** index and making sure that duplicate entries do not already exist.
** Add the new records to the indices as we go.
*/
@@ -777,7 +777,7 @@ void sqliteGenerateConstraintChecks(
/* Find out what action to take in case there is an indexing conflict */
onError = pIdx->onError;
- if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */
+ if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */
if( overrideError!=OE_Default ){
onError = overrideError;
}else if( pParse->db->onError!=OE_Default ){
@@ -843,7 +843,7 @@ void sqliteGenerateConstraintChecks(
default: assert(0);
}
contAddr = sqliteVdbeCurrentAddr(v);
-#if NULL_DISTINCT_FOR_UNIQUE
+#if NULL_DISTINCT_FOR_UNITQUE
sqliteVdbeChangeP2(v, jumpInst1, contAddr);
#endif
sqliteVdbeChangeP2(v, jumpInst2, contAddr);
diff --git a/kexi/3rdparty/kexisql/src/main.c b/kexi/3rdparty/kexisql/src/main.c
index c883f2eac..4fc118c8f 100644
--- a/kexi/3rdparty/kexisql/src/main.c
+++ b/kexi/3rdparty/kexisql/src/main.c
@@ -90,7 +90,7 @@ int sqliteInitCallback(void *pInit, int argc, char **argv, char **azColName){
db->init.iDb = 0;
}else{
/* If the SQL column is blank it means this is an index that
- ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
+ ** was created to be the PRIMARY KEY or to fulfill a UNITQUE
** constraint for a CREATE TABLE. The index should have already
** been created when we processed the CREATE TABLE. All we have
** to do here is record the root page number for that index.
diff --git a/kexi/3rdparty/kexisql/src/os.c b/kexi/3rdparty/kexisql/src/os.c
index 165769242..fc0f91e2d 100644
--- a/kexi/3rdparty/kexisql/src/os.c
+++ b/kexi/3rdparty/kexisql/src/os.c
@@ -172,7 +172,7 @@ static unsigned int elapse;
**
** If you close a file descriptor that points to a file that has locks,
** all locks on that file that are owned by the current process are
-** released. To work around this problem, each OsFile structure contains
+** released. To work around this problem, each OsFile structure tqcontains
** a pointer to an openCnt structure. There is one openCnt structure
** per open inode, which means that multiple OsFiles can point to a single
** openCnt. When an attempt is made to close an OsFile, if there are
@@ -531,11 +531,11 @@ int sqliteOsOpenReadWrite(
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrShPerm, &(id->refNum)) != noErr ){
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr ){
- if (FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
else
@@ -650,7 +650,7 @@ int sqliteOsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -724,7 +724,7 @@ int sqliteOsOpenReadOnly(const char *zFilename, OsFile *id){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -800,7 +800,7 @@ int sqliteOsTempFileName(char *zBuf){
};
static unsigned char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
struct stat buf;
@@ -827,7 +827,7 @@ int sqliteOsTempFileName(char *zBuf){
#if OS_WIN
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
const char *zDir;
@@ -854,7 +854,7 @@ int sqliteOsTempFileName(char *zBuf){
#if OS_MAC
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
char *zDir;
@@ -1398,20 +1398,20 @@ int sqliteOsReadLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
res = PBLockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -1504,24 +1504,24 @@ int sqliteOsWriteLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
if( id->locked==0
|| PBUnlockRangeSync(&params)==noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
res = PBLockRangeSync(&params);
}else{
res = afpRangeNotLocked;
}
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -1611,13 +1611,13 @@ int sqliteOsUnlock(OsFile *id){
rc = SQLITE_OK;
}else if( id->locked<0 ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;
}else{
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;
diff --git a/kexi/3rdparty/kexisql/src/pager.c b/kexi/3rdparty/kexisql/src/pager.c
index 0ce24086e..5259e0853 100644
--- a/kexi/3rdparty/kexisql/src/pager.c
+++ b/kexi/3rdparty/kexisql/src/pager.c
@@ -435,7 +435,7 @@ static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){
/*
** Unlock the database and clear the in-memory cache. This routine
** sets the state of the pager back to what it was when it was first
-** opened. Any outstanding pages are invalidated and subsequent attempts
+** opened. Any outstanding pages are tqinvalidated and subsequent attempts
** to access those pages will likely result in a coredump.
*/
static void pager_reset(Pager *pPager){
@@ -1059,7 +1059,7 @@ int sqlitepager_truncate(Pager *pPager, Pgno nPage){
** Shutdown the page cache. Free all memory and close all files.
**
** If a transaction was in progress when this routine is called, that
-** transaction is rolled back. All outstanding pages are invalidated
+** transaction is rolled back. All outstanding pages are tqinvalidated
** and their memory is freed. Any attempt to use a page associated
** with this page cache after this function returns will likely
** result in a coredump.
@@ -1920,7 +1920,7 @@ int sqlitepager_overwrite(Pager *pPager, Pgno pgno, void *pData){
** a transaction then removed from the freelist during a later part
** of the same transaction and reused for some other purpose. When it
** is first added to the freelist, this routine is called. When reused,
-** the dont_rollback() routine is called. But because the page contains
+** the dont_rollback() routine is called. But because the page tqcontains
** critical data, we still need to be sure it gets rolled back in spite
** of the dont_rollback() call.
*/
diff --git a/kexi/3rdparty/kexisql/src/parse.c b/kexi/3rdparty/kexisql/src/parse.c
index 463536915..77b09c5b9 100644
--- a/kexi/3rdparty/kexisql/src/parse.c
+++ b/kexi/3rdparty/kexisql/src/parse.c
@@ -97,7 +97,7 @@ typedef union {
IdList* yy320;
ExprList* yy322;
int yy372;
- struct {int value; int mask;} yy407;
+ struct {int value; int tqmask;} yy407;
int yy441;
} YYMINORTYPE;
#define YYSTACKDEPTH 100
@@ -711,7 +711,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* FLOAT => nothing */
0, /* NULL => nothing */
0, /* PRIMARY => nothing */
- 0, /* UNIQUE => nothing */
+ 0, /* UNITQUE => nothing */
0, /* CHECK => nothing */
0, /* REFERENCES => nothing */
0, /* COLLATE => nothing */
@@ -840,7 +840,7 @@ static const char *yyTokenName[] = {
"STAR", "SLASH", "REM", "CONCAT",
"UMINUS", "UPLUS", "BITNOT", "STRING",
"JOIN_KW", "INTEGER", "CONSTRAINT", "DEFAULT",
- "FLOAT", "NULL", "PRIMARY", "UNIQUE",
+ "FLOAT", "NULL", "PRIMARY", "UNITQUE",
"CHECK", "REFERENCES", "COLLATE", "ON",
"DELETE", "UPDATE", "INSERT", "SET",
"DEFERRABLE", "FOREIGN", "DROP", "UNION",
@@ -935,7 +935,7 @@ static const char *yyRuleName[] = {
/* 53 */ "ccons ::= NULL onconf",
/* 54 */ "ccons ::= NOT NULL onconf",
/* 55 */ "ccons ::= PRIMARY KEY sortorder onconf",
- /* 56 */ "ccons ::= UNIQUE onconf",
+ /* 56 */ "ccons ::= UNITQUE onconf",
/* 57 */ "ccons ::= CHECK LP expr RP onconf",
/* 58 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
/* 59 */ "ccons ::= defer_subclause",
@@ -962,7 +962,7 @@ static const char *yyRuleName[] = {
/* 80 */ "conslist ::= tcons",
/* 81 */ "tcons ::= CONSTRAINT nm",
/* 82 */ "tcons ::= PRIMARY KEY LP idxlist RP onconf",
- /* 83 */ "tcons ::= UNIQUE LP idxlist RP onconf",
+ /* 83 */ "tcons ::= UNITQUE LP idxlist RP onconf",
/* 84 */ "tcons ::= CHECK expr onconf",
/* 85 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
/* 86 */ "defer_subclause_opt ::=",
@@ -1115,7 +1115,7 @@ static const char *yyRuleName[] = {
/* 233 */ "expritem ::= expr",
/* 234 */ "expritem ::=",
/* 235 */ "cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf",
- /* 236 */ "uniqueflag ::= UNIQUE",
+ /* 236 */ "uniqueflag ::= UNITQUE",
/* 237 */ "uniqueflag ::=",
/* 238 */ "idxlist_opt ::=",
/* 239 */ "idxlist_opt ::= LP idxlist RP",
@@ -2183,7 +2183,7 @@ static void yy_reduce(
#line 191 "parse.y"
{sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);}
#line 2185 "parse.c"
- /* No destructor defined for UNIQUE */
+ /* No destructor defined for UNITQUE */
break;
case 57:
/* No destructor defined for CHECK */
@@ -2218,33 +2218,33 @@ static void yy_reduce(
break;
case 62:
#line 207 "parse.y"
-{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.mask) | yymsp[0].minor.yy407.value; }
+{ yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.tqmask) | yymsp[0].minor.yy407.value; }
#line 2222 "parse.c"
break;
case 63:
#line 209 "parse.y"
-{ yygotominor.yy407.value = 0; yygotominor.yy407.mask = 0x000000; }
+{ yygotominor.yy407.value = 0; yygotominor.yy407.tqmask = 0x000000; }
#line 2227 "parse.c"
/* No destructor defined for MATCH */
/* No destructor defined for nm */
break;
case 64:
#line 210 "parse.y"
-{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.mask = 0x0000ff; }
+{ yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.tqmask = 0x0000ff; }
#line 2234 "parse.c"
/* No destructor defined for ON */
/* No destructor defined for DELETE */
break;
case 65:
#line 211 "parse.y"
-{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.mask = 0x00ff00; }
+{ yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.tqmask = 0x00ff00; }
#line 2241 "parse.c"
/* No destructor defined for ON */
/* No destructor defined for UPDATE */
break;
case 66:
#line 212 "parse.y"
-{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.mask = 0xff0000; }
+{ yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.tqmask = 0xff0000; }
#line 2248 "parse.c"
/* No destructor defined for ON */
/* No destructor defined for INSERT */
@@ -2342,7 +2342,7 @@ static void yy_reduce(
#line 238 "parse.y"
{sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);}
#line 2344 "parse.c"
- /* No destructor defined for UNIQUE */
+ /* No destructor defined for UNITQUE */
/* No destructor defined for LP */
/* No destructor defined for RP */
break;
@@ -3428,7 +3428,7 @@ static void yy_reduce(
#line 740 "parse.y"
{ yygotominor.yy372 = OE_Abort; }
#line 3430 "parse.c"
- /* No destructor defined for UNIQUE */
+ /* No destructor defined for UNITQUE */
break;
case 237:
#line 741 "parse.y"
diff --git a/kexi/3rdparty/kexisql/src/parse.h b/kexi/3rdparty/kexisql/src/parse.h
index 188a336c8..35949283f 100644
--- a/kexi/3rdparty/kexisql/src/parse.h
+++ b/kexi/3rdparty/kexisql/src/parse.h
@@ -92,7 +92,7 @@
#define TK_FLOAT 92
#define TK_NULL 93
#define TK_PRIMARY 94
-#define TK_UNIQUE 95
+#define TK_UNITQUE 95
#define TK_CHECK 96
#define TK_REFERENCES 97
#define TK_COLLATE 98
diff --git a/kexi/3rdparty/kexisql/src/parse.y b/kexi/3rdparty/kexisql/src/parse.y
index 29bb493b4..ad0f3716c 100644
--- a/kexi/3rdparty/kexisql/src/parse.y
+++ b/kexi/3rdparty/kexisql/src/parse.y
@@ -193,12 +193,12 @@ ccons ::= COLLATE id(C). {
//
%type refargs {int}
refargs(A) ::= . { A = OE_Restrict * 0x010101; }
-refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.mask) | Y.value; }
-%type refarg {struct {int value; int mask;}}
-refarg(A) ::= MATCH nm. { A.value = 0; A.mask = 0x000000; }
-refarg(A) ::= ON DELETE refact(X). { A.value = X; A.mask = 0x0000ff; }
-refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.mask = 0x00ff00; }
-refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.mask = 0xff0000; }
+refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.tqmask) | Y.value; }
+%type refarg {struct {int value; int tqmask;}}
+refarg(A) ::= MATCH nm. { A.value = 0; A.tqmask = 0x000000; }
+refarg(A) ::= ON DELETE refact(X). { A.value = X; A.tqmask = 0x0000ff; }
+refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.tqmask = 0x00ff00; }
+refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.tqmask = 0xff0000; }
%type refact {int}
refact(A) ::= SET NULL. { A = OE_SetNull; }
refact(A) ::= SET DEFAULT. { A = OE_SetDflt; }
diff --git a/kexi/3rdparty/kexisql/src/pragma.c b/kexi/3rdparty/kexisql/src/pragma.c
index 4f1026573..7b100a70a 100644
--- a/kexi/3rdparty/kexisql/src/pragma.c
+++ b/kexi/3rdparty/kexisql/src/pragma.c
@@ -114,7 +114,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){
static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
static const struct {
const char *zName; /* Name of the pragma */
- int mask; /* Mask for the db->flags value */
+ int tqmask; /* Mask for the db->flags value */
} aPragma[] = {
{ "vdbe_trace", SQLITE_VdbeTrace },
{ "full_column_names", SQLITE_FullColNames },
@@ -131,13 +131,13 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
if( strcmp(zLeft,zRight)==0 && (v = sqliteGetVdbe(pParse))!=0 ){
sqliteVdbeOp3(v, OP_ColumnName, 0, 1, aPragma[i].zName, P3_STATIC);
sqliteVdbeOp3(v, OP_ColumnName, 1, 0, "boolean", P3_STATIC);
- sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].mask)!=0, 0,
+ sqliteVdbeCode(v, OP_Integer, (db->flags & aPragma[i].tqmask)!=0, 0,
OP_Callback, 1, 0,
0);
}else if( getBoolean(zRight) ){
- db->flags |= aPragma[i].mask;
+ db->flags |= aPragma[i].tqmask;
}else{
- db->flags &= ~aPragma[i].mask;
+ db->flags &= ~aPragma[i].tqmask;
}
return 1;
}
diff --git a/kexi/3rdparty/kexisql/src/select.c b/kexi/3rdparty/kexisql/src/select.c
index 7ae02d330..cc13aec80 100644
--- a/kexi/3rdparty/kexisql/src/select.c
+++ b/kexi/3rdparty/kexisql/src/select.c
@@ -1634,7 +1634,7 @@ substExprList(ExprList *pList, int iTable, ExprList *pEList){
*/
static int flattenSubquery(
Parse *pParse, /* The parsing context */
- Select *p, /* The parent or outer SELECT statement */
+ Select *p, /* The tqparent or outer SELECT statement */
int iFrom, /* Index in p->pSrc->a[] of the inner subquery */
int isAgg, /* True if outer SELECT uses aggregate functions */
int subqueryIsAgg /* True if the subquery uses aggregate functions */
@@ -1707,7 +1707,7 @@ static int flattenSubquery(
** the FROM clause of the outer query. Before doing this, remember
** the cursor number for the original outer query FROM element in
** iParent. The iParent cursor will never be used. Subsequent code
- ** will scan expressions looking for iParent references and replace
+ ** will scan expressions looking for iParent references and tqreplace
** those references with expressions that resolve to the subquery FROM
** elements we are now copying in.
*/
@@ -1985,10 +1985,10 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){
** This routine does NOT free the Select structure passed in. The
** calling function needs to do that.
**
-** The pParent, parentTab, and *pParentAgg fields are filled in if this
+** The pParent, tqparentTab, and *pParentAgg fields are filled in if this
** SELECT is a subquery. This routine may try to combine this SELECT
-** with its parent to form a single flat query. In so doing, it might
-** change the parent query from a non-aggregate to an aggregate query.
+** with its tqparent to form a single flat query. In so doing, it might
+** change the tqparent query from a non-aggregate to an aggregate query.
** For that reason, the pParentAgg flag is passed as a pointer, so it
** can be changed.
**
@@ -2003,7 +2003,7 @@ static int simpleMinMaxQuery(Parse *pParse, Select *p, int eDest, int iParm){
** pParent will be NULL. During the processing of the outer query, this
** routine is called recursively to handle the subquery. For the recursive
** call, pParent will point to the outer query. Because the subquery is
-** the second element in a three-way join, the parentTab parameter will
+** the second element in a three-way join, the tqparentTab parameter will
** be 1 (the 2nd value of a 0-indexed array.)
*/
int sqliteSelect(
@@ -2012,7 +2012,7 @@ int sqliteSelect(
int eDest, /* How to dispose of the results */
int iParm, /* A parameter used by the eDest disposal method */
Select *pParent, /* Another SELECT for which this is a sub-query */
- int parentTab, /* Index in pParent->pSrc of this query */
+ int tqparentTab, /* Index in pParent->pSrc of this query */
int *pParentAgg /* True if pParent uses aggregate functions */
){
int i;
@@ -2228,11 +2228,11 @@ int sqliteSelect(
goto select_end;
}
- /* Check to see if this is a subquery that can be "flattened" into its parent.
+ /* Check to see if this is a subquery that can be "flattened" into its tqparent.
** If flattening is a possiblity, do so and return immediately.
*/
if( pParent && pParentAgg &&
- flattenSubquery(pParse, pParent, parentTab, *pParentAgg, isAgg) ){
+ flattenSubquery(pParse, pParent, tqparentTab, *pParentAgg, isAgg) ){
if( isAgg ) *pParentAgg = 1;
return rc;
}
@@ -2409,15 +2409,15 @@ int sqliteSelect(
}
/* If this was a subquery, we have now converted the subquery into a
- ** temporary table. So delete the subquery structure from the parent
+ ** temporary table. So delete the subquery structure from the tqparent
** to prevent this subquery from being evaluated again and to force the
** the use of the temporary table.
*/
if( pParent ){
- assert( pParent->pSrc->nSrc>parentTab );
- assert( pParent->pSrc->a[parentTab].pSelect==p );
+ assert( pParent->pSrc->nSrc>tqparentTab );
+ assert( pParent->pSrc->a[tqparentTab].pSelect==p );
sqliteSelectDelete(p);
- pParent->pSrc->a[parentTab].pSelect = 0;
+ pParent->pSrc->a[tqparentTab].pSelect = 0;
}
/* The SELECT was successfully coded. Set the return code to 0
diff --git a/kexi/3rdparty/kexisql/src/sqlite.h b/kexi/3rdparty/kexisql/src/sqlite.h
index dd227cd00..4264cc1b0 100644
--- a/kexi/3rdparty/kexisql/src/sqlite.h
+++ b/kexi/3rdparty/kexisql/src/sqlite.h
@@ -828,7 +828,7 @@ int sqlite_rekey(
);
/*
-** Encode a binary buffer "in" of size n bytes so that it contains
+** Encode a binary buffer "in" of size n bytes so that it tqcontains
** no instances of characters '\'' or '\000'. The output is
** null-terminated and can be used as a string value in an INSERT
** or UPDATE statement. Use sqlite_decode_binary() to convert the
diff --git a/kexi/3rdparty/kexisql/src/sqliteInt.h b/kexi/3rdparty/kexisql/src/sqliteInt.h
index dd0710f9d..ca5a85e97 100644
--- a/kexi/3rdparty/kexisql/src/sqliteInt.h
+++ b/kexi/3rdparty/kexisql/src/sqliteInt.h
@@ -45,16 +45,16 @@
/*
** If the following macro is set to 1, then NULL values are considered
** distinct when determining whether or not two entries are the same
-** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
+** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** OCELOT, and Firebird all work. The SQL92 spec explicitly says this
** is the way things are suppose to work.
**
** If the following macro is set to 0, the NULLs are indistinct for
-** a UNIQUE index. In this mode, you can only have a single NULL entry
-** for a column declared UNIQUE. This is the way Informix and SQL Server
+** a UNITQUE index. In this mode, you can only have a single NULL entry
+** for a column declared UNITQUE. This is the way Informix and SQL Server
** work.
*/
-#define NULL_DISTINCT_FOR_UNIQUE 1
+#define NULL_DISTINCT_FOR_UNITQUE 1
/*
** The maximum number of attached databases. This must be at least 2
@@ -563,7 +563,7 @@ struct FKey {
** occurs. IGNORE means that the particular row that caused the constraint
** error is not inserted or updated. Processing continues and no error
** is returned. REPLACE means that preexisting database rows that caused
-** a UNIQUE constraint violation are removed so that the new insert or
+** a UNITQUE constraint violation are removed so that the new insert or
** update can proceed. Processing continues and no error is reported.
**
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
@@ -623,7 +623,7 @@ struct Index {
Table *pTable; /* The SQL table being indexed */
int tnum; /* Page containing root of this index in database file */
u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
- u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
+ u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */
u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */
Index *pNext; /* The next index associated with the same table */
};
@@ -1053,9 +1053,9 @@ struct TriggerStep {
*
* struct TriggerStack has a "pNext" member, to allow linked lists to be
* constructed. When coding nested triggers (triggers fired by other triggers)
- * each nested trigger stores its parent trigger's TriggerStack as the "pNext"
+ * each nested trigger stores its tqparent trigger's TriggerStack as the "pNext"
* pointer. Once the nested trigger has been coded, the pNext value is restored
- * to the pTriggerStack member of the Parse stucture and coding of the parent
+ * to the pTriggerStack member of the Parse stucture and coding of the tqparent
* trigger continues.
*
* Before a nested trigger is coded, the linked list pointed to by the
diff --git a/kexi/3rdparty/kexisql/src/tclsqlite.c b/kexi/3rdparty/kexisql/src/tclsqlite.c
index fdc2f5e88..7256eafeb 100644
--- a/kexi/3rdparty/kexisql/src/tclsqlite.c
+++ b/kexi/3rdparty/kexisql/src/tclsqlite.c
@@ -999,7 +999,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
** DBNAME that is used to control that connection. The database
** connection is deleted when the DBNAME command is deleted.
**
-** The second argument is the name of the directory that contains
+** The second argument is the name of the directory that tqcontains
** the sqlite database that is to be accessed.
**
** For testing purposes, we also support the following:
diff --git a/kexi/3rdparty/kexisql/src/threadtest.c b/kexi/3rdparty/kexisql/src/threadtest.c
index 89c79a4c7..89b84a108 100644
--- a/kexi/3rdparty/kexisql/src/threadtest.c
+++ b/kexi/3rdparty/kexisql/src/threadtest.c
@@ -107,7 +107,7 @@ char **db_query(sqlite *db, const char *zFile, const char *zFormat, ...){
va_end(ap);
memset(&sResult, 0, sizeof(sResult));
sResult.zFile = zFile;
- if( verbose ) printf("QUERY %s: %s\n", zFile, zSql);
+ if( verbose ) printf("TQUERY %s: %s\n", zFile, zSql);
rc = sqlite_exec(db, zSql, db_query_callback, &sResult, &zErrMsg);
if( rc==SQLITE_SCHEMA ){
if( zErrMsg ) free(zErrMsg);
diff --git a/kexi/3rdparty/kexisql/src/tokenize.c b/kexi/3rdparty/kexisql/src/tokenize.c
index 68cb9f992..40fe48ef9 100644
--- a/kexi/3rdparty/kexisql/src/tokenize.c
+++ b/kexi/3rdparty/kexisql/src/tokenize.c
@@ -130,7 +130,7 @@ static Keyword aKeywordTable[] = {
{ "TRANSACTION", TK_TRANSACTION, },
{ "TRIGGER", TK_TRIGGER, },
{ "UNION", TK_UNION, },
- { "UNIQUE", TK_UNIQUE, },
+ { "UNITQUE", TK_UNITQUE, },
{ "UPDATE", TK_UPDATE, },
{ "USING", TK_USING, },
{ "VACUUM", TK_VACUUM, },
diff --git a/kexi/3rdparty/kexisql/src/util.c b/kexi/3rdparty/kexisql/src/util.c
index 09a13c7b1..12c3b2d2d 100644
--- a/kexi/3rdparty/kexisql/src/util.c
+++ b/kexi/3rdparty/kexisql/src/util.c
@@ -805,7 +805,7 @@ void sqliteRealToSortable(double r, char *z){
** This means we can not use the traditional base-64 digit set. */
static const char zDigit[] =
"0123456789"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"|~";
if( r<0.0 ){
diff --git a/kexi/3rdparty/kexisql/src/vdbe.c b/kexi/3rdparty/kexisql/src/vdbe.c
index fb52ef388..dcf56bf53 100644
--- a/kexi/3rdparty/kexisql/src/vdbe.c
+++ b/kexi/3rdparty/kexisql/src/vdbe.c
@@ -233,7 +233,7 @@ static int hardDynamicify(Mem *pStack){
}
/*
-** An ephemeral string value (signified by the MEM_Ephem flag) contains
+** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains
** a pointer to a dynamically allocated string where some other entity
** is responsible for deallocating that string. Because the stack entry
** does not control the string, it might be deleted without the stack
@@ -309,7 +309,7 @@ static int toInt(const char *zNum, int *pNum){
** Convert the given stack entity into a integer if it isn't one
** already.
**
-** Any prior string or real representation is invalidated.
+** Any prior string or real representation is tqinvalidated.
** NULLs are converted into 0.
*/
#define Integerify(P) if(((P)->flags&MEM_Int)==0){ hardIntegerify(P); }
@@ -2741,7 +2741,7 @@ case OP_IsUnique: {
/* The last four bytes of the key are different from R. Convert the
** last four bytes of the key into an integer and push it onto the
** stack. (These bytes are the record number of an entry that
- ** violates a UNIQUE constraint.)
+ ** violates a UNITQUE constraint.)
*/
pTos++;
pTos->i = v;
@@ -4151,8 +4151,8 @@ case OP_FileOpen: {
** Read a single line of input from the open file (the file opened using
** FileOpen). If we reach end-of-file, jump immediately to P2. If
** we are able to get another line, split the line apart using P3 as
-** a delimiter. There should be P1 fields. If the input line contains
-** more than P1 fields, ignore the excess. If the input line contains
+** a delimiter. There should be P1 fields. If the input line tqcontains
+** more than P1 fields, ignore the excess. If the input line tqcontains
** fewer than P1 fields, assume the remaining fields contain NULLs.
**
** Input ends if a line consists of just "\.". A field containing only
diff --git a/kexi/3rdparty/kexisql/src/vdbeInt.h b/kexi/3rdparty/kexisql/src/vdbeInt.h
index 79b6b51a5..3daa74c3b 100644
--- a/kexi/3rdparty/kexisql/src/vdbeInt.h
+++ b/kexi/3rdparty/kexisql/src/vdbeInt.h
@@ -161,7 +161,7 @@ struct sqlite_func {
/*
** An Agg structure describes an Aggregator. Each Agg consists of
-** zero or more Aggregator elements (AggElem). Each AggElem contains
+** zero or more Aggregator elements (AggElem). Each AggElem tqcontains
** a key and one or more values. The values are used in processing
** aggregate functions in a SELECT. The key is used to implement
** the GROUP BY clause of a select.
diff --git a/kexi/3rdparty/kexisql/src/where.c b/kexi/3rdparty/kexisql/src/where.c
index 714972f87..2b94ad3c7 100644
--- a/kexi/3rdparty/kexisql/src/where.c
+++ b/kexi/3rdparty/kexisql/src/where.c
@@ -29,14 +29,14 @@ struct ExprInfo {
** p->pLeft is not the column of any table */
short int idxRight; /* p->pRight is a column in this table number. -1 if
** p->pRight is not the column of any table */
- unsigned prereqLeft; /* Bitmask of tables referenced by p->pLeft */
- unsigned prereqRight; /* Bitmask of tables referenced by p->pRight */
- unsigned prereqAll; /* Bitmask of tables referenced by p */
+ unsigned prereqLeft; /* Bittqmask of tables referenced by p->pLeft */
+ unsigned prereqRight; /* Bittqmask of tables referenced by p->pRight */
+ unsigned prereqAll; /* Bittqmask of tables referenced by p */
};
/*
** An instance of the following structure keeps track of a mapping
-** between VDBE cursor numbers and bitmasks. The VDBE cursor numbers
+** between VDBE cursor numbers and bittqmasks. The VDBE cursor numbers
** are small integers contained in SrcList_item.iCursor and Expr.iTable
** fields. For any given WHERE clause, we want to track which cursors
** are being used, so we assign a single bit in a 32-bit word to track
@@ -81,12 +81,12 @@ static int exprSplit(int nSlot, ExprInfo *aSlot, Expr *pExpr){
}
/*
-** Initialize an expression mask set
+** Initialize an expression tqmask set
*/
#define initMaskSet(P) memset(P, 0, sizeof(*P))
/*
-** Return the bitmask for the given cursor. Assign a new bitmask
+** Return the bittqmask for the given cursor. Assign a new bittqmask
** if this is the first time the cursor has been seen.
*/
static int getMask(ExprMaskSet *pMaskSet, int iCursor){
@@ -103,13 +103,13 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){
}
/*
-** Destroy an expression mask set
+** Destroy an expression tqmask set
*/
#define freeMaskSet(P) /* NO-OP */
/*
** This routine walks (recursively) an expression tree and generates
-** a bitmask indicating which tables are used in that expression
+** a bittqmask indicating which tables are used in that expression
** tree.
**
** In order for this routine to work, the calling function must have
@@ -120,26 +120,26 @@ static int getMask(ExprMaskSet *pMaskSet, int iCursor){
** the VDBE cursor number of the table.
*/
static int exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){
- unsigned int mask = 0;
+ unsigned int tqmask = 0;
if( p==0 ) return 0;
if( p->op==TK_COLUMN ){
- mask = getMask(pMaskSet, p->iTable);
- if( mask==0 ) mask = -1;
- return mask;
+ tqmask = getMask(pMaskSet, p->iTable);
+ if( tqmask==0 ) tqmask = -1;
+ return tqmask;
}
if( p->pRight ){
- mask = exprTableUsage(pMaskSet, p->pRight);
+ tqmask = exprTableUsage(pMaskSet, p->pRight);
}
if( p->pLeft ){
- mask |= exprTableUsage(pMaskSet, p->pLeft);
+ tqmask |= exprTableUsage(pMaskSet, p->pLeft);
}
if( p->pList ){
int i;
for(i=0; i<p->pList->nExpr; i++){
- mask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr);
+ tqmask |= exprTableUsage(pMaskSet, p->pList->a[i].pExpr);
}
}
- return mask;
+ return tqmask;
}
/*
@@ -302,7 +302,7 @@ static void disableTerm(WhereLevel *pLevel, Expr **ppExpr){
/*
** Generate the beginning of the loop used for WHERE clause processing.
-** The return value is a pointer to an (opaque) structure that contains
+** The return value is a pointer to an (opaque) structure that tqcontains
** information needed to terminate the loop. Later, the calling routine
** should invoke sqliteWhereEnd() with the return value of this function
** in order to complete the WHERE clause processing.
@@ -391,7 +391,7 @@ WhereInfo *sqliteWhereBegin(
int nExpr; /* Number of subexpressions in the WHERE clause */
int loopMask; /* One bit set for each outer loop */
int haveKey; /* True if KEY is on the stack */
- ExprMaskSet maskSet; /* The expression mask set */
+ ExprMaskSet tqmaskSet; /* The expression tqmask set */
int iDirectEq[32]; /* Term of the form ROWID==X for the N-th table */
int iDirectLt[32]; /* Term of the form ROWID<X or ROWID<=X */
int iDirectGt[32]; /* Term of the form ROWID>X or ROWID>=X */
@@ -407,7 +407,7 @@ WhereInfo *sqliteWhereBegin(
** array fills up, the last entry might point to an expression which
** contains additional unfactored AND operators.
*/
- initMaskSet(&maskSet);
+ initMaskSet(&tqmaskSet);
memset(aExpr, 0, sizeof(aExpr));
nExpr = exprSplit(ARRAYSIZE(aExpr), aExpr, pWhere);
if( nExpr==ARRAYSIZE(aExpr) ){
@@ -440,24 +440,24 @@ WhereInfo *sqliteWhereBegin(
/* Analyze all of the subexpressions.
*/
for(i=0; i<nExpr; i++){
- exprAnalyze(&maskSet, &aExpr[i]);
+ exprAnalyze(&tqmaskSet, &aExpr[i]);
/* If we are executing a trigger body, remove all references to
- ** new.* and old.* tables from the prerequisite masks.
+ ** new.* and old.* tables from the prerequisite tqmasks.
*/
if( pParse->trigStack ){
int x;
if( (x = pParse->trigStack->newIdx) >= 0 ){
- int mask = ~getMask(&maskSet, x);
- aExpr[i].prereqRight &= mask;
- aExpr[i].prereqLeft &= mask;
- aExpr[i].prereqAll &= mask;
+ int tqmask = ~getMask(&tqmaskSet, x);
+ aExpr[i].prereqRight &= tqmask;
+ aExpr[i].prereqLeft &= tqmask;
+ aExpr[i].prereqAll &= tqmask;
}
if( (x = pParse->trigStack->oldIdx) >= 0 ){
- int mask = ~getMask(&maskSet, x);
- aExpr[i].prereqRight &= mask;
- aExpr[i].prereqLeft &= mask;
- aExpr[i].prereqAll &= mask;
+ int tqmask = ~getMask(&tqmaskSet, x);
+ aExpr[i].prereqRight &= tqmask;
+ aExpr[i].prereqLeft &= tqmask;
+ aExpr[i].prereqAll &= tqmask;
}
}
}
@@ -476,13 +476,13 @@ WhereInfo *sqliteWhereBegin(
**
** Actually, if there are more than 32 tables in the join, only the
** first 32 tables are candidates for indices. This is (again) due
- ** to the limit of 32 bits in an integer bitmask.
+ ** to the limit of 32 bits in an integer bittqmask.
*/
loopMask = 0;
for(i=0; i<pTabList->nSrc && i<ARRAYSIZE(iDirectEq); i++){
int j;
int iCur = pTabList->a[i].iCursor; /* The cursor for this table */
- int mask = getMask(&maskSet, iCur); /* Cursor mask for this table */
+ int tqmask = getMask(&tqmaskSet, iCur); /* Cursor tqmask for this table */
Table *pTab = pTabList->a[i].pTab;
Index *pIdx;
Index *pBestIdx = 0;
@@ -524,7 +524,7 @@ WhereInfo *sqliteWhereBegin(
}
}
if( iDirectEq[i]>=0 ){
- loopMask |= mask;
+ loopMask |= tqmask;
pWInfo->a[i].pIdx = 0;
continue;
}
@@ -651,7 +651,7 @@ WhereInfo *sqliteWhereBegin(
pWInfo->a[i].pIdx = pBestIdx;
pWInfo->a[i].score = bestScore;
pWInfo->a[i].bRev = 0;
- loopMask |= mask;
+ loopMask |= tqmask;
if( pBestIdx ){
pWInfo->a[i].iCur = pParse->nTab++;
pWInfo->peakNTab = pParse->nTab;
@@ -1132,7 +1132,7 @@ WhereInfo *sqliteWhereBegin(
pLevel->p1 = pLevel->iCur;
pLevel->p2 = start;
}
- loopMask |= getMask(&maskSet, iCur);
+ loopMask |= getMask(&tqmaskSet, iCur);
/* Insert code to test every subexpression that can be completely
** computed using the current set of tables.
@@ -1179,7 +1179,7 @@ WhereInfo *sqliteWhereBegin(
if( pushKey && !haveKey ){
sqliteVdbeAddOp(v, OP_Recno, pTabList->a[0].iCursor, 0);
}
- freeMaskSet(&maskSet);
+ freeMaskSet(&tqmaskSet);
return pWInfo;
}
diff --git a/kexi/3rdparty/kexisql/tool/lemon.c b/kexi/3rdparty/kexisql/tool/lemon.c
index b801e6b39..84f73d170 100644
--- a/kexi/3rdparty/kexisql/tool/lemon.c
+++ b/kexi/3rdparty/kexisql/tool/lemon.c
@@ -298,7 +298,7 @@ char *Strsafe();
void Strsafe_init(/* void */);
int Strsafe_insert(/* char * */);
-char *Strsafe_find(/* char * */);
+char *Strsafe_tqfind(/* char * */);
/* Routines for handling symbols of the grammar */
@@ -306,7 +306,7 @@ struct symbol *Symbol_new();
int Symbolcmpp(/* struct symbol **, struct symbol ** */);
void Symbol_init(/* void */);
int Symbol_insert(/* struct symbol *, char * */);
-struct symbol *Symbol_find(/* char * */);
+struct symbol *Symbol_tqfind(/* char * */);
struct symbol *Symbol_Nth(/* int */);
int Symbol_count(/* */);
struct symbol **Symbol_arrayof(/* */);
@@ -317,14 +317,14 @@ int Configcmp(/* struct config *, struct config * */);
struct state *State_new();
void State_init(/* void */);
int State_insert(/* struct state *, struct config * */);
-struct state *State_find(/* struct config * */);
+struct state *State_tqfind(/* struct config * */);
struct state **State_arrayof(/* */);
/* Routines used for efficiency in Configlist_add */
void Configtable_init(/* void */);
int Configtable_insert(/* struct config * */);
-struct config *Configtable_find(/* struct config * */);
+struct config *Configtable_tqfind(/* struct config * */);
void Configtable_clear(/* int(*)(struct config *) */);
/****************** From the file "action.c" *******************************/
/*
@@ -510,7 +510,7 @@ struct lemon *lemp;
/* Find the start symbol */
if( lemp->start ){
- sp = Symbol_find(lemp->start);
+ sp = Symbol_tqfind(lemp->start);
if( sp==0 ){
ErrorMsg(lemp->filename,0,
"The specified start symbol \"%s\" is not \
@@ -571,7 +571,7 @@ struct lemon *lemp;
bp = Configlist_basis();
/* Get a state with the same basis */
- stp = State_find(bp);
+ stp = State_tqfind(bp);
if( stp ){
/* A state with the same basis already exists! Copy all the follow-set
** propagation links from the state under construction into the
@@ -755,7 +755,7 @@ struct lemon *lemp;
/* Add the accepting token */
if( lemp->start ){
- sp = Symbol_find(lemp->start);
+ sp = Symbol_tqfind(lemp->start);
if( sp==0 ) sp = lemp->rule->lhs;
}else{
sp = lemp->rule->lhs;
@@ -933,7 +933,7 @@ int dot; /* Index into the RHS of the rule where the dot goes */
assert( currentend!=0 );
model.rp = rp;
model.dot = dot;
- cfp = Configtable_find(&model);
+ cfp = Configtable_tqfind(&model);
if( cfp==0 ){
cfp = newconfig();
cfp->rp = rp;
@@ -961,7 +961,7 @@ int dot;
assert( currentend!=0 );
model.rp = rp;
model.dot = dot;
- cfp = Configtable_find(&model);
+ cfp = Configtable_tqfind(&model);
if( cfp==0 ){
cfp = newconfig();
cfp->rp = rp;
@@ -2542,10 +2542,10 @@ struct lemon *lemp;
/* Search for the file "name" which is in the same directory as
** the exacutable */
-PRIVATE char *pathsearch(argv0,name,modemask)
+PRIVATE char *pathsearch(argv0,name,modetqmask)
char *argv0;
char *name;
-int modemask;
+int modetqmask;
{
char *pathlist;
char *path,*cp;
@@ -2578,7 +2578,7 @@ int modemask;
*cp = c;
if( c==0 ) pathlist = "";
else pathlist = &cp[1];
- if( access(path,modemask)==0 ) break;
+ if( access(path,modetqmask)==0 ) break;
}
}
}
@@ -3470,7 +3470,7 @@ char *y;
{
char *z;
- z = Strsafe_find(y);
+ z = Strsafe_tqfind(y);
if( z==0 && (z=malloc( strlen(y)+1 ))!=0 ){
strcpy(z,y);
Strsafe_insert(z);
@@ -3581,7 +3581,7 @@ char *data;
/* Return a pointer to data assigned to the given key. Return NULL
** if no such key. */
-char *Strsafe_find(key)
+char *Strsafe_tqfind(key)
char *key;
{
int h;
@@ -3605,7 +3605,7 @@ char *x;
{
struct symbol *sp;
- sp = Symbol_find(x);
+ sp = Symbol_tqfind(x);
if( sp==0 ){
sp = (struct symbol *)malloc( sizeof(struct symbol) );
MemoryCheck(sp);
@@ -3738,7 +3738,7 @@ char *key;
/* Return a pointer to data assigned to the given key. Return NULL
** if no such key. */
-struct symbol *Symbol_find(key)
+struct symbol *Symbol_tqfind(key)
char *key;
{
int h;
@@ -3944,7 +3944,7 @@ struct config *key;
/* Return a pointer to data assigned to the given key. Return NULL
** if no such key. */
-struct state *State_find(key)
+struct state *State_tqfind(key)
struct config *key;
{
int h;
@@ -4087,7 +4087,7 @@ struct config *data;
/* Return a pointer to data assigned to the given key. Return NULL
** if no such key. */
-struct config *Configtable_find(key)
+struct config *Configtable_tqfind(key)
struct config *key;
{
int h;
diff --git a/kexi/3rdparty/kexisql/tool/lempar.c b/kexi/3rdparty/kexisql/tool/lempar.c
index 5604fe10d..b6ffceb0d 100644
--- a/kexi/3rdparty/kexisql/tool/lempar.c
+++ b/kexi/3rdparty/kexisql/tool/lempar.c
@@ -58,7 +58,7 @@
#define YY_NO_ACTION (YYNSTATE+YYNRULE+2)
#define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1)
#define YY_ERROR_ACTION (YYNSTATE+YYNRULE)
-/* Next is the action table. Each entry in this table contains
+/* Next is the action table. Each entry in this table tqcontains
**
** + An integer which is the number representing the look-ahead
** token
diff --git a/kexi/3rdparty/kexisql3/src/alter.c b/kexi/3rdparty/kexisql3/src/alter.c
index eba01e296..73c49b1ff 100644
--- a/kexi/3rdparty/kexisql3/src/alter.c
+++ b/kexi/3rdparty/kexisql3/src/alter.c
@@ -53,7 +53,7 @@ static void renameTableFunc(
/* The principle used to locate the table name in the CREATE TABLE
** statement is that the table name is the first token that is immediatedly
- ** followed by a left parenthesis - TK_LP.
+ ** followed by a left tqparenthesis - TK_LP.
*/
if( zSql ){
do {
@@ -231,7 +231,7 @@ static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
#ifndef SQLITE_OMIT_TRIGGER
/* Now, if the table is not stored in the temp database, reload any temp
- ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined.
+ ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBTQUERY is defined.
*/
if( (zWhere=whereTempTriggers(pParse, pTab)) ){
sqlite3VdbeOp3(v, OP_ParseSchema, 1, 0, zWhere, P3_DYNAMIC);
@@ -407,7 +407,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
pDflt = 0;
}
- /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.
+ /* Check that the new column is not specified as PRIMARY KEY or UNITQUE.
** If there is a NOT NULL constraint, then the default value for the
** column must not be NULL.
*/
@@ -416,7 +416,7 @@ void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
return;
}
if( pNew->pIndex ){
- sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column");
+ sqlite3ErrorMsg(pParse, "Cannot add a UNITQUE column");
return;
}
if( pCol->notNull && !pDflt ){
diff --git a/kexi/3rdparty/kexisql3/src/btree.c b/kexi/3rdparty/kexisql3/src/btree.c
index 472d63a60..65cddcd4b 100644
--- a/kexi/3rdparty/kexisql3/src/btree.c
+++ b/kexi/3rdparty/kexisql3/src/btree.c
@@ -126,7 +126,7 @@
** 8 4 Right child (the Ptr(N+1) value). Omitted on leaves.
**
** The flags define the format of this btree page. The leaf flag means that
-** this page has no children. The zerodata flag means that this page carries
+** this page has no tqchildren. The zerodata flag means that this page carries
** only keys and no data. The intkey flag means that the key is a integer
** which is stored in the key size entry of the cell header rather than in
** the payload area.
@@ -212,7 +212,7 @@
#include <assert.h>
/* Round up a number to the next larger multiple of 8. This is used
-** to force 8-byte alignment on 64-bit architectures.
+** to force 8-byte tqalignment on 64-bit architectures.
*/
#define ROUND8(x) ((x+7)&~7)
@@ -262,9 +262,9 @@ static const char zMagicHeader[] = SQLITE_FILE_HEADER;
** structure is appended and initialized to zero. This structure stores
** information about the page that is decoded from the raw file page.
**
-** The pParent field points back to the parent page. This allows us to
+** The pParent field points back to the tqparent page. This allows us to
** walk up the BTree from any leaf to the root. Care must be taken to
-** unref() the parent page pointer when this page is no longer referenced.
+** unref() the tqparent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.
*/
struct MemPage {
@@ -281,7 +281,7 @@ struct MemPage {
u16 maxLocal; /* Copy of Btree.maxLocal or Btree.maxLeaf */
u16 minLocal; /* Copy of Btree.minLocal or Btree.minLeaf */
u16 cellOffset; /* Index in aData of first cell pointer */
- u16 idxParent; /* Index in parent of this node */
+ u16 idxParent; /* Index in tqparent of this node */
u16 nFree; /* Number of free bytes on the page */
u16 nCell; /* Number of cells on this page, local and ovfl */
struct _OvflCell { /* Cells that will not fit on aData[] */
@@ -291,7 +291,7 @@ struct MemPage {
struct Btree *pBt; /* Pointer back to BTree structure */
u8 *aData; /* Pointer back to the start of the page */
Pgno pgno; /* Page number for this page */
- MemPage *pParent; /* The parent of this page. NULL for root */
+ MemPage *pParent; /* The tqparent of this page. NULL for root */
};
/*
@@ -443,18 +443,18 @@ static void put4byte(unsigned char *p, u32 v){
#define PTRMAP_ISPAGE(pgsz, pgno) (PTRMAP_PAGENO(pgsz,pgno)==pgno)
/*
-** The pointer map is a lookup table that identifies the parent page for
-** each child page in the database file. The parent page is the page that
-** contains a pointer to the child. Every page in the database contains
-** 0 or 1 parent pages. (In this context 'database page' refers
+** The pointer map is a lookup table that identifies the tqparent page for
+** each child page in the database file. The tqparent page is the page that
+** contains a pointer to the child. Every page in the database tqcontains
+** 0 or 1 tqparent pages. (In this context 'database page' refers
** to any page that is not part of the pointer map itself.) Each pointer map
-** entry consists of a single byte 'type' and a 4 byte parent page number.
+** entry consists of a single byte 'type' and a 4 byte tqparent page number.
** The PTRMAP_XXX identifiers below are the valid types.
**
** The purpose of the pointer map is to facility moving pages from one
** position in the file to another as part of autovacuum. When a page
-** is moved, the pointer in its parent must be updated to point to the
-** new location. The pointer map is used to locate the parent page quickly.
+** is moved, the pointer in its tqparent must be updated to point to the
+** new location. The pointer map is used to locate the tqparent page quickly.
**
** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not
** used in this case.
@@ -471,7 +471,7 @@ static void put4byte(unsigned char *p, u32 v){
** page in the overflow page list.
**
** PTRMAP_BTREE: The database page is a non-root btree page. The page number
-** identifies the parent page in the btree.
+** identifies the tqparent page in the btree.
*/
#define PTRMAP_ROOTPAGE 1
#define PTRMAP_FREEPAGE 2
@@ -483,10 +483,10 @@ static void put4byte(unsigned char *p, u32 v){
** Write an entry into the pointer map.
**
** This routine updates the pointer map entry for page number 'key'
-** so that it maps to type 'eType' and parent page number 'pgno'.
+** so that it maps to type 'eType' and tqparent page number 'pgno'.
** An error code is returned if something goes wrong, otherwise SQLITE_OK.
*/
-static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){
+static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno tqparent){
u8 *pPtrmap; /* The pointer map page */
Pgno iPtrmap; /* The pointer map page number */
int offset; /* Offset in pointer map page */
@@ -503,12 +503,12 @@ static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){
}
offset = PTRMAP_PTROFFSET(pBt->usableSize, key);
- if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){
- TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent));
+ if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=tqparent ){
+ TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, tqparent));
rc = sqlite3pager_write(pPtrmap);
if( rc==SQLITE_OK ){
pPtrmap[offset] = eType;
- put4byte(&pPtrmap[offset+1], parent);
+ put4byte(&pPtrmap[offset+1], tqparent);
}
}
@@ -520,7 +520,7 @@ static int ptrmapPut(Btree *pBt, Pgno key, u8 eType, Pgno parent){
** Read an entry from the pointer map.
**
** This routine retrieves the pointer map entry for page 'key', writing
-** the type and parent page number to *pEType and *pPgno respectively.
+** the type and tqparent page number to *pEType and *pPgno respectively.
** An error code is returned if something goes wrong, otherwise SQLITE_OK.
*/
static int ptrmapGet(Btree *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
@@ -1001,8 +1001,8 @@ static void decodeFlags(MemPage *pPage, int flagByte){
** Initialize the auxiliary information for a disk block.
**
** The pParent parameter must be a pointer to the MemPage which
-** is the parent of the page being initialized. The root of a
-** BTree has no parent and so for that page, pParent==NULL.
+** is the tqparent of the page being initialized. The root of a
+** BTree has no tqparent and so for that page, pParent==NULL.
**
** Return SQLITE_OK on success. If we see that the page does
** not contain a well-formed database page, then return
@@ -1012,7 +1012,7 @@ static void decodeFlags(MemPage *pPage, int flagByte){
*/
static int initPage(
MemPage *pPage, /* The page to be initialized */
- MemPage *pParent /* The parent. Might be NULL */
+ MemPage *pParent /* The tqparent. Might be NULL */
){
int pc; /* Address of a freeblock within pPage->aData[] */
int hdr; /* Offset to beginning of page header */
@@ -1029,7 +1029,7 @@ static int initPage(
assert( pPage->pgno==sqlite3pager_pagenumber(pPage->aData) );
assert( pPage->aData == &((unsigned char*)pPage)[-pBt->pageSize] );
if( pPage->pParent!=pParent && (pPage->pParent!=0 || pPage->isInit) ){
- /* The parent page should never change unless the file is corrupt */
+ /* The tqparent page should never change unless the file is corrupt */
return SQLITE_CORRUPT_BKPT;
}
if( pPage->isInit ) return SQLITE_OK;
@@ -1286,14 +1286,14 @@ int sqlite3BtreeOpen(
#endif
}
pBt->usableSize = pBt->pageSize - nReserve;
- assert( (pBt->pageSize & 7)==0 ); /* 8-byte alignment of pageSize */
+ assert( (pBt->pageSize & 7)==0 ); /* 8-byte tqalignment of pageSize */
sqlite3pager_set_pagesize(pBt->pPager, pBt->pageSize);
*ppBtree = pBt;
return SQLITE_OK;
}
/*
-** Close an open database and invalidate all cursors.
+** Close an open database and tqinvalidate all cursors.
*/
int sqlite3BtreeClose(Btree *pBt){
while( pBt->pCursor ){
@@ -1658,7 +1658,7 @@ int sqlite3BtreeBeginTrans(Btree *pBt, int wrflag){
#ifndef SQLITE_OMIT_AUTOVACUUM
/*
-** Set the pointer-map entries for all children of page pPage. Also, if
+** Set the pointer-map entries for all tqchildren of page pPage. Also, if
** pPage contains cells that point to overflow pages, set the pointer
** map entries for the overflow pages as well.
*/
@@ -2080,7 +2080,7 @@ int sqlite3BtreeCommitStmt(Btree *pBt){
** Rollback the active statement subtransaction. If no subtransaction
** is active this routine is a no-op.
**
-** All cursors will be invalidated by this operation. Any attempt
+** All cursors will be tqinvalidated by this operation. Any attempt
** to use a cursor that was open at the beginning of this operation
** will result in an error.
*/
@@ -2578,7 +2578,7 @@ static int isRootPage(MemPage *pPage){
}
/*
-** Move the cursor up to the parent page.
+** Move the cursor up to the tqparent page.
**
** pCur->idx is set to the cell index that contains the pointer
** to the page we are coming from. If we are coming from the
@@ -3065,7 +3065,7 @@ static int allocatePage(
memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
}
}else{
- /* The trunk page is required by the caller but it contains
+ /* The trunk page is required by the caller but it tqcontains
** pointers to free-list leaves. The first leaf becomes a trunk
** page in this case.
*/
@@ -3425,11 +3425,11 @@ static int reparentPage(Btree *pBt, Pgno pgno, MemPage *pNewParent, int idx){
/*
-** Change the pParent pointer of all children of pPage to point back
+** Change the pParent pointer of all tqchildren of pPage to point back
** to pPage.
**
** In other words, for every child of pPage, invoke reparentPage()
-** to make sure that each child knows that pPage is its parent.
+** to make sure that each child knows that pPage is its tqparent.
**
** This routine gets called after you memcpy() one page into
** another.
@@ -3644,7 +3644,7 @@ static void assemblePage(
/* Forward reference */
static int balance(MemPage*, int);
-#ifndef SQLITE_OMIT_QUICKBALANCE
+#ifndef SQLITE_OMIT_TQUICKBALANCE
/*
** This version of balance() handles the common special case where
** a new entry is being inserted on the extreme right-end of the
@@ -3659,7 +3659,7 @@ static int balance(MemPage*, int);
** fill up. On average.
**
** pPage is the leaf page which is the right-most page in the tree.
-** pParent is its parent. pPage must have a single overflow entry
+** pParent is its tqparent. pPage must have a single overflow entry
** which is also the right-most entry on the page.
*/
static int balance_quick(MemPage *pPage, MemPage *pParent){
@@ -3670,9 +3670,9 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
int szCell;
CellInfo info;
Btree *pBt = pPage->pBt;
- int parentIdx = pParent->nCell; /* pParent new divider cell index */
- int parentSize; /* Size of new divider cell */
- u8 parentCell[64]; /* Space for the new divider cell */
+ int tqparentIdx = pParent->nCell; /* pParent new divider cell index */
+ int tqparentSize; /* Size of new divider cell */
+ u8 tqparentCell[64]; /* Space for the new divider cell */
/* Allocate a new page. Insert the overflow cell from pPage
** into it. Then remove the overflow cell from pPage.
@@ -3687,7 +3687,7 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
assemblePage(pNew, 1, &pCell, &szCell);
pPage->nOverflow = 0;
- /* Set the parent of the newly allocated page to pParent. */
+ /* Set the tqparent of the newly allocated page to pParent. */
pNew->pParent = pParent;
sqlite3pager_ref(pParent->aData);
@@ -3697,16 +3697,16 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
*/
assert( pPage->nCell>0 );
parseCellPtr(pPage, findCell(pPage, pPage->nCell-1), &info);
- rc = fillInCell(pParent, parentCell, 0, info.nKey, 0, 0, &parentSize);
+ rc = fillInCell(pParent, tqparentCell, 0, info.nKey, 0, 0, &tqparentSize);
if( rc!=SQLITE_OK ){
return rc;
}
- assert( parentSize<64 );
- rc = insertCell(pParent, parentIdx, parentCell, parentSize, 0, 4);
+ assert( tqparentSize<64 );
+ rc = insertCell(pParent, tqparentIdx, tqparentCell, tqparentSize, 0, 4);
if( rc!=SQLITE_OK ){
return rc;
}
- put4byte(findOverflowCell(pParent,parentIdx), pPage->pgno);
+ put4byte(findOverflowCell(pParent,tqparentIdx), pPage->pgno);
put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
#ifndef SQLITE_OMIT_AUTOVACUUM
@@ -3726,13 +3726,13 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
}
#endif
- /* Release the reference to the new page and balance the parent page,
+ /* Release the reference to the new page and balance the tqparent page,
** in case the divider cell inserted caused it to become overfull.
*/
releasePage(pNew);
return balance(pParent, 0);
}
-#endif /* SQLITE_OMIT_QUICKBALANCE */
+#endif /* SQLITE_OMIT_TQUICKBALANCE */
/*
** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
@@ -3752,7 +3752,7 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
** of pPage so that all pages have about the same amount of free space.
** Usually NN siblings on either side of pPage is used in the balancing,
** though more siblings might come from one side if pPage is the first
-** or last child of its parent. If pPage has fewer than 2*NN siblings
+** or last child of its tqparent. If pPage has fewer than 2*NN siblings
** (something which can only happen if pPage is the root page or a
** child of root) then all available siblings participate in the balancing.
**
@@ -3768,16 +3768,16 @@ static int balance_quick(MemPage *pPage, MemPage *pParent){
** if the page is overfull. Part of the job of this routine is to
** make sure all Cells for pPage once again fit in pPage->aData[].
**
-** In the course of balancing the siblings of pPage, the parent of pPage
+** In the course of balancing the siblings of pPage, the tqparent of pPage
** might become overfull or underfull. If that happens, then this routine
-** is called recursively on the parent.
+** is called recursively on the tqparent.
**
** If this routine fails for any reason, it might leave the database
** in a corrupted state. So if this routine fails, the database should
** be rolled back.
*/
static int balance_nonroot(MemPage *pPage){
- MemPage *pParent; /* The parent of pPage */
+ MemPage *pParent; /* The tqparent of pPage */
Btree *pBt; /* The whole database */
int nCell = 0; /* Number of cells in apCell[] */
int nMaxCells = 0; /* Allocated size of apCell, szCell, aFrom. */
@@ -3812,7 +3812,7 @@ static int balance_nonroot(MemPage *pPage){
#endif
/*
- ** Find the parent page.
+ ** Find the tqparent page.
*/
assert( pPage->isInit );
assert( sqlite3pager_iswriteable(pPage->aData) );
@@ -3822,7 +3822,7 @@ static int balance_nonroot(MemPage *pPage){
assert( pParent );
TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
-#ifndef SQLITE_OMIT_QUICKBALANCE
+#ifndef SQLITE_OMIT_TQUICKBALANCE
/*
** A special case: If a new entry has just been inserted into a
** table (that is, a btree with integer keys and all data at the leaves)
@@ -3848,7 +3848,7 @@ static int balance_nonroot(MemPage *pPage){
#endif
/*
- ** Find the cell in the parent page whose left child points back
+ ** Find the cell in the tqparent page whose left child points back
** to pPage. The "idx" variable is the index of that cell. If pPage
** is the rightmost child of pParent then set idx to pParent->nCell
*/
@@ -3879,7 +3879,7 @@ static int balance_nonroot(MemPage *pPage){
** the siblings. An attempt is made to find NN siblings on either
** side of pPage. More siblings are taken from one side, however, if
** pPage there are fewer than NN siblings on the other side. If pParent
- ** has NB or fewer children then all children of pParent are taken.
+ ** has NB or fewer tqchildren then all tqchildren of pParent are taken.
*/
nxDiv = idx - NN;
if( nxDiv + NB > pParent->nCell ){
@@ -3911,7 +3911,7 @@ static int balance_nonroot(MemPage *pPage){
}
/* Make nMaxCells a multiple of 2 in order to preserve 8-byte
- ** alignment */
+ ** tqalignment */
nMaxCells = (nMaxCells + 1)&~1;
/*
@@ -3930,13 +3930,13 @@ static int balance_nonroot(MemPage *pPage){
}
szCell = (int*)&apCell[nMaxCells];
aCopy[0] = (u8*)&szCell[nMaxCells];
- assert( ((aCopy[0] - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */
+ assert( ((aCopy[0] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */
for(i=1; i<NB; i++){
aCopy[i] = &aCopy[i-1][pBt->pageSize+ROUND8(sizeof(MemPage))];
- assert( ((aCopy[i] - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */
+ assert( ((aCopy[i] - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */
}
aSpace = &aCopy[NB-1][pBt->pageSize+ROUND8(sizeof(MemPage))];
- assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte alignment required */
+ assert( ((aSpace - (u8*)apCell) & 7)==0 ); /* 8-byte tqalignment required */
#ifndef SQLITE_OMIT_AUTOVACUUM
if( pBt->autoVacuum ){
aFrom = &aSpace[5*pBt->pageSize];
@@ -4199,7 +4199,7 @@ static int balance_nonroot(MemPage *pPage){
#ifndef SQLITE_OMIT_AUTOVACUUM
/* If this is an auto-vacuum database, update the pointer map entries
** that point to the siblings that were rearranged. These can be: left
- ** children of cells, the right-child of the page, or overflow pages
+ ** tqchildren of cells, the right-child of the page, or overflow pages
** pointed to by cells.
*/
if( pBt->autoVacuum ){
@@ -4218,7 +4218,7 @@ static int balance_nonroot(MemPage *pPage){
j = cntNew[i];
/* If the sibling page assembled above was not the right-most sibling,
- ** insert a divider cell into the parent page.
+ ** insert a divider cell into the tqparent page.
*/
if( i<nNew-1 && j<nCell ){
u8 *pCell;
@@ -4284,7 +4284,7 @@ static int balance_nonroot(MemPage *pPage){
}
/*
- ** Reparent children of all cells.
+ ** Retqparent tqchildren of all cells.
*/
for(i=0; i<nNew; i++){
rc = reparentChildPages(apNew[i]);
@@ -4294,9 +4294,9 @@ static int balance_nonroot(MemPage *pPage){
if( rc!=SQLITE_OK ) goto balance_cleanup;
/*
- ** Balance the parent page. Note that the current page (pPage) might
+ ** Balance the tqparent page. Note that the current page (pPage) might
** have been added to the freelist so it might no longer be initialized.
- ** But the parent page will always be initialized.
+ ** But the tqparent page will always be initialized.
*/
assert( pParent->isInit );
/* assert( pPage->isInit ); // No! pPage might have been added to freelist */
@@ -4376,7 +4376,7 @@ static int balance_shallower(MemPage *pPage){
szCell[i] = cellSizePtr(pChild, apCell[i]);
}
assemblePage(pPage, pChild->nCell, apCell, szCell);
- /* Copy the right-pointer of the child to the parent. */
+ /* Copy the right-pointer of the child to the tqparent. */
put4byte(&pPage->aData[pPage->hdrOffset+8],
get4byte(&pChild->aData[pChild->hdrOffset+8]));
freePage(pChild);
@@ -4433,10 +4433,10 @@ static int balance_deeper(MemPage *pPage){
Pgno pgnoChild; /* Page number of the new child page */
Btree *pBt; /* The BTree */
int usableSize; /* Total usable size of a page */
- u8 *data; /* Content of the parent page */
+ u8 *data; /* Content of the tqparent page */
u8 *cdata; /* Content of the child page */
- int hdr; /* Offset to page header in parent */
- int brk; /* Offset to content of first cell in parent */
+ int hdr; /* Offset to page header in tqparent */
+ int brk; /* Offset to content of first cell in tqparent */
assert( pPage->pParent==0 );
assert( pPage->nOverflow>0 );
@@ -4842,7 +4842,7 @@ int sqlite3BtreeCreateTable(Btree *pBt, int *piTable, int flags){
}
/*
-** Erase the given database page and all its children. Return
+** Erase the given database page and all its tqchildren. Return
** the page to the freelist.
*/
static int clearDatabasePage(
@@ -5136,7 +5136,7 @@ static int btreePageDump(Btree *pBt, int pgno, int recursive, MemPage *pParent){
pPage->leaf = (c & PTF_LEAF)!=0;
pPage->hasData = !(pPage->zeroData || (!pPage->leaf && pPage->leafData));
nCell = get2byte(&data[hdr+3]);
- sqlite3DebugPrintf("PAGE %d: flags=0x%02x frag=%d parent=%d\n", pgno,
+ sqlite3DebugPrintf("PAGE %d: flags=0x%02x frag=%d tqparent=%d\n", pgno,
data[hdr], data[hdr+7],
(pPage->isInit && pPage->pParent) ? pPage->pParent->pgno : 0);
assert( hdr == (pgno==1 ? 100 : 0) );
@@ -5353,7 +5353,7 @@ static void checkPtrmap(
IntegrityCk *pCheck, /* Integrity check context */
Pgno iChild, /* Child page number */
u8 eType, /* Expected pointer map type */
- Pgno iParent, /* Expected pointer map parent page number */
+ Pgno iParent, /* Expected pointer map tqparent page number */
char *zContext /* Context description (used for error msg) */
){
int rc;
@@ -5457,8 +5457,8 @@ static void checkList(
** NO 3. Make sure no key is less than or equal to zLowerBound.
** NO 4. Make sure no key is greater than or equal to zUpperBound.
** 5. Check the integrity of overflow pages.
-** 6. Recursively call checkTreePage on all children.
-** 7. Verify that the depth of all children is the same.
+** 6. Recursively call checkTreePage on all tqchildren.
+** 7. Verify that the depth of all tqchildren is the same.
** 8. Make sure this page is at least 33% full or else it is
** the root of the tree.
*/
diff --git a/kexi/3rdparty/kexisql3/src/build.c b/kexi/3rdparty/kexisql3/src/build.c
index 429213dab..02faa0fe6 100644
--- a/kexi/3rdparty/kexisql3/src/build.c
+++ b/kexi/3rdparty/kexisql3/src/build.c
@@ -67,19 +67,19 @@ void sqlite3FinishCoding(Parse *pParse){
if( v ){
sqlite3VdbeAddOp(v, OP_Halt, 0, 0);
- /* The cookie mask contains one bit for each database file open.
+ /* The cookie tqmask contains one bit for each database file open.
** (Bit 0 is for main, bit 1 is for temp, and so forth.) Bits are
** set for each database that is used. Generate code to start a
** transaction on each used database and to verify the schema cookie
** on each used database.
*/
if( pParse->cookieGoto>0 ){
- u32 mask;
+ u32 tqmask;
int iDb;
sqlite3VdbeJumpHere(v, pParse->cookieGoto-1);
- for(iDb=0, mask=1; iDb<db->nDb; mask<<=1, iDb++){
- if( (mask & pParse->cookieMask)==0 ) continue;
- sqlite3VdbeAddOp(v, OP_Transaction, iDb, (mask & pParse->writeMask)!=0);
+ for(iDb=0, tqmask=1; iDb<db->nDb; tqmask<<=1, iDb++){
+ if( (tqmask & pParse->cookieMask)==0 ) continue;
+ sqlite3VdbeAddOp(v, OP_Transaction, iDb, (tqmask & pParse->writeMask)!=0);
sqlite3VdbeAddOp(v, OP_VerifyCookie, iDb, pParse->cookieValue[iDb]);
}
sqlite3VdbeAddOp(v, OP_Goto, 0, pParse->cookieGoto);
@@ -746,7 +746,7 @@ void sqlite3StartTable(
/* Begin generating the code that will insert the table record into
** the SQLITE_MASTER table. Note in particular that we must go ahead
** and allocate the record number for the table entry now. Before any
- ** PRIMARY KEY or UNIQUE keywords are parsed. Those keywords will cause
+ ** PRIMARY KEY or UNITQUE keywords are parsed. Those keywords will cause
** indices to be created and the table record must come before the
** indices. Hence, the record number for the table must be allocated
** now.
@@ -879,7 +879,7 @@ void sqlite3AddNotNull(Parse *pParse, int onError){
**
** This routine does a case-independent search of zType for the
** substrings in the following table. If one of the substrings is
-** found, the corresponding affinity is returned. If zType contains
+** found, the corresponding affinity is returned. If zType tqcontains
** more than one of the substrings, entries toward the top of
** the table take priority. For example, if zType is 'BLOBINT',
** SQLITE_AFF_INTEGER is returned.
@@ -2011,7 +2011,7 @@ static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
** Create a new index for an SQL table. pName1.pName2 is the name of the index
** and pTblList is the name of the table that is to be indexed. Both will
** be NULL for a primary key or an index that is created to satisfy a
-** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
+** UNITQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
** as the table to be indexed. pParse->pNewTable is a table that is
** currently being constructed by a CREATE TABLE statement.
**
@@ -2104,7 +2104,7 @@ void sqlite3CreateIndex(
** index, then we will continue to process this index.
**
** If pName==0 it means that we are
- ** dealing with a primary key or UNIQUE constraint. We have to invent our
+ ** dealing with a primary key or UNITQUE constraint. We have to invent our
** own name.
*/
if( pName ){
@@ -2211,12 +2211,12 @@ void sqlite3CreateIndex(
if( pTab==pParse->pNewTable ){
/* This routine has been called to create an automatic index as a
- ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or
- ** a PRIMARY KEY or UNIQUE clause following the column definitions.
+ ** result of a PRIMARY KEY or UNITQUE clause on a column definition, or
+ ** a PRIMARY KEY or UNITQUE clause following the column definitions.
** i.e. one of:
**
** CREATE TABLE t(x PRIMARY KEY, y);
- ** CREATE TABLE t(x, y, UNIQUE(x, y));
+ ** CREATE TABLE t(x, y, UNITQUE(x, y));
**
** Either way, check to see if the table already has such an index. If
** so, don't bother creating this one. This only applies to
@@ -2285,7 +2285,7 @@ void sqlite3CreateIndex(
** we don't want to recreate it.
**
** If pTblName==0 it means this index is generated as a primary key
- ** or UNIQUE constraint of a CREATE TABLE statement. Since the table
+ ** or UNITQUE constraint of a CREATE TABLE statement. Since the table
** has just been created, it contains no data and the index initialization
** step can be skipped.
*/
@@ -2309,11 +2309,11 @@ void sqlite3CreateIndex(
if( pStart && pEnd ){
/* A named index with an explicit CREATE INDEX statement */
zStmt = sqlite3MPrintf("CREATE%s INDEX %.*s",
- onError==OE_None ? "" : " UNIQUE",
+ onError==OE_None ? "" : " UNITQUE",
pEnd->z - pName->z + 1,
pName->z);
}else{
- /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
+ /* An automatic index created by a PRIMARY KEY or UNITQUE constraint */
/* zStmt = sqlite3MPrintf(""); */
zStmt = 0;
}
@@ -2331,7 +2331,7 @@ void sqlite3CreateIndex(
sqliteFree(zStmt);
/* Fill the index with data and reparse the schema. Code an OP_Expire
- ** to invalidate all pre-compiled statements.
+ ** to tqinvalidate all pre-compiled statements.
*/
if( pTblName ){
sqlite3RefillIndex(pParse, pIndex, iMem);
@@ -2428,7 +2428,7 @@ void sqlite3DropIndex(Parse *pParse, SrcList *pName){
goto exit_drop_index;
}
if( pIndex->autoIndex ){
- sqlite3ErrorMsg(pParse, "index associated with UNIQUE "
+ sqlite3ErrorMsg(pParse, "index associated with UNITQUE "
"or PRIMARY KEY constraint cannot be dropped", 0);
goto exit_drop_index;
}
@@ -2766,7 +2766,7 @@ static int sqlite3OpenTempDatabase(Parse *pParse){
void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
sqlite3 *db;
Vdbe *v;
- int mask;
+ int tqmask;
v = sqlite3GetVdbe(pParse);
if( v==0 ) return; /* This only happens if there was a prior error */
@@ -2778,9 +2778,9 @@ void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
assert( iDb<db->nDb );
assert( db->aDb[iDb].pBt!=0 || iDb==1 );
assert( iDb<32 );
- mask = 1<<iDb;
- if( (pParse->cookieMask & mask)==0 ){
- pParse->cookieMask |= mask;
+ tqmask = 1<<iDb;
+ if( (pParse->cookieMask & tqmask)==0 ){
+ pParse->cookieMask |= tqmask;
pParse->cookieValue[iDb] = db->aDb[iDb].schema_cookie;
if( !OMIT_TEMPDB && iDb==1 ){
sqlite3OpenTempDatabase(pParse);
diff --git a/kexi/3rdparty/kexisql3/src/expr.c b/kexi/3rdparty/kexisql3/src/expr.c
index 45f7fc2fa..9d079e1b2 100644
--- a/kexi/3rdparty/kexisql3/src/expr.c
+++ b/kexi/3rdparty/kexisql3/src/expr.c
@@ -478,7 +478,7 @@ ExprList *sqlite3ExprListDup(ExprList *p){
** called with a NULL argument.
*/
#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
- || !defined(SQLITE_OMIT_SUBQUERY)
+ || !defined(SQLITE_OMIT_SUBTQUERY)
SrcList *sqlite3SrcListDup(SrcList *p){
SrcList *pNew;
int i;
@@ -623,7 +623,7 @@ void sqlite3ExprListDelete(ExprList *pList){
** Walk an expression tree. Call xFunc for each node visited.
**
** The return value from xFunc determines whether the tree walk continues.
-** 0 means continue walking the tree. 1 means do not walk children
+** 0 means continue walking the tree. 1 means do not walk tqchildren
** of the current node but continue with siblings. 2 means abandon
** the tree walk completely.
**
@@ -698,7 +698,7 @@ static int exprNodeIsConstant(void *pArg, Expr *pExpr){
case TK_DOT:
case TK_AGG_FUNCTION:
case TK_AGG_COLUMN:
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
case TK_SELECT:
case TK_EXISTS:
#endif
@@ -1018,15 +1018,15 @@ static int lookupName(
}
/* If a column from a table in pSrcList is referenced, then record
- ** this fact in the pSrcList.a[].colUsed bitmask. Column 0 causes
+ ** this fact in the pSrcList.a[].colUsed bittqmask. Column 0 causes
** bit 0 to be set. Column 1 sets bit 1. And so forth. If the
- ** column number is greater than the number of bits in the bitmask
- ** then set the high-order bit of the bitmask.
+ ** column number is greater than the number of bits in the bittqmask
+ ** then set the high-order bit of the bittqmask.
*/
if( pExpr->iColumn>=0 && pMatch!=0 ){
int n = pExpr->iColumn;
- if( n>=sizeof(Bitmask)*8 ){
- n = sizeof(Bitmask)*8-1;
+ if( n>=sizeof(Bittqmask)*8 ){
+ n = sizeof(Bittqmask)*8-1;
}
assert( pMatch->iCursor==pExpr->iTable );
pMatch->colUsed |= 1<<n;
@@ -1190,7 +1190,7 @@ static int nameResolverStep(void *pArg, Expr *pExpr){
*/
return is_agg;
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
case TK_SELECT:
case TK_EXISTS:
#endif
@@ -1273,7 +1273,7 @@ struct QueryCoder {
** of allowed values. The second form causes the SELECT to generate
** a temporary table.
*/
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
int testAddr = 0; /* One-time test address */
Vdbe *v = sqlite3GetVdbe(pParse);
@@ -1414,7 +1414,7 @@ void sqlite3CodeSubselect(Parse *pParse, Expr *pExpr){
}
return;
}
-#endif /* SQLITE_OMIT_SUBQUERY */
+#endif /* SQLITE_OMIT_SUBTQUERY */
/*
** Generate an instruction that will put the integer describe by
@@ -1649,7 +1649,7 @@ void sqlite3ExprCode(Parse *pParse, Expr *pExpr){
sqlite3VdbeOp3(v, OP_Function, constMask, nExpr, (char*)pDef, P3_FUNCDEF);
break;
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
case TK_EXISTS:
case TK_SELECT: {
sqlite3CodeSubselect(pParse, pExpr);
@@ -1949,7 +1949,7 @@ void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
*/
op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1);
- /* Verify correct alignment of TK_ and OP_ constants
+ /* Verify correct tqalignment of TK_ and OP_ constants
*/
assert( pExpr->op!=TK_ISNULL || op==OP_NotNull );
assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull );
diff --git a/kexi/3rdparty/kexisql3/src/func.c b/kexi/3rdparty/kexisql3/src/func.c
index 9917f4e29..364353437 100644
--- a/kexi/3rdparty/kexisql3/src/func.c
+++ b/kexi/3rdparty/kexisql3/src/func.c
@@ -42,20 +42,20 @@ static void minmaxFunc(
sqlite3_value **argv
){
int i;
- int mask; /* 0 for min() or 0xffffffff for max() */
+ int tqmask; /* 0 for min() or 0xffffffff for max() */
int iBest;
CollSeq *pColl;
if( argc==0 ) return;
- mask = sqlite3_user_data(context)==0 ? 0 : -1;
+ tqmask = sqlite3_user_data(context)==0 ? 0 : -1;
pColl = sqlite3GetFuncCollSeq(context);
assert( pColl );
- assert( mask==-1 || mask==0 );
+ assert( tqmask==-1 || tqmask==0 );
iBest = 0;
if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
for(i=1; i<argc; i++){
if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;
- if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){
+ if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^tqmask)>=0 ){
iBest = i;
}
}
@@ -545,7 +545,7 @@ static void versionFunc(
** change. This function may disappear. Do not write code that depends
** on this function.
**
-** Implementation of the QUOTE() function. This function takes a single
+** Implementation of the TQUOTE() function. This function takes a single
** argument. If the argument is numeric, the return value is the same as
** the argument. If the argument is NULL, the return value is the string
** "NULL". Otherwise, the argument is enclosed in single quotes with
@@ -661,7 +661,7 @@ static void soundexFunc(sqlite3_context *context, int argc, sqlite3_value **argv
static void randStr(sqlite3_context *context, int argc, sqlite3_value **argv){
static const unsigned char zSrc[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789"
".-!,:*^+=_|?/<> ";
int iMin, iMax, n, r, i;
diff --git a/kexi/3rdparty/kexisql3/src/insert.c b/kexi/3rdparty/kexisql3/src/insert.c
index 28d4236eb..4cac87247 100644
--- a/kexi/3rdparty/kexisql3/src/insert.c
+++ b/kexi/3rdparty/kexisql3/src/insert.c
@@ -720,7 +720,7 @@ insert_cleanup:
/*
** Generate code to do a constraint check prior to an INSERT or an UPDATE.
**
-** When this routine is called, the stack contains (from bottom to top)
+** When this routine is called, the stack tqcontains (from bottom to top)
** the following values:
**
** 1. The rowid of the row to be updated before the update. This
@@ -746,7 +746,7 @@ insert_cleanup:
** aIdxUsed!=0 and aIdxUsed[i]!=0.
**
** This routine also generates code to check constraints. NOT NULL,
-** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
+** CHECK, and UNITQUE constraints are all checked. If a constraint fails,
** then the appropriate action is performed. There are five possible
** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
**
@@ -774,7 +774,7 @@ insert_cleanup:
** value for that column. If the default value
** is NULL, the action is the same as ABORT.
**
-** UNIQUE REPLACE The other row that conflicts with the row
+** UNITQUE REPLACE The other row that conflicts with the row
** being inserted is removed.
**
** CHECK REPLACE Illegal. The results in an exception.
@@ -927,7 +927,7 @@ void sqlite3GenerateConstraintChecks(
}
}
- /* Test all UNIQUE constraints by creating entries for each UNIQUE
+ /* Test all UNITQUE constraints by creating entries for each UNITQUE
** index and making sure that duplicate entries do not already exist.
** Add the new records to the indices as we go.
*/
@@ -951,7 +951,7 @@ void sqlite3GenerateConstraintChecks(
/* Find out what action to take in case there is an indexing conflict */
onError = pIdx->onError;
- if( onError==OE_None ) continue; /* pIdx is not a UNIQUE index */
+ if( onError==OE_None ) continue; /* pIdx is not a UNITQUE index */
if( overrideError!=OE_Default ){
onError = overrideError;
}else if( onError==OE_Default ){
@@ -1015,7 +1015,7 @@ void sqlite3GenerateConstraintChecks(
break;
}
}
-#if NULL_DISTINCT_FOR_UNIQUE
+#if NULL_DISTINCT_FOR_UNITQUE
sqlite3VdbeJumpHere(v, jumpInst1);
#endif
sqlite3VdbeJumpHere(v, jumpInst2);
diff --git a/kexi/3rdparty/kexisql3/src/keywordhash.h b/kexi/3rdparty/kexisql3/src/keywordhash.h
index 9beb5fbd2..708440a23 100644
--- a/kexi/3rdparty/kexisql3/src/keywordhash.h
+++ b/kexi/3rdparty/kexisql3/src/keywordhash.h
@@ -8,8 +8,8 @@ static int keywordCode(const char *z, int n){
"CASECASTCOLLATECOLUMNCOMMITCONFLICTCONSTRAINTERSECTCREATECROSS"
"CURRENT_DATECURRENT_TIMESTAMPLANDESCDETACHDISTINCTDROPRAGMATCH"
"FAILIMITFROMFULLGROUPDATEIMMEDIATEINSERTINSTEADINTOFFSETISNULL"
- "JOINORDEREPLACEOUTERESTRICTPRIMARYQUERYRIGHTROLLBACKROWHENUNION"
- "UNIQUEUSINGVACUUMVALUESVIEWHERE";
+ "JOINORDEREPLACEOUTERESTRICTPRIMARYTQUERYRIGHTROLLBACKROWHENUNION"
+ "UNITQUEUSINGVACUUMVALUESVIEWHERE";
static const unsigned char aHash[127] = {
91, 80, 106, 90, 0, 4, 0, 0, 113, 0, 83, 0, 0,
94, 44, 76, 92, 0, 105, 108, 96, 0, 0, 10, 0, 0,
@@ -76,8 +76,8 @@ static int keywordCode(const char *z, int n){
TK_FROM, TK_JOIN_KW, TK_GROUP, TK_UPDATE, TK_IMMEDIATE,
TK_INSERT, TK_INSTEAD, TK_INTO, TK_OF, TK_OFFSET,
TK_SET, TK_ISNULL, TK_JOIN, TK_ORDER, TK_REPLACE,
- TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_QUERY, TK_JOIN_KW,
- TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNIQUE,
+ TK_JOIN_KW, TK_RESTRICT, TK_PRIMARY, TK_TQUERY, TK_JOIN_KW,
+ TK_ROLLBACK, TK_ROW, TK_WHEN, TK_UNION, TK_UNITQUE,
TK_USING, TK_VACUUM, TK_VALUES, TK_VIEW, TK_WHERE,
};
int h, i;
diff --git a/kexi/3rdparty/kexisql3/src/main.c b/kexi/3rdparty/kexisql3/src/main.c
index 83356f433..8d6acd5c6 100644
--- a/kexi/3rdparty/kexisql3/src/main.c
+++ b/kexi/3rdparty/kexisql3/src/main.c
@@ -467,7 +467,7 @@ int sqlite3_create_function(
/* Check if an existing function is being overridden or deleted. If so,
** and there are active VMs, then return SQLITE_BUSY. If a function
** is being overridden/deleted but there are no active VMs, allow the
- ** operation to continue but invalidate all precompiled statements.
+ ** operation to continue but tqinvalidate all precompiled statements.
*/
p = sqlite3FindFunction(db, zFunctionName, nName, nArg, enc, 0);
if( p && p->iPrefEnc==enc && p->nArg==nArg ){
@@ -667,7 +667,7 @@ const char *sqlite3_errmsg(sqlite3 *db){
** error.
*/
const void *sqlite3_errmsg16(sqlite3 *db){
- /* Because all the characters in the string are in the unicode
+ /* Because all the characters in the string are in the tqunicode
** range 0x00-0xFF, if we pad the big-endian string with a
** zero byte, we can obtain the little-endian string with
** &big_endian[1].
@@ -934,7 +934,7 @@ int sqlite3_create_collation(
/* Check if this call is removing or replacing an existing collation
** sequence. If so, and there are active VMs, return busy. If there
- ** are no active VMs, invalidate any pre-compiled statements.
+ ** are no active VMs, tqinvalidate any pre-compiled statements.
*/
pColl = sqlite3FindCollSeq(db, (u8)enc, zName, strlen(zName), 0);
if( pColl && pColl->xCmp ){
diff --git a/kexi/3rdparty/kexisql3/src/os_mac.c b/kexi/3rdparty/kexisql3/src/os_mac.c
index 15798b5d3..f393b423b 100644
--- a/kexi/3rdparty/kexisql3/src/os_mac.c
+++ b/kexi/3rdparty/kexisql3/src/os_mac.c
@@ -84,11 +84,11 @@ int sqlite3OsOpenReadWrite(
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrShPerm, &(id->refNum)) != noErr ){
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr ){
- if (FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if (FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
else
@@ -149,7 +149,7 @@ int sqlite3OsOpenExclusive(const char *zFilename, OsFile *id, int delFlag){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdWrPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -185,7 +185,7 @@ int sqlite3OsOpenReadOnly(const char *zFilename, OsFile *id){
if( FSpMakeFSRef(&fsSpec, &fsRef) != noErr )
return SQLITE_CANTOPEN;
FSGetDataForkName(&dfName);
- if( FSOpenFork(&fsRef, dfName.length, dfName.unicode,
+ if( FSOpenFork(&fsRef, dfName.length, dfName.tqunicode,
fsRdPerm, &(id->refNum)) != noErr )
return SQLITE_CANTOPEN;
# else
@@ -232,7 +232,7 @@ int sqlite3OsOpenDirectory(
int sqlite3OsTempFileName(char *zBuf){
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
char zTempPath[SQLITE_TEMPNAME_SIZE];
@@ -506,20 +506,20 @@ int sqlite3OsReadLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+lk;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
res = PBLockRangeSync(&params);
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -550,24 +550,24 @@ int sqlite3OsWriteLock(OsFile *id){
params.ioParam.ioRefNum = id->refNumRF;
params.ioParam.ioPosMode = fsFromStart;
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
while( cnt-->0 && (res = PBLockRangeSync(&params))!=noErr ){
UInt32 finalTicks;
Delay(1, &finalTicks); /* 1/60 sec */
}
if( res == noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE + id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
if( id->locked==0
|| PBUnlockRangeSync(&params)==noErr ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
res = PBLockRangeSync(&params);
}else{
res = afpRangeNotLocked;
}
params.ioParam.ioPosOffset = FIRST_LOCKBYTE;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
}
if( res == noErr ){
@@ -596,13 +596,13 @@ int sqlite3OsUnlock(OsFile *id){
rc = SQLITE_OK;
}else if( id->locked<0 ){
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+1;
- params.ioParam.ioReqCount = N_LOCKBYTE;
+ params.ioParam.ioRetqCount = N_LOCKBYTE;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;
}else{
params.ioParam.ioPosOffset = FIRST_LOCKBYTE+id->locked;
- params.ioParam.ioReqCount = 1;
+ params.ioParam.ioRetqCount = 1;
PBUnlockRangeSync(&params);
rc = SQLITE_OK;
id->locked = 0;
diff --git a/kexi/3rdparty/kexisql3/src/os_unix.c b/kexi/3rdparty/kexisql3/src/os_unix.c
index cf846b933..91ca787ed 100644
--- a/kexi/3rdparty/kexisql3/src/os_unix.c
+++ b/kexi/3rdparty/kexisql3/src/os_unix.c
@@ -147,7 +147,7 @@
**
** If you close a file descriptor that points to a file that has locks,
** all locks on that file that are owned by the current process are
-** released. To work around this problem, each OsFile structure contains
+** released. To work around this problem, each OsFile structure tqcontains
** a pointer to an openCnt structure. There is one openCnt structure
** per open inode, which means that multiple OsFiles can point to a single
** openCnt. When an attempt is made to close an OsFile, if there are
@@ -680,7 +680,7 @@ int sqlite3OsTempFileName(char *zBuf){
};
static const unsigned char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
struct stat buf;
diff --git a/kexi/3rdparty/kexisql3/src/os_win.c b/kexi/3rdparty/kexisql3/src/os_win.c
index ec7a08405..8c7291364 100644
--- a/kexi/3rdparty/kexisql3/src/os_win.c
+++ b/kexi/3rdparty/kexisql3/src/os_win.c
@@ -104,7 +104,7 @@ static WCHAR *utf8ToUnicode(const char *zFilename){
** Convert UTF-32 to UTF-8. Space to hold the returned string is
** obtained from sqliteMalloc().
*/
-static char *unicodeToUtf8(const WCHAR *zWideFilename){
+static char *tqunicodeToUtf8(const WCHAR *zWideFilename){
int nByte;
char *zFilename;
@@ -438,7 +438,7 @@ char *sqlite3_temp_directory = 0;
int sqlite3OsTempFileName(char *zBuf){
static char zChars[] =
"abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "ABCDEFGHIJKLMNOPTQRSTUVWXYZ"
"0123456789";
int i, j;
char zTempPath[SQLITE_TEMPNAME_SIZE];
@@ -449,7 +449,7 @@ int sqlite3OsTempFileName(char *zBuf){
char *zMulti;
WCHAR zWidePath[SQLITE_TEMPNAME_SIZE];
GetTempPathW(SQLITE_TEMPNAME_SIZE-30, zWidePath);
- zMulti = unicodeToUtf8(zWidePath);
+ zMulti = tqunicodeToUtf8(zWidePath);
if( zMulti ){
strncpy(zTempPath, zMulti, SQLITE_TEMPNAME_SIZE-30);
zTempPath[SQLITE_TEMPNAME_SIZE-30] = 0;
@@ -881,7 +881,7 @@ char *sqlite3OsFullPathname(const char *zRelative){
if( zTemp==0 ) return 0;
GetFullPathNameW(zWide, nByte, zTemp, &zNotUsedW);
sqliteFree(zWide);
- zFull = unicodeToUtf8(zTemp);
+ zFull = tqunicodeToUtf8(zTemp);
sqliteFree(zTemp);
}else{
nByte = GetFullPathNameA(zRelative, 0, 0, &zNotUsed) + 1;
diff --git a/kexi/3rdparty/kexisql3/src/pager.c b/kexi/3rdparty/kexisql3/src/pager.c
index 4b981350d..469d05faa 100644
--- a/kexi/3rdparty/kexisql3/src/pager.c
+++ b/kexi/3rdparty/kexisql3/src/pager.c
@@ -839,7 +839,7 @@ static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){
/*
** Unlock the database and clear the in-memory cache. This routine
** sets the state of the pager back to what it was when it was first
-** opened. Any outstanding pages are invalidated and subsequent attempts
+** opened. Any outstanding pages are tqinvalidated and subsequent attempts
** to access those pages will likely result in a coredump.
*/
static void pager_reset(Pager *pPager){
@@ -1076,7 +1076,7 @@ static int pager_playback_one_page(Pager *pPager, OsFile *jfd, int useCksum){
**
** The master journal file contains the names of all child journals.
** To tell if a master journal can be deleted, check to each of the
-** children. If all children are either missing or do not refer to
+** tqchildren. If all tqchildren are either missing or do not refer to
** a different master journal, then this master journal can be deleted.
*/
static int pager_delmaster(const char *zMaster){
@@ -1948,7 +1948,7 @@ int sqlite3pager_truncate(Pager *pPager, Pgno nPage){
** Shutdown the page cache. Free all memory and close all files.
**
** If a transaction was in progress when this routine is called, that
-** transaction is rolled back. All outstanding pages are invalidated
+** transaction is rolled back. All outstanding pages are tqinvalidated
** and their memory is freed. Any attempt to use a page associated
** with this page cache after this function returns will likely
** result in a coredump.
@@ -2972,7 +2972,7 @@ int sqlite3pager_overwrite(Pager *pPager, Pgno pgno, void *pData){
** a transaction then removed from the freelist during a later part
** of the same transaction and reused for some other purpose. When it
** is first added to the freelist, this routine is called. When reused,
-** the dont_rollback() routine is called. But because the page contains
+** the dont_rollback() routine is called. But because the page tqcontains
** critical data, we still need to be sure it gets rolled back in spite
** of the dont_rollback() call.
*/
diff --git a/kexi/3rdparty/kexisql3/src/parse.c b/kexi/3rdparty/kexisql3/src/parse.c
index 668f00126..d763cb293 100644
--- a/kexi/3rdparty/kexisql3/src/parse.c
+++ b/kexi/3rdparty/kexisql3/src/parse.c
@@ -106,7 +106,7 @@ typedef union {
struct LikeOp yy222;
IdList* yy240;
int yy280;
- struct {int value; int mask;} yy359;
+ struct {int value; int tqmask;} yy359;
TriggerStep* yy360;
struct AttachKey yy361;
Select* yy375;
@@ -682,7 +682,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* CONST_FUNC => nothing */
0, /* SEMI => nothing */
30, /* EXPLAIN => ID */
- 30, /* QUERY => ID */
+ 30, /* TQUERY => ID */
30, /* PLAN => ID */
30, /* BEGIN => ID */
0, /* TRANSACTION => nothing */
@@ -770,7 +770,7 @@ static const YYCODETYPE yyFallback[] = {
0, /* DEFAULT => nothing */
0, /* NULL => nothing */
0, /* PRIMARY => nothing */
- 0, /* UNIQUE => nothing */
+ 0, /* UNITQUE => nothing */
0, /* CHECK => nothing */
0, /* REFERENCES => nothing */
0, /* COLLATE => nothing */
@@ -888,7 +888,7 @@ static const char *const yyTokenName[] = {
"$", "END_OF_FILE", "ILLEGAL", "SPACE",
"UNCLOSED_STRING", "COMMENT", "FUNCTION", "COLUMN",
"AGG_FUNCTION", "AGG_COLUMN", "CONST_FUNC", "SEMI",
- "EXPLAIN", "QUERY", "PLAN", "BEGIN",
+ "EXPLAIN", "TQUERY", "PLAN", "BEGIN",
"TRANSACTION", "DEFERRED", "IMMEDIATE", "EXCLUSIVE",
"COMMIT", "END", "ROLLBACK", "CREATE",
"TABLE", "TEMP", "LP", "RP",
@@ -910,7 +910,7 @@ static const char *const yyTokenName[] = {
"STAR", "SLASH", "REM", "CONCAT",
"UMINUS", "UPLUS", "BITNOT", "STRING",
"JOIN_KW", "CONSTRAINT", "DEFAULT", "NULL",
- "PRIMARY", "UNIQUE", "CHECK", "REFERENCES",
+ "PRIMARY", "UNITQUE", "CHECK", "REFERENCES",
"COLLATE", "AUTOINCR", "ON", "DELETE",
"UPDATE", "INSERT", "SET", "DEFERRABLE",
"FOREIGN", "DROP", "UNION", "ALL",
@@ -962,7 +962,7 @@ static const char *const yyRuleName[] = {
/* 5 */ "ecmd ::= explain cmdx SEMI",
/* 6 */ "explain ::=",
/* 7 */ "explain ::= EXPLAIN",
- /* 8 */ "explain ::= EXPLAIN QUERY PLAN",
+ /* 8 */ "explain ::= EXPLAIN TQUERY PLAN",
/* 9 */ "cmd ::= BEGIN transtype trans_opt",
/* 10 */ "trans_opt ::=",
/* 11 */ "trans_opt ::= TRANSACTION",
@@ -1011,7 +1011,7 @@ static const char *const yyRuleName[] = {
/* 54 */ "ccons ::= NULL onconf",
/* 55 */ "ccons ::= NOT NULL onconf",
/* 56 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
- /* 57 */ "ccons ::= UNIQUE onconf",
+ /* 57 */ "ccons ::= UNITQUE onconf",
/* 58 */ "ccons ::= CHECK LP expr RP onconf",
/* 59 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
/* 60 */ "ccons ::= defer_subclause",
@@ -1040,7 +1040,7 @@ static const char *const yyRuleName[] = {
/* 83 */ "conslist ::= tcons",
/* 84 */ "tcons ::= CONSTRAINT nm",
/* 85 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
- /* 86 */ "tcons ::= UNIQUE LP idxlist RP onconf",
+ /* 86 */ "tcons ::= UNITQUE LP idxlist RP onconf",
/* 87 */ "tcons ::= CHECK expr onconf",
/* 88 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
/* 89 */ "defer_subclause_opt ::=",
@@ -1199,7 +1199,7 @@ static const char *const yyRuleName[] = {
/* 242 */ "expritem ::= expr",
/* 243 */ "expritem ::=",
/* 244 */ "cmd ::= CREATE uniqueflag INDEX nm dbnm ON nm LP idxlist RP onconf",
- /* 245 */ "uniqueflag ::= UNIQUE",
+ /* 245 */ "uniqueflag ::= UNITQUE",
/* 246 */ "uniqueflag ::=",
/* 247 */ "idxlist_opt ::=",
/* 248 */ "idxlist_opt ::= LP idxlist RP",
@@ -2164,27 +2164,27 @@ static void yy_reduce(
break;
case 65:
#line 289 "parse.y"
-{ yygotominor.yy280 = (yymsp[-1].minor.yy280 & yymsp[0].minor.yy359.mask) | yymsp[0].minor.yy359.value; }
+{ yygotominor.yy280 = (yymsp[-1].minor.yy280 & yymsp[0].minor.yy359.tqmask) | yymsp[0].minor.yy359.value; }
#line 2170 "parse.c"
break;
case 66:
#line 291 "parse.y"
-{ yygotominor.yy359.value = 0; yygotominor.yy359.mask = 0x000000; }
+{ yygotominor.yy359.value = 0; yygotominor.yy359.tqmask = 0x000000; }
#line 2175 "parse.c"
break;
case 67:
#line 292 "parse.y"
-{ yygotominor.yy359.value = yymsp[0].minor.yy280; yygotominor.yy359.mask = 0x0000ff; }
+{ yygotominor.yy359.value = yymsp[0].minor.yy280; yygotominor.yy359.tqmask = 0x0000ff; }
#line 2180 "parse.c"
break;
case 68:
#line 293 "parse.y"
-{ yygotominor.yy359.value = yymsp[0].minor.yy280<<8; yygotominor.yy359.mask = 0x00ff00; }
+{ yygotominor.yy359.value = yymsp[0].minor.yy280<<8; yygotominor.yy359.tqmask = 0x00ff00; }
#line 2185 "parse.c"
break;
case 69:
#line 294 "parse.y"
-{ yygotominor.yy359.value = yymsp[0].minor.yy280<<16; yygotominor.yy359.mask = 0xff0000; }
+{ yygotominor.yy359.value = yymsp[0].minor.yy280<<16; yygotominor.yy359.tqmask = 0xff0000; }
#line 2190 "parse.c"
break;
case 70:
diff --git a/kexi/3rdparty/kexisql3/src/parse.h b/kexi/3rdparty/kexisql3/src/parse.h
index fcedda589..b96836cee 100644
--- a/kexi/3rdparty/kexisql3/src/parse.h
+++ b/kexi/3rdparty/kexisql3/src/parse.h
@@ -10,7 +10,7 @@
#define TK_CONST_FUNC 10
#define TK_SEMI 11
#define TK_EXPLAIN 12
-#define TK_QUERY 13
+#define TK_TQUERY 13
#define TK_PLAN 14
#define TK_BEGIN 15
#define TK_TRANSACTION 16
@@ -98,7 +98,7 @@
#define TK_DEFAULT 98
#define TK_NULL 99
#define TK_PRIMARY 100
-#define TK_UNIQUE 101
+#define TK_UNITQUE 101
#define TK_CHECK 102
#define TK_REFERENCES 103
#define TK_COLLATE 104
diff --git a/kexi/3rdparty/kexisql3/src/parse.y b/kexi/3rdparty/kexisql3/src/parse.y
index b92d22767..c591c99d9 100644
--- a/kexi/3rdparty/kexisql3/src/parse.y
+++ b/kexi/3rdparty/kexisql3/src/parse.y
@@ -207,12 +207,12 @@ ccons ::= COLLATE id(C). {sqlite3AddCollateType(pParse, C.z, C.n);}
//
%type refargs {int}
refargs(A) ::= . { A = OE_Restrict * 0x010101; }
-refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.mask) | Y.value; }
-%type refarg {struct {int value; int mask;}}
-refarg(A) ::= MATCH nm. { A.value = 0; A.mask = 0x000000; }
-refarg(A) ::= ON DELETE refact(X). { A.value = X; A.mask = 0x0000ff; }
-refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.mask = 0x00ff00; }
-refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.mask = 0xff0000; }
+refargs(A) ::= refargs(X) refarg(Y). { A = (X & Y.tqmask) | Y.value; }
+%type refarg {struct {int value; int tqmask;}}
+refarg(A) ::= MATCH nm. { A.value = 0; A.tqmask = 0x000000; }
+refarg(A) ::= ON DELETE refact(X). { A.value = X; A.tqmask = 0x0000ff; }
+refarg(A) ::= ON UPDATE refact(X). { A.value = X<<8; A.tqmask = 0x00ff00; }
+refarg(A) ::= ON INSERT refact(X). { A.value = X<<16; A.tqmask = 0xff0000; }
%type refact {int}
refact(A) ::= SET NULL. { A = OE_SetNull; }
refact(A) ::= SET DEFAULT. { A = OE_SetDflt; }
@@ -398,7 +398,7 @@ seltablist(A) ::= stl_prefix(X) LP seltablist_paren(S) RP
}
// A seltablist_paren nonterminal represents anything in a FROM that
-// is contained inside parentheses. This can be either a subquery or
+// is contained inside tqparentheses. This can be either a subquery or
// a grouping of table and subqueries.
//
%type seltablist_paren {Select*}
diff --git a/kexi/3rdparty/kexisql3/src/pragma.c b/kexi/3rdparty/kexisql3/src/pragma.c
index c85c19d5c..618ce9e1a 100644
--- a/kexi/3rdparty/kexisql3/src/pragma.c
+++ b/kexi/3rdparty/kexisql3/src/pragma.c
@@ -86,7 +86,7 @@ static int getTempStore(const char *z){
** Invalidate temp storage, either when the temp storage is changed
** from default, or when 'file' and the temp_store_directory has changed
*/
-static int invalidateTempStorage(Parse *pParse){
+static int tqinvalidateTempStorage(Parse *pParse){
sqlite3 *db = pParse->db;
if( db->aDb[1].pBt!=0 ){
if( db->flags & SQLITE_InTrans ){
@@ -112,7 +112,7 @@ static int changeTempStorage(Parse *pParse, const char *zStorageType){
int ts = getTempStore(zStorageType);
sqlite3 *db = pParse->db;
if( db->temp_store==ts ) return SQLITE_OK;
- if( invalidateTempStorage( pParse ) != SQLITE_OK ){
+ if( tqinvalidateTempStorage( pParse ) != SQLITE_OK ){
return SQLITE_ERROR;
}
db->temp_store = ts;
@@ -142,7 +142,7 @@ static void returnSingleInt(Parse *pParse, const char *zLabel, int value){
static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
static const struct sPragmaType {
const char *zName; /* Name of the pragma */
- int mask; /* Mask for the db->flags value */
+ int tqmask; /* Mask for the db->flags value */
} aPragma[] = {
{ "vdbe_trace", SQLITE_VdbeTrace },
{ "sql_trace", SQLITE_SqlTrace },
@@ -164,12 +164,12 @@ static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
v = sqlite3GetVdbe(pParse);
if( v ){
if( zRight==0 ){
- returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
+ returnSingleInt(pParse, p->zName, (db->flags & p->tqmask)!=0 );
}else{
if( getBoolean(zRight) ){
- db->flags |= p->mask;
+ db->flags |= p->tqmask;
}else{
- db->flags &= ~p->mask;
+ db->flags &= ~p->tqmask;
}
}
/* If one of these pragmas is executed, any prepared statements
@@ -377,7 +377,7 @@ void sqlite3Pragma(
** Return or set the local value of the temp_store_directory flag. Changing
** the value sets a specific directory to be used for temporary files.
** Setting to a null string reverts to the default temporary directory search.
- ** If temporary directory is changed, then invalidateTempStorage.
+ ** If temporary directory is changed, then tqinvalidateTempStorage.
**
*/
if( sqlite3StrICmp(zLeft, "temp_store_directory")==0 ){
@@ -397,7 +397,7 @@ void sqlite3Pragma(
|| (TEMP_STORE==1 && db->temp_store<=1)
|| (TEMP_STORE==2 && db->temp_store==1)
){
- invalidateTempStorage(pParse);
+ tqinvalidateTempStorage(pParse);
}
sqliteFree(sqlite3_temp_directory);
if( zRight[0] ){
diff --git a/kexi/3rdparty/kexisql3/src/prepare.c b/kexi/3rdparty/kexisql3/src/prepare.c
index b3222a82f..23bfa533b 100644
--- a/kexi/3rdparty/kexisql3/src/prepare.c
+++ b/kexi/3rdparty/kexisql3/src/prepare.c
@@ -77,7 +77,7 @@ int sqlite3InitCallback(void *pInit, int argc, char **argv, char **azColName){
}
}else{
/* If the SQL column is blank it means this is an index that
- ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
+ ** was created to be the PRIMARY KEY or to fulfill a UNITQUE
** constraint for a CREATE TABLE. The index should have already
** been created when we processed the CREATE TABLE. All we have
** to do here is record the root page number for that index.
@@ -527,7 +527,7 @@ int sqlite3_prepare16(
if( zTail8 && pzTail ){
/* If sqlite3_prepare returns a tail pointer, we calculate the
- ** equivalent pointer into the UTF-16 string by counting the unicode
+ ** equivalent pointer into the UTF-16 string by counting the tqunicode
** characters between zSql8 and zTail8, and then returning a pointer
** the same number of characters into the UTF-16 string.
*/
diff --git a/kexi/3rdparty/kexisql3/src/select.c b/kexi/3rdparty/kexisql3/src/select.c
index 86b22c386..0f465c096 100644
--- a/kexi/3rdparty/kexisql3/src/select.c
+++ b/kexi/3rdparty/kexisql3/src/select.c
@@ -518,7 +518,7 @@ static int selectInnerLoop(
break;
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
/* If we are creating a set for an "expr IN (SELECT ...)" construct,
** then there should be a single item on the stack. Write this
** item into the set table with bogus data.
@@ -562,7 +562,7 @@ static int selectInnerLoop(
}
break;
}
-#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
+#endif /* #ifndef SQLITE_OMIT_SUBTQUERY */
/* Send the data to the callback function or to a subroutine. In the
** case of a subroutine, the subroutine itself is responsible for
@@ -671,7 +671,7 @@ static void generateSortTail(
sqlite3VdbeAddOp(v, OP_Insert, iParm, 0);
break;
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
case SRT_Set: {
assert( nColumn==1 );
sqlite3VdbeAddOp(v, OP_NotNull, -1, sqlite3VdbeCurrentAddr(v)+3);
@@ -773,7 +773,7 @@ static const char *columnType(NameContext *pNC, Expr *pExpr){
}
break;
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
case TK_SELECT: {
NameContext sNC;
Select *pS = pExpr->pSelect;
@@ -1058,7 +1058,7 @@ static int prepSelectStmt(Parse *pParse, Select *p){
return 0;
}
if( pFrom->zName==0 ){
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
/* A sub-query in the FROM clause of a SELECT */
assert( pFrom->pSelect!=0 );
if( pFrom->zAlias==0 ){
@@ -1961,7 +1961,7 @@ static void substSelect(Select *p, int iTable, ExprList *pEList){
*/
static int flattenSubquery(
Parse *pParse, /* The parsing context */
- Select *p, /* The parent or outer SELECT statement */
+ Select *p, /* The tqparent or outer SELECT statement */
int iFrom, /* Index in p->pSrc->a[] of the inner subquery */
int isAgg, /* True if outer SELECT uses aggregate functions */
int subqueryIsAgg /* True if the subquery uses aggregate functions */
@@ -2038,7 +2038,7 @@ static int flattenSubquery(
** the FROM clause of the outer query. Before doing this, remember
** the cursor number for the original outer query FROM element in
** iParent. The iParent cursor will never be used. Subsequent code
- ** will scan expressions looking for iParent references and replace
+ ** will scan expressions looking for iParent references and tqreplace
** those references with expressions that resolve to the subquery FROM
** elements we are now copying in.
*/
@@ -2322,7 +2322,7 @@ static int processOrderGroupBy(
** This routine resolves any names used in the result set of the
** supplied SELECT statement. If the SELECT statement being resolved
** is a sub-select, then pOuterNC is a pointer to the NameContext
-** of the parent SELECT.
+** of the tqparent SELECT.
*/
int sqlite3SelectResolve(
Parse *pParse, /* The parser context */
@@ -2569,10 +2569,10 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
** This routine does NOT free the Select structure passed in. The
** calling function needs to do that.
**
-** The pParent, parentTab, and *pParentAgg fields are filled in if this
+** The pParent, tqparentTab, and *pParentAgg fields are filled in if this
** SELECT is a subquery. This routine may try to combine this SELECT
-** with its parent to form a single flat query. In so doing, it might
-** change the parent query from a non-aggregate to an aggregate query.
+** with its tqparent to form a single flat query. In so doing, it might
+** change the tqparent query from a non-aggregate to an aggregate query.
** For that reason, the pParentAgg flag is passed as a pointer, so it
** can be changed.
**
@@ -2587,7 +2587,7 @@ static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
** pParent will be NULL. During the processing of the outer query, this
** routine is called recursively to handle the subquery. For the recursive
** call, pParent will point to the outer query. Because the subquery is
-** the second element in a three-way join, the parentTab parameter will
+** the second element in a three-way join, the tqparentTab parameter will
** be 1 (the 2nd value of a 0-indexed array.)
*/
int sqlite3Select(
@@ -2596,7 +2596,7 @@ int sqlite3Select(
int eDest, /* How to dispose of the results */
int iParm, /* A parameter used by the eDest disposal method */
Select *pParent, /* Another SELECT for which this is a sub-query */
- int parentTab, /* Index in pParent->pSrc of this query */
+ int tqparentTab, /* Index in pParent->pSrc of this query */
int *pParentAgg, /* True if pParent uses aggregate functions */
char *aff /* If eDest is SRT_Union, the affinity string */
){
@@ -2664,7 +2664,7 @@ int sqlite3Select(
** only a single column may be output.
*/
assert( eDest!=SRT_Exists || pEList->nExpr==1 );
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
if( (eDest==SRT_Mem || eDest==SRT_Set) && pEList->nExpr>1 ){
sqlite3ErrorMsg(pParse, "only a single result allowed for "
"a SELECT that is part of an expression");
@@ -2692,7 +2692,7 @@ int sqlite3Select(
/* Generate code for all sub-queries in the FROM clause
*/
-#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+#if !defined(SQLITE_OMIT_SUBTQUERY) || !defined(SQLITE_OMIT_VIEW)
for(i=0; i<pTabList->nSrc; i++){
const char *zSavedAuthContext = 0;
int needRestoreContext;
@@ -2730,12 +2730,12 @@ int sqlite3Select(
goto select_end;
}
- /* Check to see if this is a subquery that can be "flattened" into its parent.
+ /* Check to see if this is a subquery that can be "flattened" into its tqparent.
** If flattening is a possiblity, do so and return immediately.
*/
#ifndef SQLITE_OMIT_VIEW
if( pParent && pParentAgg &&
- flattenSubquery(pParse, pParent, parentTab, *pParentAgg, isAgg) ){
+ flattenSubquery(pParse, pParent, tqparentTab, *pParentAgg, isAgg) ){
if( isAgg ) *pParentAgg = 1;
goto select_end;
}
@@ -3098,17 +3098,17 @@ int sqlite3Select(
generateSortTail(pParse, p, v, pEList->nExpr, eDest, iParm);
}
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
/* If this was a subquery, we have now converted the subquery into a
- ** temporary table. So delete the subquery structure from the parent
+ ** temporary table. So delete the subquery structure from the tqparent
** to prevent this subquery from being evaluated again and to force the
** the use of the temporary table.
*/
if( pParent ){
- assert( pParent->pSrc->nSrc>parentTab );
- assert( pParent->pSrc->a[parentTab].pSelect==p );
+ assert( pParent->pSrc->nSrc>tqparentTab );
+ assert( pParent->pSrc->a[tqparentTab].pSelect==p );
sqlite3SelectDelete(p);
- pParent->pSrc->a[parentTab].pSelect = 0;
+ pParent->pSrc->a[tqparentTab].pSelect = 0;
}
#endif
diff --git a/kexi/3rdparty/kexisql3/src/sqlite3.h b/kexi/3rdparty/kexisql3/src/sqlite3.h
index 414c6cac6..be29db690 100644
--- a/kexi/3rdparty/kexisql3/src/sqlite3.h
+++ b/kexi/3rdparty/kexisql3/src/sqlite3.h
@@ -1248,7 +1248,7 @@ int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
** is NULL pointer, then SQLite does a search for an appropriate temporary
** file directory.
**
-** Once sqlite3_open() has been called, changing this variable will invalidate
+** Once sqlite3_open() has been called, changing this variable will tqinvalidate
** the current temporary database, if any.
*/
extern char *sqlite3_temp_directory;
diff --git a/kexi/3rdparty/kexisql3/src/sqliteInt.h b/kexi/3rdparty/kexisql3/src/sqliteInt.h
index 796653e7c..749168053 100644
--- a/kexi/3rdparty/kexisql3/src/sqliteInt.h
+++ b/kexi/3rdparty/kexisql3/src/sqliteInt.h
@@ -104,22 +104,22 @@
/*
** If the following macro is set to 1, then NULL values are considered
** distinct when determining whether or not two entries are the same
-** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
+** in a UNITQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL,
** OCELOT, and Firebird all work. The SQL92 spec explicitly says this
** is the way things are suppose to work.
**
** If the following macro is set to 0, the NULLs are indistinct for
-** a UNIQUE index. In this mode, you can only have a single NULL entry
-** for a column declared UNIQUE. This is the way Informix and SQL Server
+** a UNITQUE index. In this mode, you can only have a single NULL entry
+** for a column declared UNITQUE. This is the way Informix and SQL Server
** work.
*/
-#define NULL_DISTINCT_FOR_UNIQUE 1
+#define NULL_DISTINCT_FOR_UNITQUE 1
/*
** The maximum number of attached databases. This must be at least 2
** in order to support the main database file (0) and the file used to
** hold temporary tables (1). And it must be less than 32 because
-** we use a bitmask of databases with a u32 in places (for example
+** we use a bittqmask of databases with a u32 in places (for example
** the Parse.cookieMask field).
*/
#define MAX_ATTACHED 10
@@ -700,7 +700,7 @@ struct FKey {
** occurs. IGNORE means that the particular row that caused the constraint
** error is not inserted or updated. Processing continues and no error
** is returned. REPLACE means that preexisting database rows that caused
-** a UNIQUE constraint violation are removed so that the new insert or
+** a UNITQUE constraint violation are removed so that the new insert or
** update can proceed. Processing continues and no error is reported.
**
** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
@@ -779,7 +779,7 @@ struct Index {
Table *pTable; /* The SQL table being indexed */
int tnum; /* Page containing root of this index in database file */
u8 onError; /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
- u8 autoIndex; /* True if is automatically created (ex: by UNIQUE) */
+ u8 autoIndex; /* True if is automatically created (ex: by UNITQUE) */
u8 iDb; /* Index in sqlite.aDb[] of where this index is stored */
char *zColAff; /* String defining the affinity of each column */
Index *pNext; /* The next index associated with the same table */
@@ -976,9 +976,9 @@ struct IdList {
};
/*
-** The bitmask datatype defined below is used for various optimizations.
+** The bittqmask datatype defined below is used for various optimizations.
*/
-typedef unsigned int Bitmask;
+typedef unsigned int Bittqmask;
/*
** The following structure describes the FROM clause of a SELECT statement.
@@ -1004,7 +1004,7 @@ struct SrcList {
i16 iCursor; /* The VDBE cursor number used to access this table */
Expr *pOn; /* The ON clause of a join */
IdList *pUsing; /* The USING clause of a join */
- Bitmask colUsed; /* Bit N (1<<N) set if column N or pTab is used */
+ Bittqmask colUsed; /* Bit N (1<<N) set if column N or pTab is used */
} a[1]; /* One entry for each identifier on the list */
};
@@ -1076,7 +1076,7 @@ struct WhereInfo {
** the context containing the match is incremented.
**
** Each subquery gets a new NameContext. The pNext field points to the
-** NameContext in the parent query. Thus the process of scanning the
+** NameContext in the tqparent query. Thus the process of scanning the
** NameContext list corresponds to searching through successively outer
** subqueries looking for a match.
*/
@@ -1176,7 +1176,7 @@ struct Parse {
int nMem; /* Number of memory cells used so far */
int nSet; /* Number of sets used so far */
u32 writeMask; /* Start a write transaction on these databases */
- u32 cookieMask; /* Bitmask of schema verified databases */
+ u32 cookieMask; /* Bittqmask of schema verified databases */
int cookieGoto; /* Address of OP_Goto to cookie verifier subroutine */
int cookieValue[MAX_ATTACHED+2]; /* Values of cookies to verify */
@@ -1328,9 +1328,9 @@ struct TriggerStep {
*
* struct TriggerStack has a "pNext" member, to allow linked lists to be
* constructed. When coding nested triggers (triggers fired by other triggers)
- * each nested trigger stores its parent trigger's TriggerStack as the "pNext"
+ * each nested trigger stores its tqparent trigger's TriggerStack as the "pNext"
* pointer. Once the nested trigger has been coded, the pNext value is restored
- * to the pTriggerStack member of the Parse stucture and coding of the parent
+ * to the pTriggerStack member of the Parse stucture and coding of the tqparent
* trigger continues.
*
* Before a nested trigger is coded, the linked list pointed to by the
diff --git a/kexi/3rdparty/kexisql3/src/tclsqlite.c b/kexi/3rdparty/kexisql3/src/tclsqlite.c
index 51bde4eec..4387e2f74 100644
--- a/kexi/3rdparty/kexisql3/src/tclsqlite.c
+++ b/kexi/3rdparty/kexisql3/src/tclsqlite.c
@@ -921,7 +921,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
** as column separators. If a column contains a null string, or the
** value of NULLINDICATOR, a NULL is inserted for the column.
** conflict-algorithm is one of the sqlite conflict algorithms:
- ** rollback, abort, fail, ignore, replace
+ ** rollback, abort, fail, ignore, tqreplace
** On success, return the number of lines processed, not necessarily same
** as 'db changes' due to conflict-algorithm selected.
**
@@ -982,10 +982,10 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
sqlite3StrICmp(zConflict, "abort" ) != 0 &&
sqlite3StrICmp(zConflict, "fail" ) != 0 &&
sqlite3StrICmp(zConflict, "ignore" ) != 0 &&
- sqlite3StrICmp(zConflict, "replace" ) != 0 ) {
+ sqlite3StrICmp(zConflict, "tqreplace" ) != 0 ) {
Tcl_AppendResult(interp, "Error: \"", zConflict,
"\", conflict-algorithm must be one of: rollback, "
- "abort, fail, ignore, or replace", 0);
+ "abort, fail, ignore, or tqreplace", 0);
return TCL_ERROR;
}
zSql = sqlite3_mprintf("SELECT * FROM '%q'", zTable);
@@ -1822,7 +1822,7 @@ static int DbObjCmd(void *cd, Tcl_Interp *interp, int objc,Tcl_Obj *const*objv){
** DBNAME that is used to control that connection. The database
** connection is deleted when the DBNAME command is deleted.
**
-** The second argument is the name of the directory that contains
+** The second argument is the name of the directory that tqcontains
** the sqlite database that is to be accessed.
**
** For testing purposes, we also support the following:
diff --git a/kexi/3rdparty/kexisql3/src/trigger.c b/kexi/3rdparty/kexisql3/src/trigger.c
index f39d2bd83..610f50901 100644
--- a/kexi/3rdparty/kexisql3/src/trigger.c
+++ b/kexi/3rdparty/kexisql3/src/trigger.c
@@ -581,7 +581,7 @@ int sqlite3TriggersExist(
ExprList *pChanges /* Columns that change in an UPDATE statement */
){
Trigger *pTrigger = pTab->pTrigger;
- int mask = 0;
+ int tqmask = 0;
while( pTrigger ){
if( pTrigger->op==op && checkColumnOverLap(pTrigger->pColumns, pChanges) ){
@@ -591,12 +591,12 @@ int sqlite3TriggersExist(
ss = ss->pNext;
}
if( ss==0 ){
- mask |= pTrigger->tr_tm;
+ tqmask |= pTrigger->tr_tm;
}
}
pTrigger = pTrigger->pNext;
}
- return mask;
+ return tqmask;
}
/*
diff --git a/kexi/3rdparty/kexisql3/src/utf.c b/kexi/3rdparty/kexisql3/src/utf.c
index d42ab759e..5efbfe781 100644
--- a/kexi/3rdparty/kexisql3/src/utf.c
+++ b/kexi/3rdparty/kexisql3/src/utf.c
@@ -43,11 +43,11 @@
**
** When converting malformed UTF-8 strings to UTF-16, one instance of the
** replacement character U+FFFD for each byte that cannot be interpeted as
-** part of a valid unicode character.
+** part of a valid tqunicode character.
**
** When converting malformed UTF-16 strings to UTF-8, one instance of the
** replacement character U+FFFD for each pair of bytes that cannot be
-** interpeted as part of a valid unicode character.
+** interpeted as part of a valid tqunicode character.
**
** This file contains the following public routines:
**
@@ -427,10 +427,10 @@ int sqlite3VdbeMemHandleBom(Mem *pMem){
#endif /* SQLITE_OMIT_UTF16 */
/*
-** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
-** return the number of unicode characters in pZ up to (but not including)
+** pZ is a UTF-8 encoded tqunicode string. If nByte is less than zero,
+** return the number of tqunicode characters in pZ up to (but not including)
** the first 0x00 byte. If nByte is not less than zero, return the
-** number of unicode characters in the first nByte of pZ (or up to
+** number of tqunicode characters in the first nByte of pZ (or up to
** the first 0x00, whichever comes first).
*/
int sqlite3utf8CharLen(const char *z, int nByte){
@@ -451,10 +451,10 @@ int sqlite3utf8CharLen(const char *z, int nByte){
#ifndef SQLITE_OMIT_UTF16
/*
-** pZ is a UTF-16 encoded unicode string. If nChar is less than zero,
+** pZ is a UTF-16 encoded tqunicode string. If nChar is less than zero,
** return the number of bytes up to (but not including), the first pair
** of consecutive 0x00 bytes in pZ. If nChar is not less than zero,
-** then return the number of bytes in the first nChar unicode characters
+** then return the number of bytes in the first nChar tqunicode characters
** in pZ (or up until the first pair of 0x00 bytes, whichever comes first).
*/
int sqlite3utf16ByteLen(const void *zIn, int nChar){
diff --git a/kexi/3rdparty/kexisql3/src/vacuum.c b/kexi/3rdparty/kexisql3/src/vacuum.c
index 6f544a6bc..8f22c7f82 100644
--- a/kexi/3rdparty/kexisql3/src/vacuum.c
+++ b/kexi/3rdparty/kexisql3/src/vacuum.c
@@ -212,8 +212,8 @@ int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
" FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ", 0);
if( rc!=SQLITE_OK ) goto end_of_vacuum;
rc = execExecSql(db,
- "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
- " FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'", 0);
+ "SELECT 'CREATE UNITQUE INDEX vacuum_db.' || substr(sql,21,100000000) "
+ " FROM sqlite_master WHERE sql LIKE 'CREATE UNITQUE INDEX %'", 0);
if( rc!=SQLITE_OK ) goto end_of_vacuum;
rc = execExecSql(db,
"SELECT 'CREATE VIEW vacuum_db.' || substr(sql,13,100000000) "
diff --git a/kexi/3rdparty/kexisql3/src/vdbe.c b/kexi/3rdparty/kexisql3/src/vdbe.c
index abb68aec0..c5582b5c4 100644
--- a/kexi/3rdparty/kexisql3/src/vdbe.c
+++ b/kexi/3rdparty/kexisql3/src/vdbe.c
@@ -103,7 +103,7 @@ int sqlite3_sort_count = 0;
/*
-** An ephemeral string value (signified by the MEM_Ephem flag) contains
+** An ephemeral string value (signified by the MEM_Ephem flag) tqcontains
** a pointer to a dynamically allocated string where some other entity
** is responsible for deallocating that string. Because the stack entry
** does not control the string, it might be deleted without the stack
@@ -121,7 +121,7 @@ int sqlite3_sort_count = 0;
** Convert the given stack entity into a integer if it isn't one
** already.
**
-** Any prior string or real representation is invalidated.
+** Any prior string or real representation is tqinvalidated.
** NULLs are converted into 0.
*/
#define Integerify(P) sqlite3VdbeMemIntegerify(P)
@@ -129,7 +129,7 @@ int sqlite3_sort_count = 0;
/*
** Convert P so that it has type MEM_Real.
**
-** Any prior string or integer representation is invalidated.
+** Any prior string or integer representation is tqinvalidated.
** NULLs are converted into 0.0.
*/
#define Realify(P) sqlite3VdbeMemRealify(P)
@@ -508,7 +508,7 @@ int sqlite3VdbeExec(
** case statement is followed by a comment of the form "/# same as ... #/"
** that comment is used to determine the particular value of the opcode.
**
-** If a comment on the same line as the "case OP_" construction contains
+** If a comment on the same line as the "case OP_" construction tqcontains
** the word "no-push", then the opcode is guarenteed not to grow the
** vdbe stack when it is executed. See function opcode() in
** vdbeaux.c for details.
@@ -1103,7 +1103,7 @@ case OP_CollSeq: { /* no-push */
** defines the function) with P2 arguments taken from the stack. Pop all
** arguments from the stack and push back the result.
**
-** P1 is a 32-bit bitmask indicating whether or not each argument to the
+** P1 is a 32-bit bittqmask indicating whether or not each argument to the
** function was determined to be constant at compile time. If the first
** argument was constant then bit 0 of P1 is set. This is used to determine
** whether meta data associated with a user function argument using the
@@ -1421,7 +1421,7 @@ case OP_ToBlob: { /* no-push */
** whereas it would normally be NULL. Similarly, NULL==123 is false when
** 0x200 is set but is NULL when the 0x200 bit of P1 is clear.
**
-** The least significant byte of P1 (mask 0xff) must be an affinity character -
+** The least significant byte of P1 (tqmask 0xff) must be an affinity character -
** 'n', 't', 'i' or 'o' - or 0x00. An attempt is made to coerce both values
** according to the affinity before the comparison is made. If the byte is
** 0x00, then numeric affinity is used.
@@ -1676,7 +1676,7 @@ case OP_BitNot: { /* same as TK_BITNOT, no-push */
*/
/*
** The magic Explain opcode are only inserted when explain==2 (which
-** is to say when the EXPLAIN QUERY PLAN syntax is used.)
+** is to say when the EXPLAIN TQUERY PLAN syntax is used.)
** This opcode records information from the optimizer. It is the
** the same as a no-op. This opcodesnever appears in a real VM program.
*/
@@ -2539,8 +2539,8 @@ case OP_OpenWrite: { /* no-push */
case SQLITE_OK: {
int flags = sqlite3BtreeFlags(pCur->pCursor);
/* Sanity checking. Only the lower four bits of the flags byte should
- ** be used. Bit 3 (mask 0x08) is unpreditable. The lower 3 bits
- ** (mask 0x07) should be either 5 (intkey+leafdata for tables) or
+ ** be used. Bit 3 (tqmask 0x08) is unpreditable. The lower 3 bits
+ ** (tqmask 0x07) should be either 5 (intkey+leafdata for tables) or
** 2 (zerodata for indices). If these conditions are not met it can
** only mean that we are dealing with a corrupt database file
*/
@@ -2956,7 +2956,7 @@ case OP_IsUnique: { /* no-push */
}
/* The final varint of the key is different from R. Push it onto
- ** the stack. (The record number of an entry that violates a UNIQUE
+ ** the stack. (The record number of an entry that violates a UNITQUE
** constraint.)
*/
pTos++;
@@ -3020,7 +3020,7 @@ case OP_Sequence: {
assert( i>=0 && i<p->nCursor );
assert( p->apCsr[i]!=0 );
pTos++;
- pTos->i = p->apCsr[i]->seqCount++;
+ pTos->i = p->apCsr[i]->setqCount++;
pTos->flags = MEM_Int;
break;
}
diff --git a/kexi/3rdparty/kexisql3/src/vdbeInt.h b/kexi/3rdparty/kexisql3/src/vdbeInt.h
index 1746ee561..dea8465b2 100644
--- a/kexi/3rdparty/kexisql3/src/vdbeInt.h
+++ b/kexi/3rdparty/kexisql3/src/vdbeInt.h
@@ -81,7 +81,7 @@ struct Cursor {
u8 *pIncrKey; /* Pointer to pKeyInfo->incrKey */
KeyInfo *pKeyInfo; /* Info about index keys needed by index cursors */
int nField; /* Number of fields in the header */
- i64 seqCount; /* Sequence counter */
+ i64 setqCount; /* Sequence counter */
/* Cached information about the header for the data record that the
** cursor is currently pointing to. Only valid if cacheValid is true.
@@ -133,7 +133,7 @@ typedef struct Mem Mem;
** No other flags may be set in this case.
**
** If the MEM_Str flag is set then Mem.z points at a string representation.
-** Usually this is encoded in the same unicode encoding as the main
+** Usually this is encoded in the same tqunicode encoding as the main
** database (see below for exceptions). If the MEM_Term flag is also
** set, then the string is nul terminated. The MEM_Int and MEM_Real
** flags may coexist with the MEM_Str flag.
@@ -160,7 +160,7 @@ typedef struct Mem Mem;
#define MEM_Agg 0x0400 /* Mem.z points to an agg function context */
-/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
+/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that tqcontains
** additional information about auxiliary information bound to arguments
** of the function. This is used to implement the sqlite3_get_auxdata()
** and sqlite3_set_auxdata() APIs. The "auxdata" is some auxiliary data
diff --git a/kexi/3rdparty/kexisql3/src/vdbeaux.c b/kexi/3rdparty/kexisql3/src/vdbeaux.c
index cba9c096d..6b37312de 100644
--- a/kexi/3rdparty/kexisql3/src/vdbeaux.c
+++ b/kexi/3rdparty/kexisql3/src/vdbeaux.c
@@ -176,7 +176,7 @@ void sqlite3VdbeResolveLabel(Vdbe *p, int x){
*/
static int opcodeNoPush(u8 op){
/* The 10 NOPUSH_MASK_n constants are defined in the automatically
- ** generated header file opcodes.h. Each is a 16-bit bitmask, one
+ ** generated header file opcodes.h. Each is a 16-bit bittqmask, one
** bit corresponding to each opcode implemented by the virtual
** machine in vdbe.c. The bit is true if the word "no-push" appears
** in a comment on the same line as the "case OP_XXX:" in
@@ -186,23 +186,23 @@ static int opcodeNoPush(u8 op){
** to grow the stack when it is executed. Otherwise, it may grow the
** stack by at most one entry.
**
- ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 contains
+ ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 tqcontains
** one bit for opcodes 16 to 31, and so on.
**
- ** 16-bit bitmasks (rather than 32-bit) are specified in opcodes.h
+ ** 16-bit bittqmasks (rather than 32-bit) are specified in opcodes.h
** because the file is generated by an awk program. Awk manipulates
** all numbers as floating-point and we don't want to risk a rounding
** error if someone builds with an awk that uses (for example) 32-bit
** IEEE floats.
*/
- static const u32 masks[5] = {
+ static const u32 tqmasks[5] = {
NOPUSH_MASK_0 + (NOPUSH_MASK_1<<16),
NOPUSH_MASK_2 + (NOPUSH_MASK_3<<16),
NOPUSH_MASK_4 + (NOPUSH_MASK_5<<16),
NOPUSH_MASK_6 + (NOPUSH_MASK_7<<16),
NOPUSH_MASK_8 + (NOPUSH_MASK_9<<16)
};
- return (masks[op>>5] & (1<<(op&0x1F)));
+ return (tqmasks[op>>5] & (1<<(op&0x1F)));
}
#ifndef NDEBUG
@@ -1326,15 +1326,15 @@ int sqlite3VdbeFinalize(Vdbe *p){
/*
** Call the destructor for each auxdata entry in pVdbeFunc for which
-** the corresponding bit in mask is clear. Auxdata entries beyond 31
+** the corresponding bit in tqmask is clear. Auxdata entries beyond 31
** are always destroyed. To destroy all auxdata entries, call this
-** routine with mask==0.
+** routine with tqmask==0.
*/
-void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int mask){
+void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int tqmask){
int i;
for(i=0; i<pVdbeFunc->nAux; i++){
struct AuxData *pAux = &pVdbeFunc->apAux[i];
- if( (i>31 || !(mask&(1<<i))) && pAux->pAux ){
+ if( (i>31 || !(tqmask&(1<<i))) && pAux->pAux ){
if( pAux->xDelete ){
pAux->xDelete(pAux->pAux);
}
diff --git a/kexi/3rdparty/kexisql3/src/vdbemem.c b/kexi/3rdparty/kexisql3/src/vdbemem.c
index 0b7e193be..a7ecce53f 100644
--- a/kexi/3rdparty/kexisql3/src/vdbemem.c
+++ b/kexi/3rdparty/kexisql3/src/vdbemem.c
@@ -151,7 +151,7 @@ int sqlite3VdbeMemNulTerminate(Mem *pMem){
** are converted using sqlite3_snprintf(). Converting a BLOB to a string
** is a no-op.
**
-** Existing representations MEM_Int and MEM_Real are *not* invalidated.
+** Existing representations MEM_Int and MEM_Real are *not* tqinvalidated.
**
** A MEM_Null value will never be passed to this function. This function is
** used for converting values to text for returning to the user (i.e. via
diff --git a/kexi/3rdparty/kexisql3/src/where.c b/kexi/3rdparty/kexisql3/src/where.c
index e63f2763c..ab19f2883 100644
--- a/kexi/3rdparty/kexisql3/src/where.c
+++ b/kexi/3rdparty/kexisql3/src/where.c
@@ -21,9 +21,9 @@
#include "sqliteInt.h"
/*
-** The number of bits in a Bitmask. "BMS" means "BitMask Size".
+** The number of bits in a Bittqmask. "BMS" means "BitMask Size".
*/
-#define BMS (sizeof(Bitmask)*8)
+#define BMS (sizeof(Bittqmask)*8)
/*
** Determine the number of elements in an array.
@@ -61,20 +61,20 @@ typedef struct WhereClause WhereClause;
** where X is a column name and <op> is one of certain operators,
** then WhereTerm.leftCursor and WhereTerm.leftColumn record the
** cursor number and column number for X. WhereTerm.operator records
-** the <op> using a bitmask encoding defined by WO_xxx below. The
-** use of a bitmask encoding for the operator allows us to search
+** the <op> using a bittqmask encoding defined by WO_xxx below. The
+** use of a bittqmask encoding for the operator allows us to search
** quickly for terms that match any of several different operators.
**
** prereqRight and prereqAll record sets of cursor numbers,
** but they do so indirectly. A single ExprMaskSet structure translates
** cursor number into bits and the translated bit is stored in the prereq
** fields. The translation is used in order to maximize the number of
-** bits that will fit in a Bitmask. The VDBE cursor numbers might be
+** bits that will fit in a Bittqmask. The VDBE cursor numbers might be
** spread out over the non-negative integers. For example, the cursor
** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45. The ExprMaskSet
** translates these sparse cursor numbers into consecutive integers
** beginning with 0 in order to make the best possible use of the available
-** bits in the Bitmask. So, in the example above, the cursor numbers
+** bits in the Bittqmask. So, in the example above, the cursor numbers
** would be mapped into integers 0 through 7.
*/
typedef struct WhereTerm WhereTerm;
@@ -85,10 +85,10 @@ struct WhereTerm {
i16 leftColumn; /* Column number of X in "X <op> <expr>" */
u16 operator; /* A WO_xx value describing <op> */
u8 flags; /* Bit flags. See below */
- u8 nChild; /* Number of children that must disable us */
+ u8 nChild; /* Number of tqchildren that must disable us */
WhereClause *pWC; /* The clause this term is part of */
- Bitmask prereqRight; /* Bitmask of tables used by pRight */
- Bitmask prereqAll; /* Bitmask of tables referenced by p */
+ Bittqmask prereqRight; /* Bittqmask of tables used by pRight */
+ Bittqmask prereqAll; /* Bittqmask of tables referenced by p */
};
/*
@@ -114,18 +114,18 @@ struct WhereClause {
/*
** An instance of the following structure keeps track of a mapping
-** between VDBE cursor numbers and bits of the bitmasks in WhereTerm.
+** between VDBE cursor numbers and bits of the bittqmasks in WhereTerm.
**
** The VDBE cursor numbers are small integers contained in
** SrcList_item.iCursor and Expr.iTable fields. For any given WHERE
** clause, the cursor numbers might not begin with 0 and they might
** contain gaps in the numbering sequence. But we want to make maximum
-** use of the bits in our bitmasks. This structure provides a mapping
+** use of the bits in our bittqmasks. This structure provides a mapping
** from the sparse cursor numbers into consecutive integers beginning
** with 0.
**
-** If ExprMaskSet.ix[A]==B it means that The A-th bit of a Bitmask
-** corresponds VDBE cursor number B. The A-th bit of a bitmask is 1<<A.
+** If ExprMaskSet.ix[A]==B it means that The A-th bit of a Bittqmask
+** corresponds VDBE cursor number B. The A-th bit of a bittqmask is 1<<A.
**
** For example, if the WHERE clause expression used these VDBE
** cursors: 4, 5, 8, 29, 57, 73. Then the ExprMaskSet structure
@@ -141,12 +141,12 @@ struct WhereClause {
typedef struct ExprMaskSet ExprMaskSet;
struct ExprMaskSet {
int n; /* Number of assigned cursor values */
- int ix[sizeof(Bitmask)*8]; /* Cursor assigned to each bit */
+ int ix[sizeof(Bittqmask)*8]; /* Cursor assigned to each bit */
};
/*
-** Bitmasks for the operators that indices are able to exploit. An
+** Bittqmasks for the operators that indices are able to exploit. An
** OR-ed combination of these values can be used when searching for
** terms in the where clause.
*/
@@ -170,7 +170,7 @@ struct ExprMaskSet {
#define WHERE_IDX_ONLY 0x0800 /* Use index only - omit table */
#define WHERE_ORDERBY 0x1000 /* Output will appear in correct order */
#define WHERE_REVERSE 0x2000 /* Scan in reverse order */
-#define WHERE_UNIQUE 0x4000 /* Selects no more than one row */
+#define WHERE_UNITQUE 0x4000 /* Selects no more than one row */
/*
** Initialize a preallocated WhereClause structure.
@@ -258,26 +258,26 @@ static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){
}
/*
-** Initialize an expression mask set
+** Initialize an expression tqmask set
*/
#define initMaskSet(P) memset(P, 0, sizeof(*P))
/*
-** Return the bitmask for the given cursor number. Return 0 if
+** Return the bittqmask for the given cursor number. Return 0 if
** iCursor is not in the set.
*/
-static Bitmask getMask(ExprMaskSet *pMaskSet, int iCursor){
+static Bittqmask getMask(ExprMaskSet *pMaskSet, int iCursor){
int i;
for(i=0; i<pMaskSet->n; i++){
if( pMaskSet->ix[i]==iCursor ){
- return ((Bitmask)1)<<i;
+ return ((Bittqmask)1)<<i;
}
}
return 0;
}
/*
-** Create a new mask for cursor iCursor.
+** Create a new tqmask for cursor iCursor.
**
** There is one cursor per table in the FROM clause. The number of
** tables in the FROM clause is limited by a test early in the
@@ -291,7 +291,7 @@ static void createMask(ExprMaskSet *pMaskSet, int iCursor){
/*
** This routine walks (recursively) an expression tree and generates
-** a bitmask indicating which tables are used in that expression
+** a bittqmask indicating which tables are used in that expression
** tree.
**
** In order for this routine to work, the calling function must have
@@ -300,46 +300,46 @@ static void createMask(ExprMaskSet *pMaskSet, int iCursor){
** The sqlite3ExprResolveNames() routines looks for column names and
** sets their opcodes to TK_COLUMN and their Expr.iTable fields to
** the VDBE cursor number of the table. This routine just has to
-** translate the cursor numbers into bitmask values and OR all
-** the bitmasks together.
+** translate the cursor numbers into bittqmask values and OR all
+** the bittqmasks together.
*/
-static Bitmask exprListTableUsage(ExprMaskSet*, ExprList*);
-static Bitmask exprSelectTableUsage(ExprMaskSet*, Select*);
-static Bitmask exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){
- Bitmask mask = 0;
+static Bittqmask exprListTableUsage(ExprMaskSet*, ExprList*);
+static Bittqmask exprSelectTableUsage(ExprMaskSet*, Select*);
+static Bittqmask exprTableUsage(ExprMaskSet *pMaskSet, Expr *p){
+ Bittqmask tqmask = 0;
if( p==0 ) return 0;
if( p->op==TK_COLUMN ){
- mask = getMask(pMaskSet, p->iTable);
- return mask;
+ tqmask = getMask(pMaskSet, p->iTable);
+ return tqmask;
}
- mask = exprTableUsage(pMaskSet, p->pRight);
- mask |= exprTableUsage(pMaskSet, p->pLeft);
- mask |= exprListTableUsage(pMaskSet, p->pList);
- mask |= exprSelectTableUsage(pMaskSet, p->pSelect);
- return mask;
+ tqmask = exprTableUsage(pMaskSet, p->pRight);
+ tqmask |= exprTableUsage(pMaskSet, p->pLeft);
+ tqmask |= exprListTableUsage(pMaskSet, p->pList);
+ tqmask |= exprSelectTableUsage(pMaskSet, p->pSelect);
+ return tqmask;
}
-static Bitmask exprListTableUsage(ExprMaskSet *pMaskSet, ExprList *pList){
+static Bittqmask exprListTableUsage(ExprMaskSet *pMaskSet, ExprList *pList){
int i;
- Bitmask mask = 0;
+ Bittqmask tqmask = 0;
if( pList ){
for(i=0; i<pList->nExpr; i++){
- mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
+ tqmask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
}
}
- return mask;
+ return tqmask;
}
-static Bitmask exprSelectTableUsage(ExprMaskSet *pMaskSet, Select *pS){
- Bitmask mask;
+static Bittqmask exprSelectTableUsage(ExprMaskSet *pMaskSet, Select *pS){
+ Bittqmask tqmask;
if( pS==0 ){
- mask = 0;
+ tqmask = 0;
}else{
- mask = exprListTableUsage(pMaskSet, pS->pEList);
- mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
- mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
- mask |= exprTableUsage(pMaskSet, pS->pWhere);
- mask |= exprTableUsage(pMaskSet, pS->pHaving);
+ tqmask = exprListTableUsage(pMaskSet, pS->pEList);
+ tqmask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
+ tqmask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
+ tqmask |= exprTableUsage(pMaskSet, pS->pWhere);
+ tqmask |= exprTableUsage(pMaskSet, pS->pHaving);
}
- return mask;
+ return tqmask;
}
/*
@@ -379,7 +379,7 @@ static void exprCommute(Expr *pExpr){
}
/*
-** Translate from TK_xx operator to WO_xx bitmask.
+** Translate from TK_xx operator to WO_xx bittqmask.
*/
static int operatorMask(int op){
int c;
@@ -408,7 +408,7 @@ static WhereTerm *findTerm(
WhereClause *pWC, /* The WHERE clause to be searched */
int iCur, /* Cursor number of LHS */
int iColumn, /* Column number of LHS */
- Bitmask notReady, /* RHS must not overlap with this mask */
+ Bittqmask notReady, /* RHS must not overlap with this tqmask */
u16 op, /* Mask of WO_xx values describing operator */
Index *pIdx /* Must be compatible with this index, if not NULL */
){
@@ -458,7 +458,7 @@ static void exprAnalyze(SrcList*, ExprMaskSet*, WhereClause*, int);
*/
static void exprAnalyzeAll(
SrcList *pTabList, /* the FROM clause */
- ExprMaskSet *pMaskSet, /* table masks */
+ ExprMaskSet *pMaskSet, /* table tqmasks */
WhereClause *pWC /* the WHERE clause to be analyzed */
){
int i;
@@ -536,14 +536,14 @@ static int isLikeOrGlob(
*/
static void exprAnalyze(
SrcList *pSrc, /* the FROM clause */
- ExprMaskSet *pMaskSet, /* table masks */
+ ExprMaskSet *pMaskSet, /* table tqmasks */
WhereClause *pWC, /* the WHERE clause */
int idxTerm /* Index of the term to be analyzed */
){
WhereTerm *pTerm = &pWC->a[idxTerm];
Expr *pExpr = pTerm->pExpr;
- Bitmask prereqLeft;
- Bitmask prereqAll;
+ Bittqmask prereqLeft;
+ Bittqmask prereqAll;
int nPattern;
int isComplete;
@@ -747,7 +747,7 @@ or_not_possible:
** clause and the match can still be a success.
**
** All terms of the ORDER BY that match against the index must be either
-** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNIQUE
+** ASC or DESC. (Terms of the ORDER BY clause past the end of a UNITQUE
** index do not need to satisfy this constraint.) The *pbRev value is
** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
** the ORDER BY clause is all ASC.
@@ -885,7 +885,7 @@ static double bestIndex(
Parse *pParse, /* The parsing context */
WhereClause *pWC, /* The WHERE clause */
struct SrcList_item *pSrc, /* The FROM clause term to search */
- Bitmask notReady, /* Mask of cursors that are not available */
+ Bittqmask notReady, /* Mask of cursors that are not available */
ExprList *pOrderBy, /* The order by clause */
Index **ppIndex, /* Make *ppIndex point to the best index */
int *pFlags, /* Put flags describing this choice in *pFlags */
@@ -915,7 +915,7 @@ static double bestIndex(
if( pTerm->operator & WO_EQ ){
/* Rowid== is always the best pick. Look no further. Because only
** a single row is generated, output is always in sorted order */
- *pFlags = WHERE_ROWID_EQ | WHERE_UNIQUE;
+ *pFlags = WHERE_ROWID_EQ | WHERE_UNITQUE;
*pnEq = 1;
TRACE(("... best is rowid\n"));
return 0.0;
@@ -1007,7 +1007,7 @@ static double bestIndex(
nEq = i;
if( pProbe->onError!=OE_None && (flags & WHERE_COLUMN_IN)==0
&& nEq==pProbe->nColumn ){
- flags |= WHERE_UNIQUE;
+ flags |= WHERE_UNITQUE;
}
TRACE(("...... nEq=%d inMult=%.9g cost=%.9g\n", nEq, inMultiplier, cost));
@@ -1052,13 +1052,13 @@ static double bestIndex(
** ever reading the table. If that is the case, then halve the
** cost of this index.
*/
- if( flags && pSrc->colUsed < (((Bitmask)1)<<(BMS-1)) ){
- Bitmask m = pSrc->colUsed;
+ if( flags && pSrc->colUsed < (((Bittqmask)1)<<(BMS-1)) ){
+ Bittqmask m = pSrc->colUsed;
int j;
for(j=0; j<pProbe->nColumn; j++){
int x = pProbe->aiColumn[j];
if( x<BMS-1 ){
- m &= ~(((Bitmask)1)<<x);
+ m &= ~(((Bittqmask)1)<<x);
}
}
if( m==0 ){
@@ -1169,7 +1169,7 @@ static void codeEqualityTerm(
if( pX->op!=TK_IN ){
assert( pX->op==TK_EQ );
sqlite3ExprCode(pParse, pX->pRight);
-#ifndef SQLITE_OMIT_SUBQUERY
+#ifndef SQLITE_OMIT_SUBTQUERY
}else{
int iTab;
int *aIn;
@@ -1223,7 +1223,7 @@ static void codeAllEqualityTerms(
Parse *pParse, /* Parsing context */
WhereLevel *pLevel, /* Which nested loop of the FROM we are coding */
WhereClause *pWC, /* The WHERE clause */
- Bitmask notReady, /* Which parts of FROM have not yet been coded */
+ Bittqmask notReady, /* Which parts of FROM have not yet been coded */
int brk /* Jump here to end the loop */
){
int nEq = pLevel->nEq; /* The number of == or IN constraints to code */
@@ -1276,7 +1276,7 @@ static void codeAllEqualityTerms(
** analysis only.
*/
char sqlite3_query_plan[BMS*2*40]; /* Text of the join */
-static int nQPlan = 0; /* Next free slow in _query_plan[] */
+static int nTQPlan = 0; /* Next free slow in _query_plan[] */
#endif /* SQLITE_TEST */
@@ -1284,7 +1284,7 @@ static int nQPlan = 0; /* Next free slow in _query_plan[] */
/*
** Generate the beginning of the loop used for WHERE clause processing.
-** The return value is a pointer to an opaque structure that contains
+** The return value is a pointer to an opaque structure that tqcontains
** information needed to terminate the loop. Later, the calling routine
** should invoke sqlite3WhereEnd() with the return value of this function
** in order to complete the WHERE clause processing.
@@ -1380,9 +1380,9 @@ WhereInfo *sqlite3WhereBegin(
WhereInfo *pWInfo; /* Will become the return value of this function */
Vdbe *v = pParse->pVdbe; /* The virtual database engine */
int brk, cont = 0; /* Addresses used during code generation */
- Bitmask notReady; /* Cursors that are not yet positioned */
+ Bittqmask notReady; /* Cursors that are not yet positioned */
WhereTerm *pTerm; /* A single term in the WHERE clause */
- ExprMaskSet maskSet; /* The expression mask set */
+ ExprMaskSet tqmaskSet; /* The expression tqmask set */
WhereClause wc; /* The WHERE clause is divided into these terms */
struct SrcList_item *pTabItem; /* A single entry from pTabList */
WhereLevel *pLevel; /* A single level in the pWInfo list */
@@ -1390,7 +1390,7 @@ WhereInfo *sqlite3WhereBegin(
int andFlags; /* AND-ed combination of all wc.a[].flags */
/* The number of tables in the FROM clause is limited by the number of
- ** bits in a Bitmask
+ ** bits in a Bittqmask
*/
if( pTabList->nSrc>BMS ){
sqlite3ErrorMsg(pParse, "at most %d tables in a join", BMS);
@@ -1400,7 +1400,7 @@ WhereInfo *sqlite3WhereBegin(
/* Split the WHERE clause into separate subexpressions where each
** subexpression is separated by an AND operator.
*/
- initMaskSet(&maskSet);
+ initMaskSet(&tqmaskSet);
whereClauseInit(&wc, pParse);
whereSplit(&wc, pWhere, TK_AND);
@@ -1429,9 +1429,9 @@ WhereInfo *sqlite3WhereBegin(
** and work forward so that the added virtual terms are never processed.
*/
for(i=0; i<pTabList->nSrc; i++){
- createMask(&maskSet, pTabList->a[i].iCursor);
+ createMask(&tqmaskSet, pTabList->a[i].iCursor);
}
- exprAnalyzeAll(pTabList, &maskSet, &wc);
+ exprAnalyzeAll(pTabList, &tqmaskSet, &wc);
if( sqlite3_malloc_failed ){
goto whereBeginNoMem;
}
@@ -1450,7 +1450,7 @@ WhereInfo *sqlite3WhereBegin(
** This loop also figures out the nesting order of tables in the FROM
** clause.
*/
- notReady = ~(Bitmask)0;
+ notReady = ~(Bittqmask)0;
pTabItem = pTabList->a;
pLevel = pWInfo->a;
andFlags = ~0;
@@ -1466,10 +1466,10 @@ WhereInfo *sqlite3WhereBegin(
int bestNEq = 0; /* nEq associated with pBest */
double lowestCost = 1.0e99; /* Cost of the pBest */
int bestJ; /* The value of j */
- Bitmask m; /* Bitmask value for j or bestJ */
+ Bittqmask m; /* Bittqmask value for j or bestJ */
for(j=iFrom, pTabItem=&pTabList->a[j]; j<pTabList->nSrc; j++, pTabItem++){
- m = getMask(&maskSet, pTabItem->iCursor);
+ m = getMask(&tqmaskSet, pTabItem->iCursor);
if( (m & notReady)==0 ){
if( j==iFrom ) iFrom++;
continue;
@@ -1506,7 +1506,7 @@ WhereInfo *sqlite3WhereBegin(
}else{
pLevel->iIdxCur = -1;
}
- notReady &= ~getMask(&maskSet, pTabList->a[bestJ].iCursor);
+ notReady &= ~getMask(&tqmaskSet, pTabList->a[bestJ].iCursor);
pLevel->iFrom = bestJ;
}
TRACE(("*** Optimizer Finished ***\n"));
@@ -1514,7 +1514,7 @@ WhereInfo *sqlite3WhereBegin(
/* If the total query only selects a single row, then the ORDER BY
** clause is irrelevant.
*/
- if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
+ if( (andFlags & WHERE_UNITQUE)!=0 && ppOrderBy ){
*ppOrderBy = 0;
}
@@ -1566,7 +1566,7 @@ WhereInfo *sqlite3WhereBegin(
** loop below generates code for a single nested loop of the VM
** program.
*/
- notReady = ~(Bitmask)0;
+ notReady = ~(Bittqmask)0;
for(i=0, pLevel=pWInfo->a; i<pTabList->nSrc; i++, pLevel++){
int j;
int iCur = pTabItem->iCursor; /* The VDBE cursor for the table */
@@ -1854,7 +1854,7 @@ WhereInfo *sqlite3WhereBegin(
pLevel->p1 = iCur;
pLevel->p2 = 1 + sqlite3VdbeAddOp(v, OP_Rewind, iCur, brk);
}
- notReady &= ~getMask(&maskSet, iCur);
+ notReady &= ~getMask(&tqmaskSet, iCur);
/* Insert code to test every subexpression that can be completely
** computed using the current set of tables.
@@ -1904,36 +1904,36 @@ WhereInfo *sqlite3WhereBegin(
z = pTabItem->zAlias;
if( z==0 ) z = pTabItem->pTab->zName;
n = strlen(z);
- if( n+nQPlan < sizeof(sqlite3_query_plan)-10 ){
+ if( n+nTQPlan < sizeof(sqlite3_query_plan)-10 ){
if( pLevel->flags & WHERE_IDX_ONLY ){
- strcpy(&sqlite3_query_plan[nQPlan], "{}");
- nQPlan += 2;
+ strcpy(&sqlite3_query_plan[nTQPlan], "{}");
+ nTQPlan += 2;
}else{
- strcpy(&sqlite3_query_plan[nQPlan], z);
- nQPlan += n;
+ strcpy(&sqlite3_query_plan[nTQPlan], z);
+ nTQPlan += n;
}
- sqlite3_query_plan[nQPlan++] = ' ';
+ sqlite3_query_plan[nTQPlan++] = ' ';
}
if( pLevel->flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
- strcpy(&sqlite3_query_plan[nQPlan], "* ");
- nQPlan += 2;
+ strcpy(&sqlite3_query_plan[nTQPlan], "* ");
+ nTQPlan += 2;
}else if( pLevel->pIdx==0 ){
- strcpy(&sqlite3_query_plan[nQPlan], "{} ");
- nQPlan += 3;
+ strcpy(&sqlite3_query_plan[nTQPlan], "{} ");
+ nTQPlan += 3;
}else{
n = strlen(pLevel->pIdx->zName);
- if( n+nQPlan < sizeof(sqlite3_query_plan)-2 ){
- strcpy(&sqlite3_query_plan[nQPlan], pLevel->pIdx->zName);
- nQPlan += n;
- sqlite3_query_plan[nQPlan++] = ' ';
+ if( n+nTQPlan < sizeof(sqlite3_query_plan)-2 ){
+ strcpy(&sqlite3_query_plan[nTQPlan], pLevel->pIdx->zName);
+ nTQPlan += n;
+ sqlite3_query_plan[nTQPlan++] = ' ';
}
}
}
- while( nQPlan>0 && sqlite3_query_plan[nQPlan-1]==' ' ){
- sqlite3_query_plan[--nQPlan] = 0;
+ while( nTQPlan>0 && sqlite3_query_plan[nTQPlan-1]==' ' ){
+ sqlite3_query_plan[--nTQPlan] = 0;
}
- sqlite3_query_plan[nQPlan] = 0;
- nQPlan = 0;
+ sqlite3_query_plan[nTQPlan] = 0;
+ nTQPlan = 0;
#endif /* SQLITE_TEST // Testing and debugging use only */
/* Record the continuation address in the WhereInfo structure. Then
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp
index db5e3e25e..60057c88e 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp
+++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.cpp
@@ -22,28 +22,28 @@
#include <KoUnit.h>
#include <KoUnitWidgets.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
-KoPageLayoutColumns::KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout)
- : KoPageLayoutColumnsBase(parent) {
+KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout)
+ : KoPageLayoutColumnsBase(tqparent) {
m_columns = columns;
- QHBoxLayout *lay = new QHBoxLayout(previewPane);
- m_preview = new KoPagePreview( previewPane, "Preview", layout );
+ TQHBoxLayout *lay = new TQHBoxLayout(previewPane);
+ m_preview = new KoPagePreview( previewPane, "Preview", tqlayout );
lay->addWidget(m_preview);
- lay = new QHBoxLayout(columnSpacingPane);
+ lay = new TQHBoxLayout(columnSpacingPane);
m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane );
m_spacing->setValue( m_columns.ptColumnSpacing );
m_spacing->setUnit( unit );
double dStep = KoUnit::fromUserValue( 0.2, unit );
- m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep );
+ m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep );
lay->addWidget(m_spacing);
labelSpacing->setBuddy( m_spacing );
nColumns->setValue( m_columns.columns );
m_preview->setPageColumns( m_columns );
- connect( nColumns, SIGNAL( valueChanged( int ) ), this, SLOT( nColChanged( int ) ) );
- connect( m_spacing, SIGNAL( valueChangedPt(double) ), this, SLOT( nSpaceChanged( double ) ) );
+ connect( nColumns, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( nColChanged( int ) ) );
+ connect( m_spacing, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( nSpaceChanged( double ) ) );
}
void KoPageLayoutColumns::setEnableColumns(bool on) {
@@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) {
emit propertyChange(m_columns);
}
-void KoPageLayoutColumns::setLayout(KoPageLayout &layout) {
- m_preview->setPageLayout( layout );
+void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) {
+ m_preview->setPageLayout( tqlayout );
}
#include <KoPageLayoutColumns.moc>
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h
index be0a4a493..016eb767f 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutColumns.h
+++ b/kexi/3rdparty/kolibs/KoPageLayoutColumns.h
@@ -19,14 +19,14 @@
// Description: Page Layout Dialog (sources)
-#ifndef kopagelayoutcolumns_h
-#define kopagelayoutcolumns_h
+#ifndef kopagetqlayoutcolumns_h
+#define kopagetqlayoutcolumns_h
#include <KoUnit.h>
#include <KoPageLayout.h>
#include <KoPageLayoutColumnsBase.h>
-class QWidget;
+class TQWidget;
class KoUnitDoubleSpinBox;
class KoPagePreview;
@@ -35,22 +35,23 @@ class KoPagePreview;
*/
class KoPageLayoutColumns : public KoPageLayoutColumnsBase {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Contructor
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param columns the KoColumns data structure that this dialog should be initialzed with
* @param unit the unit-type (mm/cm/inch) that the dialog should show
- * @param layout the page layout that the preview should be initialzed with.
+ * @param tqlayout the page tqlayout that the preview should be initialzed with.
*/
- KoPageLayoutColumns(QWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout);
+ KoPageLayoutColumns(TQWidget *tqparent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout);
/**
- * Update the page preview widget with the param layout.
- * @param layout the new layout
+ * Update the page preview widget with the param tqlayout.
+ * @param tqlayout the new tqlayout
*/
- void setLayout(KoPageLayout &layout);
+ void setLayout(KoPageLayout &tqlayout);
public slots:
/**
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui
index 1ffe032d7..780bc792a 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui
+++ b/kexi/3rdparty/kolibs/KoPageLayoutColumnsBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoPageLayoutColumnsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoPageLayoutColumnsBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QFrame" row="1" column="1">
+ <widget class="TQFrame" row="1" column="1">
<property name="name">
<cstring>columnSpacingPane</cstring>
</property>
@@ -27,7 +27,7 @@
<enum>Raised</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -38,7 +38,7 @@
<cstring>nColumns</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelSpacing</cstring>
</property>
@@ -56,14 +56,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame" row="0" column="2" rowspan="3" colspan="1">
+ <widget class="TQFrame" row="0" column="2" rowspan="3" colspan="1">
<property name="name">
<cstring>previewPane</cstring>
</property>
@@ -82,7 +82,7 @@
<enum>Raised</enum>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>nColumns</cstring>
</property>
@@ -95,5 +95,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp
index ad5e018c3..b436447b3 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp
+++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.cpp
@@ -20,21 +20,21 @@
#include <KoPageLayoutHeader.moc>
#include <KoUnitWidgets.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
-KoPageLayoutHeader::KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf)
- : KoPageLayoutHeaderBase(parent) {
+KoPageLayoutHeader::KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf)
+ : KoPageLayoutHeaderBase(tqparent) {
m_headerFooters = kwhf;
- QHBoxLayout *lay = new QHBoxLayout(headerSpacingPane);
+ TQHBoxLayout *lay = new TQHBoxLayout(headerSpacingPane);
m_headerSpacing = new KoUnitDoubleSpinBox( headerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptHeaderBodySpacing, unit );
lay->addWidget(m_headerSpacing);
- lay = new QHBoxLayout(footerSpacingPane);
+ lay = new TQHBoxLayout(footerSpacingPane);
m_footerSpacing = new KoUnitDoubleSpinBox( footerSpacingPane, 0.0, 999.0, 0.5, kwhf.ptFooterBodySpacing, unit );
lay->addWidget(m_footerSpacing);
- lay = new QHBoxLayout(footnotePane);
+ lay = new TQHBoxLayout(footnotePane);
m_footnoteSpacing = new KoUnitDoubleSpinBox( footnotePane, 0.0, 999.0, 0.5, kwhf.ptFootNoteBodySpacing, unit );
lay->addWidget(m_footnoteSpacing);
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h
index 65449dc0c..4e3a00a4d 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutHeader.h
+++ b/kexi/3rdparty/kolibs/KoPageLayoutHeader.h
@@ -16,22 +16,23 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef kopagelayoutheader_h
-#define kopagelayoutheader_h
+#ifndef kopagetqlayoutheader_h
+#define kopagetqlayoutheader_h
#include <KoUnit.h>
#include <KoPageLayout.h>
#include <KoPageLayoutHeaderBase.h>
-class QWidget;
+class TQWidget;
class KoUnitDoubleSpinBox;
class KoPagePreview;
class KoPageLayoutHeader : public KoPageLayoutHeaderBase {
Q_OBJECT
+ TQ_OBJECT
public:
- KoPageLayoutHeader(QWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf);
+ KoPageLayoutHeader(TQWidget *tqparent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf);
const KoKWHeaderFooter& headerFooter();
private:
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui
index d46ca98ec..4488c6f44 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui
+++ b/kexi/3rdparty/kolibs/KoPageLayoutHeaderBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KoPageLayoutHeaderBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KoPageLayoutHeaderBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rhFirst</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Different header for the first page</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rhEvenOdd</cstring>
</property>
@@ -43,9 +43,9 @@
<string>Different header for even and odd pages</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@@ -61,14 +61,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -76,7 +76,7 @@
<string>Spacing between header and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>headerSpacingPane</cstring>
</property>
@@ -91,7 +91,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -102,7 +102,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rfFirst</cstring>
</property>
@@ -110,7 +110,7 @@
<string>Different footer for the first page</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>rfEvenOdd</cstring>
</property>
@@ -118,9 +118,9 @@
<string>Different footer for even and odd pages</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -136,14 +136,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -151,7 +151,7 @@
<string>Spacing between footer and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>footerSpacingPane</cstring>
</property>
@@ -166,7 +166,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -187,14 +187,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -202,7 +202,7 @@
<string>Spacing between footnote and body:</string>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>footnotePane</cstring>
</property>
@@ -217,5 +217,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp
index cb22fe9c1..a8eb447f7 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp
+++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.cpp
@@ -26,143 +26,143 @@
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
-
-KoPageLayoutSize::KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders)
- : QWidget(parent) {
- m_layout = layout;
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
+
+KoPageLayoutSize::KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders)
+ : TQWidget(tqparent) {
+ m_layout = tqlayout;
m_unit = unit;
- QGridLayout *grid1 = new QGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
+ TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() );
if ( unitChooser ) {
// ------------- unit _______________
- QWidget* unitFrame = new QWidget( this );
- grid1->addWidget( unitFrame, 0, 0, Qt::AlignLeft );
- QBoxLayout* unitLayout = new QHBoxLayout( unitFrame, KDialog::marginHint(), KDialog::spacingHint() );
+ TQWidget* unitFrame = new TQWidget( this );
+ grid1->addWidget( unitFrame, 0, 0, TQt::AlignLeft );
+ TQBoxLayout* unitLayout = new TQHBoxLayout( unitFrame, KDialog::marginHint(), KDialog::spacingHint() );
// label unit
- QLabel *lpgUnit = new QLabel( i18n( "Unit:" ), unitFrame );
- unitLayout->addWidget( lpgUnit, 0, Qt::AlignRight | Qt::AlignVCenter );
+ TQLabel *lpgUnit = new TQLabel( i18n( "Unit:" ), unitFrame );
+ unitLayout->addWidget( lpgUnit, 0, TQt::AlignRight | TQt::AlignVCenter );
// combo unit
- cpgUnit = new QComboBox( false, unitFrame, "cpgUnit" );
+ cpgUnit = new TQComboBox( false, unitFrame, "cpgUnit" );
lpgUnit->setBuddy( cpgUnit );
cpgUnit->insertStringList( KoUnit::listOfUnitName() );
cpgUnit->setCurrentItem( unit );
- unitLayout->addWidget( cpgUnit, 0, Qt::AlignLeft | Qt::AlignVCenter );
- connect( cpgUnit, SIGNAL( activated( int ) ), this, SLOT( setUnitInt( int ) ) );
+ unitLayout->addWidget( cpgUnit, 0, TQt::AlignLeft | TQt::AlignVCenter );
+ connect( cpgUnit, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( setUnitInt( int ) ) );
}
else {
- QString str=KoUnit::unitDescription(unit);
+ TQString str=KoUnit::unitDescription(unit);
- QLabel *lpgUnit = new QLabel( i18n("All values are given in %1.").arg(str), this );
- grid1->addWidget( lpgUnit, 0, 0, Qt::AlignLeft );
+ TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this );
+ grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft );
}
// -------------- page size -----------------
- QVGroupBox *formatFrame = new QVGroupBox( i18n( "Page Size" ), this );
+ TQVGroupBox *formatFrame = new TQVGroupBox( i18n( "Page Size" ), this );
grid1->addWidget( formatFrame, 1, 0 );
- QHBox *formatPageSize = new QHBox( formatFrame );
+ TQHBox *formatPageSize = new TQHBox( formatFrame );
formatPageSize->setSpacing( KDialog::spacingHint() );
// label page size
- QLabel *lpgFormat = new QLabel( i18n( "&Size:" ), formatPageSize );
+ TQLabel *lpgFormat = new TQLabel( i18n( "&Size:" ), formatPageSize );
// combo size
- cpgFormat = new QComboBox( false, formatPageSize, "cpgFormat" );
+ cpgFormat = new TQComboBox( false, formatPageSize, "cpgFormat" );
cpgFormat->insertStringList( KoPageFormat::allFormats() );
lpgFormat->setBuddy( cpgFormat );
- connect( cpgFormat, SIGNAL( activated( int ) ), this, SLOT( formatChanged( int ) ) );
+ connect( cpgFormat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( formatChanged( int ) ) );
// spacer
- formatPageSize->setStretchFactor( new QWidget( formatPageSize ), 10 );
+ formatPageSize->setStretchFactor( new TQWidget( formatPageSize ), 10 );
- QHBox *formatCustomSize = new QHBox( formatFrame );
+ TQHBox *formatCustomSize = new TQHBox( formatFrame );
formatCustomSize->setSpacing( KDialog::spacingHint() );
// label width
- QLabel *lpgWidth = new QLabel( i18n( "&Width:" ), formatCustomSize );
+ TQLabel *lpgWidth = new TQLabel( i18n( "&Width:" ), formatCustomSize );
// linedit width
epgWidth = new KoUnitDoubleSpinBox( formatCustomSize, "Width" );
lpgWidth->setBuddy( epgWidth );
if ( m_layout.format != PG_CUSTOM )
epgWidth->setEnabled( false );
- connect( epgWidth, SIGNAL( valueChangedPt(double) ), this, SLOT( widthChanged(double) ) );
+ connect( epgWidth, TQT_SIGNAL( valueChangedPt(double) ), this, TQT_SLOT( widthChanged(double) ) );
// label height
- QLabel *lpgHeight = new QLabel( i18n( "&Height:" ), formatCustomSize );
+ TQLabel *lpgHeight = new TQLabel( i18n( "&Height:" ), formatCustomSize );
// linedit height
epgHeight = new KoUnitDoubleSpinBox( formatCustomSize, "Height" );
lpgHeight->setBuddy( epgHeight );
if ( m_layout.format != PG_CUSTOM )
epgHeight->setEnabled( false );
- connect( epgHeight, SIGNAL( valueChangedPt(double ) ), this, SLOT( heightChanged(double) ) );
+ connect( epgHeight, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( heightChanged(double) ) );
// --------------- orientation ---------------
- m_orientGroup = new QHButtonGroup( i18n( "Orientation" ), this );
+ m_orientGroup = new TQHButtonGroup( i18n( "Qt::Orientation" ), this );
m_orientGroup->setInsideSpacing( KDialog::spacingHint() );
grid1->addWidget( m_orientGroup, 2, 0 );
- QLabel* lbPortrait = new QLabel( m_orientGroup );
- lbPortrait->setPixmap( QPixmap( UserIcon( "koPortrait" ) ) );
+ TQLabel* lbPortrait = new TQLabel( m_orientGroup );
+ lbPortrait->setPixmap( TQPixmap( UserIcon( "koPortrait" ) ) );
lbPortrait->setMaximumWidth( lbPortrait->pixmap()->width() );
- new QRadioButton( i18n("&Portrait"), m_orientGroup );
+ new TQRadioButton( i18n("&Portrait"), m_orientGroup );
- QLabel* lbLandscape = new QLabel( m_orientGroup );
- lbLandscape->setPixmap( QPixmap( UserIcon( "koLandscape" ) ) );
+ TQLabel* lbLandscape = new TQLabel( m_orientGroup );
+ lbLandscape->setPixmap( TQPixmap( UserIcon( "koLandscape" ) ) );
lbLandscape->setMaximumWidth( lbLandscape->pixmap()->width() );
- new QRadioButton( i18n("La&ndscape"), m_orientGroup );
+ new TQRadioButton( i18n("La&ndscape"), m_orientGroup );
- connect( m_orientGroup, SIGNAL (clicked (int)), this, SLOT( orientationChanged(int) ));
+ connect( m_orientGroup, TQT_SIGNAL (clicked (int)), this, TQT_SLOT( orientationChanged(int) ));
// --------------- page margins ---------------
- QVGroupBox *marginsFrame = new QVGroupBox( i18n( "Margins" ), this );
+ TQVGroupBox *marginsFrame = new TQVGroupBox( i18n( "Margins" ), this );
marginsFrame->setColumnLayout( 0, Qt::Vertical );
marginsFrame->setMargin( KDialog::marginHint() );
grid1->addWidget( marginsFrame, 3, 0 );
- QGridLayout *marginsLayout = new QGridLayout( marginsFrame->layout(), 3, 3,
+ TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3,
KDialog::spacingHint() );
// left margin
ebrLeft = new KoUnitDoubleSpinBox( marginsFrame, "Left" );
marginsLayout->addWidget( ebrLeft, 1, 0 );
- connect( ebrLeft, SIGNAL( valueChangedPt( double ) ), this, SLOT( leftChanged( double ) ) );
+ connect( ebrLeft, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( leftChanged( double ) ) );
// right margin
ebrRight = new KoUnitDoubleSpinBox( marginsFrame, "Right" );
marginsLayout->addWidget( ebrRight, 1, 2 );
- connect( ebrRight, SIGNAL( valueChangedPt( double ) ), this, SLOT( rightChanged( double ) ) );
+ connect( ebrRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) );
// top margin
ebrTop = new KoUnitDoubleSpinBox( marginsFrame, "Top" );
- marginsLayout->addWidget( ebrTop, 0, 1 , Qt::AlignCenter );
- connect( ebrTop, SIGNAL( valueChangedPt( double ) ), this, SLOT( topChanged( double ) ) );
+ marginsLayout->addWidget( ebrTop, 0, 1 , TQt::AlignCenter );
+ connect( ebrTop, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( topChanged( double ) ) );
// bottom margin
ebrBottom = new KoUnitDoubleSpinBox( marginsFrame, "Bottom" );
- marginsLayout->addWidget( ebrBottom, 2, 1, Qt::AlignCenter );
- connect( ebrBottom, SIGNAL( valueChangedPt( double ) ), this, SLOT( bottomChanged( double ) ) );
+ marginsLayout->addWidget( ebrBottom, 2, 1, TQt::AlignCenter );
+ connect( ebrBottom, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( bottomChanged( double ) ) );
// ------------- preview -----------
pgPreview = new KoPagePreview( this, "Preview", m_layout );
grid1->addMultiCellWidget( pgPreview, 1, 3, 1, 1 );
// ------------- spacers -----------
- QWidget* spacer1 = new QWidget( this );
- QWidget* spacer2 = new QWidget( this );
- spacer1->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding ) );
- spacer2->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding ) );
+ TQWidget* spacer1 = new TQWidget( this );
+ TQWidget* spacer2 = new TQWidget( this );
+ spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding ) );
+ spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding ) );
grid1->addWidget( spacer1, 4, 0 );
grid1->addWidget( spacer2, 4, 1 );
@@ -262,12 +262,12 @@ void KoPageLayoutSize::formatChanged( int format ) {
}
void KoPageLayoutSize::orientationChanged(int which) {
- KoOrientation oldOrientation = m_layout.orientation;
+ KoOrientation oldQt::Orientation = m_layout.orientation;
m_layout.orientation = which == 0 ? PG_PORTRAIT : PG_LANDSCAPE;
// without this check, width & height would be swapped around (below)
// even though the orientation has not changed
- if (m_layout.orientation == oldOrientation) return;
+ if (m_layout.orientation == oldQt::Orientation) return;
m_layout.ptWidth = epgWidth->value();
m_layout.ptHeight = epgHeight->value();
@@ -277,7 +277,7 @@ void KoPageLayoutSize::orientationChanged(int which) {
m_layout.ptBottom = ebrBottom->value();
// swap dimension and adjust margins
- qSwap( m_layout.ptWidth, m_layout.ptHeight );
+ tqSwap( m_layout.ptWidth, m_layout.ptHeight );
double tmp = m_layout.ptTop;
m_layout.ptTop = m_layout.ptRight;
m_layout.ptRight = m_layout.ptBottom;
diff --git a/kexi/3rdparty/kolibs/KoPageLayoutSize.h b/kexi/3rdparty/kolibs/KoPageLayoutSize.h
index e32f96701..3f46def2a 100644
--- a/kexi/3rdparty/kolibs/KoPageLayoutSize.h
+++ b/kexi/3rdparty/kolibs/KoPageLayoutSize.h
@@ -17,37 +17,38 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef kopagelayoutsize_h
-#define kopagelayoutsize_h
+#ifndef kopagetqlayoutsize_h
+#define kopagetqlayoutsize_h
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <KoGlobal.h>
#include <KoUnit.h>
#include <kdialogbase.h>
#include <KoPageLayout.h>
#include <KoPageLayoutDia.h>
-class QComboBox;
+class TQComboBox;
class KoUnitDoubleSpinBox;
class KoPageLayoutColumns;
/**
* This class is a widget that shows the KoPageLayout data structure and allows the user to change it.
*/
-class KoPageLayoutSize : public QWidget {
+class KoPageLayoutSize : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Contructor
- * @param parent the parent widget
- * @param layout the page layout that this widget should be initialzed with.
+ * @param tqparent the tqparent widget
+ * @param tqlayout the page tqlayout that this widget should be initialzed with.
* @param unit the unit-type (mm/cm/inch) that the dialog should show
* @param columns the KoColumns (amout of columns) that the preview should be initialized with
* @param unitChooser if true a combobox with the unit-type is shown for the user to change
* @param enableBorders if true enable the user to change the margins (aka borders) of the page
*/
- KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,
+ KoPageLayoutSize(TQWidget *tqparent, const KoPageLayout& tqlayout, KoUnit::Unit unit,
const KoColumns& columns, bool unitChooser, bool enableBorders);
/**
@@ -75,15 +76,15 @@ public slots:
signals:
/**
* Emitted whenever the user changed something in the dialog.
- * @param layout the update layout structure with currently displayed info.
+ * @param tqlayout the update tqlayout structure with currently displayed info.
* Note that the info may not be fully correct and physically possible (in which
* case queryClose will return false)
*/
- void propertyChange(KoPageLayout &layout);
+ void propertyChange(KoPageLayout &tqlayout);
protected:
- QComboBox *cpgUnit;
- QComboBox *cpgFormat;
+ TQComboBox *cpgUnit;
+ TQComboBox *cpgFormat;
KoUnitDoubleSpinBox *epgWidth;
KoUnitDoubleSpinBox *epgHeight;
KoUnitDoubleSpinBox *ebrLeft;
@@ -91,7 +92,7 @@ protected:
KoUnitDoubleSpinBox *ebrTop;
KoUnitDoubleSpinBox *ebrBottom;
KoPagePreview *pgPreview;
- QButtonGroup *m_orientGroup;
+ TQButtonGroup *m_orientGroup;
protected slots:
void formatChanged( int );
diff --git a/kexi/3rdparty/kolibs/koGlobal.cc b/kexi/3rdparty/kolibs/koGlobal.cc
index 09c74eabe..58c90445d 100644
--- a/kexi/3rdparty/kolibs/koGlobal.cc
+++ b/kexi/3rdparty/kolibs/koGlobal.cc
@@ -21,8 +21,8 @@
#include "config.h"
#include <KoGlobal.h>
#include <kdebug.h>
-#include <qfont.h>
-#include <qfontinfo.h>
+#include <tqfont.h>
+#include <tqfontinfo.h>
#include <kglobalsettings.h>
#include <kglobal.h>
#include <klocale.h>
@@ -58,12 +58,12 @@ KoGlobal::KoGlobal()
// Tell the iconloader about share/apps/koffice/icons
KGlobal::iconLoader()->addAppDir("koffice");
- // Another way to get the DPI of the display would be QPaintDeviceMetrics,
+ // Another way to get the DPI of the display would be TQPaintDeviceMetrics,
// but we have no widget here (and moving this to KoView wouldn't allow
// using this from the document easily).
-#ifdef Q_WS_X11
- m_dpiX = QPaintDevice::x11AppDpiX();
- m_dpiY = QPaintDevice::x11AppDpiY();
+#ifdef TQ_WS_X11
+ m_dpiX = TQPaintDevice::x11AppDpiX();
+ m_dpiY = TQPaintDevice::x11AppDpiY();
#else
m_dpiX = 75;
m_dpiY = 75;
@@ -75,31 +75,31 @@ KoGlobal::~KoGlobal()
delete m_kofficeConfig;
}
-QFont KoGlobal::_defaultFont()
+TQFont KoGlobal::_defaultFont()
{
- QFont font = KGlobalSettings::generalFont();
- // we have to use QFontInfo, in case the font was specified with a pixel size
+ TQFont font = KGlobalSettings::generalFont();
+ // we have to use TQFontInfo, in case the font was specified with a pixel size
if ( font.pointSize() == -1 )
{
- // cache size into m_pointSize, since QFontInfo loads the font -> slow
+ // cache size into m_pointSize, since TQFontInfo loads the font -> slow
if ( m_pointSize == -1 )
- m_pointSize = QFontInfo(font).pointSize();
+ m_pointSize = TQFontInfo(font).pointSize();
Q_ASSERT( m_pointSize != -1 );
font.setPointSize( m_pointSize );
}
- //kdDebug()<<k_funcinfo<<"QFontInfo(font).pointSize() :"<<QFontInfo(font).pointSize()<<endl;
+ //kdDebug()<<k_funcinfo<<"TQFontInfo(font).pointSize() :"<<TQFontInfo(font).pointSize()<<endl;
//kdDebug()<<k_funcinfo<<"font.name() :"<<font.family ()<<endl;
return font;
}
-QStringList KoGlobal::_listOfLanguageTags()
+TQStringList KoGlobal::_listOfLanguageTags()
{
if ( m_langMap.isEmpty() )
createListOfLanguages();
return m_langMap.values();
}
-QStringList KoGlobal::_listOfLanguages()
+TQStringList KoGlobal::_listOfLanguages()
{
if ( m_langMap.empty() )
createListOfLanguages();
@@ -111,17 +111,17 @@ void KoGlobal::createListOfLanguages()
KConfig config( "all_languages", true, false, "locale" );
// Note that we could also use KLocale::allLanguagesTwoAlpha
- QMap<QString, bool> seenLanguages;
- const QStringList langlist = config.groupList();
- for ( QStringList::ConstIterator itall = langlist.begin();
+ TQMap<TQString, bool> seenLanguages;
+ const TQStringList langlist = config.groupList();
+ for ( TQStringList::ConstIterator itall = langlist.begin();
itall != langlist.end(); ++itall )
{
- const QString tag = *itall;
+ const TQString tag = *itall;
config.setGroup( tag );
- const QString name = config.readEntry("Name", tag);
+ const TQString name = config.readEntry("Name", tag);
// e.g. name is "French" and tag is "fr"
- // The QMap does the sorting on the display-name, so that
+ // The TQMap does the sorting on the display-name, so that
// comboboxes are sorted.
m_langMap.insert( name, tag );
@@ -132,23 +132,23 @@ void KoGlobal::createListOfLanguages()
// Many of them are already in all_languages but all_languages doesn't
// currently have en_GB or en_US etc.
- const QStringList translationList = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
- for ( QStringList::ConstIterator it = translationList.begin();
+ const TQStringList translationList = KGlobal::dirs()->findAllResources("locale",
+ TQString::tqfromLatin1("*/entry.desktop"));
+ for ( TQStringList::ConstIterator it = translationList.begin();
it != translationList.end(); ++it )
{
// Extract the language tag from the directory name
- QString tag = *it;
- int index = tag.findRev('/');
+ TQString tag = *it;
+ int index = tag.tqfindRev('/');
tag = tag.left(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index+1);
- if ( seenLanguages.find( tag ) == seenLanguages.end() ) {
+ if ( seenLanguages.tqfind( tag ) == seenLanguages.end() ) {
KSimpleConfig entry(*it);
entry.setGroup("KCM Locale");
- const QString name = entry.readEntry("Name", tag);
+ const TQString name = entry.readEntry("Name", tag);
// e.g. name is "US English" and tag is "en_US"
m_langMap.insert( name, tag );
@@ -163,20 +163,20 @@ void KoGlobal::createListOfLanguages()
// How to add them?
}
-QString KoGlobal::tagOfLanguage( const QString & _lang)
+TQString KoGlobal::tagOfLanguage( const TQString & _lang)
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.find( _lang );
+ TQMap<TQString,TQString>::ConstIterator it = map.tqfind( _lang );
if ( it != map.end() )
return *it;
- return QString::null;
+ return TQString();
}
-QString KoGlobal::languageFromTag( const QString &langTag )
+TQString KoGlobal::languageFromTag( const TQString &langTag )
{
const LanguageMap& map = self()->m_langMap;
- QMap<QString,QString>::ConstIterator it = map.begin();
- const QMap<QString,QString>::ConstIterator end = map.end();
+ TQMap<TQString,TQString>::ConstIterator it = map.begin();
+ const TQMap<TQString,TQString>::ConstIterator end = map.end();
for ( ; it != end; ++it )
if ( it.data() == langTag )
return it.key();
diff --git a/kexi/3rdparty/kolibs/koGlobal.h b/kexi/3rdparty/kolibs/koGlobal.h
index bab9c2615..367a150b7 100644
--- a/kexi/3rdparty/kolibs/koGlobal.h
+++ b/kexi/3rdparty/kolibs/koGlobal.h
@@ -22,9 +22,9 @@
#ifndef koGlobal_h
#define koGlobal_h
-#include <qstringlist.h>
-#include <qfont.h>
-#include <qmap.h>
+#include <tqstringlist.h>
+#include <tqfont.h>
+#include <tqmap.h>
class KConfig;
#include <koffice_export.h>
@@ -39,9 +39,9 @@ public:
* Return the default font for KOffice programs.
* This is (currently) the same as the KDE-global default font,
* except that it is guaranteed to have a point size set,
- * never a pixel size (see @ref QFont).
+ * never a pixel size (see @ref TQFont).
*/
- static QFont defaultFont() {
+ static TQFont defaultFont() {
return self()->_defaultFont();
}
@@ -66,32 +66,32 @@ public:
/// Return the list of available languages, in their displayable form
/// (translated names)
- static QStringList listOfLanguages() {
+ static TQStringList listOfLanguages() {
return self()->_listOfLanguages();
}
/// Return the list of available languages, in their internal form
/// e.g. "fr" or "en_US", here called "tag"
- static QStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags
+ static TQStringList listTagOfLanguages() { // TODO rename to listOfLanguageTags
return self()->_listOfLanguageTags();
}
/// For a given language display name, return its tag
- static QString tagOfLanguage( const QString & _lang );
+ static TQString tagOfLanguage( const TQString & _lang );
/// For a given language tag, return its display name
- static QString languageFromTag( const QString &_lang );
+ static TQString languageFromTag( const TQString &_lang );
~KoGlobal();
private:
static KoGlobal* self();
KoGlobal();
- QFont _defaultFont();
- QStringList _listOfLanguages();
- QStringList _listOfLanguageTags();
+ TQFont _defaultFont();
+ TQStringList _listOfLanguages();
+ TQStringList _listOfLanguageTags();
KConfig* _kofficeConfig();
void createListOfLanguages();
int m_pointSize;
- typedef QMap<QString, QString> LanguageMap;
+ typedef TQMap<TQString, TQString> LanguageMap;
LanguageMap m_langMap; // display-name -> language tag
KConfig* m_kofficeConfig;
int m_dpiX;
diff --git a/kexi/3rdparty/kolibs/koPageLayout.cpp b/kexi/3rdparty/kolibs/koPageLayout.cpp
index 4ec985f3b..7888ba7de 100644
--- a/kexi/3rdparty/kolibs/koPageLayout.cpp
+++ b/kexi/3rdparty/kolibs/koPageLayout.cpp
@@ -28,7 +28,7 @@
# include <kodom.h>
# include <koxmlns.h>
#endif
-#include <qdom.h>
+#include <tqdom.h>
// paper formats ( mm )
#define PG_A3_WIDTH 297.0
@@ -60,21 +60,21 @@ KoGenStyle KoPageLayout::saveOasis() const
return style;
}
-void KoPageLayout::loadOasis(const QDomElement &style)
+void KoPageLayout::loadOasis(const TQDomElement &style)
{
- QDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) );
+ TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) );
if ( !properties.isNull() )
{
- ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", QString::null ) );
- ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", QString::null ) );
- if (properties.attributeNS( KoXmlNS::style, "print-orientation", QString::null)=="portrait")
+ ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) );
+ ptHeight = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-height", TQString() ) );
+ if (properties.attributeNS( KoXmlNS::style, "print-orientation", TQString())=="portrait")
orientation=PG_PORTRAIT;
else
orientation=PG_LANDSCAPE;
- ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", QString::null ) );
- ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", QString::null ) );
- ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", QString::null ) );
- ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", QString::null ) );
+ ptRight = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-right", TQString() ) );
+ ptBottom = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-bottom", TQString() ) );
+ ptLeft = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-left", TQString() ) );
+ ptTop = KoUnit::parseValue( properties.attributeNS( KoXmlNS::fo, "margin-top", TQString() ) );
// guessFormat takes millimeters
if ( orientation == PG_LANDSCAPE )
format = KoPageFormat::guessFormat( POINT_TO_MM(ptHeight), POINT_TO_MM(ptWidth) );
@@ -86,16 +86,16 @@ void KoPageLayout::loadOasis(const QDomElement &style)
KoPageLayout KoPageLayout::standardLayout()
{
- KoPageLayout layout;
- layout.format = KoPageFormat::defaultFormat();
- layout.orientation = PG_PORTRAIT;
- layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) );
- layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) );
- layout.ptLeft = MM_TO_POINT( 20.0 );
- layout.ptRight = MM_TO_POINT( 20.0 );
- layout.ptTop = MM_TO_POINT( 20.0 );
- layout.ptBottom = MM_TO_POINT( 20.0 );
- return layout;
+ KoPageLayout tqlayout;
+ tqlayout.format = KoPageFormat::defaultFormat();
+ tqlayout.orientation = PG_PORTRAIT;
+ tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) );
+ tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) );
+ tqlayout.ptLeft = MM_TO_POINT( 20.0 );
+ tqlayout.ptRight = MM_TO_POINT( 20.0 );
+ tqlayout.ptTop = MM_TO_POINT( 20.0 );
+ tqlayout.ptBottom = MM_TO_POINT( 20.0 );
+ return tqlayout;
}
struct PageFormatInfo
@@ -151,12 +151,12 @@ int KoPageFormat::printerPageSize( KoFormat format )
{
if ( format == PG_SCREEN )
{
- kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl;
+ kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl;
return KPrinter::A4;
}
else if ( format == PG_CUSTOM )
{
- kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl;
+ kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl;
return KPrinter::A4;
}
else if ( format <= PG_LAST_FORMAT )
@@ -197,18 +197,18 @@ KoFormat KoPageFormat::guessFormat( double width, double height )
return PG_CUSTOM;
}
-QString KoPageFormat::formatString( KoFormat format )
+TQString KoPageFormat::formatString( KoFormat format )
{
if ( format <= PG_LAST_FORMAT )
- return QString::fromLatin1( pageFormatInfo[ format ].shortName );
- return QString::fromLatin1( "A4" );
+ return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName );
+ return TQString::tqfromLatin1( "A4" );
}
-KoFormat KoPageFormat::formatFromString( const QString & string )
+KoFormat KoPageFormat::formatFromString( const TQString & string )
{
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{
- if (string == QString::fromLatin1( pageFormatInfo[ i ].shortName ))
+ if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName ))
return pageFormatInfo[ i ].format;
}
// We do not know the format name, so we have a custom format
@@ -226,16 +226,16 @@ KoFormat KoPageFormat::defaultFormat()
return PG_DIN_A4;
}
-QString KoPageFormat::name( KoFormat format )
+TQString KoPageFormat::name( KoFormat format )
{
if ( format <= PG_LAST_FORMAT )
return i18n( pageFormatInfo[ format ].descriptiveName );
return i18n( pageFormatInfo[ PG_DIN_A4 ].descriptiveName );
}
-QStringList KoPageFormat::allFormats()
+TQStringList KoPageFormat::allFormats()
{
- QStringList lst;
+ TQStringList lst;
for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i )
{
lst << i18n( pageFormatInfo[ i ].descriptiveName );
diff --git a/kexi/3rdparty/kolibs/koPageLayout.h b/kexi/3rdparty/kolibs/koPageLayout.h
index b526620e0..724f9275a 100644
--- a/kexi/3rdparty/kolibs/koPageLayout.h
+++ b/kexi/3rdparty/kolibs/koPageLayout.h
@@ -25,15 +25,15 @@
#ifndef SIMPLE_KOLIBS
# include <koGenStyles.h>
#endif
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
/**
* @brief Represents the paper format a document shall be printed on.
*
* For compatibility reasons, and because of screen and custom,
- * this enum doesn't map to QPrinter::PageSize but KoPageFormat::printerPageSize
+ * this enum doesn't map to TQPrinter::PageSize but KoPageFormat::printerPageSize
* does the conversion.
*
* @todo convert DIN to ISO in the names
@@ -110,13 +110,13 @@ namespace KoPageFormat
* Returns the internal name of the given page format.
* Use for saving.
*/
- KOFFICECORE_EXPORT QString formatString( KoFormat format );
+ KOFFICECORE_EXPORT TQString formatString( KoFormat format );
/**
* Convert a format string (internal name) to a page format value.
* Use for loading.
*/
- KOFFICECORE_EXPORT KoFormat formatFromString( const QString & string );
+ KOFFICECORE_EXPORT KoFormat formatFromString( const TQString & string );
/**
* Returns the default format (based on the KControl settings)
@@ -127,12 +127,12 @@ namespace KoPageFormat
* Returns the translated name of the given page format.
* Use for showing the user.
*/
- KOFFICECORE_EXPORT QString name( KoFormat format );
+ KOFFICECORE_EXPORT TQString name( KoFormat format );
/**
* Lists the translated names of all the available formats
*/
- KOFFICECORE_EXPORT QStringList allFormats();
+ KOFFICECORE_EXPORT TQStringList allFormats();
/**
* Try to find the paper format for the given width and height (in mm).
@@ -156,7 +156,7 @@ enum KoHFType {
};
/**
- * This structure defines the page layout, including
+ * This structure defines the page tqlayout, including
* its size in pt, its format (e.g. A4), orientation, unit, margins etc.
*/
struct KoPageLayout
@@ -193,18 +193,18 @@ struct KoPageLayout
#ifndef SIMPLE_KOLIBS
/**
- * Save this page layout to OASIS.
+ * Save this page tqlayout to OASIS.
*/
KOFFICECORE_EXPORT KoGenStyle saveOasis() const;
/**
- * Load this page layout from OASIS
+ * Load this page tqlayout from OASIS
*/
- KOFFICECORE_EXPORT void loadOasis(const QDomElement &style);
+ KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style);
#endif
/**
- * @return a page layout with the default page size depending on the locale settings,
+ * @return a page tqlayout with the default page size depending on the locale settings,
* default margins (2 cm), and portrait orientation.
* @since 1.4
*/
@@ -214,12 +214,12 @@ struct KoPageLayout
/** structure for header-footer */
struct KoHeadFoot
{
- QString headLeft;
- QString headMid;
- QString headRight;
- QString footLeft;
- QString footMid;
- QString footRight;
+ TQString headLeft;
+ TQString headMid;
+ TQString headRight;
+ TQString footLeft;
+ TQString footMid;
+ TQString footRight;
};
/** structure for columns */
@@ -229,11 +229,11 @@ struct KoColumns
double ptColumnSpacing;
bool operator==( const KoColumns& rhs ) const {
return columns == rhs.columns &&
- QABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10;
+ TQABS(ptColumnSpacing - rhs.ptColumnSpacing) <= 1E-10;
}
bool operator!=( const KoColumns& rhs ) const {
return columns != rhs.columns ||
- QABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10;
+ TQABS(ptColumnSpacing - rhs.ptColumnSpacing) > 1E-10;
}
};
@@ -247,9 +247,9 @@ struct KoKWHeaderFooter
double ptFootNoteBodySpacing;
bool operator==( const KoKWHeaderFooter& rhs ) const {
return header == rhs.header && footer == rhs.footer &&
- QABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 &&
- QABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 &&
- QABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10;
+ TQABS(ptHeaderBodySpacing - rhs.ptHeaderBodySpacing) <= 1E-10 &&
+ TQABS(ptFooterBodySpacing - rhs.ptFooterBodySpacing) <= 1E-10 &&
+ TQABS(ptFootNoteBodySpacing - rhs.ptFootNoteBodySpacing) <= 1E-10;
}
bool operator!=( const KoKWHeaderFooter& rhs ) const {
return !( *this == rhs );
diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.cc b/kexi/3rdparty/kolibs/koPageLayoutDia.cc
index 5fe8832ea..991a2ced7 100644
--- a/kexi/3rdparty/kolibs/koPageLayoutDia.cc
+++ b/kexi/3rdparty/kolibs/koPageLayoutDia.cc
@@ -33,26 +33,26 @@
#include <kiconloader.h>
#include <kmessagebox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhbuttongroup.h>
/******************************************************************/
/* class KoPagePreview */
/******************************************************************/
/*===================== constrcutor ==============================*/
-KoPagePreview::KoPagePreview( QWidget* parent, const char *name, const KoPageLayout& layout )
- : QGroupBox( i18n( "Page Preview" ), parent, name )
+KoPagePreview::KoPagePreview( TQWidget* tqparent, const char *name, const KoPageLayout& tqlayout )
+ : TQGroupBox( i18n( "Page Preview" ), tqparent, name )
{
- setPageLayout( layout );
+ setPageLayout( tqlayout );
columns = 1;
setMinimumSize( 150, 150 );
}
@@ -62,47 +62,47 @@ KoPagePreview::~KoPagePreview()
{
}
-/*=================== set layout =================================*/
-void KoPagePreview::setPageLayout( const KoPageLayout &layout )
+/*=================== set tqlayout =================================*/
+void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout )
{
// resolution[XY] is in pixel per pt
double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) );
double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) );
- m_pageWidth = layout.ptWidth * resolutionX;
- m_pageHeight = layout.ptHeight * resolutionY;
+ m_pageWidth = tqlayout.ptWidth * resolutionX;
+ m_pageHeight = tqlayout.ptHeight * resolutionY;
double zh = 110.0 / m_pageHeight;
double zw = 110.0 / m_pageWidth;
- double z = QMIN( zw, zh );
+ double z = TQMIN( zw, zh );
m_pageWidth *= z;
m_pageHeight *= z;
- m_textFrameX = layout.ptLeft * resolutionX * z;
- m_textFrameY = layout.ptTop * resolutionY * z;
- m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z;
- m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z;
+ m_textFrameX = tqlayout.ptLeft * resolutionX * z;
+ m_textFrameY = tqlayout.ptTop * resolutionY * z;
+ m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z;
+ m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z;
- repaint( true );
+ tqrepaint( true );
}
-/*=================== set layout =================================*/
+/*=================== set tqlayout =================================*/
void KoPagePreview::setPageColumns( const KoColumns &_columns )
{
columns = _columns.columns;
- repaint( true );
+ tqrepaint( true );
}
/*======================== draw contents =========================*/
-void KoPagePreview::drawContents( QPainter *painter )
+void KoPagePreview::drawContents( TQPainter *painter )
{
double cw = m_textFrameWidth;
if(columns!=1)
cw/=static_cast<double>(columns);
painter->setBrush( white );
- painter->setPen( QPen( black ) );
+ painter->setPen( TQPen( black ) );
int x=static_cast<int>( ( width() - m_pageWidth ) * 0.5 );
int y=static_cast<int>( ( height() - m_pageHeight ) * 0.5 );
@@ -111,7 +111,7 @@ void KoPagePreview::drawContents( QPainter *painter )
//painter->drawRect( x + 1, y + 1, w, h);
painter->drawRect( x, y, w, h );
- painter->setBrush( QBrush( black, HorPattern ) );
+ painter->setBrush( TQBrush( black, HorPattern ) );
if ( m_textFrameWidth == m_pageWidth || m_textFrameHeight == m_pageHeight )
painter->setPen( NoPen );
else
@@ -128,16 +128,16 @@ void KoPagePreview::drawContents( QPainter *painter )
/******************************************************************/
/*==================== constructor ===============================*/
-KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& hf, int tabs,
KoUnit::Unit unit, bool modal )
: KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name, modal)
+ KDialogBase::Ok, tqparent, name, modal)
{
flags = tabs;
- m_layout = layout;
+ m_layout = tqlayout;
m_unit = unit;
m_pageSizeTab = 0;
m_columnsTab = 0;
@@ -148,23 +148,23 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
if ( tabs & FORMAT_AND_BORDERS ) setupTab1( true );
if ( tabs & HEADER_AND_FOOTER ) setupTab2( hf );
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setFocus();
}
/*==================== constructor ===============================*/
-KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+KoPageLayoutDia::KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& hf,
const KoColumns& columns,
const KoKWHeaderFooter& kwhf,
int tabs, KoUnit::Unit unit )
: KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel,
- KDialogBase::Ok, parent, name, true)
+ KDialogBase::Ok, tqparent, name, true)
{
flags = tabs;
- m_layout = layout;
+ m_layout = tqlayout;
m_column = columns;
m_unit = unit;
m_pageSizeTab = 0;
@@ -176,7 +176,7 @@ KoPageLayoutDia::KoPageLayoutDia( QWidget* parent, const char* name,
if ( tabs & COLUMNS ) setupTab3();
if ( tabs & KW_HEADER_AND_FOOTER ) setupTab4(kwhf);
- setFocusPolicy( QWidget::StrongFocus );
+ setFocusPolicy( TQ_StrongFocus );
setFocus();
}
@@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia()
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, QWidget* parent )
+bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, tabs, unit );
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
+ if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
unit = dlg->unit();
}
@@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs
}
/*======================= show dialog ============================*/
-bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns,
- KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, QWidget* parent )
+bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns,
+ KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* tqparent )
{
bool res = false;
- KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit );
+ KoPageLayoutDia *dlg = new KoPageLayoutDia( tqparent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit );
- if ( dlg->exec() == QDialog::Accepted ) {
+ if ( dlg->exec() == TQDialog::Accepted ) {
res = true;
- if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout();
+ if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout();
if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot();
if ( tabs & COLUMNS ) columns = dlg->columns();
if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter();
@@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumn
return res;
}
-/*===================== get a standard page layout ===============*/
+/*===================== get a standard page tqlayout ===============*/
KoPageLayout KoPageLayoutDia::standardLayout()
{
return KoPageLayout::standardLayout();
@@ -252,121 +252,121 @@ const KoKWHeaderFooter& KoPageLayoutDia::headerFooter()
/*================ setup page size & margins tab ==================*/
void KoPageLayoutDia::setupTab1( bool enableBorders )
{
- QWidget *tab1 = addPage(i18n( "Page Size && &Margins" ));
- QHBoxLayout *lay = new QHBoxLayout(tab1);
+ TQWidget *tab1 = addPage(i18n( "Page Size && &Margins" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab1);
m_pageSizeTab = new KoPageLayoutSize(tab1, m_layout, m_unit, m_column, !(flags & DISABLE_UNIT), enableBorders );
lay->addWidget(m_pageSizeTab);
m_pageSizeTab->show();
- connect (m_pageSizeTab, SIGNAL( propertyChange(KoPageLayout&)),
- this, SLOT (sizeUpdated( KoPageLayout&)));
+ connect (m_pageSizeTab, TQT_SIGNAL( propertyChange(KoPageLayout&)),
+ this, TQT_SLOT (sizeUpdated( KoPageLayout&)));
}
-void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) {
- m_layout.ptWidth = layout.ptWidth;
- m_layout.ptHeight = layout.ptHeight;
- m_layout.ptLeft = layout.ptLeft;
- m_layout.ptRight = layout.ptRight;
- m_layout.ptTop = layout.ptTop;
- m_layout.ptBottom = layout.ptBottom;
- m_layout.format = layout.format;
- m_layout.orientation = layout.orientation;
+void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) {
+ m_layout.ptWidth = tqlayout.ptWidth;
+ m_layout.ptHeight = tqlayout.ptHeight;
+ m_layout.ptLeft = tqlayout.ptLeft;
+ m_layout.ptRight = tqlayout.ptRight;
+ m_layout.ptTop = tqlayout.ptTop;
+ m_layout.ptBottom = tqlayout.ptBottom;
+ m_layout.format = tqlayout.format;
+ m_layout.orientation = tqlayout.orientation;
if(m_columnsTab)
- m_columnsTab->setLayout(layout);
+ m_columnsTab->setLayout(tqlayout);
}
/*================ setup header and footer tab ===================*/
void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf )
{
- QWidget *tab2 = addPage(i18n( "H&eader && Footer" ));
- QGridLayout *grid2 = new QGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() );
+ TQWidget *tab2 = addPage(i18n( "H&eader && Footer" ));
+ TQGridLayout *grid2 = new TQGridLayout( tab2, 7, 2, 0, KDialog::spacingHint() );
// ------------- header ---------------
- QGroupBox *gHead = new QGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
- gHead->layout()->setSpacing(KDialog::spacingHint());
- gHead->layout()->setMargin(KDialog::marginHint());
- QGridLayout *headGrid = new QGridLayout( gHead->layout(), 2, 3 );
+ TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 );
+ gHead->tqlayout()->setSpacing(KDialog::spacingHint());
+ gHead->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 );
- QLabel *lHeadLeft = new QLabel( i18n( "Left:" ), gHead );
+ TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead );
headGrid->addWidget( lHeadLeft, 0, 0 );
- eHeadLeft = new QLineEdit( gHead );
+ eHeadLeft = new TQLineEdit( gHead );
headGrid->addWidget( eHeadLeft, 1, 0 );
eHeadLeft->setText( hf.headLeft );
- QLabel *lHeadMid = new QLabel( i18n( "Mid:" ), gHead );
+ TQLabel *lHeadMid = new TQLabel( i18n( "Mid:" ), gHead );
headGrid->addWidget( lHeadMid, 0, 1 );
- eHeadMid = new QLineEdit( gHead );
+ eHeadMid = new TQLineEdit( gHead );
headGrid->addWidget( eHeadMid, 1, 1 );
eHeadMid->setText( hf.headMid );
- QLabel *lHeadRight = new QLabel( i18n( "Right:" ), gHead );
+ TQLabel *lHeadRight = new TQLabel( i18n( "Right:" ), gHead );
headGrid->addWidget( lHeadRight, 0, 2 );
- eHeadRight = new QLineEdit( gHead );
+ eHeadRight = new TQLineEdit( gHead );
headGrid->addWidget( eHeadRight, 1, 2 );
eHeadRight->setText( hf.headRight );
grid2->addMultiCellWidget( gHead, 0, 1, 0, 1 );
// ------------- footer ---------------
- QGroupBox *gFoot = new QGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
- gFoot->layout()->setSpacing(KDialog::spacingHint());
- gFoot->layout()->setMargin(KDialog::marginHint());
- QGridLayout *footGrid = new QGridLayout( gFoot->layout(), 2, 3 );
+ TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 );
+ gFoot->tqlayout()->setSpacing(KDialog::spacingHint());
+ gFoot->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 );
- QLabel *lFootLeft = new QLabel( i18n( "Left:" ), gFoot );
+ TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot );
footGrid->addWidget( lFootLeft, 0, 0 );
- eFootLeft = new QLineEdit( gFoot );
+ eFootLeft = new TQLineEdit( gFoot );
footGrid->addWidget( eFootLeft, 1, 0 );
eFootLeft->setText( hf.footLeft );
- QLabel *lFootMid = new QLabel( i18n( "Mid:" ), gFoot );
+ TQLabel *lFootMid = new TQLabel( i18n( "Mid:" ), gFoot );
footGrid->addWidget( lFootMid, 0, 1 );
- eFootMid = new QLineEdit( gFoot );
+ eFootMid = new TQLineEdit( gFoot );
footGrid->addWidget( eFootMid, 1, 1 );
eFootMid->setText( hf.footMid );
- QLabel *lFootRight = new QLabel( i18n( "Right:" ), gFoot );
+ TQLabel *lFootRight = new TQLabel( i18n( "Right:" ), gFoot );
footGrid->addWidget( lFootRight, 0, 2 );
- eFootRight = new QLineEdit( gFoot );
+ eFootRight = new TQLineEdit( gFoot );
footGrid->addWidget( eFootRight, 1, 2 );
eFootRight->setText( hf.footRight );
grid2->addMultiCellWidget( gFoot, 2, 3, 0, 1 );
- QLabel *lMacros2 = new QLabel( i18n( "You can insert several tags in the text:" ), tab2 );
+ TQLabel *lMacros2 = new TQLabel( i18n( "You can insert several tags in the text:" ), tab2 );
grid2->addMultiCellWidget( lMacros2, 4, 4, 0, 1 );
- QLabel *lMacros3 = new QLabel( i18n("<qt><ul><li>&lt;sheet&gt; The sheet name</li>"
+ TQLabel *lMacros3 = new TQLabel( i18n("<qt><ul><li>&lt;sheet&gt; The sheet name</li>"
"<li>&lt;page&gt; The current page</li>"
"<li>&lt;pages&gt; The total number of pages</li>"
"<li>&lt;name&gt; The filename or URL</li>"
"<li>&lt;file&gt; The filename with complete path or the URL</li></ul></qt>"), tab2 );
- grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, Qt::AlignTop );
+ grid2->addMultiCellWidget( lMacros3, 5, 6, 0, 0, TQt::AlignTop );
- QLabel *lMacros4 = new QLabel( i18n("<qt><ul><li>&lt;time&gt; The current time</li>"
+ TQLabel *lMacros4 = new TQLabel( i18n("<qt><ul><li>&lt;time&gt; The current time</li>"
"<li>&lt;date&gt; The current date</li>"
"<li>&lt;author&gt; Your full name</li>"
"<li>&lt;org&gt; Your organization</li>"
"<li>&lt;email&gt; Your email address</li></ul></qt>"), tab2 );
- grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, Qt::AlignTop );
+ grid2->addMultiCellWidget( lMacros4, 5, 6, 1, 1, TQt::AlignTop );
}
/*================================================================*/
void KoPageLayoutDia::setupTab3()
{
- QWidget *tab3 = addPage(i18n( "Col&umns" ));
- QHBoxLayout *lay = new QHBoxLayout(tab3);
+ TQWidget *tab3 = addPage(i18n( "Col&umns" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab3);
m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout);
- m_columnsTab->layout()->setMargin(0);
+ m_columnsTab->tqlayout()->setMargin(0);
lay->addWidget(m_columnsTab);
m_columnsTab->show();
- connect (m_columnsTab, SIGNAL( propertyChange(KoColumns&)),
- this, SLOT (columnsUpdated( KoColumns&)));
+ connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)),
+ this, TQT_SLOT (columnsUpdated( KoColumns&)));
}
void KoPageLayoutDia::columnsUpdated(KoColumns &columns) {
@@ -379,10 +379,10 @@ void KoPageLayoutDia::columnsUpdated(KoColumns &columns) {
/*================================================================*/
void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf )
{
- QWidget *tab4 = addPage(i18n( "H&eader && Footer" ));
- QHBoxLayout *lay = new QHBoxLayout(tab4);
+ TQWidget *tab4 = addPage(i18n( "H&eader && Footer" ));
+ TQHBoxLayout *lay = new TQHBoxLayout(tab4);
m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf);
- m_headerTab->layout()->setMargin(0);
+ m_headerTab->tqlayout()->setMargin(0);
lay->addWidget(m_headerTab);
m_headerTab->show();
diff --git a/kexi/3rdparty/kolibs/koPageLayoutDia.h b/kexi/3rdparty/kolibs/koPageLayoutDia.h
index f3f1d932e..05f8f3db7 100644
--- a/kexi/3rdparty/kolibs/koPageLayoutDia.h
+++ b/kexi/3rdparty/kolibs/koPageLayoutDia.h
@@ -22,16 +22,16 @@
#ifndef __KOPGLAYOUTDIA_H__
#define __KOPGLAYOUTDIA_H__
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
#include <KoGlobal.h>
#include <KoUnit.h>
#include <kdialogbase.h>
#include <KoPageLayout.h>
-class QButtonGroup;
-class QComboBox;
-class QLineEdit;
-class QCheckBox;
+class TQButtonGroup;
+class TQComboBox;
+class TQLineEdit;
+class TQCheckBox;
class KoUnitDoubleSpinBox;
class KoPageLayoutColumns;
class KoPageLayoutSize;
@@ -44,23 +44,24 @@ enum { FORMAT_AND_BORDERS = 1, HEADER_AND_FOOTER = 2, COLUMNS = 4, DISABLE_BORDE
* KoPagePreview.
* Internal to KoPageLayoutDia.
*/
-class KoPagePreview : public QGroupBox
+class KoPagePreview : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* constructor
*/
- KoPagePreview( QWidget*, const char*, const KoPageLayout & );
+ KoPagePreview( TQWidget*, const char*, const KoPageLayout & );
/**
* destructor
*/
~KoPagePreview();
/**
- * set page layout
+ * set page tqlayout
*/
void setPageLayout( const KoPageLayout& );
void setPageColumns( const KoColumns& );
@@ -68,7 +69,7 @@ public:
protected:
// paint page
- void drawContents( QPainter* );
+ void drawContents( TQPainter* );
double m_pageHeight, m_pageWidth, m_textFrameX, m_textFrameY, m_textFrameWidth, m_textFrameHeight;
int columns;
@@ -77,44 +78,45 @@ protected:
class KoPageLayoutDiaPrivate;
/**
- * With this dialog the user can specify the layout of the paper during printing.
+ * With this dialog the user can specify the tqlayout of the paper during printing.
*/
class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * @param parent The parent of the dialog.
+ * @param tqparent The tqparent of the dialog.
* @param name The name of the dialog.
- * @param layout The layout.
+ * @param tqlayout The tqlayout.
* @param headfoot The header and the footer.
* @param flags a variable with all features this dialog should show.
* @param unit The unit to use for displaying the values to the user.
* @param modal Whether the dialog is modal or not.
*/
- KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+ KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& headfoot,
int flags, KoUnit::Unit unit, bool modal=true );
/**
* Constructor.
*
- * @param parent The parent of the dialog.
+ * @param tqparent The tqparent of the dialog.
* @param name The name of the dialog.
- * @param layout The layout.
+ * @param tqlayout The tqlayout.
* @param headfoot The header and the footer.
* @param columns The number of columns on the page.
* @param kwheadfoot The KWord header and footer.
* @param tabs The number of tabs.
* @param unit The unit to use for displaying the values to the user
*/
- KoPageLayoutDia( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+ KoPageLayoutDia( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& headfoot,
const KoColumns& columns,
const KoKWHeaderFooter& kwheadfoot,
@@ -126,26 +128,26 @@ public:
~KoPageLayoutDia();
/**
- * Show page layout dialog.
+ * Show page tqlayout dialog.
* See constructor for documentation on the parameters
*/
- static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 );
+ static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 );
/**
- * Show page layout dialog.
+ * Show page tqlayout dialog.
* See constructor for documentation on the parameters
*/
- static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, QWidget* parent = 0 );
+ static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* tqparent = 0 );
/**
- * Retrieves a standard page layout.
+ * Retrieves a standard page tqlayout.
* Deprecated: better use KoPageLayout::standardLayout()
*/
static KDE_DEPRECATED KoPageLayout standardLayout();
/**
- * Returns the layout
+ * Returns the tqlayout
*/
- const KoPageLayout& layout() const { return m_layout; }
+ const KoPageLayout& tqlayout() const { return m_layout; }
/**
* Returns the header and footer information
@@ -168,14 +170,14 @@ private:
void setupTab4( const KoKWHeaderFooter kwhf );
// dialog objects
- QLineEdit *eHeadLeft;
- QLineEdit *eHeadMid;
- QLineEdit *eHeadRight;
- QLineEdit *eFootLeft;
- QLineEdit *eFootMid;
- QLineEdit *eFootRight;
-
- // layout
+ TQLineEdit *eHeadLeft;
+ TQLineEdit *eHeadMid;
+ TQLineEdit *eHeadRight;
+ TQLineEdit *eFootLeft;
+ TQLineEdit *eFootMid;
+ TQLineEdit *eFootRight;
+
+ // tqlayout
KoPageLayout m_layout;
KoColumns m_column;
@@ -187,7 +189,7 @@ protected slots:
virtual void slotOk();
private slots:
- void sizeUpdated(KoPageLayout &layout);
+ void sizeUpdated(KoPageLayout &tqlayout);
void columnsUpdated(KoColumns &columns);
private:
diff --git a/kexi/3rdparty/kolibs/koUnit.cc b/kexi/3rdparty/kolibs/koUnit.cc
index 6c19a29f3..bd10e26ed 100644
--- a/kexi/3rdparty/kolibs/koUnit.cc
+++ b/kexi/3rdparty/kolibs/koUnit.cc
@@ -28,12 +28,12 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qdom.h>
+#include <tqregexp.h>
+#include <tqdom.h>
-QStringList KoUnit::listOfUnitName()
+TQStringList KoUnit::listOfUnitName()
{
- QStringList lst;
+ TQStringList lst;
for ( uint i = 0 ; i <= KoUnit::U_LASTUNIT ; ++i )
{
KoUnit::Unit unit = static_cast<KoUnit::Unit>( i );
@@ -42,7 +42,7 @@ QStringList KoUnit::listOfUnitName()
return lst;
}
-QString KoUnit::unitDescription( Unit _unit )
+TQString KoUnit::unitDescription( Unit _unit )
{
switch ( _unit )
{
@@ -114,7 +114,7 @@ double KoUnit::ptToUnit( const double ptValue, const Unit unit )
}
}
-QString KoUnit::toUserStringValue( double ptValue, Unit unit )
+TQString KoUnit::toUserStringValue( double ptValue, Unit unit )
{
return KGlobal::locale()->formatNumber( toUserValue( ptValue, unit ) );
}
@@ -142,12 +142,12 @@ double KoUnit::fromUserValue( double value, Unit unit )
}
}
-double KoUnit::fromUserValue( const QString& value, Unit unit, bool* ok )
+double KoUnit::fromUserValue( const TQString& value, Unit unit, bool* ok )
{
return fromUserValue( KGlobal::locale()->readNumber( value, ok ), unit );
}
-double KoUnit::parseValue( QString value, double defaultVal )
+double KoUnit::parseValue( TQString value, double defaultVal )
{
value.simplifyWhiteSpace();
value.remove( ' ' );
@@ -155,11 +155,11 @@ double KoUnit::parseValue( QString value, double defaultVal )
if( value.isEmpty() )
return defaultVal;
- int index = value.find( QRegExp( "[a-z]+$" ) );
+ int index = value.tqfind( TQRegExp( "[a-z]+$" ) );
if ( index == -1 )
return value.toDouble();
- QString unit = value.mid( index );
+ TQString unit = value.mid( index );
value.truncate ( index );
double val = value.toDouble();
@@ -181,34 +181,34 @@ double KoUnit::parseValue( QString value, double defaultVal )
return defaultVal;
}
-KoUnit::Unit KoUnit::unit( const QString &_unitName, bool* ok )
+KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok )
{
if ( ok )
*ok = true;
- if ( _unitName == QString::fromLatin1( "mm" ) ) return U_MM;
- if ( _unitName == QString::fromLatin1( "cm" ) ) return U_CM;
- if ( _unitName == QString::fromLatin1( "dm" ) ) return U_DM;
- if ( _unitName == QString::fromLatin1( "in" )
- || _unitName == QString::fromLatin1("inch") /*compat*/ ) return U_INCH;
- if ( _unitName == QString::fromLatin1( "pi" ) ) return U_PI;
- if ( _unitName == QString::fromLatin1( "dd" ) ) return U_DD;
- if ( _unitName == QString::fromLatin1( "cc" ) ) return U_CC;
- if ( _unitName == QString::fromLatin1( "pt" ) ) return U_PT;
+ if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM;
+ if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM;
+ if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM;
+ if ( _unitName == TQString::tqfromLatin1( "in" )
+ || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH;
+ if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI;
+ if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD;
+ if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC;
+ if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT;
if ( ok )
*ok = false;
return U_PT;
}
-QString KoUnit::unitName( Unit _unit )
+TQString KoUnit::unitName( Unit _unit )
{
- if ( _unit == U_MM ) return QString::fromLatin1( "mm" );
- if ( _unit == U_CM ) return QString::fromLatin1( "cm" );
- if ( _unit == U_DM ) return QString::fromLatin1( "dm" );
- if ( _unit == U_INCH ) return QString::fromLatin1( "in" );
- if ( _unit == U_PI ) return QString::fromLatin1( "pi" );
- if ( _unit == U_DD ) return QString::fromLatin1( "dd" );
- if ( _unit == U_CC ) return QString::fromLatin1( "cc" );
- return QString::fromLatin1( "pt" );
+ if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" );
+ if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" );
+ if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" );
+ if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" );
+ if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" );
+ if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" );
+ if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" );
+ return TQString::tqfromLatin1( "pt" );
}
#ifndef SIMPLE_KOLIBS
diff --git a/kexi/3rdparty/kolibs/koUnit.h b/kexi/3rdparty/kolibs/koUnit.h
index 86f749d64..7f02f6fd7 100644
--- a/kexi/3rdparty/kolibs/koUnit.h
+++ b/kexi/3rdparty/kolibs/koUnit.h
@@ -20,13 +20,13 @@
#ifndef kounit_h
#define kounit_h
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <math.h> // for floor
#include <koffice_export.h>
class KoXmlWriter;
-class QDomElement;
+class TQDomElement;
// 1 inch ^= 72 pt
// 1 inch ^= 25.399956 mm (-pedantic ;p)
@@ -137,7 +137,7 @@ public:
/// This method is the one to use to display a value in a dialog
/// @return the value @p ptValue converted to @p unit and rounded, ready to be displayed
/// Old name: userValue
- static QString toUserStringValue( double ptValue, Unit unit );
+ static TQString toUserStringValue( double ptValue, Unit unit );
/// This method is the one to use to read a value from a dialog
/// @return the value in @p unit, converted to points for internal use
@@ -150,20 +150,20 @@ public:
/// @param ok if set, the pointed bool is set to true if the value could be
/// converted to a double, and to false otherwise.
/// @return the value in @p unit, converted to points for internal use
- static double fromUserValue( const QString& value, Unit unit, bool* ok = 0 );
+ static double fromUserValue( const TQString& value, Unit unit, bool* ok = 0 );
/// Convert a unit name into a Unit enum
/// @param _unitName name to convert
/// @param ok if set, it will be true if the unit was known, false if unknown
- static Unit unit( const QString &_unitName, bool* ok = 0 );
+ static Unit unit( const TQString &_unitName, bool* ok = 0 );
/// Get the name of a unit
- static QString unitName( Unit _unit );
+ static TQString unitName( Unit _unit );
/// Get the full (translated) description of a unit
- static QString unitDescription( Unit _unit );
- static QStringList listOfUnitName();
+ static TQString unitDescription( Unit _unit );
+ static TQStringList listOfUnitName();
/// parse common %KOffice and OO values, like "10cm", "5mm" to pt
- static double parseValue( QString value, double defaultVal = 0.0 );
+ static double parseValue( TQString value, double defaultVal = 0.0 );
// Note: the above method doesn't take a const ref, since it modifies the arg.
#ifndef SIMPLE_KOLIBS
diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.cc b/kexi/3rdparty/kolibs/koUnitWidgets.cc
index 0472caf53..21251b812 100644
--- a/kexi/3rdparty/kolibs/koUnitWidgets.cc
+++ b/kexi/3rdparty/kolibs/koUnitWidgets.cc
@@ -22,27 +22,27 @@
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
// ----------------------------------------------------------------
// Support classes
-KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name )
-: KDoubleValidator( parent, name ), m_base( base )
+KoUnitDoubleValidator::KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name )
+: KDoubleValidator( tqparent, name ), m_base( base )
{
}
-QValidator::State
-KoUnitDoubleValidator::validate( QString &s, int &pos ) const
+TQValidator::State
+KoUnitDoubleValidator::validate( TQString &s, int &pos ) const
{
kdDebug(30004) << "KoUnitDoubleValidator::validate : " << s << " at " << pos << endl;
- QValidator::State result = Acceptable;
+ TQValidator::State result = Acceptable;
- QRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end
+ TQRegExp regexp ("([ a-zA-Z]+)$"); // Letters or spaces at end
const int res = regexp.search( s );
if ( res == -1 )
@@ -52,9 +52,9 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const
return Intermediate;
}
- // ### TODO: are all the QString::stripWhiteSpace really necessary?
- const QString number ( s.left( res ).stripWhiteSpace() );
- const QString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() );
+ // ### TODO: are all the TQString::stripWhiteSpace really necessary?
+ const TQString number ( s.left( res ).stripWhiteSpace() );
+ const TQString unitName ( regexp.cap( 1 ).stripWhiteSpace().lower() );
kdDebug(30004) << "Split:" << number << ":" << unitName << ":" << endl;
@@ -87,25 +87,25 @@ KoUnitDoubleValidator::validate( QString &s, int &pos ) const
}
-QString KoUnitDoubleBase::getVisibleText( double value ) const
+TQString KoUnitDoubleBase::getVisibleText( double value ) const
{
- const QString num ( QString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
- kdDebug(30004) << "getVisibleText: " << QString::number( value, 'f', 12 ) << " => " << num << endl;
+ const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) );
+ kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl;
return num;
}
-double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const
+double KoUnitDoubleBase::toDouble( const TQString& str, bool* ok ) const
{
- QString str2( str );
+ TQString str2( str );
/* KLocale::readNumber wants the thousand separator exactly at 1000.
But when editing, it might be anywhere. So we need to remove it. */
- const QString sep( KGlobal::locale()->thousandsSeparator() );
+ const TQString sep( KGlobal::locale()->thousandsSeparator() );
if ( !sep.isEmpty() )
str2.remove( sep );
str2.remove( KoUnit::unitName( m_unit ) );
const double dbl = KGlobal::locale()->readNumber( str2, ok );
if ( ok )
- kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << QString::number( dbl, 'f', 12 ) << endl;
+ kdDebug(30004) << "toDouble:" << str << ": => :" << str2 << ": => " << TQString::number( dbl, 'f', 12 ) << endl;
else
kdWarning(30004) << "toDouble error:" << str << ": => :" << str2 << ":" << endl;
return dbl;
@@ -116,42 +116,42 @@ double KoUnitDoubleBase::toDouble( const QString& str, bool* ok ) const
// Widget classes
-KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent, const char *name )
- : KDoubleSpinBox( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 )
+KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent, const char *name )
+ : KDoubleSpinBox( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 )
, m_lowerInPoints( -9999 )
, m_upperInPoints( 9999 )
, m_stepInPoints( 1 )
{
KDoubleSpinBox::setPrecision( 2 );
m_validator = new KoUnitDoubleValidator( this, this );
- QSpinBox::setValidator( m_validator );
+ TQSpinBox::setValidator( m_validator );
setAcceptLocalizedNumbers( true );
setUnit( KoUnit::U_PT );
- connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged()));
}
-KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( QWidget *parent,
+KoUnitDoubleSpinBox::KoUnitDoubleSpinBox( TQWidget *tqparent,
double lower, double upper,
double step,
double value,
KoUnit::Unit unit,
unsigned int precision,
const char *name )
- : KDoubleSpinBox( lower, upper, step, value, precision, parent, name ),
+ : KDoubleSpinBox( lower, upper, step, value, precision, tqparent, name ),
KoUnitDoubleBase( unit, precision ),
m_lowerInPoints( lower ), m_upperInPoints( upper ), m_stepInPoints( step )
{
m_unit = KoUnit::U_PT;
m_validator = new KoUnitDoubleValidator( this, this );
- QSpinBox::setValidator( m_validator );
+ TQSpinBox::setValidator( m_validator );
setAcceptLocalizedNumbers( true );
setUnit( unit );
changeValue( value );
setLineStep( 0.5 );
- connect(this, SIGNAL(valueChanged( double )), SLOT(privateValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged( double )), TQT_SLOT(privateValueChanged()));
}
void
@@ -218,23 +218,23 @@ void KoUnitDoubleSpinBox::setMinMaxStep( double min, double max, double step )
// ----------------------------------------------------------------
-KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, const char *name )
- : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ),
+KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, const char *name )
+ : KLineEdit( tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ),
m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
{
- setAlignment( Qt::AlignRight );
+ tqsetAlignment( TQt::AlignRight );
m_validator = new KoUnitDoubleValidator( this, this );
setValidator( m_validator );
setUnit( KoUnit::U_PT );
changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) );
}
-KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit,
+KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit,
unsigned int precision, const char *name )
- : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
+ : KLineEdit( tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- setAlignment( Qt::AlignRight );
+ tqsetAlignment( TQt::AlignRight );
m_validator = new KoUnitDoubleValidator( this, this );
setValidator( m_validator );
setUnit( unit );
@@ -259,10 +259,10 @@ KoUnitDoubleLineEdit::setUnit( KoUnit::Unit unit )
}
bool
-KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev )
+KoUnitDoubleLineEdit::eventFilter( TQObject* o, TQEvent* ev )
{
#if 0
- if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide )
{
bool ok;
double value = toDouble( text(), &ok );
@@ -271,7 +271,7 @@ KoUnitDoubleLineEdit::eventFilter( QObject* o, QEvent* ev )
}
else
#endif
- return QLineEdit::eventFilter( o, ev );
+ return TQLineEdit::eventFilter( o, ev );
}
double KoUnitDoubleLineEdit::value( void ) const
@@ -283,34 +283,34 @@ double KoUnitDoubleLineEdit::value( void ) const
// ----------------------------------------------------------------
-KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, const char *name )
- : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
+KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, const char *name )
+ : KComboBox( true, tqparent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 )
{
- lineEdit()->setAlignment( Qt::AlignRight );
+ lineEdit()->tqsetAlignment( TQt::AlignRight );
m_validator = new KoUnitDoubleValidator( this, this );
lineEdit()->setValidator( m_validator );
setUnit( KoUnit::U_PT );
changeValue( KoUnit::ptToUnit( 0.0, KoUnit::U_PT ) );
- connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
-KoUnitDoubleComboBox::KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value, KoUnit::Unit unit,
+KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value, KoUnit::Unit unit,
unsigned int precision, const char *name )
- : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
+ : KComboBox( true, tqparent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ),
m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- lineEdit()->setAlignment( Qt::AlignRight );
+ lineEdit()->tqsetAlignment( TQt::AlignRight );
m_validator = new KoUnitDoubleValidator( this, this );
lineEdit()->setValidator( m_validator );
setUnit( unit );
changeValue( KoUnit::ptToUnit( value, unit ) );
- connect( this, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
void
KoUnitDoubleComboBox::changeValue( double value )
{
- QString oldLabel = lineEdit()->text();
+ TQString oldLabel = lineEdit()->text();
updateValue( value );
if( lineEdit()->text() != oldLabel )
emit valueChanged( m_value );
@@ -351,10 +351,10 @@ KoUnitDoubleComboBox::setUnit( KoUnit::Unit unit )
}
bool
-KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev )
+KoUnitDoubleComboBox::eventFilter( TQObject* o, TQEvent* ev )
{
#if 0
- if( ev->type() == QEvent::FocusOut || ev->type() == QEvent::Leave || ev->type() == QEvent::Hide )
+ if( ev->type() == TQEvent::FocusOut || ev->type() == TQEvent::Leave || ev->type() == TQEvent::Hide )
{
bool ok;
double value = toDouble( lineEdit()->text(), &ok );
@@ -363,7 +363,7 @@ KoUnitDoubleComboBox::eventFilter( QObject* o, QEvent* ev )
}
else
#endif
- return QComboBox::eventFilter( o, ev );
+ return TQComboBox::eventFilter( o, ev );
}
double KoUnitDoubleComboBox::value( void ) const
@@ -375,51 +375,51 @@ double KoUnitDoubleComboBox::value( void ) const
// ----------------------------------------------------------------
-KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, const char *name )
- : QWidget( parent ), m_step( 1.0 )
+KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent ), m_step( 1.0 )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3 );
- //layout->setMargin( 2 );
- QPushButton *up = new QPushButton( "+", this );
+ TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 );
+ //tqlayout->setMargin( 2 );
+ TQPushButton *up = new TQPushButton( "+", this );
//up->setFlat( true );
up->setMaximumHeight( 15 );
up->setMaximumWidth( 15 );
- layout->addWidget( up, 0, 0 );
- connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
+ tqlayout->addWidget( up, 0, 0 );
+ connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
- QPushButton *down = new QPushButton( "-", this );
+ TQPushButton *down = new TQPushButton( "-", this );
down->setMaximumHeight( 15 );
down->setMaximumWidth( 15 );
- layout->addWidget( down, 1, 0 );
- connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
+ tqlayout->addWidget( down, 1, 0 );
+ connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name );
- connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) );
- layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
+ connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) );
+ tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
}
-KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value,
+KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value,
KoUnit::Unit unit, unsigned int precision, const char *name )
- : QWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper )
+ : TQWidget( tqparent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper )
{
- QGridLayout *layout = new QGridLayout( this, 2, 3 );
- //layout->setMargin( 2 );
- QPushButton *up = new QPushButton( "+", this );
+ TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 );
+ //tqlayout->setMargin( 2 );
+ TQPushButton *up = new TQPushButton( "+", this );
//up->setFlat( true );
up->setMaximumHeight( 15 );
up->setMaximumWidth( 15 );
- layout->addWidget( up, 0, 0 );
- connect( up, SIGNAL( clicked() ), this, SLOT( slotUpClicked() ) );
+ tqlayout->addWidget( up, 0, 0 );
+ connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) );
- QPushButton *down = new QPushButton( "-", this );
+ TQPushButton *down = new TQPushButton( "-", this );
down->setMaximumHeight( 15 );
down->setMaximumWidth( 15 );
- layout->addWidget( down, 1, 0 );
- connect( down, SIGNAL( clicked() ), this, SLOT( slotDownClicked() ) );
+ tqlayout->addWidget( down, 1, 0 );
+ connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) );
m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name );
- connect( m_combo, SIGNAL( valueChanged( double ) ), this, SIGNAL( valueChanged( double ) ) );
- layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
+ connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) );
+ tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 );
}
void
diff --git a/kexi/3rdparty/kolibs/koUnitWidgets.h b/kexi/3rdparty/kolibs/koUnitWidgets.h
index 957b1b36d..dbdcb9c0c 100644
--- a/kexi/3rdparty/kolibs/koUnitWidgets.h
+++ b/kexi/3rdparty/kolibs/koUnitWidgets.h
@@ -44,9 +44,9 @@ class KoUnitDoubleBase;
class KOFFICEUI_EXPORT KoUnitDoubleValidator : public KDoubleValidator
{
public:
- KoUnitDoubleValidator( KoUnitDoubleBase *base, QObject *parent, const char *name = 0 );
+ KoUnitDoubleValidator( KoUnitDoubleBase *base, TQObject *tqparent, const char *name = 0 );
- virtual QValidator::State validate( QString &, int & ) const;
+ virtual TQValidator::State validate( TQString &, int & ) const;
private:
KoUnitDoubleBase *m_base;
@@ -80,14 +80,14 @@ protected:
* @param value the number as double
* @return the resulting string
*/
- QString getVisibleText( double value ) const;
+ TQString getVisibleText( double value ) const;
/**
* Transfrom a string into a double, while taking care of locale specific symbols.
* @param str the string to transform into a number
* @param ok true, if the conversion was succesful
* @return the value as double
*/
- double toDouble( const QString& str, bool* ok ) const;
+ double toDouble( const TQString& str, bool* ok ) const;
protected:
KoUnitDoubleValidator *m_validator;
@@ -107,10 +107,11 @@ protected:
class KOFFICEUI_EXPORT KoUnitDoubleSpinBox : public KDoubleSpinBox, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleSpinBox( QWidget *parent = 0L, const char *name = 0L );
+ KoUnitDoubleSpinBox( TQWidget *tqparent = 0L, const char *name = 0L );
// lower, upper, step and value are in pt
- KoUnitDoubleSpinBox( QWidget *parent, double lower, double upper, double step, double value = 0.0,
+ KoUnitDoubleSpinBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0,
KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
// added so the class can be used in .ui files(by Tymoteusz Majewski, maju7@o2.pl)
virtual void changeValue( double );
@@ -135,7 +136,7 @@ public:
void setMinMaxStep( double min, double max, double step );
signals:
- /// emitted like valueChanged in the parent, but this one emits the point value
+ /// emitted like valueChanged in the tqparent, but this one emits the point value
void valueChangedPt( double );
@@ -157,9 +158,10 @@ private slots:
class KOFFICEUI_EXPORT KoUnitDoubleLineEdit : public KLineEdit, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleLineEdit( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleLineEdit( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleLineEdit( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleLineEdit( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
virtual void changeValue( double );
virtual void setUnit( KoUnit::Unit = KoUnit::U_PT );
@@ -168,7 +170,7 @@ public:
double value( void ) const;
protected:
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
private:
double m_value;
@@ -185,9 +187,10 @@ private:
class KOFFICEUI_EXPORT KoUnitDoubleComboBox : public KComboBox, public KoUnitDoubleBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleComboBox( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleComboBox( QWidget *parent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleComboBox( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleComboBox( TQWidget *tqparent, double lower, double upper, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
virtual void changeValue( double );
void updateValue( double );
@@ -198,7 +201,7 @@ public:
void insertItem( double, int index = -1 );
protected:
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
signals:
void valueChanged(double);
@@ -218,12 +221,13 @@ protected:
* Combo box (with spin control) for double precision numbers with unit display
* \since 1.4 (change of behavior)
*/
-class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public QWidget
+class KOFFICEUI_EXPORT KoUnitDoubleSpinComboBox : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoUnitDoubleSpinComboBox( QWidget *parent = 0L, const char *name = 0L );
- KoUnitDoubleSpinComboBox( QWidget *parent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
+ KoUnitDoubleSpinComboBox( TQWidget *tqparent = 0L, const char *name = 0L );
+ KoUnitDoubleSpinComboBox( TQWidget *tqparent, double lower, double upper, double step, double value = 0.0, KoUnit::Unit unit = KoUnit::U_PT, unsigned int precision = 2, const char *name = 0 );
void insertItem( double, int index = -1 );
void updateValue( double );
diff --git a/kexi/Makefile.am b/kexi/Makefile.am
index e8f5c21b5..7eca1d836 100644
--- a/kexi/Makefile.am
+++ b/kexi/Makefile.am
@@ -4,7 +4,7 @@ lib_LTLIBRARIES =
kdeinit_LTLIBRARIES = kexi.la
bin_PROGRAMS =
kexi_la_SOURCES = main.cpp
-kexi_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(VER_INFO)
+kexi_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(VER_INFO) $(LIB_QT)
kexi_la_LIBADD = ./core/libkexicore.la ./main/libkeximain.la
SUBDIRS= 3rdparty kexiutils kexidb core widget formeditor \
diff --git a/kexi/core/kexi.cpp b/kexi/core/kexi.cpp
index 74e158f6a..4efb6d7b7 100644
--- a/kexi/core/kexi.cpp
+++ b/kexi/core/kexi.cpp
@@ -24,12 +24,12 @@
#include <kexiutils/identifier.h>
#include <kexidb/msghandler.h>
-#include <qtimer.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qpixmapcache.h>
-#include <qcolor.h>
-#include <qfileinfo.h>
+#include <tqtimer.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqpixmapcache.h>
+#include <tqcolor.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kcursor.h>
@@ -63,7 +63,7 @@ class KexiInternal : public KShared
KexiDBConnectionSet recentConnections;
KexiDB::DriverManager driverManager;
KexiPart::Manager partManager;
- QFont *smallFont;
+ TQFont *smallFont;
};
static KStaticDeleter<KexiInternal> Kexi_intDeleter;
@@ -140,21 +140,21 @@ bool& Kexi::tempShowScripts() {
//--------------------------------------------------------------------------------
-QFont Kexi::smallFont(QWidget *init)
+TQFont Kexi::smallFont(TQWidget *init)
{
_INIT_SHARED;
if (!_int->smallFont) {
- _int->smallFont = new QFont( init->font() );
+ _int->smallFont = new TQFont( init->font() );
const int wdth = KGlobalSettings::desktopGeometry(init).width();
- int size = 10 + QMAX(0, wdth - 1100) / 100;
- size = QMIN( init->fontInfo().pixelSize(), size );
+ int size = 10 + TQMAX(0, wdth - 1100) / 100;
+ size = TQMIN( init->fontInfo().pixelSize(), size );
_int->smallFont->setPixelSize( size );
}
return *_int->smallFont;
}
//--------------------------------------------------------------------------------
-QString Kexi::nameForViewMode(int m)
+TQString Kexi::nameForViewMode(int m)
{
if (m==NoViewMode) return i18n("No View");
else if (m==DataViewMode) return i18n("Data View");
@@ -166,62 +166,62 @@ QString Kexi::nameForViewMode(int m)
//--------------------------------------------------------------------------------
-QString Kexi::msgYouCanImproveData() {
+TQString Kexi::msgYouCanImproveData() {
return i18n("You can correct data in this row or use \"Cancel row changes\" function.");
}
//--------------------------------------------------------------------------------
-ObjectStatus::ObjectStatus()
+ObjecttqStatus::ObjecttqStatus()
: msgHandler(0)
{
}
-ObjectStatus::ObjectStatus(const QString& message, const QString& description)
+ObjecttqStatus::ObjecttqStatus(const TQString& message, const TQString& description)
: msgHandler(0)
{
- setStatus(message, description);
+ settqStatus(message, description);
}
-ObjectStatus::ObjectStatus(KexiDB::Object* dbObject, const QString& message, const QString& description)
+ObjecttqStatus::ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description)
: msgHandler(0)
{
- setStatus(dbObject, message, description);
+ settqStatus(dbObject, message, description);
}
-ObjectStatus::~ObjectStatus()
+ObjecttqStatus::~ObjecttqStatus()
{
delete msgHandler;
}
-const ObjectStatus& ObjectStatus::status() const
+const ObjecttqStatus& ObjecttqStatus::status() const
{
return *this;
}
-bool ObjectStatus::error() const
+bool ObjecttqStatus::error() const
{
return !message.isEmpty()
- || (dynamic_cast<KexiDB::Object*>((QObject*)dbObj) && dynamic_cast<KexiDB::Object*>((QObject*)dbObj)->error());
+ || (dynamic_cast<KexiDB::Object*>((TQObject*)dbObj) && dynamic_cast<KexiDB::Object*>((TQObject*)dbObj)->error());
}
-void ObjectStatus::setStatus(const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(const TQString& message, const TQString& description)
{
this->dbObj=0;
this->message=message;
this->description=description;
}
-void ObjectStatus::setStatus(KexiDB::Object* dbObject, const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description)
{
- if (dynamic_cast<QObject*>(dbObject)) {
- dbObj = dynamic_cast<QObject*>(dbObject);
+ if (dynamic_cast<TQObject*>(dbObject)) {
+ dbObj = dynamic_cast<TQObject*>(dbObject);
}
this->message=message;
this->description=description;
}
-void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::ResultInfo* result, const TQString& message, const TQString& description)
{
if (result) {
if (message.isEmpty())
@@ -235,41 +235,41 @@ void ObjectStatus::setStatus(KexiDB::ResultInfo* result, const QString& message,
this->description = description + " " + result->desc;
}
else
- clearStatus();
+ cleartqStatus();
}
-void ObjectStatus::setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
- const QString& message, const QString& description)
+void ObjecttqStatus::settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
+ const TQString& message, const TQString& description)
{
if (!dbObject)
- setStatus(result, message, description);
+ settqStatus(result, message, description);
else if (!result)
- setStatus(dbObject, message, description);
+ settqStatus(dbObject, message, description);
else {
- setStatus(dbObject, message, description);
- setStatus(result, this->message, this->description);
+ settqStatus(dbObject, message, description);
+ settqStatus(result, this->message, this->description);
}
}
-void ObjectStatus::clearStatus()
+void ObjecttqStatus::cleartqStatus()
{
- message=QString::null;
- description=QString::null;
+ message=TQString();
+ description=TQString();
}
-QString ObjectStatus::singleStatusString() const {
+TQString ObjecttqStatus::singleStatusString() const {
if (message.isEmpty() || description.isEmpty())
return message;
return message + " " + description;
}
-void ObjectStatus::append( const ObjectStatus& otherStatus ) {
+void ObjecttqStatus::append( const ObjecttqStatus& othertqStatus ) {
if (message.isEmpty()) {
- message = otherStatus.message;
- description = otherStatus.description;
+ message = othertqStatus.message;
+ description = othertqStatus.description;
return;
}
- const QString s( otherStatus.singleStatusString() );
+ const TQString s( othertqStatus.singleStatusString() );
if (s.isEmpty())
return;
if (description.isEmpty()) {
@@ -283,7 +283,7 @@ void ObjectStatus::append( const ObjectStatus& otherStatus ) {
class ObjectStatusMessageHandler : public KexiDB::MessageHandler
{
public:
- ObjectStatusMessageHandler(ObjectStatus *status)
+ ObjectStatusMessageHandler(ObjecttqStatus *status)
: KexiDB::MessageHandler()
, m_status(status)
{
@@ -292,21 +292,21 @@ class ObjectStatusMessageHandler : public KexiDB::MessageHandler
{
}
- virtual void showErrorMessage(const QString &title,
- const QString &details = QString::null)
+ virtual void showErrorMessage(const TQString &title,
+ const TQString &details = TQString())
{
- m_status->setStatus(title, details);
+ m_status->settqStatus(title, details);
}
- virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null)
+ virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString())
{
- m_status->setStatus(obj, msg);
+ m_status->settqStatus(obj, msg);
}
- ObjectStatus *m_status;
+ ObjecttqStatus *m_status;
};
-ObjectStatus::operator KexiDB::MessageHandler*()
+ObjecttqStatus::operator KexiDB::MessageHandler*()
{
if (!msgHandler)
msgHandler = new ObjectStatusMessageHandler(this);
@@ -325,22 +325,22 @@ void Kexi::initCmdLineArgs(int argc, char *argv[], KAboutData* aboutData)
KCmdLineArgs::addCmdLineOptions( options );
}
-void KEXI_UNFINISHED(const QString& feature_name, const QString& extra_text)
+void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text)
{
- QString msg;
+ TQString msg;
if (feature_name.isEmpty())
msg = i18n("This function is not available for version %1 of %2 application.")
- .arg(KEXI_VERSION_STRING)
- .arg(KEXI_APP_NAME);
+ .tqarg(KEXI_VERSION_STRING)
+ .tqarg(KEXI_APP_NAME);
else {
- QString feature_name_(feature_name);
+ TQString feature_name_(feature_name);
msg = i18n("\"%1\" function is not available for version %2 of %3 application.")
- .arg(feature_name_.replace("&",""))
- .arg(KEXI_VERSION_STRING)
- .arg(KEXI_APP_NAME);
+ .tqarg(feature_name_.tqreplace("&",""))
+ .tqarg(KEXI_VERSION_STRING)
+ .tqarg(KEXI_APP_NAME);
}
- QString extra_text_(extra_text);
+ TQString extra_text_(extra_text);
if (!extra_text_.isEmpty())
extra_text_.prepend("\n");
diff --git a/kexi/core/kexi.h b/kexi/core/kexi.h
index 8490ca290..a98f93413 100644
--- a/kexi/core/kexi.h
+++ b/kexi/core/kexi.h
@@ -20,8 +20,8 @@
#ifndef KEXI_H
#define KEXI_H
-#include <qguardedptr.h>
-#include <qfont.h>
+#include <tqguardedptr.h>
+#include <tqfont.h>
#include <kexi_version.h>
#include "kexiprojectdata.h"
@@ -42,13 +42,13 @@ namespace Kexi
enum ViewMode {
AllViewModes = 0, //!< Usable primarily in KexiPart::initInstanceActions()
NoViewMode = 0, //!< In KexiViewBase::afterSwitchFrom() and KexiViewBase::beforeSwitchTo()
- //!< means that parent dialog of the view has not yet view defined.
+ //!< means that tqparent dialog of the view has not yet view defined.
DataViewMode = 1,
DesignViewMode = 2,
TextViewMode = 4 //!< Also known as SQL View Mode
};
//! i18n'ed name of view mode \a m
- KEXICORE_EXPORT QString nameForViewMode(int m);
+ KEXICORE_EXPORT TQString nameForViewMode(int m);
//! A set of known connections
KEXICORE_EXPORT KexiDBConnectionSet& connset();
@@ -83,65 +83,65 @@ namespace Kexi
/*! A global setting for minimal readable font.
Note: this is defined because KDE has no such setting yet.
- \a init is a widget that should be passed if no qApp->mainWidget() is available yet. */
- KEXICORE_EXPORT QFont smallFont(QWidget *init = 0);
+ \a init is a widget that should be passed if no tqApp->mainWidget() is available yet. */
+ KEXICORE_EXPORT TQFont smallFont(TQWidget *init = 0);
/*! Helper class for storing object status. */
- class KEXICORE_EXPORT ObjectStatus
+ class KEXICORE_EXPORT ObjecttqStatus
{
public:
- ObjectStatus();
+ ObjecttqStatus();
- ObjectStatus(const QString& message, const QString& description);
+ ObjecttqStatus(const TQString& message, const TQString& description);
- ObjectStatus(KexiDB::Object* dbObject, const QString& message, const QString& description);
+ ObjecttqStatus(KexiDB::Object* dbObject, const TQString& message, const TQString& description);
- ~ObjectStatus();
+ ~ObjecttqStatus();
- const ObjectStatus& status() const;
+ const ObjecttqStatus& status() const;
bool error() const;
- void setStatus(const QString& message, const QString& description);
+ void settqStatus(const TQString& message, const TQString& description);
- //! Note: for safety, \a dbObject needs to be derived from QObject,
+ //! Note: for safety, \a dbObject needs to be derived from TQObject,
//! otherwise it won't be assigned
- void setStatus(KexiDB::Object* dbObject,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::Object* dbObject,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void setStatus(KexiDB::ResultInfo* result,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::ResultInfo* result,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void setStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
- const QString& message = QString::null, const QString& description = QString::null);
+ void settqStatus(KexiDB::Object* dbObject, KexiDB::ResultInfo* result,
+ const TQString& message = TQString(), const TQString& description = TQString());
- void clearStatus();
+ void cleartqStatus();
- QString singleStatusString() const;
+ TQString singleStatusString() const;
- void append( const ObjectStatus& otherStatus );
+ void append( const ObjecttqStatus& othertqStatus );
- KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((QObject*)dbObj); }
+ KexiDB::Object *dbObject() const { return dynamic_cast<KexiDB::Object*>((TQObject*)dbObj); }
- //! Helper returning pseudo handler that just updates this ObjectStatus object
+ //! Helper returning pseudo handler that just updates this ObjecttqStatus object
//! by receiving a message
operator KexiDB::MessageHandler*();
- QString message, description;
+ TQString message, description;
protected:
- QGuardedPtr<QObject> dbObj; //! This is in fact KexiDB::Object
+ TQGuardedPtr<TQObject> dbObj; //! This is in fact KexiDB::Object
KexiDB::MessageHandler* msgHandler;
};
- KEXICORE_EXPORT QString msgYouCanImproveData();
+ KEXICORE_EXPORT TQString msgYouCanImproveData();
}//namespace Kexi
//! Displays information that feature "feature_name" is not availabe in the current application version
-KEXICORE_EXPORT void KEXI_UNFINISHED(const QString& feature_name, const QString& extra_text = QString::null);
+KEXICORE_EXPORT void KEXI_UNFINISHED(const TQString& feature_name, const TQString& extra_text = TQString());
//! Like above - for use inside KexiActionProxy subclass - reuses feature name from shared action's text
#define KEXI_UNFINISHED_SHARED_ACTION(action_name) \
- KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : QString::null)
+ KEXI_UNFINISHED(sharedAction(action_name) ? sharedAction(action_name)->text() : TQString())
#endif
diff --git a/kexi/core/kexiaboutdata.cpp b/kexi/core/kexiaboutdata.cpp
index eeaaf07e4..0f06a1561 100644
--- a/kexi/core/kexiaboutdata.cpp
+++ b/kexi/core/kexiaboutdata.cpp
@@ -74,7 +74,7 @@ KAboutData* Kexi::createAboutData()
aboutData->addCredit("Tomas Krassnig", I18N_NOOP("Coffee sponsoring"), "tkrass05@hak1.at");
aboutData->addCredit("Paweł Wirecki / OpenOffice Polska", I18N_NOOP("Numerous bug reports, usability tests, technical support"), "");
aboutData->setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names"), I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
-#if defined(CUSTOM_VERSION) && defined(Q_WS_WIN)
+#if defined(CUSTOM_VERSION) && defined(TQ_WS_WIN)
aboutData->setProgramLogo(KEXI_APP_LOGO);
#endif
return aboutData;
diff --git a/kexi/core/kexiactioncategories.cpp b/kexi/core/kexiactioncategories.cpp
index 4f3993425..b3cd1c066 100644
--- a/kexi/core/kexiactioncategories.cpp
+++ b/kexi/core/kexiactioncategories.cpp
@@ -22,8 +22,8 @@
#include <kstaticdeleter.h>
#include <kdebug.h>
-#include <qmap.h>
-#include <qasciidict.h>
+#include <tqmap.h>
+#include <tqasciidict.h>
namespace Kexi {
@@ -41,7 +41,7 @@ class ActionInternal
delete supportedObjectTypes;
}
int categories;
- QMap<int, bool> *supportedObjectTypes;
+ TQMap<int, bool> *supportedObjectTypes;
bool allObjectTypesAreSupported : 1;
};
@@ -57,7 +57,7 @@ class ActionCategories::Private
actions.setAutoDelete(true);
}
- QAsciiDict<ActionInternal> actions;
+ TQAsciiDict<ActionInternal> actions;
};
KEXICORE_EXPORT ActionCategories *actionCategories()
@@ -89,7 +89,7 @@ void ActionCategories::addAction(const char* name, int categories,
KexiPart::ObjectTypes supportedObjectType5, KexiPart::ObjectTypes supportedObjectType6,
KexiPart::ObjectTypes supportedObjectType7, KexiPart::ObjectTypes supportedObjectType8)
{
- ActionInternal * a = d->actions.find( name );
+ ActionInternal * a = d->actions.tqfind( name );
if (a) {
a->categories |= categories;
}
@@ -99,7 +99,7 @@ void ActionCategories::addAction(const char* name, int categories,
}
if (supportedObjectType1) {
if (!a->supportedObjectTypes)
- a->supportedObjectTypes = new QMap<int, bool>();
+ a->supportedObjectTypes = new TQMap<int, bool>();
a->supportedObjectTypes->insert(supportedObjectType1, true);
if (supportedObjectType2) {
a->supportedObjectTypes->insert(supportedObjectType2, true);
@@ -127,7 +127,7 @@ void ActionCategories::addAction(const char* name, int categories,
void ActionCategories::setAllObjectTypesSupported(const char* name, bool set)
{
- ActionInternal * a = d->actions.find( name );
+ ActionInternal * a = d->actions.tqfind( name );
if (a)
a->allObjectTypesAreSupported = set;
else
@@ -136,14 +136,14 @@ void ActionCategories::setAllObjectTypesSupported(const char* name, bool set)
int ActionCategories::actionCategories(const char* name) const
{
- const ActionInternal * a = d->actions.find( name );
+ const ActionInternal * a = d->actions.tqfind( name );
return a ? a->categories : 0;
}
bool ActionCategories::actionSupportsObjectType(const char* name, KexiPart::ObjectTypes objectType) const
{
- const ActionInternal * a = d->actions.find( name );
+ const ActionInternal * a = d->actions.tqfind( name );
if (a && a->allObjectTypesAreSupported)
return true;
- return (a && a->supportedObjectTypes) ? a->supportedObjectTypes->contains(objectType) : false;
+ return (a && a->supportedObjectTypes) ? a->supportedObjectTypes->tqcontains(objectType) : false;
}
diff --git a/kexi/core/kexiactionproxy.cpp b/kexi/core/kexiactionproxy.cpp
index 0dbcf6378..7f5f42f93 100644
--- a/kexi/core/kexiactionproxy.cpp
+++ b/kexi/core/kexiactionproxy.cpp
@@ -25,12 +25,12 @@
#include <kmainwindow.h>
#include <kshortcut.h>
-#include <qwidget.h>
-#include <qsignal.h>
-#include <qiconset.h>
+#include <tqwidget.h>
+#include <tqsignal.h>
+#include <tqiconset.h>
KAction_setEnabled_Helper::KAction_setEnabled_Helper(KexiActionProxy* proxy)
- : QObject(0,"KAction_setEnabled_Helper")
+ : TQObject(0,"KAction_setEnabled_Helper")
, m_proxy( proxy )
{
}
@@ -45,7 +45,7 @@ void KAction_setEnabled_Helper::slotSetEnabled(bool enabled)
//=======================
-KexiSharedActionConnector::KexiSharedActionConnector( KexiActionProxy* proxy, QObject *obj )
+KexiSharedActionConnector::KexiSharedActionConnector( KexiActionProxy* proxy, TQObject *obj )
: m_proxy(proxy)
, m_object(obj)
{
@@ -67,7 +67,7 @@ void KexiSharedActionConnector::plugSharedActionToExternalGUI(
}
void KexiSharedActionConnector::plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client)
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client)
{
m_proxy->plugSharedActionsToExternalGUI(action_names, client);
}
@@ -75,7 +75,7 @@ void KexiSharedActionConnector::plugSharedActionsToExternalGUI(
//=======================
-KexiActionProxy::KexiActionProxy(QObject *receiver, KexiSharedActionHost *host)
+KexiActionProxy::KexiActionProxy(TQObject *receiver, KexiSharedActionHost *host)
: m_host( host ? host : &KexiSharedActionHost::defaultHost() )
, m_receiver(receiver)
, m_signals(47)
@@ -92,12 +92,12 @@ KexiActionProxy::KexiActionProxy(QObject *receiver, KexiSharedActionHost *host)
KexiActionProxy::~KexiActionProxy()
{
- QPtrListIterator<KexiActionProxy> it(m_sharedActionChildren);
+ TQPtrListIterator<KexiActionProxy> it(m_sharedActionChildren);
//detach myself from every child
for (;it.current();++it) {
it.current()->setActionProxyParent_internal( 0 );
}
- //take me from parent
+ //take me from tqparent
if (m_actionProxyParent)
m_actionProxyParent->takeActionProxyChild( this );
@@ -106,13 +106,13 @@ KexiActionProxy::~KexiActionProxy()
delete m_KAction_setEnabled_helper;
}
-void KexiActionProxy::plugSharedAction(const char *action_name, QObject* receiver, const char *slot)
+void KexiActionProxy::plugSharedAction(const char *action_name, TQObject* receiver, const char *slot)
{
if (!action_name)// || !receiver || !slot)
return;
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- p = new QPair<QSignal*,bool>( new QSignal(&m_signal_parent), true );
+ p = new TQPair<TQSignal*,bool>( new TQSignal(&m_signal_parent), true );
m_signals.insert(action_name, p);
}
if (receiver && slot)
@@ -121,14 +121,14 @@ void KexiActionProxy::plugSharedAction(const char *action_name, QObject* receive
void KexiActionProxy::unplugSharedAction(const char *action_name)
{
- QPair<QSignal*,bool> *p = m_signals.take(action_name);
+ TQPair<TQSignal*,bool> *p = m_signals.take(action_name);
if (!p)
return;
delete p->first;
delete p;
}
-int KexiActionProxy::plugSharedAction(const char *action_name, QWidget* w)
+int KexiActionProxy::plugSharedAction(const char *action_name, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
@@ -138,7 +138,7 @@ int KexiActionProxy::plugSharedAction(const char *action_name, QWidget* w)
return a->plug(w);
}
-void KexiActionProxy::unplugSharedAction(const char *action_name, QWidget* w)
+void KexiActionProxy::unplugSharedAction(const char *action_name, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
@@ -148,18 +148,18 @@ void KexiActionProxy::unplugSharedAction(const char *action_name, QWidget* w)
a->unplug(w);
}
-KAction* KexiActionProxy::plugSharedAction(const char *action_name, const QString& alternativeText, QWidget* w)
+KAction* KexiActionProxy::plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w)
{
KAction *a = sharedAction(action_name);
if (!a) {
kdWarning() << "KexiActionProxy::plugSharedAction(): NO SUCH ACTION: " << action_name << endl;
return 0;
}
- QCString altName = a->name();
+ TQCString altName = a->name();
altName += "_alt";
KAction *alt_act = new KAction(alternativeText, a->iconSet(), a->shortcut(),
- 0, 0, a->parent(), altName);
- QObject::connect(alt_act, SIGNAL(activated()), a, SLOT(activate()));
+ 0, 0, a->tqparent(), altName);
+ TQObject::connect(alt_act, TQT_SIGNAL(activated()), a, TQT_SLOT(activate()));
alt_act->plug(w);
//OK?
@@ -173,35 +173,35 @@ void KexiActionProxy::plugSharedActionToExternalGUI(const char *action_name, KXM
KAction *a = client->action(action_name);
if (!a)
return;
- plugSharedAction(a->name(), a, SLOT(activate()));
+ plugSharedAction(a->name(), a, TQT_SLOT(activate()));
//update availability
setAvailable(a->name(), a->isEnabled());
//changes will be signaled
- QObject::connect(a, SIGNAL(enabled(bool)), m_KAction_setEnabled_helper, SLOT(slotSetEnabled(bool)));
+ TQObject::connect(a, TQT_SIGNAL(enabled(bool)), m_KAction_setEnabled_helper, TQT_SLOT(slotSetEnabled(bool)));
}
void KexiActionProxy::plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client)
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client)
{
- for (QValueList<QCString>::const_iterator it = action_names.constBegin(); it!=action_names.constEnd(); ++it) {
+ for (TQValueList<TQCString>::const_iterator it = action_names.constBegin(); it!=action_names.constEnd(); ++it) {
plugSharedActionToExternalGUI(*it, client);
}
}
bool KexiActionProxy::activateSharedAction(const char *action_name, bool alsoCheckInChildren)
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p || !p->second) {
- //try in children...
+ //try in tqchildren...
if (alsoCheckInChildren) {
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->activateSharedAction( action_name, alsoCheckInChildren ))
return true;
}
}
- return m_actionProxyParent ? m_actionProxyParent->activateSharedAction(action_name, false) : false; //last chance: parent
+ return m_actionProxyParent ? m_actionProxyParent->activateSharedAction(action_name, false) : false; //last chance: tqparent
}
//activate in this proxy...
p->first->activate();
@@ -215,12 +215,12 @@ KAction* KexiActionProxy::sharedAction(const char* action_name)
bool KexiActionProxy::isSupported(const char* action_name) const
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- //not supported explicitly - try in children...
+ //not supported explicitly - try in tqchildren...
if (m_focusedChild)
return m_focusedChild->isSupported(action_name);
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->isSupported(action_name))
return true;
@@ -232,19 +232,19 @@ bool KexiActionProxy::isSupported(const char* action_name) const
bool KexiActionProxy::isAvailable(const char* action_name, bool alsoCheckInChildren) const
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p) {
- //not supported explicitly - try in children...
+ //not supported explicitly - try in tqchildren...
if (alsoCheckInChildren) {
if (m_focusedChild)
return m_focusedChild->isAvailable(action_name, alsoCheckInChildren);
- QPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
+ TQPtrListIterator<KexiActionProxy> it( m_sharedActionChildren );
for( ; it.current(); ++it ) {
if (it.current()->isSupported(action_name))
return it.current()->isAvailable(action_name, alsoCheckInChildren);
}
}
- return m_actionProxyParent ? m_actionProxyParent->isAvailable(action_name, false) : false; //last chance: parent
+ return m_actionProxyParent ? m_actionProxyParent->isAvailable(action_name, false) : false; //last chance: tqparent
}
//supported explicitly:
return p->second != 0;
@@ -252,7 +252,7 @@ bool KexiActionProxy::isAvailable(const char* action_name, bool alsoCheckInChild
void KexiActionProxy::setAvailable(const char* action_name, bool set)
{
- QPair<QSignal*,bool> *p = m_signals[action_name];
+ TQPair<TQSignal*,bool> *p = m_signals[action_name];
if (!p)
return;
p->second = set;
@@ -269,13 +269,13 @@ void KexiActionProxy::addActionProxyChild( KexiActionProxy* child )
void KexiActionProxy::takeActionProxyChild( KexiActionProxy* child )
{
- if (m_sharedActionChildren.findRef( child ) != -1)
+ if (m_sharedActionChildren.tqfindRef( child ) != -1)
m_sharedActionChildren.take();
}
-void KexiActionProxy::setActionProxyParent_internal( KexiActionProxy* parent )
+void KexiActionProxy::setActionProxyParent_internal( KexiActionProxy* tqparent )
{
- m_actionProxyParent = parent;
+ m_actionProxyParent = tqparent;
}
#include "kexiactionproxy_p.moc"
diff --git a/kexi/core/kexiactionproxy.h b/kexi/core/kexiactionproxy.h
index 63093d291..e88a89d9e 100644
--- a/kexi/core/kexiactionproxy.h
+++ b/kexi/core/kexiactionproxy.h
@@ -20,18 +20,18 @@
#ifndef KEXIACTIONPROXY_H
#define KEXIACTIONPROXY_H
-#include <qguardedptr.h>
-#include <qasciidict.h>
-#include <qobject.h>
-#include <qpair.h>
-#include <qptrlist.h>
+#include <tqguardedptr.h>
+#include <tqasciidict.h>
+#include <tqobject.h>
+#include <tqpair.h>
+#include <tqptrlist.h>
#include <kaction.h>
#include "kexiproject.h"
#include "kexisharedactionhost.h"
-class QSignal;
+class TQSignal;
class KAction;
class KXMLGUIClient;
class KAction_setEnabled_Helper;
@@ -56,7 +56,7 @@ class KEXICORE_EXPORT KexiSharedActionConnector
{
public:
/* Connects shared actions offered by \a proxy to \a obj. */
- KexiSharedActionConnector(KexiActionProxy* proxy, QObject *obj);
+ KexiSharedActionConnector(KexiActionProxy* proxy, TQObject *obj);
~KexiSharedActionConnector();
protected:
@@ -65,10 +65,10 @@ class KEXICORE_EXPORT KexiSharedActionConnector
void plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client);
void plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client);
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client);
KexiActionProxy* m_proxy;
- QObject *m_object;
+ TQObject *m_object;
};
//! An interface that acts as proxy for shared actions within the application.
@@ -85,8 +85,8 @@ class KEXICORE_EXPORT KexiActionProxy
public:
/*! Constructs action proxy for object \a receiver, using \a host.
If \a host is NULL, KexiSharedActionHost::defaultHost() is used.
- (you must be sure that it's true) -- it is casted to QObject and assigned as the receiver.*/
- KexiActionProxy(QObject *receiver , KexiSharedActionHost *host = 0 );
+ (you must be sure that it's true) -- it is casted to TQObject and assigned as the receiver.*/
+ KexiActionProxy(TQObject *receiver , KexiSharedActionHost *host = 0 );
virtual ~KexiActionProxy();
/*! Activates action named \a action_name for this proxy. If the action is executed
@@ -107,7 +107,7 @@ class KEXICORE_EXPORT KexiActionProxy
protected:
/*! Plugs shared action named \a action_name to slot \a slot in \a receiver.
\a Receiver is usually a child of _this_ widget. */
- void plugSharedAction(const char *action_name, QObject* receiver, const char *slot);
+ void plugSharedAction(const char *action_name, TQObject* receiver, const char *slot);
void unplugSharedAction(const char *action_name);
@@ -122,61 +122,61 @@ class KEXICORE_EXPORT KexiActionProxy
Does nothing if no action found, so generally this is safer than just caling e.g.
<code> action("myaction")->plug(myPopup); </code>
\return index of inserted item, or -1 if there is not action with name \a action_name.
- \sa action(), KAction::plug(QWidget*, int) */
- int plugSharedAction(const char *action_name, QWidget* w);
+ \sa action(), KAction::plug(TQWidget*, int) */
+ int plugSharedAction(const char *action_name, TQWidget* w);
void plugSharedActionToExternalGUI(const char *action_name, KXMLGUIClient *client);
void plugSharedActionsToExternalGUI(
- const QValueList<QCString>& action_names, KXMLGUIClient *client);
+ const TQValueList<TQCString>& action_names, KXMLGUIClient *client);
/*! Unplugs action named \a action_name from a widget \a w.
- \sa plugSharedAction(const char *action_name, QWidget* w) */
- void unplugSharedAction(const char *action_name, QWidget* w);
+ \sa plugSharedAction(const char *action_name, TQWidget* w) */
+ void unplugSharedAction(const char *action_name, TQWidget* w);
/*! Like above, but creates alternative action as a copy of \a action_name,
with \a alternativeText set. When this action is activated, just original action
specified by \a action_name is activated. The aternative action has autmatically set name as:
action_name + "_alt".
\return newly created action or 0 if \a action_name not found. */
- KAction* plugSharedAction(const char *action_name, const QString& alternativeText, QWidget* w);
+ KAction* plugSharedAction(const char *action_name, const TQString& alternativeText, TQWidget* w);
/*! \return action named with \a name or NULL if there is no such action. */
virtual KAction* sharedAction(const char* action_name);
- inline QObject *receiver() const { return m_receiver; }
+ inline TQObject *receiver() const { return m_receiver; }
virtual void setAvailable(const char* action_name, bool set);
/*! Adds \a child of this proxy. Children will receive activateSharedAction() event,
If activateSharedAction() "event" is not consumed by the main proxy,
- we start to iterate over proxy children (in unspecified order) to and call
+ we start to iterate over proxy tqchildren (in unspecified order) to and call
activateSharedAction() on every child until one of them accept the "event".
- If proxy child is destroyed, it is automatically detached from its parent proxy.
- Parent proxy is 0 by default. This pointer is properly cleared when parent proxy is destroyed. */
+ If proxy child is destroyed, it is automatically detached from its tqparent proxy.
+ Parent proxy is 0 by default. This pointer is properly cleared when tqparent proxy is destroyed. */
void addActionProxyChild( KexiActionProxy* child );
void takeActionProxyChild( KexiActionProxy* child );
KexiSharedActionHost *m_host;
- QGuardedPtr<QObject> m_receiver;
- QAsciiDict< QPair<QSignal*,bool> > m_signals;
+ TQGuardedPtr<TQObject> m_receiver;
+ TQAsciiDict< TQPair<TQSignal*,bool> > m_signals;
- QPtrList<KexiActionProxy> m_sharedActionChildren;
+ TQPtrList<KexiActionProxy> m_sharedActionChildren;
- QPtrList<KAction> m_alternativeActions;
+ TQPtrList<KAction> m_alternativeActions;
KexiActionProxy* m_actionProxyParent;
- QObject m_signal_parent; //!< it's just to have common parent for owned signals
+ TQObject m_signal_parent; //!< it's just to have common tqparent for owned signals
//! For internal use by plugSharedActionToExternalGUI()
KAction_setEnabled_Helper *m_KAction_setEnabled_helper;
public:
- //! For internal use by addActionProxyChild(). \a parent can be 0.
- void setActionProxyParent_internal( KexiActionProxy* parent );
+ //! For internal use by addActionProxyChild(). \a tqparent can be 0.
+ void setActionProxyParent_internal( KexiActionProxy* tqparent );
//! @internal
KexiActionProxy *m_focusedChild;
diff --git a/kexi/core/kexiactionproxy_p.h b/kexi/core/kexiactionproxy_p.h
index 735792997..f22125231 100644
--- a/kexi/core/kexiactionproxy_p.h
+++ b/kexi/core/kexiactionproxy_p.h
@@ -20,14 +20,15 @@
#ifndef KEXIACTIONPROXY_P_H
#define KEXIACTIONPROXY_P_H
-#include <qobject.h>
+#include <tqobject.h>
class KexiActionProxy;
//! Helper class for KexiActionProxy::plugSharedActionToExternalGUI() method.
-class KAction_setEnabled_Helper : public QObject
+class KAction_setEnabled_Helper : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KAction_setEnabled_Helper(KexiActionProxy* proxy);
diff --git a/kexi/core/kexiblobbuffer.cpp b/kexi/core/kexiblobbuffer.cpp
index d66d69af3..d1f78c4a9 100644
--- a/kexi/core/kexiblobbuffer.cpp
+++ b/kexi/core/kexiblobbuffer.cpp
@@ -21,9 +21,9 @@
#include <assert.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qbuffer.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -47,11 +47,11 @@ class KexiBLOBBuffer::Private
{
}
Id_t maxId; //!< Used to compute maximal recently used identifier for unstored BLOB
-//! @todo will be changed to QHash<quint64, Item>
- QIntDict<Item> inMemoryItems; //!< for unstored BLOBs
- QIntDict<Item> storedItems; //!< for stored items
- QDict<Item> itemsByURL;
- QGuardedPtr<KexiDB::Connection> conn;
+//! @todo will be changed to TQHash<quint64, Item>
+ TQIntDict<Item> inMemoryItems; //!< for unstored BLOBs
+ TQIntDict<Item> storedItems; //!< for stored items
+ TQDict<Item> itemsByURL;
+ TQGuardedPtr<KexiDB::Connection> conn;
};
//-----------------
@@ -110,22 +110,22 @@ void KexiBLOBBuffer::Handle::setStoredWidthID(KexiBLOBBuffer::Id_t id)
//-----------------
-KexiBLOBBuffer::Item::Item(const QByteArray& data, KexiBLOBBuffer::Id_t ident, bool _stored,
- const QString& _name, const QString& _caption, const QString& _mimeType,
- Id_t _folderId, const QPixmap& pixmap)
+KexiBLOBBuffer::Item::Item(const TQByteArray& data, KexiBLOBBuffer::Id_t ident, bool _stored,
+ const TQString& _name, const TQString& _caption, const TQString& _mimeType,
+ Id_t _folderId, const TQPixmap& pixmap)
: name(_name), caption(_caption), mimeType(_mimeType), refs(0),
id(ident), folderId(_folderId), stored(_stored),
m_pixmapLoaded(new bool(false)/*workaround for pixmap() const*/)
{
if (pixmap.isNull())
- m_pixmap = new QPixmap();
+ m_pixmap = new TQPixmap();
else
- m_pixmap = new QPixmap(pixmap);
+ m_pixmap = new TQPixmap(pixmap);
if (data.isEmpty())
- m_data = new QByteArray();
+ m_data = new TQByteArray();
else
- m_data = new QByteArray(data);
+ m_data = new TQByteArray(data);
}
KexiBLOBBuffer::Item::~Item()
@@ -138,10 +138,10 @@ KexiBLOBBuffer::Item::~Item()
delete m_pixmapLoaded;
}
-QPixmap KexiBLOBBuffer::Item::pixmap() const
+TQPixmap KexiBLOBBuffer::Item::pixmap() const
{
if (!*m_pixmapLoaded && m_pixmap->isNull() && !m_data->isEmpty()) {
- QString type( KImageIO::typeForMime(mimeType) );
+ TQString type( KImageIO::typeForMime(mimeType) );
if (!KImageIO::canRead( type ) || !m_pixmap->loadFromData(*m_data, type.latin1())) {
//! @todo inform about error?
}
@@ -150,18 +150,18 @@ QPixmap KexiBLOBBuffer::Item::pixmap() const
return *m_pixmap;
}
-QByteArray KexiBLOBBuffer::Item::data() const
+TQByteArray KexiBLOBBuffer::Item::data() const
{
if (!m_data->isEmpty())
return *m_data;
if (m_data->isEmpty() && m_pixmap->isNull())
- return QByteArray();
+ return TQByteArray();
if (m_data->isEmpty() && !m_pixmap->isNull()) {
//convert pixmap to byte array
//(do it only on demand)
- QBuffer buffer( *m_data );
+ TQBuffer buffer( *m_data );
buffer.open( IO_WriteOnly );
m_pixmap->save( &buffer, mimeType.isEmpty() ? (const char*)"PNG"/*! @todo default? */ : mimeType.latin1() );
}
@@ -171,7 +171,7 @@ QByteArray KexiBLOBBuffer::Item::data() const
//-----------------
KexiBLOBBuffer::KexiBLOBBuffer()
- : QObject()
+ : TQObject()
, d(new Private())
{
Q_ASSERT(!m_buffer);
@@ -193,38 +193,38 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const KURL& url)
return KexiBLOBBuffer::Handle();
}
//! @todo what about searching by filename only and then compare data?
- Item * item = d->itemsByURL.find(url.prettyURL());
+ Item * item = d->itemsByURL.tqfind(url.prettyURL());
if (item)
return KexiBLOBBuffer::Handle(item);
- QString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
+ TQString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
//! @todo download the file if remote, then set fileName properly
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly)) {
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
- QString mimeType( KImageIO::mimeType( fileName ) );
+ TQString mimeType( KImageIO::mimeType( fileName ) );
- QByteArray data( f.readAll() );
+ TQByteArray data( f.readAll() );
if (f.status()!=IO_Ok) {
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
- QFileInfo fi(url.fileName());
- QString caption(fi.baseName().replace('_', " ").simplifyWhiteSpace());
+ TQFileInfo fi(url.fileName());
+ TQString caption(fi.baseName().tqreplace('_', " ").simplifyWhiteSpace());
item = new Item(data, ++d->maxId, /*!stored*/false, url.fileName(), caption, mimeType);
insertItem(item);
//cache
item->prettyURL = url.prettyURL();
- d->itemsByURL.replace(url.prettyURL(), item);
+ d->itemsByURL.tqreplace(url.prettyURL(), item);
return KexiBLOBBuffer::Handle(item);
}
-KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const QByteArray& data,
- const QString& name, const QString& caption, const QString& mimeType, KexiBLOBBuffer::Id_t identifier)
+KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const TQByteArray& data,
+ const TQString& name, const TQString& caption, const TQString& mimeType, KexiBLOBBuffer::Id_t identifier)
{
KexiBLOBBuffer::Id_t newIdentifier;
if (identifier>0)
@@ -237,17 +237,17 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::insertObject(const QByteArray& data,
return KexiBLOBBuffer::Handle(item);
}
-KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const QPixmap& pixmap)
+KexiBLOBBuffer::Handle KexiBLOBBuffer::insertPixmap(const TQPixmap& pixmap)
{
if (pixmap.isNull())
return KexiBLOBBuffer::Handle();
Item * item = new Item(
- QByteArray(), //(pixmap will be converted to byte array on demand)
+ TQByteArray(), //(pixmap will be converted to byte array on demand)
++d->maxId,
false, //not stored
- QString::null,
- QString::null,
+ TQString(),
+ TQString(),
"image/png", //!< @todo OK? What about jpegs?
0, //folder id
pixmap);
@@ -261,7 +261,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
if (id<=0)
return KexiBLOBBuffer::Handle();
if (stored) {
- Item *item = d->storedItems.find(id);
+ Item *item = d->storedItems.tqfind(id);
if (item || !d->conn)
return KexiBLOBBuffer::Handle(item);
//retrieve stored BLOB:
@@ -273,7 +273,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
//! @todo err msg
return KexiBLOBBuffer::Handle();
}
-/* QStringList where;
+/* TQStringList where;
where << "o_id";
KexiDB::PreparedStatement::Ptr st = d->conn->prepareStatement(
KexiDB::PreparedStatement::SelectStatement, *blobsTable, where);*/
@@ -284,13 +284,13 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
schema.addField( blobsTable->field("o_caption") );
schema.addField( blobsTable->field("o_mime") );
schema.addField( blobsTable->field("o_folder_id") );
- schema.addToWhereExpression(blobsTable->field("o_id"), QVariant((Q_LLONG)id));
+ schema.addToWhereExpression(blobsTable->field("o_id"), TQVariant((TQ_LLONG)id));
KexiDB::RowData rowData;
tristate res = d->conn->querySingleRecord(
schema,
-// QString::fromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=")
-// +QString::number(id),
+// TQString::tqfromLatin1("SELECT o_data, o_name, o_caption, o_mime FROM kexi__blobs where o_id=")
+// +TQString::number(id),
rowData);
if (res!=true || rowData.size()<4) {
//! @todo err msg
@@ -306,7 +306,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
rowData[1].toString(),
rowData[2].toString(),
rowData[3].toString(),
- (Id_t)rowData[4].toInt() //!< @todo folder id: fix Id_t for Qt4
+ (Id_t)rowData[4].toInt() //!< @todo folder id: fix Id_t for TQt4
);
insertItem(item);
@@ -314,7 +314,7 @@ KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id, bool stored)
//#endif
}
else
- return KexiBLOBBuffer::Handle(d->inMemoryItems.find(id));
+ return KexiBLOBBuffer::Handle(d->inMemoryItems.tqfind(id));
}
KexiBLOBBuffer::Handle KexiBLOBBuffer::objectForId(Id_t id)
diff --git a/kexi/core/kexiblobbuffer.h b/kexi/core/kexiblobbuffer.h
index bd593ab26..adf307a08 100644
--- a/kexi/core/kexiblobbuffer.h
+++ b/kexi/core/kexiblobbuffer.h
@@ -20,10 +20,10 @@
#ifndef KEXIBLOBBUFFER_H
#define KEXIBLOBBUFFER_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qdict.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqdict.h>
+#include <tqpixmap.h>
#include <kurl.h>
@@ -69,7 +69,7 @@ namespace KexiDB
by a single interger, memory can be handled more effectively.
Example use cases:
- A large pixmap file "abc.jpg" is loaded as QByteArray <b>once</b> and buffered:
+ A large pixmap file "abc.jpg" is loaded as TQByteArray <b>once</b> and buffered:
integer identifier is returned.
Then, multiple image widgets are using "abc.jpg" for displaying.
Duplicating an image widget means only duplicating it's properties
@@ -77,15 +77,16 @@ namespace KexiDB
Creating a new image widget and assiging the same "abc.jpg" pixmap, means only
referencing KexiBLOBBuffer using the same identifier.
*/
-class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
+class KEXICORE_EXPORT KexiBLOBBuffer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
private:
class Item;
public:
//! long integer for unique identifying blobs
-//! @todo Qt4: will be changed
+//! @todo TQt4: will be changed
typedef long Id_t;
//! Access to KexiBLOBBuffer singleton
@@ -116,17 +117,17 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
Handle& operator=(const Handle& handle);
- QByteArray data() const { return m_item ? m_item->data() : QByteArray(); }
+ TQByteArray data() const { return m_item ? m_item->data() : TQByteArray(); }
- QPixmap pixmap() const { return m_item ? m_item->pixmap() : QPixmap(); }
+ TQPixmap pixmap() const { return m_item ? m_item->pixmap() : TQPixmap(); }
/*! Sets "stored" flag to true by setting non-temporary identifier.
Only call this method for unstored (in memory) BLOBs */
void setStoredWidthID(Id_t id);
- QString originalFileName() const { return m_item ? m_item->name: QString::null; }
+ TQString originalFileName() const { return m_item ? m_item->name: TQString(); }
- QString mimeType() const { return m_item ? m_item->mimeType : QString::null; }
+ TQString mimeType() const { return m_item ? m_item->mimeType : TQString(); }
Id_t folderId() const { return m_item ? m_item->folderId : 0; }
@@ -159,11 +160,11 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
@param identifier Object's identifier. If positive, the "stored" flag for the data
will be set to true with \a identifer, otherwise (the default) the BLOB data will
have "stored" flag set to false, and a new temporary identifier will be assigned. */
- Handle insertObject(const QByteArray& data, const QString& name,
- const QString& caption, const QString& mimeType, Id_t identifier = 0);
+ Handle insertObject(const TQByteArray& data, const TQString& name,
+ const TQString& caption, const TQString& mimeType, Id_t identifier = 0);
/*! Inserts a new pixmap available in memory, e.g. coming from clipboard. */
- Handle insertPixmap(const QPixmap& pixmap);
+ Handle insertPixmap(const TQPixmap& pixmap);
/*! \return an object for a given \a id. If \a stored is true, stored BLOBs buffer
is browsed, otherwise unstored (in memory) BLOBs buffer is browsed.
@@ -188,29 +189,29 @@ class KEXICORE_EXPORT KexiBLOBBuffer : public QObject
private:
class KEXICORE_EXPORT Item {
public:
- Item(const QByteArray& data, Id_t ident,
+ Item(const TQByteArray& data, Id_t ident,
bool stored,
- const QString& name = QString::null,
- const QString& caption = QString::null,
- const QString& mimeType = QString::null,
+ const TQString& name = TQString(),
+ const TQString& caption = TQString(),
+ const TQString& mimeType = TQString(),
Id_t folderId = 0,
- const QPixmap& pixmap = QPixmap());
+ const TQPixmap& pixmap = TQPixmap());
~Item();
- QPixmap pixmap() const;
- QByteArray data() const;
+ TQPixmap pixmap() const;
+ TQByteArray data() const;
// KexiBLOBBuffer* buf;
// KURL url;
- QString name;
- QString caption; //!< @todo for future use within image gallery
- QString mimeType;
+ TQString name;
+ TQString caption; //!< @todo for future use within image gallery
+ TQString mimeType;
uint refs;
Id_t id;
Id_t folderId;
bool stored : 1;
- QString prettyURL; //!< helper
+ TQString prettyURL; //!< helper
private:
- QByteArray *m_data;
- QPixmap *m_pixmap;
+ TQByteArray *m_data;
+ TQPixmap *m_pixmap;
bool *m_pixmapLoaded; //!< *m_pixmapLoaded will be set in Info::pixmap(),
//!< to avoid multiple pixmap decoding when it previously failed
friend class KexiBLOBBuffer;
diff --git a/kexi/core/kexicontexthelp.cpp b/kexi/core/kexicontexthelp.cpp
index 4ccfa2fee..48bf6b516 100644
--- a/kexi/core/kexicontexthelp.cpp
+++ b/kexi/core/kexicontexthelp.cpp
@@ -23,21 +23,21 @@
#include <kapplication.h>
#include <klocale.h>
#include <kaction.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <kiconloader.h>
-KexiContextHelp::KexiContextHelp(KexiMainWindow *view, QWidget *parent)
- :KoContextHelpWidget(parent,"kexi_contexthelp")
+KexiContextHelp::KexiContextHelp(KexiMainWindow *view, TQWidget *tqparent)
+ :KoContextHelpWidget(tqparent,"kexi_contexthelp")
{
kdDebug()<<"KexiContextHelp::KexiContextHelp()"<<endl;
setCaption(i18n("Context Help"));
setIcon(SmallIcon("help"));
- connect(this,SIGNAL(linkClicked( const QString& )),
- this,SLOT(linkClickedInternal( const QString& )));
+ connect(this,TQT_SIGNAL(linkClicked( const TQString& )),
+ this,TQT_SLOT(linkClickedInternal( const TQString& )));
}
-void KexiContextHelp::linkClickedInternal(const QString& link) {
+void KexiContextHelp::linkClickedInternal(const TQString& link) {
kdDebug()<<"KexiContextHelp: Link: "<<link<<endl;
unhandledLink(link);
}
diff --git a/kexi/core/kexicontexthelp.h b/kexi/core/kexicontexthelp.h
index 3a97e20c1..c1cd2a0b3 100644
--- a/kexi/core/kexicontexthelp.h
+++ b/kexi/core/kexicontexthelp.h
@@ -27,15 +27,16 @@
class KEXICORE_EXPORT KexiContextHelp : public KoContextHelpWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiContextHelp(KexiMainWindow *view, QWidget *parent=0);
+ KexiContextHelp(KexiMainWindow *view, TQWidget *tqparent=0);
~KexiContextHelp();
private slots:
- void linkClickedInternal(const QString &link);
+ void linkClickedInternal(const TQString &link);
signals:
- void unhandledLink( const QString& link );
+ void unhandledLink( const TQString& link );
};
#endif
diff --git a/kexi/core/kexicontexthelp_p.h b/kexi/core/kexicontexthelp_p.h
index ab9af1665..f9abb456f 100644
--- a/kexi/core/kexicontexthelp_p.h
+++ b/kexi/core/kexicontexthelp_p.h
@@ -27,9 +27,9 @@ public:
text="";
iconName="";
}
- QString caption;
- QString text;
- QString iconName;
+ TQString caption;
+ TQString text;
+ TQString iconName;
};
#endif
diff --git a/kexi/core/kexidataiteminterface.cpp b/kexi/core/kexidataiteminterface.cpp
index 8fe78c853..2dd9c8130 100644
--- a/kexi/core/kexidataiteminterface.cpp
+++ b/kexi/core/kexidataiteminterface.cpp
@@ -33,7 +33,7 @@ KexiDataItemChangesListener::~KexiDataItemChangesListener()
KexiDataItemInterface::KexiDataItemInterface()
: m_listener(0)
- , m_listenerIsQObject(false)
+ , m_listenerIsTQObject(false)
, m_parentDataItemInterface(0)
, m_hasFocusableWidget(true)
, m_disable_signalValueChanged(false)
@@ -45,15 +45,15 @@ KexiDataItemInterface::~KexiDataItemInterface()
{
}
-void KexiDataItemInterface::setValue(const QVariant& value, const QVariant& add,
- bool removeOld, const QVariant* visibleValue)
+void KexiDataItemInterface::setValue(const TQVariant& value, const TQVariant& add,
+ bool removeOld, const TQVariant* visibleValue)
{
m_disable_signalValueChanged = true; //to prevent emmiting valueChanged()
//needed? clear();
- if (dynamic_cast<QObject*>(this)) {
+ if (dynamic_cast<TQObject*>(this)) {
kdDebug() << "KexiDataItemInterface::setValue(): " <<
- dynamic_cast<QObject*>(this)->className() << " "
- << dynamic_cast<QWidget*>(this)->name()
+ dynamic_cast<TQObject*>(this)->className() << " "
+ << dynamic_cast<TQWidget*>(this)->name()
<< " value=" << value << " add=" << add << endl;
}
m_origValue = value;
@@ -63,7 +63,7 @@ void KexiDataItemInterface::setValue(const QVariant& value, const QVariant& add,
m_disable_signalValueChanged = false;
}
-void KexiDataItemInterface::setVisibleValueInternal(const QVariant& value)
+void KexiDataItemInterface::setVisibleValueInternal(const TQVariant& value)
{
Q_UNUSED(value);
}
@@ -92,7 +92,7 @@ bool KexiDataItemInterface::valueChanged()
}
/*
-void KexiDataItemInterface::setValue(const QVariant& value)
+void KexiDataItemInterface::setValue(const TQVariant& value)
{
m_disable_signalValueChanged = true; //to prevent emmiting valueChanged()
setValueInternal( value );
@@ -101,7 +101,7 @@ void KexiDataItemInterface::setValue(const QVariant& value)
KexiDataItemChangesListener* KexiDataItemInterface::listener()
{
- if (!m_listener || !m_listenerIsQObject)
+ if (!m_listener || !m_listenerIsTQObject)
return m_listener;
if (!m_listenerObject)
m_listener = 0; //destroyed, update pointer
@@ -111,12 +111,12 @@ KexiDataItemChangesListener* KexiDataItemInterface::listener()
void KexiDataItemInterface::installListener(KexiDataItemChangesListener* listener)
{
m_listener = listener;
- m_listenerIsQObject = dynamic_cast<QObject*>(listener);
- if (m_listenerIsQObject)
- m_listenerObject = dynamic_cast<QObject*>(listener);
+ m_listenerIsTQObject = dynamic_cast<TQObject*>(listener);
+ if (m_listenerIsTQObject)
+ m_listenerObject = dynamic_cast<TQObject*>(listener);
}
-void KexiDataItemInterface::showFocus( const QRect& r, bool readOnly )
+void KexiDataItemInterface::showFocus( const TQRect& r, bool readOnly )
{
Q_UNUSED(r);
Q_UNUSED(readOnly);
@@ -135,9 +135,9 @@ bool KexiDataItemInterface::valueIsValid()
return true;
}
-void KexiDataItemInterface::setParentDataItemInterface(KexiDataItemInterface* parentDataItemInterface)
+void KexiDataItemInterface::setParentDataItemInterface(KexiDataItemInterface* tqparentDataItemInterface)
{
- m_parentDataItemInterface = parentDataItemInterface;
+ m_parentDataItemInterface = tqparentDataItemInterface;
}
bool KexiDataItemInterface::cursorAtNewRow()
diff --git a/kexi/core/kexidataiteminterface.h b/kexi/core/kexidataiteminterface.h
index dbd38005e..db6a9afe4 100644
--- a/kexi/core/kexidataiteminterface.h
+++ b/kexi/core/kexidataiteminterface.h
@@ -20,9 +20,9 @@
#ifndef KEXIDATAITEMINTERFACE_H
#define KEXIDATAITEMINTERFACE_H
-#include <qvariant.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
class KexiDataItemInterface;
namespace KexiDB {
@@ -54,7 +54,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
KexiDataItemInterface();
virtual ~KexiDataItemInterface();
- /*! Just initializes \a value, and calls setValueInternal(const QString& add, bool removeOld).
+ /*! Just initializes \a value, and calls setValueInternal(const TQString& add, bool removeOld).
If \a removeOld is true, current value is set up as \a add.
If \a removeOld if false, current value is set up as \a value + \a add.
\a value is stored as 'old value' -it'd be usable in the future
@@ -66,8 +66,8 @@ class KEXICORE_EXPORT KexiDataItemInterface
(usually a text of image) differs from the value of the widget (a numeric index).
This method is called by table view's and form's editors. */
- void setValue(const QVariant& value, const QVariant& add = QVariant(), bool removeOld = false,
- const QVariant* visibleValue = 0);
+ void setValue(const TQVariant& value, const TQVariant& add = TQVariant(), bool removeOld = false,
+ const TQVariant* visibleValue = 0);
//! \return field information for this item
virtual KexiDB::Field *field() const = 0;
@@ -84,10 +84,10 @@ class KEXICORE_EXPORT KexiDataItemInterface
// //! Sets value \a value for a widget.
// //! Just calls setValueInternal(), but also blocks valueChanged()
// //! as you we don't want to react on our own change
-// void setValue(const QVariant& value);
+// void setValue(const TQVariant& value);
//! \return value currently represented by this item.
- virtual QVariant value() = 0;
+ virtual TQVariant value() = 0;
//! \return true if editor's value is valid for a given type
//! Used for checking if an entered value is valid,
@@ -109,7 +109,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
//! \return value that should be displayed for this item.
//! Only used for items like combo box, where real value is an integer while
//! displayed value is usually a text. For other item types this method should be empty.
- virtual QVariant visibleValue() { return QVariant(); }
+ virtual TQVariant visibleValue() { return TQVariant(); }
/*! \return 'readOnly' flag for this item. The flag is usually taken from
the item's widget, e.g. KLineEdit::isReadOnly().
@@ -117,7 +117,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
virtual bool isReadOnly() const { return false; }
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget() = 0;
+ virtual TQWidget* widget() = 0;
/*! Hides item's widget, if available. */
virtual void hideWidget() { if (widget()) widget()->hide(); }
@@ -165,7 +165,7 @@ class KEXICORE_EXPORT KexiDataItemInterface
If \a readOnly is true, additional elements should be visually disabled,
e.g. dropdown button of the combobox editor should be disabled.
For reimplementation. By default does nothing. */
- virtual void showFocus( const QRect& r, bool readOnly );
+ virtual void showFocus( const TQRect& r, bool readOnly );
/*! Hides additional elements that are needed for indicating that the current cell
is selected.
@@ -188,20 +188,20 @@ class KEXICORE_EXPORT KexiDataItemInterface
bool cursorAtNewRow();
/*! Sets a pointer to a Parent Data Item Interface. This pointer is 0 by default,
- but can be set by parent widget if this interface is a building block of a larger data widget.
+ but can be set by tqparent widget if this interface is a building block of a larger data widget.
It is the case for KexiDBFieldEdit widget (see KexiDBFieldEdit::createEditor()). Use with care.
signalValueChanged() method will check this pointer, and if it's not 0,
m_parentDataItemInterface->signalValueChanged() is called, so a changes can be signalled at higher level. */
- void setParentDataItemInterface(KexiDataItemInterface* parentDataItemInterface);
+ void setParentDataItemInterface(KexiDataItemInterface* tqparentDataItemInterface);
/*! \return a pointer to a Parent Data Item Interface.
@see setParentDataItemInterface() */
- inline KexiDataItemInterface* parentInterface() const { return m_parentDataItemInterface; }
+ inline KexiDataItemInterface* tqparentInterface() const { return m_parentDataItemInterface; }
/*! Handles action having standard name \a actionName.
Action could be: "edit_cut", "edit_paste", etc.
For reimplementation. */
- virtual void handleAction(const QString& actionName) { Q_UNUSED(actionName); }
+ virtual void handleAction(const TQString& actionName) { Q_UNUSED(actionName); }
protected:
/*! Initializes this editor with \a add value, which should be somewhat added to the current
@@ -209,37 +209,37 @@ class KEXICORE_EXPORT KexiDataItemInterface
If \a removeOld is true, a value should be set to \a add, otherwise
-it should be set to current \a m_origValue + \a add, if possible.
Implement this. */
- virtual void setValueInternal(const QVariant& add, bool removeOld) = 0;
+ virtual void setValueInternal(const TQVariant& add, bool removeOld) = 0;
/*! Initializes this editor with \a value visible value.
This is currently used only in case of the combo box form widget, where displayed content
(usually a text of image) differs from the value of the widget (a numeric index).
For implementation in the combo box widget, by default does nothing. */
- virtual void setVisibleValueInternal(const QVariant& value);
+ virtual void setVisibleValueInternal(const TQVariant& value);
// //! Sets value \a value for a widget.
// //! Implement this method to allow setting value for this widget item.
-// virtual void setValueInternal(const QVariant& value) = 0;
+// virtual void setValueInternal(const TQVariant& value) = 0;
/*! Call this in your implementation when value changes,
- so installed listener can react on this change. If there is a parent data item defined
- (see setParentDataItemInterface()), parent's signalValueChanged() method will be called instead. */
+ so installed listener can react on this change. If there is a tqparent data item defined
+ (see setParentDataItemInterface()), tqparent's signalValueChanged() method will be called instead. */
virtual void signalValueChanged();
/*! Used to perform some actions before signalValueChanged() call.
- We need this because the intrface is not QObject and thus has got no real signals.
+ We need this because the intrface is not TQObject and thus has got no real signals.
Used in KexiDBComboBox. */
virtual void beforeSignalValueChanged() {};
KexiDataItemChangesListener* listener();
-//moved to KexiFormDataItemInterface: QString m_dataSource;
- QGuardedPtr<QObject> m_listenerObject;
+//moved to KexiFormDataItemInterface: TQString m_dataSource;
+ TQGuardedPtr<TQObject> m_listenerObject;
KexiDataItemChangesListener* m_listener;
- bool m_listenerIsQObject;
- QVariant m_origValue;
+ bool m_listenerIsTQObject;
+ TQVariant m_origValue;
- /*! @see parentDataItemInterface() */
+ /*! @see tqparentDataItemInterface() */
KexiDataItemInterface* m_parentDataItemInterface;
bool m_hasFocusableWidget : 1;
bool m_disable_signalValueChanged : 1;
diff --git a/kexi/core/kexidbconnectionset.cpp b/kexi/core/kexidbconnectionset.cpp
index 1a0eb7745..f548d82bb 100644
--- a/kexi/core/kexidbconnectionset.cpp
+++ b/kexi/core/kexidbconnectionset.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <kstandarddirs.h>
-#include <qfile.h>
+#include <tqfile.h>
//! @internal
class KexiDBConnectionSetPrivate
@@ -36,13 +36,13 @@ public:
maxid=-1;
}
KexiDB::ConnectionData::List list;
- QMap<KexiDB::ConnectionData*, QString> filenamesForData;
- QDict<KexiDB::ConnectionData> dataForFilenames;
+ TQMap<KexiDB::ConnectionData*, TQString> filenamesForData;
+ TQDict<KexiDB::ConnectionData> dataForFilenames;
int maxid;
};
KexiDBConnectionSet::KexiDBConnectionSet()
-: QObject()
+: TQObject()
, d(new KexiDBConnectionSetPrivate())
{
}
@@ -52,7 +52,7 @@ KexiDBConnectionSet::~KexiDBConnectionSet()
delete d;
}
-bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const QString& _filename)
+bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const TQString& _filename)
{
if (!data)
return false;
@@ -60,27 +60,27 @@ bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const
data->id = d->maxid+1;
//TODO: check for id-duplicates
- d->maxid = QMAX(d->maxid,data->id);
+ d->maxid = TQMAX(d->maxid,data->id);
// d->list.append(data);
- QString filename( _filename );
+ TQString filename( _filename );
bool generateUniqueFilename = filename.isEmpty()
|| !filename.isEmpty() && data==d->dataForFilenames[filename];
if (generateUniqueFilename) {
- QString dir = KGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/);
+ TQString dir = KGlobal::dirs()->saveLocation("data", "kexi/connections/", false /*!create*/);
if (dir.isEmpty())
return false;
- QString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) );
+ TQString baseFilename( dir + (data->hostName.isEmpty() ? "localhost" : data->hostName) );
int i = 0;
- while (KStandardDirs::exists(baseFilename+(i>0 ? QString::number(i) : QString::null)+".kexic"))
+ while (KStandardDirs::exists(baseFilename+(i>0 ? TQString::number(i) : TQString())+".kexic"))
i++;
if (!KStandardDirs::exists(dir)) {
//make 'connections' dir and protect it
if (!KStandardDirs::makeDir(dir, 0700))
return false;
}
- filename = baseFilename+(i>0 ? QString::number(i) : QString::null)+".kexic";
+ filename = baseFilename+(i>0 ? TQString::number(i) : TQString())+".kexic";
}
addConnectionDataInternal(data, filename);
bool result = saveConnectionData(data, data);
@@ -89,7 +89,7 @@ bool KexiDBConnectionSet::addConnectionData(KexiDB::ConnectionData *data, const
return result;
}
-void KexiDBConnectionSet::addConnectionDataInternal(KexiDB::ConnectionData *data, const QString& filename)
+void KexiDBConnectionSet::addConnectionDataInternal(KexiDB::ConnectionData *data, const TQString& filename)
{
d->filenamesForData.insert(data, filename);
d->dataForFilenames.insert(filename, data);
@@ -101,10 +101,10 @@ bool KexiDBConnectionSet::saveConnectionData(KexiDB::ConnectionData *oldData,
{
if (!oldData || !newData)
return false;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( oldData );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( oldData );
if (it == d->filenamesForData.constEnd() || it.data().isEmpty())
return false;
- const QString filename( it.data() );
+ const TQString filename( it.data() );
KexiDBConnShortcutFile shortcutFile(filename);
if (!shortcutFile.saveConnectionData(*newData, newData->savePassword)) // true/*savePassword*/))
return false;
@@ -115,8 +115,8 @@ bool KexiDBConnectionSet::saveConnectionData(KexiDB::ConnectionData *oldData,
void KexiDBConnectionSet::removeConnectionDataInternal(KexiDB::ConnectionData *data)
{
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
- const QString filename( it.data() );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
+ const TQString filename( it.data() );
d->filenamesForData.remove(data);
d->dataForFilenames.remove(filename);
d->list.removeRef(data);
@@ -126,10 +126,10 @@ bool KexiDBConnectionSet::removeConnectionData(KexiDB::ConnectionData *data)
{
if (!data)
return false;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
if (it == d->filenamesForData.constEnd() || it.data().isEmpty())
return false;
- QFile file( it.data() );
+ TQFile file( it.data() );
if (!file.remove())
return false;
removeConnectionDataInternal(data);
@@ -151,14 +151,14 @@ void KexiDBConnectionSet::clear()
void KexiDBConnectionSet::load()
{
clear();
-// QStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
+// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl;
- QStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
+ TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
// kexidbg << files << endl;
- foreach(QStringList::ConstIterator, it, files) {
+ foreach(TQStringList::ConstIterator, it, files) {
KexiDB::ConnectionData *data = new KexiDB::ConnectionData();
KexiDBConnShortcutFile shortcutFile( *it );
if (!shortcutFile.loadConnectionData(*data)) {
@@ -169,15 +169,15 @@ void KexiDBConnectionSet::load()
}
}
-QString KexiDBConnectionSet::fileNameForConnectionData(KexiDB::ConnectionData *data) const
+TQString KexiDBConnectionSet::fileNameForConnectionData(KexiDB::ConnectionData *data) const
{
if (!data)
- return QString::null;
- QMap<KexiDB::ConnectionData*, QString>::ConstIterator it = d->filenamesForData.find( data );
- return (it == d->filenamesForData.constEnd()) ? QString::null : it.data();
+ return TQString();
+ TQMap<KexiDB::ConnectionData*, TQString>::ConstIterator it = d->filenamesForData.tqfind( data );
+ return (it == d->filenamesForData.constEnd()) ? TQString() : it.data();
}
-KexiDB::ConnectionData* KexiDBConnectionSet::connectionDataForFileName(const QString& fileName) const
+KexiDB::ConnectionData* KexiDBConnectionSet::connectionDataForFileName(const TQString& fileName) const
{
return d->dataForFilenames[fileName];
}
diff --git a/kexi/core/kexidbconnectionset.h b/kexi/core/kexidbconnectionset.h
index 78d4649a3..fc831cdcd 100644
--- a/kexi/core/kexidbconnectionset.h
+++ b/kexi/core/kexidbconnectionset.h
@@ -20,13 +20,13 @@
#ifndef KEXIDBCONNSET_H
#define KEXIDBCONNSET_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kexidb/connectiondata.h>
class KexiDBConnectionSetPrivate;
/*! Stores information about multiple connection-data items. */
-class KEXICORE_EXPORT KexiDBConnectionSet : public QObject
+class KEXICORE_EXPORT KexiDBConnectionSet : public TQObject
{
public:
KexiDBConnectionSet();
@@ -43,7 +43,7 @@ public:
saveConnectionData() is called automatically, if there's no \a filename provided
or the filename is already used, a new unique will be generated.
\return true on successful creating corresponding .kexic file */
- bool addConnectionData(KexiDB::ConnectionData *data, const QString& filename = QString::null);
+ bool addConnectionData(KexiDB::ConnectionData *data, const TQString& filename = TQString());
/*! Saves changes made to \a oldData to a file which name has been provided by addConnectionData().
This function does nothing if \a oldData hasn't been added to this set.
@@ -58,16 +58,16 @@ public:
const KexiDB::ConnectionData::List& list() const;
/*! \return a filename of a connection data file for \a data. */
- QString fileNameForConnectionData(KexiDB::ConnectionData *data) const;
+ TQString fileNameForConnectionData(KexiDB::ConnectionData *data) const;
/*! \return a connection data for a .kexic shortcut filename.
0 is returned if the filename does not match. */
- KexiDB::ConnectionData* connectionDataForFileName(const QString& fileName) const;
+ KexiDB::ConnectionData* connectionDataForFileName(const TQString& fileName) const;
private:
/*! Removes all connection data items from this set. */
void clear();
- void addConnectionDataInternal(KexiDB::ConnectionData *data, const QString& filename);
+ void addConnectionDataInternal(KexiDB::ConnectionData *data, const TQString& filename);
void removeConnectionDataInternal(KexiDB::ConnectionData *data);
KexiDBConnectionSetPrivate *d;
diff --git a/kexi/core/kexidbshortcutfile.cpp b/kexi/core/kexidbshortcutfile.cpp
index 4a503d432..451eb66a9 100644
--- a/kexi/core/kexidbshortcutfile.cpp
+++ b/kexi/core/kexidbshortcutfile.cpp
@@ -25,8 +25,8 @@
#include <kconfig.h>
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qdir.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
//! Version of the KexiDBShortcutFile format.
#define KexiDBShortcutFile_version 2
@@ -45,14 +45,14 @@ class KexiDBShortcutFile::Private
: isDatabaseShortcut(true)
{
}
- QString fileName;
+ TQString fileName;
bool isDatabaseShortcut : 1;
};
-KexiDBShortcutFile::KexiDBShortcutFile( const QString& fileName )
+KexiDBShortcutFile::KexiDBShortcutFile( const TQString& fileName )
: d( new KexiDBShortcutFile::Private() )
{
- d->fileName = QDir(fileName).absPath();
+ d->fileName = TQDir(fileName).absPath();
}
KexiDBShortcutFile::~KexiDBShortcutFile()
@@ -60,16 +60,16 @@ KexiDBShortcutFile::~KexiDBShortcutFile()
delete d;
}
-bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupKey)
+bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, TQString* _groupKey)
{
KConfig config(d->fileName, true /* readOnly */, false /* local */ );
config.setGroup("File Information");
data.formatVersion = config.readNumEntry("version", KexiDBShortcutFile_version);
- QString groupKey;
+ TQString groupKey;
if (!_groupKey || _groupKey->isEmpty()) {
- QStringList groups(config.groupList());
- foreach (QStringList::ConstIterator, it, groups) {
+ TQStringList groups(config.groupList());
+ foreach (TQStringList::ConstIterator, it, groups) {
if ((*it).lower()!="file information") {
groupKey = *it;
break;
@@ -89,7 +89,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
}
config.setGroup(groupKey);
- QString type( config.readEntry("type", "database").lower() );
+ TQString type( config.readEntry("type", "database").lower() );
if (type=="database") {
d->isDatabaseShortcut = true;
@@ -97,7 +97,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
d->isDatabaseShortcut = false;
}
else {
- //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").arg(group).arg(type)
+ //ERR: i18n("No valid "type" field specified for section \"%1\": unknown value \"%2\".").tqarg(group).tqarg(type)
return false;
}
@@ -109,26 +109,26 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
<< " engine=" << config.readEntry("engine")
<< " server=" << config.readEntry("server")
<< " user=" << config.readEntry("user")
- << " password=" << QString().fill('*', config.readEntry("password").length())
+ << " password=" << TQString().fill('*', config.readEntry("password").length())
<< " comment=" << config.readEntry("comment")
<< endl;*/
//no filename by default
- data.connectionData()->setFileName(QString::null);
+ data.connectionData()->setFileName(TQString());
if (d->isDatabaseShortcut) {
data.setCaption( config.readEntry("caption") );
data.setDescription( config.readEntry("comment") );
- data.connectionData()->description = QString::null;
- data.connectionData()->caption = QString::null; /* connection name is not specified... */
+ data.connectionData()->description = TQString();
+ data.connectionData()->caption = TQString(); /* connection name is not specified... */
data.setDatabaseName( config.readEntry("name") );
}
else {
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->caption = config.readEntry("caption");
- data.setDescription( QString::null );
+ data.setDescription( TQString() );
data.connectionData()->description = config.readEntry("comment");
- data.setDatabaseName( QString::null ); /* db name is not specified... */
+ data.setDatabaseName( TQString() ); /* db name is not specified... */
}
data.connectionData()->driverName = config.readEntry("engine");
if (data.connectionData()->driverName.isEmpty()) {
@@ -156,7 +156,7 @@ bool KexiDBShortcutFile::loadProjectData(KexiProjectData& data, QString* _groupK
}
bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
- bool savePassword, QString* _groupKey, bool overwriteFirstGroup)
+ bool savePassword, TQString* _groupKey, bool overwriteFirstGroup)
{
KConfig config(d->fileName, false /*rw*/, false /* local */);
config.setGroup("File Information");
@@ -169,16 +169,16 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
const bool thisIsConnectionData = data.databaseName().isEmpty();
//use or find a nonempty group key
- QString groupKey;
+ TQString groupKey;
if (_groupKey && !_groupKey->isEmpty()) {
groupKey = *_groupKey;
}
else {
- QString groupPrefix;
- const QStringList groups(config.groupList());
+ TQString groupPrefix;
+ const TQStringList groups(config.groupList());
if (overwriteFirstGroup && !groups.isEmpty()) {
// groupKey = groups.first(); //found
- foreach (QStringList::ConstIterator, it, groups) {
+ foreach (TQStringList::ConstIterator, it, groups) {
if ((*it).lower()!="file information") {
groupKey = *it;
break;
@@ -194,9 +194,9 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
groupPrefix = "Database%1"; //do not i18n!
int number = 1;
- while (config.hasGroup(groupPrefix.arg(number))) //a new group key couldn't exist
+ while (config.hasGroup(groupPrefix.tqarg(number))) //a new group key couldn't exist
number++;
- groupKey = groupPrefix.arg(number);
+ groupKey = groupPrefix.tqarg(number);
}
if (_groupKey) //return this one (generated or found)
*_groupKey = groupKey;
@@ -233,7 +233,7 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
config.writeEntry("password", data.constConnectionData()->password);
}
else {
- QString encryptedPassword = data.constConnectionData()->password;
+ TQString encryptedPassword = data.constConnectionData()->password;
KexiUtils::simpleCrypt(encryptedPassword);
config.writeEntry("encryptedPassword", encryptedPassword);
encryptedPassword.fill(' '); //for security
@@ -247,14 +247,14 @@ bool KexiDBShortcutFile::saveProjectData(const KexiProjectData& data,
return true;
}
-QString KexiDBShortcutFile::fileName() const
+TQString KexiDBShortcutFile::fileName() const
{
return d->fileName;
}
//---------------------------------------------
-KexiDBConnShortcutFile::KexiDBConnShortcutFile( const QString& fileName )
+KexiDBConnShortcutFile::KexiDBConnShortcutFile( const TQString& fileName )
: KexiDBShortcutFile( fileName )
{
}
@@ -263,7 +263,7 @@ KexiDBConnShortcutFile::~KexiDBConnShortcutFile()
{
}
-bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, QString* _groupKey)
+bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, TQString* _groupKey)
{
KexiProjectData pdata(data);
if (!loadProjectData(pdata, _groupKey))
@@ -273,7 +273,7 @@ bool KexiDBConnShortcutFile::loadConnectionData(KexiDB::ConnectionData& data, QS
}
bool KexiDBConnShortcutFile::saveConnectionData(const KexiDB::ConnectionData& data,
- bool savePassword, QString* groupKey, bool overwriteFirstGroup)
+ bool savePassword, TQString* groupKey, bool overwriteFirstGroup)
{
KexiProjectData pdata(data);
return saveProjectData(pdata, savePassword, groupKey, overwriteFirstGroup);
@@ -286,14 +286,14 @@ bool KexiDBConnShortcutFile::saveConnectionData(const KexiDB::ConnectionData& da
bool KexiDBConnSetShortcutFiles::loadConnectionDataSet(KexiDBConnectionSet& set)
{
set.clear();
-// QStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
+// TQStringList dirs( KGlobal::dirs()->findDirs("data", "kexi/connections") );
// kexidbg << dirs << endl;
- QStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
+ TQStringList files( KGlobal::dirs()->findAllResources("data", "kexi/connections/*.kexic") );
// //also try for capital file extension
// files += KGlobal::dirs()->findAllResources("data", "kexi/connections/*.KEXIC");
kexidbg << files << endl;
- foreach(QStringList::ConstIterator, it, files) {
+ foreach(TQStringList::ConstIterator, it, files) {
KexiDB::ConnectionData *data = new KexiDB::ConnectionData();
KexiDBConnShortcutFile shortcutFile( *it );
if (!shortcutFile.loadConnectionData(*data)) {
diff --git a/kexi/core/kexidbshortcutfile.h b/kexi/core/kexidbshortcutfile.h
index 3dfa9c13d..382f470fe 100644
--- a/kexi/core/kexidbshortcutfile.h
+++ b/kexi/core/kexidbshortcutfile.h
@@ -20,7 +20,7 @@
#ifndef KEXIDBSHORTCUTFILE_H
#define KEXIDBSHORTCUTFILE_H
-#include <qstring.h>
+#include <tqstring.h>
class KexiProjectData;
namespace KexiDB { class ConnectionData; }
@@ -34,7 +34,7 @@ class KEXICORE_EXPORT KexiDBShortcutFile
{
public:
/*! Creates a new object for \a fileName. */
- KexiDBShortcutFile( const QString& fileName );
+ KexiDBShortcutFile( const TQString& fileName );
~KexiDBShortcutFile();
@@ -43,7 +43,7 @@ class KEXICORE_EXPORT KexiDBShortcutFile
\a groupKey, if provided will be set to a group key,
so you can later use it in saveConnectionData().
\return true on success. */
- bool loadProjectData(KexiProjectData& data, QString* groupKey = 0);
+ bool loadProjectData(KexiProjectData& data, TQString* groupKey = 0);
/*! Saves project data \a data (with connection data) to a shortcut file.
If \a storePassword is true, password will be saved in the file,
@@ -54,10 +54,10 @@ class KEXICORE_EXPORT KexiDBShortcutFile
containing single connection data, what's used for storing connections repository.
\return true on success. */
bool saveProjectData(const KexiProjectData& data, bool savePassword,
- QString* groupKey = 0, bool overwriteFirstGroup = true);
+ TQString* groupKey = 0, bool overwriteFirstGroup = true);
//! \return filename provided on this object's construction. */
- QString fileName() const;
+ TQString fileName() const;
protected:
class Private;
@@ -73,7 +73,7 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
{
public:
/*! Creates a new object for \a fileName. */
- KexiDBConnShortcutFile( const QString& fileName );
+ KexiDBConnShortcutFile( const TQString& fileName );
~KexiDBConnShortcutFile();
@@ -81,7 +81,7 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
\a groupKey, if provided will be set to a group key,
so you can later use it in saveConnectionData().
\return true on success. */
- bool loadConnectionData(KexiDB::ConnectionData& data, QString* groupKey = 0);
+ bool loadConnectionData(KexiDB::ConnectionData& data, TQString* groupKey = 0);
/*! Saves connection data \a data to a shortcut file.
If \a storePassword is true, password will be saved in the file,
@@ -92,10 +92,10 @@ class KEXICORE_EXPORT KexiDBConnShortcutFile : protected KexiDBShortcutFile
containing single connection data, what's used for storing connections repository.
\return true on success. */
bool saveConnectionData(const KexiDB::ConnectionData& data,
- bool savePassword, QString* groupKey = 0, bool overwriteFirstGroup = true);
+ bool savePassword, TQString* groupKey = 0, bool overwriteFirstGroup = true);
//! \return filename provided on this object's construction. */
- QString fileName() const { return KexiDBShortcutFile::fileName(); }
+ TQString fileName() const { return KexiDBShortcutFile::fileName(); }
protected:
};
diff --git a/kexi/core/kexidialogbase.cpp b/kexi/core/kexidialogbase.cpp
index 2f94e661f..1469575b1 100644
--- a/kexi/core/kexidialogbase.cpp
+++ b/kexi/core/kexidialogbase.cpp
@@ -33,17 +33,17 @@
#include <kexidb/utils.h>
#include <kexiutils/utils.h>
-#include <qwidgetstack.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
+#include <tqwidgetstack.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kapplication.h>
#include <kiconloader.h>
-KexiDialogBase::KexiDialogBase(KexiMainWindow *parent, const QString &caption)
- : KMdiChildView(caption, parent, "KexiDialogBase")
- , KexiActionProxy(this, parent)
+KexiDialogBase::KexiDialogBase(KexiMainWindow *tqparent, const TQString &caption)
+ : KMdiChildView(caption, tqparent, "KexiDialogBase")
+ , KexiActionProxy(TQT_TQOBJECT(this), tqparent)
, m_isRegistered(false)
, m_origCaption(caption)
, m_schemaData(0)
@@ -54,17 +54,17 @@ KexiDialogBase::KexiDialogBase(KexiMainWindow *parent, const QString &caption)
m_supportedViewModes = 0; //will be set by KexiPart
m_openedViewModes = 0;
m_currentViewMode = Kexi::NoViewMode; //no view available yet
- m_parentWindow = parent;
+ m_parentWindow = tqparent;
m_creatingViewsMode = -1;
- QVBoxLayout *lyr = new QVBoxLayout(this);
- m_stack = new QWidgetStack(this, "stack");
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
+ m_stack = new TQWidgetStack(this, "stack");
lyr->addWidget(m_stack);
#ifdef KEXI_NO_CTXT_HELP
m_contextHelpInfo=new KexiContextHelpInfo();
#endif
-// m_instance=parent->instance();
+// m_instance=tqparent->instance();
m_id = -1;
m_item = 0;
@@ -100,7 +100,7 @@ void KexiDialogBase::addView(KexiViewBase *view, int mode)
// addActionProxyChild( view );
//set focus proxy inside this view
- QWidget *ch = static_cast<QWidget*>(view->child( 0, "QWidget", false ));
+ TQWidget *ch = TQT_TQWIDGET(view->child( 0, TQWIDGET_OBJECT_NAME_STRING, false ));
if (ch)
view->setFocusProxy(ch);
@@ -117,20 +117,20 @@ void KexiDialogBase::removeView(int mode)
m_openedViewModes ^= mode;
}
-QSize KexiDialogBase::minimumSizeHint() const
+TQSize KexiDialogBase::tqminimumSizeHint() const
{
KexiViewBase *v = selectedView();
if (!v)
- return KMdiChildView::minimumSizeHint();
- return v->minimumSizeHint() + QSize(0, mdiParent() ? mdiParent()->captionHeight() : 0);
+ return KMdiChildView::tqminimumSizeHint();
+ return v->tqminimumSizeHint() + TQSize(0, mdiParent() ? mdiParent()->captionHeight() : 0);
}
-QSize KexiDialogBase::sizeHint() const
+TQSize KexiDialogBase::tqsizeHint() const
{
KexiViewBase *v = selectedView();
if (!v)
- return KMdiChildView::sizeHint();
- return v->preferredSizeHint( v->sizeHint() );
+ return KMdiChildView::tqsizeHint();
+ return v->preferredSizeHint( v->tqsizeHint() );
}
/*
@@ -174,7 +174,7 @@ int KexiDialogBase::id() const
return (partItem() && partItem()->identifier()>0) ? partItem()->identifier() : m_id;
}
-void KexiDialogBase::setContextHelp(const QString& caption, const QString& text, const QString& iconName) {
+void KexiDialogBase::setContextHelp(const TQString& caption, const TQString& text, const TQString& iconName) {
#ifdef KEXI_NO_CTXT_HELP
m_contextHelpInfo->caption=caption;
m_contextHelpInfo->text=text;
@@ -183,15 +183,15 @@ void KexiDialogBase::setContextHelp(const QString& caption, const QString& text,
#endif
}
-void KexiDialogBase::closeEvent( QCloseEvent * e )
+void KexiDialogBase::closeEvent( TQCloseEvent * e )
{
m_parentWindow->acceptPropertySetEditing();
//let any view send "closing" signal
- QObjectList *list = m_stack->queryList( "KexiViewBase", 0, false, false);
+ TQObjectList *list = m_stack->queryList( "KexiViewBase", 0, false, false);
KexiViewBase *view;
- QObjectListIt it( *list );
- for ( ;(view = static_cast<KexiViewBase*>(it.current()) ) != 0; ++it ) {
+ TQObjectListIt it( *list );
+ for ( ;(view = static_cast<KexiViewBase*>(TQT_TQWIDGET(it.current())) ) != 0; ++it ) {
bool cancel = false;
emit view->closing(cancel);
if (cancel) {
@@ -252,14 +252,14 @@ void KexiDialogBase::setDirty(bool dirty)
dirtyChanged(m_viewThatRecentlySetDirtyFlag); //update
}
-QString KexiDialogBase::itemIcon()
+TQString KexiDialogBase::itemIcon()
{
if (!m_part || !m_part->info()) {
KexiViewBase *v = selectedView();
if (v) {//m_stack->visibleWidget() && m_stack->visibleWidget()->inherits("KexiViewBase")) {
return v->m_defaultIconName;
}
- return QString::null;
+ return TQString();
}
return m_part->info()->itemIcon();
}
@@ -285,7 +285,7 @@ bool KexiDialogBase::isDesignModePreloadedForTextModeHackUsed(int newViewMode) c
&& supportsViewMode(Kexi::DesignViewMode);
}
-tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString>* staticObjectArgs,
+tristate KexiDialogBase::switchToViewMode( int newViewMode, TQMap<TQString,TQString>* staticObjectArgs,
bool& proposeOpeningInTextViewModeBecauseOfProblems)
{
m_parentWindow->acceptPropertySetEditing();
@@ -377,9 +377,9 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString
delete newView;
kdDebug() << "Switching to mode " << newViewMode << " failed. Previous mode "
<< prevViewMode << " restored." << endl;
- const Kexi::ObjectStatus status(*this);
- setStatus(mainWin()->project()->dbConnection(),
- i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(newViewMode)),"");
+ const Kexi::ObjecttqStatus status(*this);
+ settqStatus(mainWin()->project()->dbConnection(),
+ i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(newViewMode)),"");
append( status );
m_currentViewMode = prevViewMode;
return false;
@@ -394,8 +394,8 @@ tristate KexiDialogBase::switchToViewMode( int newViewMode, QMap<QString,QString
addActionProxyChild( newView ); //new proxy child
m_stack->raiseWidget( newView );
newView->propertySetSwitched();
- m_parentWindow->invalidateSharedActions( newView );
- QTimer::singleShot(10, newView, SLOT(setFocus())); //newView->setFocus(); //js ok?
+ m_parentWindow->tqinvalidateSharedActions( TQT_TQOBJECT(newView) );
+ TQTimer::singleShot(10, newView, TQT_SLOT(setFocus())); //newView->setFocus(); //js ok?
// setFocus();
return true;
}
@@ -429,17 +429,17 @@ KexiDialogBase::propertySet()
return v->propertySet();
}
-bool KexiDialogBase::eventFilter(QObject *obj, QEvent *e)
+bool KexiDialogBase::eventFilter(TQObject *obj, TQEvent *e)
{
if (KMdiChildView::eventFilter(obj, e))
return true;
-/* if (e->type()==QEvent::FocusIn) {
- QWidget *w = m_parentWindow->activeWindow();
+/* if (e->type()==TQEvent::FocusIn) {
+ TQWidget *w = m_parentWindow->activeWindow();
w=0;
}*/
- if ((e->type()==QEvent::FocusIn && m_parentWindow->activeWindow()==this)
- || e->type()==QEvent::MouseButtonPress) {
- if (m_stack->visibleWidget() && KexiUtils::hasParent(m_stack->visibleWidget(), obj)) {
+ if ((e->type()==TQEvent::FocusIn && m_parentWindow->activeWindow()==this)
+ || e->type()==TQEvent::MouseButtonPress) {
+ if (m_stack->visibleWidget() && KexiUtils::hasParent(TQT_TQOBJECT(m_stack->visibleWidget()), obj)) {
//pass the activation
activate();
}
@@ -464,7 +464,7 @@ void KexiDialogBase::dirtyChanged(KexiViewBase* view)
emit dirtyChanged(this);
}
-/*QString KexiDialogBase::caption() const
+/*TQString KexiDialogBase::caption() const
{
return m_origCaption;
if (dirty())
@@ -478,8 +478,8 @@ void KexiDialogBase::updateCaption()
if (!m_item || !m_part || !m_origCaption.isEmpty())
return;
// m_origCaption = c;
- QString capt = m_item->name();
- QString fullCapt = capt;
+ TQString capt = m_item->name();
+ TQString fullCapt = capt;
if (m_part)
fullCapt += (" : " + m_part->instanceCaption());
if (dirty()) {
@@ -517,7 +517,7 @@ tristate KexiDialogBase::storeNewData()
if (cancel)
return cancelled;
if (!m_schemaData) {
- setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),"");
+ settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's definition failed."),"");
return false;
}
@@ -544,25 +544,25 @@ tristate KexiDialogBase::storeNewData()
} else {
// Got a maximum part ID, or there were no parts
p_id = p_id + 1;
- p_id = QMAX(p_id, (int)KexiPart::UserObjectType);
+ p_id = TQMAX(p_id, (int)KexiPart::UserObjectType);
}
}
KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url");
kexidbg << "KexiDialogBase::storeNewData(): fieldlist: "
- << (fl ? fl->debugString() : QString::null) << endl;
+ << (fl ? fl->debugString() : TQString()) << endl;
if (!fl)
return false;
kexidbg << part()->info()->ptr()->untranslatedGenericName() << endl;
-// QStringList sl = part()->info()->ptr()->propertyNames();
-// for (QStringList::ConstIterator it=sl.constBegin();it!=sl.constEnd();++it)
+// TQStringList sl = part()->info()->ptr()->propertyNames();
+// for (TQStringList::ConstIterator it=sl.constBegin();it!=sl.constEnd();++it)
// kexidbg << *it << " " << part()->info()->ptr()->property(*it).toString() << endl;
if (!m_parentWindow->project()->dbConnection()->insertRecord(
*fl,
- QVariant(p_id),
- QVariant(part()->info()->ptr()->untranslatedGenericName()),
- QVariant(part()->info()->mimeType()), QVariant("http://www.koffice.org/kexi/" /*always ok?*/)))
+ TQVariant(p_id),
+ TQVariant(part()->info()->ptr()->untranslatedGenericName()),
+ TQVariant(part()->info()->mimeType()), TQVariant("http://www.koffice.org/kexi/" /*always ok?*/)))
return false;
kdDebug() << "KexiDialogBase::storeNewData(): insert success!" << endl;
@@ -594,7 +594,7 @@ tristate KexiDialogBase::storeData(bool dontAsk)
return false;
#define storeData_ERR \
- setStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),"");
+ settqStatus(m_parentWindow->project()->dbConnection(), i18n("Saving object's data failed."),"");
//save changes using transaction
KexiDB::Transaction transaction = m_parentWindow->project()->dbConnection()->beginTransaction();
@@ -624,8 +624,8 @@ tristate KexiDialogBase::storeData(bool dontAsk)
void KexiDialogBase::activate()
{
KexiViewBase *v = selectedView();
- //kdDebug() << "focusWidget(): " << focusWidget()->name() << endl;
- if (KexiUtils::hasParent( v, KMdiChildView::focusedChildWidget()))//focusWidget()))
+ //kdDebug() << "tqfocusWidget(): " << tqfocusWidget()->name() << endl;
+ if (KexiUtils::hasParent( TQT_TQOBJECT(v), TQT_TQOBJECT(KMdiChildView::focusedChildWidget())))//tqfocusWidget()))
KMdiChildView::activate();
else {//ah, focused widget is not in this view, move focus:
if (v)
@@ -633,7 +633,7 @@ void KexiDialogBase::activate()
}
if (v)
v->updateActions(true);
-//js: not neeed?? m_parentWindow->invalidateSharedActions(this);
+//js: not neeed?? m_parentWindow->tqinvalidateSharedActions(this);
}
void KexiDialogBase::deactivate()
@@ -647,14 +647,14 @@ void KexiDialogBase::sendDetachedStateToCurrentView()
{
KexiViewBase *v = selectedView();
if (v)
- v->parentDialogDetached();
+ v->tqparentDialogDetached();
}
void KexiDialogBase::sendAttachedStateToCurrentView()
{
KexiViewBase *v = selectedView();
if (v)
- v->parentDialogAttached();
+ v->tqparentDialogAttached();
}
#include "kexidialogbase.moc"
diff --git a/kexi/core/kexidialogbase.h b/kexi/core/kexidialogbase.h
index 43dc1ff4e..68c712364 100644
--- a/kexi/core/kexidialogbase.h
+++ b/kexi/core/kexidialogbase.h
@@ -26,12 +26,12 @@
#include "kexi.h"
#include "kexipart.h"
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kmdichildview.h>
#include <kxmlguiclient.h>
-class QWidgetStack;
+class TQWidgetStack;
class KexiMainWindow;
class KexiViewBase;
class KActionCollection;
@@ -46,11 +46,11 @@ namespace KoProperty {
//! Privides temporary data shared between KexiDialogBase's views (KexiView's)
/*! Designed for reimplementation, if needed. */
-class KEXICORE_EXPORT KexiDialogTempData : public QObject
+class KEXICORE_EXPORT KexiDialogTempData : public TQObject
{
public:
- KexiDialogTempData(QObject* parent)
- : QObject(parent, "KexiDialogTempData")
+ KexiDialogTempData(TQObject* tqparent)
+ : TQObject(tqparent, "KexiDialogTempData")
, proposeOpeningInTextViewModeBecauseOfProblems(false)
{}
/*! Initially false, KexiPart::Part implementation can set this to true
@@ -75,12 +75,13 @@ class KEXICORE_EXPORT KexiDialogTempData : public QObject
class KEXICORE_EXPORT KexiDialogBase :
public KMdiChildView,
public KexiActionProxy,
- public Kexi::ObjectStatus
+ public Kexi::ObjecttqStatus
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDialogBase(KexiMainWindow *parent, const QString &caption = QString::null);
+ KexiDialogBase(KexiMainWindow *tqparent, const TQString &caption = TQString());
virtual ~KexiDialogBase();
bool isRegistered();
@@ -97,13 +98,13 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! \return main (top level) widget inside this dialog.
This widget is used for e.g. determining minimum size hint and size hint. */
-// virtual QWidget* mainWidget() = 0;
+// virtual TQWidget* mainWidget() = 0;
/*! reimplemented: minimum size hint is inherited from currently visible view. */
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/*! reimplemented: size hint is inherited from currently visible view. */
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiMainWindow *mainWin() const { return m_parentWindow; }
@@ -141,7 +142,7 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! \return name of icon provided by part that created this dialog.
The name is used by KexiMainWindow to set/reset icon for this dialog. */
- virtual QString itemIcon();
+ virtual TQString itemIcon();
/*! \return true if this dialog supports switching to \a mode.
\a mode is one of Kexi::ViewMode enum elements.
@@ -161,10 +162,10 @@ class KEXICORE_EXPORT KexiDialogBase :
*/
tristate switchToViewMode( int newViewMode );
- void setContextHelp(const QString& caption, const QString& text, const QString& iconName);
+ void setContextHelp(const TQString& caption, const TQString& text, const TQString& iconName);
/*! Internal reimplementation. */
- virtual bool eventFilter(QObject *obj, QEvent *e);
+ virtual bool eventFilter(TQObject *obj, TQEvent *e);
/*! Used by Main Window
\todo js: PROBABLY REMOVE THESE TWO?
@@ -197,7 +198,7 @@ class KEXICORE_EXPORT KexiDialogBase :
KexiDB::SchemaData* schemaData() const { return m_schemaData; }
/*! Reimpelmented: "*" is added if for 'dirty' dialog's data. */
-// QString caption() const;
+// TQString caption() const;
/*! Used by KexiViewBase subclasses. \return temporary data shared between views */
KexiDialogTempData *tempData() const { return m_tempData; }
@@ -237,13 +238,13 @@ class KEXICORE_EXPORT KexiDialogBase :
tristate storeNewData();
/*! Reimplemented - we're informing the current view about performed detaching by calling
- KexiViewBase::parentDialogDetached(), so the view can react on this event
- (by default KexiViewBase::parentDialogDetached() does nothing, you can reimplement it). */
+ KexiViewBase::tqparentDialogDetached(), so the view can react on this event
+ (by default KexiViewBase::tqparentDialogDetached() does nothing, you can reimplement it). */
void sendDetachedStateToCurrentView();
/*! W're informing the current view about performed atttaching by calling
- KexiViewBase::parentDialogAttached(), so the view can react on this event
- (by default KexiViewBase::parentDialogAttached() does nothing, you can reimplement it). */
+ KexiViewBase::tqparentDialogAttached(), so the view can react on this event
+ (by default KexiViewBase::tqparentDialogAttached() does nothing, you can reimplement it). */
void sendAttachedStateToCurrentView();
signals:
@@ -264,12 +265,12 @@ class KEXICORE_EXPORT KexiDialogBase :
/*! Used by Part::openInstance(),
like switchToViewMode( int newViewMode ), but passed \a staticObjectArgs.
Only used for parts of class KexiPart::StaticPart. */
- tristate switchToViewMode( int newViewMode, QMap<QString,QString>* staticObjectArgs,
+ tristate switchToViewMode( int newViewMode, TQMap<TQString,TQString>* staticObjectArgs,
bool& proposeOpeningInTextViewModeBecauseOfProblems);
void registerDialog();
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
//! \internal
void addView(KexiViewBase *view, int mode);
@@ -281,7 +282,7 @@ class KEXICORE_EXPORT KexiDialogBase :
int m_openedViewModes;
int m_currentViewMode;
- inline QWidgetStack * stack() const { return m_stack; }
+ inline TQWidgetStack * stack() const { return m_stack; }
//! Used by \a view to inform the dialog about changing state of the "dirty" flag.
void dirtyChanged(KexiViewBase* view);
@@ -290,7 +291,7 @@ class KEXICORE_EXPORT KexiDialogBase :
indexed with optional \a dataID, from the database backend.
\return true on success
\sa storeDataBlock(). */
- bool loadDataBlock( QString &dataString, const QString& dataID = QString::null);
+ bool loadDataBlock( TQString &dataString, const TQString& dataID = TQString());
/*! Stores (potentially large) string data \a dataString, block (e.g. xml form's representation),
at the database backend. Block will be stored in "kexi__objectdata" table pointed by
@@ -298,21 +299,21 @@ class KEXICORE_EXPORT KexiDialogBase :
If there is already such record in the table, it's simply overwritten.
\return true on success
*/
- bool storeDataBlock( const QString &dataString, const QString& dataID = QString::null );
+ bool storeDataBlock( const TQString &dataString, const TQString& dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
pointed by optional \a dataID, from the database backend.
\return true on success. Does not fail if the block doe not exists.
Note that if \a dataID is not specified, all data blocks for this dialog will be removed.
\sa storeDataBlock(). */
- bool removeDataBlock( QString &dataString, const QString& dataID = QString::null);
+ bool removeDataBlock( TQString &dataString, const TQString& dataID = TQString());
/*! @internal
Used by KexiDialogBase::storeDataBlock() and by KexiViewBase::storeDataBlock().
*/
- bool storeDataBlock_internal( const QString &dataString, int o_id, const QString& dataID );
+ bool storeDataBlock_internal( const TQString &dataString, int o_id, const TQString& dataID );
#endif
-// void setError(const QString& message, const QString& details);
+// void setError(const TQString& message, const TQString& details);
bool isDesignModePreloadedForTextModeHackUsed(int newViewMode) const;
@@ -323,16 +324,16 @@ class KEXICORE_EXPORT KexiDialogBase :
KexiContextHelpInfo *m_contextHelpInfo;
#endif
int m_id;
- QGuardedPtr<KexiPart::Part> m_part;
+ TQGuardedPtr<KexiPart::Part> m_part;
KexiPart::Item *m_item;
- QWidgetStack *m_stack;
- QString m_origCaption; //!< helper
+ TQWidgetStack *m_stack;
+ TQString m_origCaption; //!< helper
KexiDB::SchemaData* m_schemaData;
- QGuardedPtr<KexiViewBase> m_newlySelectedView; //!< Used in dirty(), temporary set in switchToViewMode()
+ TQGuardedPtr<KexiViewBase> m_newlySelectedView; //!< Used in dirty(), temporary set in switchToViewMode()
//!< during view setup, when a new view is not yet raised.
//! Used in viewThatRecentlySetDirtyFlag(), modified in dirtyChanged().
- QGuardedPtr<KexiViewBase> m_viewThatRecentlySetDirtyFlag;
- QGuardedPtr<KexiDialogTempData> m_tempData; //!< temporary data shared between views
+ TQGuardedPtr<KexiViewBase> m_viewThatRecentlySetDirtyFlag;
+ TQGuardedPtr<KexiDialogTempData> m_tempData; //!< temporary data shared between views
/*! Created view's mode - helper for switchToViewMode(),
KexiViewBase ctor uses that info. >0 values are useful. */
diff --git a/kexi/core/kexidragobjects.cpp b/kexi/core/kexidragobjects.cpp
index 5cddbca0b..f69b5a6ac 100644
--- a/kexi/core/kexidragobjects.cpp
+++ b/kexi/core/kexidragobjects.cpp
@@ -20,32 +20,32 @@
#include "kexidragobjects.h"
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kdebug.h>
/// implementation of KexiFieldDrag
-KexiFieldDrag::KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QString& field, QWidget *parent, const char *name)
- : QStoredDrag("kexi/field", parent, name)
+KexiFieldDrag::KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& field, TQWidget *tqparent, const char *name)
+ : TQStoredDrag("kexi/field", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
stream1 << sourceMimeType << sourceName << field;
setEncodedData(data);
}
-KexiFieldDrag::KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, QWidget *parent, const char *name)
- : QStoredDrag((fields.count() > 1) ? "kexi/fields" : "kexi/field", parent, name)
+KexiFieldDrag::KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, TQWidget *tqparent, const char *name)
+ : TQStoredDrag((fields.count() > 1) ? "kexi/fields" : "kexi/field", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
if (fields.count() > 1)
stream1 << sourceMimeType << sourceName << fields;
else {
- QString field;
+ TQString field;
if (fields.count() == 1)
field = fields.first();
else
@@ -60,26 +60,26 @@ KexiFieldDrag::~KexiFieldDrag()
}
bool
-KexiFieldDrag::canDecodeSingle(QMimeSource *e)
+KexiFieldDrag::canDecodeSingle(TQMimeSource *e)
{
return e->provides("kexi/field");
}
bool
-KexiFieldDrag::canDecodeMultiple(QMimeSource *e)
+KexiFieldDrag::canDecodeMultiple(TQMimeSource *e)
{
return e->provides("kexi/field") || e->provides("kexi/fields");
}
bool
-KexiFieldDrag::decodeSingle( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QString& field )
+KexiFieldDrag::decodeSingle( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQString& field )
{
- QByteArray payload( e->data("kexi/field") );
+ TQByteArray payload( e->data("kexi/field") );
if (payload.isEmpty())
return false;
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
stream1 >> field;
@@ -88,12 +88,12 @@ KexiFieldDrag::decodeSingle( QDropEvent* e, QString& sourceMimeType,
}
bool
-KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QStringList& fields )
+KexiFieldDrag::decodeMultiple( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQStringList& fields )
{
- QByteArray payload( e->data("kexi/fields") );
+ TQByteArray payload( e->data("kexi/fields") );
if (payload.isEmpty()) {//try single
- QString field;
+ TQString field;
bool res = KexiFieldDrag::decodeSingle( e, sourceMimeType, sourceName, field );
if (!res)
return false;
@@ -101,7 +101,7 @@ KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
return true;
}
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
stream1 >> fields;
@@ -111,32 +111,32 @@ KexiFieldDrag::decodeMultiple( QDropEvent* e, QString& sourceMimeType,
/// implementation of KexiDataProviderDrag
-KexiDataProviderDrag::KexiDataProviderDrag(const QString& sourceMimeType, const QString& sourceName,
- QWidget *parent, const char *name)
- : QStoredDrag("kexi/dataprovider", parent, name)
+KexiDataProviderDrag::KexiDataProviderDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ TQWidget *tqparent, const char *name)
+ : TQStoredDrag("kexi/dataprovider", tqparent, name)
{
- QByteArray data;
- QDataStream stream1(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream1(data,IO_WriteOnly);
stream1 << sourceMimeType << sourceName;
setEncodedData(data);
}
bool
-KexiDataProviderDrag::canDecode(QDragMoveEvent *e)
+KexiDataProviderDrag::canDecode(TQDragMoveEvent *e)
{
return e->provides("kexi/dataprovider");
}
bool
-KexiDataProviderDrag::decode( QDropEvent* e, QString& sourceMimeType, QString& sourceName)
+KexiDataProviderDrag::decode( TQDropEvent* e, TQString& sourceMimeType, TQString& sourceName)
{
- QCString tmp;
- QByteArray payload = e->data("kexidataprovider");
+ TQCString tmp;
+ TQByteArray payload = e->data("kexidataprovider");
if(payload.size())
{
e->accept();
- QDataStream stream1(payload, IO_ReadOnly);
+ TQDataStream stream1(payload, IO_ReadOnly);
stream1 >> sourceMimeType;
stream1 >> sourceName;
// kdDebug() << "KexiDataProviderDrag::decode() decoded: " << sourceMimeType <<"/"<<sourceName<< endl;
diff --git a/kexi/core/kexidragobjects.h b/kexi/core/kexidragobjects.h
index 9b7a42ec3..26e2b24f9 100644
--- a/kexi/core/kexidragobjects.h
+++ b/kexi/core/kexidragobjects.h
@@ -21,61 +21,61 @@
#ifndef KEXI_DRAGOBJECTS_H_
#define KEXI_DRAGOBJECTS_H_
-#include <qdragobject.h>
+#include <tqdragobject.h>
-class QString;
-class QStringList;
-class QWidget;
+class TQString;
+class TQStringList;
+class TQWidget;
//! Drag object containing information about field(s).
-class KEXICORE_EXPORT KexiFieldDrag : public QStoredDrag
+class KEXICORE_EXPORT KexiFieldDrag : public TQStoredDrag
{
public:
/*! Creates drag object for a single field \a field. */
- KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QString& field, QWidget *parent, const char *name);
+ KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& field, TQWidget *tqparent, const char *name);
/*! Creates drag object for multiple fields \a fields.
If there's less than two elements in the list, data is set up as for above ctor. */
- KexiFieldDrag(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& field, QWidget *parent=0, const char *name=0);
+ KexiFieldDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& field, TQWidget *tqparent=0, const char *name=0);
~KexiFieldDrag();
- void addField(const QString& field);
+ void addField(const TQString& field);
- /*! \return true if event \a e (of class QDragMoveEvent or QDropEvent)
+ /*! \return true if event \a e (of class TQDragMoveEvent or TQDropEvent)
can be decoded as "kexi/field" data */
- static bool canDecodeSingle( QMimeSource* e );
+ static bool canDecodeSingle( TQMimeSource* e );
- /*! \return true if event \a e (of class QDragMoveEvent or QDropEvent)
+ /*! \return true if event \a e (of class TQDragMoveEvent or TQDropEvent)
can be decoded as "kexi/fields" data. If decoding of "kexi/field"
type is supported, decoding of "kexi/fields" is always supported.
*/
- static bool canDecodeMultiple( QMimeSource* e );
+ static bool canDecodeMultiple( TQMimeSource* e );
/*! Decodes data of single-field drag ("kexi/field" mime type) coming with event \a e.
Sets \a sourceMimeType, \a sourceName and \a field.
\return true on successful decoding (\a e will be accepted in such case). */
- static bool decodeSingle( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QString& field );
+ static bool decodeSingle( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQString& field );
/*! Decodes data of multiple-field drag ("kexi/fields" mime type) coming with event \a e.
Sets \a sourceMimeType, \a sourceName and \a fields. Also works with "kexi/field" data.
\return true on successful decoding (\a e will be accepted in such case). */
- static bool decodeMultiple( QDropEvent* e, QString& sourceMimeType,
- QString& sourceName, QStringList& fields );
+ static bool decodeMultiple( TQDropEvent* e, TQString& sourceMimeType,
+ TQString& sourceName, TQStringList& fields );
};
-class KEXICORE_EXPORT KexiDataProviderDrag : public QStoredDrag
+class KEXICORE_EXPORT KexiDataProviderDrag : public TQStoredDrag
{
public:
- KexiDataProviderDrag(const QString& sourceMimeType, const QString& sourceName,
- QWidget *parent=0, const char *name=0);
+ KexiDataProviderDrag(const TQString& sourceMimeType, const TQString& sourceName,
+ TQWidget *tqparent=0, const char *name=0);
~KexiDataProviderDrag() { };
- static bool canDecode( QDragMoveEvent* e);
- static bool decode( QDropEvent* e, QString& sourceMimeType, QString& sourceName);
+ static bool canDecode( TQDragMoveEvent* e);
+ static bool decode( TQDropEvent* e, TQString& sourceMimeType, TQString& sourceName);
};
diff --git a/kexi/core/kexievents.cpp b/kexi/core/kexievents.cpp
index 2cafe2d3c..c4cf62156 100644
--- a/kexi/core/kexievents.cpp
+++ b/kexi/core/kexievents.cpp
@@ -19,8 +19,8 @@
#include "kexievents.h"
-Event::Event(QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot)
+Event::Event(TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot)
{
m_sender = sender;
m_receiver = receiver;
@@ -28,8 +28,8 @@ Event::Event(QObject *sender, const QCString &signal,
m_signal = signal;
}
-Event::Event(QObject *sender, const QCString &signal,
- const QCString &functionName)
+Event::Event(TQObject *sender, const TQCString &signal,
+ const TQCString &functionName)
{
m_sender = sender;
m_signal = signal;
@@ -44,14 +44,14 @@ EventList::addEvent(Event *event)
}
void
-EventList::addEvent(QObject *sender, const QCString &signal, QObject *receiver, const QCString &slot)
+EventList::addEvent(TQObject *sender, const TQCString &signal, TQObject *receiver, const TQCString &slot)
{
Event *ev = new Event(sender, signal, receiver, slot);
append(ev);
}
void
-EventList::addEvent(QObject *sender, const QCString &signal, const QCString &function)
+EventList::addEvent(TQObject *sender, const TQCString &signal, const TQCString &function)
{
Event *ev = new Event(sender, signal, function);
append(ev);
@@ -66,7 +66,7 @@ EventList::removeEvent(Event *event)
}
EventList*
-EventList::allEventsForObject(QObject *widget)
+EventList::allEventsForObject(TQObject *widget)
{
if(!widget) return 0;
@@ -81,7 +81,7 @@ EventList::allEventsForObject(QObject *widget)
}
void
-EventList::removeAllEventsForObject(QObject *widget)
+EventList::removeAllEventsForObject(TQObject *widget)
{
EventList::ConstIterator endIt = constEnd();
for(EventList::ConstIterator it = constBegin(); it != endIt; ++it) {
diff --git a/kexi/core/kexievents.h b/kexi/core/kexievents.h
index 145ee68d2..f65ff132a 100644
--- a/kexi/core/kexievents.h
+++ b/kexi/core/kexievents.h
@@ -20,11 +20,11 @@
#ifndef KFORMDESIGNEREVENTS_H
#define KFORMDESIGNEREVENTS_H
-#include <qvaluelist.h>
-#include <qguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqguardedptr.h>
-class QDomNode;
-class QObject;
+class TQDomNode;
+class TQObject;
//! A simple class to store events
/*! There are three different types of events (an maybe more in the future):
@@ -38,10 +38,10 @@ class QObject;
class KEXICORE_EXPORT Event
{
public:
- Event(QObject *sender, const QCString &signal,
- QObject *receiver, const QCString &slot);
- Event(QObject *sender, const QCString &signal,
- const QCString &functionName);
+ Event(TQObject *sender, const TQCString &signal,
+ TQObject *receiver, const TQCString &slot);
+ Event(TQObject *sender, const TQCString &signal,
+ const TQCString &functionName);
Event() : m_type(Slot) {;}
~Event() {;}
@@ -49,25 +49,25 @@ class KEXICORE_EXPORT Event
int type() {return m_type; }
void setType(int type) { m_type = type; }
- QObject* sender() const { return m_sender; }
- QObject* receiver() const { return m_receiver; }
- QCString signal() const { return m_signal; }
- QCString slot() const { return m_slot; }
+ TQObject* sender() const { return m_sender; }
+ TQObject* receiver() const { return m_receiver; }
+ TQCString signal() const { return m_signal; }
+ TQCString slot() const { return m_slot; }
- void setSender(QObject *o) { m_sender = o; }
- void setReceiver(QObject *o) { m_receiver = o; }
- void setSignal(const QCString &s) { m_signal = s; }
- void setSlot(const QCString &s) { m_slot = s; }
+ void setSender(TQObject *o) { m_sender = o; }
+ void setReceiver(TQObject *o) { m_receiver = o; }
+ void setSignal(const TQCString &s) { m_signal = s; }
+ void setSlot(const TQCString &s) { m_slot = s; }
protected:
- QGuardedPtr<QObject> m_sender;
- QCString m_signal;
- QGuardedPtr<QObject> m_receiver;
- QCString m_slot;
+ TQGuardedPtr<TQObject> m_sender;
+ TQCString m_signal;
+ TQGuardedPtr<TQObject> m_receiver;
+ TQCString m_slot;
int m_type;
};
-class KEXICORE_EXPORT EventList : protected QValueList<Event*>
+class KEXICORE_EXPORT EventList : protected TQValueList<Event*>
{
public:
EventList() {;}
@@ -76,23 +76,23 @@ class KEXICORE_EXPORT EventList : protected QValueList<Event*>
/*! Adds an event in list. Other overload are available, so that
other classes don't have to use Event class in simple cases. */
void addEvent(Event *event);
- void addEvent(QObject *sender, const QCString &signal, QObject *receiver, const QCString &slot);
- void addEvent(QObject *sender, const QCString &signal, const QCString &action);
+ void addEvent(TQObject *sender, const TQCString &signal, TQObject *receiver, const TQCString &slot);
+ void addEvent(TQObject *sender, const TQCString &signal, const TQCString &action);
/*! Removes the Event \a event from the FormScript's list. */
void removeEvent(Event *event);
/*! \return A list of events related to widget \a name (ie where Event::sender()
or Event::receiver() == name). */
- EventList* allEventsForObject(QObject *object);
+ EventList* allEventsForObject(TQObject *object);
/*! Replace all ocurrences of \a oldname with \a newName inside the list. */
- //void renameWidget(const QCString &oldName, const QCString &newName);
+ //void renameWidget(const TQCString &oldName, const TQCString &newName);
/*! Removes all events related to widget \a name. Called eg when widget is destroyed. */
- void removeAllEventsForObject(QObject *object);
+ void removeAllEventsForObject(TQObject *object);
- // make some QValueList function accessible by other classes
- QValueListConstIterator<Event*> constBegin() const { return QValueList<Event*>::constBegin(); }
- QValueListConstIterator<Event*> constEnd() const { return QValueList<Event*>::constEnd(); }
- bool isEmpty() const { return QValueList<Event*>::isEmpty(); }
+ // make some TQValueList function accessible by other classes
+ TQValueListConstIterator<Event*> constBegin() const { return TQValueList<Event*>::constBegin(); }
+ TQValueListConstIterator<Event*> constEnd() const { return TQValueList<Event*>::constEnd(); }
+ bool isEmpty() const { return TQValueList<Event*>::isEmpty(); }
};
diff --git a/kexi/core/kexiguimsghandler.cpp b/kexi/core/kexiguimsghandler.cpp
index af5f3a6e1..5b8bb8f5f 100644
--- a/kexi/core/kexiguimsghandler.cpp
+++ b/kexi/core/kexiguimsghandler.cpp
@@ -26,8 +26,8 @@
#include <kmessagebox.h>
#include <kdialogbase.h>
-KexiGUIMessageHandler::KexiGUIMessageHandler(QWidget *parent)
-: KexiDB::MessageHandler(parent)
+KexiGUIMessageHandler::KexiGUIMessageHandler(TQWidget *tqparent)
+: KexiDB::MessageHandler(tqparent)
{
}
@@ -38,66 +38,66 @@ KexiGUIMessageHandler::~KexiGUIMessageHandler()
/*virtual*/
void
KexiGUIMessageHandler::showErrorMessage(KexiDB::Object *obj,
- const QString& msg)
+ const TQString& msg)
{
- QString _msg(msg);
+ TQString _msg(msg);
if (!obj) {
showErrorMessage(_msg);
return;
}
- QString details;
+ TQString details;
KexiDB::getHTMLErrorMesage(obj, _msg, details);
showErrorMessage(_msg, details);
}
/*virtual*/
void
-KexiGUIMessageHandler::showErrorMessage(const QString &title, const QString &details)
+KexiGUIMessageHandler::showErrorMessage(const TQString &title, const TQString &details)
{
showMessage(Error, title, details);
}
void
-KexiGUIMessageHandler::showSorryMessage(const QString &title, const QString &details)
+KexiGUIMessageHandler::showSorryMessage(const TQString &title, const TQString &details)
{
showMessage(Sorry, title, details);
}
-void KexiGUIMessageHandler::showErrorMessage(const QString &msg, const QString &details,
+void KexiGUIMessageHandler::showErrorMessage(const TQString &msg, const TQString &details,
KexiDB::Object *obj)
{
- QString _msg(msg);
+ TQString _msg(msg);
if (!obj) {
showErrorMessage(_msg, details);
return;
}
- QString _details(details);
+ TQString _details(details);
KexiDB::getHTMLErrorMesage(obj, _msg, _details);
showErrorMessage(_msg, _details);
}
void
-KexiGUIMessageHandler::showErrorMessage(Kexi::ObjectStatus *status)
+KexiGUIMessageHandler::showErrorMessage(Kexi::ObjecttqStatus *status)
{
showErrorMessage("", status);
}
void
-KexiGUIMessageHandler::showErrorMessage(const QString &message, Kexi::ObjectStatus *status)
+KexiGUIMessageHandler::showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status)
{
if (status && status->error()) {
- QString msg(message);
+ TQString msg(message);
if (msg.isEmpty() || msg==status->message) {
msg = status->message;
status->message = status->description;
status->description = "";
}
- QString desc;
+ TQString desc;
if (!status->message.isEmpty()) {
if (status->description.isEmpty()) {
desc = status->message;
} else {
- msg += (QString("<br><br>") + status->message);
+ msg += (TQString("<br><br>") + status->message);
desc = status->description;
}
}
@@ -106,12 +106,12 @@ KexiGUIMessageHandler::showErrorMessage(const QString &message, Kexi::ObjectStat
else {
showErrorMessage(message);
}
- status->clearStatus();
+ status->cleartqStatus();
}
void
KexiGUIMessageHandler::showMessage(MessageType type,
- const QString &title, const QString &details, const QString& dontShowAgainName)
+ const TQString &title, const TQString &details, const TQString& dontShowAgainName)
{
if (!m_enableMessages)
return;
@@ -119,7 +119,7 @@ KexiGUIMessageHandler::showMessage(MessageType type,
//'wait' cursor is a nonsense now
KexiUtils::removeWaitCursor();
- QString msg(title);
+ TQString msg(title);
if (title.isEmpty())
msg = i18n("Unknown error");
msg = "<qt><p>"+msg+"</p>";
@@ -141,8 +141,8 @@ KexiGUIMessageHandler::showMessage(MessageType type,
}
}
-void KexiGUIMessageHandler::showWarningContinueMessage(const QString &title, const QString &details,
- const QString& dontShowAgainName)
+void KexiGUIMessageHandler::showWarningContinueMessage(const TQString &title, const TQString &details,
+ const TQString& dontShowAgainName)
{
if (!KMessageBox::shouldBeShownContinue(dontShowAgainName))
return;
@@ -150,27 +150,27 @@ void KexiGUIMessageHandler::showWarningContinueMessage(const QString &title, con
i18n("Warning"), KDialogBase::Yes, KDialogBase::Yes, KDialogBase::No,
m_messageHandlerParentWidget, "warningContinue", true, true, KStdGuiItem::cont() );
bool checkboxResult = false;
- KMessageBox::createKMessageBox(dialog, QMessageBox::Warning,
- title + (details.isEmpty() ? QString::null : (QString("\n")+details)), QStringList(),
- dontShowAgainName.isEmpty() ? QString::null : i18n("Do not show this message again"),
+ KMessageBox::createKMessageBox(dialog, TQMessageBox::Warning,
+ title + (details.isEmpty() ? TQString() : (TQString("\n")+details)), TQStringList(),
+ dontShowAgainName.isEmpty() ? TQString() : i18n("Do not show this message again"),
&checkboxResult, 0);
if (checkboxResult)
KMessageBox::saveDontShowAgainContinue(dontShowAgainName);
}
-int KexiGUIMessageHandler::askQuestion( const QString& message,
+int KexiGUIMessageHandler::askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options )
{
Q_UNUSED(defaultResult);
if (KMessageBox::WarningContinueCancel == dlgType)
return KMessageBox::warningContinueCancel(m_messageHandlerParentWidget,
- message, QString::null, buttonYes, dontShowAskAgainName, options);
+ message, TQString(), buttonYes, dontShowAskAgainName, options);
else
return KMessageBox::messageBox(m_messageHandlerParentWidget,
- dlgType, message, QString::null, buttonYes, buttonNo, dontShowAskAgainName, options);
+ dlgType, message, TQString(), buttonYes, buttonNo, dontShowAskAgainName, options);
}
diff --git a/kexi/core/kexiguimsghandler.h b/kexi/core/kexiguimsghandler.h
index 6105f3115..bfe1495e2 100644
--- a/kexi/core/kexiguimsghandler.h
+++ b/kexi/core/kexiguimsghandler.h
@@ -26,36 +26,36 @@
class KEXICORE_EXPORT KexiGUIMessageHandler : public KexiDB::MessageHandler
{
public:
- KexiGUIMessageHandler(QWidget *parent = 0);
+ KexiGUIMessageHandler(TQWidget *tqparent = 0);
virtual ~KexiGUIMessageHandler();
- virtual void showErrorMessage(const QString &title, const QString &details = QString::null);
- virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null);
+ virtual void showErrorMessage(const TQString &title, const TQString &details = TQString());
+ virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString());
- void showErrorMessage(const QString&,const QString&,KexiDB::Object *obj);
- void showErrorMessage(Kexi::ObjectStatus *status);
- void showErrorMessage(const QString &message, Kexi::ObjectStatus *status);
+ void showErrorMessage(const TQString&,const TQString&,KexiDB::Object *obj);
+ void showErrorMessage(Kexi::ObjecttqStatus *status);
+ void showErrorMessage(const TQString &message, Kexi::ObjecttqStatus *status);
/*! Displays a "Sorry" message with \a title text and optional \a details. */
- void showSorryMessage(const QString &title, const QString &details = QString::null);
+ void showSorryMessage(const TQString &title, const TQString &details = TQString());
/*! Displays a message of a type \a type, with \a title text and optional \a details.
\a dontShowAgainName can be specified to add "Do not show again" option if \a type is Warning. */
- virtual void showMessage(MessageType type, const QString &title, const QString &details,
- const QString& dontShowAgainName = QString::null);
+ virtual void showMessage(MessageType type, const TQString &title, const TQString &details,
+ const TQString& dontShowAgainName = TQString());
/*! Displays a Warning message with \a title text and optional \a details
with "Continue" button instead "OK".
\a dontShowAgainName can be specified to add "Do not show again" option. */
- virtual void showWarningContinueMessage(const QString &title, const QString &details = QString::null,
- const QString& dontShowAgainName = QString::null);
+ virtual void showWarningContinueMessage(const TQString &title, const TQString &details = TQString(),
+ const TQString& dontShowAgainName = TQString());
/*! Interactively asks a question using KMessageBox.
See KexiDB::MessageHandler::askQuestion() for details. */
- virtual int askQuestion( const QString& message,
+ virtual int askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes=KStdGuiItem::yes(),
const KGuiItem &buttonNo=KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString(),
int options = KMessageBox::Notify );
};
diff --git a/kexi/core/kexiinternalpart.cpp b/kexi/core/kexiinternalpart.cpp
index fcbb8f17d..7e0386cda 100644
--- a/kexi/core/kexiinternalpart.cpp
+++ b/kexi/core/kexiinternalpart.cpp
@@ -24,8 +24,8 @@
#include "kexiviewbase.h"
#include "keximainwindow.h"
-#include <qasciidict.h>
-#include <qdialog.h>
+#include <tqasciidict.h>
+#include <tqdialog.h>
#include <kdebug.h>
#include <klibloader.h>
@@ -48,13 +48,13 @@ class KexiInternalPartManager
{
KexiInternalPart *part = m_parts[partName];
if (!part) {
- QCString fullname("kexihandler_");
- fullname += QCString(partName).lower();
+ TQCString fullname("kexihandler_");
+ fullname += TQCString(partName).lower();
part = KParts::ComponentFactory::createInstanceFromLibrary<KexiInternalPart>(
fullname, 0, fullname);
if (!part) {
if (msgHdr)
- msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").arg(partName));
+ msgHdr->showErrorMessage(i18n("Could not load \"%1\" plugin.").tqarg(partName));
}
else
m_parts.insert(partName, part);
@@ -64,15 +64,15 @@ class KexiInternalPartManager
private:
- QAsciiDict<KexiInternalPart> m_parts;
+ TQAsciiDict<KexiInternalPart> m_parts;
};
KexiInternalPartManager internalPartManager;
//----------------------------------------------
-KexiInternalPart::KexiInternalPart(QObject *parent, const char *name, const QStringList &)
- : QObject(parent, name)
+KexiInternalPart::KexiInternalPart(TQObject *tqparent, const char *name, const TQStringList &)
+ : TQObject(tqparent, name)
, m_uniqueDialog(true)
, m_cancelled(false)
{
@@ -90,21 +90,21 @@ KexiInternalPart::part(KexiDB::MessageHandler *msgHdr, const char* partName)
}
//static
-QWidget* KexiInternalPart::createWidgetInstance(const char* partName,
+TQWidget* KexiInternalPart::createWidgetInstance(const char* partName,
const char* widgetClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args)
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(msgHdr, partName);
if (!part)
return 0; //fatal!
- return part->createWidget(widgetClass, mainWin, parent, objName ? objName : partName, args);
+ return part->createWidget(widgetClass, mainWin, tqparent, objName ? objName : partName, args);
}
KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog(
KexiMainWindow* mainWin, const char *objName)
{
if (m_uniqueDialog && !m_uniqueWidget.isNull())
- return dynamic_cast<KexiDialogBase*>((QWidget*)m_uniqueWidget);
+ return dynamic_cast<KexiDialogBase*>((TQWidget*)m_uniqueWidget);
// KexiDialogBase *dlg = createDialog(mainWin, objName);
KexiDialogBase * dlg = new KexiDialogBase(mainWin, "");
KexiViewBase *view = createView(mainWin, 0, objName);
@@ -118,8 +118,8 @@ KexiDialogBase* KexiInternalPart::findOrCreateKexiDialog(
dlg->addView(view);
dlg->setCaption( view->caption() );
dlg->setTabCaption( view->caption() );
- dlg->resize(view->sizeHint());
- dlg->setMinimumSize(view->minimumSizeHint().width(),view->minimumSizeHint().height());
+ dlg->resize(view->tqsizeHint());
+ dlg->setMinimumSize(view->tqminimumSizeHint().width(),view->tqminimumSizeHint().height());
dlg->setId( mainWin->generatePrivateID() );
dlg->registerDialog();
return dlg;
@@ -139,25 +139,25 @@ KexiDialogBase* KexiInternalPart::createKexiDialogInstance(
}
//static
-QDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
+TQDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
const char* dialogClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- const char *objName, QMap<QString,QString>* args)
+ const char *objName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(msgHdr, partName);
if (!part) {
kdDebug() << "KexiInternalPart::createDialogInstance() !part" << endl;
return 0; //fatal!
}
- QWidget *w;
+ TQWidget *w;
if (part->uniqueDialog() && !part->m_uniqueWidget.isNull())
w = part->m_uniqueWidget;
else
w = part->createWidget(dialogClass, mainWin, mainWin, objName ? objName : partName, args);
- if (dynamic_cast<QDialog*>(w)) {
+ if (dynamic_cast<TQDialog*>(w)) {
if (part->uniqueDialog())
part->m_uniqueWidget = w;
- return dynamic_cast<QDialog*>(w);
+ return dynamic_cast<TQDialog*>(w);
}
//sanity
if (! (part->uniqueDialog() && !part->m_uniqueWidget.isNull()))
@@ -167,7 +167,7 @@ QDialog* KexiInternalPart::createModalDialogInstance(const char* partName,
//static
bool KexiInternalPart::executeCommand(const char* partName,
- KexiMainWindow* mainWin, const char* commandName, QMap<QString,QString>* args)
+ KexiMainWindow* mainWin, const char* commandName, TQMap<TQString,TQString>* args)
{
KexiInternalPart *part = internalPartManager.findPart(0, partName);
if (!part) {
@@ -177,28 +177,28 @@ bool KexiInternalPart::executeCommand(const char* partName,
return part->executeCommand(mainWin, commandName, args);
}
-QWidget* KexiInternalPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget * parent, const char * objName, QMap<QString,QString>* args)
+TQWidget* KexiInternalPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget * tqparent, const char * objName, TQMap<TQString,TQString>* args)
{
Q_UNUSED(widgetClass);
Q_UNUSED(mainWin);
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(objName);
Q_UNUSED(args);
return 0;
}
-KexiViewBase* KexiInternalPart::createView(KexiMainWindow* mainWin, QWidget * parent,
+KexiViewBase* KexiInternalPart::createView(KexiMainWindow* mainWin, TQWidget * tqparent,
const char * objName)
{
Q_UNUSED(mainWin);
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(objName);
return 0;
}
bool KexiInternalPart::executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args)
+ TQMap<TQString,TQString>* args)
{
Q_UNUSED(mainWin);
Q_UNUSED(commandName);
diff --git a/kexi/core/kexiinternalpart.h b/kexi/core/kexiinternalpart.h
index 232c3f843..4abf1d19a 100644
--- a/kexi/core/kexiinternalpart.h
+++ b/kexi/core/kexiinternalpart.h
@@ -21,9 +21,9 @@
#ifndef KEXIINTERNALPART_H
#define KEXIINTERNALPART_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqvariant.h>
class KexiMainWindow;
class KexiDialogBase;
@@ -33,7 +33,7 @@ namespace KexiDB {
class MessageHandler;
}
-class QWidget;
+class TQWidget;
/**
* @short A prototype for Kexi Internal Parts (plugins) implementation.
@@ -46,15 +46,16 @@ class QWidget;
* Parts can have unique flag set for dialogs (true by default)
* - then a dialog created by createDialogInstance() is unique.
*/
-class KEXICORE_EXPORT KexiInternalPart : public QObject
+class KEXICORE_EXPORT KexiInternalPart : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiInternalPart(QObject *parent, const char *name, const QStringList &);
+ KexiInternalPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiInternalPart();
- KexiDialogBase *instance(KexiMainWindow *parent);
+ KexiDialogBase *instance(KexiMainWindow *tqparent);
/*! Creates a new widget instance using part \a partName.
\a widgetClass is a pseudo class used in case when the part offers more
@@ -63,28 +64,28 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
\a args is two-way optional argument: it can contain custom options used
on widget's creation. Depending on implementation, the created widget can write its
state (e.g. result or status information) back to this argument.
- Created widget will have assigned \a parent widget and \a objName name. */
- static QWidget* createWidgetInstance(const char* partName, const char* widgetClass,
+ Created widget will have assigned \a tqparent widget and \a objName name. */
+ static TQWidget* createWidgetInstance(const char* partName, const char* widgetClass,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! For convenience. */
- static QWidget* createWidgetInstance(const char* partName,
+ static TQWidget* createWidgetInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0)
- { return createWidgetInstance(partName, 0, msgHdr, mainWin, parent, objName, args); }
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0)
+ { return createWidgetInstance(partName, 0, msgHdr, mainWin, tqparent, objName, args); }
/*! Creates a new dialog instance. If such instance already exists,
and is unique (see uniqueDialog()) it is just returned.
The part knows about destroying its dialog instance, (if it is uinque),
so on another call the dialog will be created again.
\a msgHdr is a message handler for displaying error messages.
- The dialog is assigned to \a mainWin as its parent,
+ The dialog is assigned to \a mainWin as its tqparent,
and \a objName name is set. */
static KexiDialogBase* createKexiDialogInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin, const char *objName = 0);
- /*! Creates a new modal dialog instance (QDialog or a subclass).
+ /*! Creates a new modal dialog instance (TQDialog or a subclass).
If such instance already exists, and is unique (see uniqueDialog())
it is just returned.
\a dialogClass is a pseudo class used in case when the part offers more
@@ -95,22 +96,22 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
state (e.g. result or status information) back to this argument.
The part knows about destroying its dialog instance, (if it is uinque),
so on another call the dialog will be created again.
- The dialog is assigned to \a mainWin as its parent,
+ The dialog is assigned to \a mainWin as its tqparent,
and \a objName name is set. */
- static QDialog* createModalDialogInstance(const char* partName,
+ static TQDialog* createModalDialogInstance(const char* partName,
const char* dialogClass, KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin,
- const char *objName = 0, QMap<QString,QString>* args = 0);
+ const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! Adeded For convenience. */
- static QDialog* createModalDialogInstance(const char* partName,
+ static TQDialog* createModalDialogInstance(const char* partName,
KexiDB::MessageHandler *msgHdr, KexiMainWindow* mainWin, const char *objName = 0,
- QMap<QString,QString>* args = 0)
+ TQMap<TQString,TQString>* args = 0)
{ return createModalDialogInstance(partName, 0, msgHdr, mainWin, objName, args); }
/*! Executes a command \a commandName (usually nonvisual) using part called \a partName.
The result can be put into the \a args. \return true on successful calling. */
static bool executeCommand(const char* partName,
- KexiMainWindow* mainWin, const char* commandName, QMap<QString,QString>* args = 0);
+ KexiMainWindow* mainWin, const char* commandName, TQMap<TQString,TQString>* args = 0);
/*! \return internal part of a name \a partName. Shouldn't be usable. */
static const KexiInternalPart* part(KexiDB::MessageHandler *msgHdr, const char* partName);
@@ -129,9 +130,9 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
const char *objName);
/*! Reimplement this if your internal part has to return widgets
- or QDialog objects. */
- virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget * parent, const char * objName = 0, QMap<QString,QString>* args = 0);
+ or TQDialog objects. */
+ virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget * tqparent, const char * objName = 0, TQMap<TQString,TQString>* args = 0);
// //! Reimplement this if your internal part has to return dialogs
// virtual KexiDialogBase *createDialog(KexiMainWindow* /*mainWin*/,
@@ -139,17 +140,17 @@ class KEXICORE_EXPORT KexiInternalPart : public QObject
// { return 0; }
/*! Reimplement this if your internal part has to return a view object. */
- virtual KexiViewBase *createView(KexiMainWindow* mainWin, QWidget * parent,
+ virtual KexiViewBase *createView(KexiMainWindow* mainWin, TQWidget * tqparent,
const char *objName = 0);
/*! Reimplement this if your internal part has to execute a command \a commandName
(usually nonvisual). Arguments are put into \a args and the result can be put into the \a args.
\return true on successful calling. */
virtual bool executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args = 0);
+ TQMap<TQString,TQString>* args = 0);
//! Unique dialog - we're using guarded ptr for the dialog so can know if it has been closed
- QGuardedPtr<QWidget> m_uniqueWidget;
+ TQGuardedPtr<TQWidget> m_uniqueWidget;
bool m_uniqueDialog : 1; //!< true if createDialogInstance() should return only one dialog
diff --git a/kexi/core/keximainwindow.h b/kexi/core/keximainwindow.h
index ec1db6333..ad6c613b5 100644
--- a/kexi/core/keximainwindow.h
+++ b/kexi/core/keximainwindow.h
@@ -21,8 +21,8 @@
#ifndef KEXIMAINWINDOW_H
#define KEXIMAINWINDOW_H
-#include <qmap.h>
-#include <qintdict.h>
+#include <tqmap.h>
+#include <tqintdict.h>
#include <kmdimainfrm.h>
#include <kexiutils/tristate.h>
@@ -45,6 +45,7 @@ namespace KexiPart {
class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActionHost
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Used by printActionForItem()
enum PrintActionType {
@@ -62,7 +63,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
/*! Registers dialog \a dlg for watching and adds it to the main window's stack. */
virtual void registerChild(KexiDialogBase *dlg) = 0;
- virtual QPopupMenu* findPopupMenu(const char *popupName) = 0;
+ virtual TQPopupMenu* findPopupMenu(const char *popupName) = 0;
/*! Generates ID for private "document" like Relations window.
Private IDs are negative numbers (while ID regular part instance's IDs are >0)
@@ -102,12 +103,12 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
//! Opens object pointed by \a item in a view \a viewMode
virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode,
- bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0,
- QString* errorMessage = 0) = 0;
+ bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0,
+ TQString* errorMessage = 0) = 0;
//! For convenience
- virtual KexiDialogBase * openObject(const QCString& mime, const QString& name,
- int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0) = 0;
+ virtual KexiDialogBase * openObject(const TQCString& mime, const TQString& name,
+ int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0) = 0;
/*! Closes the object for \a item.
\return true on success (closing can be dealyed though), false on failure and cancelled
@@ -125,7 +126,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
set before call, previously selected item will be preselected
in the editor (if found). */
virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false,
- bool preservePrevSelection = true, const QCString& propertyToSelect = QCString()) = 0;
+ bool preservePrevSelection = true, const TQCString& propertyToSelect = TQCString()) = 0;
/*! Saves dialog's \a dlg data. If dialog's data is never saved,
user is asked for name and title, before saving (see getNewObjectInfo()).
@@ -135,7 +136,7 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
within name/caption dialog (see KexiNameDialog), which is popped
up for never saved objects. */
virtual tristate saveObject( KexiDialogBase *dlg,
- const QString& messageWhenAskingForName = QString::null, bool dontAsk = false ) = 0;
+ const TQString& messageWhenAskingForName = TQString(), bool dontAsk = false ) = 0;
/*! Closes dialog \a dlg. If dialog's data (see KexiDialoBase::dirty()) is unsaved,
used will be asked if saving should be perforemed.
@@ -156,12 +157,12 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
If it's true, user agreed on overwriting, if it's false, user picked
nonexisting name, so no overwrite will be needed. */
virtual tristate getNewObjectInfo( KexiPart::Item *partItem, KexiPart::Part *part,
- bool& allowOverwriting, const QString& messageWhenAskingForName = QString::null ) = 0;
+ bool& allowOverwriting, const TQString& messageWhenAskingForName = TQString() ) = 0;
/*! Highlights object of mime \a mime and name \a name.
This can be done in the Project Navigator or so.
If a window for the object is opened (in any mode), it should be raised. */
- virtual void highlightObject(const QCString& mime, const QCString& name) = 0;
+ virtual void highlightObject(const TQCString& mime, const TQCString& name) = 0;
//! Shows "print" dialog for \a item.
//! \return true on success.
@@ -177,10 +178,10 @@ class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActi
/*! Executes custom action for the main window, usually provided by a plugin.
Also used by KexiFormEventAction. */
- virtual tristate executeCustomActionForObject(KexiPart::Item* item, const QString& actionName) = 0;
+ virtual tristate executeCustomActionForObject(KexiPart::Item* item, const TQString& actionName) = 0;
protected slots:
- virtual void slotObjectRenamed(const KexiPart::Item &item, const QCString& oldName) = 0;
+ virtual void slotObjectRenamed(const KexiPart::Item &item, const TQCString& oldName) = 0;
};
diff --git a/kexi/core/kexipart.cpp b/kexi/core/kexipart.cpp
index 3f97e9c3d..d95bd0691 100644
--- a/kexi/core/kexipart.cpp
+++ b/kexi/core/kexipart.cpp
@@ -34,7 +34,7 @@
#include <kexiutils/identifier.h>
#include <kexiutils/utils.h>
-#include <qwidgetstack.h>
+#include <tqwidgetstack.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -61,12 +61,12 @@ public:
//ask
KexiUtils::WaitCursorRemover remover;
//! @todo use message handler for this to enable non-gui apps
- QString singleStatusString( dlg->singleStatusString() );
+ TQString singleStatusString( dlg->singleStatusString() );
if (!singleStatusString.isEmpty())
- singleStatusString.prepend(QString("\n\n")+i18n("Details:")+" ");
+ singleStatusString.prepend(TQString("\n\n")+i18n("Details:")+" ");
if (KMessageBox::No==KMessageBox::questionYesNo(0,
((viewMode == Kexi::DesignViewMode)
- ? i18n("Object \"%1\" could not be opened in Design View.").arg(item.name())
+ ? i18n("Object \"%1\" could not be opened in Design View.").tqarg(item.name())
: i18n("Object could not be opened in Data View."))+"\n"
+ i18n("Do you want to open it in Text View?") + singleStatusString, 0,
KStdGuiItem::open(), KStdGuiItem::cancel()))
@@ -87,8 +87,8 @@ public:
using namespace KexiPart;
-Part::Part(QObject *parent, const char *name, const QStringList &)
-: QObject(parent, name)
+Part::Part(TQObject *tqparent, const char *name, const TQStringList &)
+: TQObject(tqparent, name)
, m_guiClient(0)
, m_registeredPartID(-1) //no registered ID by default
, d(new PartPrivate())
@@ -100,8 +100,8 @@ Part::Part(QObject *parent, const char *name, const QStringList &)
m_newObjectsAreDirty = false;
}
-Part::Part(QObject* parent, StaticInfo *info)
-: QObject(parent, "StaticPart")
+Part::Part(TQObject* tqparent, StaticInfo *info)
+: TQObject(tqparent, "StaticPart")
, m_guiClient(0)
, m_registeredPartID(-1) //no registered ID by default
, d(new PartPrivate())
@@ -127,11 +127,11 @@ void Part::createGUIClients(KexiMainWindow *win)
//default actions for part's gui client:
KAction *act = new KAction(m_names["instanceCaption"]+"...", info()->createItemIcon(), 0, this,
- SLOT(slotCreate()), m_mainWin->actionCollection(),
+ TQT_SLOT(slotCreate()), m_mainWin->actionCollection(),
KexiPart::nameForCreateAction(*info()));
act->plug( m_mainWin->findPopupMenu("insert") );
// new KAction(m_names["instance"]+"...", info()->itemIcon(), 0, this,
-// SLOT(create()), m_guiClient->actionCollection(), (info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), m_guiClient->actionCollection(), (info()->objectName()+"part_create").latin1());
//let init specific actions for parts
// initPartActions( m_guiClient->actionCollection() );
m_mainWin->guiFactory()->addClient(m_guiClient); //this client is added permanently
@@ -167,8 +167,8 @@ KActionCollection* Part::actionCollectionForMode(int viewMode) const
return cli ? cli->actionCollection() : 0;
}
-KAction* Part::createSharedAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+KAction* Part::createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName)
{
GUIClient *instanceGuiClient = m_instanceGuiClients[mode];
@@ -180,8 +180,8 @@ KAction* Part::createSharedAction(int mode, const QString &text,
instanceGuiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedPartAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+KAction* Part::createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName)
{
if (!m_guiClient)
@@ -190,14 +190,14 @@ KAction* Part::createSharedPartAction(const QString &text,
m_guiClient->actionCollection(), subclassName);
}
-KAction* Part::createSharedToggleAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name)
+KAction* Part::createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name)
{
return createSharedAction(mode, text, pix_name, cut, name, "KToggleAction");
}
-KAction* Part::createSharedPartToggleAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name)
+KAction* Part::createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name)
{
return createSharedPartAction(text, pix_name, cut, name, "KToggleAction");
}
@@ -221,7 +221,7 @@ KAction* Part::sharedPartAction(int mode, const char* name, const char *classnam
void Part::setActionAvailable(const char *action_name, bool avail)
{
- QIntDictIterator<GUIClient> it( m_instanceGuiClients );
+ TQIntDictIterator<GUIClient> it( m_instanceGuiClients );
for (;it.current();++it) {
KAction *act = it.current()->actionCollection()->action(action_name);
if (act) {
@@ -234,7 +234,7 @@ void Part::setActionAvailable(const char *action_name, bool avail)
}
KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, int viewMode,
- QMap<QString,QString>* staticObjectArgs)
+ TQMap<TQString,TQString>* staticObjectArgs)
{
//now it's the time for creating instance actions
if (!d->instanceActionsInitialized) {
@@ -242,11 +242,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in
d->instanceActionsInitialized = true;
}
- m_status.clearStatus();
+ m_status.cleartqStatus();
// KexiDialogBase *dlg = createInstance(win,item,viewMode);
// if (!dlg)
// return 0;
-// QString capt = QString("%1 : %2").arg(item.name()).arg(instanceName());
+// TQString capt = TQString("%1 : %2").tqarg(item.name()).tqarg(instanceName());
KexiDialogBase *dlg = new KexiDialogBase(win);
dlg->m_supportedViewModes = m_supportedViewModes;
// dlg->m_neverSaved = item.neverSaved();
@@ -289,11 +289,11 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in
}
if (!dlg->m_schemaData) {
if (!m_status.error())
- m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(),
+ m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(),
i18n("Could not load object's definition."), i18n("Object design may be corrupted."));
m_status.append(
- Kexi::ObjectStatus(i18n("You can delete \"%1\" object and create it again.")
- .arg(item.name()), QString::null) );
+ Kexi::ObjecttqStatus(i18n("You can delete \"%1\" object and create it again.")
+ .tqarg(item.name()), TQString()) );
dlg->close();
delete dlg;
@@ -339,9 +339,9 @@ KexiDialogBase* Part::openInstance(KexiMainWindow *win, KexiPart::Item &item, in
dlg->show();
if (dlg->mdiParent() && dlg->mdiParent()->state()==KMdiChildFrm::Normal) //only resize dialog if it is in normal state
- dlg->resize(dlg->sizeHint());
+ dlg->resize(dlg->tqsizeHint());
- dlg->setMinimumSize(dlg->minimumSizeHint().width(),dlg->minimumSizeHint().height());
+ dlg->setMinimumSize(dlg->tqminimumSizeHint().width(),dlg->tqminimumSizeHint().height());
//dirty only if it's a new object
if (dlg->selectedView())
@@ -363,11 +363,11 @@ KexiDB::SchemaData* Part::loadSchemaData(KexiDialogBase * /*dlg*/, const KexiDB:
return new_schema;
}
-bool Part::loadDataBlock( KexiDialogBase *dlg, QString &dataString, const QString& dataID)
+bool Part::loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID)
{
if (!dlg->mainWin()->project()->dbConnection()->loadDataBlock( dlg->id(), dataString, dataID )) {
- m_status = Kexi::ObjectStatus( dlg->mainWin()->project()->dbConnection(),
- i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").arg(dataID) );
+ m_status = Kexi::ObjecttqStatus( dlg->mainWin()->project()->dbConnection(),
+ i18n("Could not load object's data."), i18n("Data identifier: \"%1\".").tqarg(dataID) );
m_status.append( *dlg );
return false;
}
@@ -392,32 +392,32 @@ bool Part::remove(KexiMainWindow *win, KexiPart::Item &item)
KexiDialogTempData* Part::createTempData(KexiDialogBase* dialog)
{
- return new KexiDialogTempData(dialog);
+ return new KexiDialogTempData(TQT_TQOBJECT(dialog));
}
-QString Part::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString Part::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
- return QString(englishMessage).startsWith(":") ? QString::null : englishMessage;
+ return TQString(englishMessage).startsWith(":") ? TQString() : englishMessage;
}
void Part::setupCustomPropertyPanelTabs(KTabWidget *, KexiMainWindow*)
{
}
-QCString Part::instanceName() const
+TQCString Part::instanceName() const
{
// "instanceName" should be already valid identifier but we're using
// KexiUtils::string2Identifier() to be sure translators did it right.
return KexiUtils::string2Identifier(m_names["instanceName"]).lower().latin1();
}
-QString Part::instanceCaption() const
+TQString Part::instanceCaption() const
{
return m_names["instanceCaption"];
}
-tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName)
+tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName)
{
Q_UNUSED(win);
Q_UNUSED(item);
@@ -429,20 +429,20 @@ tristate Part::rename(KexiMainWindow *win, KexiPart::Item &item, const QString&
GUIClient::GUIClient(KexiMainWindow *win, Part* part, bool partInstanceClient, const char* nameSuffix)
- : QObject(part,
+ : TQObject(part,
(part->info()->objectName()
- + (nameSuffix ? QString(":%1").arg(nameSuffix) : QString())).latin1() )
+ + (nameSuffix ? TQString(":%1").tqarg(nameSuffix) : TQString())).latin1() )
, KXMLGUIClient(win)
{
if(!win->project()->data()->userMode())
- setXMLFile(QString::fromLatin1("kexi")+part->info()->objectName()
+ setXMLFile(TQString::tqfromLatin1("kexi")+part->info()->objectName()
+"part"+(partInstanceClient?"inst":"")+"ui.rc");
// new KAction(part->m_names["new"], part->info()->itemIcon(), 0, this,
-// SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
// new KAction(i18nInstanceName+"...", part->info()->itemIcon(), 0, this,
-// SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
+// TQT_SLOT(create()), actionCollection(), (part->info()->objectName()+"part_create").latin1());
// win->guiFactory()->addClient(this);
}
diff --git a/kexi/core/kexipart.h b/kexi/core/kexipart.h
index 4045c4c6c..34136d832 100644
--- a/kexi/core/kexipart.h
+++ b/kexi/core/kexipart.h
@@ -21,8 +21,8 @@
#ifndef KEXIPART_H
#define KEXIPART_H
-#include <qobject.h>
-#include <qmap.h>
+#include <tqobject.h>
+#include <tqmap.h>
#include <kexiutils/tristate.h>
#include "kexi.h"
@@ -62,13 +62,14 @@ enum ObjectTypes {
/**
* The main class for kexi frontend parts like tables, queries, forms and reports
*/
-class KEXICORE_EXPORT Part : public QObject
+class KEXICORE_EXPORT Part : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor. */
- Part(QObject *parent, const char *name, const QStringList &);
+ Part(TQObject *tqparent, const char *name, const TQStringList &);
/*! Destructor. */
virtual ~Part();
@@ -76,12 +77,12 @@ class KEXICORE_EXPORT Part : public QObject
/*! Try to execute the part. Implementations of this \a Part
are able to overwrite this method to offer execution.
\param item The \a KexiPart::Item that should be executed.
- \param sender The sender QObject which likes to execute this \a Part or
+ \param sender The sender TQObject which likes to execute this \a Part or
NULL if there is no sender. The KFormDesigner uses this to pass
the actual widget (e.g. the button that was pressed).
\return true if execution was successfully else false.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0) {
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0) {
Q_UNUSED(item);
Q_UNUSED(sender);
return false;
@@ -109,7 +110,7 @@ class KEXICORE_EXPORT Part : public QObject
\a viewMode is one of Kexi::ViewMode enum.
\a staticObjectArgs can be passed for static Kexi Parts. */
KexiDialogBase* openInstance(KexiMainWindow *win, KexiPart::Item &item,
- int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
//! @todo make it protected, outside world should use KexiProject
/*! Removes any stored data pointed by \a item (example: table is dropped for table part).
@@ -139,7 +140,7 @@ class KEXICORE_EXPORT Part : public QObject
You shouldn't use by hand transactions here.
Default implementation does nothing and returns true. */
- virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName);
+ virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName);
/*! Creates and returns a new temporary data for a dialog \a dialog.
This method is called on openInstance() once per dialog.
@@ -147,21 +148,21 @@ class KEXICORE_EXPORT Part : public QObject
Default implemention just returns empty KexiDialogTempData object. */
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- /*! Creates a new view for mode \a viewMode, \a item and \a parent. The view will be
+ /*! Creates a new view for mode \a viewMode, \a item and \a tqparent. The view will be
used inside \a dialog. */
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0) = 0;
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0) = 0;
/*! i18n'd instance name usable for displaying in gui as object's name.
The name is valid identifier - contains latin1 lowercase characters only.
@todo move this to Info class when the name could be moved as localized property
to service's .desktop file. */
- QCString instanceName() const;
+ TQCString instanceName() const;
/*! i18n'd instance name usable for displaying in gui as object's caption.
@todo move this to Info class when the name could be moved as localized property
to service's .desktop file. */
- QString instanceCaption() const;
+ TQString instanceCaption() const;
inline Info *info() const { return m_info; }
@@ -185,7 +186,7 @@ class KEXICORE_EXPORT Part : public QObject
/*! \return action collection for mode \a viewMode. */
KActionCollection* actionCollectionForMode(int viewMode) const;
- const Kexi::ObjectStatus& lastOperationStatus() const { return m_status; }
+ const Kexi::ObjecttqStatus& lastOperationtqStatus() const { return m_status; }
/*! \return i18n'd message translated from \a englishMessage.
This method is useful for messages like:
@@ -201,7 +202,7 @@ class KEXICORE_EXPORT Part : public QObject
a part does not offer a message for such \a englishMessage.
This is used e.g. in KexiMainWindowImpl::closeDialog().
*/
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
signals:
@@ -212,7 +213,7 @@ class KEXICORE_EXPORT Part : public QObject
protected:
//! Used by StaticPart
- Part(QObject* parent, StaticInfo *info);
+ Part(TQObject* tqparent, StaticInfo *info);
// virtual KexiDialogBase* createInstance(KexiMainWindow *win, const KexiPart::Item &item, int viewMode = Kexi::DataViewMode) = 0;
@@ -249,34 +250,34 @@ class KEXICORE_EXPORT Part : public QObject
virtual KexiDB::SchemaData* loadSchemaData(KexiDialogBase *dlg,
const KexiDB::SchemaData& sdata, int viewMode);
- bool loadDataBlock( KexiDialogBase *dlg, QString &dataString, const QString& dataID = QString::null);
+ bool loadDataBlock( KexiDialogBase *dlg, TQString &dataString, const TQString& dataID = TQString());
/*! Creates shared action for action collection declared
for 'instance actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+ KAction* createSharedAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action. */
- KAction* createSharedToggleAction(int mode, const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name);
+ KAction* createSharedToggleAction(int mode, const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name);
/*! Creates shared action for action collection declared
for 'part actions' of this part.
See KexiSharedActionHost::createSharedAction() for details.
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default). */
- KAction* createSharedPartAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name,
+ KAction* createSharedPartAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name,
const char *subclassName = 0);
/*! Convenience version of above method - creates shared toggle action
for 'part actions' of this part. */
- KAction* createSharedPartToggleAction(const QString &text,
- const QString &pix_name, const KShortcut &cut, const char *name);
+ KAction* createSharedPartToggleAction(const TQString &text,
+ const TQString &pix_name, const KShortcut &cut, const char *name);
void setActionAvailable(const char *action_name, bool avail);
@@ -293,7 +294,7 @@ class KEXICORE_EXPORT Part : public QObject
//! Set of i18n'd action names for, initialised on KexiPart::Part subclass ctor
//! The names are useful because the same action can have other name for each part
//! E.g. "New table" vs "New query" can have different forms for some languages...
- QMap<QString,QString> m_names;
+ TQMap<TQString,TQString> m_names;
/*! Supported modes for dialogs created by this part.
@see supportedViewModes() */
@@ -306,9 +307,9 @@ class KEXICORE_EXPORT Part : public QObject
Info *m_info;
GUIClient *m_guiClient;
- QIntDict<GUIClient> m_instanceGuiClients;
+ TQIntDict<GUIClient> m_instanceGuiClients;
KexiMainWindow* m_mainWin;
- Kexi::ObjectStatus m_status;
+ Kexi::ObjecttqStatus m_status;
/*! If you're implementing a new part, set this to value >0 in your ctor
if you have well known (ie registered ID) for your part.
diff --git a/kexi/core/kexipartguiclient.h b/kexi/core/kexipartguiclient.h
index bb0d16eab..ed88a8161 100644
--- a/kexi/core/kexipartguiclient.h
+++ b/kexi/core/kexipartguiclient.h
@@ -22,7 +22,7 @@
#include "kexipart.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
@@ -34,12 +34,12 @@ namespace KexiPart
/** @internal A GUI Client used by KexiPart::Part objects within KexiMainWindow
*/
-class GUIClient : public QObject, public KXMLGUIClient
+class GUIClient : public TQObject, public KXMLGUIClient
{
public:
virtual ~GUIClient() {};
- inline Part *part() { return static_cast<Part*>(QObject::parent()); }
+ inline Part *part() { return static_cast<Part*>(TQObject::tqparent()); }
protected:
/*! Creates a new GUI Client. If \a partInstanceClient is true, the part will be
diff --git a/kexi/core/kexipartinfo.cpp b/kexi/core/kexipartinfo.cpp
index 22f7cc554..6907474a4 100644
--- a/kexi/core/kexipartinfo.cpp
+++ b/kexi/core/kexipartinfo.cpp
@@ -33,7 +33,7 @@ Info::Private::Private(const KService::Ptr& aPtr)
, broken(false)
, idStoredInPartDatabase(false)
{
- QVariant val = ptr->property("X-Kexi-NoObject");
+ TQVariant val = ptr->property("X-Kexi-NoObject");
isVisibleInNavigator = val.isValid() ? (val.toInt() != 1) : true;
//! @todo (js)..... now it's hardcoded!
@@ -72,15 +72,15 @@ Info::~Info()
delete d;
}
-QString Info::groupName() const { return d->groupName; }
+TQString Info::groupName() const { return d->groupName; }
-QCString Info::mimeType() const { return d->mimeType; }
+TQCString Info::mimeType() const { return d->mimeType; }
-QString Info::itemIcon() const { return d->itemIcon; }
+TQString Info::itemIcon() const { return d->itemIcon; }
-QString Info::createItemIcon() const { return d->itemIcon+"_newobj"; }
+TQString Info::createItemIcon() const { return d->itemIcon+"_newobj"; }
-QString Info::objectName() const { return d->objectName; }
+TQString Info::objectName() const { return d->objectName; }
KService::Ptr Info::ptr() const { return d->ptr; }
@@ -92,10 +92,10 @@ int Info::projectPartID() const { return d->projectPartID; }
void Info::setProjectPartID(int id) { d->projectPartID=id; }
-void Info::setBroken(bool broken, const QString& errorMessage)
+void Info::setBroken(bool broken, const TQString& errorMessage)
{ d->broken = broken; d->errorMessage = errorMessage; }
-QString Info::errorMessage() const { return d->errorMessage; }
+TQString Info::errorMessage() const { return d->errorMessage; }
void Info::setIdStoredInPartDatabase(bool set)
{
@@ -109,25 +109,25 @@ bool Info::isIdStoredInPartDatabase() const
bool Info::isDataExportSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsDataExport") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsDataExport") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
bool Info::isPrintingSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsPrinting") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsPrinting") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
bool Info::isExecuteSupported() const
{
- QVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsExecution") : QVariant();
+ TQVariant val = d->ptr ? d->ptr->property("X-Kexi-SupportsExecution") : TQVariant();
return val.isValid() ? val.toBool() : false;
}
//--------------
-QCString KexiPart::nameForCreateAction(const Info& info)
+TQCString KexiPart::nameForCreateAction(const Info& info)
{
return (info.objectName()+"part_create").latin1();
}
diff --git a/kexi/core/kexipartinfo.h b/kexi/core/kexipartinfo.h
index 43cf5b871..b7ad6f29f 100644
--- a/kexi/core/kexipartinfo.h
+++ b/kexi/core/kexipartinfo.h
@@ -46,32 +46,32 @@ class KEXICORE_EXPORT Info
/**
* @return a i18n'ed group name e.g. "Tables"
*/
- QString groupName() const;
+ TQString groupName() const;
/**
* @return the internal mime type of this part
*/
- QCString mimeType() const;
+ TQCString mimeType() const;
// /**
// * @return the icon for groups
// */
-// inline QString groupIcon() const { return m_groupIcon; }
+// inline TQString groupIcon() const { return m_groupIcon; }
/**
* @return the icon for a item
*/
- QString itemIcon() const;
+ TQString itemIcon() const;
/**
* @return the icon for a item
*/
- QString createItemIcon() const;
+ TQString createItemIcon() const;
/**
* @return the object name associated with this part (e.g. "table")
*/
- QString objectName() const;
+ TQString objectName() const;
/**
* @return the project-part-id
@@ -129,12 +129,12 @@ class KEXICORE_EXPORT Info
* Sets the broken flag and error message.
* Most likely to be called by @ref KexiPart::Manager
*/
- void setBroken(bool broken, const QString& errorMessage);
+ void setBroken(bool broken, const TQString& errorMessage);
/**
* \return i18n'd error message set by setBroken().
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
void setIdStoredInPartDatabase(bool set);
@@ -153,7 +153,7 @@ class KEXICORE_EXPORT Info
/*! \return "create" KAction's name for part defined by \a info.
The result is like "tablepart_create". Used in Part::createGUIClients()
and KexiBrowser. */
-KEXICORE_EXPORT QCString nameForCreateAction(const Info& info);
+KEXICORE_EXPORT TQCString nameForCreateAction(const Info& info);
}
diff --git a/kexi/core/kexipartinfo_p.h b/kexi/core/kexipartinfo_p.h
index 5904ff978..f92b81449 100644
--- a/kexi/core/kexipartinfo_p.h
+++ b/kexi/core/kexipartinfo_p.h
@@ -36,11 +36,11 @@ class Info::Private
Private();
KService::Ptr ptr;
- QString errorMessage;
- QString groupName;
- QCString mimeType;
- QString itemIcon;
- QString objectName;
+ TQString errorMessage;
+ TQString groupName;
+ TQCString mimeType;
+ TQString itemIcon;
+ TQString objectName;
int projectPartID;
bool broken : 1;
bool isVisibleInNavigator : 1;
diff --git a/kexi/core/kexipartitem.h b/kexi/core/kexipartitem.h
index 46eebf47f..c0b88d017 100644
--- a/kexi/core/kexipartitem.h
+++ b/kexi/core/kexipartitem.h
@@ -21,9 +21,9 @@
#ifndef KEXIPROJECTPARTITEM_H
#define KEXIPROJECTPARTITEM_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqptrlist.h>
namespace KexiDB
{
@@ -53,17 +53,17 @@ class KEXICORE_EXPORT Item
int identifier() const { return m_id; }
void setIdentifier(int id) { m_id = id; }
- QCString mimeType() const { return m_mime; }
- void setMimeType(const QCString &mime) { m_mime = mime; }
+ TQCString mimeType() const { return m_mime; }
+ void setMimeType(const TQCString &mime) { m_mime = mime; }
- QString name() const { return m_name; }
- void setName(const QString &name) { m_name = name; }
+ TQString name() const { return m_name; }
+ void setName(const TQString &name) { m_name = name; }
- QString caption() const { return m_caption; }
- void setCaption(const QString &c) { m_caption = c; }
+ TQString caption() const { return m_caption; }
+ void setCaption(const TQString &c) { m_caption = c; }
- QString description() const { return m_desc; }
- void setDescription(const QString &d) { m_desc = d; }
+ TQString description() const { return m_desc; }
+ void setDescription(const TQString &d) { m_desc = d; }
/*! \return "neverSaved" flag for this item what mean
that is used when new item is created in-memory-only,
@@ -79,20 +79,20 @@ class KEXICORE_EXPORT Item
bool isNull() const { return m_id==0; }
//! \return caption if not empty, else returns name.
- inline QString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
+ inline TQString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
private:
- QCString m_mime;
- QString m_name;
- QString m_caption;
- QString m_desc;
+ TQCString m_mime;
+ TQString m_name;
+ TQString m_caption;
+ TQString m_desc;
int m_id;
bool m_neverSaved : 1;
};
-typedef QIntDict<KexiPart::Item> ItemDict;
-typedef QIntDictIterator<KexiPart::Item> ItemDictIterator;
-typedef QPtrListIterator<KexiPart::Item> ItemListIterator;
+typedef TQIntDict<KexiPart::Item> ItemDict;
+typedef TQIntDictIterator<KexiPart::Item> ItemDictIterator;
+typedef TQPtrListIterator<KexiPart::Item> ItemListIterator;
/*!
@short Part item list with reimplemented compareItems() method.
@@ -100,12 +100,12 @@ typedef QPtrListIterator<KexiPart::Item> ItemListIterator;
Such a list is returend by KexiProject::getSortedItems(KexiPart::ItemList& list, KexiPart::Info *i);
so you can call sort() on the list to sort it by item name.
*/
-class KEXICORE_EXPORT ItemList : public QPtrList<KexiPart::Item> {
+class KEXICORE_EXPORT ItemList : public TQPtrList<KexiPart::Item> {
public:
ItemList() {}
protected:
- virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 ) {
- return QString::compare(
+ virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 ) {
+ return TQString::compare(
static_cast<KexiPart::Item*>(item1)->name(),
static_cast<KexiPart::Item*>(item2)->name());
}
diff --git a/kexi/core/kexipartmanager.cpp b/kexi/core/kexipartmanager.cpp
index 8525c2d78..8cd8fc0e2 100644
--- a/kexi/core/kexipartmanager.cpp
+++ b/kexi/core/kexipartmanager.cpp
@@ -35,8 +35,8 @@
using namespace KexiPart;
-Manager::Manager(QObject *parent)
- : QObject(parent)
+Manager::Manager(TQObject *tqparent)
+ : TQObject(tqparent)
{
m_lookupDone = false;
m_partlist.setAutoDelete(true);
@@ -56,20 +56,20 @@ Manager::lookup()
m_partsByMime.clear();
m_parts.clear();
KTrader::OfferList tlist = KTrader::self()->query("Kexi/Handler",
- "[X-Kexi-PartVersion] == " + QString::number(KEXI_PART_VERSION));
+ "[X-Kexi-PartVersion] == " + TQString::number(KEXI_PART_VERSION));
KConfig conf("kexirc", true);
conf.setGroup("Parts");
- QStringList sl_order = QStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order
- const int size = QMAX( tlist.count(), sl_order.count() );
- QPtrVector<KService> ordered( size*2 );
+ TQStringList sl_order = TQStringList::split( ",", conf.readEntry("Order") );//we'll set parts in defined order
+ const int size = TQMAX( tlist.count(), sl_order.count() );
+ TQPtrVector<KService> ordered( size*2 );
int offset = size; //we will insert not described parts from #offset
//compute order
for(KTrader::OfferList::ConstIterator it(tlist.constBegin()); it != tlist.constEnd(); ++it)
{
KService::Ptr ptr = (*it);
- QCString mime = ptr->property("X-Kexi-TypeMime").toCString();
+ TQCString mime = ptr->property("X-Kexi-TypeMime").toCString();
kdDebug() << "Manager::lookup(): " << mime << endl;
//<TEMP>: disable some parts if needed
if (!Kexi::tempShowForms() && mime=="kexi/form")
@@ -81,7 +81,7 @@ Manager::lookup()
if (!Kexi::tempShowScripts() && mime=="kexi/script")
continue;
//</TEMP>
- int idx = sl_order.findIndex( ptr->library() );
+ int idx = sl_order.tqfindIndex( ptr->library() );
if (idx!=-1)
ordered.insert(idx, ptr);
else //add to end
@@ -127,11 +127,11 @@ Manager::part(Info *i)
// kdDebug() << "Manager::part().." << endl;
int error=0;
p = KParts::ComponentFactory::createInstanceFromService<Part>(i->ptr(), this,
- QString(i->objectName()+"_part").latin1(), QStringList(), &error);
+ TQString(i->objectName()+"_part").latin1(), TQStringList(), &error);
if(!p) {
kdDebug() << "Manager::part(): failed :( (ERROR #" << error << ")" << endl;
kdDebug() << " " << KLibLoader::self()->lastErrorMessage() << endl;
- i->setBroken(true, i18n("Error while loading plugin \"%1\"").arg(i->objectName()));
+ i->setBroken(true, i18n("Error while loading plugin \"%1\"").tqarg(i->objectName()));
setError(i->errorMessage());
return 0;
}
@@ -180,25 +180,25 @@ Manager::removeClients( KexiMainWindow *win )
{
if (!win)
return;
- QIntDictIterator<Part> it(m_parts);
+ TQIntDictIterator<Part> it(m_parts);
for (;i.current();++it) {
i.current()->removeClient(win->guiFactory());
}
}*/
Part *
-Manager::partForMimeType(const QString &mimeType)
+Manager::partForMimeType(const TQString &mimeType)
{
return mimeType.isEmpty() ? 0 : part(m_partsByMime[mimeType.latin1()]);
}
Info *
-Manager::infoForMimeType(const QString &mimeType)
+Manager::infoForMimeType(const TQString &mimeType)
{
Info *i = mimeType.isEmpty() ? 0 : m_partsByMime[mimeType.latin1()];
if (i)
return i;
- setError(i18n("No plugin for mime type \"%1\"").arg(mimeType));
+ setError(i18n("No plugin for mime type \"%1\"").tqarg(mimeType));
return 0;
}
@@ -207,7 +207,7 @@ bool
Manager::checkProject(KexiDB::Connection *conn)
{
clearError();
-// QString errmsg = i18n("Invalid project contents.");
+// TQString errmsg = i18n("Invalid project contents.");
//TODO: catch errors!
if(!conn->isDatabaseUsed()) {
@@ -222,7 +222,7 @@ Manager::checkProject(KexiDB::Connection *conn)
}
// int id=0;
-// QStringList parts_found;
+// TQStringList parts_found;
for(cursor->moveFirst(); !cursor->eof(); cursor->moveNext())
{
// id++;
@@ -254,12 +254,12 @@ Manager::checkProject(KexiDB::Connection *conn)
KexiDB::FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url");
if (!fl)
return false;
- if (!parts_found.contains("kexi/table")) {
- if (!conn->insertRecord(*fl, QVariant(1), QVariant("Tables"), QVariant("kexi/table"), QVariant("http://")))
+ if (!parts_found.tqcontains("kexi/table")) {
+ if (!conn->insertRecord(*fl, TQVariant(1), TQVariant("Tables"), TQVariant("kexi/table"), TQVariant("http://")))
return false;
}
- if (!parts_found.contains("kexi/query")) {
- if (!conn->insertRecord(*fl, QVariant(2), QVariant("Queries"), QVariant("kexi/query"), QVariant("http://")))
+ if (!parts_found.tqcontains("kexi/query")) {
+ if (!conn->insertRecord(*fl, TQVariant(2), TQVariant("Queries"), TQVariant("kexi/query"), TQVariant("http://")))
return false;
}
#endif
diff --git a/kexi/core/kexipartmanager.h b/kexi/core/kexipartmanager.h
index 1756e965a..e771ae001 100644
--- a/kexi/core/kexipartmanager.h
+++ b/kexi/core/kexipartmanager.h
@@ -21,12 +21,12 @@
#ifndef KEXIPARTMANAGER_H
#define KEXIPARTMANAGER_H
-#include <qobject.h>
-#include <qdict.h>
-#include <qasciidict.h>
-#include <qintdict.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqasciidict.h>
+#include <tqintdict.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include <kservice.h>
@@ -47,33 +47,34 @@ namespace KexiPart
struct Missing
{
- QString name;
- QCString mime;
- QString url;
+ TQString name;
+ TQCString mime;
+ TQString url;
};
- typedef QAsciiDict<Info> PartInfoDict;
- typedef QDictIterator<Info> PartInfoDictIterator;
- typedef QValueList<Missing> MissingList;
- typedef QPtrList<Info> PartInfoList;
- typedef QPtrListIterator<Info> PartInfoListIterator;
- typedef QIntDict<Part> PartDict;
-// typedef QPtrList<DataSource> DataSourceList;
+ typedef TQAsciiDict<Info> PartInfoDict;
+ typedef TQDictIterator<Info> PartInfoDictIterator;
+ typedef TQValueList<Missing> MissingList;
+ typedef TQPtrList<Info> PartInfoList;
+ typedef TQPtrListIterator<Info> PartInfoListIterator;
+ typedef TQIntDict<Part> PartDict;
+// typedef TQPtrList<DataSource> DataSourceList;
/**
* @short KexiPart's manager: looks up and instantiates them
*
* It dlopens them when needed, they aren't dlopened at startup is not necessary.
*/
-class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
+class KEXICORE_EXPORT Manager : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* creates an empty instance
*/
- Manager(QObject *parent = 0);
+ Manager(TQObject *tqparent = 0);
~Manager();
/**
@@ -85,7 +86,7 @@ class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
* \return a part object for specified mime type. Dlopens a part using KexiPart::Info
* if needed. Return 0 if loading failed.
*/
- Part *partForMimeType(const QString& mimeTypt);
+ Part *partForMimeType(const TQString& mimeTypt);
/**
* \return a part object for specified info. Dlopens a part using KexiPart::Info
@@ -96,7 +97,7 @@ class KEXICORE_EXPORT Manager : public QObject, public KexiDB::Object
/**
* \return the info for a corresponding internal mime
*/
- Info *infoForMimeType(const QString& mimeType);
+ Info *infoForMimeType(const TQString& mimeType);
/**
* checks project's kexi__part table
diff --git a/kexi/core/kexiproject.cpp b/kexi/core/kexiproject.cpp
index 741fb67a4..7a2d9367d 100644
--- a/kexi/core/kexiproject.cpp
+++ b/kexi/core/kexiproject.cpp
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qapplication.h>
-#include <qdom.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqdom.h>
#include <kmimetype.h>
#include <kdebug.h>
@@ -72,15 +72,15 @@ class KexiProject::Private
delete sqlParser;
}
- QGuardedPtr<KexiDB::Connection> connection;
- QGuardedPtr<KexiProjectData> data;
+ TQGuardedPtr<KexiDB::Connection> connection;
+ TQGuardedPtr<KexiProjectData> data;
- QString error_title;
+ TQString error_title;
//! a cache for item() method, indexed by project part's ids
- QIntDict<KexiPart::ItemDict> itemDictsCache;
+ TQIntDict<KexiPart::ItemDict> itemDictsCache;
- QPtrDict<KexiPart::Item> unstoredItems;
+ TQPtrDict<KexiPart::Item> unstoredItems;
int tempPartItemID_Counter; //!< helper for getting unique
//!< temporary identifiers for unstored items
KexiDB::Parser* sqlParser;
@@ -96,7 +96,7 @@ class KexiProject::Private
class KexiProject::ErrorTitle
{
public:
- ErrorTitle(KexiProject* p, const QString& msg = QString::null)
+ ErrorTitle(KexiProject* p, const TQString& msg = TQString())
: prj(p)
, prev_err_title(p->m_error_title)
{
@@ -107,11 +107,11 @@ class KexiProject::ErrorTitle
prj->m_error_title = prev_err_title;
}
KexiProject* prj;
- QString prev_err_title;
+ TQString prev_err_title;
};*/
KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler)
- : QObject(), Object(handler)
+ : TQObject(), Object(handler)
, d(new Private())
{
d->data = pdata;
@@ -121,7 +121,7 @@ KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler
KexiProject::KexiProject(KexiProjectData *pdata, KexiDB::MessageHandler* handler,
KexiDB::Connection* conn)
- : QObject(), Object(handler)
+ : TQObject(), Object(handler)
, d(new Private())
{
d->data = pdata;
@@ -180,7 +180,7 @@ KexiProject::openInternal(bool *incompatibleWithKexi)
*incompatibleWithKexi = false;
kdDebug() << "KexiProject::open(): " << d->data->databaseName() <<" "<< d->data->connectionData()->driverName << endl;
KexiDB::MessageTitle et(this,
- i18n("Could not open project \"%1\".").arg(d->data->databaseName()));
+ i18n("Could not open project \"%1\".").tqarg(d->data->databaseName()));
if (!createConnection()) {
kdDebug() << "KexiProject::open(): !createConnection()" << endl;
@@ -225,7 +225,7 @@ tristate
KexiProject::create(bool forceOverwrite)
{
KexiDB::MessageTitle et(this,
- i18n("Could not create project \"%1\".").arg(d->data->databaseName()));
+ i18n("Could not create project \"%1\".").tqarg(d->data->databaseName()));
if (!createConnection())
return false;
@@ -284,9 +284,9 @@ KexiProject::create(bool forceOverwrite)
return false;
if (!KexiDB::replaceRow(*d->connection, t_db, "db_property", "project_caption",
- "db_value", QVariant( d->data->caption() ), KexiDB::Field::Text)
+ "db_value", TQVariant( d->data->caption() ), KexiDB::Field::Text)
|| !KexiDB::replaceRow(*d->connection, t_db, "db_property", "project_desc",
- "db_value", QVariant( d->data->description() ), KexiDB::Field::Text) )
+ "db_value", TQVariant( d->data->description() ), KexiDB::Field::Text) )
return false;
*/
if (trans.active() && !d->connection->commitTransaction(trans))
@@ -381,10 +381,10 @@ bool KexiProject::createInternalStructures(bool insideTransaction)
}
// 2.1 copy data (insert 0's into o_folder_id column)
if (!d->connection->executeSQL(
- QString::fromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) "
+ TQString::tqfromLatin1("INSERT INTO kexi__blobs (o_data, o_name, o_caption, o_mime, o_folder_id) "
"SELECT o_data, o_name, o_caption, o_mime, 0 FROM kexi__blobs") )
// 2.2 remove the original kexi__blobs
- || !d->connection->executeSQL(QString::fromLatin1("DROP TABLE kexi__blobs")) //lowlevel
+ || !d->connection->executeSQL(TQString::tqfromLatin1("DROP TABLE kexi__blobs")) //lowlevel
// 2.3 rename the copy back into kexi__blobs
|| !d->connection->drv_alterTableName(*kexi__blobsCopy, "kexi__blobs")
)
@@ -429,12 +429,12 @@ bool KexiProject::createInternalStructures(bool insideTransaction)
KexiDB::FieldList *fl = t_parts->subList("p_id", "p_name", "p_mime", "p_url");
if (partsTableOk)
- partsTableOk = d->connection->insertRecord(*fl, QVariant(1), QVariant("Tables"),
- QVariant("kexi/table"), QVariant("http://koffice.org/kexi/"));
+ partsTableOk = d->connection->insertRecord(*fl, TQVariant(1), TQVariant("Tables"),
+ TQVariant("kexi/table"), TQVariant("http://koffice.org/kexi/"));
if (partsTableOk)
- partsTableOk = d->connection->insertRecord(*fl, QVariant(2), QVariant("Queries"),
- QVariant("kexi/query"), QVariant("http://koffice.org/kexi/"));
+ partsTableOk = d->connection->insertRecord(*fl, TQVariant(2), TQVariant("Queries"),
+ TQVariant("kexi/query"), TQVariant("http://koffice.org/kexi/"));
}
}
@@ -480,7 +480,7 @@ KexiProject::createConnection()
if (!d->connection->connect())
{
setError(d->connection);
- kdDebug() << "KexiProject::createConnection(): error connecting: " << (d->connection ? d->connection->errorMsg() : QString::null) << endl;
+ kdDebug() << "KexiProject::createConnection(): error connecting: " << (d->connection ? d->connection->errorMsg() : TQString()) << endl;
closeConnection();
return false;
}
@@ -521,17 +521,17 @@ KexiProject::initProject()
// !@todo put more props. todo - creator, created date, etc. (also to KexiProjectData)
KexiDB::DatabaseProperties &props = d->connection->databaseProperties();
- QString str( props.value("project_caption").toString() );
+ TQString str( props.value("project_caption").toString() );
if (!str.isEmpty())
d->data->setCaption( str );
str = props.value("project_desc").toString();
if (!str.isEmpty())
d->data->setDescription( str );
/* KexiDB::RowData data;
- QString sql = "select db_value from kexi__db where db_property='%1'";
- if (d->connection->querySingleRecord( sql.arg("project_caption"), data ) && !data[0].toString().isEmpty())
+ TQString sql = "select db_value from kexi__db where db_property='%1'";
+ if (d->connection->querySingleRecord( sql.tqarg("project_caption"), data ) && !data[0].toString().isEmpty())
d->data->setCaption(data[0].toString());
- if (d->connection->querySingleRecord( sql.arg("project_desc"), data) && !data[0].toString().isEmpty())
+ if (d->connection->querySingleRecord( sql.tqarg("project_desc"), data) && !data[0].toString().isEmpty())
d->data->setDescription(data[0].toString());*/
return true;
@@ -560,7 +560,7 @@ KexiProject::items(KexiPart::Info *i)
//retrieve:
KexiDB::Cursor *cursor = d->connection->executeQuery(
"SELECT o_id, o_name, o_caption FROM kexi__objects WHERE o_type = "
- + QString::number(i->projectPartID()));//, KexiDB::Cursor::Buffered);
+ + TQString::number(i->projectPartID()));//, KexiDB::Cursor::Buffered);
// kdDebug() << "KexiProject::items(): cursor handle is:" << cursor << endl;
if(!cursor)
return 0;
@@ -573,7 +573,7 @@ KexiProject::items(KexiPart::Info *i)
KexiPart::Item *it = new KexiPart::Item();
bool ok;
int ident = cursor->value(0).toInt(&ok);
- QString objName( cursor->value(1).toString() );
+ TQString objName( cursor->value(1).toString() );
if ( ok && (ident>0) && !d->connection->isInternalTableSchema(objName)
&& KexiUtils::isIdentifier(objName) )
@@ -594,7 +594,7 @@ KexiProject::items(KexiPart::Info *i)
}
KexiPart::ItemDict*
-KexiProject::itemsForMimeType(const QCString &mimeType)
+KexiProject::itemsForMimeType(const TQCString &mimeType)
{
KexiPart::Info *info = Kexi::partManager().infoForMimeType(mimeType);
return items(info);
@@ -612,7 +612,7 @@ KexiProject::getSortedItems(KexiPart::ItemList& list, KexiPart::Info *i)
}
void
-KexiProject::getSortedItemsForMimeType(KexiPart::ItemList& list, const QCString &mimeType)
+KexiProject::getSortedItemsForMimeType(KexiPart::ItemList& list, const TQCString &mimeType)
{
KexiPart::Info *info = Kexi::partManager().infoForMimeType(mimeType);
getSortedItems(list, info);
@@ -632,12 +632,12 @@ KexiProject::addStoredItem(KexiPart::Info *info, KexiPart::Item *item)
}
KexiPart::Item*
-KexiProject::itemForMimeType(const QCString &mimeType, const QString &name)
+KexiProject::itemForMimeType(const TQCString &mimeType, const TQString &name)
{
KexiPart::ItemDict *dict = itemsForMimeType(mimeType);
if (!dict)
return 0;
- const QString l_name = name.lower();
+ const TQString l_name = name.lower();
for (KexiPart::ItemDictIterator it( *dict ); it.current(); ++it) {
if (it.current()->name().lower()==l_name)
return it.current();
@@ -646,12 +646,12 @@ KexiProject::itemForMimeType(const QCString &mimeType, const QString &name)
}
KexiPart::Item*
-KexiProject::item(KexiPart::Info *i, const QString &name)
+KexiProject::item(KexiPart::Info *i, const TQString &name)
{
KexiPart::ItemDict *dict = items(i);
if (!dict)
return 0;
- const QString l_name = name.lower();
+ const TQString l_name = name.lower();
for (KexiPart::ItemDictIterator it( *dict ); it.current(); ++it) {
if (it.current()->name().lower()==l_name)
return it.current();
@@ -663,8 +663,8 @@ KexiPart::Item*
KexiProject::item(int identifier)
{
KexiPart::ItemDict *dict;
- for (QIntDictIterator<KexiPart::ItemDict> it(d->itemDictsCache); (dict = it.current()); ++it) {
- KexiPart::Item *item = dict->find(identifier);
+ for (TQIntDictIterator<KexiPart::ItemDict> it(d->itemDictsCache); (dict = it.current()); ++it) {
+ KexiPart::Item *item = dict->tqfind(identifier);
if (item)
return item;
}
@@ -674,10 +674,10 @@ KexiProject::item(int identifier)
/*void KexiProject::clearMsg()
{
clearError();
-// d->error_title=QString::null;
+// d->error_title=TQString();
}
-void KexiProject::setError(int code, const QString &msg )
+void KexiProject::setError(int code, const TQString &msg )
{
Object::setError(code, msg);
if (Object::error())
@@ -686,7 +686,7 @@ void KexiProject::setError(int code, const QString &msg )
}
-void KexiProject::setError( const QString &msg )
+void KexiProject::setError( const TQString &msg )
{
Object::setError(msg);
if (Object::error())
@@ -704,7 +704,7 @@ void KexiProject::setError( KexiDB::Object *obj )
// emit error(d->error_title, obj);
}
-void KexiProject::setError(const QString &msg, const QString &desc)
+void KexiProject::setError(const TQString &msg, const TQString &desc)
{
Object::setError(msg); //ok?
ERRMSG(msg, desc); //not KexiDB-related
@@ -723,7 +723,7 @@ KexiPart::Part *KexiProject::findPartFor(KexiPart::Item& item)
}
KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& item,
- int viewMode, QMap<QString,QString>* staticObjectArgs)
+ int viewMode, TQMap<TQString,TQString>* staticObjectArgs)
{
clearError();
if (viewMode!=Kexi::DataViewMode && data()->userMode())
@@ -735,17 +735,17 @@ KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, KexiPart::Item& ite
return 0;
KexiDialogBase *dlg = part->openInstance(wnd, item, viewMode, staticObjectArgs);
if (!dlg) {
- if (part->lastOperationStatus().error())
- setError(i18n("Opening object \"%1\" failed.").arg(item.name())+"<br>"
- +part->lastOperationStatus().message,
- part->lastOperationStatus().description);
+ if (part->lastOperationtqStatus().error())
+ setError(i18n("Opening object \"%1\" failed.").tqarg(item.name())+"<br>"
+ +part->lastOperationtqStatus().message,
+ part->lastOperationtqStatus().description);
return 0;
}
return dlg;
}
-KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, const QCString &mimeType,
- const QString& name, int viewMode)
+KexiDialogBase* KexiProject::openObject(KexiMainWindow *wnd, const TQCString &mimeType,
+ const TQString& name, int viewMode)
{
KexiPart::Item *it = itemForMimeType(mimeType, name);
return it ? openObject(wnd, *it, viewMode) : 0;
@@ -801,14 +801,14 @@ bool KexiProject::removeObject(KexiMainWindow *wnd, KexiPart::Item& item)
return true;
}
-bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const QString& _newName )
+bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const TQString& _newName )
{
clearError();
if (data()->userMode())
return 0;
KexiUtils::WaitCursor wait;
- QString newName = _newName.stripWhiteSpace();
+ TQString newName = _newName.stripWhiteSpace();
{
KexiDB::MessageTitle et(this);
if (newName.isEmpty()) {
@@ -817,13 +817,13 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
}
if (this->itemForMimeType(item.mimeType(), newName)!=0) {
setError( i18n("Could not use this name. Object with name \"%1\" already exists.")
- .arg(newName) );
+ .tqarg(newName) );
return false;
}
}
KexiDB::MessageTitle et(this,
- i18n("Could not rename object \"%1\".").arg(item.name()) );
+ i18n("Could not rename object \"%1\".").tqarg(item.name()) );
if (!checkWritable())
return false;
KexiPart::Part *part = findPartFor(item);
@@ -835,12 +835,12 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
return false;
}
if (!part->rename(wnd, item, newName)) {
- setError(part->lastOperationStatus().message, part->lastOperationStatus().description);
+ setError(part->lastOperationtqStatus().message, part->lastOperationtqStatus().description);
return false;
}
if (!d->connection->executeSQL( "update kexi__objects set o_name="
+ d->connection->driver()->valueToSQL( KexiDB::Field::Text, newName )
- + " where o_id=" + QString::number(item.identifier()) )) {
+ + " where o_id=" + TQString::number(item.identifier()) )) {
setError(d->connection);
return false;
}
@@ -848,13 +848,13 @@ bool KexiProject::renameObject( KexiMainWindow *wnd, KexiPart::Item& item, const
setError(d->connection);
return false;
}
- QCString oldName( item.name().latin1() );
+ TQCString oldName( item.name().latin1() );
item.setName( newName );
emit itemRenamed(item, oldName);
return true;
}
-KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString& suggestedCaption)
+KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const TQString& suggestedCaption)
{
clearError();
if (data()->userMode())
@@ -871,8 +871,8 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
//find new, unique default name for this item
int n;
- QString new_name;
- QString base_name;
+ TQString new_name;
+ TQString base_name;
if (suggestedCaption.isEmpty()) {
n = 1;
base_name = part->instanceName();
@@ -883,11 +883,11 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
}
base_name = KexiUtils::string2Identifier(base_name).lower();
KexiPart::ItemDictIterator it(*dict);
- QPtrDictIterator<KexiPart::Item> itUnstored(d->unstoredItems);
+ TQPtrDictIterator<KexiPart::Item> itUnstored(d->unstoredItems);
do {
new_name = base_name;
if (n>=1)
- new_name += QString::number(n);
+ new_name += TQString::number(n);
for (it.toFirst(); it.current(); ++it) {
if (it.current()->name().lower()==new_name)
break;
@@ -908,9 +908,9 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
if (n>=1000)
return 0;
- QString new_caption( suggestedCaption.isEmpty() ? part->instanceCaption() : suggestedCaption);
+ TQString new_caption( suggestedCaption.isEmpty() ? part->instanceCaption() : suggestedCaption);
if (n>=1)
- new_caption += QString::number(n);
+ new_caption += TQString::number(n);
KexiPart::Item *item = new KexiPart::Item();
item->setIdentifier( --d->tempPartItemID_Counter );//temporary
@@ -922,7 +922,7 @@ KexiPart::Item* KexiProject::createPartItem(KexiPart::Info *info, const QString&
return item;
}
-KexiPart::Item* KexiProject::createPartItem(KexiPart::Part *part, const QString& suggestedCaption)
+KexiPart::Item* KexiProject::createPartItem(KexiPart::Part *part, const TQString& suggestedCaption)
{
return createPartItem(part->info(), suggestedCaption);
}
@@ -944,7 +944,7 @@ KexiDB::Parser* KexiProject::sqlParser()
return d->sqlParser;
}
-static const QString warningNoUndo = i18n("Warning: entire project's data will be removed.");
+static const TQString warningNoUndo = i18n("Warning: entire project's data will be removed.");
/*static*/
KexiProject*
@@ -960,8 +960,8 @@ KexiProject::createBlankProject(bool &cancelled, KexiProjectData* data,
if (KMessageBox::Yes != KMessageBox::warningYesNo(0, "<qt>"+i18n(
"The project %1 already exists.\n"
"Do you want to replace it with a new, blank one?")
- .arg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>",
- QString::null, KGuiItem(i18n("Replace")), KStdGuiItem::cancel() ))
+ .tqarg(prj->data()->infoString())+"\n"+warningNoUndo+"</qt>",
+ TQString(), KGuiItem(i18n("Replace")), KStdGuiItem::cancel() ))
//todo add serverInfoString() for server-based prj
{
delete prj;
@@ -985,7 +985,7 @@ tristate KexiProject::dropProject(KexiProjectData* data,
KexiDB::MessageHandler* handler, bool dontAsk)
{
if (!dontAsk && KMessageBox::Yes != KMessageBox::warningYesNo(0,
- i18n("Do you want to drop the project \"%1\"?").arg(data->objectName())+"\n"+warningNoUndo ))
+ i18n("Do you want to drop the project \"%1\"?").tqarg(data->KexiDB::SchemaData::objectName())+"\n"+warningNoUndo ))
return cancelled;
KexiProject prj( new KexiProjectData(*data), handler );
diff --git a/kexi/core/kexiproject.h b/kexi/core/kexiproject.h
index 1128ffe42..e6fb283e4 100644
--- a/kexi/core/kexiproject.h
+++ b/kexi/core/kexiproject.h
@@ -21,10 +21,10 @@
#ifndef KEXIPROJECT_H
#define KEXIPROJECT_H
-#include <qobject.h>
-#include <qintdict.h>
-#include <qptrdict.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqintdict.h>
+#include <tqptrdict.h>
+#include <tqguardedptr.h>
#include <kexiutils/tristate.h>
#include <kexidb/object.h>
@@ -64,9 +64,10 @@ class KexiDialogBase;
* It also contains connection data,
* current file state, etc.
*/
-class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
+class KEXICORE_EXPORT KexiProject : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor 1. Creates a new object using \a pdata.
@@ -106,7 +107,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
value in "kexi__db" table.
This is often the case for native server-based databases.
If so, Kexi application can propose importing the database
- or linking it to parent project (the latter isn't yet implemented).
+ or linking it to tqparent project (the latter isn't yet implemented).
For other types of errors the variable is set to true. */
tristate open(bool &incompatibleWithKexi);
@@ -138,7 +139,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
* @return all items of a type \a mime in this project
* It is a convenience function.
*/
- KexiPart::ItemDict* itemsForMimeType(const QCString &mimeType);
+ KexiPart::ItemDict* itemsForMimeType(const TQCString &mimeType);
/**
* Puts a list of items of a type \a i in this project into \a list.
@@ -150,17 +151,17 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
* Puts a sorted list of items of a type \a mimeType in this project into \a list.
* You can then sort this list using ItemList::sort().
*/
- void getSortedItemsForMimeType(KexiPart::ItemList& list, const QCString &mimeType);
+ void getSortedItemsForMimeType(KexiPart::ItemList& list, const TQCString &mimeType);
/**
* @return item of type \a mime and name \a name
*/
- KexiPart::Item* itemForMimeType(const QCString &mimeType, const QString &name);
+ KexiPart::Item* itemForMimeType(const TQCString &mimeType, const TQString &name);
/**
* @return item of type \a i and name \a name
*/
- KexiPart::Item* item(KexiPart::Info *i, const QString &name);
+ KexiPart::Item* item(KexiPart::Info *i, const TQString &name);
/**
* @return item for \a identifier
@@ -181,11 +182,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
\a staticObjectArgs can be passed for static object
(only works when part for this item is of type KexiPart::StaticPart) */
KexiDialogBase* openObject(KexiMainWindow *wnd, KexiPart::Item& item,
- int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
//! For convenience
- KexiDialogBase* openObject(KexiMainWindow *wnd, const QCString &mimeType,
- const QString& name, int viewMode = Kexi::DataViewMode);
+ KexiDialogBase* openObject(KexiMainWindow *wnd, const TQCString &mimeType,
+ const TQString& name, int viewMode = Kexi::DataViewMode);
/*! Remove a part instance pointed by \a item.
\return true on success. */
@@ -193,7 +194,7 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
/*! Renames a part instance pointed by \a item to a new name \a newName.
\return true on success. */
- bool renameObject(KexiMainWindow *wnd, KexiPart::Item& item, const QString& newName);
+ bool renameObject(KexiMainWindow *wnd, KexiPart::Item& item, const TQString& newName);
/*! Creates part item for given part \a info.
Newly item will not be saved to the backend but stored in memory only
@@ -210,11 +211,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
This method is used before creating new object.
\return newly created part item or NULL on any error. */
KexiPart::Item* createPartItem(KexiPart::Info *info,
- const QString& suggestedCaption = QString::null );
+ const TQString& suggestedCaption = TQString() );
//! Added for convenience.
KexiPart::Item* createPartItem(KexiPart::Part *part,
- const QString& suggestedCaption = QString::null);
+ const TQString& suggestedCaption = TQString());
/*! Adds item \a item after it is succesfully stored as an instance of part
pointed by \a info. Also clears 'neverSaved' flag if \a item.
@@ -254,11 +255,11 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
static tristate dropProject(KexiProjectData* data,
KexiDB::MessageHandler* handler, bool dontAsk = false);
- /*! @see KexiDB::Connection::setQuerySchemaObsolete( const QString& queryName ) */
-// void setQuerySchemaObsolete( const QString& queryName );
+ /*! @see KexiDB::Connection::setQuerySchemaObsolete( const TQString& queryName ) */
+// void setQuerySchemaObsolete( const TQString& queryName );
// /** used to emit objectCreated() signal */
-// void emitObjectCreated(const QCString &mime, const QCString& name) { emit objectCreated(mime, name); }
+// void emitObjectCreated(const TQCString &mime, const TQCString& name) { emit objectCreated(mime, name); }
// void emitTableCreated(KexiDB::TableSchema& schema) { emit tableCreated(schema); }
protected:
@@ -300,10 +301,10 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
signals:
/** signal emitted on error */
- void error(const QString &title, KexiDB::Object *obj);
+ void error(const TQString &title, KexiDB::Object *obj);
/** signal emitted on error (not KexiDB-related) */
- void error(const QString &msg, const QString &desc);
+ void error(const TQString &msg, const TQString &desc);
/** New \a item has been stored. */
void newItemStored(KexiPart::Item& item);
@@ -312,12 +313,12 @@ class KEXICORE_EXPORT KexiProject : public QObject, public KexiDB::Object
void itemRemoved(const KexiPart::Item &item);
/** instance pointed by \a item is renamed */
- void itemRenamed(const KexiPart::Item &item, const QCString& oldName);
+ void itemRenamed(const KexiPart::Item &item, const TQCString& oldName);
// /** new table \a schema created */
// void tableCreated(KexiDB::TableSchema& schema);
// /** New object of mimetype \a mime and \a name has been created. */
-// void objectCreated(const QCString &mime, const QCString& name);
+// void objectCreated(const TQCString &mime, const TQCString& name);
protected:
/*! Checks whether the project's connection is read-only.
diff --git a/kexi/core/kexiprojectconnectiondata.cpp b/kexi/core/kexiprojectconnectiondata.cpp
index 6a73342f2..7a3cc0cc8 100644
--- a/kexi/core/kexiprojectconnectiondata.cpp
+++ b/kexi/core/kexiprojectconnectiondata.cpp
@@ -20,10 +20,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -41,8 +41,8 @@ KexiProjectConnectionData::KexiProjectConnectionData(): KexiDB::ConnectionData()
{
}
-KexiProjectConnectionData::KexiProjectConnectionData(const QString& driverName, const QString& databaseName, const QString &host,
- unsigned short int rport, const QString& user, const QString &pass, const QString& file):KexiDB::ConnectionData()
+KexiProjectConnectionData::KexiProjectConnectionData(const TQString& driverName, const TQString& databaseName, const TQString &host,
+ unsigned short int rport, const TQString& user, const TQString &pass, const TQString& file):KexiDB::ConnectionData()
{
m_driverName=driverName;
m_databaseName=databaseName;
@@ -53,30 +53,30 @@ KexiProjectConnectionData::KexiProjectConnectionData(const QString& driverName,
setFileName(file);
}
-KexiProjectConnectionData::KexiProjectConnectionData(const QString &driverName, const QString &fileName)
+KexiProjectConnectionData::KexiProjectConnectionData(const TQString &driverName, const TQString &fileName)
: KexiDB::ConnectionData()
{
m_driverName=driverName;
setFileName(fileName);
}
-const QString &
+const TQString &
KexiProjectConnectionData::generateTmpName()
{
- return QString::null;
+ return TQString();
}
KexiProjectConnectionData*
-KexiProjectConnectionData::loadInfo(QDomElement &rootElement)
+KexiProjectConnectionData::loadInfo(TQDomElement &rootElement)
{
- QDomElement engineElement = rootElement.namedItem("engine").toElement();
- QDomElement hostElement = rootElement.namedItem("host").toElement();
- QDomElement portElement = rootElement.namedItem("port").toElement();
- QDomElement nameElement = rootElement.namedItem("name").toElement();
- QDomElement userElement = rootElement.namedItem("user").toElement();
- QDomElement passElement = rootElement.namedItem("password").toElement();
- QDomElement persElement = rootElement.namedItem("persistant").toElement();
- QDomElement encodingElement = rootElement.namedItem("encoding").toElement();
+ TQDomElement engineElement = rootElement.namedItem("engine").toElement();
+ TQDomElement hostElement = rootElement.namedItem("host").toElement();
+ TQDomElement portElement = rootElement.namedItem("port").toElement();
+ TQDomElement nameElement = rootElement.namedItem("name").toElement();
+ TQDomElement userElement = rootElement.namedItem("user").toElement();
+ TQDomElement passElement = rootElement.namedItem("password").toElement();
+ TQDomElement persElement = rootElement.namedItem("persistant").toElement();
+ TQDomElement encodingElement = rootElement.namedItem("encoding").toElement();
KexiProjectConnectionData *tmp=new KexiProjectConnectionData(
engineElement.text(), nameElement.text(),hostElement.text(),portElement.text().toInt(),
@@ -85,62 +85,62 @@ KexiProjectConnectionData::loadInfo(QDomElement &rootElement)
return tmp;
}
-void KexiProjectConnectionData::setDriverName(const QString &driverName) {
+void KexiProjectConnectionData::setDriverName(const TQString &driverName) {
m_driverName=driverName;
}
-void KexiProjectConnectionData::setDatabaseName(const QString &databaseName) {
+void KexiProjectConnectionData::setDatabaseName(const TQString &databaseName) {
m_databaseName=databaseName;
}
-QString KexiProjectConnectionData::driverName() const {
+TQString KexiProjectConnectionData::driverName() const {
return m_driverName;
}
-QString KexiProjectConnectionData::databaseName() const {
+TQString KexiProjectConnectionData::databaseName() const {
return m_databaseName;
}
void
-KexiProjectConnectionData::writeInfo(QDomDocument &domDoc)
+KexiProjectConnectionData::writeInfo(TQDomDocument &domDoc)
{
- QDomElement connectionElement = domDoc.createElement("KexiDBConnection");
+ TQDomElement connectionElement = domDoc.createElement("KexiDBConnection");
domDoc.documentElement().appendChild(connectionElement);
//DB ENGINE
- QDomElement engineElement = domDoc.createElement("engine");
+ TQDomElement engineElement = domDoc.createElement("engine");
connectionElement.appendChild(engineElement);
- QDomText tEngine = domDoc.createTextNode(m_driverName);
+ TQDomText tEngine = domDoc.createTextNode(m_driverName);
engineElement.appendChild(tEngine);
//HOST
- QDomElement hostElement = domDoc.createElement("host");
+ TQDomElement hostElement = domDoc.createElement("host");
connectionElement.appendChild(hostElement);
- QDomText tHost = domDoc.createTextNode(hostName);
+ TQDomText tHost = domDoc.createTextNode(hostName);
hostElement.appendChild(tHost);
//DATABASE NAME
- QDomElement nameElement = domDoc.createElement("name");
+ TQDomElement nameElement = domDoc.createElement("name");
connectionElement.appendChild(nameElement);
- QDomText tName = domDoc.createTextNode(m_databaseName);
+ TQDomText tName = domDoc.createTextNode(m_databaseName);
nameElement.appendChild(tName);
//USER
- QDomElement userElement = domDoc.createElement("user");
+ TQDomElement userElement = domDoc.createElement("user");
connectionElement.appendChild(userElement);
- QDomText tUser = domDoc.createTextNode(userName);
+ TQDomText tUser = domDoc.createTextNode(userName);
userElement.appendChild(tUser);
//PASSWORD STUFF
- QDomElement passElement = domDoc.createElement("password");
+ TQDomElement passElement = domDoc.createElement("password");
connectionElement.appendChild(passElement);
- QDomText tPass=domDoc.createTextNode(password);
+ TQDomText tPass=domDoc.createTextNode(password);
passElement.appendChild(tPass);
}
diff --git a/kexi/core/kexiprojectconnectiondata.h b/kexi/core/kexiprojectconnectiondata.h
index 04ff40ff4..4430907d7 100644
--- a/kexi/core/kexiprojectconnectiondata.h
+++ b/kexi/core/kexiprojectconnectiondata.h
@@ -22,8 +22,8 @@
#include <kexidb/connectiondata.h>
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
class KoStore;
/**
* This class aims to provide
@@ -39,30 +39,30 @@ class KEXICORE_EXPORT KexiProjectConnectionData:public KexiDB::ConnectionData
KexiProjectConnectionData();
- KexiProjectConnectionData(const QString& driverName, const QString& databaseName, const QString &hostName, unsigned short int port,
- const QString& userName, const QString &password, const QString& fileName);
+ KexiProjectConnectionData(const TQString& driverName, const TQString& databaseName, const TQString &hostName, unsigned short int port,
+ const TQString& userName, const TQString &password, const TQString& fileName);
/**
* connect to a embedded database
*/
- KexiProjectConnectionData(const QString &driverName, const QString &fileName=QString::null);
+ KexiProjectConnectionData(const TQString &driverName, const TQString &fileName=TQString());
~KexiProjectConnectionData();
- static const QString &generateTmpName();
+ static const TQString &generateTmpName();
- static KexiProjectConnectionData* loadInfo(QDomElement &e);
- void writeInfo(QDomDocument &doc);
+ static KexiProjectConnectionData* loadInfo(TQDomElement &e);
+ void writeInfo(TQDomDocument &doc);
- void setDriverName(const QString &driverName);
- void setDatabaseName(const QString &databaseName);
+ void setDriverName(const TQString &driverName);
+ void setDatabaseName(const TQString &databaseName);
- QString driverName() const;
- QString databaseName() const;
+ TQString driverName() const;
+ TQString databaseName() const;
private:
- QString m_driverName;
- QString m_databaseName;
+ TQString m_driverName;
+ TQString m_databaseName;
};
diff --git a/kexi/core/kexiprojectdata.cpp b/kexi/core/kexiprojectdata.cpp
index 68966a114..9f0106bcf 100644
--- a/kexi/core/kexiprojectdata.cpp
+++ b/kexi/core/kexiprojectdata.cpp
@@ -21,10 +21,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include <qdom.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -48,7 +48,7 @@ public:
{}
KexiDB::ConnectionData connData;
- QDateTime lastOpened;
+ TQDateTime lastOpened;
bool userMode : 1;
bool readOnly : 1;
};
@@ -56,7 +56,7 @@ public:
//---------------------------------------
KexiProjectData::KexiProjectData()
- : QObject(0, "KexiProjectData")
+ : TQObject(0, "KexiProjectData")
, KexiDB::SchemaData()
, formatVersion(0)
, d( new KexiProjectDataPrivate() )
@@ -64,8 +64,8 @@ KexiProjectData::KexiProjectData()
}
KexiProjectData::KexiProjectData(
- const KexiDB::ConnectionData &cdata, const QString& dbname, const QString& caption )
- : QObject(0, "KexiProjectData")
+ const KexiDB::ConnectionData &cdata, const TQString& dbname, const TQString& caption )
+ : TQObject(0, "KexiProjectData")
, KexiDB::SchemaData()
, formatVersion(0)
, d( new KexiProjectDataPrivate() )
@@ -76,7 +76,7 @@ KexiProjectData::KexiProjectData(
}
KexiProjectData::KexiProjectData( const KexiProjectData& pdata )
- : QObject(0, "KexiProjectData"), KexiDB::SchemaData()
+ : TQObject(0, "KexiProjectData"), KexiDB::SchemaData()
, d( 0 )
{
*this = pdata;
@@ -116,12 +116,12 @@ const KexiDB::ConnectionData* KexiProjectData::constConnectionData() const
return &d->connData;
}
-QString KexiProjectData::databaseName() const
+TQString KexiProjectData::databaseName() const
{
return KexiDB::SchemaData::name();
}
-void KexiProjectData::setDatabaseName(const QString& dbName)
+void KexiProjectData::setDatabaseName(const TQString& dbName)
{
KexiDB::SchemaData::setName(dbName);
}
@@ -131,37 +131,37 @@ bool KexiProjectData::userMode() const
return d->userMode;
}
-QDateTime KexiProjectData::lastOpened() const
+TQDateTime KexiProjectData::lastOpened() const
{
return d->lastOpened;
}
-void KexiProjectData::setLastOpened(const QDateTime& lastOpened)
+void KexiProjectData::setLastOpened(const TQDateTime& lastOpened)
{
d->lastOpened=lastOpened;
}
-QString KexiProjectData::description() const
+TQString KexiProjectData::description() const
{
return KexiDB::SchemaData::description();
}
-void KexiProjectData::setDescription(const QString& desc)
+void KexiProjectData::setDescription(const TQString& desc)
{
return KexiDB::SchemaData::setDescription(desc);
}
-QString KexiProjectData::infoString(bool nobr) const
+TQString KexiProjectData::infoString(bool nobr) const
{
if (constConnectionData()->fileName().isEmpty()) {
//server-based
- return QString(nobr ? "<nobr>" : "") + QString("\"%1\"").arg(databaseName()) + (nobr ? "</nobr>" : "")
+ return TQString(nobr ? "<nobr>" : "") + TQString("\"%1\"").tqarg(databaseName()) + (nobr ? "</nobr>" : "")
+ (nobr ? " <nobr>" : " ") + i18n("database connection", "(connection %1)")
- .arg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : "");
+ .tqarg(constConnectionData()->serverInfoString()) + (nobr ? "</nobr>" : "");
}
//file-based
- return QString(nobr ? "<nobr>" : "")
- + QString("\"%1\"").arg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : "");
+ return TQString(nobr ? "<nobr>" : "")
+ + TQString("\"%1\"").tqarg(constConnectionData()->fileName()) + (nobr ? "</nobr>" : "");
}
void KexiProjectData::setReadOnly(bool set)
diff --git a/kexi/core/kexiprojectdata.h b/kexi/core/kexiprojectdata.h
index b4fc99d3f..32e5ed7ed 100644
--- a/kexi/core/kexiprojectdata.h
+++ b/kexi/core/kexiprojectdata.h
@@ -24,7 +24,7 @@
#include <kexidb/connectiondata.h>
#include <kexidb/schemadata.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KexiProjectDataPrivate;
@@ -36,16 +36,16 @@ class KexiProjectDataPrivate;
- connection data
- date and time of last opening
*/
-class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaData
+class KEXICORE_EXPORT KexiProjectData : public TQObject, public KexiDB::SchemaData
{
public:
- typedef QPtrList<KexiProjectData> List;
- typedef QMap<QCString,QString> ObjectInfo;
+ typedef TQPtrList<KexiProjectData> List;
+ typedef TQMap<TQCString,TQString> ObjectInfo;
KexiProjectData();
KexiProjectData( const KexiDB::ConnectionData &cdata,
- const QString& dbname = QString::null, const QString& caption = QString::null );
+ const TQString& dbname = TQString(), const TQString& caption = TQString() );
/*! Constructs a copy of \a pdata */
KexiProjectData( const KexiProjectData& pdata );
@@ -64,8 +64,8 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
/*! \return database name.
In fact, this is the same as KexiDB::SchemaData::name() */
- QString databaseName() const;
- void setDatabaseName(const QString& dbName);
+ TQString databaseName() const;
+ void setDatabaseName(const TQString& dbName);
/*! \return user-visible string better describing the project than just databaseName().
For server-based projects returns i18n'd string:
@@ -73,13 +73,13 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
For file-based projects returns project's filename.
If \a nobr is true, \<nobr\> tags are added around '(connection: user\@server:port)'
(useful for displaying in message boxes). */
- QString infoString(bool nobr = true) const;
+ TQString infoString(bool nobr = true) const;
- QDateTime lastOpened() const;
- void setLastOpened(const QDateTime& lastOpened);
+ TQDateTime lastOpened() const;
+ void setLastOpened(const TQDateTime& lastOpened);
- QString description() const;
- void setDescription(const QString& desc);
+ TQString description() const;
+ void setDescription(const TQString& desc);
/*! If \a set is true, sets readonly flag for this data, so any connection opened for the project will
be readonly. Change this flag before using this data in KexiProject instance,
@@ -92,7 +92,7 @@ class KEXICORE_EXPORT KexiProjectData : public QObject, public KexiDB::SchemaDat
/*! objects to open on startup (come from command line "-open" option)
It's public for convenience */
- QValueList<ObjectInfo> autoopenObjects;
+ TQValueList<ObjectInfo> autoopenObjects;
/*! @internal
Format version used when saving the data to a shortcut file.
diff --git a/kexi/core/kexiprojectset.cpp b/kexi/core/kexiprojectset.cpp
index 51e804dd1..994c70af1 100644
--- a/kexi/core/kexiprojectset.cpp
+++ b/kexi/core/kexiprojectset.cpp
@@ -67,7 +67,7 @@ KexiProjectSet::KexiProjectSet(KexiDB::ConnectionData &conndata,
delete conn;
return;
}
- QStringList dbnames = conn->databaseNames(false/*skip system*/);
+ TQStringList dbnames = conn->databaseNames(false/*skip system*/);
// kexidbg << dbnames.count() << endl;
if (conn->error()) {
setError(conn);
@@ -76,7 +76,7 @@ KexiProjectSet::KexiProjectSet(KexiDB::ConnectionData &conndata,
}
delete conn;
conn = 0;
- for (QStringList::ConstIterator it = dbnames.constBegin(); it!=dbnames.constEnd(); ++it) {
+ for (TQStringList::ConstIterator it = dbnames.constBegin(); it!=dbnames.constEnd(); ++it) {
// project's caption is just the same as database name - nothing better is available
KexiProjectData *pdata = new KexiProjectData(conndata, *it, *it);
d->list.append( pdata );
@@ -100,10 +100,10 @@ KexiProjectData::List KexiProjectSet::list() const
return d->list;
}
-KexiProjectData* KexiProjectSet::findProject(const QString &dbName) const
+KexiProjectData* KexiProjectSet::findProject(const TQString &dbName) const
{
- const QString _dbName = dbName.lower();
- QPtrListIterator<KexiProjectData> it( d->list );
+ const TQString _dbName = dbName.lower();
+ TQPtrListIterator<KexiProjectData> it( d->list );
for (;it.current();++it) {
if (it.current()->databaseName().lower()==_dbName)
return it.current();
diff --git a/kexi/core/kexiprojectset.h b/kexi/core/kexiprojectset.h
index af2517226..3ea11ec8c 100644
--- a/kexi/core/kexiprojectset.h
+++ b/kexi/core/kexiprojectset.h
@@ -57,7 +57,7 @@ class KEXICORE_EXPORT KexiProjectSet : public KexiDB::Object
//! Case insensitive lookup.
//! \return project data for databased \a dbName or NULL if not found
- KexiProjectData* findProject(const QString &dbName) const;
+ KexiProjectData* findProject(const TQString &dbName) const;
private:
KexiProjectSetPrivate *d;
diff --git a/kexi/core/kexisearchandreplaceiface.h b/kexi/core/kexisearchandreplaceiface.h
index f17d83587..f581de34e 100644
--- a/kexi/core/kexisearchandreplaceiface.h
+++ b/kexi/core/kexisearchandreplaceiface.h
@@ -21,9 +21,9 @@
#define KexiSearchAndReplaceViewInterface_H
#include <kexiutils/tristate.h>
-#include <qstring.h>
-class QVariant;
-class QStringList;
+#include <tqstring.h>
+class TQVariant;
+class TQStringList;
//! @short An interface used by Kexi views (KexiViewBase) supporting search/replace features
class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
@@ -78,19 +78,19 @@ class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
bool promptOnReplace : 1;
};
- /*! Sets up data for find/replace dialog, based on view's data model.
+ /*! Sets up data for tqfind/replace dialog, based on view's data model.
\a columnNames should contain column name, \a columnCaptions should contain column captions,
and \a currentColumnName should beset to current column's name.
- Implementation should set up values and return true if find/replace dialog should be filled. */
- virtual bool setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
- QString& currentColumnName) = 0;
+ Implementation should set up values and return true if tqfind/replace dialog should be filled. */
+ virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
+ TQString& currentColumnName) = 0;
/*! Finds \a valueToFind within the view.
\a options are used to control the process. Selection is moved to found value.
\return true if value has been found, false if value has not been found,
and cancelled if there is nothing to find or there is no data to search in.
If \a next is true, "find next" is performed, else "find previous" is performed. */
- virtual tristate find(const QVariant& valueToFind,
+ virtual tristate tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next) = 0;
/*! Finds \a valueToFind within the view and replaces with \a replacement
@@ -99,7 +99,7 @@ class KEXICORE_EXPORT KexiSearchAndReplaceViewInterface
has not been found and replaced, and cancelled if there is nothing
to find or there is no data to search in or the data is read only.
If \a replaceAll is true, all found values are replaced. */
- virtual tristate findNextAndReplace(const QVariant& valueToFind, const QVariant& replacement,
+ virtual tristate findNextAndReplace(const TQVariant& valueToFind, const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll) = 0;
};
diff --git a/kexi/core/kexisharedactionhost.cpp b/kexi/core/kexisharedactionhost.cpp
index 11ab94dbc..b00cbc1b4 100644
--- a/kexi/core/kexisharedactionhost.cpp
+++ b/kexi/core/kexisharedactionhost.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h)
-: QObject(0,"KexiSharedActionHostPrivate")
+: TQObject(0,"KexiSharedActionHostPrivate")
, actionProxies(401)
, actionMapper( this )
, volatileActions(401)
@@ -37,14 +37,14 @@ KexiSharedActionHostPrivate::KexiSharedActionHostPrivate(KexiSharedActionHost *h
, host(h)
{
volatileActions.setAutoDelete(true);
- connect(&actionMapper, SIGNAL(mapped(const QString &)), this, SLOT(slotAction(const QString &)));
+ connect(&actionMapper, TQT_SIGNAL(mapped(const TQString &)), this, TQT_SLOT(slotAction(const TQString &)));
}
-void KexiSharedActionHostPrivate::slotAction(const QString& act_id)
+void KexiSharedActionHostPrivate::slotAction(const TQString& act_id)
{
- QWidget *w = host->focusWindow(); //focusWidget();
+ TQWidget *w = host->focusWindow(); //tqfocusWidget();
// while (w && !w->inherits("KexiDialogBase") && !w->inherits("KexiDockBase"))
-// w = w->parentWidget();
+// w = w->tqparentWidget();
KexiActionProxy *proxy = w ? actionProxies[ w ] : 0;
@@ -104,22 +104,22 @@ void KexiSharedActionHost::setActionAvailable(const char *action_name, bool avai
}
}
-void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, QObject *obj)
+void KexiSharedActionHost::updateActionAvailable(const char *action_name, bool avail, TQObject *obj)
{
/*test if (qstrcmp(action_name, "tablepart_toggle_pkey")==0) {
kdDebug() << "tablepart_toggle_pkey" << endl;
}*/
if (!d)
return; //sanity
- QWidget *fw = d->mainWin->focusWidget();
- while (fw && obj!=fw)
- fw = fw->parentWidget();
+ TQWidget *fw = d->mainWin->tqfocusWidget();
+ while (fw && TQT_BASE_OBJECT(obj)!=TQT_BASE_OBJECT(fw))
+ fw = fw->tqparentWidget();
if (!fw)
return;
setActionAvailable(action_name, avail);
if (avail) {
- d->enablers.replace(action_name, fw);
+ d->enablers.tqreplace(action_name, fw);
}
else {
d->enablers.take(action_name);
@@ -137,7 +137,7 @@ KMainWindow* KexiSharedActionHost::mainWindow() const
return d->mainWin;
}
-void KexiSharedActionHost::invalidateSharedActions(QObject *o)
+void KexiSharedActionHost::tqinvalidateSharedActions(TQObject *o)
{
if (!d)
return;
@@ -149,7 +149,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
KAction *a = *it;
if (!insideDialogBase && d->mainWin->actionCollection()!=a->parentCollection()) {
//o is not KexiDialogBase or its child:
- // only invalidate action if it comes from mainwindow's KActionCollection
+ // only tqinvalidate action if it comes from mainwindow's KActionCollection
// (thus part-actions are untouched when the focus is e.g. in the Property Editor)
continue;
}
@@ -157,7 +157,7 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
KexiVolatileActionData *va = d->volatileActions[ a ];
if (va != 0) {
if (p && p->isSupported(a->name())) {
- QPtrList<KAction> actions_list;
+ TQPtrList<KAction> actions_list;
actions_list.append( a );
if (!va->plugged) {
va->plugged=true;
@@ -178,43 +178,43 @@ void KexiSharedActionHost::invalidateSharedActions(QObject *o)
}
}
-KexiActionProxy* KexiSharedActionHost::actionProxyFor(QObject *o) const
+KexiActionProxy* KexiSharedActionHost::actionProxyFor(TQObject *o) const
{
return d->actionProxies[ o ];
}
-KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(QObject *o)
+KexiActionProxy* KexiSharedActionHost::takeActionProxyFor(TQObject *o)
{
if (d)
return d->actionProxies.take( o );
return 0;
}
-bool KexiSharedActionHost::acceptsSharedActions(QObject *)
+bool KexiSharedActionHost::acceptsSharedActions(TQObject *)
{
return false;
}
-QWidget* KexiSharedActionHost::focusWindow()
+TQWidget* KexiSharedActionHost::focusWindow()
{
- QWidget *fw;
+ TQWidget *fw;
if (dynamic_cast<KMdiMainFrm*>(d->mainWin)) {
fw = dynamic_cast<KMdiMainFrm*>(d->mainWin)->activeWindow();
}
else {
- QWidget *aw = qApp->activeWindow();
+ TQWidget *aw = TQT_TQWIDGET(tqApp->activeWindow());
if (!aw)
aw = d->mainWin;
- fw = aw->focusWidget();
+ fw = aw->tqfocusWidget();
}
- while (fw && !acceptsSharedActions(fw))
- fw = fw->parentWidget();
+ while (fw && !acceptsSharedActions(TQT_TQOBJECT(fw)))
+ fw = fw->tqparentWidget();
return fw;
}
KAction* KexiSharedActionHost::createSharedActionInternal( KAction *action )
{
- QObject::connect(action,SIGNAL(activated()), &d->actionMapper, SLOT(map()));
+ TQObject::connect(action,TQT_SIGNAL(activated()), &d->actionMapper, TQT_SLOT(map()));
d->actionMapper.setMapping(action, action->name());
d->sharedActions.append( action );
return action;
@@ -228,17 +228,17 @@ KActionPtrList KexiSharedActionHost::sharedActions() const
/*class KexiAction : public KAction
{
public:
- KexiAction(const QString &text, const QIconSet &pix,
- const KShortcut &cut, const QObject *receiver,
- const char *slot, KActionCollection *parent, const char *name)
- : KAction(text,pix,cut,receiver,slot,parent,name)
+ KexiAction(const TQString &text, const TQIconSet &pix,
+ const KShortcut &cut, const TQObject *receiver,
+ const char *slot, KActionCollection *tqparent, const char *name)
+ : KAction(text,pix,cut,receiver,slot,tqparent,name)
{
}
- QPtrDict<QWidget> unplugged;
+ TQPtrDict<TQWidget> unplugged;
};*/
-KAction* KexiSharedActionHost::createSharedAction(const QString &text, const QString &pix_name,
+KAction* KexiSharedActionHost::createSharedAction(const TQString &text, const TQString &pix_name,
const KShortcut &cut, const char *name, KActionCollection* col, const char *subclassName)
{
if (subclassName==0)
diff --git a/kexi/core/kexisharedactionhost.h b/kexi/core/kexisharedactionhost.h
index abb960bfb..035ce3526 100644
--- a/kexi/core/kexisharedactionhost.h
+++ b/kexi/core/kexisharedactionhost.h
@@ -20,10 +20,10 @@
#ifndef KEXISHAREDACTIONHOST_H
#define KEXISHAREDACTIONHOST_H
-#include <qguardedptr.h>
-#include <qasciidict.h>
-#include <qobject.h>
-#include <qpair.h>
+#include <tqguardedptr.h>
+#include <tqasciidict.h>
+#include <tqobject.h>
+#include <tqpair.h>
#include <kstdaction.h>
#include <kaction.h>
@@ -67,15 +67,15 @@ class KEXICORE_EXPORT KexiSharedActionHost
return o->inherits("KexiDialogBase") || o->inherits("KexiViewBase");
\endcode
*/
- virtual bool acceptsSharedActions(QObject *o);
+ virtual bool acceptsSharedActions(TQObject *o);
- /*! \return window widget that is currently focused (using QWidget::focusWidget())
+ /*! \return window widget that is currently focused (using TQWidget::tqfocusWidget())
and matches acceptsSharedActions(). If focused widget does not match,
- it's parent, grandparent, and so on is checked. If all this fails,
+ it's tqparent, grandtqparent, and so on is checked. If all this fails,
or no widget has focus, NULL is returned.
Also works if currently focused window is detached (as in KMDI).
*/
- QWidget* focusWindow();
+ TQWidget* focusWindow();
/*! Sets this host as default shared actions host. */
void setAsDefaultHost();
@@ -100,13 +100,13 @@ class KEXICORE_EXPORT KexiSharedActionHost
Otherwise the action is disabled.
If \a o is not KexiDialogBase or its child,
- actions are only invalidated if these come from mainwindow's KActionCollection
+ actions are only tqinvalidated if these come from mainwindow's KActionCollection
(thus part-actions are untouched when the focus is e.g. in the Property Editor.
Call this method when it is known that some actions need invalidation
(e.g. when new window is activated). See how it is used in KexiMainWindowImpl.
*/
- virtual void invalidateSharedActions(QObject *o);
+ virtual void tqinvalidateSharedActions(TQObject *o);
void setActionAvailable(const char *action_name, bool avail);
@@ -115,7 +115,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
/*! Updates availability of action \a action_name for object \a obj.
Object is mainly the window. */
- void updateActionAvailable(const char *action_name, bool avail, QObject *obj);
+ void updateActionAvailable(const char *action_name, bool avail, TQObject *obj);
/*! \return main window for which this host is defined. */
KMainWindow* mainWindow() const;
@@ -126,7 +126,7 @@ class KEXICORE_EXPORT KexiSharedActionHost
Pass desired KAction subclass with \a subclassName (e.g. "KToggleAction") to have
that subclass allocated instead just KAction (what is the default).
Created action's data is owned by the main window. */
- KAction* createSharedAction(const QString &text, const QString &pix_name,
+ KAction* createSharedAction(const TQString &text, const TQString &pix_name,
const KShortcut &cut, const char *name, KActionCollection* col = 0,
const char *subclassName = 0);
@@ -143,11 +143,11 @@ class KEXICORE_EXPORT KexiSharedActionHost
/*! \return action proxy for object \a o, or NULL if this object has
no plugged shared actions. */
- KexiActionProxy* actionProxyFor(QObject *o) const;
+ KexiActionProxy* actionProxyFor(TQObject *o) const;
/*! Like actionProxyFor(), but takes the proxy from the host completely.
This is called by KExiActionProxy on its destruction. */
- KexiActionProxy* takeActionProxyFor(QObject *o);
+ KexiActionProxy* takeActionProxyFor(TQObject *o);
private:
/*! Helper function for createSharedAction(). */
diff --git a/kexi/core/kexisharedactionhost_p.h b/kexi/core/kexisharedactionhost_p.h
index f56db586a..841a014ca 100644
--- a/kexi/core/kexisharedactionhost_p.h
+++ b/kexi/core/kexisharedactionhost_p.h
@@ -20,9 +20,9 @@
#ifndef KEXISHAREDACTIONHOST_P_H
#define KEXISHAREDACTIONHOST_P_H
-#include <qobject.h>
-#include <qptrdict.h>
-#include <qsignalmapper.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
+#include <tqsignalmapper.h>
#include <kmainwindow.h>
@@ -39,23 +39,24 @@ class KexiVolatileActionData
};
//! @internal
-class KEXICORE_EXPORT KexiSharedActionHostPrivate : public QObject
+class KEXICORE_EXPORT KexiSharedActionHostPrivate : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSharedActionHostPrivate(KexiSharedActionHost *h);
public slots:
- void slotAction(const QString& act_id);
+ void slotAction(const TQString& act_id);
public:
- QPtrDict<KexiActionProxy> actionProxies;
+ TQPtrDict<KexiActionProxy> actionProxies;
KMainWindow *mainWin;
KActionPtrList sharedActions;
- QSignalMapper actionMapper;
- QPtrDict<KexiVolatileActionData> volatileActions;
- QAsciiDict<QWidget> enablers;
+ TQSignalMapper actionMapper;
+ TQPtrDict<KexiVolatileActionData> volatileActions;
+ TQAsciiDict<TQWidget> enablers;
KexiSharedActionHost *host;
};
diff --git a/kexi/core/kexistartupdata.cpp b/kexi/core/kexistartupdata.cpp
index 301ebdbd6..34ecdd720 100644
--- a/kexi/core/kexistartupdata.cpp
+++ b/kexi/core/kexistartupdata.cpp
@@ -23,8 +23,8 @@
#include <kexidb/driver.h>
#include <kexidb/drivermanager.h>
-#include <qfileinfo.h>
-#include <qcstring.h>
+#include <tqfileinfo.h>
+#include <tqcstring.h>
KexiStartupData::KexiStartupData()
: m_projectData(0)
diff --git a/kexi/core/kexistartupdata.h b/kexi/core/kexistartupdata.h
index 71999bcb6..f31c82bff 100644
--- a/kexi/core/kexistartupdata.h
+++ b/kexi/core/kexistartupdata.h
@@ -20,7 +20,7 @@
#ifndef KEXI_STARTUPDATA_H
#define KEXI_STARTUPDATA_H
-#include <qstring.h>
+#include <tqstring.h>
class KexiProjectData;
@@ -46,8 +46,8 @@ class KEXICORE_EXPORT KexiStartupData
public:
Import();
operator bool() const;
- QString fileName;
- QString mimeType;
+ TQString fileName;
+ TQString mimeType;
};
KexiStartupData();
diff --git a/kexi/core/kexistaticpart.cpp b/kexi/core/kexistaticpart.cpp
index c7e323e1f..86f3a7463 100644
--- a/kexi/core/kexistaticpart.cpp
+++ b/kexi/core/kexistaticpart.cpp
@@ -27,7 +27,7 @@ using namespace KexiPart;
//------------------------------
-StaticInfo::StaticInfo(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
+StaticInfo::StaticInfo(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName)
: Info()
{
d->mimeType = mimeType;
@@ -41,7 +41,7 @@ StaticInfo::~StaticInfo()
//------------------------------
-StaticPart::StaticPart(const QCString& mimeType, const QString& itemIcon, const QString& objectName)
+StaticPart::StaticPart(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName)
: Part(&Kexi::partManager(), new StaticInfo(mimeType, itemIcon, objectName))
{
Kexi::partManager().insertStaticPart(this);
@@ -51,10 +51,10 @@ StaticPart::~StaticPart()
{
}
-KexiViewBase* StaticPart::createView(QWidget *parent, KexiDialogBase* dialog,
+KexiViewBase* StaticPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
KexiPart::Item &item, int viewMode)
{
- Q_UNUSED(parent);
+ Q_UNUSED(tqparent);
Q_UNUSED(dialog);
Q_UNUSED(item);
Q_UNUSED(viewMode);
diff --git a/kexi/core/kexistaticpart.h b/kexi/core/kexistaticpart.h
index fe127fe48..06ba7501f 100644
--- a/kexi/core/kexistaticpart.h
+++ b/kexi/core/kexistaticpart.h
@@ -33,7 +33,7 @@ namespace KexiPart
class KEXICORE_EXPORT StaticInfo : public Info
{
public:
- StaticInfo(const QCString& mimeType, const QString& itemIcon, const QString& objectName);
+ StaticInfo(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName);
~StaticInfo();
protected:
@@ -45,17 +45,17 @@ class KEXICORE_EXPORT StaticInfo : public Info
class KEXICORE_EXPORT StaticPart : public Part
{
public:
- StaticPart(const QCString& mimeType, const QString& itemIcon, const QString& objectName);
+ StaticPart(const TQCString& mimeType, const TQString& itemIcon, const TQString& objectName);
virtual ~StaticPart();
- /*! Creates a new view for mode \a viewMode, \a item and \a parent. The view will be
+ /*! Creates a new view for mode \a viewMode, \a item and \a tqparent. The view will be
used inside \a dialog. \a args arguments can be passed. */
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>* args) = 0;
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>* args) = 0;
protected:
//! unused by static parts
- KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
+ KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
KexiPart::Item &item, int viewMode = Kexi::DataViewMode);
};
diff --git a/kexi/core/kexitabledesignerinterface.h b/kexi/core/kexitabledesignerinterface.h
index 60d7d0c77..6aa9629ac 100644
--- a/kexi/core/kexitabledesignerinterface.h
+++ b/kexi/core/kexitabledesignerinterface.h
@@ -66,7 +66,7 @@ class KEXICORE_EXPORT KexiTableDesignerInterface
Property set is also created.
Existing field will be overwritten, so use insertEmptyRow()
is you want to move subsequent fields down. */
- virtual void insertField(int row, const QString& caption, bool addCommand = false) = 0;
+ virtual void insertField(int row, const TQString& caption, bool addCommand = false) = 0;
/*! Inserts a new \a field for \a row.
Property set is also created. \a set will be deeply-copied into the new set.
@@ -84,16 +84,16 @@ class KEXICORE_EXPORT KexiTableDesignerInterface
/*! Changes property \a propertyName to \a newValue for a field pointed by \a fieldUID.
If \a listData is not NULL and not empty, a deep copy of it is passed to Property::setListData().
If \a listData \a nlist if not NULL but empty, Property::setListData(0) is called. */
- virtual void changeFieldPropertyForRow( int fieldUID, const QCString& propertyName,
- const QVariant& newValue, KoProperty::Property::ListData* const listData = 0,
+ virtual void changeFieldPropertyForRow( int fieldUID, const TQCString& propertyName,
+ const TQVariant& newValue, KoProperty::Property::ListData* const listData = 0,
bool addCommand = false ) = 0;
/*! Creates temporary table for the current design and returns debug string for it. */
- virtual QString debugStringForCurrentTableSchema(tristate& result) = 0;
+ virtual TQString debugStringForCurrentTableSchema(tristate& result) = 0;
/*! Simulates execution of alter table, and puts debug into \a debugTarget.
A case when debugTarget is not 0 is true for the alter table test suite. */
- virtual tristate simulateAlterTableExecution(QString *debugTarget) = 0;
+ virtual tristate simulateAlterTableExecution(TQString *debugTarget) = 0;
/*! Real execution of the Alter Table. For debugging of the real alter table.
\return true on success, false on failure and cancelled if user has cancelled
diff --git a/kexi/core/kexitemplateloader.cpp b/kexi/core/kexitemplateloader.cpp
index 489d5f51d..f6564d652 100644
--- a/kexi/core/kexitemplateloader.cpp
+++ b/kexi/core/kexitemplateloader.cpp
@@ -27,27 +27,27 @@
#include <kiconloader.h>
#include <kapplication.h>
-#include <qdir.h>
+#include <tqdir.h>
//static
KexiTemplateInfo::List KexiTemplateLoader::loadListInfo()
{
KexiTemplateInfo::List list;
- const QString subdir = QString(kapp->instanceName()) + "/templates";
- QString lang( KGlobal::locale()->language() );
- QStringList dirs( kapp->dirs()->findDirs("data", subdir) );
+ const TQString subdir = TQString(kapp->instanceName()) + "/templates";
+ TQString lang( KGlobal::locale()->language() );
+ TQStringList dirs( kapp->dirs()->findDirs("data", subdir) );
while (true) {
- foreach( QStringList::ConstIterator, it, dirs) {
- QDir dir((*it)+lang);
+ foreach( TQStringList::ConstIterator, it, dirs) {
+ TQDir dir((*it)+lang);
if (!dir.exists())
continue;
if (!dir.isReadable()) {
kdWarning() << "KexiTemplateLoader::loadListInfo() \"" << dir.absPath() << "\" not readable!" << endl;
continue;
}
- const QStringList templateDirs( dir.entryList(QDir::Dirs, QDir::Name) );
- const QString absDirPath( dir.absPath() + '/' );
- foreach(QStringList::ConstIterator, templateIt, templateDirs) {
+ const TQStringList templateDirs( dir.entryList(TQDir::Dirs, TQDir::Name) );
+ const TQString absDirPath( dir.absPath() + '/' );
+ foreach(TQStringList::ConstIterator, templateIt, templateDirs) {
if ((*templateIt)=="." || (*templateIt==".."))
continue;
KexiTemplateInfo info = KexiTemplateLoader::loadInfo( absDirPath + *templateIt );
@@ -64,15 +64,15 @@ KexiTemplateInfo::List KexiTemplateLoader::loadListInfo()
}
//static
-KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory)
+KexiTemplateInfo KexiTemplateLoader::loadInfo(const TQString& directory)
{
- QDir dir(directory);
+ TQDir dir(directory);
if (!dir.isReadable()) {
kdWarning() << "KexiTemplateLoader::loadInfo() \""
<< directory << "\" not readable!" << endl;
return KexiTemplateInfo();
}
- if (!QFileInfo(directory+"/info.txt").isReadable())
+ if (!TQFileInfo(directory+"/info.txt").isReadable())
return KexiTemplateInfo();
KConfig infoTxt(directory+"/info.txt", true/*readonly*/, false/*local*/);
KexiTemplateInfo info;
@@ -81,22 +81,22 @@ KexiTemplateInfo KexiTemplateLoader::loadInfo(const QString& directory)
kdWarning() << "KexiTemplateLoader::loadInfo() \"" << (directory+"/info.txt") << "\" contains no \"name\" field" << endl;
return KexiTemplateInfo();
}
- const QStringList templateFiles( dir.entryList("*.kexi", QDir::Files|QDir::Readable, QDir::Name) );
+ const TQStringList templateFiles( dir.entryList("*.kexi", TQDir::Files|TQDir::Readable, TQDir::Name) );
if (templateFiles.isEmpty()) {
kdWarning() << "KexiTemplateLoader::loadInfo() no readable .kexi template file found in \"" << directory << "\"" << endl;
return KexiTemplateInfo();
}
info.filename = directory+"/"+templateFiles.first();
info.description = infoTxt.readEntry("Description");
- const QString iconFileName( infoTxt.readEntry("Icon") );
+ const TQString iconFileName( infoTxt.readEntry("Icon") );
if (!iconFileName.isEmpty())
- info.icon = QPixmap(directory+'/'+iconFileName);
+ info.icon = TQPixmap(directory+'/'+iconFileName);
if (info.icon.isNull())
info.icon = DesktopIcon("kexiproject_sqlite"); //default
- QStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects");
- foreach( QStringList::ConstIterator, it, autoopenObjectsString) {
+ TQStringList autoopenObjectsString = infoTxt.readListEntry("AutoOpenObjects");
+ foreach( TQStringList::ConstIterator, it, autoopenObjectsString) {
KexiProjectData::ObjectInfo autoopenObject;
- QStringList autoopenObjectNameSplitted( QStringList::split(':', *it) );
+ TQStringList autoopenObjectNameSplitted( TQStringList::split(':', *it) );
if (autoopenObjectNameSplitted.count()>1) {
autoopenObject["type"] = autoopenObjectNameSplitted[0];
autoopenObject["name"] = autoopenObjectNameSplitted[1];
diff --git a/kexi/core/kexitemplateloader.h b/kexi/core/kexitemplateloader.h
index 131eda316..b05d692e5 100644
--- a/kexi/core/kexitemplateloader.h
+++ b/kexi/core/kexitemplateloader.h
@@ -20,17 +20,17 @@
#ifndef KEXI_TEMPLLOADER_H
#define KEXI_TEMPLLOADER_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include "kexiprojectdata.h"
//! A structure providing information about single kexi database template file
struct KEXICORE_EXPORT KexiTemplateInfo
{
- typedef QValueList<KexiTemplateInfo> List;
+ typedef TQValueList<KexiTemplateInfo> List;
- QString filename, name, description;
- QPixmap icon;
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects;
+ TQString filename, name, description;
+ TQPixmap icon;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects;
};
//! Handles retrieving information about templates
@@ -38,7 +38,7 @@ class KEXICORE_EXPORT KexiTemplateLoader
{
public:
static KexiTemplateInfo::List loadListInfo();
- static KexiTemplateInfo loadInfo(const QString& directory);
+ static KexiTemplateInfo loadInfo(const TQString& directory);
};
#endif
diff --git a/kexi/core/kexitextmsghandler.cpp b/kexi/core/kexitextmsghandler.cpp
index a75c7eb31..b1b705c44 100644
--- a/kexi/core/kexitextmsghandler.cpp
+++ b/kexi/core/kexitextmsghandler.cpp
@@ -23,13 +23,13 @@
#include <kexidb/utils.h>
#include <kexiutils/utils.h>
-KexiTextMessageHandler::KexiTextMessageHandler(QString &messageTarget, QString &detailsTarget)
+KexiTextMessageHandler::KexiTextMessageHandler(TQString &messageTarget, TQString &detailsTarget)
: KexiGUIMessageHandler(0)
, m_messageTarget(&messageTarget)
, m_detailsTarget(&detailsTarget)
{
- *m_messageTarget = QString::null;
- *m_detailsTarget = QString::null;
+ *m_messageTarget = TQString();
+ *m_detailsTarget = TQString();
}
KexiTextMessageHandler::~KexiTextMessageHandler()
@@ -38,7 +38,7 @@ KexiTextMessageHandler::~KexiTextMessageHandler()
void
KexiTextMessageHandler::showMessage(MessageType type,
- const QString &title, const QString &details)
+ const TQString &title, const TQString &details)
{
Q_UNUSED(type);
if (!m_enableMessages)
@@ -47,7 +47,7 @@ KexiTextMessageHandler::showMessage(MessageType type,
//'wait' cursor is a nonsense now
KexiUtils::removeWaitCursor();
- QString msg(title);
+ TQString msg(title);
if (title.isEmpty())
msg = i18n("Unknown error");
msg = "<qt><p>"+msg+"</p>";
diff --git a/kexi/core/kexitextmsghandler.h b/kexi/core/kexitextmsghandler.h
index 74463cc76..9472c62f1 100644
--- a/kexi/core/kexitextmsghandler.h
+++ b/kexi/core/kexitextmsghandler.h
@@ -27,11 +27,11 @@
class KEXICORE_EXPORT KexiTextMessageHandler : public KexiGUIMessageHandler
{
public:
- KexiTextMessageHandler(QString &messageTarget, QString &detailsTarget);
+ KexiTextMessageHandler(TQString &messageTarget, TQString &detailsTarget);
virtual ~KexiTextMessageHandler();
- virtual void showMessage(MessageType type, const QString &title, const QString &details);
+ virtual void showMessage(MessageType type, const TQString &title, const TQString &details);
- QString *m_messageTarget, *m_detailsTarget;
+ TQString *m_messageTarget, *m_detailsTarget;
};
#endif
diff --git a/kexi/core/kexiuseraction.cpp b/kexi/core/kexiuseraction.cpp
index eb521de54..a45c5ae9d 100644
--- a/kexi/core/kexiuseraction.cpp
+++ b/kexi/core/kexiuseraction.cpp
@@ -11,12 +11,12 @@
#include "keximainwindow.h"
#include "kexiuseraction.h"
-KexiUserAction::KexiUserAction(KexiMainWindow *win, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap)
- : KAction(text, pixmap, KShortcut::null(), this, SLOT(execute()), parent, name.latin1())
+KexiUserAction::KexiUserAction(KexiMainWindow *win, KActionCollection *tqparent, const TQString &name, const TQString &text, const TQString &pixmap)
+ : KAction(text, pixmap, KShortcut::null(), this, TQT_SLOT(execute()), tqparent, name.latin1())
{
m_win = win;
m_method = 0;
- connect(this, SIGNAL(activated()), this, SLOT(execute()));
+ connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(execute()));
}
void
@@ -59,17 +59,17 @@ KexiUserAction::execute()
}
KexiUserAction *
-KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c)
+KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *tqparent, KexiDB::Cursor *c)
{
if(!c || c->bof() || c->eof())
return 0;
- KexiUserAction *a = new KexiUserAction(context, parent, c->value(1).toString(), c->value(2).toString(), c->value(3).toString());
- QString args = c->value(5).toString();
+ KexiUserAction *a = new KexiUserAction(context, tqparent, c->value(1).toString(), c->value(2).toString(), c->value(3).toString());
+ TQString args = c->value(5).toString();
bool quote = false;
Arguments arg;
- QString tmp;
+ TQString tmp;
const int len = args.length();
for(int i=0; i < len; i++)
{
@@ -82,7 +82,7 @@ KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *pa
if(tmp.left(1)=="\"" && tmp.right(1)=="\"")
tmp = tmp.mid(1, tmp.length()-2);
- arg.append(QVariant(tmp));
+ arg.append(TQVariant(tmp));
tmp = "";
}
else //else simply add char to tmp
@@ -94,7 +94,7 @@ KexiUserAction::fromCurrentRecord(KexiMainWindow *context, KActionCollection *pa
if(tmp.left(1)=="\"" && tmp.right(1)=="\"")
tmp = tmp.mid(1, tmp.length()-2);
- arg.append(QVariant(tmp));
+ arg.append(TQVariant(tmp));
a->setMethod(c->value(4).toInt(), arg);
return a;
diff --git a/kexi/core/kexiuseraction.h b/kexi/core/kexiuseraction.h
index 822220f09..71ca18198 100644
--- a/kexi/core/kexiuseraction.h
+++ b/kexi/core/kexiuseraction.h
@@ -10,7 +10,7 @@ namespace KexiDB
class Cursor;
}
class KexiMainWindow;
-typedef QValueVector<QVariant> Arguments;
+typedef TQValueVector<TQVariant> Arguments;
/*! action that can be defined by a user for a special scope e.g. main, form ...
the actions can have some predefined \ref Methods which are described in \ref KexiUserActionMethod
@@ -19,6 +19,7 @@ typedef QValueVector<QVariant> Arguments;
class KEXICORE_EXPORT KexiUserAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! bytecode of available methods */
@@ -47,15 +48,15 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! constructs an action
\note methods are associated using setMethod()
*/
- KexiUserAction(KexiMainWindow *context, KActionCollection *parent, const QString &name, const QString &text, const QString &pixmap);
+ KexiUserAction(KexiMainWindow *context, KActionCollection *tqparent, const TQString &name, const TQString &text, const TQString &pixmap);
~KexiUserAction();
/*! sets execution information associated with this action this will mostly look like
\code
KexiUserAction *action = new KexiUserAction(...);
Arguments arg;
- arg.append(QVariant("kexi/form"));
- arg.append(QVariant("main"));
+ arg.append(TQVariant("kexi/form"));
+ arg.append(TQVariant("main"));
action->setMethod(KexiUserAction::OpenAction, arg);
\endcode
*/
@@ -63,7 +64,7 @@ class KEXICORE_EXPORT KexiUserAction : public KAction
/*! creates a KexiUserAction from current record in \a c
mostly needed for creation from kexi__useractions table */
- static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *parent, KexiDB::Cursor *c);
+ static KexiUserAction *fromCurrentRecord(KexiMainWindow *context, KActionCollection *tqparent, KexiDB::Cursor *c);
protected slots:
/*! actually executes the associated method
diff --git a/kexi/core/kexiuseractionmethod.cpp b/kexi/core/kexiuseractionmethod.cpp
index a2ec29145..41b35782d 100644
--- a/kexi/core/kexiuseractionmethod.cpp
+++ b/kexi/core/kexiuseractionmethod.cpp
@@ -10,7 +10,7 @@ KexiUserActionMethod::KexiUserActionMethod(int method, ArgTypes types, ArgNames
m_names = names;
}
-QString
+TQString
KexiUserActionMethod::methodName(int method)
{
switch(method)
@@ -26,7 +26,7 @@ KexiUserActionMethod::methodName(int method)
case KexiUserAction::ExitKexi:
return i18n("Exit Main Application");
default:
- return QString::null;
+ return TQString();
}
}
diff --git a/kexi/core/kexiuseractionmethod.h b/kexi/core/kexiuseractionmethod.h
index 5bfae22ce..e6a4facd4 100644
--- a/kexi/core/kexiuseractionmethod.h
+++ b/kexi/core/kexiuseractionmethod.h
@@ -1,12 +1,12 @@
#ifndef KEXIUSERACTIONMETHOD_H
#define KEXIUSERACTIONMETHOD_H
-#include <qvaluevector.h>
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
+#include <tqvariant.h>
-typedef QValueVector<int> ArgTypes;
-typedef QValueVector<QString> ArgNames;
+typedef TQValueVector<int> ArgTypes;
+typedef TQValueVector<TQString> ArgNames;
/*! describes a UserActionCommand */
class KEXICORE_EXPORT KexiUserActionMethod
@@ -27,10 +27,10 @@ class KEXICORE_EXPORT KexiUserActionMethod
/*! \return i18n method name for \a method */
- static QString methodName(int method);
+ static TQString methodName(int method);
/*! \return an i18n string for \a type */
- static QString typeName(int type);
+ static TQString typeName(int type);
private:
int m_method;
diff --git a/kexi/core/kexiviewbase.cpp b/kexi/core/kexiviewbase.cpp
index 1696f5025..d31a15fa6 100644
--- a/kexi/core/kexiviewbase.cpp
+++ b/kexi/core/kexiviewbase.cpp
@@ -30,9 +30,9 @@
#include <kdebug.h>
-KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : QWidget(parent, name)
- , KexiActionProxy(this, mainWin)
+KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
+ , KexiActionProxy(TQT_TQOBJECT(this), mainWin)
, m_mainWin(mainWin)
, m_viewWidget(0)
, m_parentView(0)
@@ -40,8 +40,8 @@ KexiViewBase::KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char
, m_viewMode(0) //unknown!
, m_dirty(false)
{
- QWidget *wi=this;
- while ((wi = wi->parentWidget()) && !wi->inherits("KexiDialogBase"))
+ TQWidget *wi=this;
+ while ((wi = wi->tqparentWidget()) && !wi->inherits("KexiDialogBase"))
;
m_dialog = (wi && wi->inherits("KexiDialogBase")) ? static_cast<KexiDialogBase*>(wi) : 0;
if (m_dialog) {
@@ -72,12 +72,12 @@ tristate KexiViewBase::afterSwitchFrom(int /* mode */)
return true;
}
-QSize KexiViewBase::preferredSizeHint(const QSize& otherSize)
+TQSize KexiViewBase::preferredSizeHint(const TQSize& otherSize)
{
- KexiDialogBase* dlg = parentDialog();
+ KexiDialogBase* dlg = tqparentDialog();
if (dlg && dlg->mdiParent()) {
- QRect r = dlg->mdiParent()->mdiAreaContentsRect();
- return otherSize.boundedTo( QSize(
+ TQRect r = dlg->mdiParent()->mdiAreaContentsRect();
+ return otherSize.boundedTo( TQSize(
r.width() - 10,
r.height() - dlg->mdiParent()->captionHeight() - dlg->pos().y() - 10
) );
@@ -85,7 +85,7 @@ QSize KexiViewBase::preferredSizeHint(const QSize& otherSize)
return otherSize;
}
-void KexiViewBase::closeEvent( QCloseEvent * e )
+void KexiViewBase::closeEvent( TQCloseEvent * e )
{
bool cancel = false;
emit closing(cancel);
@@ -93,7 +93,7 @@ void KexiViewBase::closeEvent( QCloseEvent * e )
e->ignore();
return;
}
- QWidget::closeEvent(e);
+ TQWidget::closeEvent(e);
}
KoProperty::Set *KexiViewBase::propertySet()
@@ -103,14 +103,14 @@ KoProperty::Set *KexiViewBase::propertySet()
void KexiViewBase::propertySetSwitched()
{
- if (parentDialog())
- m_mainWin->propertySetSwitched( parentDialog(), false );
+ if (tqparentDialog())
+ m_mainWin->propertySetSwitched( tqparentDialog(), false );
}
-void KexiViewBase::propertySetReloaded(bool preservePrevSelection, const QCString& propertyToSelect)
+void KexiViewBase::propertySetReloaded(bool preservePrevSelection, const TQCString& propertyToSelect)
{
- if (parentDialog())
- m_mainWin->propertySetSwitched( parentDialog(), true, preservePrevSelection, propertyToSelect );
+ if (tqparentDialog())
+ m_mainWin->propertySetSwitched( tqparentDialog(), true, preservePrevSelection, propertyToSelect );
}
void KexiViewBase::setDirty(bool set)
@@ -175,19 +175,19 @@ tristate KexiViewBase::storeData(bool dontAsk)
return true;
}
-bool KexiViewBase::loadDataBlock( QString &dataString, const QString& dataID, bool canBeEmpty )
+bool KexiViewBase::loadDataBlock( TQString &dataString, const TQString& dataID, bool canBeEmpty )
{
if (!m_dialog)
return false;
const tristate res = m_mainWin->project()->dbConnection()->loadDataBlock(m_dialog->id(), dataString, dataID);
if (canBeEmpty && ~res) {
- dataString = QString::null;
+ dataString = TQString();
return true;
}
return res == true;
}
-bool KexiViewBase::storeDataBlock( const QString &dataString, const QString &dataID )
+bool KexiViewBase::storeDataBlock( const TQString &dataString, const TQString &dataID )
{
if (!m_dialog)
return false;
@@ -203,50 +203,50 @@ bool KexiViewBase::storeDataBlock( const QString &dataString, const QString &dat
&& m_mainWin->project()->dbConnection()->storeDataBlock(effectiveID, dataString, dataID);
}
-bool KexiViewBase::removeDataBlock( const QString& dataID )
+bool KexiViewBase::removeDataBlock( const TQString& dataID )
{
if (!m_dialog)
return false;
return m_mainWin->project()->dbConnection()->removeDataBlock(m_dialog->id(), dataID);
}
-bool KexiViewBase::eventFilter( QObject *o, QEvent *e )
+bool KexiViewBase::eventFilter( TQObject *o, TQEvent *e )
{
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut) {// && o->inherits("QWidget")) {
+ if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {// && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) {
// //hp==true if currently focused widget is a child of this table view
-// const bool hp = Kexi::hasParent( static_cast<QWidget*>(o), focusWidget());
+// const bool hp = Kexi::hasParent( static_cast<TQWidget*>(o), tqfocusWidget());
// kexidbg << "KexiViewBase::eventFilter(): " << o->name() << " " << e->type() << endl;
- if (KexiUtils::hasParent( this, static_cast<QWidget*>(o))) {
- if (e->type()==QEvent::FocusOut && focusWidget() && !KexiUtils::hasParent( this, focusWidget())) {
- //focus out: when currently focused widget is not a parent of this view
+ if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(o))) {
+ if (e->type()==TQEvent::FocusOut && tqfocusWidget() && !KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) {
+ //focus out: when currently focused widget is not a tqparent of this view
emit focus(false);
- } else if (e->type()==QEvent::FocusIn) {
+ } else if (e->type()==TQEvent::FocusIn) {
emit focus(true);
}
- if (e->type()==QEvent::FocusOut) { // && focusWidget() && Kexi::hasParent( this, focusWidget())) { // && focusWidget()->inherits("KexiViewBase")) {
-// kdDebug() << focusWidget()->className() << " " << focusWidget()->name()<< endl;
+ if (e->type()==TQEvent::FocusOut) { // && tqfocusWidget() && Kexi::hasParent( this, tqfocusWidget())) { // && tqfocusWidget()->inherits("KexiViewBase")) {
+// kdDebug() << tqfocusWidget()->className() << " " << tqfocusWidget()->name()<< endl;
// kdDebug() << o->className() << " " << o->name()<< endl;
KexiViewBase *v = KexiUtils::findParent<KexiViewBase>(o, "KexiViewBase") ;
-// QWidget *www=v->focusWidget();
+// TQWidget *www=v->tqfocusWidget();
if (v) {
while (v->m_parentView)
v = v->m_parentView;
- if (KexiUtils::hasParent( this, static_cast<QWidget*>(v->focusWidget()) ))
- v->m_lastFocusedChildBeforeFocusOut = static_cast<QWidget*>(v->focusWidget());
-// v->m_lastFocusedChildBeforeFocusOut = static_cast<QWidget*>(o); //focusWidget();
+ if (KexiUtils::hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(v->tqfocusWidget()) ))
+ v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(v->tqfocusWidget());
+// v->m_lastFocusedChildBeforeFocusOut = static_cast<TQWidget*>(o); //tqfocusWidget();
}
}
- if (e->type()==QEvent::FocusIn && m_actionProxyParent) {
+ if (e->type()==TQEvent::FocusIn && m_actionProxyParent) {
m_actionProxyParent->m_focusedChild = this;
}
-// m_mainWin->invalidateSharedActions(this);
+// m_mainWin->tqinvalidateSharedActions(this);
}
}
return false;
}
-void KexiViewBase::setViewWidget(QWidget* w, bool focusProxy)
+void KexiViewBase::setViewWidget(TQWidget* w, bool focusProxy)
{
if (m_viewWidget == w)
return;
@@ -263,7 +263,7 @@ void KexiViewBase::setViewWidget(QWidget* w, bool focusProxy)
void KexiViewBase::addChildView( KexiViewBase* childView )
{
- m_children.append( childView );
+ m_tqchildren.append( childView );
addActionProxyChild( childView );
childView->m_parentView = this;
// if (m_parentView)
@@ -276,7 +276,7 @@ void KexiViewBase::setFocus()
{
if (!m_lastFocusedChildBeforeFocusOut.isNull()) {
// kdDebug() << "FOCUS: " << m_lastFocusedChildBeforeFocusOut->className() << " " << m_lastFocusedChildBeforeFocusOut->name()<< endl;
- QWidget *w = m_lastFocusedChildBeforeFocusOut;
+ TQWidget *w = m_lastFocusedChildBeforeFocusOut;
m_lastFocusedChildBeforeFocusOut = 0;
w->setFocus();
}
@@ -286,7 +286,7 @@ void KexiViewBase::setFocus()
else
setFocusInternal();
}
- m_mainWin->invalidateSharedActions(this);
+ m_mainWin->tqinvalidateSharedActions(TQT_TQOBJECT(this));
}
KAction* KexiViewBase::sharedAction( const char *action_name )
@@ -318,8 +318,8 @@ void KexiViewBase::setAvailable(const char* action_name, bool set)
void KexiViewBase::updateActions(bool activated)
{
//do nothing here
- //do the same for children :)
- for (QPtrListIterator<KexiViewBase> it(m_children); it.current(); ++it) {
+ //do the same for tqchildren :)
+ for (TQPtrListIterator<KexiViewBase> it(m_tqchildren); it.current(); ++it) {
it.current()->updateActions(activated);
}
}
diff --git a/kexi/core/kexiviewbase.h b/kexi/core/kexiviewbase.h
index 18cd056d0..24f5d8adc 100644
--- a/kexi/core/kexiviewbase.h
+++ b/kexi/core/kexiviewbase.h
@@ -20,7 +20,7 @@
#ifndef KEXIVIEWBASE_H
#define KEXIVIEWBASE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kexiactionproxy.h"
@@ -40,7 +40,7 @@ namespace KexiDB {
KexiViewBase has 'dirty' flag to indicate that view's data has changed.
This flag's state is reused by KexiDialogBase object that contain the view.
KexiViewBase objects can be also nested, using addChildView(): any actions and 'dirty' flag
- are transmited to parent view in this case.
+ are transmited to tqparent view in this case.
KexiViewBase objects are usually allocated within KexiDialogBase objects by implementing
KexiPart::createView() method. See query or table part code for examples.
@@ -49,33 +49,34 @@ namespace KexiDB {
especially withinn dock window. see KexiMainWindowImpl::initNavigator() to see example
how KexiBrowser does this.
*/
-class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
+class KEXICORE_EXPORT KexiViewBase : public TQWidget, public KexiActionProxy
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiViewBase(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiViewBase(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiViewBase();
//! \return kexi main window that contain this view
inline KexiMainWindow *mainWin() const { return m_mainWin; }
- //! \return parent KexiDialogBase that contains this view, or 0 if no dialog contain this view
- KexiDialogBase* parentDialog() const { return m_dialog; }
+ //! \return tqparent KexiDialogBase that contains this view, or 0 if no dialog contain this view
+ KexiDialogBase* tqparentDialog() const { return m_dialog; }
/*! Added for convenience.
\return KexiPart object that was used to create this view (with a dialog)
- or 0 if this view is not created using KexiPart. \sa parentDialog() */
+ or 0 if this view is not created using KexiPart. \sa tqparentDialog() */
KexiPart::Part* part() const;
/*! \return preferred size hint, that can be used to resize the view.
It is computed using maximum of (a) \a otherSize and (b) current KMDI dock area's size,
- so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::sizeHint().
+ so the view won't exceed this maximum size. The method is used e.g. in KexiDialogBase::tqsizeHint().
If you reimplement this method, do not forget to return value of
yoursize.boundedTo( KexiViewBase::preferredSizeHint(otherSize) ). */
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
void addChildView( KexiViewBase* childView );
@@ -111,9 +112,9 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
virtual void propertySetSwitched();
/*! Sets dirty flag on or off. It the flag changes,
- dirty(bool) signal is emitted by parent dialog (KexiDialog),
- to inform the world about that. If this view has a parent view, setDirty()
- is called also on parent view.
+ dirty(bool) signal is emitted by tqparent dialog (KexiDialog),
+ to inform the world about that. If this view has a tqparent view, setDirty()
+ is called also on tqparent view.
Always use this function to update 'dirty' flag information. */
void setDirty(bool set);
@@ -145,7 +146,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
(probably after showing some info messages), you need to return cancelled. */
virtual tristate afterSwitchFrom(int mode);
- virtual void closeEvent( QCloseEvent * e );
+ virtual void closeEvent( TQCloseEvent * e );
/*! \return a property set for this view. For reimplementation. By default returns NULL. */
virtual KoProperty::Set *propertySet();
@@ -156,7 +157,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
If \a preservePrevSelection is true and there was a property set
assigned before call, previously selected item will be preselected
in the editor (if found). */
- void propertySetReloaded(bool preservePrevSelection = false, const QCString& propertyToSelect = QCString());
+ void propertySetReloaded(bool preservePrevSelection = false, const TQCString& propertyToSelect = TQCString());
/*! Tells this dialog to create and store data of the new object
pointed by \a sdata on the backend.
@@ -185,7 +186,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
and \a dataString is set to null string. The default is false.
\return true on success
\sa storeDataBlock(). */
- bool loadDataBlock( QString &dataString, const QString& dataID = QString::null, bool canBeEmpty = false );
+ bool loadDataBlock( TQString &dataString, const TQString& dataID = TQString(), bool canBeEmpty = false );
/*! Tells this view to store data changes on the backend.
Called by KexiDialogBase::storeData().
@@ -211,16 +212,16 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
If there is already such record in the table, it's simply overwritten.
\return true on success
*/
- bool storeDataBlock( const QString &dataString, const QString &dataID = QString::null );
+ bool storeDataBlock( const TQString &dataString, const TQString &dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
pointed by optional \a dataID, from the database backend.
\return true on success. Does not fail if the block doe not exists.
Note that if \a dataID is not specified, all data blocks for this view will be removed.
\sa storeDataBlock(). */
- bool removeDataBlock( const QString& dataID = QString::null);
+ bool removeDataBlock( const TQString& dataID = TQString());
- void setViewWidget(QWidget* w, bool focusProxy = false);
+ void setViewWidget(TQWidget* w, bool focusProxy = false);
/*! Updates actions (e.g. availability). Reimplement it, if needed (you must
call superclass impelmentation at the end!).
@@ -230,31 +231,31 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
or deactivation. */
virtual void updateActions(bool activated);
- virtual void setFocusInternal() { QWidget::setFocus(); }
+ virtual void setFocusInternal() { TQWidget::setFocus(); }
- /*! Allows to react on parent dialog's detaching (only for KMDI's ChildFrame mode)
+ /*! Allows to react on tqparent dialog's detaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreDetached().
Default implementation does nothing.
Implement it if you want to perform some appropriate actions. */
- virtual void parentDialogDetached() {};
+ virtual void tqparentDialogDetached() {};
- /*! Allows to react on parent dialog's attaching (only for KMDI's ChildFrame mode)
+ /*! Allows to react on tqparent dialog's attaching (only for KMDI's ChildFrame mode)
- it is called by KexiDialogBase::youAreAttached().
Default implementation does nothing.
Implement it if you want to perform some appropriate actions. */
- virtual void parentDialogAttached() {};
+ virtual void tqparentDialogAttached() {};
- QString m_defaultIconName;
+ TQString m_defaultIconName;
KexiMainWindow *m_mainWin;
KexiDialogBase *m_dialog;
- QWidget *m_viewWidget;
+ TQWidget *m_viewWidget;
KexiViewBase *m_parentView;
- QGuardedPtr<QWidget> m_lastFocusedChildBeforeFocusOut;
+ TQGuardedPtr<TQWidget> m_lastFocusedChildBeforeFocusOut;
private:
/*! Member set to newly assigned object's ID in storeNewData()
@@ -269,7 +270,7 @@ class KEXICORE_EXPORT KexiViewBase : public QWidget, public KexiActionProxy
Can be useful when single class is used for more than one view (e.g. KexiDBForm). */
int m_viewMode;
- QPtrList<KexiViewBase> m_children;
+ TQPtrList<KexiViewBase> m_tqchildren;
bool m_dirty : 1;
diff --git a/kexi/data/kde34compat/sqlite.magic b/kexi/data/kde34compat/sqlite.magic
index a31592fb1..4e43a7fe5 100644
--- a/kexi/data/kde34compat/sqlite.magic
+++ b/kexi/data/kde34compat/sqlite.magic
@@ -1,2 +1,2 @@
-0 string **\ This\ file\ contains\ an\ SQLite application/x-sqlite2
+0 string **\ This\ file\ tqcontains\ an\ SQLite application/x-sqlite2
0 string SQLite\ format\ 3 application/x-sqlite3
diff --git a/kexi/doc/common/kde-default.css b/kexi/doc/common/kde-default.css
index 032a00db5..59366d386 100644
--- a/kexi/doc/common/kde-default.css
+++ b/kexi/doc/common/kde-default.css
@@ -90,7 +90,7 @@ DIV.INFORMALEXAMPLE { border-style: dotted;
TABLE.programlisting
TABLE.screen { border-style: none;
background-color: rgb(224,224,224);
- table-layout: auto; /* 100%? */
+ table-tqlayout: auto; /* 100%? */
color: rgb(0,0,0); /* should be inherit */
}
@@ -99,7 +99,7 @@ TABLE.screen { border-style: none;
TABLE[class~=programlisting]
TABLE[class~=screen] { border-style: none;
background-color: rgb(224,224,224);
- table-layout: auto;
+ table-tqlayout: auto;
color: inherit;
}
*/
diff --git a/kexi/doc/common/kde-web.css b/kexi/doc/common/kde-web.css
index e61fa32a0..dfd98e8b2 100644
--- a/kexi/doc/common/kde-web.css
+++ b/kexi/doc/common/kde-web.css
@@ -85,7 +85,7 @@ DIV.INFORMALEXAMPLE { border-style: dotted;
TABLE.programlisting
TABLE.screen { border-style: none;
background-color: rgb(224,224,224);
- table-layout: auto; /* 100%? */
+ table-tqlayout: auto; /* 100%? */
color: rgb(0,0,0); /* should be inherit */
}
@@ -94,7 +94,7 @@ TABLE.screen { border-style: none;
TABLE[class~=programlisting]
TABLE[class~=screen] { border-style: none;
background-color: rgb(224,224,224);
- table-layout: auto;
+ table-tqlayout: auto;
color: inherit;
}
*/
diff --git a/kexi/doc/dev/kexi_guidelines.txt b/kexi/doc/dev/kexi_guidelines.txt
index 7c2dfaba3..ab713e34c 100644
--- a/kexi/doc/dev/kexi_guidelines.txt
+++ b/kexi/doc/dev/kexi_guidelines.txt
@@ -19,7 +19,7 @@ Focus on:
convert to QString only on data displaying)
Idea 3
-Directories layout:
+Directories tqlayout:
dialogs/
+-altertable/
+-datatable/
diff --git a/kexi/doc/dev/kexi_issues.txt b/kexi/doc/dev/kexi_issues.txt
index 62292f2d7..f6a27b7ff 100644
--- a/kexi/doc/dev/kexi_issues.txt
+++ b/kexi/doc/dev/kexi_issues.txt
@@ -17,7 +17,7 @@
Easy example: form and report depends on table/query (or more tables and queries).
This dependency can be called inheriting when we wnat to reuse as many
- as possible properties of parent 'object' in child 'object'.
+ as possible properties of tqparent 'object' in child 'object'.
Examples of these properties: table colors, columns widths, etc. can be
reused in forms/reports that use this its data.
diff --git a/kexi/doc/dev/kexidb_issues.txt b/kexi/doc/dev/kexidb_issues.txt
index 0dd945c69..576a64dee 100644
--- a/kexi/doc/dev/kexidb_issues.txt
+++ b/kexi/doc/dev/kexidb_issues.txt
@@ -191,7 +191,7 @@ kexi__querydata
q_sql varchar, //raw sql text - stored in the unchanged form entered by a user (or generated)
q_valid boolean, //query schema may be invalid (syntactically or logically,
//but still can be stored)
- q_parent_tab integer REFERENCES kexi__objects(o_id) //parent table of this query
+ q_parent_tab integer REFERENCES kexi__objects(o_id) //tqparent table of this query
//This table contains information about fields defined in select queries
kexi__queryfields
diff --git a/kexi/doc/handbook/html.tmp/01_02_00_db_spreadsheet.html b/kexi/doc/handbook/html.tmp/01_02_00_db_spreadsheet.html
index e7959df74..b7b62ab97 100644
--- a/kexi/doc/handbook/html.tmp/01_02_00_db_spreadsheet.html
+++ b/kexi/doc/handbook/html.tmp/01_02_00_db_spreadsheet.html
@@ -168,7 +168,7 @@ In this case the very way the spreadsheet works is problematic. Fields for data
<a name="reports"></a>
<h4>Reports</h4>
<p>
-Databases enable grouping, limiting and summing up data in a form of a <em>report</em>. Spreadsheets are usually printed in a form of small tables without fully automatic control over page divisions and the layout of fields.
+Databases enable grouping, limiting and summing up data in a form of a <em>report</em>. Spreadsheets are usually printed in a form of small tables without fully automatic control over page divisions and the tqlayout of fields.
</p>
<a name="programming"></a>
diff --git a/kexi/doc/handbook/html.tmp/02_04_00_differences.html b/kexi/doc/handbook/html.tmp/02_04_00_differences.html
index 6e0c3ccd4..19865a973 100644
--- a/kexi/doc/handbook/html.tmp/02_04_00_differences.html
+++ b/kexi/doc/handbook/html.tmp/02_04_00_differences.html
@@ -31,7 +31,7 @@ English terms are bracketed.
<td>Validation rule</td> <td>Validation rule</td> <td><i>PICTURE/VALID</i> Clause</td> <td><i>ValChecks</i></td>
</tr>
<tr>
-<td>Query (<i>Query</i>)</td> <td>Query</td> <td><i>Query, QBE, View</i></td> <td><i>Query</i></td>
+<td>Query (<i>Query</i>)</td> <td>Query</td> <td><i>Query, TQBE, View</i></td> <td><i>Query</i></td>
</tr>
<tr>
<td>Form (<i>Form</i>)</td> <td>Form</td> <td>Screen</td> <td><i>Forms</i></td>
diff --git a/kexi/doc/handbook/html.tmp/05_01_00_table_designing.html b/kexi/doc/handbook/html.tmp/05_01_00_table_designing.html
index 14c0b5113..2953a0f05 100644
--- a/kexi/doc/handbook/html.tmp/05_01_00_table_designing.html
+++ b/kexi/doc/handbook/html.tmp/05_01_00_table_designing.html
@@ -2,7 +2,7 @@
<H2>5.1. Designing Database Tables</H2>
<p>
-First, there will be two tables added to your database: <em>persons</em> and <em>phone_numbers</em>. These are exactly the same tables as described in chapter <a href="01_02_00_db_spreadsheet.html">1.2. A database and a spreadsheet</a>. A layout for <em>Persons</em> can be found in section <a href="01_02_00_db_spreadsheet.html#data_integrity">Data integrity and validity</a> in that chapter.
+First, there will be two tables added to your database: <em>persons</em> and <em>phone_numbers</em>. These are exactly the same tables as described in chapter <a href="01_02_00_db_spreadsheet.html">1.2. A database and a spreadsheet</a>. A tqlayout for <em>Persons</em> can be found in section <a href="01_02_00_db_spreadsheet.html#data_integrity">Data integrity and validity</a> in that chapter.
</p>
<p>
diff --git a/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html b/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html
index 9cb671d13..bca5a3874 100644
--- a/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html
+++ b/kexi/doc/handbook/html.tmp/05_04_00_form_designing.html
@@ -82,7 +82,7 @@ Additional toolbars are also available:
<a name="widgets_tab"></a>
<H3>5.4.4. Using the &quot;Widgets&quot; tab</H3>
<p>
-The "Widgets" tab in the Property pane provides a list of form widgets and their hierarchy. Each widget is presented within the hierarchy beside other widgets being on the same level (the same parent container). Child widgets (inside containers) are presented using indented names.
+The "Widgets" tab in the Property pane provides a list of form widgets and their hierarchy. Each widget is presented within the hierarchy beside other widgets being on the same level (the same tqparent container). Child widgets (inside containers) are presented using indented names.
</p>
<p>
@@ -196,7 +196,7 @@ It is right moment for testing your form. Click the <nobr><img src="icons/state_
To make it easier for the form's user to identify meaning of every field widget, these should have added text labels with appropriate titles. To create text labels <nobr><img src="icons/label.png" class="icon"> <em>Label</em></nobr> widget is used.
</p>
<p>
-Insert three text label widgets onto the form, placing them on the left hand of the text fields (or on the right hand if your operating system uses right-to-left layout). On inserting every new label, a text cursor appears inside where you can enter desired title. Enter consecutively: <em>Name</em>, <em>Surname</em> and <em>Street</em>. Additionally, on the top of the form insert another label displaying name of the form, i.e. &quot;Persons&quot;. Enlarge this label's size and set larger font using <a href="aa_00_00_menu.html#menu_format_font">Format -&gt; Font</a> menu command.
+Insert three text label widgets onto the form, placing them on the left hand of the text fields (or on the right hand if your operating system uses right-to-left tqlayout). On inserting every new label, a text cursor appears inside where you can enter desired title. Enter consecutively: <em>Name</em>, <em>Surname</em> and <em>Street</em>. Additionally, on the top of the form insert another label displaying name of the form, i.e. &quot;Persons&quot;. Enlarge this label's size and set larger font using <a href="aa_00_00_menu.html#menu_format_font">Format -&gt; Font</a> menu command.
</p>
<p>
<br><img src="img/05_04_06_form_with_labels.png">
@@ -246,7 +246,7 @@ After switching to the form's <em>data view</em> you can try whether the action
</ul>
<a name="form_layouts"></a>
-<H3>5.4.9. Widget layouts</H3>
+<H3>5.4.9. Widget tqlayouts</H3>
<p>
In most cases form widgets should be reasonable placed and aligned. Positioning, aligning and resizing widgets by hand is not easy and these parameters are not adjusted when the user resizes the form. In fact the situation is even worse because you cannot assume a given form requires a given space because users have different font sizes and display resolutions.
</p>
@@ -256,50 +256,50 @@ The following example presents a form where text fields and labels were placed b
<br>An example form with widgets that cannot not fit in the window<br><br>
</p>
<p>
-Using special tool called <em>widget layouts</em> can help to automatically lay out the form widgets. Widget layout is an action of grouping two or more widgets so these are well positioned and have appropriate sizes.
+Using special tool called <em>widget tqlayouts</em> can help to automatically lay out the form widgets. Widget tqlayout is an action of grouping two or more widgets so these are well positioned and have appropriate sizes.
</p>
<p>
-Using layout in this form improves alignment. Moreover, its space is better developed. Text fields are closer each other, spacing is constant.
+Using tqlayout in this form improves tqalignment. Moreover, its space is better developed. Text fields are closer each other, spacing is constant.
<br>
<br><img src="img/05_04_08_form_well_fit.png">
- <br>Example form with layout used<br><br>
+ <br>Example form with tqlayout used<br><br>
</p>
<p>
-There are two methods to create widget layout.
+There are two methods to create widget tqlayout.
<ul>
-<li>Select two or more widgets that should be placed in a common layout, and select one of the layout types from the context menu item <a href="aa_00_00_menu.html#menu_format_layout">Layout Widgets</a>.</li>
-<li>Click a <a hrf="widget_containers">container widget</a> (or a form surface itself), where widgets are inserted and select one of the layout types from the context menu item <a href="aa_00_00_menu.html#menu_format_layout">Layout Widgets</a>. All widgets existing within the container or within the form, being on the same level will be put into a single common layout.</li>
+<li>Select two or more widgets that should be placed in a common tqlayout, and select one of the tqlayout types from the context menu item <a href="aa_00_00_menu.html#menu_format_layout">Layout Widgets</a>.</li>
+<li>Click a <a hrf="widget_containers">container widget</a> (or a form surface itself), where widgets are inserted and select one of the tqlayout types from the context menu item <a href="aa_00_00_menu.html#menu_format_layout">Layout Widgets</a>. All widgets existing within the container or within the form, being on the same level will be put into a single common tqlayout.</li>
</ul>
In each of these cases you can also use <em>Format -&gt; Layout Widgets</em> menu.
</p>
<p>
<img src="img/05_04_08_form_layout_selecting.png">
- <br>Selecting widgets that will be put into a layout<br>
+ <br>Selecting widgets that will be put into a tqlayout<br>
<br><img src="img/05_04_08_form_layout_selected.png">
<br>Four widgets are selected<br><br>
<br><img src="img/05_04_08_form_layout_popup.png"><br>
- <br>Using the context menu for putting the widgets into a grid layout<br><br>
+ <br>Using the context menu for putting the widgets into a grid tqlayout<br><br>
</p>
<p>
-Widget layout is presented in the design view using a blue, green or red box drawn with broken line. This line is displayed only in the form's design view.
+Widget tqlayout is presented in the design view using a blue, green or red box drawn with broken line. This line is displayed only in the form's design view.
</p>
<p>
<br>
<br><img src="img/05_04_08_form_layout_grid.png">
- <br>Widgets within a grid layout<br><br>
+ <br>Widgets within a grid tqlayout<br><br>
</p>
<p>
-Besides the grid type, there are other widget layout types.
+Besides the grid type, there are other widget tqlayout types.
<ul>
<li>vertical
<br>
<br><img src="img/05_04_08_form_layout_vertical.png">
- <br>Vertical widget layout<br><br>
+ <br>Vertical widget tqlayout<br><br>
</li>
<li>horizontal
<br>
<br><img src="img/05_04_08_form_layout_horizontal.png">
- <br>Horizontal widget layout<br><br>
+ <br>Horizontal widget tqlayout<br><br>
</li>
<!-- TODO podzia³ poziomy / pionowy
<br><img src="img/05_04_08_form_layout_vertical_splitter.png">
@@ -311,9 +311,9 @@ Besides the grid type, there are other widget layout types.
</p>
<a name="form_springs"></a>
-<H4>Springs in widget layouts</H4>
+<H4>Springs in widget tqlayouts</H4>
<p>
-A <em>spring</em> in widget layouts is a special, invisible element allowing to adjust widget's position and size within layouts. Such a spring stretches or squeezes a widget on the right, top, bottom or left hand, so it can have desired size and position.
+A <em>spring</em> in widget tqlayouts is a special, invisible element allowing to adjust widget's position and size within tqlayouts. Such a spring stretches or squeezes a widget on the right, top, bottom or left hand, so it can have desired size and position.
</p>
<p>To use a spring:
<ol>
@@ -322,64 +322,64 @@ A <em>spring</em> in widget layouts is a special, invisible element allowing to
</ol>
</p>
<p>
-For the following example, the spring has been inserted on the left hand of the text label &quot;Persons&quot;. The label is thus displayed on the right hand of the form. To make the spring work, it has been put into a common horizontal layout with the label.
+For the following example, the spring has been inserted on the left hand of the text label &quot;Persons&quot;. The label is thus displayed on the right hand of the form. To make the spring work, it has been put into a common horizontal tqlayout with the label.
<br><img src="img/05_04_08_form_spring.png">
- <br>Horizontal layout containing a spring and a text label<br><br>
+ <br>Horizontal tqlayout containing a spring and a text label<br><br>
</p>
<p>
-To make springs work you need to create a global widget layout i.e. a layout for the form itself. Then, springs can use edges of the form as a boundary for expanding.
+To make springs work you need to create a global widget tqlayout i.e. a tqlayout for the form itself. Then, springs can use edges of the form as a boundary for expanding.
</p>
<a name="advanced_form_layouts"></a>
-<H4>Advanced widget layouts</H4>
+<H4>Advanced widget tqlayouts</H4>
<p>
-Widget layouts can be combined (or nested). On the following example you can identify two nested layouts:
+Widget tqlayouts can be combined (or nested). On the following example you can identify two nested tqlayouts:
</p>
<p>
<ol>
-<li>horizontal layout with a spring, aligning the &quot;Persons&quot; text label to the right</li>
-<li>grid layout grouping widgets on the whole form</li>
+<li>horizontal tqlayout with a spring, aligning the &quot;Persons&quot; text label to the right</li>
+<li>grid tqlayout grouping widgets on the whole form</li>
</ol>
</p>
<p>
<img src="img/05_04_08_form_advanced_layout.png">
- <br>Two widget layouts combined: horizontal layout inside of a grid layout<br><br>
+ <br>Two widget tqlayouts combined: horizontal tqlayout inside of a grid tqlayout<br><br>
</p>
<p>
-The horizontal layout is treat in the example as a single widget by the grid layout - it takes exactly one &quot;cell&quot; of the grid.
+The horizontal tqlayout is treat in the example as a single widget by the grid tqlayout - it takes exactly one &quot;cell&quot; of the grid.
After opening a form designed this way in the data view, you can notice (by resizing the form) that:
</p>
<ul>
<li>&quot;Persons&quot; text label thanks to the spring used is constantly aligned to the to the right side of the form</li>
-<li>text fields take all of the available width thanks to putting them into the grid layout</li>
+<li>text fields take all of the available width thanks to putting them into the grid tqlayout</li>
<li>all the form's widgets are pushed to the top thanks to the spring used at the bottom of the form</li>
</ul>
<p>
<img src="img/05_04_08_form_advanced_layout_view.png">
- <br>The form using the two layouts displayed in data view<br><br>
+ <br>The form using the two tqlayouts displayed in data view<br><br>
</p>
-<a name="layout_breaking"></a>
-<H4>Removing widget layouts</H4>
+<a name="tqlayout_breaking"></a>
+<H4>Removing widget tqlayouts</H4>
<p>
-To remove widget layout without removing widgets, perform one of these actions:
+To remove widget tqlayout without removing widgets, perform one of these actions:
<ul>
-<li>click with the &RMB; on the layout's border and select <em>Break Layout</em> command from the context menu</li>
-<li>click with the &LMB; on the layout's border and select <em>Format -&gt; Break Layout</em> menu command</li>
+<li>click with the &RMB; on the tqlayout's border and select <em>Break Layout</em> command from the context menu</li>
+<li>click with the &LMB; on the tqlayout's border and select <em>Format -&gt; Break Layout</em> menu command</li>
</ul>
</p>
<H4>Notes</H4>
-<p>Removing widget layout using the <em>Break Layout</em> command will not remove widgets contained in the layout. If you want to remove the widgets as well, just select the layout by clicking on its border and press <kbd>Delete</kbd> key or use <nobr><em>Edit -&gt <img src="icons/editdelete.png" class="icon"> Delete</em></nobr> menu command or context menu command.
+<p>Removing widget tqlayout using the <em>Break Layout</em> command will not remove widgets contained in the tqlayout. If you want to remove the widgets as well, just select the tqlayout by clicking on its border and press <kbd>Delete</kbd> key or use <nobr><em>Edit -&gt <img src="icons/editdelete.png" class="icon"> Delete</em></nobr> menu command or context menu command.
</p>
-<a name="layout_size_types"></a>
-<H4>Size policies for widgets within a layout</H4>
+<a name="tqlayout_size_types"></a>
+<H4>Size policies for widgets within a tqlayout</H4>
<p>
Instead of setting a fixed size for your widgets, in &kexi; you can choose between various widget's <em>size policies</em>. A size policy is a flexible strategy for controlling how a widget is stretched (or shrunk) depending on other neighbouring widgets and space available within the form.
</p>
<p>
-After putting widgets into a <em>layout</em>, typically each widget gets a proportional (<em>Preferred</em>) size policy. These widgets will be automatically resized with preferred settings, depending on their type and size of the entire layout itself. For example, three buttons put into the horizontal layout will be resized to fit their visible text.
+After putting widgets into a <em>tqlayout</em>, typically each widget gets a proportional (<em>Preferred</em>) size policy. These widgets will be automatically resized with preferred settings, depending on their type and size of the entire tqlayout itself. For example, three buttons put into the horizontal tqlayout will be resized to fit their visible text.
</p>
<p>
For each widget inserted into the form, there are settings for size policy available in the <em>Property Editor</em>. The settings are presented as a group of properties called <em>Size Policy</em>.
@@ -387,7 +387,7 @@ For each widget inserted into the form, there are settings for size policy avail
<br><img src="img/05_04_09_size_policy_properties.png">
<br>A group of properties for defining a widget's size policy<br><br>
-This group of properties contains:
+This group of properties tqcontains:
<ul>
<li><b>Horizontal Size Policy</b> defining horizontal size of the widget,</li>
<li><b>Vertical Size Policy</b> defining vertical size of the widget,</li>
@@ -403,12 +403,12 @@ There are following values available on the drop down list for <em>Horizontal Si
<li><b>Fixed</b> value means that the widget cannot be automatically resized; it should maintain the constant size defined on design time (width or height),</li>
<li><p><b>Minimum</b> value means that the original size of the widget is set as minimal allowed, it is sufficient and there is no need for expanding the widget, but the widget will be expanded if needed. This type of policy can be used to force widget to be expanded to the whole width or height, especially if you set a <em>stretch</em> value greater than 0.
<br><img src="img/05_04_09_size_policy_minimum.png">
- <br>Text field and two buttons within a grid layout (<em>Minimum</em> horizontal size policy is set for both buttons, so these are slightly wider than needed)<br><br>
+ <br>Text field and two buttons within a grid tqlayout (<em>Minimum</em> horizontal size policy is set for both buttons, so these are slightly wider than needed)<br><br>
</p></li>
<li><b>Maximum</b> value means that the original size of the widget is set as maximum allowed and can be decreased without breaking the widget's usability and readability if other widgets need more space,</li>
<li><p><b>Preferred</b> value means that the original size of the widget is the best and preferred; the widget can be shrunk or expanded however and it will stay readable,
<br><img src="img/05_04_09_size_policy_preferred.png">
- <br>Text field and two buttons within a grid layout (<em>Preferred</em> horizontal size policy is set for both buttons)<br><br>
+ <br>Text field and two buttons within a grid tqlayout (<em>Preferred</em> horizontal size policy is set for both buttons)<br><br>
</p></li>
<li><b>Expanding</b> value means that the original size of the widget is reasonable but the widget can be also shrunk; it can be expanded as well to take as much space as possible,</li>
<li><b>Minimum Expanding</b> value means that the original size of the widget is allowed; it can be expanded to take as much space as possible,</li>
@@ -432,7 +432,7 @@ The most frequently used size policies are <em>Preferred</em>, <em>Minimum</em>
<a name="widget_adjusting"></a>
<H3>5.4.10. Setting widgets size and position by hand</H3>
<p>
-In case when your form has no main layout set for auto-positioning and auto-resizing its widgets, you will probably want to align widget's position and size so the form can look cleaner and be easier to use. The &kexi; form designer simplifies this task by offering the following groups of commands:
+In case when your form has no main tqlayout set for auto-positioning and auto-resizing its widgets, you will probably want to align widget's position and size so the form can look cleaner and be easier to use. The &kexi; form designer simplifies this task by offering the following groups of commands:
</p>
<ul>
<li><p>Adjusting sizes of selected widgets. The commands are available in the <em>Format -&gt; Adjust Widgets Size</em> submenu of the Menubar and in the <em>Adjust Widgets Size</em> submenu of the context menu. Toolbar's drop down button <nobr><img src="icons/aogrid.png" class="icon"> <em>Adjust Widgets Size</em></nobr> is also available.
@@ -497,7 +497,7 @@ To change tab order, either:
<li>Click a selected widget name on the widgets list and drag it to a desired position (up or down) using the mouse.
</li>
<li>Click a selected widget name on the widgets list and use <em>Move Up</em> or <em>Move Down</em> buttons, to move the widgets to a desired position.</li>
-<li>Click the <em>Handle tab stops automatically</em> check box to set the automatic tab order for the form. If this option has been switched on, any changes made to the list of widgets by hand are not taken into account - &kexi; will be handling the tab orders on its own. The automatic ordering means that the top-left widget will be focused first (or the top-right if your operating system uses right-to-left layout), and the order comes from the left to right (from the right to left, appropriately) and from the top to bottom.
+<li>Click the <em>Handle tab stops automatically</em> check box to set the automatic tab order for the form. If this option has been switched on, any changes made to the list of widgets by hand are not taken into account - &kexi; will be handling the tab orders on its own. The automatic ordering means that the top-left widget will be focused first (or the top-right if your operating system uses right-to-left tqlayout), and the order comes from the left to right (from the right to left, appropriately) and from the top to bottom.
<br><img src="img/05_04_11_auto_tab_stop.png">
<br>Automatic tab order for a form<br><br>
</li>
diff --git a/kexi/doc/handbook/translation-status.txt b/kexi/doc/handbook/translation-status.txt
index acc00d000..278770d82 100644
--- a/kexi/doc/handbook/translation-status.txt
+++ b/kexi/doc/handbook/translation-status.txt
@@ -68,11 +68,11 @@ DONE 5.4.6. Assigning data sources
DONE 5.4.7. Inserting text labels
DONE 5.4.8. Actions
DONE * Assigning actions to form buttons
-DONE 5.4.9. Widget layouts
-DONE * Springs in widget layouts
-DONE * Advanced widget layouts
-DONE * Removing widget layouts
-DONE * Size policies for widgets within a layout
+DONE 5.4.9. Widget tqlayouts
+DONE * Springs in widget tqlayouts
+DONE * Advanced widget tqlayouts
+DONE * Removing widget tqlayouts
+DONE * Size policies for widgets within a tqlayout
DONE 5.4.10. Setting widgets size and position by hand
DONE 5.4.11. Setting the tab order
DONE 5.5. Entering data using forms
diff --git a/kexi/doc/kexidb/kexidb.doxygen b/kexi/doc/kexidb/kexidb.doxygen
index ebfa7741a..5abed26b7 100644
--- a/kexi/doc/kexidb/kexidb.doxygen
+++ b/kexi/doc/kexidb/kexidb.doxygen
@@ -72,8 +72,8 @@ EXCLUDE = ../../kexidb/parser/sqlparser.h \
../../kexidb/parser/sqlparser.cpp \
../../kexidb/parser/sqlscanner.cpp
EXCLUDE_SYMLINKS = NO
-EXCLUDE_PATTERNS = *.moc.* \
- moc* \
+EXCLUDE_PATTERNS = *.tqmoc.* \
+ tqmoc* \
*.all_cpp.* \
*unload.* \
*/test/* \
diff --git a/kexi/examples/Simple_Database.kexi.sql b/kexi/examples/Simple_Database.kexi.sql
index f8a243e3d..dbd89e1d3 100644
--- a/kexi/examples/Simple_Database.kexi.sql
+++ b/kexi/examples/Simple_Database.kexi.sql
@@ -23,7 +23,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI>
<kfd:customHeader version="2" />
<pixmapinproject/>
<class>QWidget</class>
-<widget class="QWidget" >
+<widget class=TQWIDGET_OBJECT_NAME_STRING >
<property name="name" >
<cstring>formularz1</cstring>
</property>
@@ -83,7 +83,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI>
<property name="text" >
<string>Name</string>
</property>
-<property name="alignment" >
+<property name="tqalignment" >
<set>WordBreak|AlignBottom</set>
</property>
</widget>
@@ -141,7 +141,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI>
<property name="text" >
<string>Surname</string>
</property>
-<property name="alignment" >
+<property name="tqalignment" >
<set>WordBreak|AlignBottom</set>
</property>
</widget>
@@ -157,7 +157,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI>
<height>70</height>
</rect>
</property>
-<property name="alignment" >
+<property name="tqalignment" >
<set>AlignTop|AlignRight</set>
</property>
<property name="storedPixmapId" >
@@ -219,7 +219,7 @@ INSERT INTO "kexi__objectdata" VALUES(4, '<!DOCTYPE UI>
</property>
</widget>
</widget>
-<layoutDefaults spacing="6" margin="11" />
+<tqlayoutDefaults spacing="6" margin="11" />
<tabstops>
<tabstop>TextLabel1</tabstop>
<tabstop>TextLabel2</tabstop>
@@ -235,7 +235,7 @@ INSERT INTO "kexi__objectdata" VALUES(96, '<!DOCTYPE UI>
<UI stdsetdef="1" version="3.1" >
<pixmapinproject/>
<class>QWidget</class>
- <widget class="QWidget" >
+ <widget class=TQWIDGET_OBJECT_NAME_STRING >
<property name="name" >
<cstring>report2</cstring>
</property>
@@ -330,7 +330,7 @@ INSERT INTO "kexi__objectdata" VALUES(96, '<!DOCTYPE UI>
<data format="XBM.GZ" length="79" >789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
</image>
</images>
- <layoutDefaults spacing="6" margin="11" />
+ <tqlayoutDefaults spacing="6" margin="11" />
<tabstops>
<tabstop>SubReport1</tabstop>
</tabstops>
@@ -428,7 +428,7 @@ INSERT INTO "kexi__objectdata" VALUES(105, '<!DOCTYPE UI>
<kfd:customHeader version="2" />
<pixmapinproject/>
<class>QWidget</class>
-<widget class="QWidget" >
+<widget class=TQWIDGET_OBJECT_NAME_STRING >
<property name="name" >
<cstring>form1</cstring>
</property>
@@ -607,7 +607,7 @@ INSERT INTO "kexi__objectdata" VALUES(105, '<!DOCTYPE UI>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
</includehints>
-<layoutDefaults spacing="6" margin="11" />
+<tqlayoutDefaults spacing="6" margin="11" />
<tabstops>
<tabstop>TextLabel1</tabstop>
<tabstop>image</tabstop>
diff --git a/kexi/formeditor/commands.cpp b/kexi/formeditor/commands.cpp
index ca4f0f20d..d628d53fb 100644
--- a/kexi/formeditor/commands.cpp
+++ b/kexi/formeditor/commands.cpp
@@ -17,12 +17,12 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -59,15 +59,15 @@ Command::~Command()
// PropertyCommand
-PropertyCommand::PropertyCommand(WidgetPropertySet *set, const QCString &wname,
- const QVariant &oldValue, const QVariant &value, const QCString &property)
+PropertyCommand::PropertyCommand(WidgetPropertySet *set, const TQCString &wname,
+ const TQVariant &oldValue, const TQVariant &value, const TQCString &property)
: Command(), m_propSet(set), m_value(value), m_property(property)
{
m_oldvalues.insert(wname, oldValue);
}
-PropertyCommand::PropertyCommand(WidgetPropertySet *set, const QMap<QCString, QVariant> &oldvalues,
- const QVariant &value, const QCString &property)
+PropertyCommand::PropertyCommand(WidgetPropertySet *set, const TQMap<TQCString, TQVariant> &oldvalues,
+ const TQVariant &value, const TQCString &property)
: Command(), m_propSet(set), m_value(value), m_oldvalues(oldvalues), m_property(property)
{
}
@@ -84,7 +84,7 @@ MultiCommandGroup::addSubCommand(PropertyCommand* subCommand)
*/
void
-PropertyCommand::setValue(const QVariant &value)
+PropertyCommand::setValue(const TQVariant &value)
{
m_value = value;
emit FormManager::self()->dirty(FormManager::self()->activeForm());
@@ -96,8 +96,8 @@ PropertyCommand::execute()
FormManager::self()->activeForm()->selectFormWidget();
m_propSet->setUndoing(true);
- QMap<QCString, QVariant>::ConstIterator endIt = m_oldvalues.constEnd();
- for(QMap<QCString, QVariant>::ConstIterator it = m_oldvalues.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQVariant>::ConstIterator endIt = m_oldvalues.constEnd();
+ for(TQMap<TQCString, TQVariant>::ConstIterator it = m_oldvalues.constBegin(); it != endIt; ++it)
{
ObjectTreeItem* item = FormManager::self()->activeForm()->objectTree()->lookup(it.key());
if (item) {//we're checking for item!=0 because the name could be of a form widget
@@ -115,19 +115,19 @@ PropertyCommand::unexecute()
FormManager::self()->activeForm()->selectFormWidget();
m_propSet->setUndoing(true);
- QMap<QCString, QVariant>::ConstIterator endIt = m_oldvalues.constEnd();
- for(QMap<QCString, QVariant>::ConstIterator it = m_oldvalues.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQVariant>::ConstIterator endIt = m_oldvalues.constEnd();
+ for(TQMap<TQCString, TQVariant>::ConstIterator it = m_oldvalues.constBegin(); it != endIt; ++it)
{
ObjectTreeItem* item = FormManager::self()->activeForm()->objectTree()->lookup(it.key());
if (!item)
continue; //better this than a crash
- QWidget *widg = item->widget();
+ TQWidget *widg = item->widget();
FormManager::self()->activeForm()->setSelectedWidget(widg, true);
//m_propSet->setSelectedWidget(widg, true);
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widg);
- QWidget *subWidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widg;
- if (-1!=subWidget->metaObject()->findProperty( m_property, true ))
+ TQWidget *subWidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widg;
+ if (-1!=subWidget->tqmetaObject()->tqfindProperty( m_property, true ))
subWidget->setProperty(m_property, it.data());
}
@@ -135,13 +135,13 @@ PropertyCommand::unexecute()
m_propSet->setUndoing(false);
}
-QString
+TQString
PropertyCommand::name() const
{
if(m_oldvalues.count() >= 2)
- return i18n("Change \"%1\" property for multiple widgets" ).arg(m_property);
+ return i18n("Change \"%1\" property for multiple widgets" ).tqarg(TQString(m_property));
else
- return i18n("Change \"%1\" property for widget \"%2\"" ).arg(m_property).arg(m_oldvalues.begin().key());
+ return i18n("Change \"%1\" property for widget \"%2\"" ).tqarg(TQString(m_property)).tqarg(TQString(m_oldvalues.begin().key()));
}
void
@@ -154,7 +154,7 @@ PropertyCommand::debug()
// GeometryPropertyCommand (for multiples widgets)
GeometryPropertyCommand::GeometryPropertyCommand(WidgetPropertySet *set,
- const QStringList &names, const QPoint& oldPos)
+ const TQStringList &names, const TQPoint& oldPos)
: Command(), m_propSet(set), m_names(names), m_oldPos(oldPos)
{
}
@@ -166,14 +166,14 @@ GeometryPropertyCommand::execute()
int dx = m_pos.x() - m_oldPos.x();
int dy = m_pos.y() - m_oldPos.y();
- QStringList::ConstIterator endIt = m_names.constEnd();
+ TQStringList::ConstIterator endIt = m_names.constEnd();
// We move every widget in our list by (dx, dy)
- for(QStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
+ for(TQStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
{
ObjectTreeItem* item = FormManager::self()->activeForm()->objectTree()->lookup(*it);
if (!item)
continue; //better this than a crash
- QWidget *w = item->widget();
+ TQWidget *w = item->widget();
w->move(w->x() + dx, w->y() + dy);
}
m_propSet->setUndoing(false);
@@ -186,27 +186,27 @@ GeometryPropertyCommand::unexecute()
int dx = m_pos.x() - m_oldPos.x();
int dy = m_pos.y() - m_oldPos.y();
- QStringList::ConstIterator endIt = m_names.constEnd();
+ TQStringList::ConstIterator endIt = m_names.constEnd();
// We move every widget in our list by (-dx, -dy) to undo the move
- for(QStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
+ for(TQStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
{
ObjectTreeItem* item = FormManager::self()->activeForm()->objectTree()->lookup(*it);
if (!item)
continue; //better this than a crash
- QWidget *w = item->widget();
+ TQWidget *w = item->widget();
w->move(w->x() - dx, w->y() - dy);
}
m_propSet->setUndoing(false);
}
void
-GeometryPropertyCommand::setPos(const QPoint& pos)
+GeometryPropertyCommand::setPos(const TQPoint& pos)
{
m_pos = pos;
emit FormManager::self()->dirty(FormManager::self()->activeForm());
}
-QString
+TQString
GeometryPropertyCommand::name() const
{
return i18n("Move multiple widgets");
@@ -224,7 +224,7 @@ GeometryPropertyCommand::debug()
AlignWidgetsCommand::AlignWidgetsCommand(int type, WidgetList &list, Form *form)
: Command(), m_form(form), m_type(type)
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
m_pos.insert(w->name(), w->pos());
}
@@ -236,12 +236,12 @@ AlignWidgetsCommand::execute()
int gridX = m_form->gridSize();
int gridY = m_form->gridSize();
- QWidget *parentWidget = m_form->selectedWidgets()->first()->parentWidget();
+ TQWidget *tqparentWidget = m_form->selectedWidgets()->first()->tqparentWidget();
int tmpx, tmpy;
WidgetList list;
- QMap<QCString, QPoint>::ConstIterator endIt = m_pos.constEnd();
- for(QMap<QCString, QPoint>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQPoint>::ConstIterator endIt = m_pos.constEnd();
+ for(TQMap<TQCString, TQPoint>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
@@ -252,7 +252,7 @@ AlignWidgetsCommand::execute()
{
case AlignToGrid:
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
tmpx = int( (float)w->x() / ((float)gridX) + 0.5 ) * gridX;
tmpy = int( (float)w->y() / ((float)gridY) + 0.5 ) * gridY;
@@ -265,14 +265,14 @@ AlignWidgetsCommand::execute()
case AlignToLeft:
{
- tmpx = parentWidget->width();
- for(QWidget *w = list.first(); w; w = list.next())
+ tmpx = tqparentWidget->width();
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->x() < tmpx)
tmpx = w->x();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
w->move(tmpx, w->y());
break;
}
@@ -280,27 +280,27 @@ AlignWidgetsCommand::execute()
case AlignToRight:
{
tmpx = 0;
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->x() + w->width() > tmpx)
tmpx = w->x() + w->width();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
w->move(tmpx - w->width(), w->y());
break;
}
case AlignToTop:
{
- tmpy = parentWidget->height();
- for(QWidget *w = list.first(); w; w = list.next())
+ tmpy = tqparentWidget->height();
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->y() < tmpy)
tmpy = w->y();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
w->move(w->x(), tmpy);
break;
}
@@ -308,13 +308,13 @@ AlignWidgetsCommand::execute()
case AlignToBottom:
{
tmpy = 0;
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->y() + w->height() > tmpy)
tmpy = w->y() + w->height();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
w->move(w->x(), tmpy - w->height());
break;
}
@@ -324,7 +324,7 @@ AlignWidgetsCommand::execute()
}
// We restore selection
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
m_form->setSelectedWidget(w, true);
}
@@ -334,8 +334,8 @@ AlignWidgetsCommand::unexecute()
// To avoid creation of GeometryPropertyCommand
m_form->selectFormWidget();
// We move widgets to their original pos
- QMap<QCString, QPoint>::ConstIterator endIt = m_pos.constEnd();
- for(QMap<QCString, QPoint>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQPoint>::ConstIterator endIt = m_pos.constEnd();
+ for(TQMap<TQCString, TQPoint>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
@@ -344,7 +344,7 @@ AlignWidgetsCommand::unexecute()
}
}
-QString
+TQString
AlignWidgetsCommand::name() const
{
switch(m_type)
@@ -360,7 +360,7 @@ AlignWidgetsCommand::name() const
case AlignToBottom:
return i18n("Align Widgets to Bottom");
default:
- return QString::null;
+ return TQString();
}
}
@@ -376,13 +376,13 @@ AlignWidgetsCommand::debug()
AdjustSizeCommand::AdjustSizeCommand(int type, WidgetList &list, Form *form)
: Command(), m_form(form), m_type(type)
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
- if(w->parentWidget() && w->parentWidget()->isA("QWidgetStack"))
+ if(w->tqparentWidget() && w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
{
- w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits("QTabWidget")) // widget is tabwidget page
- w = w->parentWidget();
+ w = w->tqparentWidget(); // widget is WidgetStack page
+ if(w->tqparentWidget() && w->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ w = w->tqparentWidget();
}
m_sizes.insert(w->name(), w->size());
@@ -402,8 +402,8 @@ AdjustSizeCommand::execute()
int tmpw=0, tmph=0;
WidgetList list;
- QMap<QCString, QSize>::ConstIterator endIt = m_sizes.constEnd();
- for(QMap<QCString, QSize>::ConstIterator it = m_sizes.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQSize>::ConstIterator endIt = m_sizes.constEnd();
+ for(TQMap<TQCString, TQSize>::ConstIterator it = m_sizes.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
@@ -416,7 +416,7 @@ AdjustSizeCommand::execute()
{
int tmpx=0, tmpy=0;
// same as in 'Align to Grid' + for the size
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
tmpx = int( (float)w->x() / ((float)gridX) + 0.5 ) * gridX;
tmpy = int( (float)w->y() / ((float)gridY) + 0.5 ) * gridY;
@@ -433,12 +433,12 @@ AdjustSizeCommand::execute()
case SizeToFit:
{
- for(QWidget *w = list.first(); w; w = list.next()) {
+ for(TQWidget *w = list.first(); w; w = list.next()) {
ObjectTreeItem *item = m_form->objectTree()->lookup(w->name());
- if(item && !item->children()->isEmpty()) { // container
- QSize s;
- if(item->container() && item->container()->layout())
- s = w->sizeHint();
+ if(item && !item->tqchildren()->isEmpty()) { // container
+ TQSize s;
+ if(item->container() && item->container()->tqlayout())
+ s = w->tqsizeHint();
else
s = getSizeFromChildren(item);
// minimum size for containers
@@ -446,8 +446,8 @@ AdjustSizeCommand::execute()
s.setWidth(30);
if(s.height() < 30)
s.setHeight(30);
- // small hack for flow layouts
- int type = item->container() ? item->container()->layoutType() : Container::NoLayout;
+ // small hack for flow tqlayouts
+ int type = item->container() ? item->container()->tqlayoutType() : Container::NoLayout;
if(type == Container::HFlow)
s.setWidth(s.width() + 5);
else if(type == Container::VFlow)
@@ -457,9 +457,9 @@ AdjustSizeCommand::execute()
else if(item && item->container()) // empty container
w->resize(item->container()->form()->gridSize() * 5, item->container()->form()->gridSize() * 5); // basic size
else {
- QSize sizeHint(w->sizeHint());
- if (sizeHint.isValid())
- w->resize(sizeHint);
+ TQSize tqsizeHint(w->tqsizeHint());
+ if (tqsizeHint.isValid())
+ w->resize(tqsizeHint);
}
}
break;
@@ -467,13 +467,13 @@ AdjustSizeCommand::execute()
case SizeToSmallWidth:
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if((tmpw == 0) || (w->width() < tmpw))
tmpw = w->width();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(tmpw != w->width())
w->resize(tmpw, w->height());
@@ -483,13 +483,13 @@ AdjustSizeCommand::execute()
case SizeToBigWidth:
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->width() > tmpw)
tmpw = w->width();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(tmpw != w->width())
w->resize(tmpw, w->height());
@@ -499,13 +499,13 @@ AdjustSizeCommand::execute()
case SizeToSmallHeight:
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if((tmph == 0) || (w->height() < tmph))
tmph = w->height();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(tmph != w->height())
w->resize(w->width(), tmph);
@@ -515,13 +515,13 @@ AdjustSizeCommand::execute()
case SizeToBigHeight:
{
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(w->height() > tmph)
tmph = w->height();
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
{
if(tmph != w->height())
w->resize(w->width(), tmph);
@@ -534,31 +534,31 @@ AdjustSizeCommand::execute()
}
// We restore selection
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
m_form->setSelectedWidget(w, true);
}
-QSize
+TQSize
AdjustSizeCommand::getSizeFromChildren(ObjectTreeItem *item)
{
if(!item->container()) // multi pages containers (eg tabwidget)
{
- QSize s;
+ TQSize s;
// get size for each container, and keep the biggest one
- for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next())
+ for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next())
s = s.expandedTo(getSizeFromChildren(tree));
return s;
}
int tmpw = 0, tmph = 0;
- for(ObjectTreeItem *tree = item->children()->first(); tree; tree = item->children()->next()) {
+ for(ObjectTreeItem *tree = item->tqchildren()->first(); tree; tree = item->tqchildren()->next()) {
if(!tree->widget())
continue;
- tmpw = QMAX(tmpw, tree->widget()->geometry().right());
- tmph = QMAX(tmph, tree->widget()->geometry().bottom());
+ tmpw = TQMAX(tmpw, tree->widget()->tqgeometry().right());
+ tmph = TQMAX(tmph, tree->widget()->tqgeometry().bottom());
}
- return QSize(tmpw, tmph) + QSize(10, 10);
+ return TQSize(tmpw, tmph) + TQSize(10, 10);
}
void
@@ -567,8 +567,8 @@ AdjustSizeCommand::unexecute()
// To avoid creation of GeometryPropertyCommand
m_form->selectFormWidget();
// We resize widgets to their original size
- QMap<QCString, QSize>::ConstIterator endIt = m_sizes.constEnd();
- for(QMap<QCString, QSize>::ConstIterator it = m_sizes.constBegin(); it != endIt; ++it)
+ TQMap<TQCString, TQSize>::ConstIterator endIt = m_sizes.constEnd();
+ for(TQMap<TQCString, TQSize>::ConstIterator it = m_sizes.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
@@ -581,7 +581,7 @@ AdjustSizeCommand::unexecute()
}
}
-QString
+TQString
AdjustSizeCommand::name() const
{
switch(m_type)
@@ -599,7 +599,7 @@ AdjustSizeCommand::name() const
case SizeToBigHeight:
return i18n("Resize Widgets to Tallest");
default:
- return QString::null;
+ return TQString();
}
}
@@ -612,18 +612,18 @@ AdjustSizeCommand::debug()
// LayoutPropertyCommand
-LayoutPropertyCommand::LayoutPropertyCommand(WidgetPropertySet *buf, const QCString &wname,
- const QVariant &oldValue, const QVariant &value)
- : PropertyCommand(buf, wname, oldValue, value, "layout")
+LayoutPropertyCommand::LayoutPropertyCommand(WidgetPropertySet *buf, const TQCString &wname,
+ const TQVariant &oldValue, const TQVariant &value)
+ : PropertyCommand(buf, wname, oldValue, value, "tqlayout")
{
m_form = FormManager::self()->activeForm();
ObjectTreeItem* titem = m_form->objectTree()->lookup(wname);
if (!titem)
return; //better this than a crash
Container *m_container = titem->container();
- // We save the geometry of each wigdet
- for(ObjectTreeItem *it = m_container->objectTree()->children()->first(); it; it = m_container->objectTree()->children()->next())
- m_geometries.insert(it->name().latin1(), it->widget()->geometry());
+ // We save the tqgeometry of each wigdet
+ for(ObjectTreeItem *it = m_container->objectTree()->tqchildren()->first(); it; it = m_container->objectTree()->tqchildren()->next())
+ m_geometries.insert(it->name().latin1(), it->widget()->tqgeometry());
}
void
@@ -641,8 +641,8 @@ LayoutPropertyCommand::unexecute()
Container *m_container = titem->container();
m_container->setLayout(Container::NoLayout);
// We put every widget back in its old location
- QMap<QCString,QRect>::ConstIterator endIt = m_geometries.constEnd();
- for(QMap<QCString,QRect>::ConstIterator it = m_geometries.constBegin(); it != endIt; ++it)
+ TQMap<TQCString,TQRect>::ConstIterator endIt = m_geometries.constEnd();
+ for(TQMap<TQCString,TQRect>::ConstIterator it = m_geometries.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *tree = m_container->form()->objectTree()->lookup(it.key());
if(tree)
@@ -652,10 +652,10 @@ LayoutPropertyCommand::unexecute()
PropertyCommand::unexecute();
}
-QString
+TQString
LayoutPropertyCommand::name() const
{
- return i18n("Change layout of widget \"%1\"").arg(m_oldvalues.begin().key());
+ return i18n("Change tqlayout of widget \"%1\"").tqarg(TQString(m_oldvalues.begin().key()));
}
void
@@ -681,7 +681,7 @@ InsertWidgetCommand::InsertWidgetCommand(Container *container)
}
InsertWidgetCommand::InsertWidgetCommand(Container *container,
- const QCString& className, const QPoint& pos, const QCString& namePrefix)
+ const TQCString& className, const TQPoint& pos, const TQCString& namePrefix)
: Command()
{
m_containername = container->widget()->name();
@@ -732,7 +732,7 @@ InsertWidgetCommand::execute()
else
options |= WidgetFactory::AnyOrientation;
- QWidget *w = m_container->form()->library()->createWidget(m_class, m_container->m_container, m_name,
+ TQWidget *w = m_container->form()->library()->createWidget(m_class, m_container->m_container, m_name,
m_container, options);
if(!w) {
@@ -740,7 +740,7 @@ InsertWidgetCommand::execute()
WidgetInfo *winfo = m_container->form()->library()->widgetInfoForClassName(m_class);
KMessageBox::sorry(FormManager::self()->activeForm() ? FormManager::self()->activeForm()->widget() : 0,
i18n("Could not insert widget of type \"%1\". A problem with widget's creation encountered.")
- .arg(winfo ? winfo->name() : QString::null));
+ .tqarg(winfo ? winfo->name() : TQString()));
kdWarning() << "InsertWidgetCommand::execute() ERROR: widget creation failed" << endl;
return;
}
@@ -755,10 +755,10 @@ InsertWidgetCommand::execute()
// if the insertRect is invalid (ie only one point), we use widget' size hint
if(( (m_insertRect.width() < 21) && (m_insertRect.height() < 21)))
{
- QSize s = w->sizeHint();
+ TQSize s = w->tqsizeHint();
if(s.isEmpty())
- s = QSize(20, 20); // Minimum size to avoid creating a (0,0) widget
+ s = TQSize(20, 20); // Minimum size to avoid creating a (0,0) widget
int x, y;
if(m_insertRect.isValid())
{
@@ -770,13 +770,13 @@ InsertWidgetCommand::execute()
x = m_point.x();
y = m_point.y();
}
- m_insertRect = QRect(x, y, s.width() + 16/* add some space so more text can be entered*/,
+ m_insertRect = TQRect(x, y, s.width() + 16/* add some space so more text can be entered*/,
s.height());
}
w->move(m_insertRect.x(), m_insertRect.y());
w->resize(m_insertRect.width()-1, m_insertRect.height()-1); // -1 is not to hide dots
- w->setStyle(&(m_container->widget()->style()));
- w->setBackgroundOrigin(QWidget::ParentOrigin);
+ w->setStyle(&(m_container->widget()->tqstyle()));
+ w->setBackgroundOrigin(TQWidget::ParentOrigin);
w->show();
FormManager::self()->stopInsert();
@@ -796,13 +796,13 @@ InsertWidgetCommand::execute()
}
// We add the autoSaveProperties in the modifProp list of the ObjectTreeItem, so that they are saved later
- QValueList<QCString> list(m_container->form()->library()->autoSaveProperties(w->className()));
+ TQValueList<TQCString> list(m_container->form()->library()->autoSaveProperties(w->className()));
- QValueList<QCString>::ConstIterator endIt = list.constEnd();
- for(QValueList<QCString>::ConstIterator it = list.constBegin(); it != endIt; ++it)
+ TQValueList<TQCString>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQCString>::ConstIterator it = list.constBegin(); it != endIt; ++it)
item->addModifiedProperty(*it, w->property(*it));
- m_container->reloadLayout(); // reload the layout to take the new wigdet into account
+ m_container->reloadLayout(); // reload the tqlayout to take the new wigdet into account
m_container->setSelectedWidget(w, false);
if (m_container->form()->library()->internalProperty(w->className(),
@@ -821,16 +821,16 @@ InsertWidgetCommand::unexecute()
ObjectTreeItem* titem = m_form->objectTree()->lookup(m_name);
if (!titem)
return; //better this than a crash
- QWidget *m_widget = titem->widget();
+ TQWidget *m_widget = titem->widget();
Container *m_container = m_form->objectTree()->lookup(m_containername)->container();
m_container->deleteWidget(m_widget);
}
-QString
+TQString
InsertWidgetCommand::name() const
{
if(!m_name.isEmpty())
- return i18n("Insert widget \"%1\"").arg(m_name);
+ return i18n("Insert widget \"%1\"").tqarg(TQString(m_name));
else
return i18n("Insert widget");
}
@@ -846,11 +846,11 @@ InsertWidgetCommand::debug()
/// CreateLayoutCommand ///////////////
-CreateLayoutCommand::CreateLayoutCommand(int layoutType, WidgetList &list, Form *form)
- : m_form(form), m_type(layoutType)
+CreateLayoutCommand::CreateLayoutCommand(int tqlayoutType, WidgetList &list, Form *form)
+ : m_form(form), m_type(tqlayoutType)
{
WidgetList *m_list=0;
- switch(layoutType)
+ switch(tqlayoutType)
{
case Container::HBox:
case Container::Grid:
@@ -862,15 +862,15 @@ CreateLayoutCommand::CreateLayoutCommand(int layoutType, WidgetList &list, Form
case Container::VFlow:
m_list = new VerWidgetList(form->toplevelContainer()->widget()); break;
}
- for(QWidget *w = list.first(); w; w = list.next())
+ for(TQWidget *w = list.first(); w; w = list.next())
m_list->append(w);
- m_list->sort(); // we sort them now, before creating the layout
+ m_list->sort(); // we sort them now, before creating the tqlayout
- for(QWidget *w = m_list->first(); w; w = m_list->next())
- m_pos.insert(w->name(), w->geometry());
+ for(TQWidget *w = m_list->first(); w; w = m_list->next())
+ m_pos.insert(w->name(), w->tqgeometry());
ObjectTreeItem *item = form->objectTree()->lookup(m_list->first()->name());
- if(item && item->parent()->container())
- m_containername = item->parent()->name();
+ if(item && item->tqparent()->container())
+ m_containername = item->tqparent()->name();
delete m_list;
}
@@ -885,18 +885,18 @@ CreateLayoutCommand::execute()
if(!container)
container = m_form->toplevelContainer(); // use toplevelContainer by default
- QCString classname;
+ TQCString classname;
switch(m_type) {
case Container::HSplitter: case Container::VSplitter:
- classname = "QSplitter"; break;
+ classname = TQSPLITTER_OBJECT_NAME_STRING; break;
default:
- classname = Container::layoutTypeToString(m_type).latin1();
+ classname = Container::tqlayoutTypeToString(m_type).latin1();
}
if(m_name.isEmpty())// the name must be generated only once
m_name = m_form->objectTree()->generateUniqueName(classname);
- QWidget *w = lib->createWidget(classname, container->widget(), m_name.latin1(), container);
+ TQWidget *w = lib->createWidget(classname, container->widget(), m_name.latin1(), container);
#if KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
//! @todo allow setting this for data view mode as well
if (w) {
@@ -911,17 +911,17 @@ CreateLayoutCommand::execute()
return;
container->setSelectedWidget(0, false);
- w->move(m_pos.begin().data().topLeft()); // we move the layout at the position of the topleft widget
- // sizeHint of these widgets depends on geometry, so give them appropriate geometry
+ w->move(m_pos.begin().data().topLeft()); // we move the tqlayout at the position of the topleft widget
+ // tqsizeHint of these widgets depends on tqgeometry, so give them appropriate tqgeometry
if(m_type == Container::HFlow)
- w->resize( QSize(700, 20) );
+ w->resize( TQSize(700, 20) );
else if(m_type == Container::VFlow)
- w->resize( QSize(20, 700));
+ w->resize( TQSize(20, 700));
w->show();
// We reparent every widget to the Layout and insert them into it
- QMap<QCString,QRect>::ConstIterator endIt = m_pos.constEnd();
- for(QMap<QCString,QRect>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
+ TQMap<TQCString,TQRect>::ConstIterator endIt = m_pos.constEnd();
+ for(TQMap<TQCString,TQRect>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
@@ -933,12 +933,12 @@ CreateLayoutCommand::execute()
}
if(m_type == Container::HSplitter)
- ((QSplitter*)w)->setOrientation(QSplitter::Horizontal);
+ ((TQSplitter*)w)->setOrientation(Qt::Horizontal);
else if(m_type == Container::VSplitter)
- ((QSplitter*)w)->setOrientation(QSplitter::Vertical);
+ ((TQSplitter*)w)->setOrientation(Qt::Vertical);
else if(tree->container()) {
tree->container()->setLayout((Container::LayoutType)m_type);
- w->resize(tree->container()->layout()->sizeHint()); // the layout doesn't have its own size
+ w->resize(tree->container()->tqlayout()->tqsizeHint()); // the tqlayout doesn't have its own size
}
container->setSelectedWidget(w, false);
@@ -948,54 +948,54 @@ CreateLayoutCommand::execute()
void
CreateLayoutCommand::unexecute()
{
- ObjectTreeItem *parent = m_form->objectTree()->lookup(m_containername);
- if(!parent)
- parent = m_form->objectTree();
+ ObjectTreeItem *tqparent = m_form->objectTree()->lookup(m_containername);
+ if(!tqparent)
+ tqparent = m_form->objectTree();
- // We reparent every widget to the Container and take them out of the layout
- QMap<QCString,QRect>::ConstIterator endIt = m_pos.constEnd();
- for(QMap<QCString,QRect>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
+ // We reparent every widget to the Container and take them out of the tqlayout
+ TQMap<TQCString,TQRect>::ConstIterator endIt = m_pos.constEnd();
+ for(TQMap<TQCString,TQRect>::ConstIterator it = m_pos.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if(item && item->widget())
{
- item->widget()->reparent(parent->widget(), QPoint(0,0), true);
- item->eventEater()->setContainer(parent->container());
+ item->widget()->reparent(tqparent->widget(), TQPoint(0,0), true);
+ item->eventEater()->setContainer(tqparent->container());
if(m_pos[it.key()].isValid())
item->widget()->setGeometry(m_pos[it.key()]);
m_form->objectTree()->reparent(item->name(), m_containername);
}
}
- if(!parent->container())
+ if(!tqparent->container())
return;
ObjectTreeItem* titem = m_form->objectTree()->lookup(m_name);
if (!titem)
return; //better this than a crash
- QWidget *w = titem->widget();
- parent->container()->deleteWidget(w); // delete the layout widget
+ TQWidget *w = titem->widget();
+ tqparent->container()->deleteWidget(w); // delete the tqlayout widget
FormManager::self()->windowChanged(m_form->widget()); // to reload ObjectTreeView
}
-QString
+TQString
CreateLayoutCommand::name() const
{
switch(m_type)
{
case Container::HBox:
- return i18n("Group Widgets Horizontally");
+ return i18n("Group WidgetsQt::Horizontally");
case Container::VBox:
- return i18n("Group Widgets Vertically");
+ return i18n("Group WidgetsQt::Vertically");
case Container::Grid:
return i18n("Group Widgets in a Grid");
case Container::HSplitter:
- return i18n("Group Widgets Horizontally in a Splitter");
+ return i18n("Group WidgetsQt::Horizontally in a Splitter");
case Container::VSplitter:
- return i18n("Group Widgets Vertically in a Splitter");
+ return i18n("Group WidgetsQt::Vertically in a Splitter");
case Container::HFlow:
return i18n("Group Widgets By Rows");
case Container::VFlow:
- return i18n("Group Widgets Vertically By Columns");
+ return i18n("Group WidgetsQt::Vertically By Columns");
default:
return i18n("Group widgets");
}
@@ -1017,11 +1017,11 @@ BreakLayoutCommand::BreakLayoutCommand(Container *container)
m_containername = container->toplevel()->widget()->name();
m_name = container->widget()->name();
m_form = container->form();
- m_type = container->layoutType();
+ m_type = container->tqlayoutType();
- for(ObjectTreeItem *tree = container->objectTree()->children()->first(); tree; tree = container->objectTree()->children()->next())
+ for(ObjectTreeItem *tree = container->objectTree()->tqchildren()->first(); tree; tree = container->objectTree()->tqchildren()->next())
{
- QRect r(container->widget()->mapTo(container->widget()->parentWidget(), tree->widget()->pos()), tree->widget()->size());
+ TQRect r(container->widget()->mapTo(container->widget()->tqparentWidget(), tree->widget()->pos()), tree->widget()->size());
m_pos.insert(tree->widget()->name(), r);
}
}
@@ -1038,10 +1038,10 @@ BreakLayoutCommand::unexecute()
CreateLayoutCommand::execute();
}
-QString
+TQString
BreakLayoutCommand::name() const
{
- return i18n("Break Layout: \"%1\"").arg(m_name);
+ return i18n("Break Layout: \"%1\"").tqarg(m_name);
}
void
@@ -1054,7 +1054,7 @@ BreakLayoutCommand::debug()
// PasteWidgetCommand
-PasteWidgetCommand::PasteWidgetCommand(QDomDocument &domDoc, Container *container, const QPoint& p)
+PasteWidgetCommand::PasteWidgetCommand(TQDomDocument &domDoc, Container *container, const TQPoint& p)
: m_point(p)
{
m_data = domDoc.toCString();
@@ -1064,30 +1064,30 @@ PasteWidgetCommand::PasteWidgetCommand(QDomDocument &domDoc, Container *containe
if(domDoc.namedItem("UI").firstChild().nextSibling().toElement().tagName() != "widget")
return;
- QRect boundingRect;
- for(QDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling()) // more than one widget
+ TQRect boundingRect;
+ for(TQDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling()) // more than one widget
{
if(n.toElement().tagName() != "widget")
continue;
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
- QDomElement rect;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQDomElement rect;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry"))
rect = n.firstChild().toElement();
}
- QDomElement x = rect.namedItem("x").toElement();
- QDomElement y = rect.namedItem("y").toElement();
- QDomElement wi = rect.namedItem("width").toElement();
- QDomElement h = rect.namedItem("height").toElement();
+ TQDomElement x = rect.namedItem("x").toElement();
+ TQDomElement y = rect.namedItem("y").toElement();
+ TQDomElement wi = rect.namedItem("width").toElement();
+ TQDomElement h = rect.namedItem("height").toElement();
int rx = x.text().toInt();
int ry = y.text().toInt();
int rw = wi.text().toInt();
int rh = h.text().toInt();
- QRect r(rx, ry, rw, rh);
+ TQRect r(rx, ry, rw, rh);
boundingRect = boundingRect.unite(r);
}
@@ -1101,10 +1101,10 @@ PasteWidgetCommand::execute()
if (!titem)
return; //better this than a crash
Container *container = titem->container();
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
- QDomDocument domDoc("UI");
+ TQDomDocument domDoc("UI");
bool parsed = domDoc.setContent(m_data, false, &errMsg, &errLine, &errCol);
if(!parsed)
@@ -1121,7 +1121,7 @@ PasteWidgetCommand::execute()
return;
if(domDoc.namedItem("UI").firstChild().nextSibling().toElement().tagName() != "widget") // only one widget, so we can paste it at cursor pos
{
- QDomElement el = domDoc.namedItem("UI").firstChild().toElement();
+ TQDomElement el = domDoc.namedItem("UI").firstChild().toElement();
fixNames(el);
if(m_point.isNull())
fixPos(el, container);
@@ -1132,11 +1132,11 @@ PasteWidgetCommand::execute()
FormIO::loadWidget(container, el);
m_form->setInteractiveMode(true);
}
- else for(QDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling()) // more than one widget
+ else for(TQDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling()) // more than one widget
{
if(n.toElement().tagName() != "widget")
continue;
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
fixNames(el);
if(!m_point.isNull())
moveWidgetBy(el, container, m_point);
@@ -1153,11 +1153,11 @@ PasteWidgetCommand::execute()
//FormIO::setCurrentForm(0);
m_names.clear();
// We store the names of all the created widgets, to delete them later
- for(QDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling())
{
if(n.toElement().tagName() != "widget")
continue;
- for(QDomNode m = n.firstChild(); !m.isNull(); n = m.nextSibling())
+ for(TQDomNode m = n.firstChild(); !m.isNull(); n = m.nextSibling())
{
if((m.toElement().tagName() == "property") && (m.toElement().attribute("name") == "name"))
{
@@ -1168,8 +1168,8 @@ PasteWidgetCommand::execute()
}
container->form()->selectFormWidget();
- QStringList::ConstIterator endIt = m_names.constEnd();
- for(QStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it) // We select all the pasted widgets
+ TQStringList::ConstIterator endIt = m_names.constEnd();
+ for(TQStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it) // We select all the pasted widgets
{
ObjectTreeItem *item = m_form->objectTree()->lookup(*it);
if(item)
@@ -1185,77 +1185,77 @@ PasteWidgetCommand::unexecute()
return; //better this than a crash
Container *container = titem->container();
// We just delete all the widgets we have created
- QStringList::ConstIterator endIt = m_names.constEnd();
- for(QStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
+ TQStringList::ConstIterator endIt = m_names.constEnd();
+ for(TQStringList::ConstIterator it = m_names.constBegin(); it != endIt; ++it)
{
ObjectTreeItem* titem = container->form()->objectTree()->lookup(*it);
if (!titem)
continue; //better this than a crash
- QWidget *w = titem->widget();
+ TQWidget *w = titem->widget();
container->deleteWidget(w);
}
}
-QString
+TQString
PasteWidgetCommand::name() const
{
return i18n("Paste");
}
void
-//QDomElement
-PasteWidgetCommand::changePos(QDomElement &el, const QPoint &newpos)
+//TQDomElement
+PasteWidgetCommand::changePos(TQDomElement &el, const TQPoint &newpos)
{
- //QDomElement el = widg.cloneNode(true).toElement();
- QDomElement rect;
- // Find the widget geometry if there is one
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ //TQDomElement el = widg.cloneNode(true).toElement();
+ TQDomElement rect;
+ // Find the widget tqgeometry if there is one
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry"))
rect = n.firstChild().toElement();
}
- QDomElement x = rect.namedItem("x").toElement();
+ TQDomElement x = rect.namedItem("x").toElement();
x.removeChild(x.firstChild());
- QDomText valueX = el.ownerDocument().createTextNode(QString::number(newpos.x()));
+ TQDomText valueX = el.ownerDocument().createTextNode(TQString::number(newpos.x()));
x.appendChild(valueX);
- QDomElement y = rect.namedItem("y").toElement();
+ TQDomElement y = rect.namedItem("y").toElement();
y.removeChild(y.firstChild());
- QDomText valueY = el.ownerDocument().createTextNode(QString::number(newpos.y()));
+ TQDomText valueY = el.ownerDocument().createTextNode(TQString::number(newpos.y()));
y.appendChild(valueY);
//return el;
}
void
-PasteWidgetCommand::fixPos(QDomElement &el, Container *container)
+PasteWidgetCommand::fixPos(TQDomElement &el, Container *container)
{
-/* QDomElement rect;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+/* TQDomElement rect;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry"))
rect = n.firstChild().toElement();
}
- QDomElement x = rect.namedItem("x").toElement();
- QDomElement y = rect.namedItem("y").toElement();
- QDomElement wi = rect.namedItem("width").toElement();
- QDomElement h = rect.namedItem("height").toElement();
+ TQDomElement x = rect.namedItem("x").toElement();
+ TQDomElement y = rect.namedItem("y").toElement();
+ TQDomElement wi = rect.namedItem("width").toElement();
+ TQDomElement h = rect.namedItem("height").toElement();
int rx = x.text().toInt();
int ry = y.text().toInt();
int rw = wi.text().toInt();
int rh = h.text().toInt();
- QRect r(rx, ry, rw, rh);
+ TQRect r(rx, ry, rw, rh);
- QWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false);
+ TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false);
if(!w)
return;
- while((w->geometry() == r) && (w != 0))// there is already a widget there, with the same size
+ while((w->tqgeometry() == r) && (w != 0))// there is already a widget there, with the same size
{
- w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false);
+ w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false);
r.moveBy(10,10);
}
@@ -1270,41 +1270,41 @@ PasteWidgetCommand::fixPos(QDomElement &el, Container *container)
else if(r.bottom() > container->widget()->height())
r.moveTop(container->widget()->height() - r.height());
- if(r != QRect(rx, ry, rw, rh))
+ if(r != TQRect(rx, ry, rw, rh))
//return el;
//else
- changePos(el, QPoint(r.x(), r.y()));
+ changePos(el, TQPoint(r.x(), r.y()));
*/
- moveWidgetBy(el, container, QPoint(0, 0));
+ moveWidgetBy(el, container, TQPoint(0, 0));
}
void
-PasteWidgetCommand::moveWidgetBy(QDomElement &el, Container *container, const QPoint &p)
+PasteWidgetCommand::moveWidgetBy(TQDomElement &el, Container *container, const TQPoint &p)
{
- QDomElement rect;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQDomElement rect;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "geometry"))
rect = n.firstChild().toElement();
}
- QDomElement x = rect.namedItem("x").toElement();
- QDomElement y = rect.namedItem("y").toElement();
- QDomElement wi = rect.namedItem("width").toElement();
- QDomElement h = rect.namedItem("height").toElement();
+ TQDomElement x = rect.namedItem("x").toElement();
+ TQDomElement y = rect.namedItem("y").toElement();
+ TQDomElement wi = rect.namedItem("width").toElement();
+ TQDomElement h = rect.namedItem("height").toElement();
int rx = x.text().toInt();
int ry = y.text().toInt();
int rw = wi.text().toInt();
int rh = h.text().toInt();
- QRect r(rx + p.x(), ry + p.y(), rw, rh);
+ TQRect r(rx + p.x(), ry + p.y(), rw, rh);
kdDebug() << "Moving widget by " << p << " from " << rx << " " << ry << " to " << r.topLeft() << endl;
- QWidget *w = m_form->widget()->childAt(r.x() + 6, r.y() + 6, false);
+ TQWidget *w = m_form->widget()->tqchildAt(r.x() + 6, r.y() + 6, false);
- while(w && (w->geometry() == r))// there is already a widget there, with the same size
+ while(w && (w->tqgeometry() == r))// there is already a widget there, with the same size
{
- w = m_form->widget()->childAt(w->x() + 16, w->y() + 16, false);
+ w = m_form->widget()->tqchildAt(w->x() + 16, w->y() + 16, false);
r.moveBy(10,10);
}
@@ -1319,17 +1319,17 @@ PasteWidgetCommand::moveWidgetBy(QDomElement &el, Container *container, const QP
else if(r.bottom() > container->widget()->height())
r.moveTop(container->widget()->height() - r.height());
- if(r != QRect(rx, ry, rw, rh))
+ if(r != TQRect(rx, ry, rw, rh))
//return el;
//else
- changePos(el, QPoint(r.x(), r.y()));
+ changePos(el, TQPoint(r.x(), r.y()));
}
void
-PasteWidgetCommand::fixNames(QDomElement &el)
+PasteWidgetCommand::fixNames(TQDomElement &el)
{
- QString wname;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQString wname;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "name"))
{
@@ -1339,15 +1339,15 @@ PasteWidgetCommand::fixNames(QDomElement &el)
bool ok;
int num = wname.right(1).toInt(&ok, 10);
if(ok)
- wname = wname.left(wname.length()-1) + QString::number(num+1);
+ wname = wname.left(wname.length()-1) + TQString::number(num+1);
else
wname += "2";
}
if(wname != n.toElement().text()) // we change the name, so we recreate the element
{
n.removeChild(n.firstChild());
- QDomElement type = el.ownerDocument().createElement("string");
- QDomText valueE = el.ownerDocument().createTextNode(wname);
+ TQDomElement type = el.ownerDocument().createElement("string");
+ TQDomText valueE = el.ownerDocument().createTextNode(wname);
type.appendChild(valueE);
n.toElement().appendChild(type);
}
@@ -1355,7 +1355,7 @@ PasteWidgetCommand::fixNames(QDomElement &el)
}
if(n.toElement().tagName() == "widget") // fix child widgets names
{
- QDomElement child = n.toElement();
+ TQDomElement child = n.toElement();
fixNames(child);
}
}
@@ -1375,17 +1375,17 @@ PasteWidgetCommand::debug()
DeleteWidgetCommand::DeleteWidgetCommand(WidgetList &list, Form *form)
: Command(), m_form(form)
{
- m_domDoc = QDomDocument("UI");
+ m_domDoc = TQDomDocument("UI");
m_domDoc.appendChild(m_domDoc.createElement("UI"));
- QDomElement parent = m_domDoc.namedItem("UI").toElement();
+ TQDomElement tqparent = m_domDoc.namedItem("UI").toElement();
- //for(QWidget *w = list.first(); w; w = list.next())
+ //for(TQWidget *w = list.first(); w; w = list.next())
/*for(WidgetListIterator it(list); it.current() != 0; ++it)
{
- QWidget *w = it.current();
+ TQWidget *w = it.current();
// Don't delete tabwidget or widgetstack pages
- if(w->parentWidget()->inherits("QWidgetStack"))
+ if(w->tqparentWidget()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
{
list.remove(w);
continue;
@@ -1399,14 +1399,14 @@ DeleteWidgetCommand::DeleteWidgetCommand(WidgetList &list, Form *form)
if (!item)
return;
- // We need to store both parentContainer and parentWidget as they may be different (eg for TabWidget page)
- m_containers.insert(item->name().latin1(), m_form->parentContainer(item->widget())->widget()->name());
- m_parents.insert(item->name().latin1(), item->parent()->name().latin1());
- FormIO::saveWidget(item, parent, m_domDoc);
+ // We need to store both tqparentContainer and tqparentWidget as they may be different (eg for TabWidget page)
+ m_containers.insert(item->name().latin1(), m_form->tqparentContainer(item->widget())->widget()->name());
+ m_parents.insert(item->name().latin1(), item->tqparent()->name().latin1());
+ FormIO::saveWidget(item, tqparent, m_domDoc);
form->connectionBuffer()->saveAllConnectionsForWidget(item->widget()->name(), m_domDoc);
}
- FormIO::cleanClipboard(parent);
+ FormIO::cleanClipboard(tqparent);
}
void
@@ -1414,19 +1414,19 @@ DeleteWidgetCommand::execute()
{
Container *containerToSelect = 0;
- QMap<QCString,QCString>::ConstIterator endIt = m_containers.constEnd();
- for(QMap<QCString,QCString>::ConstIterator it = m_containers.constBegin(); it != endIt; ++it)
+ TQMap<TQCString,TQCString>::ConstIterator endIt = m_containers.constEnd();
+ for(TQMap<TQCString,TQCString>::ConstIterator it = m_containers.constBegin(); it != endIt; ++it)
{
ObjectTreeItem *item = m_form->objectTree()->lookup(it.key());
if (!item || !item->widget())
continue;
- Container *cont = m_form->parentContainer(item->widget());
+ Container *cont = m_form->tqparentContainer(item->widget());
if (!containerToSelect)
containerToSelect = cont;
cont->deleteWidget(item->widget());
}
- //now we've nothing selecte: select parent container
+ //now we've nothing selecte: select tqparent container
if (containerToSelect)
m_form->setSelectedWidget( containerToSelect->widget() );
}
@@ -1434,16 +1434,16 @@ DeleteWidgetCommand::execute()
void
DeleteWidgetCommand::unexecute()
{
- QCString wname;
+ TQCString wname;
m_form->setInteractiveMode(false);
- for(QDomNode n = m_domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = m_domDoc.namedItem("UI").firstChild(); !n.isNull(); n = n.nextSibling())
{
if(n.toElement().tagName() == "connections") // restore the widget connections
m_form->connectionBuffer()->load(n);
if(n.toElement().tagName() != "widget")
continue;
// We need first to know the name of the widget
- for(QDomNode m = n.firstChild(); !m.isNull(); n = m.nextSibling())
+ for(TQDomNode m = n.firstChild(); !m.isNull(); n = m.nextSibling())
{
if((m.toElement().tagName() == "property") && (m.toElement().attribute("name") == "name"))
{
@@ -1456,17 +1456,17 @@ DeleteWidgetCommand::unexecute()
if (!titem)
return; //better this than a crash
Container *cont = titem->container();
- ObjectTreeItem *parent = m_form->objectTree()->lookup(m_parents[wname]);
- QDomElement widg = n.toElement();
- if(parent)
- FormIO::loadWidget(cont, widg, parent->widget());
+ ObjectTreeItem *tqparent = m_form->objectTree()->lookup(m_parents[wname]);
+ TQDomElement widg = n.toElement();
+ if(tqparent)
+ FormIO::loadWidget(cont, widg, tqparent->widget());
else
FormIO::loadWidget(cont, widg);
}
m_form->setInteractiveMode(true);
}
-QString
+TQString
DeleteWidgetCommand::name() const
{
return i18n("Delete widget");
@@ -1476,7 +1476,7 @@ void
DeleteWidgetCommand::debug()
{
kdDebug() << "DeleteWidgetCommand: containers=" << m_containers.keys()
- << " parents=" << m_parents.keys() << " form=" << m_form->widget()->name() << endl;
+ << " tqparents=" << m_parents.keys() << " form=" << m_form->widget()->name() << endl;
}
// CutWidgetCommand
@@ -1500,7 +1500,7 @@ CutWidgetCommand::unexecute()
FormManager::self()->m_domDoc.setContent(m_data);
}
-QString
+TQString
CutWidgetCommand::name() const
{
return i18n("Cut");
@@ -1510,7 +1510,7 @@ void
CutWidgetCommand::debug()
{
kdDebug() << "CutWidgetCommand: containers=" << m_containers.keys()
- << " parents=" << m_parents.keys() << " form=" << m_form->widget()->name()
+ << " tqparents=" << m_parents.keys() << " form=" << m_form->widget()->name()
<< " data=\"" << m_data.left(80) << "...\"" << endl;
}
@@ -1520,15 +1520,15 @@ namespace KFormDesigner {
class CommandGroup::SubCommands : public KMacroCommand
{
public:
- SubCommands( const QString & name )
+ SubCommands( const TQString & name )
: KMacroCommand(name)
{
}
- const QPtrList<KCommand>& commands() const { return m_commands; }
+ const TQPtrList<KCommand>& commands() const { return m_commands; }
};
}
-CommandGroup::CommandGroup( const QString & name, WidgetPropertySet *propSet )
+CommandGroup::CommandGroup( const TQString & name, WidgetPropertySet *propSet )
: Command()
, m_subCommands(new SubCommands(name))
, m_propSet(propSet)
@@ -1540,7 +1540,7 @@ CommandGroup::~CommandGroup()
delete m_subCommands;
}
-const QPtrList<KCommand>& CommandGroup::commands() const
+const TQPtrList<KCommand>& CommandGroup::commands() const
{
return m_subCommands->commands();
}
@@ -1558,7 +1558,7 @@ void CommandGroup::addCommand(KCommand *command, bool allowExecute)
void CommandGroup::execute()
{
FormManager::self()->blockPropertyEditorUpdating(this);
- for (QPtrListIterator<KCommand> it(m_subCommands->commands()); it.current(); ++it) {
+ for (TQPtrListIterator<KCommand> it(m_subCommands->commands()); it.current(); ++it) {
if (!m_commandsShouldntBeExecuted[it.current()])
it.current()->execute();
}
@@ -1572,7 +1572,7 @@ void CommandGroup::unexecute()
FormManager::self()->unblockPropertyEditorUpdating(this, m_propSet);
}
-QString CommandGroup::name() const
+TQString CommandGroup::name() const
{
return m_subCommands->name();
}
@@ -1587,7 +1587,7 @@ CommandGroup::debug()
{
kdDebug() << "*CommandGroup: name=\"" << name() << "\" #=" << m_subCommands->commands().count() << endl;
uint i = 1;
- for (QPtrListIterator<KCommand> it(m_subCommands->commands()); it.current(); ++it, i++) {
+ for (TQPtrListIterator<KCommand> it(m_subCommands->commands()); it.current(); ++it, i++) {
kdDebug() << "#" << i << ":"
<< (m_commandsShouldntBeExecuted[it.current()] ? "!" : "") << "allowExecute:" << endl;
if (dynamic_cast<Command*>(it.current()))
diff --git a/kexi/formeditor/commands.h b/kexi/formeditor/commands.h
index 619ef791e..c38f9b86a 100644
--- a/kexi/formeditor/commands.h
+++ b/kexi/formeditor/commands.h
@@ -21,21 +21,21 @@
#ifndef KFORMEDITOR_COMMANDS_H
#define KFORMEDITOR_COMMANDS_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qvariant.h>
-#include <qdom.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqvariant.h>
+#include <tqdom.h>
#include <kcommand.h>
#include "utils.h"
-class QWidget;
-class QRect;
-class QPoint;
-class QStringList;
-class QCString;
+class TQWidget;
+class TQRect;
+class TQPoint;
+class TQStringList;
+class TQCString;
namespace KFormDesigner {
@@ -54,32 +54,32 @@ class KFORMEDITOR_EXPORT Command : public KCommand
virtual void debug() = 0;
};
-/*! This command is used when changing a property for one or more widgets. \a oldvalues is a QMap
+/*! This command is used when changing a property for one or more widgets. \a oldvalues is a TQMap
of the old values of the property for every widget, to allow reverting the change. \a value is
the new value of the property. You can use the simpler constructor for a single widget.
*/
class KFORMEDITOR_EXPORT PropertyCommand : public Command
{
public:
- PropertyCommand(WidgetPropertySet *set, const QCString &wname, const QVariant &oldValue,
- const QVariant &value, const QCString &property);
- PropertyCommand(WidgetPropertySet *set, const QMap<QCString, QVariant> &oldvalues,
- const QVariant &value, const QCString &property);
+ PropertyCommand(WidgetPropertySet *set, const TQCString &wname, const TQVariant &oldValue,
+ const TQVariant &value, const TQCString &property);
+ PropertyCommand(WidgetPropertySet *set, const TQMap<TQCString, TQVariant> &oldvalues,
+ const TQVariant &value, const TQCString &property);
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
- QCString property() const { return m_property; }
+ virtual TQString name() const;
+ TQCString property() const { return m_property; }
- void setValue(const QVariant &value);
- const QMap<QCString, QVariant>& oldValues() const { return m_oldvalues; }
+ void setValue(const TQVariant &value);
+ const TQMap<TQCString, TQVariant>& oldValues() const { return m_oldvalues; }
virtual void debug();
protected:
WidgetPropertySet *m_propSet;
- QVariant m_value;
- QMap<QCString, QVariant> m_oldvalues;
- QCString m_property;
+ TQVariant m_value;
+ TQMap<TQCString, TQVariant> m_oldvalues;
+ TQCString m_property;
};
/*! This command is used when moving multiples widgets at the same time, while holding Ctrl or Shift.
@@ -88,24 +88,24 @@ class KFORMEDITOR_EXPORT PropertyCommand : public Command
class KFORMEDITOR_EXPORT GeometryPropertyCommand : public Command
{
public:
- GeometryPropertyCommand(WidgetPropertySet *set, const QStringList &names, const QPoint& oldPos);
+ GeometryPropertyCommand(WidgetPropertySet *set, const TQStringList &names, const TQPoint& oldPos);
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
- void setPos(const QPoint& pos);
+ virtual TQString name() const;
+ void setPos(const TQPoint& pos);
virtual void debug();
protected:
WidgetPropertySet *m_propSet;
- QStringList m_names;
- QPoint m_oldPos;
- QPoint m_pos;
+ TQStringList m_names;
+ TQPoint m_oldPos;
+ TQPoint m_pos;
};
/*! This command is used when an item in 'Align Widgets position' is selected. You just need
to give the list of widget names (the selected ones), and the
- type of alignment (see the enum for possible values). */
+ type of tqalignment (see the enum for possible values). */
class KFORMEDITOR_EXPORT AlignWidgetsCommand : public Command
{
public:
@@ -115,13 +115,13 @@ class KFORMEDITOR_EXPORT AlignWidgetsCommand : public Command
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
Form *m_form;
int m_type;
- QMap<QCString, QPoint> m_pos;
+ TQMap<TQCString, TQPoint> m_pos;
};
/*! This command is used when an item in 'Adjust Widgets Size' is selected. You just need
@@ -137,39 +137,39 @@ class KFORMEDITOR_EXPORT AdjustSizeCommand : public Command
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
- QSize getSizeFromChildren(ObjectTreeItem *item);
+ TQSize getSizeFromChildren(ObjectTreeItem *item);
protected:
Form *m_form;
int m_type;
- QMap<QCString, QPoint> m_pos;
- QMap<QCString, QSize> m_sizes;
+ TQMap<TQCString, TQPoint> m_pos;
+ TQMap<TQCString, TQSize> m_sizes;
};
-/*! This command is used when switching the layout of a Container. It remembers the old pos
+/*! This command is used when switching the tqlayout of a Container. It remembers the old pos
of every widget inside the Container. */
class KFORMEDITOR_EXPORT LayoutPropertyCommand : public PropertyCommand
{
public:
- LayoutPropertyCommand(WidgetPropertySet *set, const QCString &wname,
- const QVariant &oldValue, const QVariant &value);
+ LayoutPropertyCommand(WidgetPropertySet *set, const TQCString &wname,
+ const TQVariant &oldValue, const TQVariant &value);
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
Form *m_form;
- QMap<QCString,QRect> m_geometries;
+ TQMap<TQCString,TQRect> m_geometries;
};
/*! This command is used when inserting a widger using toolbar or menu. You only need to give
-the parent Container and the widget pos.
+the tqparent Container and the widget pos.
The other information is taken from FormManager. */
class KFORMEDITOR_EXPORT InsertWidgetCommand : public Command
{
@@ -183,45 +183,45 @@ class KFORMEDITOR_EXPORT InsertWidgetCommand : public Command
otherwise, \a namePrefix is used to generate widget's name.
This allows e.g. inserting a widgets having name constructed using
*/
- InsertWidgetCommand(Container *container, const QCString& className,
- const QPoint& pos, const QCString& namePrefix = QCString());
+ InsertWidgetCommand(Container *container, const TQCString& className,
+ const TQPoint& pos, const TQCString& namePrefix = TQCString());
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
//! \return inserted widget's name
- QCString widgetName() const { return m_name; }
+ TQCString widgetName() const { return m_name; }
protected:
Form *m_form;
- QString m_containername;
- QPoint m_point;
- QCString m_name;
- QCString m_class;
- QRect m_insertRect;
+ TQString m_containername;
+ TQPoint m_point;
+ TQCString m_name;
+ TQCString m_class;
+ TQRect m_insertRect;
};
-/*! This command is used when creating a layout from some widgets using "Lay out in..." menu item.
+/*! This command is used when creating a tqlayout from some widgets using "Lay out in..." menu item.
It remembers the old pos of every widget, and takes care of updating ObjectTree too. You need
to supply a WidgetList of the selected widgets. */
class KFORMEDITOR_EXPORT CreateLayoutCommand : public Command
{
public:
- CreateLayoutCommand(int layoutType, WidgetList &list, Form *form);
+ CreateLayoutCommand(int tqlayoutType, WidgetList &list, Form *form);
CreateLayoutCommand() {;} // for BreakLayoutCommand
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
Form *m_form;
- QString m_containername;
- QString m_name;
- QMap<QCString,QRect> m_pos;
+ TQString m_containername;
+ TQString m_name;
+ TQMap<TQCString,TQRect> m_pos;
int m_type;
};
@@ -234,46 +234,46 @@ class KFORMEDITOR_EXPORT BreakLayoutCommand : public CreateLayoutCommand
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
};
-/*! This command is used when pasting widgets. You need to give the QDomDocument containing
+/*! This command is used when pasting widgets. You need to give the TQDomDocument containing
the widget(s) to paste, and optionnally the point where to paste widgets. */
class KFORMEDITOR_EXPORT PasteWidgetCommand : public Command
{
public:
- PasteWidgetCommand(QDomDocument &domDoc, Container *container, const QPoint& p = QPoint());
+ PasteWidgetCommand(TQDomDocument &domDoc, Container *container, const TQPoint& p = TQPoint());
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
/*! Internal function used to change the coordinates of a widget to \a newpos
before pasting it (to paste it at the position of the contextual menu). It modifies
- the "geometry" property of the QDomElement representing the widget. */
- void changePos(QDomElement &widg, const QPoint &newpos);
+ the "geometry" property of the TQDomElement representing the widget. */
+ void changePos(TQDomElement &widg, const TQPoint &newpos);
/*! Internal function used to fix the coordinates of a widget before pasting it
(to avoid having two widgets at the same position). It moves the widget by
(10, 10) increment (several times if there are already pasted widgets at this position). */
- void fixPos(QDomElement &el, Container *container);
- void moveWidgetBy(QDomElement &el, Container *container, const QPoint &p);
+ void fixPos(TQDomElement &el, Container *container);
+ void moveWidgetBy(TQDomElement &el, Container *container, const TQPoint &p);
/*! Internal function used to fix the names of the widgets before pasting them.
It prevents from pasting a widget with
the same name as an actual widget. The child widgets are also fixed recursively.\n
- If the name of the widget ends with a number (eg "QLineEdit1"), the new name is
- just incremented by one (eg becomes "QLineEdit2"). Otherwise, a "2" is just
+ If the name of the widget ends with a number (eg "TQLineEdit1"), the new name is
+ just incremented by one (eg becomes "TQLineEdit2"). Otherwise, a "2" is just
appended at the end of the name (eg "myWidget" becomes "myWidget2"). */
- void fixNames(QDomElement &el);
+ void fixNames(TQDomElement &el);
protected:
Form *m_form;
- QCString m_data;
- QString m_containername;
- QPoint m_point;
- QStringList m_names;
+ TQCString m_data;
+ TQString m_containername;
+ TQPoint m_point;
+ TQStringList m_names;
};
/*! This command is used when deleting a widget using the "Delete" menu item.
@@ -285,14 +285,14 @@ class KFORMEDITOR_EXPORT DeleteWidgetCommand : public Command
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
- QDomDocument m_domDoc;
+ TQDomDocument m_domDoc;
Form *m_form;
- QMap<QCString, QCString> m_containers;
- QMap<QCString, QCString> m_parents;
+ TQMap<TQCString, TQCString> m_containers;
+ TQMap<TQCString, TQCString> m_parents;
};
/*! This command is used when cutting widgets. It is basically a DeleteWidgetCommand
@@ -304,11 +304,11 @@ class KFORMEDITOR_EXPORT CutWidgetCommand : public DeleteWidgetCommand
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void debug();
protected:
- QCString m_data;
+ TQCString m_data;
};
/*! A Command Group is a command that holds several subcommands.
@@ -321,7 +321,7 @@ class KFORMEDITOR_EXPORT CutWidgetCommand : public DeleteWidgetCommand
class KFORMEDITOR_EXPORT CommandGroup : public Command
{
public:
- CommandGroup( const QString & name, WidgetPropertySet *propSet );
+ CommandGroup( const TQString & name, WidgetPropertySet *propSet );
virtual ~CommandGroup();
/*! Like KmacroCommand::addCommand(KCommand*)
@@ -352,12 +352,12 @@ class KFORMEDITOR_EXPORT CommandGroup : public Command
(in reversed order). */
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
/*! \return a list of all subcommands of this group.
Note that if a given subcommand is a group itself,
it will not be expanded to subcommands on this list. */
- const QPtrList<KCommand>& commands() const;
+ const TQPtrList<KCommand>& commands() const;
/*! Resets all 'allowExecute' flags that was set in addCommand().
Call this after calling CommandGroup::execute() to ensure that
@@ -371,7 +371,7 @@ class KFORMEDITOR_EXPORT CommandGroup : public Command
SubCommands *m_subCommands;
//! Used to store pointers to subcommands that shouldn't be executed
//! on CommandGroup::execute()
- QPtrDict<char> m_commandsShouldntBeExecuted;
+ TQPtrDict<char> m_commandsShouldntBeExecuted;
WidgetPropertySet *m_propSet;
};
diff --git a/kexi/formeditor/connectiondialog.cpp b/kexi/formeditor/connectiondialog.cpp
index a40348e7a..03302d3aa 100644
--- a/kexi/formeditor/connectiondialog.cpp
+++ b/kexi/formeditor/connectiondialog.cpp
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qregexp.h>
-#include <qmetaobject.h>
-#include <qstrlist.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqregexp.h>
+#include <tqmetaobject.h>
+#include <tqstrlist.h>
#include <kpushbutton.h>
#include <kiconloader.h>
@@ -45,25 +45,25 @@ namespace KFormDesigner {
/////////////////////////////////////////////////////////////////////////////////
///////////// The dialog to edit or add/remove connections //////////////////////
/////////////////////////////////////////////////////////////////////////////////
-ConnectionDialog::ConnectionDialog(QWidget *parent)
-: KDialogBase(parent, "connections_dialog", true, i18n("Edit Form Connections"),
+ConnectionDialog::ConnectionDialog(TQWidget *tqparent)
+: KDialogBase(tqparent, "connections_dialog", true, i18n("Edit Form Connections"),
Ok|Cancel|Details, Ok, false)
, m_buffer(0)
{
- QFrame *frame = makeMainWidget();
- QHBoxLayout *layout = new QHBoxLayout(frame, 0, 6);
+ TQFrame *frame = makeMainWidget();
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(frame, 0, 6);
// Setup the details widget /////////
- QHBox *details = new QHBox(frame);
+ TQHBox *details = new TQHBox(frame);
setDetailsWidget(details);
setDetails(true);
- m_pixmapLabel = new QLabel(details);
+ m_pixmapLabel = new TQLabel(details);
m_pixmapLabel->setFixedWidth( int(IconSize(KIcon::Desktop) * 1.5) );
- m_pixmapLabel->setAlignment(AlignHCenter | AlignTop);
+ m_pixmapLabel->tqsetAlignment(AlignHCenter | AlignTop);
- m_textLabel = new QLabel(details);
- m_textLabel->setAlignment(AlignLeft | AlignTop);
+ m_textLabel = new TQLabel(details);
+ m_textLabel->tqsetAlignment(AlignLeft | AlignTop);
//setStatusOk();
// And the KexiTableView ////////
@@ -74,27 +74,27 @@ ConnectionDialog::ConnectionDialog(QWidget *parent)
initTable();
m_table->setData(m_data, false);
m_table->adjustColumnWidthToContents(0);
- layout->addWidget(m_table);
+ tqlayout->addWidget(m_table);
//// Setup the icon toolbar /////////////////
- QVBoxLayout *vlayout = new QVBoxLayout(layout, 3);
+ TQVBoxLayout *vtqlayout = new TQVBoxLayout(tqlayout, 3);
KPushButton *newItem = new KPushButton(SmallIconSet("filenew"), i18n("&New Connection"), frame);
- vlayout->addWidget(newItem);
+ vtqlayout->addWidget(newItem);
m_buttons.insert(BAdd, newItem);
- connect(newItem, SIGNAL(clicked()), this, SLOT(newItem()));
+ connect(newItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(newItem()));
KPushButton *delItem = new KPushButton(SmallIconSet("editdelete"), i18n("&Remove Connection"), frame);
- vlayout->addWidget(delItem);
+ vtqlayout->addWidget(delItem);
m_buttons.insert(BRemove, delItem);
- connect(delItem, SIGNAL(clicked()), this, SLOT(removeItem()));
+ connect(delItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeItem()));
- vlayout->addStretch();
+ vtqlayout->addStretch();
- setInitialSize(QSize(600, 300));
+ setInitialSize(TQSize(600, 300));
//setWFlags(WDestructiveClose);
- connect(m_table,SIGNAL(cellSelected(int, int)), this, SLOT(slotCellSelected(int, int)));
- connect(m_table->data(), SIGNAL(rowInserted(KexiTableItem*,bool)), this, SLOT(slotRowInserted(KexiTableItem*,bool)));
+ connect(m_table,TQT_SIGNAL(cellSelected(int, int)), this, TQT_SLOT(slotCellSelected(int, int)));
+ connect(m_table->KexiDataAwareObjectInterface::data(), TQT_SIGNAL(rowInserted(KexiTableItem*,bool)), this, TQT_SLOT(slotRowInserted(KexiTableItem*,bool)));
this->newItem();
}
@@ -126,15 +126,15 @@ ConnectionDialog::initTable()
col4->setRelatedData( m_slotsColumnData );
m_data->addColumn(col4);
- QValueList<int> c;
+ TQValueList<int> c;
c << 2 << 4;
m_table->maximizeColumnsWidth(c);
m_table->setColumnStretchEnabled( true, 4 );
- connect(m_data, SIGNAL(aboutToChangeCell(KexiTableItem*, int, QVariant&, KexiDB::ResultInfo*)),
- this,SLOT(slotCellChanged(KexiTableItem*, int, QVariant, KexiDB::ResultInfo*)));
- connect(m_data, SIGNAL(rowUpdated(KexiTableItem*)), this, SLOT(checkConnection(KexiTableItem *)));
- connect(m_table, SIGNAL(itemSelected(KexiTableItem *)), this, SLOT(checkConnection(KexiTableItem *)));
+ connect(m_data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*)),
+ this,TQT_SLOT(slotCellChanged(KexiTableItem*, int, TQVariant, KexiDB::ResultInfo*)));
+ connect(m_data, TQT_SIGNAL(rowUpdated(KexiTableItem*)), this, TQT_SLOT(checkConnection(KexiTableItem *)));
+ connect(m_table, TQT_SIGNAL(itemSelected(KexiTableItem *)), this, TQT_SLOT(checkConnection(KexiTableItem *)));
}
void
@@ -183,7 +183,7 @@ ConnectionDialog::slotOk()
delete m_form->connectionBuffer();
m_form->setConnectionBuffer(m_buffer);
- QDialog::accept();
+ TQDialog::accept();
}
void
@@ -204,7 +204,7 @@ ConnectionDialog::updateTableData()
// Then we fill the columns with the form connections
for(Connection *c = m_form->connectionBuffer()->first(); c ; c = m_form->connectionBuffer()->next())
{
- KexiTableItem *item = m_table->data()->createItem(); //new KexiTableItem(5);
+ KexiTableItem *item = m_table->KexiDataAwareObjectInterface::data()->createItem(); //new KexiTableItem(5);
(*item)[1] = c->sender();
(*item)[2] = c->signal();
(*item)[3] = c->receiver();
@@ -229,13 +229,13 @@ ConnectionDialog::setStatusOk(KexiTableItem *item)
if (item)
(*item)[0] = "button_ok";
else {
- m_pixmapLabel->setPixmap( QPixmap() );
- m_textLabel->setText(QString::null);
+ m_pixmapLabel->setPixmap( TQPixmap() );
+ m_textLabel->setText(TQString());
}
}
void
-ConnectionDialog::setStatusError(const QString &msg, KexiTableItem *item)
+ConnectionDialog::setStatusError(const TQString &msg, KexiTableItem *item)
{
m_pixmapLabel->setPixmap( DesktopIcon("button_cancel") );
m_textLabel->setText("<qt><h2>The connection is invalid.</h2></qt>" + msg);
@@ -248,24 +248,24 @@ ConnectionDialog::setStatusError(const QString &msg, KexiTableItem *item)
if (item)
(*item)[0] = "button_cancel";
else {
- m_pixmapLabel->setPixmap( QPixmap() );
- m_textLabel->setText(QString::null);
+ m_pixmapLabel->setPixmap( TQPixmap() );
+ m_textLabel->setText(TQString());
}
}
void
-ConnectionDialog::slotCellChanged(KexiTableItem *item, int col, QVariant&, KexiDB::ResultInfo*)
+ConnectionDialog::slotCellChanged(KexiTableItem *item, int col, TQVariant&, KexiDB::ResultInfo*)
{
switch(col)
{
// sender changed, we clear siganl and slot
case 1:
- (*item)[2] = QString("");
+ (*item)[2] = TQString("");
// signal or receiver changed, we clear the slot cell
case 2:
case 3:
{
- (*item)[4] = QString("");
+ (*item)[4] = TQString("");
break;
}
default:
@@ -277,8 +277,8 @@ void
ConnectionDialog::updateSlotList(KexiTableItem *item)
{
m_slotsColumnData->deleteAllRows();
- QString widget = (*item)[1].toString();
- QString signal = (*item)[2].toString();
+ TQString widget = (*item)[1].toString();
+ TQString signal = (*item)[2].toString();
if((widget.isEmpty()) || signal.isEmpty())
return;
@@ -286,22 +286,22 @@ ConnectionDialog::updateSlotList(KexiTableItem *item)
if(!tree || !tree->widget())
return;
- QString signalArg(signal);
- signalArg = signalArg.remove( QRegExp(".*[(]|[)]") );
+ TQString signalArg(signal);
+ signalArg = signalArg.remove( TQRegExp(".*[(]|[)]") );
- QStrList slotList = tree->widget()->metaObject()->slotNames(true);
- QStrListIterator it(slotList);
+ TQStrList slotList = tree->widget()->tqmetaObject()->slotNames(true);
+ TQStrListIterator it(slotList);
for(; it.current() != 0; ++it)
{
// we add the slot only if it is compatible with the signal
- QString slotArg(*it);
- slotArg = slotArg.remove( QRegExp(".*[(]|[)]") );
+ TQString slotArg(*it);
+ slotArg = slotArg.remove( TQRegExp(".*[(]|[)]") );
- if(!signalArg.startsWith(slotArg, true) && (!signal.isEmpty())) // args not compatible
+ if(!signalArg.tqstartsWith(slotArg, true) && (!signal.isEmpty())) // args not compatible
continue;
KexiTableItem *item = m_slotsColumnData->createItem(); //new KexiTableItem(2);
- (*item)[0] = QString(*it);
+ (*item)[0] = TQString(*it);
(*item)[1] = (*item)[0];
m_slotsColumnData->append(item);
}
@@ -315,12 +315,12 @@ ConnectionDialog::updateSignalList(KexiTableItem *item)
return;
m_signalsColumnData->deleteAllRows();
- QStrList signalList = tree->widget()->metaObject()->signalNames(true);
- QStrListIterator it(signalList);
+ TQStrList signalList = tree->widget()->tqmetaObject()->signalNames(true);
+ TQStrListIterator it(signalList);
for(; it.current() != 0; ++it)
{
KexiTableItem *item = m_signalsColumnData->createItem(); //new KexiTableItem(2);
- (*item)[0] = QString(*it);
+ (*item)[0] = TQString(*it);
(*item)[1] = (*item)[0];
m_signalsColumnData->append(item);
}
@@ -334,19 +334,19 @@ ConnectionDialog::checkConnection(KexiTableItem *item)
{
if( !item || (*item)[i].toString().isEmpty())
{
- setStatusError( i18n("<qt>You have not selected item: <b>%1</b>.</qt>").arg(m_data->column(i)->captionAliasOrName()),
+ setStatusError( i18n("<qt>You have not selected item: <b>%1</b>.</qt>").tqarg(m_data->column(i)->captionAliasOrName()),
item);
return;
}
}
// Then we check if signal/slot args are compatible
- QString signal = (*item)[2].toString();
- signal = signal.remove( QRegExp(".*[(]|[)]") ); // just keep the args list
- QString slot = (*item)[4].toString();
- slot = slot.remove( QRegExp(".*[(]|[)]") );
+ TQString signal = (*item)[2].toString();
+ signal = signal.remove( TQRegExp(".*[(]|[)]") ); // just keep the args list
+ TQString slot = (*item)[4].toString();
+ slot = slot.remove( TQRegExp(".*[(]|[)]") );
- if(!signal.startsWith(slot, true))
+ if(!signal.tqstartsWith(slot, true))
{
setStatusError( i18n("The signal/slot arguments are not compatible."), item);
return;
@@ -366,8 +366,8 @@ void
ConnectionDialog::newItemByDragnDrop()
{
KFormDesigner::FormManager::self()->startCreatingConnection();
- connect(KFormDesigner::FormManager::self(), SIGNAL(connectionAborted(KFormDesigner::Form*)), this, SLOT(slotConnectionAborted(KFormDesigner::Form*)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(connectionCreated(KFormDesigner::Form*, Connection&)), this, SLOT(slotConnectionCreated(KFormDesigner::Form*, Connection&)) );
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(connectionAborted(KFormDesigner::Form*)), this, TQT_SLOT(slotConnectionAborted(KFormDesigner::Form*)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(connectionCreated(KFormDesigner::Form*, Connection&)), this, TQT_SLOT(slotConnectionCreated(KFormDesigner::Form*, Connection&)) );
hide();
}
@@ -380,7 +380,7 @@ ConnectionDialog::slotConnectionCreated(KFormDesigner::Form *form, Connection &c
return;
Connection *c = new Connection(connection);
- KexiTableItem *item = m_table->data()->createItem(); //new KexiTableItem(5);
+ KexiTableItem *item = m_table->KexiDataAwareObjectInterface::data()->createItem(); //new KexiTableItem(5);
(*item)[1] = c->sender();
(*item)[2] = c->signal();
(*item)[3] = c->receiver();
@@ -405,8 +405,8 @@ ConnectionDialog::removeItem()
if(m_table->currentRow() == -1 || m_table->currentRow()>=m_table->rows())
return;
- int confirm = KMessageBox::warningContinueCancel(parentWidget(),
- QString("<qt>")+i18n("Do you want to delete this connection ?")+"</qt>", QString::null, KGuiItem(i18n("&Delete Connection")),
+ int confirm = KMessageBox::warningContinueCancel(tqparentWidget(),
+ TQString("<qt>")+i18n("Do you want to delete this connection ?")+"</qt>", TQString(), KGuiItem(i18n("&Delete Connection")),
"dontAskBeforeDeleteConnection"/*config entry*/);
if(confirm == KMessageBox::Cancel)
return;
diff --git a/kexi/formeditor/connectiondialog.h b/kexi/formeditor/connectiondialog.h
index 3e6ac07b0..4f1a9a288 100644
--- a/kexi/formeditor/connectiondialog.h
+++ b/kexi/formeditor/connectiondialog.h
@@ -21,15 +21,15 @@
#ifndef FORMCONNECTIONDIALOG_H
#define FORMCONNECTIONDIALOG_H
-#include <qintdict.h>
+#include <tqintdict.h>
#include <kdialogbase.h>
namespace KexiDB {
class ResultInfo;
}
-class QLabel;
-class QButton;
+class TQLabel;
+class TQButton;
class KexiTableView;
class KexiTableViewData;
class KexiTableItem;
@@ -46,9 +46,10 @@ class Connection;
class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConnectionDialog(QWidget *parent);
+ ConnectionDialog(TQWidget *tqparent);
~ConnectionDialog() {;}
/*! Displays as modal dialog, to edit connections in Form::connectionBuffer(). */
@@ -59,7 +60,7 @@ class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase
void setStatusOk(KexiTableItem *item = 0);
/*! Used when connection is wrong. Displays a message in details widget and changes icon in 'OK?' column. \a msg is
the message explaining what's wrong. */
- void setStatusError(const QString &msg, KexiTableItem *item = 0);
+ void setStatusError(const TQString &msg, KexiTableItem *item = 0);
//! Inits table data, columns, etc.
void initTable();
/*! Updates the widget list (shown in receiver and sender columns). Then fill in the table with the connections in m_buffer. */
@@ -71,7 +72,7 @@ class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase
protected slots:
/*! Slot called when the user modifies a cell. Signal and/or slot cells are cleared if necessary (not valid anymore). */
- void slotCellChanged(KexiTableItem*, int, QVariant&, KexiDB::ResultInfo*);
+ void slotCellChanged(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*);
/*! This function checks if the connection represented by KexiTableItem \a item is valid. It checks if all args (sender, receiver, signal and slot)
are given, and then if signal/slot args are compatible (should be always true, as we don't show non-compatible slots). It calls \ref setStatusOk()
or \ref setStatusError() following the result of checks. */
@@ -105,8 +106,8 @@ class KFORMEDITOR_EXPORT ConnectionDialog : public KDialogBase
KexiTableView *m_table;
KexiTableViewData *m_data;
KexiTableViewData *m_widgetsColumnData, *m_slotsColumnData, *m_signalsColumnData;
- QLabel *m_pixmapLabel, *m_textLabel;
- QIntDict<QButton> m_buttons; //! dict of button (for disabling them)
+ TQLabel *m_pixmapLabel, *m_textLabel;
+ TQIntDict<TQButton> m_buttons; //! dict of button (for disabling them)
};
}
diff --git a/kexi/formeditor/container.cpp b/kexi/formeditor/container.cpp
index 75a6dea6c..a68e34d2e 100644
--- a/kexi/formeditor/container.cpp
+++ b/kexi/formeditor/container.cpp
@@ -18,13 +18,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qevent.h>
-#include <qvaluevector.h>
-#include <qlayout.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqevent.h>
+#include <tqvaluevector.h>
+#include <tqlayout.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,36 +44,36 @@
using namespace KFormDesigner;
-EventEater::EventEater(QWidget *widget, QObject *container)
- : QObject(container)
+EventEater::EventEater(TQWidget *widget, TQObject *container)
+ : TQObject(container)
{
m_widget = widget;
m_container = container;
- installRecursiveEventFilter(m_widget, this);
+ installRecursiveEventFilter(TQT_TQOBJECT(m_widget), this);
}
bool
-EventEater::eventFilter(QObject *, QEvent *ev)
+EventEater::eventFilter(TQObject *, TQEvent *ev)
{
if(!m_container)
return false;
// When the user click the empty part of tab bar, only MouseReleaseEvent is sent,
// we need to simulate the Press event
- if(ev->type() == QEvent::MouseButtonRelease && m_widget->inherits("QTabWidget"))
+ if(ev->type() == TQEvent::MouseButtonRelease && m_widget->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
{
- QMouseEvent *mev = static_cast<QMouseEvent*>(ev);
- if(mev->button() == LeftButton)
+ TQMouseEvent *mev = TQT_TQMOUSEEVENT(ev);
+ if(mev->button() == Qt::LeftButton)
{
- QMouseEvent *myev = new QMouseEvent(QEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state());
+ TQMouseEvent *myev = new TQMouseEvent(TQEvent::MouseButtonPress, mev->pos(), mev->button(), mev->state());
m_container->eventFilter(m_widget, myev);
delete myev;
//return true;
}
}
-// else if(ev->type() == QEvent::ChildInserted) {
- // widget's children have changed, we need to reinstall filter
+// else if(ev->type() == TQEvent::ChildInserted) {
+ // widget's tqchildren have changed, we need to reinstall filter
// installRecursiveEventFilter(m_widget, this);
// }
@@ -83,16 +83,16 @@ EventEater::eventFilter(QObject *, QEvent *ev)
EventEater::~EventEater()
{
if(m_widget)
- removeRecursiveEventFilter(m_widget, this);
+ removeRecursiveEventFilter(TQT_TQOBJECT(m_widget), TQT_TQOBJECT(this));
}
// Container itself
-Container::Container(Container *toplevel, QWidget *container, QObject *parent, const char *name)
-: QObject(parent, name)
+Container::Container(Container *toplevel, TQWidget *container, TQObject *tqparent, const char *name)
+: TQObject(tqparent, name)
, m_insertBegin(-1,-1)
, m_mousePressEventReceived(false)
-, m_mouseReleaseEvent(QEvent::None, QPoint(), 0, 0)
+, m_mouseReleaseEvent(TQEvent::None, TQPoint(), 0, 0)
{
m_container = container;
m_toplevel = toplevel;
@@ -104,7 +104,7 @@ Container::Container(Container *toplevel, QWidget *container, QObject *parent, c
m_layType = NoLayout;
m_state = DoingNothing;
- QCString classname = container->className();
+ TQCString classname = container->className();
if((classname == "HBox") || (classname == "Grid") || (classname == "VBox") ||
(classname == "HFlow") || (classname == "VFlow"))
m_margin = 4; // those containers don't have frames, so little margin
@@ -118,19 +118,19 @@ Container::Container(Container *toplevel, QWidget *container, QObject *parent, c
widget()->name(), widget(), this, this);
setObjectTree(it);
- if(parent->isWidgetType())
+ if(tqparent->isWidgetType())
{
- QString n = parent->name();
- ObjectTreeItem *parent = m_form->objectTree()->lookup(n);
- m_form->objectTree()->addItem(parent, it);
+ TQString n = tqparent->name();
+ ObjectTreeItem *tqparent = m_form->objectTree()->lookup(n);
+ m_form->objectTree()->addItem(tqparent, it);
}
else
m_form->objectTree()->addItem(toplevel->objectTree(), it);
- connect(toplevel, SIGNAL(destroyed()), this, SLOT(widgetDeleted()));
+ connect(toplevel, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDeleted()));
}
- connect(container, SIGNAL(destroyed()), this, SLOT(widgetDeleted()));
+ connect(container, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDeleted()));
}
Container::~Container()
@@ -147,23 +147,23 @@ Container::setForm(Form *form)
}
bool
-Container::eventFilter(QObject *s, QEvent *e)
+Container::eventFilter(TQObject *s, TQEvent *e)
{
// kdDebug() << e->type() << endl;
switch(e->type())
{
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- m_insertBegin = QPoint(-1, -1);
+ m_insertBegin = TQPoint(-1, -1);
m_mousePressEventReceived = true;
- kdDebug() << "QEvent::MouseButtonPress sender object = " << s->name()
+ kdDebug() << "TQEvent::MouseButtonPress sender object = " << s->name()
<< "of type " << s->className() << endl;
- kdDebug() << "QEvent::MouseButtonPress this = " << name() << endl;
+ kdDebug() << "TQEvent::MouseButtonPress this = " << name() << endl;
- m_moving = static_cast<QWidget*>(s);
- QMouseEvent *mev = static_cast<QMouseEvent*>(e);
- m_grab = QPoint(mev->x(), mev->y());
+ m_moving = TQT_TQWIDGET(s);
+ TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
+ m_grab = TQPoint(mev->x(), mev->y());
// we are drawing a connection
if(FormManager::self()->isCreatingConnection()) {
@@ -174,35 +174,35 @@ Container::eventFilter(QObject *s, QEvent *e)
if(((mev->state() == ControlButton) || (mev->state() == ShiftButton))
&& (!FormManager::self()->isInserting())) // multiple selection mode
{
- if(m_form->selectedWidgets()->findRef(m_moving) != -1) // widget is already selected
+ if(m_form->selectedWidgets()->tqfindRef(m_moving) != -1) // widget is already selected
{
if(m_form->selectedWidgets()->count() > 1) // we remove it from selection
unSelectWidget(m_moving);
else // the widget is the only selected, so it means we want to copy it
{
- //m_copyRect = m_moving->geometry();
+ //m_copyRect = m_moving->tqgeometry();
m_state = CopyingWidget;
if(m_form->formWidget())
m_form->formWidget()->initBuffer();
}
}
else // the widget is not yet selected, we add it
- setSelectedWidget(m_moving, true, (mev->button() == RightButton));
+ setSelectedWidget(m_moving, true, (mev->button() == Qt::RightButton));
}
else if((m_form->selectedWidgets()->count() > 1))//&& (!m_form->manager()->isInserting())) // more than one widget selected
{
- if(m_form->selectedWidgets()->findRef(m_moving) == -1) // widget is not selected, it becomes the only selected widget
- setSelectedWidget(m_moving, false, (mev->button() == RightButton));
+ if(m_form->selectedWidgets()->tqfindRef(m_moving) == -1) // widget is not selected, it becomes the only selected widget
+ setSelectedWidget(m_moving, false, (mev->button() == Qt::RightButton));
// If the widget is already selected, we do nothing (to ease widget moving, etc.)
}
else// if(!m_form->manager()->isInserting())
- setSelectedWidget(m_moving, false, (mev->button() == RightButton));
+ setSelectedWidget(m_moving, false, (mev->button() == Qt::RightButton));
// we are inserting a widget or drawing a selection rect in the form
if((/*s == m_container &&*/ FormManager::self()->isInserting()) || ((s == m_container) && !m_toplevel))
{
int tmpx,tmpy;
- if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (LeftButton|ControlButton|AltButton)))
+ if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (Qt::LeftButton|ControlButton|AltButton)))
{
tmpx = mev->x();
tmpy = mev->y();
@@ -217,7 +217,7 @@ Container::eventFilter(QObject *s, QEvent *e)
tmpy *= gridX;
}
- m_insertBegin = (static_cast<QWidget*>(s))->mapTo(m_container, QPoint(tmpx, tmpy));
+ m_insertBegin = (TQT_TQWIDGET(s))->mapTo(m_container, TQPoint(tmpx, tmpy));
if(m_form->formWidget())
m_form->formWidget()->initBuffer();
@@ -225,7 +225,7 @@ Container::eventFilter(QObject *s, QEvent *e)
m_state = DrawingSelectionRect;
}
else {
- if(s->inherits("QTabWidget")) // to allow changing page by clicking tab
+ if(s->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // to allow changing page by clicking tab
return false;
}
@@ -237,9 +237,9 @@ Container::eventFilter(QObject *s, QEvent *e)
return true;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
- QMouseEvent *mev = static_cast<QMouseEvent*>(e);
+ TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
if (!m_mousePressEventReceived) {
m_mouseReleaseEvent = *mev;
m_objectForMouseReleaseEvent = s;
@@ -250,11 +250,11 @@ Container::eventFilter(QObject *s, QEvent *e)
return handleMouseReleaseEvent(s, mev);
}
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- QMouseEvent *mev = static_cast<QMouseEvent*>(e);
- if(m_insertBegin!=QPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == LeftButton) || (mev->state() == (LeftButton|ControlButton)) ||
- (mev->state() == (LeftButton|ControlButton|AltButton)) || (mev->state() == (LeftButton|ShiftButton)) ) )
+ TQMouseEvent *mev = TQT_TQMOUSEEVENT(e);
+ if(m_insertBegin!=TQPoint(-1,-1) && FormManager::self()->isInserting() && ((mev->state() == Qt::LeftButton) || (mev->state() == (Qt::LeftButton|ControlButton)) ||
+ (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) || (mev->state() == (Qt::LeftButton|ShiftButton)) ) )
// draw the insert rect
{
drawInsertRect(mev, s);
@@ -267,18 +267,18 @@ Container::eventFilter(QObject *s, QEvent *e)
if(!tree || !tree->widget())
return true;
- if(m_form->formWidget() && (tree->widget() != s))
- m_form->formWidget()->highlightWidgets(tree->widget(), static_cast<QWidget*>(s));
+ if(m_form->formWidget() && (TQT_BASE_OBJECT(tree->widget()) != TQT_BASE_OBJECT(s)))
+ m_form->formWidget()->highlightWidgets(tree->widget(), TQT_TQWIDGET(s));
}
- else if(m_insertBegin!=QPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect
+ else if(m_insertBegin!=TQPoint(-1,-1) && s == m_container && !m_toplevel && (mev->state() != ControlButton) && !FormManager::self()->isCreatingConnection()) // draw the selection rect
{
- if((mev->state() != LeftButton) || /*m_inlineEditing*/ m_state == InlineEditing)
+ if((mev->state() != Qt::LeftButton) || /*m_inlineEditing*/ m_state == InlineEditing)
return true;
int topx = (m_insertBegin.x() < mev->x()) ? m_insertBegin.x() : mev->x();
int topy = (m_insertBegin.y() < mev->y()) ? m_insertBegin.y() : mev->y();
int botx = (m_insertBegin.x() > mev->x()) ? m_insertBegin.x() : mev->x();
int boty = (m_insertBegin.y() > mev->y()) ? m_insertBegin.y() : mev->y();
- QRect r = QRect(QPoint(topx, topy), QPoint(botx, boty));
+ TQRect r = TQRect(TQPoint(topx, topy), TQPoint(botx, boty));
m_insertRect = r;
if(m_form->formWidget())
@@ -287,19 +287,19 @@ Container::eventFilter(QObject *s, QEvent *e)
m_state = DoingNothing;
return true;
}
- else if(mev->state() == (LeftButton|ControlButton)) // draw the insert rect for the copied widget
+ else if(mev->state() == (Qt::LeftButton|ControlButton)) // draw the insert rect for the copied widget
{
if(s == m_container)// || (m_form->selectedWidgets()->count() > 1))
return true;
drawCopiedWidgetRect(mev);
return true;
}
- else if( ( (mev->state() == Qt::LeftButton) || (mev->state() == (LeftButton|ControlButton|AltButton)) )
+ else if( ( (mev->state() == Qt::LeftButton) || (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) )
&& !FormManager::self()->isInserting() && (m_state != CopyingWidget)) // we are dragging the widget(s) to move it
{
if(!m_toplevel && m_moving == m_container) // no effect for form
return false;
- if((!m_moving) || (!m_moving->parentWidget()))// || (m_moving->parentWidget()->inherits("QWidgetStack")))
+ if((!m_moving) || (!m_moving->tqparentWidget()))// || (m_moving->tqparentWidget()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING)))
return true;
moveSelectedWidgetsBy(mev->x() - m_grab.x(), mev->y() - m_grab.y());
@@ -309,15 +309,15 @@ Container::eventFilter(QObject *s, QEvent *e)
return true; // eat
}
- case QEvent::Paint: // Draw the dotted background
+ case TQEvent::Paint: // Draw the dotted background
{
if(s != m_container)
return false;
int gridX = m_form->gridSize();
int gridY = m_form->gridSize();
- QPainter p(m_container);
- p.setPen(QPen(white, 2));
+ TQPainter p(m_container);
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
int cols = m_container->width() / gridX;
int rows = m_container->height() / gridY;
@@ -333,27 +333,27 @@ Container::eventFilter(QObject *s, QEvent *e)
return false;
}
- case QEvent::Resize: // we are resizing a widget, so we set m_move to true -> the layout will be reloaded when releasing mouse
+ case TQEvent::Resize: // we are resizing a widget, so we set m_move to true -> the tqlayout will be reloaded when releasing mouse
{
if(m_form->interactiveMode())
m_state = MovingWidget;
break;
}
- //case QEvent::AccelOverride:
- case QEvent::KeyPress:
+ //case TQEvent::AccelOverride:
+ case TQEvent::KeyPress:
{
- QKeyEvent *kev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent *kev = TQT_TQKEYEVENT(e);
if(kev->key() == Key_F2) // pressing F2 == double-clicking
{
m_state = InlineEditing;
- QWidget *w;
+ TQWidget *w;
// try to find the widget which was clicked last and should be edited
if(m_form->selectedWidgets()->count() == 1)
w = m_form->selectedWidgets()->first();
- else if(m_form->selectedWidgets()->findRef(m_moving) != -1)
+ else if(m_form->selectedWidgets()->tqfindRef(m_moving) != -1)
w = m_moving;
else
w = m_form->selectedWidgets()->last();
@@ -372,14 +372,14 @@ Container::eventFilter(QObject *s, QEvent *e)
if(!m_moving)
return true;
// we simulate a mouse move event to update screen
- QMouseEvent *mev = new QMouseEvent(QEvent::MouseMove, m_moving->mapFromGlobal(QCursor::pos()), NoButton,
- LeftButton|ControlButton );
- eventFilter(m_moving, mev);
+ TQMouseEvent *mev = new TQMouseEvent(TQEvent::MouseMove, m_moving->mapFromGlobal(TQCursor::pos()), Qt::NoButton,
+ Qt::LeftButton|ControlButton );
+ eventFilter(TQT_TQOBJECT(m_moving), TQT_TQEVENT(mev));
delete mev;
}
else if(kev->key() == FormManager::self()->contextMenuKey())
{
- FormManager::self()->createContextMenu(static_cast<QWidget*>(s), this, false);
+ FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this, false);
return true;
}
else if (kev->key() == Key_Delete)
@@ -406,12 +406,12 @@ Container::eventFilter(QObject *s, QEvent *e)
}
else if((kev->key() == Key_Tab) || (kev->key() == Key_BackTab)){
ObjectTreeItem *item = form()->objectTree()->lookup(form()->selectedWidgets()->first()->name());
- if(!item || !item->parent())
+ if(!item || !item->tqparent())
return true;
- ObjectTreeList *list = item->parent()->children();
+ ObjectTreeList *list = item->tqparent()->tqchildren();
if(list->count() == 1)
return true;
- int index = list->findRef(item);
+ int index = list->tqfindRef(item);
if(kev->key() == Key_BackTab){
if(index == 0) // go back to the last item
@@ -433,22 +433,22 @@ Container::eventFilter(QObject *s, QEvent *e)
return true;
}
- case QEvent::KeyRelease:
+ case TQEvent::KeyRelease:
{
- QKeyEvent *kev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent *kev = TQT_TQKEYEVENT(e);
if((kev->key() == Key_Control) && (m_state == CopyingWidget)) {
// cancel copying
- //m_copyRect = QRect();
+ //m_copyRect = TQRect();
if(m_form->formWidget())
m_form->formWidget()->clearForm();
}
return true;
}
- case QEvent::MouseButtonDblClick: // editing
+ case TQEvent::MouseButtonDblClick: // editing
{
kdDebug() << "Container: Mouse dbl click for widget " << s->name() << endl;
- QWidget *w = static_cast<QWidget*>(s);
+ TQWidget *w = TQT_TQWIDGET(s);
if(!w)
return false;
@@ -458,14 +458,14 @@ Container::eventFilter(QObject *s, QEvent *e)
return true;
}
- case QEvent::ContextMenu:
- case QEvent::Enter:
- case QEvent::Leave:
- case QEvent::FocusIn:
- case QEvent::FocusOut:
-// case QEvent::DragEnter:
-// case QEvent::DragMove:
-// case QEvent::DragLeave:
+ case TQEvent::ContextMenu:
+ case TQEvent::Enter:
+ case TQEvent::Leave:
+ case TQEvent::FocusIn:
+ case TQEvent::FocusOut:
+// case TQEvent::DragEnter:
+// case TQEvent::DragMove:
+// case TQEvent::DragLeave:
return true; // eat them
default:
@@ -475,7 +475,7 @@ Container::eventFilter(QObject *s, QEvent *e)
}
bool
-Container::handleMouseReleaseEvent(QObject *s, QMouseEvent *mev)
+Container::handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev)
{
if(FormManager::self()->isInserting()) // we insert the widget at cursor pos
{
@@ -483,20 +483,20 @@ Container::handleMouseReleaseEvent(QObject *s, QMouseEvent *mev)
m_form->formWidget()->clearForm();
KCommand *com = new InsertWidgetCommand(this/*, mev->pos()*/);
m_form->addCommand(com, true);
- m_insertBegin = QPoint(-1,-1);
- m_insertRect = QRect();
+ m_insertBegin = TQPoint(-1,-1);
+ m_insertRect = TQRect();
return true;
}
- else if(s == m_container && !m_toplevel && (mev->button() != RightButton) && m_insertRect.isValid()) // we are drawing a rect to select widgets
+ else if(s == m_container && !m_toplevel && (mev->button() != Qt::RightButton) && m_insertRect.isValid()) // we are drawing a rect to select widgets
{
drawSelectionRect(mev);
return true;
}
- if(mev->button() == RightButton) // Right-click -> context menu
+ if(mev->button() == Qt::RightButton) // Right-click -> context menu
{
- FormManager::self()->createContextMenu(static_cast<QWidget*>(s), this);
+ FormManager::self()->createContextMenu(TQT_TQWIDGET(s), this);
}
- else if(mev->state() == (Qt::LeftButton|Qt::ControlButton))// && (m_copyRect.isValid()))
+ else if(mev->state() == (Qt::LeftButton|TQt::ControlButton))// && (m_copyRect.isValid()))
{
// copying a widget by Ctrl+dragging
@@ -519,24 +519,24 @@ Container::handleMouseReleaseEvent(QObject *s, QMouseEvent *mev)
if(m_form->selectedWidgets()->count() > 1)
FormManager::self()->setInsertPoint( mev->pos() );
else
- FormManager::self()->setInsertPoint( static_cast<QWidget*>(s)->mapTo(m_container, mev->pos() - m_grab) );
+ FormManager::self()->setInsertPoint( TQT_TQWIDGET(s)->mapTo(m_container, mev->pos() - m_grab) );
FormManager::self()->pasteWidget();
m_form->setInteractiveMode(true);
- //m_initialPos = QPoint();
+ //m_initialPos = TQPoint();
}
- else if(m_state == MovingWidget) // one widget has been moved, so we need to update the layout
+ else if(m_state == MovingWidget) // one widget has been moved, so we need to update the tqlayout
reloadLayout();
// cancel copying as user released Ctrl before releasing mouse button
- m_insertBegin = QPoint(-1,-1);
- m_insertRect = QRect();
+ m_insertBegin = TQPoint(-1,-1);
+ m_insertRect = TQRect();
m_state = DoingNothing;
return true; // eat
}
void
-Container::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWillBeSelected)
+Container::setSelectedWidget(TQWidget *w, bool add, bool dontRaise, bool moreWillBeSelected)
{
if (w)
kdDebug() << "slotSelectionChanged " << w->name()<< endl;
@@ -551,7 +551,7 @@ Container::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWill
}
void
-Container::unSelectWidget(QWidget *w)
+Container::unSelectWidget(TQWidget *w)
{
if(!w)
return;
@@ -569,7 +569,7 @@ Container::toplevel()
}
void
-Container::deleteWidget(QWidget *w)
+Container::deleteWidget(TQWidget *w)
{
if(!w)
return;
@@ -602,13 +602,13 @@ Container::setLayout(LayoutType type)
{
case HBox:
{
- m_layout = (QLayout*) new QHBoxLayout(m_container, m_margin, m_spacing);
+ m_layout = (TQLayout*) new TQHBoxLayout(m_container, m_margin, m_spacing);
createBoxLayout(new HorWidgetList(m_form->toplevelContainer()->widget()));
break;
}
case VBox:
{
- m_layout = (QLayout*) new QVBoxLayout(m_container, m_margin, m_spacing);
+ m_layout = (TQLayout*) new TQVBoxLayout(m_container, m_margin, m_spacing);
createBoxLayout(new VerWidgetList(m_form->toplevelContainer()->widget()));
break;
}
@@ -620,16 +620,16 @@ Container::setLayout(LayoutType type)
case HFlow:
{
KexiFlowLayout *flow = new KexiFlowLayout(m_container,m_margin, m_spacing);
- flow->setOrientation(Horizontal);
- m_layout = (QLayout*)flow;
+ flow->setOrientation(Qt::Horizontal);
+ m_layout = (TQLayout*)flow;
createFlowLayout();
break;
}
case VFlow:
{
KexiFlowLayout *flow = new KexiFlowLayout(m_container,m_margin, m_spacing);
- flow->setOrientation(Vertical);
- m_layout = (QLayout*)flow;
+ flow->setOrientation(Qt::Vertical);
+ m_layout = (TQLayout*)flow;
createFlowLayout();
break;
}
@@ -639,7 +639,7 @@ Container::setLayout(LayoutType type)
return;
}
}
- m_container->setGeometry(m_container->geometry()); // just update layout
+ m_container->setGeometry(m_container->tqgeometry()); // just update tqlayout
m_layout->activate();
}
@@ -654,14 +654,14 @@ Container::reloadLayout()
void
Container::createBoxLayout(WidgetList *list)
{
- QBoxLayout *layout = static_cast<QBoxLayout*>(m_layout);
+ TQBoxLayout *tqlayout = static_cast<TQBoxLayout*>(m_layout);
- for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next())
+ for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next())
list->append( tree->widget());
list->sort();
- for(QWidget *obj = list->first(); obj; obj = list->next())
- layout->addWidget(obj);
+ for(TQWidget *obj = list->first(); obj; obj = list->next())
+ tqlayout->addWidget(obj);
delete list;
}
@@ -669,12 +669,12 @@ void
Container::createFlowLayout()
{
KexiFlowLayout *flow = dynamic_cast<KexiFlowLayout*>(m_layout);
- if(!flow || m_tree->children()->isEmpty())
+ if(!flow || m_tree->tqchildren()->isEmpty())
return;
const int offset = 15;
WidgetList *list=0, *list2=0;
- if(flow->orientation() == Horizontal) {
+ if(flow->orientation() ==Qt::Horizontal) {
list = new VerWidgetList(m_form->toplevelContainer()->widget());
list2 = new HorWidgetList(m_form->toplevelContainer()->widget());
}
@@ -684,17 +684,17 @@ Container::createFlowLayout()
}
// fill the list
- for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next())
+ for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next())
list->append( tree->widget());
list->sort();
- if(flow->orientation() == Horizontal) {
+ if(flow->orientation() ==Qt::Horizontal) {
int y = list->first()->y();
- for(QWidget *w = list->first(); w; w = list->next()) {
+ for(TQWidget *w = list->first(); w; w = list->next()) {
if( (w->y() > y +offset)) {
// start a new line
list2->sort();
- for(QWidget *obj = list2->first(); obj; obj = list2->next())
+ for(TQWidget *obj = list2->first(); obj; obj = list2->next())
flow->add(obj);
list2->clear();
y = w->y();
@@ -703,16 +703,16 @@ Container::createFlowLayout()
}
list2->sort(); // don't forget the last line
- for(QWidget *obj = list2->first(); obj; obj = list2->next())
+ for(TQWidget *obj = list2->first(); obj; obj = list2->next())
flow->add(obj);
}
else {
int x = list->first()->x();
- for(QWidget *w = list->first(); w; w = list->next()) {
+ for(TQWidget *w = list->first(); w; w = list->next()) {
if( (w->x() > x +offset)) {
// start a new column
list2->sort();
- for(QWidget *obj = list2->first(); obj; obj = list2->next())
+ for(TQWidget *obj = list2->first(); obj; obj = list2->next())
flow->add(obj);
list2->clear();
x = w->x();
@@ -721,7 +721,7 @@ Container::createFlowLayout()
}
list2->sort(); // don't forget the last column
- for(QWidget *obj = list2->first(); obj; obj = list2->next())
+ for(TQWidget *obj = list2->first(); obj; obj = list2->next())
flow->add(obj);
}
@@ -736,16 +736,16 @@ Container::createGridLayout(bool testOnly)
VerWidgetList *vlist = new VerWidgetList(m_form->toplevelContainer()->widget());
HorWidgetList *hlist = new HorWidgetList(m_form->toplevelContainer()->widget());
// The vector are used to store the x (or y) beginning of each column (or row)
- QValueVector<int> cols;
- QValueVector<int> rows;
+ TQValueVector<int> cols;
+ TQValueVector<int> rows;
int end=-1000;
bool same = false;
- for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next())
+ for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next())
vlist->append( tree->widget());
vlist->sort();
- for(ObjectTreeItem *tree = m_tree->children()->first(); tree; tree = m_tree->children()->next())
+ for(ObjectTreeItem *tree = m_tree->tqchildren()->first(); tree; tree = m_tree->tqchildren()->next())
hlist->append( tree->widget());
hlist->sort();
@@ -754,35 +754,35 @@ Container::createGridLayout(bool testOnly)
if(!testOnly) {
for(WidgetListIterator it(*vlist); it.current() != 0; ++it)
{
- QWidget *w = it.current();
+ TQWidget *w = it.current();
WidgetListIterator it2 = it;
for(; it2.current() != 0; ++it2) {
- QWidget *nextw = it2.current();
- if((w->y() >= nextw->y()) || (nextw->y() >= w->geometry().bottom()))
+ TQWidget *nextw = it2.current();
+ if((w->y() >= nextw->y()) || (nextw->y() >= w->tqgeometry().bottom()))
break;
- if(!w->geometry().intersects(nextw->geometry()))
+ if(!w->tqgeometry().intersects(nextw->tqgeometry()))
break;
// If the geometries of the two widgets intersect each other,
// we move one of the widget to the rght or bottom of the other
if((nextw->y() - w->y()) > abs(nextw->x() - w->x()))
- nextw->move(nextw->x(), w->geometry().bottom()+1);
+ nextw->move(nextw->x(), w->tqgeometry().bottom()+1);
else if(nextw->x() >= w->x())
- nextw->move(w->geometry().right()+1, nextw->y());
+ nextw->move(w->tqgeometry().right()+1, nextw->y());
else
- w->move(nextw->geometry().right()+1, nextw->y());
+ w->move(nextw->tqgeometry().right()+1, nextw->y());
}
}
}
- // Then we count the number of rows in the layout, and set their beginnings
+ // Then we count the number of rows in the tqlayout, and set their beginnings
for(WidgetListIterator it(*vlist); it.current() != 0; ++it)
{
- QWidget *w = it.current();
+ TQWidget *w = it.current();
WidgetListIterator it2 = it;
if(!same) { // this widget will make a new row
- end = w->geometry().bottom();
+ end = w->tqgeometry().bottom();
rows.append(w->y());
}
@@ -792,13 +792,13 @@ Container::createGridLayout(bool testOnly)
if(!it2.current())
break;
- QWidget *nextw = it2.current();
+ TQWidget *nextw = it2.current();
if(nextw->y() >= end)
same = false;
else {
- same = !(same && (nextw->y() >= w->geometry().bottom()));
+ same = !(same && (nextw->y() >= w->tqgeometry().bottom()));
if(!same)
- end = w->geometry().bottom();
+ end = w->tqgeometry().bottom();
}
}
kdDebug() << "the new grid will have n rows: n == " << rows.size() << endl;
@@ -808,10 +808,10 @@ Container::createGridLayout(bool testOnly)
// We do the same thing for the columns
for(WidgetListIterator it(*hlist); it.current() != 0; ++it)
{
- QWidget *w = it.current();
+ TQWidget *w = it.current();
WidgetListIterator it2 = it;
if(!same) {
- end = w->geometry().right();
+ end = w->tqgeometry().right();
cols.append(w->x());
}
@@ -819,29 +819,29 @@ Container::createGridLayout(bool testOnly)
if(!it2.current())
break;
- QWidget *nextw = it2.current();
+ TQWidget *nextw = it2.current();
if(nextw->x() >= end)
same = false;
else {
- same = !(same && (nextw->x() >= w->geometry().right()));
+ same = !(same && (nextw->x() >= w->tqgeometry().right()));
if(!same)
- end = w->geometry().right();
+ end = w->tqgeometry().right();
}
}
kdDebug() << "the new grid will have n columns: n == " << cols.size() << endl;
- // We create the layout ..
- QGridLayout *layout=0;
+ // We create the tqlayout ..
+ TQGridLayout *tqlayout=0;
if(!testOnly) {
- layout = new QGridLayout(m_container, rows.size(), cols.size(), m_margin, m_spacing, "grid");
- m_layout = (QLayout*)layout;
+ tqlayout = new TQGridLayout(m_container, rows.size(), cols.size(), m_margin, m_spacing, "grid");
+ m_layout = (TQLayout*)tqlayout;
}
// .. and we fill it with widgets
for(WidgetListIterator it(*vlist); it.current() != 0; ++it)
{
- QWidget *w = it.current();
- QRect r = w->geometry();
+ TQWidget *w = it.current();
+ TQRect r = w->tqgeometry();
uint wcol=0, wrow=0, endrow=0, endcol=0;
uint i = 0;
@@ -901,21 +901,21 @@ Container::createGridLayout(bool testOnly)
ObjectTreeItem *item = m_form->objectTree()->lookup(w->name());
if(!endrow && !endcol) {
if(!testOnly)
- layout->addWidget(w, wrow, wcol);
+ tqlayout->addWidget(w, wrow, wcol);
item->setGridPos(wrow, wcol, 0, 0);
}
else {
if(!endcol) endcol = wcol;
if(!endrow) endrow = wrow;
if(!testOnly)
- layout->addMultiCellWidget(w, wrow, endrow, wcol, endcol);
+ tqlayout->addMultiCellWidget(w, wrow, endrow, wcol, endcol);
item->setGridPos(wrow, wcol, endrow-wrow+1, endcol-wcol+1);
}
}
}
-QString
-Container::layoutTypeToString(int type)
+TQString
+Container::tqlayoutTypeToString(int type)
{
switch(type)
{
@@ -929,7 +929,7 @@ Container::layoutTypeToString(int type)
}
Container::LayoutType
-Container::stringToLayoutType(const QString &name)
+Container::stringToLayoutType(const TQString &name)
{
if(name == "HBox") return HBox;
if(name == "VBox") return VBox;
@@ -941,9 +941,9 @@ Container::stringToLayoutType(const QString &name)
/// Drawing functions used by eventFilter
void
-Container::drawConnection(QMouseEvent *mev)
+Container::drawConnection(TQMouseEvent *mev)
{
- if(mev->button() != LeftButton)
+ if(mev->button() != Qt::LeftButton)
{
FormManager::self()->resetCreatedConnection();
return;
@@ -955,7 +955,7 @@ Container::drawConnection(QMouseEvent *mev)
if(m_form->formWidget())
{
m_form->formWidget()->initBuffer();
- m_form->formWidget()->highlightWidgets(m_moving, 0/*, QPoint()*/);
+ m_form->formWidget()->highlightWidgets(m_moving, 0/*, TQPoint()*/);
}
FormManager::self()->createSignalMenu(m_moving);
return;
@@ -971,7 +971,7 @@ Container::drawConnection(QMouseEvent *mev)
{
FormManager::self()->createdConnection()->setReceiver(m_moving->name());
FormManager::self()->createSlotMenu(m_moving);
- m_container->repaint();
+ m_container->tqrepaint();
return;
}
// the user clicked outside the menu, we cancel the connection
@@ -983,7 +983,7 @@ Container::drawConnection(QMouseEvent *mev)
}
void
-Container::drawSelectionRect(QMouseEvent *mev)
+Container::drawSelectionRect(TQMouseEvent *mev)
{
//finish drawing unclipped selection rectangle: clear the surface
if(m_form->formWidget())
@@ -992,17 +992,17 @@ Container::drawSelectionRect(QMouseEvent *mev)
int topy = (m_insertBegin.y() < mev->y()) ? m_insertBegin.y() : mev->y();
int botx = (m_insertBegin.x() > mev->x()) ? m_insertBegin.x() : mev->x();
int boty = (m_insertBegin.y() > mev->y()) ? m_insertBegin.y() : mev->y();
- QRect r = QRect(QPoint(topx, topy), QPoint(botx, boty));
+ TQRect r = TQRect(TQPoint(topx, topy), TQPoint(botx, boty));
setSelectedWidget(m_container, false);
- QWidget *widgetToSelect = 0;
+ TQWidget *widgetToSelect = 0;
// We check which widgets are in the rect and select them
- for(ObjectTreeItem *item = m_tree->children()->first(); item; item = m_tree->children()->next())
+ for(ObjectTreeItem *item = m_tree->tqchildren()->first(); item; item = m_tree->tqchildren()->next())
{
- QWidget *w = item->widget();
+ TQWidget *w = item->widget();
if(!w)
continue;
- if(w->geometry().intersects(r) && w != m_container) {
+ if(w->tqgeometry().intersects(r) && w != m_container) {
if (widgetToSelect)
setSelectedWidget(widgetToSelect, true/*add*/, false/*raise*/, true/*moreWillBeSelected*/);
widgetToSelect = w; //select later
@@ -1011,19 +1011,19 @@ Container::drawSelectionRect(QMouseEvent *mev)
if (widgetToSelect) //the last one left
setSelectedWidget(widgetToSelect, true/*add*/, false/*raise*/, false/*!moreWillBeSelected*/);
- m_insertRect = QRect();
+ m_insertRect = TQRect();
m_state = DoingNothing;
- m_container->repaint();
+ m_container->tqrepaint();
}
void
-Container::drawInsertRect(QMouseEvent *mev, QObject *s)
+Container::drawInsertRect(TQMouseEvent *mev, TQObject *s)
{
int tmpx, tmpy;
- QPoint pos = static_cast<QWidget*>(s)->mapTo(m_container, mev->pos());
+ TQPoint pos = TQT_TQWIDGET(s)->mapTo(m_container, mev->pos());
int gridX = m_form->gridSize();
int gridY = m_form->gridSize();
- if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (LeftButton|ControlButton|AltButton)) )
+ if(!FormManager::self()->snapWidgetsToGrid() || (mev->state() == (Qt::LeftButton|ControlButton|AltButton)) )
{
tmpx = pos.x();
tmpy = pos.y();
@@ -1040,7 +1040,7 @@ Container::drawInsertRect(QMouseEvent *mev, QObject *s)
int topy = (m_insertBegin.y() < tmpy) ? m_insertBegin.y() : tmpy;
int botx = (m_insertBegin.x() > tmpx) ? m_insertBegin.x() : tmpx;
int boty = (m_insertBegin.y() > tmpy) ? m_insertBegin.y() : tmpy;
- m_insertRect = QRect(QPoint(topx, topy), QPoint(botx, boty));
+ m_insertRect = TQRect(TQPoint(topx, topy), TQPoint(botx, boty));
if(m_insertRect.x() < 0)
m_insertRect.setLeft(0);
@@ -1055,7 +1055,7 @@ Container::drawInsertRect(QMouseEvent *mev, QObject *s)
{
if(m_form->formWidget())
{
- QRect drawRect = QRect(m_container->mapTo(m_form->widget(), m_insertRect.topLeft())
+ TQRect drawRect = TQRect(m_container->mapTo(m_form->widget(), m_insertRect.topLeft())
, m_insertRect.size());
m_form->formWidget()->drawRect(drawRect, 2);
}
@@ -1063,14 +1063,14 @@ Container::drawInsertRect(QMouseEvent *mev, QObject *s)
}
void
-Container::drawCopiedWidgetRect(QMouseEvent *mev)
+Container::drawCopiedWidgetRect(TQMouseEvent *mev)
{
// We've been dragging a widget, but Ctrl was hold, so we start copy
if(m_state == MovingWidget) {
//FormManager::self()->undo(); // undo last moving
//m_moving->move(m_initialPos);
if(m_form->formWidget()) {
- m_container->repaint();
+ m_container->tqrepaint();
m_form->formWidget()->initBuffer();
}
m_state = CopyingWidget;
@@ -1079,13 +1079,13 @@ Container::drawCopiedWidgetRect(QMouseEvent *mev)
//m_copyRect.moveTopLeft(m_container->mapFromGlobal( mev->globalPos()) - m_grab);
if(m_form->formWidget()) {
- QValueList<QRect> rectList;
- for(QWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) {
- QRect drawRect = w->geometry();
- QPoint p = mev->pos() - m_grab;
+ TQValueList<TQRect> rectList;
+ for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next()) {
+ TQRect drawRect = w->tqgeometry();
+ TQPoint p = mev->pos() - m_grab;
drawRect.moveBy(p.x(), p.y());
- p = m_container->mapTo(m_form->widget(), QPoint(0, 0));
- //drawRect = QRect( ((QWidget*)s)->mapTo(m_form->widget(), drawRect.topLeft()), drawRect.size());
+ p = m_container->mapTo(m_form->widget(), TQPoint(0, 0));
+ //drawRect = TQRect( ((TQWidget*)s)->mapTo(m_form->widget(), drawRect.topLeft()), drawRect.size());
drawRect.moveBy(p.x(), p.y());
rectList.append(drawRect);
}
@@ -1096,7 +1096,7 @@ Container::drawCopiedWidgetRect(QMouseEvent *mev)
/// Other functions used by eventFilter
void
-Container::moveSelectedWidgetsBy(int realdx, int realdy, QMouseEvent *mev)
+Container::moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev)
{
if (m_form->selectedWidget() == m_form->widget())
return; //do not move top-level widget
@@ -1105,46 +1105,46 @@ Container::moveSelectedWidgetsBy(int realdx, int realdy, QMouseEvent *mev)
const int gridY = m_form->gridSize();
int dx=realdx, dy=realdy;
- for(QWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
+ for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
{
- if(!w || !w->parent() || w->parent()->inherits("QTabWidget") || w->parent()->inherits("QWidgetStack"))
+ if(!w || !w->tqparent() || w->tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->tqparent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
continue;
- if(w->parentWidget() && w->parentWidget()->isA("QWidgetStack"))
+ if(w->tqparentWidget() && w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
{
- w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits("QTabWidget")) // widget is tabwidget page
- w = w->parentWidget();
+ w = w->tqparentWidget(); // widget is WidgetStack page
+ if(w->tqparentWidget() && w->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ w = w->tqparentWidget();
}
int tmpx = w->x() + realdx;
int tmpy = w->y() + realdy;
if(tmpx < 0)
- dx = QMAX(0 - w->x(), dx); // because dx is <0
- else if(tmpx > w->parentWidget()->width() - gridX)
- dx = QMIN(w->parentWidget()->width() - gridX - w->x(), dx);
+ dx = TQMAX(0 - w->x(), dx); // because dx is <0
+ else if(tmpx > w->tqparentWidget()->width() - gridX)
+ dx = TQMIN(w->tqparentWidget()->width() - gridX - w->x(), dx);
if(tmpy < 0)
- dy = QMAX(0 - w->y(), dy); // because dy is <0
- else if(tmpy > w->parentWidget()->height() - gridY)
- dy = QMIN(w->parentWidget()->height() - gridY - w->y(), dy);
+ dy = TQMAX(0 - w->y(), dy); // because dy is <0
+ else if(tmpy > w->tqparentWidget()->height() - gridY)
+ dy = TQMIN(w->tqparentWidget()->height() - gridY - w->y(), dy);
}
- for(QWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
+ for(TQWidget *w = m_form->selectedWidgets()->first(); w; w = m_form->selectedWidgets()->next())
{
// Don't move tab widget pages (or widget stack pages)
- if(!w || !w->parent() || w->parent()->inherits("QTabWidget") || w->parent()->inherits("QWidgetStack"))
+ if(!w || !w->tqparent() || w->tqparent()->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || w->tqparent()->inherits(TQWIDGETSTACK_OBJECT_NAME_STRING))
continue;
- if(w->parentWidget() && w->parentWidget()->isA("QWidgetStack"))
+ if(w->tqparentWidget() && w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
{
- w = w->parentWidget(); // widget is WidgetStack page
- if(w->parentWidget() && w->parentWidget()->inherits("QTabWidget")) // widget is tabwidget page
- w = w->parentWidget();
+ w = w->tqparentWidget(); // widget is WidgetStack page
+ if(w->tqparentWidget() && w->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) // widget is tabwidget page
+ w = w->tqparentWidget();
}
int tmpx, tmpy;
- if(!FormManager::self()->snapWidgetsToGrid() || (mev && mev->state() == (LeftButton|ControlButton|AltButton)) )
+ if(!FormManager::self()->snapWidgetsToGrid() || (mev && mev->state() == (Qt::LeftButton|ControlButton|AltButton)) )
{
tmpx = w->x() + dx;
tmpy = w->y() + dy;
@@ -1172,10 +1172,10 @@ DesignTimeDynamicChildWidgetHandler::~DesignTimeDynamicChildWidgetHandler()
}
void
-DesignTimeDynamicChildWidgetHandler::childWidgetAdded(QWidget* w)
+DesignTimeDynamicChildWidgetHandler::childWidgetAdded(TQWidget* w)
{
if (m_item) {
- installRecursiveEventFilter(w, m_item->eventEater());
+ installRecursiveEventFilter(TQT_TQOBJECT(w), m_item->eventEater());
}
}
diff --git a/kexi/formeditor/container.h b/kexi/formeditor/container.h
index b7036aa7d..a76c913a8 100644
--- a/kexi/formeditor/container.h
+++ b/kexi/formeditor/container.h
@@ -21,16 +21,16 @@
#ifndef FORMEDITORCONTAINER_H
#define FORMEDITORCONTAINER_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include "utils.h"
-class QEvent;
-class QWidget;
-class QLayout;
+class TQEvent;
+class TQWidget;
+class TQLayout;
namespace KFormDesigner {
@@ -44,42 +44,44 @@ class Form;
* and direct it to the Container.
*/
//! A class for redirecting events
-class KFORMEDITOR_EXPORT EventEater : public QObject
+class KFORMEDITOR_EXPORT EventEater : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructs eater object. All events for \a widget and it's subwidgets
- will be redirected to \a container. \a container will be also parent of eater object,
+ will be redirected to \a container. \a container will be also tqparent of eater object,
so you don't need to care about deleting it. */
- EventEater(QWidget *widget, QObject *container);
+ EventEater(TQWidget *widget, TQObject *container);
~EventEater();
//! Sets the object which will receive the events
- void setContainer(QObject *container) { m_container = container; }
- bool eventFilter(QObject *o, QEvent *ev);
+ void setContainer(TQObject *container) { m_container = container; }
+ bool eventFilter(TQObject *o, TQEvent *ev);
private:
- QGuardedPtr<QWidget> m_widget;
- QGuardedPtr<QObject> m_container;
+ TQGuardedPtr<TQWidget> m_widget;
+ TQGuardedPtr<TQObject> m_container;
};
/**
- * This class makes a container out of any QWidget. You can then create child widgets, and
+ * This class makes a container out of any TQWidget. You can then create child widgets, and
the background is dotted.
*/
//! A class to make a container from any widget
-class KFORMEDITOR_EXPORT Container : public QObject
+class KFORMEDITOR_EXPORT Container : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum LayoutType { NoLayout=0, HBox, VBox, Grid, HFlow, VFlow, /* special types */ HSplitter, VSplitter };
/**
* Creates a Container from the widget \a container, which have
- \a toplevel as parent Container. */
- Container(Container *toplevel, QWidget *container, QObject *parent=0, const char *name=0);
+ \a toplevel as tqparent Container. */
+ Container(Container *toplevel, TQWidget *container, TQObject *tqparent=0, const char *name=0);
virtual ~Container();
//! \return a pointer to the toplevel Container, or 0 if this Container is toplevel
@@ -89,7 +91,7 @@ class KFORMEDITOR_EXPORT Container : public QObject
Form* form() const { return m_form; }
//! \return The watched widget.
- QWidget* widget() const { return m_container; }
+ TQWidget* widget() const { return m_container; }
//! \return The ObjectTreeItem associated with this Container's widget.
ObjectTreeItem* objectTree() const { return m_tree; }
@@ -101,20 +103,20 @@ class KFORMEDITOR_EXPORT Container : public QObject
* NOTE: this is needed only if we are toplevel. */
void setObjectTree(ObjectTreeItem *t) { m_tree = t; }
- //! \return a pointer to the QLayout of this Container, or 0 if there is not.
- QLayout* layout() const { return m_layout; }
+ //! \return a pointer to the TQLayout of this Container, or 0 if there is not.
+ TQLayout* tqlayout() const { return m_layout; }
- //! \return the type of the layout associated to this Container's widget (see LayoutType enum).
- LayoutType layoutType() const { return m_layType; }
+ //! \return the type of the tqlayout associated to this Container's widget (see LayoutType enum).
+ LayoutType tqlayoutType() const { return m_layType; }
//! \return the margin of this Container.
- int layoutMargin() { return m_margin; }
+ int tqlayoutMargin() { return m_margin; }
//! \return the spacing of this Container.
- int layoutSpacing() { return m_spacing; }
+ int tqlayoutSpacing() { return m_spacing; }
- /*! Sets this Container to use \a type of layout. The widget are inserted
- automatically in the layout following their positions.
+ /*! Sets this Container to use \a type of tqlayout. The widget are inserted
+ automatically in the tqlayout following their positions.
\sa createBoxLayout(), createGridLayout() */
void setLayout(LayoutType type);
@@ -124,11 +126,11 @@ class KFORMEDITOR_EXPORT Container : public QObject
//! Sets the margin of this Container.
void setLayoutMargin(int margin) { m_margin = margin;}
- //! \return the string representing the layoutType \a type.
- static QString layoutTypeToString(int type);
+ //! \return the string representing the tqlayoutType \a type.
+ static TQString tqlayoutTypeToString(int type);
- //! \return the LayoutType (an int) for a given layout name.
- static LayoutType stringToLayoutType(const QString &name);
+ //! \return the LayoutType (an int) for a given tqlayout name.
+ static LayoutType stringToLayoutType(const TQString &name);
/*! Stops the inline editing of the current widget (as when you click
on another widget or press Esc). */
@@ -138,29 +140,29 @@ class KFORMEDITOR_EXPORT Container : public QObject
to the watched widget.\n It takes care of drawing the background and
the insert rect, of creating the new child widgets, of moving the widgets
and pop up a menu when right-clicking. */
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
public slots:
/*! Sets \a selected to be the selected widget of this container
(and so of the Form). If \a add is true, the formerly selected widget
is still selected, and the new one is just added. If false, \a selected
replace the actually selected widget. If \a dontRaise is true, then
- the widget \a selected (and its parent) won't be raised (eg when you
+ the widget \a selected (and its tqparent) won't be raised (eg when you
select widget in ObjectTreeView).
\sa Form::setSelectedWidget() */
- void setSelectedWidget(QWidget *selected, bool add, bool dontRaise=false,
+ void setSelectedWidget(TQWidget *selected, bool add, bool dontRaise=false,
bool moreWillBeSelected = false);
/*! Unselects the widget \a w. The widget is removed from the Form's list
and its resizeHandles are removed. */
- void unSelectWidget(QWidget *w);
+ void unSelectWidget(TQWidget *w);
/*! Deletes the widget \a w. Removes it from ObjectTree, and sets selection
to Container's widget. */
- void deleteWidget(QWidget *w);
+ void deleteWidget(TQWidget *w);
- /*! Recreates the Container layout. Calls this when a widget has been moved
- or added to update the layout. */
+ /*! Recreates the Container tqlayout. Calls this when a widget has been moved
+ or added to update the tqlayout. */
void reloadLayout();
protected slots:
@@ -169,55 +171,55 @@ class KFORMEDITOR_EXPORT Container : public QObject
protected:
/*! Internal function to create a HBoxLayout or VBoxLayout for this container.
- \a list is a subclass of QObjectList that can sort widgets
+ \a list is a subclass of TQObjectList that can sort widgets
following their position (such as HorWidgetList or VerWidgetList). */
void createBoxLayout(WidgetList *list);
/*! Internal function to create a KexiFlowLayout. */
void createFlowLayout();
- /*! Internal function to create a GridLayout. if \a testOnly is true, the layout
+ /*! Internal function to create a GridLayout. if \a testOnly is true, the tqlayout
is simulated, and only the widget's grid info aris filled. */
void createGridLayout(bool testOnly=false);
- void drawConnection(QMouseEvent *mev);
- void drawSelectionRect(QMouseEvent *mev);
- void drawInsertRect(QMouseEvent *mev, QObject *s);
- void drawCopiedWidgetRect(QMouseEvent *mev);
+ void drawConnection(TQMouseEvent *mev);
+ void drawSelectionRect(TQMouseEvent *mev);
+ void drawInsertRect(TQMouseEvent *mev, TQObject *s);
+ void drawCopiedWidgetRect(TQMouseEvent *mev);
- void moveSelectedWidgetsBy(int realdx, int realdy, QMouseEvent *mev=0);
+ void moveSelectedWidgetsBy(int realdx, int realdy, TQMouseEvent *mev=0);
private:
- bool handleMouseReleaseEvent(QObject *s, QMouseEvent *mev);
+ bool handleMouseReleaseEvent(TQObject *s, TQMouseEvent *mev);
// the watched container and it's toplevel one...
- QGuardedPtr<QWidget> m_container;
- QGuardedPtr<Container> m_toplevel;
+ TQGuardedPtr<TQWidget> m_container;
+ TQGuardedPtr<Container> m_toplevel;
int m_state;
enum { DoingNothing = 100, DrawingSelectionRect, CopyingWidget,
MovingWidget, InlineEditing };
// Layout
- QLayout *m_layout;
+ TQLayout *m_layout;
LayoutType m_layType;
int m_margin, m_spacing;
// moving etc.
- QPoint m_grab;
- //QPoint m_initialPos;
- QGuardedPtr<QWidget> m_moving;
- //QRect m_copyRect;
+ TQPoint m_grab;
+ //TQPoint m_initialPos;
+ TQGuardedPtr<TQWidget> m_moving;
+ //TQRect m_copyRect;
//inserting
- QPoint m_insertBegin;
- QRect m_insertRect;
+ TQPoint m_insertBegin;
+ TQRect m_insertRect;
ObjectTreeItem *m_tree;
- QGuardedPtr<Form> m_form;
+ TQGuardedPtr<Form> m_form;
bool m_mousePressEventReceived;
- QMouseEvent m_mouseReleaseEvent;
- QGuardedPtr<QObject> m_objectForMouseReleaseEvent;
+ TQMouseEvent m_mouseReleaseEvent;
+ TQGuardedPtr<TQObject> m_objectForMouseReleaseEvent;
friend class InsertWidgetCommand;
friend class PasteWidgetCommand;
@@ -234,7 +236,7 @@ class KFORMEDITOR_EXPORT DesignTimeDynamicChildWidgetHandler
~DesignTimeDynamicChildWidgetHandler();
protected:
- void childWidgetAdded(QWidget* w);
+ void childWidgetAdded(TQWidget* w);
void assignItem(ObjectTreeItem* item) { m_item = item; }
private:
diff --git a/kexi/formeditor/editlistviewdialog.cpp b/kexi/formeditor/editlistviewdialog.cpp
index 5b128ec87..020a78762 100644
--- a/kexi/formeditor/editlistviewdialog.cpp
+++ b/kexi/formeditor/editlistviewdialog.cpp
@@ -16,8 +16,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qheader.h>
-#include <qlayout.h>
+#include <tqheader.h>
+#include <tqlayout.h>
#include <klistview.h>
#include <ktabwidget.h>
@@ -38,53 +38,53 @@ namespace KFormDesigner {
/// A Dialog to edit the contents of a listview /////////////////////
/////////////////////////////////////////////////////////////////////////////////
-EditListViewDialog::EditListViewDialog(QWidget *parent)
-//js(kde3.2 dependent) : KDialogBase(Tabbed, 0/* WFlags */, parent, "editlistview_dialog", true, i18n("Edit listview contents"), Ok|Cancel, Ok, false)
-: KDialogBase(Tabbed, i18n("Edit Listview Contents"), Ok|Cancel, Ok, parent, "editlistview_dialog", true /* modal */, false)
+EditListViewDialog::EditListViewDialog(TQWidget *tqparent)
+//js(kde3.2 dependent) : KDialogBase(Tabbed, 0/* WFlags */, tqparent, "editlistview_dialog", true, i18n("Edit listview contents"), Ok|Cancel, Ok, false)
+: KDialogBase(Tabbed, i18n("Edit Listview Contents"), Ok|Cancel, Ok, tqparent, "editlistview_dialog", true /* modal */, false)
{
m_column = addPage(i18n("Columns"));
m_contents = addPage(i18n("Contents"));
///////// Setup the "Contents" page /////////////////////////////
- QHBoxLayout *layout = new QHBoxLayout(m_contents, 0, 6);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(m_contents, 0, 6);
//// Setup the icon toolbar /////////////////
- QVBoxLayout *vlayout = new QVBoxLayout(layout, 3);
- QToolButton *newRow = new QToolButton(m_contents);
+ TQVBoxLayout *vtqlayout = new TQVBoxLayout(tqlayout, 3);
+ TQToolButton *newRow = new TQToolButton(m_contents);
newRow->setIconSet(BarIconSet("edit_add"));
newRow->setTextLabel(i18n("&Add Item"), true);
- vlayout->addWidget(newRow);
+ vtqlayout->addWidget(newRow);
m_buttons.insert(BNewRow, newRow);
- connect(newRow, SIGNAL(clicked()), this, SLOT(newRow()));
+ connect(newRow, TQT_SIGNAL(clicked()), this, TQT_SLOT(newRow()));
- QToolButton *newChild = new QToolButton(m_contents);
+ TQToolButton *newChild = new TQToolButton(m_contents);
newChild->setIconSet(BarIconSet("1rightarrow"));
newChild->setTextLabel(i18n("New &Subitem"), true);
- vlayout->addWidget(newChild);
+ vtqlayout->addWidget(newChild);
m_buttons.insert(BNewChild, newChild);
- connect(newChild, SIGNAL(clicked()), this, SLOT(newChildRow()));
+ connect(newChild, TQT_SIGNAL(clicked()), this, TQT_SLOT(newChildRow()));
- QToolButton *delRow = new QToolButton(m_contents);
+ TQToolButton *delRow = new TQToolButton(m_contents);
delRow->setIconSet(BarIconSet("edit_remove"));
delRow->setTextLabel(i18n("&Remove Item"), true);
- vlayout->addWidget(delRow);
+ vtqlayout->addWidget(delRow);
m_buttons.insert(BRemRow, delRow);
- connect(delRow, SIGNAL(clicked()), this, SLOT(removeRow()));
+ connect(delRow, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeRow()));
- QToolButton *rowUp = new QToolButton(m_contents);
+ TQToolButton *rowUp = new TQToolButton(m_contents);
rowUp->setIconSet(BarIconSet("1uparrow"));
rowUp->setTextLabel(i18n("Move Item &Up"), true);
- vlayout->addWidget(rowUp);
+ vtqlayout->addWidget(rowUp);
m_buttons.insert(BRowUp, rowUp);
- connect(rowUp, SIGNAL(clicked()), this, SLOT(MoveRowUp()));
+ connect(rowUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(MoveRowUp()));
- QToolButton *rowDown = new QToolButton(m_contents);
+ TQToolButton *rowDown = new TQToolButton(m_contents);
rowDown->setIconSet(BarIconSet("1downarrow"));
rowDown->setTextLabel(i18n("Move Item &Down"), true);
- vlayout->addWidget(rowDown);
+ vtqlayout->addWidget(rowDown);
m_buttons.insert(BRowDown, rowDown);
- connect(rowDown, SIGNAL(clicked()), this, SLOT(MoveRowDown()));
- vlayout->addStretch();
+ connect(rowDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(MoveRowDown()));
+ vtqlayout->addStretch();
//// The listview ///////////
m_listview = new KListView(m_contents, "editlistview_listview");
@@ -96,55 +96,55 @@ EditListViewDialog::EditListViewDialog(QWidget *parent)
m_listview->setDropVisualizer(true);
m_listview->setAcceptDrops(true);
m_listview->setSorting(-1);
- layout->addWidget(m_listview);
+ tqlayout->addWidget(m_listview);
m_listview->setFocus();
- connect(m_listview, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(updateButtons(QListViewItem*)));
- connect(m_listview, SIGNAL(moved(QListViewItem*, QListViewItem*, QListViewItem*)), this, SLOT(updateButtons(QListViewItem*)));
+ connect(m_listview, TQT_SIGNAL(currentChanged(TQListViewItem*)), this, TQT_SLOT(updateButtons(TQListViewItem*)));
+ connect(m_listview, TQT_SIGNAL(moved(TQListViewItem*, TQListViewItem*, TQListViewItem*)), this, TQT_SLOT(updateButtons(TQListViewItem*)));
/////////////////// Setup the columns page ////////////////
- QHBoxLayout *hbox = new QHBoxLayout(m_column, 0, 6);
+ TQHBoxLayout *hbox = new TQHBoxLayout(m_column, 0, 6);
// The "item properties" field
m_editor = new KoProperty::Editor(m_column, "editcolumn_propeditor");
- m_propSet = new KoProperty::Set(this, "columns");
+ m_propSet = new KoProperty::Set(TQT_TQOBJECT(this), "columns");
m_propSet->addProperty(new KoProperty::Property("caption", "Caption", i18n("Caption"),i18n("Caption")));
m_propSet->addProperty(new KoProperty::Property("width", 100, i18n("Width"), i18n("Width")));
- m_propSet->addProperty(new KoProperty::Property("clickable", QVariant(true, 3), i18n("Clickable"), i18n("Clickable") ));
- m_propSet->addProperty(new KoProperty::Property("resizable", QVariant(true, 3), i18n("Resizable"), i18n("Resizable") ));
- m_propSet->addProperty(new KoProperty::Property("fullwidth", QVariant(false, 3), i18n("Full Width"), i18n("Full Width") ));
+ m_propSet->addProperty(new KoProperty::Property("clickable", TQVariant(true, 3), i18n("Clickable"), i18n("Clickable") ));
+ m_propSet->addProperty(new KoProperty::Property("resizable", TQVariant(true, 3), i18n("Resizable"), i18n("Resizable") ));
+ m_propSet->addProperty(new KoProperty::Property("fullwidth", TQVariant(false, 3), i18n("Full Width"), i18n("Full Width") ));
m_editor->changeSet(m_propSet);
- connect(m_propSet, SIGNAL(propertyChanged(KoProperty::Set & KoProperty::Property&)),
- this, SLOT(changeProperty(KoProperty::Set & KoProperty::Property&)));
+ connect(m_propSet, TQT_SIGNAL(propertyChanged(KoProperty::Set & KoProperty::Property&)),
+ this, TQT_SLOT(changeProperty(KoProperty::Set & KoProperty::Property&)));
// Setup the icon toolbar //////////
- QVBoxLayout *vbox = new QVBoxLayout(hbox, 3);
- QToolButton *add = new QToolButton(m_column);
+ TQVBoxLayout *vbox = new TQVBoxLayout(hbox, 3);
+ TQToolButton *add = new TQToolButton(m_column);
add->setIconSet(BarIconSet("edit_add"));
add->setTextLabel(i18n("&Add Item"), true);
vbox->addWidget(add);
m_buttons.insert(BColAdd, add);
- connect(add, SIGNAL(clicked()), this, SLOT(newItem()));
+ connect(add, TQT_SIGNAL(clicked()), this, TQT_SLOT(newItem()));
- QToolButton *remove = new QToolButton(m_column);
+ TQToolButton *remove = new TQToolButton(m_column);
remove->setIconSet(BarIconSet("edit_remove"));
remove->setTextLabel(i18n("&Remove Item"), true);
vbox->addWidget(remove);
m_buttons.insert(BColRem, remove);
- connect(remove, SIGNAL(clicked()), this, SLOT(removeItem()));
+ connect(remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeItem()));
- QToolButton *up = new QToolButton(m_column);
+ TQToolButton *up = new TQToolButton(m_column);
up->setIconSet(BarIconSet("1uparrow"));
up->setTextLabel(i18n("Move Item &Up"), true);
vbox->addWidget(up);
m_buttons.insert(BColUp, up);
- connect(up, SIGNAL(clicked()), this, SLOT(MoveItemUp()));
+ connect(up, TQT_SIGNAL(clicked()), this, TQT_SLOT(MoveItemUp()));
- QToolButton *down = new QToolButton(m_column);
+ TQToolButton *down = new TQToolButton(m_column);
down->setIconSet(BarIconSet("1downarrow"));
down->setTextLabel(i18n("Move Item &Down"), true);
vbox->addWidget(down);
m_buttons.insert(BColDown, down);
- connect(down, SIGNAL(clicked()), this, SLOT(MoveItemDown()));
+ connect(down, TQT_SIGNAL(clicked()), this, TQT_SLOT(MoveItemDown()));
vbox->addStretch();
// The listbox with columns name /////
@@ -152,14 +152,14 @@ EditListViewDialog::EditListViewDialog(QWidget *parent)
m_listbox->setFocus();
hbox->insertWidget(0, m_listbox);
hbox->addWidget(m_editor);
- connect(m_listbox, SIGNAL(currentChanged(QListBoxItem*)), this, SLOT(updateItemProperties(QListBoxItem*)));
+ connect(m_listbox, TQT_SIGNAL(currentChanged(TQListBoxItem*)), this, TQT_SLOT(updateItemProperties(TQListBoxItem*)));
//// Init dialog and display it ////////////////////////
- setInitialSize(QSize(500, 300), true);
+ setInitialSize(TQSize(500, 300), true);
}
int
-EditListViewDialog::exec(QListView *listview)
+EditListViewDialog::exec(TQListView *listview)
{
if(!listview)
{
@@ -176,7 +176,7 @@ EditListViewDialog::exec(QListView *listview)
m_listview->header()->setStretchEnabled(listview->header()->isStretchEnabled(i), i);
m_listview->setRenameable(i, true);
}
- QListViewItem *item = listview->firstChild();
+ TQListViewItem *item = listview->firstChild();
while(item) {
loadChildNodes(m_listview, item, 0);
item = item->nextSibling();
@@ -192,7 +192,7 @@ EditListViewDialog::exec(QListView *listview)
// and we exec the dialog
int r = KDialogBase::exec();
- if(r == QDialog::Accepted)
+ if(r == TQDialog::Accepted)
{
listview->clear();
// We copy the contents of our listview back in the listview
@@ -210,7 +210,7 @@ EditListViewDialog::exec(QListView *listview)
listview->header()->setStretchEnabled(m_listview->header()->isStretchEnabled(i), i);
}
- QListViewItem *item = m_listview->firstChild();
+ TQListViewItem *item = m_listview->firstChild();
while(item)
{
loadChildNodes(listview, item, 0);
@@ -227,8 +227,8 @@ EditListViewDialog::changeProperty(KoProperty::Set& set, KoProperty::Property& p
if(&set != m_propSet)
return;
- QString name = property.name();
- QVariant value = property.value();
+ TQString name = property.name();
+ TQVariant value = property.value();
if(name == "caption") {
m_propSet->blockSignals(true); // we need to block signals because changeItem will modify selection, and call updateItemProperties
m_listbox->changeItem(value.toString(), m_listbox->currentItem());
@@ -246,7 +246,7 @@ EditListViewDialog::changeProperty(KoProperty::Set& set, KoProperty::Property& p
}
void
-EditListViewDialog::updateItemProperties(QListBoxItem *item)
+EditListViewDialog::updateItemProperties(TQListBoxItem *item)
{
if(!item)
return;
@@ -256,9 +256,9 @@ EditListViewDialog::updateItemProperties(QListBoxItem *item)
m_propSet->blockSignals(true); // we don't want changeProperty to be called
(*m_propSet)["caption"].setValue(m_listview->columnText(id), false);
(*m_propSet)["width"].setValue(m_listview->columnWidth(id), false);
- (*m_propSet)["clickable"].setValue(QVariant(m_listview->header()->isClickEnabled(id), 4), false);
- (*m_propSet)["resizable"].setValue(QVariant(m_listview->header()->isResizeEnabled(id), 4), false);
- (*m_propSet)["fullwidth"].setValue(QVariant(m_listview->header()->isStretchEnabled(id), 4), false);
+ (*m_propSet)["clickable"].setValue(TQVariant(m_listview->header()->isClickEnabled(id), 4), false);
+ (*m_propSet)["resizable"].setValue(TQVariant(m_listview->header()->isResizeEnabled(id), 4), false);
+ (*m_propSet)["fullwidth"].setValue(TQVariant(m_listview->header()->isStretchEnabled(id), 4), false);
m_propSet->blockSignals(false);
m_editor->changeSet(m_propSet);
}
@@ -296,7 +296,7 @@ void
EditListViewDialog::MoveItemUp()
{
int current = m_listbox->currentItem();
- QString text = m_listbox->text(current);
+ TQString text = m_listbox->text(current);
m_listbox->blockSignals(true);
m_listbox->changeItem(m_listbox->text(current - 1), current);
@@ -321,7 +321,7 @@ void
EditListViewDialog::MoveItemDown()
{
int current = m_listbox->currentItem();
- QString text = m_listbox->text(current);
+ TQString text = m_listbox->text(current);
m_listbox->blockSignals(true);
m_listbox->changeItem(m_listbox->text(current+1), current);
@@ -345,7 +345,7 @@ EditListViewDialog::MoveItemDown()
/// Contents page slots ////////
void
-EditListViewDialog::updateButtons(QListViewItem *item)
+EditListViewDialog::updateButtons(TQListViewItem *item)
{
if(!item)
{
@@ -356,33 +356,33 @@ EditListViewDialog::updateButtons(QListViewItem *item)
m_buttons[BNewChild]->setEnabled(true);
m_buttons[BRemRow]->setEnabled(true);
- m_buttons[BRowUp]->setEnabled( (item->itemAbove() && (item->itemAbove()->parent() == item->parent())) );
+ m_buttons[BRowUp]->setEnabled( (item->itemAbove() && (item->itemAbove()->tqparent() == item->tqparent())) );
m_buttons[BRowDown]->setEnabled(item->nextSibling());
}
void
-EditListViewDialog::loadChildNodes(QListView *listview, QListViewItem *item, QListViewItem *parent)
+EditListViewDialog::loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *tqparent)
{
- QListViewItem *newItem;
+ TQListViewItem *newItem;
if(listview->inherits("KListView"))
{
- if(parent)
- newItem = new KListViewItem(parent);
+ if(tqparent)
+ newItem = new KListViewItem(tqparent);
else
newItem = new KListViewItem(listview);
}
else
{
- if(parent)
- newItem = new QListViewItem(parent);
+ if(tqparent)
+ newItem = new TQListViewItem(tqparent);
else
- newItem = new QListViewItem(listview);
+ newItem = new TQListViewItem(listview);
}
// We need to move the item at the end, which is the expected behaviour (by default it is inserted at the beginning)
- QListViewItem *last;
- if(parent)
- last = parent->firstChild();
+ TQListViewItem *last;
+ if(tqparent)
+ last = tqparent->firstChild();
else
last = listview->firstChild();
@@ -394,7 +394,7 @@ EditListViewDialog::loadChildNodes(QListView *listview, QListViewItem *item, QLi
for(int i = 0; i < listview->columns(); i++)
newItem->setText(i, item->text(i));
- QListViewItem *child = item->firstChild();
+ TQListViewItem *child = item->firstChild();
if(child)
newItem->setOpen(true);
while(child) {
@@ -406,12 +406,12 @@ EditListViewDialog::loadChildNodes(QListView *listview, QListViewItem *item, QLi
void
EditListViewDialog::newRow()
{
- KListViewItem *parent = (KListViewItem*)m_listview->selectedItem();
- if(parent)
- parent = (KListViewItem*)parent->parent();
+ KListViewItem *tqparent = (KListViewItem*)m_listview->selectedItem();
+ if(tqparent)
+ tqparent = (KListViewItem*)tqparent->tqparent();
KListViewItem *item;
- if(parent)
- item = new KListViewItem(parent, m_listview->selectedItem());
+ if(tqparent)
+ item = new KListViewItem(tqparent, m_listview->selectedItem());
else
item = new KListViewItem(m_listview, m_listview->selectedItem());
item->setText(0, i18n("New Item"));
@@ -421,16 +421,16 @@ EditListViewDialog::newRow()
void
EditListViewDialog::newChildRow()
{
- KListViewItem *parent = (KListViewItem*)m_listview->currentItem();
+ KListViewItem *tqparent = (KListViewItem*)m_listview->currentItem();
KListViewItem *item;
- if(parent)
- item = new KListViewItem(parent);
+ if(tqparent)
+ item = new KListViewItem(tqparent);
else
item = new KListViewItem(m_listview, m_listview->currentItem());
item->setText(0, i18n("Sub Item"));
m_listview->setCurrentItem(item);
- parent->setOpen(true);
+ tqparent->setOpen(true);
}
void
@@ -442,7 +442,7 @@ EditListViewDialog::removeRow()
void
EditListViewDialog::MoveRowUp()
{
- QListViewItem *item = m_listview->currentItem()->itemAbove();
+ TQListViewItem *item = m_listview->currentItem()->itemAbove();
item->moveItem(m_listview->currentItem());
updateButtons(m_listview->currentItem());
}
@@ -450,7 +450,7 @@ EditListViewDialog::MoveRowUp()
void
EditListViewDialog::MoveRowDown()
{
- QListViewItem *before = m_listview->currentItem();
+ TQListViewItem *before = m_listview->currentItem();
before->moveItem(before->nextSibling());
updateButtons(before);
}
diff --git a/kexi/formeditor/editlistviewdialog.h b/kexi/formeditor/editlistviewdialog.h
index 09de44294..be2ae1061 100644
--- a/kexi/formeditor/editlistviewdialog.h
+++ b/kexi/formeditor/editlistviewdialog.h
@@ -20,17 +20,17 @@
#ifndef EDITLISTVIEW_DIALOG_H
#define EDITLISTVIEW_DIALOG_H
-#include <qintdict.h>
-#include <qtoolbutton.h>
+#include <tqintdict.h>
+#include <tqtoolbutton.h>
#include <kdialogbase.h>
-class QFrame;
-class QListView;
-class QListViewItem;
+class TQFrame;
+class TQListView;
+class TQListViewItem;
class KListViewItem;
class KListView;
class KListBox;
-class QListBoxItem;
+class TQListBoxItem;
namespace KoProperty {
class Property;
@@ -40,25 +40,26 @@ namespace KoProperty {
namespace KFormDesigner {
-//! A dialog to edit the contents of a listvuew (KListView or QListView)
+//! A dialog to edit the contents of a listvuew (KListView or TQListView)
/*! The dialog contains two pages, one to edit columns and one to edit ist items.
KoProperty::Editor is used in columns to edit column properties
- (there are two properties not supported by Qt Designer: 'width' and 'resizable').
+ (there are two properties not supported by TQt Designer: 'width' and 'resizable').
The user can enter list contents inside the list
using KListViewItem::setRenameable(). Pixmaps are not yet supported. */
class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditListViewDialog(QWidget *parent);
+ EditListViewDialog(TQWidget *tqparent);
~EditListViewDialog() {}
- int exec(QListView *listview);
+ int exec(TQListView *listview);
public slots:
// Columns page
- void updateItemProperties(QListBoxItem*);
+ void updateItemProperties(TQListBoxItem*);
void newItem();
void removeItem();
void MoveItemUp();
@@ -66,7 +67,7 @@ class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase
void changeProperty(KoProperty::Set& set, KoProperty::Property& property);
// Contents page
- void updateButtons(QListViewItem*);
+ void updateButtons(TQListViewItem*);
void newRow();
void newChildRow();
void removeRow();
@@ -74,18 +75,18 @@ class KFORMEDITOR_EXPORT EditListViewDialog : public KDialogBase
void MoveRowDown();
protected:
- /*! Loads all child items of \a item into \a listview (may be different from the \a items 's listview) as child of \a parent item.
+ /*! Loads all child items of \a item into \a listview (may be different from the \a items 's listview) as child of \a tqparent item.
This is used to copy the contents of a listview into another listview. */
- void loadChildNodes(QListView *listview, QListViewItem *item, QListViewItem *parent);
+ void loadChildNodes(TQListView *listview, TQListViewItem *item, TQListViewItem *tqparent);
protected:
enum { BNewRow = 10, BNewChild, BRemRow, BRowUp, BRowDown , BColAdd = 20, BColRem, BColUp, BColDown };
KoProperty::Editor *m_editor;
KoProperty::Set *m_propSet;
- QFrame *m_contents, *m_column;
+ TQFrame *m_contents, *m_column;
KListBox *m_listbox;
KListView *m_listview;
- QIntDict<QToolButton> m_buttons;
+ TQIntDict<TQToolButton> m_buttons;
};
}
diff --git a/kexi/formeditor/events.cpp b/kexi/formeditor/events.cpp
index e96b9f4f1..d7d623588 100644
--- a/kexi/formeditor/events.cpp
+++ b/kexi/formeditor/events.cpp
@@ -17,15 +17,15 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "events.h"
namespace KFormDesigner {
-Connection::Connection(const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot)
+Connection::Connection(const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot)
{
m_sender = sender;
m_signal = signal;
@@ -41,7 +41,7 @@ ConnectionBuffer::ConnectionBuffer()
}
void
-ConnectionBuffer::fixName(const QString &oldName, const QString &newName)
+ConnectionBuffer::fixName(const TQString &oldName, const TQString &newName)
{
for(Connection *c = first(); c; c = next())
{
@@ -53,7 +53,7 @@ ConnectionBuffer::fixName(const QString &oldName, const QString &newName)
}
ConnectionBuffer*
-ConnectionBuffer::allConnectionsForWidget(const QString &widget)
+ConnectionBuffer::allConnectionsForWidget(const TQString &widget)
{
ConnectionBuffer *list = new ConnectionBuffer();
list->setAutoDelete(false); // or it will delete all our connections
@@ -67,59 +67,59 @@ ConnectionBuffer::allConnectionsForWidget(const QString &widget)
}
void
-ConnectionBuffer::save(QDomNode &parentNode)
+ConnectionBuffer::save(TQDomNode &tqparentNode)
{
if(isEmpty())
return;
- QDomDocument domDoc = parentNode.ownerDocument();
- QDomElement connections;
- if(!parentNode.namedItem("connections").isNull())
- connections = parentNode.namedItem("connections").toElement();
+ TQDomDocument domDoc = tqparentNode.ownerDocument();
+ TQDomElement connections;
+ if(!tqparentNode.namedItem("connections").isNull())
+ connections = tqparentNode.namedItem("connections").toElement();
else
connections = domDoc.createElement("connections");
- parentNode.appendChild(connections);
+ tqparentNode.appendChild(connections);
for(Connection *c = first(); c; c = next())
{
- QDomElement connection = domDoc.createElement("connection");
+ TQDomElement connection = domDoc.createElement("connection");
connection.setAttribute("language", "C++");
connections.appendChild(connection);
- QDomElement sender = domDoc.createElement("sender");
+ TQDomElement sender = domDoc.createElement("sender");
connection.appendChild(sender);
- QDomText senderText = domDoc.createTextNode(c->sender());
+ TQDomText senderText = domDoc.createTextNode(c->sender());
sender.appendChild(senderText);
- QDomElement signal = domDoc.createElement("signal");
+ TQDomElement signal = domDoc.createElement("signal");
connection.appendChild(signal);
- QDomText signalText = domDoc.createTextNode(c->signal());
+ TQDomText signalText = domDoc.createTextNode(c->signal());
signal.appendChild(signalText);
- QDomElement receiver = domDoc.createElement("receiver");
+ TQDomElement receiver = domDoc.createElement("receiver");
connection.appendChild(receiver);
- QDomText receiverText = domDoc.createTextNode(c->receiver());
+ TQDomText receiverText = domDoc.createTextNode(c->receiver());
receiver.appendChild(receiverText);
- QDomElement slot = domDoc.createElement("slot");
+ TQDomElement slot = domDoc.createElement("slot");
connection.appendChild(slot);
- QDomText slotText = domDoc.createTextNode(c->slot());
+ TQDomText slotText = domDoc.createTextNode(c->slot());
slot.appendChild(slotText);
}
}
void
-ConnectionBuffer::saveAllConnectionsForWidget(const QString &widget, QDomNode parentNode)
+ConnectionBuffer::saveAllConnectionsForWidget(const TQString &widget, TQDomNode tqparentNode)
{
ConnectionBuffer *buff = allConnectionsForWidget(widget);
- buff->save(parentNode);
+ buff->save(tqparentNode);
delete buff;
}
void
-ConnectionBuffer::load(QDomNode node)
+ConnectionBuffer::load(TQDomNode node)
{
- for(QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
{
Connection *conn = new Connection();
conn->setSender(n.namedItem("sender").toElement().text());
@@ -131,7 +131,7 @@ ConnectionBuffer::load(QDomNode node)
}
void
-ConnectionBuffer::removeAllConnectionsForWidget(const QString &widget)
+ConnectionBuffer::removeAllConnectionsForWidget(const TQString &widget)
{
for(Connection *c = first(); c; c = next())
{
diff --git a/kexi/formeditor/events.h b/kexi/formeditor/events.h
index c9e1b2cd8..727b3a43b 100644
--- a/kexi/formeditor/events.h
+++ b/kexi/formeditor/events.h
@@ -20,39 +20,39 @@
#ifndef KFORMDESIGNEREVENTS_H
#define KFORMDESIGNEREVENTS_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
-class QDomNode;
+class TQDomNode;
namespace KFormDesigner {
class KFORMEDITOR_EXPORT Connection
{
public:
- Connection(const QString &sender, const QString &signal,
- const QString &receiver, const QString &slot);
+ Connection(const TQString &sender, const TQString &signal,
+ const TQString &receiver, const TQString &slot);
Connection() {;}
~Connection() {;}
- QString sender() const { return m_sender; }
- QString receiver() const { return m_receiver; }
- QString signal() const { return m_signal; }
- QString slot() const { return m_slot; }
+ TQString sender() const { return m_sender; }
+ TQString receiver() const { return m_receiver; }
+ TQString signal() const { return m_signal; }
+ TQString slot() const { return m_slot; }
- void setSender(const QString &v) { m_sender = v; }
- void setReceiver(const QString &v) { m_receiver = v; }
- void setSignal(const QString &v) { m_signal = v; }
- void setSlot(const QString &v) { m_slot = v; }
+ void setSender(const TQString &v) { m_sender = v; }
+ void setReceiver(const TQString &v) { m_receiver = v; }
+ void setSignal(const TQString &v) { m_signal = v; }
+ void setSlot(const TQString &v) { m_slot = v; }
protected:
- QString m_sender;
- QString m_signal;
- QString m_receiver;
- QString m_slot;
+ TQString m_sender;
+ TQString m_signal;
+ TQString m_receiver;
+ TQString m_slot;
};
-typedef QPtrList<Connection> ConnectionList;
+typedef TQPtrList<Connection> ConnectionList;
class KFORMEDITOR_EXPORT ConnectionBuffer : public ConnectionList
{
@@ -60,16 +60,16 @@ class KFORMEDITOR_EXPORT ConnectionBuffer : public ConnectionList
ConnectionBuffer();
~ConnectionBuffer() {;}
- void save(QDomNode &parentNode);
- void load(QDomNode parentNode);
+ void save(TQDomNode &tqparentNode);
+ void load(TQDomNode tqparentNode);
/*! This function is called when a widget is renamed from \a oldname
to \a newname. All the Connections for this widget are updated. */
- void fixName(const QString &oldname, const QString &newName);
+ void fixName(const TQString &oldname, const TQString &newName);
- ConnectionBuffer* allConnectionsForWidget(const QString &widget);
- void saveAllConnectionsForWidget(const QString &widget, QDomNode parentNode);
- void removeAllConnectionsForWidget(const QString &widget);
+ ConnectionBuffer* allConnectionsForWidget(const TQString &widget);
+ void saveAllConnectionsForWidget(const TQString &widget, TQDomNode tqparentNode);
+ void removeAllConnectionsForWidget(const TQString &widget);
};
}
diff --git a/kexi/formeditor/factories/containerfactory.cpp b/kexi/formeditor/factories/containerfactory.cpp
index d098c290c..ada3f9948 100644
--- a/kexi/formeditor/factories/containerfactory.cpp
+++ b/kexi/formeditor/factories/containerfactory.cpp
@@ -19,24 +19,24 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qwidgetstack.h>
-#include <qframe.h>
-#include <qbuttongroup.h>
-#include <qwidget.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qstring.h>
-#include <qpopupmenu.h>
-#include <qdom.h>
-#include <qevent.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qvaluevector.h>
-#include <qfileinfo.h>
-#include <qscrollview.h>
-#include <qtabbar.h>
-#include <qsplitter.h>
-#include <qlayout.h>
+#include <tqwidgetstack.h>
+#include <tqframe.h>
+#include <tqbuttongroup.h>
+#include <tqwidget.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqstring.h>
+#include <tqpopupmenu.h>
+#include <tqdom.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqvaluevector.h>
+#include <tqfileinfo.h>
+#include <tqscrollview.h>
+#include <tqtabbar.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
#include <kiconloader.h>
#include <kgenericfactory.h>
@@ -57,15 +57,15 @@
#include <formeditor/utils.h>
#if KDE_VERSION < KDE_MAKE_VERSION(3,1,9)
-# define KInputDialog QInputDialog
-# include <qinputdialog.h>
-# include <qlineedit.h>
+# define KInputDialog TQInputDialog
+# include <tqinputdialog.h>
+# include <tqlineedit.h>
#else
# include <kinputdialog.h>
#endif
-ContainerWidget::ContainerWidget(QWidget *parent, const char *name)
- : QWidget(parent, name)
+ContainerWidget::ContainerWidget(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
}
@@ -73,27 +73,27 @@ ContainerWidget::~ContainerWidget()
{
}
-QSize ContainerWidget::sizeHint() const
+TQSize ContainerWidget::tqsizeHint() const
{
- return QSize(30,30); //default
+ return TQSize(30,30); //default
}
-void ContainerWidget::dragMoveEvent( QDragMoveEvent *e )
+void ContainerWidget::dragMoveEvent( TQDragMoveEvent *e )
{
- QWidget::dragMoveEvent(e);
+ TQWidget::dragMoveEvent(e);
emit handleDragMoveEvent(e);
}
-void ContainerWidget::dropEvent( QDropEvent *e )
+void ContainerWidget::dropEvent( TQDropEvent *e )
{
- QWidget::dropEvent(e);
+ TQWidget::dropEvent(e);
emit handleDropEvent(e);
}
////////////////////////
-GroupBox::GroupBox(const QString & title, QWidget *parent, const char *name)
- : QGroupBox(title, parent, name)
+GroupBox::GroupBox(const TQString & title, TQWidget *tqparent, const char *name)
+ : TQGroupBox(title, tqparent, name)
{
}
@@ -101,22 +101,22 @@ GroupBox::~GroupBox()
{
}
-void GroupBox::dragMoveEvent( QDragMoveEvent *e )
+void GroupBox::dragMoveEvent( TQDragMoveEvent *e )
{
- QGroupBox::dragMoveEvent(e);
+ TQGroupBox::dragMoveEvent(e);
emit handleDragMoveEvent(e);
}
-void GroupBox::dropEvent( QDropEvent *e )
+void GroupBox::dropEvent( TQDropEvent *e )
{
- QGroupBox::dropEvent(e);
+ TQGroupBox::dropEvent(e);
emit handleDropEvent(e);
}
////////////////////////
-KFDTabWidget::KFDTabWidget(QWidget *parent, const char *name)
- : KFormDesigner::TabWidget(parent, name)
+KFDTabWidget::KFDTabWidget(TQWidget *tqparent, const char *name)
+ : KFormDesigner::TabWidget(tqparent, name)
{
}
@@ -124,17 +124,17 @@ KFDTabWidget::~KFDTabWidget()
{
}
-QSize
-KFDTabWidget::sizeHint() const
+TQSize
+KFDTabWidget::tqsizeHint() const
{
- QSize s(30,30); // default min size
+ TQSize s(30,30); // default min size
for(int i=0; i < count(); i++)
s = s.expandedTo( KFormDesigner::getSizeFromChildren(page(i)) );
- return s + QSize(10/*margin*/, tabBar()->height() + 20/*margin*/);
+ return s + TQSize(10/*margin*/, tabBar()->height() + 20/*margin*/);
}
-void KFDTabWidget::dragMoveEvent( QDragMoveEvent *e )
+void KFDTabWidget::dragMoveEvent( TQDragMoveEvent *e )
{
TabWidgetBase::dragMoveEvent( e );
if (dynamic_cast<ContainerWidget*>(currentPage()))
@@ -142,7 +142,7 @@ void KFDTabWidget::dragMoveEvent( QDragMoveEvent *e )
emit handleDragMoveEvent(e);
}
-void KFDTabWidget::dropEvent( QDropEvent *e )
+void KFDTabWidget::dropEvent( TQDropEvent *e )
{
TabWidgetBase::dropEvent( e );
if (dynamic_cast<ContainerWidget*>(currentPage()))
@@ -150,90 +150,90 @@ void KFDTabWidget::dropEvent( QDropEvent *e )
emit handleDropEvent(e);
}
-/// Various layout widgets /////////////////:
+/// Various tqlayout widgets /////////////////:
-HBox::HBox(QWidget *parent, const char *name)
- : QFrame(parent, name), m_preview(false)
+HBox::HBox(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), m_preview(false)
{}
void
-HBox::paintEvent(QPaintEvent *)
+HBox::paintEvent(TQPaintEvent *)
{
if(m_preview) return;
- QPainter p(this);
- p.setPen(QPen(red, 2, Qt::DashLine));
+ TQPainter p(this);
+ p.setPen(TQPen(red, 2, TQt::DashLine));
p.drawRect(1, 1, width()-1, height() - 1);
}
-VBox::VBox(QWidget *parent, const char *name)
- : QFrame(parent, name), m_preview(false)
+VBox::VBox(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), m_preview(false)
{}
void
-VBox::paintEvent(QPaintEvent *)
+VBox::paintEvent(TQPaintEvent *)
{
if(m_preview) return;
- QPainter p(this);
- p.setPen(QPen(blue, 2, Qt::DashLine));
+ TQPainter p(this);
+ p.setPen(TQPen(blue, 2, TQt::DashLine));
p.drawRect(1, 1, width()-1, height() - 1);
}
-Grid::Grid(QWidget *parent, const char *name)
- : QFrame(parent, name), m_preview(false)
+Grid::Grid(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), m_preview(false)
{}
void
-Grid::paintEvent(QPaintEvent *)
+Grid::paintEvent(TQPaintEvent *)
{
if(m_preview) return;
- QPainter p(this);
- p.setPen(QPen(darkGreen, 2, Qt::DashLine));
+ TQPainter p(this);
+ p.setPen(TQPen(darkGreen, 2, TQt::DashLine));
p.drawRect(1, 1, width()-1, height() - 1);
}
-HFlow::HFlow(QWidget *parent, const char *name)
- : QFrame(parent, name), m_preview(false)
+HFlow::HFlow(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), m_preview(false)
{}
void
-HFlow::paintEvent(QPaintEvent *)
+HFlow::paintEvent(TQPaintEvent *)
{
if(m_preview) return;
- QPainter p(this);
- p.setPen(QPen(magenta, 2, Qt::DashLine));
+ TQPainter p(this);
+ p.setPen(TQPen(magenta, 2, TQt::DashLine));
p.drawRect(1, 1, width()-1, height() - 1);
}
-VFlow::VFlow(QWidget *parent, const char *name)
- : QFrame(parent, name), m_preview(false)
+VFlow::VFlow(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name), m_preview(false)
{}
void
-VFlow::paintEvent(QPaintEvent *)
+VFlow::paintEvent(TQPaintEvent *)
{
if(m_preview) return;
- QPainter p(this);
- p.setPen(QPen(cyan, 2, Qt::DashLine));
+ TQPainter p(this);
+ p.setPen(TQPen(cyan, 2, TQt::DashLine));
p.drawRect(1, 1, width()-1, height() - 1);
}
-QSize
-VFlow::sizeHint() const
+TQSize
+VFlow::tqsizeHint() const
{
- if(layout())
- return layout()->sizeHint();
+ if(tqlayout())
+ return tqlayout()->tqsizeHint();
else
- return QSize(700, 50); // default
+ return TQSize(700, 50); // default
}
/////// Tab related KCommand (to allow tab creation/deletion undoing)
-InsertPageCommand::InsertPageCommand(KFormDesigner::Container *container, QWidget *parent)
+InsertPageCommand::InsertPageCommand(KFormDesigner::Container *container, TQWidget *tqparent)
: KCommand()
{
m_containername = container->widget()->name();
m_form = container->form();
- m_parentname = parent->name();
+ m_parentname = tqparent->name();
m_pageid = -1;
}
@@ -241,31 +241,31 @@ void
InsertPageCommand::execute()
{
KFormDesigner::Container *container = m_form->objectTree()->lookup(m_containername)->container();
- QWidget *parent = m_form->objectTree()->lookup(m_parentname)->widget();
+ TQWidget *tqparent = m_form->objectTree()->lookup(m_parentname)->widget();
if(m_name.isEmpty()) {
m_name = container->form()->objectTree()->generateUniqueName(
- container->form()->library()->displayName("QWidget").latin1(),
+ container->form()->library()->displayName(TQWIDGET_OBJECT_NAME_STRING).latin1(),
/*!numberSuffixRequired*/false);
}
- QWidget *page = container->form()->library()->createWidget("QWidget", parent, m_name.latin1(), container);
-// QWidget *page = new ContainerWidget(parent, m_name.latin1());
-// new KFormDesigner::Container(container, page, parent);
+ TQWidget *page = container->form()->library()->createWidget(TQWIDGET_OBJECT_NAME_STRING, tqparent, m_name.latin1(), container);
+// TQWidget *page = new ContainerWidget(tqparent, m_name.latin1());
+// new KFormDesigner::Container(container, page, tqparent);
- QCString classname = parent->className();
+ TQCString classname = tqparent->className();
if(classname == "KFDTabWidget")
{
- TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent);
- QString n = i18n("Page %1").arg(tab->count() + 1);
+ TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(tqparent);
+ TQString n = i18n("Page %1").tqarg(tab->count() + 1);
tab->addTab(page, n);
tab->showPage(page);
KFormDesigner::ObjectTreeItem *item = container->form()->objectTree()->lookup(m_name);
item->addModifiedProperty("title", n);
}
- else if(classname == "QWidgetStack")
+ else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING)
{
- QWidgetStack *stack = (QWidgetStack*)parent;
+ TQWidgetStack *stack = (TQWidgetStack*)tqparent;
stack->addWidget(page, m_pageid);
stack->raiseWidget(page);
m_pageid = stack->id(page);
@@ -278,22 +278,22 @@ InsertPageCommand::execute()
void
InsertPageCommand::unexecute()
{
- QWidget *page = m_form->objectTree()->lookup(m_name)->widget();
- QWidget *parent = m_form->objectTree()->lookup(m_parentname)->widget();
+ TQWidget *page = m_form->objectTree()->lookup(m_name)->widget();
+ TQWidget *tqparent = m_form->objectTree()->lookup(m_parentname)->widget();
KFormDesigner::WidgetList list;
list.append(page);
KCommand *com = new KFormDesigner::DeleteWidgetCommand(list, m_form);
- QCString classname = parent->className();
+ TQCString classname = tqparent->className();
if(classname == "KFDTabWidget")
{
- TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(parent);
+ TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(tqparent);
tab->removePage(page);
}
- else if(classname == "QWidgetStack")
+ else if(classname == TQWIDGETSTACK_OBJECT_NAME_STRING)
{
- QWidgetStack *stack = (QWidgetStack*)parent;
+ TQWidgetStack *stack = (TQWidgetStack*)tqparent;
int id = stack->id(page) - 1;
while(!stack->widget(id))
id--;
@@ -306,7 +306,7 @@ InsertPageCommand::unexecute()
delete com;
}
-QString
+TQString
InsertPageCommand::name() const
{
return i18n("Add Page");
@@ -314,20 +314,20 @@ InsertPageCommand::name() const
/////// Sub forms ////////////////////////:
-SubForm::SubForm(QWidget *parent, const char *name)
-: QScrollView(parent, name), m_form(0), m_widget(0)
+SubForm::SubForm(TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
}
void
-SubForm::setFormName(const QString &name)
+SubForm::setFormName(const TQString &name)
{
if(name.isEmpty())
return;
- QFileInfo info(name);
+ TQFileInfo info(name);
if(!info.exists()
|| (KFormDesigner::FormManager::self()->activeForm()
&& (info.fileName() == KFormDesigner::FormManager::self()->activeForm()->filename()) ) )
@@ -335,7 +335,7 @@ SubForm::setFormName(const QString &name)
// we create the container widget
delete m_widget;
- m_widget = new QWidget(viewport(), "subform_widget");
+ m_widget = new TQWidget(viewport(), "subform_widget");
// m_widget->show();
addChild(m_widget);
m_form = new KFormDesigner::Form(
@@ -352,12 +352,12 @@ SubForm::setFormName(const QString &name)
///// The factory /////////////////////////
-ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, "containers")
+ContainerFactory::ContainerFactory(TQObject *tqparent, const char *, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, "containers")
{
KFormDesigner::WidgetInfo *wBtnGroup = new KFormDesigner::WidgetInfo(this);
wBtnGroup->setPixmap("frame");
- wBtnGroup->setClassName("QButtonGroup");
+ wBtnGroup->setClassName(TQBUTTONGROUP_OBJECT_NAME_STRING);
wBtnGroup->setName(i18n("Button Group"));
wBtnGroup->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "buttonGroup"));
@@ -369,11 +369,11 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
wTabWidget->setClassName("KFDTabWidget");
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
wTabWidget->addAlternateClassName("KTabWidget");
- wTabWidget->addAlternateClassName("QTabWidget");
-//tmp: wTabWidget->setSavingName("QTabWidget");
+ wTabWidget->addAlternateClassName(TQTABWIDGET_OBJECT_NAME_STRING);
+//tmp: wTabWidget->setSavingName(TQTABWIDGET_OBJECT_NAME_STRING);
wTabWidget->setSavingName("KTabWidget");
#else
- wTabWidget->setSavingName("QTabWidget");
+ wTabWidget->setSavingName(TQTABWIDGET_OBJECT_NAME_STRING);
#endif
wTabWidget->setIncludeFileName("ktabwidget.h");
wTabWidget->setName(i18n("Tab Widget"));
@@ -384,7 +384,7 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wWidget = new KFormDesigner::WidgetInfo(this);
wWidget->setPixmap("frame");
- wWidget->setClassName("QWidget");
+ wWidget->setClassName(TQWIDGET_OBJECT_NAME_STRING);
wWidget->addAlternateClassName("ContainerWidget");
wWidget->setName(i18n("Basic container"));
wWidget->setNamePrefix(
@@ -394,7 +394,7 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wGroupBox = new KFormDesigner::WidgetInfo(this);
wGroupBox->setPixmap("groupbox");
- wGroupBox->setClassName("QGroupBox");
+ wGroupBox->setClassName(TQGROUPBOX_OBJECT_NAME_STRING);
wGroupBox->addAlternateClassName("GroupBox");
wGroupBox->setName(i18n("Group Box"));
wGroupBox->setNamePrefix(
@@ -404,7 +404,7 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wFrame = new KFormDesigner::WidgetInfo(this);
wFrame->setPixmap("frame");
- wFrame->setClassName("QFrame");
+ wFrame->setClassName(TQFRAME_OBJECT_NAME_STRING);
wFrame->setName(i18n("Frame"));
wFrame->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "frame"));
@@ -413,7 +413,7 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wWidgetStack = new KFormDesigner::WidgetInfo(this);
wWidgetStack->setPixmap("widgetstack");
- wWidgetStack->setClassName("QWidgetStack");
+ wWidgetStack->setClassName(TQWIDGETSTACK_OBJECT_NAME_STRING);
wWidgetStack->setName(i18n("Widget Stack"));
wWidgetStack->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "widgetStack"));
@@ -451,11 +451,11 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
//! @todo horizontal/vertical splitter icons
wSplitter->setPixmap("frame");
wSplitter->setClassName("Splitter");
- wSplitter->addAlternateClassName("QSplitter");
+ wSplitter->addAlternateClassName(TQSPLITTER_OBJECT_NAME_STRING);
wSplitter->setName(i18n("Splitter"));
wSplitter->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "splitter"));
- wSplitter->setDescription(i18n("A container that enables user to resize its children"));
+ wSplitter->setDescription(i18n("A container that enables user to resize its tqchildren"));
addClass(wSplitter);
KFormDesigner::WidgetInfo *wHFlow = new KFormDesigner::WidgetInfo(this);
@@ -504,14 +504,14 @@ ContainerFactory::ContainerFactory(QObject *parent, const char *, const QStringL
m_propValDesc["Triangular"] = i18n("for Tab Shape", "Triangular");
}
-QWidget*
-ContainerFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+ContainerFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
- if(c == "QButtonGroup")
+ if(c == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
- QString text = container->form()->library()->textForWidgetName(n, c);
- QButtonGroup *w = new QButtonGroup(/*i18n("Button Group")*/text, p, n);
+ TQString text = container->form()->library()->textForWidgetName(n, c);
+ TQButtonGroup *w = new TQButtonGroup(/*i18n("Button Group")*/text, p, n);
new KFormDesigner::Container(container, w, container);
return w;
}
@@ -520,7 +520,7 @@ ContainerFactory::createWidget(const QCString &c, QWidget *p, const char *n,
KFDTabWidget *tab = new KFDTabWidget(p, n);
#if defined(USE_KTabWidget) && KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
tab->setTabReorderingEnabled(true);
- connect(tab, SIGNAL(movedTab(int,int)), this, SLOT(reorderTabs(int,int)));
+ connect(tab, TQT_SIGNAL(movedTab(int,int)), this, TQT_SLOT(reorderTabs(int,int)));
#endif
container->form()->objectTree()->addItem(container->objectTree(),
new KFormDesigner::ObjectTreeItem(
@@ -538,32 +538,32 @@ ContainerFactory::createWidget(const QCString &c, QWidget *p, const char *n,
return tab;
}
- else if(c == "QWidget" || c=="ContainerWidget")
+ else if(c == TQWIDGET_OBJECT_NAME_STRING || c=="ContainerWidget")
{
- QWidget *w = new ContainerWidget(p, n);
- new KFormDesigner::Container(container, w, p);
+ TQWidget *w = new ContainerWidget(p, n);
+ new KFormDesigner::Container(container, w, TQT_TQOBJECT(p));
return w;
}
- else if(c == "QGroupBox" || c == "GroupBox")
+ else if(c == TQGROUPBOX_OBJECT_NAME_STRING || c == "GroupBox")
{
- QString text = container->form()->library()->textForWidgetName(n, c);
- QGroupBox *w = new GroupBox(text, p, n);
+ TQString text = container->form()->library()->textForWidgetName(n, c);
+ TQGroupBox *w = new GroupBox(text, p, n);
new KFormDesigner::Container(container, w, container);
return w;
}
- else if(c == "QFrame")
+ else if(c == TQFRAME_OBJECT_NAME_STRING)
{
- QFrame *w = new QFrame(p, n);
+ TQFrame *w = new TQFrame(p, n);
w->setLineWidth(2);
- w->setFrameStyle(QFrame::StyledPanel|QFrame::Raised);
+ w->setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
new KFormDesigner::Container(container, w, container);
return w;
}
- else if(c == "QWidgetStack")
+ else if(c == TQWIDGETSTACK_OBJECT_NAME_STRING)
{
- QWidgetStack *stack = new QWidgetStack(p, n);
+ TQWidgetStack *stack = new TQWidgetStack(p, n);
stack->setLineWidth(2);
- stack->setFrameStyle(QFrame::StyledPanel|QFrame::Raised);
+ stack->setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
container->form()->objectTree()->addItem( container->objectTree(),
new KFormDesigner::ObjectTreeItem(
container->form()->library()->displayName(c), n, stack, container));
@@ -606,8 +606,8 @@ ContainerFactory::createWidget(const QCString &c, QWidget *p, const char *n,
SubForm *subform = new SubForm(p, n);
return subform;
}
- else if(c == "QSplitter") {
- QSplitter *split = new QSplitter(p, n);
+ else if(c == TQSPLITTER_OBJECT_NAME_STRING) {
+ TQSplitter *split = new TQSplitter(p, n);
if (0 == (options & WidgetFactory::AnyOrientation))
split->setOrientation(
(options & WidgetFactory::VerticalOrientation) ? Qt::Vertical : Qt::Horizontal);
@@ -619,14 +619,14 @@ ContainerFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-ContainerFactory::previewWidget(const QCString &classname, QWidget *widget, KFormDesigner::Container *container)
+ContainerFactory::previewWidget(const TQCString &classname, TQWidget *widget, KFormDesigner::Container *container)
{
if(classname == "WidgetStack")
{
- QWidgetStack *stack = ((QWidgetStack*)widget);
+ TQWidgetStack *stack = ((TQWidgetStack*)widget);
KFormDesigner::ObjectTreeItem *tree = container->form()->objectTree()->lookup(widget->name());
- if(!tree->modifiedProperties()->contains("frameShape"))
- stack->setFrameStyle(QFrame::NoFrame);
+ if(!tree->modifiedProperties()->tqcontains("frameShape"))
+ stack->setFrameStyle(TQFrame::NoFrame);
}
else if(classname == "HBox")
((HBox*)widget)->setPreviewMode();
@@ -644,53 +644,53 @@ ContainerFactory::previewWidget(const QCString &classname, QWidget *widget, KFor
}
bool
-ContainerFactory::createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ContainerFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container)
{
setWidget(w, container);
//m_widget = w;
// m_container = container;
- if((classname == "KFDTabWidget") || (w->parentWidget()->parentWidget()->inherits("QTabWidget")))
+ if((classname == "KFDTabWidget") || (w->tqparentWidget()->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
{
- if(w->parentWidget()->parentWidget()->inherits("QTabWidget"))
+ if(w->tqparentWidget()->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
{
- //m_widget = w->parentWidget()->parentWidget();
- setWidget(w->parentWidget()->parentWidget(), m_container->toplevel());
+ //m_widget = w->tqparentWidget()->tqparentWidget();
+ setWidget(w->tqparentWidget()->tqparentWidget(), m_container->toplevel());
// m_container = m_container->toplevel();
}
- int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, SLOT(addTabPage()) );
- id = menu->insertItem(SmallIconSet("edit"), i18n("Rename Page..."), this, SLOT(renameTabPage()));
- id = menu->insertItem(SmallIconSet("tab_remove"), i18n("Remove Page"), this, SLOT(removeTabPage()));
+ int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, TQT_SLOT(addTabPage()) );
+ id = menu->insertItem(SmallIconSet("edit"), i18n("Rename Page..."), this, TQT_SLOT(renameTabPage()));
+ id = menu->insertItem(SmallIconSet("tab_remove"), i18n("Remove Page"), this, TQT_SLOT(removeTabPage()));
// if( dynamic_cast<TabWidgetBase*>(m_widget)->count() == 1)
if( dynamic_cast<TabWidgetBase*>(widget())->count() == 1)
menu->setItemEnabled(id, false);
return true;
}
- else if(w->parentWidget()->isA("QWidgetStack") && !w->parentWidget()->parentWidget()->inherits("QTabWidget"))
+ else if(w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING) && !w->tqparentWidget()->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
{
- //m_widget = w->parentWidget();
- QWidgetStack *stack = (QWidgetStack*)w->parentWidget(); //m_widget;
+ //m_widget = w->tqparentWidget();
+ TQWidgetStack *stack = (TQWidgetStack*)w->tqparentWidget(); //m_widget;
setWidget(
- w->parentWidget(),
- container->form()->objectTree()->lookup(stack->name())->parent()->container()
+ w->tqparentWidget(),
+ container->form()->objectTree()->lookup(stack->name())->tqparent()->container()
);
-// m_container = container->form()->objectTree()->lookup(m_widget->name())->parent()->container();
-// m_container = container->form()->objectTree()->lookup(stack->name())->parent()->container();
+// m_container = container->form()->objectTree()->lookup(m_widget->name())->tqparent()->container();
+// m_container = container->form()->objectTree()->lookup(stack->name())->tqparent()->container();
- int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, SLOT(addStackPage()) );
+ int id = menu->insertItem(SmallIconSet("tab_new"), i18n("Add Page"), this, TQT_SLOT(addStackPage()) );
- id = menu->insertItem(SmallIconSet("tab_remove"), i18n("Remove Page"), this, SLOT(removeStackPage()) );
-// if( ((QWidgetStack*)m_widget)->children()->count() == 4) // == the stack has only one page
- if(stack->children()->count() == 4) // == the stack has only one page
+ id = menu->insertItem(SmallIconSet("tab_remove"), i18n("Remove Page"), this, TQT_SLOT(removeStackPage()) );
+// if( ((TQWidgetStack*)m_widget)->tqchildren()->count() == 4) // == the stack has only one page
+ if(stack->childrenListObject().count() == 4) // == the stack has only one page
menu->setItemEnabled(id, false);
- id = menu->insertItem(SmallIconSet("next"), i18n("Jump to Next Page"), this, SLOT(nextStackPage()));
+ id = menu->insertItem(SmallIconSet("next"), i18n("Jump to Next Page"), this, TQT_SLOT(nextStackPage()));
if(!stack->widget(stack->id(stack->visibleWidget())+1))
menu->setItemEnabled(id, false);
- id = menu->insertItem(SmallIconSet("previous"), i18n("Jump to Previous Page"), this, SLOT(prevStackPage()));
+ id = menu->insertItem(SmallIconSet("previous"), i18n("Jump to Previous Page"), this, TQT_SLOT(prevStackPage()));
if(!stack->widget(stack->id(stack->visibleWidget()) -1) )
menu->setItemEnabled(id, false);
return true;
@@ -699,38 +699,38 @@ ContainerFactory::createMenuActions(const QCString &classname, QWidget *w, QPopu
}
bool
-ContainerFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container)
+ContainerFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
- if(classname == "QButtonGroup")
+ if(classname == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
- QButtonGroup *group = static_cast<QButtonGroup*>(w);
- QRect r = QRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
- createEditor(classname, group->title(), group, container, r, Qt::AlignAuto);
+ TQButtonGroup *group = static_cast<TQButtonGroup*>(w);
+ TQRect r = TQRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
+ createEditor(classname, group->title(), group, container, r, TQt::AlignAuto);
return true;
}
- if(classname == "QGroupBox" || classname == "GroupBox")
+ if(classname == TQGROUPBOX_OBJECT_NAME_STRING || classname == "GroupBox")
{
- QGroupBox *group = static_cast<QGroupBox*>(w);
- QRect r = QRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
- createEditor(classname, group->title(), group, container, r, Qt::AlignAuto);
+ TQGroupBox *group = static_cast<TQGroupBox*>(w);
+ TQRect r = TQRect(group->x()+2, group->y()-5, group->width()-10, w->fontMetrics().height() + 10);
+ createEditor(classname, group->title(), group, container, r, TQt::AlignAuto);
return true;
}
return false;
}
bool
-ContainerFactory::saveSpecialProperty(const QCString &, const QString &name, const QVariant &, QWidget *w, QDomElement &parentNode, QDomDocument &parent)
+ContainerFactory::saveSpecialProperty(const TQCString &, const TQString &name, const TQVariant &, TQWidget *w, TQDomElement &tqparentNode, TQDomDocument &tqparent)
{
- if((name == "title") && (w->parentWidget()->parentWidget()->inherits("QTabWidget")))
+ if((name == "title") && (w->tqparentWidget()->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
{
- TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget()->parentWidget());
- KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "title", tab->tabLabel(w));
+ TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->tqparentWidget()->tqparentWidget());
+ KFormDesigner::FormIO::savePropertyElement(tqparentNode, tqparent, "attribute", "title", tab->tabLabel(w));
}
- else if((name == "id") && (w->parentWidget()->isA("QWidgetStack")))
+ else if((name == "id") && (w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)))
{
- QWidgetStack *stack = (QWidgetStack*)w->parentWidget();
- KFormDesigner::FormIO::savePropertyElement(parentNode, parent, "attribute", "id", stack->id(w));
+ TQWidgetStack *stack = (TQWidgetStack*)w->tqparentWidget();
+ KFormDesigner::FormIO::savePropertyElement(tqparentNode, tqparent, "attribute", "id", stack->id(w));
}
else
return false;
@@ -738,21 +738,21 @@ ContainerFactory::saveSpecialProperty(const QCString &, const QString &name, con
}
bool
-ContainerFactory::readSpecialProperty(const QCString &, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item)
+ContainerFactory::readSpecialProperty(const TQCString &, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item)
{
- QString name = node.attribute("name");
- if((name == "title") && (item->parent()->widget()->inherits("QTabWidget")))
+ TQString name = node.attribute("name");
+ if((name == "title") && (item->tqparent()->widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING)))
{
- TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->parentWidget());
+ TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(w->tqparentWidget());
tab->addTab(w, node.firstChild().toElement().text());
item->addModifiedProperty("title", node.firstChild().toElement().text());
return true;
}
- if((name == "id") && (w->parentWidget()->isA("QWidgetStack")))
+ if((name == "id") && (w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING)))
{
- QWidgetStack *stack = (QWidgetStack*)w->parentWidget();
- int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), w, name).toInt();
+ TQWidgetStack *stack = (TQWidgetStack*)w->tqparentWidget();
+ int id = KFormDesigner::FormIO::readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt();
stack->addWidget(w, id);
stack->raiseWidget(w);
item->addModifiedProperty("id", id);
@@ -762,20 +762,20 @@ ContainerFactory::readSpecialProperty(const QCString &, QDomElement &node, QWidg
return false;
}
-QValueList<QCString>
-ContainerFactory::autoSaveProperties(const QCString &c)
+TQValueList<TQCString>
+ContainerFactory::autoSaveProperties(const TQCString &c)
{
- QValueList<QCString> lst;
+ TQValueList<TQCString> lst;
// if(c == "SubForm")
// lst << "formName";
- if(c == "QSplitter")
+ if(c == TQSPLITTER_OBJECT_NAME_STRING)
lst << "orientation";
return lst;
}
bool
-ContainerFactory::isPropertyVisibleInternal(const QCString &classname,
- QWidget *w, const QCString &property, bool isTopLevel)
+ContainerFactory::isPropertyVisibleInternal(const TQCString &classname,
+ TQWidget *w, const TQCString &property, bool isTopLevel)
{
bool ok = true;
@@ -784,7 +784,7 @@ ContainerFactory::isPropertyVisibleInternal(const QCString &classname,
{
return property == "name" || property == "geometry";
}
- else if (classname == "QGroupBox" || classname=="GroupBox") {
+ else if (classname == TQGROUPBOX_OBJECT_NAME_STRING || classname=="GroupBox") {
ok =
#ifdef KEXI_NO_UNFINISHED
/*! @todo Hidden for now in Kexi. "checkable" and "checked" props need adding
@@ -803,16 +803,16 @@ child widgets become frozen when checked==true */
}
bool
-ContainerFactory::changeText(const QString &text)
+ContainerFactory::changeText(const TQString &text)
{
changeProperty("title", text, m_container->form());
return true;
}
void
-ContainerFactory::resizeEditor(QWidget *editor, QWidget *widget, const QCString &)
+ContainerFactory::resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &)
{
- QSize s = widget->size();
+ TQSize s = widget->size();
editor->move(widget->x() + 2, widget->y() - 5);
editor->resize(s.width() - 20, widget->fontMetrics().height() +10);
}
@@ -821,8 +821,8 @@ ContainerFactory::resizeEditor(QWidget *editor, QWidget *widget, const QCString
void ContainerFactory::addTabPage()
{
-// if (!m_widget->inherits("QTabWidget"))
- if (!widget()->inherits("QTabWidget"))
+// if (!m_widget->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
return;
KCommand *com = new InsertPageCommand(m_container, widget());
if(dynamic_cast<TabWidgetBase*>(widget())->count() == 0)
@@ -836,10 +836,10 @@ void ContainerFactory::addTabPage()
void ContainerFactory::removeTabPage()
{
- if (!widget()->inherits("QTabWidget"))
+ if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
return;
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(widget());
- QWidget *w = tab->currentPage();
+ TQWidget *w = tab->currentPage();
KFormDesigner::WidgetList list;
list.append(w);
@@ -850,17 +850,17 @@ void ContainerFactory::removeTabPage()
void ContainerFactory::renameTabPage()
{
- if (!widget()->inherits("QTabWidget"))
+ if (!widget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
return;
TabWidgetBase *tab = dynamic_cast<TabWidgetBase*>(widget());
- QWidget *w = tab->currentPage();
+ TQWidget *w = tab->currentPage();
bool ok;
- QString name = KInputDialog::getText(i18n("New Page Title"), i18n("Enter a new title for the current page:"),
+ TQString name = KInputDialog::getText(i18n("New Page Title"), i18n("Enter a new title for the current page:"),
#if KDE_VERSION < KDE_MAKE_VERSION(3,1,9)
- QLineEdit::Normal,
+ TQLineEdit::Normal,
#endif
- tab->tabLabel(w), &ok, w->topLevelWidget());
+ tab->tabLabel(w), &ok, w->tqtopLevelWidget());
if(ok)
tab->changeTab(w, name);
}
@@ -868,20 +868,20 @@ void ContainerFactory::renameTabPage()
void ContainerFactory::reorderTabs(int oldpos, int newpos)
{
KFormDesigner::ObjectTreeItem *tab
- = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(sender()->name());
+ = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name());
if(!tab)
return;
- KFormDesigner::ObjectTreeItem *item = tab->children()->take(oldpos);
- tab->children()->insert(newpos, item);
+ KFormDesigner::ObjectTreeItem *item = tab->tqchildren()->take(oldpos);
+ tab->tqchildren()->insert(newpos, item);
}
void ContainerFactory::addStackPage()
{
- if (!widget()->isA("QWidgetStack"))
+ if (!widget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
return;
KCommand *com = new InsertPageCommand(m_container, widget());
- if(!((QWidgetStack*)widget())->visibleWidget())
+ if(!((TQWidgetStack*)widget())->visibleWidget())
{
com->execute();
delete com;
@@ -892,10 +892,10 @@ void ContainerFactory::addStackPage()
void ContainerFactory::removeStackPage()
{
- if (!widget()->isA("QWidgetStack"))
+ if (!widget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
return;
- QWidgetStack *stack = (QWidgetStack*)widget();
- QWidget *page = stack->visibleWidget();
+ TQWidgetStack *stack = (TQWidgetStack*)widget();
+ TQWidget *page = stack->visibleWidget();
KFormDesigner::WidgetList list;
list.append(page);
@@ -913,7 +913,7 @@ void ContainerFactory::removeStackPage()
void ContainerFactory::prevStackPage()
{
- QWidgetStack *stack = (QWidgetStack*)widget();
+ TQWidgetStack *stack = (TQWidgetStack*)widget();
int id = stack->id(stack->visibleWidget()) - 1;
if(stack->widget(id))
stack->raiseWidget(id);
@@ -921,7 +921,7 @@ void ContainerFactory::prevStackPage()
void ContainerFactory::nextStackPage()
{
- QWidgetStack *stack = (QWidgetStack*)widget();
+ TQWidgetStack *stack = (TQWidgetStack*)widget();
int id = stack->id(stack->visibleWidget()) + 1;
if(stack->widget(id))
stack->raiseWidget(id);
diff --git a/kexi/formeditor/factories/containerfactory.h b/kexi/formeditor/factories/containerfactory.h
index 1092d8524..b8623fad6 100644
--- a/kexi/formeditor/factories/containerfactory.h
+++ b/kexi/formeditor/factories/containerfactory.h
@@ -37,220 +37,230 @@ namespace KFormDesigner
class InsertPageCommand : public KCommand
{
public:
- InsertPageCommand(KFormDesigner::Container *container, QWidget *widget);
+ InsertPageCommand(KFormDesigner::Container *container, TQWidget *widget);
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
KFormDesigner::Form *m_form;
- QString m_containername;
- QString m_name;
- QString m_parentname;
+ TQString m_containername;
+ TQString m_name;
+ TQString m_parentname;
int m_pageid;
};
//! Helper widget (used when using 'Lay out horizontally')
-class KFORMEDITOR_EXPORT HBox : public QFrame
+class KFORMEDITOR_EXPORT HBox : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- HBox(QWidget *parent, const char *name);
+ HBox(TQWidget *tqparent, const char *name);
virtual ~HBox(){;}
void setPreviewMode() {m_preview = true;}
- virtual void paintEvent(QPaintEvent *ev);
+ virtual void paintEvent(TQPaintEvent *ev);
protected:
bool m_preview;
};
//! Helper widget (used when using 'Lay out vertically')
-class KFORMEDITOR_EXPORT VBox : public QFrame
+class KFORMEDITOR_EXPORT VBox : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VBox(QWidget *parent, const char *name);
+ VBox(TQWidget *tqparent, const char *name);
virtual ~VBox(){;}
void setPreviewMode() {m_preview = true;}
- virtual void paintEvent(QPaintEvent *ev);
+ virtual void paintEvent(TQPaintEvent *ev);
protected:
bool m_preview;
};
//! Helper widget (used when using 'Lay out in a grid')
-class KFORMEDITOR_EXPORT Grid : public QFrame
+class KFORMEDITOR_EXPORT Grid : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- Grid(QWidget *parent, const char *name);
+ Grid(TQWidget *tqparent, const char *name);
virtual ~Grid(){;}
void setPreviewMode() {m_preview = true;}
- virtual void paintEvent(QPaintEvent *ev);
+ virtual void paintEvent(TQPaintEvent *ev);
protected:
bool m_preview;
};
//! Helper widget (used when using 'Lay out with horizontal flow')
-class KFORMEDITOR_EXPORT HFlow : public QFrame
+class KFORMEDITOR_EXPORT HFlow : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- HFlow(QWidget *parent, const char *name);
+ HFlow(TQWidget *tqparent, const char *name);
virtual ~HFlow(){;}
void setPreviewMode() {m_preview = true;}
- virtual void paintEvent(QPaintEvent *ev);
+ virtual void paintEvent(TQPaintEvent *ev);
protected:
bool m_preview;
};
//! Helper widget (used when using 'Lay out with horizontal flow')
-class KFORMEDITOR_EXPORT VFlow : public QFrame
+class KFORMEDITOR_EXPORT VFlow : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VFlow(QWidget *parent, const char *name);
+ VFlow(TQWidget *tqparent, const char *name);
virtual ~VFlow(){;}
void setPreviewMode() {m_preview = true;}
- virtual void paintEvent(QPaintEvent *ev);
- virtual QSize sizeHint() const;
+ virtual void paintEvent(TQPaintEvent *ev);
+ virtual TQSize tqsizeHint() const;
protected:
bool m_preview;
};
//! A simple container widget
-class KFORMEDITOR_EXPORT ContainerWidget : public QWidget
+class KFORMEDITOR_EXPORT ContainerWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
friend class KFDTabWidget;
public:
- ContainerWidget(QWidget *parent, const char *name);
+ ContainerWidget(TQWidget *tqparent, const char *name);
virtual ~ContainerWidget();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
signals:
//! Needed to control dragging over the container's surface
- void handleDragMoveEvent(QDragMoveEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
//! Needed to control dropping on the container's surface
- void handleDropEvent(QDropEvent *e);
+ void handleDropEvent(TQDropEvent *e);
};
//! A tab widget
class KFORMEDITOR_EXPORT KFDTabWidget : public KFormDesigner::TabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KFDTabWidget(QWidget *parent, const char *name);
+ KFDTabWidget(TQWidget *tqparent, const char *name);
virtual ~KFDTabWidget();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
signals:
//! Needed to control dragging over the container's surface
- void handleDragMoveEvent(QDragMoveEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
//! Needed to control dropping on the container's surface
- void handleDropEvent(QDropEvent *e);
+ void handleDropEvent(TQDropEvent *e);
};
//! A group box widget
-class KFORMEDITOR_EXPORT GroupBox : public QGroupBox
+class KFORMEDITOR_EXPORT GroupBox : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- GroupBox(const QString & title, QWidget *parent, const char *name);
+ GroupBox(const TQString & title, TQWidget *tqparent, const char *name);
virtual ~GroupBox();
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
signals:
//! Needed to control dragging over the container's surface
- void handleDragMoveEvent(QDragMoveEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
//! Needed to control dropping on the container's surface
- void handleDropEvent(QDropEvent *e);
+ void handleDropEvent(TQDropEvent *e);
};
//! A form embedded as a widget inside other form
-class KFORMEDITOR_EXPORT SubForm : public QScrollView
+class KFORMEDITOR_EXPORT SubForm : public TQScrollView
{
Q_OBJECT
- Q_PROPERTY(QString formName READ formName WRITE setFormName DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString formName READ formName WRITE setFormName DESIGNABLE true)
public:
- SubForm(QWidget *parent, const char *name);
+ SubForm(TQWidget *tqparent, const char *name);
~SubForm() {}
//! \return the name of the subform inside the db
- QString formName() const { return m_formName; }
- void setFormName(const QString &name);
+ TQString formName() const { return m_formName; }
+ void setFormName(const TQString &name);
private:
// KFormDesigner::FormManager *m_manager;
KFormDesigner::Form *m_form;
- QWidget *m_widget;
- QString m_formName;
+ TQWidget *m_widget;
+ TQString m_formName;
};
//! Standard Factory for all container widgets
class ContainerFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- ContainerFactory(QObject *parent, const char *name, const QStringList &args);
+ ContainerFactory(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~ContainerFactory();
- virtual QWidget *createWidget(const QCString & classname, QWidget *parent, const char *name, KFormDesigner::Container *container,
+ virtual TQWidget *createWidget(const TQCString & classname, TQWidget *tqparent, const char *name, KFormDesigner::Container *container,
int options = DefaultOptions);
- virtual bool createMenuActions(const QCString& classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString& classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w,
+ virtual bool startEditing(const TQCString &classname, TQWidget *w,
KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &classname, QWidget *widget,
+ virtual bool previewWidget(const TQCString &classname, TQWidget *widget,
KFormDesigner::Container *container);
- virtual bool saveSpecialProperty(const QCString &classname, const QString &name,
- const QVariant &value, QWidget *w, QDomElement &parentNode, QDomDocument &parent);
- virtual bool readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w,
+ virtual bool saveSpecialProperty(const TQCString &classname, const TQString &name,
+ const TQVariant &value, TQWidget *w, TQDomElement &tqparentNode, TQDomDocument &tqparent);
+ virtual bool readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w,
KFormDesigner::ObjectTreeItem *item);
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
protected:
- virtual bool isPropertyVisibleInternal(const QCString &classname, QWidget *w,
- const QCString &property, bool isTopLevel);
- virtual bool changeText(const QString &newText);
- virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
+ virtual bool isPropertyVisibleInternal(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool isTopLevel);
+ virtual bool changeText(const TQString &newText);
+ virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
public slots:
void addTabPage();
@@ -263,7 +273,7 @@ class ContainerFactory : public KFormDesigner::WidgetFactory
void reorderTabs(int oldpos, int newpos);
private:
-// QWidget *m_widget;
+// TQWidget *m_widget;
// KFormDesigner::Container *m_container;
// KFormDesigner::FormManager *m_manager;
};
diff --git a/kexi/formeditor/factories/stdwidgetfactory.cpp b/kexi/formeditor/factories/stdwidgetfactory.cpp
index fade100a3..b625c7121 100644
--- a/kexi/formeditor/factories/stdwidgetfactory.cpp
+++ b/kexi/formeditor/factories/stdwidgetfactory.cpp
@@ -7,19 +7,19 @@
* License, or (at your option) any later version. *
***************************************************************************/
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qslider.h>
-#include <qobjectlist.h>
-#include <qstring.h>
-#include <qvariant.h>
-#include <qheader.h>
-#include <qdom.h>
-#include <qstyle.h>
-#include <qvaluevector.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqslider.h>
+#include <tqobjectlist.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqheader.h>
+#include <tqdom.h>
+#include <tqstyle.h>
+#include <tqvaluevector.h>
#include <klineedit.h>
#include <kpushbutton.h>
@@ -36,10 +36,10 @@
#include <kdeversion.h>
#if KDE_VERSION < KDE_MAKE_VERSION(3,1,9)
-# include <qdatetimeedit.h>
-# define KTimeWidget QTimeEdit
-# define KDateWidget QDateEdit
-# define KDateTimeWidget QDateTimeEdit
+# include <tqdatetimeedit.h>
+# define KTimeWidget TQTimeEdit
+# define KDateWidget TQDateEdit
+# define KDateTimeWidget TQDateTimeEdit
#else
# include <ktimewidget.h>
# include <kdatewidget.h>
@@ -57,26 +57,26 @@
#include "stdwidgetfactory.h"
// Some widgets subclass to allow event filtering and some other things
-KexiPictureLabel::KexiPictureLabel(const QPixmap &pix, QWidget *parent, const char *name)
- : QLabel(parent, name)
+KexiPictureLabel::KexiPictureLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name)
{
setPixmap(pix);
setScaledContents(false);
}
bool
-KexiPictureLabel::setProperty(const char *name, const QVariant &value)
+KexiPictureLabel::setProperty(const char *name, const TQVariant &value)
{
- if(QString(name) == "pixmap")
+ if(TQString(name) == "pixmap")
resize(value.toPixmap().height(), value.toPixmap().width());
- return QLabel::setProperty(name, value);
+ return TQLabel::setProperty(name, value);
}
-Line::Line(Qt::Orientation orient, QWidget *parent, const char *name)
- : QFrame(parent, name)
+Line::Line(Qt::Orientation orient, TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name)
{
setFrameShadow(Sunken);
- if(orient == Horizontal)
+ if(orient ==Qt::Horizontal)
setFrameShape(HLine);
else
setFrameShape(VLine);
@@ -85,7 +85,7 @@ Line::Line(Qt::Orientation orient, QWidget *parent, const char *name)
void
Line::setOrientation(Qt::Orientation orient)
{
- if(orient == Horizontal)
+ if(orient ==Qt::Horizontal)
setFrameShape(HLine);
else
setFrameShape(VLine);
@@ -95,15 +95,15 @@ Qt::Orientation
Line::orientation() const
{
if(frameShape() == HLine)
- return Horizontal;
+ return Qt::Horizontal;
else
- return Vertical;
+ return Qt::Vertical;
}
// The factory itself
-StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, "stdwidgets")
+StdWidgetFactory::StdWidgetFactory(TQObject *tqparent, const char *, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, "stdwidgets")
{
KFormDesigner::WidgetInfo *wFormWidget = new KFormDesigner::WidgetInfo(this);
wFormWidget->setPixmap("form");
@@ -125,7 +125,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wLabel = new KFormDesigner::WidgetInfo(this);
wLabel->setPixmap("label");
- wLabel->setClassName("QLabel");
+ wLabel->setClassName(TQLABEL_OBJECT_NAME_STRING);
wLabel->setName(i18n("Text Label"));
wLabel->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "label"));
@@ -136,8 +136,8 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
wPixLabel->setPixmap("pixmaplabel");
wPixLabel->setClassName("KexiPictureLabel");
wPixLabel->setName(i18n("Picture Label"));
-//! @todo Qt designer compatibility: maybe use this class when QLabel has a pixmap set...?
- //wPixLabel->addAlternateClassName("QLabel");
+//! @todo TQt designer compatibility: maybe use this class when TQLabel has a pixmap set...?
+ //wPixLabel->addAlternateClassName(TQLABEL_OBJECT_NAME_STRING);
wPixLabel->setSavingName("KexiPictureLabel");
wPixLabel->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "picture"));
@@ -147,7 +147,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wLineEdit = new KFormDesigner::WidgetInfo(this);
wLineEdit->setPixmap("lineedit");
wLineEdit->setClassName("KLineEdit");
- wLineEdit->addAlternateClassName("QLineEdit");
+ wLineEdit->addAlternateClassName(TQLINEEDIT_OBJECT_NAME_STRING);
wLineEdit->setIncludeFileName("klineedit.h");
wLineEdit->setName(i18n("Line Edit"));
wLineEdit->setNamePrefix(
@@ -167,7 +167,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wPushButton = new KFormDesigner::WidgetInfo(this);
wPushButton->setPixmap("button");
wPushButton->setClassName("KPushButton");
- wPushButton->addAlternateClassName("QPushButton");
+ wPushButton->addAlternateClassName(TQPUSHBUTTON_OBJECT_NAME_STRING);
wPushButton->setIncludeFileName("kpushbutton.h");
wPushButton->setName(i18n("Push Button"));
wPushButton->setNamePrefix(
@@ -177,7 +177,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wRadioButton = new KFormDesigner::WidgetInfo(this);
wRadioButton->setPixmap("radio");
- wRadioButton->setClassName("QRadioButton");
+ wRadioButton->setClassName(TQRADIOBUTTON_OBJECT_NAME_STRING);
wRadioButton->setName(i18n("Option Button"));
wRadioButton->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "optionButton"));
@@ -186,7 +186,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wCheckBox = new KFormDesigner::WidgetInfo(this);
wCheckBox->setPixmap("check");
- wCheckBox->setClassName("QCheckBox");
+ wCheckBox->setClassName(TQCHECKBOX_OBJECT_NAME_STRING);
wCheckBox->setName(i18n("Check Box"));
wCheckBox->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "checkBox"));
@@ -196,7 +196,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wSpinBox = new KFormDesigner::WidgetInfo(this);
wSpinBox->setPixmap("spin");
wSpinBox->setClassName("KIntSpinBox");
- wSpinBox->addAlternateClassName("QSpinBox");
+ wSpinBox->addAlternateClassName(TQSPINBOX_OBJECT_NAME_STRING);
wSpinBox->setIncludeFileName("knuminput.h");
wSpinBox->setName(i18n("Spin Box"));
wSpinBox->setNamePrefix(
@@ -207,7 +207,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wComboBox = new KFormDesigner::WidgetInfo(this);
wComboBox->setPixmap("combo");
wComboBox->setClassName("KComboBox");
- wComboBox->addAlternateClassName("QComboBox");
+ wComboBox->addAlternateClassName(TQCOMBOBOX_OBJECT_NAME_STRING);
wComboBox->setIncludeFileName("kcombobox.h");
wComboBox->setName(i18n("Combo Box"));
wComboBox->setNamePrefix(
@@ -218,7 +218,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wListBox = new KFormDesigner::WidgetInfo(this);
wListBox->setPixmap("listbox");
wListBox->setClassName("KListBox");
- wListBox->addAlternateClassName("QListBox");
+ wListBox->addAlternateClassName(TQLISTBOX_OBJECT_NAME_STRING);
wListBox->setIncludeFileName("klistbox.h");
wListBox->setName(i18n("List Box"));
wListBox->setNamePrefix(
@@ -229,7 +229,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wTextEdit = new KFormDesigner::WidgetInfo(this);
wTextEdit->setPixmap("textedit");
wTextEdit->setClassName("KTextEdit");
- wTextEdit->addAlternateClassName("QTextEdit");
+ wTextEdit->addAlternateClassName(TQTEXTEDIT_OBJECT_NAME_STRING);
wTextEdit->setIncludeFileName("ktextedit.h");
wTextEdit->setName(i18n("Text Editor"));
wTextEdit->setNamePrefix(
@@ -240,7 +240,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wListView = new KFormDesigner::WidgetInfo(this);
wListView->setPixmap("listview");
wListView->setClassName("KListView");
- wListView->addAlternateClassName("QListView");
+ wListView->addAlternateClassName(TQLISTVIEW_OBJECT_NAME_STRING);
wListView->setIncludeFileName("klistview.h");
wListView->setName(i18n("List View"));
wListView->setNamePrefix(
@@ -250,7 +250,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wSlider = new KFormDesigner::WidgetInfo(this);
wSlider->setPixmap("slider");
- wSlider->setClassName("QSlider");
+ wSlider->setClassName(TQSLIDER_OBJECT_NAME_STRING);
wSlider->setName(i18n("Slider"));
wSlider->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. It must _not_ contain white spaces and non latin1 characters.", "slider"));
@@ -260,7 +260,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
KFormDesigner::WidgetInfo *wProgressBar = new KFormDesigner::WidgetInfo(this);
wProgressBar->setPixmap("progress");
wProgressBar->setClassName("KProgress");
- wProgressBar->addAlternateClassName("QProgressBar");
+ wProgressBar->addAlternateClassName(TQPROGRESSBAR_OBJECT_NAME_STRING);
wProgressBar->setIncludeFileName("kprogress.h");
wProgressBar->setName(i18n("Progress Bar"));
wProgressBar->setNamePrefix(
@@ -281,7 +281,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
wDate->setPixmap("dateedit");
wDate->setClassName("KDateWidget");
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
- wDate->addAlternateClassName("QDateEdit");
+ wDate->addAlternateClassName(TQDATEEDIT_OBJECT_NAME_STRING);
wDate->setIncludeFileName("kdatewidget.h");
#endif
wDate->setName(i18n("Date Widget"));
@@ -294,7 +294,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
wTime->setPixmap("timeedit");
wTime->setClassName("KTimeWidget");
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
- wTime->addAlternateClassName("QTimeEdit");
+ wTime->addAlternateClassName(TQTIMEEDIT_OBJECT_NAME_STRING);
wTime->setIncludeFileName("ktimewidget.h");
#endif
wTime->setName(i18n("Time Widget"));
@@ -307,7 +307,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
wDateTime->setPixmap("datetimeedit");
wDateTime->setClassName("KDateTimeWidget");
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
- wDateTime->addAlternateClassName("QDateTimeEdit");
+ wDateTime->addAlternateClassName(TQDATETIMEEDIT_OBJECT_NAME_STRING);
wDateTime->setIncludeFileName("kdatetimewidget.h");
#endif
wDateTime->setName(i18n("Date/Time Widget"));
@@ -325,7 +325,7 @@ StdWidgetFactory::StdWidgetFactory(QObject *parent, const char *, const QStringL
i18n("Echo mode for Line Edit widget eg. Normal, NoEcho, Password","Echo Mode");
m_propDesc["indent"] = i18n("Indent");
//line
- m_propDesc["orientation"] = i18n("Orientation");
+ m_propDesc["orientation"] = i18n("Qt::Orientation");
//checkbox
m_propDesc["checked"] = i18n("Checked checkbox", "Checked");
m_propDesc["tristate"] = i18n("Tristate checkbox", "Tristate");
@@ -377,16 +377,16 @@ StdWidgetFactory::~StdWidgetFactory()
{
}
-QWidget*
-StdWidgetFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+StdWidgetFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
- QWidget *w=0;
- QString text( container->form()->library()->textForWidgetName(n, c) );
+ TQWidget *w=0;
+ TQString text( container->form()->library()->textForWidgetName(n, c) );
const bool designMode = options & KFormDesigner::WidgetFactory::DesignViewMode;
- if(c == "QLabel")
- w = new QLabel(text, p, n);
+ if(c == TQLABEL_OBJECT_NAME_STRING)
+ w = new TQLabel(text, p, n);
else if(c == "KexiPictureLabel")
w = new KexiPictureLabel(DesktopIcon("image"), p, n);
@@ -394,16 +394,16 @@ StdWidgetFactory::createWidget(const QCString &c, QWidget *p, const char *n,
{
w = new KLineEdit(p, n);
if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+ w->setCursor(TQCursor(TQt::ArrowCursor));
}
else if(c == "KPushButton")
w = new KPushButton(/*i18n("Button")*/text, p, n);
- else if(c == "QRadioButton")
- w = new QRadioButton(/*i18n("Radio Button")*/text, p, n);
+ else if(c == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ w = new TQRadioButton(/*i18n("Radio Button")*/text, p, n);
- else if(c == "QCheckBox")
- w = new QCheckBox(/*i18n("Check Box")*/text, p, n);
+ else if(c == TQCHECKBOX_OBJECT_NAME_STRING)
+ w = new TQCheckBox(/*i18n("Check Box")*/text, p, n);
else if(c == "KIntSpinBox")
w = new KIntSpinBox(p, n);
@@ -415,7 +415,7 @@ StdWidgetFactory::createWidget(const QCString &c, QWidget *p, const char *n,
w = new KListBox(p, n);
else if(c == "KTextEdit")
- w = new KTextEdit(/*i18n("Enter your text here")*/text, QString::null, p, n);
+ w = new KTextEdit(/*i18n("Enter your text here")*/text, TQString(), p, n);
else if(c == "KListView")
{
@@ -424,23 +424,23 @@ StdWidgetFactory::createWidget(const QCString &c, QWidget *p, const char *n,
((KListView*)w)->addColumn(i18n("Column 1"));
((KListView*)w)->setRootIsDecorated(true);
}
- else if(c == "QSlider")
- w = new QSlider(Qt::Horizontal, p, n);
+ else if(c == TQSLIDER_OBJECT_NAME_STRING)
+ w = new TQSlider(Qt::Horizontal, p, n);
else if(c == "KProgress")
w = new KProgress(p, n);
else if(c == "KDateWidget")
- w = new KDateWidget(QDate::currentDate(), p, n);
+ w = new KDateWidget(TQDate::tqcurrentDate(), p, n);
else if(c == "KTimeWidget")
- w = new KTimeWidget(QTime::currentTime(), p, n);
+ w = new KTimeWidget(TQTime::currentTime(), p, n);
else if(c == "KDateTimeWidget")
- w = new KDateTimeWidget(QDateTime::currentDateTime(), p, n);
+ w = new KDateTimeWidget(TQDateTime::tqcurrentDateTime(), p, n);
else if(c == "Line")
- w = new Line(options & WidgetFactory::VerticalOrientation ? Line::Vertical : Line::Horizontal, p, n);
+ w = new Line(options & WidgetFactory::VerticalOrientation ? Qt::Vertical : Qt::Horizontal, p, n);
else if(c == "Spring") {
w = new Spring(p, n);
@@ -457,7 +457,7 @@ StdWidgetFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-StdWidgetFactory::previewWidget(const QCString &classname, QWidget *widget, KFormDesigner::Container *)
+StdWidgetFactory::previewWidget(const TQCString &classname, TQWidget *widget, KFormDesigner::Container *)
{
if(classname == "Spring") {
((Spring*)widget)->setPreviewMode();
@@ -467,17 +467,17 @@ StdWidgetFactory::previewWidget(const QCString &classname, QWidget *widget, KFor
}
bool
-StdWidgetFactory::createMenuActions(const QCString &classname, QWidget *, QPopupMenu *menu,
+StdWidgetFactory::createMenuActions(const TQCString &classname, TQWidget *, TQPopupMenu *menu,
KFormDesigner::Container *)
{
- if((classname == "QLabel") || (classname == "KTextEdit"))
+ if((classname == TQLABEL_OBJECT_NAME_STRING) || (classname == "KTextEdit"))
{
- menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, SLOT(editText()));
+ menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, TQT_SLOT(editText()));
return true;
}
else if(classname == "KListView")
{
- menu->insertItem(SmallIconSet("edit"), i18n("Edit Listview Contents"), this, SLOT(editListContents()));
+ menu->insertItem(SmallIconSet("edit"), i18n("Edit Listview Contents"), this, TQT_SLOT(editListContents()));
return true;
}
@@ -485,19 +485,19 @@ StdWidgetFactory::createMenuActions(const QCString &classname, QWidget *, QPopup
}
bool
-StdWidgetFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container)
+StdWidgetFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
{
setWidget(w, container);
// m_container = container;
if(classname == "KLineEdit")
{
KLineEdit *lineedit = static_cast<KLineEdit*>(w);
- createEditor(classname, lineedit->text(), lineedit, container, lineedit->geometry(), lineedit->alignment(), true);
+ createEditor(classname, lineedit->text(), lineedit, container, lineedit->tqgeometry(), lineedit->tqalignment(), true);
return true;
}
- else if(classname == "QLabel")
+ else if(classname == TQLABEL_OBJECT_NAME_STRING)
{
- QLabel *label = static_cast<QLabel*>(w);
+ TQLabel *label = static_cast<TQLabel*>(w);
if(label->textFormat() == RichText)
{
//m_widget = w;
@@ -505,42 +505,42 @@ StdWidgetFactory::startEditing(const QCString &classname, QWidget *w, KFormDesig
editText();
}
else
- createEditor(classname, label->text(), label, container, label->geometry(), label->alignment());
+ createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment());
return true;
}
else if(classname == "KPushButton")
{
KPushButton *push = static_cast<KPushButton*>(w);
- QRect r = w->style().subRect(QStyle::SR_PushButtonContents, w);
- QRect editorRect = QRect(push->x() + r.x(), push->y() + r.y(), r.width(), r.height());
+ TQRect r = w->tqstyle().subRect(TQStyle::SR_PushButtonContents, w);
+ TQRect editorRect = TQRect(push->x() + r.x(), push->y() + r.y(), r.width(), r.height());
//r.setX(r.x() + 5);
//r.setY(r.y() + 5);
//r.setWidth(r.width()-10);
//r.setHeight(r.height() - 10);
- createEditor(classname, push->text(), push, container, editorRect, Qt::AlignCenter, false, false, Qt::PaletteButton);
+ createEditor(classname, push->text(), push, container, editorRect, TQt::AlignCenter, false, false, TQt::PaletteButton);
return true;
}
- else if(classname == "QRadioButton")
+ else if(classname == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
- QRadioButton *radio = static_cast<QRadioButton*>(w);
- QRect r = w->style().subRect(QStyle::SR_RadioButtonContents, w);
- QRect editorRect = QRect(radio->x() + r.x(), radio->y() + r.y(), r.width(), r.height());
- createEditor(classname, radio->text(), radio, container, editorRect, Qt::AlignAuto);
+ TQRadioButton *radio = static_cast<TQRadioButton*>(w);
+ TQRect r = w->tqstyle().subRect(TQStyle::SR_RadioButtonContents, w);
+ TQRect editorRect = TQRect(radio->x() + r.x(), radio->y() + r.y(), r.width(), r.height());
+ createEditor(classname, radio->text(), radio, container, editorRect, TQt::AlignAuto);
return true;
}
- else if(classname == "QCheckBox")
+ else if(classname == TQCHECKBOX_OBJECT_NAME_STRING)
{
- QCheckBox *check = static_cast<QCheckBox*>(w);
- //QRect r(check->geometry());
+ TQCheckBox *check = static_cast<TQCheckBox*>(w);
+ //TQRect r(check->tqgeometry());
//r.setX(r.x() + 20);
- QRect r = w->style().subRect(QStyle::SR_CheckBoxContents, w);
- QRect editorRect = QRect(check->x() + r.x(), check->y() + r.y(), r.width(), r.height());
- createEditor(classname, check->text(), check, container, editorRect, Qt::AlignAuto);
+ TQRect r = w->tqstyle().subRect(TQStyle::SR_CheckBoxContents, w);
+ TQRect editorRect = TQRect(check->x() + r.x(), check->y() + r.y(), r.width(), r.height());
+ createEditor(classname, check->text(), check, container, editorRect, TQt::AlignAuto);
return true;
}
else if((classname == "KComboBox") || (classname == "KListBox"))
{
- QStringList list;
+ TQStringList list;
if(classname == "KListBox")
{
KListBox *listbox = (KListBox*)w;
@@ -578,7 +578,7 @@ StdWidgetFactory::startEditing(const QCString &classname, QWidget *w, KFormDesig
}
bool
-StdWidgetFactory::clearWidgetContent(const QCString &classname, QWidget *w)
+StdWidgetFactory::clearWidgetContent(const TQCString &classname, TQWidget *w)
{
if(classname == "KLineEdit")
((KLineEdit*)w)->clear();
@@ -596,35 +596,35 @@ StdWidgetFactory::clearWidgetContent(const QCString &classname, QWidget *w)
}
bool
-StdWidgetFactory::changeText(const QString &text)
+StdWidgetFactory::changeText(const TQString &text)
{
- QCString n = WidgetFactory::widget()->className();
- QWidget *w = WidgetFactory::widget();
+ TQCString n = WidgetFactory::widget()->className();
+ TQWidget *w = WidgetFactory::widget();
if(n == "KIntSpinBox")
((KIntSpinBox*)w)->setValue(text.toInt());
else
changeProperty("text", text, m_container->form());
- /* By-hand method not needed as sizeHint() can do that for us
- QFontMetrics fm = w->fontMetrics();
- QSize s(fm.width( text ), fm.height());
+ /* By-hand method not needed as tqsizeHint() can do that for us
+ TQFontMetrics fm = w->fontMetrics();
+ TQSize s(fm.width( text ), fm.height());
int width;
- if(n == "QLabel") // labels are resized to fit the text
+ if(n == TQLABEL_OBJECT_NAME_STRING) // labels are resized to fit the text
{
- w->resize(w->sizeHint());
+ w->resize(w->tqsizeHint());
WidgetFactory::m_editor->resize(w->size());
return;
}
// and other widgets are just enlarged if needed
else if(n == "KPushButton")
- width = w->style().sizeFromContents( QStyle::CT_PushButton, w, s).width();
- else if(n == "QCheckBox")
- width = w->style().sizeFromContents( QStyle::CT_CheckBox, w, s).width();
- else if(n == "QRadioButton")
- width = w->style().sizeFromContents( QStyle::CT_RadioButton, w, s).width();
+ width = w->style().sizeFromContents( TQStyle::CT_PushButton, w, s).width();
+ else if(n == TQCHECKBOX_OBJECT_NAME_STRING)
+ width = w->style().sizeFromContents( TQStyle::CT_CheckBox, w, s).width();
+ else if(n == TQRADIOBUTTON_OBJECT_NAME_STRING)
+ width = w->style().sizeFromContents( TQStyle::CT_RadioButton, w, s).width();
else
return;
- int width = w->sizeHint().width();*/
+ int width = w->tqsizeHint().width();*/
#if 0 //not needed here, size hint is used on creation in InsertWidgetCommand::execute()
if(w->width() < width)
@@ -637,27 +637,27 @@ StdWidgetFactory::changeText(const QString &text)
}
void
-StdWidgetFactory::resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname)
+StdWidgetFactory::resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname)
{
- QSize s = widget->size();
- QPoint p = widget->pos();
- QRect r;
+ TQSize s = widget->size();
+ TQPoint p = widget->pos();
+ TQRect r;
- if(classname == "QRadioButton")
+ if(classname == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
- r = widget->style().subRect(QStyle::SR_RadioButtonContents, widget);
+ r = widget->tqstyle().subRect(TQStyle::SR_RadioButtonContents, widget);
p += r.topLeft();
s.setWidth(r.width());
}
- else if(classname == "QCheckBox")
+ else if(classname == TQCHECKBOX_OBJECT_NAME_STRING)
{
- r = widget->style().subRect(QStyle::SR_CheckBoxContents, widget);
+ r = widget->tqstyle().subRect(TQStyle::SR_CheckBoxContents, widget);
p += r.topLeft();
s.setWidth(r.width());
}
else if(classname == "KPushButton")
{
- r = widget->style().subRect(QStyle::SR_PushButtonContents, widget);
+ r = widget->tqstyle().subRect(TQStyle::SR_PushButtonContents, widget);
p += r.topLeft();
s = r.size();
}
@@ -667,16 +667,16 @@ StdWidgetFactory::resizeEditor(QWidget *editor, QWidget *widget, const QCString
}
bool
-StdWidgetFactory::saveSpecialProperty(const QCString &classname, const QString &name, const QVariant &, QWidget *w, QDomElement &parentNode, QDomDocument &domDoc)
+StdWidgetFactory::saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &, TQWidget *w, TQDomElement &tqparentNode, TQDomDocument &domDoc)
{
if(name == "list_items" && classname == "KComboBox")
{
KComboBox *combo = (KComboBox*)w;
for(int i=0; i < combo->count(); i++)
{
- QDomElement item = domDoc.createElement("item");
+ TQDomElement item = domDoc.createElement("item");
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "text", combo->text(i));
- parentNode.appendChild(item);
+ tqparentNode.appendChild(item);
}
return true;
}
@@ -685,9 +685,9 @@ StdWidgetFactory::saveSpecialProperty(const QCString &classname, const QString &
KListBox *listbox = (KListBox*)w;
for(uint i=0; i < listbox->count(); i++)
{
- QDomElement item = domDoc.createElement("item");
+ TQDomElement item = domDoc.createElement("item");
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "text", listbox->text(i));
- parentNode.appendChild(item);
+ tqparentNode.appendChild(item);
}
return true;
}
@@ -697,20 +697,20 @@ StdWidgetFactory::saveSpecialProperty(const QCString &classname, const QString &
// First we save the columns
for(int i = 0; i < listview->columns(); i++)
{
- QDomElement item = domDoc.createElement("column");
+ TQDomElement item = domDoc.createElement("column");
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "text", listview->columnText(i));
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "width", listview->columnWidth(i));
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "resizable", listview->header()->isResizeEnabled(i));
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "clickable", listview->header()->isClickEnabled(i));
KFormDesigner::FormIO::savePropertyElement(item, domDoc, "property", "fullwidth", listview->header()->isStretchEnabled(i));
- parentNode.appendChild(item);
+ tqparentNode.appendChild(item);
}
// Then we save the list view items
- QListViewItem *item = listview->firstChild();
+ TQListViewItem *item = listview->firstChild();
while(item)
{
- saveListItem(item, parentNode, domDoc);
+ saveListItem(item, tqparentNode, domDoc);
item = item->nextSibling();
}
return true;
@@ -720,17 +720,17 @@ StdWidgetFactory::saveSpecialProperty(const QCString &classname, const QString &
}
void
-StdWidgetFactory::saveListItem(QListViewItem *item, QDomNode &parentNode, QDomDocument &domDoc)
+StdWidgetFactory::saveListItem(TQListViewItem *item, TQDomNode &tqparentNode, TQDomDocument &domDoc)
{
- QDomElement element = domDoc.createElement("item");
- parentNode.appendChild(element);
+ TQDomElement element = domDoc.createElement("item");
+ tqparentNode.appendChild(element);
// We save the text of each column
for(int i = 0; i < item->listView()->columns(); i++)
KFormDesigner::FormIO::savePropertyElement(element, domDoc, "property", "text", item->text(i));
// Then we save every sub items
- QListViewItem *child = item->firstChild();
+ TQListViewItem *child = item->firstChild();
while(child)
{
saveListItem(child, element, domDoc);
@@ -739,16 +739,16 @@ StdWidgetFactory::saveListItem(QListViewItem *item, QDomNode &parentNode, QDomDo
}
bool
-StdWidgetFactory::readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *)
+StdWidgetFactory::readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *)
{
- QString tag = node.tagName();
- QString name = node.attribute("name");
+ TQString tag = node.tagName();
+ TQString name = node.attribute("name");
if((tag == "item") && (classname == "KComboBox"))
{
KComboBox *combo = (KComboBox*)w;
- QVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name);
- if(val.canCast(QVariant::Pixmap))
+ TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name);
+ if(val.canCast(TQVariant::Pixmap))
combo->insertItem(val.toPixmap());
else
combo->insertItem(val.toString());
@@ -758,8 +758,8 @@ StdWidgetFactory::readSpecialProperty(const QCString &classname, QDomElement &no
if((tag == "item") && (classname == "KListBox"))
{
KListBox *listbox = (KListBox*)w;
- QVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), w, name);
- if(val.canCast(QVariant::Pixmap))
+ TQVariant val = KFormDesigner::FormIO::readPropertyValue(node.firstChild().firstChild(), TQT_TQOBJECT(w), name);
+ if(val.canCast(TQVariant::Pixmap))
listbox->insertItem(val.toPixmap());
else
listbox->insertItem(val.toString());
@@ -770,10 +770,10 @@ StdWidgetFactory::readSpecialProperty(const QCString &classname, QDomElement &no
{
KListView *listview = (KListView*)w;
int id=0;
- for(QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QString prop = n.toElement().attribute("name");
- QVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), w, name);
+ TQString prop = n.toElement().attribute("name");
+ TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(w), name);
if(prop == "text")
id = listview->addColumn(val.toString());
else if(prop == "width")
@@ -798,18 +798,18 @@ StdWidgetFactory::readSpecialProperty(const QCString &classname, QDomElement &no
}
void
-StdWidgetFactory::readListItem(QDomElement &node, QListViewItem *parent, KListView *listview)
+StdWidgetFactory::readListItem(TQDomElement &node, TQListViewItem *tqparent, KListView *listview)
{
- QListViewItem *item;
- if(parent)
- item = new KListViewItem(parent);
+ TQListViewItem *item;
+ if(tqparent)
+ item = new KListViewItem(tqparent);
else
item = new KListViewItem(listview);
// We need to move the item at the end of the list
- QListViewItem *last;
- if(parent)
- last = parent->firstChild();
+ TQListViewItem *last;
+ if(tqparent)
+ last = tqparent->firstChild();
else
last = listview->firstChild();
@@ -818,11 +818,11 @@ StdWidgetFactory::readListItem(QDomElement &node, QListViewItem *parent, KListVi
item->moveItem(last);
int i = 0;
- for(QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement childEl = n.toElement();
- QString prop = childEl.attribute("name");
- QString tag = childEl.tagName();
+ TQDomElement childEl = n.toElement();
+ TQString prop = childEl.attribute("name");
+ TQString tag = childEl.tagName();
// We read sub items
if(tag == "item")
@@ -833,7 +833,7 @@ StdWidgetFactory::readListItem(QDomElement &node, QListViewItem *parent, KListVi
// and column texts
else if((tag == "property") && (prop == "text"))
{
- QVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), listview, "item");
+ TQVariant val = KFormDesigner::FormIO::readPropertyValue(n.firstChild(), TQT_TQOBJECT(listview), "item");
item->setText(i, val.toString());
i++;
}
@@ -841,8 +841,8 @@ StdWidgetFactory::readListItem(QDomElement &node, QListViewItem *parent, KListVi
}
bool
-StdWidgetFactory::isPropertyVisibleInternal(const QCString &classname,
- QWidget *w, const QCString &property, bool isTopLevel)
+StdWidgetFactory::isPropertyVisibleInternal(const TQCString &classname,
+ TQWidget *w, const TQCString &property, bool isTopLevel)
{
bool ok = true;
if(classname == "FormWidgetBase")
@@ -860,10 +860,10 @@ StdWidgetFactory::isPropertyVisibleInternal(const QCString &classname,
}
else if(classname == "KexiPictureLabel")
{
- if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment"))
+ if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment"))
return false;
}
- else if(classname == "QLabel")
+ else if(classname == TQLABEL_OBJECT_NAME_STRING)
{
if(property == "pixmap")
return false;
@@ -890,11 +890,11 @@ StdWidgetFactory::isPropertyVisibleInternal(const QCString &classname,
if((property == "frameShape") || (property == "font") || (property == "margin"))
return false;
}
- else if(classname=="QCheckBox")
+ else if(classname==TQCHECKBOX_OBJECT_NAME_STRING)
{
ok = m_showAdvancedProperties || (property != "autoRepeat");
}
- else if(classname=="QRadioButton")
+ else if(classname==TQRADIOBUTTON_OBJECT_NAME_STRING)
{
ok = m_showAdvancedProperties || (property != "autoRepeat");
}
@@ -906,12 +906,12 @@ StdWidgetFactory::isPropertyVisibleInternal(const QCString &classname,
return ok && WidgetFactory::isPropertyVisibleInternal(classname, w, property, isTopLevel);
}
-QValueList<QCString>
-StdWidgetFactory::autoSaveProperties(const QCString &classname)
+TQValueList<TQCString>
+StdWidgetFactory::autoSaveProperties(const TQCString &classname)
{
- QValueList<QCString> l;
+ TQValueList<TQCString> l;
- if(classname == "QLabel")
+ if(classname == TQLABEL_OBJECT_NAME_STRING)
l << "text";
if(classname == "KPushButton")
l << "text";
@@ -942,12 +942,12 @@ StdWidgetFactory::autoSaveProperties(const QCString &classname)
void
StdWidgetFactory::editText()
{
- QCString classname = widget()->className();
- QString text;
+ TQCString classname = widget()->className();
+ TQString text;
if(classname == "KTextEdit")
text = ((KTextEdit*)widget())->text();
- else if(classname == "QLabel")
- text = ((QLabel*)widget())->text();
+ else if(classname == TQLABEL_OBJECT_NAME_STRING)
+ text = ((TQLabel*)widget())->text();
if(editRichText(widget(), text))
{
@@ -955,24 +955,24 @@ StdWidgetFactory::editText()
changeProperty("text", text, m_container->form());
}
- if(classname == "QLabel")
- widget()->resize(widget()->sizeHint());
+ if(classname == TQLABEL_OBJECT_NAME_STRING)
+ widget()->resize(widget()->tqsizeHint());
}
void
StdWidgetFactory::editListContents()
{
- if(widget()->inherits("QListView"))
- editListView((QListView*)widget());
+ if(widget()->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
+ editListView((TQListView*)widget());
}
void
-StdWidgetFactory::setPropertyOptions( KFormDesigner::WidgetPropertySet& buf, const KFormDesigner::WidgetInfo& info, QWidget *w )
+StdWidgetFactory::setPropertyOptions( KFormDesigner::WidgetPropertySet& buf, const KFormDesigner::WidgetInfo& info, TQWidget *w )
{
Q_UNUSED( info );
Q_UNUSED( w );
- if (buf.contains("indent")) {
+ if (buf.tqcontains("indent")) {
buf["indent"].setOption("min", -1);
buf["indent"].setOption("minValueText", i18n("default indent value", "default"));
}
diff --git a/kexi/formeditor/factories/stdwidgetfactory.h b/kexi/formeditor/factories/stdwidgetfactory.h
index c0e56c5bb..f5bd5528f 100644
--- a/kexi/formeditor/factories/stdwidgetfactory.h
+++ b/kexi/formeditor/factories/stdwidgetfactory.h
@@ -20,80 +20,83 @@
#ifndef STDWIDGETFACTORY_H
#define STDWIDGETFACTORY_H
-#include <qframe.h>
+#include <tqframe.h>
#include "widgetfactory.h"
#include "container.h"
-class KFORMEDITOR_EXPORT KexiPictureLabel : public QLabel
+class KFORMEDITOR_EXPORT KexiPictureLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiPictureLabel(const QPixmap &pix, QWidget *parent, const char *name);
+ KexiPictureLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name);
~KexiPictureLabel(){;}
- virtual bool setProperty(const char *name, const QVariant &value);
+ virtual bool setProperty(const char *name, const TQVariant &value);
};
-class KFORMEDITOR_EXPORT Line : public QFrame
+class KFORMEDITOR_EXPORT Line : public TQFrame
{
Q_OBJECT
- Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation)
+ TQ_OBJECT
+ TQ_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
public:
- Line(Orientation orient, QWidget *parent, const char *name);
+ Line(Qt::Orientation orient, TQWidget *tqparent, const char *name);
~Line(){;}
- void setOrientation(Orientation orient);
- Orientation orientation() const;
+ void setOrientation(Qt::Orientation orient);
+ Qt::Orientation orientation() const;
};
//! Factory for all basic widgets, including Spring (not containers)
class StdWidgetFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- StdWidgetFactory(QObject *parent, const char *name, const QStringList &args);
+ StdWidgetFactory(TQObject *tqparent, const char *name, const TQStringList &args);
~StdWidgetFactory();
- virtual QWidget *createWidget(const QCString &c, QWidget *p, const char *n,
+ virtual TQWidget *createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options = DefaultOptions);
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w,
+ virtual bool startEditing(const TQCString &classname, TQWidget *w,
KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &classname, QWidget *widget,
+ virtual bool previewWidget(const TQCString &classname, TQWidget *widget,
KFormDesigner::Container *container);
- virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
+ virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w);
- virtual bool saveSpecialProperty(const QCString &classname,
- const QString &name, const QVariant &value, QWidget *w,
- QDomElement &parentNode, QDomDocument &parent);
- virtual bool readSpecialProperty(const QCString &classname, QDomElement &node,
- QWidget *w, KFormDesigner::ObjectTreeItem *item);
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ virtual bool saveSpecialProperty(const TQCString &classname,
+ const TQString &name, const TQVariant &value, TQWidget *w,
+ TQDomElement &tqparentNode, TQDomDocument &tqparent);
+ virtual bool readSpecialProperty(const TQCString &classname, TQDomElement &node,
+ TQWidget *w, KFormDesigner::ObjectTreeItem *item);
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
virtual void setPropertyOptions( KFormDesigner::WidgetPropertySet& buf,
- const KFormDesigner::WidgetInfo& info, QWidget *w );
+ const KFormDesigner::WidgetInfo& info, TQWidget *w );
public slots:
void editText();
void editListContents();
protected:
- virtual bool isPropertyVisibleInternal(const QCString &classname, QWidget *w,
- const QCString &property, bool isTopLevel);
- virtual bool changeText(const QString &newText);
- virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
- void saveListItem(QListViewItem *item, QDomNode &parentNode, QDomDocument &domDoc);
- void readListItem(QDomElement &node, QListViewItem *parent, KListView *listview);
+ virtual bool isPropertyVisibleInternal(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool isTopLevel);
+ virtual bool changeText(const TQString &newText);
+ virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
+ void saveListItem(TQListViewItem *item, TQDomNode &tqparentNode, TQDomDocument &domDoc);
+ void readListItem(TQDomElement &node, TQListViewItem *tqparent, KListView *listview);
private:
// KFormDesigner::Container *m_container;
-// QWidget *m_widget;
+// TQWidget *m_widget;
};
#endif
diff --git a/kexi/formeditor/form.cpp b/kexi/formeditor/form.cpp
index a5d570025..41afdf374 100644
--- a/kexi/formeditor/form.cpp
+++ b/kexi/formeditor/form.cpp
@@ -19,10 +19,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qobjectlist.h>
-#include <qptrdict.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqobjectlist.h>
+#include <tqptrdict.h>
#include <kdebug.h>
#include <klocale.h>
@@ -89,7 +89,7 @@ FormWidget::~FormWidget()
//--------------------------------------
Form::Form(WidgetLibrary* library, const char *name, bool designMode)
- : QObject(library, name)
+ : TQObject(library, name)
, m_lib(library)
{
d = new FormPrivate();
@@ -99,8 +99,8 @@ Form::Form(WidgetLibrary* library, const char *name, bool designMode)
// Init actions
d->collection = new KActionCollection(0, this);
d->history = new KCommandHistory(d->collection, true);
- connect(d->history, SIGNAL(commandExecuted()), this, SLOT(slotCommandExecuted()));
- connect(d->history, SIGNAL(documentRestored()), this, SLOT(slotFormRestored()));
+ connect(d->history, TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(slotCommandExecuted()));
+ connect(d->history, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(slotFormRestored()));
}
Form::~Form()
@@ -110,7 +110,7 @@ Form::~Form()
d = 0;
}
-QWidget*
+TQWidget*
Form::widget() const
{
if(d->topTree)
@@ -124,7 +124,7 @@ Form::widget() const
//////////////// Container -related functions ///////////////////////
void
-Form::createToplevel(QWidget *container, FormWidget *formWidget, const QCString &)
+Form::createToplevel(TQWidget *container, FormWidget *formWidget, const TQCString &)
{
kdDebug() << "Form::createToplevel() container= "<< (container ? container->name() : "<NULL>")
<< " formWidget=" << formWidget << "className=" << name() << endl;
@@ -141,7 +141,7 @@ Form::createToplevel(QWidget *container, FormWidget *formWidget, const QCString
// d->topTree->addModifiedProperty("caption", name());
//m_topTree->addModifiedProperty("icon");
- connect(container, SIGNAL(destroyed()), this, SLOT(formDeleted()));
+ connect(container, TQT_SIGNAL(destroyed()), this, TQT_SLOT(formDeleted()));
kdDebug() << "Form::createToplevel(): d->toplevel=" << d->toplevel << endl;
}
@@ -164,7 +164,7 @@ Form::activeContainer()
if(it->container())
return it->container();
else
- return it->parent()->container();
+ return it->tqparent()->container();
}
ObjectTreeItem*
@@ -173,11 +173,11 @@ Form::commonParentContainer(WidgetList *wlist)
ObjectTreeItem *item = 0;
WidgetList *list = new WidgetList();
- // Creates a list of all widget parents
- for(QWidget *w = wlist->first(); w; w = wlist->next())
+ // Creates a list of all widget tqparents
+ for(TQWidget *w = wlist->first(); w; w = wlist->next())
{
- if(list->findRef(w->parentWidget()) == -1)
- list->append(w->parentWidget());
+ if(list->tqfindRef(w->tqparentWidget()) == -1)
+ list->append(w->tqparentWidget());
}
removeChildrenFromList(*list);
@@ -193,7 +193,7 @@ Form::commonParentContainer(WidgetList *wlist)
}
Container*
-Form::parentContainer(QWidget *w)
+Form::tqparentContainer(TQWidget *w)
{
ObjectTreeItem *it;
if(!w)
@@ -202,10 +202,10 @@ Form::parentContainer(QWidget *w)
//else
it = d->topTree->lookup(w->name());
- if(it->parent()->container())
- return it->parent()->container();
+ if(it->tqparent()->container())
+ return it->tqparent()->container();
else
- return it->parent()->parent()->container();
+ return it->tqparent()->tqparent()->container();
}
@@ -234,7 +234,7 @@ Form::setDesignMode(bool design)
///////////////////////////// Selection stuff ///////////////////////
void
-Form::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWillBeSelected)
+Form::setSelectedWidget(TQWidget *w, bool add, bool dontRaise, bool moreWillBeSelected)
{
if((d->selected.isEmpty()) || (w == widget()) || (d->selected.first() == widget()))
add = false;
@@ -245,14 +245,14 @@ Form::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWillBeSel
return;
}
- //raise selected widget and all possible parents
- QWidget *wtmp = w;
- while(!dontRaise && wtmp && wtmp->parentWidget() && (wtmp != widget()))
+ //raise selected widget and all possible tqparents
+ TQWidget *wtmp = w;
+ while(!dontRaise && wtmp && wtmp->tqparentWidget() && (wtmp != widget()))
{
wtmp->raise();
if(d->resizeHandles[ wtmp->name() ])
d->resizeHandles[ wtmp->name() ]->raise();
- wtmp = wtmp->parentWidget();
+ wtmp = wtmp->tqparentWidget();
}
if (wtmp)
@@ -267,12 +267,12 @@ Form::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWillBeSel
emit selectionChanged(w, add, moreWillBeSelected);
emitActionSignals(false);
- // WidgetStack and TabWidget pages widgets shouldn't have resize handles, but their parent
- if(!FormManager::self()->isTopLevel(w) && w->parentWidget() && w->parentWidget()->isA("QWidgetStack"))
+ // WidgetStack and TabWidget pages widgets shouldn't have resize handles, but their tqparent
+ if(!FormManager::self()->isTopLevel(w) && w->tqparentWidget() && w->tqparentWidget()->isA(TQWIDGETSTACK_OBJECT_NAME_STRING))
{
- w = w->parentWidget();
- if(w->parentWidget() && w->parentWidget()->inherits("QTabWidget"))
- w = w->parentWidget();
+ w = w->tqparentWidget();
+ if(w->tqparentWidget() && w->tqparentWidget()->inherits(TQTABWIDGET_OBJECT_NAME_STRING))
+ w = w->tqparentWidget();
}
if(w && w != widget())
@@ -280,13 +280,13 @@ Form::setSelectedWidget(QWidget *w, bool add, bool dontRaise, bool moreWillBeSel
}
ResizeHandleSet*
-Form::resizeHandlesForWidget(QWidget* w)
+Form::resizeHandlesForWidget(TQWidget* w)
{
return d->resizeHandles[w->name()];
}
void
-Form::unSelectWidget(QWidget *w)
+Form::unSelectWidget(TQWidget *w)
{
d->selected.remove(w);
d->resizeHandles.remove(w->name());
@@ -334,7 +334,7 @@ void
Form::emitSelectionSignals()
{
emit selectionChanged(selectedWidgets()->first(), false);
-// for(QWidget *w = selectedWidgets()->next(); w; w = selectedWidgets()->next())
+// for(TQWidget *w = selectedWidgets()->next(); w; w = selectedWidgets()->next())
// emit selectionChanged(selectedWidgets()->first(), true);
for (WidgetListIterator it(*selectedWidgets()); it.current(); ++it)
emit selectionChanged(it.current(), true);
@@ -358,20 +358,20 @@ Form::formDeleted()
}
void
-Form::changeName(const QCString &oldname, const QCString &newname)
+Form::changeName(const TQCString &oldname, const TQCString &newname)
{
if(oldname == newname)
return;
if(!d->topTree->rename(oldname, newname)) // rename failed
{
- KMessageBox::sorry(widget()->topLevelWidget(),
- i18n("Renaming widget \"%1\" to \"%2\" failed.").arg(oldname).arg(newname));
+ KMessageBox::sorry(widget()->tqtopLevelWidget(),
+ i18n("Renaming widget \"%1\" to \"%2\" failed.").tqarg(TQString(oldname)).tqarg(TQString(newname)));
//moved to WidgetPropertySet::slotChangeProperty()
-// KMessageBox::sorry(widget()->topLevelWidget(),
+// KMessageBox::sorry(widget()->tqtopLevelWidget(),
// i18n("A widget with this name already exists. "
// "Please choose another name or rename existing widget."));
kdDebug() << "Form::changeName() : ERROR : A widget named " << newname << " already exists" << endl;
- FormManager::self()->propertySet()->property("name") = QVariant(oldname);
+ FormManager::self()->propertySet()->property("name") = TQVariant(oldname);
}
else
{
@@ -411,8 +411,8 @@ void
Form::clearCommandHistory()
{
d->history->clear();
- FormManager::self()->emitUndoEnabled(false, QString::null);
- FormManager::self()->emitRedoEnabled(false, QString::null);
+ FormManager::self()->emitUndoEnabled(false, TQString());
+ FormManager::self()->emitRedoEnabled(false, TQString());
}
void
@@ -421,8 +421,8 @@ Form::slotCommandExecuted()
emit FormManager::self()->dirty(this, true);
d->dirty = true;
// because actions text is changed after the commandExecuted() signal is emitted
- QTimer::singleShot(10, this, SLOT(emitUndoEnabled()));
- QTimer::singleShot(10, this, SLOT(emitRedoEnabled()));
+ TQTimer::singleShot(10, this, TQT_SLOT(emitUndoEnabled()));
+ TQTimer::singleShot(10, this, TQT_SLOT(emitRedoEnabled()));
}
void
@@ -454,24 +454,25 @@ Form::slotFormRestored()
void
Form::addWidgetToTabStops(ObjectTreeItem *it)
{
- QWidget *w = it->widget();
+ TQWidget *w = it->widget();
if(!w)
return;
- if(!(w->focusPolicy() & QWidget::TabFocus))
+ if(!(w->focusPolicy() & TQ_TabFocus))
{
- if (!w->children())
+ TQObjectList clo = w->childrenListObject();
+ if (clo.isEmpty())
return;
// For composed widgets, we check if one of the child can have focus
- for(QObjectListIterator chIt(*w->children()); chIt.current(); ++chIt) {
- if(chIt.current()->isWidgetType()) {//QWidget::TabFocus flag will be checked later!
- if(d->tabstops.findRef(it) == -1) {
+ for(TQObjectListIterator chIt(clo); chIt.current(); ++chIt) {
+ if(chIt.current()->isWidgetType()) {//TQ_TabFocus flag will be checked later!
+ if(d->tabstops.tqfindRef(it) == -1) {
d->tabstops.append(it);
return;
}
}
}
}
- else if(d->tabstops.findRef(it) == -1) // not yet in the list
+ else if(d->tabstops.tqfindRef(it) == -1) // not yet in the list
d->tabstops.append(it);
}
@@ -479,7 +480,7 @@ void
Form::updateTabStopsOrder()
{
for (ObjectTreeListIterator it(d->tabstops);it.current();) {
- if(!(it.current()->widget()->focusPolicy() & QWidget::TabFocus)) {
+ if(!(it.current()->widget()->focusPolicy() & TQ_TabFocus)) {
kexidbg << "Form::updateTabStopsOrder(): widget removed because has no TabFocus: " << it.current()->widget()->name() << endl;
d->tabstops.remove( it.current() );
}
@@ -489,7 +490,7 @@ Form::updateTabStopsOrder()
}
//! Collects all the containers reculsively. Used by Form::autoAssignTabStops().
-void collectContainers(ObjectTreeItem* item, QPtrDict<char>& containers)
+void collectContainers(ObjectTreeItem* item, TQPtrDict<char>& containers)
{
if (!item->container())
return;
@@ -498,7 +499,7 @@ void collectContainers(ObjectTreeItem* item, QPtrDict<char>& containers)
<< " " << item->container()->objectTree()->name() << endl;
containers.insert( item->container(), (const char *)1 );
}
- for (ObjectTreeListIterator it(*item->children()); it.current(); ++it)
+ for (ObjectTreeListIterator it(*item->tqchildren()); it.current(); ++it)
collectContainers(it.current(), containers);
}
@@ -509,7 +510,7 @@ Form::autoAssignTabStops()
HorWidgetList hlist(toplevelContainer()->widget());
// 1. Collect all the containers, as we'll be sorting widgets groupped by containers
- QPtrDict<char> containers;
+ TQPtrDict<char> containers;
collectContainers( toplevelContainer()->objectTree(), containers );
@@ -521,29 +522,29 @@ Form::autoAssignTabStops()
}
list.sort();
- foreach_list(QPtrListIterator<QWidget>, iter, list)
+ foreach_list(TQPtrListIterator<TQWidget>, iter, list)
kdDebug() << iter.current()->className() << " " << iter.current()->name() << endl;
d->tabstops.clear();
/// We automatically sort widget from the top-left to bottom-right corner
- //! \todo Handle RTL layout (ie from top-right to bottom-left)
+ //! \todo Handle RTL tqlayout (ie from top-right to bottom-left)
foreach_list(WidgetListIterator, it, list) {
- QWidget *w = it.current();
+ TQWidget *w = it.current();
hlist.append(w);
++it;
- QWidget *nextw = it.current();
- QObject *page_w = 0;
- KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(w, "KFormDesigner::TabWidget", page_w);
+ TQWidget *nextw = it.current();
+ TQObject *page_w = 0;
+ KFormDesigner::TabWidget *tab_w = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(w), "KFormDesigner::TabWidget", page_w);
while (nextw) {
- if (KexiUtils::hasParent(w, nextw)) // do not group (sort) widgets where on is a child of another
+ if (KexiUtils::hasParent(TQT_TQOBJECT(w), TQT_TQOBJECT(nextw))) // do not group (sort) widgets where on is a child of another
break;
if (nextw->y() >= (w->y() + 20))
break;
if (tab_w) {
- QObject *page_nextw = 0;
- KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(nextw, "KFormDesigner::TabWidget", page_nextw);
+ TQObject *page_nextw = 0;
+ KFormDesigner::TabWidget *tab_nextw = KFormDesigner::findParent<KFormDesigner::TabWidget>(TQT_TQOBJECT(nextw), "KFormDesigner::TabWidget", page_nextw);
if (tab_w == tab_nextw) {
if (page_w != page_nextw) // 'nextw' widget within different tab page
break;
diff --git a/kexi/formeditor/form.h b/kexi/formeditor/form.h
index 899da9558..dbe64b520 100644
--- a/kexi/formeditor/form.h
+++ b/kexi/formeditor/form.h
@@ -22,15 +22,15 @@
#ifndef KFORMDESIGNERFORM_H
#define KFORMDESIGNERFORM_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "resizehandle.h"
#include "utils.h"
#include "objecttree.h"
-class QWidget;
-class QDomElement;
+class TQWidget;
+class TQDomElement;
class KActionCollection;
class KCommandHistory;
class KCommand;
@@ -48,7 +48,7 @@ class ConnectionBuffer;
//! Base (virtual) class for all form widgets
/*! You need to inherit this class, and implement the drawing functions. This is necessary
- because you cannot inherit QWidget twice, and we want form widgets to be any widget.
+ because you cannot inherit TQWidget twice, and we want form widgets to be any widget.
See FormWidgetBase in test/kfd_part.cpp and just copy functions there. */
class KFORMEDITOR_EXPORT FormWidget
{
@@ -60,19 +60,19 @@ class KFORMEDITOR_EXPORT FormWidget
using double-buffering. \a type can be 1 (selection rect)
or 2 (insert rect, dotted). */
- virtual void drawRects(const QValueList<QRect> &list, int type) = 0;
+ virtual void drawRects(const TQValueList<TQRect> &list, int type) = 0;
- virtual void drawRect(const QRect &r, int type) = 0;
+ virtual void drawRect(const TQRect &r, int type) = 0;
/*! This function inits the buffer used for double-buffering. Called before drawing rect. */
virtual void initBuffer() = 0;
- /*! Clears the form, ie pastes the whole buffer to repaint the Form. */
+ /*! Clears the form, ie pastes the whole buffer to tqrepaint the Form. */
virtual void clearForm() = 0;
/*! This function highlights two widgets (to is optional), which are
sender and receiver, and draws a link between them. */
- virtual void highlightWidgets(QWidget *from, QWidget *to) = 0;
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to) = 0;
protected:
Form *m_form;
@@ -88,9 +88,9 @@ class FormPrivate
~FormPrivate();
// FormManager *manager;
- QGuardedPtr<Container> toplevel;
+ TQGuardedPtr<Container> toplevel;
ObjectTree *topTree;
- QGuardedPtr<QWidget> widget;
+ TQGuardedPtr<TQWidget> widget;
WidgetList selected;
ResizeHandleSet::Dict resizeHandles;
@@ -98,7 +98,7 @@ class FormPrivate
bool dirty;
bool interactive;
bool design;
- QString filename;
+ TQString filename;
KCommandHistory *history;
KActionCollection *collection;
@@ -109,17 +109,17 @@ class FormPrivate
PixmapCollection *pixcollection;
- //! This map is used to store cursor shapes before inserting (so we can restore them later)
- QMap<QObject*,QCursor> cursors;
+ //! This map is used to store cursor tqshapes before inserting (so we can restore them later)
+ TQMap<TQObject*,TQCursor> cursors;
//!This string list is used to store the widgets which hasMouseTracking() == true (eg lineedits)
- QStringList *mouseTrackers;
+ TQStringList *mouseTrackers;
FormWidget *formWidget;
//! A set of head properties to be stored in a .ui file.
//! This includes KFD format version.
- QMap<QCString,QString> headerProperties;
+ TQMap<TQCString,TQString> headerProperties;
//! Format version, set by FormIO or on creating a new form.
uint formatVersion;
@@ -132,9 +132,10 @@ class FormPrivate
It takes care of widget selection and pasting widgets.
**/
//! A simple class representing a form
-class KFORMEDITOR_EXPORT Form : public QObject
+class KFORMEDITOR_EXPORT Form : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates a simple Form, child of the FormManager \a manager.
@@ -149,11 +150,11 @@ class KFORMEDITOR_EXPORT Form : public QObject
Creates a toplevel widget out of another widget.
\a container will become the Form toplevel widget,
will be associated to an ObjectTree and so on.
- \code QWidget *toplevel = new QWidget(this);
+ \code TQWidget *toplevel = new TQWidget(this);
form->createToplevel(toplevel); \endcode
*/
- void createToplevel(QWidget *container, FormWidget *formWidget =0,
- const QCString &classname="QWidget");
+ void createToplevel(TQWidget *container, FormWidget *formWidget =0,
+ const TQCString &classname=TQWIDGET_OBJECT_NAME_STRING);
/*! \return the toplevel Container or 0 if this is a preview Form or createToplevel()
has not been called yet. */
@@ -166,23 +167,23 @@ class KFORMEDITOR_EXPORT Form : public QObject
ObjectTree* objectTree() const { return d->topTree; }
//! \return the form's toplevel widget, or 0 if designMode() == false.
- QWidget* widget() const;
+ TQWidget* widget() const;
-// //! \return the FormManager parent of this form.
+// //! \return the FormManager tqparent of this form.
// FormManager* manager() const { return d->manager; }
- /*! \return A pointer to the currently active Container, ie the parent Container for a simple widget,
+ /*! \return A pointer to the currently active Container, ie the tqparent Container for a simple widget,
and the widget's Container if it is itself a container.
*/
Container* activeContainer();
- /*! \return A pointer to the parent Container of the currently selected widget.
+ /*! \return A pointer to the tqparent Container of the currently selected widget.
It is the same as activeContainer() for a simple widget, but unlike this function
- it will also return the parent Container if the widget itself is a Container.
+ it will also return the tqparent Container if the widget itself is a Container.
*/
- Container* parentContainer(QWidget *w=0);
+ Container* tqparentContainer(TQWidget *w=0);
- /*! \return The \ref Container which is a parent of all widgets in \a wlist.
+ /*! \return The \ref Container which is a tqparent of all widgets in \a wlist.
Used by \ref activeContainer(), and to find where
to paste widgets when multiple widgets are selected. */
ObjectTreeItem* commonParentContainer(WidgetList *wlist);
@@ -193,7 +194,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
/*! \return currently selected widget in this form,
or 0 if there is no widget selected or more than one widget selected.
\see selectedWidgets() */
- QWidget* selectedWidget() const { return d->selected.count()==1 ? d->selected.first() : 0; }
+ TQWidget* selectedWidget() const { return d->selected.count()==1 ? d->selected.first() : 0; }
/*! Emits the action signals, and optionaly the undo/redo related signals
if \a withUndoAction == true. See \a FormManager for signals description. */
@@ -212,7 +213,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
widget were drawn on the Form.
\return false if the Form is being updated by the program, ie the widget
are created by FormIO, and so composed widgets
- should not be populated automatically (such as QTabWidget).
+ should not be populated automatically (such as TQTabWidget).
*/
bool interactiveMode() const { return d->interactive; }
@@ -230,24 +231,24 @@ class KFORMEDITOR_EXPORT Form : public QObject
//! @todo make gridSize configurable at global level
int gridSize() { return 10; }
- //! \return the default margin for all the layout inside this Form.
+ //! \return the default margin for all the tqlayout inside this Form.
int defaultMargin() { return 11;}
- //! \return the default spacing for all the layout inside this Form.
+ //! \return the default spacing for all the tqlayout inside this Form.
int defaultSpacing() { return 6;}
- /*! This function is used by ObjectTree to emit childAdded() signal (as it is not a QObject). */
+ /*! This function is used by ObjectTree to emit childAdded() signal (as it is not a TQObject). */
void emitChildAdded(ObjectTreeItem *item);
- /*! This function is used by ObjectTree to emit childRemoved() signal (as it is not a QObject). */
+ /*! This function is used by ObjectTree to emit childRemoved() signal (as it is not a TQObject). */
void emitChildRemoved(ObjectTreeItem *item);
/*! \return The filename of the UI file this Form was saved to,
- or QString::null if the Form hasn't be saved yet. */
- QString filename() const { return d->filename; }
+ or TQString() if the Form hasn't be saved yet. */
+ TQString filename() const { return d->filename; }
//! Sets the filename of this Form to \a filename.
- void setFilename(const QString &file) { d->filename = file; }
+ void setFilename(const TQString &file) { d->filename = file; }
KCommandHistory* commandHistory() const { return d->history; }
ConnectionBuffer* connectionBuffer() const { return d->connBuffer; }
@@ -284,28 +285,28 @@ class KFORMEDITOR_EXPORT Form : public QObject
(which are by default in order of creation).*/
void setAutoTabStops(bool autoTab) { d->autoTabstops = autoTab;}
- /*! Tells the Form to reassign the tab stops because the widget layout has changed
+ /*! Tells the Form to reassign the tab stops because the widget tqlayout has changed
(called for example before saving or displaying the tab order dialog).
Automatically sorts widget from the top-left to bottom-right corner.
Widget can be grouped with containers. In paticular, for tab widgets,
- child widgets should ordered by parent tab's order. */
+ child widgets should ordered by tqparent tab's order. */
void autoAssignTabStops();
#ifdef KEXI_DEBUG_GUI
//! For debugging purposes
- QString m_recentlyLoadedUICode;
+ TQString m_recentlyLoadedUICode;
#endif
/*! Internal: called by ResizeHandle when mouse move event causes first
resize handle's dragging. As a result, current widget's editing (if any)
is finished - see WidgetFactory::resetEditor(). */
-// void resizeHandleDraggingStarted(QWidget *draggedWidget);
+// void resizeHandleDraggingStarted(TQWidget *draggedWidget);
- ResizeHandleSet* resizeHandlesForWidget(QWidget* w);
+ ResizeHandleSet* resizeHandlesForWidget(TQWidget* w);
/*! A set of value/key pairs provided to be stored as attributes in
<kfd:customHeader/> XML element (saved as a first child of \<UI> element). */
- QMap<QCString,QString>* headerProperties() const { return &d->headerProperties; }
+ TQMap<TQCString,TQString>* headerProperties() const { return &d->headerProperties; }
//! \return format version number for this form.
//! For new forms it is equal to KFormDesigner::version().
@@ -321,7 +322,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
/*! This slot is called when the name of a widget was changed in Property Editor.
It renames the ObjectTreeItem associated to this widget.
*/
- void changeName(const QCString &oldname, const QCString &newname);
+ void changeName(const TQCString &oldname, const TQCString &newname);
/*! Sets \a selected to be the selected widget of this Form.
If \a add is true, the formerly selected widget is still selected,
@@ -329,12 +330,12 @@ class KFORMEDITOR_EXPORT Form : public QObject
The form widget is always selected alone.
\a moreWillBeSelected indicates whether more widgets will be selected soon
(so for multiselection we should not update the property pane before the last widget is selected) */
- void setSelectedWidget(QWidget *selected, bool add=false, bool dontRaise=false,
+ void setSelectedWidget(TQWidget *selected, bool add=false, bool dontRaise=false,
bool moreWillBeSelected = false);
/*! Unselects the widget \a w. Te widget is removed from the Cntainer 's list
and its resizeHandle is removed. */
- void unSelectWidget(QWidget *w);
+ void unSelectWidget(TQWidget *w);
/*! Sets the form widget (it will be uniquely selected widget). */
void selectFormWidget();
@@ -364,7 +365,7 @@ class KFORMEDITOR_EXPORT Form : public QObject
to update both Property Editor and ObjectTreeView.
\a w is the newly selected widget.
*/
- void selectionChanged(QWidget *w, bool add, bool moreWillBeSelected = false);
+ void selectionChanged(TQWidget *w, bool add, bool moreWillBeSelected = false);
/*! This signal is emitted when a new widget is created, to update ObjectTreeView.
\a it is the ObjectTreeItem representing this new widget.
diff --git a/kexi/formeditor/formIO.cpp b/kexi/formeditor/formIO.cpp
index 2327fb915..4b46f8fe6 100644
--- a/kexi/formeditor/formIO.cpp
+++ b/kexi/formeditor/formIO.cpp
@@ -20,18 +20,18 @@
#include <kdebug.h>
-#include <qmetaobject.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcursor.h>
-#include <qbuffer.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qdatetime.h>
-#include <qlabel.h>
-#include <qpainter.h>
+#include <tqmetaobject.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcursor.h>
+#include <tqbuffer.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqdatetime.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
#include <kfiledialog.h>
#include <klocale.h>
@@ -52,10 +52,10 @@
#include "formIO.h"
/// A blank widget used when the class name is not supported
-CustomWidget::CustomWidget(const QCString &className, QWidget *parent, const char *name)
-: QWidget(parent, name), m_className(className)
+CustomWidget::CustomWidget(const TQCString &className, TQWidget *tqparent, const char *name)
+: TQWidget(tqparent, name), m_className(className)
{
- setBackgroundMode(Qt::PaletteDark);
+ setBackgroundMode(TQt::PaletteDark);
}
CustomWidget::~CustomWidget()
@@ -63,18 +63,18 @@ CustomWidget::~CustomWidget()
}
void
-CustomWidget::paintEvent(QPaintEvent *)
+CustomWidget::paintEvent(TQPaintEvent *)
{
- QPainter p(this);
- p.setPen(palette().active().text());
- QRect r(rect());
+ TQPainter p(this);
+ p.setPen(tqpalette().active().text());
+ TQRect r(rect());
r.setX(r.x()+2);
- p.drawText(r, Qt::AlignTop, m_className);
+ p.drawText(r, TQt::AlignTop, m_className);
}
using namespace KFormDesigner;
-QDict<QLabel> *FormIO::m_buddies = 0;
+TQDict<TQLabel> *FormIO::m_buddies = 0;
ObjectTreeItem *FormIO::m_currentItem = 0;
Form *FormIO::m_currentForm = 0;
bool FormIO::m_savePixmapsInline = false;
@@ -99,15 +99,15 @@ FormIO::~FormIO()
}
bool
-FormIO::saveFormToFile(Form *form, const QString &filename)
+FormIO::saveFormToFile(Form *form, const TQString &filename)
{
- QString m_filename;
+ TQString m_filename;
if(!form->filename().isNull() && filename.isNull())
m_filename = form->filename();
if(filename.isNull())
{
- m_filename = KFileDialog::getSaveFileName(QString::null, i18n("*.ui|Qt Designer UI Files"));
+ m_filename = KFileDialog::getSaveFileName(TQString(), i18n("*.ui|TQt Designer UI Files"));
if(m_filename.isNull())
return false;
}
@@ -115,15 +115,15 @@ FormIO::saveFormToFile(Form *form, const QString &filename)
m_filename = filename;
form->setFilename(m_filename);
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if (!saveFormToDom(form, domDoc))
return false;
- QFile file(m_filename);
+ TQFile file(m_filename);
if (!file.open(IO_WriteOnly))
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
stream << domDoc.toString(3) << endl;
file.close();
@@ -131,9 +131,9 @@ FormIO::saveFormToFile(Form *form, const QString &filename)
}
bool
-FormIO::saveFormToByteArray(Form *form, QByteArray &dest)
+FormIO::saveFormToByteArray(Form *form, TQByteArray &dest)
{
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if (!saveFormToDom(form, domDoc))
return false;
dest = domDoc.toCString();
@@ -141,9 +141,9 @@ FormIO::saveFormToByteArray(Form *form, QByteArray &dest)
}
bool
-FormIO::saveFormToString(Form *form, QString &dest, int indent)
+FormIO::saveFormToString(Form *form, TQString &dest, int indent)
{
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if (!saveFormToDom(form, domDoc))
return false;
dest = domDoc.toString(indent);
@@ -151,54 +151,54 @@ FormIO::saveFormToString(Form *form, QString &dest, int indent)
}
bool
-FormIO::saveFormToDom(Form *form, QDomDocument &domDoc)
+FormIO::saveFormToDom(Form *form, TQDomDocument &domDoc)
{
m_currentForm = form;
- domDoc = QDomDocument("UI");
- QDomElement uiElement = domDoc.createElement("UI");
+ domDoc = TQDomDocument("UI");
+ TQDomElement uiElement = domDoc.createElement("UI");
domDoc.appendChild(uiElement);
uiElement.setAttribute("version", "3.1");
uiElement.setAttribute("stdsetdef", 1);
//update format version information
- form->headerProperties()->insert("version", QString::number(form->formatVersion()));
+ form->headerProperties()->insert("version", TQString::number(form->formatVersion()));
//custom properties
- QDomElement headerPropertiesEl = domDoc.createElement("kfd:customHeader");
- for (QMapConstIterator<QCString,QString> it=form->headerProperties()->constBegin(); it!=form->headerProperties()->constEnd(); ++it) {
+ TQDomElement headerPropertiesEl = domDoc.createElement("kfd:customHeader");
+ for (TQMapConstIterator<TQCString,TQString> it=form->headerProperties()->constBegin(); it!=form->headerProperties()->constEnd(); ++it) {
headerPropertiesEl.setAttribute(it.key(), it.data());
}
uiElement.appendChild(headerPropertiesEl);
/// We save the savePixmapsInline property in the Form
- QDomElement inlinePix = domDoc.createElement("pixmapinproject");
+ TQDomElement inlinePix = domDoc.createElement("pixmapinproject");
uiElement.appendChild(inlinePix);
// We create the top class element
- QDomElement baseClass = domDoc.createElement("class");
+ TQDomElement baseClass = domDoc.createElement("class");
uiElement.appendChild(baseClass);
- QDomText baseClassV = domDoc.createTextNode("QWidget");
+ TQDomText baseClassV = domDoc.createTextNode(TQWIDGET_OBJECT_NAME_STRING);
baseClass.appendChild(baseClassV);
// Save the toplevel widgets, and so the whole Form
saveWidget(form->objectTree(), uiElement, domDoc);
- // We then save the layoutdefaults element
- QDomElement layoutDefaults = domDoc.createElement("layoutDefaults");
- layoutDefaults.setAttribute("spacing", QString::number(form->defaultSpacing()));
- layoutDefaults.setAttribute("margin", QString::number(form->defaultMargin()));
- uiElement.appendChild(layoutDefaults);
+ // We then save the tqlayoutdefaults element
+ TQDomElement tqlayoutDefaults = domDoc.createElement("tqlayoutDefaults");
+ tqlayoutDefaults.setAttribute("spacing", TQString::number(form->defaultSpacing()));
+ tqlayoutDefaults.setAttribute("margin", TQString::number(form->defaultMargin()));
+ uiElement.appendChild(tqlayoutDefaults);
/// Save tab Stops
if(form->autoTabStops())
form->autoAssignTabStops();
- QDomElement tabStops = domDoc.createElement("tabstops");
+ TQDomElement tabStops = domDoc.createElement("tabstops");
uiElement.appendChild(tabStops);
for(ObjectTreeListIterator it( form->tabStopsIterator() ); it.current(); ++it)
{
- QDomElement tabstop = domDoc.createElement("tabstop");
+ TQDomElement tabstop = domDoc.createElement("tabstop");
tabStops.appendChild(tabstop);
- QDomText tabStopText = domDoc.createTextNode(it.current()->name());
+ TQDomText tabStopText = domDoc.createTextNode(it.current()->name());
tabstop.appendChild(tabStopText);
}
@@ -217,13 +217,13 @@ FormIO::saveFormToDom(Form *form, QDomDocument &domDoc)
}
bool
-FormIO::loadFormFromByteArray(Form *form, QWidget *container, QByteArray &src, bool preview)
+FormIO::loadFormFromByteArray(Form *form, TQWidget *container, TQByteArray &src, bool preview)
{
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
- QDomDocument inBuf;
+ TQDomDocument inBuf;
bool parsed = inBuf.setContent(src, false, &errMsg, &errLine, &errCol);
if(!parsed)
@@ -241,9 +241,9 @@ FormIO::loadFormFromByteArray(Form *form, QWidget *container, QByteArray &src, b
}
bool
-FormIO::loadFormFromString(Form *form, QWidget *container, QString &src, bool preview)
+FormIO::loadFormFromString(Form *form, TQWidget *container, TQString &src, bool preview)
{
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
@@ -251,7 +251,7 @@ FormIO::loadFormFromString(Form *form, QWidget *container, QString &src, bool pr
form->m_recentlyLoadedUICode = src;
#endif
- QDomDocument inBuf;
+ TQDomDocument inBuf;
bool parsed = inBuf.setContent(src, false, &errMsg, &errLine, &errCol);
if(!parsed)
@@ -269,32 +269,32 @@ FormIO::loadFormFromString(Form *form, QWidget *container, QString &src, bool pr
}
bool
-FormIO::loadFormFromFile(Form *form, QWidget *container, const QString &filename)
+FormIO::loadFormFromFile(Form *form, TQWidget *container, const TQString &filename)
{
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
- QString m_filename;
+ TQString m_filename;
if(filename.isNull())
{
- m_filename = KFileDialog::getOpenFileName(QString::null, i18n("*.ui|Qt Designer UI Files"));
+ m_filename = KFileDialog::getOpenFileName(TQString(), i18n("*.ui|TQt Designer UI Files"));
if(m_filename.isNull())
return false;
}
else
m_filename = filename;
- QFile file(m_filename);
+ TQFile file(m_filename);
if(!file.open(IO_ReadOnly))
{
kdDebug() << "Cannot open the file " << filename << endl;
return false;
}
- QTextStream stream(&file);
- QString text = stream.read();
+ TQTextStream stream(&file);
+ TQString text = stream.read();
- QDomDocument inBuf;
+ TQDomDocument inBuf;
bool parsed = inBuf.setContent(text, false, &errMsg, &errLine, &errCol);
if(!parsed)
@@ -308,23 +308,23 @@ FormIO::loadFormFromFile(Form *form, QWidget *container, const QString &filename
}
bool
-FormIO::loadFormFromDom(Form *form, QWidget *container, QDomDocument &inBuf)
+FormIO::loadFormFromDom(Form *form, TQWidget *container, TQDomDocument &inBuf)
{
m_currentForm = form;
- QDomElement ui = inBuf.namedItem("UI").toElement();
+ TQDomElement ui = inBuf.namedItem("UI").toElement();
//custom properties
form->headerProperties()->clear();
- QDomElement headerPropertiesEl = ui.namedItem("kfd:customHeader").toElement();
- QDomAttr attr = headerPropertiesEl.firstChild().toAttr();
+ TQDomElement headerPropertiesEl = ui.namedItem("kfd:customHeader").toElement();
+ TQDomAttr attr = headerPropertiesEl.firstChild().toAttr();
while (!attr.isNull() && attr.isAttr()) {
form->headerProperties()->insert(attr.name().latin1(), attr.value());
attr = attr.nextSibling().toAttr();
}
//update format version information
uint ver = 1; //the default
- if (form->headerProperties()->contains("version")) {
+ if (form->headerProperties()->tqcontains("version")) {
bool ok;
uint v = (*form->headerProperties())["version"].toUInt(&ok);
if (ok)
@@ -350,26 +350,26 @@ FormIO::loadFormFromDom(Form *form, QWidget *container, QDomDocument &inBuf)
m_savePixmapsInline = ( (ui.namedItem("pixmapinproject").isNull()) || (!ui.namedItem("images").isNull()) );
form->pixmapCollection()->load(ui.namedItem("collection"));
- QDomElement element = ui.namedItem("widget").toElement();
+ TQDomElement element = ui.namedItem("widget").toElement();
createToplevelWidget(form, container, element);
// Loading the tabstops
- QDomElement tabStops = ui.namedItem("tabstops").toElement();
+ TQDomElement tabStops = ui.namedItem("tabstops").toElement();
// if(tabStops.isNull())
// return 1;
if(!tabStops.isNull()) {
int i = 0;
uint itemsNotFound = 0;
- for(QDomNode n = tabStops.firstChild(); !n.isNull(); n = n.nextSibling(), i++)
+ for(TQDomNode n = tabStops.firstChild(); !n.isNull(); n = n.nextSibling(), i++)
{
- QString name = n.toElement().text();
+ TQString name = n.toElement().text();
ObjectTreeItem *item = form->objectTree()->lookup(name);
if(!item)
{
kdDebug() << "FormIO::loadFormFromDom ERROR : no ObjectTreeItem " << endl;
continue;
}
- const int index = form->tabStops()->findRef(item);
+ const int index = form->tabStops()->tqfindRef(item);
/* Compute a real destination index: "a number of not found items so far". */
const int realIndex = i - itemsNotFound;
if((index != -1) && (index != realIndex)) // the widget is not in the same place, so we move it
@@ -398,32 +398,32 @@ FormIO::loadFormFromDom(Form *form, QWidget *container, QDomDocument &inBuf)
/////////////////////////////////////////////////////////////////////////////
void
-FormIO::savePropertyValue(QDomElement &parentNode, QDomDocument &parent, const char *name,
- const QVariant &value, QWidget *w, WidgetLibrary *lib)
+FormIO::savePropertyValue(TQDomElement &tqparentNode, TQDomDocument &tqparent, const char *name,
+ const TQVariant &value, TQWidget *w, WidgetLibrary *lib)
{
// Widget specific properties and attributes ///////////////
// kdDebug() << "FormIO::savePropertyValue() Saving the property: " << name << endl;
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget = w;
+ TQWidget *subwidget = w;
bool addSubwidgetFlag = false;
- int propertyId = w->metaObject()->findProperty(name, true);
+ int propertyId = w->tqmetaObject()->tqfindProperty(name, true);
if (propertyId == -1 && subpropIface && subpropIface->subwidget()) { // try property from subwidget
subwidget = subpropIface->subwidget();
- propertyId = subpropIface->subwidget()->metaObject()->findProperty(name, true);
+ propertyId = subpropIface->subwidget()->tqmetaObject()->tqfindProperty(name, true);
addSubwidgetFlag = true;
}
if(propertyId == -1)
{
kdDebug() << "FormIO::savePropertyValue() The object doesn't have this property. Let's try the WidgetLibrary." << endl;
if(lib)
- lib->saveSpecialProperty(w->className(), name, value, w, parentNode, parent);
+ lib->saveSpecialProperty(w->className(), name, value, w, tqparentNode, tqparent);
return;
}
- const QMetaProperty *meta = subwidget->metaObject()->property(propertyId, true);
+ const TQMetaProperty *meta = subwidget->tqmetaObject()->property(propertyId, true);
if (!meta->stored( subwidget )) //not storable
return;
- QDomElement propertyE = parent.createElement("property");
+ TQDomElement propertyE = tqparent.createElement("property");
propertyE.setAttribute("name", name);
if (addSubwidgetFlag)
propertyE.setAttribute("subwidget", "true");
@@ -431,81 +431,81 @@ FormIO::savePropertyValue(QDomElement &parentNode, QDomDocument &parent, const c
if(meta && meta->isEnumType())
{
// this property is enum or set type
- QDomElement type;
- QDomText valueE;
+ TQDomElement type;
+ TQDomText valueE;
if(meta->isSetType())
{
- QStringList list = QStringList::fromStrList(meta->valueToKeys(value.toInt()));
- type = parent.createElement("set");
- valueE = parent.createTextNode(list.join("|"));
+ TQStringList list = TQStringList::fromStrList(meta->valueToKeys(value.toInt()));
+ type = tqparent.createElement("set");
+ valueE = tqparent.createTextNode(list.join("|"));
type.appendChild(valueE);
}
else
{
- QString s = meta->valueToKey(value.toInt());
- type = parent.createElement("enum");
- valueE = parent.createTextNode(s);
+ TQString s = meta->valueToKey(value.toInt());
+ type = tqparent.createElement("enum");
+ valueE = tqparent.createTextNode(s);
type.appendChild(valueE);
}
propertyE.appendChild(type);
- parentNode.appendChild(propertyE);
+ tqparentNode.appendChild(propertyE);
return;
}
- if(value.type() == QVariant::Pixmap) {
- QDomText valueE;
- QDomElement type = parent.createElement("pixmap");
- QCString property = propertyE.attribute("name").latin1();
-//todo QCString pixmapName = m_currentItem->widget()->property("pixmapName").toCString();
+ if(value.type() == TQVariant::Pixmap) {
+ TQDomText valueE;
+ TQDomElement type = tqparent.createElement("pixmap");
+ TQCString property = propertyE.attribute("name").latin1();
+//todo TQCString pixmapName = m_currentItem->widget()->property("pixmapName").toCString();
if(m_savePixmapsInline /* (js)too risky: || m_currentItem->pixmapName(property).isNull() */)
- valueE = parent.createTextNode(saveImage(parent, value.toPixmap()));
+ valueE = tqparent.createTextNode(saveImage(tqparent, value.toPixmap()));
else
- valueE = parent.createTextNode(m_currentItem->pixmapName(property));
+ valueE = tqparent.createTextNode(m_currentItem->pixmapName(property));
type.appendChild(valueE);
propertyE.appendChild(type);
- parentNode.appendChild(propertyE);
+ tqparentNode.appendChild(propertyE);
return;
}
// Saving a "normal" property
- writeVariant(parent, propertyE, value);
- parentNode.appendChild(propertyE);
+ writeVariant(tqparent, propertyE, value);
+ tqparentNode.appendChild(propertyE);
}
void
-FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant value)
+FormIO::writeVariant(TQDomDocument &tqparent, TQDomElement &tqparentNode, TQVariant value)
{
- QDomElement type;
- QDomText valueE;
+ TQDomElement type;
+ TQDomText valueE;
switch(value.type())
{
- case QVariant::String:
+ case TQVariant::String:
{
- type = parent.createElement("string");
- valueE = parent.createTextNode(value.toString());
+ type = tqparent.createElement("string");
+ valueE = tqparent.createTextNode(value.toString());
type.appendChild(valueE);
break;
}
- case QVariant::CString:
+ case TQVariant::CString:
{
- type = parent.createElement("cstring");
- valueE = parent.createTextNode(value.toString());
+ type = tqparent.createElement("cstring");
+ valueE = tqparent.createTextNode(value.toString());
type.appendChild(valueE);
break;
}
- case QVariant::Rect:
+ case TQVariant::Rect:
{
- type = parent.createElement("rect");
- QDomElement x = parent.createElement("x");
- QDomElement y = parent.createElement("y");
- QDomElement w = parent.createElement("width");
- QDomElement h = parent.createElement("height");
- QDomText valueX = parent.createTextNode(QString::number(value.toRect().x()));
- QDomText valueY = parent.createTextNode(QString::number(value.toRect().y()));
- QDomText valueW = parent.createTextNode(QString::number(value.toRect().width()));
- QDomText valueH = parent.createTextNode(QString::number(value.toRect().height()));
+ type = tqparent.createElement("rect");
+ TQDomElement x = tqparent.createElement("x");
+ TQDomElement y = tqparent.createElement("y");
+ TQDomElement w = tqparent.createElement("width");
+ TQDomElement h = tqparent.createElement("height");
+ TQDomText valueX = tqparent.createTextNode(TQString::number(value.toRect().x()));
+ TQDomText valueY = tqparent.createTextNode(TQString::number(value.toRect().y()));
+ TQDomText valueW = tqparent.createTextNode(TQString::number(value.toRect().width()));
+ TQDomText valueH = tqparent.createTextNode(TQString::number(value.toRect().height()));
x.appendChild(valueX);
y.appendChild(valueY);
@@ -518,15 +518,15 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(h);
break;
}
- case QVariant::Color:
+ case TQVariant::Color:
{
- type = parent.createElement("color");
- QDomElement r = parent.createElement("red");
- QDomElement g = parent.createElement("green");
- QDomElement b = parent.createElement("blue");
- QDomText valueR = parent.createTextNode(QString::number(value.toColor().red()));
- QDomText valueG = parent.createTextNode(QString::number(value.toColor().green()));
- QDomText valueB = parent.createTextNode(QString::number(value.toColor().blue()));
+ type = tqparent.createElement("color");
+ TQDomElement r = tqparent.createElement("red");
+ TQDomElement g = tqparent.createElement("green");
+ TQDomElement b = tqparent.createElement("blue");
+ TQDomText valueR = tqparent.createTextNode(TQString::number(value.toColor().red()));
+ TQDomText valueG = tqparent.createTextNode(TQString::number(value.toColor().green()));
+ TQDomText valueB = tqparent.createTextNode(TQString::number(value.toColor().blue()));
r.appendChild(valueR);
g.appendChild(valueG);
@@ -537,29 +537,29 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(b);
break;
}
- case QVariant::Bool:
+ case TQVariant::Bool:
{
- type = parent.createElement("bool");
- //valueE = parent.createTextNode(QString::number(value.toBool()));
- valueE = parent.createTextNode(value.toBool() ? "true" : "false");
+ type = tqparent.createElement("bool");
+ //valueE = tqparent.createTextNode(TQString::number(value.toBool()));
+ valueE = tqparent.createTextNode(value.toBool() ? "true" : "false");
type.appendChild(valueE);
break;
}
- case QVariant::Int:
- case QVariant::UInt:
+ case TQVariant::Int:
+ case TQVariant::UInt:
{
- type = parent.createElement("number");
- valueE = parent.createTextNode(QString::number(value.toInt()));
+ type = tqparent.createElement("number");
+ valueE = tqparent.createTextNode(TQString::number(value.toInt()));
type.appendChild(valueE);
break;
}
- case QVariant::Size:
+ case TQVariant::Size:
{
- type = parent.createElement("size");
- QDomElement w = parent.createElement("width");
- QDomElement h = parent.createElement("height");
- QDomText valueW = parent.createTextNode(QString::number(value.toSize().width()));
- QDomText valueH = parent.createTextNode(QString::number(value.toSize().height()));
+ type = tqparent.createElement("size");
+ TQDomElement w = tqparent.createElement("width");
+ TQDomElement h = tqparent.createElement("height");
+ TQDomText valueW = tqparent.createTextNode(TQString::number(value.toSize().width()));
+ TQDomText valueH = tqparent.createTextNode(TQString::number(value.toSize().height()));
w.appendChild(valueW);
h.appendChild(valueH);
@@ -568,13 +568,13 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(h);
break;
}
- case QVariant::Point:
+ case TQVariant::Point:
{
- type = parent.createElement("point");
- QDomElement x = parent.createElement("x");
- QDomElement y = parent.createElement("y");
- QDomText valueX = parent.createTextNode(QString::number(value.toPoint().x()));
- QDomText valueY = parent.createTextNode(QString::number(value.toPoint().y()));
+ type = tqparent.createElement("point");
+ TQDomElement x = tqparent.createElement("x");
+ TQDomElement y = tqparent.createElement("y");
+ TQDomText valueX = tqparent.createTextNode(TQString::number(value.toPoint().x()));
+ TQDomText valueY = tqparent.createTextNode(TQString::number(value.toPoint().y()));
x.appendChild(valueX);
y.appendChild(valueY);
@@ -583,23 +583,23 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(y);
break;
}
- case QVariant::Font:
+ case TQVariant::Font:
{
- type = parent.createElement("font");
- QDomElement f = parent.createElement("family");
- QDomElement p = parent.createElement("pointsize");
- QDomElement w = parent.createElement("weight");
- QDomElement b = parent.createElement("bold");
- QDomElement i = parent.createElement("italic");
- QDomElement u = parent.createElement("underline");
- QDomElement s = parent.createElement("strikeout");
- QDomText valueF = parent.createTextNode(value.toFont().family());
- QDomText valueP = parent.createTextNode(QString::number(value.toFont().pointSize()));
- QDomText valueW = parent.createTextNode(QString::number(value.toFont().weight()));
- QDomText valueB = parent.createTextNode(QString::number(value.toFont().bold()));
- QDomText valueI = parent.createTextNode(QString::number(value.toFont().italic()));
- QDomText valueU = parent.createTextNode(QString::number(value.toFont().underline()));
- QDomText valueS = parent.createTextNode(QString::number(value.toFont().strikeOut()));
+ type = tqparent.createElement("font");
+ TQDomElement f = tqparent.createElement("family");
+ TQDomElement p = tqparent.createElement("pointsize");
+ TQDomElement w = tqparent.createElement("weight");
+ TQDomElement b = tqparent.createElement("bold");
+ TQDomElement i = tqparent.createElement("italic");
+ TQDomElement u = tqparent.createElement("underline");
+ TQDomElement s = tqparent.createElement("strikeout");
+ TQDomText valueF = tqparent.createTextNode(value.toFont().family());
+ TQDomText valueP = tqparent.createTextNode(TQString::number(value.toFont().pointSize()));
+ TQDomText valueW = tqparent.createTextNode(TQString::number(value.toFont().weight()));
+ TQDomText valueB = tqparent.createTextNode(TQString::number(value.toFont().bold()));
+ TQDomText valueI = tqparent.createTextNode(TQString::number(value.toFont().italic()));
+ TQDomText valueU = tqparent.createTextNode(TQString::number(value.toFont().underline()));
+ TQDomText valueS = tqparent.createTextNode(TQString::number(value.toFont().strikeOut()));
f.appendChild(valueF);
p.appendChild(valueP);
@@ -618,24 +618,24 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(s);
break;
}
- case QVariant::Cursor:
+ case TQVariant::Cursor:
{
- type = parent.createElement("cursor");
- valueE = parent.createTextNode(QString::number(value.toCursor().shape()));
+ type = tqparent.createElement("cursor");
+ valueE = tqparent.createTextNode(TQString::number(value.toCursor().tqshape()));
type.appendChild(valueE);
break;
}
- case QVariant::SizePolicy:
+ case TQVariant::SizePolicy:
{
- type = parent.createElement("sizepolicy");
- QDomElement h = parent.createElement("hsizetype");
- QDomElement v = parent.createElement("vsizetype");
- QDomElement hs = parent.createElement("horstretch");
- QDomElement vs = parent.createElement("verstretch");
- QDomText valueH = parent.createTextNode(QString::number(value.toSizePolicy().horData()));
- QDomText valueV = parent.createTextNode(QString::number(value.toSizePolicy().verData()));
- QDomText valueHS = parent.createTextNode(QString::number(value.toSizePolicy().horStretch()));
- QDomText valueVS = parent.createTextNode(QString::number(value.toSizePolicy().verStretch()));
+ type = tqparent.createElement("sizepolicy");
+ TQDomElement h = tqparent.createElement("hsizetype");
+ TQDomElement v = tqparent.createElement("vsizetype");
+ TQDomElement hs = tqparent.createElement("horstretch");
+ TQDomElement vs = tqparent.createElement("verstretch");
+ TQDomText valueH = tqparent.createTextNode(TQString::number(value.toSizePolicy().horData()));
+ TQDomText valueV = tqparent.createTextNode(TQString::number(value.toSizePolicy().verData()));
+ TQDomText valueHS = tqparent.createTextNode(TQString::number(value.toSizePolicy().horStretch()));
+ TQDomText valueVS = tqparent.createTextNode(TQString::number(value.toSizePolicy().verStretch()));
h.appendChild(valueH);
v.appendChild(valueV);
@@ -648,15 +648,15 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(vs);
break;
}
- case QVariant::Time:
+ case TQVariant::Time:
{
- type = parent.createElement("time");
- QDomElement h = parent.createElement("hour");
- QDomElement m = parent.createElement("minute");
- QDomElement s = parent.createElement("second");
- QDomText valueH = parent.createTextNode(QString::number(value.toTime().hour()));
- QDomText valueM = parent.createTextNode(QString::number(value.toTime().minute()));
- QDomText valueS = parent.createTextNode(QString::number(value.toTime().second()));
+ type = tqparent.createElement("time");
+ TQDomElement h = tqparent.createElement("hour");
+ TQDomElement m = tqparent.createElement("minute");
+ TQDomElement s = tqparent.createElement("second");
+ TQDomText valueH = tqparent.createTextNode(TQString::number(value.toTime().hour()));
+ TQDomText valueM = tqparent.createTextNode(TQString::number(value.toTime().minute()));
+ TQDomText valueS = tqparent.createTextNode(TQString::number(value.toTime().second()));
h.appendChild(valueH);
m.appendChild(valueM);
@@ -667,15 +667,15 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(s);
break;
}
- case QVariant::Date:
+ case TQVariant::Date:
{
- type = parent.createElement("date");
- QDomElement y = parent.createElement("year");
- QDomElement m = parent.createElement("month");
- QDomElement d = parent.createElement("day");
- QDomText valueY = parent.createTextNode(QString::number(value.toDate().year()));
- QDomText valueM = parent.createTextNode(QString::number(value.toDate().month()));
- QDomText valueD = parent.createTextNode(QString::number(value.toDate().day()));
+ type = tqparent.createElement("date");
+ TQDomElement y = tqparent.createElement("year");
+ TQDomElement m = tqparent.createElement("month");
+ TQDomElement d = tqparent.createElement("day");
+ TQDomText valueY = tqparent.createTextNode(TQString::number(value.toDate().year()));
+ TQDomText valueM = tqparent.createTextNode(TQString::number(value.toDate().month()));
+ TQDomText valueD = tqparent.createTextNode(TQString::number(value.toDate().day()));
y.appendChild(valueY);
m.appendChild(valueM);
@@ -686,21 +686,21 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
type.appendChild(d);
break;
}
- case QVariant::DateTime:
+ case TQVariant::DateTime:
{
- type = parent.createElement("datetime");
- QDomElement h = parent.createElement("hour");
- QDomElement m = parent.createElement("minute");
- QDomElement s = parent.createElement("second");
- QDomElement y = parent.createElement("year");
- QDomElement mo = parent.createElement("month");
- QDomElement d = parent.createElement("day");
- QDomText valueH = parent.createTextNode(QString::number(value.toDateTime().time().hour()));
- QDomText valueM = parent.createTextNode(QString::number(value.toDateTime().time().minute()));
- QDomText valueS = parent.createTextNode(QString::number(value.toDateTime().time().second()));
- QDomText valueY = parent.createTextNode(QString::number(value.toDateTime().date().year()));
- QDomText valueMo = parent.createTextNode(QString::number(value.toDateTime().date().month()));
- QDomText valueD = parent.createTextNode(QString::number(value.toDateTime().date().day()));
+ type = tqparent.createElement("datetime");
+ TQDomElement h = tqparent.createElement("hour");
+ TQDomElement m = tqparent.createElement("minute");
+ TQDomElement s = tqparent.createElement("second");
+ TQDomElement y = tqparent.createElement("year");
+ TQDomElement mo = tqparent.createElement("month");
+ TQDomElement d = tqparent.createElement("day");
+ TQDomText valueH = tqparent.createTextNode(TQString::number(value.toDateTime().time().hour()));
+ TQDomText valueM = tqparent.createTextNode(TQString::number(value.toDateTime().time().minute()));
+ TQDomText valueS = tqparent.createTextNode(TQString::number(value.toDateTime().time().second()));
+ TQDomText valueY = tqparent.createTextNode(TQString::number(value.toDateTime().date().year()));
+ TQDomText valueMo = tqparent.createTextNode(TQString::number(value.toDateTime().date().month()));
+ TQDomText valueD = tqparent.createTextNode(TQString::number(value.toDateTime().date().day()));
h.appendChild(valueH);
m.appendChild(valueM);
@@ -721,60 +721,60 @@ FormIO::writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant val
break;
}
- parentNode.appendChild(type);
+ tqparentNode.appendChild(type);
}
void
-FormIO::savePropertyElement(QDomElement &parentNode, QDomDocument &domDoc, const QString &tagName, const QString &property, const QVariant &value)
+FormIO::savePropertyElement(TQDomElement &tqparentNode, TQDomDocument &domDoc, const TQString &tagName, const TQString &property, const TQVariant &value)
{
- QDomElement propertyE = domDoc.createElement(tagName);
+ TQDomElement propertyE = domDoc.createElement(tagName);
propertyE.setAttribute("name", property);
writeVariant(domDoc, propertyE, value);
- parentNode.appendChild(propertyE);
+ tqparentNode.appendChild(propertyE);
}
-QVariant
-FormIO::readPropertyValue(QDomNode node, QObject *obj, const QString &name)
+TQVariant
+FormIO::readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name)
{
- QDomElement tag = node.toElement();
- QString text = tag.text();
- QString type = tag.tagName();
+ TQDomElement tag = node.toElement();
+ TQString text = tag.text();
+ TQString type = tag.tagName();
if(type == "string" || type == "cstring")
return text;
else if(type == "rect")
{
- QDomElement x = node.namedItem("x").toElement();
- QDomElement y = node.namedItem("y").toElement();
- QDomElement w = node.namedItem("width").toElement();
- QDomElement h = node.namedItem("height").toElement();
+ TQDomElement x = node.namedItem("x").toElement();
+ TQDomElement y = node.namedItem("y").toElement();
+ TQDomElement w = node.namedItem("width").toElement();
+ TQDomElement h = node.namedItem("height").toElement();
int rx = x.text().toInt();
int ry = y.text().toInt();
int rw = w.text().toInt();
int rh = h.text().toInt();
- return QRect(rx, ry, rw, rh);
+ return TQRect(rx, ry, rw, rh);
}
else if(type == "color")
{
- QDomElement r = node.namedItem("red").toElement();
- QDomElement g = node.namedItem("green").toElement();
- QDomElement b = node.namedItem("blue").toElement();
+ TQDomElement r = node.namedItem("red").toElement();
+ TQDomElement g = node.namedItem("green").toElement();
+ TQDomElement b = node.namedItem("blue").toElement();
int red = r.text().toInt();
int green = g.text().toInt();
int blue = b.text().toInt();
- return QColor(red, green, blue);
+ return TQColor(red, green, blue);
}
else if(type == "bool")
{
if(text == "true")
- return QVariant(true, 3);
+ return TQVariant(true, 3);
else if(text == "false")
- return QVariant(false, 3);
- return QVariant(text.toInt(), 3);
+ return TQVariant(false, 3);
+ return TQVariant(text.toInt(), 3);
}
else if(type == "number")
{
@@ -782,29 +782,29 @@ FormIO::readPropertyValue(QDomNode node, QObject *obj, const QString &name)
}
else if(type == "size")
{
- QDomElement w = node.namedItem("width").toElement();
- QDomElement h = node.namedItem("height").toElement();
+ TQDomElement w = node.namedItem("width").toElement();
+ TQDomElement h = node.namedItem("height").toElement();
- return QSize(w.text().toInt(), h.text().toInt());
+ return TQSize(w.text().toInt(), h.text().toInt());
}
else if(type == "point")
{
- QDomElement x = node.namedItem("x").toElement();
- QDomElement y = node.namedItem("y").toElement();
+ TQDomElement x = node.namedItem("x").toElement();
+ TQDomElement y = node.namedItem("y").toElement();
- return QPoint(x.text().toInt(), y.text().toInt());
+ return TQPoint(x.text().toInt(), y.text().toInt());
}
else if(type == "font")
{
- QDomElement fa = node.namedItem("family").toElement();
- QDomElement p = node.namedItem("pointsize").toElement();
- QDomElement w = node.namedItem("weight").toElement();
- QDomElement b = node.namedItem("bold").toElement();
- QDomElement i = node.namedItem("italic").toElement();
- QDomElement u = node.namedItem("underline").toElement();
- QDomElement s = node.namedItem("strikeout").toElement();
-
- QFont f;
+ TQDomElement fa = node.namedItem("family").toElement();
+ TQDomElement p = node.namedItem("pointsize").toElement();
+ TQDomElement w = node.namedItem("weight").toElement();
+ TQDomElement b = node.namedItem("bold").toElement();
+ TQDomElement i = node.namedItem("italic").toElement();
+ TQDomElement u = node.namedItem("underline").toElement();
+ TQDomElement s = node.namedItem("strikeout").toElement();
+
+ TQFont f;
f.setFamily(fa.text());
f.setPointSize(p.text().toInt());
f.setWeight(w.text().toInt());
@@ -817,77 +817,77 @@ FormIO::readPropertyValue(QDomNode node, QObject *obj, const QString &name)
}
else if(type == "cursor")
{
- return QCursor(text.toInt());
+ return TQCursor(text.toInt());
}
else if(type == "time")
{
- QDomElement h = node.namedItem("hour").toElement();
- QDomElement m = node.namedItem("minute").toElement();
- QDomElement s = node.namedItem("second").toElement();
+ TQDomElement h = node.namedItem("hour").toElement();
+ TQDomElement m = node.namedItem("minute").toElement();
+ TQDomElement s = node.namedItem("second").toElement();
- return QTime(h.text().toInt(), m.text().toInt(), s.text().toInt());
+ return TQTime(h.text().toInt(), m.text().toInt(), s.text().toInt());
}
else if(type == "date")
{
- QDomElement y = node.namedItem("year").toElement();
- QDomElement m = node.namedItem("month").toElement();
- QDomElement d = node.namedItem("day").toElement();
+ TQDomElement y = node.namedItem("year").toElement();
+ TQDomElement m = node.namedItem("month").toElement();
+ TQDomElement d = node.namedItem("day").toElement();
- return QDate(y.text().toInt(), m.text().toInt(), d.text().toInt());
+ return TQDate(y.text().toInt(), m.text().toInt(), d.text().toInt());
}
else if(type == "datetime")
{
- QDomElement h = node.namedItem("hour").toElement();
- QDomElement m = node.namedItem("minute").toElement();
- QDomElement s = node.namedItem("second").toElement();
- QDomElement y = node.namedItem("year").toElement();
- QDomElement mo = node.namedItem("month").toElement();
- QDomElement d = node.namedItem("day").toElement();
+ TQDomElement h = node.namedItem("hour").toElement();
+ TQDomElement m = node.namedItem("minute").toElement();
+ TQDomElement s = node.namedItem("second").toElement();
+ TQDomElement y = node.namedItem("year").toElement();
+ TQDomElement mo = node.namedItem("month").toElement();
+ TQDomElement d = node.namedItem("day").toElement();
- QTime t(h.text().toInt(), m.text().toInt(), s.text().toInt());
- QDate da(y.text().toInt(), mo.text().toInt(), d.text().toInt());
+ TQTime t(h.text().toInt(), m.text().toInt(), s.text().toInt());
+ TQDate da(y.text().toInt(), mo.text().toInt(), d.text().toInt());
- return QDateTime(da, t);
+ return TQDateTime(da, t);
}
else if(type == "sizepolicy")
{
- QDomElement h = node.namedItem("hsizetype").toElement();
- QDomElement v = node.namedItem("vsizetype").toElement();
- QDomElement hs = node.namedItem("horstretch").toElement();
- QDomElement vs = node.namedItem("verstretch").toElement();
-
- QSizePolicy s;
- s.setHorData((QSizePolicy::SizeType)h.text().toInt());
- s.setVerData((QSizePolicy::SizeType)v.text().toInt());
+ TQDomElement h = node.namedItem("hsizetype").toElement();
+ TQDomElement v = node.namedItem("vsizetype").toElement();
+ TQDomElement hs = node.namedItem("horstretch").toElement();
+ TQDomElement vs = node.namedItem("verstretch").toElement();
+
+ TQSizePolicy s;
+ s.setHorData((TQSizePolicy::SizeType)h.text().toInt());
+ s.setVerData((TQSizePolicy::SizeType)v.text().toInt());
s.setHorStretch(hs.text().toInt());
s.setVerStretch(vs.text().toInt());
return s;
}
else if(type == "pixmap")
{
- if(m_savePixmapsInline || !m_currentForm || !m_currentItem || !m_currentForm->pixmapCollection()->contains(text))
+ if(m_savePixmapsInline || !m_currentForm || !m_currentItem || !m_currentForm->pixmapCollection()->tqcontains(text))
return loadImage(tag.ownerDocument(), text);
else
{
m_currentItem->setPixmapName(name.latin1(), text);
return m_currentForm->pixmapCollection()->getPixmap(text);
}
- return QVariant(QPixmap());
+ return TQVariant(TQPixmap());
}
else if(type == "enum")
return text;
else if(type == "set")
{
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(obj);
- QObject *subobject = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : obj;
- const int count = subobject->metaObject()->findProperty(name.latin1(), true);
- const QMetaProperty *meta = count!=-1 ? subobject->metaObject()->property(count, true) : 0;
+ TQObject *subobject = (subpropIface && subpropIface->subwidget()) ? TQT_TQOBJECT(subpropIface->subwidget()) : obj;
+ const int count = subobject->tqmetaObject()->tqfindProperty(name.latin1(), true);
+ const TQMetaProperty *meta = count!=-1 ? subobject->tqmetaObject()->property(count, true) : 0;
if (meta) {
if (meta->isSetType()) {
- QStrList keys;
- const QStringList list( QStringList::split("|", text) );
- for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ TQStrList keys;
+ const TQStringList list( TQStringList::split("|", text) );
+ for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
keys.append((*it).latin1());
return meta->keysToValue(keys);
@@ -898,10 +898,10 @@ FormIO::readPropertyValue(QDomNode node, QObject *obj, const QString &name)
// We will return a string list here with hope that names will
// be resolved and translated into an integer value later when subwidget is created,
// e.g. near KexiFormView::updateValuesForSubproperties()
- return QStringList::split("|", text);
+ return TQStringList::split("|", text);
}
}
- return QVariant();
+ return TQVariant();
}
/////////////////////////////////////////////////////////////////////////////
@@ -909,7 +909,7 @@ FormIO::readPropertyValue(QDomNode node, QObject *obj, const QString &name)
/////////////////////////////////////////////////////////////////////////////
void
-FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domDoc, bool insideGridLayout)
+FormIO::saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc, bool insideGridLayout)
{
if (!item)
return;
@@ -917,7 +917,7 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
// we let Spring class handle saving itself
if(item->className() == "Spring")
{
- Spring::saveSpring(item, parent, domDoc, insideGridLayout);
+ Spring::saveSpring(item, tqparent, domDoc, insideGridLayout);
return;
}
@@ -926,7 +926,7 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
if(!m_currentForm) // copying widget
{
resetCurrentForm = true;
- m_currentForm = item->container() ? item->container()->form() : item->parent()->container()->form();
+ m_currentForm = item->container() ? item->container()->form() : item->tqparent()->container()->form();
}
@@ -934,11 +934,11 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
// if(item->container())
// lib = item->container()->form()->manager()->lib();
// else
-// lib = item->parent()->container()->form()->manager()->lib();
+// lib = item->tqparent()->container()->form()->manager()->lib();
// We create the "widget" element
- QDomElement tclass = domDoc.createElement("widget");
- parent.appendChild(tclass);
+ TQDomElement tclass = domDoc.createElement("widget");
+ tqparent.appendChild(tclass);
if(insideGridLayout)
{
@@ -951,12 +951,12 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
}
}
- if(!item->parent()) // Toplevel widget
- tclass.setAttribute("class", "QWidget");
- // For compatibility, HBox, VBox and Grid are saved as "QLayoutWidget"
+ if(!item->tqparent()) // Toplevel widget
+ tclass.setAttribute("class", TQWIDGET_OBJECT_NAME_STRING);
+ // For compatibility, HBox, VBox and Grid are saved as TQLAYOUTWIDGET_OBJECT_NAME_STRING
else if(item->widget()->isA("HBox") || item->widget()->isA("VBox") || item->widget()->isA("Grid")
|| item->widget()->isA("HFlow") || item->widget()->isA("VFlow"))
- tclass.setAttribute("class", "QLayoutWidget");
+ tclass.setAttribute("class", TQLAYOUTWIDGET_OBJECT_NAME_STRING);
else if(item->widget()->isA("CustomWidget"))
tclass.setAttribute("class", item->className());
else // Normal widgets
@@ -964,42 +964,42 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
savePropertyValue(tclass, domDoc, "name", item->widget()->property("name"), item->widget());
- // Important: save dataSource property FIRST before properties like "alignment"
+ // Important: save dataSource property FIRST before properties like "tqalignment"
// - needed when subproperties are defined after subwidget creation, and subwidget is created after setting "dataSource"
// (this is the case for KexiDBAutoField)
//! @todo more properties like "dataSource" may needed here...
-// if (-1 != item->widget()->metaObject()->findProperty("dataSource"))
+// if (-1 != item->widget()->tqmetaObject()->findProperty("dataSource"))
// savePropertyValue(tclass, domDoc, "dataSource", item->widget()->property("dataSource"), item->widget());
- // We don't want to save the geometry if the widget is inside a layout (so parent.tagName() == "grid" for example)
- if(item && !item->parent()) {
+ // We don't want to save the tqgeometry if the widget is inside a tqlayout (so tqparent.tagName() == "grid" for example)
+ if(item && !item->tqparent()) {
// save form widget size, but not its position
savePropertyValue(tclass, domDoc, "geometry",
- QRect( QPoint(0,0), item->widget()->size()),
+ TQRect( TQPoint(0,0), item->widget()->size()),
item->widget());
}
// normal widget (if == "UI', it means we're copying widget)
- else if(parent.tagName() == "widget" || parent.tagName() == "UI")
+ else if(tqparent.tagName() == "widget" || tqparent.tagName() == "UI")
savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget());
// Save the buddy widget for a label
- if(item->widget()->inherits("QLabel") && ((QLabel*)item->widget())->buddy())
- savePropertyElement(tclass, domDoc, "property", "buddy", ((QLabel*)item->widget())->buddy()->name());
+ if(item->widget()->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)item->widget())->buddy())
+ savePropertyElement(tclass, domDoc, "property", "buddy", ((TQLabel*)item->widget())->buddy()->name());
// We save every property in the modifProp list of the ObjectTreeItem
- QVariantMap *map = new QVariantMap( *(item->modifiedProperties()) );
- QMap<QString,QVariant>::ConstIterator endIt = map->constEnd();
- for(QMap<QString,QVariant>::ConstIterator it = map->constBegin(); it != endIt; ++it)
+ TQVariantMap *map = new TQVariantMap( *(item->modifiedProperties()) );
+ TQMap<TQString,TQVariant>::ConstIterator endIt = map->constEnd();
+ for(TQMap<TQString,TQVariant>::ConstIterator it = map->constBegin(); it != endIt; ++it)
{
- const QCString name( it.key().latin1() );
- if(name == "hAlign" || name == "vAlign" || name == "wordbreak" || name == "alignment") {
+ const TQCString name( it.key().latin1() );
+ if(name == "hAlign" || name == "vAlign" || name == "wordbreak" || name == "tqalignment") {
if(!savedAlignment) // not to save it twice
{
- savePropertyValue(tclass, domDoc, "alignment", item->widget()->property("alignment"), item->widget());
+ savePropertyValue(tclass, domDoc, "tqalignment", item->widget()->property("tqalignment"), item->widget());
savedAlignment = true;
}
}
- else if(name == "name" || name == "geometry" || name == "layout") {
+ else if(name == "name" || name == "geometry" || name == "tqlayout") {
// these have already been saved
}
else {
@@ -1010,87 +1010,87 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
delete map;
if(item->widget()->isA("CustomWidget")) {
- QDomDocument doc("TEMP");
+ TQDomDocument doc("TEMP");
doc.setContent(item->m_unknownProps);
- for(QDomNode n = doc.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ for(TQDomNode n = doc.firstChild(); !n.isNull(); n = n.nextSibling()) {
tclass.appendChild(n.cloneNode());
}
}
- // Saving container 's layout if there is one
- QDomElement layout;
- if(item->container() && item->container()->layoutType() != Container::NoLayout)
+ // Saving container 's tqlayout if there is one
+ TQDomElement tqlayout;
+ if(item->container() && item->container()->tqlayoutType() != Container::NoLayout)
{
- if(item->container()->layout()) // there is a layout
+ if(item->container()->tqlayout()) // there is a tqlayout
{
- layout = domDoc.createElement("temp");
- savePropertyValue(layout, domDoc, "name", "unnamed", item->widget());
- if(item->modifiedProperties()->contains("layoutMargin"))
- savePropertyElement(layout, domDoc, "property", "margin", item->container()->layoutMargin());
- if(item->modifiedProperties()->contains("layoutSpacing"))
- savePropertyElement(layout, domDoc, "property", "spacing", item->container()->layoutSpacing());
- tclass.appendChild(layout);
+ tqlayout = domDoc.createElement("temp");
+ savePropertyValue(tqlayout, domDoc, "name", "unnamed", item->widget());
+ if(item->modifiedProperties()->tqcontains("tqlayoutMargin"))
+ savePropertyElement(tqlayout, domDoc, "property", "margin", item->container()->tqlayoutMargin());
+ if(item->modifiedProperties()->tqcontains("tqlayoutSpacing"))
+ savePropertyElement(tqlayout, domDoc, "property", "spacing", item->container()->tqlayoutSpacing());
+ tclass.appendChild(tqlayout);
}
}
- int layoutType = item->container() ? item->container()->layoutType() : Container::NoLayout;
- switch(layoutType) {
- case Container::Grid: // grid layout
+ int tqlayoutType = item->container() ? item->container()->tqlayoutType() : Container::NoLayout;
+ switch(tqlayoutType) {
+ case Container::Grid: // grid tqlayout
{
- layout.setTagName("grid");
- for(ObjectTreeItem *objIt = item->children()->first(); objIt; objIt = item->children()->next())
- saveWidget(objIt, layout, domDoc, true);
+ tqlayout.setTagName("grid");
+ for(ObjectTreeItem *objIt = item->tqchildren()->first(); objIt; objIt = item->tqchildren()->next())
+ saveWidget(objIt, tqlayout, domDoc, true);
break;
}
case Container::HBox: case Container::VBox:
{
- // as we don't save geometry, we need to sort widgets in the right order, not creation order
+ // as we don't save tqgeometry, we need to sort widgets in the right order, not creation order
WidgetList *list;
- if(layout.tagName() == "hbox") {
+ if(tqlayout.tagName() == "hbox") {
list = new HorWidgetList(item->container()->form()->toplevelContainer()->widget());
- layout.setTagName("hbox");
+ tqlayout.setTagName("hbox");
}
else {
list = new VerWidgetList(item->container()->form()->toplevelContainer()->widget());
- layout.setTagName("vbox");
+ tqlayout.setTagName("vbox");
}
- for(ObjectTreeItem *objTree = item->children()->first(); objTree; objTree = item->children()->next())
+ for(ObjectTreeItem *objTree = item->tqchildren()->first(); objTree; objTree = item->tqchildren()->next())
list->append(objTree->widget());
list->sort();
- for(QWidget *obj = list->first(); obj; obj = list->next()) {
+ for(TQWidget *obj = list->first(); obj; obj = list->next()) {
ObjectTreeItem *titem = item->container()->form()->objectTree()->lookup(obj->name());
if(item)
- saveWidget(titem, layout, domDoc);
+ saveWidget(titem, tqlayout, domDoc);
}
delete list;
break;
}
case Container::HFlow: case Container::VFlow:
{
- layout.setTagName("grid");
- KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->layout());
+ tqlayout.setTagName("grid");
+ KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->tqlayout());
if(!flow) break;
WidgetList *list = (WidgetList*)flow->widgetList();
// save some special properties
- savePropertyElement(layout, domDoc, "property", "customLayout", Container::layoutTypeToString(item->container()->layoutType()) );
- savePropertyElement(layout, domDoc, "property", "justify", QVariant(static_cast<KexiFlowLayout*>(item->container()->layout())->isJustified(), 3) );
+ savePropertyElement(tqlayout, domDoc, "property", "customLayout", Container::tqlayoutTypeToString(item->container()->tqlayoutType()) );
+ savePropertyElement(tqlayout, domDoc, "property", "justify", TQVariant(static_cast<KexiFlowLayout*>(item->container()->tqlayout())->isJustified(), 3) );
- // fill the widget's grid info, ie just simulate grid layout
+ // fill the widget's grid info, ie just simulate grid tqlayout
item->container()->createGridLayout(true);
- for(QWidget *obj = list->first(); obj; obj = list->next()) {
+ for(TQWidget *obj = list->first(); obj; obj = list->next()) {
ObjectTreeItem *titem = item->container()->form()->objectTree()->lookup(obj->name());
if(item)
- saveWidget(titem, layout, domDoc, true); // save grid info for compatibility with QtDesigner
+ saveWidget(titem, tqlayout, domDoc, true); // save grid info for compatibility with TQtDesigner
}
delete list;
break;
}
default:
{
- for(ObjectTreeItem *objIt = item->children()->first(); objIt; objIt = item->children()->next())
+ for(ObjectTreeItem *objIt = item->tqchildren()->first(); objIt; objIt = item->tqchildren()->next())
saveWidget(objIt, tclass, domDoc);
}
}
@@ -1103,20 +1103,20 @@ FormIO::saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domD
}
void
-FormIO::cleanClipboard(QDomElement &uiElement)
+FormIO::cleanClipboard(TQDomElement &uiElement)
{
// remove includehints element not needed
if(!uiElement.namedItem("includehints").isNull())
uiElement.removeChild(uiElement.namedItem("includehints"));
// and ensure images and connection are at the end
if(!uiElement.namedItem("connections").isNull())
- uiElement.insertAfter(uiElement.namedItem("connections"), QDomNode());
+ uiElement.insertAfter(uiElement.namedItem("connections"), TQDomNode());
if(!uiElement.namedItem("images").isNull())
- uiElement.insertAfter(uiElement.namedItem("images"), QDomNode());
+ uiElement.insertAfter(uiElement.namedItem("images"), TQDomNode());
}
void
-FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
+FormIO::loadWidget(Container *container, const TQDomElement &el, TQWidget *tqparent)
{
bool resetCurrentForm = false;
if(!m_currentForm) // pasting widget
@@ -1126,8 +1126,8 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
}
// We first look for the widget's name
- QString wname;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQString wname;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "name"))
{
@@ -1136,16 +1136,16 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
}
}
- QWidget *w;
- QCString classname, alternate;
+ TQWidget *w;
+ TQCString classname, alternate;
// We translate some name (for compatibility)
if(el.tagName() == "spacer")
classname = "Spring";
- else if(el.attribute("class") == "QLayoutWidget")
+ else if(el.attribute("class") == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
{
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QString tagName = n.toElement().tagName();
+ TQString tagName = n.toElement().tagName();
if(tagName == "property")
continue;
if(tagName == "hbox")
@@ -1153,8 +1153,8 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
else if(tagName == "vbox")
classname = "VBox";
else if(tagName == "grid") {
- // first, see if it is flow layout
- for(QDomNode child = n.firstChild(); !child.isNull(); child = child.nextSibling()) {
+ // first, see if it is flow tqlayout
+ for(TQDomNode child = n.firstChild(); !child.isNull(); child = child.nextSibling()) {
if((child.toElement().tagName() == "property")
&& (child.toElement().attribute("name") == "customLayout"))
{
@@ -1187,11 +1187,11 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
widgetOptions ^= WidgetFactory::DesignViewMode;
}
- if(!parent)
+ if(!tqparent)
w = container->form()->library()->createWidget(classname, container->widget(),
wname.latin1(), container, widgetOptions);
else
- w = container->form()->library()->createWidget(classname, parent, wname.latin1(),
+ w = container->form()->library()->createWidget(classname, tqparent, wname.latin1(),
container, widgetOptions);
}
@@ -1204,7 +1204,7 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
KAcceleratorManager::setNoAccel(w);
}
#endif
- w->setStyle(&(container->widget()->style()));
+ w->setStyle(&(container->widget()->tqstyle()));
w->show();
// We create and insert the ObjectTreeItem at the good place in the ObjectTree
@@ -1213,12 +1213,12 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
// not yet created
item = new ObjectTreeItem(container->form()->library()->displayName(classname),
wname, w, container);
- if(parent) {
- ObjectTreeItem *titem = container->form()->objectTree()->lookup(parent->name());
+ if(tqparent) {
+ ObjectTreeItem *titem = container->form()->objectTree()->lookup(tqparent->name());
if(titem)
container->form()->objectTree()->addItem(titem, item);
else
- kdDebug() << "FORMIO :: ERROR no parent widget " << endl;
+ kdDebug() << "FORMIO :: ERROR no tqparent widget " << endl;
}
else
container->form()->objectTree()->addItem(container->objectTree(), item);
@@ -1231,37 +1231,37 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
m_currentItem = item;
// if we are inside a Grid, we need to insert the widget in the good cell
- if(container->layoutType() == Container::Grid) {
- QGridLayout *layout = (QGridLayout*)container->layout();
+ if(container->tqlayoutType() == Container::Grid) {
+ TQGridLayout *tqlayout = (TQGridLayout*)container->tqlayout();
if(el.hasAttribute("rowspan")) { // widget spans multiple cells
- if(layout)
- layout->addMultiCellWidget(w, el.attribute("row").toInt(), el.attribute("row").toInt() + el.attribute("rowspan").toInt()-1,
+ if(tqlayout)
+ tqlayout->addMultiCellWidget(w, el.attribute("row").toInt(), el.attribute("row").toInt() + el.attribute("rowspan").toInt()-1,
el.attribute("column").toInt(), el.attribute("column").toInt() + el.attribute("colspan").toInt()-1);
item->setGridPos(el.attribute("row").toInt(), el.attribute("column").toInt(), el.attribute("rowspan").toInt(),
el.attribute("colspan").toInt());
}
else {
- if(layout)
- layout->addWidget(w, el.attribute("row").toInt(), el.attribute("column").toInt());
+ if(tqlayout)
+ tqlayout->addWidget(w, el.attribute("row").toInt(), el.attribute("column").toInt());
item->setGridPos(el.attribute("row").toInt(), el.attribute("column").toInt(), 0, 0);
}
}
- else if(container->layout())
- container->layout()->add(w);
+ else if(container->tqlayout())
+ container->tqlayout()->add(w);
readChildNodes(item, container, el, w);
- if(item->container() && item->container()->layout())
- item->container()->layout()->activate();
+ if(item->container() && item->container()->tqlayout())
+ item->container()->tqlayout()->activate();
// We add the autoSaveProperties in the modifProp list of the ObjectTreeItem, so that they are saved later
- QValueList<QCString> list(container->form()->library()->autoSaveProperties(w->className()));
- QValueList<QCString>::ConstIterator endIt = list.constEnd();
+ TQValueList<TQCString> list(container->form()->library()->autoSaveProperties(w->className()));
+ TQValueList<TQCString>::ConstIterator endIt = list.constEnd();
KFormDesigner::WidgetWithSubpropertiesInterface* subpropIface
= dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
- for(QValueList<QCString>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
- if(subwidget->metaObject()->findProperty(*it, true) != -1)
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
+ for(TQValueList<TQCString>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ if(subwidget->tqmetaObject()->tqfindProperty(*it, true) != -1)
item->addModifiedProperty(*it, subwidget->property(*it));
}
@@ -1271,11 +1271,11 @@ FormIO::loadWidget(Container *container, const QDomElement &el, QWidget *parent)
}
void
-FormIO::createToplevelWidget(Form *form, QWidget *container, QDomElement &el)
+FormIO::createToplevelWidget(Form *form, TQWidget *container, TQDomElement &el)
{
// We first look for the widget's name
- QString wname;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQString wname;
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "property") && (n.toElement().attribute("name") == "name"))
{
@@ -1290,16 +1290,16 @@ FormIO::createToplevelWidget(Form *form, QWidget *container, QDomElement &el)
form->objectTree()->rename(form->objectTree()->name(), wname);
form->setInteractiveMode(false);
- QDict<QLabel> *oldBuddies = 0;
+ TQDict<TQLabel> *oldBuddies = 0;
if(m_buddies) // save old buddies (for subforms)
oldBuddies = m_buddies;
- m_buddies = new QDict<QLabel>();
+ m_buddies = new TQDict<TQLabel>();
m_currentItem = form->objectTree();
readChildNodes(form->objectTree(), form->toplevelContainer(), el, container);
// Now the Form is fully loaded, we can assign the buddies
- QDictIterator<QLabel> it(*m_buddies);
+ TQDictIterator<TQLabel> it(*m_buddies);
for(; it.current(); ++it)
{
ObjectTreeItem *item = form->objectTree()->lookup(it.currentKey());
@@ -1319,31 +1319,31 @@ FormIO::createToplevelWidget(Form *form, QWidget *container, QDomElement &el)
}
void
-FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomElement &el, QWidget *w)
+FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const TQDomElement &el, TQWidget *w)
{
- QString eltag = el.tagName();
+ TQString eltag = el.tagName();
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
- for(QDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = el.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QString tag = n.toElement().tagName();
- QDomElement node = n.toElement();
+ TQString tag = n.toElement().tagName();
+ TQDomElement node = n.toElement();
if((tag == "property") || (tag == "attribute"))
{
- QString name = node.attribute("name");
+ TQString name = node.attribute("name");
//if(name == "geometry")
// hasGeometryProp = true;
if( ((eltag == "grid") || (eltag == "hbox") || (eltag == "vbox")) &&
- (name == "name")) // we don't care about layout names
+ (name == "name")) // we don't care about tqlayout names
continue;
if (node.attribute("subwidget")=="true") {
//this is property for subwidget: remember it for delayed setting
//because now the subwidget could be not created yet (true e.g. for KexiDBAutoField)
- const QVariant val( readPropertyValue(node.firstChild(), w, name) );
+ const TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) );
kdDebug() << val.toStringList() << endl;
item->addSubproperty( name.latin1(), val );
//subwidget->setProperty(name.latin1(), val);
@@ -1353,32 +1353,32 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomEle
// We cannot assign the buddy now as the buddy widget may not be created yet
if(name == "buddy")
- m_buddies->insert(readPropertyValue(node.firstChild(), w, name).toString(), (QLabel*)w);
+ m_buddies->insert(readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toString(), (TQLabel*)w);
else if(((eltag == "grid") || (eltag == "hbox") || (eltag == "vbox")) &&
- item->container() && item->container()->layout()) {
+ item->container() && item->container()->tqlayout()) {
// We load the margin of a Layout
if(name == "margin") {
- int margin = readPropertyValue(node.firstChild(), w, name).toInt();
+ int margin = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt();
item->container()->setLayoutMargin(margin);
- item->container()->layout()->setMargin(margin);
+ item->container()->tqlayout()->setMargin(margin);
}
// We load the spacing of a Layout
else if(name == "spacing") {
- int spacing = readPropertyValue(node.firstChild(), w, name).toInt();
+ int spacing = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toInt();
item->container()->setLayoutSpacing(spacing);
- item->container()->layout()->setSpacing(spacing);
+ item->container()->tqlayout()->setSpacing(spacing);
}
else if((name == "justify")){
- bool justify = readPropertyValue(node.firstChild(), w, name).toBool();
- KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->layout());
+ bool justify = readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name).toBool();
+ KexiFlowLayout *flow = static_cast<KexiFlowLayout*>(item->container()->tqlayout());
if(flow)
flow->setJustified(justify);
}
}
// If the object doesn't have this property, we let the Factory handle it (maybe a special property)
- else if(subwidget->metaObject()->findProperty(name.latin1(), true) == -1)
+ else if(subwidget->tqmetaObject()->tqfindProperty(name.latin1(), true) == -1)
{
- if(w->className() == QString::fromLatin1("CustomWidget"))
+ if(w->className() == TQString::tqfromLatin1("CustomWidget"))
item->storeUnknownProperty(node);
else {
bool read = container->form()->library()->readSpecialProperty(
@@ -1389,10 +1389,10 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomEle
}
else // we have a normal property, let's load it
{
- QVariant val( readPropertyValue(node.firstChild(), w, name) );
+ TQVariant val( readPropertyValue(node.firstChild(), TQT_TQOBJECT(w), name) );
if(name == "geometry" && dynamic_cast<FormWidget*>(w)) {
- //fix geometry if needed - this is top level form widget
- QRect r( val.toRect() );
+ //fix tqgeometry if needed - this is top level form widget
+ TQRect r( val.toRect() );
if (r.left()<0) //negative X!
r.moveLeft(0);
if (r.top()<0) //negative Y!
@@ -1400,8 +1400,8 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomEle
val = r;
}
subwidget->setProperty(name.latin1(), val);
-// int count = w->metaObject()->findProperty(name, true);
-// const QMetaProperty *meta = w->metaObject()->property(count, true);
+// int count = w->tqmetaObject()->findProperty(name, true);
+// const TQMetaProperty *meta = w->tqmetaObject()->property(count, true);
// if(meta && meta->isEnumType()) {
// val = w->property(name.latin1()); //update: we want a numeric value of enum
// }
@@ -1419,48 +1419,48 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomEle
loadWidget(container, node, w);
}
else if(tag == "grid") {
- // first, see if it is flow layout
- QString layoutName;
- for(QDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) {
+ // first, see if it is flow tqlayout
+ TQString tqlayoutName;
+ for(TQDomNode child = node.firstChild(); !child.isNull(); child = child.nextSibling()) {
if((child.toElement().tagName() == "property") && (child.toElement().attribute("name") == "customLayout")) {
- layoutName = child.toElement().text();
+ tqlayoutName = child.toElement().text();
break;
}
}
- if(layoutName == "HFlow") {
+ if(tqlayoutName == "HFlow") {
item->container()->m_layType = Container::HFlow;
- KexiFlowLayout *layout = new KexiFlowLayout(item->widget());
- layout->setOrientation(Horizontal);
- item->container()->m_layout = (QLayout*)layout;
+ KexiFlowLayout *tqlayout = new KexiFlowLayout(item->widget());
+ tqlayout->setOrientation(Qt::Horizontal);
+ item->container()->m_layout = (TQLayout*)tqlayout;
}
- else if(layoutName == "VFlow") {
+ else if(tqlayoutName == "VFlow") {
item->container()->m_layType = Container::VFlow;
- KexiFlowLayout *layout = new KexiFlowLayout(item->widget());
- layout->setOrientation(Vertical);
- item->container()->m_layout = (QLayout*)layout;
+ KexiFlowLayout *tqlayout = new KexiFlowLayout(item->widget());
+ tqlayout->setOrientation(Qt::Vertical);
+ item->container()->m_layout = (TQLayout*)tqlayout;
}
- else { // grid layout
+ else { // grid tqlayout
item->container()->m_layType = Container::Grid;
- QGridLayout *layout = new QGridLayout(item->widget(), 1, 1);
- item->container()->m_layout = (QLayout*)layout;
+ TQGridLayout *tqlayout = new TQGridLayout(item->widget(), 1, 1);
+ item->container()->m_layout = (TQLayout*)tqlayout;
}
readChildNodes(item, container, node, w);
}
else if(tag == "vbox") {
item->container()->m_layType = Container::VBox;
- QVBoxLayout *layout = new QVBoxLayout(item->widget());
- item->container()->m_layout = (QLayout*)layout;
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(item->widget());
+ item->container()->m_layout = (TQLayout*)tqlayout;
readChildNodes(item, container, node, w);
}
else if(tag == "hbox") {
item->container()->m_layType = Container::HBox;
- QHBoxLayout *layout = new QHBoxLayout(item->widget());
- item->container()->m_layout = (QLayout*)layout;
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(item->widget());
+ item->container()->m_layout = (TQLayout*)tqlayout;
readChildNodes(item, container, node, w);
}
else {// unknown tag, we let the Factory handle it
- if(w->className() == QString::fromLatin1("CustomWidget"))
+ if(w->className() == TQString::tqfromLatin1("CustomWidget"))
item->storeUnknownProperty(node);
else {
bool read = container->form()->library()->readSpecialProperty(
@@ -1477,13 +1477,13 @@ FormIO::readChildNodes(ObjectTreeItem *item, Container *container, const QDomEle
/////////////////////////////////////////////////////////////////////////////
void
-FormIO::addIncludeFileName(const QString &include, QDomDocument &domDoc)
+FormIO::addIncludeFileName(const TQString &include, TQDomDocument &domDoc)
{
if(include.isEmpty())
return;
- QDomElement includes;
- QDomElement uiEl = domDoc.namedItem("UI").toElement();
+ TQDomElement includes;
+ TQDomElement uiEl = domDoc.namedItem("UI").toElement();
if(uiEl.namedItem("includehints").isNull())
{
includes = domDoc.createElement("includehints");
@@ -1493,57 +1493,57 @@ FormIO::addIncludeFileName(const QString &include, QDomDocument &domDoc)
includes = uiEl.namedItem("includehints").toElement();
// Check if this include has already been saved, and return if it is the case
- for(QDomNode n = includes.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = includes.firstChild(); !n.isNull(); n = n.nextSibling())
{
if(n.toElement().text() == include)
return;
}
- QDomElement includeHint = domDoc.createElement("includehint");
+ TQDomElement includeHint = domDoc.createElement("includehint");
includes.appendChild(includeHint);
- QDomText includeText = domDoc.createTextNode(include);
+ TQDomText includeText = domDoc.createTextNode(include);
includeHint.appendChild(includeText);
}
-//////// Qt Designer code: these two functions were copied (and adapted) from Qt Designer for compatibility ////////
+//////// TQt Designer code: these two functions were copied (and adapted) from TQt Designer for compatibility ////////
-QString
-FormIO::saveImage(QDomDocument &domDoc, const QPixmap &pixmap)
+TQString
+FormIO::saveImage(TQDomDocument &domDoc, const TQPixmap &pixmap)
{
- QDomNode node = domDoc.namedItem("images");
- QDomElement images;
+ TQDomNode node = domDoc.namedItem("images");
+ TQDomElement images;
if(node.isNull())
{
images = domDoc.createElement("images");
- QDomElement ui = domDoc.namedItem("UI").toElement();
+ TQDomElement ui = domDoc.namedItem("UI").toElement();
ui.appendChild(images);
}
else
images = node.toElement();
int count = images.childNodes().count();
- QDomElement image = domDoc.createElement("image");
- QString name = "image" + QString::number(count);
+ TQDomElement image = domDoc.createElement("image");
+ TQString name = "image" + TQString::number(count);
image.setAttribute("name", name);
- QImage img = pixmap.convertToImage();
- QByteArray ba;
- QBuffer buf(ba);
+ TQImage img = pixmap.convertToImage();
+ TQByteArray ba;
+ TQBuffer buf(ba);
buf.open( IO_WriteOnly | IO_Translate );
- QString format = img.depth() > 1 ? "XPM" : "XBM";
- QImageIO iio( &buf, format.latin1() );
+ TQString format = img.depth() > 1 ? "XPM" : "XBM";
+ TQImageIO iio( &buf, format.latin1() );
iio.setImage( img );
iio.write();
buf.close();
- QByteArray bazip = qCompress( ba );
+ TQByteArray bazip = tqCompress( ba );
ulong len = bazip.size();
- QDomElement data = domDoc.createElement("data");
+ TQDomElement data = domDoc.createElement("data");
data.setAttribute("format", format + ".GZ");
data.setAttribute("length", ba.size());
static const char hexchars[] = "0123456789abcdef";
- QString content;
+ TQString content;
for(int i = 4; i < (int)len; ++i)
{
uchar s = (uchar) bazip[i];
@@ -1551,7 +1551,7 @@ FormIO::saveImage(QDomDocument &domDoc, const QPixmap &pixmap)
content += hexchars[s & 0x0f];
}
- QDomText text = domDoc.createTextNode(content);
+ TQDomText text = domDoc.createTextNode(content);
data.appendChild(text);
image.appendChild(data);
images.appendChild(image);
@@ -1559,15 +1559,15 @@ FormIO::saveImage(QDomDocument &domDoc, const QPixmap &pixmap)
return name;
}
-QPixmap
-FormIO::loadImage(QDomDocument domDoc, const QString& name)
+TQPixmap
+FormIO::loadImage(TQDomDocument domDoc, const TQString& name)
{
- QDomElement images = domDoc.namedItem("UI").namedItem("images").toElement();
+ TQDomElement images = domDoc.namedItem("UI").namedItem("images").toElement();
if(images.isNull())
return 0;
- QDomElement image;
- for(QDomNode n = images.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQDomElement image;
+ for(TQDomNode n = images.firstChild(); !n.isNull(); n = n.nextSibling())
{
if((n.toElement().tagName() == "image") && (n.toElement().attribute("name") == name))
{
@@ -1576,8 +1576,8 @@ FormIO::loadImage(QDomDocument domDoc, const QString& name)
}
}
- QPixmap pix;
- QString data = image.namedItem("data").toElement().text();
+ TQPixmap pix;
+ TQString data = image.namedItem("data").toElement().text();
const int lengthOffset = 4;
int baSize = data.length() / 2 + lengthOffset;
uchar *ba = new uchar[baSize];
@@ -1598,20 +1598,20 @@ FormIO::loadImage(QDomDocument domDoc, const QString& name)
ba[i] = r;
}
- QString format = image.namedItem("data").toElement().attribute("format", "PNG");
+ TQString format = image.namedItem("data").toElement().attribute("format", "PNG");
if((format == "XPM.GZ") || (format == "XBM.GZ"))
{
ulong len = image.attribute("length").toULong();
if(len < data.length() * 5)
len = data.length() * 5;
- // qUncompress() expects the first 4 bytes to be the expected length of
+ // tqUncompress() expects the first 4 bytes to be the expected length of
// the uncompressed data
ba[0] = ( len & 0xff000000 ) >> 24;
ba[1] = ( len & 0x00ff0000 ) >> 16;
ba[2] = ( len & 0x0000ff00 ) >> 8;
ba[3] = ( len & 0x000000ff );
- QByteArray baunzip = qUncompress(ba, baSize);
- pix.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')).latin1() );
+ TQByteArray baunzip = tqUncompress(ba, baSize);
+ pix.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.tqfind('.')).latin1() );
}
else
pix.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format.latin1() );
@@ -1621,6 +1621,6 @@ FormIO::loadImage(QDomDocument domDoc, const QString& name)
return pix;
}
-//////// End of Qt Designer code ////////////////////////////////////////////////////////
+//////// End of TQt Designer code ////////////////////////////////////////////////////////
#include "formIO.moc"
diff --git a/kexi/formeditor/formIO.h b/kexi/formeditor/formIO.h
index b7337182a..f23084337 100644
--- a/kexi/formeditor/formIO.h
+++ b/kexi/formeditor/formIO.h
@@ -21,33 +21,34 @@
#ifndef FORMIO_H
#define FORMIO_H
-#include <qobject.h>
-#include <qdict.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qmap.h>
-
-class QString;
-class QDomElement;
-class QDomNode;
-class QDomDocument;
-class QDomText;
-class QVariant;
-class QLabel;
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+
+class TQString;
+class TQDomElement;
+class TQDomNode;
+class TQDomDocument;
+class TQDomText;
+class TQVariant;
+class TQLabel;
//! A blank widget displayed when class is not supported
-class KFORMEDITOR_EXPORT CustomWidget : public QWidget
+class KFORMEDITOR_EXPORT CustomWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CustomWidget(const QCString &className, QWidget *parent, const char *name);
+ CustomWidget(const TQCString &className, TQWidget *tqparent, const char *name);
virtual ~CustomWidget();
- virtual void paintEvent(QPaintEvent *ev);
+ virtual void paintEvent(TQPaintEvent *ev);
private:
- QCString m_className;
+ TQCString m_className;
};
namespace KFormDesigner {
@@ -68,53 +69,54 @@ KFORMEDITOR_EXPORT uint version();
/** This class act as a namespace for all .ui files related functions, ie saving/loading .ui files.
You don't need to create a FormIO object, as all methods are static.\n
This class is able to read and write Forms to .ui files, and to save each type of properties, including set and enum
- properties, and pixmaps(pixmap-related code was taken from Qt Designer).
+ properties, and pixmaps(pixmap-related code was taken from TQt Designer).
**/
//! A class to save/load forms from .ui files
-class KFORMEDITOR_EXPORT FormIO : public QObject
+class KFORMEDITOR_EXPORT FormIO : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
FormIO();
~FormIO();
- /*! Save the Form in the \a domDoc QDomDocument. Called by saveForm().
+ /*! Save the Form in the \a domDoc TQDomDocument. Called by saveForm().
\return true if saving succeeded.
\sa saveForm() */
- static bool saveFormToDom(Form *form, QDomDocument &domDoc);
+ static bool saveFormToDom(Form *form, TQDomDocument &domDoc);
/*! Save the Form \a form to the file \a filename. If \a filename is null or not given,
a Save File dialog will be shown to choose dest file.
\return true if saving succeeded.
\todo Add errors code and error dialog
*/
- static bool saveFormToFile(Form *form, const QString &filename=QString::null);
+ static bool saveFormToFile(Form *form, const TQString &filename=TQString());
/*! Saves the Form to the \a dest string. \a indent can be specified to apply indentation.
\return true if saving succeeded.
\sa saveForm()
*/
- static bool saveFormToString(Form *form, QString &dest, int indent = 0);
+ static bool saveFormToString(Form *form, TQString &dest, int indent = 0);
- /*! Saves the \a form inside the \a dest QByteArray.
+ /*! Saves the \a form inside the \a dest TQByteArray.
\return true if saving succeeded.
\sa saveFormToDom(), saveForm()
*/
- static bool saveFormToByteArray(Form *form, QByteArray &dest);
+ static bool saveFormToByteArray(Form *form, TQByteArray &dest);
- /*! Loads a form from the \a domDoc QDomDocument. Called by loadForm() and loadFormData().
+ /*! Loads a form from the \a domDoc TQDomDocument. Called by loadForm() and loadFormData().
\return true if loading succeeded. */
- static bool loadFormFromDom(Form *form, QWidget *container, QDomDocument &domDoc);
+ static bool loadFormFromDom(Form *form, TQWidget *container, TQDomDocument &domDoc);
- /*! Loads a form from the \a src QByteArray.
+ /*! Loads a form from the \a src TQByteArray.
\sa loadFormFromDom(), loadForm().
\return true if loading succeeded.
*/
- static bool loadFormFromByteArray(Form *form, QWidget *container, QByteArray &src,
+ static bool loadFormFromByteArray(Form *form, TQWidget *container, TQByteArray &src,
bool preview=false);
- static bool loadFormFromString(Form *form, QWidget *container, QString &src, bool preview=false);
+ static bool loadFormFromString(Form *form, TQWidget *container, TQString &src, bool preview=false);
/*! Loads the .ui file \a filename in the Form \a form. If \a filename is null or not given,
a Open File dialog will be shown to select the file to open.
@@ -122,48 +124,48 @@ class KFORMEDITOR_EXPORT FormIO : public QObject
\return true if loading succeeded.
\todo Add errors code and error dialog
*/
- static bool loadFormFromFile(Form *form, QWidget *container, const QString &filename=QString::null);
+ static bool loadFormFromFile(Form *form, TQWidget *container, const TQString &filename=TQString());
/*! Saves the widget associated to the ObjectTreeItem \a item into DOM document \a domDoc,
- with \a parent as parent node.
+ with \a tqparent as tqparent node.
It calls readPropertyValue() for each object property, readAttribute() for each attribute and
itself to save child widgets.\n
\return true if saving succeeded.
This is used to copy/paste widgets.
*/
- static void saveWidget(ObjectTreeItem *item, QDomElement &parent, QDomDocument &domDoc,
+ static void saveWidget(ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc,
bool insideGridLayout=false);
- /*! Cleans the "UI" QDomElement after saving widget. It deletes the "includes" element
+ /*! Cleans the "UI" TQDomElement after saving widget. It deletes the "includes" element
not needed when pasting, and make sure all the "widget" elements are at the beginning.
Call this after copying a widget, before pasting.*/
- static void cleanClipboard(QDomElement &uiElement);
+ static void cleanClipboard(TQDomElement &uiElement);
- /*! Loads the widget associated to the QDomElement \a el into the Container \a container,
- with \a parent as parent widget.
- If parent = 0, the Container::widget() is used as parent widget.
+ /*! Loads the widget associated to the TQDomElement \a el into the Container \a container,
+ with \a tqparent as tqparent widget.
+ If tqparent = 0, the Container::widget() is used as tqparent widget.
This is used to copy/paste widgets.
*/
static void loadWidget(Container *container,
- const QDomElement &el, QWidget *parent=0);
+ const TQDomElement &el, TQWidget *tqparent=0);
- /*! Save an element in the \a domDoc as child of \a parentNode.
+ /*! Save an element in the \a domDoc as child of \a tqparentNode.
The element will be saved like this :
\code <$(tagName) name = "$(property)">< value_as_XML ><$(tagName)/>
\endcode
*/
- static void savePropertyElement(QDomElement &parentNode, QDomDocument &domDoc, const QString &tagName,
- const QString &property, const QVariant &value);
+ static void savePropertyElement(TQDomElement &tqparentNode, TQDomDocument &domDoc, const TQString &tagName,
+ const TQString &property, const TQVariant &value);
/*! Read an object property in the DOM doc.
- \param node the QDomNode of the property
+ \param node the TQDomNode of the property
\param obj the widget whose property is being read
\param name the name of the property being read
*/
- static QVariant readPropertyValue(QDomNode node, QObject *obj, const QString &name);
+ static TQVariant readPropertyValue(TQDomNode node, TQObject *obj, const TQString &name);
/*! Write an object property in the DOM doc.
- \param parentNode the DOM document to write to
+ \param tqparentNode the DOM document to write to
\param name the name of the property being saved
\param value the value of this property
\param w the widget whose property is being saved
@@ -172,46 +174,46 @@ class KFORMEDITOR_EXPORT FormIO : public QObject
Properties of subwidget are saved with subwidget="true" arribute added
to 'property' XML element.
*/
- static void savePropertyValue(QDomElement &parentNode, QDomDocument &parent, const char *name,
- const QVariant &value, QWidget *w, WidgetLibrary *lib=0);
+ static void savePropertyValue(TQDomElement &tqparentNode, TQDomDocument &tqparent, const char *name,
+ const TQVariant &value, TQWidget *w, WidgetLibrary *lib=0);
protected:
- /*! Saves the QVariant \a value as text to be included in an xml file, with \a parentNode.*/
- static void writeVariant(QDomDocument &parent, QDomElement &parentNode, QVariant value);
+ /*! Saves the TQVariant \a value as text to be included in an xml file, with \a tqparentNode.*/
+ static void writeVariant(TQDomDocument &tqparent, TQDomElement &tqparentNode, TQVariant value);
- /*! Creates a toplevel widget from the QDomElement \a element in the Form \a form,
- with \a parent as parent widget.
+ /*! Creates a toplevel widget from the TQDomElement \a element in the Form \a form,
+ with \a tqparent as tqparent widget.
It calls readPropertyValue() and loadWidget() to load child widgets.
*/
- static void createToplevelWidget(Form *form, QWidget *container, QDomElement &element);
+ static void createToplevelWidget(Form *form, TQWidget *container, TQDomElement &element);
/*! \return the name of the pixmap saved, to use to access it
- This function save the QPixmap \a pixmap into the DOM document \a domDoc.
- The pixmap is converted to XPM and compressed for compatibility with Qt Designer.
+ This function save the TQPixmap \a pixmap into the DOM document \a domDoc.
+ The pixmap is converted to XPM and compressed for compatibility with TQt Designer.
Encoding code is taken from Designer.
*/
- static QString saveImage(QDomDocument &domDoc, const QPixmap &pixmap);
+ static TQString saveImage(TQDomDocument &domDoc, const TQPixmap &pixmap);
/*! \return the loaded pixmap
This function loads the pixmap named \a name in the DOM document \a domDoc.
Decoding code is taken from QT Designer.
*/
- static QPixmap loadImage(QDomDocument domDoc, const QString& name);
+ static TQPixmap loadImage(TQDomDocument domDoc, const TQString& name);
/*! Reads the child nodes of a "widget" element. */
static void readChildNodes(ObjectTreeItem *tree, Container *container,
- const QDomElement &el, QWidget *w);
+ const TQDomElement &el, TQWidget *w);
/*! Adds an include file name to be saved in the "includehints" part of .ui file,
which is needed by uic. */
- static void addIncludeFileName(const QString &include, QDomDocument &domDoc);
+ static void addIncludeFileName(const TQString &include, TQDomDocument &domDoc);
private:
// This dict stores buddies associations until the Form is completely loaded.
- static QDict<QLabel> *m_buddies;
+ static TQDict<TQLabel> *m_buddies;
/// Instead of having to pass these for every functions, we just store them in the class
- //static QWidgdet *m_currentWidget;
+ //static TQWidgdet *m_currentWidget;
static ObjectTreeItem *m_currentItem;
static Form *m_currentForm;
static bool m_savePixmapsInline;
diff --git a/kexi/formeditor/formmanager.cpp b/kexi/formeditor/formmanager.cpp
index 20b40cf94..85001f5e4 100644
--- a/kexi/formeditor/formmanager.cpp
+++ b/kexi/formeditor/formmanager.cpp
@@ -20,16 +20,16 @@
#include <kdebug.h>
-#include <qworkspace.h>
-#include <qcursor.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qobjectlist.h>
-#include <qstylefactory.h>
-#include <qmetaobject.h>
-#include <qregexp.h>
-#include <qvaluevector.h>
-#include <qvbox.h>
+#include <tqworkspace.h>
+#include <tqcursor.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqobjectlist.h>
+#include <tqstylefactory.h>
+#include <tqmetaobject.h>
+#include <tqregexp.h>
+#include <tqvaluevector.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -51,7 +51,7 @@
#include <kfontdialog.h>
#include <kdeversion.h>
-#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9) && !defined(Q_WS_WIN)
+#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9) && !defined(TQ_WS_WIN)
# include <kactioncollection.h>
#endif
@@ -83,8 +83,8 @@ namespace KFormDesigner {
class PropertyFactory : public KoProperty::CustomPropertyFactory
{
public:
- PropertyFactory(QObject *parent)
- : KoProperty::CustomPropertyFactory(parent)
+ PropertyFactory(TQObject *tqparent)
+ : KoProperty::CustomPropertyFactory(tqparent)
// m_manager(manager)
{
}
@@ -105,8 +105,8 @@ using namespace KFormDesigner;
static KStaticDeleter<FormManager> m_managerDeleter;
FormManager* FormManager::_self = 0L;
-FormManager::FormManager(QObject *parent, int options, const char *name)
- : QObject(parent, name)
+FormManager::FormManager(TQObject *tqparent, int options, const char *name)
+ : TQObject(tqparent, name)
#ifdef KEXI_DEBUG_GUI
, m_uiCodeDialog(0)
, m_options(options)
@@ -121,7 +121,7 @@ FormManager::FormManager(QObject *parent, int options, const char *name)
KGlobal::locale()->insertCatalogue("kformdesigner");
#endif
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(KApplication::SETTINGS_SHORTCUTS);
//moved to createWidgetLibrary() m_lib = new WidgetLibrary(this, supportedFactoryGroups);
@@ -139,9 +139,9 @@ FormManager::FormManager(QObject *parent, int options, const char *name)
m_domDoc.appendChild(m_domDoc.createElement("UI"));
m_deleteWidgetLater_list.setAutoDelete(true);
- connect( &m_deleteWidgetLater_timer, SIGNAL(timeout()), this, SLOT(deleteWidgetLaterTimeout()));
- connect( this, SIGNAL(connectionCreated(KFormDesigner::Form*, KFormDesigner::Connection&)),
- this, SLOT(slotConnectionCreated(KFormDesigner::Form*, KFormDesigner::Connection&)));
+ connect( &m_deleteWidgetLater_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(deleteWidgetLaterTimeout()));
+ connect( this, TQT_SIGNAL(connectionCreated(KFormDesigner::Form*, KFormDesigner::Connection&)),
+ this, TQT_SLOT(slotConnectionCreated(KFormDesigner::Form*, KFormDesigner::Connection&)));
// register kfd custom editors
KoProperty::FactoryManager::self()->registerFactoryForEditor(KoProperty::Pixmap,
@@ -166,7 +166,7 @@ FormManager* FormManager::self()
}
WidgetLibrary*
-FormManager::createWidgetLibrary(FormManager* m, const QStringList& supportedFactoryGroups)
+FormManager::createWidgetLibrary(FormManager* m, const TQStringList& supportedFactoryGroups)
{
if(!_self)
m_managerDeleter.setObject( _self, m );
@@ -187,8 +187,8 @@ FormManager::setObjectTreeView(ObjectTreeView *treeview)
{
m_treeview = treeview;
if (m_treeview)
- connect(m_propSet, SIGNAL(widgetNameChanged(const QCString&, const QCString&)),
- m_treeview, SLOT(renameItem(const QCString&, const QCString&)));
+ connect(m_propSet, TQT_SIGNAL(widgetNameChanged(const TQCString&, const TQCString&)),
+ m_treeview, TQT_SLOT(renameItem(const TQCString&, const TQCString&)));
}
ActionList
@@ -196,13 +196,13 @@ FormManager::createActions(WidgetLibrary *lib, KActionCollection* collection, KX
{
m_collection = collection;
- ActionList actions = lib->createWidgetActions(client, m_collection, this, SLOT(insertWidget(const QCString &)));
+ ActionList actions = lib->createWidgetActions(client, m_collection, this, TQT_SLOT(insertWidget(const TQCString &)));
if (m_options & HideSignalSlotConnections)
m_dragConnection = 0;
else {
m_dragConnection = new KToggleAction(i18n("Connect Signals/Slots"),
- "signalslot", KShortcut(0), this, SLOT(startCreatingConnection()), m_collection,
+ "signalslot", KShortcut(0), this, TQT_SLOT(startCreatingConnection()), m_collection,
"drag_connection");
//to be exclusive with any 'widget' action
m_dragConnection->setExclusiveGroup("LibActionWidgets");
@@ -211,30 +211,30 @@ FormManager::createActions(WidgetLibrary *lib, KActionCollection* collection, KX
}
m_pointer = new KToggleAction(i18n("Pointer"), "mouse_pointer", KShortcut(0),
- this, SLOT(slotPointerClicked()), m_collection, "pointer");
+ this, TQT_SLOT(slotPointerClicked()), m_collection, "pointer");
m_pointer->setExclusiveGroup("LibActionWidgets"); //to be exclusive with any 'widget' action
m_pointer->setChecked(true);
actions.append(m_pointer);
- m_snapToGrid = new KToggleAction(i18n("Snap to Grid"), QString::null, KShortcut(0),
+ m_snapToGrid = new KToggleAction(i18n("Snap to Grid"), TQString(), KShortcut(0),
0, 0, m_collection, "snap_to_grid");
m_snapToGrid->setChecked(true);
actions.append(m_snapToGrid);
// Create the Style selection action (with a combo box in toolbar and submenu items)
KSelectAction *m_style = new KSelectAction( i18n("Style"), KShortcut(0),
- this, SLOT(slotStyle()), m_collection, "change_style");
+ this, TQT_SLOT(slotStyle()), m_collection, "change_style");
m_style->setEditable(false);
KGlobal::config()->setGroup("General");
- QString currentStyle = QString::fromLatin1(kapp->style().name()).lower();
- const QStringList styles = QStyleFactory::keys();
+ TQString currentStyle = TQString::tqfromLatin1(kapp->tqstyle().name()).lower();
+ const TQStringList styles = TQStyleFactory::keys();
m_style->setItems(styles);
m_style->setCurrentItem(0);
- QStringList::ConstIterator endIt = styles.constEnd();
+ TQStringList::ConstIterator endIt = styles.constEnd();
int idx = 0;
- for (QStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
+ for (TQStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
{
if ((*it).lower() == currentStyle) {
m_style->setCurrentItem(idx);
@@ -278,7 +278,7 @@ FormManager::redo()
}
void
-FormManager::insertWidget(const QCString &classname)
+FormManager::insertWidget(const TQCString &classname)
{
if(m_drawingSlot)
stopCreatingConnection();
@@ -288,17 +288,17 @@ FormManager::insertWidget(const QCString &classname)
Form *form;
for(form = m_forms.first(); form; form = m_forms.next())
{
-// form->d->cursors = new QMap<QString, QCursor>();
+// form->d->cursors = new TQMap<TQString, TQCursor>();
if (form->toplevelContainer())
- form->widget()->setCursor(QCursor(CrossCursor));
- QObjectList *l = form->widget()->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
+ form->widget()->setCursor(TQCursor(CrossCursor));
+ TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
{
- if( ((QWidget*)o)->ownCursor() )
+ if( ((TQWidget*)o)->ownCursor() )
{
-// form->d->cursors->insert(o->name(), ((QWidget*)o)->cursor());
- form->d->cursors.insert(o, static_cast<QWidget*>(o)->cursor());
- static_cast<QWidget*>(o)->setCursor(QCursor(Qt::CrossCursor));
+// form->d->cursors->insert(o->name(), ((TQWidget*)o)->cursor());
+ form->d->cursors.insert(o, TQT_TQWIDGET(o)->cursor());
+ TQT_TQWIDGET(o)->setCursor(TQCursor(TQt::CrossCursor));
}
}
@@ -322,16 +322,16 @@ FormManager::stopInsert()
for(form = m_forms.first(); form; form = m_forms.next())
{
form->widget()->unsetCursor();
- QObjectList *l = form->widget()->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
+ TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
{
- static_cast<QWidget*>(o)->unsetCursor();
+ TQT_TQWIDGET(o)->unsetCursor();
#if 0
- if( ((QWidget*)o)->ownCursor()) {
- QMap<QObject*,QCursor>::ConstIterator curIt( form->d->cursors.find(o) );
+ if( ((TQWidget*)o)->ownCursor()) {
+ TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.tqfind(o) );
if (curIt!=form->d->cursors.constEnd())
- static_cast<QWidget*>(o)->setCursor( *curIt );
-// ((QWidget*)o)->setCursor( (*(form->d->cursors))[o->name()] ) ;
+ TQT_TQWIDGET(o)->setCursor( *curIt );
+// ((TQWidget*)o)->setCursor( (*(form->d->cursors))[o->name()] ) ;
}
#endif
}
@@ -366,22 +366,22 @@ FormManager::startCreatingConnection()
Form *form;
for(form = m_forms.first(); form; form = m_forms.next())
{
-// form->d->cursors = new QMap<QString, QCursor>();
- form->d->mouseTrackers = new QStringList();
+// form->d->cursors = new TQMap<TQString, TQCursor>();
+ form->d->mouseTrackers = new TQStringList();
if (form->toplevelContainer())
{
- form->widget()->setCursor(QCursor(PointingHandCursor));
+ form->widget()->setCursor(TQCursor(PointingHandCursor));
form->widget()->setMouseTracking(true);
}
- QObjectList *l = form->widget()->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
+ TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
{
- QWidget *w = static_cast<QWidget*>(o);
+ TQWidget *w = TQT_TQWIDGET(o);
if( w->ownCursor() )
{
- form->d->cursors.insert(w, w->cursor());
-// form->d->cursors->insert(w->name(), w->cursor());
- w->setCursor(QCursor(PointingHandCursor ));
+ form->d->cursors.insert(TQT_TQOBJECT(w), w->cursor());
+// form->d->cursors->insert(TQT_TQOBJECT(w)->name(), w->cursor());
+ w->setCursor(TQCursor(PointingHandCursor ));
}
if(w->hasMouseTracking())
form->d->mouseTrackers->append(w->name());
@@ -413,7 +413,7 @@ FormManager::resetCreatedConnection()
m_active->formWidget()->clearForm();
}
if (m_active && m_active->widget())
- m_active->widget()->repaint();
+ m_active->widget()->tqrepaint();
}
void
@@ -432,14 +432,14 @@ FormManager::stopCreatingConnection()
{
form->widget()->unsetCursor();
form->widget()->setMouseTracking(false);
- QObjectList *l = form->widget()->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
+ TQObjectList *l = form->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
{
- QWidget *w = (QWidget*)o;
+ TQWidget *w = (TQWidget*)o;
if( w->ownCursor()) {
- QMap<QObject*,QCursor>::ConstIterator curIt( form->d->cursors.find(o) );
+ TQMap<TQObject*,TQCursor>::ConstIterator curIt( form->d->cursors.tqfind(o) );
if (curIt!=form->d->cursors.constEnd())
- static_cast<QWidget*>(o)->setCursor( *curIt );
+ TQT_TQWIDGET(o)->setCursor( *curIt );
}
// w->setCursor( (*(form->d->cursors))[o->name()] ) ;
w->setMouseTracking( !form->d->mouseTrackers->grep(w->name()).isEmpty() );
@@ -466,10 +466,10 @@ FormManager::snapWidgetsToGrid()
}
void
-FormManager::windowChanged(QWidget *w)
+FormManager::windowChanged(TQWidget *w)
{
kdDebug() << "FormManager::windowChanged("
- << (w ? (QString(w->className())+" "+w->name()) : QString("0")) << ")" << endl;
+ << (w ? (TQString(w->className())+" "+w->name()) : TQString("0")) << ")" << endl;
if(!w)
{
@@ -502,12 +502,12 @@ FormManager::windowChanged(QWidget *w)
#ifndef KFD_NO_STYLES
// update the 'style' action
KSelectAction *m_style = (KSelectAction*)m_collection->action("change_style", "KSelectAction");
- const QString currentStyle = form->widget()->style().name();
- const QStringList styles = m_style->items();
+ const TQString currentStyle = form->widget()->style().name();
+ const TQStringList styles = m_style->items();
int idx = 0;
- QStringList::ConstIterator endIt = styles.constEnd();
- for (QStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
+ TQStringList::ConstIterator endIt = styles.constEnd();
+ for (TQStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
{
if ((*it).lower() == currentStyle) {
kdDebug() << "Updating the style to " << currentStyle << endl;
@@ -545,12 +545,12 @@ FormManager::windowChanged(QWidget *w)
#ifndef KFD_NO_STYLES
// update the 'style' action
KSelectAction *m_style = (KSelectAction*)m_collection->action("change_style", "KSelectAction");
- const QString currentStyle = form->widget()->style().name();
- const QStringList styles = m_style->items();
+ const TQString currentStyle = form->widget()->style().name();
+ const TQStringList styles = m_style->items();
int idx = 0;
- QStringList::ConstIterator endIt = styles.constEnd();
- for (QStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
+ TQStringList::ConstIterator endIt = styles.constEnd();
+ for (TQStringList::ConstIterator it = styles.constBegin(); it != endIt; ++it, ++idx)
{
if ((*it).lower() == currentStyle) {
kdDebug() << "Updating the style to " << currentStyle << endl;
@@ -580,7 +580,7 @@ FormManager::activeForm() const
}
Form*
-FormManager::formForWidget(QWidget *w)
+FormManager::formForWidget(TQWidget *w)
{
for(Form *form = m_forms.first(); form; form = m_forms.next()) {
if(form->toplevelContainer() && form->widget() == w)
@@ -595,7 +595,7 @@ FormManager::deleteForm(Form *form)
{
if (!form)
return;
- if(m_forms.find(form) == -1)
+ if(m_forms.tqfind(form) == -1)
m_preview.remove(form);
else
m_forms.remove(form);
@@ -628,28 +628,28 @@ FormManager::initForm(Form *form)
m_active = form;
- connect(form, SIGNAL(selectionChanged(QWidget*, bool, bool)),
- m_propSet, SLOT(setSelectedWidgetWithoutReload(QWidget*, bool, bool)));
+ connect(form, TQT_SIGNAL(selectionChanged(TQWidget*, bool, bool)),
+ m_propSet, TQT_SLOT(setSelectedWidgetWithoutReload(TQWidget*, bool, bool)));
if(m_treeview)
{
- connect(form, SIGNAL(selectionChanged(QWidget*, bool, bool)),
- m_treeview, SLOT(setSelectedWidget(QWidget*, bool)));
- connect(form, SIGNAL(childAdded(ObjectTreeItem* )), m_treeview, SLOT(addItem(ObjectTreeItem*)));
- connect(form, SIGNAL(childRemoved(ObjectTreeItem* )), m_treeview, SLOT(removeItem(ObjectTreeItem*)));
+ connect(form, TQT_SIGNAL(selectionChanged(TQWidget*, bool, bool)),
+ m_treeview, TQT_SLOT(setSelectedWidget(TQWidget*, bool)));
+ connect(form, TQT_SIGNAL(childAdded(ObjectTreeItem* )), m_treeview, TQT_SLOT(addItem(ObjectTreeItem*)));
+ connect(form, TQT_SIGNAL(childRemoved(ObjectTreeItem* )), m_treeview, TQT_SLOT(removeItem(ObjectTreeItem*)));
}
- connect(m_propSet, SIGNAL(widgetNameChanged(const QCString&, const QCString&)),
- form, SLOT(changeName(const QCString&, const QCString&)));
+ connect(m_propSet, TQT_SIGNAL(widgetNameChanged(const TQCString&, const TQCString&)),
+ form, TQT_SLOT(changeName(const TQCString&, const TQCString&)));
form->setSelectedWidget(form->widget());
windowChanged(form->widget());
}
void
-FormManager::previewForm(Form *form, QWidget *container, Form *toForm)
+FormManager::previewForm(Form *form, TQWidget *container, Form *toForm)
{
if(!form || !container || !form->objectTree())
return;
- QDomDocument domDoc;
+ TQDomDocument domDoc;
if (!FormIO::saveFormToDom(form, domDoc))
return;
@@ -660,7 +660,7 @@ FormManager::previewForm(Form *form, QWidget *container, Form *toForm)
else
myform = toForm;
myform->createToplevel(container);
- container->setStyle( &(form->widget()->style()) );
+ container->setStyle( &(form->widget()->tqstyle()) );
if (!FormIO::loadFormFromDom(myform, container, domDoc)) {
delete myform;
@@ -674,19 +674,19 @@ FormManager::previewForm(Form *form, QWidget *container, Form *toForm)
/*
bool
-FormManager::loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf)
+FormManager::loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf)
{
return FormIO::loadFormFromDom(myform, container, domDoc);
}
bool
-FormManager::saveFormToStringInternal(Form *form, QString &dest, int indent)
+FormManager::saveFormToStringInternal(Form *form, TQString &dest, int indent)
{
return KFormDesigner::FormIO::saveFormToString(form, dest, indent);
}*/
bool
-FormManager::isTopLevel(QWidget *w)
+FormManager::isTopLevel(TQWidget *w)
{
if(!activeForm() || !activeForm()->objectTree())
return false;
@@ -698,7 +698,7 @@ FormManager::isTopLevel(QWidget *w)
if(!item)
return true;
- return (!item->parent());
+ return (!item->tqparent());
}
void
@@ -707,7 +707,7 @@ FormManager::deleteWidget()
if(!activeForm() || !activeForm()->objectTree())
return;
- QPtrList<QWidget> *list = activeForm()->selectedWidgets();
+ TQPtrList<TQWidget> *list = activeForm()->selectedWidgets();
if(list->isEmpty())
return;
@@ -726,28 +726,28 @@ FormManager::copyWidget()
if (!activeForm() || !activeForm()->objectTree())
return;
- QPtrList<QWidget> *list = activeForm()->selectedWidgets();
+ TQPtrList<TQWidget> *list = activeForm()->selectedWidgets();
if(list->isEmpty())
return;
removeChildrenFromList(*list);
// We clear the current clipboard
- m_domDoc.setContent(QString(), true);
- QDomElement parent = m_domDoc.createElement("UI");
- m_domDoc.appendChild(parent);
+ m_domDoc.setContent(TQString(), true);
+ TQDomElement tqparent = m_domDoc.createElement("UI");
+ m_domDoc.appendChild(tqparent);
- QWidget *w;
+ TQWidget *w;
for(w = list->first(); w; w = list->next())
{
ObjectTreeItem *it = activeForm()->objectTree()->lookup(w->name());
if (!it)
continue;
- FormIO::saveWidget(it, parent, m_domDoc);
+ FormIO::saveWidget(it, tqparent, m_domDoc);
}
- FormIO::cleanClipboard(parent);
+ FormIO::cleanClipboard(tqparent);
activeForm()->emitActionSignals(); // to update 'Paste' item state
}
@@ -758,7 +758,7 @@ FormManager::cutWidget()
if(!activeForm() || !activeForm()->objectTree())
return;
- QPtrList<QWidget> *list = activeForm()->selectedWidgets();
+ TQPtrList<TQWidget> *list = activeForm()->selectedWidgets();
if(list->isEmpty())
return;
@@ -779,23 +779,23 @@ FormManager::pasteWidget()
}
void
-FormManager::setInsertPoint(const QPoint &p)
+FormManager::setInsertPoint(const TQPoint &p)
{
m_insertPoint = p;
}
void
-FormManager::createSignalMenu(QWidget *w)
+FormManager::createSignalMenu(TQWidget *w)
{
m_sigSlotMenu = new KPopupMenu();
m_sigSlotMenu->insertTitle(SmallIcon("connection"), i18n("Signals"));
- QStrList list = w->metaObject()->signalNames(true);
- QStrListIterator it(list);
+ TQStrList list = w->tqmetaObject()->signalNames(true);
+ TQStrListIterator it(list);
for(; it.current() != 0; ++it)
m_sigSlotMenu->insertItem(*it);
- int result = m_sigSlotMenu->exec(QCursor::pos());
+ int result = m_sigSlotMenu->exec(TQCursor::pos());
if(result == -1)
resetCreatedConnection();
else
@@ -806,27 +806,27 @@ FormManager::createSignalMenu(QWidget *w)
}
void
-FormManager::createSlotMenu(QWidget *w)
+FormManager::createSlotMenu(TQWidget *w)
{
m_sigSlotMenu = new KPopupMenu();
m_sigSlotMenu->insertTitle(SmallIcon("connection"), i18n("Slots"));
- QString signalArg( m_connection->signal().remove( QRegExp(".*[(]|[)]") ) );
+ TQString signalArg( m_connection->signal().remove( TQRegExp(".*[(]|[)]") ) );
- QStrList list = w->metaObject()->slotNames(true);
- QStrListIterator it(list);
+ TQStrList list = w->tqmetaObject()->slotNames(true);
+ TQStrListIterator it(list);
for(; it.current() != 0; ++it)
{
// we add the slot only if it is compatible with the signal
- QString slotArg(*it);
- slotArg = slotArg.remove( QRegExp(".*[(]|[)]") );
- if(!signalArg.startsWith(slotArg, true)) // args not compatible
+ TQString slotArg(*it);
+ slotArg = slotArg.remove( TQRegExp(".*[(]|[)]") );
+ if(!signalArg.tqstartsWith(slotArg, true)) // args not compatible
continue;
m_sigSlotMenu->insertItem(*it);
}
- int result = m_sigSlotMenu->exec(QCursor::pos());
+ int result = m_sigSlotMenu->exec(TQCursor::pos());
if(result == -1)
resetCreatedConnection();
else
@@ -837,7 +837,7 @@ FormManager::createSlotMenu(QWidget *w)
}
void
-FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCursor)
+FormManager::createContextMenu(TQWidget *w, Container *container, bool popupAtCursor)
{
if(!activeForm() || !activeForm()->widget())
return;
@@ -845,12 +845,12 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
const uint widgetsCount = container->form()->selectedWidgets()->count();
const bool multiple = widgetsCount > 1;
//const bool enableRemove = w != m_active->widget();
- // We only enablelayout creation if more than one widget with the same parent are selected
+ // We only enabletqlayout creation if more than one widget with the same tqparent are selected
const bool enableLayout = multiple || w == container->widget();
m_menuWidget = w;
- QString n = container->form()->library()->displayName(w->className());
-// QValueVector<int> menuIds();
+ TQString n = container->form()->library()->displayName(w->className());
+// TQValueVector<int> menuIds();
if (!m_popup) {
m_popup = new KPopupMenu();
@@ -863,14 +863,14 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
if(!multiple)
{
if(w == container->form()->widget())
- m_popup->insertTitle(SmallIcon("form"), i18n("%1 : Form").arg(w->name()) );
+ m_popup->insertTitle(SmallIcon("form"), i18n("%1 : Form").tqarg(w->name()) );
else
m_popup->insertTitle( SmallIcon(
- container->form()->library()->iconName(w->className())), QString(w->name()) + " : " + n );
+ container->form()->library()->iconName(w->className())), TQString(w->name()) + " : " + n );
}
else
m_popup->insertTitle(SmallIcon("multiple_obj"), i18n("Multiple Widgets")
- + QString(" (%1)").arg(widgetsCount));
+ + TQString(" (%1)").tqarg(widgetsCount));
KAction *a;
#define PLUG_ACTION(_name, forceVisible) \
@@ -890,7 +890,7 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
PLUG_ACTION("edit_paste", true);
PLUG_ACTION("edit_delete", !toplevelWidgetSelected);
separatorNeeded = true;
- PLUG_ACTION("layout_menu", enableLayout);
+ PLUG_ACTION("tqlayout_menu", enableLayout);
PLUG_ACTION("break_layout", enableLayout);
separatorNeeded = true;
PLUG_ACTION("align_menu", !toplevelWidgetSelected);
@@ -898,13 +898,13 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
separatorNeeded = true;
// We create the buddy menu
- if(!multiple && w->inherits("QLabel") && ((QLabel*)w)->text().contains("&") && (((QLabel*)w)->textFormat() != RichText))
+ if(!multiple && w->inherits(TQLABEL_OBJECT_NAME_STRING) && ((TQLabel*)w)->text().tqcontains("&") && (((TQLabel*)w)->textFormat() != RichText))
{
if (separatorNeeded)
m_popup->insertSeparator();
KPopupMenu *sub = new KPopupMenu(w);
- QWidget *buddy = ((QLabel*)w)->buddy();
+ TQWidget *buddy = ((TQLabel*)w)->buddy();
sub->insertItem(i18n("No Buddy"), MenuNoBuddy);
if(!buddy)
@@ -923,7 +923,7 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
/*int id =*/ m_popup->insertItem(i18n("Choose Buddy..."), sub);
// menuIds->append(id);
- connect(sub, SIGNAL(activated(int)), this, SLOT(buddyChosen(int)));
+ connect(sub, TQT_SIGNAL(activated(int)), this, TQT_SLOT(buddyChosen(int)));
separatorNeeded = true;
}
@@ -937,8 +937,8 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
// We create the signals menu
KPopupMenu *sigMenu = new KPopupMenu();
- QStrList list = w->metaObject()->signalNames(true);
- QStrListIterator it(list);
+ TQStrList list = w->tqmetaObject()->signalNames(true);
+ TQStrListIterator it(list);
for(; it.current() != 0; ++it)
sigMenu->insertItem(*it);
@@ -946,7 +946,7 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
// menuIds->append(id);
if(list.isEmpty())
m_popup->setItemEnabled(id, false);
- connect(sigMenu, SIGNAL(activated(int)), this, SLOT(menuSignalChosen(int)));
+ connect(sigMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(menuSignalChosen(int)));
separatorNeeded = true;
}
#endif
@@ -975,20 +975,20 @@ FormManager::createContextMenu(QWidget *w, Container *container, bool popupAtCur
}
//show the popup at the selected widget
- QPoint popupPos;
+ TQPoint popupPos;
if (popupAtCursor) {
- popupPos = QCursor::pos();
+ popupPos = TQCursor::pos();
}
else {
WidgetList *lst = container->form()->selectedWidgets();
- QWidget * sel_w = lst ? lst->first() : container->form()->selectedWidget();
- popupPos = sel_w ? sel_w->mapToGlobal(QPoint(sel_w->width()/2, sel_w->height()/2)) : QCursor::pos();
+ TQWidget * sel_w = lst ? lst->first() : container->form()->selectedWidget();
+ popupPos = sel_w ? sel_w->mapToGlobal(TQPoint(sel_w->width()/2, sel_w->height()/2)) : TQCursor::pos();
}
m_insertPoint = container->widget()->mapFromGlobal(popupPos);
- m_popup->exec(popupPos);//QCursor::pos());
- m_insertPoint = QPoint();
+ m_popup->exec(popupPos);//TQCursor::pos());
+ m_insertPoint = TQPoint();
-// QValueVector<int>::iterator it;
+// TQValueVector<int>::iterator it;
// for(it = menuIds->begin(); it != menuIds->end(); ++it)
// m_popup->removeItem(*it);
}
@@ -998,7 +998,7 @@ FormManager::buddyChosen(int id)
{
if(!m_menuWidget)
return;
- QLabel *label = static_cast<QLabel*>((QWidget*)m_menuWidget);
+ TQLabel *label = static_cast<TQLabel*>((TQWidget*)m_menuWidget);
if(id == MenuNoBuddy)
{
@@ -1050,52 +1050,52 @@ FormManager::slotConnectionCreated(Form *form, Connection &connection)
}
void
-FormManager::layoutHBox()
+FormManager::tqlayoutHBox()
{
createLayout(Container::HBox);
}
void
-FormManager::layoutVBox()
+FormManager::tqlayoutVBox()
{
createLayout(Container::VBox);
}
void
-FormManager::layoutGrid()
+FormManager::tqlayoutGrid()
{
createLayout(Container::Grid);
}
void
-FormManager::layoutHSplitter()
+FormManager::tqlayoutHSplitter()
{
createLayout(Container::HSplitter);
}
void
-FormManager::layoutVSplitter()
+FormManager::tqlayoutVSplitter()
{
createLayout(Container::VSplitter);
}
void
-FormManager::layoutHFlow()
+FormManager::tqlayoutHFlow()
{
createLayout(Container::HFlow);
}
void
-FormManager::layoutVFlow()
+FormManager::tqlayoutVFlow()
{
createLayout(Container::VFlow);
}
void
-FormManager::createLayout(int layoutType)
+FormManager::createLayout(int tqlayoutType)
{
WidgetList *list = m_active->selectedWidgets();
- // if only one widget is selected (a container), we modify its layout
+ // if only one widget is selected (a container), we modify its tqlayout
if (list->isEmpty()) {//sanity check
kdWarning() << "FormManager::createLayout(): list is empty!" << endl;
return;
@@ -1103,26 +1103,26 @@ FormManager::createLayout(int layoutType)
if(list->count() == 1)
{
ObjectTreeItem *item = m_active->objectTree()->lookup(list->first()->name());
- if(!item || !item->container() || !m_propSet->contains("layout"))
+ if(!item || !item->container() || !m_propSet->tqcontains("tqlayout"))
return;
- (*m_propSet)["layout"] = Container::layoutTypeToString(layoutType);
+ (*m_propSet)["tqlayout"] = Container::tqlayoutTypeToString(tqlayoutType);
return;
}
- QWidget *parent = list->first()->parentWidget();
- for(QWidget *w = list->first(); w; w = list->next())
+ TQWidget *tqparent = list->first()->tqparentWidget();
+ for(TQWidget *w = list->first(); w; w = list->next())
{
- kdDebug() << "comparing widget " << w->name() << " whose parent is " << w->parentWidget()->name() << " insteaed of " << parent->name() << endl;
- if(w->parentWidget() != parent)
+ kdDebug() << "comparing widget " << w->name() << " whose tqparent is " << w->tqparentWidget()->name() << " insteaed of " << tqparent->name() << endl;
+ if(w->tqparentWidget() != tqparent)
{
- KMessageBox::sorry(m_active->widget()->topLevelWidget(), i18n("<b>Cannot create the layout.</b>\n"
- "All selected widgets must have the same parent."));
- kdDebug() << "FormManager::createLayout() widgets don't have the same parent widget" << endl;
+ KMessageBox::sorry(m_active->widget()->tqtopLevelWidget(), i18n("<b>Cannot create the tqlayout.</b>\n"
+ "All selected widgets must have the same tqparent."));
+ kdDebug() << "FormManager::createLayout() widgets don't have the same tqparent widget" << endl;
return;
}
}
- KCommand *com = new CreateLayoutCommand(layoutType, *list, m_active);
+ KCommand *com = new CreateLayoutCommand(tqlayoutType, *list, m_active);
m_active->addCommand(com, true);
}
@@ -1133,7 +1133,7 @@ FormManager::breakLayout()
return;
Container *container = activeForm()->activeContainer();
- QCString c( container->widget()->className() );
+ TQCString c( container->widget()->className() );
if((c == "Grid") || (c == "VBox") || (c == "HBox") || (c == "HFlow") || (c == "VFlow"))
{
@@ -1143,14 +1143,14 @@ FormManager::breakLayout()
else // normal container
{
if(activeForm()->selectedWidgets()->count() == 1)
- (*m_propSet)["layout"] = "NoLayout";
+ (*m_propSet)["tqlayout"] = "NoLayout";
else
container->setLayout(Container::NoLayout);
}
}
void
-FormManager::showPropertySet(WidgetPropertySet *set, bool forceReload, const QCString& propertyToSelect)
+FormManager::showPropertySet(WidgetPropertySet *set, bool forceReload, const TQCString& propertyToSelect)
{
if (m_objectBlockingPropertyEditorUpdating)
return;
@@ -1188,10 +1188,10 @@ FormManager::editTabOrder()
{
if(!activeForm() || !activeForm()->objectTree())
return;
- QWidget *topLevel = m_active->widget()->topLevelWidget();
+ TQWidget *topLevel = m_active->widget()->tqtopLevelWidget();
TabStopDialog dlg(topLevel);
//const bool oldAutoTabStops = m_active->autoTabStops();
- if (dlg.exec(m_active) == QDialog::Accepted) {
+ if (dlg.exec(m_active) == TQDialog::Accepted) {
//inform about changing "autoTabStop" property
// -- this will be received eg. by Kexi, so custom "autoTabStop" property can be updated
emit autoTabStopsSet(m_active, dlg.autoTabStops());
@@ -1207,12 +1207,12 @@ FormManager::slotStyle()
return;
KSelectAction *m_style = (KSelectAction*)m_collection->action("change_style", "KSelectAction");
- QString style = m_style->currentText();
- activeForm()->widget()->setStyle( style);
+ TQString style = m_style->currentText();
+ activeForm()->widget()->setStyle( style );
- QObjectList *l = activeForm()->widget()->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
- (static_cast<QWidget*>(o))->setStyle( style );
+ TQObjectList *l = activeForm()->widget()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
+ (TQT_TQWIDGET(o))->setStyle( style );
delete l;
}
@@ -1222,7 +1222,7 @@ FormManager::editFormPixmapCollection()
if(!activeForm() || !activeForm()->objectTree())
return;
- PixmapCollectionEditor dialog(activeForm()->pixmapCollection(), activeForm()->widget()->topLevelWidget());
+ PixmapCollectionEditor dialog(activeForm()->pixmapCollection(), activeForm()->widget()->tqtopLevelWidget());
dialog.exec();
}
@@ -1234,7 +1234,7 @@ FormManager::editConnections()
if(!activeForm() || !activeForm()->objectTree())
return;
- ConnectionDialog dialog(activeForm()->widget()->topLevelWidget());
+ ConnectionDialog dialog(activeForm()->widget()->tqtopLevelWidget());
dialog.exec(activeForm());
}
@@ -1244,13 +1244,13 @@ FormManager::alignWidgets(int type)
if(!activeForm() || !activeForm()->objectTree() || (activeForm()->selectedWidgets()->count() < 2))
return;
- QWidget *parentWidget = activeForm()->selectedWidgets()->first()->parentWidget();
+ TQWidget *tqparentWidget = activeForm()->selectedWidgets()->first()->tqparentWidget();
- for(QWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
+ for(TQWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
{
- if(w->parentWidget() != parentWidget)
+ if(w->tqparentWidget() != tqparentWidget)
{
- kdDebug() << "FormManager::alignWidgets() type ==" << type << " widgets don't have the same parent widget" << endl;
+ kdDebug() << "FormManager::alignWidgets() type ==" << type << " widgets don't have the same tqparent widget" << endl;
return;
}
}
@@ -1359,7 +1359,7 @@ FormManager::bringWidgetToFront()
if(!activeForm() || !activeForm()->objectTree())
return;
- for(QWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
+ for(TQWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
w->raise();
}
@@ -1369,7 +1369,7 @@ FormManager::sendWidgetToBack()
if(!activeForm() || !activeForm()->objectTree())
return;
- for(QWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
+ for(TQWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
w->lower();
}
@@ -1380,9 +1380,9 @@ FormManager::selectAll()
return;
activeForm()->selectFormWidget();
- uint count = activeForm()->objectTree()->children()->count();
- for(ObjectTreeItem *it = activeForm()->objectTree()->children()->first(); it;
- it = activeForm()->objectTree()->children()->next(), count--)
+ uint count = activeForm()->objectTree()->tqchildren()->count();
+ for(ObjectTreeItem *it = activeForm()->objectTree()->tqchildren()->first(); it;
+ it = activeForm()->objectTree()->tqchildren()->next(), count--)
{
activeForm()->setSelectedWidget(it->widget(), /*add*/true, /*raise*/false, /*moreWillBeSelected*/count>1);
}
@@ -1394,15 +1394,15 @@ FormManager::clearWidgetContent()
if(!activeForm() || !activeForm()->objectTree())
return;
- for(QWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
+ for(TQWidget *w = activeForm()->selectedWidgets()->first(); w; w = activeForm()->selectedWidgets()->next())
activeForm()->library()->clearWidgetContent(w->className(), w);
}
void
-FormManager::deleteWidgetLater( QWidget *w )
+FormManager::deleteWidgetLater( TQWidget *w )
{
w->hide();
- w->reparent(0, WType_TopLevel, QPoint(0,0));
+ w->reparent(0, WType_TopLevel, TQPoint(0,0));
m_deleteWidgetLater_list.append( w );
m_deleteWidgetLater_timer.start( 100, true );
}
@@ -1420,7 +1420,7 @@ FormManager::showFormUICode()
if(!activeForm())
return;
- QString uiCode;
+ TQString uiCode;
if (!FormIO::saveFormToString(activeForm(), uiCode, 3)) {
//! @todo show err?
return;
@@ -1430,26 +1430,26 @@ FormManager::showFormUICode()
m_uiCodeDialog = new KDialogBase(0, "uiwindow", true, i18n("Form's UI Code"),
KDialogBase::Close, KDialogBase::Close);
m_uiCodeDialog->resize(700, 600);
- QVBox *box = m_uiCodeDialog->makeVBoxMainWidget();
+ TQVBox *box = m_uiCodeDialog->makeVBoxMainWidget();
KTabWidget* tab = new KTabWidget(box);
- m_currentUICodeDialogEditor = new KTextEdit(QString::null, QString::null, tab);
+ m_currentUICodeDialogEditor = new KTextEdit(TQString(), TQString(), tab);
tab->addTab( m_currentUICodeDialogEditor, i18n("Current"));
m_currentUICodeDialogEditor->setReadOnly(true);
- QFont f( m_currentUICodeDialogEditor->font() );
+ TQFont f( m_currentUICodeDialogEditor->font() );
f.setFamily("courier");
m_currentUICodeDialogEditor->setFont(f);
- m_currentUICodeDialogEditor->setTextFormat(Qt::PlainText);
+ m_currentUICodeDialogEditor->setTextFormat(TQt::PlainText);
- m_originalUICodeDialogEditor = new KTextEdit(QString::null, QString::null, tab);
+ m_originalUICodeDialogEditor = new KTextEdit(TQString(), TQString(), tab);
tab->addTab( m_originalUICodeDialogEditor, i18n("Original"));
m_originalUICodeDialogEditor->setReadOnly(true);
m_originalUICodeDialogEditor->setFont(f);
- m_originalUICodeDialogEditor->setTextFormat(Qt::PlainText);
+ m_originalUICodeDialogEditor->setTextFormat(TQt::PlainText);
}
m_currentUICodeDialogEditor->setText( uiCode );
//indent and set our original doc as well:
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( activeForm()->m_recentlyLoadedUICode );
m_originalUICodeDialogEditor->setText( doc.toString( 3 ) );
m_uiCodeDialog->show();
@@ -1493,14 +1493,14 @@ FormManager::emitWidgetSelected( KFormDesigner::Form* form, bool multiple )
WidgetList *wlist = form->selectedWidgets();
bool fontEnabled = false;
for (WidgetListIterator it(*wlist); it.current(); ++it) {
- if (-1 != it.current()->metaObject()->findProperty("font", true)) {
+ if (-1 != it.current()->tqmetaObject()->tqfindProperty("font", true)) {
fontEnabled = true;
break;
}
}
enableAction("format_font", fontEnabled);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
bool containerSelected = false;
if(!multiple)
{
@@ -1512,16 +1512,16 @@ FormManager::emitWidgetSelected( KFormDesigner::Form* form, bool multiple )
}
const bool twoSelected = form->selectedWidgets()->count()==2;
// Layout actions
- enableAction("layout_menu", multiple || containerSelected);
- enableAction("layout_hbox", multiple || containerSelected);
- enableAction("layout_vbox", multiple || containerSelected);
- enableAction("layout_grid", multiple || containerSelected);
- enableAction("layout_hsplitter", twoSelected);
- enableAction("layout_vsplitter", twoSelected);
+ enableAction("tqlayout_menu", multiple || containerSelected);
+ enableAction("tqlayout_hbox", multiple || containerSelected);
+ enableAction("tqlayout_vbox", multiple || containerSelected);
+ enableAction("tqlayout_grid", multiple || containerSelected);
+ enableAction("tqlayout_hsplitter", twoSelected);
+ enableAction("tqlayout_vsplitter", twoSelected);
KFormDesigner::Container *container = activeForm() ? activeForm()->activeContainer() : 0;
if (container)
- enableAction("break_layout", (container->layoutType() != KFormDesigner::Container::NoLayout));
+ enableAction("break_layout", (container->tqlayoutType() != KFormDesigner::Container::NoLayout));
emit widgetSelected(form, true);
}
@@ -1550,16 +1550,16 @@ FormManager::emitFormWidgetSelected( KFormDesigner::Form* form )
enableFormActions();
const bool twoSelected = form->selectedWidgets()->count()==2;
- const bool hasChildren = !form->objectTree()->children()->isEmpty();
+ const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty();
// Layout actions
- enableAction("layout_menu", hasChildren);
- enableAction("layout_hbox", hasChildren);
- enableAction("layout_vbox", hasChildren);
- enableAction("layout_grid", hasChildren);
- enableAction("layout_hsplitter", twoSelected);
- enableAction("layout_vsplitter", twoSelected);
- enableAction("break_layout", (form->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ enableAction("tqlayout_menu", hasChildren);
+ enableAction("tqlayout_hbox", hasChildren);
+ enableAction("tqlayout_vbox", hasChildren);
+ enableAction("tqlayout_grid", hasChildren);
+ enableAction("tqlayout_hsplitter", twoSelected);
+ enableAction("tqlayout_vsplitter", twoSelected);
+ enableAction("break_layout", (form->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
emit formWidgetSelected( form );
}
@@ -1631,24 +1631,24 @@ FormManager::disableWidgetActions()
enableAction("format_raise", false);
enableAction("format_lower", false);
- enableAction("layout_menu", false);
- enableAction("layout_hbox", false);
- enableAction("layout_vbox", false);
- enableAction("layout_grid", false);
- enableAction("layout_hsplitter", false);
- enableAction("layout_vsplitter", false);
+ enableAction("tqlayout_menu", false);
+ enableAction("tqlayout_hbox", false);
+ enableAction("tqlayout_vbox", false);
+ enableAction("tqlayout_grid", false);
+ enableAction("tqlayout_hsplitter", false);
+ enableAction("tqlayout_vsplitter", false);
enableAction("break_layout", false);
}
void
-FormManager::emitUndoEnabled(bool enabled, const QString &text)
+FormManager::emitUndoEnabled(bool enabled, const TQString &text)
{
enableAction("edit_undo", enabled);
emit undoEnabled(enabled, text);
}
void
-FormManager::emitRedoEnabled(bool enabled, const QString &text)
+FormManager::emitRedoEnabled(bool enabled, const TQString &text)
{
enableAction("edit_redo", enabled);
emit redoEnabled(enabled, text);
@@ -1661,8 +1661,8 @@ FormManager::changeFont()
return;
WidgetList *wlist = m_active->selectedWidgets();
WidgetList widgetsWithFontProperty;
- QWidget *widget;
- QFont font;
+ TQWidget *widget;
+ TQFont font;
bool oneFontSelected = true;
for (WidgetListIterator it(*wlist); (widget = it.current()); ++it) {
if (m_active->library()->isPropertyVisible(widget->className(), widget, "font")) {
@@ -1684,19 +1684,19 @@ FormManager::changeFont()
//single widget's settings
widget = widgetsWithFontProperty.first();
KoProperty::Property &fontProp = m_propSet->property("font");
- if (QDialog::Accepted != KFontDialog::getFont(font, false, m_active->widget()))
+ if (TQDialog::Accepted != KFontDialog::getFont(font, false, m_active->widget()))
return;
fontProp = font;
return;
}
//multiple widgets
int diffFlags=0;
- if (QDialog::Accepted != KFontDialog::getFontDiff(font, diffFlags, false, m_active->widget())
+ if (TQDialog::Accepted != KFontDialog::getFontDiff(font, diffFlags, false, m_active->widget())
|| 0==diffFlags)
return;
//update font
for (WidgetListIterator it(widgetsWithFontProperty); (widget = it.current()); ++it) {
- QFont prevFont( widget->font() );
+ TQFont prevFont( widget->font() );
if (diffFlags & KFontChooser::FontDiffFamily)
prevFont.setFamily( font.family() );
if (diffFlags & KFontChooser::FontDiffStyle) {
diff --git a/kexi/formeditor/formmanager.h b/kexi/formeditor/formmanager.h
index 48e00b0fe..a4622d1bf 100644
--- a/kexi/formeditor/formmanager.h
+++ b/kexi/formeditor/formmanager.h
@@ -21,15 +21,15 @@
#ifndef FORMMANAGER_H
#define FORMMANAGER_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qptrlist.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
-#include <qstringlist.h>
-
-class QWidget;
-class QWorkspace;
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
+#include <tqstringlist.h>
+
+class TQWidget;
+class TQWorkspace;
class KPopupMenu;
class KActionCollection;
class KAction;
@@ -55,7 +55,7 @@ class WidgetLibrary;
class ObjectTreeView;
class Connection;
class FormManager;
-typedef QPtrList<KAction> ActionList;
+typedef TQPtrList<KAction> ActionList;
//! @internal
//static FormManager* FormManager_static = 0;
@@ -69,21 +69,22 @@ typedef QPtrList<KAction> ActionList;
It holds the WidgetLibrary, the WidgetPropertySet, links to ObjectTreeView and PropertyEditor,
as well as the copied widget and the insert state.
**/
-class KFORMEDITOR_EXPORT FormManager : public QObject
+class KFORMEDITOR_EXPORT FormManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructs FormManager object.
Using \a options you can control manager's behaviour, see Options. */
- FormManager(QObject *parent = 0, int options = 0, const char *name = 0);
+ FormManager(TQObject *tqparent = 0, int options = 0, const char *name = 0);
virtual ~FormManager();
//! Creates widget library for supportedFactoryGroups
//! and initializes FormManager singleton. \a m should be always the same for every call.
static WidgetLibrary* createWidgetLibrary(FormManager* m,
- const QStringList& supportedFactoryGroups);
+ const TQStringList& supportedFactoryGroups);
//! Access to FormManager singleton
static FormManager* self();
@@ -98,7 +99,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
into the \a collection. \a client XML GUI client is used to call
lib->addCustomWidgetActions(client).
These actions are automatically connected to \ref insertWidget() slot.
- \return a QPtrList of the created actions.
+ \return a TQPtrList of the created actions.
*/
ActionList createActions(WidgetLibrary *lib, KActionCollection* collection, KXMLGUIClient *client);
@@ -124,10 +125,10 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! \return The name of the class being inserted, corresponding
to the menu item or the toolbar button clicked. */
- QCString selectedClass() const { return m_selectedClass; }
+ TQCString selectedClass() const { return m_selectedClass; }
/*! Sets the point where the pasted widget should be moved to. */
- void setInsertPoint(const QPoint &p);
+ void setInsertPoint(const TQPoint &p);
//! \return If we are creating a Connection by drag-and-drop or not.
bool isCreatingConnection() { return m_drawingSlot; }
@@ -141,13 +142,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
void resetCreatedConnection();
//! Creates and display a menu with all the signals of widget \a w.
- void createSignalMenu(QWidget *w);
+ void createSignalMenu(TQWidget *w);
//! Creates and display a menu with all the slots of widget \a w.
- void createSlotMenu(QWidget *w);
+ void createSlotMenu(TQWidget *w);
//! Emits the signal \ref createFormSlot(). Used by WidgetPropertySet.
- void emitCreateSlot(const QString &widget, const QString &value)
+ void emitCreateSlot(const TQString &widget, const TQString &value)
{ emit createFormSlot(m_active, widget, value); }
/*! \return The Form actually active and focused.
@@ -156,12 +157,12 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! \return the Form whose toplevel widget is \a w, or 0
if there is not or the Form is in preview mode. */
- Form* formForWidget(QWidget *w);
+ Form* formForWidget(TQWidget *w);
/*! \return true if \a w is a toplevel widget,
ie. it is the main widget of a Form (so it should have a caption ,
an icon ...) */
- bool isTopLevel(QWidget *w);
+ bool isTopLevel(TQWidget *w);
//! \return A pointer to the KoProperty::Editor we use.
//unused KoProperty::Editor* propertyEditor() const { return m_editor; }
@@ -173,7 +174,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
If \a propertyToSelect is not empty, an item for this name will be selected
(usable when previously there was no set visible). */
virtual void showPropertySet(WidgetPropertySet *set, bool forceReload = false,
- const QCString& propertyToSelect = QCString());
+ const TQCString& propertyToSelect = TQCString());
void blockPropertyEditorUpdating(void *blockingObject);
@@ -188,7 +189,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
void setObjectTreeView(ObjectTreeView *treeview);
/*! Previews the Form \a form using the widget \a w as toplevel container for this Form. */
- void previewForm(Form *form, QWidget *w, Form *toForm=0);
+ void previewForm(Form *form, TQWidget *w, Form *toForm=0);
/*! Adds a existing form w and changes it to a container */
void importForm(Form *form=0, bool preview=false);
@@ -199,7 +200,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! This function creates and displays the context menu corresponding to the widget \a w.
The menu item are disabled if necessary, and
the widget specific part is added (menu from the factory and buddy selection). */
- void createContextMenu(QWidget *w, Container *container, bool popupAtCursor = true);
+ void createContextMenu(TQWidget *w, Container *container, bool popupAtCursor = true);
//! \return If we align widgets to grid or not.
bool snapWidgetsToGrid();
@@ -220,13 +221,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
bool isRedoing() const { return m_isRedoing; }
public slots:
- /*! Deletes the selected widget in active Form and all of its children. */
+ /*! Deletes the selected widget in active Form and all of its tqchildren. */
void deleteWidget();
- /*! Copies the slected widget and all its children of the active Form using an XML representation. */
+ /*! Copies the slected widget and all its tqchildren of the active Form using an XML representation. */
void copyWidget();
- /*! Cuts (ie Copies and deletes) the selected widget and all its children of
+ /*! Cuts (ie Copies and deletes) the selected widget and all its tqchildren of
the active Form using an XML representation. */
void cutWidget();
@@ -257,22 +258,22 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! Creates a dialog to edit the Connection of \ref activeForm(). */
void editConnections();
- //! Lay out selected widgets using HBox layout (calls \ref CreateLayoutCommand).
- void layoutHBox();
- //! Lay out selected widgets using VBox layout.
- void layoutVBox();
- //! Lay out selected widgets using Grid layout.
- void layoutGrid();
+ //! Lay out selected widgets using HBox tqlayout (calls \ref CreateLayoutCommand).
+ void tqlayoutHBox();
+ //! Lay out selected widgets using VBox tqlayout.
+ void tqlayoutVBox();
+ //! Lay out selected widgets using Grid tqlayout.
+ void tqlayoutGrid();
//! Lay out selected widgets in an horizontal splitter
- void layoutHSplitter();
+ void tqlayoutHSplitter();
//! Lay out selected widgets in a verticak splitter
- void layoutVSplitter();
- //! Lay out selected widgets using HFlow layout
- void layoutHFlow();
- //! Lay out selected widgets using VFlow layout.
- void layoutVFlow();
+ void tqlayoutVSplitter();
+ //! Lay out selected widgets using HFlow tqlayout
+ void tqlayoutHFlow();
+ //! Lay out selected widgets using VFlow tqlayout.
+ void tqlayoutVFlow();
- //! Breaks selected layout(calls \ref BreakLayoutCommand).
+ //! Breaks selected tqlayout(calls \ref BreakLayoutCommand).
void breakLayout();
void alignWidgetsToLeft();
@@ -302,7 +303,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
or a "Widget" menu item. Prepares all Forms for
creation of a new widget (ie changes cursor ...).
*/
- void insertWidget(const QCString &classname);
+ void insertWidget(const TQCString &classname);
/*! Stops the current widget insertion (ie unset the cursor ...). */
void stopInsert();
@@ -317,13 +318,13 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
void stopCreatingConnection();
/*! Calls this slot when the window activated changes (eg connect
- to QWorkspace::windowActivated(QWidget*)). You <b>need</b> to connect
+ to TQWorkspace::windowActivated(TQWidget*)). You <b>need</b> to connect
to this slot, it will crash otherwise.
*/
- void windowChanged(QWidget *w);
+ void windowChanged(TQWidget *w);
//! Used to delayed widgets' deletion (in Container::deleteItem())
- void deleteWidgetLater( QWidget *w );
+ void deleteWidgetLater( TQWidget *w );
/*! For debugging purposes only:
shows a text window containing contents of .ui XML definition of the current form. */
@@ -336,7 +337,7 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! This signal is emitted as the property set switched.
If \a forceReload is true, the set needs to be reloaded even
if it's the same as previous one. */
- void propertySetSwitched(KoProperty::Set *set, bool forceReload = false, const QCString& propertyToSelect = QCString());
+ void propertySetSwitched(KoProperty::Set *set, bool forceReload = false, const TQCString& propertyToSelect = TQCString());
/*! This signal is emitted when any change is made to the Form \a form,
so it will need to be saved. */
@@ -357,16 +358,16 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
/*! Signal emitted when undo action activation changes.
\a text is the full text of the action (including command name). */
- void undoEnabled(bool enabled, const QString &text = QString::null);
+ void undoEnabled(bool enabled, const TQString &text = TQString());
/*! Signal emitted when redo action activation changes.
\a text is the full text of the action (including command name). */
- void redoEnabled(bool enabled, const QString &text = QString::null);
+ void redoEnabled(bool enabled, const TQString &text = TQString());
/*! Signal emitted when the user choose a signal in 'Events' menu
in context menu, or in 'Events' in property editor.
The code editor should then create the slot connected to this signal. */
- void createFormSlot(KFormDesigner::Form *form, const QString &widget, const QString &signal);
+ void createFormSlot(KFormDesigner::Form *form, const TQString &widget, const TQString &signal);
/*! Signal emitted when the Connection creation by drag-and-drop ends.
\a connection is the created Connection. You should copy it,
@@ -411,24 +412,24 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
#if 0
/*! Default implementation just calls FormIO::loadFormFromDom().
Change this if you need to handle, eg. custom UI XML tags, as in Kexi's Form Designer. */
- virtual bool loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf);
+ virtual bool loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf);
/*! Default implementation just calls FormIO::saveFormToString().
Change this if you need to handle, eg. custom UI XML tags, as in Kexi's Form Designer. */
- virtual bool saveFormToStringInternal(Form *form, QString &dest, int indent = 0);
+ virtual bool saveFormToStringInternal(Form *form, TQString &dest, int indent = 0);
#endif
- /*! Function called by the "Lay out in..." menu items. It creates a layout from the
- currently selected widgets (that must have the same parent).
+ /*! Function called by the "Lay out in..." menu items. It creates a tqlayout from the
+ currently selected widgets (that must have the same tqparent).
Calls \ref CreateLayoutCommand. */
- void createLayout(int layoutType);
+ void createLayout(int tqlayoutType);
/*! Function called by all other AlignWidgets*() function. Calls \ref AlignWidgetsCommand. */
void alignWidgets(int type);
void enableFormActions();
void disableWidgetActions();
- void emitUndoEnabled(bool enabled, const QString &text);
- void emitRedoEnabled(bool enabled, const QString &text);
+ void emitUndoEnabled(bool enabled, const TQString &text);
+ void emitRedoEnabled(bool enabled, const TQString &text);
/*! True if emitSelectionSignals() updates property set so showPropertySet() will
not be needed in windowChanged(). False by default. Set to true in KexiFormManager. */
@@ -443,22 +444,22 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
WidgetPropertySet *m_propSet;
// WidgetLibrary *m_lib;
- QGuardedPtr<KoProperty::Editor> m_editor;
- QGuardedPtr<ObjectTreeView> m_treeview;
+ TQGuardedPtr<KoProperty::Editor> m_editor;
+ TQGuardedPtr<ObjectTreeView> m_treeview;
// Forms
- QPtrList<Form> m_forms;
- QPtrList<Form> m_preview;
- QGuardedPtr<Form> m_active;
+ TQPtrList<Form> m_forms;
+ TQPtrList<Form> m_preview;
+ TQGuardedPtr<Form> m_active;
// Copy/Paste
- QDomDocument m_domDoc;
+ TQDomDocument m_domDoc;
KPopupMenu *m_popup;
- QPoint m_insertPoint;
- QGuardedPtr<QWidget> m_menuWidget;
+ TQPoint m_insertPoint;
+ TQGuardedPtr<TQWidget> m_menuWidget;
// Insertion
bool m_inserting;
- QCString m_selectedClass;
+ TQCString m_selectedClass;
// Connection stuff
bool m_drawingSlot;
@@ -470,8 +471,8 @@ class KFORMEDITOR_EXPORT FormManager : public QObject
KToggleAction *m_pointer, *m_dragConnection, *m_snapToGrid;
//! Used to delayed widgets deletion
- QTimer m_deleteWidgetLater_timer;
- QPtrList<QWidget> m_deleteWidgetLater_list;
+ TQTimer m_deleteWidgetLater_timer;
+ TQPtrList<TQWidget> m_deleteWidgetLater_list;
#ifdef KEXI_DEBUG_GUI
KDialogBase *m_uiCodeDialog;
diff --git a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp
index c3b6e4488..2c7d2f015 100644
--- a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp
+++ b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.cpp
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qworkspace.h>
-#include <qdockarea.h>
-#include <qdockwindow.h>
-#include <qhbox.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qobjectlist.h>
+#include <tqworkspace.h>
+#include <tqdockarea.h>
+#include <tqdockwindow.h>
+#include <tqhbox.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
#include <kdeversion.h>
#include <kaction.h>
@@ -69,11 +69,11 @@ KFDFactory::~KFDFactory()
}
KParts::Part*
-KFDFactory::createPartObject( QWidget *parentWidget, const char *, QObject *, const char *name,
- const char *classname, const QStringList &args)
+KFDFactory::createPartObject( TQWidget *tqparentWidget, const char *, TQObject *, const char *name,
+ const char *classname, const TQStringList &args)
{
bool readOnly = (classname == "KParts::ReadOnlyPart");
- KFormDesignerKDevPart *part = new KFormDesignerKDevPart(parentWidget, name, readOnly, args);
+ KFormDesignerKDevPart *part = new KFormDesignerKDevPart(tqparentWidget, name, readOnly, args);
return part;
}
@@ -123,8 +123,8 @@ class KFDPart_FormManager : public KFormDesigner::FormManager
KFormDesigner::WidgetLibrary* KFormDesignerKDevPart::static_formsLibrary = 0L;
-KFormDesignerKDevPart::KFormDesignerKDevPart(QWidget *parent, const char *name, bool readOnly, const QStringList &args)
-: Designer(parent, name), m_count(0)
+KFormDesignerKDevPart::KFormDesignerKDevPart(TQWidget *tqparent, const char *name, bool readOnly, const TQStringList &args)
+: Designer(tqparent, name), m_count(0)
{
setInstance(KFDFactory::instance());
instance()->iconLoader()->addAppDir("kexi");
@@ -138,28 +138,28 @@ KFormDesignerKDevPart::KFormDesignerKDevPart(QWidget *parent, const char *name,
setUniqueFormMode(false);
m_inShell = (!args.grep("shell").isEmpty());
- QHBox *container = new QHBox(parent, "kfd_container_widget");
- container->setFocusPolicy(QWidget::ClickFocus);
+ TQHBox *container = new TQHBox(tqparent, "kfd_container_widget");
+ container->setFocusPolicy(TQ_ClickFocus);
- m_workspace = new QWorkspace(container, "kfd_workspace");
+ m_workspace = new TQWorkspace(container, "kfd_workspace");
m_workspace->show();
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
/* @todo add configuration for supported factory groups */
static_formsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
new KFDPart_FormManager(this, 0, "kfd_manager"), supportedFactoryGroups );
if(!readOnly)
{
- QDockArea *dockArea = new QDockArea(Vertical, QDockArea::Reverse, container, "kfd_part_dockarea");
+ TQDockArea *dockArea = new TQDockAreaQt::Vertical, TQDockArea::Reverse, container, "kfd_part_dockarea");
- QDockWindow *dockTree = new QDockWindow(dockArea);
+ TQDockWindow *dockTree = new TQDockWindow(dockArea);
KFormDesigner::ObjectTreeView *view = new KFormDesigner::ObjectTreeView(dockTree);
dockTree->setWidget(view);
dockTree->setCaption(i18n("Objects"));
dockTree->setResizeEnabled(true);
dockTree->setFixedExtentWidth(256);
- QDockWindow *dockEditor = new QDockWindow(dockArea);
+ TQDockWindow *dockEditor = new TQDockWindow(dockArea);
KoProperty::Editor *editor = new KoProperty::Editor(dockEditor);
dockEditor->setWidget(editor);
dockEditor->setCaption(i18n("Properties"));
@@ -172,21 +172,21 @@ KFormDesignerKDevPart::KFormDesignerKDevPart(QWidget *parent, const char *name,
setModified(false);
// action stuff
- connect(KFormDesigner::FormManager::self(), SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
- connect(KFormDesigner::FormManager::self(), SIGNAL(undoEnabled(bool, const QString&)), SLOT(setUndoEnabled(bool, const QString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(redoEnabled(bool, const QString&)), SLOT(setRedoEnabled(bool, const QString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), TQT_SLOT(setUndoEnabled(bool, const TQString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), TQT_SLOT(setRedoEnabled(bool, const TQString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form*, bool)), this, SLOT(slotFormModified(KFormDesigner::Form*, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form*, bool)), this, TQT_SLOT(slotFormModified(KFormDesigner::Form*, bool)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(createFormSlot(KFormDesigner::Form*, const QString&, const QString&)),
- this, SLOT(slotCreateFormSlot(KFormDesigner::Form*, const QString&, const QString &)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(createFormSlot(KFormDesigner::Form*, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotCreateFormSlot(KFormDesigner::Form*, const TQString&, const TQString &)));
}
container->show();
setWidget(container);
- connect(m_workspace, SIGNAL(windowActivated(QWidget*)), KFormDesigner::FormManager::self(), SLOT(windowChanged(QWidget*)));
+ connect(m_workspace, TQT_SIGNAL(windowActivated(TQWidget*)), KFormDesigner::FormManager::self(), TQT_SLOT(windowChanged(TQWidget*)));
slotNoFormSelected();
}
@@ -198,45 +198,45 @@ KFormDesigner::WidgetLibrary* KFormDesignerKDevPart::formsLibrary()
void
KFormDesignerKDevPart::setupActions()
{
- KStdAction::open(this, SLOT(open()), actionCollection());
- KStdAction::openNew(this, SLOT(createBlankForm()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
- KStdAction::saveAs(this, SLOT(saveAs()), actionCollection());
- KStdAction::cut(KFormDesigner::FormManager::self(), SLOT(cutWidget()), actionCollection());
- KStdAction::copy(KFormDesigner::FormManager::self(), SLOT(copyWidget()), actionCollection());
- KStdAction::paste(KFormDesigner::FormManager::self(), SLOT(pasteWidget()), actionCollection());
- KStdAction::undo(KFormDesigner::FormManager::self(), SLOT(undo()), actionCollection());
- KStdAction::redo(KFormDesigner::FormManager::self(), SLOT(redo()), actionCollection());
- KStdAction::selectAll(KFormDesigner::FormManager::self(), SLOT(selectAll()), actionCollection());
- new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()), actionCollection(), "clear_contents");
- new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(deleteWidget()), actionCollection(), "edit_delete");
- new KAction(i18n("Preview Form"), "filequickprint", "Ctrl+T", this, SLOT(slotPreviewForm()), actionCollection(), "preview_form");
- new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editTabOrder()), actionCollection(), "taborder");
- new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection");
- new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editConnections()), actionCollection(), "form_connections");
-
- new KAction(i18n("Lay Out Widgets &Horizontally"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHBox()), actionCollection(), "layout_hbox");
- new KAction(i18n("Lay Out Widgets &Vertically"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVBox()), actionCollection(), "layout_vbox");
- new KAction(i18n("Lay Out Widgets in &Grid"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutGrid()), actionCollection(), "layout_grid");
- new KAction(i18n("&Break Layout"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(breakLayout()), actionCollection(), "break_layout");
-
- new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()), actionCollection(), "format_raise");
- new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()), actionCollection(), "format_lower");
+ KStdAction::open(this, TQT_SLOT(open()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(createBlankForm()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection());
+ KStdAction::cut(KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()), actionCollection());
+ KStdAction::copy(KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()), actionCollection());
+ KStdAction::paste(KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()), actionCollection());
+ KStdAction::undo(KFormDesigner::FormManager::self(), TQT_SLOT(undo()), actionCollection());
+ KStdAction::redo(KFormDesigner::FormManager::self(), TQT_SLOT(redo()), actionCollection());
+ KStdAction::selectAll(KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()), actionCollection());
+ new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()), actionCollection(), "clear_contents");
+ new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()), actionCollection(), "edit_delete");
+ new KAction(i18n("Preview Form"), "filequickprint", "Ctrl+T", this, TQT_SLOT(slotPreviewForm()), actionCollection(), "preview_form");
+ new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()), actionCollection(), "taborder");
+ new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection");
+ new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editConnections()), actionCollection(), "form_connections");
+
+ new KAction(i18n("Lay Out Widgets &Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox");
+ new KAction(i18n("Lay Out Widgets &Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox");
+ new KAction(i18n("Lay Out Widgets in &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid");
+ new KAction(i18n("&Break Layout"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout");
+
+ new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()), actionCollection(), "format_raise");
+ new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()), actionCollection(), "format_lower");
KActionMenu *alignMenu = new KActionMenu(i18n("Align Widgets' Positions"), "aopos2grid", actionCollection(), "align_menu");
- alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") );
- alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") );
- alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") );
- alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") );
- alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") );
+ alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") );
+ alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") );
+ alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") );
+ alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") );
+ alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") );
KActionMenu *sizeMenu = new KActionMenu(i18n("Adjust Widgets' Sizes"), "aogrid", actionCollection(), "adjust_size_menu");
- sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") );
- sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") );
- sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") );
- sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") );
- sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") );
- sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") );
+ sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") );
+ sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") );
+ sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") );
+ sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") );
+ sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") );
+ sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") );
if(m_inShell)
setXMLFile("kformdesigner_part_shell.rc");
@@ -258,7 +258,7 @@ KFormDesignerKDevPart::createBlankForm()
if(m_uniqueFormMode && KFormDesigner::FormManager::self()->activeForm() && !KFormDesigner::FormManager::self()->activeForm()->isModified() && KFormDesigner::FormManager::self()->activeForm()->filename().isNull())
return; // active form is already a blank one
- QString n = i18n("Form") + QString::number(++m_count);
+ TQString n = i18n("Form") + TQString::number(++m_count);
Form *form = new Form(formsLibrary(), n.latin1());
FormWidgetBase *w = new FormWidgetBase(this, m_workspace, n.latin1());
@@ -276,7 +276,7 @@ void
KFormDesignerKDevPart::open()
{
m_openingFile = true;
- KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"), m_workspace->topLevelWidget());
+ KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->tqtopLevelWidget());
if(!url.isEmpty())
ReadWritePart::openURL(url);
m_openingFile = false;
@@ -311,7 +311,7 @@ KFormDesignerKDevPart::saveFile()
void
KFormDesignerKDevPart::saveAs()
{
- KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"), m_workspace);
+ KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace);
if(url.isEmpty())
return;
else
@@ -321,9 +321,9 @@ KFormDesignerKDevPart::saveAs()
bool
KFormDesignerKDevPart::closeForm(Form *form)
{
- int res = KMessageBox::warningYesNoCancel( m_workspace->topLevelWidget(),
+ int res = KMessageBox::warningYesNoCancel( m_workspace->tqtopLevelWidget(),
i18n( "The form \"%1\" has been modified.\n"
- "Do you want to save your changes or discard them?" ).arg( form->objectTree()->name() ),
+ "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ),
i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() );
if(res == KMessageBox::Yes)
@@ -335,8 +335,8 @@ KFormDesignerKDevPart::closeForm(Form *form)
bool
KFormDesignerKDevPart::closeForms()
{
- QWidgetList list = m_workspace->windowList(QWorkspace::CreationOrder);
- for(QWidget *w = list.first(); w; w = list.next())
+ TQWidgetList list = m_workspace->windowList(TQWorkspace::CreationOrder);
+ for(TQWidget *w = list.first(); w; w = list.next())
if(w->close() == false)
return false;
@@ -397,7 +397,7 @@ KFormDesignerKDevPart::slotWidgetSelected(Form *form, bool multiple)
ENABLE_ACTION("format_raise", true);
ENABLE_ACTION("format_lower", true);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
if(!multiple)
{
KFormDesigner::ObjectTreeItem *item = form->objectTree()->lookup( form->selectedWidgets()->first()->name() );
@@ -405,12 +405,12 @@ KFormDesignerKDevPart::slotWidgetSelected(Form *form, bool multiple)
multiple = true;
}
// Layout actions
- ENABLE_ACTION("layout_hbox", multiple);
- ENABLE_ACTION("layout_vbox", multiple);
- ENABLE_ACTION("layout_grid", multiple);
+ ENABLE_ACTION("tqlayout_hbox", multiple);
+ ENABLE_ACTION("tqlayout_vbox", multiple);
+ ENABLE_ACTION("tqlayout_grid", multiple);
KFormDesigner::Container *container = KFormDesigner::FormManager::self()->activeForm()->activeContainer();
- ENABLE_ACTION("break_layout", (container->layoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("break_layout", (container->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -420,10 +420,10 @@ KFormDesignerKDevPart::slotFormWidgetSelected(Form *form)
enableFormActions();
// Layout actions
- ENABLE_ACTION("layout_hbox", true);
- ENABLE_ACTION("layout_vbox", true);
- ENABLE_ACTION("layout_grid", true);
- ENABLE_ACTION("break_layout", (form->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("tqlayout_hbox", true);
+ ENABLE_ACTION("tqlayout_vbox", true);
+ ENABLE_ACTION("tqlayout_grid", true);
+ ENABLE_ACTION("break_layout", (form->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -486,14 +486,14 @@ KFormDesignerKDevPart::disableWidgetActions()
ENABLE_ACTION("format_raise", false);
ENABLE_ACTION("format_lower", false);
- ENABLE_ACTION("layout_hbox", false);
- ENABLE_ACTION("layout_vbox", false);
- ENABLE_ACTION("layout_grid", false);
+ ENABLE_ACTION("tqlayout_hbox", false);
+ ENABLE_ACTION("tqlayout_vbox", false);
+ ENABLE_ACTION("tqlayout_grid", false);
ENABLE_ACTION("break_layout", false);
}
void
-KFormDesignerKDevPart::setUndoEnabled(bool enabled, const QString &text)
+KFormDesignerKDevPart::setUndoEnabled(bool enabled, const TQString &text)
{
KAction *undoAction = actionCollection()->action("edit_undo");
if(undoAction)
@@ -505,7 +505,7 @@ KFormDesignerKDevPart::setUndoEnabled(bool enabled, const QString &text)
}
void
-KFormDesignerKDevPart::setRedoEnabled(bool enabled, const QString &text)
+KFormDesignerKDevPart::setRedoEnabled(bool enabled, const TQString &text)
{
KAction *redoAction = actionCollection()->action("edit_redo");
if(redoAction)
@@ -517,14 +517,14 @@ KFormDesignerKDevPart::setRedoEnabled(bool enabled, const QString &text)
}
void
-KFormDesignerKDevPart::slotCreateFormSlot(Form *form, const QString &widget, const QString &signal)
+KFormDesignerKDevPart::slotCreateFormSlot(Form *form, const TQString &widget, const TQString &signal)
{
Function f;
f.returnType = "void";
f.function = widget + "_" + signal;
f.specifier = "non virtual";
f.access = "public";
- f.type = ftQtSlot;
+ f.type = ftTQtSlot;
emit addedFunction(designerType(), form->objectTree()->name(), f);
}
@@ -535,39 +535,39 @@ KFormDesignerKDevPart::~KFormDesignerKDevPart()
////// FormWidgetBase : helper widget to draw rects on top of widgets
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ static_cast<TQWidget*>(obj)->tqrepaint();
}
delete list;
}
void
-FormWidgetBase::drawRects(const QValueList<QRect> &list, int type)
+FormWidgetBase::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, QRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
+ p.drawPixmap( TQPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, TQRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
prev_rect = prev_rect.unite(*it);
}
@@ -578,9 +578,9 @@ FormWidgetBase::drawRects(const QValueList<QRect> &list, int type)
}
void
-FormWidgetBase::drawRect(const QRect& r, int type)
+FormWidgetBase::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
@@ -588,58 +588,58 @@ FormWidgetBase::drawRect(const QRect& r, int type)
void
FormWidgetBase::initRect()
{
- repaintAll(this);
+ tqrepaintAll(this);
buffer.resize( width(), height() );
- buffer = QPixmap::grabWindow( winId() );
- prev_rect = QRect();
+ buffer = TQPixmap::grabWindow( winId() );
+ prev_rect = TQRect();
}
void
FormWidgetBase::clearRect()
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), buffer, QRect(0,0,buffer.width(), buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), buffer, TQRect(0,0,buffer.width(), buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x(), prev_rect.y()), buffer, QRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
+ p.drawPixmap( TQPoint(prev_rect.x(), prev_rect.y()), buffer, TQRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -656,7 +656,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- prev_rect = QRect(0, 0, buffer.width(), buffer.height());
+ prev_rect = TQRect(0, 0, buffer.width(), buffer.height());
else if(to)
{
prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -665,7 +665,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
@@ -673,7 +673,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
}
void
-FormWidgetBase::closeEvent(QCloseEvent *ev)
+FormWidgetBase::closeEvent(TQCloseEvent *ev)
{
Form *form = KFormDesigner::FormManager::self()->formForWidget(this);
if(!form || !form->isModified() || !form->objectTree()) // == preview form
diff --git a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h
index 52ce5f274..548b4a357 100644
--- a/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h
+++ b/kexi/formeditor/kdevelop_plugin/kfd_kdev_part.h
@@ -20,8 +20,8 @@
#ifndef KFORMDESIGNER_KDEVELOP_PART_H
#define KFORMDESIGNER_KDEVELOP_PART_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <kinterfacedesigner/designer.h>
#include <kparts/factory.h>
@@ -30,8 +30,8 @@
class KAboutData;
class KInstance;
-class QWorkspace;
-class QCloseEvent;
+class TQWorkspace;
+class TQCloseEvent;
using KFormDesigner::Form;
using namespace KInterfaceDesigner;
@@ -39,13 +39,14 @@ using namespace KInterfaceDesigner;
class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
KFDFactory();
virtual ~KFDFactory();
- virtual KParts::Part* createPartObject(QWidget *parentWidget=0, const char *widgetName=0, QObject *parent=0, const char *name=0,
- const char *classname="KParts::Part", const QStringList &args=QStringList());
+ virtual KParts::Part* createPartObject(TQWidget *tqparentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0,
+ const char *classname="KParts::Part", const TQStringList &args=TQStringList());
static KInstance *instance();
static KAboutData *aboutData();
@@ -57,13 +58,14 @@ class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory
class KFORMEDITOR_EXPORT KFormDesignerKDevPart : public Designer
{
Q_OBJECT
+ TQ_OBJECT
public:
- KFormDesignerKDevPart(QWidget *parent, const char *name, bool readOnly=true, const QStringList &args=QStringList());
+ KFormDesignerKDevPart(TQWidget *tqparent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList());
virtual ~KFormDesignerKDevPart();
- virtual DesignerType designerType() { return QtDesigner; }
- virtual void openProject(const QString &) {}
+ virtual DesignerType designerType() { return TQtDesigner; }
+ virtual void openProject(const TQString &) {}
// KFormDesigner::FormManager* manager() { return m_manager; }
void setUniqueFormMode(bool enable) { m_uniqueFormMode = enable; }
@@ -83,15 +85,15 @@ class KFORMEDITOR_EXPORT KFormDesignerKDevPart : public Designer
void open();
void slotPreviewForm();
void saveAs();
- void slotCreateFormSlot(KFormDesigner::Form *form, const QString &widget, const QString &signal);
+ void slotCreateFormSlot(KFormDesigner::Form *form, const TQString &widget, const TQString &signal);
protected slots:
void slotWidgetSelected(KFormDesigner::Form *form, bool multiple);
void slotFormWidgetSelected(KFormDesigner::Form *form);
void slotNoFormSelected();
void slotFormModified(KFormDesigner::Form *form, bool isDirty);
- void setUndoEnabled(bool enabled, const QString &text);
- void setRedoEnabled(bool enabled, const QString &text);
+ void setUndoEnabled(bool enabled, const TQString &text);
+ void setRedoEnabled(bool enabled, const TQString &text);
protected:
virtual bool openFile();
@@ -103,7 +105,7 @@ class KFORMEDITOR_EXPORT KFormDesignerKDevPart : public Designer
private:
static KFormDesigner::WidgetLibrary* static_formsLibrary;
// KFormDesigner::FormManager *m_manager;
- QWorkspace *m_workspace;
+ TQWorkspace *m_workspace;
int m_count;
bool m_uniqueFormMode;
bool m_openingFile;
@@ -111,27 +113,28 @@ class KFORMEDITOR_EXPORT KFormDesignerKDevPart : public Designer
};
//! Helper: this widget is used to create form's surface
-class KFORMEDITOR_EXPORT FormWidgetBase : public QWidget, public KFormDesigner::FormWidget
+class KFORMEDITOR_EXPORT FormWidgetBase : public TQWidget, public KFormDesigner::FormWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- FormWidgetBase(KFormDesignerKDevPart *part, QWidget *parent = 0, const char *name = 0, int WFlags = WDestructiveClose)
- : QWidget(parent, name, WFlags), m_part(part) {}
+ FormWidgetBase(KFormDesignerKDevPart *part, TQWidget *tqparent = 0, const char *name = 0, int WFlags = WDestructiveClose)
+ : TQWidget(tqparent, name, WFlags), m_part(part) {}
~FormWidgetBase() {;}
- void drawRect(const QRect& r, int type);
- void drawRects(const QValueList<QRect> &list, int type);
+ void drawRect(const TQRect& r, int type);
+ void drawRects(const TQValueList<TQRect> &list, int type);
void initRect();
void clearRect();
- void highlightWidgets(QWidget *from, QWidget *to);//, const QPoint &p);
+ void highlightWidgets(TQWidget *from, TQWidget *to);//, const TQPoint &p);
protected:
- void closeEvent(QCloseEvent *ev);
+ void closeEvent(TQCloseEvent *ev);
private:
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
KFormDesignerKDevPart *m_part;
};
diff --git a/kexi/formeditor/kfdpixmapedit.cpp b/kexi/formeditor/kfdpixmapedit.cpp
index e8a967614..caadca855 100644
--- a/kexi/formeditor/kfdpixmapedit.cpp
+++ b/kexi/formeditor/kfdpixmapedit.cpp
@@ -29,8 +29,8 @@
using namespace KFormDesigner;
-KFDPixmapEdit::KFDPixmapEdit(KoProperty::Property *property, QWidget *parent, const char *name)
- : KoProperty::PixmapEdit(property, parent, name)
+KFDPixmapEdit::KFDPixmapEdit(KoProperty::Property *property, TQWidget *tqparent, const char *name)
+ : KoProperty::PixmapEdit(property, tqparent, name)
{
// m_manager = manager;
}
@@ -47,9 +47,9 @@ KFDPixmapEdit::selectPixmap()
return;
ObjectTreeItem *item = m_manager->activeForm()->objectTree()->lookup(m_manager->activeForm()->selectedWidget()->name());
- QString name = item ? item->pixmapName(property()->name()) : "";
- PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, topLevelWidget() );
- if(dialog.exec() == QDialog::Accepted) {
+ TQString name = item ? item->pixmapName(property()->name()) : "";
+ PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, tqtopLevelWidget() );
+ if(dialog.exec() == TQDialog::Accepted) {
setValue(dialog.pixmap(), true);
item->setPixmapName(property()->name(), dialog.pixmapName());
}
diff --git a/kexi/formeditor/kfdpixmapedit.h b/kexi/formeditor/kfdpixmapedit.h
index 0d183ea4e..181ed0433 100644
--- a/kexi/formeditor/kfdpixmapedit.h
+++ b/kexi/formeditor/kfdpixmapedit.h
@@ -27,9 +27,10 @@ namespace KFormDesigner {
class KFORMEDITOR_EXPORT KFDPixmapEdit : public KoProperty::PixmapEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KFDPixmapEdit(KoProperty::Property *property, QWidget *parent=0, const char *name=0);
+ KFDPixmapEdit(KoProperty::Property *property, TQWidget *tqparent=0, const char *name=0);
virtual ~KFDPixmapEdit();
public slots:
diff --git a/kexi/formeditor/libactionwidget.cpp b/kexi/formeditor/libactionwidget.cpp
index 8a17c3c3b..0edc24332 100644
--- a/kexi/formeditor/libactionwidget.cpp
+++ b/kexi/formeditor/libactionwidget.cpp
@@ -26,15 +26,15 @@
using namespace KFormDesigner;
LibActionWidget::LibActionWidget(WidgetInfo *w, KActionCollection *c)
- : KToggleAction(w->name(), w->pixmap(), 0/*Key_F5*/, 0, 0 /*SLOT(slotWidget())*/,
- c, QString("library_widget_" + w->className()).latin1())
+ : KToggleAction(w->name(), w->pixmap(), 0/*Key_F5*/, 0, 0 /*TQT_SLOT(slotWidget())*/,
+ c, TQString("library_widget_" + w->className()).latin1())
{
-// kdDebug() << "LibActionWidget::LibActionWidget(): " << QString("library_widget_" + w->className()).latin1() << endl;
+// kdDebug() << "LibActionWidget::LibActionWidget(): " << TQString("library_widget_" + w->className()).latin1() << endl;
m_className = w->className();
setExclusiveGroup("LibActionWidgets");
setToolTip(w->name());
setWhatsThis(w->description());
-// connect(this, SIGNAL(activated()), this, SLOT(slotWidget()));
+// connect(this, TQT_SIGNAL(activated()), this, TQT_SLOT(slotWidget()));
}
void
diff --git a/kexi/formeditor/libactionwidget.h b/kexi/formeditor/libactionwidget.h
index bfa45f6a4..e2ef27621 100644
--- a/kexi/formeditor/libactionwidget.h
+++ b/kexi/formeditor/libactionwidget.h
@@ -35,6 +35,7 @@ class WidgetInfo;
class KFORMEDITOR_EXPORT LibActionWidget : public KToggleAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/** LibActionWidget object is initialized to be mutually
exclusive with all other LibActionWidget objects */
@@ -45,14 +46,14 @@ class KFORMEDITOR_EXPORT LibActionWidget : public KToggleAction
/**
* emits a signal containing the class name
*/
- void prepareInsert(const QCString &className);
+ void prepareInsert(const TQCString &className);
protected slots:
/** reimplemented from KToggleAction */
virtual void slotActivated();
private:
- QCString m_className;
+ TQCString m_className;
};
}
diff --git a/kexi/formeditor/objecttree.cpp b/kexi/formeditor/objecttree.cpp
index d5708773d..5f17d8497 100644
--- a/kexi/formeditor/objecttree.cpp
+++ b/kexi/formeditor/objecttree.cpp
@@ -19,10 +19,10 @@
*/
#include <kdebug.h>
-#include <qwidget.h>
-#include <qvariant.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "form.h"
#include "container.h"
@@ -36,15 +36,15 @@ using namespace KFormDesigner;
////////////////////////////////////////////////////////////////////////////////////////
-ObjectTreeItem::ObjectTreeItem(const QString &classn, const QString &name, QWidget *widget,
- Container *parentContainer, Container *container)
+ObjectTreeItem::ObjectTreeItem(const TQString &classn, const TQString &name, TQWidget *widget,
+ Container *tqparentContainer, Container *container)
: m_enabled(true), m_row(-1), m_col(-1), m_rowspan(-1), m_colspan(-1), m_span(false)
{
m_className = classn;
m_name = name;
m_widget = widget;
m_container = container;
- m_eater = new EventEater(widget, parentContainer);
+ m_eater = new EventEater(widget, tqparentContainer);
m_parent = 0;
m_subprops = 0;
}
@@ -56,7 +56,7 @@ ObjectTreeItem::~ObjectTreeItem()
}
void
-ObjectTreeItem::rename(const QString &name)
+ObjectTreeItem::rename(const TQString &name)
{
m_name = name;
}
@@ -64,58 +64,58 @@ ObjectTreeItem::rename(const QString &name)
void
ObjectTreeItem::addChild(ObjectTreeItem *c)
{
- m_children.append(c);
+ m_tqchildren.append(c);
c->setParent(this);
}
void
ObjectTreeItem::removeChild(ObjectTreeItem *c)
{
- m_children.remove(c);
+ m_tqchildren.remove(c);
}
void
-ObjectTreeItem::addModifiedProperty(const QCString &property, const QVariant &oldValue)
+ObjectTreeItem::addModifiedProperty(const TQCString &property, const TQVariant &oldValue)
{
if(property == "name")
return;
- if(!m_props.contains(property)) {
+ if(!m_props.tqcontains(property)) {
m_props.insert(property, oldValue);
kdDebug() << "ObjectTree::adModProperty(): Added this property in the list: " << property << " oldValue: " << oldValue << endl;
}
}
void
-ObjectTreeItem::addSubproperty(const QCString &property, const QVariant& value)
+ObjectTreeItem::addSubproperty(const TQCString &property, const TQVariant& value)
{
if (!m_subprops)
- m_subprops = new QMap<QString, QVariant>();
- if (!m_props.contains(property))
+ m_subprops = new TQMap<TQString, TQVariant>();
+ if (!m_props.tqcontains(property))
m_subprops->insert( property, value );
}
void
-ObjectTreeItem::storeUnknownProperty(QDomElement &el)
+ObjectTreeItem::storeUnknownProperty(TQDomElement &el)
{
if(!el.isNull()) {
- QTextStream ts(m_unknownProps, IO_WriteOnly|IO_Append );
+ TQTextStream ts(m_unknownProps, IO_WriteOnly|IO_Append );
el.save(ts, 0);
}
}
void
-ObjectTreeItem::setPixmapName(const QCString &property, const QString &name)
+ObjectTreeItem::setPixmapName(const TQCString &property, const TQString &name)
{
m_pixmapNames[property] = name;
}
-QString
-ObjectTreeItem::pixmapName(const QCString &property)
+TQString
+ObjectTreeItem::pixmapName(const TQCString &property)
{
- if(m_pixmapNames.contains(property))
+ if(m_pixmapNames.tqcontains(property))
return m_pixmapNames[property];
- return QString::null;
+ return TQString();
}
void
@@ -134,22 +134,22 @@ ObjectTreeItem::setGridPos(int row, int col, int rowspan, int colspan)
/// ObjectTree /////////
////////////////////////////////////////////////////////////////////////////////////////
-ObjectTree::ObjectTree(const QString &classn, const QString &name, QWidget *widget, Container *container)
+ObjectTree::ObjectTree(const TQString &classn, const TQString &name, TQWidget *widget, Container *container)
: ObjectTreeItem(classn, name, widget, container, container)
{
}
ObjectTree::~ObjectTree()
{
-// for(ObjectTreeItem *it = children()->first(); it; it = children()->next())
+// for(ObjectTreeItem *it = tqchildren()->first(); it; it = tqchildren()->next())
// removeItem(it->name());
- while (children()->first()) {
- removeItem(children()->first());
+ while (tqchildren()->first()) {
+ removeItem(tqchildren()->first());
}
}
bool
-ObjectTree::rename(const QString &oldname, const QString &newname)
+ObjectTree::rename(const TQString &oldname, const TQString &newname)
{
if(oldname == m_name)
{
@@ -169,20 +169,20 @@ ObjectTree::rename(const QString &oldname, const QString &newname)
}
bool
-ObjectTree::reparent(const QString &name, const QString &newparent)
+ObjectTree::reparent(const TQString &name, const TQString &newtqparent)
{
ObjectTreeItem *item = lookup(name);
if(!item) return false;
- ObjectTreeItem *parent = lookup(newparent);
- if(!parent) return false;
+ ObjectTreeItem *tqparent = lookup(newtqparent);
+ if(!tqparent) return false;
- item->parent()->removeChild(item);
- parent->addChild(item);
+ item->tqparent()->removeChild(item);
+ tqparent->addChild(item);
return true;
}
ObjectTreeItem*
-ObjectTree::lookup(const QString &name)
+ObjectTree::lookup(const TQString &name)
{
if(name == this->name())
return this;
@@ -191,20 +191,20 @@ ObjectTree::lookup(const QString &name)
}
void
-ObjectTree::addItem(ObjectTreeItem *parent, ObjectTreeItem *c)
+ObjectTree::addItem(ObjectTreeItem *tqparent, ObjectTreeItem *c)
{
m_treeDict.insert(c->name(), c);
- if(!parent)
- parent = this;
- parent->addChild(c);
+ if(!tqparent)
+ tqparent = this;
+ tqparent->addChild(c);
m_container->form()->emitChildAdded(c);
- kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << parent->name() << endl;
+ kdDebug() << "ObjectTree::addItem(): adding " << c->name() << " to " << tqparent->name() << endl;
}
void
-ObjectTree::removeItem(const QString &name)
+ObjectTree::removeItem(const TQString &name)
{
ObjectTreeItem *c = lookup(name);
removeItem(c);
@@ -216,29 +216,29 @@ ObjectTree::removeItem(ObjectTreeItem *c)
if (m_container && m_container->form())
m_container->form()->emitChildRemoved(c);
- for(ObjectTreeItem *it = c->children()->first(); it; it = c->children()->next())
+ for(ObjectTreeItem *it = c->tqchildren()->first(); it; it = c->tqchildren()->next())
removeItem(it->name());
m_treeDict.remove(c->name());
- c->parent()->removeChild(c);
+ c->tqparent()->removeChild(c);
delete c;
}
-QCString
-ObjectTree::generateUniqueName(const QCString &prefix, bool numberSuffixRequired)
+TQCString
+ObjectTree::generateUniqueName(const TQCString &prefix, bool numberSuffixRequired)
{
/* old way of naming widgets
int appendix = m_names[c] + 1;
- QString name(c);
- name.append(QString::number(appendix));
+ TQString name(c);
+ name.append(TQString::number(appendix));
m_names[c] = appendix;*/
if (!numberSuffixRequired && !lookup(prefix))
return prefix;
- QString name( prefix );
+ TQString name( prefix );
int i = 2; //start from 2, i.e. we have: "widget", "widget2", etc.
- while(lookup(name + QString::number(i)))
+ while(lookup(name + TQString::number(i)))
i++;
- return (name + QString::number(i)).latin1();
+ return (name + TQString::number(i)).latin1();
}
diff --git a/kexi/formeditor/objecttree.h b/kexi/formeditor/objecttree.h
index 252ee54c0..ca301f4d5 100644
--- a/kexi/formeditor/objecttree.h
+++ b/kexi/formeditor/objecttree.h
@@ -22,15 +22,15 @@
#ifndef KFORMDESIGNEROBJECTTREE_H
#define KFORMDESIGNEROBJECTTREE_H
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qdict.h>
-#include <qvariant.h>
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqvariant.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
-class QWidget;
-class QDomElement;
+class TQWidget;
+class TQDomElement;
namespace KFormDesigner {
@@ -39,53 +39,53 @@ class Container;
class EventEater;
//! @short An list of ObjectTreeItem pointers.
-typedef QPtrList<ObjectTreeItem> ObjectTreeList;
+typedef TQPtrList<ObjectTreeItem> ObjectTreeList;
//! @short An iterator for ObjectTreeList.
-typedef QPtrListIterator<ObjectTreeItem> ObjectTreeListIterator;
+typedef TQPtrListIterator<ObjectTreeItem> ObjectTreeListIterator;
-//! @short A QString-based disctionary of ObjectTreeItem pointers.
-typedef QDict<ObjectTreeItem> ObjectTreeDict;
+//! @short A TQString-based disctionary of ObjectTreeItem pointers.
+typedef TQDict<ObjectTreeItem> ObjectTreeDict;
//! @short An iterator for ObjectTreeDict.
-typedef QDictIterator<ObjectTreeItem> ObjectTreeDictIterator;
+typedef TQDictIterator<ObjectTreeItem> ObjectTreeDictIterator;
-//! @short A QString -> QVarinat map.
-typedef QMap<QString, QVariant> QVariantMap;
+//! @short A TQString -> TQVarinat map.
+typedef TQMap<TQString, TQVariant> TQVariantMap;
-//! @short A const iterator for QVariantMap.
-typedef QMapConstIterator<QString, QVariant> QVariantMapConstIterator;
+//! @short A const iterator for TQVariantMap.
+typedef TQMapConstIterator<TQString, TQVariant> TQVariantMapConstIterator;
/*!
@short An item representing a widget
- Holds the properties of a widget (classname, name, parent, children ..).
+ Holds the properties of a widget (classname, name, tqparent, tqchildren ..).
@author Lucijan Busch <lucijan@kde.org>
*/
class KFORMEDITOR_EXPORT ObjectTreeItem
{
public:
- ObjectTreeItem(const QString &className, const QString &name, QWidget *widget, Container *parentContainer, Container *container=0);
+ ObjectTreeItem(const TQString &className, const TQString &name, TQWidget *widget, Container *tqparentContainer, Container *container=0);
virtual ~ObjectTreeItem();
- QString name() const { return m_name; }
- QString className() const { return m_className; }
- QWidget* widget() const { return m_widget; }
+ TQString name() const { return m_name; }
+ TQString className() const { return m_className; }
+ TQWidget* widget() const { return m_widget; }
EventEater* eventEater() const { return m_eater; }
- ObjectTreeItem* parent() const { return m_parent; }
- ObjectTreeList* children() { return &m_children; }
+ ObjectTreeItem* tqparent() const { return m_parent; }
+ ObjectTreeList* tqchildren() { return &m_tqchildren; }
- /*! \return a QMap<QString, QVariant> of all modified properties for this widget.
- The QVariant is the old value (ie first value) of the property whose name is the QString. */
- const QVariantMap* modifiedProperties() const { return &m_props;}
+ /*! \return a TQMap<TQString, TQVariant> of all modified properties for this widget.
+ The TQVariant is the old value (ie first value) of the property whose name is the TQString. */
+ const TQVariantMap* modifiedProperties() const { return &m_props;}
//! \return the widget's Container, or 0 if the widget is not a Container.
Container* container() const { return m_container;}
- void setWidget(QWidget *w) { m_widget = w; }
- void setParent(ObjectTreeItem *parent) { m_parent = parent;}
+ void setWidget(TQWidget *w) { m_widget = w; }
+ void setParent(ObjectTreeItem *tqparent) { m_parent = tqparent;}
void debug(int ident);
- void rename(const QString &name);
+ void rename(const TQString &name);
void addChild(ObjectTreeItem *it);
void removeChild(ObjectTreeItem *it);
@@ -93,20 +93,20 @@ class KFORMEDITOR_EXPORT ObjectTreeItem
/*! Adds \a property in the list of the modified properties for this object.
These modified properties are written in the .ui files when saving the form.
*/
- void addModifiedProperty(const QCString &property, const QVariant &oldValue);
- void storeUnknownProperty(QDomElement &el);
+ void addModifiedProperty(const TQCString &property, const TQVariant &oldValue);
+ void storeUnknownProperty(TQDomElement &el);
/*! Adds subproperty \a property value \a value (a property of subwidget).
Remembering it for delayed setting is needed because on loading
the subwidget could be not created yet (true e.g. for KexiDBAutoField). */
- void addSubproperty(const QCString &property, const QVariant& value);
+ void addSubproperty(const TQCString &property, const TQVariant& value);
/*! \return subproperties for this item, added by addSubproperty()
or 0 is there are no subproperties. */
- QMap<QString, QVariant>* subproperties() const { return m_subprops; }
+ TQMap<TQString, TQVariant>* subproperties() const { return m_subprops; }
- void setPixmapName(const QCString &property, const QString &name);
- QString pixmapName(const QCString &property);
+ void setPixmapName(const TQCString &property, const TQString &name);
+ TQString pixmapName(const TQCString &property);
void setEnabled(bool enabled) { m_enabled = enabled; }
bool isEnabled() const { return m_enabled; }
@@ -119,17 +119,17 @@ class KFORMEDITOR_EXPORT ObjectTreeItem
void setGridPos(int row, int col, int rowspan, int colspan);
protected:
- QString m_className;
- QString m_name;
- ObjectTreeList m_children;
- QGuardedPtr<Container> m_container;
- QMap<QString, QVariant> m_props;
- QMap<QString, QVariant> *m_subprops;
- QString m_unknownProps;
- QMap<QCString, QString> m_pixmapNames;
+ TQString m_className;
+ TQString m_name;
+ ObjectTreeList m_tqchildren;
+ TQGuardedPtr<Container> m_container;
+ TQMap<TQString, TQVariant> m_props;
+ TQMap<TQString, TQVariant> *m_subprops;
+ TQString m_unknownProps;
+ TQMap<TQCString, TQString> m_pixmapNames;
ObjectTreeItem* m_parent;
- QGuardedPtr<QWidget> m_widget;
- QGuardedPtr<EventEater> m_eater;
+ TQGuardedPtr<TQWidget> m_widget;
+ TQGuardedPtr<EventEater> m_eater;
bool m_enabled;
@@ -145,25 +145,25 @@ class KFORMEDITOR_EXPORT ObjectTreeItem
class KFORMEDITOR_EXPORT ObjectTree : public ObjectTreeItem
{
public:
- ObjectTree(const QString &className=QString::null, const QString &name=QString::null,
- QWidget *widget=0, Container *container=0);
+ ObjectTree(const TQString &className=TQString(), const TQString &name=TQString(),
+ TQWidget *widget=0, Container *container=0);
virtual ~ObjectTree();
/*! Renames the item named \a oldname to \a newname. \return false if widget named \a newname
already exists and renaming failed. */
- bool rename(const QString &oldname, const QString &newname );
- /*! Sets \a newparent as new parent for the item whose name is \a name. */
- bool reparent(const QString &name, const QString &newparent);
+ bool rename(const TQString &oldname, const TQString &newname );
+ /*! Sets \a newtqparent as new tqparent for the item whose name is \a name. */
+ bool reparent(const TQString &name, const TQString &newtqparent);
/*! \return the ObjectTreeItem named \a name, or 0 if doesn't exist. */
- ObjectTreeItem* lookup(const QString &name);
+ ObjectTreeItem* lookup(const TQString &name);
/*! \return a dict containing all ObjectTreeItem in this ObjectTree. If you want to iterate on
this dict, use ObjectTreeDictIterator. */
ObjectTreeDict* dict() { return &m_treeDict; }
- void addItem(ObjectTreeItem *parent, ObjectTreeItem *c);
- void removeItem(const QString &name);
+ void addItem(ObjectTreeItem *tqparent, ObjectTreeItem *c);
+ void removeItem(const TQString &name);
void removeItem(ObjectTreeItem *c);
/*! Generates a new, unique name for a new widget using prefix \a prefix
@@ -173,7 +173,7 @@ class KFORMEDITOR_EXPORT ObjectTree : public ObjectTreeItem
If \a numberSuffixRequired is false and there's a widget prefix \a prefix,
then \a prefix is returned (e.g. if \a prefix is "lineEdit", and "lineEdit" doesn't exist yet,
"lineEdit" is returned). */
- QCString generateUniqueName(const QCString &prefix, bool numberSuffixRequired = true);
+ TQCString generateUniqueName(const TQCString &prefix, bool numberSuffixRequired = true);
private:
ObjectTreeDict m_treeDict;
diff --git a/kexi/formeditor/objecttreeview.cpp b/kexi/formeditor/objecttreeview.cpp
index 22ed6d7f9..4f2584465 100644
--- a/kexi/formeditor/objecttreeview.cpp
+++ b/kexi/formeditor/objecttreeview.cpp
@@ -19,7 +19,7 @@
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -34,14 +34,14 @@
using namespace KFormDesigner;
-ObjectTreeViewItem::ObjectTreeViewItem(ObjectTreeViewItem *parent, ObjectTreeItem *item)
- : KListViewItem(parent, item->name(), item->className())
+ObjectTreeViewItem::ObjectTreeViewItem(ObjectTreeViewItem *tqparent, ObjectTreeItem *item)
+ : KListViewItem(tqparent, item->name(), item->className())
{
m_item = item;
}
ObjectTreeViewItem::ObjectTreeViewItem(KListView *list, ObjectTreeItem *item)
- : KListViewItem(list, item ? item->name() : QString::null, item ? item->className() : QString::null)
+ : KListViewItem(list, item ? item->name() : TQString(), item ? item->className() : TQString())
{
m_item = item;
}
@@ -50,17 +50,17 @@ ObjectTreeViewItem::~ObjectTreeViewItem()
{
}
-QString
+TQString
ObjectTreeViewItem::name() const
{
if(m_item)
return m_item->name();
else
- return QString::null;
+ return TQString();
}
void
-ObjectTreeViewItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+ObjectTreeViewItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
int margin = listView()->itemMargin();
if(column == 1)
@@ -74,42 +74,42 @@ ObjectTreeViewItem::paintCell(QPainter *p, const QColorGroup & cg, int column, i
if(!m_item)
return;
- p->fillRect(0,0,width, height(), QBrush(backgroundColor()));
+ p->fillRect(0,0,width, height(), TQBrush(backgroundColor()));
if(isSelected())
{
- p->fillRect(0,0,width, height(), QBrush(cg.highlight()));
+ p->fillRect(0,0,width, height(), TQBrush(cg.highlight()));
p->setPen(cg.highlightedText());
}
- QFont f = listView()->font();
+ TQFont f = listView()->font();
p->save();
if(isSelected())
f.setBold(true);
p->setFont(f);
if(depth() == 0) // for edit tab order dialog
{
- QString iconName
+ TQString iconName
= ((ObjectTreeView*)listView())->iconNameForClass(m_item->widget()->className());
p->drawPixmap(margin, (height() - IconSize(KIcon::Small))/2 , SmallIcon(iconName));
p->drawText(
- QRect(2*margin + IconSize(KIcon::Small),0,width, height()-1),
- Qt::AlignVCenter, m_item->name());
+ TQRect(2*margin + IconSize(KIcon::Small),0,width, height()-1),
+ TQt::AlignVCenter, m_item->name());
}
else
- p->drawText(QRect(margin,0,width, height()-1), Qt::AlignVCenter, m_item->name());
+ p->drawText(TQRect(margin,0,width, height()-1), TQt::AlignVCenter, m_item->name());
p->restore();
- p->setPen( QColor(200,200,200) ); //like in t.v.
+ p->setPen( TQColor(200,200,200) ); //like in t.v.
p->drawLine(width-1, 0, width-1, height()-1);
}
- p->setPen( QColor(200,200,200) ); //like in t.v.
+ p->setPen( TQColor(200,200,200) ); //like in t.v.
p->drawLine(-150, height()-1, width, height()-1 );
}
void
-ObjectTreeViewItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h)
+ObjectTreeViewItem::paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h)
{
p->eraseRect(0,0,w,h);
ObjectTreeViewItem *item = (ObjectTreeViewItem*)firstChild();
@@ -120,20 +120,20 @@ ObjectTreeViewItem::paintBranches(QPainter *p, const QColorGroup &cg, int w, int
p->translate(0,y);
while(item)
{
- p->fillRect(0,0,w, item->height(), QBrush(item->backgroundColor()));
- p->fillRect(-150,0,150, item->height(), QBrush(item->backgroundColor()));
+ p->fillRect(0,0,w, item->height(), TQBrush(item->backgroundColor()));
+ p->fillRect(-150,0,150, item->height(), TQBrush(item->backgroundColor()));
p->save();
- p->setPen( QColor(200,200,200) ); //like in t.v.
+ p->setPen( TQColor(200,200,200) ); //like in t.v.
p->drawLine(-150, item->height()-1, w, item->height()-1 );
p->restore();
if(item->isSelected())
{
- p->fillRect(0,0,w, item->height(), QBrush(cg.highlight()));
- p->fillRect(-150,0,150, item->height(), QBrush(cg.highlight()));
+ p->fillRect(0,0,w, item->height(), TQBrush(cg.highlight()));
+ p->fillRect(-150,0,150, item->height(), TQBrush(cg.highlight()));
}
- QString iconName
+ TQString iconName
= ((ObjectTreeView*)listView())->iconNameForClass(item->m_item->widget()->className());
p->drawPixmap(
(w - IconSize(KIcon::Small))/2, (item->height() - IconSize(KIcon::Small))/2 ,
@@ -163,8 +163,8 @@ ObjectTreeViewItem::setOpen( bool o )
// ObjectTreeView itself ----------------
-ObjectTreeView::ObjectTreeView(QWidget *parent, const char *name, bool tabStop)
- : KListView(parent, name)
+ObjectTreeView::ObjectTreeView(TQWidget *tqparent, const char *name, bool tabStop)
+ : KListView(tqparent, name)
, m_form(0)
{
addColumn(i18n("Name"), 130);
@@ -172,12 +172,12 @@ ObjectTreeView::ObjectTreeView(QWidget *parent, const char *name, bool tabStop)
installEventFilter(this);
- connect((QObject*)header(), SIGNAL(sectionHandleDoubleClicked(int)), this, SLOT(slotColumnSizeChanged(int)));
+ connect((TQObject*)header(), TQT_SIGNAL(sectionHandleDoubleClicked(int)), this, TQT_SLOT(slotColumnSizeChanged(int)));
if(!tabStop)
{
setSelectionModeExt(Extended);
- connect(this, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged()));
- connect(this, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint&)), this, SLOT(displayContextMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
+ connect(this, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint&)), this, TQT_SLOT(displayContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
setFullWidth(true);
@@ -190,15 +190,15 @@ ObjectTreeView::~ObjectTreeView()
{
}
-QSize
-ObjectTreeView::sizeHint() const
+TQSize
+ObjectTreeView::tqsizeHint() const
{
- return QSize( QFontMetrics(font()).width(columnText(0)+columnText(1)+" "),
- KListView::sizeHint().height());
+ return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "),
+ KListView::tqsizeHint().height());
}
-QString
-ObjectTreeView::iconNameForClass(const QCString &classname)
+TQString
+ObjectTreeView::iconNameForClass(const TQCString &classname)
{
return m_form->library()->iconName(classname);
}
@@ -210,12 +210,12 @@ ObjectTreeView::slotColumnSizeChanged(int)
}
void
-ObjectTreeView::displayContextMenu(KListView *list, QListViewItem *item, const QPoint &)
+ObjectTreeView::displayContextMenu(KListView *list, TQListViewItem *item, const TQPoint &)
{
if(list != this || !m_form || !item)
return;
- QWidget *w = ((ObjectTreeViewItem*)item)->m_item->widget();
+ TQWidget *w = ((ObjectTreeViewItem*)item)->m_item->widget();
if(!w)
return;
@@ -223,9 +223,9 @@ ObjectTreeView::displayContextMenu(KListView *list, QListViewItem *item, const Q
}
ObjectTreeViewItem*
-ObjectTreeView::findItem(const QString &name)
+ObjectTreeView::findItem(const TQString &name)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
while(it.current())
{
ObjectTreeViewItem *item = static_cast<ObjectTreeViewItem*>(it.current());
@@ -239,7 +239,7 @@ ObjectTreeView::findItem(const QString &name)
}
void
-ObjectTreeView::setSelectedWidget(QWidget *w, bool add)
+ObjectTreeView::setSelectedWidget(TQWidget *w, bool add)
{
blockSignals(true); // to avoid recursion
@@ -257,7 +257,7 @@ ObjectTreeView::setSelectedWidget(QWidget *w, bool add)
clearSelection();
- QListViewItem *item = (QListViewItem*) findItem(w->name());
+ TQListViewItem *item = (TQListViewItem*) findItem(w->name());
if(!add)
{
setCurrentItem(item);
@@ -274,13 +274,13 @@ void
ObjectTreeView::slotSelectionChanged()
{
const bool hadFocus = hasFocus();
- QPtrList<QListViewItem> list = selectedItems();
+ TQPtrList<TQListViewItem> list = selectedItems();
m_form->selectFormWidget();
- for(QListViewItem *item = list.first(); item; item = list.next())
+ for(TQListViewItem *item = list.first(); item; item = list.next())
{
ObjectTreeViewItem *it = static_cast<ObjectTreeViewItem*>(item);
- QWidget *w = it->objectTree()->widget();
- if(w && (m_form->selectedWidgets()->findRef(w) == -1))
+ TQWidget *w = it->objectTree()->widget();
+ if(w && (m_form->selectedWidgets()->tqfindRef(w) == -1))
m_form->setSelectedWidget(w, true, true);
}
if (hadFocus)
@@ -290,13 +290,13 @@ ObjectTreeView::slotSelectionChanged()
void
ObjectTreeView::addItem(ObjectTreeItem *item)
{
- ObjectTreeViewItem *parent=0;
+ ObjectTreeViewItem *tqparent=0;
- parent = findItem(item->parent()->name());
- if(!parent)
+ tqparent = findItem(item->tqparent()->name());
+ if(!tqparent)
return;
- loadTree(item, parent);
+ loadTree(item, tqparent);
}
void
@@ -309,7 +309,7 @@ ObjectTreeView::removeItem(ObjectTreeItem *item)
}
void
-ObjectTreeView::renameItem(const QCString &oldname, const QCString &newname)
+ObjectTreeView::renameItem(const TQCString &oldname, const TQCString &newname)
{
if(findItem(newname))
return;
@@ -323,7 +323,7 @@ void
ObjectTreeView::setForm(Form *form)
{
if (m_form)
- disconnect(m_form, SIGNAL(destroying()), this, SLOT(slotBeforeFormDestroyed()));
+ disconnect(m_form, TQT_SIGNAL(destroying()), this, TQT_SLOT(slotBeforeFormDestroyed()));
m_form = form;
m_topItem = 0;
clear();
@@ -331,7 +331,7 @@ ObjectTreeView::setForm(Form *form)
if(!m_form)
return;
- connect(m_form, SIGNAL(destroying()), this, SLOT(slotBeforeFormDestroyed()));
+ connect(m_form, TQT_SIGNAL(destroying()), this, TQT_SLOT(slotBeforeFormDestroyed()));
// Creates the hidden top Item
m_topItem = new ObjectTreeViewItem(this);
@@ -354,20 +354,20 @@ ObjectTreeView::slotBeforeFormDestroyed()
}
ObjectTreeViewItem*
-ObjectTreeView::loadTree(ObjectTreeItem *item, ObjectTreeViewItem *parent)
+ObjectTreeView::loadTree(ObjectTreeItem *item, ObjectTreeViewItem *tqparent)
{
if(!item)
return 0;
- ObjectTreeViewItem *treeItem = new ObjectTreeViewItem(parent, item);
+ ObjectTreeViewItem *treeItem = new ObjectTreeViewItem(tqparent, item);
treeItem->setOpen(true);
// The item is inserted by default at the beginning, but we want it to be at the end, so we move it
- QListViewItem *last = parent->firstChild();
+ TQListViewItem *last = tqparent->firstChild();
while(last->nextSibling())
last = last->nextSibling();
treeItem->moveItem(last);
- ObjectTreeList *list = item->children();
+ ObjectTreeList *list = item->tqchildren();
for(ObjectTreeItem *it = list->first(); it; it = list->next())
loadTree(it, treeItem);
diff --git a/kexi/formeditor/objecttreeview.h b/kexi/formeditor/objecttreeview.h
index 393f3ba08..46266144b 100644
--- a/kexi/formeditor/objecttreeview.h
+++ b/kexi/formeditor/objecttreeview.h
@@ -31,12 +31,12 @@ class Form;
class KFORMEDITOR_EXPORT ObjectTreeViewItem : public KListViewItem
{
public:
- ObjectTreeViewItem(ObjectTreeViewItem *parent, ObjectTreeItem *item);
+ ObjectTreeViewItem(ObjectTreeViewItem *tqparent, ObjectTreeItem *item);
ObjectTreeViewItem(KListView *list, ObjectTreeItem *item=0);
virtual ~ObjectTreeViewItem();
//! \return the item name, ie the ObjectTreeItem name
- QString name() const;
+ TQString name() const;
//! \return the ObjectTreeItem associated to this item.
ObjectTreeItem* objectTree() const { return m_item; }
@@ -45,10 +45,10 @@ class KFORMEDITOR_EXPORT ObjectTreeViewItem : public KListViewItem
protected:
//! Reimplemented to draw custom contents (copied from Property Editor)
- virtual void paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align);
+ virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align);
//! Reimplemented to draw custom contents (copied from Property Editor)
- virtual void paintBranches(QPainter *p, const QColorGroup &cg, int w, int y, int h);
+ virtual void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h);
//! Reimplemented to draw custom contents (copied from Property Editor)
virtual void setup();
@@ -67,12 +67,13 @@ class KFORMEDITOR_EXPORT ObjectTreeViewItem : public KListViewItem
class KFORMEDITOR_EXPORT ObjectTreeView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ObjectTreeView(QWidget *parent=0, const char *name=0, bool tabStop = false);
+ ObjectTreeView(TQWidget *tqparent=0, const char *name=0, bool tabStop = false);
virtual ~ObjectTreeView();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/*! Sets \a form as the current Form in the list. The list will automatically
be filled with an item for each widget in the Form, and selection will be synced.
@@ -81,26 +82,26 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView
void setForm(Form *form);
//! \return the pixmap name for a given class, to be shown next to the widget name.
- QString iconNameForClass(const QCString &classname);
+ TQString iconNameForClass(const TQCString &classname);
public slots:
/*! Sets the widget \a w as selected item, so it will be written bold.
It is added to current selection if \a add is true. */
- void setSelectedWidget(QWidget *w, bool add=false);
+ void setSelectedWidget(TQWidget *w, bool add=false);
- /*! Adds the ObjectTreeItem \a item in the list, with the appropriate parent. */
+ /*! Adds the ObjectTreeItem \a item in the list, with the appropriate tqparent. */
void addItem(ObjectTreeItem *item);
/*! Removess the ObjectTreeItem \a item from the list. */
void removeItem(ObjectTreeItem *item);
/*! Just renames the list item from \a oldname to \a newname. */
- void renameItem(const QCString &oldname, const QCString &newname);
+ void renameItem(const TQCString &oldname, const TQCString &newname);
protected slots:
/*! This slot is called when the user right-click a list item.
The widget context menu is shown, as inisde the Form. */
- void displayContextMenu(KListView *list, QListViewItem *item, const QPoint &p);
+ void displayContextMenu(KListView *list, TQListViewItem *item, const TQPoint &p);
void slotColumnSizeChanged(int);
@@ -112,10 +113,10 @@ class KFORMEDITOR_EXPORT ObjectTreeView : public KListView
protected:
//! Internal function to fill the list.
- ObjectTreeViewItem* loadTree(ObjectTreeItem *item, ObjectTreeViewItem *parent);
+ ObjectTreeViewItem* loadTree(ObjectTreeItem *item, ObjectTreeViewItem *tqparent);
//! \return The item whose name is \a name.
- ObjectTreeViewItem* findItem(const QString &name);
+ ObjectTreeViewItem* findItem(const TQString &name);
private:
Form *m_form;
diff --git a/kexi/formeditor/resizehandle.cpp b/kexi/formeditor/resizehandle.cpp
index 0731926f4..ac1cb4cb0 100644
--- a/kexi/formeditor/resizehandle.cpp
+++ b/kexi/formeditor/resizehandle.cpp
@@ -20,8 +20,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include "form.h"
#include "formmanager.h"
@@ -36,9 +36,9 @@
using namespace KFormDesigner;
ResizeHandle::ResizeHandle(ResizeHandleSet *set, HandlePos pos, bool editing)
- : QWidget(set->m_widget->parentWidget()), m_set(set)
+ : TQWidget(set->m_widget->tqparentWidget()), m_set(set)
{
-// setBackgroundMode(Qt::NoBackground);
+// setBackgroundMode(TQt::NoBackground);
m_dragging = false;
//m_editing = editing;
setEditingMode(editing);
@@ -72,53 +72,53 @@ void ResizeHandle::updatePos()
{
case TopLeft:
move(m_set->m_widget->x() - 3, m_set->m_widget->y() - 3);
- setCursor(QCursor(SizeFDiagCursor));
+ setCursor(TQCursor(SizeFDiagCursor));
break;
case TopCenter:
move(m_set->m_widget->x() + m_set->m_widget->width()/2 - 3, m_set->m_widget->y() - 3);
- setCursor(QCursor(SizeVerCursor));
+ setCursor(TQCursor(SizeVerCursor));
break;
case TopRight:
move(m_set->m_widget->x() + m_set->m_widget->width() - 3, m_set->m_widget->y() - 3);
- setCursor(QCursor(SizeBDiagCursor));
+ setCursor(TQCursor(SizeBDiagCursor));
break;
case LeftCenter:
move(m_set->m_widget->x() - 3, m_set->m_widget->y() + m_set->m_widget->height()/2 - 3);
- setCursor(QCursor(SizeHorCursor));
+ setCursor(TQCursor(SizeHorCursor));
break;
case RightCenter:
move(m_set->m_widget->x() + m_set->m_widget->width() - 3, m_set->m_widget->y() + m_set->m_widget->height()/2 - 3);
- setCursor(QCursor(SizeHorCursor));
+ setCursor(TQCursor(SizeHorCursor));
break;
case BottomLeft:
move(m_set->m_widget->x() - 3, m_set->m_widget->y() + m_set->m_widget->height() - 3);
- setCursor(QCursor(SizeBDiagCursor));
+ setCursor(TQCursor(SizeBDiagCursor));
break;
case BottomCenter:
move(m_set->m_widget->x() + m_set->m_widget->width()/2 - 3, m_set->m_widget->y() + m_set->m_widget->height() - 3);
- setCursor(QCursor(SizeVerCursor));
+ setCursor(TQCursor(SizeVerCursor));
break;
case BottomRight:
move(m_set->m_widget->x() + m_set->m_widget->width() - 3, m_set->m_widget->y() + m_set->m_widget->height() - 3);
- setCursor(QCursor(SizeFDiagCursor));
+ setCursor(TQCursor(SizeFDiagCursor));
break;
}
}
-bool ResizeHandle::eventFilter(QObject *o, QEvent *ev)
+bool ResizeHandle::eventFilter(TQObject *o, TQEvent *ev)
{
- if (((ev->type() == QEvent::Move) || (ev->type() == QEvent::Resize)) && o == m_set->m_widget)
+ if (((ev->type() == TQEvent::Move) || (ev->type() == TQEvent::Resize)) && o == m_set->m_widget)
{
- //QTimer::singleShot(0,this,SLOT(updatePos()));
+ //TQTimer::singleShot(0,this,TQT_SLOT(updatePos()));
updatePos();
}
-/* else if (ev->type() == QEvent::Paint && o == this) {
- QPainter p;
+/* else if (ev->type() == TQEvent::Paint && o == this) {
+ TQPainter p;
p.begin(m_set->m_widget, true);
const bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
- p.setPen(QPen(white, 10));
+ p.setPen(TQPen(white, 10));
p.setRasterOp(XorROP);
p.drawRect( 20, 20, 100, 100 );//m_set->m_widget->x(), m_set->m_widget->y(), 150, 150 );
p.drawRect( m_set->m_widget->x(), m_set->m_widget->y(), 150, 150 );
@@ -131,7 +131,7 @@ bool ResizeHandle::eventFilter(QObject *o, QEvent *ev)
return false;
}
-void ResizeHandle::mousePressEvent(QMouseEvent *ev)
+void ResizeHandle::mousePressEvent(TQMouseEvent *ev)
{
const bool startDragging = !m_dragging;
m_dragging = true;
@@ -145,7 +145,7 @@ void ResizeHandle::mousePressEvent(QMouseEvent *ev)
}
}
-void ResizeHandle::mouseMoveEvent(QMouseEvent *ev)
+void ResizeHandle::mouseMoveEvent(TQMouseEvent *ev)
{
int gridX = m_set->m_form->gridSize();
int gridY = m_set->m_form->gridSize();
@@ -161,7 +161,7 @@ void ResizeHandle::mouseMoveEvent(QMouseEvent *ev)
int dummyx = ev->x() - m_x;
int dummyy = ev->y() - m_y;
- if(FormManager::self()->snapWidgetsToGrid() && (ev->state() != (LeftButton|ControlButton|AltButton)))
+ if(FormManager::self()->snapWidgetsToGrid() && (ev->state() != (Qt::LeftButton|ControlButton|AltButton)))
{
dummyy = (int) ( ((float)dummyy) / ((float)gridY) + 0.5 );
dummyy *= gridY;
@@ -220,22 +220,22 @@ void ResizeHandle::mouseMoveEvent(QMouseEvent *ev)
tmph = MINIMUM_HEIGHT;
}
- // Do not resize a widget outside of parent boundaries
+ // Do not resize a widget outside of tqparent boundaries
if(tmpx < 0)
{
tmpw += tmpx;
tmpx = 0;
}
- else if(tmpx + tmpw > m_set->m_widget->parentWidget()->width())
- tmpw = m_set->m_widget->parentWidget()->width() - tmpx;
+ else if(tmpx + tmpw > m_set->m_widget->tqparentWidget()->width())
+ tmpw = m_set->m_widget->tqparentWidget()->width() - tmpx;
if(tmpy < 0)
{
tmph += tmpy;
tmpy = 0;
}
- else if(tmpy + tmph > m_set->m_widget->parentWidget()->height())
- tmph = m_set->m_widget->parentWidget()->height() - tmpy;
+ else if(tmpy + tmph > m_set->m_widget->tqparentWidget()->height())
+ tmph = m_set->m_widget->tqparentWidget()->height() - tmpy;
const bool shouldBeMoved = (tmpx != m_set->m_widget->x()) || (tmpy != m_set->m_widget->y());
const bool shouldBeResized = (tmpw != m_set->m_widget->width()) || (tmph != m_set->m_widget->height());
@@ -246,7 +246,7 @@ void ResizeHandle::mouseMoveEvent(QMouseEvent *ev)
// Resize it
if (shouldBeResized)
{
- // Keep a QSize(10, 10) minimum size
+ // Keep a TQSize(10, 10) minimum size
tmpw = (tmpw < MINIMUM_WIDTH) ? MINIMUM_WIDTH : tmpw;
tmph = (tmph < MINIMUM_HEIGHT) ? MINIMUM_HEIGHT : tmph;
m_set->m_widget->resize(tmpw,tmph);
@@ -260,28 +260,28 @@ void ResizeHandle::mouseMoveEvent(QMouseEvent *ev)
m_set->m_widget->show();
}
-void ResizeHandle::mouseReleaseEvent(QMouseEvent *)
+void ResizeHandle::mouseReleaseEvent(TQMouseEvent *)
{
m_dragging = false;
}
-void ResizeHandle::paintEvent( QPaintEvent * )
+void ResizeHandle::paintEvent( TQPaintEvent * )
{
//draw XORed background
- /*QPainter p(this);
+ /*TQPainter p(this);
p.setRasterOp(XorROP);
- p.fillRect(QRect(0, 0, 6, 6),white);
- bitBlt( this, QPoint(0,0), parentWidget(), rect(), XorROP);*/
+ p.fillRect(TQRect(0, 0, 6, 6),white);
+ bitBlt( this, TQPoint(0,0), tqparentWidget(), rect(), XorROP);*/
}
/////////////// ResizeHandleSet //////////////////
-ResizeHandleSet::ResizeHandleSet(QWidget *modify, Form *form, bool editing)
-: QObject(modify->parentWidget()), /*m_widget(modify),*/ m_form(form)
+ResizeHandleSet::ResizeHandleSet(TQWidget *modify, Form *form, bool editing)
+: TQObject(modify->tqparentWidget()), /*m_widget(modify),*/ m_form(form)
{
m_widget = 0;
- /*QWidget *parent = modify->parentWidget();
+ /*TQWidget *tqparent = modify->tqparentWidget();
handles[0] = new ResizeHandle( modify, ResizeHandle::TopLeft, editing);
handles[1] = new ResizeHandle( modify, ResizeHandle::TopCenter, editing);
@@ -301,7 +301,7 @@ ResizeHandleSet::~ResizeHandleSet()
}
void
-ResizeHandleSet::setWidget(QWidget *modify, bool editing)
+ResizeHandleSet::setWidget(TQWidget *modify, bool editing)
{
if(modify == m_widget)
return;
diff --git a/kexi/formeditor/resizehandle.h b/kexi/formeditor/resizehandle.h
index 15ddbf364..85390fe1d 100644
--- a/kexi/formeditor/resizehandle.h
+++ b/kexi/formeditor/resizehandle.h
@@ -20,9 +20,9 @@
#ifndef KFE_RESIZEHANDLER_H
#define KFE_RESIZEHANDLER_H
-#include <qdict.h>
-#include <qguardedptr.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
/**
*@author Joseph Wenninger
@@ -38,9 +38,10 @@ class ResizeHandleSet;
* a single widget which represents a dot for resizing a widget
* @author Joseph Wenninger
*/
-class KFORMEDITOR_EXPORT ResizeHandle : public QWidget
+class KFORMEDITOR_EXPORT ResizeHandle : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum HandlePos { TopLeft = 0, TopCenter = 2, TopRight = 4, LeftCenter = 8, RightCenter = 16,
@@ -50,19 +51,19 @@ class KFORMEDITOR_EXPORT ResizeHandle : public QWidget
void setEditingMode(bool editing);
protected:
- virtual void mousePressEvent(QMouseEvent *ev);
- virtual void mouseMoveEvent(QMouseEvent *ev);
- virtual void mouseReleaseEvent(QMouseEvent *ev);
- virtual void paintEvent( QPaintEvent *ev );
+ virtual void mousePressEvent(TQMouseEvent *ev);
+ virtual void mouseMoveEvent(TQMouseEvent *ev);
+ virtual void mouseReleaseEvent(TQMouseEvent *ev);
+ virtual void paintEvent( TQPaintEvent *ev );
protected slots:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
void updatePos();
private:
ResizeHandleSet *m_set;
HandlePos m_pos;
- //QWidget *m_buddy;
+ //TQWidget *m_buddy;
bool m_dragging;
//bool m_editing;
int m_x;
@@ -73,25 +74,26 @@ class KFORMEDITOR_EXPORT ResizeHandle : public QWidget
* a set of resize handles (for resizing widgets)
* @author Joseph Wenninger
*/
-class KFORMEDITOR_EXPORT ResizeHandleSet: public QObject
+class KFORMEDITOR_EXPORT ResizeHandleSet: public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QDict<ResizeHandleSet> Dict;
+ typedef TQDict<ResizeHandleSet> Dict;
- ResizeHandleSet(QWidget *modify, Form *form, bool editing = false);
+ ResizeHandleSet(TQWidget *modify, Form *form, bool editing = false);
~ResizeHandleSet();
- void setWidget(QWidget *modify, bool editing = false);
- QWidget *widget() const { return m_widget; }
+ void setWidget(TQWidget *modify, bool editing = false);
+ TQWidget *widget() const { return m_widget; }
void raise();
void setEditingMode(bool editing);
private:
- QGuardedPtr<ResizeHandle> m_handles[8];
- QGuardedPtr<QWidget> m_widget;
- QGuardedPtr<Form> m_form;
+ TQGuardedPtr<ResizeHandle> m_handles[8];
+ TQGuardedPtr<TQWidget> m_widget;
+ TQGuardedPtr<Form> m_form;
bool m_editing;
friend class ResizeHandle;
diff --git a/kexi/formeditor/richtextdialog.cpp b/kexi/formeditor/richtextdialog.cpp
index f4596ed5a..74a31ab0e 100644
--- a/kexi/formeditor/richtextdialog.cpp
+++ b/kexi/formeditor/richtextdialog.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <ktoolbar.h>
#include <kfontcombo.h>
@@ -33,11 +33,11 @@ namespace KFormDesigner {
//////////////// A simple dialog to edit rich text ////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
-RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
-: KDialogBase(parent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false)
+RichTextDialog::RichTextDialog(TQWidget *tqparent, const TQString &text)
+: KDialogBase(tqparent, "richtext_dialog", true, i18n("Edit Rich Text"), Ok|Cancel, Ok, false)
{
- QFrame *frame = makeMainWidget();
- QVBoxLayout *l = new QVBoxLayout(frame);
+ TQFrame *frame = makeMainWidget();
+ TQVBoxLayout *l = new TQVBoxLayout(frame);
l->setAutoAdd(true);
m_toolbar = new KToolBar(frame);
@@ -46,13 +46,13 @@ RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
m_fcombo = new KFontCombo(m_toolbar);
m_toolbar->insertWidget(TBFont, 40, m_fcombo);
- connect(m_fcombo, SIGNAL(textChanged(const QString&)), this, SLOT(changeFont(const QString &)));
+ connect(m_fcombo, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changeFont(const TQString &)));
m_toolbar->insertSeparator();
m_colCombo = new KColorCombo(m_toolbar);
m_toolbar->insertWidget(TBColor, 30, m_colCombo);
- connect(m_colCombo, SIGNAL(activated(const QColor&)), this, SLOT(changeColor(const QColor&)));
+ connect(m_colCombo, TQT_SIGNAL(activated(const TQColor&)), this, TQT_SLOT(changeColor(const TQColor&)));
m_toolbar->insertButton("text_bold", TBBold, true, i18n("Bold"));
m_toolbar->insertButton("text_italic", TBItalic, true, i18n("Italic"));
@@ -82,36 +82,36 @@ RichTextDialog::RichTextDialog(QWidget *parent, const QString &text)
m_toolbar->setToggle(TBJustify, true);
group->addButton(TBJustify);
- connect(m_toolbar, SIGNAL(toggled(int)), this, SLOT(buttonToggled(int)));
+ connect(m_toolbar, TQT_SIGNAL(toggled(int)), this, TQT_SLOT(buttonToggled(int)));
- m_edit = new KTextEdit(text, QString::null, frame, "richtext_edit");
+ m_edit = new KTextEdit(text, TQString(), frame, "richtext_edit");
m_edit->setTextFormat(RichText);
m_edit->setFocus();
- connect(m_edit, SIGNAL(cursorPositionChanged(int, int)), this, SLOT(cursorPositionChanged(int, int)));
- connect(m_edit, SIGNAL(clicked(int, int)), this, SLOT(cursorPositionChanged(int, int)));
- connect(m_edit, SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), this, SLOT(slotVerticalAlignmentChanged(VerticalAlignment)));
+ connect(m_edit, TQT_SIGNAL(cursorPositionChanged(int, int)), this, TQT_SLOT(cursorPositionChanged(int, int)));
+ connect(m_edit, TQT_SIGNAL(clicked(int, int)), this, TQT_SLOT(cursorPositionChanged(int, int)));
+ connect(m_edit, TQT_SIGNAL(currentVerticalAlignmentChanged(VerticalAlignment)), this, TQT_SLOT(slotVerticalAlignmentChanged(VerticalAlignment)));
- m_edit->moveCursor(QTextEdit::MoveEnd, false);
+ m_edit->moveCursor(TQTextEdit::MoveEnd, false);
cursorPositionChanged(0, 0);
m_edit->show();
frame->show();
}
-QString
+TQString
RichTextDialog::text()
{
return m_edit->text();
}
void
-RichTextDialog::changeFont(const QString &font)
+RichTextDialog::changeFont(const TQString &font)
{
m_edit->setFamily(font);
}
void
-RichTextDialog::changeColor(const QColor &color)
+RichTextDialog::changeColor(const TQColor &color)
{
m_edit->setColor(color);
}
@@ -130,14 +130,14 @@ RichTextDialog::buttonToggled(int id)
{
if(isOn && m_toolbar->isButtonOn(TBSub))
m_toolbar->setButton(TBSub, false);
- m_edit->setVerticalAlignment(isOn ? QTextEdit::AlignSuperScript : QTextEdit::AlignNormal);
+ m_edit->setVerticalAlignment(isOn ? TQTextEdit::AlignSuperScript : TQTextEdit::AlignNormal);
break;
}
case TBSub:
{
if(isOn && m_toolbar->isButtonOn(TBSuper))
m_toolbar->setButton(TBSuper, false);
- m_edit->setVerticalAlignment(isOn ? QTextEdit::AlignSubScript : QTextEdit::AlignNormal);
+ m_edit->setVerticalAlignment(isOn ? TQTextEdit::AlignSubScript : TQTextEdit::AlignNormal);
break;
}
case TBLeft: case TBCenter:
@@ -146,10 +146,10 @@ RichTextDialog::buttonToggled(int id)
if(!isOn) break;
switch(id)
{
- case TBLeft: m_edit->setAlignment(Qt::AlignLeft); break;
- case TBCenter: m_edit->setAlignment(Qt::AlignCenter); break;
- case TBRight: m_edit->setAlignment(Qt::AlignRight); break;
- case TBJustify: m_edit->setAlignment(Qt::AlignJustify); break;
+ case TBLeft: m_edit->tqsetAlignment(TQt::AlignLeft); break;
+ case TBCenter: m_edit->tqsetAlignment(TQt::AlignCenter); break;
+ case TBRight: m_edit->tqsetAlignment(TQt::AlignRight); break;
+ case TBJustify: m_edit->tqsetAlignment(TQt::AlignJustify); break;
default: break;
}
}
@@ -168,12 +168,12 @@ RichTextDialog::cursorPositionChanged(int, int)
m_toolbar->setButton(TBUnder, m_edit->underline());
int id = 0;
- switch(m_edit->alignment())
+ switch(m_edit->tqalignment())
{
- case Qt::AlignLeft: id = TBLeft; break;
- case Qt::AlignCenter: id = TBCenter; break;
- case Qt::AlignRight: id = TBRight; break;
- case Qt::AlignJustify: id = TBJustify; break;
+ case TQt::AlignLeft: id = TBLeft; break;
+ case TQt::AlignCenter: id = TBCenter; break;
+ case TQt::AlignRight: id = TBRight; break;
+ case TQt::AlignJustify: id = TBJustify; break;
default: id = TBLeft; break;
}
m_toolbar->setButton(id, true);
@@ -184,13 +184,13 @@ RichTextDialog::slotVerticalAlignmentChanged(VerticalAlignment align)
{
switch(align)
{
- case QTextEdit::AlignSuperScript:
+ case TQTextEdit::AlignSuperScript:
{
m_toolbar->setButton(TBSuper, true);
m_toolbar->setButton(TBSub, false);
break;
}
- case QTextEdit::AlignSubScript:
+ case TQTextEdit::AlignSubScript:
{
m_toolbar->setButton(TBSub, true);
m_toolbar->setButton(TBSuper, false);
diff --git a/kexi/formeditor/richtextdialog.h b/kexi/formeditor/richtextdialog.h
index 83c964644..66a04e16c 100644
--- a/kexi/formeditor/richtextdialog.h
+++ b/kexi/formeditor/richtextdialog.h
@@ -30,22 +30,23 @@ class KColorCombo;
namespace KFormDesigner {
//! A simple dialog to edit rich text
-/*! It allows to change font name, style and color, alignment. */
+/*! It allows to change font name, style and color, tqalignment. */
class KFORMEDITOR_EXPORT RichTextDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- RichTextDialog(QWidget *parent, const QString &text);
+ RichTextDialog(TQWidget *tqparent, const TQString &text);
~RichTextDialog(){;}
- QString text();
+ TQString text();
- enum VerticalAlignment{AlignNormal = QTextEdit::AlignNormal, AlignSuperScript = QTextEdit::AlignSuperScript, AlignSubScript = QTextEdit::AlignSubScript};
+ enum VerticalAlignment{AlignNormal = TQTextEdit::AlignNormal, AlignSuperScript = TQTextEdit::AlignSuperScript, AlignSubScript = TQTextEdit::AlignSubScript};
public slots:
- void changeFont(const QString &);
- void changeColor(const QColor&);
+ void changeFont(const TQString &);
+ void changeColor(const TQColor&);
void buttonToggled(int);
void cursorPositionChanged(int, int);
void slotVerticalAlignmentChanged(VerticalAlignment align);
diff --git a/kexi/formeditor/scripting/formscript.cpp b/kexi/formeditor/scripting/formscript.cpp
index b598066e2..1123e0934 100644
--- a/kexi/formeditor/scripting/formscript.cpp
+++ b/kexi/formeditor/scripting/formscript.cpp
@@ -32,7 +32,7 @@
using namespace KFormDesigner;
FormScript::FormScript(Form *form, ScriptManager *manager, const char *name)
- : QObject(manager, name), m_manager(manager), m_form(form)
+ : TQObject(manager, name), m_manager(manager), m_form(form)
{
m_script = manager->krossManager()->getScriptContainer(form->widget()->name());
}
@@ -41,37 +41,37 @@ FormScript::~FormScript()
{
}
-QString
-FormScript::getCode(const QString &)
+TQString
+FormScript::getCode(const TQString &)
{
/// \todo Allow to select only one function
return m_script->getCode();
}
void
-FormScript::setCode(const QString &code)
+FormScript::setCode(const TQString &code)
{
m_script->setCode(code);
}
void
-FormScript::appendCode(const QString &code)
+FormScript::appendCode(const TQString &code)
{
- QString s = m_script->getCode();
+ TQString s = m_script->getCode();
s.append("\n");
s.append(code);
m_script->setCode(s);
}
bool
-FormScript::execute(const QString &functionName)
+FormScript::execute(const TQString &functionName)
{
/// \todo support return value and arguments
try {
m_script->callFunction(functionName);
}
catch(Kross::Api::Exception& e) {
- kdDebug() << QString("EXCEPTION type='%1' description='%2'").arg(e.type()).arg(e.description()) << endl;
+ kdDebug() << TQString("EXCEPTION type='%1' description='%2'").tqarg(e.type()).tqarg(e.description()) << endl;
return false;
}
return true;
@@ -82,16 +82,16 @@ FormScript::connectEvents()
{
if(!m_form || !m_form->objectTree())
return;
- // first call addQObject for each widget in the Form
+ // first call addTQObject for each widget in the Form
ObjectTreeDict *dict = m_form->objectTree()->dict();
ObjectTreeDictIterator it(*dict);
for(; it.current(); ++it)
- m_script->addQObject(it.current()->widget());
- m_script->addQObject(m_form->widget());
+ m_script->addTQObject(it.current()->widget());
+ m_script->addTQObject(m_form->widget());
// Then we connect all signals
- QValueListConstIterator<Event*> endIt = m_list.constEnd();
- for(QValueListConstIterator<Event*> it = m_list.constBegin(); it != endIt; ++it) {
+ TQValueListConstIterator<Event*> endIt = m_list.constEnd();
+ for(TQValueListConstIterator<Event*> it = m_list.constBegin(); it != endIt; ++it) {
if( (*it)->type() == Event::Slot) {
connect((*it)->sender(), (*it)->signal(), (*it)->receiver(), (*it)->slot());
}
diff --git a/kexi/formeditor/scripting/formscript.h b/kexi/formeditor/scripting/formscript.h
index e3d63d74f..4247ca85a 100644
--- a/kexi/formeditor/scripting/formscript.h
+++ b/kexi/formeditor/scripting/formscript.h
@@ -22,8 +22,8 @@
#include "kexievents.h"
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <ksharedptr.h>
class ScriptManager;
@@ -41,9 +41,10 @@ namespace Kross {
using namespace KFormDesigner;
//! A class that stores the code and events related to a single form
-class FormScript : public QObject
+class FormScript : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
FormScript(Form *form, ScriptManager *manager, const char *name=0);
@@ -53,16 +54,16 @@ class FormScript : public QObject
Kross::Api::ScriptContainer* scriptContainer() { return m_script; }
/*! \return The code of funtionName. If parameter is empty, it returns the full code of this form.*/
- QString getCode(const QString &functionName=QString::null);
+ TQString getCode(const TQString &functionName=TQString());
/*! Replaces the actual form code with the string \a code.
Called eg by (future) script editor. */
- void setCode(const QString &code);
+ void setCode(const TQString &code);
/*! Adds the string \a code at the end of current code. Used to add a function in the script. */
- void appendCode(const QString &code);
+ void appendCode(const TQString &code);
/*! Executes the \a functionName.
\todo how do we give parameters? */
- bool execute(const QString &functionName);
+ bool execute(const TQString &functionName);
/*! Really connects all events in the list.
Also calls Kross;;Api::Manager::addObject for each widget in the form to allow the user to
use these widgets in the script. */
diff --git a/kexi/formeditor/scripting/scriptIO.cpp b/kexi/formeditor/scripting/scriptIO.cpp
index 8620a8aea..ee0b1f592 100644
--- a/kexi/formeditor/scripting/scriptIO.cpp
+++ b/kexi/formeditor/scripting/scriptIO.cpp
@@ -27,30 +27,30 @@
#include "main/scriptcontainer.h"
bool
-ScriptIO::saveFormEvents(QDomNode &parentNode, FormScript *formScript)
+ScriptIO::saveFormEvents(TQDomNode &tqparentNode, FormScript *formScript)
{
- QDomDocument domDoc = parentNode.ownerDocument();
+ TQDomDocument domDoc = tqparentNode.ownerDocument();
// Save the form's code
if(!formScript->getCode().isEmpty()) {
- QDomElement script = domDoc.createElement("script");
+ TQDomElement script = domDoc.createElement("script");
script.setAttribute("language", formScript->scriptContainer()->getInterpreterName());
- parentNode.appendChild(script);
- QDomText scriptCode = domDoc.createTextNode(formScript->getCode());
+ tqparentNode.appendChild(script);
+ TQDomText scriptCode = domDoc.createTextNode(formScript->getCode());
script.appendChild(scriptCode);
}
// Save all form events
if(!formScript->eventList()->isEmpty())
- saveEventList(formScript->eventList(), parentNode);
+ saveEventList(formScript->eventList(), tqparentNode);
return true;
}
bool
-ScriptIO::loadFormEvents(QDomNode &parentNode, Form *form, ScriptManager *manager)
+ScriptIO::loadFormEvents(TQDomNode &tqparentNode, Form *form, ScriptManager *manager)
{
- QDomElement script = parentNode.namedItem("script").toElement();
- QDomElement events = parentNode.namedItem("events").toElement();
+ TQDomElement script = tqparentNode.namedItem("script").toElement();
+ TQDomElement events = tqparentNode.namedItem("events").toElement();
// Load script code
FormScript *formScript = new FormScript(form, manager);
@@ -61,14 +61,14 @@ ScriptIO::loadFormEvents(QDomNode &parentNode, Form *form, ScriptManager *manage
// Load all events in the EventList
if(!events.isNull()) {
- for(QDomNode n = events.firstChild(); !n.isNull(); n = n.nextSibling())
+ for(TQDomNode n = events.firstChild(); !n.isNull(); n = n.nextSibling())
loadEvent(n, formScript->eventList(), form);
}
return true;
}
bool
-ScriptIO::saveAllEventsForWidget(QObject *widget, FormScript *formScript, QDomNode &node)
+ScriptIO::saveAllEventsForWidget(TQObject *widget, FormScript *formScript, TQDomNode &node)
{
EventList *l = formScript->eventList()->allEventsForObject(widget);
saveEventList(l, node);
@@ -76,54 +76,54 @@ ScriptIO::saveAllEventsForWidget(QObject *widget, FormScript *formScript, QDomNo
}
void
-ScriptIO::saveEvent(Event *event, QDomNode &parentNode)
+ScriptIO::saveEvent(Event *event, TQDomNode &tqparentNode)
{
if(!event)
return;
- QDomDocument domDoc = parentNode.ownerDocument();
- QDomElement eventNode = domDoc.createElement("event");
+ TQDomDocument domDoc = tqparentNode.ownerDocument();
+ TQDomElement eventNode = domDoc.createElement("event");
eventNode.setAttribute("type", event->type());
- parentNode.appendChild(eventNode);
+ tqparentNode.appendChild(eventNode);
switch(event->type()) {
case Event::Slot: {
- QDomElement sender = domDoc.createElement("sender");
+ TQDomElement sender = domDoc.createElement("sender");
eventNode.appendChild(sender);
- QDomText senderText = domDoc.createTextNode(event->sender() ? event->sender()->name() : "");
+ TQDomText senderText = domDoc.createTextNode(event->sender() ? event->sender()->name() : "");
sender.appendChild(senderText);
- QDomElement signal = domDoc.createElement("signal");
+ TQDomElement signal = domDoc.createElement("signal");
eventNode.appendChild(signal);
- QDomText signalText = domDoc.createTextNode(event->signal());
+ TQDomText signalText = domDoc.createTextNode(event->signal());
signal.appendChild(signalText);
- QDomElement receiver = domDoc.createElement("receiver");
+ TQDomElement receiver = domDoc.createElement("receiver");
eventNode.appendChild(receiver);
- QDomText receiverText = domDoc.createTextNode(event->receiver() ? event->receiver()->name() : "");
+ TQDomText receiverText = domDoc.createTextNode(event->receiver() ? event->receiver()->name() : "");
receiver.appendChild(receiverText);
- QDomElement slot = domDoc.createElement("slot");
+ TQDomElement slot = domDoc.createElement("slot");
eventNode.appendChild(slot);
- QDomText slotText = domDoc.createTextNode(event->slot());
+ TQDomText slotText = domDoc.createTextNode(event->slot());
slot.appendChild(slotText);
break;
}
case Event::UserFunction: {
- QDomElement sender = domDoc.createElement("sender");
+ TQDomElement sender = domDoc.createElement("sender");
eventNode.appendChild(sender);
- QDomText senderText = domDoc.createTextNode(event->sender() ? event->sender()->name() : "");
+ TQDomText senderText = domDoc.createTextNode(event->sender() ? event->sender()->name() : "");
sender.appendChild(senderText);
- QDomElement signal = domDoc.createElement("signal");
+ TQDomElement signal = domDoc.createElement("signal");
eventNode.appendChild(signal);
- QDomText signalText = domDoc.createTextNode(event->signal());
+ TQDomText signalText = domDoc.createTextNode(event->signal());
signal.appendChild(signalText);
- QDomElement function = domDoc.createElement("function");
+ TQDomElement function = domDoc.createElement("function");
eventNode.appendChild(function);
- QDomText functionText = domDoc.createTextNode(event->slot());
+ TQDomText functionText = domDoc.createTextNode(event->slot());
function.appendChild(functionText);
break;
}
@@ -138,22 +138,22 @@ ScriptIO::saveEvent(Event *event, QDomNode &parentNode)
}
void
-ScriptIO::saveEventList(EventList *list, QDomNode &parentNode)
+ScriptIO::saveEventList(EventList *list, TQDomNode &tqparentNode)
{
if(!list || list->isEmpty())
return;
- QDomDocument domDoc = parentNode.ownerDocument();
- QDomElement events = domDoc.createElement("events");
- parentNode.appendChild(events);
+ TQDomDocument domDoc = tqparentNode.ownerDocument();
+ TQDomElement events = domDoc.createElement("events");
+ tqparentNode.appendChild(events);
- QValueListConstIterator<Event*> endIt = list->constEnd();
- for(QValueListConstIterator<Event*> it = list->constBegin(); it != endIt; ++it)
+ TQValueListConstIterator<Event*> endIt = list->constEnd();
+ for(TQValueListConstIterator<Event*> it = list->constBegin(); it != endIt; ++it)
saveEvent((*it), events);
}
void
-ScriptIO::loadEvent(QDomNode &node, EventList *list, Form *form)
+ScriptIO::loadEvent(TQDomNode &node, EventList *list, Form *form)
{
int type = node.toElement().attribute("type").toInt();
Event *event = new Event();
diff --git a/kexi/formeditor/scripting/scriptIO.h b/kexi/formeditor/scripting/scriptIO.h
index 9fed06a65..319de0fdd 100644
--- a/kexi/formeditor/scripting/scriptIO.h
+++ b/kexi/formeditor/scripting/scriptIO.h
@@ -20,10 +20,10 @@
#ifndef SCRIPTIO_H
#define SCRIPTIO_H
-#include <qdom.h>
+#include <tqdom.h>
-class QString;
-class QObject;
+class TQString;
+class TQObject;
class Event;
class EventList;
class ScriptManager;
@@ -41,19 +41,19 @@ class ScriptIO
public:
/*! Save the evnts of a form.
Creates an \<events\> tag, and then one \<event\> tag for each event.
- Each event contains \<sender\> and \<receiver\> tags, with attributes depending on event type. */
- static bool saveFormEvents(QDomNode &parentNode, FormScript *script);
- /*! Reads the \<events\> tag (\a parentNode), then creates and fills a FormScript object linked to this \a form.
+ Each event tqcontains \<sender\> and \<receiver\> tags, with attributes depending on event type. */
+ static bool saveFormEvents(TQDomNode &tqparentNode, FormScript *script);
+ /*! Reads the \<events\> tag (\a tqparentNode), then creates and fills a FormScript object linked to this \a form.
The new FormScript object is then added to ScriptManager list.*/
- static bool loadFormEvents(QDomNode &parentNode, Form *form, ScriptManager *manager);
+ static bool loadFormEvents(TQDomNode &tqparentNode, Form *form, ScriptManager *manager);
/*! Save only the events related to widget \a name in the FormScript \a fscript.
Used eg when copying/pasting widgets to keep also events related to it.*/
- static bool saveAllEventsForWidget(QObject *widget, FormScript *fscript, QDomNode &node);
+ static bool saveAllEventsForWidget(TQObject *widget, FormScript *fscript, TQDomNode &node);
- static void saveEvent(Event *event, QDomNode &parentNode);
- static void saveEventList(EventList *list, QDomNode &parentNode);
- static void loadEvent(QDomNode &node, EventList *list, Form *form);
+ static void saveEvent(Event *event, TQDomNode &tqparentNode);
+ static void saveEventList(EventList *list, TQDomNode &tqparentNode);
+ static void loadEvent(TQDomNode &node, EventList *list, Form *form);
protected:
ScriptIO() {;}
diff --git a/kexi/formeditor/scripting/scriptmanager.cpp b/kexi/formeditor/scripting/scriptmanager.cpp
index c572c6858..cfc5df045 100644
--- a/kexi/formeditor/scripting/scriptmanager.cpp
+++ b/kexi/formeditor/scripting/scriptmanager.cpp
@@ -27,8 +27,8 @@
using KFormDesigner::Form;
-ScriptManager::ScriptManager(QObject *parent, const char *name)
- : QObject(parent, name)
+ScriptManager::ScriptManager(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
m_manager = Kross::Api::Manager::scriptManager();
m_dict.setAutoDelete(true);
@@ -56,8 +56,8 @@ void
ScriptManager::setFormManager(FormManager *manager)
{
m_formManager = manager;
- connect(m_formManager, SIGNAL(aboutToDeleteForm(KFormDesigner::Form*)), this, SLOT(slotFormDeleted(KFormDesigner::Form*)));
- connect(m_formManager, SIGNAL(formCreated(KFormDesigner::Form*)), this, SLOT(newFormScript(KFormDesigner::Form*)));
+ connect(m_formManager, TQT_SIGNAL(aboutToDeleteForm(KFormDesigner::Form*)), this, TQT_SLOT(slotFormDeleted(KFormDesigner::Form*)));
+ connect(m_formManager, TQT_SIGNAL(formCreated(KFormDesigner::Form*)), this, TQT_SLOT(newFormScript(KFormDesigner::Form*)));
}
void
diff --git a/kexi/formeditor/scripting/scriptmanager.h b/kexi/formeditor/scripting/scriptmanager.h
index 258ce2cc4..bc97ec3cf 100644
--- a/kexi/formeditor/scripting/scriptmanager.h
+++ b/kexi/formeditor/scripting/scriptmanager.h
@@ -20,8 +20,8 @@
#ifndef SCRIPTMANAGER_H
#define SCRIPTMANAGER_H
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
class FormScript;
@@ -38,12 +38,13 @@ namespace KFormDesigner {
using namespace KFormDesigner;
-class ScriptManager : public QObject
+class ScriptManager : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScriptManager(QObject *parent=0, const char *name=0);
+ ScriptManager(TQObject *tqparent=0, const char *name=0);
~ScriptManager();
/*! \return The FormScript object associated to this Form. */
@@ -62,7 +63,7 @@ class ScriptManager : public QObject
private:
Kross::Api::Manager *m_manager;
KFormDesigner::FormManager *m_formManager;
- QPtrDict<FormScript> m_dict;
+ TQPtrDict<FormScript> m_dict;
};
#endif
diff --git a/kexi/formeditor/spring.cpp b/kexi/formeditor/spring.cpp
index e09cc2d7c..4bea0294c 100644
--- a/kexi/formeditor/spring.cpp
+++ b/kexi/formeditor/spring.cpp
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qsizepolicy.h>
-#include <qpainter.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqsizepolicy.h>
+#include <tqpainter.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <kdebug.h>
@@ -33,54 +33,54 @@
#include "spring.h"
-Spring::Spring(QWidget *parent, const char *name)
- : QWidget(parent, name)
+Spring::Spring(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
{
m_edit = true;
- m_orient = Horizontal;
- setSizeType((SizeType)QSizePolicy::Expanding);
+ m_orient =Qt::Horizontal;
+ setSizeType((SizeType)TQSizePolicy::Expanding);
}
void
-Spring::setOrientation(Orientation orient)
+Spring::setOrientation(Qt::Orientation orient)
{
SizeType type = sizeType();
m_orient = orient;
setSizeType(type);
- repaint();
+ tqrepaint();
}
Spring::SizeType
Spring::sizeType() const
{
- if(m_orient == Vertical)
- return (SizeType)sizePolicy().verData();
+ if(m_orient ==Qt::Vertical)
+ return (SizeType)tqsizePolicy().verData();
else
- return (SizeType)sizePolicy().horData();
+ return (SizeType)tqsizePolicy().horData();
}
void
Spring::setSizeType(SizeType size)
{
- if(m_orient == Vertical)
- setSizePolicy(QSizePolicy::Minimum, (QSizePolicy::SizeType)size);
+ if(m_orient ==Qt::Vertical)
+ tqsetSizePolicy(TQSizePolicy::Minimum, (TQSizePolicy::SizeType)size);
else
- setSizePolicy( (QSizePolicy::SizeType)size, QSizePolicy::Minimum);
+ tqsetSizePolicy( (TQSizePolicy::SizeType)size, TQSizePolicy::Minimum);
}
void
-Spring::paintEvent(QPaintEvent *ev)
+Spring::paintEvent(TQPaintEvent *ev)
{
if(!m_edit)
return;
- QPainter p(this);
+ TQPainter p(this);
if(!ev->erased())
p.eraseRect(0,0,width(), height());
- p.setPen(QPen(Qt::white, 1));
- p.setRasterOp(Qt::XorROP);
- QPointArray pa(4);
- if(m_orient == Vertical) {
+ p.setPen(TQPen(TQt::white, 1));
+ p.setRasterOp(TQt::XorROP);
+ TQPointArray pa(4);
+ if(m_orient ==Qt::Vertical) {
uint part = (height()+16) / 16;
if (part<3)
part=3;
@@ -113,7 +113,7 @@ Spring::paintEvent(QPaintEvent *ev)
}
bool
-Spring::isPropertyVisible(const QCString &name)
+Spring::isPropertyVisible(const TQCString &name)
{
if((name == "name") || (name == "sizeType") || (name == "orientation") || (name == "geometry"))
return true;
@@ -123,10 +123,10 @@ Spring::isPropertyVisible(const QCString &name)
void
-Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, QDomElement &parentNode, QDomDocument &domDoc, bool insideGridLayout)
+Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &tqparentNode, TQDomDocument &domDoc, bool insideGridLayout)
{
- QDomElement tclass = domDoc.createElement("spacer");
- parentNode.appendChild(tclass);
+ TQDomElement tclass = domDoc.createElement("spacer");
+ tqparentNode.appendChild(tclass);
if(insideGridLayout)
{
@@ -141,13 +141,13 @@ Spring::saveSpring(KFormDesigner::ObjectTreeItem *item, QDomElement &parentNode,
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "name", item->widget()->property("name"), item->widget());
- if(parentNode.tagName() == "widget")
+ if(tqparentNode.tagName() == "widget")
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "geometry", item->widget()->property("geometry"), item->widget());
- if(!item->widget()->sizeHint().isValid())
- KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("size"), item->widget());
+ if(!item->widget()->tqsizeHint().isValid())
+ KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("size"), item->widget());
else
- KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeHint", item->widget()->property("sizeHint"), item->widget());
+ KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "tqsizeHint", item->widget()->property("tqsizeHint"), item->widget());
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "orientation", item->widget()->property("orientation"), item->widget());
KFormDesigner::FormIO::savePropertyValue(tclass, domDoc, "sizeType", item->widget()->property("sizeType"), item->widget());
diff --git a/kexi/formeditor/spring.h b/kexi/formeditor/spring.h
index 7ca3d35f4..b75249d92 100644
--- a/kexi/formeditor/spring.h
+++ b/kexi/formeditor/spring.h
@@ -20,10 +20,10 @@
#ifndef SPACER_H
#define SPACER_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
namespace KFormDesigner {
@@ -33,12 +33,13 @@ class WidgetLibrary;
}
-class KFORMEDITOR_EXPORT Spring : public QWidget
+class KFORMEDITOR_EXPORT Spring : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS(SizeType)
- Q_PROPERTY(Orientation orientation READ orientation WRITE setOrientation)
- Q_PROPERTY(SizeType sizeType READ sizeType WRITE setSizeType)
+ TQ_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation)
+ TQ_PROPERTY(SizeType sizeType READ sizeType WRITE setSizeType)
private:
enum {HSize = 6, HMask = 0x3f, VMask = HMask << HSize, MayGrow = 1, ExpMask = 2, MayShrink = 4 };
@@ -47,24 +48,24 @@ class KFORMEDITOR_EXPORT Spring : public QWidget
Expanding = MinimumExpanding|MayShrink };
public:
- Spring(QWidget *parent, const char *name);
+ Spring(TQWidget *tqparent, const char *name);
~Spring() {;}
- static bool isPropertyVisible(const QCString &name);
- static void saveSpring(KFormDesigner::ObjectTreeItem *item, QDomElement &parent, QDomDocument &domDoc, bool insideGridLayout);
+ static bool isPropertyVisible(const TQCString &name);
+ static void saveSpring(KFormDesigner::ObjectTreeItem *item, TQDomElement &tqparent, TQDomDocument &domDoc, bool insideGridLayout);
- void setOrientation(Orientation orient);
- Orientation orientation() const { return m_orient;}
+ void setOrientation(Qt::Orientation orient);
+ Qt::Orientation orientation() const { return m_orient;}
void setSizeType(SizeType size);
SizeType sizeType() const;
void setPreviewMode() { m_edit = false; }
private:
- void paintEvent(QPaintEvent *ev);
+ void paintEvent(TQPaintEvent *ev);
private:
- Orientation m_orient;
+ Qt::Orientation m_orient;
bool m_edit;
};
diff --git a/kexi/formeditor/tabstopdialog.cpp b/kexi/formeditor/tabstopdialog.cpp
index 067c333a0..6de89b717 100644
--- a/kexi/formeditor/tabstopdialog.cpp
+++ b/kexi/formeditor/tabstopdialog.cpp
@@ -17,9 +17,9 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -37,11 +37,11 @@ using namespace KFormDesigner;
////////// The Tab Stop Dialog to edit tab order ///////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
-TabStopDialog::TabStopDialog(QWidget *parent)
-: KDialogBase(parent, "tabstop_dialog", true, i18n("Edit Tab Order"), Ok|Cancel, Ok, false)
+TabStopDialog::TabStopDialog(TQWidget *tqparent)
+: KDialogBase(tqparent, "tabstop_dialog", true, i18n("Edit Tab Order"), Ok|Cancel, Ok, false)
{
- QFrame *frame = makeMainWidget();
- QGridLayout *l = new QGridLayout(frame, 2, 2, 0, 6);
+ TQFrame *frame = makeMainWidget();
+ TQGridLayout *l = new TQGridLayout(frame, 2, 2, 0, 6);
m_treeview = new ObjectTreeView(frame, "tabstops_treeview", true);
m_treeview->setItemsMovable(true);
m_treeview->setDragEnabled(true);
@@ -51,28 +51,28 @@ TabStopDialog::TabStopDialog(QWidget *parent)
l->addWidget(m_treeview, 0, 0);
m_treeview->m_form = 0;
- connect(m_treeview, SIGNAL(currentChanged(QListViewItem*)), this, SLOT(updateButtons(QListViewItem*)));
- connect(m_treeview, SIGNAL(moved(QListViewItem*, QListViewItem*, QListViewItem*)), this, SLOT(updateButtons(QListViewItem*)));
+ connect(m_treeview, TQT_SIGNAL(currentChanged(TQListViewItem*)), this, TQT_SLOT(updateButtons(TQListViewItem*)));
+ connect(m_treeview, TQT_SIGNAL(moved(TQListViewItem*, TQListViewItem*, TQListViewItem*)), this, TQT_SLOT(updateButtons(TQListViewItem*)));
- QVBoxLayout *vbox = new QVBoxLayout();
+ TQVBoxLayout *vbox = new TQVBoxLayout();
l->addLayout(vbox, 0, 1);
m_btnUp = new KPushButton(SmallIconSet("1uparrow"), i18n("Move Up"), frame);
- QToolTip::add( m_btnUp, i18n("Move widget up") );
+ TQToolTip::add( m_btnUp, i18n("Move widget up") );
vbox->addWidget(m_btnUp);
- connect(m_btnUp, SIGNAL(clicked()), this, SLOT(moveItemUp()));
+ connect(m_btnUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveItemUp()));
m_btnDown = new KPushButton(SmallIconSet("1downarrow"), i18n("Move Down"), frame);
- QToolTip::add( m_btnDown, i18n("Move widget down") );
+ TQToolTip::add( m_btnDown, i18n("Move widget down") );
vbox->addWidget(m_btnDown);
- connect(m_btnDown, SIGNAL(clicked()), this, SLOT(moveItemDown()));
+ connect(m_btnDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveItemDown()));
vbox->addStretch();
- m_check = new QCheckBox(i18n("Handle tab order automatically"), frame, "tabstops_check");
- connect(m_check, SIGNAL(toggled(bool)), this, SLOT(slotRadioClicked(bool)));
+ m_check = new TQCheckBox(i18n("Handle tab order automatically"), frame, "tabstops_check");
+ connect(m_check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotRadioClicked(bool)));
l->addMultiCellWidget(m_check, 1, 1, 0, 1);
updateGeometry();
- setInitialSize(QSize(500+m_btnUp->width(), QMAX(400,m_treeview->height())));
+ setInitialSize(TQSize(500+m_btnUp->width(), TQMAX(400,m_treeview->height())));
}
TabStopDialog::~TabStopDialog()
@@ -99,15 +99,15 @@ int TabStopDialog::exec(Form *form)
m_treeview->setSelected(m_treeview->firstChild(), true);
}
- if (QDialog::Rejected == KDialogBase::exec())
- return QDialog::Rejected;
+ if (TQDialog::Rejected == KDialogBase::exec())
+ return TQDialog::Rejected;
//accepted
form->setAutoTabStops(m_check->isChecked());
if(form->autoTabStops())
{
form->autoAssignTabStops();
- return QDialog::Accepted;
+ return TQDialog::Accepted;
}
//add items to the order list
@@ -120,7 +120,7 @@ int TabStopDialog::exec(Form *form)
form->tabStops()->append(tree);
item = (ObjectTreeViewItem*)item->nextSibling();
}
- return QDialog::Accepted;
+ return TQDialog::Accepted;
}
void
@@ -128,7 +128,7 @@ TabStopDialog::moveItemUp()
{
if (!m_treeview->selectedItem())
return;
- QListViewItem *before = m_treeview->selectedItem()->itemAbove();
+ TQListViewItem *before = m_treeview->selectedItem()->itemAbove();
before->moveItem(m_treeview->selectedItem());
updateButtons(m_treeview->selectedItem());
}
@@ -136,7 +136,7 @@ TabStopDialog::moveItemUp()
void
TabStopDialog::moveItemDown()
{
- QListViewItem *item = m_treeview->selectedItem();
+ TQListViewItem *item = m_treeview->selectedItem();
if (!item)
return;
item->moveItem( item->nextSibling());
@@ -144,10 +144,10 @@ TabStopDialog::moveItemDown()
}
void
-TabStopDialog::updateButtons(QListViewItem *item)
+TabStopDialog::updateButtons(TQListViewItem *item)
{
m_btnUp->setEnabled( item && (item->itemAbove() && m_treeview->isEnabled()
- /*&& (item->itemAbove()->parent() == item->parent()))*/ ));
+ /*&& (item->itemAbove()->tqparent() == item->tqparent()))*/ ));
m_btnDown->setEnabled( item && item->nextSibling() && m_treeview->isEnabled() );
}
diff --git a/kexi/formeditor/tabstopdialog.h b/kexi/formeditor/tabstopdialog.h
index 9ae6a88ae..52b919be6 100644
--- a/kexi/formeditor/tabstopdialog.h
+++ b/kexi/formeditor/tabstopdialog.h
@@ -22,9 +22,9 @@
#include <kdialogbase.h>
-class QListViewItem;
-class QCheckBox;
-class QToolButton;
+class TQListViewItem;
+class TQCheckBox;
+class TQToolButton;
class KPushButton;
namespace KFormDesigner {
@@ -38,16 +38,17 @@ class ObjectTreeView;
class KFORMEDITOR_EXPORT TabStopDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TabStopDialog(QWidget *parent);
+ TabStopDialog(TQWidget *tqparent);
virtual ~TabStopDialog();
public slots:
int exec(KFormDesigner::Form *form);
void moveItemUp();
void moveItemDown();
- void updateButtons(QListViewItem*);
+ void updateButtons(TQListViewItem*);
void slotRadioClicked(bool isOn);
bool autoTabStops() const;
@@ -55,7 +56,7 @@ class KFORMEDITOR_EXPORT TabStopDialog : public KDialogBase
protected:
ObjectTreeView *m_treeview;
KPushButton *m_btnUp, *m_btnDown;
- QCheckBox *m_check;
+ TQCheckBox *m_check;
};
}
diff --git a/kexi/formeditor/test/kfd_mainwindow.cpp b/kexi/formeditor/test/kfd_mainwindow.cpp
index e9d52e47a..ab1592e1b 100644
--- a/kexi/formeditor/test/kfd_mainwindow.cpp
+++ b/kexi/formeditor/test/kfd_mainwindow.cpp
@@ -38,7 +38,7 @@ KFDMainWindow::KFDMainWindow()
KLibFactory *factory = KLibLoader::self()->factory("libkformdesigner_part");
if (factory)
{
- QStringList list;
+ TQStringList list;
list << "shell" << "multipleMode";
m_part = static_cast<KParts::ReadWritePart *>( factory->create(this, "kformdesigner_part", "KParts::ReadWritePart", list) );
@@ -59,7 +59,7 @@ KFDMainWindow::KFDMainWindow()
}
void
-KFDMainWindow::loadUIFile(const QString &filename)
+KFDMainWindow::loadUIFile(const TQString &filename)
{
loadUIFile(KURL::fromPathOrURL(filename));
}
@@ -73,7 +73,7 @@ KFDMainWindow::loadUIFile(const KURL &url)
void
KFDMainWindow::setupActions()
{
- KStdAction::quit(kapp, SLOT(quit()), actionCollection());
+ KStdAction::quit(kapp, TQT_SLOT(quit()), actionCollection());
}
bool
diff --git a/kexi/formeditor/test/kfd_mainwindow.h b/kexi/formeditor/test/kfd_mainwindow.h
index 03892a1ed..6368c8f20 100644
--- a/kexi/formeditor/test/kfd_mainwindow.h
+++ b/kexi/formeditor/test/kfd_mainwindow.h
@@ -25,13 +25,14 @@
class KFDMainWindow : public KParts::MainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KFDMainWindow();
~KFDMainWindow() {;}
/** @todo change it to bool */
- void loadUIFile(const QString &filename);
+ void loadUIFile(const TQString &filename);
/** @todo change it to bool */
void loadUIFile(const KURL &url);
virtual bool queryClose();
diff --git a/kexi/formeditor/test/kfd_part.cpp b/kexi/formeditor/test/kfd_part.cpp
index 48832be8f..bc4815940 100644
--- a/kexi/formeditor/test/kfd_part.cpp
+++ b/kexi/formeditor/test/kfd_part.cpp
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qworkspace.h>
-#include <qdockarea.h>
-#include <qdockwindow.h>
-#include <qhbox.h>
-#include <qpainter.h>
-#include <qevent.h>
-#include <qobjectlist.h>
+#include <tqworkspace.h>
+#include <tqdockarea.h>
+#include <tqdockwindow.h>
+#include <tqhbox.h>
+#include <tqpainter.h>
+#include <tqevent.h>
+#include <tqobjectlist.h>
#include <kdeversion.h>
#include <kaction.h>
@@ -98,11 +98,11 @@ KFDFactory::~KFDFactory()
}
KParts::Part*
-KFDFactory::createPartObject( QWidget *parentWidget, const char *, QObject *, const char *name,
- const char *classname, const QStringList &args)
+KFDFactory::createPartObject( TQWidget *tqparentWidget, const char *, TQObject *, const char *name,
+ const char *classname, const TQStringList &args)
{
bool readOnly = (classname == "KParts::ReadOnlyPart");
- KFormDesignerPart *part = new KFormDesignerPart(parentWidget, name, readOnly, args);
+ KFormDesignerPart *part = new KFormDesignerPart(tqparentWidget, name, readOnly, args);
return part;
}
@@ -123,8 +123,8 @@ KFDFactory::aboutData()
KFormDesigner::WidgetLibrary* KFormDesignerPart::static_formsLibrary = 0L;
-KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool readOnly, const QStringList &args)
-: KParts::ReadWritePart(parent, name), m_count(0)
+KFormDesignerPart::KFormDesignerPart(TQWidget *tqparent, const char *name, bool readOnly, const TQStringList &args)
+: KParts::ReadWritePart(tqparent, name), m_count(0)
{
setInstance(KFDFactory::instance());
instance()->iconLoader()->addAppDir("kexi");
@@ -138,28 +138,28 @@ KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool rea
setUniqueFormMode(false);
m_inShell = (!args.grep("shell").isEmpty());
- QHBox *container = new QHBox(parent, "kfd_container_widget");
+ TQHBox *container = new TQHBox(tqparent, "kfd_container_widget");
- m_workspace = new QWorkspace(container, "kfd_workspace");
+ m_workspace = new TQWorkspace(container, "kfd_workspace");
m_workspace->show();
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
/* @todo add configuration for supported factory groups */
static_formsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
new KFDPart_FormManager(this, 0, "kfd_manager"), supportedFactoryGroups );
if(!readOnly)
{
- QDockArea *dockArea = new QDockArea(Vertical, QDockArea::Reverse, container, "kfd_part_dockarea");
+ TQDockArea *dockArea = new TQDockAreaQt::Vertical, TQDockArea::Reverse, container, "kfd_part_dockarea");
- QDockWindow *dockTree = new QDockWindow(dockArea);
+ TQDockWindow *dockTree = new TQDockWindow(dockArea);
KFormDesigner::ObjectTreeView *view = new KFormDesigner::ObjectTreeView(dockTree);
dockTree->setWidget(view);
dockTree->setCaption(i18n("Objects"));
dockTree->setResizeEnabled(true);
dockTree->setFixedExtentWidth(256);
- QDockWindow *dockEditor = new QDockWindow(dockArea);
+ TQDockWindow *dockEditor = new TQDockWindow(dockArea);
m_editor = new KoProperty::Editor(dockEditor);
dockEditor->setWidget(m_editor);
dockEditor->setCaption(i18n("Properties"));
@@ -172,19 +172,19 @@ KFormDesignerPart::KFormDesignerPart(QWidget *parent, const char *name, bool rea
setModified(false);
// action stuff
-// connect(m_manager, SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
-// connect(m_manager, SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
-// connect(m_manager, SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
- connect(KFormDesigner::FormManager::self(), SIGNAL(undoEnabled(bool, const QString&)), SLOT(setUndoEnabled(bool, const QString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(redoEnabled(bool, const QString&)), SLOT(setRedoEnabled(bool, const QString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form*, bool)), this, SLOT(slotFormModified(KFormDesigner::Form*, bool)));
+// connect(m_manager, TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
+// connect(m_manager, TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
+// connect(m_manager, TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), TQT_SLOT(setUndoEnabled(bool, const TQString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), TQT_SLOT(setRedoEnabled(bool, const TQString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form*, bool)), this, TQT_SLOT(slotFormModified(KFormDesigner::Form*, bool)));
}
container->show();
setWidget(container);
- connect(m_workspace, SIGNAL(windowActivated(QWidget*)), KFormDesigner::FormManager::self(), SLOT(windowChanged(QWidget*)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const QCString&)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const QCString&)));
+ connect(m_workspace, TQT_SIGNAL(windowActivated(TQWidget*)), KFormDesigner::FormManager::self(), TQT_SLOT(windowChanged(TQWidget*)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const TQCString&)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const TQCString&)));
// slotNoFormSelected();
KFormDesigner::FormManager::self()->emitNoFormSelected();
@@ -202,58 +202,58 @@ KFormDesigner::WidgetLibrary* KFormDesignerPart::formsLibrary()
void
KFormDesignerPart::setupActions()
{
- KStdAction::open(this, SLOT(open()), actionCollection());
- KStdAction::openNew(this, SLOT(createBlankForm()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
- KStdAction::saveAs(this, SLOT(saveAs()), actionCollection());
- KStdAction::cut(KFormDesigner::FormManager::self(), SLOT(cutWidget()), actionCollection());
- KStdAction::copy(KFormDesigner::FormManager::self(), SLOT(copyWidget()), actionCollection());
- KStdAction::paste(KFormDesigner::FormManager::self(), SLOT(pasteWidget()), actionCollection());
- KStdAction::undo(KFormDesigner::FormManager::self(), SLOT(undo()), actionCollection());
- KStdAction::redo(KFormDesigner::FormManager::self(), SLOT(redo()), actionCollection());
- KStdAction::selectAll(KFormDesigner::FormManager::self(), SLOT(selectAll()), actionCollection());
- new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()), actionCollection(), "clear_contents");
- new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(deleteWidget()), actionCollection(), "edit_delete");
- new KAction(i18n("Preview Form"), "filequickprint", CTRL+Key_T, this, SLOT(slotPreviewForm()), actionCollection(), "preview_form");
- new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editTabOrder()), actionCollection(), "taborder");
- new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection");
- new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editConnections()), actionCollection(), "form_connections");
-
- KActionMenu *layoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "layout_menu");
- layoutMenu->insert(new KAction(i18n("&Horizontally"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHBox()), actionCollection(), "layout_hbox"));
- layoutMenu->insert(new KAction(i18n("&Vertically"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVBox()), actionCollection(), "layout_vbox"));
- layoutMenu->insert(new KAction(i18n("In &Grid"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutGrid()), actionCollection(), "layout_grid"));
- layoutMenu->insert(new KAction(i18n("By &Rows"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHFlow()), actionCollection(), "layout_hflow"));
- layoutMenu->insert(new KAction(i18n("By &Columns"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVFlow()), actionCollection(), "layout_vflow"));
- layoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter"));
- layoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter"));
- new KAction(i18n("&Ungroup Widgets"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(breakLayout()), actionCollection(), "break_layout");
+ KStdAction::open(this, TQT_SLOT(open()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(createBlankForm()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection());
+ KStdAction::cut(KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()), actionCollection());
+ KStdAction::copy(KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()), actionCollection());
+ KStdAction::paste(KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()), actionCollection());
+ KStdAction::undo(KFormDesigner::FormManager::self(), TQT_SLOT(undo()), actionCollection());
+ KStdAction::redo(KFormDesigner::FormManager::self(), TQT_SLOT(redo()), actionCollection());
+ KStdAction::selectAll(KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()), actionCollection());
+ new KAction(i18n("Clear Widget Contents"), "editclear", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()), actionCollection(), "clear_contents");
+ new KAction(i18n("Delete Widget"), "editdelete", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()), actionCollection(), "edit_delete");
+ new KAction(i18n("Preview Form"), "filequickprint", CTRL+Key_T, this, TQT_SLOT(slotPreviewForm()), actionCollection(), "preview_form");
+ new KAction(i18n("Edit Tab Order"), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()), actionCollection(), "taborder");
+ new KAction(i18n("Edit Pixmap Collection"), "icons", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editFormPixmapCollection()), actionCollection(), "pixmap_collection");
+ new KAction(i18n("Edit Form Connections"), "connections", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editConnections()), actionCollection(), "form_connections");
+
+ KActionMenu *tqlayoutMenu = new KActionMenu(i18n("Group Widgets"), "", actionCollection(), "tqlayout_menu");
+ tqlayoutMenu->insert(new KAction(i18n("&Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox"));
+ tqlayoutMenu->insert(new KAction(i18n("&Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox"));
+ tqlayoutMenu->insert(new KAction(i18n("In &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid"));
+ tqlayoutMenu->insert(new KAction(i18n("By &Rows"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHFlow()), actionCollection(), "tqlayout_hflow"));
+ tqlayoutMenu->insert(new KAction(i18n("By &Columns"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVFlow()), actionCollection(), "tqlayout_vflow"));
+ tqlayoutMenu->insert(new KAction(i18n("Horizontally in &Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter"));
+ tqlayoutMenu->insert(new KAction(i18n("Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter"));
+ new KAction(i18n("&Ungroup Widgets"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout");
/*
- new KAction(i18n("Lay Out Widgets &Horizontally"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHBox()), actionCollection(), "layout_hbox");
- new KAction(i18n("Lay Out Widgets &Vertically"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVBox()), actionCollection(), "layout_vbox");
- new KAction(i18n("Lay Out Widgets in &Grid"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutGrid()), actionCollection(), "layout_grid");
- new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()), actionCollection(), "layout_hsplitter");
- new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()), actionCollection(), "layout_vsplitter");
- new KAction(i18n("&Break Layout"), QString::null, KShortcut(0), KFormDesigner::FormManager::self(), SLOT(breakLayout()), actionCollection(), "break_layout");
+ new KAction(i18n("Lay Out Widgets &Horizontally"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()), actionCollection(), "tqlayout_hbox");
+ new KAction(i18n("Lay Out Widgets &Vertically"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()), actionCollection(), "tqlayout_vbox");
+ new KAction(i18n("Lay Out Widgets in &Grid"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()), actionCollection(), "tqlayout_grid");
+ new KAction(i18n("Lay Out Widgets H&orizontally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()), actionCollection(), "tqlayout_hsplitter");
+ new KAction(i18n("Lay Out Widgets Verti&cally in Splitter"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()), actionCollection(), "tqlayout_vsplitter");
+ new KAction(i18n("&Break Layout"), TQString(), KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()), actionCollection(), "break_layout");
*/
- new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()), actionCollection(), "format_raise");
- new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()), actionCollection(), "format_lower");
+ new KAction(i18n("Bring Widget to Front"), "raise", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()), actionCollection(), "format_raise");
+ new KAction(i18n("Send Widget to Back"), "lower", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()), actionCollection(), "format_lower");
KActionMenu *alignMenu = new KActionMenu(i18n("Align Widgets' Positions"), "aopos2grid", actionCollection(), "align_menu");
- alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") );
- alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") );
- alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") );
- alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") );
- alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") );
+ alignMenu->insert( new KAction(i18n("To Left"), "aoleft", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToLeft()), actionCollection(), "align_to_left") );
+ alignMenu->insert( new KAction(i18n("To Right"), "aoright", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()), actionCollection(), "align_to_right") );
+ alignMenu->insert( new KAction(i18n("To Top"), "aotop", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()), actionCollection(), "align_to_top") );
+ alignMenu->insert( new KAction(i18n("To Bottom"), "aobottom", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()), actionCollection(), "align_to_bottom") );
+ alignMenu->insert( new KAction(i18n("To Grid"), "aopos2grid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()), actionCollection(), "align_to_grid") );
KActionMenu *sizeMenu = new KActionMenu(i18n("Adjust Widgets' Sizes"), "aogrid", actionCollection(), "adjust_size_menu");
- sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") );
- sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") );
- sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") );
- sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") );
- sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") );
- sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") );
+ sizeMenu->insert( new KAction(i18n("To Fit"), "aofit", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()), actionCollection(), "adjust_to_fit") );
+ sizeMenu->insert( new KAction(i18n("To Grid"), "aogrid", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()), actionCollection(), "adjust_size_grid") );
+ sizeMenu->insert( new KAction(i18n("To Shortest"), "aoshortest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()), actionCollection(), "adjust_height_small") );
+ sizeMenu->insert( new KAction(i18n("To Tallest"), "aotallest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()), actionCollection(), "adjust_height_big") );
+ sizeMenu->insert( new KAction(i18n("To Narrowest"), "aonarrowest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()), actionCollection(), "adjust_width_small") );
+ sizeMenu->insert( new KAction(i18n("To Widest"), "aowidest", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()), actionCollection(), "adjust_width_big") );
if(m_inShell)
setXMLFile("kformdesigner_part_shell.rc");
@@ -277,7 +277,7 @@ KFormDesignerPart::createBlankForm()
&& KFormDesigner::FormManager::self()->activeForm()->filename().isNull())
return; // active form is already a blank one
- QString n = i18n("Form") + QString::number(++m_count);
+ TQString n = i18n("Form") + TQString::number(++m_count);
Form *form = new Form(formsLibrary(), n.latin1(),
false/*!designMode, we need to set it early enough*/);
FormWidgetBase *w = new FormWidgetBase(this, m_workspace, n.latin1());
@@ -296,7 +296,7 @@ void
KFormDesignerPart::open()
{
m_openingFile = true;
- KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"), m_workspace->topLevelWidget());
+ KURL url = KFileDialog::getOpenURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"), m_workspace->tqtopLevelWidget());
if(!url.isEmpty())
ReadWritePart::openURL(url);
m_openingFile = false;
@@ -331,8 +331,8 @@ KFormDesignerPart::saveFile()
void
KFormDesignerPart::saveAs()
{
- KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|Qt Designer UI Files"),
- m_workspace->topLevelWidget());
+ KURL url = KFileDialog::getSaveURL("::kformdesigner", i18n("*.ui|TQt Designer UI Files"),
+ m_workspace->tqtopLevelWidget());
if(url.isEmpty())
return;
else
@@ -342,9 +342,9 @@ KFormDesignerPart::saveAs()
bool
KFormDesignerPart::closeForm(Form *form)
{
- int res = KMessageBox::questionYesNoCancel( m_workspace->topLevelWidget(),
+ int res = KMessageBox::questionYesNoCancel( m_workspace->tqtopLevelWidget(),
i18n( "The form \"%1\" has been modified.\n"
- "Do you want to save your changes or discard them?" ).arg( form->objectTree()->name() ),
+ "Do you want to save your changes or discard them?" ).tqarg( form->objectTree()->name() ),
i18n( "Close Form" ), KStdGuiItem::save(), KStdGuiItem::discard() );
if(res == KMessageBox::Yes)
@@ -356,8 +356,8 @@ KFormDesignerPart::closeForm(Form *form)
bool
KFormDesignerPart::closeForms()
{
- QWidgetList list = m_workspace->windowList(QWorkspace::CreationOrder);
- for(QWidget *w = list.first(); w; w = list.next())
+ TQWidgetList list = m_workspace->windowList(TQWorkspace::CreationOrder);
+ for(TQWidget *w = list.first(); w; w = list.next())
if(w->close() == false)
return false;
@@ -423,7 +423,7 @@ KFormDesignerPart::slotWidgetSelected(Form *form, bool multiple)
ENABLE_ACTION("format_raise", true);
ENABLE_ACTION("format_lower", true);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
bool containerSelected = false;
if(!multiple)
{
@@ -433,15 +433,15 @@ KFormDesignerPart::slotWidgetSelected(Form *form, bool multiple)
}
const bool twoSelected = form->selectedWidgets()->count()==2;
// Layout actions
- ENABLE_ACTION("layout_menu", multiple || containerSelected);
- ENABLE_ACTION("layout_hbox", multiple || containerSelected);
- ENABLE_ACTION("layout_vbox", multiple || containerSelected);
- ENABLE_ACTION("layout_grid", multiple || containerSelected);
- ENABLE_ACTION("layout_hsplitter", twoSelected);
- ENABLE_ACTION("layout_vsplitter", twoSelected);
+ ENABLE_ACTION("tqlayout_menu", multiple || containerSelected);
+ ENABLE_ACTION("tqlayout_hbox", multiple || containerSelected);
+ ENABLE_ACTION("tqlayout_vbox", multiple || containerSelected);
+ ENABLE_ACTION("tqlayout_grid", multiple || containerSelected);
+ ENABLE_ACTION("tqlayout_hsplitter", twoSelected);
+ ENABLE_ACTION("tqlayout_vsplitter", twoSelected);
KFormDesigner::Container *container = KFormDesigner::FormManager::self()->activeForm()->activeContainer();
- ENABLE_ACTION("break_layout", (container->layoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("break_layout", (container->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -451,16 +451,16 @@ KFormDesignerPart::slotFormWidgetSelected(Form *form)
enableFormActions();
const bool twoSelected = form->selectedWidgets()->count()==2;
- const bool hasChildren = !form->objectTree()->children()->isEmpty();
+ const bool hasChildren = !form->objectTree()->tqchildren()->isEmpty();
// Layout actions
- ENABLE_ACTION("layout_menu", hasChildren);
- ENABLE_ACTION("layout_hbox", hasChildren);
- ENABLE_ACTION("layout_vbox", hasChildren);
- ENABLE_ACTION("layout_grid", hasChildren);
- ENABLE_ACTION("layout_hsplitter", twoSelected);
- ENABLE_ACTION("layout_vsplitter", twoSelected);
- ENABLE_ACTION("break_layout", (form->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ ENABLE_ACTION("tqlayout_menu", hasChildren);
+ ENABLE_ACTION("tqlayout_hbox", hasChildren);
+ ENABLE_ACTION("tqlayout_vbox", hasChildren);
+ ENABLE_ACTION("tqlayout_grid", hasChildren);
+ ENABLE_ACTION("tqlayout_hsplitter", twoSelected);
+ ENABLE_ACTION("tqlayout_vsplitter", twoSelected);
+ ENABLE_ACTION("break_layout", (form->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -523,18 +523,18 @@ KFormDesignerPart::disableWidgetActions()
ENABLE_ACTION("format_raise", false);
ENABLE_ACTION("format_lower", false);
- ENABLE_ACTION("layout_menu", false);
- ENABLE_ACTION("layout_hbox", false);
- ENABLE_ACTION("layout_vbox", false);
- ENABLE_ACTION("layout_grid", false);
- ENABLE_ACTION("layout_hsplitter", false);
- ENABLE_ACTION("layout_vsplitter", false);
+ ENABLE_ACTION("tqlayout_menu", false);
+ ENABLE_ACTION("tqlayout_hbox", false);
+ ENABLE_ACTION("tqlayout_vbox", false);
+ ENABLE_ACTION("tqlayout_grid", false);
+ ENABLE_ACTION("tqlayout_hsplitter", false);
+ ENABLE_ACTION("tqlayout_vsplitter", false);
ENABLE_ACTION("break_layout", false);
}
#endif
void
-KFormDesignerPart::setUndoEnabled(bool enabled, const QString &text)
+KFormDesignerPart::setUndoEnabled(bool enabled, const TQString &text)
{
KAction *undoAction = actionCollection()->action("edit_undo");
if(undoAction)
@@ -545,7 +545,7 @@ KFormDesignerPart::setUndoEnabled(bool enabled, const QString &text)
}
void
-KFormDesignerPart::setRedoEnabled(bool enabled, const QString &text)
+KFormDesignerPart::setRedoEnabled(bool enabled, const TQString &text)
{
KAction *redoAction = actionCollection()->action("edit_redo");
if(redoAction)
@@ -558,40 +558,40 @@ KFormDesignerPart::setRedoEnabled(bool enabled, const QString &text)
////// FormWidgetBase : helper widget to draw rects on top of widgets
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- w->repaint();
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ w->tqrepaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ static_cast<TQWidget*>(obj)->tqrepaint();
}
delete list;
}
void
-FormWidgetBase::drawRects(const QValueList<QRect> &list, int type)
+FormWidgetBase::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, QRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
+ p.drawPixmap( TQPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, TQRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
prev_rect = prev_rect.unite(*it);
}
@@ -602,9 +602,9 @@ FormWidgetBase::drawRects(const QValueList<QRect> &list, int type)
}
void
-FormWidgetBase::drawRect(const QRect& r, int type)
+FormWidgetBase::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
@@ -612,58 +612,58 @@ FormWidgetBase::drawRect(const QRect& r, int type)
void
FormWidgetBase::initBuffer()
{
- repaintAll(this);
+ tqrepaintAll(this);
buffer.resize( width(), height() );
- buffer = QPixmap::grabWindow( winId() );
- prev_rect = QRect();
+ buffer = TQPixmap::grabWindow( winId() );
+ prev_rect = TQRect();
}
void
FormWidgetBase::clearForm()
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), buffer, QRect(0,0,buffer.width(), buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), buffer, TQRect(0,0,buffer.width(), buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+FormWidgetBase::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x(), prev_rect.y()), buffer, QRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
+ p.drawPixmap( TQPoint(prev_rect.x(), prev_rect.y()), buffer, TQRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -680,7 +680,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- prev_rect = QRect(0, 0, buffer.width(), buffer.height());
+ prev_rect = TQRect(0, 0, buffer.width(), buffer.height());
else if(to)
{
prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -689,7 +689,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
@@ -697,7 +697,7 @@ FormWidgetBase::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
}
void
-FormWidgetBase::closeEvent(QCloseEvent *ev)
+FormWidgetBase::closeEvent(TQCloseEvent *ev)
{
Form *form = KFormDesigner::FormManager::self()->formForWidget(this);
if(!form || !form->isModified() || !form->objectTree()) // == preview form
@@ -713,7 +713,7 @@ FormWidgetBase::closeEvent(QCloseEvent *ev)
}
void KFormDesignerPart::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload,
- const QCString& propertyToSelect)
+ const TQCString& propertyToSelect)
{
if (m_editor) {
if (propertyToSelect.isEmpty() && forceReload)
diff --git a/kexi/formeditor/test/kfd_part.h b/kexi/formeditor/test/kfd_part.h
index 77b809cab..7ffb8705a 100644
--- a/kexi/formeditor/test/kfd_part.h
+++ b/kexi/formeditor/test/kfd_part.h
@@ -20,8 +20,8 @@
#ifndef KFORMDESIGNER_PART_H
#define KFORMDESIGNER_PART_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <kparts/part.h>
#include <kparts/factory.h>
@@ -30,21 +30,22 @@
class KAboutData;
class KInstance;
-class QWorkspace;
-class QCloseEvent;
+class TQWorkspace;
+class TQCloseEvent;
using KFormDesigner::Form;
class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory
{
Q_OBJECT
+ TQ_OBJECT
public:
KFDFactory();
virtual ~KFDFactory();
- virtual KParts::Part* createPartObject(QWidget *parentWidget=0, const char *widgetName=0, QObject *parent=0, const char *name=0,
- const char *classname="KParts::Part", const QStringList &args=QStringList());
+ virtual KParts::Part* createPartObject(TQWidget *tqparentWidget=0, const char *widgetName=0, TQObject *tqparent=0, const char *name=0,
+ const char *classname="KParts::Part", const TQStringList &args=TQStringList());
static KInstance *instance();
static KAboutData *aboutData();
@@ -56,9 +57,10 @@ class KFORMEDITOR_EXPORT KFDFactory : public KParts::Factory
class KFORMEDITOR_EXPORT KFormDesignerPart: public KParts::ReadWritePart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KFormDesignerPart(QWidget *parent, const char *name, bool readOnly=true, const QStringList &args=QStringList());
+ KFormDesignerPart(TQWidget *tqparent, const char *name, bool readOnly=true, const TQStringList &args=TQStringList());
virtual ~KFormDesignerPart();
static KFormDesigner::WidgetLibrary* formsLibrary();
@@ -81,19 +83,19 @@ class KFORMEDITOR_EXPORT KFormDesignerPart: public KParts::ReadWritePart
void slotPreviewForm();
void saveAs();
- //void slotCreateFormSlot(KFormDesigner::Form *form, const QString &widget, const QString &signal);
+ //void slotCreateFormSlot(KFormDesigner::Form *form, const TQString &widget, const TQString &signal);
protected slots:
void slotFormModified(KFormDesigner::Form *form, bool isDirty);
//moved to manager void slotWidgetSelected(KFormDesigner::Form *form, bool multiple);
//moved to manager void slotFormWidgetSelected(KFormDesigner::Form *form);
//moved to manager void slotNoFormSelected();
- void setUndoEnabled(bool enabled, const QString &text);
- void setRedoEnabled(bool enabled, const QString &text);
+ void setUndoEnabled(bool enabled, const TQString &text);
+ void setRedoEnabled(bool enabled, const TQString &text);
/*! Shows a property set \a set in a Property Editor. */
void slotPropertySetSwitched(KoProperty::Set *set, bool forceReload = false,
- const QCString& propertyToSelect = QCString());
+ const TQCString& propertyToSelect = TQCString());
protected:
virtual bool openFile();
@@ -105,8 +107,8 @@ class KFORMEDITOR_EXPORT KFormDesignerPart: public KParts::ReadWritePart
private:
static KFormDesigner::WidgetLibrary* static_formsLibrary;
// KFormDesigner::FormManager *m_manager;
- QWorkspace *m_workspace;
- QGuardedPtr<KoProperty::Editor> m_editor;
+ TQWorkspace *m_workspace;
+ TQGuardedPtr<KoProperty::Editor> m_editor;
int m_count;
bool m_uniqueFormMode;
bool m_openingFile;
@@ -114,27 +116,28 @@ class KFORMEDITOR_EXPORT KFormDesignerPart: public KParts::ReadWritePart
};
//! Helper: this widget is used to create form's surface
-class KFORMEDITOR_EXPORT FormWidgetBase : public QWidget, public KFormDesigner::FormWidget
+class KFORMEDITOR_EXPORT FormWidgetBase : public TQWidget, public KFormDesigner::FormWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- FormWidgetBase(KFormDesignerPart *part, QWidget *parent = 0, const char *name = 0, int WFlags = WDestructiveClose)
- : QWidget(parent, name, WFlags), m_part(part) {}
+ FormWidgetBase(KFormDesignerPart *part, TQWidget *tqparent = 0, const char *name = 0, int WFlags = WDestructiveClose)
+ : TQWidget(tqparent, name, WFlags), m_part(part) {}
~FormWidgetBase() {;}
- void drawRect(const QRect& r, int type);
- void drawRects(const QValueList<QRect> &list, int type);
+ void drawRect(const TQRect& r, int type);
+ void drawRects(const TQValueList<TQRect> &list, int type);
void initBuffer();
void clearForm();
- void highlightWidgets(QWidget *from, QWidget *to);//, const QPoint &p);
+ void highlightWidgets(TQWidget *from, TQWidget *to);//, const TQPoint &p);
protected:
- void closeEvent(QCloseEvent *ev);
+ void closeEvent(TQCloseEvent *ev);
private:
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
KFormDesignerPart *m_part;
};
diff --git a/kexi/formeditor/utils.cpp b/kexi/formeditor/utils.cpp
index 0c3acf59c..f80c2c27a 100644
--- a/kexi/formeditor/utils.cpp
+++ b/kexi/formeditor/utils.cpp
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
#include <kdebug.h>
#include <kexiutils/utils.h>
@@ -36,11 +36,11 @@ void
KFormDesigner::removeChildrenFromList(WidgetList &list)
{
for(WidgetListIterator it(list); it.current() != 0; ++it) {
- QWidget *w = it.current();
+ TQWidget *w = it.current();
// If any widget in the list is a child of this widget, we remove it from the list
for(WidgetListIterator it2(list); it2.current() != 0; ++it2) {
- QWidget *widg = it2.current();
+ TQWidget *widg = it2.current();
if((w != widg) && (w->child(widg->name())))
{
kdDebug() << "Removing the widget " << widg->name() << "which is a child of " << w->name() << endl;
@@ -51,76 +51,77 @@ KFormDesigner::removeChildrenFromList(WidgetList &list)
}
void
-KFormDesigner::installRecursiveEventFilter(QObject *object, QObject *container)
+KFormDesigner::installRecursiveEventFilter(TQObject *object, TQObject *container)
{
if(!object || !container|| !object->isWidgetType())
return;
kdDebug() << "Installing event filter on widget: " << object->name() << " directed to " << container->name() << endl;
object->installEventFilter(container);
- if(((QWidget*)object)->ownCursor())
- ((QWidget*)object)->setCursor(QCursor(Qt::ArrowCursor));
+ if(((TQWidget*)object)->ownCursor())
+ ((TQWidget*)object)->setCursor(TQCursor(TQt::ArrowCursor));
- if(!object->children())
+ TQObjectList list = object->childrenListObject();
+
+ if(list.isEmpty())
return;
- QObjectList list = *(object->children());
- for(QObject *obj = list.first(); obj; obj = list.next())
+ for(TQObject *obj = list.first(); obj; obj = list.next())
installRecursiveEventFilter(obj, container);
}
void
-KFormDesigner::removeRecursiveEventFilter(QObject *object, QObject *container)
+KFormDesigner::removeRecursiveEventFilter(TQObject *object, TQObject *container)
{
object->removeEventFilter(container);
if(!object->isWidgetType())
return;
- if(!object->children())
+ TQObjectList list = object->childrenListObject();
+ if(list.isEmpty())
return;
- QObjectList list = *(object->children());
- for(QObject *obj = list.first(); obj; obj = list.next())
+ for(TQObject *obj = list.first(); obj; obj = list.next())
removeRecursiveEventFilter(obj, container);
}
void
-KFormDesigner::setRecursiveCursor(QWidget *w, Form *form)
+KFormDesigner::setRecursiveCursor(TQWidget *w, Form *form)
{
ObjectTreeItem *tree = form->objectTree()->lookup(w->name());
- if(tree && ((tree->modifiedProperties()->contains("cursor")) || !tree->children()->isEmpty())
- && !w->inherits("QLineEdit") && !w->inherits("QTextEdit")
+ if(tree && ((tree->modifiedProperties()->tqcontains("cursor")) || !tree->tqchildren()->isEmpty())
+ && !w->inherits(TQLINEEDIT_OBJECT_NAME_STRING) && !w->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)
) //fix weird behaviour
return; // if the user has set a cursor for this widget or this is a container, don't change it
if(w->ownCursor())
- w->setCursor(Qt::ArrowCursor);
+ w->setCursor(TQt::ArrowCursor);
- QObjectList *l = w->queryList( "QWidget" );
- for(QObject *o = l->first(); o; o = l->next())
- ((QWidget*)o)->setCursor(Qt::ArrowCursor);
+ TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for(TQObject *o = l->first(); o; o = l->next())
+ ((TQWidget*)o)->setCursor(TQt::ArrowCursor);
delete l;
}
-QSize
-KFormDesigner::getSizeFromChildren(QWidget *w, const char *inheritClass)
+TQSize
+KFormDesigner::getSizeFromChildren(TQWidget *w, const char *inheritClass)
{
int tmpw = 0, tmph = 0;
- QObjectList *list = w->queryList(inheritClass, 0, false, false);
- for(QObject *o = list->first(); o; o = list->next()) {
- QRect r = ((QWidget*)o)->geometry();
- tmpw = QMAX(tmpw, r.right());
- tmph = QMAX(tmph, r.bottom());
+ TQObjectList *list = w->queryList(inheritClass, 0, false, false);
+ for(TQObject *o = list->first(); o; o = list->next()) {
+ TQRect r = ((TQWidget*)o)->tqgeometry();
+ tmpw = TQMAX(tmpw, r.right());
+ tmph = TQMAX(tmph, r.bottom());
}
delete list;
- return QSize(tmpw, tmph) + QSize(10, 10);
+ return TQSize(tmpw, tmph) + TQSize(10, 10);
}
// -----------------
-HorWidgetList::HorWidgetList(QWidget *topLevelWidget)
+HorWidgetList::HorWidgetList(TQWidget *tqtopLevelWidget)
: WidgetList()
- , m_topLevelWidget(topLevelWidget)
+ , m_tqtopLevelWidget(tqtopLevelWidget)
{
}
@@ -128,18 +129,18 @@ HorWidgetList::~HorWidgetList()
{
}
-int HorWidgetList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int HorWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
- QWidget *w1 = static_cast<QWidget*>(item1);
- QWidget *w2 = static_cast<QWidget*>(item2);
- return w1->mapTo(m_topLevelWidget, QPoint(0,0)).x() - w2->mapTo(m_topLevelWidget, QPoint(0,0)).x();
+ TQWidget *w1 = TQT_TQWIDGET(item1);
+ TQWidget *w2 = TQT_TQWIDGET(item2);
+ return w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).x() - w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).x();
}
// -----------------
-VerWidgetList::VerWidgetList(QWidget *topLevelWidget)
+VerWidgetList::VerWidgetList(TQWidget *tqtopLevelWidget)
: WidgetList()
- , m_topLevelWidget(topLevelWidget)
+ , m_tqtopLevelWidget(tqtopLevelWidget)
{
}
@@ -147,37 +148,37 @@ VerWidgetList::~VerWidgetList()
{
}
-int VerWidgetList::compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2)
+int VerWidgetList::compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2)
{
- QWidget *w1 = static_cast<QWidget*>(item1);
- QWidget *w2 = static_cast<QWidget*>(item2);
+ TQWidget *w1 = TQT_TQWIDGET(item1);
+ TQWidget *w2 = TQT_TQWIDGET(item2);
int y1, y2;
- QObject *page1 = 0;
+ TQObject *page1 = 0;
TabWidget *tw1 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w1, "KFormDesigner::TabWidget", page1);
if (tw1) // special case
- y1 = w1->mapTo(m_topLevelWidget, QPoint(0,0)).y() + tw1->tabBarHeight() -2 -2;
+ y1 = w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y() + tw1->tabBarHeight() -2 -2;
else
- y1 = w1->mapTo(m_topLevelWidget, QPoint(0,0)).y();
+ y1 = w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y();
- QObject *page2 = 0;
+ TQObject *page2 = 0;
TabWidget *tw2 = KFormDesigner::findParent<KFormDesigner::TabWidget>(w2, "KFormDesigner::TabWidget", page2);
if (tw1 && tw2 && tw1 == tw2 && page1 != page2) {
// this sorts widgets by tabs there're put in
- return tw1->indexOf(static_cast<QWidget*>(page1)) - tw2->indexOf(static_cast<QWidget*>(page2));
+ return tw1->indexOf(TQT_TQWIDGET(page1)) - tw2->indexOf(TQT_TQWIDGET(page2));
}
if (tw2) // special case
- y2 = w2->mapTo(m_topLevelWidget, QPoint(0,0)).y() + tw2->tabBarHeight() -2 -2;
+ y2 = w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y() + tw2->tabBarHeight() -2 -2;
else
- y2 = w2->mapTo(m_topLevelWidget, QPoint(0,0)).y();
+ y2 = w2->mapTo(m_tqtopLevelWidget, TQPoint(0,0)).y();
kdDebug() << w1->name() << ": " << y1 << " "
<< " | " << w2->name() << ": " << y2 << endl;
- //kdDebug() << w1->name() << ": " << w1->mapTo(m_topLevelWidget, QPoint(0,0)) << " " << w1->y()
- //<< " | " << w2->name() << ":" /*<< w2->mapFrom(m_topLevelWidget, QPoint(0,w2->y()))*/ << " " << w2->y() << endl;
+ //kdDebug() << w1->name() << ": " << w1->mapTo(m_tqtopLevelWidget, TQPoint(0,0)) << " " << w1->y()
+ //<< " | " << w2->name() << ":" /*<< w2->mapFrom(m_tqtopLevelWidget, TQPoint(0,w2->y()))*/ << " " << w2->y() << endl;
return y1 - y2;
}
diff --git a/kexi/formeditor/utils.h b/kexi/formeditor/utils.h
index d5384e45a..30bbfdf3a 100644
--- a/kexi/formeditor/utils.h
+++ b/kexi/formeditor/utils.h
@@ -21,30 +21,30 @@
#ifndef FORMEDITORUTILS_H
#define FORMEDITORUTILS_H
-#include <qptrlist.h>
-#include <qtabbar.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqtabbar.h>
+#include <tqtabwidget.h>
-//! @todo replace QTabWidget by KTabWidget after the bug with & is fixed:
-#define TabWidgetBase QTabWidget
+//! @todo replace TQTabWidget by KTabWidget after the bug with & is fixed:
+#define TabWidgetBase TQTabWidget
//#define USE_KTabWidget //todo: uncomment
namespace KFormDesigner {
class Form;
-/*! \return parent object of \a o that inherits \a className or NULL if no such parent
- If the parent is found, \a prevPrev is set to a child of child of the parent,
+/*! \return tqparent object of \a o that inherits \a className or NULL if no such tqparent
+ If the tqparent is found, \a prevPrev is set to a child of child of the tqparent,
what for TabWidget means the page widget. */
template<class type>
-type* findParent(QObject* o, const char* className, QObject* &prevPrev)
+type* findParent(TQT_BASE_OBJECT_NAME* o, const char* className, TQObject* &prevPrev)
{
if (!o || !className || className[0]=='\0')
return 0;
- QObject *prev = o;
- while ( ((o=o->parent())) && !o->inherits(className) ) {
+ TQObject *prev = TQT_TQOBJECT(o);
+ while ( ((o=TQT_TQOBJECT(o)->tqparent())) && !TQT_TQOBJECT(o)->inherits(className) ) {
prevPrev = prev;
- prev = o;
+ prev = TQT_TQOBJECT(o);
}
return static_cast<type*>(o);
}
@@ -53,39 +53,40 @@ type* findParent(QObject* o, const char* className, QObject* &prevPrev)
class KFORMEDITOR_EXPORT TabWidget : public TabWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TabWidget(QWidget *parent, const char *name)
- : TabWidgetBase(parent, name) {}
+ TabWidget(TQWidget *tqparent, const char *name)
+ : TabWidgetBase(tqparent, name) {}
virtual ~TabWidget() {}
int tabBarHeight() const { return tabBar()->height(); }
};
//! @short A list of widget pointers.
-typedef QPtrList<QWidget> WidgetList;
+typedef TQPtrList<TQWidget> WidgetList;
//! @short An iterator for WidgetList.
-typedef QPtrListIterator<QWidget> WidgetListIterator;
+typedef TQPtrListIterator<TQWidget> WidgetListIterator;
//! @short A helper for sorting widgets horizontally
class HorWidgetList : public WidgetList
{
public:
- HorWidgetList(QWidget *topLevelWidget);
+ HorWidgetList(TQWidget *tqtopLevelWidget);
virtual ~HorWidgetList();
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
- QWidget *m_topLevelWidget;
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
+ TQWidget *m_tqtopLevelWidget;
};
//! @short A helper for sorting widgets vertically
class VerWidgetList : public WidgetList
{
public:
- VerWidgetList(QWidget *topLevelWidget);
+ VerWidgetList(TQWidget *tqtopLevelWidget);
virtual ~VerWidgetList();
protected:
- virtual int compareItems(QPtrCollection::Item item1, QPtrCollection::Item item2);
- QWidget *m_topLevelWidget;
+ virtual int compareItems(TQPtrCollection::Item item1, TQPtrCollection::Item item2);
+ TQWidget *m_tqtopLevelWidget;
};
/*! This function is used to remove all the child widgets from a list, and
@@ -93,19 +94,19 @@ class VerWidgetList : public WidgetList
KFORMEDITOR_EXPORT void removeChildrenFromList(WidgetList &list);
/*! This helper function install an event filter on \a object and all of its
- children, directed to \a container.
+ tqchildren, directed to \a container.
This is necessary to filter events for composed widgets. */
-KFORMEDITOR_EXPORT void installRecursiveEventFilter(QObject *object, QObject *container);
+KFORMEDITOR_EXPORT void installRecursiveEventFilter(TQObject *object, TQObject *container);
/*! This helper function removes an event filter installed before
- on \a object and all of its children.
+ on \a object and all of its tqchildren.
This is necessary to filter events for composed widgets. */
-KFORMEDITOR_EXPORT void removeRecursiveEventFilter(QObject *object, QObject *container);
+KFORMEDITOR_EXPORT void removeRecursiveEventFilter(TQObject *object, TQObject *container);
-KFORMEDITOR_EXPORT void setRecursiveCursor(QWidget *w, Form *form);
+KFORMEDITOR_EXPORT void setRecursiveCursor(TQWidget *w, Form *form);
-/*! \return the size of \a w children. This can be used eg to get widget's sizeHint. */
-KFORMEDITOR_EXPORT QSize getSizeFromChildren(QWidget *widget, const char *inheritClass="QWidget");
+/*! \return the size of \a w tqchildren. This can be used eg to get widget's tqsizeHint. */
+KFORMEDITOR_EXPORT TQSize getSizeFromChildren(TQWidget *widget, const char *inheritClass=TQWIDGET_OBJECT_NAME_STRING);
}
diff --git a/kexi/formeditor/widgetfactory.cpp b/kexi/formeditor/widgetfactory.cpp
index 8122013c1..12585b6cb 100644
--- a/kexi/formeditor/widgetfactory.cpp
+++ b/kexi/formeditor/widgetfactory.cpp
@@ -21,10 +21,10 @@
#include "widgetfactory.h"
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qdict.h>
-#include <qmetaobject.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqdict.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -64,9 +64,9 @@ WidgetInfo::WidgetInfo(WidgetFactory *f)
{
}
-WidgetInfo::WidgetInfo(WidgetFactory *f, const char* parentFactoryName,
+WidgetInfo::WidgetInfo(WidgetFactory *f, const char* tqparentFactoryName,
const char* inheritedClassName)
- : m_parentFactoryName( QCString("kformdesigner_")+parentFactoryName )
+ : m_parentFactoryName( TQCString("kformdesigner_")+tqparentFactoryName )
, m_inheritedClassName(inheritedClassName)
, m_inheritedClass(0)
, m_overriddenAlternateNames(0)
@@ -84,12 +84,12 @@ WidgetInfo::~WidgetInfo()
delete m_customTypesForProperty;
}
-void WidgetInfo::addAlternateClassName(const QCString& alternateName, bool override)
+void WidgetInfo::addAlternateClassName(const TQCString& alternateName, bool override)
{
m_alternateNames += alternateName;
if (override) {
if (!m_overriddenAlternateNames)
- m_overriddenAlternateNames = new QAsciiDict<char>(101);
+ m_overriddenAlternateNames = new TQAsciiDict<char>(101);
m_overriddenAlternateNames->insert(alternateName, (char*)1);
}
else {
@@ -98,9 +98,9 @@ void WidgetInfo::addAlternateClassName(const QCString& alternateName, bool overr
}
}
-bool WidgetInfo::isOverriddenClassName(const QCString& alternateName) const
+bool WidgetInfo::isOverriddenClassName(const TQCString& alternateName) const
{
- return m_overriddenAlternateNames && (m_overriddenAlternateNames->find(alternateName) != 0);
+ return m_overriddenAlternateNames && (m_overriddenAlternateNames->tqfind(alternateName) != 0);
}
void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
@@ -108,7 +108,7 @@ void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
if (!m_propertiesWithDisabledAutoSync) {
if (~flag)
return;
- m_propertiesWithDisabledAutoSync = new QAsciiDict<char>(101);
+ m_propertiesWithDisabledAutoSync = new TQAsciiDict<char>(101);
}
if (~flag) {
@@ -121,7 +121,7 @@ void WidgetInfo::setAutoSyncForProperty(const char *propertyName, tristate flag)
tristate WidgetInfo::autoSyncForProperty(const char *propertyName) const
{
- char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->find(propertyName) : 0;
+ char* flag = m_propertiesWithDisabledAutoSync ? m_propertiesWithDisabledAutoSync->tqfind(propertyName) : 0;
if (!flag)
return cancelled;
return flag==(char*)1 ? true : false;
@@ -132,14 +132,14 @@ void WidgetInfo::setCustomTypeForProperty(const char *propertyName, int type)
if (!propertyName || type==KoProperty::Auto)
return;
if (!m_customTypesForProperty) {
- m_customTypesForProperty = new QMap<QCString,int>();
+ m_customTypesForProperty = new TQMap<TQCString,int>();
}
- m_customTypesForProperty->replace(propertyName, type);
+ m_customTypesForProperty->tqreplace(propertyName, type);
}
int WidgetInfo::customTypeForProperty(const char *propertyName) const
{
- if (!m_customTypesForProperty || !m_customTypesForProperty->contains(propertyName))
+ if (!m_customTypesForProperty || !m_customTypesForProperty->tqcontains(propertyName))
return KoProperty::Auto;
return (*m_customTypesForProperty)[propertyName];
}
@@ -147,8 +147,8 @@ int WidgetInfo::customTypeForProperty(const char *propertyName) const
///// Widget Factory //////////////////////////
-WidgetFactory::WidgetFactory(QObject *parent, const char *name)
- : QObject(parent, (const char*)(QCString("kformdesigner_")+name))
+WidgetFactory::WidgetFactory(TQObject *tqparent, const char *name)
+ : TQObject(tqparent, (const char*)(TQCString("kformdesigner_")+name))
{
m_showAdvancedProperties = true;
m_classesByName.setAutoDelete(true);
@@ -177,63 +177,63 @@ void WidgetFactory::addClass(WidgetInfo *w)
void WidgetFactory::hideClass(const char *classname)
{
if (!m_hiddenClasses)
- m_hiddenClasses = new QAsciiDict<char>(101, false);
+ m_hiddenClasses = new TQAsciiDict<char>(101, false);
m_hiddenClasses->insert(classname, (char*)1);
}
void
-WidgetFactory::createEditor(const QCString &classname, const QString &text,
- QWidget *w, Container *container, QRect geometry,
+WidgetFactory::createEditor(const TQCString &classname, const TQString &text,
+ TQWidget *w, Container *container, TQRect tqgeometry,
int align, bool useFrame, bool multiLine, BackgroundMode background)
{
//#ifdef KEXI_KTEXTEDIT
if (multiLine) {
- KTextEdit *textedit = new KTextEdit(text, QString::null, w->parentWidget());
- textedit->setTextFormat(Qt::PlainText);
- textedit->setAlignment(align);
- if (dynamic_cast<QTextEdit*>(w)) {
- textedit->setWordWrap(dynamic_cast<QTextEdit*>(w)->wordWrap());
- textedit->setWrapPolicy(dynamic_cast<QTextEdit*>(w)->wrapPolicy());
+ KTextEdit *textedit = new KTextEdit(text, TQString(), w->tqparentWidget());
+ textedit->setTextFormat(TQt::PlainText);
+ textedit->tqsetAlignment(align);
+ if (dynamic_cast<TQTextEdit*>(w)) {
+ textedit->setWordWrap(dynamic_cast<TQTextEdit*>(w)->wordWrap());
+ textedit->setWrapPolicy(dynamic_cast<TQTextEdit*>(w)->wrapPolicy());
}
textedit->setPalette(w->palette());
textedit->setFont(w->font());
- textedit->setResizePolicy(QScrollView::Manual);
- textedit->setGeometry(geometry);
- if(background == Qt::NoBackground)
+ textedit->setResizePolicy(TQScrollView::Manual);
+ textedit->setGeometry(tqgeometry);
+ if(background == TQt::NoBackground)
textedit->setBackgroundMode(w->backgroundMode());
else
textedit->setBackgroundMode(background);
-// textedit->setPaletteBackgroundColor(textedit->colorGroup().color( QColorGroup::Base ));
+// textedit->setPaletteBackgroundColor(textedit->tqcolorGroup().color( TQColorGroup::Base ));
textedit->setPaletteBackgroundColor(w->paletteBackgroundColor());
for(int i =0; i <= textedit->paragraphs(); i++)
textedit->setParagraphBackgroundColor(i, w->paletteBackgroundColor());
textedit->selectAll(true);
textedit->setColor(w->paletteForegroundColor());
textedit->selectAll(false);
- textedit->moveCursor(QTextEdit::MoveEnd, false);
+ textedit->moveCursor(TQTextEdit::MoveEnd, false);
textedit->setParagraphBackgroundColor(0, w->paletteBackgroundColor());
- textedit->setVScrollBarMode(QScrollView::AlwaysOff); //ok?
- textedit->setHScrollBarMode(QScrollView::AlwaysOff); //ok?
+ textedit->setVScrollBarMode(TQScrollView::AlwaysOff); //ok?
+ textedit->setHScrollBarMode(TQScrollView::AlwaysOff); //ok?
textedit->installEventFilter(this);
- textedit->setFrameShape(useFrame ? QFrame::LineEditPanel : QFrame::NoFrame);
+ textedit->setFrameShape(useFrame ? TQFrame::LineEditPanel : TQFrame::NoFrame);
textedit->setMargin(2); //to move away from resize handle
textedit->show();
textedit->setFocus();
textedit->selectAll();
setEditor(w, textedit);
- connect(textedit, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
- connect(textedit, SIGNAL(destroyed()), this, SLOT(editorDeleted()));
+ connect(textedit, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
+ connect(textedit, TQT_SIGNAL(destroyed()), this, TQT_SLOT(editorDeleted()));
//#else
}
else {
- KLineEdit *editor = new KLineEdit(text, w->parentWidget());
- editor->setAlignment(align);
+ KLineEdit *editor = new KLineEdit(text, w->tqparentWidget());
+ editor->tqsetAlignment(align);
editor->setPalette(w->palette());
editor->setFont(w->font());
- editor->setGeometry(geometry);
- if(background == Qt::NoBackground)
+ editor->setGeometry(tqgeometry);
+ if(background == TQt::NoBackground)
editor->setBackgroundMode(w->backgroundMode());
else
editor->setBackgroundMode(background);
@@ -243,17 +243,17 @@ WidgetFactory::createEditor(const QCString &classname, const QString &text,
editor->show();
editor->setFocus();
editor->selectAll();
- connect(editor, SIGNAL(textChanged(const QString&)), this, SLOT(changeTextInternal(const QString&)));
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
- connect(editor, SIGNAL(destroyed()), this, SLOT(editorDeleted()));
+ connect(editor, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(changeTextInternal(const TQString&)));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
+ connect(editor, TQT_SIGNAL(destroyed()), this, TQT_SLOT(editorDeleted()));
setEditor(w, editor);
// m_editor = editor;
}
//copy properties if available
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
- if (-1!=m_editor->metaObject()->findProperty("margin", true) && -1!=subwidget->metaObject()->findProperty("margin", true))
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : w;
+ if (-1!=m_editor->tqmetaObject()->tqfindProperty("margin", true) && -1!=subwidget->tqmetaObject()->tqfindProperty("margin", true))
m_editor->setProperty("margin", subwidget->property("margin"));
//#endif
//js m_handles = new ResizeHandleSet(w, container->form(), true);
@@ -278,7 +278,7 @@ WidgetFactory::createEditor(const QCString &classname, const QString &text,
}
void
-WidgetFactory::disableFilter(QWidget *w, Container *container)
+WidgetFactory::disableFilter(TQWidget *w, Container *container)
{
ObjectTreeItem *tree = container->form()->objectTree()->lookup(w->name());
if(!tree)
@@ -301,28 +301,28 @@ WidgetFactory::disableFilter(QWidget *w, Container *container)
// widget is disabled, so we re-enable it while editing
if(!tree->isEnabled()) {
- QPalette p = w->palette();
- QColorGroup cg = p.active();
+ TQPalette p = w->palette();
+ TQColorGroup cg = p.active();
p.setActive(p.disabled());
p.setDisabled(cg);
w->setPalette(p);
}
- connect(w, SIGNAL(destroyed()), this, SLOT(widgetDestroyed()));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(widgetDestroyed()));
}
bool
-WidgetFactory::editList(QWidget *w, QStringList &list)
+WidgetFactory::editList(TQWidget *w, TQStringList &list)
{
- KDialogBase dialog(w->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
+ KDialogBase dialog(w->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false);
- KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(w->name()), &dialog, "editlist");
+ KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(w->name()), &dialog, "editlist");
dialog.setMainWidget(edit);
edit->insertStringList(list);
// edit->show();
- if(dialog.exec() == QDialog::Accepted)
+ if(dialog.exec() == TQDialog::Accepted)
{
list = edit->items();
return true;
@@ -331,10 +331,10 @@ WidgetFactory::editList(QWidget *w, QStringList &list)
}
bool
-WidgetFactory::editRichText(QWidget *w, QString &text)
+WidgetFactory::editRichText(TQWidget *w, TQString &text)
{
RichTextDialog dlg(w, text);
- if(dlg.exec()== QDialog::Accepted)
+ if(dlg.exec()== TQDialog::Accepted)
{
text = dlg.text();
return true;
@@ -343,66 +343,66 @@ WidgetFactory::editRichText(QWidget *w, QString &text)
}
void
-WidgetFactory::editListView(QListView *listview)
+WidgetFactory::editListView(TQListView *listview)
{
- EditListViewDialog dlg(((QWidget*)listview)->topLevelWidget());
+ EditListViewDialog dlg(((TQWidget*)listview)->tqtopLevelWidget());
//dlg.exec(listview);
}
bool
-WidgetFactory::eventFilter(QObject *obj, QEvent *ev)
+WidgetFactory::eventFilter(TQObject *obj, TQEvent *ev)
{
- if( ((ev->type() == QEvent::Resize) || (ev->type() == QEvent::Move) ) && (obj == m_widget) && editor(m_widget)) {
+ if( ((ev->type() == TQEvent::Resize) || (ev->type() == TQEvent::Move) ) && (obj == m_widget) && editor(m_widget)) {
// resize widget using resize handles
- QWidget *ed = editor(m_widget);
+ TQWidget *ed = editor(m_widget);
resizeEditor(ed, m_widget, m_widget->className());
}
- else if((ev->type() == QEvent::Paint) && (obj == m_widget) && editor(m_widget)) {
+ else if((ev->type() == TQEvent::Paint) && (obj == m_widget) && editor(m_widget)) {
// paint event for container edited (eg button group)
return m_container->eventFilter(obj, ev);
}
- else if((ev->type() == QEvent::MouseButtonPress) && (obj == m_widget) && editor(m_widget)) {
+ else if((ev->type() == TQEvent::MouseButtonPress) && (obj == m_widget) && editor(m_widget)) {
// click outside editor --> cancel editing
Container *cont = m_container;
resetEditor();
return cont->eventFilter(obj, ev);
}
- if(ev->type() == QEvent::FocusOut)
+ if(ev->type() == TQEvent::FocusOut)
{
- QWidget *w = editor(m_widget);
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
- QWidget *focus = w->topLevelWidget()->focusWidget();
+ TQWidget *focus = w->tqtopLevelWidget()->tqfocusWidget();
if(focus && w != focus && !w->child(focus->name(), focus->className()))
resetEditor();
}
- else if(ev->type() == QEvent::KeyPress)
+ else if(ev->type() == TQEvent::KeyPress)
{
- QWidget *w = editor(m_widget);
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
- QKeyEvent *e = static_cast<QKeyEvent*>(ev);
- if(((e->key() == Qt::Key_Return) || (e->key() == Qt::Key_Enter)) && (e->state() != AltButton))
+ TQKeyEvent *e = TQT_TQKEYEVENT(ev);
+ if(((e->key() == TQt::Key_Return) || (e->key() == TQt::Key_Enter)) && (e->state() != AltButton))
resetEditor();
- if(e->key() == Qt::Key_Escape)
+ if(e->key() == TQt::Key_Escape)
{
setEditorText(m_firstText);
//changeText(m_firstText);
resetEditor();
}
}
- else if(ev->type() == QEvent::ContextMenu) {
- QWidget *w = editor(m_widget);
+ else if(ev->type() == TQEvent::ContextMenu) {
+ TQWidget *w = editor(m_widget);
if (!w)
- w = (QWidget *)m_widget;
- if(obj != (QObject *)w)
+ w = (TQWidget *)m_widget;
+ if(obj != (TQObject *)w)
return false;
return true;
@@ -419,7 +419,7 @@ WidgetFactory::resetEditor()
if (m_container)
m_container->stopInlineEditing();
- QWidget *ed = editor(m_widget);
+ TQWidget *ed = editor(m_widget);
if(m_widget)
{
ObjectTreeItem *tree = m_container ? m_container->form()->objectTree()->lookup(m_widget->name()) : 0;
@@ -431,16 +431,16 @@ WidgetFactory::resetEditor()
tree->eventEater()->setContainer(m_container);
if(m_widget) {// && !ed)
setRecursiveCursor(m_widget, m_container->form());
- if (m_widget->inherits("QLineEdit") || m_widget->inherits("QTextEdit")) { //fix weird behaviour
+ if (m_widget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) || m_widget->inherits(TQTEXTEDIT_OBJECT_NAME_STRING)) { //fix weird behaviour
m_widget->unsetCursor();
- m_widget->setCursor(Qt::ArrowCursor);
+ m_widget->setCursor(TQt::ArrowCursor);
}
}
// disable again the widget
if(!ed && !tree->isEnabled()) {
- QPalette p = m_widget->palette();
- QColorGroup cg = p.active();
+ TQPalette p = m_widget->palette();
+ TQColorGroup cg = p.active();
p.setActive(p.disabled());
p.setDisabled(cg);
m_widget->setPalette(p);
@@ -456,7 +456,7 @@ WidgetFactory::resetEditor()
if(m_widget)
{
disconnect(m_widget, 0, this, 0);
- m_widget->repaint();
+ m_widget->tqrepaint();
}
//js delete m_handles;
@@ -505,8 +505,8 @@ WidgetFactory::editorDeleted()
}
void
-WidgetFactory::changeProperty(const char *name, const QVariant &value, Form *form)
-//WidgetFactory::changeProperty(const char *name, const QVariant &value, Container *container)
+WidgetFactory::changeProperty(const char *name, const TQVariant &value, Form *form)
+//WidgetFactory::changeProperty(const char *name, const TQVariant &value, Container *container)
{
// if (!form->manager())
// return;
@@ -520,29 +520,29 @@ WidgetFactory::changeProperty(const char *name, const QVariant &value, Form *for
else
{
WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet();
- if(set->contains(name))
+ if(set->tqcontains(name))
(*set)[name] = value;
}
}
/*
void
-WidgetFactory::addPropertyDescription(Container *container, const char *prop, const QString &desc)
+WidgetFactory::addPropertyDescription(Container *container, const char *prop, const TQString &desc)
{
WidgetPropertySet *buff = container->form()->manager()->buffer();
buff->addPropertyDescription(prop, desc);
}
void
-WidgetFactory::addValueDescription(Container *container, const char *value, const QString &desc)
+WidgetFactory::addValueDescription(Container *container, const char *value, const TQString &desc)
{
WidgetPropertySet *buff = container->form()->manager()->buffer();
buff->addValueDescription(value, desc);
}*/
bool
-WidgetFactory::isPropertyVisible(const QCString &classname, QWidget *w,
- const QCString &property, bool multiple, bool isTopLevel)
+WidgetFactory::isPropertyVisible(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool multiple, bool isTopLevel)
{
if (multiple)
{
@@ -560,8 +560,8 @@ WidgetFactory::isPropertyVisible(const QCString &classname, QWidget *w,
}
bool
-WidgetFactory::isPropertyVisibleInternal(const QCString &, QWidget *w,
- const QCString &property, bool isTopLevel)
+WidgetFactory::isPropertyVisibleInternal(const TQCString &, TQWidget *w,
+ const TQCString &property, bool isTopLevel)
{
Q_UNUSED( w );
@@ -580,8 +580,8 @@ WidgetFactory::isPropertyVisibleInternal(const QCString &, QWidget *w,
}
bool
-WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property)
+WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property)
{
Q_UNUSED(classname);
Q_UNUSED(w);
@@ -590,7 +590,7 @@ WidgetFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& cl
}
void
-WidgetFactory::resizeEditor(QWidget *, QWidget *, const QCString&)
+WidgetFactory::resizeEditor(TQWidget *, TQWidget *, const TQCString&)
{
}
@@ -601,13 +601,13 @@ WidgetFactory::slotTextChanged()
}
bool
-WidgetFactory::clearWidgetContent(const QCString &, QWidget *)
+WidgetFactory::clearWidgetContent(const TQCString &, TQWidget *)
{
return false;
}
void
-WidgetFactory::changeTextInternal(const QString& text)
+WidgetFactory::changeTextInternal(const TQString& text)
{
if (changeText( text ))
return;
@@ -622,68 +622,68 @@ WidgetFactory::changeTextInternal(const QString& text)
}
bool
-WidgetFactory::changeText(const QString& text)
+WidgetFactory::changeText(const TQString& text)
{
changeProperty( "text", text, m_container->form() );
return true;
}
bool
-WidgetFactory::readSpecialProperty(const QCString &, QDomElement &, QWidget *, ObjectTreeItem *)
+WidgetFactory::readSpecialProperty(const TQCString &, TQDomElement &, TQWidget *, ObjectTreeItem *)
{
return false;
}
bool
-WidgetFactory::saveSpecialProperty(const QCString &, const QString &, const QVariant&, QWidget *, QDomElement &, QDomDocument &)
+WidgetFactory::saveSpecialProperty(const TQCString &, const TQString &, const TQVariant&, TQWidget *, TQDomElement &, TQDomDocument &)
{
return false;
}
bool WidgetFactory::inheritsFactories()
{
- for (QAsciiDictIterator<WidgetInfo> it(m_classesByName); it.current(); ++it) {
- if (!it.current()->parentFactoryName().isEmpty())
+ for (TQAsciiDictIterator<WidgetInfo> it(m_classesByName); it.current(); ++it) {
+ if (!it.current()->tqparentFactoryName().isEmpty())
return true;
}
return false;
}
-QString WidgetFactory::editorText() const {
- QWidget *ed = editor(m_widget);
+TQString WidgetFactory::editorText() const {
+ TQWidget *ed = editor(m_widget);
return dynamic_cast<KTextEdit*>(ed) ? dynamic_cast<KTextEdit*>(ed)->text() : dynamic_cast<KLineEdit*>(ed)->text();
}
-void WidgetFactory::setEditorText(const QString& text) {
- QWidget *ed = editor(m_widget);
+void WidgetFactory::setEditorText(const TQString& text) {
+ TQWidget *ed = editor(m_widget);
if (dynamic_cast<KTextEdit*>(ed))
dynamic_cast<KTextEdit*>(ed)->setText(text);
else
dynamic_cast<KLineEdit*>(ed)->setText(text);
}
-void WidgetFactory::setEditor(QWidget *widget, QWidget *editor)
+void WidgetFactory::setEditor(TQWidget *widget, TQWidget *editor)
{
if (!widget)
return;
WidgetInfo *winfo = m_classesByName[widget->className()];
- if (!winfo || winfo->parentFactoryName().isEmpty()) {
+ if (!winfo || winfo->tqparentFactoryName().isEmpty()) {
m_editor = editor;
}
else {
- WidgetFactory *f = m_library->factory(winfo->parentFactoryName());
+ WidgetFactory *f = m_library->factory(winfo->tqparentFactoryName());
if (f!=this)
f->setEditor(widget, editor);
m_editor = editor; //keep a copy
}
}
-QWidget *WidgetFactory::editor(QWidget *widget) const
+TQWidget *WidgetFactory::editor(TQWidget *widget) const
{
if (!widget)
return 0;
WidgetInfo *winfo = m_classesByName[widget->className()];
- if (!winfo || winfo->parentFactoryName().isEmpty()) {
+ if (!winfo || winfo->tqparentFactoryName().isEmpty()) {
return m_editor;
}
else {
@@ -694,11 +694,11 @@ QWidget *WidgetFactory::editor(QWidget *widget) const
}
}
-void WidgetFactory::setWidget(QWidget *widget, Container* container)
+void WidgetFactory::setWidget(TQWidget *widget, Container* container)
{
WidgetInfo *winfo = widget ? m_classesByName[widget->className()] : 0;
- if (winfo && !winfo->parentFactoryName().isEmpty()) {
- WidgetFactory *f = m_library->factory(winfo->parentFactoryName());
+ if (winfo && !winfo->tqparentFactoryName().isEmpty()) {
+ WidgetFactory *f = m_library->factory(winfo->tqparentFactoryName());
if (f!=this)
f->setWidget(widget, container);
}
@@ -706,18 +706,18 @@ void WidgetFactory::setWidget(QWidget *widget, Container* container)
m_container = container;
}
-QWidget *WidgetFactory::widget() const
+TQWidget *WidgetFactory::widget() const
{
return m_widget;
}
-void WidgetFactory::setInternalProperty(const QCString& classname, const QCString& property,
- const QString& value)
+void WidgetFactory::setInternalProperty(const TQCString& classname, const TQCString& property,
+ const TQString& value)
{
m_internalProp[classname+":"+property]=value;
}
-void WidgetFactory::setPropertyOptions( WidgetPropertySet& /*buf*/, const WidgetInfo& /*info*/, QWidget * /*w*/ )
+void WidgetFactory::setPropertyOptions( WidgetPropertySet& /*buf*/, const WidgetInfo& /*info*/, TQWidget * /*w*/ )
{
//nothing
}
diff --git a/kexi/formeditor/widgetfactory.h b/kexi/formeditor/widgetfactory.h
index 43736ebcd..2cb74fc8d 100644
--- a/kexi/formeditor/widgetfactory.h
+++ b/kexi/formeditor/widgetfactory.h
@@ -23,23 +23,23 @@
#define KFORMDESIGNERWIDGETFACTORY_H
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qpixmap.h>
-#include <qpopupmenu.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqpixmap.h>
+#include <tqpopupmenu.h>
+#include <tqasciidict.h>
#include <kexiutils/tristate.h>
-// class QPixmap;
-template<class type> class QValueVector;
-template<class type> class QPtrList;
-template<class type> class QDict;
-class QWidget;
-class QDomElement;
-class QDomDocument;
-class QVariant;
-class QListView;
+// class TQPixmap;
+template<class type> class TQValueVector;
+template<class type> class TQPtrList;
+template<class type> class TQDict;
+class TQWidget;
+class TQDomElement;
+class TQDomDocument;
+class TQVariant;
+class TQListView;
class KActionCollection;
class KTextEdit;
class KLineEdit;
@@ -65,49 +65,49 @@ class Form;
class KFORMEDITOR_EXPORT WidgetInfo
{
public:
- typedef QPtrList<WidgetInfo> List;
- typedef QAsciiDict<WidgetInfo> Dict;
+ typedef TQPtrList<WidgetInfo> List;
+ typedef TQAsciiDict<WidgetInfo> Dict;
WidgetInfo(WidgetFactory *f);
- WidgetInfo(WidgetFactory *f, const char* parentFactoryName, const char* inheritedClassName = 0);
+ WidgetInfo(WidgetFactory *f, const char* tqparentFactoryName, const char* inheritedClassName = 0);
virtual ~WidgetInfo();
//! \return a pixmap associated with the widget
- QString pixmap() const { return m_pixmap; }
+ TQString pixmap() const { return m_pixmap; }
- //! \return the class name of a widget e.g. 'QLineEdit'
- QCString className() const { return m_class; }
+ //! \return the class name of a widget e.g. 'TQLineEdit'
+ TQCString className() const { return m_class; }
/*! \return the name used to name widget, that will appear eg in scripts (must not contain spaces
nor non-latin1 characters) */
- QString namePrefix() const { return m_prefixName; }
+ TQString namePrefix() const { return m_prefixName; }
//! \return the real name e.g. 'Line Edit', showed eg in ObjectTreeView
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
- QString description() const { return m_desc; }
- QString includeFileName() const { return m_include; }
- QValueList<QCString> alternateClassNames() const { return m_alternateNames; }
- QString savingName() const { return m_saveName; }
+ TQString description() const { return m_desc; }
+ TQString includeFileName() const { return m_include; }
+ TQValueList<TQCString> alternateClassNames() const { return m_alternateNames; }
+ TQString savingName() const { return m_saveName; }
WidgetFactory *factory() const { return m_factory; }
- void setPixmap(const QString &p) { m_pixmap = p; }
- void setClassName(const QCString &s) { m_class = s; }
- void setName(const QString &n) { m_name = n; }
- void setNamePrefix(const QString &n) { m_prefixName = n; }
- void setDescription(const QString &desc) { m_desc = desc;}
+ void setPixmap(const TQString &p) { m_pixmap = p; }
+ void setClassName(const TQCString &s) { m_class = s; }
+ void setName(const TQString &n) { m_name = n; }
+ void setNamePrefix(const TQString &n) { m_prefixName = n; }
+ void setDescription(const TQString &desc) { m_desc = desc;}
/*! Sets the C++ include file corresponding to this class,
- that uic will need to add when creating the file. You don't have to set this for Qt std widgets.*/
- void setIncludeFileName(const QString &name) { m_include = name;}
+ that uic will need to add when creating the file. You don't have to set this for TQt std widgets.*/
+ void setIncludeFileName(const TQString &name) { m_include = name;}
/*! Sets alternate names for this class.
If this name is found when loading a .ui file, the className() will be used instead.
- It allows to support both KDE and Qt versions of widget, without duplicating code.
+ It allows to support both KDE and TQt versions of widget, without duplicating code.
As a rule, className() should always return a class name which is inherited from
- alternate class. For example KListView class has alternate QListView class.
+ alternate class. For example KListView class has alternate TQListView class.
\a override parameter overrides class name of a widget,
even if it was implemented in other factory.
@@ -119,21 +119,21 @@ class KFORMEDITOR_EXPORT WidgetInfo
For example, in Kexi application, KLineEdit class contains additional
"datasource" property for binding to database sources.
*/
- void addAlternateClassName(const QCString& alternateName, bool override = false);
+ void addAlternateClassName(const TQCString& alternateName, bool override = false);
/*! \return true is a class \a alternateName is defined as alternate name with
'override' flag set to true, using addAlternateClassName().
If this flag is set to false (the default) or there's no such alternate class
name defined. */
- bool isOverriddenClassName(const QCString& alternateName) const;
+ bool isOverriddenClassName(const TQCString& alternateName) const;
/*! Sets the name that will be written in the .ui file when saving.
This name must be one of alternate names (or loading will be impossible).
On form data saving to XML .ui format, saveName is used instead,
- so .ui format is not broken and still usable with other software as Qt Designer.
+ so .ui format is not broken and still usable with other software as TQt Designer.
Custom properties are saved as well with 'stdset' attribute set to 0. */
- void setSavingName(const QString &saveName) { m_saveName = saveName; }
+ void setSavingName(const TQString &saveName) { m_saveName = saveName; }
/*! Sets autoSync flag for property \a propertyName.
This allows to override autoSync flag for certain widget's property, because
@@ -146,7 +146,7 @@ class KFORMEDITOR_EXPORT WidgetInfo
If cancelled value is returned, there is no overriding (the default). */
tristate autoSyncForProperty(const char *propertyName) const;
- QCString parentFactoryName() const { return m_parentFactoryName; }
+ TQCString tqparentFactoryName() const { return m_parentFactoryName; }
WidgetInfo* inheritedClass() const { return m_inheritedClass; }
@@ -161,22 +161,22 @@ class KFORMEDITOR_EXPORT WidgetInfo
int customTypeForProperty(const char *propertyName) const;
protected:
- QCString m_parentFactoryName, m_inheritedClassName; //!< Used for inheriting widgets between factories
+ TQCString m_parentFactoryName, m_inheritedClassName; //!< Used for inheriting widgets between factories
WidgetInfo* m_inheritedClass;
private:
- QString m_pixmap;
- QCString m_class;
- QString m_name;
- QString m_prefixName;
- QString m_desc;
- QString m_include;
- QValueList<QCString> m_alternateNames;
- QAsciiDict<char> *m_overriddenAlternateNames;
- QString m_saveName;
- QGuardedPtr<WidgetFactory> m_factory;
- QAsciiDict<char> *m_propertiesWithDisabledAutoSync;
- QMap<QCString,int> *m_customTypesForProperty;
+ TQString m_pixmap;
+ TQCString m_class;
+ TQString m_name;
+ TQString m_prefixName;
+ TQString m_desc;
+ TQString m_include;
+ TQValueList<TQCString> m_alternateNames;
+ TQAsciiDict<char> *m_overriddenAlternateNames;
+ TQString m_saveName;
+ TQGuardedPtr<WidgetFactory> m_factory;
+ TQAsciiDict<char> *m_propertiesWithDisabledAutoSync;
+ TQMap<TQCString,int> *m_customTypesForProperty;
friend class WidgetLibrary;
};
@@ -198,7 +198,7 @@ class KFORMEDITOR_EXPORT WidgetInfo
You can also choose which properties to show in the Property Editor.
By default, most all properties are shown (see implementation for details),
but you can hide some reimplementing isPropertyVisibleInternal() (don't forget to call superclass' method)
- To add new properties, just define new Q_PROPERTY in widget class definition.\n \n
+ To add new properties, just define new TQ_PROPERTY in widget class definition.\n \n
<b>Inline editing</b>\n
KFormDesigner allow you to edit the widget's contents inside Form, without using a dialog.
@@ -218,12 +218,12 @@ class KFORMEDITOR_EXPORT WidgetInfo
<b>Widget saving/loading</b>\n
You can also control how your widget are saved/loaded. You can choose which properties to save
(see autoSaveProperties()), and save/load custom properties, ie
- properties that are not Q_PROPERTY but you want to save in the UI file. This is used eg to
+ properties that are not TQ_PROPERTY but you want to save in the UI file. This is used eg to
save combo box or listview contents (see saveSpecialProperty() and
readSpecialProperty()). \n \n
<b>Special internal properties</b>\n
- Use void setInternalProperty(const QCString& classname, const QCString& property, const QString& value);
+ Use void setInternalProperty(const TQCString& classname, const TQCString& property, const TQString& value);
to set values of special internal properties.
Currently these properties are used for customizing popup menu items used for orientation selection.
Customization for class ClassName should look like:
@@ -236,10 +236,10 @@ class KFORMEDITOR_EXPORT WidgetInfo
* "orientationSelectionPopup:verticalIcon" - the same for "Vertical" item.
Set this property only for classes supporting orientations.
* "orientationSelectionPopup:horizontalText" - sets a i18n'd text for "Horizontal" item
- for objects of class 'ClassName', e.g. i18n("Insert Horizontal Line").
+ for objects of class 'ClassName', e.g. i18n("InsertQt::Horizontal Line").
Set this property only for classes supporting orientations.
* "orientationSelectionPopup:verticalText" - the same for "Vertical" item,
- e.g. i18n("Insert Vertical Line"). Set this property only for classes supporting orientations.
+ e.g. i18n("InsertQt::Vertical Line"). Set this property only for classes supporting orientations.
* "dontStartEditingOnInserting" - if not empty, WidgetFactory::startEditing() will not be executed upon
widget inseting by a user.
* "forceShowAdvancedProperty:{propertyname}" - set it to "1" for "{propertyname}" advanced property
@@ -254,9 +254,10 @@ class KFORMEDITOR_EXPORT WidgetInfo
See the standard factories in formeditor/factories for an example of factories,
and how to deal with complex widgets (eg tabwidget).
*/
-class KFORMEDITOR_EXPORT WidgetFactory : public QObject
+class KFORMEDITOR_EXPORT WidgetFactory : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Options used in createWidget()
enum CreateWidgetOptions {
@@ -267,7 +268,7 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
DefaultOptions = AnyOrientation | DesignViewMode
};
- WidgetFactory(QObject *parent=0, const char *name=0);
+ WidgetFactory(TQObject *tqparent=0, const char *name=0);
virtual ~WidgetFactory();
/*! Adds a new class described by \a w. */
@@ -288,12 +289,12 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
* Creates a widget (and if needed a KFormDesigner::Container)
* \return the created widget
* \param classname the classname of the widget, which should get created
- * \param parent the parent for the created widget
+ * \param tqparent the tqparent for the created widget
* \param name the name of the created widget
* \param container the toplevel Container (if a container should get created)
* \param options options for the created widget: orientation and view mode (see CreateWidgetOptions)
*/
- virtual QWidget* createWidget(const QCString &classname, QWidget *parent, const char *name,
+ virtual TQWidget* createWidget(const TQCString &classname, TQWidget *tqparent, const char *name,
KFormDesigner::Container *container,
int options = DefaultOptions) = 0;
@@ -303,69 +304,69 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
/*! This function can be used to add custom items in widget \a w context
menu \a menu. */
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container)=0;
/*! Creates (if necessary) an editor to edit the contents of the widget directly in the Form
(eg creates a line edit to change the text of a label). \a classname is
the class the widget belongs to, \a w is the widget to edit
- and \a container is the parent container of this widget (to access Form etc.).
+ and \a container is the tqparent container of this widget (to access Form etc.).
*/
- virtual bool startEditing(const QCString &classname, QWidget *w, Container *container)=0;
+ virtual bool startEditing(const TQCString &classname, TQWidget *w, Container *container)=0;
/*! This function is called just before the Form is previewed. It allows widgets
to make changes before switching (ie for a Spring, hiding the cross) */
- virtual bool previewWidget(const QCString &classname, QWidget *widget, Container *container)=0;
+ virtual bool previewWidget(const TQCString &classname, TQWidget *widget, Container *container)=0;
- virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
+ virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w);
/*! This function is called when FormIO finds a property, at save time,
that it cannot handle (ie not a normal property).
This way you can save special properties, for example the contents of a listbox.
\sa readSpecialProperty()
*/
- virtual bool saveSpecialProperty(const QCString &classname, const QString &name,
- const QVariant &value, QWidget *w,
- QDomElement &parentNode, QDomDocument &parent);
+ virtual bool saveSpecialProperty(const TQCString &classname, const TQString &name,
+ const TQVariant &value, TQWidget *w,
+ TQDomElement &tqparentNode, TQDomDocument &tqparent);
/*! This function is called when FormIO finds a property or an unknown
element in a .ui file. You can this way load a special property, for
example the contents of a listbox.
\sa saveSpecialProperty()
*/
- virtual bool readSpecialProperty(const QCString &classname, QDomElement &node,
- QWidget *w, ObjectTreeItem *item);
+ virtual bool readSpecialProperty(const TQCString &classname, TQDomElement &node,
+ TQWidget *w, ObjectTreeItem *item);
/*! This function is used to know whether the \a property for the widget \a w
should be shown or not in the PropertyEditor. If \a multiple is true,
then multiple widgets of the same class are selected, and you should
only show properties shared by widgets (eg font, color). By default,
all properties are shown if multiple == true, and none if multiple == false. */
- bool isPropertyVisible(const QCString &classname, QWidget *w,
- const QCString &property, bool multiple, bool isTopLevel);
+ bool isPropertyVisible(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool multiple, bool isTopLevel);
/*! You need to return here a list of the properties that should automatically be saved
for a widget belonging to \a classname, and your custom properties (eg "text"
for label or button, "contents" for combobox...). */
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname)=0;
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname)=0;
/*! \return The i18n'ed name of the property whose name is \a name,
that will be displayed in PropertyEditor. */
- inline QString propertyDescForName(const QCString &name) { return m_propDesc[name]; };
+ inline TQString propertyDescForName(const TQCString &name) { return m_propDesc[name]; };
/*! \return The i18n'ed name of the property's value whose name is \a name. */
- inline QString propertyDescForValue(const QCString &name) { return m_propValDesc[name]; };
+ inline TQString propertyDescForValue(const TQCString &name) { return m_propValDesc[name]; };
/*! This method is called after WidgetPropertySet was filled with properties
of a widget \a w, of class defined by \a info.
Default implementation does nothing.
Implement this if you need to set options for properties within the set \a buf. */
- virtual void setPropertyOptions( WidgetPropertySet& buf, const WidgetInfo& info, QWidget *w );
+ virtual void setPropertyOptions( WidgetPropertySet& buf, const WidgetInfo& info, TQWidget *w );
/*! \return internal property \a property for a class \a classname.
Internal properties are not stored within objects, but can be just provided
to describe classes' details. */
- inline QString internalProperty(const QCString& classname, const QCString& property) const {
+ inline TQString internalProperty(const TQCString& classname, const TQCString& property) const {
return m_internalProp[classname+":"+property];
}
@@ -373,62 +374,62 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
/*! This function is called when we want to know whether the property should be visible.
Implement it in the factory; don't forget to call implementation in the superclass.
Default implementation hides "caption", "icon", "sizeIncrement" and "iconText" properties. */
- virtual bool isPropertyVisibleInternal(const QCString &classname, QWidget *w,
- const QCString &property, bool isTopLevel);
+ virtual bool isPropertyVisibleInternal(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool isTopLevel);
/*! Sometimes property sets should be reloaded when a given property value changed.
Implement it in the factory. Default implementation always returns false. */
- virtual bool propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property);
+ virtual bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property);
/*! This function creates a KLineEdit to input some text and edit a widget's contents.
This can be used in startEditing(). \a text is the text to display by default
- in the line edit, \a w is the edited widget, \a geometry is the geometry the new line
- edit should have, and \a align is Qt::AlignmentFlags of the new line edit. */
- void createEditor(const QCString &classname, const QString &text,
- QWidget *w, Container *container, QRect geometry,
+ in the line edit, \a w is the edited widget, \a tqgeometry is the tqgeometry the new line
+ edit should have, and \a align is TQt::AlignmentFlags of the new line edit. */
+ void createEditor(const TQCString &classname, const TQString &text,
+ TQWidget *w, Container *container, TQRect tqgeometry,
int align, bool useFrame=false, bool multiLine = false,
- BackgroundMode background = Qt::NoBackground);
+ BackgroundMode background = TQt::NoBackground);
/*! This function provides a simple editing mode : it justs disable event filtering
for the widget, and it install it again when
the widget loose focus or Enter is pressed.
*/
- void disableFilter(QWidget *w, Container *container);
+ void disableFilter(TQWidget *w, Container *container);
/*! This function creates a little dialog (a KEditListBox) to modify the contents
of a list (of strings). It can be used to modify the contents
of a combo box for instance. The modified list is copied
into \a list when the user presses "Ok".*/
- bool editList(QWidget *w, QStringList &list);
+ bool editList(TQWidget *w, TQStringList &list);
- /*! This function creates a little editor to modify rich text. It supports alignment,
+ /*! This function creates a little editor to modify rich text. It supports tqalignment,
subscript and superscript and all basic formatting properties.
If the user presses "Ok", the edited text is put in \a text.
If he presses "Cancel", nothing happens. */
- bool editRichText(QWidget *w, QString &text);
+ bool editRichText(TQWidget *w, TQString &text);
/*! This function creates a dialog to modify the contents of a ListView. You can modify both
columns and list items. The listview is automatically updated if the user presses "Ok".*/
- void editListView(QListView *listview);
+ void editListView(TQListView *listview);
/*! This function destroys the editor when it loses focus or Enter is pressed. */
- virtual bool eventFilter(QObject *obj, QEvent *ev);
+ virtual bool eventFilter(TQObject *obj, TQEvent *ev);
/*! This function is used to modify a property of a widget (eg after editing it).
Please use it instead of w->setProperty() to allow sync inside PropertyEditor.
*/
- void changeProperty(const char *name, const QVariant &value, Form *form);
+ void changeProperty(const char *name, const TQVariant &value, Form *form);
/*! This function is called when the widget is resized,
and the \a editor size needs to be updated. */
- virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
+ virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
// /*! Adds the i18n'ed description of a property, which will be shown in PropertyEditor. */
-// void addPropertyDescription(Container *container, const char *prop, const QString &desc);
+// void addPropertyDescription(Container *container, const char *prop, const TQString &desc);
// /*! Adds the i18n'ed description of a property value, which will be shown in PropertyEditor. */
-// void addValueDescription(Container *container, const char *value, const QString &desc);
+// void addValueDescription(Container *container, const char *value, const TQString &desc);
/*! \return true if at least one class defined by this factory inherits
a class from other factory. Used in WidgetLibrary::loadFactories()
@@ -449,9 +450,9 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
This slot is called when the line edit text changes, and you have to make
it really change the good property of the widget using changeProperty() (text, or title, etc.).
*/
- virtual bool changeText(const QString &newText);
+ virtual bool changeText(const TQString &newText);
- void changeTextInternal(const QString& text);
+ void changeTextInternal(const TQString& text);
void slotTextChanged();
@@ -460,37 +461,37 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
void widgetDestroyed();
protected:
- QString editorText() const;
- void setEditorText(const QString& text);
- void setEditor(QWidget *widget, QWidget *editor);
- QWidget *editor(QWidget *widget) const;
- void setWidget(QWidget *widget, Container *container);
- QWidget *widget() const;
+ TQString editorText() const;
+ void setEditorText(const TQString& text);
+ void setEditor(TQWidget *widget, TQWidget *editor);
+ TQWidget *editor(TQWidget *widget) const;
+ void setWidget(TQWidget *widget, Container *container);
+ TQWidget *widget() const;
/*! Assigns \a value for internal property \a property for a class \a classname.
Internal properties are not stored within objects, but can be provided
to describe classes' details. */
- void setInternalProperty(const QCString& classname, const QCString& property, const QString& value);
+ void setInternalProperty(const TQCString& classname, const TQCString& property, const TQString& value);
WidgetLibrary *m_library;
- QCString m_editedWidgetClass;
+ TQCString m_editedWidgetClass;
//#ifdef KEXI_KTEXTEDIT
-// QGuardedPtr<KTextEdit> m_editor;
+// TQGuardedPtr<KTextEdit> m_editor;
//#else
-// QGuardedPtr<KLineEdit> m_editor;
+// TQGuardedPtr<KLineEdit> m_editor;
//#endif
- QString m_firstText;
- QGuardedPtr<ResizeHandleSet> m_handles;
- QGuardedPtr<Container> m_container;
+ TQString m_firstText;
+ TQGuardedPtr<ResizeHandleSet> m_handles;
+ TQGuardedPtr<Container> m_container;
// WidgetInfo::List m_classes;
WidgetInfo::Dict m_classesByName;
- QAsciiDict<char>* m_hiddenClasses;
+ TQAsciiDict<char>* m_hiddenClasses;
//! i18n stuff
- QMap<QCString, QString> m_propDesc;
- QMap<QCString, QString> m_propValDesc;
+ TQMap<TQCString, TQString> m_propDesc;
+ TQMap<TQCString, TQString> m_propValDesc;
//! internal properties
- QMap<QCString, QString> m_internalProp;
+ TQMap<TQCString, TQString> m_internalProp;
/*! flag useful to decide whether to hide some properties.
It's value is inherited from WidgetLibrary. */
@@ -500,12 +501,12 @@ class KFORMEDITOR_EXPORT WidgetFactory : public QObject
(and menu items in the future?) for the factory.
Can be empty, e.g. for the main factory which has XMLGUI defined in the shell window itself
(e.g. kexiformpartinstui.rc for Kexi Forms). This name is set in WidgetLibrary::loadFactories() */
- QString m_xmlGUIFileName;
+ TQString m_xmlGUIFileName;
KXMLGUIClient *m_guiClient;
- QGuardedPtr<QWidget> m_widget;
- QGuardedPtr<QWidget> m_editor;
+ TQGuardedPtr<TQWidget> m_widget;
+ TQGuardedPtr<TQWidget> m_editor;
friend class WidgetLibrary;
};
diff --git a/kexi/formeditor/widgetlibrary.cpp b/kexi/formeditor/widgetlibrary.cpp
index 1a1981952..265153e74 100644
--- a/kexi/formeditor/widgetlibrary.cpp
+++ b/kexi/formeditor/widgetlibrary.cpp
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qstrlist.h>
+#include <tqdom.h>
+#include <tqstrlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -40,11 +40,11 @@
namespace KFormDesigner {
//! @internal
-class XMLGUIClient : public QObject, public KXMLGUIClient
+class XMLGUIClient : public TQObject, public KXMLGUIClient
{
public:
- XMLGUIClient(KXMLGUIClient* parent, const QString& xmlFileName)
- : QObject(parent->actionCollection()), KXMLGUIClient(parent)
+ XMLGUIClient(KXMLGUIClient* tqparent, const TQString& xmlFileName)
+ : TQObject(tqparent->actionCollection()), KXMLGUIClient(tqparent)
{
setXMLFile( xmlFileName, true /*merge*/ );
}
@@ -79,10 +79,10 @@ class WidgetLibraryPrivate
/*! @todo: reenable */ advancedProperties.insert("palette", (char*)1);
advancedProperties.insert("backgroundOrigin", (char*)1);
advancedProperties.insert("backgroundMode", (char*)1);//this is rather useless
- advancedProperties.insert("layout", (char*)1);// too large risk to break things
+ advancedProperties.insert("tqlayout", (char*)1);// too large risk to break things
// by providing this in propeditor
- advancedProperties.insert("minimumSize", (char*)1);
- advancedProperties.insert("maximumSize", (char*)1);
+ advancedProperties.insert("tqminimumSize", (char*)1);
+ advancedProperties.insert("tqmaximumSize", (char*)1);
#ifdef KEXI_NO_UNFINISHED
/*! @todo reenable */
advancedProperties.insert("paletteBackgroundPixmap", (char*)1);
@@ -93,11 +93,11 @@ class WidgetLibraryPrivate
}
// dict which associates a class name with a Widget class
WidgetInfo::Dict widgets;//, alternateWidgets;
- QAsciiDict<KService::Ptr> services;
- QAsciiDict<char> supportedFactoryGroups;
- QAsciiDict<WidgetFactory> factories;
- QAsciiDict<char> advancedProperties;
- QAsciiDict<char> hiddenClasses;
+ TQAsciiDict<KService::Ptr> services;
+ TQAsciiDict<char> supportedFactoryGroups;
+ TQAsciiDict<WidgetFactory> factories;
+ TQAsciiDict<char> advancedProperties;
+ TQAsciiDict<char> hiddenClasses;
bool showAdvancedProperties : 1;
bool factoriesLoaded : 1;
};
@@ -107,11 +107,11 @@ using namespace KFormDesigner;
//-------------------------------------------
-WidgetLibrary::WidgetLibrary(QObject *parent, const QStringList& supportedFactoryGroups)
- : QObject(parent)
+WidgetLibrary::WidgetLibrary(TQObject *tqparent, const TQStringList& supportedFactoryGroups)
+ : TQObject(tqparent)
, d(new WidgetLibraryPrivate())
{
- for (QStringList::ConstIterator it = supportedFactoryGroups.constBegin();
+ for (TQStringList::ConstIterator it = supportedFactoryGroups.constBegin();
it!=supportedFactoryGroups.constEnd(); ++it)
{
d->supportedFactoryGroups.insert( (*it).lower().latin1(), (char*)1);
@@ -129,19 +129,19 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f)
{
const WidgetInfo::Dict widgets = f->classes();
WidgetInfo *w;
- for(QAsciiDictIterator<WidgetInfo> it(widgets); (w = it.current()); ++it)
+ for(TQAsciiDictIterator<WidgetInfo> it(widgets); (w = it.current()); ++it)
{
if (0 != d->hiddenClasses[ w->className() ])
continue; //this class is hidden
// check if we want to inherit a widget from a different factory
if (!w->m_parentFactoryName.isEmpty() && !w->m_inheritedClassName.isEmpty()) {
- WidgetFactory *parentFactory = d->factories[w->m_parentFactoryName];
- if (!parentFactory) {
+ WidgetFactory *tqparentFactory = d->factories[w->m_parentFactoryName];
+ if (!tqparentFactory) {
kdWarning() << "WidgetLibrary::loadFactoryWidgets(): class '" << w->className()
- << "' - no such parent factory '" << w->m_parentFactoryName << "'" << endl;
+ << "' - no such tqparent factory '" << w->m_parentFactoryName << "'" << endl;
continue;
}
- WidgetInfo* inheritedClass = parentFactory->m_classesByName[ w->m_inheritedClassName ];
+ WidgetInfo* inheritedClass = tqparentFactory->m_classesByName[ w->m_inheritedClassName ];
if (!inheritedClass) {
kdWarning() << "WidgetLibrary::loadFactoryWidgets(): class '" << w->m_inheritedClassName
<< "' - no such class to inherit in factory '" << w->m_parentFactoryName << "'" << endl;
@@ -152,7 +152,7 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f)
if (w->pixmap().isEmpty())
w->setPixmap( inheritedClass->pixmap() );
//ok?
- foreach (QValueList<QCString>::ConstIterator, it_alt, inheritedClass->m_alternateNames) {
+ foreach (TQValueList<TQCString>::ConstIterator, it_alt, inheritedClass->m_alternateNames) {
w->addAlternateClassName( *it_alt, inheritedClass->isOverriddenClassName( *it_alt ) );
}
if (w->includeFileName().isEmpty())
@@ -166,27 +166,27 @@ WidgetLibrary::loadFactoryWidgets(WidgetFactory *f)
}
// kdDebug() << "WidgetLibrary::addFactory(): adding class " << w->className() << endl;
- QValueList<QCString> l = w->alternateClassNames();
+ TQValueList<TQCString> l = w->alternateClassNames();
l.prepend( w->className() );
//d->widgets.insert(w->className(), w);
// if(!w->alternateClassName().isEmpty()) {
-// QStringList l = QStringList::split("|", w->alternateClassName());
- QValueList<QCString>::ConstIterator endIt = l.constEnd();
- for(QValueList<QCString>::ConstIterator it = l.constBegin(); it != endIt; ++it) {
- WidgetInfo *widgetForClass = d->widgets.find( *it );
+// TQStringList l = TQStringList::split("|", w->alternateClassName());
+ TQValueList<TQCString>::ConstIterator endIt = l.constEnd();
+ for(TQValueList<TQCString>::ConstIterator it = l.constBegin(); it != endIt; ++it) {
+ WidgetInfo *widgetForClass = d->widgets.tqfind( *it );
if (!widgetForClass || (widgetForClass && !widgetForClass->isOverriddenClassName(*it))) {
//insert a widgetinfo, if:
//1) this class has no alternate class assigned yet, or
//2) this class has alternate class assigned but without 'override' flag
- d->widgets.replace( *it, w);
+ d->widgets.tqreplace( *it, w);
}
-/* WidgetInfo *widgetForClass = d->alternateWidgets.find(*it);
+/* WidgetInfo *widgetForClass = d->alternateWidgets.tqfind(*it);
if (!widgetForClass || (widgetForClass && !widgetForClass->isOverriddenClassName(*it))) {
//insert a widgetinfo, if:
//1) this class has no alternate class assigned yet, or
//2) this class has alternate class assigned but without 'override' flag
- d->alternateWidgets.replace(*it, w);
+ d->alternateWidgets.tqreplace(*it, w);
}*/
}
}
@@ -209,7 +209,7 @@ WidgetLibrary::lookupFactories()
}
kdDebug() << "WidgetLibrary::lookupFactories(): found factory: " << ptr->name() << endl;
- QCString groupName = ptr->property("X-KFormDesigner-FactoryGroup").toCString();
+ TQCString groupName = ptr->property("X-KFormDesigner-FactoryGroup").toCString();
if (!groupName.isEmpty() && !d->supportedFactoryGroups[groupName]) {
kdDebug() << "WidgetLibrary::lookupFactories(): factory group '" << groupName
<< "' is unsupported by this application (library=" << ptr->library() << ")"<< endl;
@@ -217,10 +217,10 @@ WidgetLibrary::lookupFactories()
}
const uint factoryVersion = ptr->property("X-KFormDesigner-WidgetFactoryVersion").toUInt();
if (KFormDesigner::version()!=factoryVersion) {
- kdWarning() << QString("WidgetLibrary::lookupFactories(): factory '%1'"
+ kdWarning() << TQString("WidgetLibrary::lookupFactories(): factory '%1'"
" has version '%2' but required Widget Factory version is '%3'\n"
- " -- skipping this factory!").arg(ptr->library()).arg(factoryVersion)
- .arg(KFormDesigner::version()) << endl;
+ " -- skipping this factory!").tqarg(ptr->library()).tqarg(factoryVersion)
+ .tqarg(KFormDesigner::version()) << endl;
continue;
}
d->services.insert(ptr->library().latin1(), new KService::Ptr( ptr ));
@@ -233,9 +233,9 @@ WidgetLibrary::loadFactories()
if (d->factoriesLoaded)
return;
d->factoriesLoaded = true;
- for (QAsciiDictIterator<KService::Ptr> it(d->services); it.current(); ++it) {
+ for (TQAsciiDictIterator<KService::Ptr> it(d->services); it.current(); ++it) {
WidgetFactory *f = KParts::ComponentFactory::createInstanceFromService<WidgetFactory>(
- *it.current(), this, (*it.current())->library().latin1(), QStringList());
+ *it.current(), this, (*it.current())->library().latin1(), TQStringList());
if (!f) {
kdWarning() << "WidgetLibrary::loadFactories(): creating factory failed! "
<< (*it.current())->library() << endl;
@@ -248,15 +248,15 @@ WidgetLibrary::loadFactories()
//collect information about classes to be hidden
if (f->m_hiddenClasses) {
- for (QAsciiDictIterator<char> it2(*f->m_hiddenClasses); it2.current(); ++it2) {
- d->hiddenClasses.replace( it2.currentKey(), (char*)1 );
+ for (TQAsciiDictIterator<char> it2(*f->m_hiddenClasses); it2.current(); ++it2) {
+ d->hiddenClasses.tqreplace( it2.currentKey(), (char*)1 );
}
}
}
//now we have factories instantiated: load widgets
- QPtrList<WidgetFactory> loadLater;
- for (QAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it) {
+ TQPtrList<WidgetFactory> loadLater;
+ for (TQAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it) {
//ONE LEVEL, FLAT INHERITANCE, but works!
//if this factory inherits from something, load its witgets later
//! @todo improve
@@ -266,49 +266,49 @@ WidgetLibrary::loadFactories()
loadFactoryWidgets(it.current());
}
//load now the rest
- for (QPtrListIterator<WidgetFactory> it(loadLater); it.current(); ++it) {
+ for (TQPtrListIterator<WidgetFactory> it(loadLater); it.current(); ++it) {
loadFactoryWidgets(it.current());
}
}
/* old
-QString
+TQString
WidgetLibrary::createXML()
{
loadFactories();
- QDomDocument doc("kpartgui");
- QDomElement root = doc.createElement("kpartgui");
+ TQDomDocument doc("kpartgui");
+ TQDomElement root = doc.createElement("kpartgui");
root.setAttribute("name", "kformdesigner");
root.setAttribute("version", "0.3");
doc.appendChild(root);
- QDomElement toolbar = doc.createElement("ToolBar");
+ TQDomElement toolbar = doc.createElement("ToolBar");
toolbar.setAttribute("name", "widgets");
root.appendChild(toolbar);
- QDomElement texttb = doc.createElement("text");
+ TQDomElement texttb = doc.createElement("text");
toolbar.appendChild(texttb);
- QDomText ttext = doc.createTextNode("Widgets");
+ TQDomText ttext = doc.createTextNode("Widgets");
texttb.appendChild(ttext);
- QDomElement menubar = doc.createElement("MenuBar");
+ TQDomElement menubar = doc.createElement("MenuBar");
toolbar.setAttribute("name", "widgets");
root.appendChild(menubar);
- QDomElement Mtextb = doc.createElement("text");
+ TQDomElement Mtextb = doc.createElement("text");
toolbar.appendChild(Mtextb);
- QDomText Mtext = doc.createTextNode("Widgets");
+ TQDomText Mtext = doc.createTextNode("Widgets");
Mtextb.appendChild(Mtext);
- QDomElement menu = doc.createElement("Menu");
+ TQDomElement menu = doc.createElement("Menu");
menu.setAttribute("name", "widgets");
- QAsciiDictIterator<WidgetInfo> it(d->widgets);
+ TQAsciiDictIterator<WidgetInfo> it(d->widgets);
int i = 0;
for(; it.current(); ++it)
{
- QDomElement action = doc.createElement("Action");
+ TQDomElement action = doc.createElement("Action");
action.setAttribute("name", "library_widget" + it.current()->className());
toolbar.appendChild(action);
@@ -319,13 +319,13 @@ WidgetLibrary::createXML()
}*/
ActionList
-WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *parent,
- QObject *receiver, const char *slot)
+WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *tqparent,
+ TQObject *receiver, const char *slot)
{
loadFactories();
// init XML gui clients (custom factories have their own .rc files)
- for (QAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it)
+ for (TQAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it)
{
if (it.current()->m_xmlGUIFileName.isEmpty()) { // probably a built-in factory, with GUI file like kexiformpartinstui.rc
it.current()->m_guiClient = 0;
@@ -336,12 +336,12 @@ WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *par
}
ActionList actions;
- for (QAsciiDictIterator<WidgetInfo> it(d->widgets); it.current(); ++it)
+ for (TQAsciiDictIterator<WidgetInfo> it(d->widgets); it.current(); ++it)
{
LibActionWidget *a = new LibActionWidget(it.current(),
it.current()->factory()->m_guiClient
- ? it.current()->factory()->m_guiClient->actionCollection() : parent);
- connect(a, SIGNAL(prepareInsert(const QCString &)), receiver, slot);
+ ? it.current()->factory()->m_guiClient->actionCollection() : tqparent);
+ connect(a, TQT_SIGNAL(prepareInsert(const TQCString &)), receiver, slot);
actions.append(a);
}
return actions;
@@ -350,7 +350,7 @@ WidgetLibrary::createWidgetActions(KXMLGUIClient* client, KActionCollection *par
void
WidgetLibrary::addCustomWidgetActions(KActionCollection *col)
{
- for (QAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it)
+ for (TQAsciiDictIterator<WidgetFactory> it(d->factories); it.current(); ++it)
{
it.current()->createCustomActions(
it.current()->m_guiClient
@@ -358,8 +358,8 @@ WidgetLibrary::addCustomWidgetActions(KActionCollection *col)
}
}
-QWidget*
-WidgetLibrary::createWidget(const QCString &classname, QWidget *parent, const char *name, Container *c,
+TQWidget*
+WidgetLibrary::createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, Container *c,
int options)
{
loadFactories();
@@ -367,12 +367,12 @@ WidgetLibrary::createWidget(const QCString &classname, QWidget *parent, const ch
if(!wclass)
return 0;
- QWidget *widget = wclass->factory()->createWidget(wclass->className(), parent, name, c, options);
+ TQWidget *widget = wclass->factory()->createWidget(wclass->className(), tqparent, name, c, options);
if (!widget) {
//try to instantiate from inherited class
if (wclass->inheritedClass())
widget = wclass->inheritedClass()->factory()->createWidget(
- wclass->className(), parent, name, c, options);
+ wclass->className(), tqparent, name, c, options);
if (!widget)
return 0;
}
@@ -382,7 +382,7 @@ WidgetLibrary::createWidget(const QCString &classname, QWidget *parent, const ch
}
bool
-WidgetLibrary::createMenuActions(const QCString &c, QWidget *w, QPopupMenu *menu,
+WidgetLibrary::createMenuActions(const TQCString &c, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container)
{
loadFactories();
@@ -402,7 +402,7 @@ WidgetLibrary::createMenuActions(const QCString &c, QWidget *w, QPopupMenu *menu
}
bool
-WidgetLibrary::startEditing(const QCString &classname, QWidget *w, Container *container)
+WidgetLibrary::startEditing(const TQCString &classname, TQWidget *w, Container *container)
{
loadFactories();
WidgetInfo *wclass = d->widgets[classname];
@@ -418,7 +418,7 @@ WidgetLibrary::startEditing(const QCString &classname, QWidget *w, Container *co
}
bool
-WidgetLibrary::previewWidget(const QCString &classname, QWidget *widget, Container *container)
+WidgetLibrary::previewWidget(const TQCString &classname, TQWidget *widget, Container *container)
{
loadFactories();
WidgetInfo *wclass = d->widgets[classname];
@@ -434,7 +434,7 @@ WidgetLibrary::previewWidget(const QCString &classname, QWidget *widget, Contain
}
bool
-WidgetLibrary::clearWidgetContent(const QCString &classname, QWidget *w)
+WidgetLibrary::clearWidgetContent(const TQCString &classname, TQWidget *w)
{
loadFactories();
WidgetInfo *wclass = d->widgets[classname];
@@ -449,59 +449,59 @@ WidgetLibrary::clearWidgetContent(const QCString &classname, QWidget *w)
return false;
}
-QString
-WidgetLibrary::displayName(const QCString &classname)
+TQString
+WidgetLibrary::displayName(const TQCString &classname)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(wi)
return wi->name();
return classname;
}
-QString
-WidgetLibrary::savingName(const QCString &classname)
+TQString
+WidgetLibrary::savingName(const TQCString &classname)
{
loadFactories();
- QString s;
- WidgetInfo *wi = d->widgets.find(classname);
+ TQString s;
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(wi && !wi->savingName().isEmpty())
return wi->savingName();
return classname;
}
-QString
-WidgetLibrary::namePrefix(const QCString &classname)
+TQString
+WidgetLibrary::namePrefix(const TQCString &classname)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(wi)
return wi->namePrefix();
return classname;
}
-QString
-WidgetLibrary::textForWidgetName(const QCString &name, const QCString &className)
+TQString
+WidgetLibrary::textForWidgetName(const TQCString &name, const TQCString &className)
{
loadFactories();
WidgetInfo *widget = d->widgets[className];
if(!widget)
- return QString::null;
+ return TQString();
- QString newName = name;
+ TQString newName = name;
newName.remove(widget->namePrefix());
newName = widget->name() + " " + newName;
return newName;
}
-QCString
-WidgetLibrary::classNameForAlternate(const QCString &classname)
+TQCString
+WidgetLibrary::classNameForAlternate(const TQCString &classname)
{
loadFactories();
- if(d->widgets.find(classname))
+ if(d->widgets.tqfind(classname))
return classname;
WidgetInfo *wi = d->widgets[classname];
@@ -513,49 +513,49 @@ WidgetLibrary::classNameForAlternate(const QCString &classname)
return "CustomWidget";
}
-QString
-WidgetLibrary::includeFileName(const QCString &classname)
+TQString
+WidgetLibrary::includeFileName(const TQCString &classname)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(wi)
return wi->includeFileName();
- return QString::null;
+ return TQString();
}
-QString
-WidgetLibrary::iconName(const QCString &classname)
+TQString
+WidgetLibrary::iconName(const TQCString &classname)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(wi)
return wi->pixmap();
- return QString::fromLatin1("unknown_widget");
+ return TQString::tqfromLatin1("unknown_widget");
}
bool
-WidgetLibrary::saveSpecialProperty(const QCString &classname, const QString &name, const QVariant &value, QWidget *w, QDomElement &parentNode, QDomDocument &parent)
+WidgetLibrary::saveSpecialProperty(const TQCString &classname, const TQString &name, const TQVariant &value, TQWidget *w, TQDomElement &tqparentNode, TQDomDocument &tqparent)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if (!wi)
return false;
- if (wi->factory()->saveSpecialProperty(classname, name, value, w, parentNode, parent))
+ if (wi->factory()->saveSpecialProperty(classname, name, value, w, tqparentNode, tqparent))
return true;
//try from inherited class
if (wi->inheritedClass())
- return wi->inheritedClass()->factory()->saveSpecialProperty(wi->className(), name, value, w, parentNode, parent);
+ return wi->inheritedClass()->factory()->saveSpecialProperty(wi->className(), name, value, w, tqparentNode, tqparent);
return false;
}
bool
-WidgetLibrary::readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, ObjectTreeItem *item)
+WidgetLibrary::readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, ObjectTreeItem *item)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if (!wi)
return false;
if (wi->factory()->readSpecialProperty(classname, node, w, item))
@@ -577,8 +577,8 @@ bool WidgetLibrary::advancedPropertiesVisible() const
}
bool
-WidgetLibrary::isPropertyVisible(const QCString &classname, QWidget *w,
- const QCString &property, bool multiple, bool isTopLevel)
+WidgetLibrary::isPropertyVisible(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool multiple, bool isTopLevel)
{
if (isTopLevel) {
// no focus policy for top-level form widget...
@@ -587,7 +587,7 @@ WidgetLibrary::isPropertyVisible(const QCString &classname, QWidget *w,
}
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if (!wi)
return false;
if (!d->showAdvancedProperties && d->advancedProperties[ property ]) {
@@ -609,14 +609,14 @@ WidgetLibrary::isPropertyVisible(const QCString &classname, QWidget *w,
return true;
}
-QValueList<QCString>
-WidgetLibrary::autoSaveProperties(const QCString &classname)
+TQValueList<TQCString>
+WidgetLibrary::autoSaveProperties(const TQCString &classname)
{
loadFactories();
- WidgetInfo *wi = d->widgets.find(classname);
+ WidgetInfo *wi = d->widgets.tqfind(classname);
if(!wi)
- return QValueList<QCString>();
- QValueList<QCString> lst;
+ return TQValueList<TQCString>();
+ TQValueList<TQCString> lst;
//prepend from inherited class
if (wi->inheritedClass())
lst = wi->inheritedClass()->factory()->autoSaveProperties(wi->className());
@@ -628,7 +628,7 @@ WidgetInfo*
WidgetLibrary::widgetInfoForClassName(const char* classname)
{
loadFactories();
- return d->widgets.find(classname);
+ return d->widgets.tqfind(classname);
}
WidgetFactory*
@@ -638,53 +638,53 @@ WidgetLibrary::factoryForClassName(const char* classname)
return wi ? wi->factory() : 0;
}
-QString WidgetLibrary::propertyDescForName(WidgetInfo *winfo, const QCString& propertyName)
+TQString WidgetLibrary::propertyDescForName(WidgetInfo *winfo, const TQCString& propertyName)
{
if (!winfo || !winfo->factory())
- return QString::null;
- QString desc( winfo->factory()->propertyDescForName(propertyName) );
+ return TQString();
+ TQString desc( winfo->factory()->propertyDescForName(propertyName) );
if (!desc.isEmpty())
return desc;
if (winfo->m_parentFactoryName.isEmpty())
- return QString::null;
+ return TQString();
- //try in parent factory, if exists
- WidgetFactory *parentFactory = d->factories[winfo->m_parentFactoryName];
- if (!parentFactory)
- return QString::null;
+ //try in tqparent factory, if exists
+ WidgetFactory *tqparentFactory = d->factories[winfo->m_parentFactoryName];
+ if (!tqparentFactory)
+ return TQString();
- return parentFactory->propertyDescForName(propertyName);
+ return tqparentFactory->propertyDescForName(propertyName);
}
-QString WidgetLibrary::propertyDescForValue(WidgetInfo *winfo, const QCString& name)
+TQString WidgetLibrary::propertyDescForValue(WidgetInfo *winfo, const TQCString& name)
{
if (!winfo->factory())
- return QString::null;
- QString desc( winfo->factory()->propertyDescForValue(name) );
+ return TQString();
+ TQString desc( winfo->factory()->propertyDescForValue(name) );
if (!desc.isEmpty())
return desc;
if (winfo->m_parentFactoryName.isEmpty())
- return QString::null;
+ return TQString();
- //try in parent factory, if exists
- WidgetFactory *parentFactory = d->factories[winfo->m_parentFactoryName];
- if (!parentFactory)
- return QString::null;
+ //try in tqparent factory, if exists
+ WidgetFactory *tqparentFactory = d->factories[winfo->m_parentFactoryName];
+ if (!tqparentFactory)
+ return TQString();
- return parentFactory->propertyDescForValue(name);
+ return tqparentFactory->propertyDescForValue(name);
}
-void WidgetLibrary::setPropertyOptions( WidgetPropertySet& buf, const WidgetInfo& winfo, QWidget* w )
+void WidgetLibrary::setPropertyOptions( WidgetPropertySet& buf, const WidgetInfo& winfo, TQWidget* w )
{
if (!winfo.factory())
return;
winfo.factory()->setPropertyOptions(buf, winfo, w);
if (winfo.m_parentFactoryName.isEmpty())
return;
- WidgetFactory *parentFactory = d->factories[winfo.m_parentFactoryName];
- if (!parentFactory)
+ WidgetFactory *tqparentFactory = d->factories[winfo.m_parentFactoryName];
+ if (!tqparentFactory)
return;
- parentFactory->setPropertyOptions(buf, winfo, w);
+ tqparentFactory->setPropertyOptions(buf, winfo, w);
}
WidgetFactory* WidgetLibrary::factory(const char* factoryName) const
@@ -692,20 +692,20 @@ WidgetFactory* WidgetLibrary::factory(const char* factoryName) const
return d->factories[factoryName];
}
-QString WidgetLibrary::internalProperty(const QCString& classname, const QCString& property)
+TQString WidgetLibrary::internalProperty(const TQCString& classname, const TQCString& property)
{
loadFactories();
WidgetInfo *wclass = d->widgets[classname];
if(!wclass)
- return QString::null;
- QString value( wclass->factory()->internalProperty(classname, property) );
+ return TQString();
+ TQString value( wclass->factory()->internalProperty(classname, property) );
if (value.isEmpty() && wclass->inheritedClass())
return wclass->inheritedClass()->factory()->internalProperty(classname, property);
return value;
}
WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup(
- const QCString &classname, QWidget* parent, const QPoint& pos)
+ const TQCString &classname, TQWidget* tqparent, const TQPoint& pos)
{
loadFactories();
WidgetInfo *wclass = d->widgets[classname];
@@ -713,8 +713,8 @@ WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup(
return WidgetFactory::AnyOrientation;
//get custom icons and strings
- QPixmap iconHorizontal, iconVertical;
- QString iconName( wclass->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalIcon") );
+ TQPixmap iconHorizontal, iconVertical;
+ TQString iconName( wclass->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalIcon") );
if (iconName.isEmpty() && wclass->inheritedClass())
iconName = wclass->inheritedClass()->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalIcon");
if (!iconName.isEmpty())
@@ -726,20 +726,20 @@ WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup(
if (!iconName.isEmpty())
iconVertical = SmallIcon(iconName);
- QString textHorizontal = wclass->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalText");
+ TQString textHorizontal = wclass->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalText");
if (textHorizontal.isEmpty() && wclass->inheritedClass())
iconName = wclass->inheritedClass()->factory()->internalProperty(classname, "orientationSelectionPopup:horizontalText");
if (textHorizontal.isEmpty()) //default
- textHorizontal = i18n("Insert Horizontal Widget", "Insert Horizontal");
+ textHorizontal = i18n("InsertQt::Horizontal Widget", "InsertQt::Horizontal");
- QString textVertical = wclass->factory()->internalProperty(classname, "orientationSelectionPopup:verticalText");
+ TQString textVertical = wclass->factory()->internalProperty(classname, "orientationSelectionPopup:verticalText");
if (textVertical.isEmpty() && wclass->inheritedClass())
iconName = wclass->inheritedClass()->factory()->internalProperty(classname, "orientationSelectionPopup:verticalText");
if (textVertical.isEmpty()) //default
- textVertical = i18n("Insert Vertical Widget", "Insert Vertical");
+ textVertical = i18n("InsertQt::Vertical Widget", "InsertQt::Vertical");
- KPopupMenu* popup = new KPopupMenu(parent, "orientationSelectionPopup");
- popup->insertTitle(SmallIcon(wclass->pixmap()), i18n("Insert Widget: %1").arg(wclass->name()));
+ KPopupMenu* popup = new KPopupMenu(tqparent, "orientationSelectionPopup");
+ popup->insertTitle(SmallIcon(wclass->pixmap()), i18n("Insert Widget: %1").tqarg(wclass->name()));
popup->insertItem(iconHorizontal, textHorizontal, 1);
popup->insertItem(iconVertical, textVertical, 2);
popup->insertSeparator();
@@ -758,7 +758,7 @@ WidgetFactory::CreateWidgetOptions WidgetLibrary::showOrientationSelectionPopup(
}
bool WidgetLibrary::propertySetShouldBeReloadedAfterPropertyChange(
- const QCString& classname, QWidget *w, const QCString& property)
+ const TQCString& classname, TQWidget *w, const TQCString& property)
{
WidgetInfo *winfo = widgetInfoForClassName(classname);
if (!winfo)
diff --git a/kexi/formeditor/widgetlibrary.h b/kexi/formeditor/widgetlibrary.h
index f4f8c1f3f..d8a6529a5 100644
--- a/kexi/formeditor/widgetlibrary.h
+++ b/kexi/formeditor/widgetlibrary.h
@@ -22,21 +22,21 @@
#ifndef KFORMDESIGNERWIDGETLIBRARY_H
#define KFORMDESIGNERWIDGETLIBRARY_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include "widgetfactory.h"
-template<class type> class QPtrList;
-template<class type> class QValueVector;
+template<class type> class TQPtrList;
+template<class type> class TQValueVector;
class KActionCollection;
class KAction;
-class QWidget;
-class QPopupMenu;
-class QVariant;
-class QDomDocument;
-class QDomElement;
+class TQWidget;
+class TQPopupMenu;
+class TQVariant;
+class TQDomDocument;
+class TQDomElement;
namespace KFormDesigner {
@@ -45,7 +45,7 @@ class ObjectTreeItem;
class WidgetLibraryPrivate;
class WidgetPropertySet;
-typedef QPtrList<KAction> ActionList;
+typedef TQPtrList<KAction> ActionList;
/**
* This class searches for factories and provides KActions for widget creation.
@@ -53,9 +53,10 @@ typedef QPtrList<KAction> ActionList;
* You call WidgetLibrary functions instead of calling directly factories.
* See WidgetFactory for a description of the functions.
*/
-class KFORMEDITOR_EXPORT WidgetLibrary : public QObject
+class KFORMEDITOR_EXPORT WidgetLibrary : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructs WidgetLibrary object.
@@ -65,69 +66,69 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public QObject
By default (when supportedFactoryGroups is empty) only factories having empty
"X-KFormDesigner-FactoryGroup" field will be loaded.
Factory group names are case-insensitive. */
- WidgetLibrary(QObject *parent=0, const QStringList& supportedFactoryGroups = QStringList());
+ WidgetLibrary(TQObject *tqparent=0, const TQStringList& supportedFactoryGroups = TQStringList());
virtual ~WidgetLibrary();
/**
* creates actions for widget creating
*/
- ActionList createWidgetActions(KXMLGUIClient* client, KActionCollection *parent,
- QObject *receiver, const char *slot);
+ ActionList createWidgetActions(KXMLGUIClient* client, KActionCollection *tqparent,
+ TQObject *receiver, const char *slot);
void addCustomWidgetActions(KActionCollection *col);
//old /**
//old * creates the XML for widget actions
//old */
-//old QString createXML();
+//old TQString createXML();
/**
* searches the right factory and creates a widget.
* \return the widget or 0 if something falid
*/
- QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name, Container *c,
+ TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, Container *c,
int options = WidgetFactory::DefaultOptions);
- bool createMenuActions(const QCString &c, QWidget *w, QPopupMenu *menu,
+ bool createMenuActions(const TQCString &c, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
/**
* Shows orientation selection popup.
* \return one of the following values:
- * - WidgetFactory::AnyOrientation (means no selection has been made, i.e. it was cancelled)
- * - WidgetFactory::HorizontalOrientation
- * - WidgetFactory::VerticalOrientation
+ * - WidgetFactory::AnyQt::Orientation (means no selection has been made, i.e. it was cancelled)
+ * - WidgetFactory::HorizontalQt::Orientation
+ * - WidgetFactory::VerticalQt::Orientation
*/
WidgetFactory::CreateWidgetOptions showOrientationSelectionPopup(
- const QCString &classname, QWidget* parent, const QPoint& pos);
+ const TQCString &classname, TQWidget* tqparent, const TQPoint& pos);
- QString internalProperty(const QCString& classname, const QCString& property);
+ TQString internalProperty(const TQCString& classname, const TQCString& property);
- QString displayName(const QCString &classname);
- QString namePrefix(const QCString &classname);
- QString textForWidgetName(const QCString &name, const QCString &className);
+ TQString displayName(const TQCString &classname);
+ TQString namePrefix(const TQCString &classname);
+ TQString textForWidgetName(const TQCString &name, const TQCString &className);
/*! Checks if the \a classname is an alternate classname,
and returns the good classname.
If \a classname is not alternate, \a classname is returned. */
- QCString classNameForAlternate(const QCString &classname);
- QString iconName(const QCString &classname);
- QString includeFileName(const QCString &classname);
- QString savingName(const QCString &classname);
-
- bool startEditing(const QCString &classname, QWidget *w, Container *container);
- bool previewWidget(const QCString &classname, QWidget *widget, Container *container);
- bool clearWidgetContent(const QCString &classname, QWidget *w);
-
- bool saveSpecialProperty(const QCString &classname, const QString &name,
- const QVariant &value, QWidget *w, QDomElement &parentNode, QDomDocument &parent);
- bool readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w,
+ TQCString classNameForAlternate(const TQCString &classname);
+ TQString iconName(const TQCString &classname);
+ TQString includeFileName(const TQCString &classname);
+ TQString savingName(const TQCString &classname);
+
+ bool startEditing(const TQCString &classname, TQWidget *w, Container *container);
+ bool previewWidget(const TQCString &classname, TQWidget *widget, Container *container);
+ bool clearWidgetContent(const TQCString &classname, TQWidget *w);
+
+ bool saveSpecialProperty(const TQCString &classname, const TQString &name,
+ const TQVariant &value, TQWidget *w, TQDomElement &tqparentNode, TQDomDocument &tqparent);
+ bool readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w,
ObjectTreeItem *item);
- bool isPropertyVisible(const QCString &classname, QWidget *w,
- const QCString &property, bool multiple = false, bool isTopLevel = false);
+ bool isPropertyVisible(const TQCString &classname, TQWidget *w,
+ const TQCString &property, bool multiple = false, bool isTopLevel = false);
- QValueList<QCString> autoSaveProperties(const QCString &classname);
+ TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
WidgetInfo* widgetInfoForClassName(const char* classname);
@@ -148,34 +149,34 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public QObject
for a class described by \a winfo. The name can be displayed in
PropertyEditor. The name is retrieved from class' widget library.
If this library doesn't define description for such property,
- and there is a parent library for \a winfo defined, parent library
+ and there is a tqparent library for \a winfo defined, tqparent library
is asked for returning description string.
Eventually, if even this failed, empty string is returned.
@see WidgetFactory::propertyDescForName() */
- QString propertyDescForName(WidgetInfo *winfo, const QCString& propertyName);
+ TQString propertyDescForName(WidgetInfo *winfo, const TQCString& propertyName);
/*! \return The i18n'ed name of the property's value whose name is \a name.
Works in the same way as propertyDescForName(): if actual library
- does not define a description we are looking for, parent factory is asked
+ does not define a description we are looking for, tqparent factory is asked
to return such description.
Eventually, if even this failed, empty string is returned.
@see WidgetFactory::propertyDescForValue() */
- QString propertyDescForValue(WidgetInfo *winfo, const QCString& name);
+ TQString propertyDescForValue(WidgetInfo *winfo, const TQCString& name);
/*! Used by WidgetPropertySet::setWidget() after creating properties. */
- void setPropertyOptions( WidgetPropertySet &list, const WidgetInfo& winfo, QWidget* w );
+ void setPropertyOptions( WidgetPropertySet &list, const WidgetInfo& winfo, TQWidget* w );
/*! \return true if property sets should be reloaded for \a property property,
\a classname class and widget \a w when a given property value changed. */
- bool propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property);
+ bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property);
signals:
- void prepareInsert(const QCString &c);
+ void prepareInsert(const TQCString &c);
//! Received by KexiFormPart::slotWidgetCreatedByFormsLibrary() so we can add drag/drop
//! connection for the new widget
- void widgetCreated(QWidget *widget);
+ void widgetCreated(TQWidget *widget);
protected:
/**
@@ -192,7 +193,7 @@ class KFORMEDITOR_EXPORT WidgetLibrary : public QObject
* but don't want to confuse the user... are you confused now?
* NB: not implemented yet
*/
- void setFilter(const QRegExp &expr);
+ void setFilter(const TQRegExp &expr);
#endif
/**
diff --git a/kexi/formeditor/widgetpropertyset.cpp b/kexi/formeditor/widgetpropertyset.cpp
index 497fb5e64..e1c3a1e97 100644
--- a/kexi/formeditor/widgetpropertyset.cpp
+++ b/kexi/formeditor/widgetpropertyset.cpp
@@ -19,14 +19,14 @@
*/
#include "widgetpropertyset.h"
-#include <qstringlist.h>
-#include <qstrlist.h>
-#include <qmetaobject.h>
-#include <qvariant.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqstringlist.h>
+#include <tqstrlist.h>
+#include <tqmetaobject.h>
+#include <tqvariant.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <klocale.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ using namespace KFormDesigner;
namespace KFormDesigner {
//! @internal
-typedef QValueList< QGuardedPtr<QWidget> > QGuardedWidgetList;
+typedef TQValueList< TQGuardedPtr<TQWidget> > TQGuardedWidgetList;
//! @internal
class WidgetPropertySetPrivate
@@ -67,9 +67,9 @@ class WidgetPropertySetPrivate
KoProperty::Set set;
// list of properties (not) to show in editor
- QStringList properties;
+ TQStringList properties;
// list of widgets
- QGuardedWidgetList widgets;
+ TQGuardedWidgetList widgets;
// FormManager *manager;
// used to update command's value when undoing
@@ -80,24 +80,24 @@ class WidgetPropertySetPrivate
bool slotPropertyChanged_addCommandEnabled : 1;
// helper to change color palette when switching 'enabled' property
- QColorGroup* origActiveColors;
+ TQColorGroup* origActiveColors;
// i18n stuff
- QMap<QCString, QString> propCaption;
- QMap<QCString, QString> propValCaption;
+ TQMap<TQCString, TQString> propCaption;
+ TQMap<TQCString, TQString> propValCaption;
};
}
-WidgetPropertySet::WidgetPropertySet(QObject *parent)
- : QObject(parent, "kfd_widgetPropertySet")
+WidgetPropertySet::WidgetPropertySet(TQObject *tqparent)
+ : TQObject(tqparent, "kfd_widgetPropertySet")
{
d = new WidgetPropertySetPrivate();
// d->manager = manager;
- connect(&d->set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
- connect(&d->set, SIGNAL(propertyReset(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyReset(KoProperty::Set&, KoProperty::Property&)));
+ connect(&d->set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(&d->set, TQT_SIGNAL(propertyReset(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyReset(KoProperty::Set&, KoProperty::Property&)));
initPropertiesDescription();
}
@@ -114,21 +114,21 @@ WidgetPropertySet::manager()
}*/
KoProperty::Property&
-WidgetPropertySet::operator[](const QCString &name)
+WidgetPropertySet::operator[](const TQCString &name)
{
return d->set[name];
}
KoProperty::Property&
-WidgetPropertySet::property(const QCString &name)
+WidgetPropertySet::property(const TQCString &name)
{
return d->set[name];
}
bool
-WidgetPropertySet::contains(const QCString &property)
+WidgetPropertySet::tqcontains(const TQCString &property)
{
- return d->set.contains(property);
+ return d->set.tqcontains(property);
}
KoProperty::Set*
@@ -159,7 +159,7 @@ WidgetPropertySet::clearSet(bool dontSignalShowPropertySet)
void
WidgetPropertySet::saveModifiedProperties()
{
- QWidget * w = d->widgets.first();
+ TQWidget * w = d->widgets.first();
if(!w || d->widgets.count() > 1 || !KFormDesigner::FormManager::self()->activeForm() || !KFormDesigner::FormManager::self()->activeForm()->objectTree())
return;
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(w->name());
@@ -187,7 +187,7 @@ WidgetPropertySet::isUndoing()
/////////////// Functions related to adding widgets /////////////////////////////////////
void
-WidgetPropertySet::setSelectedWidget(QWidget *w, bool add, bool forceReload, bool moreWillBeSelected)
+WidgetPropertySet::setSelectedWidget(TQWidget *w, bool add, bool forceReload, bool moreWillBeSelected)
{
if(!w) {
clearSet();
@@ -195,7 +195,7 @@ WidgetPropertySet::setSelectedWidget(QWidget *w, bool add, bool forceReload, boo
}
// don't add a widget twice
- if(!forceReload && d->widgets.contains(QGuardedPtr<QWidget>(w))) {
+ if(!forceReload && d->widgets.tqcontains(TQGuardedPtr<TQWidget>(w))) {
kdWarning() << "WidgetPropertySet::setSelectedWidget() Widget is already selected" << endl;
return;
}
@@ -203,7 +203,7 @@ WidgetPropertySet::setSelectedWidget(QWidget *w, bool add, bool forceReload, boo
if(d->widgets.count() == 0)
add = false;
- QCString prevProperty;
+ TQCString prevProperty;
if(add)
addWidget(w);
else {
@@ -212,11 +212,11 @@ WidgetPropertySet::setSelectedWidget(QWidget *w, bool add, bool forceReload, boo
prevProperty = d->set.prevSelection();
}
clearSet(true); //clear but do not reload to avoid blinking
- d->widgets.append(QGuardedPtr<QWidget>(w));
+ d->widgets.append(TQGuardedPtr<TQWidget>(w));
createPropertiesForWidget(w);
w->installEventFilter(this);
- connect(w, SIGNAL(destroyed()), this, SLOT(slotWidgetDestroyed()));
+ connect(w, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotWidgetDestroyed()));
}
if (!moreWillBeSelected)
@@ -224,16 +224,16 @@ WidgetPropertySet::setSelectedWidget(QWidget *w, bool add, bool forceReload, boo
}
void
-WidgetPropertySet::addWidget(QWidget *w)
+WidgetPropertySet::addWidget(TQWidget *w)
{
- d->widgets.append(QGuardedPtr<QWidget>(w));
+ d->widgets.append(TQGuardedPtr<TQWidget>(w));
// Reset some stuff
d->lastCommand = 0;
d->lastGeoCommand = 0;
d->properties.clear();
- QCString classname;
+ TQCString classname;
if(d->widgets.first()->className() == w->className())
classname = d->widgets.first()->className();
@@ -241,7 +241,7 @@ WidgetPropertySet::addWidget(QWidget *w)
bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(w);
//WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
-// QWidget *subwidget = isSubproperty ? subpropIface->subwidget() : w;
+// TQWidget *subwidget = isSubproperty ? subpropIface->subwidget() : w;
for(KoProperty::Set::Iterator it(d->set); it.current(); ++it) {
kdDebug() << it.currentKey() << endl;
@@ -253,7 +253,7 @@ WidgetPropertySet::addWidget(QWidget *w)
//second widget, update metainfo
d->set["this:className"].setValue("special:multiple");
d->set["this:classString"].setValue(
- i18n("Multiple Widgets") + QString(" (%1)").arg(d->widgets.count()) );
+ i18n("Multiple Widgets") + TQString(" (%1)").tqarg(d->widgets.count()) );
d->set["this:iconName"].setValue("multiple_obj");
//name doesn't make sense for now
d->set["name"].setValue("");
@@ -261,7 +261,7 @@ WidgetPropertySet::addWidget(QWidget *w)
}
void
-WidgetPropertySet::createPropertiesForWidget(QWidget *w)
+WidgetPropertySet::createPropertiesForWidget(TQWidget *w)
{
Form *form;
if (!KFormDesigner::FormManager::self()
@@ -275,8 +275,8 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
if(!tree)
return;
- const QVariantMap* modifiedProperties = tree->modifiedProperties();
- QVariantMapConstIterator modifiedPropertiesIt;
+ const TQVariantMap* modifiedProperties = tree->modifiedProperties();
+ TQVariantMapConstIterator modifiedPropertiesIt;
bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(w);
// int count = 0;
KoProperty::Property *newProp = 0;
@@ -287,16 +287,16 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
return;
}
- QStrList pList = w->metaObject()->propertyNames(true);
- QStrListIterator it(pList);
+ TQStrList pList = w->tqmetaObject()->propertyNames(true);
+ TQStrListIterator it(pList);
// add subproperties if available
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QStrList tmpList; //used to allocate copy of names
+ TQStrList tmpList; //used to allocate copy of names
if (subpropIface) {
- QValueList<QCString> subproperies(
+ TQValueList<TQCString> subproperies(
subpropIface->subproperies() );
- foreach(QValueListConstIterator<QCString>, it, subproperies ) {
+ foreach(TQValueListConstIterator<TQCString>, it, subproperies ) {
tmpList.append( *it );
pList.append( tmpList.last() );
kdDebug() << "Added subproperty: " << *it << endl;
@@ -306,34 +306,34 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
// iterate over the property list, and create Property objects
for(; it.current() != 0; ++it) {
//kdDebug() << ">> " << it.current() << endl;
- const QMetaProperty *subMeta = // special case - subproperty
+ const TQMetaProperty *subMeta = // special case - subproperty
subpropIface ? subpropIface->findMetaSubproperty(it.current()) : 0;
- const QMetaProperty *meta = subMeta ? subMeta
- : w->metaObject()->property( w->metaObject()->findProperty(*it, true), true);
+ const TQMetaProperty *meta = subMeta ? subMeta
+ : w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty(*it, true), true);
if (!meta)
continue;
const char* propertyName = meta->name();
- QWidget *subwidget = subMeta/*subpropIface*/ ? subpropIface->subwidget() : w;
+ TQWidget *subwidget = subMeta/*subpropIface*/ ? subpropIface->subwidget() : w;
WidgetInfo *subwinfo = form->library()->widgetInfoForClassName(subwidget->className());
// kdDebug() << "$$$ " << subwidget->className() << endl;
- if(subwinfo && meta->designable(subwidget) && !d->set.contains(propertyName)) {
+ if(subwinfo && meta->designable(subwidget) && !d->set.tqcontains(propertyName)) {
//! \todo add another list for property description
- QString desc( d->propCaption[meta->name()] );
+ TQString desc( d->propCaption[meta->name()] );
//! \todo change i18n
if (desc.isEmpty()) //try to get property description from factory
desc = form->library()->propertyDescForName(subwinfo, propertyName);
- modifiedPropertiesIt = modifiedProperties->find(propertyName);
+ modifiedPropertiesIt = modifiedProperties->tqfind(propertyName);
const bool oldValueExists = modifiedPropertiesIt!=modifiedProperties->constEnd();
if(meta->isEnumType()) {
- if(qstrcmp(propertyName, "alignment") == 0) {
+ if(qstrcmp(propertyName, "tqalignment") == 0) {
createAlignProperty(meta, w, subwidget);
continue;
}
- QStringList keys = QStringList::fromStrList( meta->enumKeys() );
+ TQStringList keys = TQStringList::fromStrList( meta->enumKeys() );
newProp = new KoProperty::Property(propertyName, createValueList(subwinfo, keys),
/* assign current or older value */
meta->valueToKey(
@@ -347,7 +347,7 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
else {
newProp = new KoProperty::Property(propertyName,
/* assign current or older value */
- oldValueExists ? modifiedPropertiesIt.data() : subwidget->property(propertyName),
+ oldValueExists ? TQVariant(modifiedPropertiesIt.data()) : TQVariant(subwidget->property(propertyName)),
desc, desc, subwinfo->customTypeForProperty(propertyName));
//now set current value, so the old one is stored as old
if (oldValueExists) {
@@ -378,7 +378,7 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
}
(*this)["name"].setAutoSync(false); // name should be updated only when pressing Enter
- (*this)["enabled"].setValue( QVariant(tree->isEnabled(), 3));
+ (*this)["enabled"].setValue( TQVariant(tree->isEnabled(), 3));
if (winfo) {
form->library()->setPropertyOptions(*this, *winfo, w);
@@ -393,9 +393,9 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
/*! let's forget it for now, until we have new complete events editor
if (m_manager->lib()->advancedPropertiesVisible()) {
// add the signals property
- QStrList strlist = w->metaObject()->signalNames(true);
- QStrListIterator strIt(strlist);
- QStringList list;
+ TQStrList strlist = w->tqmetaObject()->signalNames(true);
+ TQStrListIterator strIt(strlist);
+ TQStringList list;
for(; strIt.current() != 0; ++strIt)
list.append(*strIt);
Property *prop = new Property("signals", i18n("Events")"",
@@ -403,20 +403,20 @@ WidgetPropertySet::createPropertiesForWidget(QWidget *w)
));
}*/
- if(KFormDesigner::FormManager::self()->activeForm() && tree->container()) // we are a container -> layout property
+ if(KFormDesigner::FormManager::self()->activeForm() && tree->container()) // we are a container -> tqlayout property
createLayoutProperty(tree);
}
void
-WidgetPropertySet::updatePropertyValue(ObjectTreeItem *tree, const char *property, const QMetaProperty *meta)
+WidgetPropertySet::updatePropertyValue(ObjectTreeItem *tree, const char *property, const TQMetaProperty *meta)
{
const char *propertyName = meta ? meta->name() : property;
- if (!d->set.contains(propertyName))
+ if (!d->set.tqcontains(propertyName))
return;
KoProperty::Property p( d->set[propertyName] );
//! \todo what about set properties, and lists properties
- QMap<QString, QVariant>::ConstIterator it( tree->modifiedProperties()->find(propertyName) );
+ TQMap<TQString, TQVariant>::ConstIterator it( tree->modifiedProperties()->tqfind(propertyName) );
if (it != tree->modifiedProperties()->constEnd()) {
blockSignals(true);
if(meta && meta->isEnumType()) {
@@ -431,7 +431,7 @@ WidgetPropertySet::updatePropertyValue(ObjectTreeItem *tree, const char *propert
}
bool
-WidgetPropertySet::isPropertyVisible(const QCString &property, bool isTopLevel, const QCString &classname)
+WidgetPropertySet::isPropertyVisible(const TQCString &property, bool isTopLevel, const TQCString &classname)
{
const bool multiple = d->widgets.count() >= 2;
if(multiple && classname.isEmpty())
@@ -461,9 +461,9 @@ WidgetPropertySet::isPropertyVisible(const QCString &property, bool isTopLevel,
*/
// return KFormDesigner::FormManager::self()->lib()->isPropertyVisible(d->widgets.first()->className(), d->widgets.first(),
- QWidget *w = d->widgets.first();
+ TQWidget *w = d->widgets.first();
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(w);
- QWidget *subwidget;
+ TQWidget *subwidget;
if (subpropIface && subpropIface->findMetaSubproperty(property)) // special case - subproperty
subwidget = subpropIface->subwidget();
else
@@ -484,11 +484,11 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert
|| ! KFormDesigner::FormManager::self()->activeForm()->objectTree())
return;
- QCString property = p.name();
- if (0==property.find("this:"))
+ TQCString property = p.name();
+ if (0==property.tqfind("this:"))
return; //starts with magical prefix: it's a "meta" prop.
- QVariant value = p.value();
+ TQVariant value = p.value();
// check if the name is valid (ie is correct identifier) and there is no name conflict
if(property == "name") {
@@ -507,7 +507,7 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert
saveAlignProperty(property);
return;
}
- else if((property == "layout") || (property == "layoutMargin") || (property == "layoutSpacing")) {
+ else if((property == "tqlayout") || (property == "tqlayoutMargin") || (property == "tqlayoutSpacing")) {
saveLayoutProperty(property, value);
return;
}
@@ -554,9 +554,9 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert
else {
if (d->slotPropertyChanged_addCommandEnabled && !KFormDesigner::FormManager::self()->isRedoing()) {
// We store old values for each widget
- QMap<QCString, QVariant> list;
- // for(QWidget *w = d->widgets.first(); w; w = d->widgets.next())
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets)
+ TQMap<TQCString, TQVariant> list;
+ // for(TQWidget *w = d->widgets.first(); w; w = d->widgets.next())
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets)
list.insert((*it)->name(), (*it)->property(property));
d->lastCommand = new PropertyCommand(this, list, value, property);
@@ -564,8 +564,8 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert
}
}
-// for(QWidget *w = d->widgets.first(); w; w = d->widgets.next())
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets) {
+// for(TQWidget *w = d->widgets.first(); w; w = d->widgets.next())
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) {
if (!alterLastCommand) {
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()
->lookup((*it)->name());
@@ -578,23 +578,23 @@ WidgetPropertySet::slotPropertyChanged(KoProperty::Set& set, KoProperty::Propert
}
}
-void WidgetPropertySet::emitWidgetPropertyChanged(QWidget *w, const QCString& property, const QVariant& value)
+void WidgetPropertySet::emitWidgetPropertyChanged(TQWidget *w, const TQCString& property, const TQVariant& value)
{
emit widgetPropertyChanged(w, property, value);
Form *form = KFormDesigner::FormManager::self()->activeForm();
if (form && form->library()->propertySetShouldBeReloadedAfterPropertyChange( w->className(), w, property)) {
//setSelectedWidget(0, false);
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents); //be sure events related to editors are consumed
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents); //be sure events related to editors are consumed
setSelectedWidget(w, /*!add*/false, /*forceReload*/true);
- qApp->eventLoop()->processEvents(QEventLoop::AllEvents); //be sure events related to editors are consumed
+ tqApp->eventLoop()->processEvents(TQEventLoop::AllEvents); //be sure events related to editors are consumed
//KFormDesigner::FormManager::self()->showPropertySet(this, true/*forceReload*/);
}
}
void
-WidgetPropertySet::createPropertyCommandsInDesignMode(QWidget* widget,
- const QMap<QCString, QVariant> &propValues, CommandGroup *group, bool addToActiveForm,
+WidgetPropertySet::createPropertyCommandsInDesignMode(TQWidget* widget,
+ const TQMap<TQCString, TQVariant> &propValues, CommandGroup *group, bool addToActiveForm,
bool execFlagForSubCommands)
{
if (!widget || propValues.isEmpty())
@@ -604,11 +604,11 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(QWidget* widget,
const bool widgetIsSelected = KFormDesigner::FormManager::self()->activeForm()->selectedWidget() == widget;
d->slotPropertyChanged_addCommandEnabled = false;
- QMap<QCString, QVariant>::ConstIterator endIt = propValues.constEnd();
+ TQMap<TQCString, TQVariant>::ConstIterator endIt = propValues.constEnd();
// CommandGroup *group = new CommandGroup(commandName);
- for(QMap<QCString, QVariant>::ConstIterator it = propValues.constBegin(); it != endIt; ++it)
+ for(TQMap<TQCString, TQVariant>::ConstIterator it = propValues.constBegin(); it != endIt; ++it)
{
- if (!d->set.contains(it.key())) {
+ if (!d->set.tqcontains(it.key())) {
kdWarning() << "WidgetPropertySet::createPropertyCommandsInDesignMode(): \"" <<it.key()<<"\" property not found"<<endl;
continue;
}
@@ -620,8 +620,8 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(QWidget* widget,
}
else {
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(widget);
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widget;
- if (-1 != subwidget->metaObject()->findProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) {
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : widget;
+ if (-1 != subwidget->tqmetaObject()->tqfindProperty(it.key(), true) && subwidget->property(it.key())!=it.data()) {
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(widget->name());
if (tree)
tree->addModifiedProperty(it.key(), subwidget->property(it.key()));
@@ -641,44 +641,44 @@ WidgetPropertySet::createPropertyCommandsInDesignMode(QWidget* widget,
void
WidgetPropertySet::saveEnabledProperty(bool value)
{
-// for(QWidget *w = d->widgets.first(); w; w = d->widgets.next()) {
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets) {
+// for(TQWidget *w = d->widgets.first(); w; w = d->widgets.next()) {
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) {
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()
->lookup((*it)->name());
if(tree->isEnabled() == value)
continue;
- QPalette p( (*it)->palette() );
+ TQPalette p( (*it)->palette() );
if (!d->origActiveColors)
- d->origActiveColors = new QColorGroup( p.active() );
+ d->origActiveColors = new TQColorGroup( p.active() );
if (value) {
if (d->origActiveColors)
p.setActive( *d->origActiveColors ); //revert
}
else {
- QColorGroup cg = p.disabled();
+ TQColorGroup cg = p.disabled();
//also make base color a bit disabled-like
- cg.setColor(QColorGroup::Base, cg.color(QColorGroup::Background));
+ cg.setColor(TQColorGroup::Base, cg.color(TQColorGroup::Background));
p.setActive(cg);
}
(*it)->setPalette(p);
tree->setEnabled(value);
- emit widgetPropertyChanged((*it), "enabled", QVariant(value, 3));
+ emit widgetPropertyChanged((*it), "enabled", TQVariant(value, 3));
}
}
bool
-WidgetPropertySet::isNameValid(const QString &name)
+WidgetPropertySet::isNameValid(const TQString &name)
{
//! \todo add to undo buffer
- QWidget *w = d->widgets.first();
- //also update widget's name in QObject member
+ TQWidget *w = d->widgets.first();
+ //also update widget's name in TQObject member
if (!KexiUtils::isIdentifier(name)) {
KMessageBox::sorry(KFormDesigner::FormManager::self()->activeForm()->widget(),
i18n("Could not rename widget \"%1\" to \"%2\" because "
"\"%3\" is not a valid name (identifier) for a widget.\n")
- .arg(w->name()).arg(name).arg(name));
+ .tqarg(w->name()).tqarg(name).tqarg(name));
d->slotPropertyChangedEnabled = false;
d->set["name"].resetValue();
d->slotPropertyChangedEnabled = true;
@@ -689,7 +689,7 @@ WidgetPropertySet::isNameValid(const QString &name)
KMessageBox::sorry( KFormDesigner::FormManager::self()->activeForm()->widget(),
i18n("Could not rename widget \"%1\" to \"%2\" "
"because a widget with the name \"%3\" already exists.\n")
- .arg(w->name()).arg(name).arg(name));
+ .tqarg(w->name()).tqarg(name).tqarg(name));
d->slotPropertyChangedEnabled = false;
d->set["name"].resetValue();
d->slotPropertyChangedEnabled = true;
@@ -708,21 +708,21 @@ WidgetPropertySet::slotPropertyReset(KoProperty::Set& set, KoProperty::Property&
return;
// We use the old value in modifProp for each widget
-// for(QWidget *w = d->widgets.first(); w; w = d->widgets.next()) {
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets) {
+// for(TQWidget *w = d->widgets.first(); w; w = d->widgets.next()) {
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) {
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup((*it)->name());
- if(tree->modifiedProperties()->contains(property.name()))
- (*it)->setProperty(property.name(), tree->modifiedProperties()->find(property.name()).data());
+ if(tree->modifiedProperties()->tqcontains(property.name()))
+ (*it)->setProperty(property.name(), tree->modifiedProperties()->tqfind(property.name()).data());
}
}
void
WidgetPropertySet::slotWidgetDestroyed()
{
-// if(d->widgets.contains(QGuardedPtr<const QWidget>( dynamic_cast<const QWidget*>(sender()) ))) {
+// if(d->widgets.tqcontains(TQGuardedPtr<const TQWidget>( dynamic_cast<const TQWidget*>(sender()) ))) {
//only clear this set if it contains the destroyed widget
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets) {
- if (dynamic_cast<const QWidget*>(sender()) == *it) {
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets) {
+ if (dynamic_cast<const TQWidget*>(sender()) == *it) {
clearSet();
break;
}
@@ -730,32 +730,32 @@ WidgetPropertySet::slotWidgetDestroyed()
}
bool
-WidgetPropertySet::eventFilter(QObject *o, QEvent *ev)
+WidgetPropertySet::eventFilter(TQObject *o, TQEvent *ev)
{
if(d->widgets.count() > 0 && o == d->widgets.first() && d->widgets.count() < 2)
{
- if((ev->type() == QEvent::Resize) || (ev->type() == QEvent::Move)) {
- if(!d->set.contains("geometry"))
+ if((ev->type() == TQEvent::Resize) || (ev->type() == TQEvent::Move)) {
+ if(!d->set.tqcontains("geometry"))
return false;
if(d->set["geometry"].value() == o->property("geometry")) // to avoid infinite recursion
return false;
- d->set["geometry"] = static_cast<QWidget*>(o)->geometry();
+ d->set["geometry"] = TQT_TQWIDGET(o)->tqgeometry();
}
}
- else if(d->widgets.count() > 1 && ev->type() == QEvent::Move) // the widget is being moved, we update the property
+ else if(d->widgets.count() > 1 && ev->type() == TQEvent::Move) // the widget is being moved, we update the property
{
if(d->isUndoing)
return false;
if(d->lastGeoCommand)
- d->lastGeoCommand->setPos(static_cast<QMoveEvent*>(ev)->pos());
+ d->lastGeoCommand->setPos(TQT_TQMOVEEVENT(ev)->pos());
else {
- QStringList list;
- foreach(QGuardedWidgetList::ConstIterator, it, d->widgets)
+ TQStringList list;
+ foreach(TQGuardedWidgetList::ConstIterator, it, d->widgets)
list.append((*it)->name());
- d->lastGeoCommand = new GeometryPropertyCommand(this, list, static_cast<QMoveEvent*>(ev)->oldPos());
+ d->lastGeoCommand = new GeometryPropertyCommand(this, list, TQT_TQMOVEEVENT(ev)->oldPos());
if (KFormDesigner::FormManager::self()->activeForm())
KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastGeoCommand, false);
}
@@ -767,33 +767,33 @@ WidgetPropertySet::eventFilter(QObject *o, QEvent *ev)
// Alignment-related functions /////////////////////////////
void
-WidgetPropertySet::createAlignProperty(const QMetaProperty *meta, QWidget *widget, QWidget *subwidget)
+WidgetPropertySet::createAlignProperty(const TQMetaProperty *meta, TQWidget *widget, TQWidget *subwidget)
{
if (!KFormDesigner::FormManager::self()->activeForm()
|| !KFormDesigner::FormManager::self()->activeForm()->objectTree())
return;
- QStringList list;
- QString value;
- const int alignment = subwidget->property("alignment").toInt();
- const QStringList keys( QStringList::fromStrList( meta->valueToKeys(alignment) ) );
+ TQStringList list;
+ TQString value;
+ const int tqalignment = subwidget->property("tqalignment").toInt();
+ const TQStringList keys( TQStringList::fromStrList( meta->valueToKeys(tqalignment) ) );
- QStrList *enumKeys = new QStrList(meta->enumKeys());
- const QStringList possibleValues( QStringList::fromStrList(*enumKeys) );
+ TQStrList *enumKeys = new TQStrList(meta->enumKeys());
+ const TQStringList possibleValues( TQStringList::fromStrList(*enumKeys) );
delete enumKeys;
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(widget->name());
bool isTopLevel = KFormDesigner::FormManager::self()->isTopLevel(widget);
- if(possibleValues.find("AlignHCenter")!=possibleValues.constEnd()) {
- // Create the horizontal alignment property
- if(keys.find("AlignHCenter")!=keys.constEnd() || keys.find("AlignCenter")!=keys.constEnd())
+ if(possibleValues.tqfind("AlignHCenter")!=possibleValues.constEnd()) {
+ // Create the horizontal tqalignment property
+ if(keys.tqfind("AlignHCenter")!=keys.constEnd() || keys.tqfind("AlignCenter")!=keys.constEnd())
value = "AlignHCenter";
- else if(keys.find("AlignRight")!=keys.constEnd())
+ else if(keys.tqfind("AlignRight")!=keys.constEnd())
value = "AlignRight";
- else if(keys.find("AlignLeft")!=keys.constEnd())
+ else if(keys.tqfind("AlignLeft")!=keys.constEnd())
value = "AlignLeft";
- else if(keys.find("AlignJustify")!=keys.constEnd())
+ else if(keys.tqfind("AlignJustify")!=keys.constEnd())
value = "AlignJustify";
else
value = "AlignAuto";
@@ -810,12 +810,12 @@ WidgetPropertySet::createAlignProperty(const QMetaProperty *meta, QWidget *widge
list.clear();
}
- if(possibleValues.find("AlignTop")!=possibleValues.constEnd())
+ if(possibleValues.tqfind("AlignTop")!=possibleValues.constEnd())
{
- // Create the ver alignment property
- if(keys.find("AlignTop")!=keys.constEnd())
+ // Create the ver tqalignment property
+ if(keys.tqfind("AlignTop")!=keys.constEnd())
value = "AlignTop";
- else if(keys.find("AlignBottom")!=keys.constEnd())
+ else if(keys.tqfind("AlignBottom")!=keys.constEnd())
value = "AlignBottom";
else
value = "AlignVCenter";
@@ -831,13 +831,13 @@ WidgetPropertySet::createAlignProperty(const QMetaProperty *meta, QWidget *widge
updatePropertyValue(tree, "vAlign");
}
- if(possibleValues.find("WordBreak")!=possibleValues.constEnd()
+ if(possibleValues.tqfind("WordBreak")!=possibleValues.constEnd()
// && isPropertyVisible("wordbreak", false, subwidget->className())
-// && !subWidget->inherits("QLineEdit") /* QLineEdit doesn't support 'word break' is this generic enough?*/
+// && !subWidget->inherits(TQLINEEDIT_OBJECT_NAME_STRING) /* TQLineEdit doesn't support 'word break' is this generic enough?*/
) {
// Create the wordbreak property
KoProperty::Property *p = new KoProperty::Property("wordbreak",
- QVariant(alignment & Qt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") );
+ TQVariant(tqalignment & TQt::WordBreak, 3), i18n("Word Break"), i18n("Word Break") );
d->set.addProperty(p);
updatePropertyValue(tree, "wordbreak");
if (!KFormDesigner::FormManager::self()->activeForm()->library()->isPropertyVisible(
@@ -849,25 +849,25 @@ WidgetPropertySet::createAlignProperty(const QMetaProperty *meta, QWidget *widge
}
void
-WidgetPropertySet::saveAlignProperty(const QString &property)
+WidgetPropertySet::saveAlignProperty(const TQString &property)
{
if (!KFormDesigner::FormManager::self()->activeForm())
return;
- QStrList list;
- if( d->set.contains("hAlign") )
+ TQStrList list;
+ if( d->set.tqcontains("hAlign") )
list.append( d->set["hAlign"].value().toCString() );
- if( d->set.contains("vAlign") )
+ if( d->set.tqcontains("vAlign") )
list.append( d->set["vAlign"].value().toCString() );
- if( d->set.contains("wordbreak") && d->set["wordbreak"].value().toBool() )
+ if( d->set.tqcontains("wordbreak") && d->set["wordbreak"].value().toBool() )
list.append("WordBreak");
WidgetWithSubpropertiesInterface* subpropIface = dynamic_cast<WidgetWithSubpropertiesInterface*>(
- (QWidget*)d->widgets.first() );
- QWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (QWidget*)d->widgets.first();
- int count = subwidget->metaObject()->findProperty("alignment", true);
- const QMetaProperty *meta = subwidget->metaObject()->property(count, true);
- subwidget->setProperty("alignment", meta->keysToValue(list));
+ (TQWidget*)d->widgets.first() );
+ TQWidget *subwidget = (subpropIface && subpropIface->subwidget()) ? subpropIface->subwidget() : (TQWidget*)d->widgets.first();
+ int count = subwidget->tqmetaObject()->tqfindProperty("tqalignment", true);
+ const TQMetaProperty *meta = subwidget->tqmetaObject()->property(count, true);
+ subwidget->setProperty("tqalignment", meta->keysToValue(list));
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(
d->widgets.first()->name() );
@@ -877,11 +877,11 @@ WidgetPropertySet::saveAlignProperty(const QString &property)
if(d->isUndoing)
return;
- if(d->lastCommand && d->lastCommand->property() == "alignment")
+ if(d->lastCommand && d->lastCommand->property() == "tqalignment")
d->lastCommand->setValue(meta->keysToValue(list));
else {
d->lastCommand = new PropertyCommand(this, d->widgets.first()->name(),
- subwidget->property("alignment"), meta->keysToValue(list), "alignment");
+ subwidget->property("tqalignment"), meta->keysToValue(list), "tqalignment");
KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastCommand, false);
}
}
@@ -895,40 +895,40 @@ WidgetPropertySet::createLayoutProperty(ObjectTreeItem *item)
if (!container || !KFormDesigner::FormManager::self()->activeForm() ||
!KFormDesigner::FormManager::self()->activeForm()->objectTree() || !container->widget())
return;
- // special containers have no 'layout' property, as it should not be changed
- QCString className = container->widget()->className();
+ // special containers have no 'tqlayout' property, as it should not be changed
+ TQCString className = container->widget()->className();
if((className == "HBox") || (className == "VBox") || (className == "Grid"))
return;
- QStringList list;
- QString value = Container::layoutTypeToString(container->layoutType());
+ TQStringList list;
+ TQString value = Container::tqlayoutTypeToString(container->tqlayoutType());
list << "NoLayout" << "HBox" << "VBox" << "Grid" << "HFlow" << "VFlow";
- KoProperty::Property *p = new KoProperty::Property("layout", createValueList(0, list), value,
+ KoProperty::Property *p = new KoProperty::Property("tqlayout", createValueList(0, list), value,
i18n("Container's Layout"), i18n("Container's Layout"));
p->setVisible( container->form()->library()->advancedPropertiesVisible() );
d->set.addProperty(p);
- updatePropertyValue(item, "layout");
+ updatePropertyValue(item, "tqlayout");
- p = new KoProperty::Property("layoutMargin", container->layoutMargin(), i18n("Layout Margin"), i18n("Layout Margin"));
+ p = new KoProperty::Property("tqlayoutMargin", container->tqlayoutMargin(), i18n("Layout Margin"), i18n("Layout Margin"));
d->set.addProperty(p);
- updatePropertyValue(item, "layoutMargin");
- if(container->layoutType() == Container::NoLayout)
+ updatePropertyValue(item, "tqlayoutMargin");
+ if(container->tqlayoutType() == Container::NoLayout)
p->setVisible(false);
- p = new KoProperty::Property("layoutSpacing", container->layoutSpacing(),
+ p = new KoProperty::Property("tqlayoutSpacing", container->tqlayoutSpacing(),
i18n("Layout Spacing"), i18n("Layout Spacing"));
d->set.addProperty(p);
- updatePropertyValue(item, "layoutSpacing");
- if(container->layoutType() == Container::NoLayout)
+ updatePropertyValue(item, "tqlayoutSpacing");
+ if(container->tqlayoutType() == Container::NoLayout)
p->setVisible(false);
}
void
-WidgetPropertySet::saveLayoutProperty(const QString &prop, const QVariant &value)
+WidgetPropertySet::saveLayoutProperty(const TQString &prop, const TQVariant &value)
{
Container *container=0;
if(!KFormDesigner::FormManager::self()->activeForm() || !KFormDesigner::FormManager::self()->activeForm()->objectTree())
@@ -938,34 +938,34 @@ WidgetPropertySet::saveLayoutProperty(const QString &prop, const QVariant &value
return;
container = item->container();
- if(prop == "layout") {
+ if(prop == "tqlayout") {
Container::LayoutType type = Container::stringToLayoutType(value.toString());
- if(d->lastCommand && d->lastCommand->property() == "layout" && !d->isUndoing)
+ if(d->lastCommand && d->lastCommand->property() == "tqlayout" && !d->isUndoing)
d->lastCommand->setValue(value);
else if(!d->isUndoing) {
d->lastCommand = new LayoutPropertyCommand(this, d->widgets.first()->name(),
- d->set["layout"].oldValue(), value);
+ d->set["tqlayout"].oldValue(), value);
KFormDesigner::FormManager::self()->activeForm()->addCommand(d->lastCommand, false);
}
container->setLayout(type);
bool show = (type != Container::NoLayout);
- if(show != d->set["layoutMargin"].isVisible()) {
- d->set["layoutMargin"].setVisible(show);
- d->set["layoutSpacing"].setVisible(show);
+ if(show != d->set["tqlayoutMargin"].isVisible()) {
+ d->set["tqlayoutMargin"].setVisible(show);
+ d->set["tqlayoutSpacing"].setVisible(show);
KFormDesigner::FormManager::self()->showPropertySet(this, true/*force*/);
}
return;
}
- if(prop == "layoutMargin" && container->layout()) {
+ if(prop == "tqlayoutMargin" && container->tqlayout()) {
container->setLayoutMargin(value.toInt());
- container->layout()->setMargin(value.toInt());
+ container->tqlayout()->setMargin(value.toInt());
}
- else if(prop == "layoutSpacing" && container->layout()) {
+ else if(prop == "tqlayoutSpacing" && container->tqlayout()) {
container->setLayoutSpacing(value.toInt());
- container->layout()->setSpacing(value.toInt());
+ container->tqlayout()->setSpacing(value.toInt());
}
ObjectTreeItem *tree = KFormDesigner::FormManager::self()->activeForm()->objectTree()->lookup(d->widgets.first()->name());
@@ -975,7 +975,7 @@ WidgetPropertySet::saveLayoutProperty(const QString &prop, const QVariant &value
if(d->isUndoing)
return;
- if(d->lastCommand && (QString(d->lastCommand->property()) == prop))
+ if(d->lastCommand && (TQString(d->lastCommand->property()) == prop))
d->lastCommand->setValue(value);
else {
d->lastCommand = new PropertyCommand(this, d->widgets.first()->name(),
@@ -992,7 +992,7 @@ void
WidgetPropertySet::initPropertiesDescription()
{
//! \todo perhaps a few of them shouldn't be translated within KFD mode,
-//! to be more Qt Designer friendly?
+//! to be more TQt Designer friendly?
d->propCaption["name"] = i18n("Name");
d->propCaption["caption"] = i18n("Caption");
d->propCaption["text"] = i18n("Text");
@@ -1000,8 +1000,8 @@ WidgetPropertySet::initPropertiesDescription()
d->propCaption["enabled"] = i18n("Enabled");
d->propCaption["geometry"] = i18n("Geometry");
d->propCaption["sizePolicy"] = i18n("Size Policy");
- d->propCaption["minimumSize"] = i18n("Minimum Size");
- d->propCaption["maximumSize"] = i18n("Maximum Size");
+ d->propCaption["tqminimumSize"] = i18n("Minimum Size");
+ d->propCaption["tqmaximumSize"] = i18n("Maximum Size");
d->propCaption["font"] = i18n("Font");
d->propCaption["cursor"] = i18n("Cursor");
d->propCaption["paletteForegroundColor"] = i18n("Foreground Color");
@@ -1009,13 +1009,13 @@ WidgetPropertySet::initPropertiesDescription()
d->propCaption["focusPolicy"] = i18n("Focus Policy");
d->propCaption["margin"] = i18n("Margin");
d->propCaption["readOnly"] = i18n("Read Only");
- //any QFrame
+ //any TQFrame
d->propCaption["frame"] = i18n("Frame");
d->propCaption["lineWidth"] = i18n("Frame Width");
d->propCaption["midLineWidth"] = i18n("Mid Frame Width");
d->propCaption["frameShape"] = i18n("Frame Shape");
d->propCaption["frameShadow"] = i18n("Frame Shadow");
- //any QScrollbar
+ //any TQScrollbar
d->propCaption["vScrollBarMode"] = i18n("Vertical ScrollBar");
d->propCaption["hScrollBarMode"] = i18n("Horizontal ScrollBar");
@@ -1066,27 +1066,27 @@ WidgetPropertySet::initPropertiesDescription()
d->propValCaption["Vertical"] = i18n("Vertical");
}
-QString
-WidgetPropertySet::propertyCaption(const QCString &name)
+TQString
+WidgetPropertySet::propertyCaption(const TQCString &name)
{
return d->propCaption[name];
}
-QString
-WidgetPropertySet::valueCaption(const QCString &name)
+TQString
+WidgetPropertySet::valueCaption(const TQCString &name)
{
return d->propValCaption[name];
}
KoProperty::Property::ListData*
-WidgetPropertySet::createValueList(WidgetInfo *winfo, const QStringList &list)
+WidgetPropertySet::createValueList(WidgetInfo *winfo, const TQStringList &list)
{
-// QMap <QString, QVariant> map;
- QStringList names;
- QStringList::ConstIterator endIt = list.end();
- for(QStringList::ConstIterator it = list.begin(); it != endIt; ++it) {
- QString n( d->propValCaption[ (*it).latin1() ] );
- if (n.isEmpty()) { //try within factory and (maybe) parent factory
+// TQMap <TQString, TQVariant> map;
+ TQStringList names;
+ TQStringList::ConstIterator endIt = list.end();
+ for(TQStringList::ConstIterator it = list.begin(); it != endIt; ++it) {
+ TQString n( d->propValCaption[ (*it).latin1() ] );
+ if (n.isEmpty()) { //try within factory and (maybe) tqparent factory
if (winfo)
n = KFormDesigner::FormManager::self()->activeForm()->library()->propertyDescForValue( winfo, (*it).latin1() );
if (n.isEmpty())
@@ -1104,16 +1104,16 @@ WidgetPropertySet::createValueList(WidgetInfo *winfo, const QStringList &list)
}
void
-WidgetPropertySet::addPropertyCaption(const QCString &property, const QString &caption)
+WidgetPropertySet::addPropertyCaption(const TQCString &property, const TQString &caption)
{
- if(!d->propCaption.contains(property))
+ if(!d->propCaption.tqcontains(property))
d->propCaption[property] = caption;
}
void
-WidgetPropertySet::addValueCaption(const QCString &value, const QString &caption)
+WidgetPropertySet::addValueCaption(const TQCString &value, const TQString &caption)
{
- if(!d->propValCaption.contains(value))
+ if(!d->propValCaption.tqcontains(value))
d->propValCaption[value] = caption;
}
diff --git a/kexi/formeditor/widgetpropertyset.h b/kexi/formeditor/widgetpropertyset.h
index 71e7b2254..d330e4edf 100644
--- a/kexi/formeditor/widgetpropertyset.h
+++ b/kexi/formeditor/widgetpropertyset.h
@@ -21,14 +21,14 @@
#ifndef KFD_WIDGETPROPERTYSET_H
#define KFD_WIDGETPROPERTYSET_H
-#include <qobject.h>
-#include <qstrlist.h>
+#include <tqobject.h>
+#include <tqstrlist.h>
#include <koproperty/set.h>
#include <koproperty/property.h>
-class QMetaObject;
-class QWidget;
+class TQMetaObject;
+class TQWidget;
namespace KFormDesigner {
@@ -38,27 +38,28 @@ class WidgetPropertySetPrivate;
class WidgetInfo;
class CommandGroup;
-class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
+class KFORMEDITOR_EXPORT WidgetPropertySet : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- WidgetPropertySet(QObject *parent);
+ WidgetPropertySet(TQObject *tqparent);
~WidgetPropertySet();
// FormManager* manager();
- KoProperty::Property& operator[](const QCString &name);
+ KoProperty::Property& operator[](const TQCString &name);
- KoProperty::Property& property(const QCString &name);
+ KoProperty::Property& property(const TQCString &name);
- bool contains(const QCString &property);
+ bool tqcontains(const TQCString &property);
/*! i18n function used by factories to add new property caption.
Should be called on Factory creation. */
- void addPropertyCaption(const QCString &property, const QString &caption);
+ void addPropertyCaption(const TQCString &property, const TQString &caption);
- void addValueCaption(const QCString &value, const QString &caption);
+ void addValueCaption(const TQCString &value, const TQString &caption);
public slots:
/*! Sets the widget which properties are shown in the property editor.
@@ -69,10 +70,10 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
even if these were already displayed.
If \a showPropertySet is true (the default), property editor will be updated for the current selection.
This flag is set to false when we're selecting multiple widgets. */
- void setSelectedWidget(QWidget *w, bool add = false, bool forceReload = false,
+ void setSelectedWidget(TQWidget *w, bool add = false, bool forceReload = false,
bool moreWillBeSelected = false);
- void setSelectedWidgetWithoutReload(QWidget *w, bool add = false, bool moreWillBeSelected = false) {
+ void setSelectedWidgetWithoutReload(TQWidget *w, bool add = false, bool moreWillBeSelected = false) {
setSelectedWidget(w, add, false, moreWillBeSelected);
}
@@ -86,37 +87,37 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
/*! This slot is called when the watched widget is destroyed. Resets the buffer.*/
void slotWidgetDestroyed();
-// void setPropertyValueInDesignMode(QWidget* widget, const QMap<QCString, QVariant> &propValues,
- void createPropertyCommandsInDesignMode(QWidget* widget, const QMap<QCString,
- QVariant> &propValues, CommandGroup *group, bool addToActiveForm = true,
+// void setPropertyValueInDesignMode(TQWidget* widget, const TQMap<TQCString, TQVariant> &propValues,
+ void createPropertyCommandsInDesignMode(TQWidget* widget, const TQMap<TQCString,
+ TQVariant> &propValues, CommandGroup *group, bool addToActiveForm = true,
bool execFlagForSubCommands = false);
signals:
/*! This signal is emitted when a property was changed.
\a widg is the widget concerned, \a property
is the name of the modified property, and \a v is the new value of this property. */
- void widgetPropertyChanged(QWidget *w, const QCString &property, const QVariant &v);
+ void widgetPropertyChanged(TQWidget *w, const TQCString &property, const TQVariant &v);
/*! This signal is emitted when the name of the widget is modified.
\a oldname is the name of the widget before the
change, \a newname is the name after renaming. */
- void widgetNameChanged(const QCString &oldname, const QCString &newname);
+ void widgetNameChanged(const TQCString &oldname, const TQCString &newname);
protected:
/*! Adds the widget in d->widgets, and updates property visibilty. */
- void addWidget(QWidget *w);
+ void addWidget(TQWidget *w);
/*! Fills the list with properties related to the widget \a w. Also updates
properties old value and changed state. */
- void createPropertiesForWidget(QWidget *w);
+ void createPropertiesForWidget(TQWidget *w);
/*! Creates a map property description->prop. value from
the list of keys \a list. */
- KoProperty::Property::ListData* createValueList(WidgetInfo *winfo, const QStringList &list);
+ KoProperty::Property::ListData* createValueList(WidgetInfo *winfo, const TQStringList &list);
/*! Changes \a property old value and changed state, using the value
stored in \a tree. Optional \a meta can be specified if you need to handle enum values. */
- void updatePropertyValue(ObjectTreeItem *tree, const char *property, const QMetaProperty *meta = 0);
+ void updatePropertyValue(ObjectTreeItem *tree, const char *property, const TQMetaProperty *meta = 0);
/*! \return the property list hold by this object. Do not modify the list,
just use this method to change Editor's list. */
@@ -131,7 +132,7 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
/*! Checks if the name entered by user is valid, ie that it is
a valid identifier, and that there is no name conflict. */
- bool isNameValid(const QString &name);
+ bool isNameValid(const TQString &name);
/*! Saves 'enabled' property, and takes care of updating widget's palette. */
void saveEnabledProperty(bool value);
@@ -139,7 +140,7 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
/*! This function filters the event of the selected widget to
automatically updates the "geometry" property
when the widget is moved or resized in the Form. */
- bool eventFilter(QObject *o, QEvent *ev);
+ bool eventFilter(TQObject *o, TQEvent *ev);
/*! Changes undoing state of the list. Used by Undo command to
prevent recursion. */
@@ -150,29 +151,29 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
/*! This function is used to filter the properties to be shown
(ie not show "caption" if the widget isn't toplevel).
\return true if the property should be shown. False otherwise.*/
- bool isPropertyVisible(const QCString &property, bool isTopLevel,
- const QCString &classname=QCString());
+ bool isPropertyVisible(const TQCString &property, bool isTopLevel,
+ const TQCString &classname=TQCString());
// Following functions are used to create special types of properties, different
- // from Q_PROPERTY
+ // from TQ_PROPERTY
- /*! Creates the properties related to alignment (ie hAlign, vAlign and WordBreak) for
- the QWidget \a widget. \a subwidget is the same as \a widget if the widget itself handles
+ /*! Creates the properties related to tqalignment (ie hAlign, vAlign and WordBreak) for
+ the TQWidget \a widget. \a subwidget is the same as \a widget if the widget itself handles
the property and it's a child widget if the child handles the property.
For example, the second case is true for KexiDBAutoField.
- \a meta is the QMetaProperty for "alignment" property" of subwidget. */
- void createAlignProperty(const QMetaProperty *meta, QWidget *widget, QWidget *subwidget);
+ \a meta is the TQMetaProperty for "tqalignment" property" of subwidget. */
+ void createAlignProperty(const TQMetaProperty *meta, TQWidget *widget, TQWidget *subwidget);
- /*! Saves the properties related to alignment (ie hAlign, vAlign and WordBreak)
- and modifies the "alignment" property of the widget.*/
- void saveAlignProperty(const QString &property);
+ /*! Saves the properties related to tqalignment (ie hAlign, vAlign and WordBreak)
+ and modifies the "tqalignment" property of the widget.*/
+ void saveAlignProperty(const TQString &property);
- /*! Creates the "layout" property, for the Container representing \a item. */
+ /*! Creates the "tqlayout" property, for the Container representing \a item. */
void createLayoutProperty(ObjectTreeItem *item);
- /*! Saves the "layout" property and changes the Container 's layout (
+ /*! Saves the "tqlayout" property and changes the Container 's tqlayout (
using Container::setLayout() ).*/
- void saveLayoutProperty(const QString &property, const QVariant &value);
+ void saveLayoutProperty(const TQString &property, const TQVariant &value);
// Some i18n functions
//! Adds translations for general properties, by adding items in d->propDesc
@@ -180,17 +181,17 @@ class KFORMEDITOR_EXPORT WidgetPropertySet : public QObject
/*! \return The i18n'ed name of the property whose name is \a name, that will be
displayed in PropertyEditor. */
- QString propertyCaption(const QCString &name);
+ TQString propertyCaption(const TQCString &name);
/*! \return The i18n'ed name of the property's value whose name is \a name. */
- QString valueCaption(const QCString &name);
+ TQString valueCaption(const TQCString &name);
/*! \return The i18n'ed list of values, that will be shown by Property
Editor (using descFromValue()).*/
- //QStringList captionForList(const QStringList &list);
+ //TQStringList captionForList(const TQStringList &list);
//! Helper
- void emitWidgetPropertyChanged(QWidget *w, const QCString& property, const QVariant& value);
+ void emitWidgetPropertyChanged(TQWidget *w, const TQCString& property, const TQVariant& value);
private:
WidgetPropertySetPrivate *d;
diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp
index 812379e18..83904aa72 100644
--- a/kexi/formeditor/widgetwithsubpropertiesinterface.cpp
+++ b/kexi/formeditor/widgetwithsubpropertiesinterface.cpp
@@ -19,8 +19,8 @@
#include "widgetwithsubpropertiesinterface.h"
-#include <qmetaobject.h>
-#include <qasciidict.h>
+#include <tqmetaobject.h>
+#include <tqasciidict.h>
#include <kdebug.h>
@@ -34,19 +34,19 @@ WidgetWithSubpropertiesInterface::~WidgetWithSubpropertiesInterface()
{
}
-void WidgetWithSubpropertiesInterface::setSubwidget(QWidget *widget)
+void WidgetWithSubpropertiesInterface::setSubwidget(TQWidget *widget)
{
m_subwidget = widget;
m_subproperies.clear();
- QAsciiDict<char> addedSubproperies(1024);
+ TQAsciiDict<char> addedSubproperies(1024);
if (m_subwidget) {
- //remember properties in the subwidget that are not present in the parent
- for( QMetaObject *metaObject = m_subwidget->metaObject(); metaObject; metaObject = metaObject->superClass()) {
- const int numProperties = metaObject->numProperties();
+ //remember properties in the subwidget that are not present in the tqparent
+ for( TQMetaObject *tqmetaObject = m_subwidget->tqmetaObject(); tqmetaObject; tqmetaObject = tqmetaObject->tqsuperClass()) {
+ const int numProperties = tqmetaObject->numProperties();
for (int i = 0; i < numProperties; i++) {
- const char *propertyName = metaObject->property( i )->name();
- if (dynamic_cast<QObject*>(this)->metaObject()->findProperty( propertyName, true )==-1
- && !addedSubproperies.find( propertyName ) )
+ const char *propertyName = tqmetaObject->property( i )->name();
+ if (dynamic_cast<TQObject*>(this)->tqmetaObject()->tqfindProperty( propertyName, true )==-1
+ && !addedSubproperies.tqfind( propertyName ) )
{
m_subproperies.append( propertyName );
addedSubproperies.insert( propertyName, (char*)1 );
@@ -58,40 +58,40 @@ void WidgetWithSubpropertiesInterface::setSubwidget(QWidget *widget)
}
}
-QWidget* WidgetWithSubpropertiesInterface::subwidget() const
+TQWidget* WidgetWithSubpropertiesInterface::subwidget() const
{
return m_subwidget;
}
-QValueList<QCString> WidgetWithSubpropertiesInterface::subproperies() const
+TQValueList<TQCString> WidgetWithSubpropertiesInterface::subproperies() const
{
return m_subproperies;
}
-const QMetaProperty *WidgetWithSubpropertiesInterface::findMetaSubproperty(const char * name) const
+const TQMetaProperty *WidgetWithSubpropertiesInterface::findMetaSubproperty(const char * name) const
{
- if (!m_subwidget || m_subproperies.find(name) == m_subproperies.constEnd()) {
+ if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.constEnd()) {
return 0;
}
- const int index = m_subwidget->metaObject()->findProperty( name, true );
+ const int index = m_subwidget->tqmetaObject()->tqfindProperty( name, true );
if (index==-1)
return 0;
- return m_subwidget->metaObject()->property( index, true );
+ return m_subwidget->tqmetaObject()->property( index, true );
}
-QVariant WidgetWithSubpropertiesInterface::subproperty( const char * name, bool &ok ) const
+TQVariant WidgetWithSubpropertiesInterface::subproperty( const char * name, bool &ok ) const
{
- if (!m_subwidget || m_subproperies.find(name) == m_subproperies.constEnd()) {
+ if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.constEnd()) {
ok = false;
- return QVariant();
+ return TQVariant();
}
ok = true;
return m_subwidget->property( name );
}
-bool WidgetWithSubpropertiesInterface::setSubproperty( const char * name, const QVariant & value )
+bool WidgetWithSubpropertiesInterface::setSubproperty( const char * name, const TQVariant & value )
{
- if (!m_subwidget || m_subproperies.find(name) == m_subproperies.end()) {
+ if (!m_subwidget || m_subproperies.tqfind(name) == m_subproperies.end()) {
return false;
}
return m_subwidget->setProperty( name, value );
diff --git a/kexi/formeditor/widgetwithsubpropertiesinterface.h b/kexi/formeditor/widgetwithsubpropertiesinterface.h
index 878fefcae..b0d86710c 100644
--- a/kexi/formeditor/widgetwithsubpropertiesinterface.h
+++ b/kexi/formeditor/widgetwithsubpropertiesinterface.h
@@ -20,11 +20,11 @@
#ifndef WIDGETWITHSUBPROPERTIESINTERFACE_H
#define WIDGETWITHSUBPROPERTIESINTERFACE_H
-#include <qcstring.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
-#include <qguardedptr.h>
-#include <qvariant.h>
+#include <tqcstring.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
+#include <tqguardedptr.h>
+#include <tqvariant.h>
namespace KFormDesigner {
@@ -32,7 +32,7 @@ namespace KFormDesigner {
/*! Currently used in KexiDBAutoField to allow editing specific properties
of its internal editor. For example, if the autofield is of type Image Box,
the Image Box widget has some specific properties like "lineWidth".
- Such properties are provided by the parent KexiDBAutoField object as subproperties. */
+ Such properties are provided by the tqparent KexiDBAutoField object as subproperties. */
class KFORMEDITOR_EXPORT WidgetWithSubpropertiesInterface
{
public:
@@ -41,31 +41,31 @@ class KFORMEDITOR_EXPORT WidgetWithSubpropertiesInterface
//! Sets \a widget subwidget handling subproperties. Setting 0 clears subwidget.
//! @todo maybe someone wants to add more than one widget here?
- void setSubwidget(QWidget *widget);
+ void setSubwidget(TQWidget *widget);
//! \return the assigned subwidget.
- QWidget* subwidget() const;
+ TQWidget* subwidget() const;
//! \return a list of subproperties available for this widget.
//! This is achieved by only listing those properties that are available in the
- QValueList<QCString> subproperies() const;
+ TQValueList<TQCString> subproperies() const;
//! \return a meta property for a widget's subproperty or 0 if there
//! is no such subproperty.
- const QMetaProperty *findMetaSubproperty(const char * name) const;
+ const TQMetaProperty *findMetaSubproperty(const char * name) const;
//! \return a value of widget's subproperty. \a ok is set to true on success
//! and to false on failure.
- QVariant subproperty( const char * name, bool &ok ) const;
+ TQVariant subproperty( const char * name, bool &ok ) const;
//! Sets a subproperty value \a value for a subproperty \a name
//! \return true on successful setting and false when there
- //! is no such a subproperty in the subwidget or QObject::setProperty() failed.
- bool setSubproperty( const char * name, const QVariant & value );
+ //! is no such a subproperty in the subwidget or TQObject::setProperty() failed.
+ bool setSubproperty( const char * name, const TQVariant & value );
protected:
- QGuardedPtr<QWidget> m_subwidget;
- QValueList<QCString> m_subproperies;
+ TQGuardedPtr<TQWidget> m_subwidget;
+ TQValueList<TQCString> m_subproperies;
};
}
diff --git a/kexi/kexi_export.h b/kexi/kexi_export.h
index 11ed970a4..f8b238bd9 100644
--- a/kexi/kexi_export.h
+++ b/kexi/kexi_export.h
@@ -173,7 +173,7 @@
# define KDE_CXXFLAGS
/* -- compile-time settings -- */
-#if defined(Q_WS_WIN) || defined(KEXI_OPTIONS)
+#if defined(TQ_WS_WIN) || defined(KEXI_OPTIONS)
/* defined in a .pro file or 'KEXI_OPTIONS' env. variable */
#else
diff --git a/kexi/kexi_global.h b/kexi/kexi_global.h
index e833c7d5e..e724271d9 100644
--- a/kexi/kexi_global.h
+++ b/kexi/kexi_global.h
@@ -39,7 +39,7 @@
/* useful macros */
-/*! a shortcut for iterating over lists or maps, eg. QMap, QValueList */
+/*! a shortcut for iterating over lists or maps, eg. TQMap, TQValueList */
#define foreach(_class, _variable, _list) \
for (_class _variable = (_list).constBegin(); _variable!=(_list).constEnd(); ++_variable)
@@ -47,7 +47,7 @@
#define foreach_nonconst(_class, _variable, _list) \
for (_class _variable = (_list).begin(); _variable!=(_list).end(); ++_variable)
-/*! a shortcut for iterating over QPtrList and QPtrDict */
+/*! a shortcut for iterating over TQPtrList and TQPtrDict */
#define foreach_list(_class, _variable, _list) \
for (_class _variable(_list); _variable.current(); ++_variable)
@@ -55,11 +55,11 @@
#ifndef futureI18n
# ifdef USE_FUTURE_I18N
-# define futureI18n(a) QObject::tr(a)
-# define futureI18n2(a,b) QObject::tr(b)
+# define futureI18n(a) TQObject::tr(a)
+# define futureI18n2(a,b) TQObject::tr(b)
# else
-# define futureI18n(a) QString(a)
-# define futureI18n2(a,b) QString(b)
+# define futureI18n(a) TQString(a)
+# define futureI18n2(a,b) TQString(b)
# endif
#endif
diff --git a/kexi/kexidb/admin.cpp b/kexi/kexidb/admin.cpp
index 5d05af9e0..a69279d05 100644
--- a/kexi/kexidb/admin.cpp
+++ b/kexi/kexidb/admin.cpp
@@ -33,7 +33,7 @@ AdminTools::~AdminTools()
delete d;
}
-bool AdminTools::vacuum(const ConnectionData& data, const QString& databaseName)
+bool AdminTools::vacuum(const ConnectionData& data, const TQString& databaseName)
{
Q_UNUSED(data);
Q_UNUSED(databaseName);
diff --git a/kexi/kexidb/admin.h b/kexi/kexidb/admin.h
index 0a7a0d464..192f3b5c2 100644
--- a/kexi/kexidb/admin.h
+++ b/kexi/kexidb/admin.h
@@ -44,7 +44,7 @@ class KEXI_DB_EXPORT AdminTools : public Object
\return true on success, false on failure
(then you can get error status from the AdminTools object). */
- virtual bool vacuum(const ConnectionData& data, const QString& databaseName);
+ virtual bool vacuum(const ConnectionData& data, const TQString& databaseName);
//virtual bool vacuum(Connection& conn);
protected:
diff --git a/kexi/kexidb/alter.cpp b/kexi/kexidb/alter.cpp
index f894b2998..5a84424e1 100644
--- a/kexi/kexidb/alter.cpp
+++ b/kexi/kexidb/alter.cpp
@@ -21,7 +21,7 @@
#include "utils.h"
#include <kexiutils/utils.h>
-#include <qmap.h>
+#include <tqmap.h>
#include <kstaticdeleter.h>
@@ -36,7 +36,7 @@ class AlterTableHandler::Private
~Private()
{}
ActionList actions;
- QGuardedPtr<Connection> conn;
+ TQGuardedPtr<Connection> conn;
};
}
@@ -91,7 +91,7 @@ AlterTableHandler::MoveFieldPositionAction& AlterTableHandler::ActionBase::toMov
//--------------------------------------------------------
-AlterTableHandler::FieldActionBase::FieldActionBase(const QString& fieldName, int uid)
+AlterTableHandler::FieldActionBase::FieldActionBase(const TQString& fieldName, int uid)
: ActionBase()
, m_fieldUID(uid)
, m_fieldName(fieldName)
@@ -110,21 +110,21 @@ AlterTableHandler::FieldActionBase::~FieldActionBase()
//--------------------------------------------------------
-static KStaticDeleter< QMap<QCString,int> > KexiDB_alteringTypeForProperty_deleter;
-QMap<QCString,int> *KexiDB_alteringTypeForProperty = 0;
+static KStaticDeleter< TQMap<TQCString,int> > KexiDB_alteringTypeForProperty_deleter;
+TQMap<TQCString,int> *KexiDB_alteringTypeForProperty = 0;
-int AlterTableHandler::alteringTypeForProperty(const QCString& propertyName)
+int AlterTableHandler::alteringTypeForProperty(const TQCString& propertyName)
{
if (!KexiDB_alteringTypeForProperty) {
KexiDB_alteringTypeForProperty_deleter.setObject( KexiDB_alteringTypeForProperty,
- new QMap<QCString,int>() );
+ new TQMap<TQCString,int>() );
#define I(name, type) \
- KexiDB_alteringTypeForProperty->insert(QCString(name).lower(), (int)AlterTableHandler::type)
+ KexiDB_alteringTypeForProperty->insert(TQCString(name).lower(), (int)AlterTableHandler::type)
#define I2(name, type1, type2) \
flag = (int)AlterTableHandler::type1|(int)AlterTableHandler::type2; \
if (flag & AlterTableHandler::PhysicalAlteringRequired) \
flag |= AlterTableHandler::MainSchemaAlteringRequired; \
- KexiDB_alteringTypeForProperty->insert(QCString(name).lower(), flag)
+ KexiDB_alteringTypeForProperty->insert(TQCString(name).lower(), flag)
/* useful links:
http://dev.mysql.com/doc/refman/5.0/en/create-table.html
@@ -180,8 +180,8 @@ int AlterTableHandler::alteringTypeForProperty(const QCString& propertyName)
if (res == 0) {
if (KexiDB::isExtendedTableFieldProperty(propertyName))
return (int)ExtendedSchemaAlteringRequired;
- KexiDBWarn << QString("AlterTableHandler::alteringTypeForProperty(): property \"%1\" not found!")
- .arg(propertyName) << endl;
+ KexiDBWarn << TQString("AlterTableHandler::alteringTypeForProperty(): property \"%1\" not found!")
+ .tqarg(propertyName.data()) << endl;
}
return res;
}
@@ -189,7 +189,7 @@ int AlterTableHandler::alteringTypeForProperty(const QCString& propertyName)
//---
AlterTableHandler::ChangeFieldPropertyAction::ChangeFieldPropertyAction(
- const QString& fieldName, const QString& propertyName, const QVariant& newValue, int uid)
+ const TQString& fieldName, const TQString& propertyName, const TQVariant& newValue, int uid)
: FieldActionBase(fieldName, uid)
, m_propertyName(propertyName)
, m_newValue(newValue)
@@ -211,12 +211,12 @@ void AlterTableHandler::ChangeFieldPropertyAction::updateAlteringRequirements()
setAlteringRequirements( alteringTypeForProperty( m_propertyName.latin1() ) );
}
-QString AlterTableHandler::ChangeFieldPropertyAction::debugString(const DebugOptions& debugOptions)
+TQString AlterTableHandler::ChangeFieldPropertyAction::debugString(const DebugOptions& debugOptions)
{
- QString s = QString("Set \"%1\" property for table field \"%2\" to \"%3\"")
- .arg(m_propertyName).arg(fieldName()).arg(m_newValue.toString());
+ TQString s = TQString("Set \"%1\" property for table field \"%2\" to \"%3\"")
+ .tqarg(m_propertyName).tqarg(fieldName()).tqarg(m_newValue.toString());
if (debugOptions.showUID)
- s.append(QString(" (UID=%1)").arg(m_fieldUID));
+ s.append(TQString(" (UID=%1)").tqarg(m_fieldUID));
return s;
}
@@ -230,9 +230,9 @@ static AlterTableHandler::ActionDict* createActionDict(
}
static void debugAction(AlterTableHandler::ActionBase *action, int nestingLevel,
- bool simulate, const QString& prependString = QString::null, QString* debugTarget = 0)
+ bool simulate, const TQString& prependString = TQString(), TQString* debugTarget = 0)
{
- QString debugString;
+ TQString debugString;
if (!debugTarget)
debugString = prependString;
if (action) {
@@ -260,14 +260,14 @@ static void debugAction(AlterTableHandler::ActionBase *action, int nestingLevel,
static void debugActionDict(AlterTableHandler::ActionDict *dict, int fieldUID, bool simulate)
{
- QString fieldName;
+ TQString fieldName;
AlterTableHandler::ActionDictIterator it(*dict);
if (dynamic_cast<AlterTableHandler::FieldActionBase*>(it.current())) //retrieve field name from the 1st related action
fieldName = dynamic_cast<AlterTableHandler::FieldActionBase*>(it.current())->fieldName();
else
fieldName = "??";
- QString dbg = QString("Action dict for field \"%1\" (%2, UID=%3):")
- .arg(fieldName).arg(dict->count()).arg(fieldUID);
+ TQString dbg = TQString("Action dict for field \"%1\" (%2, UID=%3):")
+ .tqarg(fieldName).tqarg(dict->count()).tqarg(fieldUID);
KexiDBDbg << dbg << endl;
#ifdef KEXI_DEBUG_GUI
if (simulate)
@@ -314,9 +314,9 @@ void AlterTableHandler::ChangeFieldPropertyAction::simplifyActions(ActionDictDic
ActionDict *actionsLikeThis = fieldActions[ uid() ];
if (m_propertyName=="name") {
// Case 1. special: name1 -> name2, i.e. rename action
- QString newName( newValue().toString() );
+ TQString newName( newValue().toString() );
// try to find rename(newName, otherName) action
- ActionBase *renameActionLikeThis = actionsLikeThis ? actionsLikeThis->find( "name" ) : 0;
+ ActionBase *renameActionLikeThis = actionsLikeThis ? actionsLikeThis->tqfind( "name" ) : 0;
if (dynamic_cast<ChangeFieldPropertyAction*>(renameActionLikeThis)) {
// 1. instead of having rename(fieldName(), newValue()) action,
// let's have rename(fieldName(), otherName) action
@@ -334,7 +334,7 @@ void AlterTableHandler::ChangeFieldPropertyAction::simplifyActions(ActionDictDic
adict->insert(m_propertyName.latin1(), newRenameAction);*/
}
else {
- ActionBase *removeActionForThisField = actionsLikeThis ? actionsLikeThis->find( ":remove:" ) : 0;
+ ActionBase *removeActionForThisField = actionsLikeThis ? actionsLikeThis->tqfind( ":remove:" ) : 0;
if (removeActionForThisField) {
//if this field is going to be removed, jsut change the action's field name
// and do not add a new action
@@ -362,7 +362,7 @@ void AlterTableHandler::ChangeFieldPropertyAction::simplifyActions(ActionDictDic
}
return;
}
- ActionBase *removeActionForThisField = actionsLikeThis ? actionsLikeThis->find( ":remove:" ) : 0;
+ ActionBase *removeActionForThisField = actionsLikeThis ? actionsLikeThis->tqfind( ":remove:" ) : 0;
if (removeActionForThisField) {
//if this field is going to be removed, do not add a new action
return;
@@ -372,7 +372,7 @@ void AlterTableHandler::ChangeFieldPropertyAction::simplifyActions(ActionDictDic
// becomes: [ setCaption(A, "captionB") ]
// because adding this action does nothing
ActionDict *nextActionsLikeThis = fieldActions[ uid() ]; //fieldName().latin1() ];
- if (!nextActionsLikeThis || !nextActionsLikeThis->find( m_propertyName.latin1() )) {
+ if (!nextActionsLikeThis || !nextActionsLikeThis->tqfind( m_propertyName.latin1() )) {
//no such action, add this
AlterTableHandler::ChangeFieldPropertyAction* newAction
= new AlterTableHandler::ChangeFieldPropertyAction( *this );
@@ -389,7 +389,7 @@ bool AlterTableHandler::ChangeFieldPropertyAction::shouldBeRemoved(ActionDictDic
}
tristate AlterTableHandler::ChangeFieldPropertyAction::updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap)
+ TQMap<TQString, TQString>& fieldMap)
{
//1. Simpler cases first: changes that do not affect table schema at all
// "caption", "description", "width", "visibleDecimalPlaces"
@@ -471,7 +471,7 @@ return true;
//--------------------------------------------------------
-AlterTableHandler::RemoveFieldAction::RemoveFieldAction(const QString& fieldName, int uid)
+AlterTableHandler::RemoveFieldAction::RemoveFieldAction(const TQString& fieldName, int uid)
: FieldActionBase(fieldName, uid)
{
}
@@ -493,11 +493,11 @@ void AlterTableHandler::RemoveFieldAction::updateAlteringRequirements()
//! @todo
}
-QString AlterTableHandler::RemoveFieldAction::debugString(const DebugOptions& debugOptions)
+TQString AlterTableHandler::RemoveFieldAction::debugString(const DebugOptions& debugOptions)
{
- QString s = QString("Remove table field \"%1\"").arg(fieldName());
+ TQString s = TQString("Remove table field \"%1\"").tqarg(fieldName());
if (debugOptions.showUID)
- s.append(QString(" (UID=%1)").arg(uid()));
+ s.append(TQString(" (UID=%1)").tqarg(uid()));
return s;
}
@@ -519,7 +519,7 @@ void AlterTableHandler::RemoveFieldAction::simplifyActions(ActionDictDict &field
}
tristate AlterTableHandler::RemoveFieldAction::updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap)
+ TQMap<TQString, TQString>& fieldMap)
{
fieldMap.remove( field->name() );
table.removeField(field);
@@ -569,7 +569,7 @@ void AlterTableHandler::InsertFieldAction::setField(KexiDB::Field* field)
if (m_field)
delete m_field;
m_field = field;
- setFieldName(m_field ? m_field->name() : QString::null);
+ setFieldName(m_field ? m_field->name() : TQString());
}
void AlterTableHandler::InsertFieldAction::updateAlteringRequirements()
@@ -580,14 +580,14 @@ void AlterTableHandler::InsertFieldAction::updateAlteringRequirements()
//! @todo
}
-QString AlterTableHandler::InsertFieldAction::debugString(const DebugOptions& debugOptions)
+TQString AlterTableHandler::InsertFieldAction::debugString(const DebugOptions& debugOptions)
{
- QString s = QString("Insert table field \"%1\" at position %2")
- .arg(m_field->name()).arg(m_index);
+ TQString s = TQString("Insert table field \"%1\" at position %2")
+ .tqarg(m_field->name()).tqarg(m_index);
if (debugOptions.showUID)
- s.append(QString(" (UID=%1)").arg(m_fieldUID));
+ s.append(TQString(" (UID=%1)").tqarg(m_fieldUID));
if (debugOptions.showFieldDebug)
- s.append(QString(" (%1)").arg(m_field->debugString()));
+ s.append(TQString(" (%1)").tqarg(m_field->debugString()));
return s;
}
@@ -608,7 +608,7 @@ void AlterTableHandler::InsertFieldAction::simplifyActions(ActionDictDict &field
// Try to find actions related to this action
ActionDict *actionsForThisField = fieldActions[ uid() ]; //m_field->name().latin1() ];
- ActionBase *removeActionForThisField = actionsForThisField ? actionsForThisField->find( ":remove:" ) : 0;
+ ActionBase *removeActionForThisField = actionsForThisField ? actionsForThisField->tqfind( ":remove:" ) : 0;
if (removeActionForThisField) {
//if this field is going to be removed, do not add a new action
//and remove the "Remove" action
@@ -617,7 +617,7 @@ void AlterTableHandler::InsertFieldAction::simplifyActions(ActionDictDict &field
}
if (actionsForThisField) {
//collect property values that have to be changed in this field
- QMap<QCString, QVariant> values;
+ TQMap<TQCString, TQVariant> values;
for (ActionDictIterator it(*actionsForThisField); it.current();) {
ChangeFieldPropertyAction* changePropertyAction = dynamic_cast<ChangeFieldPropertyAction*>(it.current());
if (changePropertyAction) {
@@ -642,13 +642,13 @@ void AlterTableHandler::InsertFieldAction::simplifyActions(ActionDictDict &field
field().debug();
#ifdef KEXI_DEBUG_GUI
KexiUtils::addAlterTableActionDebug(
- QString("** Property-set actions moved to field definition itself:\n")+field().debugString(), 0);
+ TQString("** Property-set actions moved to field definition itself:\n")+field().debugString(), 0);
#endif
}
else {
#ifdef KEXI_DEBUG_GUI
KexiUtils::addAlterTableActionDebug(
- QString("** Failed to set properties for field ")+field().debugString(), 0);
+ TQString("** Failed to set properties for field ")+field().debugString(), 0);
#endif
KexiDBWarn << "AlterTableHandler::InsertFieldAction::simplifyActions(): KexiDB::setFieldProperties() failed!" << endl;
delete f;
@@ -665,7 +665,7 @@ void AlterTableHandler::InsertFieldAction::simplifyActions(ActionDictDict &field
}
tristate AlterTableHandler::InsertFieldAction::updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap)
+ TQMap<TQString, TQString>& fieldMap)
{
//in most cases we won't add the field to fieldMap
Q_UNUSED(field);
@@ -686,7 +686,7 @@ tristate AlterTableHandler::InsertFieldAction::execute(Connection& conn, TableSc
//--------------------------------------------------------
AlterTableHandler::MoveFieldPositionAction::MoveFieldPositionAction(
- int fieldIndex, const QString& fieldName, int uid)
+ int fieldIndex, const TQString& fieldName, int uid)
: FieldActionBase(fieldName, uid)
, m_index(fieldIndex)
{
@@ -707,12 +707,12 @@ void AlterTableHandler::MoveFieldPositionAction::updateAlteringRequirements()
//! @todo
}
-QString AlterTableHandler::MoveFieldPositionAction::debugString(const DebugOptions& debugOptions)
+TQString AlterTableHandler::MoveFieldPositionAction::debugString(const DebugOptions& debugOptions)
{
- QString s = QString("Move table field \"%1\" to position %2")
- .arg(fieldName()).arg(m_index);
+ TQString s = TQString("Move table field \"%1\" to position %2")
+ .tqarg(fieldName()).tqarg(m_index);
if (debugOptions.showUID)
- s.append(QString(" (UID=%1)").arg(uid()));
+ s.append(TQString(" (UID=%1)").tqarg(uid()));
return s;
}
@@ -782,7 +782,7 @@ void AlterTableHandler::debug()
it.current()->debug();
}
-TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArguments& args)
+TableSchema* AlterTableHandler::execute(const TQString& tableName, ExecutionArguments& args)
{
args.result = false;
if (!d->conn) {
@@ -860,7 +860,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
ActionVector actionsVector(allActionsCount);
int currentActionsCount = 0; //some actions may be removed
args.requirements = 0;
- QDict<char> fieldsWithChangedMainSchema(997); // Used to collect fields with changed main schema.
+ TQDict<char> fieldsWithChangedMainSchema(997); // Used to collect fields with changed main schema.
// This will be used when recreateTable is false to update kexi__fields
for (ActionDictDictIterator it(fieldActions); it.current(); ++it) {
for (AlterTableHandler::ActionDictIterator it2(*it.current());it2.current(); ++it2, currentActionsCount++) {
@@ -878,7 +878,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
}
}
// - Debug
- QString dbg = QString("** Overall altering requirements: %1").arg(args.requirements);
+ TQString dbg = TQString("** Overall altering requirements: %1").tqarg(args.requirements);
KexiDBDbg << dbg << endl;
if (args.onlyComputeRequirements) {
@@ -892,14 +892,14 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
if (args.simulate)
KexiUtils::addAlterTableActionDebug(dbg, 0);
#endif
- dbg = QString("** Ordered, simplified actions (%1, was %2):").arg(currentActionsCount).arg(allActionsCount);
+ dbg = TQString("** Ordered, simplified actions (%1, was %2):").tqarg(currentActionsCount).tqarg(allActionsCount);
KexiDBDbg << dbg << endl;
#ifdef KEXI_DEBUG_GUI
if (args.simulate)
KexiUtils::addAlterTableActionDebug(dbg, 0);
#endif
for (int i=0; i<allActionsCount; i++) {
- debugAction(actionsVector[i], 1, args.simulate, QString("%1: ").arg(i+1), args.debugString);
+ debugAction(actionsVector[i], 1, args.simulate, TQString("%1: ").tqarg(i+1), args.debugString);
}
if (args.requirements == 0) {//nothing to do
@@ -916,9 +916,9 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
TableSchema *newTable = recreateTable ? new TableSchema(*oldTable, false/*!copy id*/) : oldTable;
// find nonexisting temp name for new table schema
if (recreateTable) {
- QString tempDestTableName;
+ TQString tempDestTableName;
while (true) {
- tempDestTableName = QString("%1_temp%2%3").arg(newTable->name()).arg(QString::number(rand(), 16)).arg(QString::number(rand(), 16));
+ tempDestTableName = TQString("%1_temp%2%3").tqarg(newTable->name()).tqarg(TQString::number(rand(), 16)).tqarg(TQString::number(rand(), 16));
if (!d->conn->tableSchema(tempDestTableName))
break;
}
@@ -931,7 +931,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
// Update table schema in memory ----
int lastUID = -1;
Field *currentField = 0;
- QMap<QString, QString> fieldMap; // a map from new value to old value
+ TQMap<TQString, TQString> fieldMap; // a map from new value to old value
foreach_list( Field::ListIterator, it, newTable->fieldsIterator() ) {
fieldMap.insert( it.current()->name(), it.current()->name() );
}
@@ -1007,14 +1007,14 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
// -Some source fields can be skipped in case when there are deleted fields.
// -Some destination fields can be skipped in case when there
// are new empty fields without fixed/default value.
- QString sql = QString("INSERT INTO %1 (").arg(d->conn->escapeIdentifier(newTable->name()));
+ TQString sql = TQString("INSERT INTO %1 (").tqarg(d->conn->escapeIdentifier(newTable->name()));
//insert list of dest. fields
bool first = true;
- QString sourceFields;
+ TQString sourceFields;
foreach_list( Field::ListIterator, it, newTable->fieldsIterator() ) {
Field * const f = it.current();
- QString renamedFieldName( fieldMap[ f->name() ] );
- QString sourceSQLString;
+ TQString renamedFieldName( fieldMap[ f->name() ] );
+ TQString sourceSQLString;
if (!renamedFieldName.isEmpty()) {
//this field should be renamed
sourceSQLString = d->conn->escapeIdentifier(renamedFieldName);
@@ -1051,7 +1051,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
sourceFields.append( sourceSQLString );
}
}
- sql.append(QString(") SELECT ") + sourceFields + " FROM " + oldTable->name());
+ sql.append(TQString(") SELECT ") + sourceFields + " FROM " + oldTable->name());
KexiDBDbg << " ** " << sql << endl;
if (!d->conn->executeSQL( sql )) {
setError(d->conn);
@@ -1060,7 +1060,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
return 0;
}
- const QString oldTableName = oldTable->name();
+ const TQString oldTableName = oldTable->name();
/* args.result = d->conn->dropTable( oldTable );
if (!args.result || ~args.result) {
setError(d->conn);
@@ -1070,7 +1070,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
oldTable = 0;*/
// Replace the old table with the new one (oldTable will be destroyed)
- if (!d->conn->alterTableName(*newTable, oldTableName, true /*replace*/)) {
+ if (!d->conn->alterTableName(*newTable, oldTableName, true /*tqreplace*/)) {
setError(d->conn);
//! @todo delete newTable...
args.result = false;
@@ -1082,7 +1082,7 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
if (!recreateTable) {
if ((MainSchemaAlteringRequired & args.requirements) && !fieldsWithChangedMainSchema.isEmpty()) {
//update main schema (kexi__fields) for changed fields
- foreach_list(QDictIterator<char>, it, fieldsWithChangedMainSchema) {
+ foreach_list(TQDictIterator<char>, it, fieldsWithChangedMainSchema) {
Field *f = newTable->field( it.currentKey() );
if (f) {
if (!d->conn->storeMainFieldSchema(f)) {
@@ -1100,12 +1100,12 @@ TableSchema* AlterTableHandler::execute(const QString& tableName, ExecutionArgum
return newTable;
}
-/*TableSchema* AlterTableHandler::execute(const QString& tableName, tristate &result, bool simulate)
+/*TableSchema* AlterTableHandler::execute(const TQString& tableName, tristate &result, bool simulate)
{
return executeInternal( tableName, result, simulate, 0 );
}
-tristate AlterTableHandler::simulateExecution(const QString& tableName, QString& debugString)
+tristate AlterTableHandler::simulateExecution(const TQString& tableName, TQString& debugString)
{
tristate result;
(void)executeInternal( tableName, result, true//simulate
diff --git a/kexi/kexidb/alter.h b/kexi/kexidb/alter.h
index 1e6d8e876..807c28ebf 100644
--- a/kexi/kexidb/alter.h
+++ b/kexi/kexidb/alter.h
@@ -22,8 +22,8 @@
#include "connection.h"
-#include <qvaluelist.h>
-#include <qasciidict.h>
+#include <tqvaluelist.h>
+#include <tqasciidict.h>
#include <kdebug.h>
@@ -141,17 +141,17 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
};
class ActionBase;
- typedef QAsciiDict<ActionBase> ActionDict; //!< for collecting actions related to a single field
- typedef QIntDict<ActionDict> ActionDictDict; //!< for collecting groups of actions by field UID
- typedef QAsciiDictIterator<ActionBase> ActionDictIterator;
- typedef QIntDictIterator<ActionDict> ActionDictDictIterator;
- typedef QPtrVector<ActionBase> ActionVector; //!< for collecting actions related to a single field
+ typedef TQAsciiDict<ActionBase> ActionDict; //!< for collecting actions related to a single field
+ typedef TQIntDict<ActionDict> ActionDictDict; //!< for collecting groups of actions by field UID
+ typedef TQAsciiDictIterator<ActionBase> ActionDictIterator;
+ typedef TQIntDictIterator<ActionDict> ActionDictDictIterator;
+ typedef TQPtrVector<ActionBase> ActionVector; //!< for collecting actions related to a single field
//! Defines a type for action list.
- typedef QPtrList<ActionBase> ActionList;
+ typedef TQPtrList<ActionBase> ActionList;
//! Defines a type for action list's iterator.
- typedef QPtrListIterator<ActionBase> ActionListIterator;
+ typedef TQPtrListIterator<ActionBase> ActionListIterator;
//! Abstract base class used for implementing all the AlterTable actions.
class KEXI_DB_EXPORT ActionBase {
@@ -182,7 +182,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
bool showFieldDebug : 1;
};
- virtual QString debugString(const DebugOptions& debugOptions = DebugOptions()) {
+ virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions()) {
Q_UNUSED(debugOptions); return "ActionBase"; }
void debug(const DebugOptions& debugOptions = DebugOptions()) {
KexiDBDbg << debugString(debugOptions)
@@ -210,7 +210,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
Q_UNUSED(fieldActions); return false; }
virtual tristate updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap)
+ TQMap<TQString, TQString>& fieldMap)
{ Q_UNUSED(table); Q_UNUSED(field); Q_UNUSED(fieldMap); return true; }
private:
@@ -231,12 +231,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
//! Abstract base class used for implementing table field-related actions.
class KEXI_DB_EXPORT FieldActionBase : public ActionBase {
public:
- FieldActionBase(const QString& fieldName, int uid);
+ FieldActionBase(const TQString& fieldName, int uid);
FieldActionBase(bool);
virtual ~FieldActionBase();
//! \return field name for this action
- QString fieldName() const { return m_fieldName; }
+ TQString fieldName() const { return m_fieldName; }
/*! \return field's unique identifier
This id is needed because in the meantime there can be more than one
@@ -250,14 +250,14 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
int uid() const { return m_fieldUID; }
//! Sets field name for this action
- void setFieldName(const QString& fieldName) { m_fieldName = fieldName; }
+ void setFieldName(const TQString& fieldName) { m_fieldName = fieldName; }
protected:
//! field's unique identifier, @see uid()
int m_fieldUID;
private:
- QString m_fieldName;
+ TQString m_fieldName;
};
/*! Defines an action for changing a single property value of a table field.
@@ -270,22 +270,22 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
*/
class KEXI_DB_EXPORT ChangeFieldPropertyAction : public FieldActionBase {
public:
- ChangeFieldPropertyAction(const QString& fieldName,
- const QString& propertyName, const QVariant& newValue, int uid);
+ ChangeFieldPropertyAction(const TQString& fieldName,
+ const TQString& propertyName, const TQVariant& newValue, int uid);
//! @internal, used for constructing null action
ChangeFieldPropertyAction(bool null);
virtual ~ChangeFieldPropertyAction();
- QString propertyName() const { return m_propertyName; }
- QVariant newValue() const { return m_newValue; }
- virtual QString debugString(const DebugOptions& debugOptions = DebugOptions());
+ TQString propertyName() const { return m_propertyName; }
+ TQVariant newValue() const { return m_newValue; }
+ virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions());
virtual void simplifyActions(ActionDictDict &fieldActions);
virtual bool shouldBeRemoved(ActionDictDict &fieldActions);
virtual tristate updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap);
+ TQMap<TQString, TQString>& fieldMap);
protected:
virtual void updateAlteringRequirements();
@@ -293,23 +293,23 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
//! Performs physical execution of this action.
virtual tristate execute(Connection &conn, TableSchema &table);
- QString m_propertyName;
- QVariant m_newValue;
+ TQString m_propertyName;
+ TQVariant m_newValue;
};
//! Defines an action for removing a single table field.
class KEXI_DB_EXPORT RemoveFieldAction : public FieldActionBase {
public:
- RemoveFieldAction(const QString& fieldName, int uid);
+ RemoveFieldAction(const TQString& fieldName, int uid);
RemoveFieldAction(bool);
virtual ~RemoveFieldAction();
- virtual QString debugString(const DebugOptions& debugOptions = DebugOptions());
+ virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions());
virtual void simplifyActions(ActionDictDict &fieldActions);
virtual tristate updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap);
+ TQMap<TQString, TQString>& fieldMap);
protected:
virtual void updateAlteringRequirements();
@@ -331,12 +331,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
void setIndex( int index ) { m_index = index; }
KexiDB::Field& field() const { return *m_field; }
void setField(KexiDB::Field* field);
- virtual QString debugString(const DebugOptions& debugOptions = DebugOptions());
+ virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions());
virtual void simplifyActions(ActionDictDict &fieldActions);
virtual tristate updateTableSchema(TableSchema &table, Field* field,
- QMap<QString, QString>& fieldMap);
+ TQMap<TQString, TQString>& fieldMap);
protected:
virtual void updateAlteringRequirements();
@@ -354,12 +354,12 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
position within table schema. */
class KEXI_DB_EXPORT MoveFieldPositionAction : public FieldActionBase {
public:
- MoveFieldPositionAction(int fieldIndex, const QString& fieldName, int uid);
+ MoveFieldPositionAction(int fieldIndex, const TQString& fieldName, int uid);
MoveFieldPositionAction(bool);
virtual ~MoveFieldPositionAction();
int index() const { return m_index; }
- virtual QString debugString(const DebugOptions& debugOptions = DebugOptions());
+ virtual TQString debugString(const DebugOptions& debugOptions = DebugOptions());
virtual void simplifyActions(ActionDictDict &fieldActions);
@@ -408,7 +408,7 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
{
}
/*! If not 0, debug is directed here. Used only in the alter table test suite. */
- QString* debugString;
+ TQString* debugString;
/*! Requrements computed, a combination of AlteringRequirements values. */
int requirements;
/*! Set to true on success, to false on failure. */
@@ -439,14 +439,14 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
\return the new table schema object created as a result of schema altering.
The old table is returned if recreating table schema was not necessary or args.simulate is true.
0 is returned if args.result is not true. */
- TableSchema* execute(const QString& tableName, ExecutionArguments & args);
+ TableSchema* execute(const TQString& tableName, ExecutionArguments & args);
//! Displays debug information about all actions collected by the handler.
void debug();
/*! Like execute() with simulate set to true, but debug is directed to debugString.
This function is used only in the alter table test suite. */
-// tristate simulateExecution(const QString& tableName, QString& debugString);
+// tristate simulateExecution(const TQString& tableName, TQString& debugString);
/*! Helper. \return a combination of AlteringRequirements values decribing altering type required
when a given property field's \a propertyName is altered.
@@ -454,11 +454,11 @@ class KEXI_DB_EXPORT AlterTableHandler : public Object
as a temporary replacement before AlterTableHandler is fully implemented.
Thus, it is possible to identify properties that have no PhysicalAlteringRequired flag set
(e.g. caption or extended properties like visibleDecimalPlaces. */
- static int alteringTypeForProperty(const QCString& propertyName);
+ static int alteringTypeForProperty(const TQCString& propertyName);
protected:
-// TableSchema* executeInternal(const QString& tableName, tristate& result, bool simulate = false,
-// QString* debugString = 0);
+// TableSchema* executeInternal(const TQString& tableName, tristate& result, bool simulate = false,
+// TQString* debugString = 0);
class Private;
Private *d;
diff --git a/kexi/kexidb/connection.cpp b/kexi/kexidb/connection.cpp
index 1a401a8ab..830dee292 100644
--- a/kexi/kexidb/connection.cpp
+++ b/kexi/kexidb/connection.cpp
@@ -39,10 +39,10 @@
#include <kexiutils/utils.h>
#include <kexiutils/identifier.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qguardedptr.h>
-#include <qdom.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
+#include <tqdom.h>
#include <klocale.h>
#include <kdebug.h>
@@ -112,31 +112,31 @@ class ConnectionPrivate
delete m_parser;
}
- void errorInvalidDBContents(const QString& details) {
+ void errorInvalidDBContents(const TQString& details) {
conn->setError( ERR_INVALID_DATABASE_CONTENTS, i18n("Invalid database contents. ")+details);
}
- QString strItIsASystemObject() const {
+ TQString strItIsASystemObject() const {
return i18n("It is a system object.");
}
inline Parser *parser() { return m_parser ? m_parser : (m_parser = new Parser(conn)); }
Connection* const conn; //!< The \a Connection instance this \a ConnectionPrivate belongs to.
- QGuardedPtr<ConnectionData> conn_data; //!< the \a ConnectionData used within that connection.
+ TQGuardedPtr<ConnectionData> conn_data; //!< the \a ConnectionData used within that connection.
/*! Default transaction handle.
If transactions are supported: Any operation on database (e.g. inserts)
that is started without specifying transaction context, will be performed
in the context of this transaction. */
Transaction default_trans;
- QValueList<Transaction> transactions;
+ TQValueList<Transaction> transactions;
- QPtrDict< QPtrList<Connection::TableSchemaChangeListenerInterface> > tableSchemaChangeListeners;
+ TQPtrDict< TQPtrList<Connection::TableSchemaChangeListenerInterface> > tableSchemaChangeListeners;
- //! Used in Connection::setQuerySchemaObsolete( const QString& queryName )
+ //! Used in Connection::setQuerySchemaObsolete( const TQString& queryName )
//! to collect obsolete queries. THese are deleted on connection deleting.
- QPtrList<QuerySchema> obsoleteQueries;
+ TQPtrList<QuerySchema> obsoleteQueries;
//! server version information for this connection.
@@ -148,19 +148,19 @@ class ConnectionPrivate
Parser *m_parser;
//! Table schemas retrieved on demand with tableSchema()
- QIntDict<TableSchema> tables;
- QDict<TableSchema> tables_byname;
- QIntDict<QuerySchema> queries;
- QDict<QuerySchema> queries_byname;
+ TQIntDict<TableSchema> tables;
+ TQDict<TableSchema> tables_byname;
+ TQIntDict<QuerySchema> queries;
+ TQDict<QuerySchema> queries_byname;
//! used just for removing system TableSchema objects on db close.
- QPtrDict<TableSchema> kexiDBSystemTables;
+ TQPtrDict<TableSchema> kexiDBSystemTables;
//! Database properties
DatabaseProperties* dbProperties;
- QString availableDatabaseName; //!< used by anyAvailableDatabaseName()
- QString usedDatabase; //!< database name that is opened now (the currentDatabase() name)
+ TQString availableDatabaseName; //!< used by anyAvailableDatabaseName()
+ TQString usedDatabase; //!< database name that is opened now (the currentDatabase() name)
//! true if rollbackTransaction() and commitTransaction() shouldn't remove
//! the transaction object from 'transactions' list; used by closeDatabase()
@@ -194,10 +194,10 @@ class ConnectionPrivate
using namespace KexiDB;
//! static: list of internal KexiDB system table names
-QStringList KexiDB_kexiDBSystemTableNames;
+TQStringList KexiDB_kexiDBSystemTableNames;
Connection::Connection( Driver *driver, ConnectionData &conn_data )
- : QObject()
+ : TQObject()
,KexiDB::Object()
,d(new ConnectionPrivate(this, conn_data))
,m_driver(driver)
@@ -254,8 +254,8 @@ bool Connection::connect()
d->serverVersion.clear();
if (!(d->isConnected = drv_connect(d->serverVersion))) {
setError(m_driver->isFileDriver() ?
- i18n("Could not open \"%1\" project file.").arg(QDir::convertSeparators(d->conn_data->fileName()))
- : i18n("Could not connect to \"%1\" database server.").arg(d->conn_data->serverInfoString()) );
+ i18n("Could not open \"%1\" project file.").tqarg(TQDir::convertSeparators(d->conn_data->fileName()))
+ : i18n("Could not connect to \"%1\" database server.").tqarg(d->conn_data->serverInfoString()) );
}
return d->isConnected;
}
@@ -268,7 +268,7 @@ bool Connection::isDatabaseUsed() const
void Connection::clearError()
{
Object::clearError();
- m_sql = QString::null;
+ m_sql = TQString();
}
bool Connection::disconnect()
@@ -311,34 +311,34 @@ bool Connection::checkIsDatabaseUsed()
return false;
}
-QStringList Connection::databaseNames(bool also_system_db)
+TQStringList Connection::databaseNames(bool also_system_db)
{
KexiDBDbg << "Connection::databaseNames("<<also_system_db<<")"<< endl;
if (!checkConnected())
- return QStringList();
+ return TQStringList();
- QString tmpdbName;
+ TQString tmpdbName;
//some engines need to have opened any database before executing "create database"
if (!useTemporaryDatabaseIfNeeded(tmpdbName))
- return QStringList();
+ return TQStringList();
- QStringList list, non_system_list;
+ TQStringList list, non_system_list;
bool ret = drv_getDatabasesList( list );
if (!tmpdbName.isEmpty()) {
//whatever result is - now we have to close temporary opened database:
if (!closeDatabase())
- return QStringList();
+ return TQStringList();
}
if (!ret)
- return QStringList();
+ return TQStringList();
if (also_system_db)
return list;
//filter system databases:
- for (QStringList::ConstIterator it = list.constBegin(); it!=list.constEnd(); ++it) {
+ for (TQStringList::ConstIterator it = list.constBegin(); it!=list.constEnd(); ++it) {
KexiDBDbg << "Connection::databaseNames(): " << *it << endl;
if (!m_driver->isSystemDatabaseName(*it)) {
KexiDBDbg << "add " << *it << endl;
@@ -348,29 +348,29 @@ QStringList Connection::databaseNames(bool also_system_db)
return non_system_list;
}
-bool Connection::drv_getDatabasesList( QStringList &list )
+bool Connection::drv_getDatabasesList( TQStringList &list )
{
list.clear();
return true;
}
-bool Connection::drv_databaseExists( const QString &dbName, bool ignoreErrors )
+bool Connection::drv_databaseExists( const TQString &dbName, bool ignoreErrors )
{
- QStringList list = databaseNames(true);//also system
+ TQStringList list = databaseNames(true);//also system
if (error()) {
return false;
}
- if (list.find( dbName )==list.end()) {
+ if (list.tqfind( dbName )==list.end()) {
if (!ignoreErrors)
- setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").arg(dbName));
+ setError(ERR_OBJECT_NOT_FOUND, i18n("The database \"%1\" does not exist.").tqarg(dbName));
return false;
}
return true;
}
-bool Connection::databaseExists( const QString &dbName, bool ignoreErrors )
+bool Connection::databaseExists( const TQString &dbName, bool ignoreErrors )
{
// KexiDBDbg << "Connection::databaseExists(" << dbName << "," << ignoreErrors << ")" << endl;
if (!checkConnected())
@@ -380,29 +380,29 @@ bool Connection::databaseExists( const QString &dbName, bool ignoreErrors )
if (m_driver->isFileDriver()) {
//for file-based db: file must exists and be accessible
//js: moved from useDatabase():
- QFileInfo file(d->conn_data->fileName());
+ TQFileInfo file(d->conn_data->fileName());
if (!file.exists() || ( !file.isFile() && !file.isSymLink()) ) {
if (!ignoreErrors)
setError(ERR_OBJECT_NOT_FOUND, i18n("Database file \"%1\" does not exist.")
- .arg(QDir::convertSeparators(d->conn_data->fileName())) );
+ .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
if (!file.isReadable()) {
if (!ignoreErrors)
setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not readable.")
- .arg(QDir::convertSeparators(d->conn_data->fileName())) );
+ .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
if (!file.isWritable()) {
if (!ignoreErrors)
setError(ERR_ACCESS_RIGHTS, i18n("Database file \"%1\" is not writable.")
- .arg(QDir::convertSeparators(d->conn_data->fileName())) );
+ .tqarg(TQDir::convertSeparators(d->conn_data->fileName())) );
return false;
}
return true;
}
- QString tmpdbName;
+ TQString tmpdbName;
//some engines need to have opened any database before executing "create database"
const bool orig_skip_databaseExists_check_in_useDatabase = d->skip_databaseExists_check_in_useDatabase;
d->skip_databaseExists_check_in_useDatabase = true;
@@ -424,7 +424,7 @@ bool Connection::databaseExists( const QString &dbName, bool ignoreErrors )
#define createDatabase_CLOSE \
{ if (!closeDatabase()) { \
- setError(i18n("Database \"%1\" created but could not be closed after creation.").arg(dbName) ); \
+ setError(i18n("Database \"%1\" created but could not be closed after creation.").tqarg(dbName) ); \
return false; \
} }
@@ -432,18 +432,18 @@ bool Connection::databaseExists( const QString &dbName, bool ignoreErrors )
{ createDatabase_CLOSE; return false; }
-bool Connection::createDatabase( const QString &dbName )
+bool Connection::createDatabase( const TQString &dbName )
{
if (!checkConnected())
return false;
if (databaseExists( dbName )) {
- setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").arg(dbName) );
+ setError(ERR_OBJECT_EXISTS, i18n("Database \"%1\" already exists.").tqarg(dbName) );
return false;
}
if (m_driver->isSystemDatabaseName( dbName )) {
setError(ERR_SYSTEM_NAME_RESERVED,
- i18n("Cannot create database \"%1\". This name is reserved for system database.").arg(dbName) );
+ i18n("Cannot create database \"%1\". This name is reserved for system database.").tqarg(dbName) );
return false;
}
if (m_driver->isFileDriver()) {
@@ -451,14 +451,14 @@ bool Connection::createDatabase( const QString &dbName )
d->conn_data->setFileName( dbName );
}
- QString tmpdbName;
+ TQString tmpdbName;
//some engines need to have opened any database before executing "create database"
if (!useTemporaryDatabaseIfNeeded(tmpdbName))
return false;
//low-level create
if (!drv_createDatabase( dbName )) {
- setError(i18n("Error creating database \"%1\" on the server.").arg(dbName) );
+ setError(i18n("Error creating database \"%1\" on the server.").tqarg(dbName) );
closeDatabase();//sanity
return false;
}
@@ -472,7 +472,7 @@ bool Connection::createDatabase( const QString &dbName )
if (!tmpdbName.isEmpty() || !m_driver->d->isDBOpenedAfterCreate) {
//db need to be opened
if (!useDatabase( dbName, false/*not yet kexi compatible!*/ )) {
- setError(i18n("Database \"%1\" created but could not be opened.").arg(dbName) );
+ setError(i18n("Database \"%1\" created but could not be opened.").tqarg(dbName) );
return false;
}
}
@@ -496,7 +496,7 @@ bool Connection::createDatabase( const QString &dbName )
return false;
//-physically create system tables
- for (QPtrDictIterator<TableSchema> it(d->kexiDBSystemTables); it.current(); ++it) {
+ for (TQPtrDictIterator<TableSchema> it(d->kexiDBSystemTables); it.current(); ++it) {
if (!drv_createTable( it.current()->name() ))
createDatabase_ERROR;
}
@@ -510,9 +510,9 @@ bool Connection::createDatabase( const QString &dbName )
FieldList *fl = ts->subList("p_id", "p_name", "p_mime", "p_url");
if (!fl)
createDatabase_ERROR;
- if (!insertRecord(*fl, QVariant(1), QVariant("Tables"), QVariant("kexi/table"), QVariant("http://koffice.org/kexi/")))
+ if (!insertRecord(*fl, TQVariant(1), TQVariant("Tables"), TQVariant("kexi/table"), TQVariant("http://koffice.org/kexi/")))
createDatabase_ERROR;
- if (!insertRecord(*fl, QVariant(2), QVariant("Queries"), QVariant("kexi/query"), QVariant("http://koffice.org/kexi/")))
+ if (!insertRecord(*fl, TQVariant(2), TQVariant("Queries"), TQVariant("kexi/query"), TQVariant("http://koffice.org/kexi/")))
createDatabase_ERROR;
*/
@@ -534,7 +534,7 @@ bool Connection::createDatabase( const QString &dbName )
#undef createDatabase_CLOSE
#undef createDatabase_ERROR
-bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *cancelled, MessageHandler* msgHandler )
+bool Connection::useDatabase( const TQString &dbName, bool kexiCompatible, bool *cancelled, MessageHandler* msgHandler )
{
if (cancelled)
*cancelled = false;
@@ -544,9 +544,9 @@ bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *
if (dbName.isEmpty())
return false;
- QString my_dbName = dbName;
+ TQString my_dbName = dbName;
// if (my_dbName.isEmpty()) {
-// const QStringList& db_lst = databaseNames();
+// const TQStringList& db_lst = databaseNames();
// if (!db_lst.isEmpty())
// my_dbName = db_lst.first();
// }
@@ -566,7 +566,7 @@ bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *
if (!drv_useDatabase( my_dbName, cancelled, msgHandler )) {
if (cancelled && *cancelled)
return false;
- QString msg(i18n("Opening database \"%1\" failed.").arg( my_dbName ));
+ TQString msg(i18n("Opening database \"%1\" failed.").tqarg( my_dbName ));
if (error())
setError( this, msg );
else
@@ -582,14 +582,14 @@ bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *
//-get global database information
int num;
bool ok;
-// static QString notfound_str = i18n("\"%1\" database property not found");
+// static TQString notfound_str = i18n("\"%1\" database property not found");
num = d->dbProperties->value("kexidb_major_ver").toInt(&ok);
if (!ok)
return false;
d->databaseVersion.major = num;
/* if (true!=querySingleNumber(
- "select db_value from kexi__db where db_property=" + m_driver->escapeString(QString("kexidb_major_ver")), num)) {
- d->errorInvalidDBContents(notfound_str.arg("kexidb_major_ver"));
+ "select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_major_ver")), num)) {
+ d->errorInvalidDBContents(notfound_str.tqarg("kexidb_major_ver"));
return false;
}*/
num = d->dbProperties->value("kexidb_minor_ver").toInt(&ok);
@@ -597,8 +597,8 @@ bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *
return false;
d->databaseVersion.minor = num;
/* if (true!=querySingleNumber(
- "select db_value from kexi__db where db_property=" + m_driver->escapeString(QString("kexidb_minor_ver")), num)) {
- d->errorInvalidDBContents(notfound_str.arg("kexidb_minor_ver"));
+ "select db_value from kexi__db where db_property=" + m_driver->escapeString(TQString("kexidb_minor_ver")), num)) {
+ d->errorInvalidDBContents(notfound_str.tqarg("kexidb_minor_ver"));
return false;
}*/
@@ -607,8 +607,8 @@ bool Connection::useDatabase( const QString &dbName, bool kexiCompatible, bool *
if (m_driver->versionMajor()!=KexiDB::versionMajor()) {
setError(ERR_INCOMPAT_DATABASE_VERSION,
i18n("Database version (%1) does not match Kexi application's version (%2)")
- .arg( QString("%1.%2").arg(versionMajor()).arg(versionMinor()) )
- .arg( QString("%1.%2").arg(KexiDB::versionMajor()).arg(KexiDB::versionMinor()) ) );
+ .tqarg( TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor()) )
+ .tqarg( TQString("%1.%2").tqarg(KexiDB::versionMajor()).tqarg(KexiDB::versionMinor()) ) );
return false;
}
if (m_driver->versionMinor()!=KexiDB::versionMinor()) {
@@ -633,7 +633,7 @@ bool Connection::closeDatabase()
/*! \todo (js) add CLEVER algorithm here for nested transactions */
if (m_driver->transactionsSupported()) {
//rollback all transactions
- QValueList<Transaction>::ConstIterator it;
+ TQValueList<Transaction>::ConstIterator it;
d->dont_remove_transactions=true; //lock!
for (it=d->transactions.constBegin(); it!= d->transactions.constEnd(); ++it) {
if (!rollbackTransaction(*it)) {//rollback as much as you can, don't stop on prev. errors
@@ -642,7 +642,7 @@ bool Connection::closeDatabase()
else {
KexiDBDbg << "Connection::closeDatabase(): transaction rolled back!" << endl;
KexiDBDbg << "Connection::closeDatabase(): trans.refcount==" <<
- ((*it).m_data ? QString::number((*it).m_data->refcount) : "(null)") << endl;
+ ((*it).m_data ? TQString::number((*it).m_data->refcount) : "(null)") << endl;
}
}
d->dont_remove_transactions=false; //unlock!
@@ -664,14 +664,14 @@ bool Connection::closeDatabase()
return ret;
}
-QString Connection::currentDatabase() const
+TQString Connection::currentDatabase() const
{
return d->usedDatabase;
}
-bool Connection::useTemporaryDatabaseIfNeeded(QString &tmpdbName)
+bool Connection::useTemporaryDatabaseIfNeeded(TQString &tmpdbName)
{
- if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_REQUIRED_TO_CONNECT
+ if (!m_driver->isFileDriver() && m_driver->beh->USING_DATABASE_RETQUIRED_TO_CONNECT
&& !isDatabaseUsed()) {
//we have no db used, but it is required by engine to have used any!
tmpdbName = anyAvailableDatabaseName();
@@ -686,19 +686,19 @@ bool Connection::useTemporaryDatabaseIfNeeded(QString &tmpdbName)
if (!ret) {
setError(errorNum(),
i18n("Error during starting temporary connection using \"%1\" database name.")
- .arg(tmpdbName) );
+ .tqarg(tmpdbName) );
return false;
}
}
return true;
}
-bool Connection::dropDatabase( const QString &dbName )
+bool Connection::dropDatabase( const TQString &dbName )
{
if (!checkConnected())
return false;
- QString dbToDrop;
+ TQString dbToDrop;
if (dbName.isEmpty() && d->usedDatabase.isEmpty()) {
if (!m_driver->isFileDriver()
|| (m_driver->isFileDriver() && d->conn_data->fileName().isEmpty()) ) {
@@ -713,7 +713,7 @@ bool Connection::dropDatabase( const QString &dbName )
dbToDrop = d->usedDatabase;
} else {
if (m_driver->isFileDriver()) //lets get full path
- dbToDrop = QFileInfo(dbName).absFilePath();
+ dbToDrop = TQFileInfo(dbName).absFilePath();
else
dbToDrop = dbName;
}
@@ -725,7 +725,7 @@ bool Connection::dropDatabase( const QString &dbName )
}
if (m_driver->isSystemDatabaseName( dbToDrop )) {
- setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").arg(dbToDrop) );
+ setError(ERR_SYSTEM_NAME_RESERVED, i18n("Cannot delete system database \"%1\".").tqarg(dbToDrop) );
return false;
}
@@ -735,7 +735,7 @@ bool Connection::dropDatabase( const QString &dbName )
return false;
}
- QString tmpdbName;
+ TQString tmpdbName;
//some engines need to have opened any database before executing "drop database"
if (!useTemporaryDatabaseIfNeeded(tmpdbName))
return false;
@@ -751,9 +751,9 @@ bool Connection::dropDatabase( const QString &dbName )
return ret;
}
-QStringList Connection::objectNames(int objType, bool* ok)
+TQStringList Connection::objectNames(int objType, bool* ok)
{
- QStringList list;
+ TQStringList list;
if (!checkIsDatabaseUsed()) {
if(ok)
@@ -761,11 +761,11 @@ QStringList Connection::objectNames(int objType, bool* ok)
return list;
}
- QString sql;
+ TQString sql;
if (objType==KexiDB::AnyObjectType)
sql = "SELECT o_name FROM kexi__objects";
else
- sql = QString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").arg(objType);
+ sql = TQString::tqfromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType);
Cursor *c = executeQuery(sql);
if (!c) {
@@ -775,7 +775,7 @@ QStringList Connection::objectNames(int objType, bool* ok)
}
for (c->moveFirst(); !c->eof(); c->moveNext()) {
- QString name = c->value(0).toString();
+ TQString name = c->value(0).toString();
if (KexiUtils::isIdentifier( name )) {
list.append(name);
}
@@ -792,10 +792,10 @@ QStringList Connection::objectNames(int objType, bool* ok)
return list;
}
-QStringList Connection::tableNames(bool also_system_tables)
+TQStringList Connection::tableNames(bool also_system_tables)
{
bool ok = true;
- QStringList list = objectNames(TableObjectType, &ok);
+ TQStringList list = objectNames(TableObjectType, &ok);
if (also_system_tables && ok) {
list += Connection::kexiDBSystemTableNames();
}
@@ -803,7 +803,7 @@ QStringList Connection::tableNames(bool also_system_tables)
}
//! \todo (js): this will depend on KexiDB lib version
-const QStringList& Connection::kexiDBSystemTableNames()
+const TQStringList& Connection::kexiDBSystemTableNames()
{
if (KexiDB_kexiDBSystemTableNames.isEmpty()) {
KexiDB_kexiDBSystemTableNames
@@ -834,30 +834,30 @@ DatabaseProperties& Connection::databaseProperties()
return *d->dbProperties;
}
-QValueList<int> Connection::tableIds()
+TQValueList<int> Connection::tableIds()
{
return objectIds(KexiDB::TableObjectType);
}
-QValueList<int> Connection::queryIds()
+TQValueList<int> Connection::queryIds()
{
return objectIds(KexiDB::QueryObjectType);
}
-QValueList<int> Connection::objectIds(int objType)
+TQValueList<int> Connection::objectIds(int objType)
{
- QValueList<int> list;
+ TQValueList<int> list;
if (!checkIsDatabaseUsed())
return list;
Cursor *c = executeQuery(
- QString::fromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").arg(objType));
+ TQString::tqfromLatin1("SELECT o_id, o_name FROM kexi__objects WHERE o_type=%1").tqarg(objType));
if (!c)
return list;
for (c->moveFirst(); !c->eof(); c->moveNext())
{
- QString tname = c->value(1).toString(); //kexi__objects.o_name
+ TQString tname = c->value(1).toString(); //kexi__objects.o_name
if (KexiUtils::isIdentifier( tname )) {
list.append(c->value(0).toInt()); //kexi__objects.o_id
}
@@ -868,10 +868,10 @@ QValueList<int> Connection::objectIds(int objType)
return list;
}
-QString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema ) const
+TQString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema ) const
{
// Each SQL identifier needs to be escaped in the generated query.
- QString sql;
+ TQString sql;
sql.reserve(4096);
sql = "CREATE TABLE " + escapeIdentifier(tableSchema.name()) + " (";
bool first=true;
@@ -882,10 +882,10 @@ QString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema
first = false;
else
sql += ", ";
- QString v = escapeIdentifier(field->name()) + " ";
+ TQString v = escapeIdentifier(field->name()) + " ";
const bool autoinc = field->isAutoIncrement();
- const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_REQUIRES_PK);
-//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_REQUIRES_PK==true!
+ const bool pk = field->isPrimaryKey() || (autoinc && m_driver->beh->AUTO_INCREMENT_RETQUIRES_PK);
+//TODO: warning: ^^^^^ this allows only one autonumber per table when AUTO_INCREMENT_RETQUIRES_PK==true!
if (autoinc && m_driver->beh->SPECIAL_AUTO_INCREMENT_DEF) {
if (pk)
v += m_driver->beh->AUTO_INCREMENT_TYPE + " " + m_driver->beh->AUTO_INCREMENT_PK_FIELD_OPTION;
@@ -903,12 +903,12 @@ QString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema
if (field->isFPNumericType() && field->precision()>0) {
if (field->scale()>0)
- v += QString::fromLatin1("(%1,%2)").arg(field->precision()).arg(field->scale());
+ v += TQString::tqfromLatin1("(%1,%2)").tqarg(field->precision()).tqarg(field->scale());
else
- v += QString::fromLatin1("(%1)").arg(field->precision());
+ v += TQString::tqfromLatin1("(%1)").tqarg(field->precision());
}
else if (field->type()==Field::Text && field->length()>0)
- v += QString::fromLatin1("(%1)").arg(field->length());
+ v += TQString::tqfromLatin1("(%1)").tqarg(field->length());
if (autoinc)
v += (" " +
@@ -918,14 +918,14 @@ QString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema
if (pk)
v += " PRIMARY KEY";
if (!pk && field->isUniqueKey())
- v += " UNIQUE";
+ v += " UNITQUE";
///@todo IS this ok for all engines?: if (!autoinc && !field->isPrimaryKey() && field->isNotNull())
if (!autoinc && !pk && field->isNotNull())
v += " NOT NULL"; //only add not null option if no autocommit is set
if (field->defaultValue().isValid()) {
- QString valToSQL( m_driver->valueToSQL( field, field->defaultValue() ) );
+ TQString valToSQL( m_driver->valueToSQL( field, field->defaultValue() ) );
if (!valToSQL.isEmpty()) //for sanity
- v += QString::fromLatin1(" DEFAULT ") + valToSQL;
+ v += TQString::tqfromLatin1(" DEFAULT ") + valToSQL;
}
}
sql += v;
@@ -935,20 +935,20 @@ QString Connection::createTableStatement( const KexiDB::TableSchema& tableSchema
}
//yeah, it is very efficient:
-#define C_A(a) , const QVariant& c ## a
+#define C_A(a) , const TQVariant& c ## a
#define V_A0 m_driver->valueToSQL( tableSchema.field(0), c0 )
#define V_A(a) +","+m_driver->valueToSQL( \
tableSchema.field(a) ? tableSchema.field(a)->type() : Field::Text, c ## a )
-// KexiDBDbg << "******** " << QString("INSERT INTO ") +
+// KexiDBDbg << "******** " << TQString("INSERT INTO ") +
// escapeIdentifier(tableSchema.name()) +
// " VALUES (" + vals + ")" <<endl;
#define C_INS_REC(args, vals) \
bool Connection::insertRecord(KexiDB::TableSchema &tableSchema args) {\
return executeSQL( \
- QString("INSERT INTO ") + escapeIdentifier(tableSchema.name()) + " VALUES (" + vals + ")" \
+ TQString("INSERT INTO ") + escapeIdentifier(tableSchema.name()) + " VALUES (" + vals + ")" \
); \
}
@@ -976,11 +976,11 @@ C_INS_REC_ALL
#define C_INS_REC(args, vals) \
bool Connection::insertRecord(FieldList& fields args) \
{ \
- QString value; \
+ TQString value; \
Field::List *flist = fields.fields(); \
vals \
return executeSQL( \
- QString("INSERT INTO ") + \
+ TQString("INSERT INTO ") + \
((fields.fields()->first() && fields.fields()->first()->table()) ? \
escapeIdentifier(fields.fields()->first()->table()->name()) : \
"??") \
@@ -996,19 +996,19 @@ C_INS_REC_ALL
#undef C_INS_REC
#undef C_INS_REC_ALL
-bool Connection::insertRecord(TableSchema &tableSchema, QValueList<QVariant>& values)
+bool Connection::insertRecord(TableSchema &tableSchema, TQValueList<TQVariant>& values)
{
// Each SQL identifier needs to be escaped in the generated query.
Field::List *fields = tableSchema.fields();
Field *f = fields->first();
-// QString s_val;
+// TQString s_val;
// s_val.reserve(4096);
- m_sql = QString::null;
- QValueList<QVariant>::ConstIterator it = values.constBegin();
+ m_sql = TQString();
+ TQValueList<TQVariant>::ConstIterator it = values.constBegin();
// int i=0;
while (f && (it!=values.end())) {
if (m_sql.isEmpty())
- m_sql = QString("INSERT INTO ") +
+ m_sql = TQString("INSERT INTO ") +
escapeIdentifier(tableSchema.name()) +
" VALUES (";
else
@@ -1024,21 +1024,21 @@ bool Connection::insertRecord(TableSchema &tableSchema, QValueList<QVariant>& va
return executeSQL(m_sql);
}
-bool Connection::insertRecord(FieldList& fields, QValueList<QVariant>& values)
+bool Connection::insertRecord(FieldList& fields, TQValueList<TQVariant>& values)
{
// Each SQL identifier needs to be escaped in the generated query.
Field::List *flist = fields.fields();
Field *f = flist->first();
if (!f)
return false;
-// QString s_val;
+// TQString s_val;
// s_val.reserve(4096);
- m_sql = QString::null;
- QValueList<QVariant>::ConstIterator it = values.constBegin();
+ m_sql = TQString();
+ TQValueList<TQVariant>::ConstIterator it = values.constBegin();
// int i=0;
while (f && (it!=values.constEnd())) {
if (m_sql.isEmpty())
- m_sql = QString("INSERT INTO ") +
+ m_sql = TQString("INSERT INTO ") +
escapeIdentifier(flist->first()->table()->name()) + "(" +
fields.sqlFieldsList(m_driver) + ") VALUES (";
else
@@ -1053,11 +1053,11 @@ bool Connection::insertRecord(FieldList& fields, QValueList<QVariant>& values)
return executeSQL(m_sql);
}
-bool Connection::executeSQL( const QString& statement )
+bool Connection::executeSQL( const TQString& statement )
{
m_sql = statement; //remember for error handling
if (!drv_executeSQL( m_sql )) {
- m_errMsg = QString::null; //clear as this could be most probably jsut "Unknown error" string.
+ m_errMsg = TQString(); //clear as this could be most probably jsut "Unknown error" string.
m_errorSql = statement;
setError(this, ERR_SQL_EXECUTION_ERROR, i18n("Error while executing SQL statement."));
return false;
@@ -1065,13 +1065,13 @@ bool Connection::executeSQL( const QString& statement )
return true;
}
-QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
- const QValueList<QVariant>& params,
+TQString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
+ const TQValueList<TQVariant>& params,
const SelectStatementOptions& options) const
{
//"SELECT FROM ..." is theoretically allowed "
//if (querySchema.fieldCount()<1)
-// return QString::null;
+// return TQString();
// Each SQL identifier needs to be escaped in the generated query.
if (!querySchema.statement().isEmpty())
@@ -1093,27 +1093,27 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
}
}
- QString sql; //final sql string
+ TQString sql; //final sql string
sql.reserve(4096);
-//unused QString s_from_additional; //additional tables list needed for lookup fields
- QString s_additional_joins; //additional joins needed for lookup fields
- QString s_additional_fields; //additional fields to append to the fields list
+//unused TQString s_from_additional; //additional tables list needed for lookup fields
+ TQString s_additional_joins; //additional joins needed for lookup fields
+ TQString s_additional_fields; //additional fields to append to the fields list
uint internalUniqueTableAliasNumber = 0; //used to build internalUniqueTableAliases
uint internalUniqueQueryAliasNumber = 0; //used to build internalUniqueQueryAliases
number = 0;
- QPtrList<QuerySchema> subqueries_for_lookup_data; // subqueries will be added to FROM section
- QString kexidb_subquery_prefix("__kexidb_subquery_");
+ TQPtrList<QuerySchema> subqueries_for_lookup_data; // subqueries will be added to FROM section
+ TQString kexidb_subquery_prefix("__kexidb_subquery_");
for (Field::ListIterator it = querySchema.fieldsIterator(); (f = it.current()); ++it, number++) {
if (querySchema.isColumnVisible(number)) {
if (!sql.isEmpty())
- sql += QString::fromLatin1(", ");
+ sql += TQString::tqfromLatin1(", ");
if (f->isQueryAsterisk()) {
if (!singleTable && static_cast<QueryAsterisk*>(f)->isSingleTableAsterisk()) //single-table *
sql += escapeIdentifier(f->table()->name(), options.identifierEscaping) +
- QString::fromLatin1(".*");
+ TQString::tqfromLatin1(".*");
else //all-tables * (or simplified table.* when there's only one table)
- sql += QString::fromLatin1("*");
+ sql += TQString::tqfromLatin1("*");
}
else {
if (f->isExpression()) {
@@ -1121,9 +1121,9 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
}
else {
if (!f->table()) //sanity check
- return QString::null;
+ return TQString();
- QString tableName;
+ TQString tableName;
int tablePosition = querySchema.tableBoundToColumn(number);
if (tablePosition>=0)
tableName = querySchema.tableAlias(tablePosition);
@@ -1135,9 +1135,9 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
}
sql += escapeIdentifier(f->name(), options.identifierEscaping);
}
- QString aliasString = QString(querySchema.columnAlias(number));
+ TQString aliasString = TQString(querySchema.columnAlias(number));
if (!aliasString.isEmpty())
- sql += (QString::fromLatin1(" AS ") + aliasString);
+ sql += (TQString::tqfromLatin1(" AS ") + aliasString);
//! @todo add option that allows to omit "AS" keyword
}
LookupFieldSchema *lookupFieldSchema = (options.addVisibleLookupColumns && f->table())
@@ -1159,16 +1159,16 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
{
//add LEFT OUTER JOIN
if (!s_additional_joins.isEmpty())
- s_additional_joins += QString::fromLatin1(" ");
- QString internalUniqueTableAlias( QString("__kexidb_") + lookupTable->name() + "_"
- + QString::number(internalUniqueTableAliasNumber++) );
- s_additional_joins += QString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6")
- .arg(escapeIdentifier(lookupTable->name(), options.identifierEscaping))
- .arg(internalUniqueTableAlias)
- .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
- .arg(escapeIdentifier(f->name(), options.identifierEscaping))
- .arg(internalUniqueTableAlias)
- .arg(escapeIdentifier(boundField->name(), options.identifierEscaping));
+ s_additional_joins += TQString::tqfromLatin1(" ");
+ TQString internalUniqueTableAlias( TQString("__kexidb_") + lookupTable->name() + "_"
+ + TQString::number(internalUniqueTableAliasNumber++) );
+ s_additional_joins += TQString("LEFT OUTER JOIN %1 AS %2 ON %3.%4=%5.%6")
+ .tqarg(escapeIdentifier(lookupTable->name(), options.identifierEscaping))
+ .tqarg(internalUniqueTableAlias)
+ .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
+ .tqarg(escapeIdentifier(f->name(), options.identifierEscaping))
+ .tqarg(internalUniqueTableAlias)
+ .tqarg(escapeIdentifier(boundField->name(), options.identifierEscaping));
//add visibleField to the list of SELECTed fields //if it is not yet present there
//not needed if (!querySchema.findTableField( visibleField->table()->name()+"."+visibleField->name() )) {
@@ -1177,13 +1177,13 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
/* not true
//table should be added after FROM
if (!s_from_additional.isEmpty())
- s_from_additional += QString::fromLatin1(", ");
+ s_from_additional += TQString::tqfromLatin1(", ");
s_from_additional += escapeIdentifier(visibleField->table()->name(), options.identifierEscaping);
*/
}
#endif
if (!s_additional_fields.isEmpty())
- s_additional_fields += QString::fromLatin1(", ");
+ s_additional_fields += TQString::tqfromLatin1(", ");
// s_additional_fields += (internalUniqueTableAlias + "." //escapeIdentifier(visibleField->table()->name(), options.identifierEscaping) + "."
// escapeIdentifier(visibleField->name(), options.identifierEscaping));
//! @todo Add lookup schema option for separator other than ' ' or even option for placeholders like "Name ? ?"
@@ -1197,48 +1197,48 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
QuerySchema *lookupQuery = querySchema.connection()->querySchema( rowSource.name() );
if (!lookupQuery) {
KexiDBWarn << "Connection::selectStatement(): !lookupQuery" << endl;
- return QString::null;
+ return TQString();
}
const QueryColumnInfo::Vector fieldsExpanded( lookupQuery->fieldsExpanded() );
if ((uint)lookupFieldSchema->boundColumn() >= fieldsExpanded.count()) {
KexiDBWarn << "Connection::selectStatement(): (uint)lookupFieldSchema->boundColumn() >= fieldsExpanded.count()" << endl;
- return QString::null;
+ return TQString();
}
QueryColumnInfo *boundColumnInfo = fieldsExpanded.at( lookupFieldSchema->boundColumn() );
if (!boundColumnInfo) {
KexiDBWarn << "Connection::selectStatement(): !boundColumnInfo" << endl;
- return QString::null;
+ return TQString();
}
Field *boundField = boundColumnInfo->field;
if (!boundField) {
KexiDBWarn << "Connection::selectStatement(): !boundField" << endl;
- return QString::null;
+ return TQString();
}
//add LEFT OUTER JOIN
if (!s_additional_joins.isEmpty())
- s_additional_joins += QString::fromLatin1(" ");
- QString internalUniqueQueryAlias(
+ s_additional_joins += TQString::tqfromLatin1(" ");
+ TQString internalUniqueQueryAlias(
kexidb_subquery_prefix + lookupQuery->name() + "_"
- + QString::number(internalUniqueQueryAliasNumber++) );
- s_additional_joins += QString("LEFT OUTER JOIN (%1) AS %2 ON %3.%4=%5.%6")
- .arg(selectStatement( *lookupQuery, params, options ))
- .arg(internalUniqueQueryAlias)
- .arg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
- .arg(escapeIdentifier(f->name(), options.identifierEscaping))
- .arg(internalUniqueQueryAlias)
- .arg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping));
+ + TQString::number(internalUniqueQueryAliasNumber++) );
+ s_additional_joins += TQString("LEFT OUTER JOIN (%1) AS %2 ON %3.%4=%5.%6")
+ .tqarg(selectStatement( *lookupQuery, params, options ))
+ .tqarg(internalUniqueQueryAlias)
+ .tqarg(escapeIdentifier(f->table()->name(), options.identifierEscaping))
+ .tqarg(escapeIdentifier(f->name(), options.identifierEscaping))
+ .tqarg(internalUniqueQueryAlias)
+ .tqarg(escapeIdentifier(boundColumnInfo->aliasOrName(), options.identifierEscaping));
if (!s_additional_fields.isEmpty())
- s_additional_fields += QString::fromLatin1(", ");
- const QValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
- QString expression;
- foreach (QValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) {
+ s_additional_fields += TQString::tqfromLatin1(", ");
+ const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
+ TQString expression;
+ foreach (TQValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) {
//! @todo Add lookup schema option for separator other than ' ' or even option for placeholders like "Name ? ?"
//! @todo Add possibility for joining the values at client side.
if (fieldsExpanded.count() <= (*visibleColumnsIt)) {
KexiDBWarn << "Connection::selectStatement(): fieldsExpanded.count() <= (*visibleColumnsIt) : "
<< fieldsExpanded.count() << " <= " << *visibleColumnsIt << endl;
- return QString::null;
+ return TQString();
}
if (!expression.isEmpty())
expression += " || ' ' || ";
@@ -1252,7 +1252,7 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
else {
KexiDBWarn << "Connection::selectStatement(): unsupported row source type "
<< rowSource.typeName() << endl;
- return QString();
+ return TQString();
}
}
}
@@ -1260,12 +1260,12 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
//add lookup fields
if (!s_additional_fields.isEmpty())
- sql += (QString::fromLatin1(", ") + s_additional_fields);
+ sql += (TQString::tqfromLatin1(", ") + s_additional_fields);
if (options.alsoRetrieveROWID) { //append rowid column
- QString s;
+ TQString s;
if (!sql.isEmpty())
- s = QString::fromLatin1(", ");
+ s = TQString::tqfromLatin1(", ");
if (querySchema.masterTable())
s += (escapeIdentifier(querySchema.masterTable()->name())+".");
s += m_driver->beh->ROW_ID_FIELD_NAME;
@@ -1275,8 +1275,8 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
sql.prepend("SELECT ");
TableSchema::List* tables = querySchema.tables();
if ((tables && !tables->isEmpty()) || !subqueries_for_lookup_data.isEmpty()) {
- sql += QString::fromLatin1(" FROM ");
- QString s_from;
+ sql += TQString::tqfromLatin1(" FROM ");
+ TQString s_from;
if (tables) {
TableSchema *table;
number = 0;
@@ -1284,38 +1284,38 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
++it, number++)
{
if (!s_from.isEmpty())
- s_from += QString::fromLatin1(", ");
+ s_from += TQString::tqfromLatin1(", ");
s_from += escapeIdentifier(table->name(), options.identifierEscaping);
- QString aliasString = QString(querySchema.tableAlias(number));
+ TQString aliasString = TQString(querySchema.tableAlias(number));
if (!aliasString.isEmpty())
- s_from += (QString::fromLatin1(" AS ") + aliasString);
+ s_from += (TQString::tqfromLatin1(" AS ") + aliasString);
}
/*unused if (!s_from_additional.isEmpty()) {//additional tables list needed for lookup fields
if (!s_from.isEmpty())
- s_from += QString::fromLatin1(", ");
+ s_from += TQString::tqfromLatin1(", ");
s_from += s_from_additional;
}*/
}
// add subqueries for lookup data
uint subqueries_for_lookup_data_counter = 0;
- for (QPtrListIterator<QuerySchema> it(subqueries_for_lookup_data);
+ for (TQPtrListIterator<QuerySchema> it(subqueries_for_lookup_data);
subqueries_for_lookup_data.current(); ++it, subqueries_for_lookup_data_counter++)
{
if (!s_from.isEmpty())
- s_from += QString::fromLatin1(", ");
- s_from += QString::fromLatin1("(");
+ s_from += TQString::tqfromLatin1(", ");
+ s_from += TQString::tqfromLatin1("(");
s_from += selectStatement( *it.current(), params, options );
- s_from += QString::fromLatin1(") AS %1%2")
- .arg(kexidb_subquery_prefix).arg(subqueries_for_lookup_data_counter);
+ s_from += TQString::tqfromLatin1(") AS %1%2")
+ .tqarg(kexidb_subquery_prefix).tqarg(subqueries_for_lookup_data_counter);
}
sql += s_from;
}
- QString s_where;
+ TQString s_where;
s_where.reserve(4096);
//JOINS
if (!s_additional_joins.isEmpty()) {
- sql += QString::fromLatin1(" ") + s_additional_joins + QString::fromLatin1(" ");
+ sql += TQString::tqfromLatin1(" ") + s_additional_joins + TQString::tqfromLatin1(" ");
}
//@todo: we're using WHERE for joins now; use INNER/LEFT/RIGHT JOIN later
@@ -1328,24 +1328,24 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
wasWhere = true;
}
else
- s_where += QString::fromLatin1(" AND ");
+ s_where += TQString::tqfromLatin1(" AND ");
Field::Pair *pair;
- QString s_where_sub;
- for (QPtrListIterator<Field::Pair> p_it(*rel->fieldPairs()); (pair = p_it.current()); ++p_it) {
+ TQString s_where_sub;
+ for (TQPtrListIterator<Field::Pair> p_it(*rel->fieldPairs()); (pair = p_it.current()); ++p_it) {
if (!s_where_sub.isEmpty())
- s_where_sub += QString::fromLatin1(" AND ");
+ s_where_sub += TQString::tqfromLatin1(" AND ");
s_where_sub += (
escapeIdentifier(pair->first->table()->name(), options.identifierEscaping) +
- QString::fromLatin1(".") +
+ TQString::tqfromLatin1(".") +
escapeIdentifier(pair->first->name(), options.identifierEscaping) +
- QString::fromLatin1(" = ") +
+ TQString::tqfromLatin1(" = ") +
escapeIdentifier(pair->second->table()->name(), options.identifierEscaping) +
- QString::fromLatin1(".") +
+ TQString::tqfromLatin1(".") +
escapeIdentifier(pair->second->name(), options.identifierEscaping));
}
if (rel->fieldPairs()->count()>1) {
s_where_sub.prepend("(");
- s_where_sub += QString::fromLatin1(")");
+ s_where_sub += TQString::tqfromLatin1(")");
}
s_where += s_where_sub;
}
@@ -1362,20 +1362,20 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
}
}
if (!s_where.isEmpty())
- sql += QString::fromLatin1(" WHERE ") + s_where;
+ sql += TQString::tqfromLatin1(" WHERE ") + s_where;
//! \todo (js) add other sql parts
//(use wasWhere here)
// ORDER BY
- QString orderByString(
+ TQString orderByString(
querySchema.orderByColumnList().toSQLString(!singleTable/*includeTableName*/,
driver(), options.identifierEscaping) );
- const QValueVector<int> pkeyFieldsOrder( querySchema.pkeyFieldsOrder() );
+ const TQValueVector<int> pkeyFieldsOrder( querySchema.pkeyFieldsOrder() );
if (orderByString.isEmpty() && !pkeyFieldsOrder.isEmpty()) {
//add automatic ORDER BY if there is no explicity defined (especially helps when there are complex JOINs)
OrderByColumnList automaticPKOrderBy;
const QueryColumnInfo::Vector fieldsExpanded( querySchema.fieldsExpanded() );
- foreach (QValueVector<int>::ConstIterator, it, pkeyFieldsOrder) {
+ foreach (TQValueVector<int>::ConstIterator, it, pkeyFieldsOrder) {
if ((*it) < 0) // no field mentioned in this query
continue;
if ((*it) >= (int)fieldsExpanded.count()) {
@@ -1396,7 +1396,7 @@ QString Connection::selectStatement( KexiDB::QuerySchema& querySchema,
return sql;
}
-QString Connection::selectStatement( KexiDB::TableSchema& tableSchema,
+TQString Connection::selectStatement( KexiDB::TableSchema& tableSchema,
const SelectStatementOptions& options) const
{
return selectStatement( *tableSchema.query(), options );
@@ -1413,10 +1413,10 @@ Field* Connection::findSystemFieldName(KexiDB::FieldList* fieldlist)
return 0;
}
-Q_ULLONG Connection::lastInsertedAutoIncValue(const QString& aiFieldName, const QString& tableName,
- Q_ULLONG* ROWID)
+TQ_ULLONG Connection::lastInsertedAutoIncValue(const TQString& aiFieldName, const TQString& tableName,
+ TQ_ULLONG* ROWID)
{
- Q_ULLONG row_id = drv_lastInsertRowID();
+ TQ_ULLONG row_id = drv_lastInsertRowID();
if (ROWID)
*ROWID = row_id;
if (m_driver->beh->ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE) {
@@ -1424,17 +1424,17 @@ Q_ULLONG Connection::lastInsertedAutoIncValue(const QString& aiFieldName, const
}
RowData rdata;
if (row_id<=0 || true!=querySingleRecord(
- QString::fromLatin1("SELECT ") + tableName + QString::fromLatin1(".") + aiFieldName + QString::fromLatin1(" FROM ") + tableName
- + QString::fromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + QString::fromLatin1("=") + QString::number(row_id), rdata))
+ TQString::tqfromLatin1("SELECT ") + tableName + TQString::tqfromLatin1(".") + aiFieldName + TQString::tqfromLatin1(" FROM ") + tableName
+ + TQString::tqfromLatin1(" WHERE ") + m_driver->beh->ROW_ID_FIELD_NAME + TQString::tqfromLatin1("=") + TQString::number(row_id), rdata))
{
// KexiDBDbg << "Connection::lastInsertedAutoIncValue(): row_id<=0 || true!=querySingleRecord()" << endl;
- return (Q_ULLONG)-1; //ULL;
+ return (TQ_ULLONG)-1; //ULL;
}
return rdata[0].toULongLong();
}
-Q_ULLONG Connection::lastInsertedAutoIncValue(const QString& aiFieldName,
- const KexiDB::TableSchema& table, Q_ULLONG* ROWID)
+TQ_ULLONG Connection::lastInsertedAutoIncValue(const TQString& aiFieldName,
+ const KexiDB::TableSchema& table, TQ_ULLONG* ROWID)
{
return lastInsertedAutoIncValue(aiFieldName,table.name(), ROWID);
}
@@ -1460,24 +1460,24 @@ static FieldList* createFieldListForKexi__Fields(TableSchema *kexi__fieldsSchema
}
//! builds a list of values for field's \a f properties. Used by createTable().
-void buildValuesForKexi__Fields(QValueList<QVariant>& vals, Field* f)
+void buildValuesForKexi__Fields(TQValueList<TQVariant>& vals, Field* f)
{
vals.clear();
vals
- << QVariant(f->table()->id())
- << QVariant(f->type())
- << QVariant(f->name())
- << QVariant(f->isFPNumericType() ? f->scale() : f->length())
- << QVariant(f->isFPNumericType() ? f->precision() : 0)
- << QVariant(f->constraints())
- << QVariant(f->options())
- // KexiDB::variantToString() is needed here because the value can be of any QVariant type,
+ << TQVariant(f->table()->id())
+ << TQVariant(f->type())
+ << TQVariant(f->name())
+ << TQVariant(f->isFPNumericType() ? f->scale() : f->length())
+ << TQVariant(f->isFPNumericType() ? f->precision() : 0)
+ << TQVariant(f->constraints())
+ << TQVariant(f->options())
+ // KexiDB::variantToString() is needed here because the value can be of any TQVariant type,
// depending on f->type()
<< (f->defaultValue().isNull()
- ? QVariant() : QVariant(KexiDB::variantToString( f->defaultValue() )))
- << QVariant(f->order())
- << QVariant(f->caption())
- << QVariant(f->description());
+ ? TQVariant() : TQVariant(KexiDB::variantToString( f->defaultValue() )))
+ << TQVariant(f->order())
+ << TQVariant(f->caption())
+ << TQVariant(f->description());
}
bool Connection::storeMainFieldSchema(Field *field)
@@ -1488,21 +1488,21 @@ bool Connection::storeMainFieldSchema(Field *field)
if (!fl)
return false;
- QValueList<QVariant> vals;
+ TQValueList<TQVariant> vals;
buildValuesForKexi__Fields(vals, field);
- QValueList<QVariant>::ConstIterator valsIt = vals.constBegin();
+ TQValueList<TQVariant>::ConstIterator valsIt = vals.constBegin();
Field *f;
bool first = true;
- QString sql = "UPDATE kexi__fields SET ";
+ TQString sql = "UPDATE kexi__fields SET ";
for (Field::ListIterator it( fl->fieldsIterator() ); (f = it.current()); ++it, ++valsIt) {
- sql.append( (first ? QString::null : QString(", ")) +
+ sql.append( (first ? TQString() : TQString(", ")) +
f->name() + "=" + m_driver->valueToSQL( f, *valsIt ) );
if (first)
first = false;
}
delete fl;
- sql.append(QString(" WHERE t_id=") + QString::number( field->table()->id() )
+ sql.append(TQString(" WHERE t_id=") + TQString::number( field->table()->id() )
+ " AND f_name=" + m_driver->valueToSQL( Field::Text, field->name() ) );
return executeSQL( sql );
}
@@ -1535,13 +1535,13 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
}
const bool internalTable = dynamic_cast<InternalTableSchema*>(tableSchema);
- const QString &tableName = tableSchema->name().lower();
+ const TQString &tableName = tableSchema->name().lower();
if (!internalTable) {
if (m_driver->isSystemObjectName( tableName )) {
clearError();
setError(ERR_SYSTEM_NAME_RESERVED, i18n("System name \"%1\" cannot be used as table name.")
- .arg(tableSchema->name()));
+ .tqarg(tableSchema->name()));
return false;
}
@@ -1550,7 +1550,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
clearError();
setError(ERR_SYSTEM_NAME_RESERVED,
i18n("System name \"%1\" cannot be used as one of fields in \"%2\" table.")
- .arg(sys_field->name()).arg(tableName));
+ .tqarg(sys_field->name()).tqarg(tableName));
return false;
}
}
@@ -1565,7 +1565,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
if (existingTable == tableSchema) {
clearError();
setError(ERR_OBJECT_EXISTS,
- i18n("Could not create the same table \"%1\" twice.").arg(tableSchema->name()) );
+ i18n("Could not create the same table \"%1\" twice.").tqarg(tableSchema->name()) );
return false;
}
//TODO(js): update any structure (e.g. queries) that depend on this table!
@@ -1579,7 +1579,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
else {
if (this->tableSchema( tableSchema->name() ) != 0) {
clearError();
- setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").arg(tableSchema->name()) );
+ setError(ERR_OBJECT_EXISTS, i18n("Table \"%1\" already exists.").tqarg(tableSchema->name()) );
return false;
}
}
@@ -1617,7 +1617,7 @@ bool Connection::createTable( KexiDB::TableSchema* tableSchema, bool replaceExis
// int order = 0;
Field *f;
for (Field::ListIterator it( *tableSchema->fields() ); (f = it.current()); ++it/*, order++*/) {
- QValueList<QVariant> vals;
+ TQValueList<TQVariant> vals;
buildValuesForKexi__Fields(vals, f);
if (!insertRecord(*fl, vals ))
createTable_ERR;
@@ -1676,7 +1676,7 @@ bool Connection::removeObject( uint objId )
return true;
}
-bool Connection::drv_dropTable( const QString& name )
+bool Connection::drv_dropTable( const TQString& name )
{
m_sql = "DROP TABLE " + escapeIdentifier(name);
return executeSQL(m_sql);
@@ -1701,13 +1701,13 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov
if (!tableSchema)
return false;
- QString errmsg(i18n("Table \"%1\" cannot be removed.\n"));
+ TQString errmsg(i18n("Table \"%1\" cannot be removed.\n"));
//be sure that we handle the correct TableSchema object:
if (tableSchema->id() < 0
|| this->tableSchema(tableSchema->name())!=tableSchema
|| this->tableSchema(tableSchema->id())!=tableSchema)
{
- setError(ERR_OBJECT_NOT_FOUND, errmsg.arg(tableSchema->name())
+ setError(ERR_OBJECT_NOT_FOUND, errmsg.tqarg(tableSchema->name())
+i18n("Unexpected name or identifier."));
return false;
}
@@ -1718,7 +1718,7 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov
//sanity checks:
if (m_driver->isSystemObjectName( tableSchema->name() )) {
- setError(ERR_SYSTEM_NAME_RESERVED, errmsg.arg(tableSchema->name()) + d->strItIsASystemObject());
+ setError(ERR_SYSTEM_NAME_RESERVED, errmsg.tqarg(tableSchema->name()) + d->strItIsASystemObject());
return false;
}
@@ -1751,13 +1751,13 @@ tristate Connection::dropTable( KexiDB::TableSchema* tableSchema, bool alsoRemov
return commitAutoCommitTransaction(tg.transaction());
}
-tristate Connection::dropTable( const QString& table )
+tristate Connection::dropTable( const TQString& table )
{
clearError();
TableSchema* ts = tableSchema( table );
if (!ts) {
setError(ERR_OBJECT_NOT_FOUND, i18n("Table \"%1\" does not exist.")
- .arg(table));
+ .tqarg(table));
return false;
}
return dropTable(ts);
@@ -1772,7 +1772,7 @@ tristate Connection::alterTable( TableSchema& tableSchema, TableSchema& newTable
if (&tableSchema == &newTableSchema) {
setError(ERR_OBJECT_THE_SAME, i18n("Could not alter table \"%1\" using the same table.")
- .arg(tableSchema.name()));
+ .tqarg(tableSchema.name()));
return false;
}
//TODO(js): implement real altering
@@ -1784,27 +1784,27 @@ tristate Connection::alterTable( TableSchema& tableSchema, TableSchema& newTable
empty = true;
#endif
if (empty) {
- ok = createTable(&newTableSchema, true/*replace*/);
+ ok = createTable(&newTableSchema, true/*tqreplace*/);
}
return ok;
}
-bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName, bool replace)
+bool Connection::alterTableName(TableSchema& tableSchema, const TQString& newName, bool tqreplace)
{
clearError();
if (&tableSchema!=d->tables[tableSchema.id()]) {
- setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").arg(tableSchema.name()));
+ setError(ERR_OBJECT_NOT_FOUND, i18n("Unknown table \"%1\"").tqarg(tableSchema.name()));
return false;
}
if (newName.isEmpty() || !KexiUtils::isIdentifier(newName)) {
- setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").arg(newName));
+ setError(ERR_INVALID_IDENTIFIER, i18n("Invalid table name \"%1\"").tqarg(newName));
return false;
}
- const QString oldTableName = tableSchema.name();
- const QString newTableName = newName.lower().stripWhiteSpace();
+ const TQString oldTableName = tableSchema.name();
+ const TQString newTableName = newName.lower().stripWhiteSpace();
if (oldTableName.lower().stripWhiteSpace() == newTableName) {
setError(ERR_OBJECT_THE_SAME, i18n("Could rename table \"%1\" using the same name.")
- .arg(newTableName));
+ .tqarg(newTableName));
return false;
}
//TODO: alter table name for server DB backends!
@@ -1813,10 +1813,10 @@ bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName
TableSchema *tableToReplace = this->tableSchema( newName );
const bool destTableExists = tableToReplace != 0;
const int origID = destTableExists ? tableToReplace->id() : -1; //will be reused in the new table
- if (!replace && destTableExists) {
+ if (!tqreplace && destTableExists) {
setError(ERR_OBJECT_EXISTS,
i18n("Could not rename table \"%1\" to \"%2\". Table \"%3\" already exists.")
- .arg(tableSchema.name()).arg(newName).arg(newName));
+ .tqarg(tableSchema.name()).tqarg(newName).tqarg(newName));
return false;
}
@@ -1830,7 +1830,7 @@ bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName
// drop the table replaced (with schema)
if (destTableExists) {
- if (!replace) {
+ if (!tqreplace) {
return false;
}
if (!dropTable( newName )) {
@@ -1838,13 +1838,13 @@ bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName
}
// the new table owns the previous table's id:
- if (!executeSQL(QString::fromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3")
- .arg(origID).arg(tableSchema.id()).arg((int)TableObjectType)))
+ if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_id=%1 WHERE o_id=%2 AND o_type=%3")
+ .tqarg(origID).tqarg(tableSchema.id()).tqarg((int)TableObjectType)))
{
return false;
}
- if (!executeSQL(QString::fromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2")
- .arg(origID).arg(tableSchema.id())))
+ if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__fields SET t_id=%1 WHERE t_id=%2")
+ .tqarg(origID).tqarg(tableSchema.id())))
{
return false;
}
@@ -1861,8 +1861,8 @@ bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName
// Update kexi__objects
//TODO
- if (!executeSQL(QString::fromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2")
- .arg(m_driver->escapeString(tableSchema.name())).arg(tableSchema.id())))
+ if (!executeSQL(TQString::tqfromLatin1("UPDATE kexi__objects SET o_name=%1 WHERE o_id=%2")
+ .tqarg(m_driver->escapeString(tableSchema.name())).tqarg(tableSchema.id())))
{
alterTableName_ERR;
return false;
@@ -1884,13 +1884,13 @@ bool Connection::alterTableName(TableSchema& tableSchema, const QString& newName
return true;
}
-bool Connection::drv_alterTableName(TableSchema& tableSchema, const QString& newName)
+bool Connection::drv_alterTableName(TableSchema& tableSchema, const TQString& newName)
{
- const QString oldTableName = tableSchema.name();
+ const TQString oldTableName = tableSchema.name();
tableSchema.setName(newName);
- if (!executeSQL(QString::fromLatin1("ALTER TABLE %1 RENAME TO %2")
- .arg(escapeIdentifier(oldTableName)).arg(escapeIdentifier(newName))))
+ if (!executeSQL(TQString::tqfromLatin1("ALTER TABLE %1 RENAME TO %2")
+ .tqarg(escapeIdentifier(oldTableName)).tqarg(escapeIdentifier(newName))))
{
tableSchema.setName(oldTableName); //restore old name
return false;
@@ -1932,13 +1932,13 @@ bool Connection::dropQuery( KexiDB::QuerySchema* querySchema )
return commitAutoCommitTransaction(tg.transaction());
}
-bool Connection::dropQuery( const QString& query )
+bool Connection::dropQuery( const TQString& query )
{
clearError();
QuerySchema* qs = querySchema( query );
if (!qs) {
setError(ERR_OBJECT_NOT_FOUND, i18n("Query \"%1\" does not exist.")
- .arg(query));
+ .tqarg(query));
return false;
}
return dropQuery(qs);
@@ -1951,7 +1951,7 @@ bool Connection::drv_createTable( const KexiDB::TableSchema& tableSchema )
return executeSQL(m_sql);
}
-bool Connection::drv_createTable( const QString& tableSchemaName )
+bool Connection::drv_createTable( const TQString& tableSchemaName )
{
TableSchema *ts = d->tables_byname[tableSchemaName];
if (!ts)
@@ -2014,7 +2014,7 @@ bool Connection::rollbackAutoCommitTransaction(const Transaction& trans)
#define SET_ERR_TRANS_NOT_SUPP \
{ setError(ERR_UNSUPPORTED_DRV_FEATURE, \
- i18n("Transactions are not supported for \"%1\" driver.").arg(m_driver->name() )); }
+ i18n("Transactions are not supported for \"%1\" driver.").tqarg(m_driver->name() )); }
#define SET_BEGIN_TR_ERROR \
{ if (!error()) \
@@ -2157,7 +2157,7 @@ void Connection::setDefaultTransaction(const Transaction& trans)
d->default_trans = trans;
}
-const QValueList<Transaction>& Connection::transactions()
+const TQValueList<Transaction>& Connection::transactions()
{
return d->transactions;
}
@@ -2179,7 +2179,7 @@ bool Connection::setAutoCommit(bool on)
TransactionData* Connection::drv_beginTransaction()
{
- QString old_sql = m_sql; //don't
+ TQString old_sql = m_sql; //don't
if (!executeSQL( "BEGIN" ))
return 0;
return new TransactionData(this);
@@ -2200,7 +2200,7 @@ bool Connection::drv_setAutoCommit(bool /*on*/)
return true;
}
-Cursor* Connection::executeQuery( const QString& statement, uint cursor_options )
+Cursor* Connection::executeQuery( const TQString& statement, uint cursor_options )
{
if (statement.isEmpty())
return 0;
@@ -2215,7 +2215,7 @@ Cursor* Connection::executeQuery( const QString& statement, uint cursor_options
return c;
}
-Cursor* Connection::executeQuery( QuerySchema& query, const QValueList<QVariant>& params,
+Cursor* Connection::executeQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options )
{
Cursor *c = prepareQuery( query, params, cursor_options );
@@ -2231,7 +2231,7 @@ Cursor* Connection::executeQuery( QuerySchema& query, const QValueList<QVariant>
Cursor* Connection::executeQuery( QuerySchema& query, uint cursor_options )
{
- return executeQuery(query, QValueList<QVariant>(), cursor_options);
+ return executeQuery(query, TQValueList<TQVariant>(), cursor_options);
}
Cursor* Connection::executeQuery( TableSchema& table, uint cursor_options )
@@ -2244,7 +2244,7 @@ Cursor* Connection::prepareQuery( TableSchema& table, uint cursor_options )
return prepareQuery( *table.query(), cursor_options );
}
-Cursor* Connection::prepareQuery( QuerySchema& query, const QValueList<QVariant>& params,
+Cursor* Connection::prepareQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options )
{
Cursor* cursor = prepareQuery(query, cursor_options);
@@ -2270,7 +2270,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata )
{
//not found: retrieve schema
/* KexiDB::Cursor *cursor;
- if (!(cursor = executeQuery( QString("select * from kexi__objects where o_id='%1'").arg(objId) )))
+ if (!(cursor = executeQuery( TQString("select * from kexi__objects where o_id='%1'").tqarg(objId) )))
return false;
if (!cursor->moveFirst()) {
deleteCursor(cursor);
@@ -2287,7 +2287,7 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata )
}
sdata.m_name = data[2].toString();
if (!KexiUtils::isIdentifier( sdata.m_name )) {
- setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").arg(sdata.m_name));
+ setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"").tqarg(sdata.m_name));
return false;
}
sdata.m_caption = data[3].toString();
@@ -2300,19 +2300,19 @@ bool Connection::setupObjectSchemaData( const RowData &data, SchemaData &sdata )
tristate Connection::loadObjectSchemaData( int objectID, SchemaData &sdata )
{
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1(
+ if (true!=querySingleRecord(TQString::tqfromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1")
- .arg(objectID), data))
+ .tqarg(objectID), data))
return cancelled;
return setupObjectSchemaData( data, sdata );
}
-tristate Connection::loadObjectSchemaData( int objectType, const QString& objectName, SchemaData &sdata )
+tristate Connection::loadObjectSchemaData( int objectType, const TQString& objectName, SchemaData &sdata )
{
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc "
+ if (true!=querySingleRecord(TQString::tqfromLatin1("SELECT o_id, o_type, o_name, o_caption, o_desc "
"FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2")
- .arg(objectType).arg(m_driver->valueToSQL(Field::Text, objectName.lower())), data))
+ .tqarg(objectType).tqarg(m_driver->valueToSQL(Field::Text, objectName.lower())), data))
return cancelled;
return setupObjectSchemaData( data, sdata );
}
@@ -2324,9 +2324,9 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject )
return false;
if (newObject) {
int existingID;
- if (true == querySingleNumber(QString::fromLatin1(
+ if (true == querySingleNumber(TQString::tqfromLatin1(
"SELECT o_id FROM kexi__objects WHERE o_type=%1 AND lower(o_name)=%2")
- .arg(sdata.type()).arg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID))
+ .tqarg(sdata.type()).tqarg(m_driver->valueToSQL(Field::Text, sdata.name().lower())), existingID))
{
//we already have stored a schema data with the same name and type:
//just update it's properties as it would be existing object
@@ -2340,8 +2340,8 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject )
if (sdata.id()<=0) {//get new ID
fl = ts->subList("o_type", "o_name", "o_caption", "o_desc");
ok = fl!=0;
- if (ok && !insertRecord(*fl, QVariant(sdata.type()), QVariant(sdata.name()),
- QVariant(sdata.caption()), QVariant(sdata.description()) ))
+ if (ok && !insertRecord(*fl, TQVariant(sdata.type()), TQVariant(sdata.name()),
+ TQVariant(sdata.caption()), TQVariant(sdata.description()) ))
ok = false;
delete fl;
if (!ok)
@@ -2357,21 +2357,21 @@ bool Connection::storeObjectSchemaData( SchemaData &sdata, bool newObject )
} else {
fl = ts->subList("o_id", "o_type", "o_name", "o_caption", "o_desc");
ok = fl!=0;
- if (ok && !insertRecord(*fl, QVariant(sdata.id()), QVariant(sdata.type()), QVariant(sdata.name()),
- QVariant(sdata.caption()), QVariant(sdata.description()) ))
+ if (ok && !insertRecord(*fl, TQVariant(sdata.id()), TQVariant(sdata.type()), TQVariant(sdata.name()),
+ TQVariant(sdata.caption()), TQVariant(sdata.description()) ))
ok = false;
delete fl;
return ok;
}
}
//existing object:
- return executeSQL(QString("UPDATE kexi__objects SET o_type=%2, o_caption=%3, o_desc=%4 WHERE o_id=%1")
- .arg(sdata.id()).arg(sdata.type())
- .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption()))
- .arg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) );
+ return executeSQL(TQString("UPDATE kexi__objects SET o_type=%2, o_caption=%3, o_desc=%4 WHERE o_id=%1")
+ .tqarg(sdata.id()).tqarg(sdata.type())
+ .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.caption()))
+ .tqarg(m_driver->valueToSQL(KexiDB::Field::Text, sdata.description())) );
}
-tristate Connection::querySingleRecordInternal(RowData &data, const QString* sql, QuerySchema* query,
+tristate Connection::querySingleRecordInternal(RowData &data, const TQString* sql, QuerySchema* query,
bool addLimitTo1)
{
Q_ASSERT(sql || query);
@@ -2394,7 +2394,7 @@ tristate Connection::querySingleRecordInternal(RowData &data, const QString* sql
return deleteCursor(cursor);
}
-tristate Connection::querySingleRecord(const QString& sql, RowData &data, bool addLimitTo1)
+tristate Connection::querySingleRecord(const TQString& sql, RowData &data, bool addLimitTo1)
{
return querySingleRecordInternal(data, &sql, 0, addLimitTo1);
}
@@ -2407,13 +2407,13 @@ tristate Connection::querySingleRecord(QuerySchema& query, RowData &data, bool a
bool Connection::checkIfColumnExists(Cursor *cursor, uint column)
{
if (column >= cursor->fieldCount()) {
- setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").arg(column));
+ setError(ERR_CURSOR_RECORD_FETCHING, i18n("Column %1 does not exist for the query.").tqarg(column));
return false;
}
return true;
}
-tristate Connection::querySingleString(const QString& sql, QString &value, uint column, bool addLimitTo1)
+tristate Connection::querySingleString(const TQString& sql, TQString &value, uint column, bool addLimitTo1)
{
KexiDB::Cursor *cursor;
m_sql = addLimitTo1 ? (sql + " LIMIT 1") : sql; // is this safe?;
@@ -2435,9 +2435,9 @@ tristate Connection::querySingleString(const QString& sql, QString &value, uint
return deleteCursor(cursor);
}
-tristate Connection::querySingleNumber(const QString& sql, int &number, uint column, bool addLimitTo1)
+tristate Connection::querySingleNumber(const TQString& sql, int &number, uint column, bool addLimitTo1)
{
- static QString str;
+ static TQString str;
static bool ok;
const tristate result = querySingleString(sql, str, column, addLimitTo1);
if (result!=true)
@@ -2446,7 +2446,7 @@ tristate Connection::querySingleNumber(const QString& sql, int &number, uint col
return ok;
}
-bool Connection::queryStringList(const QString& sql, QStringList& list, uint column)
+bool Connection::queryStringList(const TQString& sql, TQStringList& list, uint column)
{
KexiDB::Cursor *cursor;
clearError();
@@ -2477,14 +2477,14 @@ bool Connection::queryStringList(const QString& sql, QStringList& list, uint col
return deleteCursor(cursor);
}
-bool Connection::resultExists(const QString& sql, bool &success, bool addLimitTo1)
+bool Connection::resultExists(const TQString& sql, bool &success, bool addLimitTo1)
{
KexiDB::Cursor *cursor;
//optimization
- if (m_driver->beh->SELECT_1_SUBQUERY_SUPPORTED) {
+ if (m_driver->beh->SELECT_1_SUBTQUERY_SUPPORTED) {
//this is at least for sqlite
if (addLimitTo1 && sql.left(6).upper() == "SELECT")
- m_sql = QString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?;
+ m_sql = TQString("SELECT 1 FROM (") + sql + ") LIMIT 1"; // is this safe?;
else
m_sql = sql;
}
@@ -2517,7 +2517,7 @@ bool Connection::isEmpty( TableSchema& table, bool &success )
//! Used by addFieldPropertyToExtendedTableSchemaData()
static void createExtendedTableSchemaMainElementIfNeeded(
- QDomDocument& doc, QDomElement& extendedTableSchemaMainEl,
+ TQDomDocument& doc, TQDomElement& extendedTableSchemaMainEl,
bool& extendedTableSchemaStringIsEmpty)
{
if (!extendedTableSchemaStringIsEmpty)
@@ -2525,13 +2525,13 @@ static void createExtendedTableSchemaMainElementIfNeeded(
//init document
extendedTableSchemaMainEl = doc.createElement("EXTENDED_TABLE_SCHEMA");
doc.appendChild( extendedTableSchemaMainEl );
- extendedTableSchemaMainEl.setAttribute("version", QString::number(KEXIDB_EXTENDED_TABLE_SCHEMA_VERSION));
+ extendedTableSchemaMainEl.setAttribute("version", TQString::number(KEXIDB_EXTENDED_TABLE_SCHEMA_VERSION));
extendedTableSchemaStringIsEmpty = false;
}
//! Used by addFieldPropertyToExtendedTableSchemaData()
-static void createExtendedTableSchemaFieldElementIfNeeded(QDomDocument& doc,
- QDomElement& extendedTableSchemaMainEl, const QString& fieldName, QDomElement& extendedTableSchemaFieldEl,
+static void createExtendedTableSchemaFieldElementIfNeeded(TQDomDocument& doc,
+ TQDomElement& extendedTableSchemaMainEl, const TQString& fieldName, TQDomElement& extendedTableSchemaFieldEl,
bool append = true)
{
if (!extendedTableSchemaFieldEl.isNull())
@@ -2549,9 +2549,9 @@ static void createExtendedTableSchemaFieldElementIfNeeded(QDomDocument& doc,
If extendedTableSchemaFieldEl is null, creates <field> element (with optional
"custom" attribute is \a custom is false). */
static void addFieldPropertyToExtendedTableSchemaData(
- Field *f, const char* propertyName, const QVariant& propertyValue,
- QDomDocument& doc, QDomElement& extendedTableSchemaMainEl,
- QDomElement& extendedTableSchemaFieldEl,
+ Field *f, const char* propertyName, const TQVariant& propertyValue,
+ TQDomDocument& doc, TQDomElement& extendedTableSchemaMainEl,
+ TQDomElement& extendedTableSchemaFieldEl,
bool& extendedTableSchemaStringIsEmpty,
bool custom = false )
{
@@ -2561,31 +2561,31 @@ static void addFieldPropertyToExtendedTableSchemaData(
doc, extendedTableSchemaMainEl, f->name(), extendedTableSchemaFieldEl);
//create <property>
- QDomElement extendedTableSchemaFieldPropertyEl = doc.createElement("property");
+ TQDomElement extendedTableSchemaFieldPropertyEl = doc.createElement("property");
extendedTableSchemaFieldEl.appendChild( extendedTableSchemaFieldPropertyEl );
if (custom)
extendedTableSchemaFieldPropertyEl.setAttribute("custom", "true");
extendedTableSchemaFieldPropertyEl.setAttribute("name", propertyName);
- QDomElement extendedTableSchemaFieldPropertyValueEl;
+ TQDomElement extendedTableSchemaFieldPropertyValueEl;
switch (propertyValue.type()) {
- case QVariant::String:
+ case TQVariant::String:
extendedTableSchemaFieldPropertyValueEl = doc.createElement("string");
break;
- case QVariant::CString:
+ case TQVariant::CString:
extendedTableSchemaFieldPropertyValueEl = doc.createElement("cstring");
break;
- case QVariant::Int:
- case QVariant::Double:
- case QVariant::UInt:
- case QVariant::LongLong:
- case QVariant::ULongLong:
+ case TQVariant::Int:
+ case TQVariant::Double:
+ case TQVariant::UInt:
+ case TQVariant::LongLong:
+ case TQVariant::ULongLong:
extendedTableSchemaFieldPropertyValueEl = doc.createElement("number");
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
extendedTableSchemaFieldPropertyValueEl = doc.createElement("bool");
break;
default:
-//! @todo add more QVariant types
+//! @todo add more TQVariant types
KexiDBFatal << "addFieldPropertyToExtendedTableSchemaData(): impl. error" << endl;
}
extendedTableSchemaFieldPropertyEl.appendChild( extendedTableSchemaFieldPropertyValueEl );
@@ -2596,14 +2596,14 @@ static void addFieldPropertyToExtendedTableSchemaData(
bool Connection::storeExtendedTableSchemaData(TableSchema& tableSchema)
{
//! @todo future: save in older versions if neeed
- QDomDocument doc("EXTENDED_TABLE_SCHEMA");
- QDomElement extendedTableSchemaMainEl;
+ TQDomDocument doc("EXTENDED_TABLE_SCHEMA");
+ TQDomElement extendedTableSchemaMainEl;
bool extendedTableSchemaStringIsEmpty = true;
//for each field:
Field *f;
for (Field::ListIterator it( *tableSchema.fields() ); (f = it.current()); ++it) {
- QDomElement extendedTableSchemaFieldEl;
+ TQDomElement extendedTableSchemaFieldEl;
if (f->visibleDecimalPlaces()>=0/*nondefault*/ && KexiDB::supportsVisibleDecimalPlacesProperty(f->type())) {
addFieldPropertyToExtendedTableSchemaData(
f, "visibleDecimalPlaces", f->visibleDecimalPlaces(), doc,
@@ -2639,14 +2639,14 @@ bool Connection::storeExtendedTableSchemaData(TableSchema& tableSchema)
// Store extended schema information (see ExtendedTableSchemaInformation in Kexi Wiki)
if (extendedTableSchemaStringIsEmpty) {
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** Extended table schema REMOVED."));
+ KexiUtils::addAlterTableActionDebug(TQString("** Extended table schema REMOVED."));
#endif
if (!removeDataBlock( tableSchema.id(), "extended_schema"))
return false;
}
else {
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** Extended table schema set to:\n")+doc.toString(4));
+ KexiUtils::addAlterTableActionDebug(TQString("** Extended table schema set to:\n")+doc.toString(4));
#endif
if (!storeDataBlock( tableSchema.id(), doc.toString(1), "extended_schema" ))
return false;
@@ -2668,7 +2668,7 @@ bool Connection::loadExtendedTableSchemaData(TableSchema& tableSchema)
return false; }
// Load extended schema information, if present (see ExtendedTableSchemaInformation in Kexi Wiki)
- QString extendedTableSchemaString;
+ TQString extendedTableSchemaString;
tristate res = loadDataBlock( tableSchema.id(), extendedTableSchemaString, "extended_schema" );
if (!res)
loadExtendedTableSchemaData_ERR;
@@ -2690,37 +2690,37 @@ bool Connection::loadExtendedTableSchemaData(TableSchema& tableSchema)
if (extendedTableSchemaString.isEmpty())
return true;
- QDomDocument doc;
- QString errorMsg;
+ TQDomDocument doc;
+ TQString errorMsg;
int errorLine, errorColumn;
if (!doc.setContent( extendedTableSchemaString, &errorMsg, &errorLine, &errorColumn ))
loadExtendedTableSchemaData_ERR2( i18n("Error in XML data: \"%1\" in line %2, column %3.\nXML data: ")
- .arg(errorMsg).arg(errorLine).arg(errorColumn) + extendedTableSchemaString.left(1024));
+ .tqarg(errorMsg).tqarg(errorLine).tqarg(errorColumn) + extendedTableSchemaString.left(1024));
//! @todo look at the current format version (KEXIDB_EXTENDED_TABLE_SCHEMA_VERSION)
if (doc.doctype().name()!="EXTENDED_TABLE_SCHEMA")
loadExtendedTableSchemaData_ERR3( extendedTableSchemaString );
- QDomElement docEl = doc.documentElement();
+ TQDomElement docEl = doc.documentElement();
if (docEl.tagName()!="EXTENDED_TABLE_SCHEMA")
loadExtendedTableSchemaData_ERR3( extendedTableSchemaString );
- for (QDomNode n = docEl.firstChild(); !n.isNull(); n = n.nextSibling()) {
- QDomElement fieldEl = n.toElement();
+ for (TQDomNode n = docEl.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ TQDomElement fieldEl = n.toElement();
if (fieldEl.tagName()=="field") {
Field *f = tableSchema.field( fieldEl.attribute("name") );
if (f) {
//set properties of the field:
//! @todo more properties
- for (QDomNode propNode = fieldEl.firstChild();
+ for (TQDomNode propNode = fieldEl.firstChild();
!propNode.isNull(); propNode = propNode.nextSibling())
{
- QDomElement propEl = propNode.toElement();
+ TQDomElement propEl = propNode.toElement();
bool ok;
int intValue;
if (propEl.tagName()=="property") {
- QCString propertyName = propEl.attribute("name").latin1();
+ TQCString propertyName = propEl.attribute("name").latin1();
if (propEl.attribute("custom")=="true") {
//custom property
f->setCustomProperty(propertyName,
@@ -2762,7 +2762,7 @@ KexiDB::Field* Connection::setupField( const RowData &data )
if (!ok)
return 0;
Field::Type f_type = (Field::Type)f_int_type;
- int f_len = QMAX( 0, data.at(3).toInt(&ok) );
+ int f_len = TQMAX( 0, data.at(3).toInt(&ok) );
if (!ok)
return 0;
int f_prec = data.at(4).toInt(&ok);
@@ -2777,7 +2777,7 @@ KexiDB::Field* Connection::setupField( const RowData &data )
if (!KexiUtils::isIdentifier( data.at(2).toString() )) {
setError(ERR_INVALID_IDENTIFIER, i18n("Invalid object name \"%1\"")
- .arg( data.at(2).toString() ));
+ .tqarg( data.at(2).toString() ));
ok = false;
return 0;
}
@@ -2807,9 +2807,9 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data )
KexiDB::Cursor *cursor;
if (!(cursor = executeQuery(
- QString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
+ TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
"f_options, f_default, f_order, f_caption, f_help"
- " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->m_id) )))
+ " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->m_id) )))
{
delete t;
return 0;
@@ -2859,17 +2859,17 @@ KexiDB::TableSchema* Connection::setupTableSchema( const RowData &data )
return t;
}
-TableSchema* Connection::tableSchema( const QString& tableName )
+TableSchema* Connection::tableSchema( const TQString& tableName )
{
- QString m_tableName = tableName.lower();
+ TQString m_tableName = tableName.lower();
TableSchema *t = d->tables_byname[m_tableName];
if (t)
return t;
//not found: retrieve schema
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1(
+ if (true!=querySingleRecord(TQString::tqfromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2")
- .arg(m_tableName).arg(KexiDB::TableObjectType), data))
+ .tqarg(m_tableName).tqarg(KexiDB::TableObjectType), data))
return 0;
return setupTableSchema(data);
@@ -2882,30 +2882,30 @@ TableSchema* Connection::tableSchema( int tableId )
return t;
//not found: retrieve schema
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1(
+ if (true!=querySingleRecord(TQString::tqfromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1")
- .arg(tableId), data))
+ .tqarg(tableId), data))
return 0;
return setupTableSchema(data);
}
-tristate Connection::loadDataBlock( int objectID, QString &dataString, const QString& dataID )
+tristate Connection::loadDataBlock( int objectID, TQString &dataString, const TQString& dataID )
{
if (objectID<=0)
return false;
return querySingleString(
- QString("SELECT o_data FROM kexi__objectdata WHERE o_id=") + QString::number(objectID)
+ TQString("SELECT o_data FROM kexi__objectdata WHERE o_id=") + TQString::number(objectID)
+ " AND " + KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID),
dataString );
}
-bool Connection::storeDataBlock( int objectID, const QString &dataString, const QString& dataID )
+bool Connection::storeDataBlock( int objectID, const TQString &dataString, const TQString& dataID )
{
if (objectID<=0)
return false;
- QString sql(QString::fromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").arg(objectID));
- QString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) );
+ TQString sql(TQString::tqfromLatin1("SELECT kexi__objectdata.o_id FROM kexi__objectdata WHERE o_id=%1").tqarg(objectID));
+ TQString sql_sub( KexiDB::sqlWhere(m_driver, KexiDB::Field::Text, "o_sub_id", dataID) );
bool ok, exists;
exists = resultExists(sql + " and " + sql_sub, ok);
@@ -2914,20 +2914,20 @@ bool Connection::storeDataBlock( int objectID, const QString &dataString, const
if (exists) {
return executeSQL( "UPDATE kexi__objectdata SET o_data="
+ m_driver->valueToSQL( KexiDB::Field::LongText, dataString )
- + " WHERE o_id=" + QString::number(objectID) + " AND " + sql_sub );
+ + " WHERE o_id=" + TQString::number(objectID) + " AND " + sql_sub );
}
return executeSQL(
- QString::fromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (")
- + QString::number(objectID) +"," + m_driver->valueToSQL( KexiDB::Field::LongText, dataString )
+ TQString::tqfromLatin1("INSERT INTO kexi__objectdata (o_id, o_data, o_sub_id) VALUES (")
+ + TQString::number(objectID) +"," + m_driver->valueToSQL( KexiDB::Field::LongText, dataString )
+ "," + m_driver->valueToSQL( KexiDB::Field::Text, dataID ) + ")" );
}
-bool Connection::removeDataBlock( int objectID, const QString& dataID)
+bool Connection::removeDataBlock( int objectID, const TQString& dataID)
{
if (objectID<=0)
return false;
if (dataID.isEmpty())
- return KexiDB::deleteRow(*this, "kexi__objectdata", "o_id", QString::number(objectID));
+ return KexiDB::deleteRow(*this, "kexi__objectdata", "o_id", TQString::number(objectID));
else
return KexiDB::deleteRow(*this, "kexi__objectdata",
"o_id", KexiDB::Field::Integer, objectID, "o_sub_id", KexiDB::Field::Text, dataID);
@@ -2939,11 +2939,11 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data )
const int objID = data[0].toInt(&ok);
if (!ok)
return false;
- QString sqlText;
+ TQString sqlText;
if (!loadDataBlock( objID, sqlText, "sql" )) {
setError(ERR_OBJECT_NOT_FOUND,
i18n("Could not find definition for query \"%1\". Removing this query is recommended.")
- .arg(data[2].toString()));
+ .tqarg(data[2].toString()));
return 0;
}
d->parser()->parse( sqlText );
@@ -2953,8 +2953,8 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data )
setError(ERR_SQL_PARSE_ERROR,
i18n("<p>Could not load definition for query \"%1\". "
"SQL statement for this query is invalid:<br><tt>%2</tt></p>\n"
- "<p>You can open this query in Text View and correct it.</p>").arg(data[2].toString())
- .arg(d->parser()->statement()));
+ "<p>You can open this query in Text View and correct it.</p>").tqarg(data[2].toString())
+ .tqarg(d->parser()->statement()));
return 0;
}
if (!setupObjectSchemaData( data, *query )) {
@@ -2966,17 +2966,17 @@ KexiDB::QuerySchema* Connection::setupQuerySchema( const RowData &data )
return query;
}
-QuerySchema* Connection::querySchema( const QString& queryName )
+QuerySchema* Connection::querySchema( const TQString& queryName )
{
- QString m_queryName = queryName.lower();
+ TQString m_queryName = queryName.lower();
QuerySchema *q = d->queries_byname[m_queryName];
if (q)
return q;
//not found: retrieve schema
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1(
+ if (true!=querySingleRecord(TQString::tqfromLatin1(
"SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE lower(o_name)='%1' AND o_type=%2")
- .arg(m_queryName).arg(KexiDB::QueryObjectType), data))
+ .tqarg(m_queryName).tqarg(KexiDB::QueryObjectType), data))
return 0;
return setupQuerySchema(data);
@@ -2990,14 +2990,14 @@ QuerySchema* Connection::querySchema( int queryId )
//not found: retrieve schema
clearError();
RowData data;
- if (true!=querySingleRecord(QString::fromLatin1(
- "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").arg(queryId), data))
+ if (true!=querySingleRecord(TQString::tqfromLatin1(
+ "SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects WHERE o_id=%1").tqarg(queryId), data))
return 0;
return setupQuerySchema(data);
}
-bool Connection::setQuerySchemaObsolete( const QString& queryName )
+bool Connection::setQuerySchemaObsolete( const TQString& queryName )
{
QuerySchema* oldQuery = querySchema( queryName );
if (!oldQuery)
@@ -3008,14 +3008,14 @@ bool Connection::setQuerySchemaObsolete( const QString& queryName )
return true;
}
-TableSchema* Connection::newKexiDBSystemTableSchema(const QString& tsname)
+TableSchema* Connection::newKexiDBSystemTableSchema(const TQString& tsname)
{
TableSchema *ts = new TableSchema(tsname.lower());
insertInternalTableSchema( ts );
return ts;
}
-bool Connection::isInternalTableSchema(const QString& tableName)
+bool Connection::isInternalTableSchema(const TQString& tableName)
{
return (d->kexiDBSystemTables[ d->tables_byname[tableName] ])
// these are here for compatiblility because we're no longer instantiate
@@ -3119,7 +3119,7 @@ void Connection::removeMe(TableSchema *ts)
}
}
-QString Connection::anyAvailableDatabaseName()
+TQString Connection::anyAvailableDatabaseName()
{
if (!d->availableDatabaseName.isEmpty()) {
return d->availableDatabaseName;
@@ -3127,19 +3127,19 @@ QString Connection::anyAvailableDatabaseName()
return m_driver->beh->ALWAYS_AVAILABLE_DATABASE_NAME;
}
-void Connection::setAvailableDatabaseName(const QString& dbName)
+void Connection::setAvailableDatabaseName(const TQString& dbName)
{
d->availableDatabaseName = dbName;
}
//! @internal used in updateRow(), insertRow(),
inline void updateRowDataWithNewValues(QuerySchema &query, RowData& data, KexiDB::RowEditBuffer::DBMap& b,
- QMap<QueryColumnInfo*,int>& columnsOrderExpanded)
+ TQMap<QueryColumnInfo*,int>& columnsOrderExpanded)
{
columnsOrderExpanded = query.columnsOrder(QuerySchema::ExpandedList);
- QMap<QueryColumnInfo*,int>::ConstIterator columnsOrderExpandedIt;
+ TQMap<QueryColumnInfo*,int>::ConstIterator columnsOrderExpandedIt;
for (KexiDB::RowEditBuffer::DBMap::ConstIterator it=b.constBegin();it!=b.constEnd();++it) {
- columnsOrderExpandedIt = columnsOrderExpanded.find( it.key() );
+ columnsOrderExpandedIt = columnsOrderExpanded.tqfind( it.key() );
if (columnsOrderExpandedIt == columnsOrderExpanded.constEnd()) {
KexiDBWarn << "(Connection) updateRowDataWithNewValues(): \"now also assign new value in memory\" step "
"- could not find item '" << it.key()->aliasOrName() << "'" << endl;
@@ -3178,7 +3178,7 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
}
//update the record:
m_sql = "UPDATE " + escapeIdentifier(mt->name()) + " SET ";
- QString sqlset, sqlwhere;
+ TQString sqlset, sqlwhere;
sqlset.reserve(1024);
sqlwhere.reserve(1024);
KexiDB::RowEditBuffer::DBMap b = buf.dbBuffer();
@@ -3191,7 +3191,7 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
m_driver->valueToSQL(it.key()->field,it.data()));
}
if (pkey) {
- const QValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
+ const TQValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
KexiDBDbg << pkey->fieldCount() << " ? " << query.pkeyFieldsCount() << endl;
if (pkey->fieldCount() != query.pkeyFieldsCount()) { //sanity check
KexiDBWarn << " -- NO ENTIRE MASTER TABLE's PKEY SPECIFIED!" << endl;
@@ -3204,10 +3204,10 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
for (Field::ListIterator it = pkey->fieldsIterator(); it.current(); i++, ++it) {
if (!sqlwhere.isEmpty())
sqlwhere+=" AND ";
- QVariant val = data[ pkeyFieldsOrder[i] ];
+ TQVariant val = data[ pkeyFieldsOrder[i] ];
if (val.isNull() || !val.isValid()) {
setError(ERR_UPDATE_NULL_PKEY_FIELD,
- i18n("Primary key's field \"%1\" cannot be empty.").arg(it.current()->name()));
+ i18n("Primary key's field \"%1\" cannot be empty.").tqarg(it.current()->name()));
//js todo: pass the field's name somewhere!
return false;
}
@@ -3228,7 +3228,7 @@ bool Connection::updateRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
return false;
}
//success: now also assign new values in memory:
- QMap<QueryColumnInfo*,int> columnsOrderExpanded;
+ TQMap<QueryColumnInfo*,int> columnsOrderExpanded;
updateRowDataWithNewValues(query, data, b, columnsOrderExpanded);
return true;
}
@@ -3254,7 +3254,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
if (!getROWID && !pkey)
KexiDBWarn << " -- WARNING: NO MASTER TABLE's PKEY" << endl;
- QString sqlcols, sqlvals;
+ TQString sqlcols, sqlvals;
sqlcols.reserve(1024);
sqlvals.reserve(1024);
@@ -3268,7 +3268,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
QueryColumnInfo *ci = fieldsExpanded.at(i);
if (ci->field && KexiDB::isDefaultValueAllowed(ci->field)
&& !ci->field->defaultValue().isNull()
- && !b.contains( ci ))
+ && !b.tqcontains( ci ))
{
KexiDBDbg << "Connection::insertRow(): adding default value '" << ci->field->defaultValue().toString()
<< "' for column '" << ci->field->name() << "'" << endl;
@@ -3279,19 +3279,19 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
if (b.isEmpty()) {
// empty row inserting requested:
if (!getROWID && !pkey) {
- KexiDBWarn << "MASTER TABLE's PKEY REQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
+ KexiDBWarn << "MASTER TABLE's PKEY RETQUIRED FOR INSERTING EMPTY ROWS: INSERT CANCELLED" << endl;
setError(ERR_INSERT_NO_MASTER_TABLES_PKEY,
i18n("Could not insert row because master table has no primary key defined."));
return false;
}
if (pkey) {
- const QValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
+ const TQValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
// KexiDBDbg << pkey->fieldCount() << " ? " << query.pkeyFieldsCount() << endl;
if (pkey->fieldCount() != query.pkeyFieldsCount()) { //sanity check
KexiDBWarn << "NO ENTIRE MASTER TABLE's PKEY SPECIFIED!" << endl;
setError(ERR_INSERT_NO_ENTIRE_MASTER_TABLES_PKEY,
i18n("Could not insert row because it does not contain entire master table's primary key.")
- .arg(query.name()));
+ .tqarg(query.name()));
return false;
}
}
@@ -3308,7 +3308,7 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
}
}
sqlcols += escapeIdentifier(anyField->name());
- sqlvals += m_driver->valueToSQL(anyField,QVariant()/*NULL*/);
+ sqlvals += m_driver->valueToSQL(anyField,TQVariant()/*NULL*/);
}
else {
// non-empty row inserting requested:
@@ -3333,31 +3333,31 @@ bool Connection::insertRow(QuerySchema &query, RowData& data, RowEditBuffer& buf
return false;
}
//success: now also assign a new value in memory:
- QMap<QueryColumnInfo*,int> columnsOrderExpanded;
+ TQMap<QueryColumnInfo*,int> columnsOrderExpanded;
updateRowDataWithNewValues(query, data, b, columnsOrderExpanded);
//fetch autoincremented values
QueryColumnInfo::List *aif_list = query.autoIncrementFields();
- Q_ULLONG ROWID = 0;
+ TQ_ULLONG ROWID = 0;
if (pkey && !aif_list->isEmpty()) {
//! @todo now only if PKEY is present, this should also work when there's no PKEY
QueryColumnInfo *id_columnInfo = aif_list->first();
//! @todo safe to cast it?
- Q_ULLONG last_id = lastInsertedAutoIncValue(
+ TQ_ULLONG last_id = lastInsertedAutoIncValue(
id_columnInfo->field->name(), id_columnInfo->field->table()->name(), &ROWID);
- if (last_id==(Q_ULLONG)-1 || last_id<=0) {
+ if (last_id==(TQ_ULLONG)-1 || last_id<=0) {
//! @todo show error
//! @todo remove just inserted row. How? Using ROLLBACK?
return false;
}
RowData aif_data;
- QString getAutoIncForInsertedValue = QString::fromLatin1("SELECT ")
+ TQString getAutoIncForInsertedValue = TQString::tqfromLatin1("SELECT ")
+ query.autoIncrementSQLFieldsList(m_driver)
- + QString::fromLatin1(" FROM ")
+ + TQString::tqfromLatin1(" FROM ")
+ escapeIdentifier(id_columnInfo->field->table()->name())
- + QString::fromLatin1(" WHERE ")
+ + TQString::tqfromLatin1(" WHERE ")
+ escapeIdentifier(id_columnInfo->field->name()) + "="
- + QString::number(last_id);
+ + TQString::number(last_id);
if (true!=querySingleRecord(getAutoIncForInsertedValue, aif_data)) {
//! @todo show error
return false;
@@ -3395,7 +3395,7 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID)
KexiDBWarn << " -- NO MASTER TABLE!" << endl;
setError(ERR_DELETE_NO_MASTER_TABLE,
i18n("Could not delete row because there is no master table defined.")
- .arg(query.name()));
+ .tqarg(query.name()));
return false;
}
IndexSchema *pkey = (mt->primaryKey() && !mt->primaryKey()->fields()->isEmpty()) ? mt->primaryKey() : 0;
@@ -3410,11 +3410,11 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID)
//update the record:
m_sql = "DELETE FROM " + escapeIdentifier(mt->name()) + " WHERE ";
- QString sqlwhere;
+ TQString sqlwhere;
sqlwhere.reserve(1024);
if (pkey) {
- const QValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
+ const TQValueVector<int> pkeyFieldsOrder( query.pkeyFieldsOrder() );
KexiDBDbg << pkey->fieldCount() << " ? " << query.pkeyFieldsCount() << endl;
if (pkey->fieldCount() != query.pkeyFieldsCount()) { //sanity check
KexiDBWarn << " -- NO ENTIRE MASTER TABLE's PKEY SPECIFIED!" << endl;
@@ -3426,10 +3426,10 @@ bool Connection::deleteRow(QuerySchema &query, RowData& data, bool useROWID)
for (Field::ListIterator it = pkey->fieldsIterator(); it.current(); i++, ++it) {
if (!sqlwhere.isEmpty())
sqlwhere+=" AND ";
- QVariant val = data[ pkeyFieldsOrder[i] ];
+ TQVariant val = data[ pkeyFieldsOrder[i] ];
if (val.isNull() || !val.isValid()) {
setError(ERR_DELETE_NULL_PKEY_FIELD, i18n("Primary key's field \"%1\" cannot be empty.")
- .arg(it.current()->name()));
+ .tqarg(it.current()->name()));
//js todo: pass the field's name somewhere!
return false;
}
@@ -3477,20 +3477,20 @@ bool Connection::deleteAllRows(QuerySchema &query)
void Connection::registerForTableSchemaChanges(TableSchemaChangeListenerInterface& listener,
TableSchema &schema)
{
- QPtrList<TableSchemaChangeListenerInterface>* listeners = d->tableSchemaChangeListeners[&schema];
+ TQPtrList<TableSchemaChangeListenerInterface>* listeners = d->tableSchemaChangeListeners[&schema];
if (!listeners) {
- listeners = new QPtrList<TableSchemaChangeListenerInterface>();
+ listeners = new TQPtrList<TableSchemaChangeListenerInterface>();
d->tableSchemaChangeListeners.insert(&schema, listeners);
}
//TODO: inefficient
- if (listeners->findRef( &listener )==-1)
+ if (listeners->tqfindRef( &listener )==-1)
listeners->append( &listener );
}
void Connection::unregisterForTableSchemaChanges(TableSchemaChangeListenerInterface& listener,
TableSchema &schema)
{
- QPtrList<TableSchemaChangeListenerInterface>* listeners = d->tableSchemaChangeListeners[&schema];
+ TQPtrList<TableSchemaChangeListenerInterface>* listeners = d->tableSchemaChangeListeners[&schema];
if (!listeners)
return;
//TODO: inefficient
@@ -3499,15 +3499,15 @@ void Connection::unregisterForTableSchemaChanges(TableSchemaChangeListenerInterf
void Connection::unregisterForTablesSchemaChanges(TableSchemaChangeListenerInterface& listener)
{
- for (QPtrDictIterator< QPtrList<TableSchemaChangeListenerInterface> > it(d->tableSchemaChangeListeners);
+ for (TQPtrDictIterator< TQPtrList<TableSchemaChangeListenerInterface> > it(d->tableSchemaChangeListeners);
it.current(); ++it)
{
- if (-1!=it.current()->find(&listener))
+ if (-1!=it.current()->tqfind(&listener))
it.current()->take();
}
}
-QPtrList<Connection::TableSchemaChangeListenerInterface>*
+TQPtrList<Connection::TableSchemaChangeListenerInterface>*
Connection::tableSchemaChangeListeners(TableSchema& tableSchema) const
{
KexiDBDbg << d->tableSchemaChangeListeners.count() << endl;
@@ -3516,13 +3516,13 @@ Connection::tableSchemaChangeListeners(TableSchema& tableSchema) const
tristate Connection::closeAllTableSchemaChangeListeners(TableSchema& tableSchema)
{
- QPtrList<Connection::TableSchemaChangeListenerInterface> *listeners = d->tableSchemaChangeListeners[&tableSchema];
+ TQPtrList<Connection::TableSchemaChangeListenerInterface> *listeners = d->tableSchemaChangeListeners[&tableSchema];
if (!listeners)
return true;
- QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> tmpListeners(*listeners); //safer copy
+ TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> tmpListeners(*listeners); //safer copy
tristate res = true;
//try to close every window
- for (QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(tmpListeners);
+ for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(tmpListeners);
it.current() && res==true; ++it)
{
res = it.current()->closeListener();
diff --git a/kexi/kexidb/connection.h b/kexi/kexidb/connection.h
index b72e01d41..79bd38406 100644
--- a/kexi/kexidb/connection.h
+++ b/kexi/kexidb/connection.h
@@ -20,15 +20,15 @@
#ifndef KEXIDB_CONNECTION_H
#define KEXIDB_CONNECTION_H
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qdict.h>
-#include <qptrdict.h>
-#include <qvaluevector.h>
-#include <qvaluelist.h>
-#include <qvariant.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqdict.h>
+#include <tqptrdict.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
+#include <tqguardedptr.h>
#include <kexidb/object.h>
#include <kexidb/connectiondata.h>
@@ -44,7 +44,7 @@
namespace KexiDB {
//! structure for storing single record with type information
-typedef QValueVector<QVariant> RowData;
+typedef TQValueVector<TQVariant> RowData;
class Cursor;
class ConnectionPrivate;
@@ -58,9 +58,10 @@ class AlterTableHandler;
It supports data queries and modification by creating client-side database cursors.
Database transactions are supported.
*/
-class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
+class KEXI_DB_EXPORT Connection : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -107,14 +108,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return list of database names for opened connection.
If \a also_system_db is true, the system database names are also returned. */
- QStringList databaseNames(bool also_system_db = false);
+ TQStringList databaseNames(bool also_system_db = false);
/*! \return true if database \a dbName exists.
If \a ignoreErrors is true, error flag of connection
won't be modified for any errors (it will quietly return),
else (ignoreErrors == false) we can check why the database does
not exist using error(), errorNum() and/or errorMsg(). */
- bool databaseExists( const QString &dbName, bool ignoreErrors = true );
+ bool databaseExists( const TQString &dbName, bool ignoreErrors = true );
/*! \brief Creates new database with name \a dbName, using this connection.
@@ -127,7 +128,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
for database schema documentation (detailed description of kexi__* 'system' tables).
\sa useDatabase() */
- bool createDatabase( const QString &dbName );
+ bool createDatabase( const TQString &dbName );
/*!
\brief Opens an existing database specified by \a dbName.
@@ -139,7 +140,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
(the same as specified for ConnectionData).
\return true on success, false on failure.
If user has cancelled this action and \a cancelled is not 0, *cancelled is set to true. */
- bool useDatabase( const QString &dbName, bool kexiCompatible = true, bool *cancelled = 0,
+ bool useDatabase( const TQString &dbName, bool kexiCompatible = true, bool *cancelled = 0,
MessageHandler* msgHandler = 0 );
/*!
@@ -153,27 +154,27 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return name of currently used database for this connection or empty string
if there is no used database */
- QString currentDatabase() const;
+ TQString currentDatabase() const;
/*! \brief Drops database with name \a dbName.
if dbName is not specified, currently used database name is used
(it is closed before dropping).
*/
- bool dropDatabase( const QString &dbName = QString::null );
+ bool dropDatabase( const TQString &dbName = TQString() );
/*! \return names of all the \a objecttype (see \a ObjectTypes in global.h)
schemas stored in currently used database. KexiDB::AnyObjectType can be passed
as \a objType to get names of objects of any type.
If \a ok is not null then variable pointed by it will be set to the result.
On error, the functions can return incomplete list. */
- QStringList objectNames(int objType = KexiDB::AnyObjectType, bool* ok = 0);
+ TQStringList objectNames(int objType = KexiDB::AnyObjectType, bool* ok = 0);
/*! \return names of all table schemas stored in currently
used database. If \a also_system_tables is true,
internal KexiDB system table names (kexi__*) are also returned.
\sa kexiDBSystemTableNames() */
- QStringList tableNames(bool also_system_tables = false);
+ TQStringList tableNames(bool also_system_tables = false);
/*! \return list of internal KexiDB system table names
(kexi__*). This does not mean that these tables can be found
@@ -184,7 +185,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
opened database can contain fewer 'system' tables than in current
KexiDB implementation, if the current one is newer than the one used
to build the database. */
- static const QStringList& kexiDBSystemTableNames();
+ static const TQStringList& kexiDBSystemTableNames();
/*! \return server version information for this connection.
If database is not connected (i.e. isConnected() is false) 0 is returned. */
@@ -206,16 +207,16 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
If \a also_system_tables is true,
Internal KexiDB system tables (kexi__*) are not available here
because these have no identifiers assigned (more formally: id=-1). */
- QValueList<int> tableIds();
+ TQValueList<int> tableIds();
/*! \return ids of all database query schemas stored in currently
used database. These ids can be later used as argument for querySchema().
This is a shortcut for objectIds(TableObjectType). */
- QValueList<int> queryIds();
+ TQValueList<int> queryIds();
/*! \return names of all schemas of object with \a objType type
that are stored in currently used database. */
- QValueList<int> objectIds(int objType);
+ TQValueList<int> objectIds(int objType);
/*! \brief Creates new transaction handle and starts a new transaction.
\return KexiDB::Transaction object if transaction has been started
@@ -231,7 +232,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Transaction beginTransaction();
/*! \todo for nested transactions:
- Tansaction* beginTransaction(transaction *parent_transaction);
+ Tansaction* beginTransaction(transaction *tqparent_transaction);
*/
/*! Commits transaction \a trans.
If there is not \a trans argument passed, and there is default transaction
@@ -283,7 +284,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Use Transaction::active() to check that. Inactive transaction
handle is useless and can be safely dropped.
*/
- const QValueList<Transaction>& transactions();
+ const TQValueList<Transaction>& transactions();
/*! \return true if "auto commit" option is on.
@@ -320,8 +321,8 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
bool setAutoCommit(bool on);
/*! driver-specific string escaping */
-//js: MOVED TO Driver virtual QString escapeString(const QString& str) const = 0;
-// virtual QCString escapeString(const QCString& str) const = 0;
+//js: MOVED TO Driver virtual TQString escapeString(const TQString& str) const = 0;
+// virtual TQCString escapeString(const TQCString& str) const = 0;
/*! Prepares SELECT query described by raw \a statement.
\return opened cursor created for results of this query
@@ -334,9 +335,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
resources and return Cursor subclass' object
(passing \a statement and \a cursor_options to it's constructor).
*/
- virtual Cursor* prepareQuery( const QString& statement, uint cursor_options = 0) = 0;
+ virtual Cursor* prepareQuery( const TQString& statement, uint cursor_options = 0) = 0;
- /*! \overload prepareQuery( const QString& statement = QString::null, uint cursor_options = 0)
+ /*! \overload prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0)
Prepares query described by \a query schema. \a params are values of parameters that
will be inserted into places marked with [] before execution of the query.
@@ -345,16 +346,16 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
(passing \a query and \a cursor_options to it's constructor).
Kexi SQL and driver-specific escaping is performed on table names.
*/
- Cursor* prepareQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ Cursor* prepareQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 );
- /*! \overload prepareQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ /*! \overload prepareQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 )
Prepares query described by \a query schema without parameters.
*/
virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 ) = 0;
- /*! \overload prepareQuery( const QString& statement = QString::null, uint cursor_options = 0)
+ /*! \overload prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0)
Statement is build from data provided by \a table schema,
it is like "select * from table_name".*/
Cursor* prepareQuery( TableSchema& table, uint cursor_options = 0);
@@ -367,22 +368,22 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Identifiers in \a statement that are the same as keywords in Kexi
SQL or the backend's SQL need to have been escaped.
*/
- Cursor* executeQuery( const QString& statement, uint cursor_options = 0 );
+ Cursor* executeQuery( const TQString& statement, uint cursor_options = 0 );
- /*! \overload executeQuery( const QString& statement, uint cursor_options = 0 )
+ /*! \overload executeQuery( const TQString& statement, uint cursor_options = 0 )
\a params are values of parameters that
will be inserted into places marked with [] before execution of the query.
Statement is build from data provided by \a query schema.
Kexi SQL and driver-specific escaping is performed on table names. */
- Cursor* executeQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ Cursor* executeQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 );
- /*! \overload executeQuery( QuerySchema& query, const QValueList<QVariant>& params,
+ /*! \overload executeQuery( QuerySchema& query, const TQValueList<TQVariant>& params,
uint cursor_options = 0 ) */
Cursor* executeQuery( QuerySchema& query, uint cursor_options = 0 );
- /*! \overload executeQuery( const QString& statement, uint cursor_options = 0 )
+ /*! \overload executeQuery( const TQString& statement, uint cursor_options = 0 )
Executes query described by \a query schema without parameters.
Statement is build from data provided by \a table schema,
it is like "select * from table_name".*/
@@ -403,7 +404,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return schema of a table pointed by \a tableName, retrieved from currently
used database. KexiDB system table schema can be also retrieved.
\sa tableSchema( int tableId ) */
- TableSchema* tableSchema( const QString& tableName );
+ TableSchema* tableSchema( const TQString& tableName );
/*! \return schema of a query pointed by \a queryId, retrieved from currently
used database. The schema is cached inside connection,
@@ -412,10 +413,10 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return schema of a query pointed by \a queryName, retrieved from currently
used database. \sa querySchema( int queryId ) */
- QuerySchema* querySchema( const QString& queryName );
+ QuerySchema* querySchema( const TQString& queryName );
/*! Sets \a queryName query obsolete by moving it out of the query sets, so it will not be
- accessible by querySchema( const QString& queryName ). The existing query object is not
+ accessible by querySchema( const TQString& queryName ). The existing query object is not
destroyed, to avoid problems when it's referenced. In this case,
a new query schema will be retrieved directly from the backend.
@@ -423,10 +424,10 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
This solves the problem when user has changed a query schema but already form still uses
previously instantiated query schema.
\return true if there is such query. Otherwise the method does nothing. */
- bool setQuerySchemaObsolete( const QString& queryName );
+ bool setQuerySchemaObsolete( const TQString& queryName );
-//js: MOVED TO Driver QString valueToSQL( const Field::Type ftype, const QVariant& v ) const;
-// QString valueToSQL( const Field *field, const QVariant& v ) const;
+//js: MOVED TO Driver TQString valueToSQL( const Field::Type ftype, const TQVariant& v ) const;
+// TQString valueToSQL( const Field *field, const TQVariant& v ) const;
/*! Executes \a sql query and stores first record's data inside \a data.
This is convenient method when we need only first record from query result,
@@ -435,9 +436,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
so \a sql should not include one already.
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available. */
- tristate querySingleRecord(const QString& sql, RowData &data, bool addLimitTo1 = true);
+ tristate querySingleRecord(const TQString& sql, RowData &data, bool addLimitTo1 = true);
- /*! Like tristate querySingleRecord(const QString& sql, RowData &data)
+ /*! Like tristate querySingleRecord(const TQString& sql, RowData &data)
but uses QuerySchema object.
If \a addLimitTo1 is true (the default), adds a LIMIT clause to the query. */
tristate querySingleRecord(QuerySchema& query, RowData &data, bool addLimitTo1 = true);
@@ -450,7 +451,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available.
\sa queryStringList() */
- tristate querySingleString(const QString& sql, QString &value, uint column = 0,
+ tristate querySingleString(const TQString& sql, TQString &value, uint column = 0,
bool addLimitTo1 = true);
/*! Convenience function: executes \a sql query and stores first
@@ -458,7 +459,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: "LIMIT 1" is appended to \a sql statement if \a addLimitTo1 is true (the default).
\return true if query was successfully executed and first record has been found,
false on data retrieving failure, and cancelled if there's no single record available. */
- tristate querySingleNumber(const QString& sql, int &number, uint column = 0,
+ tristate querySingleNumber(const TQString& sql, int &number, uint column = 0,
bool addLimitTo1 = true);
/*! Executes \a sql query and stores Nth field's string value of every record
@@ -468,7 +469,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\return true if all values were fetched successfuly,
false on data retrieving failure. Returning empty list can be still a valid result.
On errors, the list is not cleared, it may contain a few retrieved values. */
- bool queryStringList(const QString& sql, QStringList& list, uint column = 0);
+ bool queryStringList(const TQString& sql, TQStringList& list, uint column = 0);
/*! \return true if there is at least one record returned in \a sql query.
Does not fetch any records. \a success will be set to false
@@ -476,20 +477,20 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
"no results" and "query execution error" states.
Note: real executed query is: "SELECT 1 FROM (\a sql) LIMIT 1"
if \a addLimitTo1 is true (the default). */
- bool resultExists(const QString& sql, bool &success, bool addLimitTo1 = true);
+ bool resultExists(const TQString& sql, bool &success, bool addLimitTo1 = true);
/*! \return true if there is at least one record in \a table. */
bool isEmpty( TableSchema& table, bool &success );
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of records in \a sql query.
Does not fetch any records. -1 is returned on query execution errors (>0 otherwise).
Note: real executed query is: "SELECT COUNT() FROM (\a sql) LIMIT 1"
(using querySingleNumber()) */
- int resultCount(const QString& sql);
+ int resultCount(const TQString& sql);
//PROTOTYPE:
- #define A , const QVariant&
+ #define A , const TQVariant&
#define H_INS_REC(args) bool insertRecord(TableSchema &tableSchema args)
#define H_INS_REC_ALL \
H_INS_REC(A); \
@@ -510,9 +511,9 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
#undef H_INS_REC
#undef A
- bool insertRecord(TableSchema &tableSchema, QValueList<QVariant>& values);
+ bool insertRecord(TableSchema &tableSchema, TQValueList<TQVariant>& values);
- bool insertRecord(FieldList& fields, QValueList<QVariant>& values);
+ bool insertRecord(FieldList& fields, TQValueList<TQVariant>& values);
/*! Creates table defined by \a tableSchema.
Schema information is also added into kexi system tables, for later reuse.
@@ -531,7 +532,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
- \a tableSchema is not inserted into Connection's structures,
so you are still owner of this object
- existing table schema object is not destroyed (i.e. it is still available
- e.g. using Connection::tableSchema(const QString& ), even if the table
+ e.g. using Connection::tableSchema(const TQString& ), even if the table
was physically dropped.
*/
bool createTable( TableSchema* tableSchema, bool replaceExisting = false );
@@ -547,7 +548,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! It is a convenience function, does exactly the same as
bool dropTable( KexiDB::TableSchema* tableSchema ) */
- tristate dropTable( const QString& table );
+ tristate dropTable( const TQString& table );
/*! Alters \a tableSchema using \a newTableSchema in memory and on the db backend.
\return true on success, cancelled if altering was cancelled. */
@@ -565,7 +566,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
-- false is returned and ERR_OBJECT_EXISTS error is set.
The schema of \a tableSchema is updated on success.
\return true on success. */
- bool alterTableName(TableSchema& tableSchema, const QString& newName, bool replace = false);
+ bool alterTableName(TableSchema& tableSchema, const TQString& newName, bool tqreplace = false);
/*! Drops a query defined by \a querySchema.
If true is returned, schema information \a querySchema is destoyed
@@ -575,7 +576,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! It is a convenience function, does exactly the same as
bool dropQuery( KexiDB::QuerySchema* querySchema ) */
- bool dropQuery( const QString& query );
+ bool dropQuery( const TQString& query );
/*! Removes information about object with \a objId
from internal "kexi__object" and "kexi__objectdata" tables.
@@ -610,7 +611,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
this connection specifics
(e.g. you need to check something remotely).
*/
- virtual QString anyAvailableDatabaseName();
+ virtual TQString anyAvailableDatabaseName();
/*! Sets \a dbName as name of a database that can be accessible.
This is option that e.g. application that make use of KexiDB library can set
@@ -622,7 +623,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
\sa anyAvailableDatabaseName()
*/
- void setAvailableDatabaseName(const QString& dbName);
+ void setAvailableDatabaseName(const TQString& dbName);
/*! Because some engines need to have opened any database before
executing administrative sql statements like "create database" or "drop database",
@@ -639,7 +640,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: This method has nothing to do with creating or using temporary databases
in such meaning that these database are not persistent
*/
- bool useTemporaryDatabaseIfNeeded(QString &tmpdbName);
+ bool useTemporaryDatabaseIfNeeded(TQString &tmpdbName);
/*! \return autoincrement field's \a aiFieldName value
of last inserted record. This refers \a tableName table.
@@ -647,24 +648,24 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Simply, method internally fetches last inserted record and returns selected
field's value. Requirements: field must be of integer type, there must be a
record inserted in current database session (whatever this means).
- On error (Q_ULLONG)-1 is returned.
+ On error (TQ_ULLONG)-1 is returned.
Last inserted record is identified by magical row identifier, usually called
ROWID (PostgreSQL has it as well as SQLite;
see DriverBehaviour::ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE).
ROWID's value will be assigned back to \a ROWID if this pointer is not null.
*/
- Q_ULLONG lastInsertedAutoIncValue(const QString& aiFieldName, const QString& tableName,
- Q_ULLONG* ROWID = 0);
+ TQ_ULLONG lastInsertedAutoIncValue(const TQString& aiFieldName, const TQString& tableName,
+ TQ_ULLONG* ROWID = 0);
- /*! \overload int lastInsertedAutoIncValue(const QString&, const QString&, Q_ULLONG*)
+ /*! \overload int lastInsertedAutoIncValue(const TQString&, const TQString&, TQ_ULLONG*)
*/
- Q_ULLONG lastInsertedAutoIncValue(const QString& aiFieldName,
- const TableSchema& table, Q_ULLONG* ROWID = 0);
+ TQ_ULLONG lastInsertedAutoIncValue(const TQString& aiFieldName,
+ const TableSchema& table, TQ_ULLONG* ROWID = 0);
/*! Executes query \a statement, but without returning resulting
rows (used mostly for functional queries).
Only use this method if you really need. */
- bool executeSQL( const QString& statement );
+ bool executeSQL( const TQString& statement );
//! @short options used in selectStatement()
class KEXI_DB_EXPORT SelectStatementOptions
@@ -687,19 +688,19 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! \return "SELECT ..." statement's string needed for executing query
defined by \a querySchema and \a params. */
- QString selectStatement( QuerySchema& querySchema,
- const QValueList<QVariant>& params,
+ TQString selectStatement( QuerySchema& querySchema,
+ const TQValueList<TQVariant>& params,
const SelectStatementOptions& options = SelectStatementOptions() ) const;
- /*! \overload QString selectStatement( QuerySchema& querySchema,
- QValueList<QVariant> params = QValueList<QVariant>(),
+ /*! \overload TQString selectStatement( QuerySchema& querySchema,
+ TQValueList<TQVariant> params = TQValueList<TQVariant>(),
const SelectStatementOptions& options = SelectStatementOptions() ) const;
\return "SELECT ..." statement's string needed for executing query
defined by \a querySchema. */
- inline QString selectStatement( QuerySchema& querySchema,
+ inline TQString selectStatement( QuerySchema& querySchema,
const SelectStatementOptions& options = SelectStatementOptions() ) const
{
- return selectStatement(querySchema, QValueList<QVariant>(), options);
+ return selectStatement(querySchema, TQValueList<TQVariant>(), options);
}
/*! Stores object's schema data (id, name, caption, help text)
@@ -721,13 +722,13 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Finds object schema data for object of type \a objectType and name \a objectName.
If the object is found, resulted schema is stored in \a sdata and true is returned,
otherwise false is returned. */
- tristate loadObjectSchemaData( int objectType, const QString& objectName, SchemaData &sdata );
+ tristate loadObjectSchemaData( int objectType, const TQString& objectName, SchemaData &sdata );
/*! Loads (potentially large) data block (e.g. xml form's representation), referenced by objectID
and puts it to \a dataString. The can be block indexed with optional \a dataID.
\return true on success, false on failure and cancelled when there is no such data block
\sa storeDataBlock(). */
- tristate loadDataBlock( int objectID, QString &dataString, const QString& dataID );
+ tristate loadDataBlock( int objectID, TQString &dataString, const TQString& dataID );
/*! Stores (potentially large) data block \a dataString (e.g. xml form's representation),
referenced by objectID. Block will be stored in "kexi__objectdata" table and
@@ -735,14 +736,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
If there is already such record in the table, it's simply overwritten.
\return true on success
\sa loadDataBlock(). */
- bool storeDataBlock( int objectID, const QString &dataString, const QString& dataID = QString::null );
+ bool storeDataBlock( int objectID, const TQString &dataString, const TQString& dataID = TQString() );
/*! Removes (potentially large) string data (e.g. xml form's representation),
referenced by objectID, and pointed by optional \a dataID.
\return true on success. Does not fail if the block does not exist.
Note that if \a dataID is not specified, all data blocks for this dialog will be removed.
\sa loadDataBlock() storeDataBlock(). */
- bool removeDataBlock( int objectID, const QString& dataID = QString::null);
+ bool removeDataBlock( int objectID, const TQString& dataID = TQString());
class KEXI_DB_EXPORT TableSchemaChangeListenerInterface
{
@@ -755,7 +756,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! i18n'd string that can be displayed for user to inform about
e.g. conflicting listeners. */
- QString listenerInfoString;
+ TQString listenerInfoString;
};
//TMP// TODO: will be more generic
/** Register \a listener for receiving (listening) information about changes
@@ -768,7 +769,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
void unregisterForTablesSchemaChanges(TableSchemaChangeListenerInterface& listener);
- QPtrList<Connection::TableSchemaChangeListenerInterface>*
+ TQPtrList<Connection::TableSchemaChangeListenerInterface>*
tableSchemaChangeListeners(TableSchema& tableSchema) const;
tristate closeAllTableSchemaChangeListeners(TableSchema& tableSchema);
@@ -781,7 +782,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
This method is used for example in KexiProject to insert information about "kexi__blobs"
table schema. Use createTable() to physically create table. After createTable()
calling insertInternalTableSchema() is not required.
- Also used internally by newKexiDBSystemTableSchema(const QString& tsname) */
+ Also used internally by newKexiDBSystemTableSchema(const TQString& tsname) */
void insertInternalTableSchema(TableSchema *tableSchema);
//! @todo move this somewhere to low level class (MIGRATION?)
@@ -789,7 +790,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
with name \a tableName exists in the database.
\return false if it does not exist or error occurred.
The lookup is case insensitive. */
- virtual bool drv_containsTable( const QString &tableName ) = 0;
+ virtual bool drv_containsTable( const TQString &tableName ) = 0;
/*! Creates table using \a tableSchema information.
\return true on success. Default implementation
@@ -813,7 +814,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Moved to public for KexiProject.
@todo fix this after refactoring
*/
- virtual bool drv_alterTableName(TableSchema& tableSchema, const QString& newName);
+ virtual bool drv_alterTableName(TableSchema& tableSchema, const TQString& newName);
/*! Physically drops table named with \a name.
Default impelmentation executes "DROP TABLE.." command,
@@ -822,13 +823,13 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Moved to public for KexiMigrate
@todo fix this after refatoring
*/
- virtual bool drv_dropTable( const QString& name );
+ virtual bool drv_dropTable( const TQString& name );
/*! Prepare a SQL statement and return a \a PreparedStatement instance. */
virtual PreparedStatement::Ptr prepareStatement(PreparedStatement::StatementType type,
FieldList& fields) = 0;
- bool isInternalTableSchema(const QString& tableName);
+ bool isInternalTableSchema(const TQString& tableName);
/*! Setups schema data for object that owns sdata (e.g. table, query)
using \a cursor opened on 'kexi__objects' table, pointing to a record
@@ -874,7 +875,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Executes query \a statement, but without returning resulting
rows (used mostly for functional queries).
Only use this method if you really need. */
- virtual bool drv_executeSQL( const QString& statement ) = 0;
+ virtual bool drv_executeSQL( const TQString& statement ) = 0;
/*! For reimplemenation: loads list of databases' names available for this connection
and adds these names to \a list. If your server is not able to offer such a list,
@@ -882,18 +883,18 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
The method should return true only if there was no error on getting database names
list from the server.
Default implementation puts empty list into \a list and returns true. */
- virtual bool drv_getDatabasesList( QStringList &list );
+ virtual bool drv_getDatabasesList( TQStringList &list );
//! @todo move this somewhere to low level class (MIGRATION?)
/*! LOW LEVEL METHOD. For reimplemenation: loads low-level list of table names
available for this connection. The names are in lower case.
The method should return true only if there was no error on getting database names
list from the server. */
- virtual bool drv_getTablesList( QStringList &list ) = 0;
+ virtual bool drv_getTablesList( TQStringList &list ) = 0;
/*! For optional reimplemenation: asks server if database \a dbName exists.
This method is used internally in databaseExists(). The default implementation
- calls databaseNames and checks if that list contains \a dbName. If you need to
+ calls databaseNames and checks if that list tqcontains \a dbName. If you need to
ask the server specifically if a database exists, eg. if you can't retrieve a list
of all available database names, please reimplement this method and do all
needed checks.
@@ -903,14 +904,14 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: This method should also work if there is already database used (with useDatabase());
in this situation no changes should be made in current database selection. */
- virtual bool drv_databaseExists( const QString &dbName, bool ignoreErrors = true );
+ virtual bool drv_databaseExists( const TQString &dbName, bool ignoreErrors = true );
/*! For reimplemenation: creates new database using connection */
- virtual bool drv_createDatabase( const QString &dbName = QString::null ) = 0;
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() ) = 0;
/*! For reimplemenation: opens existing database using connection
\return true on success, false on failure and cancelled if user has cancelled this action. */
- virtual bool drv_useDatabase( const QString &dbName = QString::null, bool *cancelled = 0,
+ virtual bool drv_useDatabase( const TQString &dbName = TQString(), bool *cancelled = 0,
MessageHandler* msgHandler = 0 ) = 0;
/*! For reimplemenation: closes previously opened database
@@ -935,7 +936,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! For reimplemenation: drops database from the server
using connection. After drop, database shouldn't be accessible
anymore. */
- virtual bool drv_dropDatabase( const QString &dbName = QString::null ) = 0;
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() ) = 0;
/*! \return "CREATE TABLE ..." statement string needed for \a tableSchema
creation in the database.
@@ -943,7 +944,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: The statement string can be specific for this connection's driver database,
and thus not reusable in general.
*/
- QString createTableStatement( const TableSchema& tableSchema ) const;
+ TQString createTableStatement( const TableSchema& tableSchema ) const;
/*! \return "SELECT ..." statement's string needed for executing query
@@ -953,7 +954,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note: The statement string can be specific for this connection's driver database,
and thus not reusable in general.
*/
- QString selectStatement( TableSchema& tableSchema,
+ TQString selectStatement( TableSchema& tableSchema,
const SelectStatementOptions& options = SelectStatementOptions() ) const;
/*!
@@ -963,11 +964,11 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Used internally, e.g. in createDatabase().
\return true on success
*/
- virtual bool drv_createTable( const QString& tableSchemaName );
+ virtual bool drv_createTable( const TQString& tableSchemaName );
// /*! Executes query \a statement and returns resulting rows
// (used mostly for SELECT query). */
-// virtual bool drv_executeQuery( const QString& statement ) = 0;
+// virtual bool drv_executeQuery( const TQString& statement ) = 0;
/*! \return unique identifier of last inserted row.
Typically this is just primary key value.
@@ -975,7 +976,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
just inserted row.
Note for driver developers: contact js (at) iidea.pl
if your engine do not offers this information. */
- virtual Q_ULLONG drv_lastInsertRowID() = 0;
+ virtual TQ_ULLONG drv_lastInsertRowID() = 0;
/*! Note for driver developers: begins new transaction
and returns handle to it. Default implementation just
@@ -1065,7 +1066,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! Creates cursor data and initializes cursor
using \a statement for later data retrieval. */
-// virtual CursorData* drv_createCursor( const QString& statement ) = 0;
+// virtual CursorData* drv_createCursor( const TQString& statement ) = 0;
/*! Closes and deletes cursor data. */
// virtual bool drv_deleteCursor( CursorData *data ) = 0;
@@ -1106,7 +1107,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Allocates single table KexiDB system object named \a tsname
and adds this to list of such objects (for later removal on closeDatabase()).
*/
- TableSchema* newKexiDBSystemTableSchema(const QString& tsname);
+ TableSchema* newKexiDBSystemTableSchema(const TQString& tsname);
//! Identifier escaping function in the associated Driver.
/*! Calls the identifier escaping function in the associated Driver to
@@ -1120,7 +1121,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
For efficiency, kexi__* system tables and columns therein are not escaped
- we assume these are valid identifiers for all drivers.
*/
- inline QString escapeIdentifier(const QString& id,
+ inline TQString escapeIdentifier(const TQString& id,
int escaping = Driver::EscapeDriver|Driver::EscapeAsNecessary ) const {
return m_driver->escapeIdentifier(id, escaping);
}
@@ -1136,7 +1137,7 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
/*! @internal used by querySingleRecord() methods.
Note: "LIMIT 1" is appended to \a sql statement if \a addLimitTo1 is true (the default). */
- tristate querySingleRecordInternal(RowData &data, const QString* sql,
+ tristate querySingleRecordInternal(RowData &data, const TQString* sql,
QuerySchema* query, bool addLimitTo1 = true);
/*! @internal used by Driver::createConnection().
@@ -1172,12 +1173,12 @@ class KEXI_DB_EXPORT Connection : public QObject, public KexiDB::Object
Note for driver developers: implement this if the driver has to support the altering. */
virtual tristate drv_changeFieldProperty(TableSchema &table, Field& field,
- const QString& propertyName, const QVariant& value) {
+ const TQString& propertyName, const TQVariant& value) {
Q_UNUSED(table); Q_UNUSED(field); Q_UNUSED(propertyName); Q_UNUSED(value);
return cancelled; }
//! cursors created for this connection
- QPtrDict<KexiDB::Cursor> m_cursors;
+ TQPtrDict<KexiDB::Cursor> m_cursors;
private:
ConnectionPrivate* d; //!< @internal d-pointer class.
diff --git a/kexi/kexidb/connectiondata.cpp b/kexi/kexidb/connectiondata.cpp
index a74237cce..4f45b0f48 100644
--- a/kexi/kexidb/connectiondata.cpp
+++ b/kexi/kexidb/connectiondata.cpp
@@ -21,8 +21,8 @@
#include <kexidb/drivermanager.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include <klocale.h>
@@ -50,7 +50,7 @@ ConnectionDataBase::ConnectionDataBase()
/*================================================================*/
ConnectionData::ConnectionData()
-: QObject()
+: TQObject()
, ConnectionDataBase()
, formatVersion(0)
, priv(new ConnectionData::Private())
@@ -58,7 +58,7 @@ ConnectionData::ConnectionData()
}
ConnectionData::ConnectionData(const ConnectionData& cd)
-: QObject()
+: TQObject()
, ConnectionDataBase()
, priv(0)
{
@@ -82,33 +82,33 @@ ConnectionData& ConnectionData::operator=(const ConnectionData& cd)
return *this;
}
-void ConnectionData::setFileName( const QString& fn )
+void ConnectionData::setFileName( const TQString& fn )
{
- QFileInfo file(fn);
+ TQFileInfo file(fn);
if (!fn.isEmpty() && m_fileName != file.absFilePath()) {
- m_fileName = QDir::convertSeparators(file.absFilePath());
- m_dbPath = QDir::convertSeparators(file.dirPath(true));
+ m_fileName = TQDir::convertSeparators(file.absFilePath());
+ m_dbPath = TQDir::convertSeparators(file.dirPath(true));
m_dbFileName = file.fileName();
}
}
-QString ConnectionData::serverInfoString(bool addUser) const
+TQString ConnectionData::serverInfoString(bool addUser) const
{
- const QString& i18nFile = i18n("file");
+ const TQString& i18nFile = i18n("file");
if (!m_dbFileName.isEmpty())
return i18nFile+": "+(m_dbPath.isEmpty() ? "" : m_dbPath
- + QDir::separator()) + m_dbFileName;
+ + TQDir::separator()) + m_dbFileName;
DriverManager man;
if (!driverName.isEmpty()) {
Driver::Info info = man.driverInfo(driverName);
if (!info.name.isEmpty() && info.fileBased)
- return QString("<")+i18nFile+">";
+ return TQString("<")+i18nFile+">";
}
- return ( (userName.isEmpty() || !addUser) ? QString("") : (userName+"@"))
- + (hostName.isEmpty() ? QString("localhost") : hostName)
- + (port!=0 ? (QString(":")+QString::number(port)) : QString::null);
+ return ( (userName.isEmpty() || !addUser) ? TQString("") : (userName+"@"))
+ + (hostName.isEmpty() ? TQString("localhost") : hostName)
+ + (port!=0 ? (TQString(":")+TQString::number(port)) : TQString());
}
diff --git a/kexi/kexidb/connectiondata.h b/kexi/kexidb/connectiondata.h
index cd3c15375..fdb69ad58 100644
--- a/kexi/kexidb/connectiondata.h
+++ b/kexi/kexidb/connectiondata.h
@@ -22,9 +22,9 @@
#include <kexidb/kexidb_export.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
namespace KexiDB {
@@ -33,7 +33,7 @@ namespace KexiDB {
ConnectionData class. */
/*! @internal
Used by ConnectionData.
- It is easier to internally operate on non-QObject-derived object,
+ It is easier to internally operate on non-TQObject-derived object,
e.g.: to copy data members in ConnectionData ctor. */
class ConnectionDataBase
{
@@ -46,12 +46,12 @@ class ConnectionDataBase
Captions are optional for identyfying given connection
by name eg. for users.
*/
- QString caption;
+ TQString caption;
/*!
\brief The additional description for the connection
*/
- QString description;
+ TQString description;
/*!
\brief Used for identifying a single piece of data in a set
@@ -73,14 +73,14 @@ class ConnectionDataBase
driver should be used to perform connection, before we get an appropriate
driver object from DriverManager.
*/
- QString driverName;
+ TQString driverName;
/*!
\brief Host name used for the remote connection.
Can be empty if the connection is not remote. If it is empty "localhost" is used.
*/
- QString hostName;
+ TQString hostName;
/*!
\brief Port used for the remote connection.
@@ -107,15 +107,15 @@ class ConnectionDataBase
For local connections only. If empty, it's driver will try to locate existing local socket
file. Empty by default.
*/
- QString localSocketFileName;
+ TQString localSocketFileName;
/*!
\brief Password used for the connection.
Can be empty string or null. If it is empty (equal to ""), empty password is passed to the driver.
- If it is null (QString::null), no password is passed to the driver.
+ If it is null (TQString()), no password is passed to the driver.
In this case, applications using KexiDB should ask for the password. */
- QString password;
+ TQString password;
/*!
\brief True if password should be saved to a file for the connection.
@@ -130,7 +130,7 @@ class ConnectionDataBase
\brief Username used for the connection.
Can be empty. */
- QString userName;
+ TQString userName;
protected:
/*!
@@ -139,31 +139,31 @@ class ConnectionDataBase
For file-based database engines like SQLite, \a fileName is used
instead hostName and port
*/
- QString m_fileName;
+ TQString m_fileName;
/*!
\brief Absolute path to the database file
Will be empty if database is not file-based
*/
- QString m_dbPath;
+ TQString m_dbPath;
/*!
\brief Filename of the database file
Will be empty if database is not file-based
*/
- QString m_dbFileName;
+ TQString m_dbFileName;
};
//! Database specific connection data, e.g. host, port.
/*! Connection data, once configured, can be later stored for reuse.
*/
-class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
+class KEXI_DB_EXPORT ConnectionData : public TQObject, public ConnectionDataBase
{
public:
- typedef QPtrList<ConnectionData> List;
- typedef QPtrListIterator<ConnectionData> ListIterator;
+ typedef TQPtrList<ConnectionData> List;
+ typedef TQPtrListIterator<ConnectionData> ListIterator;
ConnectionData();
@@ -180,7 +180,7 @@ class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
function to set the file name of the database to use.
\a fn can be either absolute or relative path to the file.
*/
- void setFileName( const QString& fn );
+ void setFileName( const TQString& fn );
/*!
\brief Get the filename used by the connection
@@ -189,21 +189,21 @@ class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
instead hostName and port.
@return An absolute path to the database file being used
*/
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
/*!
\brief The directory the database file is in
\return file path (for file-based engines) but without a file name
*/
- QString dbPath() const { return m_dbPath; }
+ TQString dbPath() const { return m_dbPath; }
/*!
\brief The file name (without path) of the database file
\return The file name (for file-based engines) but without a full path
*/
- QString dbFileName() const { return m_dbFileName; }
+ TQString dbFileName() const { return m_dbFileName; }
/*!
\brief A user-friendly string for the server
@@ -218,7 +218,7 @@ class KEXI_DB_EXPORT ConnectionData : public QObject, public ConnectionDataBase
User's name is added if \a addUser is true (the default).
*/
- QString serverInfoString(bool addUser = true) const;
+ TQString serverInfoString(bool addUser = true) const;
/*! @internal
Format version used when saving the data to a shortcut file.
diff --git a/kexi/kexidb/cursor.cpp b/kexi/kexidb/cursor.cpp
index 4b9cdea31..dc95e30f8 100644
--- a/kexi/kexidb/cursor.cpp
+++ b/kexi/kexidb/cursor.cpp
@@ -37,27 +37,27 @@ using namespace KexiDB;
#endif
-Cursor::Cursor(Connection* conn, const QString& statement, uint options)
- : QObject()
+Cursor::Cursor(Connection* conn, const TQString& statement, uint options)
+ : TQObject()
, m_conn(conn)
, m_query(0)
, m_rawStatement(statement)
, m_options(options)
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addKexiDBDebug(QString("Create cursor: ")+statement);
+ KexiUtils::addKexiDBDebug(TQString("Create cursor: ")+statement);
#endif
init();
}
Cursor::Cursor(Connection* conn, QuerySchema& query, uint options )
- : QObject()
+ : TQObject()
, m_conn(conn)
, m_query(&query)
, m_options(options)
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addKexiDBDebug(QString("Create cursor for query \"%1\": ").arg(query.name())+query.debugString());
+ KexiUtils::addKexiDBDebug(TQString("Create cursor for query \"%1\": ").tqarg(query.name())+query.debugString());
#endif
init();
}
@@ -108,9 +108,9 @@ Cursor::~Cursor()
{
#ifdef KEXI_DEBUG_GUI
if (m_query)
- KexiUtils::addKexiDBDebug(QString("~ Delete cursor for query"));
+ KexiUtils::addKexiDBDebug(TQString("~ Delete cursor for query"));
else
- KexiUtils::addKexiDBDebug(QString("~ Delete cursor: ")+m_rawStatement);
+ KexiUtils::addKexiDBDebug(TQString("~ Delete cursor: ")+m_rawStatement);
#endif
/* if (!m_query)
KexiDBDbg << "Cursor::~Cursor() '" << m_rawStatement.latin1() << "'" << endl;
@@ -166,7 +166,7 @@ bool Cursor::open()
//luci: WHAT_EXACTLY_SHOULD_THAT_BE?
// if (!m_readAhead) // jowenn: to ensure before first state, without cluttering implementation code
- if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
+ if (m_conn->driver()->beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY) {
// KexiDBDbg << "READ AHEAD:" << endl;
m_readAhead = getNextRecord(); //true if any record in this query
// KexiDBDbg << "READ AHEAD = " << m_readAhead << endl;
@@ -346,7 +346,7 @@ bool Cursor::bof() const
return m_at==0;
}
-Q_LLONG Cursor::at() const
+TQ_LLONG Cursor::at() const
{
if (m_readAhead)
return 0;
@@ -494,9 +494,9 @@ bool Cursor::deleteAllRows()
return m_conn->deleteAllRows(*m_query);
}
-QString Cursor::debugString() const
+TQString Cursor::debugString() const
{
- QString dbg = "CURSOR( ";
+ TQString dbg = "CURSOR( ";
if (!m_query) {
dbg += "RAW STATEMENT: '";
dbg += m_rawStatement;
@@ -516,7 +516,7 @@ QString Cursor::debugString() const
else
dbg += " NOT_BUFFERED";
dbg += " AT=";
- dbg += QString::number((unsigned long)at());
+ dbg += TQString::number((unsigned long)at());
dbg += " )";
return dbg;
}
@@ -526,7 +526,7 @@ void Cursor::debug() const
KexiDBDbg << debugString() << endl;
}
-void Cursor::setOrderByColumnList(const QStringList& columnNames)
+void Cursor::setOrderByColumnList(const TQStringList& columnNames)
{
Q_UNUSED(columnNames);
//! @todo implement this:
@@ -537,9 +537,9 @@ void Cursor::setOrderByColumnList(const QStringList& columnNames)
//TODO
}
-/*! Convenience method, similar to setOrderBy(const QStringList&). */
-void Cursor::setOrderByColumnList(const QString& column1, const QString& column2,
- const QString& column3, const QString& column4, const QString& column5)
+/*! Convenience method, similar to setOrderBy(const TQStringList&). */
+void Cursor::setOrderByColumnList(const TQString& column1, const TQString& column2,
+ const TQString& column3, const TQString& column4, const TQString& column5)
{
Q_UNUSED(column1);
Q_UNUSED(column2);
@@ -555,15 +555,15 @@ QueryColumnInfo::Vector Cursor::orderByColumnList() const
return m_orderByColumnList ? *m_orderByColumnList: QueryColumnInfo::Vector();
}
-QValueList<QVariant> Cursor::queryParameters() const
+TQValueList<TQVariant> Cursor::queryParameters() const
{
- return m_queryParameters ? *m_queryParameters : QValueList<QVariant>();
+ return m_queryParameters ? *m_queryParameters : TQValueList<TQVariant>();
}
-void Cursor::setQueryParameters(const QValueList<QVariant>& params)
+void Cursor::setQueryParameters(const TQValueList<TQVariant>& params)
{
if (!m_queryParameters)
- m_queryParameters = new QValueList<QVariant>(params);
+ m_queryParameters = new TQValueList<TQVariant>(params);
else
*m_queryParameters = params;
}
diff --git a/kexi/kexidb/cursor.h b/kexi/kexidb/cursor.h
index 6ea64dd9f..b19b0694b 100644
--- a/kexi/kexidb/cursor.h
+++ b/kexi/kexidb/cursor.h
@@ -20,10 +20,10 @@
#ifndef KEXIDB_CURSOR_H
#define KEXIDB_CURSOR_H
-#include <qstring.h>
-#include <qvariant.h>
-#include <qptrvector.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqptrvector.h>
+#include <tqvaluevector.h>
#include <kexidb/connection.h>
#include <kexidb/object.h>
@@ -63,9 +63,10 @@ class RowEditBuffer;
instead.
- QuerySchema object is not owned by Cursor object that uses it.
*/
-class KEXI_DB_EXPORT Cursor: public QObject, public Object
+class KEXI_DB_EXPORT Cursor: public TQObject, public Object
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Cursor options that describes its behaviour
@@ -92,7 +93,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
// Omit \a statement if cursor is already initialized with statement
// at creation time. If \a statement is not empty, existing statement
// (if any) is overwritten. */
-// bool open( const QString& statement = QString::null );
+// bool open( const TQString& statement = TQString() );
/*! Closes previously opened cursor.
If the cursor is closed, nothing happens. */
@@ -103,14 +104,14 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
inline QuerySchema *query() const { return m_query; }
//! \return query parameters assigned to this cursor
- QValueList<QVariant> queryParameters() const;
+ TQValueList<TQVariant> queryParameters() const;
//! Sets query parameters \a params for this cursor.
- void setQueryParameters(const QValueList<QVariant>& params);
+ void setQueryParameters(const TQValueList<TQVariant>& params);
/*! \return raw query statement used to define this cursor
or null string if raw statement instead (but QuerySchema is defined instead). */
- inline QString rawStatement() const { return m_rawStatement; }
+ inline TQString rawStatement() const { return m_rawStatement; }
/*! \return logically or'd cursor's options,
selected from Cursor::Options enum. */
@@ -157,7 +158,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
Value -1 means that cursor does not point to any valid record
(this happens eg. after open(), close(),
and after moving after last record or before first one. */
- Q_LLONG at() const;
+ TQ_LLONG at() const;
/*! \return number of fields available for this cursor.
This never includes ROWID column or other internal coluns (e.g. lookup). */
@@ -174,10 +175,10 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
/*! \return a value stored in column number \a i (counting from 0).
Is has unspecified behaviour if the cursor is not at valid record.
Note for driver developers:
- If \a i is >= than m_fieldCount, null QVariant value should be returned.
+ If \a i is >= than m_fieldCount, null TQVariant value should be returned.
To return a value typically you can use a pointer to internal structure
that contain current row data (buffered or unbuffered). */
- virtual QVariant value(uint i) = 0;
+ virtual TQVariant value(uint i) = 0;
/*! [PROTOTYPE] \return current record data or NULL if there is no current records. */
virtual const char ** rowData() const = 0;
@@ -196,15 +197,15 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
Use this method before calling open(). You can also call reopen() after calling this method
to see effects of applying records order. */
- void setOrderByColumnList(const QStringList& columnNames);
+ void setOrderByColumnList(const TQStringList& columnNames);
- /*! Convenience method, similar to setOrderByColumnList(const QStringList&). */
- void setOrderByColumnList(const QString& column1, const QString& column2 = QString::null,
- const QString& column3 = QString::null, const QString& column4 = QString::null,
- const QString& column5 = QString::null);
+ /*! Convenience method, similar to setOrderByColumnList(const TQStringList&). */
+ void setOrderByColumnList(const TQString& column1, const TQString& column2 = TQString(),
+ const TQString& column3 = TQString(), const TQString& column4 = TQString(),
+ const TQString& column5 = TQString());
/*! \return a list of fields contained in ORDER BY section of the query.
- @see setOrderBy(const QStringList&) */
+ @see setOrderBy(const TQStringList&) */
QueryColumnInfo::Vector orderByColumnList() const;
/*! Puts current record's data into \a data (makes a deep copy).
@@ -236,17 +237,17 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
to refer a documentation. SQLite is one of such engines.
Note for driver developers: Leave the default implementation (null
string is returned ) if your engine has no such capability. */
- virtual QString serverResultName() { return QString::null; }
+ virtual TQString serverResultName() { return TQString(); }
/*! \return (not i18n'd) description text (message) of last operation's error/result.
In most cases engines do return such a messages, any user can then use this
to refer a documentation.
Note for driver developers: Leave the default implementation (null
string is returned ) if your engine has no such capability. */
- virtual QString serverErrorMsg() { return QString::null; }
+ virtual TQString serverErrorMsg() { return TQString(); }
/*! \return Debug information. */
- QString debugString() const;
+ TQString debugString() const;
//! Outputs debug information.
void debug() const;
@@ -256,7 +257,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
typedef enum FetchResult { FetchError=0, FetchOK=1, FetchEnd=2 };
/*! Cursor will operate on \a conn, raw \a statement will be used to execute query. */
- Cursor(Connection* conn, const QString& statement, uint options = NoOptions );
+ Cursor(Connection* conn, const TQString& statement, uint options = NoOptions );
/*! Cursor will operate on \a conn, \a query schema will be used to execute query. */
Cursor(Connection* conn, QuerySchema& query, uint options = NoOptions );
@@ -299,7 +300,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
virtual void drv_bufferMovePointerPrev() = 0;
/*! Moves pointer (that points to the buffer) to a new place: \a at.
*/
- virtual void drv_bufferMovePointerTo(Q_LLONG at) = 0;
+ virtual void drv_bufferMovePointerTo(TQ_LLONG at) = 0;
/*DISABLED: ! This is called only once in open(), after successful drv_open().
Reimplement this if you need (or not) to do get the first record after drv_open(),
@@ -318,10 +319,10 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
the same that is returend by serverResult(). */
virtual void drv_clearServerResult() = 0;
- QGuardedPtr<Connection> m_conn;
+ TQGuardedPtr<Connection> m_conn;
QuerySchema *m_query;
// CursorData *m_data;
- QString m_rawStatement;
+ TQString m_rawStatement;
bool m_opened : 1;
//js (m_at==0 is enough) bool m_beforeFirst : 1;
bool m_atLast : 1;
@@ -329,7 +330,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
// bool m_atLast;
bool m_validRecord : 1; //!< true if valid record is currently retrieved @ current position
bool m_containsROWIDInfo : 1;
- Q_LLONG m_at;
+ TQ_LLONG m_at;
uint m_fieldCount; //!< cached field count information
uint m_logicalFieldCount; //!< logical field count, i.e. without intrernal values like ROWID or lookup
uint m_options; //!< cursor options that describes its behaviour
@@ -346,7 +347,7 @@ class KEXI_DB_EXPORT Cursor: public QObject, public Object
//! Used by setOrderByColumnList()
QueryColumnInfo::Vector* m_orderByColumnList;
- QValueList<QVariant>* m_queryParameters;
+ TQValueList<TQVariant>* m_queryParameters;
private:
bool m_readAhead : 1;
diff --git a/kexi/kexidb/cursor_p.h b/kexi/kexidb/cursor_p.h
index c03eba66a..1e4bc33e4 100644
--- a/kexi/kexidb/cursor_p.h
+++ b/kexi/kexidb/cursor_p.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_CURSOR_P_H
#define KEXIDB_CURSOR_P_H
-#include <qstring.h>
+#include <tqstring.h>
#include "connection.h"
diff --git a/kexi/kexidb/dbobjectnamevalidator.cpp b/kexi/kexidb/dbobjectnamevalidator.cpp
index 77ed0e557..b7a2f633e 100644
--- a/kexi/kexidb/dbobjectnamevalidator.cpp
+++ b/kexi/kexidb/dbobjectnamevalidator.cpp
@@ -25,8 +25,8 @@ using namespace KexiDB;
using namespace KexiUtils;
ObjectNameValidator::ObjectNameValidator(
- KexiDB::Driver *drv, QObject * parent, const char * name)
-: Validator(parent,name)
+ KexiDB::Driver *drv, TQObject * tqparent, const char * name)
+: Validator(tqparent,name)
{
m_drv = drv;
}
@@ -36,8 +36,8 @@ ObjectNameValidator::~ObjectNameValidator()
}
Validator::Result ObjectNameValidator::internalCheck(
- const QString & /*valueName*/, const QVariant& v,
- QString &message, QString &details)
+ const TQString & /*valueName*/, const TQVariant& v,
+ TQString &message, TQString &details)
{
if (m_drv.isNull() ? !KexiDB::Driver::isKexiDBSystemObjectName(v.toString())
@@ -45,7 +45,7 @@ Validator::Result ObjectNameValidator::internalCheck(
return Validator::Ok;
message = i18n("You cannot use name \"%1\" for your object.\n"
"It is reserved for internal Kexi objects. Please choose another name.")
- .arg(v.toString());
+ .tqarg(v.toString());
details = i18n("Names of internal Kexi objects are starting with \"kexi__\".");
return Validator::Error;
}
diff --git a/kexi/kexidb/dbobjectnamevalidator.h b/kexi/kexidb/dbobjectnamevalidator.h
index 9b8ac617f..2b9a0645a 100644
--- a/kexi/kexidb/dbobjectnamevalidator.h
+++ b/kexi/kexidb/dbobjectnamevalidator.h
@@ -21,8 +21,8 @@
#define KEXIDBOBJECTNAMEVALIDATOR_H
#include <kexiutils/validator.h>
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
namespace KexiDB {
@@ -36,13 +36,13 @@ namespace KexiDB {
/*! \a drv is a KexiDB driver on which isSystemObjectName() will be
called inside check(). If \a drv is 0, KexiDB::Driver::isKexiDBSystemObjectName()
static function is called instead. */
- ObjectNameValidator(KexiDB::Driver *drv, QObject * parent = 0, const char * name = 0);
+ ObjectNameValidator(KexiDB::Driver *drv, TQObject * tqparent = 0, const char * name = 0);
virtual ~ObjectNameValidator();
protected:
- virtual KexiUtils::Validator::Result internalCheck(const QString &valueName, const QVariant& v,
- QString &message, QString &details);
- QGuardedPtr<KexiDB::Driver> m_drv;
+ virtual KexiUtils::Validator::Result internalCheck(const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
+ TQGuardedPtr<KexiDB::Driver> m_drv;
};
}
diff --git a/kexi/kexidb/dbproperties.cpp b/kexi/kexidb/dbproperties.cpp
index c5780542d..44b69192e 100644
--- a/kexi/kexidb/dbproperties.cpp
+++ b/kexi/kexidb/dbproperties.cpp
@@ -32,117 +32,117 @@ DatabaseProperties::~DatabaseProperties()
{
}
-bool DatabaseProperties::setValue( const QString& _name, const QVariant& value )
+bool DatabaseProperties::setValue( const TQString& _name, const TQVariant& value )
{
- QString name(_name.stripWhiteSpace());
+ TQString name(_name.stripWhiteSpace());
bool ok;
//we need to know whether update or insert
bool exists = m_conn->resultExists(
- QString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
- .arg(m_conn->driver()->escapeString(name)), ok);
+ TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
+ .tqarg(m_conn->driver()->escapeString(name)), ok);
if (!ok) {
- setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
return false;
}
if (exists) {
if (!m_conn->executeSQL(
- QString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
- .arg(m_conn->driver()->escapeString(value.toString()))
- .arg(m_conn->driver()->escapeString(name))))
+ TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
+ .tqarg(m_conn->driver()->escapeString(value.toString()))
+ .tqarg(m_conn->driver()->escapeString(name))))
{
- setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
return false;
}
return true;
}
if (!m_conn->executeSQL(
- QString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
- .arg(m_conn->driver()->escapeString(name))
- .arg(m_conn->driver()->escapeString(value.toString()))))
+ TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
+ .tqarg(m_conn->driver()->escapeString(name))
+ .tqarg(m_conn->driver()->escapeString(value.toString()))))
{
- setError(m_conn, i18n("Could not set value of database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set value of database property \"%1\".").tqarg(name));
return false;
}
return true;
}
-bool DatabaseProperties::setCaption( const QString& _name, const QString& caption )
+bool DatabaseProperties::setCaption( const TQString& _name, const TQString& caption )
{
- QString name(_name.stripWhiteSpace());
+ TQString name(_name.stripWhiteSpace());
//captions have ' ' prefix
name.prepend(" ");
bool ok;
//we need to know whether update or insert
bool exists = m_conn->resultExists(
- QString::fromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
- .arg(m_conn->driver()->escapeString(name)), ok);
+ TQString::tqfromLatin1("SELECT 1 FROM kexi__db WHERE db_property=%1")
+ .tqarg(m_conn->driver()->escapeString(name)), ok);
if (!ok) {
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
return false;
}
if (exists) {
if (!m_conn->executeSQL(
- QString::fromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
- .arg(m_conn->driver()->escapeString(caption))
- .arg(m_conn->driver()->escapeString(name))))
+ TQString::tqfromLatin1("UPDATE kexi__db SET db_value=%1 WHERE db_property=%2")
+ .tqarg(m_conn->driver()->escapeString(caption))
+ .tqarg(m_conn->driver()->escapeString(name))))
{
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
return false;
}
return true;
}
if (!m_conn->executeSQL(
- QString::fromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
- .arg(m_conn->driver()->escapeString(name))
- .arg(m_conn->driver()->escapeString(caption))))
+ TQString::tqfromLatin1("INSERT INTO kexi__db (db_property, db_value) VALUES (%1, %2)")
+ .tqarg(m_conn->driver()->escapeString(name))
+ .tqarg(m_conn->driver()->escapeString(caption))))
{
- setError(m_conn, i18n("Could not set caption for database property \"%1\".").arg(name));
+ setError(m_conn, i18n("Could not set caption for database property \"%1\".").tqarg(name));
return false;
}
return true;
}
-QVariant DatabaseProperties::value( const QString& _name )
+TQVariant DatabaseProperties::value( const TQString& _name )
{
- QString result;
- QString name(_name.stripWhiteSpace());
+ TQString result;
+ TQString name(_name.stripWhiteSpace());
if (true!=m_conn->querySingleString(
- QString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ m_conn->driver()->escapeString(name), result)) {
- m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").arg(name));
- return QVariant();
+ m_conn->setError(ERR_NO_DB_PROPERTY, i18n("Could not read database property \"%1\".").tqarg(name));
+ return TQVariant();
}
return result;
}
-QString DatabaseProperties::caption( const QString& _name )
+TQString DatabaseProperties::caption( const TQString& _name )
{
- QString result;
- QString name(_name.stripWhiteSpace());
+ TQString result;
+ TQString name(_name.stripWhiteSpace());
//captions have ' ' prefix
name.prepend(" ");
if (true!=m_conn->querySingleString(
- QString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property=")
+ m_conn->driver()->escapeString(name), result)) {
- setError(m_conn, i18n("Could not read database property \"%1\".").arg(name));
- return QString::null;
+ setError(m_conn, i18n("Could not read database property \"%1\".").tqarg(name));
+ return TQString();
}
return result;
}
-QStringList DatabaseProperties::names()
+TQStringList DatabaseProperties::names()
{
- QStringList result;
+ TQStringList result;
if (true!=m_conn->queryStringList(
- QString::fromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ")
- + m_conn->driver()->escapeString(QString::fromLatin1(" %%")), result, 0 /*0-th*/)) {
+ TQString::tqfromLatin1("SELECT db_value FROM kexi__db WHERE db_property NOT LIKE ")
+ + m_conn->driver()->escapeString(TQString::tqfromLatin1(" %%")), result, 0 /*0-th*/)) {
// ^^ exclude captions
setError(m_conn, i18n("Could not read database properties."));
- return QStringList();
+ return TQStringList();
}
return result;
}
diff --git a/kexi/kexidb/dbproperties.h b/kexi/kexidb/dbproperties.h
index 91aed7e27..d4b193fa0 100644
--- a/kexi/kexidb/dbproperties.h
+++ b/kexi/kexidb/dbproperties.h
@@ -38,28 +38,28 @@ class KEXI_DB_EXPORT DatabaseProperties : public KexiDB::Object
If there's no such property defined, it will be added. Existing value will be overwritten.
Note that to execute this method, database must be opened in read-write mode.
\return true on successful data. Connection */
- bool setValue( const QString& name, const QVariant& value );
+ bool setValue( const TQString& name, const TQVariant& value );
/*! Sets \a caption for for property \a name.
Usually it shouldn't be translated: trnaslation can be performed before displaying. */
- bool setCaption( const QString& name, const QString& caption );
+ bool setCaption( const TQString& name, const TQString& caption );
//! \return property value for \a propeName available for this driver.
- //! If there's no such property defined for driver, Null QVariant value is returned.
- QVariant value( const QString& name );
+ //! If there's no such property defined for driver, Null TQVariant value is returned.
+ TQVariant value( const TQString& name );
//! \return translated property caption for \a name.
//! If there's no such property defined for driver, empty string value is returned.
- QString caption( const QString& name );
+ TQString caption( const TQString& name );
//! \return a list of available property names.
- QStringList names();
+ TQStringList names();
protected:
DatabaseProperties(Connection *conn);
~DatabaseProperties();
- QGuardedPtr<Connection> m_conn;
+ TQGuardedPtr<Connection> m_conn;
friend class Connection;
};
}
diff --git a/kexi/kexidb/driver.cpp b/kexi/kexidb/driver.cpp
index 6e82c0809..d192fe87c 100644
--- a/kexi/kexidb/driver.cpp
+++ b/kexi/kexidb/driver.cpp
@@ -27,7 +27,7 @@
#include "connectiondata.h"
#include "admin.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,7 +38,7 @@ using namespace KexiDB;
/*! used when we do not have Driver instance yet,
or when we cannot get one */
-QValueVector<QString> dflt_typeNames;
+TQValueVector<TQString> dflt_typeNames;
//---------------------------------------------
@@ -49,12 +49,12 @@ DriverBehaviour::DriverBehaviour()
, AUTO_INCREMENT_FIELD_OPTION("AUTO_INCREMENT")
, AUTO_INCREMENT_PK_FIELD_OPTION("AUTO_INCREMENT PRIMARY KEY")
, SPECIAL_AUTO_INCREMENT_DEF(false)
- , AUTO_INCREMENT_REQUIRES_PK(false)
+ , AUTO_INCREMENT_RETQUIRES_PK(false)
, ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE(false)
- , QUOTATION_MARKS_FOR_IDENTIFIER('"')
- , USING_DATABASE_REQUIRED_TO_CONNECT(true)
- , _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
- , SELECT_1_SUBQUERY_SUPPORTED(false)
+ , TQUOTATION_MARKS_FOR_IDENTIFIER('"')
+ , USING_DATABASE_RETQUIRED_TO_CONNECT(true)
+ , _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY(false)
+ , SELECT_1_SUBTQUERY_SUPPORTED(false)
, SQL_KEYWORDS(0)
{
}
@@ -69,8 +69,8 @@ Driver::Info::Info()
//---------------------------------------------
-Driver::Driver( QObject *parent, const char *name, const QStringList & )
- : QObject( parent, name )
+Driver::Driver( TQObject *tqparent, const char *name, const TQStringList & )
+ : TQObject( tqparent, name )
, Object()
, beh( new DriverBehaviour() )
, d( new DriverPrivate() )
@@ -88,7 +88,7 @@ Driver::~Driver()
{
DriverManagerInternal::self()->aboutDelete( this );
// KexiDBDbg << "Driver::~Driver()" << endl;
- QPtrDictIterator<Connection> it( d->connections );
+ TQPtrDictIterator<Connection> it( d->connections );
Connection *conn;
while ( (conn = it.toFirst()) ) {
delete conn;
@@ -106,38 +106,38 @@ bool Driver::isValid()
{
setError(ERR_INCOMPAT_DRIVER_VERSION,
i18n("Incompatible database driver's \"%1\" version: found version %2, expected version %3.")
- .arg(name())
- .arg(QString("%1.%2").arg(version().major).arg(version().minor))
- .arg(QString("%1.%2").arg(KexiDB::version().major).arg(KexiDB::version().minor)));
+ .tqarg(name())
+ .tqarg(TQString("%1.%2").tqarg(version().major).tqarg(version().minor))
+ .tqarg(TQString("%1.%2").tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor)));
return false;
}
- QString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").arg(name());
- QString not_init = i18n("Value of \"%1\" is not initialized for the driver.");
+ TQString inv_impl = i18n("Invalid database driver's \"%1\" implementation:\n").tqarg(name());
+ TQString not_init = i18n("Value of \"%1\" is not initialized for the driver.");
if (beh->ROW_ID_FIELD_NAME.isEmpty()) {
- setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.arg("DriverBehaviour::ROW_ID_FIELD_NAME"));
+ setError(ERR_INVALID_DRIVER_IMPL, inv_impl + not_init.tqarg("DriverBehaviour::ROW_ID_FIELD_NAME"));
return false;
}
return true;
}
-const QPtrList<Connection> Driver::connectionsList() const
+const TQPtrList<Connection> Driver::connectionsList() const
{
- QPtrList<Connection> clist;
- QPtrDictIterator<Connection> it( d->connections );
+ TQPtrList<Connection> clist;
+ TQPtrDictIterator<Connection> it( d->connections );
for( ; it.current(); ++it )
clist.append( &(*it) );
return clist;
}
-QString Driver::fileDBDriverMimeType() const
+TQString Driver::fileDBDriverMimeType() const
{ return d->fileDBDriverMimeType; }
-QString Driver::defaultFileBasedDriverMimeType()
-{ return QString::fromLatin1("application/x-kexiproject-sqlite3"); }
+TQString Driver::defaultFileBasedDriverMimeType()
+{ return TQString::tqfromLatin1("application/x-kexiproject-sqlite3"); }
-QString Driver::defaultFileBasedDriverName()
+TQString Driver::defaultFileBasedDriverName()
{
DriverManager dm;
return dm.lookupByMime(Driver::defaultFileBasedDriverMimeType()).lower();
@@ -167,7 +167,7 @@ AdminTools* Driver::drv_createAdminTools() const
return new AdminTools(); //empty impl.
}
-QString Driver::sqlTypeName(int id_t, int /*p*/) const
+TQString Driver::sqlTypeName(int id_t, int /*p*/) const
{
if (id_t > Field::InvalidType && id_t <= Field::LastType)
return d->typeNames[(id_t>0 && id_t<=Field::LastType) ? id_t : Field::InvalidType /*sanity*/];
@@ -203,7 +203,7 @@ Connection* Driver::removeConnection( Connection *conn )
return d->connections.take( conn );
}
-QString Driver::defaultSQLTypeName(int id_t)
+TQString Driver::defaultSQLTypeName(int id_t)
{
if (id_t>=Field::Null)
return "Null";
@@ -227,35 +227,35 @@ QString Driver::defaultSQLTypeName(int id_t)
return dflt_typeNames[id_t];
}
-bool Driver::isSystemObjectName( const QString& n ) const
+bool Driver::isSystemObjectName( const TQString& n ) const
{
return Driver::isKexiDBSystemObjectName(n);
}
-bool Driver::isKexiDBSystemObjectName( const QString& n )
+bool Driver::isKexiDBSystemObjectName( const TQString& n )
{
if (!n.lower().startsWith("kexi__"))
return false;
- const QStringList list( Connection::kexiDBSystemTableNames() );
- return list.find(n.lower())!=list.constEnd();
+ const TQStringList list( Connection::kexiDBSystemTableNames() );
+ return list.tqfind(n.lower())!=list.constEnd();
}
-bool Driver::isSystemFieldName( const QString& n ) const
+bool Driver::isSystemFieldName( const TQString& n ) const
{
if (!beh->ROW_ID_FIELD_NAME.isEmpty() && n.lower()==beh->ROW_ID_FIELD_NAME.lower())
return true;
return drv_isSystemFieldName(n);
}
-QString Driver::valueToSQL( uint ftype, const QVariant& v ) const
+TQString Driver::valueToSQL( uint ftype, const TQVariant& v ) const
{
if (v.isNull())
return "NULL";
switch (ftype) {
case Field::Text:
case Field::LongText: {
- QString s = v.toString();
- return escapeString(s); //QString("'")+s.replace( '"', "\\\"" ) + "'";
+ TQString s = v.toString();
+ return escapeString(s); //TQString("'")+s.tqreplace( '"', "\\\"" ) + "'";
}
case Field::Byte:
case Field::ShortInteger:
@@ -264,26 +264,26 @@ QString Driver::valueToSQL( uint ftype, const QVariant& v ) const
return v.toString();
case Field::Float:
case Field::Double: {
- if (v.type()==QVariant::String) {
+ if (v.type()==TQVariant::String) {
//workaround for values stored as string that should be casted to floating-point
- QString s(v.toString());
- return s.replace(',', ".");
+ TQString s(v.toString());
+ return s.tqreplace(',', ".");
}
return v.toString();
}
//TODO: here special encoding method needed
case Field::Boolean:
- return QString::number(v.toInt()?1:0); //0 or 1
+ return TQString::number(v.toInt()?1:0); //0 or 1
case Field::Time:
- return QString("\'")+v.toTime().toString(Qt::ISODate)+"\'";
+ return TQString("\'")+v.toTime().toString(Qt::ISODate)+"\'";
case Field::Date:
- return QString("\'")+v.toDate().toString(Qt::ISODate)+"\'";
+ return TQString("\'")+v.toDate().toString(Qt::ISODate)+"\'";
case Field::DateTime:
return dateTimeToSQL( v.toDateTime() );
case Field::BLOB: {
if (v.toByteArray().isEmpty())
- return QString::fromLatin1("NULL");
- if (v.type()==QVariant::String)
+ return TQString::tqfromLatin1("NULL");
+ if (v.type()==TQVariant::String)
return escapeBLOB(v.toString().utf8());
return escapeBLOB(v.toByteArray());
}
@@ -291,35 +291,35 @@ QString Driver::valueToSQL( uint ftype, const QVariant& v ) const
return "!INVALIDTYPE!";
default:
KexiDBDbg << "Driver::valueToSQL(): UNKNOWN!" << endl;
- return QString::null;
+ return TQString();
}
- return QString::null;
+ return TQString();
}
-QVariant Driver::propertyValue( const QCString& propName ) const
+TQVariant Driver::propertyValue( const TQCString& propName ) const
{
return d->properties[propName.lower()];
}
-QString Driver::propertyCaption( const QCString& propName ) const
+TQString Driver::propertyCaption( const TQCString& propName ) const
{
return d->propertyCaptions[propName.lower()];
}
-QValueList<QCString> Driver::propertyNames() const
+TQValueList<TQCString> Driver::propertyNames() const
{
- QValueList<QCString> names = d->properties.keys();
+ TQValueList<TQCString> names = d->properties.keys();
qHeapSort(names);
return names;
}
-QString Driver::escapeIdentifier(const QString& str, int options) const
+TQString Driver::escapeIdentifier(const TQString& str, int options) const
{
- QCString cstr = str.latin1();
- return QString(escapeIdentifier(cstr, options));
+ TQCString cstr = str.latin1();
+ return TQString(escapeIdentifier(cstr, options));
}
-QCString Driver::escapeIdentifier(const QCString& str, int options) const
+TQCString Driver::escapeIdentifier(const TQCString& str, int options) const
{
bool needOuterQuotes = false;
@@ -333,24 +333,24 @@ QCString Driver::escapeIdentifier(const QCString& str, int options) const
needOuterQuotes = true;
// ... or if it's a keyword in Kexi's SQL dialect,
- else if(d->kexiSQLDict->find(str))
+ else if(d->kexiSQLDict->tqfind(str))
needOuterQuotes = true;
// ... or if it's a keyword in the backends SQL dialect,
// (have already checked !d->driverSQLDict)
- else if((options & EscapeDriver) && d->driverSQLDict->find(str))
+ else if((options & EscapeDriver) && d->driverSQLDict->tqfind(str))
needOuterQuotes = true;
// ... or if the identifier has a space in it...
- else if(str.find(' ') != -1)
+ else if(str.tqfind(' ') != -1)
needOuterQuotes = true;
if(needOuterQuotes && (options & EscapeKexi)) {
const char quote = '"';
- return quote + QCString(str).replace( quote, "\"\"" ) + quote;
+ return quote + TQCString(str).tqreplace( quote, "\"\"" ) + quote;
}
else if (needOuterQuotes) {
- const char quote = beh->QUOTATION_MARKS_FOR_IDENTIFIER.latin1();
+ const char quote = beh->TQUOTATION_MARKS_FOR_IDENTIFIER.latin1();
return quote + drv_escapeIdentifier(str) + quote;
} else {
return drv_escapeIdentifier(str);
diff --git a/kexi/kexidb/driver.h b/kexi/kexidb/driver.h
index ef946e65b..c889d475c 100644
--- a/kexi/kexidb/driver.h
+++ b/kexi/kexidb/driver.h
@@ -20,9 +20,9 @@
#ifndef KEXIDB_DRIVER_H
#define KEXIDB_DRIVER_H
-#include <qobject.h>
-#include <qdatetime.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqdatetime.h>
+#include <tqdict.h>
#include <kexidb/global.h>
#include <kexidb/object.h>
@@ -43,7 +43,7 @@ class DriverPrivate;
//! Generic database abstraction.
/*! This class is a prototype of the database driver for implementations.
Driver allows new connections to be created, and groups
- these as a parent.
+ these as a tqparent.
Before destruction, all connections are destructed.
Notes:
@@ -63,16 +63,17 @@ class DriverPrivate;
\sa SQLiteDriver MySqlDriver, pqxxSqlDriver
*/
-class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
+class KEXI_DB_EXPORT Driver : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Helpful for retrieving info about driver from using
KexiDB::DriverManager::driversInfo() without loading driver libraries. */
class Info {
public:
Info();
- QString name, caption, comment, fileDBMimeType;
+ TQString name, caption, comment, fileDBMimeType;
//! true is the driver is for file-based database backend
bool fileBased : 1;
/*! true is the driver is for a backend that allows importing.
@@ -80,7 +81,7 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
Used for migration. */
bool allowImportingTo : 1;
};
- typedef QMap<QString,Info> InfoMap;
+ typedef TQMap<TQString,Info> InfoMap;
/*! Features supported by driver (sum of few Features enum items). */
enum Features {
@@ -125,25 +126,25 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
Connection *createConnection( ConnectionData &conn_data, int options = 0 );
/*! \return List of created connections. */
- const QPtrList<Connection> connectionsList() const;
+ const TQPtrList<Connection> connectionsList() const;
// /*! \return a name equal to the service name (X-Kexi-DriverName)
// stored in given service .desktop file. */
-// QString driverName() { return m_driverName; }
+// TQString driverName() { return m_driverName; }
/*! \return a name of MIME type of files handled by this driver
if it is a file-based database's driver
(equal X-Kexi-FileDBDriverMime service property)
otherwise returns null string. \sa isFileDriver()
*/
- QString fileDBDriverMimeType() const;
+ TQString fileDBDriverMimeType() const;
/*! \return default file-based driver mime type
(typically something like "application/x-kexiproject-sqlite") */
- static QString defaultFileBasedDriverMimeType();
+ static TQString defaultFileBasedDriverMimeType();
/*! \return default file-based driver name (currently, "sqlite3"). */
- static QString defaultFileBasedDriverName();
+ static TQString defaultFileBasedDriverName();
/*! Info about the driver as a service. */
const KService* service() const;
@@ -160,12 +161,12 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
from your reimplementation.
\sa isSystemFieldName().
*/
- virtual bool isSystemObjectName( const QString& n ) const;
+ virtual bool isSystemObjectName( const TQString& n ) const;
/*! \return true if \a n is a kexibd-related 'system' object's
name, i.e. when \a n starts with "kexi__" prefix.
*/
- static bool isKexiDBSystemObjectName( const QString& n );
+ static bool isKexiDBSystemObjectName( const TQString& n );
/*! \return true if \a n is a system database's name,
eg. name of build-in, system database that cannot be used or created by a user,
@@ -173,7 +174,7 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
a given driver implementation. For implementation.
\sa isSystemObjectName().
*/
- virtual bool isSystemDatabaseName( const QString& n ) const = 0;
+ virtual bool isSystemDatabaseName( const TQString& n ) const = 0;
/*! \return true if \a n is a system field's name, build-in system
field that cannot be used or created by a user,
@@ -181,7 +182,7 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
a given driver implementation.
\sa isSystemObjectName().
*/
- bool isSystemFieldName( const QString& n ) const;
+ bool isSystemFieldName( const TQString& n ) const;
/*! \return Driver's features that are combination of Driver::Features
enum. */
@@ -197,10 +198,10 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
AdminTools& adminTools() const;
/*! SQL-implementation-dependent name of given type */
- virtual QString sqlTypeName(int id_t, int p=0) const;
+ virtual TQString sqlTypeName(int id_t, int p=0) const;
/*! used when we do not have Driver instance yet */
- static QString defaultSQLTypeName(int id_t);
+ static TQString defaultSQLTypeName(int id_t);
/*! \return true if this driver's implementation is valid.
Just few constriants are checked to ensure that driver
@@ -219,21 +220,21 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
Reimplement this if you need other behaviour (eg. for 'date' type handling)
This implementation return date, datetime and time values in ISO format,
what seems to be accepted by SQL servers.
- @see Qt::DateFormat */
- virtual QString valueToSQL( uint ftype, const QVariant& v ) const;
+ @see TQt::DateFormat */
+ virtual TQString valueToSQL( uint ftype, const TQVariant& v ) const;
//! Like above but with the fildtype as string.
- inline QString valueToSQL( const QString& ftype, const QVariant& v ) const {
+ inline TQString valueToSQL( const TQString& ftype, const TQVariant& v ) const {
return valueToSQL(Field::typeForString(ftype), v);
}
//! Like above method, for \a field.
- inline QString valueToSQL( const Field *field, const QVariant& v ) const {
+ inline TQString valueToSQL( const Field *field, const TQVariant& v ) const {
return valueToSQL( (field ? field->type() : Field::InvalidType), v );
}
/*! not compatible with all drivers - reimplement */
- inline virtual QString dateTimeToSQL(const QDateTime& v) const {
+ inline virtual TQString dateTimeToSQL(const TQDateTime& v) const {
/*! (was compatible with SQLite: http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions)
Now it's ISO 8601 DateTime format - with "T" delimiter:
@@ -241,27 +242,27 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
(e.g. "1994-11-05T13:15:30" not "1994-11-05 13:15:30")
@todo add support for time zones?
*/
-//old const QDateTime dt( v.toDateTime() );
-//old return QString("\'")+dt.date().toString(Qt::ISODate)+" "+dt.time().toString(Qt::ISODate)+"\'";
- return QString("\'")+v.toString(Qt::ISODate)+"\'";
+//old const TQDateTime dt( v.toDateTime() );
+//old return TQString("\'")+dt.date().toString(Qt::ISODate)+" "+dt.time().toString(Qt::ISODate)+"\'";
+ return TQString("\'")+v.toString(Qt::ISODate)+"\'";
}
/*! Driver-specific SQL string escaping.
Implement escaping for any character like " or ' as your
database engine requires. Prepend and append quotation marks.
*/
- virtual QString escapeString( const QString& str ) const = 0;
+ virtual TQString escapeString( const TQString& str ) const = 0;
- /*! This is overloaded version of escapeString( const QString& str )
+ /*! This is overloaded version of escapeString( const TQString& str )
to be implemented in the same way.
*/
- virtual QCString escapeString( const QCString& str ) const = 0;
+ virtual TQCString escapeString( const TQCString& str ) const = 0;
/*! Driver-specific SQL BLOB value escaping.
Implement escaping for any character like " or ' and \\0 as your
database engine requires. Prepend and append quotation marks.
*/
- virtual QString escapeBLOB(const QByteArray& array) const = 0;
+ virtual TQString escapeBLOB(const TQByteArray& array) const = 0;
//todo enum EscapeType { EscapeDriver = 0x00, EscapeKexi = 0x01};
//todo enum EscapePolicy { EscapeAsNecessary = 0x00, EscapeAlways = 0x02 };
@@ -276,22 +277,22 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
\a options is the union of the EscapeType and EscapePolicy types.
If no escaping options are given, defaults to driver escaping as
necessary. */
- QString escapeIdentifier( const QString& str,
+ TQString escapeIdentifier( const TQString& str,
int options = EscapeDriver|EscapeAsNecessary) const;
- QCString escapeIdentifier( const QCString& str,
+ TQCString escapeIdentifier( const TQCString& str,
int options = EscapeDriver|EscapeAsNecessary) const;
//! \return property value for \a propeName available for this driver.
- //! If there's no such property defined for driver, Null QVariant value is returned.
- QVariant propertyValue( const QCString& propName ) const;
+ //! If there's no such property defined for driver, Null TQVariant value is returned.
+ TQVariant propertyValue( const TQCString& propName ) const;
//! \return translated property caption for \a propeName.
//! If there's no such property defined for driver, empty string value is returned.
- QString propertyCaption( const QCString& propName ) const;
+ TQString propertyCaption( const TQCString& propName ) const;
//! \return a list of property names available for this driver.
- QValueList<QCString> propertyNames() const;
+ TQValueList<TQCString> propertyNames() const;
protected:
/*! Used by DriverManager.
@@ -304,7 +305,7 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
You may also want to change options in DriverBehaviour *beh member.
See drivers/mySQL/mysqldriver.cpp for usage example.
*/
- Driver( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ Driver( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() );
/*! For reimplemenation: creates and returns connection object
with additional structures specific for a given driver.
@@ -318,20 +319,20 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
Implement escaping for any character like " or ' as your
database engine requires. Do not append or prepend any quotation
marks characters - it is automatically done by escapeIdentifier() using
- DriverBehaviour::QUOTATION_MARKS_FOR_IDENTIFIER.
+ DriverBehaviour::TQUOTATION_MARKS_FOR_IDENTIFIER.
*/
- virtual QString drv_escapeIdentifier( const QString& str ) const = 0;
+ virtual TQString drv_escapeIdentifier( const TQString& str ) const = 0;
- /*! This is overloaded version of drv_escapeIdentifier( const QString& str )
+ /*! This is overloaded version of drv_escapeIdentifier( const TQString& str )
to be implemented in the same way.
*/
- virtual QCString drv_escapeIdentifier( const QCString& str ) const = 0;
+ virtual TQCString drv_escapeIdentifier( const TQCString& str ) const = 0;
/*! \return true if \a n is a system field's name, build-in system
field that cannot be used or created by a user,
and in most cases user even shouldn't see this. The list is specific for
a given driver implementation. For implementation.*/
- virtual bool drv_isSystemFieldName( const QString& n ) const = 0;
+ virtual bool drv_isSystemFieldName( const TQString& n ) const = 0;
/* Creates admin tools object providing a number of database administration
tools for the driver. This is called once per driver.
@@ -366,7 +367,7 @@ class KEXI_DB_EXPORT Driver : public QObject, public KexiDB::Object
} //namespace KexiDB
/*! Driver's static version information, automatically impemented for KexiDB drivers.
- Put this into driver class declaration just like Q_OBJECT macro. */
+ Put this into driver class declaration just like TQ_OBJECT macro. */
#define KEXIDB_DRIVER \
public: \
virtual DatabaseVersionInfo version() const;
diff --git a/kexi/kexidb/driver_p.cpp b/kexi/kexidb/driver_p.cpp
index 2ad5f9ce1..8c7f096a9 100644
--- a/kexi/kexidb/driver_p.cpp
+++ b/kexi/kexidb/driver_p.cpp
@@ -19,16 +19,16 @@
*/
#include <kdebug.h>
-#include <qdict.h>
-#include <qvaluevector.h>
+#include <tqdict.h>
+#include <tqvaluevector.h>
#include "driver_p.h"
using namespace KexiDB;
namespace KexiDB {
- QAsciiDict<bool>* DriverPrivate::kexiSQLDict = 0;
+ TQAsciiDict<bool>* DriverPrivate::kexiSQLDict = 0;
- /*! QAsciiDict keys need to be a pointer to *something*. Used
+ /*! TQAsciiDict keys need to be a pointer to *something*. Used
for SQL keyword dictionaries
*/
static bool _dummy;
@@ -55,7 +55,7 @@ DriverPrivate::DriverPrivate()
void DriverPrivate::initInternalProperties()
{
- properties["is_file_database"] = QVariant(isFileDriver, 1);
+ properties["is_file_database"] = TQVariant(isFileDriver, 1);
propertyCaptions["is_file_database"] = i18n("File-based database driver");
if (isFileDriver) {
properties["file_database_mimetype"] = fileDBDriverMimeType;
@@ -63,7 +63,7 @@ void DriverPrivate::initInternalProperties()
}
#if 0
- QString str;
+ TQString str;
if (features & Driver::SingleTransactions)
str = i18n("Single transactions");
else if (features & Driver::MultipleTransactions)
@@ -77,15 +77,15 @@ void DriverPrivate::initInternalProperties()
#endif
// properties["transaction_support"] = features & Driver::TransactionsMask;
// propertyCaptions["transaction_support"] = i18n("Transaction support");
- properties["transaction_single"] = QVariant(features & Driver::SingleTransactions, 1);
+ properties["transaction_single"] = TQVariant(features & Driver::SingleTransactions, 1);
propertyCaptions["transaction_single"] = i18n("Single transactions support");
- properties["transaction_multiple"] = QVariant(features & Driver::MultipleTransactions, 1);
+ properties["transaction_multiple"] = TQVariant(features & Driver::MultipleTransactions, 1);
propertyCaptions["transaction_multiple"] = i18n("Multiple transactions support");
- properties["transaction_nested"] = QVariant(features & Driver::NestedTransactions, 1);
+ properties["transaction_nested"] = TQVariant(features & Driver::NestedTransactions, 1);
propertyCaptions["transaction_nested"] = i18n("Nested transactions support");
properties["kexidb_driver_version"] =
- QString("%1.%2").arg(version().major).arg(version().minor);
+ TQString("%1.%2").tqarg(version().major).tqarg(version().minor);
propertyCaptions["kexidb_driver_version"] =
i18n("KexiDB driver version");
}
@@ -98,23 +98,23 @@ DriverPrivate::~DriverPrivate()
void DriverPrivate::initKexiKeywords() {
- // QAsciiDict constructor args:
+ // TQAsciiDict constructor args:
// size (preferable prime)
// case sensitive flag (false)
// copy strings (false)
if(!kexiSQLDict) {
- kexiSQLDict = new QAsciiDict<bool>(79, false, false);
+ kexiSQLDict = new TQAsciiDict<bool>(79, false, false);
initKeywords(kexiSQLKeywords, *kexiSQLDict);
}
}
void DriverPrivate::initDriverKeywords(const char* keywords[], int hashSize) {
- driverSQLDict = new QAsciiDict<bool>(hashSize, false, false);
+ driverSQLDict = new TQAsciiDict<bool>(hashSize, false, false);
initKeywords(keywords, *driverSQLDict);
}
void DriverPrivate::initKeywords(const char* keywords[],
- QAsciiDict<bool>& dict) {
+ TQAsciiDict<bool>& dict) {
for(int i = 0; keywords[i] != 0; i++) {
dict.insert(keywords[i], &_dummy);
}
diff --git a/kexi/kexidb/driver_p.h b/kexi/kexidb/driver_p.h
index 44ecd6178..7a9be4eed 100644
--- a/kexi/kexidb/driver_p.h
+++ b/kexi/kexidb/driver_p.h
@@ -24,12 +24,12 @@
# error "Do not include: this is KexiDB internal file"
#endif
-#include <qstring.h>
-#include <qvariant.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qasciidict.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqmap.h>
+#include <tqptrdict.h>
+#include <tqasciidict.h>
+#include <tqvaluevector.h>
#include <kgenericfactory.h>
#include "connection.h"
@@ -50,19 +50,19 @@ class KEXI_DB_EXPORT DriverBehaviour
DriverBehaviour();
//! "UNSIGNED" by default
- QString UNSIGNED_TYPE_KEYWORD;
+ TQString UNSIGNED_TYPE_KEYWORD;
//! "AUTO_INCREMENT" by default, used as add-in word to field definition
//! May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true.
- QString AUTO_INCREMENT_FIELD_OPTION;
+ TQString AUTO_INCREMENT_FIELD_OPTION;
//! "AUTO_INCREMENT PRIMARY KEY" by default, used as add-in word to field definition
//! May be also used as full definition if SPECIAL_AUTO_INCREMENT_DEF is true.
- QString AUTO_INCREMENT_PK_FIELD_OPTION;
+ TQString AUTO_INCREMENT_PK_FIELD_OPTION;
//! "" by default, used as type string for autoinc. field definition
//! pgsql defines it as "SERIAL", sqlite defines it as "INTEGER"
- QString AUTO_INCREMENT_TYPE;
+ TQString AUTO_INCREMENT_TYPE;
/*! True if autoincrement field has special definition
e.g. like "INTEGER PRIMARY KEY" for SQLite.
@@ -72,7 +72,7 @@ class KEXI_DB_EXPORT DriverBehaviour
/*! True if autoincrement requires field to be declared as primary key.
This is true for SQLite. False by default. */
- bool AUTO_INCREMENT_REQUIRES_PK : 1;
+ bool AUTO_INCREMENT_RETQUIRES_PK : 1;
/*! Name of a field (or built-in function) with autoincremented unique value,
typically returned by Connection::drv_lastInsertRowID().
@@ -81,7 +81,7 @@ class KEXI_DB_EXPORT DriverBehaviour
- PostgreSQL and SQLite engines use 'OID' field
- MySQL uses LAST_INSERT_ID() built-in function
*/
- QString ROW_ID_FIELD_NAME;
+ TQString ROW_ID_FIELD_NAME;
/*! True if the value (fetched from field or function,
defined by ROW_ID_FIELD_NAME member) is EXACTLY the value of autoincremented field,
@@ -109,12 +109,12 @@ class KEXI_DB_EXPORT DriverBehaviour
\sa Connection::SetAvailableDatabaseName()
*/
- QString ALWAYS_AVAILABLE_DATABASE_NAME;
+ TQString ALWAYS_AVAILABLE_DATABASE_NAME;
/*! Quotation marks used for escaping identifier (see Driver::escapeIdentifier()).
Default value is '"'. Change it for your driver.
*/
- QChar QUOTATION_MARKS_FOR_IDENTIFIER;
+ TQChar TQUOTATION_MARKS_FOR_IDENTIFIER;
/*! True if using database is requied to perform real connection.
This is true for may engines, e.g. for PostgreSQL, where connections
@@ -122,16 +122,16 @@ class KEXI_DB_EXPORT DriverBehaviour
This flag is unused for file-based db drivers,
by default set to true and used for all other db drivers.
*/
- bool USING_DATABASE_REQUIRED_TO_CONNECT : 1;
+ bool USING_DATABASE_RETQUIRED_TO_CONNECT : 1;
/*! True if before we know whether the fetched result of executed query
is empty or not, we need to fetch first record. Particularly, it's true for SQLite.
The flag is used in Cursor::open(). By default this flag is false. */
- bool _1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
+ bool _1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY : 1;
/*! True if "SELECT 1 from (subquery)" is supported. False by default.
Used in Connection::resultExists() for optimization. It's set to true for SQLite driver. */
- bool SELECT_1_SUBQUERY_SUPPORTED : 1;
+ bool SELECT_1_SUBTQUERY_SUPPORTED : 1;
/*! Keywords that need to be escaped for the driver. Set this before calling
Driver::initSQLKeywords. */
@@ -145,17 +145,17 @@ class DriverPrivate
DriverPrivate();
virtual ~DriverPrivate();
- QPtrDict<Connection> connections;
+ TQPtrDict<Connection> connections;
-//(js)now QObject::name() is reused:
+//(js)now TQObject::name() is reused:
// /*! The name equal to the service name (X-Kexi-DriverName)
// stored in given service .desktop file. Set this in subclasses. */
-// QString m_driverName;
+// TQString m_driverName;
/*! Name of MIME type of files handled by this driver
if it is a file-based database's driver
(equal X-Kexi-FileDBDriverMime service property) */
- QString fileDBDriverMimeType;
+ TQString fileDBDriverMimeType;
/*! Info about the driver as a service. */
KService *service;
@@ -172,12 +172,12 @@ class DriverPrivate
cannot be used by user, and in most cases user even shouldn't see these.
The list contents is driver dependent (by default is empty)
- fill this in subclass ctor. */
-// QStringList m_systemObjectNames;
+// TQStringList m_systemObjectNames;
/*! List of system fields names, build-in system fields that cannot be used by user,
and in most cases user even shouldn't see these.
The list contents is driver dependent (by default is empty) - fill this in subclass ctor. */
-// QStringList m_systemFieldNames;
+// TQStringList m_systemFieldNames;
/*! Features (like transactions, etc.) supported by this driver
(sum of selected Features enum items).
@@ -186,17 +186,17 @@ class DriverPrivate
int features;
//! real type names for this engine
- QValueVector<QString> typeNames;
+ TQValueVector<TQString> typeNames;
/*! Driver properties dictionary (indexed by name),
useful for presenting properties to the user.
Set available properties here in driver implementation. */
- QMap<QCString,QVariant> properties;
+ TQMap<TQCString,TQVariant> properties;
/*! i18n'd captions for properties. You do not need
to set predefined properties' caption in driver implementation
-it's done automatically. */
- QMap<QCString,QString> propertyCaptions;
+ TQMap<TQCString,TQString> propertyCaptions;
/*! Provides a number of database administration tools for the driver. */
AdminTools *adminTools;
@@ -207,7 +207,7 @@ class DriverPrivate
UI consistency and to allow DB migration without changing the queries.
\sa DriverPrivate::initKexiKeywords(), KexiDB::kexiSQLKeywords.
*/
- static QAsciiDict<bool>* kexiSQLDict;
+ static TQAsciiDict<bool>* kexiSQLDict;
static const char *kexiSQLKeywords[];
/*! Driver-specific SQL keywords that need to be escaped if used as an
@@ -219,7 +219,7 @@ class DriverPrivate
\sa DriverBehaviour::SQL_KEYWORDS.
*/
- QAsciiDict<bool>* driverSQLDict;
+ TQAsciiDict<bool>* driverSQLDict;
/*! Initialise the dictionary of Kexi SQL keywords used for escaping. */
void initKexiKeywords();
@@ -234,7 +234,7 @@ class DriverPrivate
void initInternalProperties();
private:
- void initKeywords(const char* keywords[], QAsciiDict<bool>& dict);
+ void initKeywords(const char* keywords[], TQAsciiDict<bool>& dict);
friend class DriverManagerInternal;
};
diff --git a/kexi/kexidb/drivermanager.cpp b/kexi/kexidb/drivermanager.cpp
index e7e5b2bbc..1afcbd648 100644
--- a/kexi/kexidb/drivermanager.cpp
+++ b/kexi/kexidb/drivermanager.cpp
@@ -35,7 +35,7 @@
#include <assert.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//remove debug
#undef KexiDBDbg
@@ -47,7 +47,7 @@ DriverManagerInternal* DriverManagerInternal::s_self = 0L;
DriverManagerInternal::DriverManagerInternal() /* protected */
- : QObject( 0, "KexiDB::DriverManager" )
+ : TQObject( 0, "KexiDB::DriverManager" )
, Object()
, m_drivers(17, false)
, m_refCount(0)
@@ -69,7 +69,7 @@ DriverManagerInternal::~DriverManagerInternal()
void DriverManagerInternal::slotAppQuits()
{
- if (qApp->mainWidget() && qApp->mainWidget()->isVisible())
+ if (tqApp->mainWidget() && tqApp->mainWidget()->isVisible())
return; //what a hack! - we give up when app is still there
KexiDBDbg << "DriverManagerInternal::slotAppQuits(): let's clear drivers..." << endl;
m_drivers.clear();
@@ -88,8 +88,8 @@ bool DriverManagerInternal::lookupDrivers()
if (!lookupDriversNeeded)
return true;
- if (qApp) {
- connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(slotAppQuits()));
+ if (tqApp) {
+ connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits()));
}
//TODO: for QT-only version check for KInstance wrapper
// KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without KInstance (KGlobal::instance()==0)!" << endl;
@@ -108,21 +108,21 @@ bool DriverManagerInternal::lookupDrivers()
<< ": no \"kexidb_\" prefix -- skipped to avoid potential conflicts!" << endl;
continue;
}
- QString srv_name = ptr->property("X-Kexi-DriverName").toString();
+ TQString srv_name = ptr->property("X-Kexi-DriverName").toString();
if (srv_name.isEmpty()) {
KexiDBWarn << "DriverManagerInternal::lookupDrivers():"
" X-Kexi-DriverName must be set for KexiDB driver \""
<< ptr->property("Name").toString() << "\" service!\n -- skipped!" << endl;
continue;
}
- if (m_services_lcase.contains(srv_name.lower())) {
+ if (m_services_lcase.tqcontains(srv_name.lower())) {
KexiDBWarn << "DriverManagerInternal::lookupDrivers(): more than one driver named '"
<< srv_name.lower() << "'\n -- skipping this one!" << endl;
continue;
}
- QString srv_ver_str = ptr->property("X-Kexi-KexiDBVersion").toString();
- QStringList lst( QStringList::split(".", srv_ver_str) );
+ TQString srv_ver_str = ptr->property("X-Kexi-KexiDBVersion").toString();
+ TQStringList lst( TQStringList::split(".", srv_ver_str) );
uint minor_ver, major_ver;
bool ok = (lst.count() == 2);
if (ok)
@@ -135,32 +135,32 @@ bool DriverManagerInternal::lookupDrivers()
continue;
}
if (major_ver != KexiDB::version().major || minor_ver != KexiDB::version().minor) {
- KexiDBWarn << QString("DriverManagerInternal::lookupDrivers(): '%1' driver"
+ KexiDBWarn << TQString("DriverManagerInternal::lookupDrivers(): '%1' driver"
" has version '%2' but required KexiDB driver version is '%3.%4'\n"
- " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str)
- .arg(KexiDB::version().major).arg(KexiDB::version().minor) << endl;
- possibleProblems += QString("\"%1\" database driver has version \"%2\" "
+ " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str)
+ .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor) << endl;
+ possibleProblems += TQString("\"%1\" database driver has version \"%2\" "
"but required driver version is \"%3.%4\"")
- .arg(srv_name.lower()).arg(srv_ver_str)
- .arg(KexiDB::version().major).arg(KexiDB::version().minor);
+ .tqarg(srv_name.lower()).tqarg(srv_ver_str)
+ .tqarg(KexiDB::version().major).tqarg(KexiDB::version().minor);
continue;
}
- QString drvType = ptr->property("X-Kexi-DriverType").toString().lower();
+ TQString drvType = ptr->property("X-Kexi-DriverType").toString().lower();
if (drvType=="file") {
//new property: a list of supported mime types
- QStringList mimes( ptr->property("X-Kexi-FileDBDriverMimeList").toStringList() );
+ TQStringList mimes( ptr->property("X-Kexi-FileDBDriverMimeList").toStringList() );
//single mime is obsolete, but we're handling it:
{
- QString mime( ptr->property("X-Kexi-FileDBDriverMime").toString().lower() );
+ TQString mime( ptr->property("X-Kexi-FileDBDriverMime").toString().lower() );
if (!mime.isEmpty())
mimes.append( mime );
}
//store association of this driver with all listed mime types
- for (QStringList::ConstIterator mime_it = mimes.constBegin(); mime_it!=mimes.constEnd(); ++mime_it) {
- QString mime( (*mime_it).lower() );
- if (!m_services_by_mimetype.contains(mime)) {
+ for (TQStringList::ConstIterator mime_it = mimes.constBegin(); mime_it!=mimes.constEnd(); ++mime_it) {
+ TQString mime( (*mime_it).lower() );
+ if (!m_services_by_mimetype.tqcontains(mime)) {
m_services_by_mimetype.insert(mime, ptr);
}
else {
@@ -182,15 +182,15 @@ bool DriverManagerInternal::lookupDrivers()
return true;
}
-KexiDB::Driver::Info DriverManagerInternal::driverInfo(const QString &name)
+KexiDB::Driver::Info DriverManagerInternal::driverInfo(const TQString &name)
{
KexiDB::Driver::Info i = m_driversInfo[name.lower()];
if (!error() && i.name.isEmpty())
- setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) );
return i;
}
-Driver* DriverManagerInternal::driver(const QString& name)
+Driver* DriverManagerInternal::driver(const TQString& name)
{
if (!lookupDrivers())
return 0;
@@ -198,25 +198,25 @@ Driver* DriverManagerInternal::driver(const QString& name)
clearError();
KexiDBDbg << "DriverManager::driver(): loading " << name << endl;
- Driver *drv = name.isEmpty() ? 0 : m_drivers.find(name.latin1());
+ Driver *drv = name.isEmpty() ? 0 : m_drivers.tqfind(name.latin1());
if (drv)
return drv; //cached
- if (!m_services_lcase.contains(name.lower())) {
- setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").arg(name) );
+ if (!m_services_lcase.tqcontains(name.lower())) {
+ setError(ERR_DRIVERMANAGER, i18n("Could not find database driver \"%1\".").tqarg(name) );
return 0;
}
- KService::Ptr ptr= *(m_services_lcase.find(name.lower()));
- QString srv_name = ptr->property("X-Kexi-DriverName").toString();
+ KService::Ptr ptr= *(m_services_lcase.tqfind(name.lower()));
+ TQString srv_name = ptr->property("X-Kexi-DriverName").toString();
KexiDBDbg << "KexiDBInterfaceManager::load(): library: "<<ptr->library()<<endl;
drv = KParts::ComponentFactory::createInstanceFromService<KexiDB::Driver>(ptr,
- this, srv_name.latin1(), QStringList(),&m_serverResultNum);
+ this, srv_name.latin1(), TQStringList(),&m_serverResultNum);
if (!drv) {
setError(ERR_DRIVERMANAGER, i18n("Could not load database driver \"%1\".")
- .arg(name) );
+ .tqarg(name) );
if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand
m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound";
m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary";
@@ -273,7 +273,7 @@ void DriverManagerInternal::aboutDelete( Driver* drv )
// ---------------------------
DriverManager::DriverManager()
- : QObject( 0, "KexiDB::DriverManager" )
+ : TQObject( 0, "KexiDB::DriverManager" )
, Object()
, d_int( DriverManagerInternal::self() )
{
@@ -323,24 +323,24 @@ const KexiDB::Driver::InfoMap DriverManager::driversInfo()
info.fileBased = (ptr->property("X-Kexi-DriverType").toString().lower()=="file");
if (info.fileBased)
info.fileDBMimeType = ptr->property("X-Kexi-FileDBDriverMime").toString().lower();
- QVariant v = ptr->property("X-Kexi-DoNotAllowProjectImportingTo");
+ TQVariant v = ptr->property("X-Kexi-DoNotAllowProjectImportingTo");
info.allowImportingTo = v.isNull() ? true : !v.toBool();
d_int->m_driversInfo.insert(info.name.lower(), info);
}
return d_int->m_driversInfo;
}
-const QStringList DriverManager::driverNames()
+const TQStringList DriverManager::driverNames()
{
if (!d_int->lookupDrivers())
- return QStringList();
+ return TQStringList();
if (d_int->m_services.isEmpty() && d_int->error())
- return QStringList();
+ return TQStringList();
return d_int->m_services.keys();
}
-KexiDB::Driver::Info DriverManager::driverInfo(const QString &name)
+KexiDB::Driver::Info DriverManager::driverInfo(const TQString &name)
{
driversInfo();
KexiDB::Driver::Info i = d_int->driverInfo(name);
@@ -349,7 +349,7 @@ KexiDB::Driver::Info DriverManager::driverInfo(const QString &name)
return i;
}
-KService::Ptr DriverManager::serviceInfo(const QString &name)
+KService::Ptr DriverManager::serviceInfo(const TQString &name)
{
if (!d_int->lookupDrivers()) {
setError(d_int);
@@ -357,10 +357,10 @@ KService::Ptr DriverManager::serviceInfo(const QString &name)
}
clearError();
- if (d_int->m_services_lcase.contains(name.lower())) {
- return *d_int->m_services_lcase.find(name.lower());
+ if (d_int->m_services_lcase.tqcontains(name.lower())) {
+ return *d_int->m_services_lcase.tqfind(name.lower());
} else {
- setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").arg(name) );
+ setError(ERR_DRIVERMANAGER, i18n("No such driver service: \"%1\".").tqarg(name) );
return KService::Ptr();
}
}
@@ -372,7 +372,7 @@ const DriverManager::ServicesMap& DriverManager::services()
return d_int->m_services;
}
-QString DriverManager::lookupByMime(const QString &mimeType)
+TQString DriverManager::lookupByMime(const TQString &mimeType)
{
if (!d_int->lookupDrivers()) {
setError(d_int);
@@ -381,11 +381,11 @@ QString DriverManager::lookupByMime(const QString &mimeType)
KService::Ptr ptr = d_int->m_services_by_mimetype[mimeType.lower()];
if (!ptr)
- return QString::null;
+ return TQString();
return ptr->property("X-Kexi-DriverName").toString();
}
-Driver* DriverManager::driver(const QString& name)
+Driver* DriverManager::driver(const TQString& name)
{
Driver *drv = d_int->driver(name);
if (d_int->error())
@@ -393,7 +393,7 @@ Driver* DriverManager::driver(const QString& name)
return drv;
}
-QString DriverManager::serverErrorMsg()
+TQString DriverManager::serverErrorMsg()
{
return d_int->m_serverErrMsg;
}
@@ -403,29 +403,29 @@ int DriverManager::serverResult()
return d_int->m_serverResultNum;
}
-QString DriverManager::serverResultName()
+TQString DriverManager::serverResultName()
{
return d_int->m_serverResultName;
}
void DriverManager::drv_clearServerResult()
{
- d_int->m_serverErrMsg=QString::null;
+ d_int->m_serverErrMsg=TQString();
d_int->m_serverResultNum=0;
- d_int->m_serverResultName=QString::null;
+ d_int->m_serverResultName=TQString();
}
-QString DriverManager::possibleProblemsInfoMsg() const
+TQString DriverManager::possibleProblemsInfoMsg() const
{
if (d_int->possibleProblems.isEmpty())
- return QString::null;
- QString str;
+ return TQString();
+ TQString str;
str.reserve(1024);
str = "<ul>";
- for (QStringList::ConstIterator it = d_int->possibleProblems.constBegin();
+ for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin();
it!=d_int->possibleProblems.constEnd(); ++it)
{
- str += (QString::fromLatin1("<li>") + *it + QString::fromLatin1("</li>"));
+ str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>"));
}
str += "</ul>";
return str;
diff --git a/kexi/kexidb/drivermanager.h b/kexi/kexidb/drivermanager.h
index fa78c8417..673589935 100644
--- a/kexi/kexidb/drivermanager.h
+++ b/kexi/kexidb/drivermanager.h
@@ -22,10 +22,10 @@
#ifndef KEXIDB_DRIVER_MNGR_H
#define KEXIDB_DRIVER_MNGR_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <klibloader.h>
#include <kservice.h>
@@ -39,10 +39,10 @@ class Connection;
class ConnectionData;
//! Database driver management, e.g. finding and loading drivers.
-class KEXI_DB_EXPORT DriverManager : public QObject, public KexiDB::Object
+class KEXI_DB_EXPORT DriverManager : public TQObject, public KexiDB::Object
{
public:
- typedef QMap<QString, KService::Ptr> ServicesMap;
+ typedef TQMap<TQString, KService::Ptr> ServicesMap;
DriverManager();
virtual ~DriverManager();
@@ -50,11 +50,11 @@ class KEXI_DB_EXPORT DriverManager : public QObject, public KexiDB::Object
/*! Tries to load db driver with named name \a name.
The name is case insensitive.
\return db driver, or 0 if error (then error message is also set) */
- Driver* driver(const QString& name);
+ Driver* driver(const TQString& name);
/*! returns list of available drivers names.
That drivers can be loaded by first use of driver() method. */
- const QStringList driverNames();
+ const TQStringList driverNames();
/*! returns information list of available drivers.
That drivers can be loaded by first use of driver() method. */
@@ -64,12 +64,12 @@ class KEXI_DB_EXPORT DriverManager : public QObject, public KexiDB::Object
The name is case insensitive.
You can check if driver information is not found calling
Info::name.isEmpty() (then error message is also set). */
- KexiDB::Driver::Info driverInfo(const QString &name);
+ KexiDB::Driver::Info driverInfo(const TQString &name);
/*! \return service information about driver's named with \a name.
The name is case insensitive.
In most cases you can use driverInfo() instead. */
- KService::Ptr serviceInfo(const QString &name);
+ KService::Ptr serviceInfo(const TQString &name);
/*! \return a map structure of the services. Not necessary for everyday use. */
const ServicesMap& services();
@@ -79,18 +79,18 @@ class KEXI_DB_EXPORT DriverManager : public QObject, public KexiDB::Object
The lookup is case insensitive.
\return driver name or null string if no driver found.
*/
- QString lookupByMime(const QString &mimeType);
+ TQString lookupByMime(const TQString &mimeType);
//! server error is set if there is error at KService level (useful for debugging)
- virtual QString serverErrorMsg();
+ virtual TQString serverErrorMsg();
virtual int serverResult();
- virtual QString serverResultName();
+ virtual TQString serverResultName();
/*! HTML information about possible problems encountered.
It's displayed in 'details' section, if an error encountered.
Currently it contains a list of incompatible db drivers.
Used in KexiStartupHandler::detectDriverForFile(). */
- QString possibleProblemsInfoMsg() const;
+ TQString possibleProblemsInfoMsg() const;
protected:
virtual void drv_clearServerResult();
diff --git a/kexi/kexidb/drivermanager_p.h b/kexi/kexidb/drivermanager_p.h
index ce92dd039..85388270d 100644
--- a/kexi/kexidb/drivermanager_p.h
+++ b/kexi/kexidb/drivermanager_p.h
@@ -22,24 +22,25 @@
#include <kexidb/object.h>
-#include <qobject.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
namespace KexiDB {
/*! Internal class of driver manager.
*/
-class KEXI_DB_EXPORT DriverManagerInternal : public QObject, public KexiDB::Object
+class KEXI_DB_EXPORT DriverManagerInternal : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
~DriverManagerInternal();
/*! Tries to load db driver \a name.
\return db driver, or 0 if error (then error message is also set) */
- KexiDB::Driver* driver(const QString& name);
+ KexiDB::Driver* driver(const TQString& name);
- KexiDB::Driver::Info driverInfo(const QString &name);
+ KexiDB::Driver::Info driverInfo(const TQString &name);
static DriverManagerInternal *self();
@@ -55,9 +56,9 @@ class KEXI_DB_EXPORT DriverManagerInternal : public QObject, public KexiDB::Obje
void aboutDelete( Driver* drv );
protected slots:
- /*! Used to destroy all drivers on QApplication quit, so even if there are
+ /*! Used to destroy all drivers on TQApplication quit, so even if there are
DriverManager's static instances that are destroyed on program
- "static destruction", drivers are not kept after QApplication death.
+ "static destruction", drivers are not kept after TQApplication death.
*/
void slotAppQuits();
@@ -73,16 +74,16 @@ class KEXI_DB_EXPORT DriverManagerInternal : public QObject, public KexiDB::Obje
DriverManager::ServicesMap m_services_lcase; //! as above but service names in lowercase
DriverManager::ServicesMap m_services_by_mimetype;
Driver::InfoMap m_driversInfo; //! used to store drivers information
- QAsciiDict<KexiDB::Driver> m_drivers;
+ TQAsciiDict<KexiDB::Driver> m_drivers;
ulong m_refCount;
- QString m_serverErrMsg;
+ TQString m_serverErrMsg;
int m_serverResultNum;
- QString m_serverResultName;
+ TQString m_serverResultName;
//! result names for KParts::ComponentFactory::ComponentLoadingError
- QMap<int,QString> m_componentLoadingErrors;
+ TQMap<int,TQString> m_componentLoadingErrors;
- QStringList possibleProblems;
+ TQStringList possibleProblems;
bool lookupDriversNeeded : 1;
diff --git a/kexi/kexidb/drivers/mySQL/mySQL.pro b/kexi/kexidb/drivers/mySQL/mySQL.pro
index cc6eddd69..6c443be30 100644
--- a/kexi/kexidb/drivers/mySQL/mySQL.pro
+++ b/kexi/kexidb/drivers/mySQL/mySQL.pro
@@ -2,11 +2,11 @@ include( ../common.pro )
INCLUDEPATH += $(MYSQL_INC) $(MYSQL_INC)/mysql
-contains(CONFIG,debug) {
+tqcontains(CONFIG,debug) {
win32:LIBS += $(MYSQL_LIB)/debug/libmysql.lib
win32:QMAKE_LFLAGS += /NODEFAULTLIB:LIBCMTD.LIB
}
-!contains(CONFIG,debug) {
+!tqcontains(CONFIG,debug) {
# win32:LIBS += $(MYSQL_LIB)/opt/mysqlclient.lib
win32:LIBS += $(MYSQL_LIB)/opt/libmysql.lib
# win32:QMAKE_LFLAGS += /NODEFAULTLIB:MSVCRT.LIB
@@ -14,7 +14,7 @@ contains(CONFIG,debug) {
TARGET = kexidb_mysqldriver$$KDELIBDEBUG
-system( bash kmoc )
+system( bash ktqmoc )
SOURCES = \
mysqlconnection_p.cpp \
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
index 7417b6980..18682a4f0 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlconnection.cpp
@@ -20,10 +20,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qvariant.h>
-#include <qfile.h>
-#include <qdict.h>
-#include <qregexp.h>
+#include <tqvariant.h>
+#include <tqfile.h>
+#include <tqdict.h>
+#include <tqregexp.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -68,9 +68,9 @@ bool MySqlConnection::drv_connect(KexiDB::ServerVersionInfo& version)
version.release = v - version.major*10000 - version.minor*100;
#else //better way to get the version info: use 'version' built-in variable:
//! @todo this is hardcoded for now; define api for retrieving variables and use this API...
- QString versionString;
+ TQString versionString;
const tristate res = querySingleString("SELECT @@version", versionString, /*column*/0, false /*!addLimitTo1*/);
- QRegExp versionRe("(\\d+)\\.(\\d+)\\.(\\d+)");
+ TQRegExp versionRe("(\\d+)\\.(\\d+)\\.(\\d+)");
if (res==true && versionRe.exactMatch(versionString)) { // (if querySingleString failed, the version will be 0.0.0...
version.major = versionRe.cap(1).toInt();
version.minor = versionRe.cap(2).toInt();
@@ -84,7 +84,7 @@ bool MySqlConnection::drv_disconnect() {
return d->db_disconnect();
}
-Cursor* MySqlConnection::prepareQuery(const QString& statement, uint cursor_options) {
+Cursor* MySqlConnection::prepareQuery(const TQString& statement, uint cursor_options) {
return new MySqlCursor(this,statement,cursor_options);
}
@@ -92,7 +92,7 @@ Cursor* MySqlConnection::prepareQuery( QuerySchema& query, uint cursor_options )
return new MySqlCursor( this, query, cursor_options );
}
-bool MySqlConnection::drv_getDatabasesList( QStringList &list ) {
+bool MySqlConnection::drv_getDatabasesList( TQStringList &list ) {
KexiDBDrvDbg << "MySqlConnection::drv_getDatabasesList()" << endl;
list.clear();
MYSQL_RES *res;
@@ -100,7 +100,7 @@ bool MySqlConnection::drv_getDatabasesList( QStringList &list ) {
if((res=mysql_list_dbs(d->mysql,0)) != 0) {
MYSQL_ROW row;
while ( (row = mysql_fetch_row(res))!=0) {
- list<<QString(row[0]);
+ list<<TQString(row[0]);
}
mysql_free_result(res);
return true;
@@ -111,7 +111,7 @@ bool MySqlConnection::drv_getDatabasesList( QStringList &list ) {
return false;
}
-bool MySqlConnection::drv_createDatabase( const QString &dbName) {
+bool MySqlConnection::drv_createDatabase( const TQString &dbName) {
KexiDBDrvDbg << "MySqlConnection::drv_createDatabase: " << dbName << endl;
// mysql_create_db deprecated, use SQL here.
if (drv_executeSQL("CREATE DATABASE " + (dbName)))
@@ -120,7 +120,7 @@ bool MySqlConnection::drv_createDatabase( const QString &dbName) {
return false;
}
-bool MySqlConnection::drv_useDatabase(const QString &dbName, bool *cancelled, MessageHandler* msgHandler)
+bool MySqlConnection::drv_useDatabase(const TQString &dbName, bool *cancelled, MessageHandler* msgHandler)
{
Q_UNUSED(cancelled);
Q_UNUSED(msgHandler);
@@ -134,19 +134,19 @@ bool MySqlConnection::drv_closeDatabase() {
return true;
}
-bool MySqlConnection::drv_dropDatabase( const QString &dbName) {
+bool MySqlConnection::drv_dropDatabase( const TQString &dbName) {
//TODO is here escaping needed
return drv_executeSQL("drop database "+dbName);
}
-bool MySqlConnection::drv_executeSQL( const QString& statement ) {
+bool MySqlConnection::drv_executeSQL( const TQString& statement ) {
return d->executeSQL(statement);
}
-Q_ULLONG MySqlConnection::drv_lastInsertRowID()
+TQ_ULLONG MySqlConnection::drv_lastInsertRowID()
{
//! @todo
- return (Q_ULLONG)mysql_insert_id(d->mysql);
+ return (TQ_ULLONG)mysql_insert_id(d->mysql);
}
int MySqlConnection::serverResult()
@@ -154,9 +154,9 @@ int MySqlConnection::serverResult()
return d->res;
}
-QString MySqlConnection::serverResultName()
+TQString MySqlConnection::serverResultName()
{
- return QString::null;
+ return TQString();
}
void MySqlConnection::drv_clearServerResult()
@@ -166,19 +166,19 @@ void MySqlConnection::drv_clearServerResult()
d->res = 0;
}
-QString MySqlConnection::serverErrorMsg()
+TQString MySqlConnection::serverErrorMsg()
{
return d->errmsg;
}
-bool MySqlConnection::drv_containsTable( const QString &tableName )
+bool MySqlConnection::drv_containsTable( const TQString &tableName )
{
bool success;
- return resultExists(QString("show tables like %1")
- .arg(driver()->escapeString(tableName)), success) && success;
+ return resultExists(TQString("show tables like %1")
+ .tqarg(driver()->escapeString(tableName)), success) && success;
}
-bool MySqlConnection::drv_getTablesList( QStringList &list )
+bool MySqlConnection::drv_getTablesList( TQStringList &list )
{
KexiDB::Cursor *cursor;
m_sql = "show tables";
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection.h b/kexi/kexidb/drivers/mySQL/mysqlconnection.h
index bafb889de..e0fb4382c 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlconnection.h
+++ b/kexi/kexidb/drivers/mySQL/mysqlconnection.h
@@ -22,11 +22,11 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#ifndef MYSQLCONNECTION_H
#define MYSQLCONNECTION_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/connection.h>
#include "mysqlcursor.h"
-#include <qdict.h>
+#include <tqdict.h>
namespace KexiDB {
@@ -40,11 +40,12 @@ class MySqlConnectionInternal;
class MySqlConnection : public Connection
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~MySqlConnection();
- virtual Cursor* prepareQuery( const QString& statement = QString::null, uint cursor_options = 0 );
+ virtual Cursor* prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0 );
virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 );
virtual PreparedStatement::Ptr prepareStatement(PreparedStatement::StatementType type,
@@ -57,24 +58,24 @@ class MySqlConnection : public Connection
virtual bool drv_connect(KexiDB::ServerVersionInfo& version);
virtual bool drv_disconnect();
- virtual bool drv_getDatabasesList( QStringList &list );
- virtual bool drv_createDatabase( const QString &dbName = QString::null );
- virtual bool drv_useDatabase( const QString &dbName = QString::null, bool *cancelled = 0,
+ virtual bool drv_getDatabasesList( TQStringList &list );
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() );
+ virtual bool drv_useDatabase( const TQString &dbName = TQString(), bool *cancelled = 0,
MessageHandler* msgHandler = 0 );
virtual bool drv_closeDatabase();
- virtual bool drv_dropDatabase( const QString &dbName = QString::null );
- virtual bool drv_executeSQL( const QString& statement );
- virtual Q_ULLONG drv_lastInsertRowID();
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() );
+ virtual bool drv_executeSQL( const TQString& statement );
+ virtual TQ_ULLONG drv_lastInsertRowID();
virtual int serverResult();
- virtual QString serverResultName();
- virtual QString serverErrorMsg();
+ virtual TQString serverResultName();
+ virtual TQString serverErrorMsg();
virtual void drv_clearServerResult();
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_getTablesList( QStringList &list );
+ virtual bool drv_getTablesList( TQStringList &list );
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_containsTable( const QString &tableName );
+ virtual bool drv_containsTable( const TQString &tableName );
MySqlConnectionInternal* d;
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
index 9797ca967..50b94ae2a 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
@@ -18,10 +18,10 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qcstring.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
#include <kdebug.h>
@@ -67,37 +67,37 @@ void MySqlConnectionInternal::storeResult()
none is specified). If the server is on a remote machine, then a port is
the port that the remote server is listening on.
*/
-//bool MySqlConnectionInternal::db_connect(QCString host, QCString user,
-// QCString password, unsigned short int port, QString socket)
+//bool MySqlConnectionInternal::db_connect(TQCString host, TQCString user,
+// TQCString password, unsigned short int port, TQString socket)
bool MySqlConnectionInternal::db_connect(const KexiDB::ConnectionData& data)
{
if (!(mysql = mysql_init(mysql)))
return false;
KexiDBDrvDbg << "MySqlConnectionInternal::connect()" << endl;
- QCString localSocket;
- QString hostName = data.hostName;
+ TQCString localSocket;
+ TQString hostName = data.hostName;
if (hostName.isEmpty() || hostName.lower()=="localhost") {
if (data.useLocalSocketFile) {
if (data.localSocketFileName.isEmpty()) {
//! @todo move the list of default sockets to a generic method
- QStringList sockets;
- #ifndef Q_WS_WIN
+ TQStringList sockets;
+ #ifndef TQ_WS_WIN
sockets.append("/var/lib/mysql/mysql.sock");
sockets.append("/var/run/mysqld/mysqld.sock");
sockets.append("/tmp/mysql.sock");
- for(QStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++)
+ for(TQStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++)
{
- if(QFile(*it).exists()) {
- localSocket = ((QString)(*it)).local8Bit();
+ if(TQFile(*it).exists()) {
+ localSocket = ((TQString)(*it)).local8Bit();
break;
}
}
#endif
}
else
- localSocket = QFile::encodeName(data.localSocketFileName);
+ localSocket = TQFile::encodeName(data.localSocketFileName);
}
else {
//we're not using local socket
@@ -131,17 +131,17 @@ bool MySqlConnectionInternal::db_disconnect()
/* ************************************************************************** */
/*! Selects dbName as the active database so it can be used.
*/
-bool MySqlConnectionInternal::useDatabase(const QString &dbName) {
+bool MySqlConnectionInternal::useDatabase(const TQString &dbName) {
//TODO is here escaping needed?
return executeSQL("USE " + dbName);
}
/*! Executes the given SQL statement on the server.
*/
-bool MySqlConnectionInternal::executeSQL(const QString& statement) {
+bool MySqlConnectionInternal::executeSQL(const TQString& statement) {
// KexiDBDrvDbg << "MySqlConnectionInternal::executeSQL: "
// << statement << endl;
- QCString queryStr=statement.utf8();
+ TQCString queryStr=statement.utf8();
const char *query=queryStr;
if(mysql_real_query(mysql, query, strlen(query)) == 0)
{
@@ -153,8 +153,8 @@ bool MySqlConnectionInternal::executeSQL(const QString& statement) {
return false;
}
-QString MySqlConnectionInternal::escapeIdentifier(const QString& str) const {
- return QString(str).replace('`', "'");
+TQString MySqlConnectionInternal::escapeIdentifier(const TQString& str) const {
+ return TQString(str).tqreplace('`', "'");
}
//--------------------------------------
diff --git a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.h b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.h
index 5bb77487d..85d8c57bd 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlconnection_p.h
+++ b/kexi/kexidb/drivers/mySQL/mysqlconnection_p.h
@@ -22,7 +22,7 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
#include <kexidb/connection_p.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <my_global.h>
#endif
#include <mysql_version.h>
@@ -31,8 +31,8 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
typedef struct st_mysql MYSQL;
#undef bool
-class QCString;
-class QString;
+class TQCString;
+class TQString;
#ifdef MYSQLMIGRATE_H
#define NAMESPACE KexiMigration
@@ -64,20 +64,20 @@ class MySqlConnectionInternal : public KexiDB::ConnectionInternal
bool db_disconnect();
//! Selects a database that is about to be used
- bool useDatabase(const QString &dbName = QString::null);
+ bool useDatabase(const TQString &dbName = TQString());
//! Execute SQL statement on the database
- bool executeSQL( const QString& statement );
+ bool executeSQL( const TQString& statement );
//! Stores last operation's result
virtual void storeResult();
//! Escapes a table, database or column name
- QString escapeIdentifier(const QString& str) const;
+ TQString escapeIdentifier(const TQString& str) const;
MYSQL *mysql;
bool mysql_owned; //!< true if mysql pointer should be freed on destruction
- QString errmsg; //!< server-specific message of last operation
+ TQString errmsg; //!< server-specific message of last operation
int res; //!< result code of last operation on server
};
diff --git a/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp b/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp
index 7897fa972..abfdb44f2 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlcursor.cpp
@@ -31,7 +31,7 @@
using namespace KexiDB;
-MySqlCursor::MySqlCursor(KexiDB::Connection* conn, const QString& statement, uint cursor_options)
+MySqlCursor::MySqlCursor(KexiDB::Connection* conn, const TQString& statement, uint cursor_options)
: Cursor(conn,statement,cursor_options)
, d( new MySqlCursorData(conn) )
{
@@ -72,7 +72,7 @@ bool MySqlCursor::drv_open() {
}
}
- setError(ERR_DB_SPECIFIC,QString::fromUtf8(mysql_error(d->mysql)));
+ setError(ERR_DB_SPECIFIC,TQString::fromUtf8(mysql_error(d->mysql)));
return false;
}
@@ -106,9 +106,9 @@ void MySqlCursor::drv_getNextRecord() {
}
// This isn't going to work right now as it uses d->mysqlrow
-QVariant MySqlCursor::value(uint pos) {
+TQVariant MySqlCursor::value(uint pos) {
if (!d->mysqlrow || pos>=m_fieldCount || d->mysqlrow[pos]==0)
- return QVariant();
+ return TQVariant();
KexiDB::Field *f = (m_fieldsExpanded && pos<m_fieldsExpanded->count())
? m_fieldsExpanded->at(pos)->field : 0;
@@ -119,20 +119,20 @@ QVariant MySqlCursor::value(uint pos) {
/* moved to cstringToVariant()
//from most to least frequently used types:
if (!f || f->isTextType())
- return QVariant( QString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]) );
+ return TQVariant( TQString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]) );
else if (f->isIntegerType())
//! @todo support BigInteger
- return QVariant( QCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toInt() );
+ return TQVariant( TQCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toInt() );
else if (f->isFPNumericType())
- return QVariant( QCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toDouble() );
+ return TQVariant( TQCString((const char*)d->mysqlrow[pos], d->lengths[pos]).toDouble() );
//default
- return QVariant(QString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]));*/
+ return TQVariant(TQString::fromUtf8((const char*)d->mysqlrow[pos], d->lengths[pos]));*/
}
/* As with sqlite, the DB library returns all values (including numbers) as
- strings. So just put that string in a QVariant and let KexiDB deal with it.
+ strings. So just put that string in a TQVariant and let KexiDB deal with it.
*/
void MySqlCursor::storeCurrentRow(RowData &data) const
{
@@ -145,7 +145,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const
data.resize(m_fieldCount);
const uint fieldsExpandedCount = m_fieldsExpanded ? m_fieldsExpanded->count() : UINT_MAX;
- const uint realCount = QMIN(fieldsExpandedCount, m_fieldCount);
+ const uint realCount = TQMIN(fieldsExpandedCount, m_fieldCount);
for( uint i=0; i<realCount; i++) {
Field *f = m_fieldsExpanded ? m_fieldsExpanded->at(i)->field : 0;
if (m_fieldsExpanded && !f)
@@ -153,7 +153,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const
data[i] = KexiDB::cstringToVariant(d->mysqlrow[i], f, d->lengths[i]);
/* moved to cstringToVariant()
if (f && f->type()==Field::BLOB) {
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate(d->mysqlrow[i], d->lengths[i]);
data[i] = ba;
KexiDBDbg << data[i].toByteArray().size() << endl;
@@ -161,7 +161,7 @@ void MySqlCursor::storeCurrentRow(RowData &data) const
//! @todo more types!
//! @todo look at what type mysql declares!
else {
- data[i] = QVariant(QString::fromUtf8((const char*)d->mysqlrow[i], d->lengths[i]));
+ data[i] = TQVariant(TQString::fromUtf8((const char*)d->mysqlrow[i], d->lengths[i]));
}*/
}
}
@@ -183,7 +183,7 @@ void MySqlCursor::drv_bufferMovePointerPrev() {
}
-void MySqlCursor::drv_bufferMovePointerTo(Q_LLONG to) {
+void MySqlCursor::drv_bufferMovePointerTo(TQ_LLONG to) {
//MYSQL_ROW_OFFSET ro=mysql_row_tell(d->mysqlres);
mysql_data_seek(d->mysqlres, to);
d->mysqlrow=mysql_fetch_row(d->mysqlres);
@@ -200,9 +200,9 @@ int MySqlCursor::serverResult()
return d->res;
}
-QString MySqlCursor::serverResultName()
+TQString MySqlCursor::serverResultName()
{
- return QString::null;
+ return TQString();
}
void MySqlCursor::drv_clearServerResult()
@@ -212,7 +212,7 @@ void MySqlCursor::drv_clearServerResult()
d->res = 0;
}
-QString MySqlCursor::serverErrorMsg()
+TQString MySqlCursor::serverErrorMsg()
{
return d->errmsg;
}
diff --git a/kexi/kexidb/drivers/mySQL/mysqlcursor.h b/kexi/kexidb/drivers/mySQL/mysqlcursor.h
index 09ace22b2..4f48d6024 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlcursor.h
+++ b/kexi/kexidb/drivers/mySQL/mysqlcursor.h
@@ -29,7 +29,7 @@ class MySqlCursorData;
class MySqlCursor: public Cursor {
public:
- MySqlCursor(Connection* conn, const QString& statement = QString::null, uint cursor_options = NoOptions );
+ MySqlCursor(Connection* conn, const TQString& statement = TQString(), uint cursor_options = NoOptions );
MySqlCursor(Connection* conn, QuerySchema& query, uint options = NoOptions );
virtual ~MySqlCursor();
virtual bool drv_open();
@@ -37,23 +37,23 @@ public:
// virtual bool drv_moveFirst();
virtual void drv_getNextRecord();
//virtual bool drv_getPrevRecord();
- virtual QVariant value(uint);
+ virtual TQVariant value(uint);
virtual void drv_clearServerResult();
virtual void drv_appendCurrentRecordToBuffer();
virtual void drv_bufferMovePointerNext();
virtual void drv_bufferMovePointerPrev();
- virtual void drv_bufferMovePointerTo(Q_LLONG to);
+ virtual void drv_bufferMovePointerTo(TQ_LLONG to);
virtual const char** rowData() const;
virtual void storeCurrentRow(RowData &data) const;
// virtual bool save(RowData& data, RowEditBuffer& buf);
virtual int serverResult();
- virtual QString serverResultName();
- virtual QString serverErrorMsg();
+ virtual TQString serverResultName();
+ virtual TQString serverErrorMsg();
protected:
- QVariant pValue(uint pos) const;
+ TQVariant pValue(uint pos) const;
// MYSQL_RES *m_res;
// MYSQL_ROW m_row;
// MYSQL *my_conn;
diff --git a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp
index c27681c0b..9a1213b0a 100644
--- a/kexi/kexidb/drivers/mySQL/mysqldriver.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqldriver.cpp
@@ -19,16 +19,16 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
# include <mysql/config-win.h>
#endif
#include <mysql_version.h>
#include <mysql.h>
#define BOOL bool
-#include <qvariant.h>
-#include <qfile.h>
-#include <qdict.h>
+#include <tqvariant.h>
+#include <tqfile.h>
+#include <tqdict.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@ KEXIDB_DRIVER_INFO( MySqlDriver, mysql )
*
* See: http://dev.mysql.com/doc/mysql/en/Column_types.html
*/
-MySqlDriver::MySqlDriver(QObject *parent, const char *name, const QStringList &args) : Driver(parent, name,args)
+MySqlDriver::MySqlDriver(TQObject *tqparent, const char *name, const TQStringList &args) : Driver(tqparent, name,args)
{
// KexiDBDrvDbg << "MySqlDriver::MySqlDriver()" << endl;
@@ -63,9 +63,9 @@ MySqlDriver::MySqlDriver(QObject *parent, const char *name, const QStringList &a
beh->ROW_ID_FIELD_NAME="LAST_INSERT_ID()";
beh->ROW_ID_FIELD_RETURNS_LAST_AUTOINCREMENTED_VALUE=true;
- beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
- beh->USING_DATABASE_REQUIRED_TO_CONNECT=false;
- beh->QUOTATION_MARKS_FOR_IDENTIFIER='`';
+ beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=false;
+ beh->USING_DATABASE_RETQUIRED_TO_CONNECT=false;
+ beh->TQUOTATION_MARKS_FOR_IDENTIFIER='`';
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(331);
@@ -103,16 +103,16 @@ MySqlDriver::drv_createConnection( ConnectionData &conn_data )
return new MySqlConnection( this, conn_data );
}
-bool MySqlDriver::isSystemDatabaseName(const QString &n) const
+bool MySqlDriver::isSystemDatabaseName(const TQString &n) const
{
return n.lower()=="mysql" || Driver::isSystemObjectName(n);
}
-bool MySqlDriver::drv_isSystemFieldName(const QString&) const {
+bool MySqlDriver::drv_isSystemFieldName(const TQString&) const {
return false;
}
-QString MySqlDriver::escapeString(const QString& str) const
+TQString MySqlDriver::escapeString(const TQString& str) const
{
//escape as in http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html
//! @todo support more characters, like %, _
@@ -120,20 +120,20 @@ QString MySqlDriver::escapeString(const QString& str) const
const int old_length = str.length();
int i;
for ( i = 0; i < old_length; i++ ) { //anything to escape?
- const unsigned int ch = str[i].unicode();
+ const unsigned int ch = str[i].tqunicode();
if (ch == '\\' || ch == '\'' || ch == '"' || ch == '\n' || ch == '\r' || ch == '\t' || ch == '\b' || ch == '\0')
break;
}
if (i >= old_length) { //no characters to escape
- return QString::fromLatin1("'") + str + QString::fromLatin1("'");
+ return TQString::tqfromLatin1("'") + str + TQString::tqfromLatin1("'");
}
- QChar *new_string = new QChar[ old_length * 3 + 1 ]; // a worst case approximation
+ TQChar *new_string = new TQChar[ old_length * 3 + 1 ]; // a worst case approximation
//! @todo move new_string to Driver::m_new_string or so...
int new_length = 0;
new_string[new_length++] = '\''; //prepend '
for ( i = 0; i < old_length; i++, new_length++ ) {
- const unsigned int ch = str[i].unicode();
+ const unsigned int ch = str[i].tqunicode();
if (ch == '\\') {
new_string[new_length++] = '\\';
new_string[new_length] = '\\';
@@ -175,37 +175,37 @@ QString MySqlDriver::escapeString(const QString& str) const
}
new_string[new_length++] = '\''; //append '
- QString result(new_string, new_length);
+ TQString result(new_string, new_length);
delete [] new_string;
return result;
}
-QString MySqlDriver::escapeBLOB(const QByteArray& array) const
+TQString MySqlDriver::escapeBLOB(const TQByteArray& array) const
{
return KexiDB::escapeBLOB(array, KexiDB::BLOBEscape0xHex);
}
-QCString MySqlDriver::escapeString(const QCString& str) const
+TQCString MySqlDriver::escapeString(const TQCString& str) const
{
//! @todo optimize using mysql_real_escape_string()?
//! see http://dev.mysql.com/doc/refman/5.0/en/string-syntax.html
- return QCString("'")+QCString(str)
- .replace( '\\', "\\\\" )
- .replace( '\'', "\\''" )
- .replace( '"', "\\\"" )
- + QCString("'");
+ return TQCString("'")+TQCString(str)
+ .tqreplace( '\\', "\\\\" )
+ .tqreplace( '\'', "\\''" )
+ .tqreplace( '"', "\\\"" )
+ + TQCString("'");
}
/*! Add back-ticks to an identifier, and replace any back-ticks within
* the name with single quotes.
*/
-QString MySqlDriver::drv_escapeIdentifier( const QString& str) const {
- return QString(str).replace('`', "'");
+TQString MySqlDriver::drv_escapeIdentifier( const TQString& str) const {
+ return TQString(str).tqreplace('`', "'");
}
-QCString MySqlDriver::drv_escapeIdentifier( const QCString& str) const {
- return QCString(str).replace('`', "'");
+TQCString MySqlDriver::drv_escapeIdentifier( const TQCString& str) const {
+ return TQCString(str).tqreplace('`', "'");
}
#include "mysqldriver.moc"
diff --git a/kexi/kexidb/drivers/mySQL/mysqldriver.h b/kexi/kexidb/drivers/mySQL/mysqldriver.h
index 8282e2154..7e6d5a352 100644
--- a/kexi/kexidb/drivers/mySQL/mysqldriver.h
+++ b/kexi/kexidb/drivers/mySQL/mysqldriver.h
@@ -30,26 +30,27 @@ namespace KexiDB {
class MySqlDriver : public Driver
{
Q_OBJECT
+ TQ_OBJECT
KEXIDB_DRIVER
public:
- MySqlDriver(QObject *parent, const char *name, const QStringList &args=QStringList());
+ MySqlDriver(TQObject *tqparent, const char *name, const TQStringList &args=TQStringList());
virtual ~MySqlDriver();
- virtual bool isSystemDatabaseName( const QString &n ) const;
+ virtual bool isSystemDatabaseName( const TQString &n ) const;
//! Escape a string for use as a value
- virtual QString escapeString(const QString& str) const;
- virtual QCString escapeString(const QCString& str) const;
+ virtual TQString escapeString(const TQString& str) const;
+ virtual TQCString escapeString(const TQCString& str) const;
//! Escape BLOB value \a array
- virtual QString escapeBLOB(const QByteArray& array) const;
+ virtual TQString escapeBLOB(const TQByteArray& array) const;
protected:
- virtual QString drv_escapeIdentifier( const QString& str) const;
- virtual QCString drv_escapeIdentifier( const QCString& str) const;
+ virtual TQString drv_escapeIdentifier( const TQString& str) const;
+ virtual TQCString drv_escapeIdentifier( const TQCString& str) const;
virtual Connection *drv_createConnection( ConnectionData &conn_data );
- virtual bool drv_isSystemFieldName( const QString& n ) const;
+ virtual bool drv_isSystemFieldName( const TQString& n ) const;
private:
static const char *keywords[];
diff --git a/kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp b/kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp
index e06adb5eb..89dd8d776 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlkeywords.cpp
@@ -177,7 +177,7 @@ namespace KexiDB {
"MASTER_SSL_KEY",
"MASTER_USER",
"MAX_CONNECTIONS_PER_HOUR",
- "MAX_QUERIES_PER_HOUR",
+ "MAX_TQUERIES_PER_HOUR",
"MAX_ROWS",
"MAX_UPDATES_PER_HOUR",
"MEDIUM",
@@ -229,8 +229,8 @@ namespace KexiDB {
"PROCESS",
"PROCESSLIST",
"PURGE",
- "QUERY",
- "QUICK",
+ "TQUERY",
+ "TQUICK",
"RAID0",
"RAID_CHUNKS",
"RAID_CHUNKSIZE",
@@ -246,7 +246,7 @@ namespace KexiDB {
"REPAIR",
"REPEATABLE",
"REPLICATION",
- "REQUIRE",
+ "RETQUIRE",
"RESET",
"RESTORE",
"RETURNS",
diff --git a/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.cpp b/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.cpp
index 2702626a1..7b245d9a2 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.cpp
+++ b/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.cpp
@@ -143,7 +143,7 @@ bool MySqlPreparedStatement::execute()
else
assert(0); //impl. error
- for (QValueListConstIterator<QVariant> it = m_args.constBegin();
+ for (TQValueListConstIterator<TQVariant> it = m_args.constBegin();
(field = itFields.current()) && arg < m_realParamCount; ++it, ++itFields, arg++)
{
if (it==m_args.constEnd() || (*it).isNull()) {//no value to bind or the value is null: bind NULL
@@ -201,7 +201,7 @@ m_stringBuffer[ 1024 ]; ???
{
//! @todo what about unsigned > LLONG_MAX ?
bool ok;
- Q_LLONG value = (*it).toLongLong(&ok);
+ TQ_LLONG value = (*it).toLongLong(&ok);
if (ok) {
res = sqlite3_bind_int64(prepared_st_handle, arg, value);
if (SQLITE_OK != res) {
@@ -220,7 +220,7 @@ m_stringBuffer[ 1024 ]; ???
}
case KexiDB::Field::Boolean:
res = sqlite3_bind_text(prepared_st_handle, arg,
- QString::number((*it).toBool() ? 1 : 0).latin1(),
+ TQString::number((*it).toBool() ? 1 : 0).latin1(),
1, SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
//! @todo msg?
@@ -256,7 +256,7 @@ m_stringBuffer[ 1024 ]; ???
break;
case KexiDB::Field::BLOB:
{
- const QByteArray byteArray((*it).toByteArray());
+ const TQByteArray byteArray((*it).toByteArray());
res = sqlite3_bind_blob(prepared_st_handle, arg,
(const char*)byteArray, byteArray.size(), SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
diff --git a/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.h b/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.h
index 01478e9e7..14601a8bb 100644
--- a/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.h
+++ b/kexi/kexidb/drivers/mySQL/mysqlpreparedstatement.h
@@ -39,7 +39,7 @@ class MySqlPreparedStatement : public PreparedStatement, public MySqlConnectionI
virtual bool execute();
- QCString m_tempStatementString;
+ TQCString m_tempStatementString;
#ifdef KEXI_USE_MYSQL_STMT
int m_realParamCount;
diff --git a/kexi/kexidb/drivers/odbc/odbcconnection.cpp b/kexi/kexidb/drivers/odbc/odbcconnection.cpp
index ec5a7cdf6..3ac6f0821 100644
--- a/kexi/kexidb/drivers/odbc/odbcconnection.cpp
+++ b/kexi/kexidb/drivers/odbc/odbcconnection.cpp
@@ -23,8 +23,8 @@
#include <sqltypes.h>
//QT Includes
-#include <qfile.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqdir.h>
//KDE Includes
#include <kgenericfactory.h>
@@ -45,7 +45,7 @@ class ODBCConnectionPrivate
{
public:
ConnectionData connData;
- QString currentDB;
+ TQString currentDB;
SQLHENV envHandle;
SQLHDBC connectionHandle;
};
@@ -57,19 +57,19 @@ ODBCConnection::ODBCConnection( Driver *driver, ConnectionData &conn_data )
//d->connData = conn_data;
}
-Cursor* ODBCConnection::prepareQuery(const QString& statement, uint cursor_options)
+Cursor* ODBCConnection::prepareQuery(const TQString& statement, uint cursor_options)
{
Q_UNUSED( statement );
Q_UNUSED( cursor_options );
return 0;
}
-QString ODBCConnection::escapeString(const QString& str) const
+TQString ODBCConnection::escapeString(const TQString& str) const
{
return str;
}
-QCString ODBCConnection::escapeString(const QCString& str) const
+TQCString ODBCConnection::escapeString(const TQCString& str) const
{
return str;
}
@@ -112,17 +112,17 @@ bool ODBCConnection::drv_disconnect()
return true;
}
-bool ODBCConnection::drv_getDatabasesList(QStringList &)
+bool ODBCConnection::drv_getDatabasesList(TQStringList &)
{
return false;
}
-bool ODBCConnection::drv_createDatabase(const QString &)
+bool ODBCConnection::drv_createDatabase(const TQString &)
{
return false;
}
-bool ODBCConnection::drv_useDatabase(const QString &)
+bool ODBCConnection::drv_useDatabase(const TQString &)
{
return false;
}
@@ -132,12 +132,12 @@ bool ODBCConnection::drv_closeDatabase()
return false;
}
-bool ODBCConnection::drv_dropDatabase(const QString &)
+bool ODBCConnection::drv_dropDatabase(const TQString &)
{
return false;
}
-bool ODBCConnection::drv_executeSQL(const QString &)
+bool ODBCConnection::drv_executeSQL(const TQString &)
{
return false;
}
diff --git a/kexi/kexidb/drivers/odbc/odbcconnection.h b/kexi/kexidb/drivers/odbc/odbcconnection.h
index 8f5519050..128eab61c 100644
--- a/kexi/kexidb/drivers/odbc/odbcconnection.h
+++ b/kexi/kexidb/drivers/odbc/odbcconnection.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_CONN_ODBC_H
#define KEXIDB_CONN_ODBC_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/connection.h>
#include <kexidb/tableschema.h>
@@ -39,13 +39,14 @@ class Driver;
class ODBCConnection : public Connection
{
Q_OBJECT
+ TQ_OBJECT
public:
~ODBCConnection();
- virtual Cursor* prepareQuery( const QString& statement = QString::null, uint cursor_options = 0 );
- virtual QString escapeString(const QString& str) const;
- virtual QCString escapeString(const QCString& str) const;
+ virtual Cursor* prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0 );
+ virtual TQString escapeString(const TQString& str) const;
+ virtual TQCString escapeString(const TQCString& str) const;
protected:
/*! Used by driver */
@@ -55,29 +56,29 @@ class ODBCConnection : public Connection
virtual bool drv_disconnect();
- virtual bool drv_getDatabasesList( QStringList &list );
+ virtual bool drv_getDatabasesList( TQStringList &list );
/*! Creates new database using connection. Note: Do not pass \a dbName
arg because for file-based engine (that has one database per connection)
it is defined during connection. */
- virtual bool drv_createDatabase( const QString &dbName = QString::null );
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() );
/*! Opens existing database using connection. Do not pass \a dbName
arg because for file-based engine (that has one database per connection)
it is defined during connection. If you pass it,
database file name will be changed. */
- virtual bool drv_useDatabase( const QString &dbName = QString::null );
+ virtual bool drv_useDatabase( const TQString &dbName = TQString() );
virtual bool drv_closeDatabase();
/*! Drops database from the server using connection.
After drop, database shouldn't be accessible
anymore, so database file is just removed. See note from drv_useDatabase(). */
- virtual bool drv_dropDatabase( const QString &dbName = QString::null );
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() );
//virtual bool drv_createTable( const KexiDB::Table& table );
- virtual bool drv_executeSQL( const QString& statement );
+ virtual bool drv_executeSQL( const TQString& statement );
friend class ODBCDriver;
diff --git a/kexi/kexidb/drivers/odbc/odbcdriver.cpp b/kexi/kexidb/drivers/odbc/odbcdriver.cpp
index aac6a6c95..38e0796e1 100644
--- a/kexi/kexidb/drivers/odbc/odbcdriver.cpp
+++ b/kexi/kexidb/drivers/odbc/odbcdriver.cpp
@@ -18,10 +18,10 @@
*/
//QT Includes
-#include <qfile.h>
-#include <qdir.h>
-#include <qstring.h>
-#include <qcstring.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqstring.h>
+#include <tqcstring.h>
//KDE Includes
#include <kdebug.h>
@@ -39,8 +39,8 @@ using namespace KexiDB;
KEXIDB_DRIVER_INFO( ODBCDriver, odbc )
-ODBCDriver::ODBCDriver( QObject *parent, const char *name, const QStringList &args )
- : Driver( parent, name, args )
+ODBCDriver::ODBCDriver( TQObject *tqparent, const char *name, const TQStringList &args )
+ : Driver( tqparent, name, args )
{
d->isFileDriver = false;
d->isDBOpenedAfterCreate = true;
@@ -76,30 +76,30 @@ KexiDB::Connection* ODBCDriver::drv_createConnection( ConnectionData &conn_data
//return new ODBCConnection( this, conn_data );
}
-bool ODBCDriver::isSystemDatabaseName( const QString& name ) const
+bool ODBCDriver::isSystemDatabaseName( const TQString& name ) const
{
Q_UNUSED( name );
return false;
}
-bool ODBCDriver::isSystemObjectName( const QString& name )
+bool ODBCDriver::isSystemObjectName( const TQString& name )
{
Q_UNUSED( name );
return false;
}
-bool ODBCDriver::isSystemFieldName( const QString& name ) const
+bool ODBCDriver::isSystemFieldName( const TQString& name ) const
{
Q_UNUSED( name );
return false;
}
-QString ODBCDriver::escapeString( const QString& str ) const
+TQString ODBCDriver::escapeString( const TQString& str ) const
{
return str;
}
-QCString ODBCDriver::escapeString( const QCString& str ) const
+TQCString ODBCDriver::escapeString( const TQCString& str ) const
{
return str;
}
diff --git a/kexi/kexidb/drivers/odbc/odbcdriver.h b/kexi/kexidb/drivers/odbc/odbcdriver.h
index 60681f218..c26af43f5 100644
--- a/kexi/kexidb/drivers/odbc/odbcdriver.h
+++ b/kexi/kexidb/drivers/odbc/odbcdriver.h
@@ -23,8 +23,8 @@
//Kexi Includes
#include <kexidb/driver.h>
-class QCString;
-class QString;
+class TQCString;
+class TQString;
namespace KexiDB
{
@@ -41,27 +41,28 @@ class ODBCDriverPrivate;
class ODBCDriver : public Driver
{
Q_OBJECT
+ TQ_OBJECT
KEXIDB_DRIVER
public:
- ODBCDriver( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ ODBCDriver( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() );
~ODBCDriver();
- virtual bool isSystemDatabaseName( const QString& name ) const;
+ virtual bool isSystemDatabaseName( const TQString& name ) const;
/** \return true if n is a system object name;
* \todo Find out what is a system object name and what isn't
*/
- virtual bool isSystemObjectName( const QString& name );
+ virtual bool isSystemObjectName( const TQString& name );
/**
* \return true if \a n is a system field name;
* There aren't any system fields per tables, unless the table
* is a system table
*/
- virtual bool isSystemFieldName( const QString& name ) const;
+ virtual bool isSystemFieldName( const TQString& name ) const;
- virtual QString escapeString( const QString& str ) const;
- virtual QCString escapeString( const QCString& str ) const;
+ virtual TQString escapeString( const TQString& str ) const;
+ virtual TQCString escapeString( const TQCString& str ) const;
protected:
virtual Connection *drv_createConnection( ConnectionData &conn_data );
diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
index 8465bcf43..c81f04adb 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.cpp
@@ -18,8 +18,8 @@
*/
#include "pqxxconnection.h"
-#include <qvariant.h>
-#include <qfile.h>
+#include <tqvariant.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kexidb/error.h>
#include <kexidb/global.h>
@@ -70,7 +70,7 @@ pqxxSqlConnection::~pqxxSqlConnection()
//==================================================================================
//Return a new query based on a query statment
-Cursor* pqxxSqlConnection::prepareQuery( const QString& statement, uint cursor_options)
+Cursor* pqxxSqlConnection::prepareQuery( const TQString& statement, uint cursor_options)
{
Q_UNUSED(cursor_options);
return new pqxxSqlCursor(this, statement, 1); //Always used buffered cursor
@@ -86,9 +86,9 @@ Cursor* pqxxSqlConnection::prepareQuery( QuerySchema& query, uint cursor_options
//==================================================================================
//Properly escaped a database object name
-QString pqxxSqlConnection::escapeName(const QString &name) const
+TQString pqxxSqlConnection::escapeName(const TQString &name) const
{
- return QString("\"" + name + "\"");
+ return TQString("\"" + name + "\"");
}
//==================================================================================
@@ -116,7 +116,7 @@ bool pqxxSqlConnection::drv_disconnect()
//==================================================================================
//Return a list of database names
-bool pqxxSqlConnection::drv_getDatabasesList( QStringList &list )
+bool pqxxSqlConnection::drv_getDatabasesList( TQStringList &list )
{
// KexiDBDrvDbg << "pqxxSqlConnection::drv_getDatabaseList" << endl;
@@ -128,7 +128,7 @@ bool pqxxSqlConnection::drv_getDatabasesList( QStringList &list )
// Read value of column 0 into a string N
c[0].to(N);
// Copy the result into the return list
- list << QString::fromLatin1 (N.c_str());
+ list << TQString::tqfromLatin1 (N.c_str());
}
return true;
}
@@ -138,7 +138,7 @@ bool pqxxSqlConnection::drv_getDatabasesList( QStringList &list )
//==================================================================================
//Create a new database
-bool pqxxSqlConnection::drv_createDatabase( const QString &dbName )
+bool pqxxSqlConnection::drv_createDatabase( const TQString &dbName )
{
KexiDBDrvDbg << "pqxxSqlConnection::drv_createDatabase: " << dbName << endl;
@@ -150,16 +150,16 @@ bool pqxxSqlConnection::drv_createDatabase( const QString &dbName )
//==================================================================================
//Use this as our connection instead of connect
-bool pqxxSqlConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
+bool pqxxSqlConnection::drv_useDatabase( const TQString &dbName, bool *cancelled,
MessageHandler* msgHandler )
{
Q_UNUSED(cancelled);
Q_UNUSED(msgHandler);
KexiDBDrvDbg << "pqxxSqlConnection::drv_useDatabase: " << dbName << endl;
- QString conninfo;
- QString socket;
- QStringList sockets;
+ TQString conninfo;
+ TQString socket;
+ TQStringList sockets;
if (data()->hostName.isEmpty() || data()->hostName == "localhost")
{
@@ -167,9 +167,9 @@ bool pqxxSqlConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
{
sockets.append("/tmp/.s.PGSQL.5432");
- for(QStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++)
+ for(TQStringList::ConstIterator it = sockets.constBegin(); it != sockets.constEnd(); it++)
{
- if(QFile(*it).exists())
+ if(TQFile(*it).exists())
{
socket = (*it);
break;
@@ -190,15 +190,15 @@ bool pqxxSqlConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
if (data()->port == 0)
data()->port = 5432;
- conninfo += QString::fromLatin1(" port='%1'").arg(data()->port);
+ conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(data()->port);
- conninfo += QString::fromLatin1(" dbname='%1'").arg(dbName);
+ conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(dbName);
if (!data()->userName.isNull())
- conninfo += QString::fromLatin1(" user='%1'").arg(data()->userName);
+ conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(data()->userName);
if (!data()->password.isNull())
- conninfo += QString::fromLatin1(" password='%1'").arg(data()->password);
+ conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(data()->password);
try
{
@@ -213,7 +213,7 @@ bool pqxxSqlConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
catch(const std::exception &e)
{
KexiDBDrvDbg << "pqxxSqlConnection::drv_useDatabase:exception - " << e.what() << endl;
- d->errmsg = QString::fromUtf8( e.what() );
+ d->errmsg = TQString::fromUtf8( e.what() );
}
catch(...)
@@ -244,7 +244,7 @@ bool pqxxSqlConnection::drv_closeDatabase()
//==================================================================================
//Drops the given database
-bool pqxxSqlConnection::drv_dropDatabase( const QString &dbName )
+bool pqxxSqlConnection::drv_dropDatabase( const TQString &dbName )
{
KexiDBDrvDbg << "pqxxSqlConnection::drv_dropDatabase: " << dbName << endl;
@@ -257,7 +257,7 @@ bool pqxxSqlConnection::drv_dropDatabase( const QString &dbName )
//==================================================================================
//Execute an SQL statement
-bool pqxxSqlConnection::drv_executeSQL( const QString& statement )
+bool pqxxSqlConnection::drv_executeSQL( const TQString& statement )
{
// KexiDBDrvDbg << "pqxxSqlConnection::drv_executeSQL: " << statement << endl;
bool ok = false;
@@ -299,7 +299,7 @@ bool pqxxSqlConnection::drv_executeSQL( const QString& statement )
catch (const std::exception &e)
{
//If an error ocurred then put the error description into _dbError
- d->errmsg = QString::fromUtf8( e.what() );
+ d->errmsg = TQString::fromUtf8( e.what() );
KexiDBDrvDbg << "pqxxSqlConnection::drv_executeSQL:exception - " << e.what() << endl;
}
catch(...)
@@ -323,7 +323,7 @@ bool pqxxSqlConnection::drv_isDatabaseUsed() const
//==================================================================================
//Return the oid of the last insert - only works if sql was insert of 1 row
-Q_ULLONG pqxxSqlConnection::drv_lastInsertRowID()
+TQ_ULLONG pqxxSqlConnection::drv_lastInsertRowID()
{
if (d->res)
{
@@ -331,7 +331,7 @@ Q_ULLONG pqxxSqlConnection::drv_lastInsertRowID()
if (theOid != pqxx::oid_none)
{
- return (Q_ULLONG)theOid;
+ return (TQ_ULLONG)theOid;
}
else
{
@@ -342,14 +342,14 @@ Q_ULLONG pqxxSqlConnection::drv_lastInsertRowID()
}
//<queries taken from pqxxMigrate>
-bool pqxxSqlConnection::drv_containsTable( const QString &tableName )
+bool pqxxSqlConnection::drv_containsTable( const TQString &tableName )
{
bool success;
- return resultExists(QString("select 1 from pg_class where relkind='r' and relname LIKE %1")
- .arg(driver()->escapeString(tableName)), success) && success;
+ return resultExists(TQString("select 1 from pg_class where relkind='r' and relname LIKE %1")
+ .tqarg(driver()->escapeString(tableName)), success) && success;
}
-bool pqxxSqlConnection::drv_getTablesList( QStringList &list )
+bool pqxxSqlConnection::drv_getTablesList( TQStringList &list )
{
KexiDB::Cursor *cursor;
m_sql = "select lower(relname) from pg_class where relkind='r'";
@@ -385,7 +385,7 @@ bool pqxxSqlConnection::drv_commitTransaction(TransactionData *tdata)
catch (const std::exception &e)
{
//If an error ocurred then put the error description into _dbError
- d->errmsg = QString::fromUtf8( e.what() );
+ d->errmsg = TQString::fromUtf8( e.what() );
result = false;
}
catch (...) {
@@ -407,7 +407,7 @@ bool pqxxSqlConnection::drv_rollbackTransaction(TransactionData *tdata)
catch (const std::exception &e)
{
//If an error ocurred then put the error description into _dbError
- d->errmsg = QString::fromUtf8( e.what() );
+ d->errmsg = TQString::fromUtf8( e.what() );
result = false;
}
@@ -425,9 +425,9 @@ int pqxxSqlConnection::serverResult()
return d->resultCode;
}
-QString pqxxSqlConnection::serverResultName()
+TQString pqxxSqlConnection::serverResultName()
{
- return QString::null;
+ return TQString();
}
void pqxxSqlConnection::drv_clearServerResult()
@@ -435,7 +435,7 @@ void pqxxSqlConnection::drv_clearServerResult()
d->resultCode = 0;
}
-QString pqxxSqlConnection::serverErrorMsg()
+TQString pqxxSqlConnection::serverErrorMsg()
{
return d->errmsg;
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection.h b/kexi/kexidb/drivers/pqxx/pqxxconnection.h
index 85bed42a0..7e7cdf69d 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxconnection.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxconnection.h
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef PQXXCONNECTION_H
-#define PQXXCONNECTION_H
+#ifndef PTQXXCONNECTION_H
+#define PTQXXCONNECTION_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/connection.h>
#include "pqxxcursor.h"
@@ -48,11 +48,12 @@ class pqxxTransactionData : public TransactionData
class pqxxSqlConnection : public Connection
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~pqxxSqlConnection();
- virtual Cursor* prepareQuery( const QString& statement = QString::null, uint cursor_options = 0 );
+ virtual Cursor* prepareQuery( const TQString& statement = TQString(), uint cursor_options = 0 );
virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 );
virtual PreparedStatement::Ptr prepareStatement(PreparedStatement::StatementType type,
FieldList& fields);
@@ -63,19 +64,19 @@ class pqxxSqlConnection : public Connection
virtual bool drv_isDatabaseUsed() const;
virtual bool drv_connect(KexiDB::ServerVersionInfo& version);
virtual bool drv_disconnect();
- virtual bool drv_getDatabasesList( QStringList &list );
- virtual bool drv_createDatabase( const QString &dbName = QString::null );
- virtual bool drv_useDatabase( const QString &dbName = QString::null, bool *cancelled = 0,
+ virtual bool drv_getDatabasesList( TQStringList &list );
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() );
+ virtual bool drv_useDatabase( const TQString &dbName = TQString(), bool *cancelled = 0,
MessageHandler* msgHandler = 0 );
virtual bool drv_closeDatabase();
- virtual bool drv_dropDatabase( const QString &dbName = QString::null );
- virtual bool drv_executeSQL( const QString& statement );
- virtual Q_ULLONG drv_lastInsertRowID();
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() );
+ virtual bool drv_executeSQL( const TQString& statement );
+ virtual TQ_ULLONG drv_lastInsertRowID();
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_getTablesList( QStringList &list );
+ virtual bool drv_getTablesList( TQStringList &list );
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_containsTable( const QString &tableName );
+ virtual bool drv_containsTable( const TQString &tableName );
virtual TransactionData* drv_beginTransaction();
virtual bool drv_commitTransaction(TransactionData *);
@@ -83,13 +84,13 @@ class pqxxSqlConnection : public Connection
//Error reporting
virtual int serverResult();
- virtual QString serverResultName();
+ virtual TQString serverResultName();
virtual void drv_clearServerResult();
- virtual QString serverErrorMsg();
+ virtual TQString serverErrorMsg();
pqxxSqlConnectionInternal *d;
private:
- QString escapeName(const QString &tn) const;
+ TQString escapeName(const TQString &tn) const;
// pqxx::transaction_base* m_trans;
//! temporary solution for executeSQL()...
pqxxTransactionData *m_trans;
diff --git a/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h b/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h
index 0c78e583f..2d33e4109 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxconnection_p.h
@@ -27,8 +27,8 @@
// Copyright: See COPYING file that comes with this distribution
//
//
-#ifndef PQXXSQLCONNECTIONINTERNAL_H
-#define PQXXSQLCONNECTIONINTERNAL_H
+#ifndef PTQXXSQLCONNECTIONINTERNAL_H
+#define PTQXXSQLCONNECTIONINTERNAL_H
#include <kexidb/connection_p.h>
#include <pqxx/pqxx>
@@ -56,7 +56,7 @@ class pqxxSqlConnectionInternal : public ConnectionInternal
KexiDB::ServerVersionInfo *version; //!< this is set in drv_connect(), so we can use it in drv_useDatabase()
//!< because pgsql really connects after "USE".
- QString errmsg; //!< server-specific message of last operation
+ TQString errmsg; //!< server-specific message of last operation
int resultCode; //!< result code of last operation on server
};
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
index 0004cf922..afcad0473 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.cpp
@@ -34,17 +34,17 @@ using namespace KexiDB;
unsigned int pqxxSqlCursor_trans_num=0; //!< debug helper
-static QByteArray pgsqlByteaToByteArray(const pqxx::result::field& r)
+static TQByteArray pgsqlByteaToByteArray(const pqxx::result::field& r)
{
return KexiDB::pgsqlByteaToByteArray(r.c_str(), r.size());
}
//==================================================================================
//Constructor based on query statement
-pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const QString& statement, uint options):
+pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const TQString& statement, uint options):
Cursor(conn,statement, options)
{
-// KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query statement" << endl;
+// KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query statement" << endl;
my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
m_options = Buffered;
m_res = 0;
@@ -57,7 +57,7 @@ pqxxSqlCursor::pqxxSqlCursor(KexiDB::Connection* conn, const QString& statement,
pqxxSqlCursor::pqxxSqlCursor(Connection* conn, QuerySchema& query, uint options )
: Cursor( conn, query, options )
{
-// KexiDBDrvDbg << "PQXXSQLCURSOR: constructor for query schema" << endl;
+// KexiDBDrvDbg << "PTQXXSQLCURSOR: constructor for query schema" << endl;
my_conn = static_cast<pqxxSqlConnection*>(conn)->d->pqxxsql;
m_options = Buffered;
m_res = 0;
@@ -86,7 +86,7 @@ bool pqxxSqlCursor::drv_open()
return false;
}
- QCString cur_name;
+ TQCString cur_name;
//Set up a transaction
try
{
@@ -117,8 +117,8 @@ bool pqxxSqlCursor::drv_open()
}
catch (const std::exception &e)
{
- setError(ERR_DB_SPECIFIC, QString::fromUtf8( e.what()) );
- KexiDBDrvWarn << "pqxxSqlCursor::drv_open:exception - " << QString::fromUtf8( e.what() ) << endl;
+ setError(ERR_DB_SPECIFIC, TQString::fromUtf8( e.what()) );
+ KexiDBDrvWarn << "pqxxSqlCursor::drv_open:exception - " << TQString::fromUtf8( e.what() ) << endl;
}
catch(...)
{
@@ -193,31 +193,31 @@ void pqxxSqlCursor::drv_getPrevRecord()
//==================================================================================
//Return the value for a given column for the current record
-QVariant pqxxSqlCursor::value(uint pos)
+TQVariant pqxxSqlCursor::value(uint pos)
{
if (pos < m_fieldCount)
return pValue(pos);
else
- return QVariant();
+ return TQVariant();
}
//==================================================================================
//Return the value for a given column for the current record - Private const version
-QVariant pqxxSqlCursor::pValue(uint pos)const
+TQVariant pqxxSqlCursor::pValue(uint pos)const
{
if (m_res->size() <= 0)
{
KexiDBDrvWarn << "pqxxSqlCursor::value - ERROR: result size not greater than 0" << endl;
- return QVariant();
+ return TQVariant();
}
if (pos>=(m_fieldCount+(m_containsROWIDInfo ? 1 : 0)))
{
// KexiDBDrvWarn << "pqxxSqlCursor::value - ERROR: requested position is greater than the number of fields" << endl;
- return QVariant();
+ return TQVariant();
}
- KexiDB::Field *f = (m_fieldsExpanded && pos<QMIN(m_fieldsExpanded->count(), m_fieldCount))
+ KexiDB::Field *f = (m_fieldsExpanded && pos<TQMIN(m_fieldsExpanded->count(), m_fieldCount))
? m_fieldsExpanded->at(pos)->field : 0;
// KexiDBDrvDbg << "pqxxSqlCursor::value(" << pos << ")" << endl;
@@ -231,7 +231,7 @@ QVariant pqxxSqlCursor::pValue(uint pos)const
}
else if (f->isTextType())
{
- return QString::fromUtf8((*m_res)[at()][pos].c_str()); //utf8?
+ return TQString::fromUtf8((*m_res)[at()][pos].c_str()); //utf8?
}
else if (f->isFPNumericType())
{
@@ -249,7 +249,7 @@ QVariant pqxxSqlCursor::pValue(uint pos)const
return pgsqlCStrToVariant((*m_res)[at()][pos]);
}
- return QString::fromUtf8((*m_res)[at()][pos].c_str(), (*m_res)[at()][pos].size()); //utf8?
+ return TQString::fromUtf8((*m_res)[at()][pos].c_str(), (*m_res)[at()][pos].size()); //utf8?
}
//==================================================================================
@@ -332,7 +332,7 @@ void pqxxSqlCursor::drv_bufferMovePointerPrev()
//==================================================================================
//Move internal pointer to internal buffer to N
//Implementation required but no need in this driver
-void pqxxSqlCursor::drv_bufferMovePointerTo(Q_LLONG to)
+void pqxxSqlCursor::drv_bufferMovePointerTo(TQ_LLONG to)
{
Q_UNUSED(to);
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxcursor.h b/kexi/kexidb/drivers/pqxx/pqxxcursor.h
index d596acca2..637a33f39 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxcursor.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxcursor.h
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIDB_CURSOR_PQXX_H
-#define KEXIDB_CURSOR_PQXX_H
+#ifndef KEXIDB_CURSOR_PTQXX_H
+#define KEXIDB_CURSOR_PTQXX_H
#include <kexidb/cursor.h>
#include <kexidb/connection.h>
@@ -39,7 +39,7 @@ class pqxxSqlCursor: public Cursor {
public:
virtual ~pqxxSqlCursor();
- virtual QVariant value(uint i);
+ virtual TQVariant value(uint i);
virtual const char** rowData() const;
virtual void storeCurrentRow(RowData &data) const;
@@ -47,18 +47,18 @@ public:
//TODO virtual int serverResult() const;
-//TODO virtual QString serverResultName() const;
+//TODO virtual TQString serverResultName() const;
-//TODO virtual QString serverErrorMsg() const;
+//TODO virtual TQString serverErrorMsg() const;
protected:
- pqxxSqlCursor(Connection* conn, const QString& statement = QString::null, uint options = NoOptions );
+ pqxxSqlCursor(Connection* conn, const TQString& statement = TQString(), uint options = NoOptions );
pqxxSqlCursor(Connection* conn, QuerySchema& query, uint options = NoOptions );
virtual void drv_clearServerResult();
virtual void drv_appendCurrentRecordToBuffer();
virtual void drv_bufferMovePointerNext();
virtual void drv_bufferMovePointerPrev();
- virtual void drv_bufferMovePointerTo(Q_LLONG to);
+ virtual void drv_bufferMovePointerTo(TQ_LLONG to);
virtual bool drv_open();
virtual bool drv_close();
virtual void drv_getNextRecord();
@@ -68,18 +68,18 @@ private:
pqxx::result* m_res;
// pqxx::nontransaction* m_tran;
pqxx::connection* my_conn;
- QVariant pValue(uint pos)const;
+ TQVariant pValue(uint pos)const;
bool m_implicityStarted : 1;
- //QByteArray processBinaryData(pqxx::binarystring*) const;
+ //TQByteArray processBinaryData(pqxx::binarystring*) const;
friend class pqxxSqlConnection;
};
-inline QVariant pgsqlCStrToVariant(const pqxx::result::field& r)
+inline TQVariant pgsqlCStrToVariant(const pqxx::result::field& r)
{
switch(r.type())
{
case BOOLOID:
- return QString::fromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting
+ return TQString::tqfromLatin1(r.c_str(), r.size())=="true"; //TODO check formatting
case INT2OID:
case INT4OID:
case INT8OID:
@@ -89,19 +89,19 @@ inline QVariant pgsqlCStrToVariant(const pqxx::result::field& r)
case NUMERICOID:
return r.as(double());
case DATEOID:
- return QString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
+ return TQString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
case TIMEOID:
- return QString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
+ return TQString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
case TIMESTAMPOID:
- return QString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
+ return TQString::fromUtf8(r.c_str(), r.size()); //TODO check formatting
case BYTEAOID:
return KexiDB::pgsqlByteaToByteArray(r.c_str(), r.size());
case BPCHAROID:
case VARCHAROID:
case TEXTOID:
- return QString::fromUtf8(r.c_str(), r.size()); //utf8?
+ return TQString::fromUtf8(r.c_str(), r.size()); //utf8?
default:
- return QString::fromUtf8(r.c_str(), r.size()); //utf8?
+ return TQString::fromUtf8(r.c_str(), r.size()); //utf8?
}
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp
index d8e6216d1..3d9162ca5 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp
+++ b/kexi/kexidb/drivers/pqxx/pqxxdriver.cpp
@@ -33,8 +33,8 @@ KEXIDB_DRIVER_INFO( pqxxSqlDriver, pqxxsql )
//==================================================================================
//
-pqxxSqlDriver::pqxxSqlDriver( QObject *parent, const char *name, const QStringList &args )
- : Driver( parent, name, args )
+pqxxSqlDriver::pqxxSqlDriver( TQObject *tqparent, const char *name, const TQStringList &args )
+ : Driver( tqparent, name, args )
{
d->isFileDriver = false;
d->features = SingleTransactions | CursorForward | CursorBackward;
@@ -47,7 +47,7 @@ pqxxSqlDriver::pqxxSqlDriver( QObject *parent, const char *name, const QStringLi
beh->AUTO_INCREMENT_FIELD_OPTION = "";
beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
beh->ALWAYS_AVAILABLE_DATABASE_NAME = "template1";
- beh->QUOTATION_MARKS_FOR_IDENTIFIER = '"';
+ beh->TQUOTATION_MARKS_FOR_IDENTIFIER = '"';
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(233);
@@ -72,7 +72,7 @@ pqxxSqlDriver::pqxxSqlDriver( QObject *parent, const char *name, const QStringLi
//==================================================================================
//Override the default implementation to allow for NUMERIC type natively
-QString pqxxSqlDriver::sqlTypeName(int id_t, int p) const
+TQString pqxxSqlDriver::sqlTypeName(int id_t, int p) const
{
if (id_t==Field::Null)
return "NULL";
@@ -110,69 +110,69 @@ pqxxSqlDriver::drv_createConnection( ConnectionData &conn_data )
//==================================================================================
//
-bool pqxxSqlDriver::isSystemObjectName( const QString& n ) const
+bool pqxxSqlDriver::isSystemObjectName( const TQString& n ) const
{
return Driver::isSystemObjectName(n);
}
//==================================================================================
//
-bool pqxxSqlDriver::drv_isSystemFieldName( const QString& ) const
+bool pqxxSqlDriver::drv_isSystemFieldName( const TQString& ) const
{
return false;
}
//==================================================================================
//
-bool pqxxSqlDriver::isSystemDatabaseName( const QString& n ) const
+bool pqxxSqlDriver::isSystemDatabaseName( const TQString& n ) const
{
return n.lower()=="template1" || n.lower()=="template0";
}
//==================================================================================
//
-QString pqxxSqlDriver::escapeString( const QString& str) const
+TQString pqxxSqlDriver::escapeString( const TQString& str) const
{
- return QString::fromLatin1("'")
- + QString::fromAscii( pqxx::sqlesc(std::string(str.utf8())).c_str() )
- + QString::fromLatin1("'");
+ return TQString::tqfromLatin1("'")
+ + TQString::fromAscii( pqxx::sqlesc(std::string(str.utf8())).c_str() )
+ + TQString::tqfromLatin1("'");
}
//==================================================================================
//
-QCString pqxxSqlDriver::escapeString( const QCString& str) const
+TQCString pqxxSqlDriver::escapeString( const TQCString& str) const
{
- return QCString("'")
- + QCString( pqxx::sqlesc(QString(str).ascii()).c_str() )
- + QCString("'");
+ return TQCString("'")
+ + TQCString( pqxx::sqlesc(TQString(str).ascii()).c_str() )
+ + TQCString("'");
}
//==================================================================================
//
-QString pqxxSqlDriver::drv_escapeIdentifier( const QString& str) const {
- return QString(str).replace( '"', "\"\"" );
+TQString pqxxSqlDriver::drv_escapeIdentifier( const TQString& str) const {
+ return TQString(str).tqreplace( '"', "\"\"" );
}
//==================================================================================
//
-QCString pqxxSqlDriver::drv_escapeIdentifier( const QCString& str) const {
- return QCString(str).replace( '"', "\"\"" );
+TQCString pqxxSqlDriver::drv_escapeIdentifier( const TQCString& str) const {
+ return TQCString(str).tqreplace( '"', "\"\"" );
}
//==================================================================================
//
-QString pqxxSqlDriver::escapeBLOB(const QByteArray& array) const
+TQString pqxxSqlDriver::escapeBLOB(const TQByteArray& array) const
{
return KexiDB::escapeBLOB(array, KexiDB::BLOBEscapeOctal);
}
-QString pqxxSqlDriver::valueToSQL( uint ftype, const QVariant& v ) const
+TQString pqxxSqlDriver::valueToSQL( uint ftype, const TQVariant& v ) const
{
if (ftype==Field::Boolean) {
// use SQL compliant TRUE or FALSE as described here
// http://www.postgresql.org/docs/8.0/interactive/datatype-boolean.html
// 1 or 0 does not work
- return v.toInt()==0 ? QString::fromLatin1("FALSE") : QString::fromLatin1("TRUE");
+ return v.toInt()==0 ? TQString::tqfromLatin1("FALSE") : TQString::tqfromLatin1("TRUE");
}
return Driver::valueToSQL(ftype, v);
}
diff --git a/kexi/kexidb/drivers/pqxx/pqxxdriver.h b/kexi/kexidb/drivers/pqxx/pqxxdriver.h
index bbfdddc3e..779c13686 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxdriver.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxdriver.h
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIDB_DRIVER_PQXX_H
-#define KEXIDB_DRIVER_PQXX_H
+#ifndef KEXIDB_DRIVER_PTQXX_H
+#define KEXIDB_DRIVER_PTQXX_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/driver.h>
@@ -34,33 +34,34 @@ class DriverManager;
class pqxxSqlDriver : public Driver
{
Q_OBJECT
+ TQ_OBJECT
KEXIDB_DRIVER
public:
- pqxxSqlDriver( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ pqxxSqlDriver( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() );
~pqxxSqlDriver();
- virtual bool isSystemObjectName( const QString& n )const;
- virtual bool isSystemDatabaseName( const QString& n )const;
+ virtual bool isSystemObjectName( const TQString& n )const;
+ virtual bool isSystemDatabaseName( const TQString& n )const;
//! Escape a string for use as a value
- virtual QString escapeString( const QString& str) const;
- virtual QCString escapeString( const QCString& str) const;
- virtual QString sqlTypeName(int id_t, int p=0) const;
+ virtual TQString escapeString( const TQString& str) const;
+ virtual TQCString escapeString( const TQCString& str) const;
+ virtual TQString sqlTypeName(int id_t, int p=0) const;
//! Escape BLOB value \a array
- virtual QString escapeBLOB(const QByteArray& array) const;
+ virtual TQString escapeBLOB(const TQByteArray& array) const;
/*! Escapes and converts value \a v (for type \a ftype)
to string representation required by SQL commands.
Reimplemented for boolean type only to use SQL compliant TRUE or FALSE */
- virtual QString valueToSQL( uint ftype, const QVariant& v ) const;
+ virtual TQString valueToSQL( uint ftype, const TQVariant& v ) const;
protected:
- virtual QString drv_escapeIdentifier( const QString& str) const;
- virtual QCString drv_escapeIdentifier( const QCString& str) const;
+ virtual TQString drv_escapeIdentifier( const TQString& str) const;
+ virtual TQCString drv_escapeIdentifier( const TQCString& str) const;
virtual Connection *drv_createConnection( ConnectionData &conn_data );
- virtual bool drv_isSystemFieldName( const QString& n )const;
+ virtual bool drv_isSystemFieldName( const TQString& n )const;
private:
static const char *keywords[];
diff --git a/kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h b/kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h
index 232454d3b..1421f5a43 100644
--- a/kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h
+++ b/kexi/kexidb/drivers/pqxx/pqxxpreparedstatement.h
@@ -22,8 +22,8 @@
// Description:
//
//
-#ifndef PQXXPREPAREDSTATEMENT_H
-#define PQXXPREPAREDSTATEMENT_H
+#ifndef PTQXXPREPAREDSTATEMENT_H
+#define PTQXXPREPAREDSTATEMENT_H
#include <kexidb/preparedstatement.h>
#include <kexidb/connection_p.h>
diff --git a/kexi/kexidb/drivers/sqlite/sqlite_common.pro b/kexi/kexidb/drivers/sqlite/sqlite_common.pro
index 81fb85b3f..7770eb9d6 100644
--- a/kexi/kexidb/drivers/sqlite/sqlite_common.pro
+++ b/kexi/kexidb/drivers/sqlite/sqlite_common.pro
@@ -2,7 +2,7 @@ include( ../common.pro )
DEFINES += MAKE_KEXIDB_SQLITE_DRIVER_LIB
-system( bash kmoc )
+system( bash ktqmoc )
SOURCES = \
sqliteconnection.cpp \
diff --git a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
index 8bd8085a9..14d2217a4 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqliteadmin.cpp
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
+#include <tqdir.h>
#include "sqliteadmin.h"
#include <kexidb/drivermanager.h>
@@ -36,7 +36,7 @@ SQLiteAdminTools::~SQLiteAdminTools()
{
}
-bool SQLiteAdminTools::vacuum(const KexiDB::ConnectionData& data, const QString& databaseName)
+bool SQLiteAdminTools::vacuum(const KexiDB::ConnectionData& data, const TQString& databaseName)
{
clearError();
#ifdef SQLITE2
@@ -46,12 +46,12 @@ bool SQLiteAdminTools::vacuum(const KexiDB::ConnectionData& data, const QString&
#else
KexiDB::DriverManager manager;
KexiDB::Driver *drv = manager.driver(data.driverName);
- QString title( i18n("Could not compact database \"%1\".").arg(QDir::convertSeparators(databaseName)) );
+ TQString title( i18n("Could not compact database \"%1\".").tqarg(TQDir::convertSeparators(databaseName)) );
if (!drv) {
setError(&manager, title);
return false;
}
- SQLiteVacuum vacuum(data.dbPath()+QDir::separator()+databaseName);
+ SQLiteVacuum vacuum(data.dbPath()+TQDir::separator()+databaseName);
tristate result = vacuum.run();
if (!result) {
setError(title);
diff --git a/kexi/kexidb/drivers/sqlite/sqliteadmin.h b/kexi/kexidb/drivers/sqlite/sqliteadmin.h
index d9f8a6b61..2f9db6c94 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteadmin.h
+++ b/kexi/kexidb/drivers/sqlite/sqliteadmin.h
@@ -30,7 +30,7 @@ class SQLiteAdminTools : public KexiDB::AdminTools
virtual ~SQLiteAdminTools();
/*! Performs vacuum (compacting) for connection \a conn. */
- virtual bool vacuum(const KexiDB::ConnectionData& data, const QString& databaseName);
+ virtual bool vacuum(const KexiDB::ConnectionData& data, const TQString& databaseName);
};
#endif
diff --git a/kexi/kexidb/drivers/sqlite/sqlitealter.cpp b/kexi/kexidb/drivers/sqlite/sqlitealter.cpp
index cc72e48ad..c1903efa3 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitealter.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitealter.cpp
@@ -24,7 +24,7 @@
#include <kstaticdeleter.h>
-#include <qmap.h>
+#include <tqmap.h>
using namespace KexiDB;
@@ -33,15 +33,15 @@ enum SQLiteTypeAffinity { //as defined here: 2.1 Determination Of Column Affinit
};
//! helper for affinityForType()
-static KStaticDeleter< QMap<int,int> > KexiDB_SQLite_affinityForType_deleter;
-QMap<int,int> *KexiDB_SQLite_affinityForType = 0;
+static KStaticDeleter< TQMap<int,int> > KexiDB_SQLite_affinityForType_deleter;
+TQMap<int,int> *KexiDB_SQLite_affinityForType = 0;
//! \return SQLite type affinity for \a type
//! See doc/dev/alter_table_type_conversions.ods, page 2 for more info
static SQLiteTypeAffinity affinityForType(Field::Type type)
{
if (!KexiDB_SQLite_affinityForType) {
- KexiDB_SQLite_affinityForType_deleter.setObject( KexiDB_SQLite_affinityForType, new QMap<int,int>() );
+ KexiDB_SQLite_affinityForType_deleter.setObject( KexiDB_SQLite_affinityForType, new TQMap<int,int>() );
KexiDB_SQLite_affinityForType->insert(Field::Byte, IntAffinity);
KexiDB_SQLite_affinityForType->insert(Field::ShortInteger, IntAffinity);
KexiDB_SQLite_affinityForType->insert(Field::Integer, IntAffinity);
@@ -60,7 +60,7 @@ static SQLiteTypeAffinity affinityForType(Field::Type type)
}
tristate SQLiteConnection::drv_changeFieldProperty(TableSchema &table, Field& field,
- const QString& propertyName, const QVariant& value)
+ const TQString& propertyName, const TQVariant& value)
{
/* if (propertyName=="name") {
diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
index 6de41c59e..27f190b8e 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.cpp
@@ -33,9 +33,9 @@
#include <kexidb/error.h>
#include <kexiutils/utils.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
#include <kgenericfactory.h>
#include <kdebug.h>
@@ -103,8 +103,8 @@ SQLiteConnection::~SQLiteConnection()
bool SQLiteConnection::drv_connect(KexiDB::ServerVersionInfo& version)
{
KexiDBDrvDbg << "SQLiteConnection::connect()" << endl;
- version.string = QString(SQLITE_VERSION); //defined in sqlite3.h
- QRegExp re("(\\d+)\\.(\\d+)\\.(\\d+)");
+ version.string = TQString(SQLITE_VERSION); //defined in sqlite3.h
+ TQRegExp re("(\\d+)\\.(\\d+)\\.(\\d+)");
if (re.exactMatch(version.string)) {
version.major = re.cap(1).toUInt();
version.minor = re.cap(2).toUInt();
@@ -119,21 +119,21 @@ bool SQLiteConnection::drv_disconnect()
return true;
}
-bool SQLiteConnection::drv_getDatabasesList( QStringList &list )
+bool SQLiteConnection::drv_getDatabasesList( TQStringList &list )
{
//this is one-db-per-file database
list.append( data()->fileName() ); //more consistent than dbFileName() ?
return true;
}
-bool SQLiteConnection::drv_containsTable( const QString &tableName )
+bool SQLiteConnection::drv_containsTable( const TQString &tableName )
{
bool success;
- return resultExists(QString("select name from sqlite_master where type='table' and name LIKE %1")
- .arg(driver()->escapeString(tableName)), success) && success;
+ return resultExists(TQString("select name from sqlite_master where type='table' and name LIKE %1")
+ .tqarg(driver()->escapeString(tableName)), success) && success;
}
-bool SQLiteConnection::drv_getTablesList( QStringList &list )
+bool SQLiteConnection::drv_getTablesList( TQStringList &list )
{
KexiDB::Cursor *cursor;
m_sql = "select lower(name) from sqlite_master where type='table'";
@@ -154,19 +154,19 @@ bool SQLiteConnection::drv_getTablesList( QStringList &list )
return deleteCursor(cursor);
}
-bool SQLiteConnection::drv_createDatabase( const QString &dbName )
+bool SQLiteConnection::drv_createDatabase( const TQString &dbName )
{
// SQLite creates a new db is it does not exist
return drv_useDatabase(dbName);
#if 0
- d->data = sqlite_open( QFile::encodeName( data()->fileName() ), 0/*mode: unused*/,
+ d->data = sqlite_open( TQFile::encodeName( data()->fileName() ), 0/*mode: unused*/,
&d->errmsg_p );
d->storeResult();
return d->data != 0;
#endif
}
-bool SQLiteConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
+bool SQLiteConnection::drv_useDatabase( const TQString &dbName, bool *cancelled,
MessageHandler* msgHandler )
{
Q_UNUSED(dbName);
@@ -174,7 +174,7 @@ bool SQLiteConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
#ifdef SQLITE2
Q_UNUSED(cancelled);
Q_UNUSED(msgHandler);
- d->data = sqlite_open( QFile::encodeName( data()->fileName() ), 0/*mode: unused*/,
+ d->data = sqlite_open( TQFile::encodeName( data()->fileName() ), 0/*mode: unused*/,
&d->errmsg_p );
d->storeResult();
return d->data != 0;
@@ -187,8 +187,8 @@ bool SQLiteConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
const bool wasReadOnly = Connection::isReadOnly();
d->res = sqlite3_open(
- //QFile::encodeName( data()->fileName() ),
- data()->fileName().utf8(), /* unicode expected since SQLite 3.1 */
+ //TQFile::encodeName( data()->fileName() ),
+ data()->fileName().utf8(), /* tqunicode expected since SQLite 3.1 */
&d->data,
exclusiveFlag,
allowReadonly /* If 1 and locking fails, try opening in read-only mode */
@@ -200,7 +200,7 @@ bool SQLiteConnection::drv_useDatabase( const QString &dbName, bool *cancelled,
if (KMessageBox::Continue !=
askQuestion(
i18n("Do you want to open file \"%1\" as read-only?")
- .arg(QDir::convertSeparators(data()->fileName()))
+ .tqarg(TQDir::convertSeparators(data()->fileName()))
+ "\n\n"
+ i18n("The file is probably already open on this or another computer.") + " "
+ i18n("Could not gain exclusive access for writing the file."),
@@ -258,21 +258,21 @@ bool SQLiteConnection::drv_closeDatabase()
#endif
}
-bool SQLiteConnection::drv_dropDatabase( const QString &dbName )
+bool SQLiteConnection::drv_dropDatabase( const TQString &dbName )
{
Q_UNUSED(dbName); // Each database is one single SQLite file.
- const QString filename = data()->fileName();
- if (QFile(filename).exists() && !QDir().remove(filename)) {
+ const TQString filename = data()->fileName();
+ if (TQFile(filename).exists() && !TQDir().remove(filename)) {
setError(ERR_ACCESS_RIGHTS, i18n("Could not remove file \"%1\".")
- .arg(QDir::convertSeparators(filename)) + " "
+ .tqarg(TQDir::convertSeparators(filename)) + " "
+ i18n("Check the file's permissions and whether it is already opened and locked by another application."));
return false;
}
return true;
}
-//CursorData* SQLiteConnection::drv_createCursor( const QString& statement )
-Cursor* SQLiteConnection::prepareQuery( const QString& statement, uint cursor_options )
+//CursorData* SQLiteConnection::drv_createCursor( const TQString& statement )
+Cursor* SQLiteConnection::prepareQuery( const TQString& statement, uint cursor_options )
{
return new SQLiteCursor( this, statement, cursor_options );
}
@@ -282,10 +282,10 @@ Cursor* SQLiteConnection::prepareQuery( QuerySchema& query, uint cursor_options
return new SQLiteCursor( this, query, cursor_options );
}
-bool SQLiteConnection::drv_executeSQL( const QString& statement )
+bool SQLiteConnection::drv_executeSQL( const TQString& statement )
{
// KexiDBDrvDbg << "SQLiteConnection::drv_executeSQL(" << statement << ")" <<endl;
-// QCString st(statement.length()*2);
+// TQCString st(statement.length()*2);
// st = escapeString( statement.local8Bit() ); //?
#ifdef SQLITE_UTF8
d->temp_st = statement.utf8();
@@ -294,7 +294,7 @@ bool SQLiteConnection::drv_executeSQL( const QString& statement )
#endif
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addKexiDBDebug(QString("ExecuteSQL (SQLite): ")+statement);
+ KexiUtils::addKexiDBDebug(TQString("ExecuteSQL (SQLite): ")+statement);
#endif
d->res = sqlite_exec(
@@ -310,9 +310,9 @@ bool SQLiteConnection::drv_executeSQL( const QString& statement )
return d->res==SQLITE_OK;
}
-Q_ULLONG SQLiteConnection::drv_lastInsertRowID()
+TQ_ULLONG SQLiteConnection::drv_lastInsertRowID()
{
- return (Q_ULLONG)sqlite_last_insert_rowid(d->data);
+ return (TQ_ULLONG)sqlite_last_insert_rowid(d->data);
}
int SQLiteConnection::serverResult()
@@ -320,13 +320,13 @@ int SQLiteConnection::serverResult()
return d->res==0 ? Connection::serverResult() : d->res;
}
-QString SQLiteConnection::serverResultName()
+TQString SQLiteConnection::serverResultName()
{
- QString r =
+ TQString r =
#ifdef SQLITE2
- QString::fromLatin1( sqlite_error_string(d->res) );
+ TQString::tqfromLatin1( sqlite_error_string(d->res) );
#else //SQLITE3
- QString::null; //fromLatin1( d->result_name );
+ TQString(); //tqfromLatin1( d->result_name );
#endif
return r.isEmpty() ? Connection::serverResultName() : r;
}
@@ -343,7 +343,7 @@ void SQLiteConnection::drv_clearServerResult()
#endif
}
-QString SQLiteConnection::serverErrorMsg()
+TQString SQLiteConnection::serverErrorMsg()
{
return d->errmsg.isEmpty() ? Connection::serverErrorMsg() : d->errmsg;
}
@@ -366,14 +366,14 @@ bool SQLiteConnection::isReadOnly() const
}
#ifdef SQLITE2
-bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const QString& newName, bool replace)
+bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const TQString& newName, bool tqreplace)
{
- const QString oldTableName = tableSchema.name();
+ const TQString oldTableName = tableSchema.name();
const bool destTableExists = this->tableSchema( newName ) != 0;
//1. drop the table
if (destTableExists) {
- if (!replace)
+ if (!tqreplace)
return false;
if (!drv_dropTable( newName ))
return false;
@@ -395,8 +395,8 @@ bool SQLiteConnection::drv_alterTableName(TableSchema& tableSchema, const QStrin
//TODO indices, etc.???
// 3. copy all rows to the new table
- if (!executeSQL(QString::fromLatin1("INSERT INTO %1 SELECT * FROM %2")
- .arg(escapeIdentifier(tableSchema.name())).arg(escapeIdentifier(oldTableName))))
+ if (!executeSQL(TQString::tqfromLatin1("INSERT INTO %1 SELECT * FROM %2")
+ .tqarg(escapeIdentifier(tableSchema.name())).tqarg(escapeIdentifier(oldTableName))))
{
drv_alterTableName_ERR;
return false;
diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection.h b/kexi/kexidb/drivers/sqlite/sqliteconnection.h
index ba0d3b5a6..922e8447a 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteconnection.h
+++ b/kexi/kexidb/drivers/sqlite/sqliteconnection.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_CONN_SQLITE_H
#define KEXIDB_CONN_SQLITE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/connection.h>
@@ -37,11 +37,12 @@ class Driver;
class SQLiteConnection : public Connection
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~SQLiteConnection();
- virtual Cursor* prepareQuery( const QString& statement, uint cursor_options = 0 );
+ virtual Cursor* prepareQuery( const TQString& statement, uint cursor_options = 0 );
virtual Cursor* prepareQuery( QuerySchema& query, uint cursor_options = 0 );
//#ifndef SQLITE2 //TEMP IFDEF!
@@ -57,24 +58,24 @@ class SQLiteConnection : public Connection
virtual bool drv_connect(KexiDB::ServerVersionInfo& version);
virtual bool drv_disconnect();
- virtual bool drv_getDatabasesList( QStringList &list );
+ virtual bool drv_getDatabasesList( TQStringList &list );
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_getTablesList( QStringList &list );
+ virtual bool drv_getTablesList( TQStringList &list );
//TODO: move this somewhere to low level class (MIGRATION?)
- virtual bool drv_containsTable( const QString &tableName );
+ virtual bool drv_containsTable( const TQString &tableName );
/*! Creates new database using connection. Note: Do not pass \a dbName
arg because for file-based engine (that has one database per connection)
it is defined during connection. */
- virtual bool drv_createDatabase( const QString &dbName = QString::null );
+ virtual bool drv_createDatabase( const TQString &dbName = TQString() );
/*! Opens existing database using connection. Do not pass \a dbName
arg because for file-based engine (that has one database per connection)
it is defined during connection. If you pass it,
database file name will be changed. */
- virtual bool drv_useDatabase( const QString &dbName = QString::null, bool *cancelled = 0,
+ virtual bool drv_useDatabase( const TQString &dbName = TQString(), bool *cancelled = 0,
MessageHandler* msgHandler = 0 );
virtual bool drv_closeDatabase();
@@ -82,21 +83,21 @@ class SQLiteConnection : public Connection
/*! Drops database from the server using connection.
After drop, database shouldn't be accessible
anymore, so database file is just removed. See note from drv_useDatabase(). */
- virtual bool drv_dropDatabase( const QString &dbName = QString::null );
+ virtual bool drv_dropDatabase( const TQString &dbName = TQString() );
//virtual bool drv_createTable( const KexiDB::Table& table );
- virtual bool drv_executeSQL( const QString& statement );
-// virtual bool drv_executeQuery( const QString& statement );
+ virtual bool drv_executeSQL( const TQString& statement );
+// virtual bool drv_executeQuery( const TQString& statement );
- virtual Q_ULLONG drv_lastInsertRowID();
+ virtual TQ_ULLONG drv_lastInsertRowID();
virtual int serverResult();
- virtual QString serverResultName();
- virtual QString serverErrorMsg();
+ virtual TQString serverResultName();
+ virtual TQString serverErrorMsg();
virtual void drv_clearServerResult();
virtual tristate drv_changeFieldProperty(TableSchema &table, Field& field,
- const QString& propertyName, const QVariant& value);
+ const TQString& propertyName, const TQVariant& value);
#ifdef SQLITE2
/*! Alters table's described \a tableSchema name to \a newName.
@@ -108,7 +109,7 @@ class SQLiteConnection : public Connection
\return true on success.
More advanced server backends implement this using "ALTER TABLE .. RENAME TO".
*/
- virtual bool drv_alterTableName(TableSchema& tableSchema, const QString& newName, bool replace = false);
+ virtual bool drv_alterTableName(TableSchema& tableSchema, const TQString& newName, bool tqreplace = false);
#endif
//! for drv_changeFieldProperty()
diff --git a/kexi/kexidb/drivers/sqlite/sqliteconnection_p.h b/kexi/kexidb/drivers/sqlite/sqliteconnection_p.h
index f295573d4..4918c7591 100644
--- a/kexi/kexidb/drivers/sqlite/sqliteconnection_p.h
+++ b/kexi/kexidb/drivers/sqlite/sqliteconnection_p.h
@@ -58,11 +58,11 @@ class SQLiteConnectionInternal : public ConnectionInternal
sqlite_struct *data;
bool data_owned; //!< true if data pointer should be freed on destruction
- QString errmsg; //<! server-specific message of last operation
+ TQString errmsg; //<! server-specific message of last operation
char *errmsg_p; //<! temporary: server-specific message of last operation
int res; //<! result code of last operation on server
- QCString temp_st;
+ TQCString temp_st;
#ifdef SQLITE3
const char *result_name;
#endif
diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
index 4b18b437d..5239127ca 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.cpp
@@ -33,13 +33,13 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qptrvector.h>
-#include <qdatetime.h>
+#include <tqptrvector.h>
+#include <tqdatetime.h>
using namespace KexiDB;
//! safer interpretations of boolean values for SQLite
-static bool sqliteStringToBool(const QString& s)
+static bool sqliteStringToBool(const TQString& s)
{
return s.lower()=="yes" || (s.lower()!="no" && s!="0");
}
@@ -84,7 +84,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
}
#endif*/
- QCString st;
+ TQCString st;
//for sqlite:
// sqlite_struct *data; //! taken from SQLiteConnection
#ifdef SQLITE2
@@ -95,7 +95,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
char *utail;
-// QString errmsg; //<! server-specific message of last operation
+// TQString errmsg; //<! server-specific message of last operation
// char *errmsg_p; //<! temporary: server-specific message of last operation
// int res; //<! result code of last operation on server
@@ -112,7 +112,7 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
uint cols_pointers_mem_size; //! size of record's array of pointers to values
int records_in_buf; //! number of records currently stored in the buffer
bool buffering_completed; //! true if we have already all records stored in the buffer
- QPtrVector<const char*> records; //buffer data
+ TQPtrVector<const char*> records; //buffer data
bool at_buffer; //! true if we already point to the buffer with curr_coldata
*/
@@ -121,39 +121,39 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
const char **prev_colname;*/
uint cols_pointers_mem_size; //! size of record's array of pointers to values
- QPtrVector<const char*> records;//! buffer data
+ TQPtrVector<const char*> records;//! buffer data
//#ifdef SQLITE3
// bool rowDataReadyToFetch : 1;
//#endif
#ifdef SQLITE3
- inline QVariant getValue(Field *f, int i)
+ inline TQVariant getValue(Field *f, int i)
{
int type = sqlite3_column_type(prepared_st_handle, i);
if (type==SQLITE_NULL) {
- return QVariant();
+ return TQVariant();
}
else if (!f || type==SQLITE_TEXT) {
//TODO: support for UTF-16
-#define GET_sqlite3_column_text QString::fromUtf8( (const char*)sqlite3_column_text(prepared_st_handle, i) )
+#define GET_sqlite3_column_text TQString::fromUtf8( (const char*)sqlite3_column_text(prepared_st_handle, i) )
if (!f || f->isTextType())
return GET_sqlite3_column_text;
else {
switch (f->type()) {
case Field::Date:
- return QDate::fromString( GET_sqlite3_column_text, Qt::ISODate );
+ return TQDate::fromString( GET_sqlite3_column_text, Qt::ISODate );
case Field::Time:
- //QDateTime - a hack needed because QVariant(QTime) has broken isNull()
- return KexiUtils::stringToHackedQTime(GET_sqlite3_column_text);
+ //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull()
+ return KexiUtils::stringToHackedTQTime(GET_sqlite3_column_text);
case Field::DateTime: {
- QString tmp( GET_sqlite3_column_text );
+ TQString tmp( GET_sqlite3_column_text );
tmp[10] = 'T'; //for ISODate compatibility
- return QDateTime::fromString( tmp, Qt::ISODate );
+ return TQDateTime::fromString( tmp, Qt::ISODate );
}
case Field::Boolean:
- return QVariant(sqliteStringToBool(GET_sqlite3_column_text), 1);
+ return TQVariant(sqliteStringToBool(GET_sqlite3_column_text), 1);
default:
- return QVariant(); //TODO
+ return TQVariant(); //TODO
}
}
}
@@ -162,42 +162,42 @@ class KexiDB::SQLiteCursorData : public SQLiteConnectionInternal
case Field::Byte:
case Field::ShortInteger:
case Field::Integer:
- return QVariant( sqlite3_column_int(prepared_st_handle, i) );
+ return TQVariant( sqlite3_column_int(prepared_st_handle, i) );
case Field::BigInteger:
- return QVariant( (Q_LLONG)sqlite3_column_int64(prepared_st_handle, i) );
+ return TQVariant( (TQ_LLONG)sqlite3_column_int64(prepared_st_handle, i) );
case Field::Boolean:
- return QVariant( sqlite3_column_int(prepared_st_handle, i)!=0, 1 );
+ return TQVariant( sqlite3_column_int(prepared_st_handle, i)!=0, 1 );
default:;
}
if (f->isFPNumericType()) //WEIRD, YEAH?
- return QVariant( (double)sqlite3_column_int(prepared_st_handle, i) );
+ return TQVariant( (double)sqlite3_column_int(prepared_st_handle, i) );
else
- return QVariant(); //TODO
+ return TQVariant(); //TODO
}
else if (type==SQLITE_FLOAT) {
if (f && f->isFPNumericType())
- return QVariant( sqlite3_column_double(prepared_st_handle, i) );
+ return TQVariant( sqlite3_column_double(prepared_st_handle, i) );
else if (!f || f->isIntegerType())
- return QVariant( (double)sqlite3_column_double(prepared_st_handle, i) );
+ return TQVariant( (double)sqlite3_column_double(prepared_st_handle, i) );
else
- return QVariant(); //TODO
+ return TQVariant(); //TODO
}
else if (type==SQLITE_BLOB) {
if (f && f->type()==Field::BLOB) {
- QByteArray ba;
+ TQByteArray ba;
//! @todo efficient enough?
ba.duplicate((const char*)sqlite3_column_blob(prepared_st_handle, i),
sqlite3_column_bytes(prepared_st_handle, i));
return ba;
} else
- return QVariant(); //TODO
+ return TQVariant(); //TODO
}
- return QVariant();
+ return TQVariant();
}
#endif //SQLITE3
};
-SQLiteCursor::SQLiteCursor(Connection* conn, const QString& statement, uint options)
+SQLiteCursor::SQLiteCursor(Connection* conn, const TQString& statement, uint options)
: Cursor( conn, statement, options )
, d( new SQLiteCursorData(conn) )
{
@@ -328,7 +328,7 @@ void SQLiteCursor::drv_getNextRecord()
if (m_result == FetchOK && d->curr_coldata) {
for (uint i=0;i<m_fieldCount;i++) {
KexiDBDrvDbg<<"col."<< i<<": "<< d->curr_colname[i]<<" "<< d->curr_colname[m_fieldCount+i]
- << " = " << (d->curr_coldata[i] ? QString::fromLocal8Bit(d->curr_coldata[i]) : "(NULL)") <<endl;
+ << " = " << (d->curr_coldata[i] ? TQString::fromLocal8Bit(d->curr_coldata[i]) : "(NULL)") <<endl;
}
// KexiDBDrvDbg << "SQLiteCursor::drv_getNextRecord(): "<<m_fieldCount<<" col(s) fetched"<<endl;
}*/
@@ -363,7 +363,7 @@ void SQLiteCursor::drv_bufferMovePointerPrev()
//compute a place in the buffer that contain next record's data
//and move internal buffer pointer to that place
-void SQLiteCursor::drv_bufferMovePointerTo(Q_LLONG at)
+void SQLiteCursor::drv_bufferMovePointerTo(TQ_LLONG at)
{
d->curr_coldata = d->records.at(at);
}
@@ -432,17 +432,17 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const
if (!m_fieldsExpanded) {//simple version: without types
for( uint i=0; i<m_fieldCount; i++ ) {
#ifdef SQLITE2
- data[i] = QVariant( *col );
+ data[i] = TQVariant( *col );
col++;
#else //SQLITE3
- data[i] = QString::fromUtf8( (const char*)sqlite3_column_text(d->prepared_st_handle, i) );
+ data[i] = TQString::fromUtf8( (const char*)sqlite3_column_text(d->prepared_st_handle, i) );
#endif
}
return;
}
//const uint fieldsExpandedCount = m_fieldsExpanded->count();
- const uint maxCount = QMIN(m_fieldCount, m_fieldsExpanded->count());
+ const uint maxCount = TQMIN(m_fieldCount, m_fieldsExpanded->count());
// i - visible field's index, j - physical index
for( uint i=0, j=0; i<m_fieldCount; i++, j++ ) {
// while (j < m_detailedVisibility.count() && !m_detailedVisibility[j]) //!m_query->isColumnVisible(j))
@@ -459,42 +459,42 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const
#ifdef SQLITE2
if (!*col)
- data[i] = QVariant();
+ data[i] = TQVariant();
else if (f && f->isTextType())
# ifdef SQLITE_UTF8
- data[i] = QString::fromUtf8( *col );
+ data[i] = TQString::fromUtf8( *col );
# else
- data[i] = QVariant( *col ); //only latin1
+ data[i] = TQVariant( *col ); //only latin1
# endif
else if (f && f->isFPNumericType())
- data[i] = QVariant( QCString(*col).toDouble() );
+ data[i] = TQVariant( TQCString(*col).toDouble() );
else {
switch (f ? f->type() : Field::Integer/*ROWINFO*/) {
//todo: use short, etc.
case Field::Byte:
case Field::ShortInteger:
case Field::Integer:
- data[i] = QVariant( QCString(*col).toInt() );
+ data[i] = TQVariant( TQCString(*col).toInt() );
case Field::BigInteger:
- data[i] = QVariant( QString::fromLatin1(*col).toLongLong() );
+ data[i] = TQVariant( TQString::tqfromLatin1(*col).toLongLong() );
case Field::Boolean:
- data[i] = QVariant( sqliteStringToBool(QString::fromLatin1(*col)), 1 );
+ data[i] = TQVariant( sqliteStringToBool(TQString::tqfromLatin1(*col)), 1 );
break;
case Field::Date:
- data[i] = QDate::fromString( QString::fromLatin1(*col), Qt::ISODate );
+ data[i] = TQDate::fromString( TQString::tqfromLatin1(*col), Qt::ISODate );
break;
case Field::Time:
- //QDateTime - a hack needed because QVariant(QTime) has broken isNull()
- data[i] = KexiUtils::stringToHackedQTime(QString::fromLatin1(*col));
+ //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull()
+ data[i] = KexiUtils::stringToHackedTQTime(TQString::tqfromLatin1(*col));
break;
case Field::DateTime: {
- QString tmp( QString::fromLatin1(*col) );
+ TQString tmp( TQString::tqfromLatin1(*col) );
tmp[10] = 'T';
- data[i] = QDateTime::fromString( tmp, Qt::ISODate );
+ data[i] = TQDateTime::fromString( tmp, Qt::ISODate );
break;
}
default:
- data[i] = QVariant( *col );
+ data[i] = TQVariant( *col );
}
}
@@ -505,11 +505,11 @@ void SQLiteCursor::storeCurrentRow(RowData &data) const
}
}
-QVariant SQLiteCursor::value(uint i)
+TQVariant SQLiteCursor::value(uint i)
{
// if (i > (m_fieldCount-1+(m_containsROWIDInfo?1:0))) //range checking
if (i > (m_fieldCount-1)) //range checking
- return QVariant();
+ return TQVariant();
//TODO: allow disable range checking! - performance reasons
// const KexiDB::Field *f = m_query ? m_query->field(i) : 0;
KexiDB::Field *f = (m_fieldsExpanded && i<m_fieldsExpanded->count())
@@ -518,13 +518,13 @@ QVariant SQLiteCursor::value(uint i)
//from most to least frequently used types:
//(m_logicalFieldCount introduced) if (i==m_fieldCount || f && f->isIntegerType())
if (!f || f->isIntegerType())
- return QVariant( QCString(d->curr_coldata[i]).toInt() );
+ return TQVariant( TQCString(d->curr_coldata[i]).toInt() );
else if (!f || f->isTextType())
- return QVariant( d->curr_coldata[i] );
+ return TQVariant( d->curr_coldata[i] );
else if (f->isFPNumericType())
- return QVariant( QCString(d->curr_coldata[i]).toDouble() );
+ return TQVariant( TQCString(d->curr_coldata[i]).toDouble() );
- return QVariant( d->curr_coldata[i] ); //default
+ return TQVariant( d->curr_coldata[i] ); //default
#else
return d->getValue(f, i); //, i==m_logicalFieldCount/*ROWID*/);
#endif
@@ -532,7 +532,7 @@ QVariant SQLiteCursor::value(uint i)
/*! Stores string value taken from field number \a i to \a str.
\return false when range checking failed.
-bool SQLiteCursor::storeStringValue(uint i, QString &str)
+bool SQLiteCursor::storeStringValue(uint i, TQString &str)
{
if (i > (m_fieldCount-1)) //range checking
return false;
@@ -545,16 +545,16 @@ int SQLiteCursor::serverResult()
return d->res;
}
-QString SQLiteCursor::serverResultName()
+TQString SQLiteCursor::serverResultName()
{
#ifdef SQLITE2
- return QString::fromLatin1( sqlite_error_string(d->res) );
+ return TQString::tqfromLatin1( sqlite_error_string(d->res) );
#else //SQLITE3
- return QString::fromLatin1( d->result_name );
+ return TQString::tqfromLatin1( d->result_name );
#endif
}
-QString SQLiteCursor::serverErrorMsg()
+TQString SQLiteCursor::serverErrorMsg()
{
return d->errmsg;
}
diff --git a/kexi/kexidb/drivers/sqlite/sqlitecursor.h b/kexi/kexidb/drivers/sqlite/sqlitecursor.h
index b7170f67c..d5e7c05e7 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitecursor.h
+++ b/kexi/kexidb/drivers/sqlite/sqlitecursor.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_SQLITECURSOR_H
#define KEXIDB_SQLITECURSOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include <kexidb/cursor.h>
#include "connection.h"
@@ -36,7 +36,7 @@ class SQLiteCursor : public Cursor
{
public:
virtual ~SQLiteCursor();
- virtual QVariant value(uint i);
+ virtual TQVariant value(uint i);
/*! [PROTOTYPE] \return internal buffer data. */
//TODO virtual const char *** bufferData()
@@ -48,12 +48,12 @@ class SQLiteCursor : public Cursor
// virtual bool save(RowData& data, RowEditBuffer& buf);
virtual int serverResult();
- virtual QString serverResultName();
- virtual QString serverErrorMsg();
+ virtual TQString serverResultName();
+ virtual TQString serverErrorMsg();
protected:
/*! Cursor will operate on \a conn, raw \a statement will be used to execute query. */
- SQLiteCursor(Connection* conn, const QString& statement, uint options = NoOptions );
+ SQLiteCursor(Connection* conn, const TQString& statement, uint options = NoOptions );
/*! Cursor will operate on \a conn, \a query schema will be used to execute query. */
SQLiteCursor(Connection* conn, QuerySchema& query,
@@ -69,7 +69,7 @@ class SQLiteCursor : public Cursor
virtual void drv_appendCurrentRecordToBuffer();
virtual void drv_bufferMovePointerNext();
virtual void drv_bufferMovePointerPrev();
- virtual void drv_bufferMovePointerTo(Q_LLONG at);
+ virtual void drv_bufferMovePointerTo(TQ_LLONG at);
//TODO virtual void drv_storeCurrentRecord();
diff --git a/kexi/kexidb/drivers/sqlite/sqlitedriver.cpp b/kexi/kexidb/drivers/sqlite/sqlitedriver.cpp
index e2abc2466..c5128b63f 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitedriver.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitedriver.cpp
@@ -48,9 +48,9 @@ class KexiDB::SQLiteDriverPrivate
}
};
-//PgSqlDB::PgSqlDB(QObject *parent, const char *name, const QStringList &)
-SQLiteDriver::SQLiteDriver( QObject *parent, const char *name, const QStringList &args )
- : Driver( parent, name, args )
+//PgSqlDB::PgSqlDB(TQObject *tqparent, const char *name, const TQStringList &)
+SQLiteDriver::SQLiteDriver( TQObject *tqparent, const char *name, const TQStringList &args )
+ : Driver( tqparent, name, args )
,dp( new SQLiteDriverPrivate() )
{
d->isFileDriver = true;
@@ -66,11 +66,11 @@ SQLiteDriver::SQLiteDriver( QObject *parent, const char *name, const QStringList
beh->AUTO_INCREMENT_FIELD_OPTION = ""; //not available
beh->AUTO_INCREMENT_TYPE = "INTEGER";
beh->AUTO_INCREMENT_PK_FIELD_OPTION = "PRIMARY KEY";
- beh->AUTO_INCREMENT_REQUIRES_PK = true;
+ beh->AUTO_INCREMENT_RETQUIRES_PK = true;
beh->ROW_ID_FIELD_NAME = "OID";
- beh->_1ST_ROW_READ_AHEAD_REQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
- beh->QUOTATION_MARKS_FOR_IDENTIFIER='"';
- beh->SELECT_1_SUBQUERY_SUPPORTED = true;
+ beh->_1ST_ROW_READ_AHEAD_RETQUIRED_TO_KNOW_IF_THE_RESULT_IS_EMPTY=true;
+ beh->TQUOTATION_MARKS_FOR_IDENTIFIER='"';
+ beh->SELECT_1_SUBTQUERY_SUPPORTED = true;
beh->SQL_KEYWORDS = keywords;
initSQLKeywords(29);
@@ -110,41 +110,41 @@ SQLiteDriver::drv_createConnection( ConnectionData &conn_data )
return new SQLiteConnection( this, conn_data );
}
-bool SQLiteDriver::isSystemObjectName( const QString& n ) const
+bool SQLiteDriver::isSystemObjectName( const TQString& n ) const
{
return Driver::isSystemObjectName(n) || n.lower().startsWith("sqlite_");
}
-bool SQLiteDriver::drv_isSystemFieldName( const QString& n ) const
+bool SQLiteDriver::drv_isSystemFieldName( const TQString& n ) const
{
return n.lower()=="_rowid_"
|| n.lower()=="rowid"
|| n.lower()=="oid";
}
-QString SQLiteDriver::escapeString(const QString& str) const
+TQString SQLiteDriver::escapeString(const TQString& str) const
{
- return QString("'")+QString(str).replace( '\'', "''" ) + "'";
+ return TQString("'")+TQString(str).tqreplace( '\'', "''" ) + "'";
}
-QCString SQLiteDriver::escapeString(const QCString& str) const
+TQCString SQLiteDriver::escapeString(const TQCString& str) const
{
- return QCString("'")+QCString(str).replace( '\'', "''" )+"'";
+ return TQCString("'")+TQCString(str).tqreplace( '\'', "''" )+"'";
}
-QString SQLiteDriver::escapeBLOB(const QByteArray& array) const
+TQString SQLiteDriver::escapeBLOB(const TQByteArray& array) const
{
return KexiDB::escapeBLOB(array, KexiDB::BLOBEscapeXHex);
}
-QString SQLiteDriver::drv_escapeIdentifier( const QString& str) const
+TQString SQLiteDriver::drv_escapeIdentifier( const TQString& str) const
{
- return QString(str).replace( '"', "\"\"" );
+ return TQString(str).tqreplace( '"', "\"\"" );
}
-QCString SQLiteDriver::drv_escapeIdentifier( const QCString& str) const
+TQCString SQLiteDriver::drv_escapeIdentifier( const TQCString& str) const
{
- return QCString(str).replace( '"', "\"\"" );
+ return TQCString(str).tqreplace( '"', "\"\"" );
}
AdminTools* SQLiteDriver::drv_createAdminTools() const
diff --git a/kexi/kexidb/drivers/sqlite/sqlitedriver.h b/kexi/kexidb/drivers/sqlite/sqlitedriver.h
index 66d4d4d26..a388d823a 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitedriver.h
+++ b/kexi/kexidb/drivers/sqlite/sqlitedriver.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_DRIVER_SQLITE_H
#define KEXIDB_DRIVER_SQLITE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kexidb/driver.h>
@@ -35,31 +35,32 @@ class SQLiteDriverPrivate;
class SQLiteDriver : public Driver
{
Q_OBJECT
+ TQ_OBJECT
KEXIDB_DRIVER
public:
- SQLiteDriver( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ SQLiteDriver( TQObject *tqparent, const char *name, const TQStringList &args = TQStringList() );
virtual ~SQLiteDriver();
/*! \return true if \a n is a system object name;
for this driver any object with name prefixed with "sqlite_"
is considered as system object.
*/
- virtual bool isSystemObjectName( const QString& n ) const;
+ virtual bool isSystemObjectName( const TQString& n ) const;
/*! \return false for this driver. */
- virtual bool isSystemDatabaseName( const QString& ) const { return false; }
+ virtual bool isSystemDatabaseName( const TQString& ) const { return false; }
//! Escape a string for use as a value
- virtual QString escapeString(const QString& str) const;
- virtual QCString escapeString(const QCString& str) const;
+ virtual TQString escapeString(const TQString& str) const;
+ virtual TQCString escapeString(const TQCString& str) const;
//! Escape BLOB value \a array
- virtual QString escapeBLOB(const QByteArray& array) const;
+ virtual TQString escapeBLOB(const TQByteArray& array) const;
protected:
- virtual QString drv_escapeIdentifier( const QString& str) const;
- virtual QCString drv_escapeIdentifier( const QCString& str) const;
+ virtual TQString drv_escapeIdentifier( const TQString& str) const;
+ virtual TQCString drv_escapeIdentifier( const TQCString& str) const;
virtual Connection *drv_createConnection( ConnectionData &conn_data );
virtual AdminTools* drv_createAdminTools() const;
@@ -67,7 +68,7 @@ class SQLiteDriver : public Driver
for this driver fields with name equal "_ROWID_"
is considered as system field.
*/
- virtual bool drv_isSystemFieldName( const QString& n ) const;
+ virtual bool drv_isSystemFieldName( const TQString& n ) const;
SQLiteDriverPrivate *dp;
diff --git a/kexi/kexidb/drivers/sqlite/sqlitepreparedstatement.cpp b/kexi/kexidb/drivers/sqlite/sqlitepreparedstatement.cpp
index 9103b131e..bccfd11b5 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitepreparedstatement.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitepreparedstatement.cpp
@@ -93,7 +93,7 @@ bool SQLitePreparedStatement::execute()
else
assert(0); //impl. error
- for (QValueListConstIterator<QVariant> it = m_args.constBegin();
+ for (TQValueListConstIterator<TQVariant> it = m_args.constBegin();
(field = itFields.current()); ++it, ++itFields, arg++)
{
if (it==m_args.constEnd() || (*it).isNull()) {//no value to bind or the value is null: bind NULL
@@ -106,7 +106,7 @@ bool SQLitePreparedStatement::execute()
}
if (field->isTextType()) {
//! @todo optimize: make a static copy so SQLITE_STATIC can be used
- QCString utf8String((*it).toString().utf8());
+ TQCString utf8String((*it).toString().utf8());
res = sqlite3_bind_text(prepared_st_handle, arg,
(const char*)utf8String, utf8String.length(), SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
@@ -150,7 +150,7 @@ bool SQLitePreparedStatement::execute()
{
//! @todo what about unsigned > LLONG_MAX ?
bool ok;
- Q_LLONG value = (*it).toLongLong(&ok);
+ TQ_LLONG value = (*it).toLongLong(&ok);
if (ok) {
res = sqlite3_bind_int64(prepared_st_handle, arg, value);
if (SQLITE_OK != res) {
@@ -169,7 +169,7 @@ bool SQLitePreparedStatement::execute()
}
case KexiDB::Field::Boolean:
res = sqlite3_bind_text(prepared_st_handle, arg,
- QString::number((*it).toBool() ? 1 : 0).latin1(),
+ TQString::number((*it).toBool() ? 1 : 0).latin1(),
1, SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
//! @todo msg?
@@ -178,7 +178,7 @@ bool SQLitePreparedStatement::execute()
break;
case KexiDB::Field::Time:
res = sqlite3_bind_text(prepared_st_handle, arg,
- (*it).toTime().toString(Qt::ISODate).latin1(),
+ TQString((*it).toTime().toString(Qt::ISODate)).latin1(),
sizeof("HH:MM:SS"), SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
//! @todo msg?
@@ -187,7 +187,7 @@ bool SQLitePreparedStatement::execute()
break;
case KexiDB::Field::Date:
res = sqlite3_bind_text(prepared_st_handle, arg,
- (*it).toDate().toString(Qt::ISODate).latin1(),
+ TQString((*it).toDate().toString(Qt::ISODate)).latin1(),
sizeof("YYYY-MM-DD"), SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
//! @todo msg?
@@ -205,7 +205,7 @@ bool SQLitePreparedStatement::execute()
break;
case KexiDB::Field::BLOB:
{
- const QByteArray byteArray((*it).toByteArray());
+ const TQByteArray byteArray((*it).toByteArray());
res = sqlite3_bind_blob(prepared_st_handle, arg,
(const char*)byteArray, byteArray.size(), SQLITE_TRANSIENT /*??*/);
if (SQLITE_OK != res) {
diff --git a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
index adf8709a5..d24d906da 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
+++ b/kexi/kexidb/drivers/sqlite/sqlitevacuum.cpp
@@ -28,15 +28,15 @@
#include <kmessagebox.h>
#include <kio/global.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include <qprocess.h>
-#include <qcursor.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqprocess.h>
+#include <tqcursor.h>
#include <unistd.h>
-SQLiteVacuum::SQLiteVacuum(const QString& filePath)
+SQLiteVacuum::SQLiteVacuum(const TQString& filePath)
: m_filePath(filePath)
{
m_process = 0;
@@ -55,35 +55,35 @@ SQLiteVacuum::~SQLiteVacuum()
tristate SQLiteVacuum::run()
{
- const QString ksqlite_app = KStandardDirs::findExe( "ksqlite" );
+ const TQString ksqlite_app = KStandardDirs::findExe( "ksqlite" );
if (ksqlite_app.isEmpty()) {
m_result = false;
return m_result;
}
- QFileInfo fi(m_filePath);
+ TQFileInfo fi(m_filePath);
if (!fi.isReadable()) {
KexiDBDrvWarn << "SQLiteVacuum::run(): No such file" << m_filePath << endl;
return false;
}
const uint origSize = fi.size();
- QStringList args;
+ TQStringList args;
args << ksqlite_app << "-verbose-vacuum" << m_filePath << "vacuum";
- m_process = new QProcess(args, this, "process");
- m_process->setWorkingDirectory( QFileInfo(m_filePath).dir(true) );
- connect( m_process, SIGNAL(readyReadStdout()), this, SLOT(readFromStdout()) );
- connect( m_process, SIGNAL(processExited()), this, SLOT(processExited()) );
+ m_process = new TQProcess(args, this, "process");
+ m_process->setWorkingDirectory( TQFileInfo(m_filePath).dir(true) );
+ connect( m_process, TQT_SIGNAL(readyReadStdout()), this, TQT_SLOT(readFromStdout()) );
+ connect( m_process, TQT_SIGNAL(processExited()), this, TQT_SLOT(processExited()) );
if (!m_process->start()) {
m_result = false;
return m_result;
}
m_dlg = new KProgressDialog(0, 0, i18n("Compacting database"),
"<qt>"+i18n("Compacting database \"%1\"...")
- .arg("<nobr>"+QDir::convertSeparators(QFileInfo(m_filePath).fileName())+"</nobr>")
+ .tqarg("<nobr>"+TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())+"</nobr>")
);
m_dlg->adjustSize();
m_dlg->resize(300, m_dlg->height());
- connect(m_dlg, SIGNAL(cancelClicked()), this, SLOT(cancelClicked()));
+ connect(m_dlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked()));
m_dlg->setMinimumDuration(1000);
m_dlg->setAutoClose(true);
m_dlg->progressBar()->setTotalSteps(100);
@@ -95,10 +95,10 @@ tristate SQLiteVacuum::run()
delete m_process;
m_process = 0;
if (m_result == true) {
- const uint newSize = QFileInfo(m_filePath).size();
+ const uint newSize = TQFileInfo(m_filePath).size();
const uint decrease = 100-100*newSize/origSize;
KMessageBox::information(0, i18n("The database has been compacted. Current size decreased by %1% to %2.")
- .arg(decrease).arg(KIO::convertSize(newSize)));
+ .tqarg(decrease).tqarg(KIO::convertSize(newSize)));
}
return m_result;
}
@@ -106,7 +106,7 @@ tristate SQLiteVacuum::run()
void SQLiteVacuum::readFromStdout()
{
while (true) {
- QString s( m_process->readLineStdout() ); //readStdout();
+ TQString s( m_process->readLineStdout() ); //readStdout();
if (s.isEmpty())
break;
m_dlg->progressBar()->setProgress(m_percent);
@@ -118,7 +118,7 @@ void SQLiteVacuum::readFromStdout()
if (s.mid(8,4)=="100%") {
m_percent = 100;
m_dlg->setAllowCancel(false);
- m_dlg->setCursor(QCursor(Qt::WaitCursor));
+ m_dlg->setCursor(TQCursor(TQt::WaitCursor));
}
else if (s.mid(9,1)=="%") {
m_percent = s.mid(8,1).toInt();
@@ -126,7 +126,7 @@ void SQLiteVacuum::readFromStdout()
else if (s.mid(10,1)=="%") {
m_percent = s.mid(8,2).toInt();
}
- m_process->writeToStdin(" ");
+ m_process->writeToStdin(TQString(" "));
}
}
}
@@ -142,7 +142,7 @@ void SQLiteVacuum::processExited()
void SQLiteVacuum::cancelClicked()
{
if (!m_process->normalExit()) {
- m_process->writeToStdin("q"); //quit
+ m_process->writeToStdin(TQString("q")); //quit
m_result = cancelled;
}
}
diff --git a/kexi/kexidb/drivers/sqlite/sqlitevacuum.h b/kexi/kexidb/drivers/sqlite/sqlitevacuum.h
index 4424b7fcd..27bcc7efc 100644
--- a/kexi/kexidb/drivers/sqlite/sqlitevacuum.h
+++ b/kexi/kexidb/drivers/sqlite/sqlitevacuum.h
@@ -20,12 +20,12 @@
#ifndef SQLITE_VACUUM_H
#define SQLITE_VACUUM_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kexiutils/tristate.h>
-class QProcess;
+class TQProcess;
class KTempFile;
class KProgressDialog;
@@ -42,11 +42,12 @@ class KProgressDialog;
creates a copy of the original database file, and replaces the orginal with the new only
on success.
*/
-class SQLiteVacuum : public QObject
+class SQLiteVacuum : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- SQLiteVacuum(const QString& filePath);
+ SQLiteVacuum(const TQString& filePath);
~SQLiteVacuum();
/*! Performs compacting procedure.
@@ -60,8 +61,8 @@ class SQLiteVacuum : public QObject
void cancelClicked();
protected:
- QString m_filePath;
- QProcess *m_process;
+ TQString m_filePath;
+ TQProcess *m_process;
KProgressDialog* m_dlg;
int m_percent;
tristate m_result;
diff --git a/kexi/kexidb/drivers/sqlite2/sqlite2.pro b/kexi/kexidb/drivers/sqlite2/sqlite2.pro
index e9597ebdb..b3ac61560 100644
--- a/kexi/kexidb/drivers/sqlite2/sqlite2.pro
+++ b/kexi/kexidb/drivers/sqlite2/sqlite2.pro
@@ -2,9 +2,9 @@ include( ../sqlite/sqlite_common.pro )
LIBS += $$KDELIBDESTDIR/kexisql2$$KDELIBDEBUGLIB
-INCLUDEPATH += $(KEXI)/3rdparty/kexisql/src ../sqlite/moc
+INCLUDEPATH += $(KEXI)/3rdparty/kexisql/src ../sqlite/tqmoc
-system( bash kmoc ../sqlite )
+system( bash ktqmoc ../sqlite )
DEFINES += SQLITE2
diff --git a/kexi/kexidb/error.h b/kexi/kexidb/error.h
index 01ab80529..0485ce536 100644
--- a/kexi/kexidb/error.h
+++ b/kexi/kexidb/error.h
@@ -21,7 +21,7 @@
#ifndef _KEXI_ERROR_H_
#define _KEXI_ERROR_H_
-#include <qstring.h>
+#include <tqstring.h>
#include "kexidb/kexidb_export.h"
@@ -121,14 +121,14 @@ class KEXI_DB_EXPORT ResultInfo
success = true;
allowToDiscardChanges = false;
column = -1;
- msg = QString::null;
- desc = QString::null;
+ msg = TQString();
+ desc = TQString();
}
bool success : 1; //!< result of the operation, true by default
bool allowToDiscardChanges : 1; //!< True if changes can be discarded, false by default
//!< If true, additional "Discard changes" messagebox
//!< button can be displayed.
- QString msg, desc; //!< error message and detailed description, both empty by default
+ TQString msg, desc; //!< error message and detailed description, both empty by default
int column; //!< faulty column, -1 (the default) means: there is no faulty column
};
diff --git a/kexi/kexidb/expression.cpp b/kexi/kexidb/expression.cpp
index 49bb231ad..0428fdcfd 100644
--- a/kexi/kexidb/expression.cpp
+++ b/kexi/kexidb/expression.cpp
@@ -30,9 +30,9 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
-KEXI_DB_EXPORT QString KexiDB::exprClassName(int c)
+KEXI_DB_EXPORT TQString KexiDB::exprClassName(int c)
{
if (c==KexiDBExpr_Unary)
return "Unary";
@@ -80,9 +80,9 @@ Field::Type BaseExpr::type()
return Field::InvalidType;
}
-QString BaseExpr::debugString()
+TQString BaseExpr::debugString()
{
- return QString("BaseExpr(%1,type=%1)").arg(m_token).arg(Driver::defaultSQLTypeName(type()));
+ return TQString("BaseExpr(%1,type=%1)").tqarg(m_token).tqarg(Driver::defaultSQLTypeName(type()));
}
bool BaseExpr::validate(ParseInfo& /*parseInfo*/)
@@ -93,22 +93,22 @@ bool BaseExpr::validate(ParseInfo& /*parseInfo*/)
extern const char * const tname(int offset);
#define safe_tname(token) ((token>=255 && token<=__LAST_TOKEN) ? tname(token-255) : "")
-QString BaseExpr::tokenToDebugString(int token)
+TQString BaseExpr::tokenToDebugString(int token)
{
if (token < 254) {
if (isprint(token))
- return QString(QChar(uchar(token)));
+ return TQString(TQChar(uchar(token)));
else
- return QString::number(token);
+ return TQString::number(token);
}
- return QString(safe_tname(token));
+ return TQString(safe_tname(token));
}
-QString BaseExpr::tokenToString()
+TQString BaseExpr::tokenToString()
{
if (m_token < 255 && isprint(m_token))
return tokenToDebugString();
- return QString::null;
+ return TQString();
}
NArgExpr* BaseExpr::toNArg() { return dynamic_cast<NArgExpr*>(this); }
@@ -144,9 +144,9 @@ NArgExpr* NArgExpr::copy() const
return new NArgExpr(*this);
}
-QString NArgExpr::debugString()
+TQString NArgExpr::debugString()
{
- QString s = QString("NArgExpr(")
+ TQString s = TQString("NArgExpr(")
+ "class=" + exprClassName(m_cl);
for ( BaseExpr::ListIterator it(list); it.current(); ++it ) {
s+=", ";
@@ -156,9 +156,9 @@ QString NArgExpr::debugString()
return s;
}
-QString NArgExpr::toString( QuerySchemaParameterValueListIterator* params )
+TQString NArgExpr::toString( QuerySchemaParameterValueListIterator* params )
{
- QString s;
+ TQString s;
s.reserve(256);
foreach_list( BaseExpr::ListIterator, it, list) {
if (!s.isEmpty())
@@ -236,17 +236,17 @@ UnaryExpr* UnaryExpr::copy() const
return new UnaryExpr(*this);
}
-QString UnaryExpr::debugString()
+TQString UnaryExpr::debugString()
{
return "UnaryExpr('"
+ tokenToDebugString() + "', "
- + (m_arg ? m_arg->debugString() : QString("<NONE>"))
- + QString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
+ + (m_arg ? m_arg->debugString() : TQString("<NONE>"))
+ + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
}
-QString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params)
{
- if (m_token=='(') //parentheses (special case)
+ if (m_token=='(') //tqparentheses (special case)
return "(" + (m_arg ? m_arg->toString(params) : "<NULL>") + ")";
if (m_token < 255 && isprint(m_token))
return tokenToDebugString() + (m_arg ? m_arg->toString(params) : "<NULL>");
@@ -256,7 +256,7 @@ QString UnaryExpr::toString(QuerySchemaParameterValueListIterator* params)
return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NULL";
if (m_token==SQL_IS_NOT_NULL)
return (m_arg ? m_arg->toString(params) : "<NULL>") + " IS NOT NULL";
- return QString("{INVALID_OPERATOR#%1} ").arg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>");
+ return TQString("{INVALID_OPERATOR#%1} ").tqarg(m_token) + (m_arg ? m_arg->toString(params) : "<NULL>");
}
void UnaryExpr::getQueryParameters(QuerySchemaParameterList& params)
@@ -319,7 +319,7 @@ bool UnaryExpr::validate(ParseInfo& parseInfo)
}
else {
ERR("Niepoprawny argument typu '%s' dla operatora '%s'",
- n->nodeTypeName(),is(NOT)?QString("not"):QChar(typ()));
+ n->nodeTypeName(),is(NOT)?TQString("not"):TQChar(typ()));
}
#endif
}
@@ -412,17 +412,17 @@ Field::Type BinaryExpr::type()
return Field::Boolean;
}
-QString BinaryExpr::debugString()
+TQString BinaryExpr::debugString()
{
- return QString("BinaryExpr(")
+ return TQString("BinaryExpr(")
+ "class=" + exprClassName(m_cl)
- + "," + (m_larg ? m_larg->debugString() : QString("<NONE>"))
+ + "," + (m_larg ? m_larg->debugString() : TQString("<NONE>"))
+ ",'" + tokenToDebugString() + "',"
- + (m_rarg ? m_rarg->debugString() : QString("<NONE>"))
- + QString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
+ + (m_rarg ? m_rarg->debugString() : TQString("<NONE>"))
+ + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
}
-QString BinaryExpr::tokenToString()
+TQString BinaryExpr::tokenToString()
{
if (m_token < 255 && isprint(m_token))
return tokenToDebugString();
@@ -449,10 +449,10 @@ QString BinaryExpr::tokenToString()
/* not handled here */
default:;
}
- return QString("{INVALID_BINARY_OPERATOR#%1} ").arg(m_token);
+ return TQString("{INVALID_BINARY_OPERATOR#%1} ").tqarg(m_token);
}
-QString BinaryExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString BinaryExpr::toString(QuerySchemaParameterValueListIterator* params)
{
#define INFIX(a) \
(m_larg ? m_larg->toString(params) : "<NULL>") + " " + a + " " + (m_rarg ? m_rarg->toString(params) : "<NULL>")
@@ -468,7 +468,7 @@ void BinaryExpr::getQueryParameters(QuerySchemaParameterList& params)
}
//=========================================
-ConstExpr::ConstExpr( int token, const QVariant& val)
+ConstExpr::ConstExpr( int token, const TQVariant& val)
: BaseExpr( token )
, value(val)
{
@@ -497,8 +497,8 @@ Field::Type ConstExpr::type()
else if (m_token==INTEGER_CONST) {
//TODO ok?
//TODO: add sign info?
- if (value.type() == QVariant::Int || value.type() == QVariant::UInt) {
- Q_LLONG v = value.toInt();
+ if (value.type() == TQVariant::Int || value.type() == TQVariant::UInt) {
+ TQ_LLONG v = value.toInt();
if (v <= 0xff && v > -0x80)
return Field::Byte;
if (v <= 0xffff && v > -0x8000)
@@ -526,13 +526,13 @@ Field::Type ConstExpr::type()
return Field::InvalidType;
}
-QString ConstExpr::debugString()
+TQString ConstExpr::debugString()
{
- return QString("ConstExpr('") + tokenToDebugString() +"'," + toString()
- + QString(",type=%1)").arg(Driver::defaultSQLTypeName(type()));
+ return TQString("ConstExpr('") + tokenToDebugString() +"'," + toString()
+ + TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
}
-QString ConstExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString ConstExpr::toString(QuerySchemaParameterValueListIterator* params)
{
Q_UNUSED(params);
if (m_token==SQL_NULL)
@@ -541,7 +541,7 @@ QString ConstExpr::toString(QuerySchemaParameterValueListIterator* params)
//TODO: better escaping!
return "'" + value.toString() + "'";
else if (m_token==REAL_CONST)
- return QString::number(value.toPoint().x())+"."+QString::number(value.toPoint().y());
+ return TQString::number(value.toPoint().x())+"."+TQString::number(value.toPoint().y());
else if (m_token==DATE_CONST)
return "'" + value.toDate().toString(Qt::ISODate) + "'";
else if (m_token==DATETIME_CONST)
@@ -567,8 +567,8 @@ bool ConstExpr::validate(ParseInfo& parseInfo)
}
//=========================================
-QueryParameterExpr::QueryParameterExpr(const QString& message)
-: ConstExpr( QUERY_PARAMETER, message )
+QueryParameterExpr::QueryParameterExpr(const TQString& message)
+: ConstExpr( TQUERY_PARAMETER, message )
, m_type(Field::Text)
{
m_cl = KexiDBExpr_QueryParameter;
@@ -599,15 +599,15 @@ void QueryParameterExpr::setType(Field::Type type)
m_type = type;
}
-QString QueryParameterExpr::debugString()
+TQString QueryParameterExpr::debugString()
{
- return QString("QueryParameterExpr('") + QString::fromLatin1("[%2]").arg(value.toString())
- + QString("',type=%1)").arg(Driver::defaultSQLTypeName(type()));
+ return TQString("QueryParameterExpr('") + TQString::tqfromLatin1("[%2]").tqarg(value.toString())
+ + TQString("',type=%1)").tqarg(Driver::defaultSQLTypeName(type()));
}
-QString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString QueryParameterExpr::toString(QuerySchemaParameterValueListIterator* params)
{
- return params ? params->getPreviousValueAsString(type()) : QString::fromLatin1("[%2]").arg(value.toString());
+ return params ? params->getPreviousValueAsString(type()) : TQString::tqfromLatin1("[%2]").tqarg(value.toString());
}
void QueryParameterExpr::getQueryParameters(QuerySchemaParameterList& params)
@@ -625,7 +625,7 @@ bool QueryParameterExpr::validate(ParseInfo& parseInfo)
}
//=========================================
-VariableExpr::VariableExpr(const QString& _name)
+VariableExpr::VariableExpr(const TQString& _name)
: BaseExpr( 0/*undefined*/ )
, name(_name)
, field(0)
@@ -653,13 +653,13 @@ VariableExpr* VariableExpr::copy() const
return new VariableExpr(*this);
}
-QString VariableExpr::debugString()
+TQString VariableExpr::debugString()
{
- return QString("VariableExpr(") + name
- + QString(",type=%1)").arg(field ? Driver::defaultSQLTypeName(type()) : QString("FIELD NOT DEFINED YET"));
+ return TQString("VariableExpr(") + name
+ + TQString(",type=%1)").tqarg(field ? Driver::defaultSQLTypeName(type()) : TQString("FIELD NOT DEFINED YET"));
}
-QString VariableExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString VariableExpr::toString(QuerySchemaParameterValueListIterator* params)
{
Q_UNUSED(params);
return name;
@@ -692,8 +692,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
/* taken from parser's addColumn(): */
KexiDBDbg << "checking variable name: " << name << endl;
- int dotPos = name.find('.');
- QString tableName, fieldName;
+ int dotPos = name.tqfind('.');
+ TQString tableName, fieldName;
//TODO: shall we also support db name?
if (dotPos>0) {
tableName = name.left(dotPos);
@@ -719,15 +719,15 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
parseInfo.errMsg = i18n("Ambiguous field name");
parseInfo.errDescr = i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. "
"Use \"<tableName>.%4\" notation to specify table name.")
- .arg(firstField->table()->name()).arg(f->table()->name())
- .arg(fieldName).arg(fieldName);
+ .tqarg(firstField->table()->name()).tqarg(f->table()->name())
+ .tqarg(fieldName).tqarg(fieldName);
return false;
}
}
}
if (!firstField) {
parseInfo.errMsg = i18n("Field not found");
- parseInfo.errDescr = i18n("Table containing \"%1\" field not found").arg(fieldName);
+ parseInfo.errDescr = i18n("Table containing \"%1\" field not found").tqarg(fieldName);
return false;
}
//ok
@@ -741,9 +741,9 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
TableSchema *ts = parseInfo.querySchema->table( tableName );
if (ts) {//table.fieldname
//check if "table" is covered by an alias
- const QValueList<int> tPositions = parseInfo.querySchema->tablePositions(tableName);
- QValueList<int>::ConstIterator it = tPositions.constBegin();
- QCString tableAlias;
+ const TQValueList<int> tPositions = parseInfo.querySchema->tablePositions(tableName);
+ TQValueList<int>::ConstIterator it = tPositions.constBegin();
+ TQCString tableAlias;
bool covered = true;
for (; it!=tPositions.constEnd() && covered; ++it) {
tableAlias = parseInfo.querySchema->tableAlias(*it);
@@ -754,8 +754,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (covered) {
parseInfo.errMsg = i18n("Could not access the table directly using its name");
parseInfo.errDescr = i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", "
- "you can write \"%3\"").arg(tableName)
- .arg(tableName+"."+fieldName).arg(tableAlias+"."+fieldName.latin1());
+ "you can write \"%3\"").tqarg(tableName)
+ .tqarg(TQString(tableName+"."+fieldName)).tqarg(TQString(tableAlias+"."+fieldName.latin1()));
return false;
}
}
@@ -773,11 +773,11 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (!ts) {
parseInfo.errMsg = i18n("Table not found");
- parseInfo.errDescr = i18n("Unknown table \"%1\"").arg(tableName);
+ parseInfo.errDescr = i18n("Unknown table \"%1\"").tqarg(tableName);
return false;
}
- QValueList<int> *positionsList = parseInfo.repeatedTablesAndAliases[ tableName ];
+ TQValueList<int> *positionsList = parseInfo.repeatedTablesAndAliases[ tableName ];
if (!positionsList) { //for sanity
IMPL_ERROR(tableName + "." + fieldName + ", !positionsList ");
return false;
@@ -786,8 +786,8 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
//it's a table.*
if (fieldName=="*") {
if (positionsList->count()>1) {
- parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").arg(tableName);
- parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").arg(tableName);
+ parseInfo.errMsg = i18n("Ambiguous \"%1.*\" expression").tqarg(tableName);
+ parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined").tqarg(tableName);
return false;
}
tableForQueryAsterisk = ts;
@@ -800,14 +800,14 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
if (!realField) {
parseInfo.errMsg = i18n("Field not found");
parseInfo.errDescr = i18n("Table \"%1\" has no \"%2\" field")
- .arg(tableName).arg(fieldName);
+ .tqarg(tableName).tqarg(fieldName);
return false;
}
// check if table or alias is used twice and both have the same column
// (so the column is ambiguous)
int numberOfTheSameFields = 0;
- for (QValueList<int>::iterator it = positionsList->begin();
+ for (TQValueList<int>::iterator it = positionsList->begin();
it!=positionsList->end();++it)
{
TableSchema *otherTS = parseInfo.querySchema->tables()->at(*it);
@@ -815,9 +815,9 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
numberOfTheSameFields++;
if (numberOfTheSameFields>1) {
parseInfo.errMsg = i18n("Ambiguous \"%1.%2\" expression")
- .arg(tableName).arg(fieldName);
+ .tqarg(tableName).tqarg(fieldName);
parseInfo.errDescr = i18n("More than one \"%1\" table or alias defined containing \"%2\" field")
- .arg(tableName).arg(fieldName);
+ .tqarg(tableName).tqarg(fieldName);
return false;
}
}
@@ -829,11 +829,11 @@ bool VariableExpr::validate(ParseInfo& parseInfo)
}
//=========================================
-static QValueList<QCString> FunctionExpr_builtIns;
+static TQValueList<TQCString> FunctionExpr_builtIns;
static const char* FunctionExpr_builtIns_[] =
{"SUM", "MIN", "MAX", "AVG", "COUNT", "STD", "STDDEV", "VARIANCE", 0 };
-QValueList<QCString> FunctionExpr::builtInAggregates()
+TQValueList<TQCString> FunctionExpr::builtInAggregates()
{
if (FunctionExpr_builtIns.isEmpty()) {
for (const char **p = FunctionExpr_builtIns_; *p; p++)
@@ -842,7 +842,7 @@ QValueList<QCString> FunctionExpr::builtInAggregates()
return FunctionExpr_builtIns;
}
-FunctionExpr::FunctionExpr( const QString& _name, NArgExpr* args_ )
+FunctionExpr::FunctionExpr( const TQString& _name, NArgExpr* args_ )
: BaseExpr( 0/*undefined*/ )
, name(_name)
, args(args_)
@@ -874,19 +874,19 @@ FunctionExpr* FunctionExpr::copy() const
return new FunctionExpr(*this);
}
-QString FunctionExpr::debugString()
+TQString FunctionExpr::debugString()
{
- QString res;
- res.append( QString("FunctionExpr(") + name );
+ TQString res;
+ res.append( TQString("FunctionExpr(") + name );
if (args)
- res.append(QString(",") + args->debugString());
- res.append(QString(",type=%1)").arg(Driver::defaultSQLTypeName(type())));
+ res.append(TQString(",") + args->debugString());
+ res.append(TQString(",type=%1)").tqarg(Driver::defaultSQLTypeName(type())));
return res;
}
-QString FunctionExpr::toString(QuerySchemaParameterValueListIterator* params)
+TQString FunctionExpr::toString(QuerySchemaParameterValueListIterator* params)
{
- return name + "(" + (args ? args->toString(params) : QString::null) + ")";
+ return name + "(" + (args ? args->toString(params) : TQString()) + ")";
}
void FunctionExpr::getQueryParameters(QuerySchemaParameterList& params)
@@ -908,7 +908,7 @@ bool FunctionExpr::validate(ParseInfo& parseInfo)
return args ? args->validate(parseInfo) : true;
}
-bool FunctionExpr::isBuiltInAggregate(const QCString& fname)
+bool FunctionExpr::isBuiltInAggregate(const TQCString& fname)
{
- return builtInAggregates().find(fname.upper())!=FunctionExpr_builtIns.end();
+ return builtInAggregates().tqfind(fname.upper())!=FunctionExpr_builtIns.end();
}
diff --git a/kexi/kexidb/expression.h b/kexi/kexidb/expression.h
index 6ee98f326..ee2c98100 100644
--- a/kexi/kexidb/expression.h
+++ b/kexi/kexidb/expression.h
@@ -49,7 +49,7 @@ namespace KexiDB {
//#define KEXIDB_CUSTOM_TOKEN 0x1000
//! \return class name of class \a c
-KEXI_DB_EXPORT QString exprClassName(int c);
+KEXI_DB_EXPORT TQString exprClassName(int c);
class ParseInfo;
class NArgExpr;
@@ -66,8 +66,8 @@ class QuerySchemaParameterValueListIterator;
class KEXI_DB_EXPORT BaseExpr
{
public:
- typedef QPtrList<BaseExpr> List;
- typedef QPtrListIterator<BaseExpr> ListIterator;
+ typedef TQPtrList<BaseExpr> List;
+ typedef TQPtrListIterator<BaseExpr> ListIterator;
BaseExpr(int token);
virtual ~BaseExpr();
@@ -80,7 +80,7 @@ public:
virtual Field::Type type();
- BaseExpr* parent() const { return m_par; }
+ BaseExpr* tqparent() const { return m_par; }
virtual void setParent(BaseExpr *p) { m_par = p; }
@@ -89,7 +89,7 @@ public:
/*! \return string as a representation of this expression element by running recursive calls.
\a param, if not 0, points to a list item containing value of a query parameter
(used in QueryParameterExpr). */
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0) = 0;
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0) = 0;
/*! Collects query parameters (messages and types) reculsively and saves them to params.
The leaf nodes are objects of QueryParameterExpr class. */
@@ -97,16 +97,16 @@ public:
inline void debug() { KexiDBDbg << debugString() << endl; }
- virtual QString debugString();
+ virtual TQString debugString();
/*! \return single character if the token is < 256
or token name, e.g. LESS_OR_EQUAL (for debugging). */
- inline QString tokenToDebugString() { return tokenToDebugString(m_token); }
+ inline TQString tokenToDebugString() { return tokenToDebugString(m_token); }
- static QString tokenToDebugString(int token);
+ static TQString tokenToDebugString(int token);
/*! \return string for token, like "<=" or ">" */
- virtual QString tokenToString();
+ virtual TQString tokenToString();
int exprClass() const { return m_cl; }
@@ -121,7 +121,7 @@ public:
protected:
int m_cl; //!< class
- BaseExpr *m_par; //!< parent expression
+ BaseExpr *m_par; //!< tqparent expression
int m_token;
};
@@ -138,8 +138,8 @@ public:
void prepend(BaseExpr *expr);
BaseExpr *arg(int n);
int args();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
virtual bool validate(ParseInfo& parseInfo);
BaseExpr::List list;
@@ -155,8 +155,8 @@ public:
//! \return a deep copy of this object.
virtual UnaryExpr* copy() const;
virtual Field::Type type();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
BaseExpr *arg() const { return m_arg; }
virtual bool validate(ParseInfo& parseInfo);
@@ -181,13 +181,13 @@ public:
//! \return a deep copy of this object.
virtual BinaryExpr* copy() const;
virtual Field::Type type();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
BaseExpr *left() const { return m_larg; }
BaseExpr *right() const { return m_rarg; }
virtual bool validate(ParseInfo& parseInfo);
- virtual QString tokenToString();
+ virtual TQString tokenToString();
BaseExpr *m_larg;
BaseExpr *m_rarg;
@@ -199,17 +199,17 @@ public:
class KEXI_DB_EXPORT ConstExpr : public BaseExpr
{
public:
- ConstExpr(int token, const QVariant& val);
+ ConstExpr(int token, const TQVariant& val);
ConstExpr(const ConstExpr& expr);
virtual ~ConstExpr();
//! \return a deep copy of this object.
virtual ConstExpr* copy() const;
virtual Field::Type type();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
virtual bool validate(ParseInfo& parseInfo);
- QVariant value;
+ TQVariant value;
};
//! Query parameter used to getting user input of constant values.
@@ -217,14 +217,14 @@ public:
class KEXI_DB_EXPORT QueryParameterExpr : public ConstExpr
{
public:
- QueryParameterExpr(const QString& message);
+ QueryParameterExpr(const TQString& message);
QueryParameterExpr(const QueryParameterExpr& expr);
virtual ~QueryParameterExpr();
//! \return a deep copy of this object.
virtual QueryParameterExpr* copy() const;
virtual Field::Type type();
/*! Sets expected type of the parameter. The default is String.
- This method is called from parent's expression validate().
+ This method is called from tqparent's expression validate().
This depends on the type of the related expression.
For instance: query "SELECT * FROM cars WHERE name=[enter name]",
"[enter name]" has parameter of the same type as "name" field.
@@ -232,8 +232,8 @@ public:
of the expression and then the right side will have type set to String.
*/
void setType(Field::Type type);
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
virtual bool validate(ParseInfo& parseInfo);
protected:
@@ -244,14 +244,14 @@ protected:
class KEXI_DB_EXPORT VariableExpr : public BaseExpr
{
public:
- VariableExpr(const QString& _name);
+ VariableExpr(const TQString& _name);
VariableExpr(const VariableExpr& expr);
virtual ~VariableExpr();
//! \return a deep copy of this object.
virtual VariableExpr* copy() const;
virtual Field::Type type();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
/*! Validation. Sets field, tablePositionForField
@@ -260,7 +260,7 @@ public:
virtual bool validate(ParseInfo& parseInfo);
/*! Verbatim name as returned by scanner. */
- QString name;
+ TQString name;
/* NULL by default. After successful validate() it will point to a field,
if the variable is of a form "tablename.fieldname" or "fieldname",
@@ -288,21 +288,21 @@ public:
class KEXI_DB_EXPORT FunctionExpr : public BaseExpr
{
public:
- FunctionExpr(const QString& _name, NArgExpr* args_ = 0);
+ FunctionExpr(const TQString& _name, NArgExpr* args_ = 0);
FunctionExpr(const FunctionExpr& expr);
virtual ~FunctionExpr();
//! \return a deep copy of this object.
virtual FunctionExpr* copy() const;
virtual Field::Type type();
- virtual QString debugString();
- virtual QString toString(QuerySchemaParameterValueListIterator* params = 0);
+ virtual TQString debugString();
+ virtual TQString toString(QuerySchemaParameterValueListIterator* params = 0);
virtual void getQueryParameters(QuerySchemaParameterList& params);
virtual bool validate(ParseInfo& parseInfo);
- static QValueList<QCString> builtInAggregates();
- static bool isBuiltInAggregate(const QCString& fname);
+ static TQValueList<TQCString> builtInAggregates();
+ static bool isBuiltInAggregate(const TQCString& fname);
- QString name;
+ TQString name;
NArgExpr* args;
};
diff --git a/kexi/kexidb/field.cpp b/kexi/kexidb/field.cpp
index 882332727..97c4ae588 100644
--- a/kexi/kexidb/field.cpp
+++ b/kexi/kexidb/field.cpp
@@ -29,7 +29,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <assert.h>
@@ -63,9 +63,9 @@ Field::Field(QuerySchema *querySchema, BaseExpr* expr)
setExpression(expr);
}
-Field::Field(const QString& name, Type ctype,
+Field::Field(const TQString& name, Type ctype,
uint cconst, uint options, uint length, uint precision,
- QVariant defaultValue, const QString& caption, const QString& description,
+ TQVariant defaultValue, const TQString& caption, const TQString& description,
uint width)
: m_parent(0)
,m_name(name.lower())
@@ -124,7 +124,7 @@ void Field::init()
m_precision = 0;
m_visibleDecimalPlaces = -1;
m_options = NoOptions;
- m_defaultValue = QVariant(QString::null);
+ m_defaultValue = TQVariant(TQString());
m_order = -1;
m_width = 0;
m_expr = 0;
@@ -138,7 +138,7 @@ Field::Type Field::type() const
return m_type;
}
-QVariant::Type Field::variantType(uint type)
+TQVariant::Type Field::variantType(uint type)
{
switch(type)
{
@@ -146,67 +146,67 @@ QVariant::Type Field::variantType(uint type)
case ShortInteger:
case Integer:
case BigInteger:
- return QVariant::Int;
+ return TQVariant::Int;
case Boolean:
- return QVariant::Bool;
+ return TQVariant::Bool;
case Date:
- return QVariant::Date;
+ return TQVariant::Date;
case DateTime:
- return QVariant::DateTime;
+ return TQVariant::DateTime;
case Time:
- return QVariant::Time;
+ return TQVariant::Time;
case Float:
case Double:
- return QVariant::Double;
+ return TQVariant::Double;
case Text:
case LongText:
- return QVariant::String;
+ return TQVariant::String;
case BLOB:
- return QVariant::ByteArray;
+ return TQVariant::ByteArray;
default:
- return QVariant::Invalid;
+ return TQVariant::Invalid;
}
- return QVariant::Invalid;
+ return TQVariant::Invalid;
}
-QString Field::typeName(uint type)
+TQString Field::typeName(uint type)
{
m_typeNames.init();
- return (type <= LastType) ? m_typeNames.at(type) : QString::number(type);
+ return (type <= LastType) ? m_typeNames.at(type) : TQString::number(type);
}
-QString Field::typeString(uint type)
+TQString Field::typeString(uint type)
{
m_typeNames.init();
- return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : QString("Type%1").arg(type);
+ return (type <= LastType) ? m_typeNames.at((int)LastType+1 + type) : TQString("Type%1").tqarg(type);
}
-QString Field::typeGroupName(uint typeGroup)
+TQString Field::typeGroupName(uint typeGroup)
{
m_typeGroupNames.init();
return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at(typeGroup) : typeGroupString(typeGroup);
}
-QString Field::typeGroupString(uint typeGroup)
+TQString Field::typeGroupString(uint typeGroup)
{
m_typeGroupNames.init();
- return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : QString("TypeGroup%1").arg(typeGroup);
+ return (typeGroup <= LastTypeGroup) ? m_typeGroupNames.at((int)LastTypeGroup+1 + typeGroup) : TQString("TypeGroup%1").tqarg(typeGroup);
}
-Field::Type Field::typeForString(const QString& typeString)
+Field::Type Field::typeForString(const TQString& typeString)
{
m_typeNames.init();
- QMap<QString,Type>::ConstIterator it = m_typeNames.str2num.find(typeString.lower());
+ TQMap<TQString,Type>::ConstIterator it = m_typeNames.str2num.tqfind(typeString.lower());
if (it==m_typeNames.str2num.end())
return InvalidType;
return it.data();
}
-Field::TypeGroup Field::typeGroupForString(const QString& typeGroupString)
+Field::TypeGroup Field::typeGroupForString(const TQString& typeGroupString)
{
m_typeGroupNames.init();
- QMap<QString,TypeGroup>::ConstIterator it = m_typeGroupNames.str2num.find(typeGroupString.lower());
+ TQMap<TQString,TypeGroup>::ConstIterator it = m_typeGroupNames.str2num.tqfind(typeGroupString.lower());
if (it==m_typeGroupNames.str2num.end())
return InvalidGroup;
return it.data();
@@ -321,7 +321,7 @@ Field::setQuery(QuerySchema *querySchema)
}
void
-Field::setName(const QString& n)
+Field::setName(const TQString& n)
{
m_name = n.lower();
}
@@ -330,7 +330,7 @@ void
Field::setType(Type t)
{
if (m_expr) {
- KexiDBWarn << QString("Field::setType(%1)").arg(t)
+ KexiDBWarn << TQString("Field::setType(%1)").tqarg(t)
<< " could not set type because the field has expression assigned!" << endl;
return;
}
@@ -393,16 +393,16 @@ Field::setUnsigned(bool u)
}
void
-Field::setDefaultValue(const QVariant& def)
+Field::setDefaultValue(const TQVariant& def)
{
m_defaultValue = def;
}
bool
-Field::setDefaultValue(const QCString& def)
+Field::setDefaultValue(const TQCString& def)
{
if (def.isNull()) {
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
return true;
}
@@ -412,101 +412,101 @@ Field::setDefaultValue(const QCString& def)
case Byte: {
unsigned int v = def.toUInt(&ok);
if (!ok || v > 255)
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(v);
+ m_defaultValue = TQVariant(v);
break;
}case ShortInteger: {
int v = def.toInt(&ok);
if (!ok || (!(m_options & Unsigned) && (v < -32768 || v > 32767)) || ((m_options & Unsigned) && (v < 0 || v > 65535)))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(v);
+ m_defaultValue = TQVariant(v);
break;
}case Integer: {//4 bytes
long v = def.toLong(&ok);
//js: FIXME if (!ok || (!(m_options & Unsigned) && (-v > 0x080000000 || v > (0x080000000-1))) || ((m_options & Unsigned) && (v < 0 || v > 0x100000000)))
if (!ok || (!(m_options & Unsigned) && (-v > (int)0x07FFFFFFF || v > (int)(0x080000000-1))))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant((Q_LLONG)v);
+ m_defaultValue = TQVariant((TQ_LLONG)v);
break;
}case BigInteger: {//8 bytes
//! @todo BigInteger support
/*
- Q_LLONG long v = def.toLongLong(&ok);
+ TQ_LLONG long v = def.toLongLong(&ok);
//TODO: 2-part decoding
if (!ok || (!(m_options & Unsigned) && (-v > 0x080000000 || v > (0x080000000-1))))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
if (m_options & Unsigned)
- m_defaultValue=QVariant((Q_ULLONG) v);
+ m_defaultValue=TQVariant((TQ_ULLONG) v);
else
- m_defaultValue = QVariant((Q_LLONG)v);*/
+ m_defaultValue = TQVariant((TQ_LLONG)v);*/
break;
}case Boolean: {
unsigned short v = def.toUShort(&ok);
if (!ok || v > 1)
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant((bool)v);
+ m_defaultValue = TQVariant((bool)v);
break;
}case Date: {//YYYY-MM-DD
- QDate date = QDate::fromString( def, Qt::ISODate );
+ TQDate date = TQDate::fromString( def, Qt::ISODate );
if (!date.isValid())
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(date);
+ m_defaultValue = TQVariant(date);
break;
}case DateTime: {//YYYY-MM-DDTHH:MM:SS
- QDateTime dt = QDateTime::fromString( def, Qt::ISODate );
+ TQDateTime dt = TQDateTime::fromString( def, Qt::ISODate );
if (!dt.isValid())
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(dt);
+ m_defaultValue = TQVariant(dt);
break;
}case Time: {//HH:MM:SS
- QTime time = QTime::fromString( def, Qt::ISODate );
+ TQTime time = TQTime::fromString( def, Qt::ISODate );
if (!time.isValid())
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(time);
+ m_defaultValue = TQVariant(time);
break;
}case Float: {
float v = def.toFloat(&ok);
if (!ok || ((m_options & Unsigned) && (v < 0.0)))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(v);
+ m_defaultValue = TQVariant(v);
break;
}case Double: {
double v = def.toDouble(&ok);
if (!ok || ((m_options & Unsigned) && (v < 0.0)))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(v);
+ m_defaultValue = TQVariant(v);
break;
}case Text: {
if (def.isNull() || (def.length() > 255))
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant((QString)def);
+ m_defaultValue = TQVariant((TQString)def);
break;
}case LongText: {
if (def.isNull())
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant((QString)def);
+ m_defaultValue = TQVariant((TQString)def);
break;
}case BLOB: {
//TODO
if (def.isNull())
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
else
- m_defaultValue = QVariant(def);
+ m_defaultValue = TQVariant(def);
break;
}default:
- m_defaultValue = QVariant();
+ m_defaultValue = TQVariant();
}
return m_defaultValue.isNull();
}
@@ -580,25 +580,25 @@ void Field::setIndexed(bool s)
}
-QString Field::debugString() const
+TQString Field::debugString() const
{
KexiDB::Connection *conn = table() ? table()->connection() : 0;
- QString dbg = (m_name.isEmpty() ? "<NONAME> " : m_name + " ");
+ TQString dbg = (m_name.isEmpty() ? "<NONAME> " : m_name + " ");
if (m_options & Field::Unsigned)
dbg += " UNSIGNED ";
dbg += (conn && conn->driver()) ? conn->driver()->sqlTypeName(type()) : Driver::defaultSQLTypeName(type());
if (isFPNumericType() && m_precision>0) {
if (scale()>0)
- dbg += QString::fromLatin1("(%1,%2)").arg(m_precision).arg(scale());
+ dbg += TQString::tqfromLatin1("(%1,%2)").tqarg(m_precision).tqarg(scale());
else
- dbg += QString::fromLatin1("(%1)").arg(m_precision);
+ dbg += TQString::tqfromLatin1("(%1)").tqarg(m_precision);
}
else if (m_type==Field::Text && m_length>0)
- dbg += QString::fromLatin1("(%1)").arg(m_length);
+ dbg += TQString::tqfromLatin1("(%1)").tqarg(m_length);
if (m_constraints & Field::AutoInc)
dbg += " AUTOINC";
if (m_constraints & Field::Unique)
- dbg += " UNIQUE";
+ dbg += " UNITQUE";
if (m_constraints & Field::PrimaryKey)
dbg += " PKEY";
if (m_constraints & Field::ForeignKey)
@@ -608,18 +608,18 @@ QString Field::debugString() const
if (m_constraints & Field::NotEmpty)
dbg += " NOTEMPTY";
if (!m_defaultValue.isNull())
- dbg += QString(" DEFAULT=[%1]").arg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue);
+ dbg += TQString(" DEFAULT=[%1]").tqarg(m_defaultValue.typeName()) + KexiDB::variantToString(m_defaultValue);
if (m_expr)
dbg += " EXPRESSION=" + m_expr->debugString();
if (m_customProperties && !m_customProperties->isEmpty()) {
- dbg += QString(" CUSTOM PROPERTIES (%1): ").arg(m_customProperties->count());
+ dbg += TQString(" CUSTOM PROPERTIES (%1): ").tqarg(m_customProperties->count());
bool first = true;
foreach (CustomPropertiesMap::ConstIterator, it, *m_customProperties) {
if (first)
first = false;
else
dbg += ", ";
- dbg += QString("%1 = %2 (%3)").arg(it.key()).arg(it.data().toString()).arg(it.data().typeName());
+ dbg += TQString("%1 = %2 (%3)").tqarg(TQString(it.key())).tqarg(TQString(it.data().toString())).tqarg(TQString(it.data().typeName()));
}
}
return dbg;
@@ -641,18 +641,18 @@ void Field::setExpression(KexiDB::BaseExpr *expr)
m_expr = expr;
}
-QVariant Field::customProperty(const QCString& propertyName,
- const QVariant& defaultValue) const
+TQVariant Field::customProperty(const TQCString& propertyName,
+ const TQVariant& defaultValue) const
{
if (!m_customProperties)
return defaultValue;
- CustomPropertiesMap::ConstIterator it(m_customProperties->find(propertyName));
+ CustomPropertiesMap::ConstIterator it(m_customProperties->tqfind(propertyName));
if (it==m_customProperties->constEnd())
return defaultValue;
return it.data();
}
-void Field::setCustomProperty(const QCString& propertyName, const QVariant& value)
+void Field::setCustomProperty(const TQCString& propertyName, const TQVariant& value)
{
if (propertyName.isEmpty())
return;
@@ -664,13 +664,13 @@ void Field::setCustomProperty(const QCString& propertyName, const QVariant& valu
//-------------------------------------------------------
#define ADDTYPE(type, i18, str) this->at(Field::type) = i18; \
this->at(Field::type+Field::LastType+1) = str; \
- str2num.insert(QString::fromLatin1(str).lower(), type)
+ str2num.insert(TQString::tqfromLatin1(str).lower(), type)
#define ADDGROUP(type, i18, str) this->at(Field::type) = i18; \
this->at(Field::type+Field::LastTypeGroup+1) = str; \
- str2num.insert(QString::fromLatin1(str).lower(), type)
+ str2num.insert(TQString::tqfromLatin1(str).lower(), type)
Field::FieldTypeNames::FieldTypeNames()
- : QValueVector<QString>()
+ : TQValueVector<TQString>()
, m_initialized(false)
{
}
@@ -701,7 +701,7 @@ void Field::FieldTypeNames::init()
//-------------------------------------------------------
Field::FieldTypeGroupNames::FieldTypeGroupNames()
- : QValueVector<QString>()
+ : TQValueVector<TQString>()
, m_initialized(false)
{
}
diff --git a/kexi/kexidb/field.h b/kexi/kexidb/field.h
index 1fec04f63..9e0c94808 100644
--- a/kexi/kexidb/field.h
+++ b/kexi/kexidb/field.h
@@ -22,11 +22,11 @@
#ifndef KEXIDB_FIELD_H
#define KEXIDB_FIELD_H
-#include <qvariant.h>
-#include <qstring.h>
-#include <qpair.h>
-#include <qvaluevector.h>
-#include <qptrvector.h>
+#include <tqvariant.h>
+#include <tqstring.h>
+#include <tqpair.h>
+#include <tqvaluevector.h>
+#include <tqptrvector.h>
#include "kexidb/kexidb_export.h"
namespace KexiDB {
@@ -57,8 +57,8 @@ class BaseExpr;
Note that aliases for fields are defined within query, not in Field object,
because the same field can be used in different queries with different alias.
- Notes for advanced use: Field obeject is designed to be owned by a parent object.
- Such a parent object can be KexiDB::TableSchema, if the field defines single table column,
+ Notes for advanced use: Field obeject is designed to be owned by a tqparent object.
+ Such a tqparent object can be KexiDB::TableSchema, if the field defines single table column,
or KexiDB::QuerySchema, if the field defines an expression (KexiDB::BaseExpr class).
Using expression class for fields allos to define expressions within queries like
@@ -72,11 +72,11 @@ class BaseExpr;
class KEXI_DB_EXPORT Field
{
public:
- typedef QPtrList<Field> List; //!< list of fields
- typedef QPtrVector<Field> Vector; //!< vector of fields
- typedef QPtrListIterator<Field> ListIterator; //!< iterator for list of fields
- typedef QPair<Field*,Field*> Pair; //!< fields pair
- typedef QPtrList<Pair> PairList; //!< list of fields pair
+ typedef TQPtrList<Field> List; //!< list of fields
+ typedef TQPtrVector<Field> Vector; //!< vector of fields
+ typedef TQPtrListIterator<Field> ListIterator; //!< iterator for list of fields
+ typedef TQPair<Field*,Field*> Pair; //!< fields pair
+ typedef TQPtrList<Pair> PairList; //!< list of fields pair
/*! Unified (most common used) types of fields. */
enum Type
@@ -154,13 +154,13 @@ class KEXI_DB_EXPORT Field
Field();
/*! Creates a database field with specified properties. */
- Field(const QString& name, Type ctype,
+ Field(const TQString& name, Type ctype,
uint cconst=NoConstraints,
uint options = NoOptions,
uint length=0, uint precision=0,
- QVariant defaultValue=QVariant(),
- const QString& caption = QString::null,
- const QString& description = QString::null,
+ TQVariant defaultValue=TQVariant(),
+ const TQString& caption = TQString(),
+ const TQString& description = TQString(),
uint width = 0);
/*! Copy constructor. */
@@ -168,38 +168,38 @@ class KEXI_DB_EXPORT Field
virtual ~Field();
- //! Converts type \a type to QVariant equivalent as accurate as possible
- static QVariant::Type variantType(uint type);
+ //! Converts type \a type to TQVariant equivalent as accurate as possible
+ static TQVariant::Type variantType(uint type);
/*! \return a i18n'd type name for \a type (\a type has to be an element from Field::Type,
not greater than Field::LastType) */
- static QString typeName(uint type);
+ static TQString typeName(uint type);
/*! \return type string for \a type, e.g. "Integer" for Integer type
(not-i18n'd, \a type has to be an element from Field::Type,
not greater than Field::LastType) */
- static QString typeString(uint type);
+ static TQString typeString(uint type);
/*! \return type for a given \a typeString */
- static Type typeForString(const QString& typeString);
+ static Type typeForString(const TQString& typeString);
/*! \return type group for a given \a typeGroupString */
- static TypeGroup typeGroupForString(const QString& typeGroupString);
+ static TypeGroup typeGroupForString(const TQString& typeGroupString);
/*! \return group for \a type */
static TypeGroup typeGroup(uint type);
/*! \return a i18n'd group name for \a typeGroup
(\a typeGroup has to be an element from Field::TypeGroup) */
- static QString typeGroupName(uint typeGroup);
+ static TQString typeGroupName(uint typeGroup);
/*! \return type group string for \a typeGroup, e.g. "IntegerGroup" for IntegerGroup type
(not-i18n'd, \a type has to be an element from Field::Type,
not greater than Field::LastType) */
- static QString typeGroupString(uint typeGroup);
+ static TQString typeGroupString(uint typeGroup);
/* ! \return the name of this field */
- inline QString name() const { return m_name; }
+ inline TQString name() const { return m_name; }
/*! \return table schema of table that owns this field
or null if it has no table assigned.
@@ -287,43 +287,43 @@ class KEXI_DB_EXPORT Field
void setOptions(uint options) { m_options = options; }
- //! Converts field's type to QVariant equivalent as accurate as possible
- inline QVariant::Type variantType() const { return variantType(type()); }
+ //! Converts field's type to TQVariant equivalent as accurate as possible
+ inline TQVariant::Type variantType() const { return variantType(type()); }
/*! \return a type for this field. If there's expression assigned,
type of the expression is returned instead. */
Type type() const;
//! \return a i18n'd type name for this field
- inline QString typeName() const { return Field::typeName(type()); }
+ inline TQString typeName() const { return Field::typeName(type()); }
//! \return type group for this field
inline TypeGroup typeGroup() const { return Field::typeGroup(type()); }
//! \return a i18n'd type group name for this field
- inline QString typeGroupName() const { return Field::typeGroupName(type()); }
+ inline TQString typeGroupName() const { return Field::typeGroupName(type()); }
//! \return a type string for this field,
//! for example "Integer" string for Field::Integer type.
- inline QString typeString() const { return Field::typeString(type()); }
+ inline TQString typeString() const { return Field::typeString(type()); }
//! \return a type group string for this field,
//! for example "Integer" string for Field::IntegerGroup.
- inline QString typeGroupString() const { return Field::typeGroupString(type()); }
+ inline TQString typeGroupString() const { return Field::typeGroupString(type()); }
/*! \return (optional) subtype for this field.
Subtype is a string providing additional hint for field's type.
- E.g. for BLOB type, it can be a MIME type or certain QVariant type name,
- for example: "QPixmap", "QColor" or "QFont" */
- inline QString subType() const { return m_subType; }
+ E.g. for BLOB type, it can be a MIME type or certain TQVariant type name,
+ for example: TQPIXMAP_OBJECT_NAME_STRING, "TQColor" or "TQFont" */
+ inline TQString subType() const { return m_subType; }
/*! Sets (optional) subtype for this field.
\sa subType() */
- inline void setSubType(const QString& subType) { m_subType = subType; }
+ inline void setSubType(const TQString& subType) { m_subType = subType; }
//! \return default value for this field. Null value means there
//! is no default value declared. The variant value is compatible with field's type.
- inline QVariant defaultValue() const { return m_defaultValue; }
+ inline TQVariant defaultValue() const { return m_defaultValue; }
/*! \return length of text, only meaningful if the field type is text.
0 means "default length". */
@@ -342,7 +342,7 @@ class KEXI_DB_EXPORT Field
of 6 and a scale of 4. Integers can be considered to have a scale of zero. */
inline uint scale() const { return m_length; }
-//! @todo should we keep extended properties here or move them to a QVariant dictionary?
+//! @todo should we keep extended properties here or move them to a TQVariant dictionary?
/*! \return number of decimal places that should be visible to the user,
e.g. within table view widget, form or printout.
Only meaningful if the field type is floating point or (in the future: decimal or currency).
@@ -368,13 +368,13 @@ class KEXI_DB_EXPORT Field
inline int order() const { return m_order; }
/*! \return caption of this field. */
- inline QString caption() const { return m_caption; }
+ inline TQString caption() const { return m_caption; }
/*! \return caption of this field or - if empty - return its name. */
- inline QString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
+ inline TQString captionOrName() const { return m_caption.isEmpty() ? m_name : m_caption; }
/*! \return description text for this field. */
- inline QString description() const { return m_desc; }
+ inline TQString description() const { return m_desc; }
/*! \return width of this field (usually in pixels or points)
0 (the default) means there is no hint for the width. */
@@ -404,7 +404,7 @@ class KEXI_DB_EXPORT Field
void setType(Type t);
/*! Sets name \a name for this field. */
- void setName(const QString& name);
+ void setName(const TQString& name);
/*! Sets constraints to \a c. If PrimaryKey is set in \a c, also
constraits implied by being primary key are enforced (see setPrimaryKey()).
@@ -432,13 +432,13 @@ class KEXI_DB_EXPORT Field
/*! Sets default value for this field. Setting null value removes the default value.
@see defaultValue() */
- void setDefaultValue(const QVariant& def);
+ void setDefaultValue(const TQVariant& def);
- /*! Sets default value decoded from QCString.
+ /*! Sets default value decoded from TQCString.
Decoding errors are detected (value is strictly checked against field type)
- - if one is encountered, default value is cleared (defaultValue()==QVariant()).
+ - if one is encountered, default value is cleared (defaultValue()==TQVariant()).
\return true if given value was valid for field type. */
- bool setDefaultValue(const QCString& def);
+ bool setDefaultValue(const TQCString& def);
/*! Sets auto increment flag. Only available to set true,
if isAutoIncrementAllowed() is true. */
@@ -490,10 +490,10 @@ class KEXI_DB_EXPORT Field
void setIndexed(bool s);
/*! Sets caption for this field to \a caption. */
- void setCaption(const QString& caption) { m_caption=caption; }
+ void setCaption(const TQString& caption) { m_caption=caption; }
/*! Sets description for this field to \a description. */
- void setDescription(const QString& description) { m_desc=description; }
+ void setDescription(const TQString& description) { m_desc=description; }
/*! Sets visible width for this field to \a w
(usually in pixels or points). 0 means there is no hint for the width. */
@@ -503,14 +503,14 @@ class KEXI_DB_EXPORT Field
to query schemas' field list. QueryAsterisk subclasses Field class,
and to check if the given object (pointed by Field*)
is asterisk or just ordinary field definition,
- you can call this method. This is just effective version of QObject::isA().
+ you can call this method. This is just effective version of TQObject::isA().
Every QueryAsterisk object returns true here,
and every Field object returns false.
*/
virtual bool isQueryAsterisk() const { return false; }
/*! \return string for debugging purposes. */
- virtual QString debugString() const;
+ virtual TQString debugString() const;
/*! Shows debug information about this field. */
void debug();
@@ -538,22 +538,22 @@ class KEXI_DB_EXPORT Field
//<TMP>
/*! \return the hints for enum fields. */
- QValueVector<QString> enumHints() const { return m_hints; }
- QString enumHint(uint num) { return (num < m_hints.size()) ? m_hints.at(num) : QString::null; }
+ TQValueVector<TQString> enumHints() const { return m_hints; }
+ TQString enumHint(uint num) { return (num < m_hints.size()) ? m_hints.at(num) : TQString(); }
/*! sets the hint for enum fields */
- void setEnumHints(const QValueVector<QString> &l) { m_hints = l; }
+ void setEnumHints(const TQValueVector<TQString> &l) { m_hints = l; }
//</TMP>
/*! \return custom property \a propertyName.
If there is no such a property, \a defaultValue is returned. */
- QVariant customProperty(const QCString& propertyName,
- const QVariant& defaultValue = QVariant()) const;
+ TQVariant customProperty(const TQCString& propertyName,
+ const TQVariant& defaultValue = TQVariant()) const;
//! Sets value \a value for custom property \a propertyName
- void setCustomProperty(const QCString& propertyName, const QVariant& value);
+ void setCustomProperty(const TQCString& propertyName, const TQVariant& value);
//! A data type used for handling custom properties of a field
- typedef QMap<QCString,QVariant> CustomPropertiesMap;
+ typedef TQMap<TQCString,TQVariant> CustomPropertiesMap;
//! \return all custom properties
inline const CustomPropertiesMap customProperties() const {
@@ -575,39 +575,39 @@ class KEXI_DB_EXPORT Field
FieldList *m_parent; //!< In most cases this points to a TableSchema
//!< object that field is assigned.
- QString m_name;
- QString m_subType;
+ TQString m_name;
+ TQString m_subType;
uint m_constraints;
uint m_length; //!< also used for storing scale for floating point types
uint m_precision;
int m_visibleDecimalPlaces; //!< used in visibleDecimalPlaces()
uint m_options;
- QVariant m_defaultValue;
+ TQVariant m_defaultValue;
int m_order;
- QString m_caption;
- QString m_desc;
+ TQString m_caption;
+ TQString m_desc;
uint m_width;
- QValueVector<QString> m_hints;
+ TQValueVector<TQString> m_hints;
KexiDB::BaseExpr *m_expr;
CustomPropertiesMap* m_customProperties;
//! @internal Used in m_typeNames member to handle i18n'd type names
- class KEXI_DB_EXPORT FieldTypeNames : public QValueVector<QString> {
+ class KEXI_DB_EXPORT FieldTypeNames : public TQValueVector<TQString> {
public:
FieldTypeNames();
void init();
- QMap<QString,Type> str2num;
+ TQMap<TQString,Type> str2num;
protected:
bool m_initialized : 1;
};
//! @internal Used in m_typeGroupNames member to handle i18n'd type group names
- class KEXI_DB_EXPORT FieldTypeGroupNames : public QValueVector<QString> {
+ class KEXI_DB_EXPORT FieldTypeGroupNames : public TQValueVector<TQString> {
public:
FieldTypeGroupNames();
void init();
- QMap<QString,TypeGroup> str2num;
+ TQMap<TQString,TypeGroup> str2num;
protected:
bool m_initialized : 1;
};
diff --git a/kexi/kexidb/fieldlist.cpp b/kexi/kexidb/fieldlist.cpp
index ee159c723..dea19876f 100644
--- a/kexi/kexidb/fieldlist.cpp
+++ b/kexi/kexidb/fieldlist.cpp
@@ -60,10 +60,10 @@ FieldList::~FieldList()
void FieldList::clear()
{
-// m_name = QString::null;
+// m_name = TQString();
m_fields.clear();
m_fields_by_name.clear();
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
delete m_autoinc_fields;
m_autoinc_fields = 0;
}
@@ -81,20 +81,20 @@ FieldList& FieldList::insertField(uint index, KexiDB::Field *field)
return *this;
if (!field->name().isEmpty())
m_fields_by_name.insert(field->name().lower(),field);
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
return *this;
}
-void FieldList::renameField(const QString& oldName, const QString& newName)
+void FieldList::renameField(const TQString& oldName, const TQString& newName)
{
renameField( m_fields_by_name[ oldName ], newName );
}
-void FieldList::renameField(KexiDB::Field *field, const QString& newName)
+void FieldList::renameField(KexiDB::Field *field, const TQString& newName)
{
if (!field || field != m_fields_by_name[ field->name() ]) {
KexiDBFatal << "FieldList::renameField() no field found "
- << (field ? QString("\"%1\"").arg(field->name()) : QString::null) << endl;
+ << (field ? TQString("\"%1\"").tqarg(field->name()) : TQString()) << endl;
return;
}
m_fields_by_name.take( field->name() );
@@ -115,17 +115,17 @@ void FieldList::removeField(KexiDB::Field *field)
return;
m_fields_by_name.remove(field->name());
m_fields.remove(field);
- m_sqlFields = QString::null;
+ m_sqlFields = TQString();
}
-Field* FieldList::field(const QString& name)
+Field* FieldList::field(const TQString& name)
{
return m_fields_by_name[name];
}
-QString FieldList::debugString()
+TQString FieldList::debugString()
{
- QString dbg;
+ TQString dbg;
dbg.reserve(512);
Field::ListIterator it( m_fields );
Field *field;
@@ -156,19 +156,19 @@ void FieldList::debug()
fl->addField(f); \
}
-static QString subListWarning1(const QString& fname) {
- return QString("FieldList::subList() could not find field \"%1\"").arg(fname);
+static TQString subListWarning1(const TQString& fname) {
+ return TQString("FieldList::subList() could not find field \"%1\"").tqarg(fname);
}
-FieldList* FieldList::subList(const QString& n1, const QString& n2,
- const QString& n3, const QString& n4,
- const QString& n5, const QString& n6,
- const QString& n7, const QString& n8,
- const QString& n9, const QString& n10,
- const QString& n11, const QString& n12,
- const QString& n13, const QString& n14,
- const QString& n15, const QString& n16,
- const QString& n17, const QString& n18)
+FieldList* FieldList::subList(const TQString& n1, const TQString& n2,
+ const TQString& n3, const TQString& n4,
+ const TQString& n5, const TQString& n6,
+ const TQString& n7, const TQString& n8,
+ const TQString& n9, const TQString& n10,
+ const TQString& n11, const TQString& n12,
+ const TQString& n13, const TQString& n14,
+ const TQString& n15, const TQString& n16,
+ const TQString& n17, const TQString& n18)
{
if (n1.isEmpty())
return 0;
@@ -195,24 +195,24 @@ FieldList* FieldList::subList(const QString& n1, const QString& n2,
return fl;
}
-FieldList* FieldList::subList(const QStringList& list)
+FieldList* FieldList::subList(const TQStringList& list)
{
Field *f;
FieldList *fl = new FieldList(false);
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
_ADD_FIELD( (*it) );
}
return fl;
}
-FieldList* FieldList::subList(const QValueList<uint>& list)
+FieldList* FieldList::subList(const TQValueList<uint>& list)
{
Field *f;
FieldList *fl = new FieldList(false);
- foreach(QValueList<uint>::ConstIterator, it, list) {
+ foreach(TQValueList<uint>::ConstIterator, it, list) {
f = field(*it);
if (!f) {
- KexiDBWarn << QString("FieldList::subList() could not find field at position %1").arg(*it) << endl;
+ KexiDBWarn << TQString("FieldList::subList() could not find field at position %1").tqarg(*it) << endl;
delete fl;
return 0;
}
@@ -221,10 +221,10 @@ FieldList* FieldList::subList(const QValueList<uint>& list)
return fl;
}
-QStringList FieldList::names() const
+TQStringList FieldList::names() const
{
- QStringList r;
-// for (QDictIterator<Field> it(m_fields_by_name);it.current();++it) {
+ TQStringList r;
+// for (TQDictIterator<Field> it(m_fields_by_name);it.current();++it) {
// r += it.currentKey().lower();
// }
for (Field::ListIterator it(m_fields); it.current(); ++it) {
@@ -234,15 +234,15 @@ QStringList FieldList::names() const
}
//static
-QString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
- const QString& separator, const QString& tableAlias, int drvEscaping)
+TQString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
+ const TQString& separator, const TQString& tableAlias, int drvEscaping)
{
if (!list)
- return QString::null;
- QString result;
+ return TQString();
+ TQString result;
result.reserve(256);
bool start = true;
- const QString tableAliasAndDot( tableAlias.isEmpty() ? QString::null : (tableAlias + ".") );
+ const TQString tableAliasAndDot( tableAlias.isEmpty() ? TQString() : (tableAlias + ".") );
for (Field::ListIterator it( *list ); it.current(); ++it) {
if (!start)
result += separator;
@@ -253,8 +253,8 @@ QString FieldList::sqlFieldsList(Field::List* list, Driver *driver,
return result;
}
-QString FieldList::sqlFieldsList(Driver *driver,
- const QString& separator, const QString& tableAlias, int drvEscaping)
+TQString FieldList::sqlFieldsList(Driver *driver,
+ const TQString& separator, const TQString& tableAlias, int drvEscaping)
{
if (!m_sqlFields.isEmpty())
return m_sqlFields;
diff --git a/kexi/kexidb/fieldlist.h b/kexi/kexidb/fieldlist.h
index fd47459eb..c5f28d5b3 100644
--- a/kexi/kexidb/fieldlist.h
+++ b/kexi/kexidb/fieldlist.h
@@ -20,9 +20,9 @@
#ifndef KEXIDB_FIELDLIST_H
#define KEXIDB_FIELDLIST_H
-#include <qvaluelist.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqdict.h>
+#include <tqstring.h>
#include <kexidb/field.h>
#include <kexidb/driver.h>
@@ -76,17 +76,17 @@ class KEXI_DB_EXPORT FieldList
inline Field* field(uint id) { return (id < m_fields.count()) ? m_fields.at(id) : 0; }
/*! \return field with name \a name or NULL if there is no such a field. */
- virtual Field* field(const QString& name);
+ virtual Field* field(const TQString& name);
/*! \return true if this list contains given \a field. */
- inline bool hasField(const Field* field) { return m_fields.findRef(field)!=-1; }
+ inline bool hasField(const Field* field) { return m_fields.tqfindRef(field)!=-1; }
/*! \return first occurrence of \a field in the list
or -1 if this list does not contain this field. */
- inline int indexOf(const Field* field) { return m_fields.findRef(field); }
+ inline int indexOf(const Field* field) { return m_fields.tqfindRef(field); }
/*! \return list of field names for this list. */
- QStringList names() const;
+ TQStringList names() const;
Field::ListIterator fieldsIterator() const { return Field::ListIterator(m_fields); }
@@ -102,40 +102,40 @@ class KEXI_DB_EXPORT FieldList
virtual void clear();
/*! \return String for debugging purposes. */
- virtual QString debugString();
+ virtual TQString debugString();
/*! Shows debug information about all fields in the list. */
void debug();
/*! Creates and returns a list that contain fields selected by name.
At least one field (exising on this list) should be selected, otherwise 0 is
- returned. Returned FieldList object is not owned by any parent (so you need
+ returned. Returned FieldList object is not owned by any tqparent (so you need
to destroy yourself) and Field objects included in it are not owned by it
(but still as before, by 'this' object).
Returned list can be usable e.g. as argument for Connection::insertRecord().
0 is returned if at least one name cannot be found.
*/
- FieldList* subList(const QString& n1, const QString& n2 = QString::null,
- const QString& n3 = QString::null, const QString& n4 = QString::null,
- const QString& n5 = QString::null, const QString& n6 = QString::null,
- const QString& n7 = QString::null, const QString& n8 = QString::null,
- const QString& n9 = QString::null, const QString& n10 = QString::null,
- const QString& n11 = QString::null, const QString& n12 = QString::null,
- const QString& n13 = QString::null, const QString& n14 = QString::null,
- const QString& n15 = QString::null, const QString& n16 = QString::null,
- const QString& n17 = QString::null, const QString& n18 = QString::null
+ FieldList* subList(const TQString& n1, const TQString& n2 = TQString(),
+ const TQString& n3 = TQString(), const TQString& n4 = TQString(),
+ const TQString& n5 = TQString(), const TQString& n6 = TQString(),
+ const TQString& n7 = TQString(), const TQString& n8 = TQString(),
+ const TQString& n9 = TQString(), const TQString& n10 = TQString(),
+ const TQString& n11 = TQString(), const TQString& n12 = TQString(),
+ const TQString& n13 = TQString(), const TQString& n14 = TQString(),
+ const TQString& n15 = TQString(), const TQString& n16 = TQString(),
+ const TQString& n17 = TQString(), const TQString& n18 = TQString()
);
- /*! Like above, but with a QStringList */
- FieldList* subList(const QStringList& list);
+ /*! Like above, but with a TQStringList */
+ FieldList* subList(const TQStringList& list);
/*! Like above, but with a list of field indices */
- FieldList* subList(const QValueList<uint>& list);
+ FieldList* subList(const TQValueList<uint>& list);
/*! \return a string that is a result of all field names concatenated
and with \a separator. This is usable e.g. as argument like "field1,field2"
for "INSERT INTO (xxx) ..". The result of this method is effectively cached,
- and it is invalidated when set of fields changes (e.g. using clear()
+ and it is tqinvalidated when set of fields changes (e.g. using clear()
or addField()).
\a tableAlias, if provided is prepended to each field, so the resulting
names will be in form tableAlias.fieldName. This option is used for building
@@ -143,31 +143,31 @@ class KEXI_DB_EXPORT FieldList
See @ref Connection::selectStatement() for example use.
\a drvEscaping can be used to alter default escaping type.
*/
- QString sqlFieldsList(Driver *driver, const QString& separator = QString::fromLatin1(","),
- const QString& tableAlias = QString::null,
+ TQString sqlFieldsList(Driver *driver, const TQString& separator = TQString::tqfromLatin1(","),
+ const TQString& tableAlias = TQString(),
int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary);
/*! Like above, but this is convenient static function, so you can pass any \a list here. */
- static QString sqlFieldsList(Field::List* list, Driver *driver,
- const QString& separator = QString::fromLatin1(","), const QString& tableAlias = QString::null,
+ static TQString sqlFieldsList(Field::List* list, Driver *driver,
+ const TQString& separator = TQString::tqfromLatin1(","), const TQString& tableAlias = TQString(),
int drvEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary);
/*! @internal Renames field \a oldName to \a newName.
Do not use this for physical renaming columns. Use AlterTableHandler instead. */
- void renameField(const QString& oldName, const QString& newName);
+ void renameField(const TQString& oldName, const TQString& newName);
/*! @internal
- \overload void renameField(const QString& oldName, const QString& newName) */
- void renameField(KexiDB::Field *field, const QString& newName);
+ \overload void renameField(const TQString& oldName, const TQString& newName) */
+ void renameField(KexiDB::Field *field, const TQString& newName);
protected:
Field::List m_fields;
- QDict<Field> m_fields_by_name; //!< Fields collected by name. Not used by QuerySchema.
+ TQDict<Field> m_fields_by_name; //!< Fields collected by name. Not used by QuerySchema.
Field::List *m_autoinc_fields;
private:
//! cached
- QString m_sqlFields;
+ TQString m_sqlFields;
};
} //namespace KexiDB
diff --git a/kexi/kexidb/fieldvalidator.cpp b/kexi/kexidb/fieldvalidator.cpp
index e657d2faf..d9252c206 100644
--- a/kexi/kexidb/fieldvalidator.cpp
+++ b/kexi/kexidb/fieldvalidator.cpp
@@ -22,19 +22,19 @@
#include <kexiutils/longlongvalidator.h>
#include <knumvalidator.h>
-#include <qwidget.h>
+#include <tqwidget.h>
using namespace KexiDB;
-FieldValidator::FieldValidator( const Field &field, QWidget * parent, const char * name )
- : KexiUtils::MultiValidator(parent, name)
+FieldValidator::FieldValidator( const Field &field, TQWidget * tqparent, const char * name )
+ : KexiUtils::MultiValidator(TQT_TQOBJECT(tqparent), name)
{
//! @todo merge this code with KexiTableEdit code!
//! @todo set maximum length validator
-//! @todo handle input mask (via QLineEdit::setInputMask()
+//! @todo handle input tqmask (via TQLineEdit::setInputMask()
const Field::Type t = field.type();
if (field.isIntegerType()) {
- QValidator *validator = 0;
+ TQValidator *validator = 0;
const bool u = field.isUnsigned();
int bottom, top;
if (t==Field::Byte) {
@@ -59,7 +59,7 @@ FieldValidator::FieldValidator( const Field &field, QWidget * parent, const char
addSubvalidator( validator );
}
else if (field.isFPNumericType()) {
- QValidator *validator;
+ TQValidator *validator;
if (t==Field::Float) {
if (field.isUnsigned()) //ok?
validator = new KDoubleValidator(0, 3.4e+38, field.scale(), 0);
@@ -76,7 +76,7 @@ FieldValidator::FieldValidator( const Field &field, QWidget * parent, const char
}
else if (t==Field::Date) {
//! @todo add validator
-// QValidator *validator = new KDateValidator(this);
+// TQValidator *validator = new KDateValidator(this);
// setValidator( validator );
//moved setInputMask( dateFormatter()->inputMask() );
}
diff --git a/kexi/kexidb/fieldvalidator.h b/kexi/kexidb/fieldvalidator.h
index 4c5dbbfe7..7b0e2bf81 100644
--- a/kexi/kexidb/fieldvalidator.h
+++ b/kexi/kexidb/fieldvalidator.h
@@ -23,13 +23,13 @@
#include <kexidb/kexidb_export.h>
#include <kexiutils/validator.h>
-class QWidget;
+class TQWidget;
namespace KexiDB {
class Field;
//! @short A validator for KexiDB data types
-/*! This can be used by QLineEdit or subclass to provide validated
+/*! This can be used by TQLineEdit or subclass to provide validated
text entry. Curently is supports all integer types, floating point types and booleans.
Internal validators like KIntValidator or KexiUtils::LongLongValidator are used.
'unsigned' and 'scale' parameters are taken into account when setting up internal validators.
@@ -40,7 +40,7 @@ class KEXI_DB_EXPORT FieldValidator : public KexiUtils::MultiValidator
{
public:
//! Setups the validator for \a field. Does not keep a pointer to \a field.
- FieldValidator( const Field &field, QWidget * parent, const char * name = 0 );
+ FieldValidator( const Field &field, TQWidget * tqparent, const char * name = 0 );
~FieldValidator();
};
diff --git a/kexi/kexidb/global.cpp b/kexi/kexidb/global.cpp
index cbbfb723c..e5f6ecde8 100644
--- a/kexi/kexidb/global.cpp
+++ b/kexi/kexidb/global.cpp
@@ -47,7 +47,7 @@ void ServerVersionInfo::clear()
major = 0;
minor = 0;
release = 0;
- string = QString::null;
+ string = TQString();
}
//------------------------
diff --git a/kexi/kexidb/global.h b/kexi/kexidb/global.h
index 78c1b68b6..1a906ee31 100644
--- a/kexi/kexidb/global.h
+++ b/kexi/kexidb/global.h
@@ -21,7 +21,7 @@
#define KEXIDB_GLOBAL_H
#include <kexidb/kexidb_export.h>
-#include <qstring.h>
+#include <tqstring.h>
//global public definitions
@@ -66,14 +66,14 @@ Data representation
\section Drivers
-Drivers are loaded using DriverManager::driver(const QString& name). The names
+Drivers are loaded using DriverManager::driver(const TQString& name). The names
of drivers are given in their drivers .desktop file in the
X-Kexi-DriverName field.
KexiDB supports two kinds of databases: file-based and network-based databases.
The type of a driver is available from several places. The X-Kexi-DriverType
field in the driver's .desktop file, is read by the DriverManager and
-available by calling DriverManager::driverInfo(const QString &name) and using
+available by calling DriverManager::driverInfo(const TQString &name) and using
the Driver::Info#fileBased member from the result. Given a reference to a
Driver, its type can also be found directly using Driver::isFileDriver() const.
@@ -140,7 +140,7 @@ class KEXI_DB_EXPORT ServerVersionInfo
uint release;
//! Version string, as returned by the server
- QString string;
+ TQString string;
};
/*! Object types set like table or query. */
@@ -160,8 +160,8 @@ enum ObjectTypes {
}
#ifndef futureI18n
-# define futureI18n QString
-# define futureI18n2(a,b) QString(b)
+# define futureI18n TQString
+# define futureI18n2(a,b) TQString(b)
#endif
#ifndef FUTURE_I18N_NOOP
diff --git a/kexi/kexidb/indexschema.cpp b/kexi/kexidb/indexschema.cpp
index 20dc9e829..c672305a2 100644
--- a/kexi/kexidb/indexschema.cpp
+++ b/kexi/kexidb/indexschema.cpp
@@ -41,11 +41,11 @@ IndexSchema::IndexSchema(TableSchema *tableSchema)
m_master_owned_rels.setAutoDelete(true); //rels at the master-side are owned
}
-IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& parentTable)
+IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& tqparentTable)
// : FieldList(static_cast<const FieldList&>(idx))//fields are not owned by IndexSchema object
: FieldList(false)//fields are not owned by IndexSchema object
, SchemaData(static_cast<const SchemaData&>(idx))
- , m_tableSchema(&parentTable)
+ , m_tableSchema(&tqparentTable)
, m_primary( idx.m_primary )
, m_unique( idx.m_unique )
, m_isAutoGenerated( idx.m_isAutoGenerated )
@@ -55,14 +55,14 @@ IndexSchema::IndexSchema(const IndexSchema& idx, TableSchema& parentTable)
//deep copy of the fields
for (Field::ListIterator f_it(idx.m_fields); f_it.current(); ++f_it) {
- Field *parentTableField = parentTable.field( f_it.current()->name() );
- if (!parentTableField) {
- KexiDBWarn << "IndexSchema::IndexSchema(const IndexSchema& idx, const TableSchema& parentTable): "
- "cannot find field '" << f_it.current()->name() << " in parentTable. Empty index will be created!" << endl;
+ Field *tqparentTableField = tqparentTable.field( f_it.current()->name() );
+ if (!tqparentTableField) {
+ KexiDBWarn << "IndexSchema::IndexSchema(const IndexSchema& idx, const TableSchema& tqparentTable): "
+ "cannot find field '" << f_it.current()->name() << " in tqparentTable. Empty index will be created!" << endl;
FieldList::clear();
break;
}
- addField( parentTableField );
+ addField( tqparentTableField );
}
//js TODO: copy relationships!
@@ -79,7 +79,7 @@ IndexSchema::~IndexSchema()
So, we need to detach all these relationships from details-side, corresponding indices.
*/
- QPtrListIterator<Relationship> it(m_master_owned_rels);
+ TQPtrListIterator<Relationship> it(m_master_owned_rels);
for (;it.current();++it) {
if (it.current()->detailsIndex()) {
it.current()->detailsIndex()->detachRelationship(it.current());
@@ -151,13 +151,13 @@ void IndexSchema::setForeignKey(bool set)
}
}
-QString IndexSchema::debugString()
+TQString IndexSchema::debugString()
{
- return QString("INDEX ") + schemaDataDebugString() + "\n"
+ return TQString("INDEX ") + schemaDataDebugString() + "\n"
+ (m_isForeignKey ? "FOREIGN KEY " : "")
+ (m_isAutoGenerated ? "AUTOGENERATED " : "")
+ (m_primary ? "PRIMARY " : "")
- + ((!m_primary) && m_unique ? "UNIQUE " : "")
+ + ((!m_primary) && m_unique ? "UNITQUE " : "")
+ FieldList::debugString();
}
@@ -172,18 +172,18 @@ void IndexSchema::attachRelationship(Relationship *rel, bool ownedByMaster)
return;
if (rel->masterIndex()==this) {
if (ownedByMaster) {
- if (m_master_owned_rels.findRef(rel)==-1) {
+ if (m_master_owned_rels.tqfindRef(rel)==-1) {
m_master_owned_rels.append(rel);
}
}
else {//not owned
- if (m_master_rels.findRef(rel)==-1) {
+ if (m_master_rels.tqfindRef(rel)==-1) {
m_master_rels.append(rel);
}
}
}
else if (rel->detailsIndex()==this) {
- if (m_details_rels.findRef(rel)==-1) {
+ if (m_details_rels.tqfindRef(rel)==-1) {
m_details_rels.append(rel);
}
}
@@ -193,7 +193,7 @@ void IndexSchema::detachRelationship(Relationship *rel)
{
if (!rel)
return;
- m_master_owned_rels.take( m_master_owned_rels.findRef(rel) ); //for sanity
- m_master_rels.take( m_master_rels.findRef(rel) ); //for sanity
- m_details_rels.take( m_details_rels.findRef(rel) ); //for sanity
+ m_master_owned_rels.take( m_master_owned_rels.tqfindRef(rel) ); //for sanity
+ m_master_rels.take( m_master_rels.tqfindRef(rel) ); //for sanity
+ m_details_rels.take( m_details_rels.tqfindRef(rel) ); //for sanity
}
diff --git a/kexi/kexidb/indexschema.h b/kexi/kexidb/indexschema.h
index a8bec4338..60d1d7ac7 100644
--- a/kexi/kexidb/indexschema.h
+++ b/kexi/kexidb/indexschema.h
@@ -20,8 +20,8 @@
#ifndef KEXIDB_INDEX_H
#define KEXIDB_INDEX_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kexidb/fieldlist.h>
#include <kexidb/schemadata.h>
@@ -43,8 +43,8 @@ class Relationship;
class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
{
public:
- typedef QPtrList<IndexSchema> List;
- typedef QPtrListIterator<IndexSchema> ListIterator;
+ typedef TQPtrList<IndexSchema> List;
+ typedef TQPtrListIterator<IndexSchema> ListIterator;
/*! Constructs empty index schema object
that is assigned to \a table, and will be owned by this table.
@@ -56,7 +56,7 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
/*! Copy constructor. Copies all attributes from index \a idx, and
fields assigned with it but the fields are taken (by name) from
- \a parentTable, not from \a idx itself, so it's possible to copy of index
+ \a tqparentTable, not from \a idx itself, so it's possible to copy of index
for a copy of table.
To copy an index within the same table it's enough to call:
@@ -65,7 +65,7 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
\endcode
@todo All relationships should be also copied
*/
- IndexSchema(const IndexSchema& idx, TableSchema& parentTable);
+ IndexSchema(const IndexSchema& idx, TableSchema& tqparentTable);
/*! Destroys the index. Field objects are not deleted.
All Relationship objects listed in masterRelationships() list
@@ -110,7 +110,7 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
is this IndexSchem object assigned.
Note: If \a rel was detached from masterRelationships() list,
- this object now has no parent, so you need to attach it to somewhere or destruct it.
+ this object now has no tqparent, so you need to attach it to somewhere or destruct it.
*/
void detachRelationship(Relationship *rel);
@@ -118,7 +118,7 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
Auto-generated index is one-field index
that was automatically generated
for CREATE TABLE statement when the field has
- UNIQUE or PRIMARY KEY constraint enabled.
+ UNITQUE or PRIMARY KEY constraint enabled.
Any newly created IndexSchema object
has this flag set to false.
@@ -137,21 +137,21 @@ class KEXI_DB_EXPORT IndexSchema : public FieldList, public SchemaData
/*! Sets PRIMARY KEY flag. \sa isPrimary().
Note: Setting PRIMARY KEY on (true),
- UNIQUE flag will be also implicity set. */
+ UNITQUE flag will be also implicity set. */
void setPrimaryKey(bool set);
/*! \return true if this is unique index.
This can be one or multifield. */
bool isUnique() const;
- /*! Sets UNIQUE flag. \sa isUnique().
- Note: Setting UNIQUE off (false), PRIMARY KEY flag will
- be also implicity set off, because this UNIQUE
+ /*! Sets UNITQUE flag. \sa isUnique().
+ Note: Setting UNITQUE off (false), PRIMARY KEY flag will
+ be also implicity set off, because this UNITQUE
is the requirement for PRIMARY KEYS. */
void setUnique(bool set);
/*! \return String for debugging purposes. */
- virtual QString debugString();
+ virtual TQString debugString();
protected:
/*! Internal constructor for convenience.
diff --git a/kexi/kexidb/kexidb.pro b/kexi/kexidb/kexidb.pro
index d16e3f590..6c17210c6 100644
--- a/kexi/kexidb/kexidb.pro
+++ b/kexi/kexidb/kexidb.pro
@@ -9,7 +9,7 @@ TARGET = kexidb$$KDEBUG
DEFINES += YYERROR_VERBOSE=1
-system( bash kmoc )
+system( bash ktqmoc )
SOURCES = \
object.cpp \
diff --git a/kexi/kexidb/kexidb_export.h b/kexi/kexidb/kexidb_export.h
index a9f4a6404..2a908b662 100644
--- a/kexi/kexidb/kexidb_export.h
+++ b/kexi/kexidb/kexidb_export.h
@@ -49,7 +49,7 @@
#endif
/* -- compile-time settings -- */
-#if defined(Q_WS_WIN) || defined(KEXI_OPTIONS)
+#if defined(TQ_WS_WIN) || defined(KEXI_OPTIONS)
/* defined in a .pro file or 'KEXI_OPTIONS' env. variable */
#else
diff --git a/kexi/kexidb/keywords.cpp b/kexi/kexidb/keywords.cpp
index 055634975..b16800972 100644
--- a/kexi/kexidb/keywords.cpp
+++ b/kexi/kexidb/keywords.cpp
@@ -82,7 +82,7 @@ namespace KexiDB {
"THEN",
"TRANSACTION",
"UNION",
- "UNIQUE",
+ "UNITQUE",
"UPDATE",
"USING",
"VALUES",
diff --git a/kexi/kexidb/lookupfieldschema.cpp b/kexi/kexidb/lookupfieldschema.cpp
index f21ec5882..66ed43969 100644
--- a/kexi/kexidb/lookupfieldschema.cpp
+++ b/kexi/kexidb/lookupfieldschema.cpp
@@ -20,8 +20,8 @@
#include "lookupfieldschema.h"
#include "utils.h"
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <kdebug.h>
using namespace KexiDB;
@@ -38,14 +38,14 @@ LookupFieldSchema::RowSource::~RowSource()
delete m_values;
}
-void LookupFieldSchema::RowSource::setName(const QString& name)
+void LookupFieldSchema::RowSource::setName(const TQString& name)
{
m_name = name;
if (m_values)
m_values->clear();
}
-QString LookupFieldSchema::RowSource::typeName() const
+TQString LookupFieldSchema::RowSource::typeName() const
{
switch (m_type) {
case Table: return "table";
@@ -55,10 +55,10 @@ QString LookupFieldSchema::RowSource::typeName() const
case FieldList: return "fieldlist";
default:;
}
- return QString::null;
+ return TQString();
}
-void LookupFieldSchema::RowSource::setTypeByName( const QString& typeName )
+void LookupFieldSchema::RowSource::setTypeByName( const TQString& typeName )
{
if (typeName=="table")
setType( Table );
@@ -74,24 +74,24 @@ void LookupFieldSchema::RowSource::setTypeByName( const QString& typeName )
setType( NoType );
}
-QStringList LookupFieldSchema::RowSource::values() const
+TQStringList LookupFieldSchema::RowSource::values() const
{
- return m_values ? *m_values : QStringList();
+ return m_values ? *m_values : TQStringList();
}
-void LookupFieldSchema::RowSource::setValues(const QStringList& values)
+void LookupFieldSchema::RowSource::setValues(const TQStringList& values)
{
- m_name = QString::null;
+ m_name = TQString();
if (m_values)
*m_values = values;
else
- m_values = new QStringList(values);
+ m_values = new TQStringList(values);
}
-QString LookupFieldSchema::RowSource::debugString() const
+TQString LookupFieldSchema::RowSource::debugString() const
{
- return QString("rowSourceType:'%1' rowSourceName:'%2' rowSourceValues:'%3'\n")
- .arg(typeName()).arg(name()).arg(m_values ? m_values->join("|") : QString::null);
+ return TQString("rowSourceType:'%1' rowSourceName:'%2' rowSourceValues:'%3'\n")
+ .tqarg(typeName()).tqarg(name()).tqarg(m_values ? m_values->join("|") : TQString());
}
void LookupFieldSchema::RowSource::debug() const
@@ -124,31 +124,31 @@ void LookupFieldSchema::setMaximumListRows(uint rows)
m_maximumListRows = rows;
}
-QString LookupFieldSchema::debugString() const
+TQString LookupFieldSchema::debugString() const
{
- QString columnWidthsStr;
- foreach (QValueList<int>::ConstIterator, it, m_columnWidths) {
+ TQString columnWidthsStr;
+ foreach (TQValueList<int>::ConstIterator, it, m_columnWidths) {
if (!columnWidthsStr.isEmpty())
columnWidthsStr.append(";");
- columnWidthsStr.append( QString::number(*it) );
+ columnWidthsStr.append( TQString::number(*it) );
}
- QString visibleColumnsString;
- foreach (QValueList<uint>::ConstIterator, it, m_visibleColumns) {
+ TQString visibleColumnsString;
+ foreach (TQValueList<uint>::ConstIterator, it, m_visibleColumns) {
if (!visibleColumnsString.isEmpty())
visibleColumnsString.append(";");
- visibleColumnsString.append(QString::number(*it));
+ visibleColumnsString.append(TQString::number(*it));
}
- return QString("LookupFieldSchema( %1\n"
+ return TQString("LookupFieldSchema( %1\n"
" boundColumn:%2 visibleColumns:%3 maximumListRows:%4 displayWidget:%5\n"
" columnHeadersVisible:%6 limitToList:%7\n"
" columnWidths:%8 )")
- .arg(m_rowSource.debugString())
- .arg(m_boundColumn).arg(visibleColumnsString).arg(m_maximumListRows)
- .arg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox")
- .arg(m_columnHeadersVisible).arg(m_limitToList)
- .arg(columnWidthsStr);
+ .tqarg(m_rowSource.debugString())
+ .tqarg(m_boundColumn).tqarg(visibleColumnsString).tqarg(m_maximumListRows)
+ .tqarg( m_displayWidget==ComboBox ? "ComboBox" : "ListBox")
+ .tqarg(m_columnHeadersVisible).tqarg(m_limitToList)
+ .tqarg(columnWidthsStr);
}
void LookupFieldSchema::debug() const
@@ -157,19 +157,19 @@ void LookupFieldSchema::debug() const
}
/* static */
-LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
+LookupFieldSchema *LookupFieldSchema::loadFromDom(const TQDomElement& lookupEl)
{
LookupFieldSchema *lookupFieldSchema = new LookupFieldSchema();
- for (QDomNode node = lookupEl.firstChild(); !node.isNull(); node = node.nextSibling()) {
- QDomElement el = node.toElement();
- QString name( el.tagName() );
+ for (TQDomNode node = lookupEl.firstChild(); !node.isNull(); node = node.nextSibling()) {
+ TQDomElement el = node.toElement();
+ TQString name( el.tagName() );
if (name=="row-source") {
/*<row-source>
empty
| <type>table|query|sql|valuelist|fieldlist</type> #required because there can be table and query with the same name
"fieldlist" (basically a list of column names of a table/query,
"Field List" as in MSA)
- <name>string</name> #table/query name, etc. or KEXISQL SELECT QUERY
+ <name>string</name> #table/query name, etc. or KEXISQL SELECT TQUERY
<values><value>...</value> #for "valuelist" type
<value>...</value>
</values>
@@ -186,8 +186,8 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
/* <bound-column>
<number>number</number> #in later implementation there can be more columns
</bound-column> */
- const QVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
- if (val.type()==QVariant::Int)
+ const TQVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
+ if (val.type()==TQVariant::Int)
lookupFieldSchema->setBoundColumn( val.toInt() );
}
else if (name=="visible-column") {
@@ -196,10 +196,10 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
<number>number 2</number>
[..]
</visible-column> */
- QValueList<uint> list;
- for (QDomNode childNode = el.firstChild(); !childNode.isNull(); childNode = childNode.nextSibling()) {
- const QVariant val = KexiDB::loadPropertyValueFromDom( childNode );
- if (val.type()==QVariant::Int)
+ TQValueList<uint> list;
+ for (TQDomNode childNode = el.firstChild(); !childNode.isNull(); childNode = childNode.nextSibling()) {
+ const TQVariant val = KexiDB::loadPropertyValueFromDom( childNode );
+ if (val.type()==TQVariant::Int)
list.append( val.toUInt() );
}
lookupFieldSchema->setVisibleColumns( list );
@@ -210,11 +210,11 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
...
<number>int</number>
</column-widths> */
- QVariant val;
- QValueList<int> columnWidths;
+ TQVariant val;
+ TQValueList<int> columnWidths;
for (el = el.firstChild().toElement(); !el.isNull(); el=el.nextSibling().toElement()) {
- QVariant val = KexiDB::loadPropertyValueFromDom( el );
- if (val.type()==QVariant::Int)
+ TQVariant val = KexiDB::loadPropertyValueFromDom( el );
+ if (val.type()==TQVariant::Int)
columnWidths.append(val.toInt());
}
lookupFieldSchema->setColumnWidths( columnWidths );
@@ -223,24 +223,24 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
/* <show-column-headers>
<bool>true/false</bool>
</show-column-headers> */
- const QVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
- if (val.type()==QVariant::Bool)
+ const TQVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
+ if (val.type()==TQVariant::Bool)
lookupFieldSchema->setColumnHeadersVisible( val.toBool() );
}
else if (name=="list-rows") {
/* <list-rows>
<number>1..100</number>
</list-rows> */
- const QVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
- if (val.type()==QVariant::Int)
+ const TQVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
+ if (val.type()==TQVariant::Int)
lookupFieldSchema->setMaximumListRows( val.toUInt() );
}
else if (name=="limit-to-list") {
/* <limit-to-list>
<bool>true/false</bool>
</limit-to-list> */
- const QVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
- if (val.type()==QVariant::Bool)
+ const TQVariant val = KexiDB::loadPropertyValueFromDom( el.firstChild() );
+ if (val.type()==TQVariant::Bool)
lookupFieldSchema->setLimitToList( val.toBool() );
}
else if (name=="display-widget") {
@@ -254,12 +254,12 @@ LookupFieldSchema *LookupFieldSchema::loadFromDom(const QDomElement& lookupEl)
}
/* static */
-void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, QDomDocument& doc, QDomElement& parentEl)
+void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, TQDomDocument& doc, TQDomElement& tqparentEl)
{
- QDomElement lookupColumnEl, rowSourceEl, rowSourceTypeEl, nameEl;
+ TQDomElement lookupColumnEl, rowSourceEl, rowSourceTypeEl, nameEl;
if (!lookupSchema.rowSource().name().isEmpty()) {
lookupColumnEl = doc.createElement("lookup-column");
- parentEl.appendChild( lookupColumnEl );
+ tqparentEl.appendChild( lookupColumnEl );
rowSourceEl = doc.createElement("row-source");
lookupColumnEl.appendChild( rowSourceEl );
@@ -273,12 +273,12 @@ void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, QDomDocument&
nameEl.appendChild( doc.createTextNode(lookupSchema.rowSource().name()) );
}
- const QStringList& values( lookupSchema.rowSource().values() );
+ const TQStringList& values( lookupSchema.rowSource().values() );
if (!values.isEmpty()) {
- QDomElement valuesEl( doc.createElement("values") );
+ TQDomElement valuesEl( doc.createElement("values") );
rowSourceEl.appendChild( valuesEl );
- for (QStringList::ConstIterator it = values.constBegin(); it!=values.constEnd(); ++it) {
- QDomElement valueEl( doc.createElement("value") );
+ for (TQStringList::ConstIterator it = values.constBegin(); it!=values.constEnd(); ++it) {
+ TQDomElement valueEl( doc.createElement("value") );
valuesEl.appendChild( valueEl );
valueEl.appendChild( doc.createTextNode(*it) );
}
@@ -287,25 +287,25 @@ void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, QDomDocument&
if (lookupSchema.boundColumn()>=0)
KexiDB::saveNumberElementToDom(doc, lookupColumnEl, "bound-column", lookupSchema.boundColumn());
- QValueList<uint> visibleColumns(lookupSchema.visibleColumns());
+ TQValueList<uint> visibleColumns(lookupSchema.visibleColumns());
if (!visibleColumns.isEmpty()) {
- QDomElement visibleColumnEl( doc.createElement("visible-column") );
+ TQDomElement visibleColumnEl( doc.createElement("visible-column") );
lookupColumnEl.appendChild( visibleColumnEl );
- foreach (QValueList<uint>::ConstIterator, it, visibleColumns) {
- QDomElement numberEl( doc.createElement("number") );
+ foreach (TQValueList<uint>::ConstIterator, it, visibleColumns) {
+ TQDomElement numberEl( doc.createElement("number") );
visibleColumnEl.appendChild( numberEl );
- numberEl.appendChild( doc.createTextNode( QString::number(*it) ) );
+ numberEl.appendChild( doc.createTextNode( TQString::number(*it) ) );
}
}
- const QValueList<int> columnWidths(lookupSchema.columnWidths());
+ const TQValueList<int> columnWidths(lookupSchema.columnWidths());
if (!columnWidths.isEmpty()) {
- QDomElement columnWidthsEl( doc.createElement("column-widths") );
+ TQDomElement columnWidthsEl( doc.createElement("column-widths") );
lookupColumnEl.appendChild( columnWidthsEl );
- for (QValueList<int>::ConstIterator it = columnWidths.constBegin(); it!=columnWidths.constEnd(); ++it) {
- QDomElement columnWidthEl( doc.createElement("number") );
+ for (TQValueList<int>::ConstIterator it = columnWidths.constBegin(); it!=columnWidths.constEnd(); ++it) {
+ TQDomElement columnWidthEl( doc.createElement("number") );
columnWidthsEl.appendChild( columnWidthEl );
- columnWidthEl.appendChild( doc.createTextNode( QString::number(*it) ) );
+ columnWidthEl.appendChild( doc.createTextNode( TQString::number(*it) ) );
}
}
@@ -317,7 +317,7 @@ void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, QDomDocument&
KexiDB::saveBooleanElementToDom(doc, lookupColumnEl, "limit-to-list", lookupSchema.limitToList());
if (lookupSchema.displayWidget()!=KEXIDB_LOOKUP_FIELD_DEFAULT_DISPLAY_WIDGET) {
- QDomElement displayWidgetEl( doc.createElement("display-widget") );
+ TQDomElement displayWidgetEl( doc.createElement("display-widget") );
lookupColumnEl.appendChild( displayWidgetEl );
displayWidgetEl.appendChild(
doc.createTextNode( (lookupSchema.displayWidget()==ListBox) ? "listbox" : "combobox" ) );
@@ -326,7 +326,7 @@ void LookupFieldSchema::saveToDom(LookupFieldSchema& lookupSchema, QDomDocument&
//static
bool LookupFieldSchema::setProperty(
- LookupFieldSchema& lookup, const QCString& propertyName, const QVariant& value )
+ LookupFieldSchema& lookup, const TQCString& propertyName, const TQVariant& value )
{
bool ok;
if ("rowSource" == propertyName || "rowSourceType" == propertyName || "rowSourceValues" == propertyName) {
@@ -346,8 +346,8 @@ bool LookupFieldSchema::setProperty(
lookup.setBoundColumn( ival );
}
else if ("visibleColumn" == propertyName ) {
- QValueList<QVariant> variantList;
- if (value.type()==QVariant::Int) {
+ TQValueList<TQVariant> variantList;
+ if (value.type()==TQVariant::Int) {
//! @todo Remove this case: it's for backward compatibility with Kexi's 1.1.2 table designer GUI
//! supporting only single lookup column.
variantList.append( value.toInt() );
@@ -355,8 +355,8 @@ bool LookupFieldSchema::setProperty(
else {
variantList = value.toList();
}
- QValueList<uint> visibleColumns;
- foreach (QValueList<QVariant>::ConstIterator, it, variantList) {
+ TQValueList<uint> visibleColumns;
+ foreach (TQValueList<TQVariant>::ConstIterator, it, variantList) {
const uint ival = (*it).toUInt(&ok);
if (!ok)
return false;
@@ -365,9 +365,9 @@ bool LookupFieldSchema::setProperty(
lookup.setVisibleColumns( visibleColumns );
}
else if ("columnWidths" == propertyName ) {
- QValueList<QVariant> variantList( value.toList() );
- QValueList<int> widths;
- foreach (QValueList<QVariant>::ConstIterator, it, variantList) {
+ TQValueList<TQVariant> variantList( value.toList() );
+ TQValueList<int> widths;
+ foreach (TQValueList<TQVariant>::ConstIterator, it, variantList) {
const uint ival = (*it).toInt(&ok);
if (!ok)
return false;
diff --git a/kexi/kexidb/lookupfieldschema.h b/kexi/kexidb/lookupfieldschema.h
index 9494b348e..35d3b59fe 100644
--- a/kexi/kexidb/lookupfieldschema.h
+++ b/kexi/kexidb/lookupfieldschema.h
@@ -20,12 +20,12 @@
#ifndef KEXIDB_LOOKUPFIELDSCHEMA_H
#define KEXIDB_LOOKUPFIELDSCHEMA_H
-#include <qvaluelist.h>
-#include <qstringlist.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
-class QDomElement;
-class QDomDocument;
-class QVariant;
+class TQDomElement;
+class TQDomDocument;
+class TQVariant;
namespace KexiDB {
@@ -81,38 +81,38 @@ class KEXI_DB_EXPORT LookupFieldSchema
void setType(Type type) { m_type = type; }
/*! @return row source type name. @see setTypeByName() */
- QString typeName() const;
+ TQString typeName() const;
/*! Sets row source type by name using \a typeName. Accepted (cast sensitive)
names are "table", "query", "sql", "valuelist", "fieldlist".
For other value NoType type is set. */
- void setTypeByName( const QString& typeName );
+ void setTypeByName( const TQString& typeName );
/*! @return a string for row source: table name, query name or anonymous query
provided as KEXISQL string. If rowSourceType() is a ValueList,
rowSourceValues() should be used instead. If rowSourceType() is a FieldList,
rowSource() should return table or query name. */
- QString name() const { return m_name; }
+ TQString name() const { return m_name; }
/*! Sets row source value. @see value() */
- void setName(const QString& name);
+ void setName(const TQString& name);
/*! @return row source values specified if type() is ValueList. */
- QStringList values() const;
+ TQStringList values() const;
/*! Sets row source values used if type() is ValueList.
Using it clears name (see name()). */
- void setValues(const QStringList& values);
+ void setValues(const TQStringList& values);
/*! \return String for debugging purposes. */
- QString debugString() const;
+ TQString debugString() const;
/*! Shows debug information. */
void debug() const;
private:
Type m_type;
- QString m_name;
- QStringList *m_values;
+ TQString m_name;
+ TQStringList *m_values;
};
LookupFieldSchema();
@@ -136,11 +136,11 @@ class KEXI_DB_EXPORT LookupFieldSchema
/*! @return a list of visible column: a list of integers specifying a column that has
to be visible in the combo box (counted from 0).
Empty list means unspecified value. */
- QValueList<uint> visibleColumns() const { return m_visibleColumns; }
+ TQValueList<uint> visibleColumns() const { return m_visibleColumns; }
/*! Sets a list of visible columns to \a list.
Columns will be separated with a single space character when displayed. */
- void setVisibleColumns(const QValueList<uint>& list) { m_visibleColumns = list; }
+ void setVisibleColumns(const TQValueList<uint>& list) { m_visibleColumns = list; }
/*! A helper method.
If visibleColumns() contains one item, this item is returned (a typical case).
@@ -157,10 +157,10 @@ class KEXI_DB_EXPORT LookupFieldSchema
/*! @return a number of ordered integers specifying column widths;
-1 means 'default width' for a given column. */
- const QValueList<int> columnWidths() const { return m_columnWidths; }
+ const TQValueList<int> columnWidths() const { return m_columnWidths; }
/*! Sets column widths. @see columnWidths */
- void setColumnWidths(const QValueList<int>& widths) { m_columnWidths = widths; }
+ void setColumnWidths(const TQValueList<int>& widths) { m_columnWidths = widths; }
/*! @return true if column headers are visible in the associated
combo box popup or the list view. The default is false. */
@@ -202,7 +202,7 @@ class KEXI_DB_EXPORT LookupFieldSchema
void setDisplayWidget(DisplayWidget widget) { m_displayWidget = widget; }
/*! \return String for debugging purposes. */
- QString debugString() const;
+ TQString debugString() const;
/*! Shows debug information. */
void debug() const;
@@ -210,21 +210,21 @@ class KEXI_DB_EXPORT LookupFieldSchema
/*! Loads data of lookup column schema from DOM tree.
The data can be outdated or invalid, so the app should handle such cases.
@return a new LookupFieldSchema object even if lookupEl contains no valid contents. */
- static LookupFieldSchema* loadFromDom(const QDomElement& lookupEl);
+ static LookupFieldSchema* loadFromDom(const TQDomElement& lookupEl);
- /*! Saves data of lookup column schema to \a parentEl DOM element of \a doc document. */
- static void saveToDom(LookupFieldSchema& lookupSchema, QDomDocument& doc, QDomElement& parentEl);
+ /*! Saves data of lookup column schema to \a tqparentEl DOM element of \a doc document. */
+ static void saveToDom(LookupFieldSchema& lookupSchema, TQDomDocument& doc, TQDomElement& tqparentEl);
/*! Sets property of name \a propertyName and value \a value for the lookup schema \a lookup
\return true on successful set and false on failure because of invalid value or invalid property name. */
static bool setProperty(
- LookupFieldSchema& lookup, const QCString& propertyName, const QVariant& value );
+ LookupFieldSchema& lookup, const TQCString& propertyName, const TQVariant& value );
protected:
RowSource m_rowSource;
int m_boundColumn;
- QValueList<uint> m_visibleColumns;
- QValueList<int> m_columnWidths;
+ TQValueList<uint> m_visibleColumns;
+ TQValueList<int> m_columnWidths;
uint m_maximumListRows;
DisplayWidget m_displayWidget;
bool m_columnHeadersVisible : 1;
diff --git a/kexi/kexidb/msghandler.cpp b/kexi/kexidb/msghandler.cpp
index 1cacae5ef..f2946a2b8 100644
--- a/kexi/kexidb/msghandler.cpp
+++ b/kexi/kexidb/msghandler.cpp
@@ -21,7 +21,7 @@
using namespace KexiDB;
-MessageTitle::MessageTitle(Object* o, const QString& msg)
+MessageTitle::MessageTitle(Object* o, const TQString& msg)
: m_obj(o)
, m_prevMsgTitle(o->m_msgTitle)
{
@@ -35,8 +35,8 @@ MessageTitle::~MessageTitle()
//------------------------------------------------
-MessageHandler::MessageHandler(QWidget *parent)
- : m_messageHandlerParentWidget(parent)
+MessageHandler::MessageHandler(TQWidget *tqparent)
+ : m_messageHandlerParentWidget(tqparent)
, m_enableMessages(true)
{
}
@@ -45,11 +45,11 @@ MessageHandler::~MessageHandler()
{
}
-int MessageHandler::askQuestion( const QString& message,
+int MessageHandler::askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options )
{
Q_UNUSED(message);
diff --git a/kexi/kexidb/msghandler.h b/kexi/kexidb/msghandler.h
index da907c7e6..c0c8c494d 100644
--- a/kexi/kexidb/msghandler.h
+++ b/kexi/kexidb/msghandler.h
@@ -21,8 +21,8 @@
#define KEXIDB_MSGHANDLER_H
#include <kexidb/object.h>
-#include <qguardedptr.h>
-#include <qwidget.h>
+#include <tqguardedptr.h>
+#include <tqwidget.h>
namespace KexiDB {
@@ -38,12 +38,12 @@ namespace KexiDB {
class KEXI_DB_EXPORT MessageTitle
{
public:
- MessageTitle(KexiDB::Object* o, const QString& msg = QString::null);
+ MessageTitle(KexiDB::Object* o, const TQString& msg = TQString());
~MessageTitle();
protected:
Object* m_obj;
- QString m_prevMsgTitle;
+ TQString m_prevMsgTitle;
};
/*! A prototype for Message Handler usable
@@ -54,9 +54,9 @@ class KEXI_DB_EXPORT MessageHandler
public:
enum MessageType { Error, Sorry, Warning };
- /*! Constructs mesage handler, \a parent is a widget that will be a parent
+ /*! Constructs mesage handler, \a tqparent is a widget that will be a tqparent
for displaying gui elements (e.g. message boxes). Can be 0 for non-gui usage. */
- MessageHandler(QWidget *parent = 0);
+ MessageHandler(TQWidget *tqparent = 0);
virtual ~MessageHandler();
/*! This method can be used to block/unblock messages.
@@ -68,12 +68,12 @@ class KEXI_DB_EXPORT MessageHandler
inline void enableMessages(bool enable) { m_enableMessages = enable; }
/*! Shows error message with \a title (it is not caption) and details. */
- virtual void showErrorMessage(const QString &title,
- const QString &details = QString::null) = 0;
+ virtual void showErrorMessage(const TQString &title,
+ const TQString &details = TQString()) = 0;
/*! Shows error message with \a msg text. Existing error message from \a obj object
is also copied, if present. */
- virtual void showErrorMessage(KexiDB::Object *obj, const QString& msg = QString::null) = 0;
+ virtual void showErrorMessage(KexiDB::Object *obj, const TQString& msg = TQString()) = 0;
/*! Interactively asks a question. For GUI version, KMessageBox class is used.
See KMessageBox documentation for explanation of the parameters.
@@ -81,15 +81,15 @@ class KEXI_DB_EXPORT MessageHandler
\a message should be i18n's string.
Value from KMessageBox::ButtonCode enum is returned.
Reimplement this. This implementation does nothing, just returns \a defaultResult. */
- virtual int askQuestion( const QString& message,
+ virtual int askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes=KStdGuiItem::yes(),
const KGuiItem &buttonNo=KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString(),
int options = KMessageBox::Notify );
protected:
- QGuardedPtr<QWidget> m_messageHandlerParentWidget;
+ TQGuardedPtr<TQWidget> m_messageHandlerParentWidget;
bool m_enableMessages : 1;
};
diff --git a/kexi/kexidb/object.cpp b/kexi/kexidb/object.cpp
index f4228bc72..2e32274d8 100644
--- a/kexi/kexidb/object.cpp
+++ b/kexi/kexidb/object.cpp
@@ -50,7 +50,7 @@ Object::~Object()
KexiDBDbg << "Object ERROR: " << m_previousServerResultNum2 << ": " \
<< m_previousServerResultName2 <<endl
-void Object::setError( int code, const QString &msg )
+void Object::setError( int code, const TQString &msg )
{
STORE_PREV_ERR;
@@ -66,17 +66,17 @@ void Object::setError( int code, const QString &msg )
ERRMSG(this);
}
-void Object::setError( const QString &msg )
+void Object::setError( const TQString &msg )
{
setError( ERR_OTHER, msg );
}
-void Object::setError( const QString& title, const QString &msg )
+void Object::setError( const TQString& title, const TQString &msg )
{
STORE_PREV_ERR;
m_errno=ERR_OTHER;
- QString origMsgTitle( m_msgTitle ); //store
+ TQString origMsgTitle( m_msgTitle ); //store
m_msgTitle += title;
m_errMsg = msg;
@@ -88,12 +88,12 @@ void Object::setError( const QString& title, const QString &msg )
m_msgTitle = origMsgTitle; //revert
}
-void Object::setError( KexiDB::Object *obj, const QString& prependMessage )
+void Object::setError( KexiDB::Object *obj, const TQString& prependMessage )
{
setError( obj, obj ? obj->errorNum() : ERR_OTHER, prependMessage );
}
-void Object::setError( KexiDB::Object *obj, int code, const QString& prependMessage )
+void Object::setError( KexiDB::Object *obj, int code, const TQString& prependMessage )
{
if (obj && (obj->errorNum()!=0 || !obj->serverErrorMsg().isEmpty())) {
STORE_PREV_ERR;
@@ -104,7 +104,7 @@ void Object::setError( KexiDB::Object *obj, int code, const QString& prependMess
m_errno = code;
m_hasError = true;
}
- m_errMsg = (prependMessage.isEmpty() ? QString::null : (prependMessage + " "))
+ m_errMsg = (prependMessage.isEmpty() ? TQString() : (prependMessage + " "))
+ obj->errorMsg();
m_sql = obj->m_sql;
m_errorSql = obj->m_errorSql;
@@ -132,16 +132,16 @@ void Object::clearError()
{
m_errno = 0;
m_hasError = false;
- m_errMsg = QString::null;
- m_sql = QString::null;
- m_errorSql = QString::null;
+ m_errMsg = TQString();
+ m_sql = TQString();
+ m_errorSql = TQString();
m_serverResult = 0;
- m_serverResultName = QString::null;
- m_serverErrorMsg = QString::null;
+ m_serverResultName = TQString();
+ m_serverErrorMsg = TQString();
drv_clearServerResult();
}
-QString Object::serverErrorMsg()
+TQString Object::serverErrorMsg()
{
return m_serverErrorMsg;
}
@@ -151,7 +151,7 @@ int Object::serverResult()
return m_serverResult;
}
-QString Object::serverResultName()
+TQString Object::serverResultName()
{
return m_serverResultName;
}
@@ -160,7 +160,7 @@ void Object::debugError()
{
if (error()) {
KexiDBDbg << "KEXIDB ERROR: " << errorMsg() << endl;
- QString s = serverErrorMsg(), sn = serverResultName();
+ TQString s = serverErrorMsg(), sn = serverResultName();
if (!s.isEmpty())
KexiDBDbg << "KEXIDB SERVER ERRMSG: " << s << endl;
if (!sn.isEmpty())
@@ -171,11 +171,11 @@ void Object::debugError()
KexiDBDbg << "KEXIDB OK." << endl;
}
-int Object::askQuestion( const QString& message,
+int Object::askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes,
const KGuiItem &buttonNo,
- const QString &dontShowAskAgainName,
+ const TQString &dontShowAskAgainName,
int options,
MessageHandler* msgHandler )
{
diff --git a/kexi/kexidb/object.h b/kexi/kexidb/object.h
index aff98491b..232535d19 100644
--- a/kexi/kexidb/object.h
+++ b/kexi/kexidb/object.h
@@ -23,7 +23,7 @@
#include <kexidb/error.h>
#include <kmessagebox.h>
#include <kstdguiitem.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KexiDB {
@@ -39,7 +39,7 @@ class KEXI_DB_EXPORT Object
/*! \return (localized) error message if there was error during last operation on the object,
else: 0. */
- const QString& errorMsg() const { return m_errMsg; }
+ const TQString& errorMsg() const { return m_errMsg; }
/*! \return error number of if there was error during last operation on the object,
else: 0. */
@@ -48,7 +48,7 @@ class KEXI_DB_EXPORT Object
//! \return previous server result number, for error displaying purposes.
int previousServerResult() const { return m_previousServerResultNum; }
- QString previousServerResultName() const { return m_previousServerResultName; }
+ TQString previousServerResultName() const { return m_previousServerResultName; }
/*! Sends errorMsg() to debug output. */
void debugError();
@@ -71,7 +71,7 @@ class KEXI_DB_EXPORT Object
- default implementation just returns null string.
\sa serverErrorMsg()
*/
- virtual QString serverErrorMsg();
+ virtual TQString serverErrorMsg();
/*! \return engine-specific last server-side operation result number.
Use this in your application to give users more information on what's up.
@@ -93,16 +93,16 @@ class KEXI_DB_EXPORT Object
by serverErorMsg() or erorMsg()
\sa serverErrorMsg(), drv_clearServerResult()
*/
- virtual QString serverResultName();
+ virtual TQString serverResultName();
/*! \return message title that sometimes is provided and prepended
to the main warning/error message. Used by MessageHandler. */
- QString msgTitle() const { return m_msgTitle; }
+ TQString msgTitle() const { return m_msgTitle; }
/*! \return sql string of actually executed SQL statement,
usually using drv_executeSQL(). If there was error during executing SQL statement,
before, that string is returned instead. */
- const QString recentSQLString() const { return m_errorSql.isEmpty() ? m_sql : m_errorSql; }
+ const TQString recentSQLString() const { return m_errorSql.isEmpty() ? m_sql : m_errorSql; }
protected:
/* Constructs a new object.
@@ -118,34 +118,34 @@ class KEXI_DB_EXPORT Object
and default message for this will be set.
Use this in KexiDB::Object subclasses to informa the world about your
object's state. */
- virtual void setError(int code = ERR_OTHER, const QString &msg = QString::null );
+ virtual void setError(int code = ERR_OTHER, const TQString &msg = TQString() );
- /*! \overload void setError(int code, const QString &msg = QString::null )
+ /*! \overload void setError(int code, const TQString &msg = TQString() )
Sets error code to ERR_OTHER. Use this if you don't care about
setting error code.
*/
- virtual void setError( const QString &msg );
+ virtual void setError( const TQString &msg );
- /*! \overload void setError(const QString &msg)
+ /*! \overload void setError(const TQString &msg)
Also sets \a title. */
- virtual void setError( const QString &title, const QString &msg );
+ virtual void setError( const TQString &title, const TQString &msg );
/*! Copies the (localized) error message and code from other KexiDB::Object. */
- void setError( KexiDB::Object *obj, const QString& prependMessage = QString::null );
+ void setError( KexiDB::Object *obj, const TQString& prependMessage = TQString() );
/*! Copies the (localized) error message and code from other KexiDB::Object
with custom error \a code. */
virtual void setError( KexiDB::Object *obj, int code,
- const QString& prependMessage = QString::null );
+ const TQString& prependMessage = TQString() );
/*! Interactively asks a question. Console or GUI can be used for this,
depending on installed message handler. For GUI version, KMessageBox class is used.
See KexiDB::MessageHandler::askQuestion() for details. */
- virtual int askQuestion( const QString& message,
+ virtual int askQuestion( const TQString& message,
KMessageBox::DialogType dlgType, KMessageBox::ButtonCode defaultResult,
const KGuiItem &buttonYes=KStdGuiItem::yes(),
const KGuiItem &buttonNo=KStdGuiItem::no(),
- const QString &dontShowAskAgainName = QString::null,
+ const TQString &dontShowAskAgainName = TQString(),
int options = KMessageBox::Notify,
MessageHandler* msgHandler = 0 );
@@ -158,10 +158,10 @@ class KEXI_DB_EXPORT Object
virtual void drv_clearServerResult() {};
//! used to store of actually executed SQL statement
- QString m_sql, m_errorSql;
+ TQString m_sql, m_errorSql;
int m_serverResult;
- QString m_serverResultName, m_serverErrorMsg;
- QString m_errMsg;
+ TQString m_serverResultName, m_serverErrorMsg;
+ TQString m_errMsg;
private:
int m_errno;
@@ -170,9 +170,9 @@ class KEXI_DB_EXPORT Object
//! previous server result number, for error displaying purposes.
int m_previousServerResultNum, m_previousServerResultNum2;
//! previous server result name, for error displaying purposes.
- QString m_previousServerResultName, m_previousServerResultName2;
+ TQString m_previousServerResultName, m_previousServerResultName2;
- QString m_msgTitle;
+ TQString m_msgTitle;
MessageHandler *m_msgHandler;
class Private;
diff --git a/kexi/kexidb/parser/parser.cpp b/kexi/kexidb/parser/parser.cpp
index f64ec96d3..eeb6e39dc 100644
--- a/kexi/kexidb/parser/parser.cpp
+++ b/kexi/kexidb/parser/parser.cpp
@@ -41,7 +41,7 @@ Parser::~Parser()
Parser::OPCode Parser::operation() const { return (OPCode)d->operation; }
-QString
+TQString
Parser::operationString() const
{
switch((OPCode)d->operation) {
@@ -72,7 +72,7 @@ Connection *Parser::db() const { return d->db; }
ParserError Parser::error() const { return d->error; }
-QString Parser::statement() const { return d->statement; }
+TQString Parser::statement() const { return d->statement; }
void Parser::setOperation(OPCode op) { d->operation = op; }
@@ -109,11 +109,11 @@ void Parser::init()
bool Parser::isReservedKeyword(const char *str)
{
- return d->reservedKeywords.find(str);
+ return d->reservedKeywords.tqfind(str);
}
bool
-Parser::parse(const QString &statement)
+Parser::parse(const TQString &statement)
{
init();
clear();
@@ -141,7 +141,7 @@ ParserError::ParserError()
// m_isNull = true;
}
-ParserError::ParserError(const QString &type, const QString &error, const QString &hint, int at)
+ParserError::ParserError(const TQString &type, const TQString &error, const TQString &hint, int at)
{
m_type = type;
m_error = error;
diff --git a/kexi/kexidb/parser/parser.h b/kexi/kexidb/parser/parser.h
index ec2942e1f..c408dec5a 100644
--- a/kexi/kexidb/parser/parser.h
+++ b/kexi/kexidb/parser/parser.h
@@ -21,9 +21,9 @@
#ifndef KEXIDBPARSER_H
#define KEXIDBPARSER_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqvariant.h>
#include <kexidb/field.h>
#include <kexidb/expression.h>
@@ -56,7 +56,7 @@ class KEXI_DB_EXPORT ParserError
* \param hint Token where the error happend.
* \param at The position where the error happend.
*/
- ParserError(const QString &type, const QString &error, const QString &hint, int at);
+ ParserError(const TQString &type, const TQString &error, const TQString &hint, int at);
/**
* Destructor.
@@ -66,12 +66,12 @@ class KEXI_DB_EXPORT ParserError
/**
* \return the errortype.
*/
- QString type() { return m_type; }
+ TQString type() { return m_type; }
/**
* \return a descriping error message.
*/
- QString error() { return m_error; }
+ TQString error() { return m_error; }
/**
* \return position where the error happend.
@@ -79,9 +79,9 @@ class KEXI_DB_EXPORT ParserError
int at() { return m_at; }
private:
- QString m_type;
- QString m_error;
- QString m_hint;
+ TQString m_type;
+ TQString m_error;
+ TQString m_hint;
int m_at;
// bool m_isNull;
};
@@ -138,7 +138,7 @@ class KEXI_DB_EXPORT Parser
/**
* clears previous results and runs the parser
*/
- bool parse(const QString &statement);
+ bool parse(const TQString &statement);
/**
* rests results
@@ -153,7 +153,7 @@ class KEXI_DB_EXPORT Parser
/**
* \return the resulting operation as string.
*/
- QString operationString() const;
+ TQString operationString() const;
/**
* \return a pointer to a KexiDBTable on CREATE TABLE
@@ -187,7 +187,7 @@ class KEXI_DB_EXPORT Parser
/**
* \return the statement passed on the last \a parse method-call.
*/
- QString statement() const;
+ TQString statement() const;
/**
* \internal
diff --git a/kexi/kexidb/parser/parser_p.cpp b/kexi/kexidb/parser/parser_p.cpp
index ca935d605..f64696e8f 100644
--- a/kexi/kexidb/parser/parser_p.cpp
+++ b/kexi/kexidb/parser/parser_p.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <assert.h>
@@ -32,9 +32,9 @@ using namespace KexiDB;
Parser *parser = 0;
Field *field = 0;
//bool requiresTable;
-QPtrList<Field> fieldList;
+TQPtrList<Field> fieldList;
int current = 0;
-QString ctoken = "";
+TQString ctoken = "";
//-------------------------------------
@@ -92,7 +92,7 @@ void yyerror(const char *str)
|| otherError)
{
KexiDBDbg << parser->statement() << endl;
- QString ptrline = "";
+ TQString ptrline = "";
for(int i=0; i < current; i++)
ptrline += " ";
@@ -101,21 +101,21 @@ void yyerror(const char *str)
KexiDBDbg << ptrline << endl;
//lexer may add error messages
- QString lexerErr = parser->error().error();
+ TQString lexerErr = parser->error().error();
- QString errtypestr(str);
+ TQString errtypestr(str);
if (lexerErr.isEmpty()) {
#if 0
if (errtypestr.startsWith("parse error, unexpected ")) {
//something like "parse error, unexpected IDENTIFIER, expecting ',' or ')'"
- QString e = errtypestr.mid(24);
+ TQString e = errtypestr.mid(24);
KexiDBDbg << e <<endl;
- QString token = "IDENTIFIER";
+ TQString token = "IDENTIFIER";
if (e.startsWith(token)) {
- QRegExp re("'.'");
+ TQRegExp re("'.'");
int pos=0;
pos = re.search(e, pos);
- QStringList captured=re.capturedTexts();
+ TQStringList captured=re.capturedTexts();
if (captured.count()>=2) {
// KexiDBDbg << "**" << captured.at(1) << endl;
// KexiDBDbg << "**" << captured.at(2) << endl;
@@ -142,21 +142,21 @@ void yyerror(const char *str)
if (parser->isReservedKeyword(ctoken.latin1()))
parser->setError( ParserError(i18n("Syntax Error"),
- i18n("\"%1\" is a reserved keyword").arg(ctoken)+lexerErr, ctoken, current) );
+ i18n("\"%1\" is a reserved keyword").tqarg(ctoken)+lexerErr, ctoken, current) );
else
parser->setError( ParserError(i18n("Syntax Error"),
- i18n("Syntax Error near \"%1\"").arg(ctoken)+lexerErr, ctoken, current) );
+ i18n("Syntax Error near \"%1\"").tqarg(ctoken)+lexerErr, ctoken, current) );
}
}
}
-void setError(const QString& errName, const QString& errDesc)
+void setError(const TQString& errName, const TQString& errDesc)
{
parser->setError( ParserError(errName, errDesc, ctoken, current) );
yyerror(errName.latin1());
}
-void setError(const QString& errDesc)
+void setError(const TQString& errDesc)
{
setError("other error", errDesc);
}
@@ -194,7 +194,7 @@ bool parseData(Parser *p, const char *data)
KexiDBDbg << "parseData(): ok" << endl;
// KexiDBDbg << "parseData(): " << tableDict.count() << " loaded tables" << endl;
/* TableSchema *ts;
- for(QDictIterator<TableSchema> it(tableDict); TableSchema *s = tableList.first(); s; s = tableList.next())
+ for(TQDictIterator<TableSchema> it(tableDict); TableSchema *s = tableList.first(); s; s = tableList.next())
{
KexiDBDbg << " " << s->name() << endl;
}*/
@@ -202,9 +202,9 @@ bool parseData(Parser *p, const char *data)
Field::ListIterator it = parser->select()->fieldsIterator();
for(Field *item; (item = it.current()); ++it)
{
- if(tableList.findRef(item->table()) == -1)
+ if(tableList.tqfindRef(item->table()) == -1)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").arg(item->table()->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown table '%1' in field list").tqarg(item->table()->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
@@ -263,8 +263,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
#if 0
KexiDBDbg << "found variable name: " << varName << endl;
- int dotPos = varName.find('.');
- QString tableName, fieldName;
+ int dotPos = varName.tqfind('.');
+ TQString tableName, fieldName;
//TODO: shall we also support db name?
if (dotPos>0) {
tableName = varName.left(dotPos);
@@ -288,15 +288,15 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
setError(i18n("Ambiguous field name"),
i18n("Both table \"%1\" and \"%2\" have defined \"%3\" field. "
"Use \"<tableName>.%4\" notation to specify table name.")
- .arg(firstField->table()->name()).arg(f->table()->name())
- .arg(fieldName).arg(fieldName));
+ .tqarg(firstField->table()->name()).tqarg(f->table()->name())
+ .tqarg(fieldName).tqarg(fieldName));
return false;
}
}
}
if (!firstField) {
setError(i18n("Field not found"),
- i18n("Table containing \"%1\" field not found").arg(fieldName));
+ i18n("Table containing \"%1\" field not found").tqarg(fieldName));
return false;
}
//ok
@@ -308,9 +308,9 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
TableSchema *ts = parseInfo.querySchema->table( tableName );
if (ts) {//table.fieldname
//check if "table" is covered by an alias
- const QValueList<int> tPositions = parseInfo.querySchema->tablePositions(tableName);
- QValueList<int>::ConstIterator it = tPositions.constBegin();
- QCString tableAlias;
+ const TQValueList<int> tPositions = parseInfo.querySchema->tablePositions(tableName);
+ TQValueList<int>::ConstIterator it = tPositions.constBegin();
+ TQCString tableAlias;
bool covered = true;
for (; it!=tPositions.constEnd() && covered; ++it) {
tableAlias = parseInfo.querySchema->tableAlias(*it);
@@ -321,8 +321,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (covered) {
setError(i18n("Could not access the table directly using its name"),
i18n("Table \"%1\" is covered by aliases. Instead of \"%2\", "
- "you can write \"%3\"").arg(tableName)
- .arg(tableName+"."+fieldName).arg(tableAlias+"."+fieldName.latin1()));
+ "you can write \"%3\"").tqarg(tableName)
+ .tqarg(tableName+"."+fieldName).tqarg(tableAlias+"."+fieldName.latin1()));
return false;
}
}
@@ -340,7 +340,7 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (ts) {
- QValueList<int> *positionsList = repeatedTablesAndAliases[ tableName ];
+ TQValueList<int> *positionsList = repeatedTablesAndAliases[ tableName ];
if (!positionsList) {
IMPL_ERROR(tableName + "." + fieldName + ", !positionsList ");
return false;
@@ -348,8 +348,8 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
if (fieldName=="*") {
if (positionsList->count()>1) {
- setError(i18n("Ambiguous \"%1.*\" expression").arg(tableName),
- i18n("More than one \"%1\" table or alias defined").arg(tableName));
+ setError(i18n("Ambiguous \"%1.*\" expression").tqarg(tableName),
+ i18n("More than one \"%1\" table or alias defined").tqarg(tableName));
return false;
}
parseInfo.querySchema->addAsterisk( new QueryAsterisk(parseInfo.querySchema, ts) );
@@ -361,16 +361,16 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
// check if table or alias is used twice and both have the same column
// (so the column is ambiguous)
int numberOfTheSameFields = 0;
- for (QValueList<int>::iterator it = positionsList->begin();
+ for (TQValueList<int>::iterator it = positionsList->begin();
it!=positionsList->end();++it)
{
TableSchema *otherTS = parseInfo.querySchema->tables()->at(*it);
if (otherTS->field(fieldName))
numberOfTheSameFields++;
if (numberOfTheSameFields>1) {
- setError(i18n("Ambiguous \"%1.%2\" expression").arg(tableName).arg(fieldName),
+ setError(i18n("Ambiguous \"%1.%2\" expression").tqarg(tableName).tqarg(fieldName),
i18n("More than one \"%1\" table or alias defined containing \"%2\" field")
- .arg(tableName).arg(fieldName));
+ .tqarg(tableName).tqarg(fieldName));
return false;
}
}
@@ -379,7 +379,7 @@ bool addColumn( ParseInfo& parseInfo, BaseExpr* columnExpr )
}
else {
setError(i18n("Field not found"), i18n("Table \"%1\" has no \"%2\" field")
- .arg(tableName).arg(fieldName));
+ .tqarg(tableName).tqarg(fieldName));
return false;
}
}
@@ -412,13 +412,13 @@ QuerySchema* buildSelectQuery(
/*TODO: use this later if there are columns that use database fields,
e.g. "SELECT 1 from table1 t, table2 t") is ok however. */
//used to collect information about first repeated table name or alias:
-// QDict<char> tableNamesAndTableAliases(997, false);
-// QString repeatedTableNameOrTableAlias;
+// TQDict<char> tableNamesAndTableAliases(997, false);
+// TQString repeatedTableNameOrTableAlias;
if (tablesList) {
for (int i=0; i<tablesList->args(); i++, columnNum++) {
BaseExpr *e = tablesList->arg(i);
VariableExpr* t_e = 0;
- QCString aliasString;
+ TQCString aliasString;
if (e->exprClass() == KexiDBExpr_SpecialBinary) {
BinaryExpr* t_with_alias = e->toBinary();
assert(t_with_alias);
@@ -432,16 +432,16 @@ QuerySchema* buildSelectQuery(
t_e = e->toVariable();
}
assert(t_e);
- QCString tname = t_e->name.latin1();
- TableSchema *s = parser->db()->tableSchema(tname);
+ TQCString tname = t_e->name.latin1();
+ TableSchema *s = parser->db()->tableSchema(TQString(tname));
if(!s) {
setError(//i18n("Field List Error"),
- i18n("Table \"%1\" does not exist").arg(tname));
+ i18n("Table \"%1\" does not exist").tqarg(TQString(tname)));
// yyerror("fieldlisterror");
CLEANUP;
return 0;
}
- QCString tableOrAliasName;
+ TQCString tableOrAliasName;
if (!aliasString.isEmpty()) {
tableOrAliasName = aliasString;
// KexiDBDbg << "- add alias for table: " << aliasString << endl;
@@ -450,14 +450,14 @@ QuerySchema* buildSelectQuery(
}
// 1. collect information about first repeated table name or alias
// (potential ambiguity)
- QValueList<int> *list = parseInfo.repeatedTablesAndAliases[tableOrAliasName];
+ TQValueList<int> *list = parseInfo.repeatedTablesAndAliases[tableOrAliasName];
if (list) {
//another table/alias with the same name
list->append( i );
// KexiDBDbg << "- another table/alias with name: " << tableOrAliasName << endl;
}
else {
- list = new QValueList<int>();
+ list = new TQValueList<int>();
list->append( i );
parseInfo.repeatedTablesAndAliases.insert( tableOrAliasName, list );
// KexiDBDbg << "- first table/alias with name: " << tableOrAliasName << endl;
@@ -485,7 +485,7 @@ QuerySchema* buildSelectQuery(
}
}
- /* set parent table if there's only one */
+ /* set tqparent table if there's only one */
// if (parser->select()->tables()->count()==1)
if (querySchema->tables()->count()==1)
querySchema->setMasterTable(querySchema->tables()->first());
@@ -511,7 +511,7 @@ QuerySchema* buildSelectQuery(
aliasVariable = e->toBinary()->right()->toVariable();
if (!aliasVariable) {
setError(i18n("Invalid alias definition for column \"%1\"")
- .arg(columnExpr->toString())); //ok?
+ .tqarg(columnExpr->toString())); //ok?
CLEANUP;
return 0;
}
@@ -542,7 +542,7 @@ QuerySchema* buildSelectQuery(
e->toBinary()->m_larg = 0;
}
else {
- setError(i18n("Invalid \"%1\" column definition").arg(e->toString())); //ok?
+ setError(i18n("Invalid \"%1\" column definition").tqarg(e->toString())); //ok?
CLEANUP;
return 0;
}
@@ -610,7 +610,7 @@ QuerySchema* buildSelectQuery(
(*it).ascending, (*it).columnNumber-1 ))
{
setError(i18n("Could not define sorting - no column at position %1")
- .arg((*it).columnNumber));
+ .tqarg((*it).columnNumber));
CLEANUP;
return 0;
}
@@ -619,7 +619,7 @@ QuerySchema* buildSelectQuery(
Field * f = querySchema->findTableField((*it).aliasOrName);
if (!f) {
setError(i18n("Could not define sorting - "
- "column name or alias \"%1\" does not exist").arg((*it).aliasOrName));
+ "column name or alias \"%1\" does not exist").tqarg((*it).aliasOrName));
CLEANUP;
return 0;
}
@@ -630,8 +630,8 @@ QuerySchema* buildSelectQuery(
}
}
-// KexiDBDbg << "Select ColViews=" << (colViews ? colViews->debugString() : QString::null)
-// << " Tables=" << (tablesList ? tablesList->debugString() : QString::null) << endl;
+// KexiDBDbg << "Select ColViews=" << (colViews ? colViews->debugString() : TQString())
+// << " Tables=" << (tablesList ? tablesList->debugString() : TQString()) << endl;
CLEANUP;
return querySchema;
diff --git a/kexi/kexidb/parser/parser_p.h b/kexi/kexidb/parser/parser_p.h
index 6a695bc59..d03955c81 100644
--- a/kexi/kexidb/parser/parser_p.h
+++ b/kexi/kexidb/parser/parser_p.h
@@ -20,10 +20,10 @@
#ifndef KEXIDB_PARSER_P_H
#define KEXIDB_PARSER_P_H
-#include <qvaluelist.h>
-#include <qdict.h>
-#include <qasciicache.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqdict.h>
+#include <tqasciicache.h>
+#include <tqstring.h>
#include <kexidb/queryschema.h>
#include <kexidb/tableschema.h>
@@ -47,9 +47,9 @@ class ParserPrivate
TableSchema *table;
QuerySchema *select;
Connection *db;
- QString statement;
+ TQString statement;
ParserError error;
- QAsciiCache<char> reservedKeywords;
+ TQAsciiCache<char> reservedKeywords;
bool initialized : 1;
};
@@ -62,17 +62,17 @@ class ParseInfo
~ParseInfo();
//! collects positions of tables/aliases with the same names
- QDict< QValueList<int> > repeatedTablesAndAliases;
+ TQDict< TQValueList<int> > repeatedTablesAndAliases;
- QString errMsg, errDescr; //helpers
+ TQString errMsg, errDescr; //helpers
QuerySchema *querySchema;
};
}
void yyerror(const char *str);
-void setError(const QString& errName, const QString& errDesc);
-void setError(const QString& errDesc);
+void setError(const TQString& errName, const TQString& errDesc);
+void setError(const TQString& errDesc);
//bool parseData(KexiDB::Parser *p, const char *data);
bool addColumn( KexiDB::ParseInfo& parseInfo, KexiDB::BaseExpr* columnExpr );
KexiDB::QuerySchema* buildSelectQuery(
diff --git a/kexi/kexidb/parser/sqlparser.cpp b/kexi/kexidb/parser/sqlparser.cpp
index 682b8aa02..f4086b3b9 100644
--- a/kexi/kexidb/parser/sqlparser.cpp
+++ b/kexi/kexidb/parser/sqlparser.cpp
@@ -20,7 +20,7 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* As a special exception, you may create a larger work that contains
+/* As a special exception, you may create a larger work that tqcontains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
@@ -174,12 +174,12 @@
DISTINCT = 363,
DOMAIN_TOKEN = 364,
SQL_DOUBLE = 365,
- DOUBLE_QUOTED_STRING = 366,
+ DOUBLE_TQUOTED_STRING = 366,
DROP = 367,
ELSE = 368,
END = 369,
END_EXEC = 370,
- EQUAL = 371,
+ ETQUAL = 371,
ESCAPE = 372,
EXCEPT = 373,
SQL_EXCEPTION = 374,
@@ -296,7 +296,7 @@
PARTIAL = 485,
SQL_PASCAL = 486,
PERSISTENT = 487,
- CQL_PI = 488,
+ CTQL_PI = 488,
PLI = 489,
POSITION = 490,
PRECISION = 491,
@@ -308,8 +308,8 @@
PROCEDURE = 497,
PRODUCT = 498,
PUBLIC = 499,
- QUARTER = 500,
- QUIT = 501,
+ TQUARTER = 500,
+ TQUIT = 501,
RAND = 502,
READ_ONLY = 503,
REAL = 504,
@@ -381,7 +381,7 @@
TWO_DIGITS = 570,
UCASE = 571,
UNION = 572,
- UNIQUE = 573,
+ UNITQUE = 573,
SQL_UNKNOWN = 574,
UPDATE = 575,
UPPER = 576,
@@ -389,7 +389,7 @@
USER = 578,
IDENTIFIER = 579,
IDENTIFIER_DOT_ASTERISK = 580,
- QUERY_PARAMETER = 581,
+ TQUERY_PARAMETER = 581,
USING = 582,
VALUE = 583,
VALUES = 584,
@@ -524,12 +524,12 @@
#define DISTINCT 363
#define DOMAIN_TOKEN 364
#define SQL_DOUBLE 365
-#define DOUBLE_QUOTED_STRING 366
+#define DOUBLE_TQUOTED_STRING 366
#define DROP 367
#define ELSE 368
#define END 369
#define END_EXEC 370
-#define EQUAL 371
+#define ETQUAL 371
#define ESCAPE 372
#define EXCEPT 373
#define SQL_EXCEPTION 374
@@ -646,7 +646,7 @@
#define PARTIAL 485
#define SQL_PASCAL 486
#define PERSISTENT 487
-#define CQL_PI 488
+#define CTQL_PI 488
#define PLI 489
#define POSITION 490
#define PRECISION 491
@@ -658,8 +658,8 @@
#define PROCEDURE 497
#define PRODUCT 498
#define PUBLIC 499
-#define QUARTER 500
-#define QUIT 501
+#define TQUARTER 500
+#define TQUIT 501
#define RAND 502
#define READ_ONLY 503
#define REAL 504
@@ -731,7 +731,7 @@
#define TWO_DIGITS 570
#define UCASE 571
#define UNION 572
-#define UNIQUE 573
+#define UNITQUE 573
#define SQL_UNKNOWN 574
#define UPDATE 575
#define UPPER 576
@@ -739,7 +739,7 @@
#define USER 578
#define IDENTIFIER 579
#define IDENTIFIER_DOT_ASTERISK 580
-#define QUERY_PARAMETER 581
+#define TQUERY_PARAMETER 581
#define USING 582
#define VALUE 583
#define VALUES 584
@@ -780,7 +780,7 @@
#include <assert.h>
#include <limits.h>
//TODO OK?
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//workaround for bug on msvc
# undef LLONG_MIN
#endif
@@ -798,12 +798,12 @@
# include <malloc.h>
#endif
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#include <klocale.h>
-#include <qptrlist.h>
-#include <qcstring.h>
-#include <qvariant.h>
+#include <tqptrlist.h>
+#include <tqcstring.h>
+#include <tqvariant.h>
#include <connection.h>
#include <queryschema.h>
@@ -834,7 +834,7 @@ using namespace KexiDB;
#if 0
struct yyval
{
- QString parserUserName;
+ TQString parserUserName;
int integerValue;
KexiDBField::ColumnType coltype;
}
@@ -864,8 +864,8 @@ using namespace KexiDB;
typedef union YYSTYPE
#line 511 "sqlparser.y"
{
- QString* stringValue;
- Q_LLONG integerValue;
+ TQString* stringValue;
+ TQ_LLONG integerValue;
bool booleanValue;
struct realType realValue;
KexiDB::Field::Type colType;
@@ -876,7 +876,7 @@ typedef union YYSTYPE
KexiDB::QuerySchema *querySchema;
SelectOptionsInternal *selectOptions;
OrderByColumnInternal::List *orderByColumns;
- QVariant *variantValue;
+ TQVariant *variantValue;
}
/* Line 193 of yacc.c. */
#line 883 "sqlparser.tab.c"
@@ -1290,8 +1290,8 @@ static const char *const yytname[] =
"DEC", "DECLARE", "DEFAULT", "DEFERRABLE", "DEFERRED", "SQL_DELETE",
"DESC", "DESCRIBE", "DESCRIPTOR", "DIAGNOSTICS", "DICTIONARY",
"DIRECTORY", "DISCONNECT", "DISPLACEMENT", "DISTINCT", "DOMAIN_TOKEN",
- "SQL_DOUBLE", "DOUBLE_QUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
- "EQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
+ "SQL_DOUBLE", "DOUBLE_TQUOTED_STRING", "DROP", "ELSE", "END", "END_EXEC",
+ "ETQUAL", "ESCAPE", "EXCEPT", "SQL_EXCEPTION", "EXEC", "EXECUTE",
"EXISTS", "EXP", "EXPONENT", "EXTERNAL", "EXTRACT", "SQL_FALSE", "FETCH",
"FIRST", "SQL_FLOAT", "FLOOR", "FN", "FOR", "FOREIGN", "FORTRAN",
"FOUND", "FOUR_DIGITS", "FROM", "FULL", "GET", "GLOBAL", "GO", "GOTO",
@@ -1308,9 +1308,9 @@ static const char *const yytname[] =
"NOW", "SQL_NULL", "SQL_IS", "SQL_IS_NULL", "SQL_IS_NOT_NULL", "NULLIF",
"NUMERIC", "OCTET_LENGTH", "ODBC", "OF", "SQL_OFF", "SQL_ON", "ONLY",
"OPEN", "OPTION", "OR", "ORDER", "OUTER", "OUTPUT", "OVERLAPS", "PAGE",
- "PARTIAL", "SQL_PASCAL", "PERSISTENT", "CQL_PI", "PLI", "POSITION",
+ "PARTIAL", "SQL_PASCAL", "PERSISTENT", "CTQL_PI", "PLI", "POSITION",
"PRECISION", "PREPARE", "PRESERVE", "PRIMARY", "PRIOR", "PRIVILEGES",
- "PROCEDURE", "PRODUCT", "PUBLIC", "QUARTER", "QUIT", "RAND", "READ_ONLY",
+ "PROCEDURE", "PRODUCT", "PUBLIC", "TQUARTER", "TQUIT", "RAND", "READ_ONLY",
"REAL", "REFERENCES", "REPEAT", "REPLACE", "RESTRICT", "REVOKE", "RIGHT",
"ROLLBACK", "ROWS", "RPAD", "RTRIM", "SCHEMA", "SCREEN_WIDTH", "SCROLL",
"SECOND", "SECONDS_BETWEEN", "SELECT", "SEQUENCE", "SETOPT", "SET",
@@ -1322,9 +1322,9 @@ static const char *const yytname[] =
"TAN", "TEMPORARY", "THEN", "THREE_DIGITS", "TIME", "TIMESTAMP",
"TIMEZONE_HOUR", "TIMEZONE_MINUTE", "TINYINT", "TO", "TO_CHAR",
"TO_DATE", "TRANSACTION", "TRANSLATE", "TRANSLATION", "TRUNCATE",
- "GENERAL_TITLE", "TWO_DIGITS", "UCASE", "UNION", "UNIQUE", "SQL_UNKNOWN",
+ "GENERAL_TITLE", "TWO_DIGITS", "UCASE", "UNION", "UNITQUE", "SQL_UNKNOWN",
"UPDATE", "UPPER", "USAGE", "USER", "IDENTIFIER",
- "IDENTIFIER_DOT_ASTERISK", "QUERY_PARAMETER", "USING", "VALUE", "VALUES",
+ "IDENTIFIER_DOT_ASTERISK", "TQUERY_PARAMETER", "USING", "VALUE", "VALUES",
"VARBINARY", "VARCHAR", "VARYING", "VENDOR", "VIEW", "WEEK", "WHEN",
"WHENEVER", "WHERE", "WHERE_CURRENT_OF", "WITH", "WORD_WRAPPED", "WORK",
"WRAPPED", "XOR", "YEAR", "YEARS_BETWEEN", "SCAN_ERROR", "__LAST_TOKEN",
@@ -2703,7 +2703,7 @@ YYACCEPT;
case 38:
#line 828 "sqlparser.y"
{
- (yyval.variantValue) = new QVariant( *(yyvsp[(1) - (1)].stringValue) );
+ (yyval.variantValue) = new TQVariant( *(yyvsp[(1) - (1)].stringValue) );
KexiDBDbg << "OrderByColumnId: " << *(yyval.variantValue) << endl;
delete (yyvsp[(1) - (1)].stringValue);
;}
@@ -2712,7 +2712,7 @@ YYACCEPT;
case 39:
#line 834 "sqlparser.y"
{
- (yyval.variantValue) = new QVariant( *(yyvsp[(1) - (3)].stringValue) + "." + *(yyvsp[(3) - (3)].stringValue) );
+ (yyval.variantValue) = new TQVariant( *(yyvsp[(1) - (3)].stringValue) + "." + *(yyvsp[(3) - (3)].stringValue) );
KexiDBDbg << "OrderByColumnId: " << *(yyval.variantValue) << endl;
delete (yyvsp[(1) - (3)].stringValue);
delete (yyvsp[(3) - (3)].stringValue);
@@ -2722,7 +2722,7 @@ YYACCEPT;
case 40:
#line 841 "sqlparser.y"
{
- (yyval.variantValue) = new QVariant((yyvsp[(1) - (1)].integerValue));
+ (yyval.variantValue) = new TQVariant((yyvsp[(1) - (1)].integerValue));
KexiDBDbg << "OrderByColumnId: " << *(yyval.variantValue) << endl;
;}
break;
@@ -2988,10 +2988,10 @@ YYACCEPT;
case 84:
#line 1054 "sqlparser.y"
{
- (yyval.expr) = new ConstExpr( SQL_NULL, QVariant() );
+ (yyval.expr) = new ConstExpr( SQL_NULL, TQVariant() );
KexiDBDbg << " + NULL" << endl;
// $$ = new Field();
- //$$->setName(QString::null);
+ //$$->setName(TQString());
;}
break;
@@ -3007,16 +3007,16 @@ YYACCEPT;
case 86:
#line 1067 "sqlparser.y"
{
- QVariant val;
+ TQVariant val;
if ((yyvsp[(1) - (1)].integerValue) <= INT_MAX && (yyvsp[(1) - (1)].integerValue) >= INT_MIN)
val = (int)(yyvsp[(1) - (1)].integerValue);
else if ((yyvsp[(1) - (1)].integerValue) <= UINT_MAX && (yyvsp[(1) - (1)].integerValue) >= 0)
val = (uint)(yyvsp[(1) - (1)].integerValue);
- else if ((yyvsp[(1) - (1)].integerValue) <= (Q_LLONG)LLONG_MAX && (yyvsp[(1) - (1)].integerValue) >= (Q_LLONG)LLONG_MIN)
- val = (Q_LLONG)(yyvsp[(1) - (1)].integerValue);
+ else if ((yyvsp[(1) - (1)].integerValue) <= (TQ_LLONG)LLONG_MAX && (yyvsp[(1) - (1)].integerValue) >= (TQ_LLONG)LLONG_MIN)
+ val = (TQ_LLONG)(yyvsp[(1) - (1)].integerValue);
// if ($1 < ULLONG_MAX)
-// val = (Q_ULLONG)$1;
+// val = (TQ_ULLONG)$1;
//TODO ok?
(yyval.expr) = new ConstExpr( INTEGER_CONST, val );
@@ -3027,7 +3027,7 @@ YYACCEPT;
case 87:
#line 1084 "sqlparser.y"
{
- (yyval.expr) = new ConstExpr( REAL_CONST, QPoint( (yyvsp[(1) - (1)].realValue).integer, (yyvsp[(1) - (1)].realValue).fractional ) );
+ (yyval.expr) = new ConstExpr( REAL_CONST, TQPoint( (yyvsp[(1) - (1)].realValue).integer, (yyvsp[(1) - (1)].realValue).fractional ) );
KexiDBDbg << " + real constant: " << (yyvsp[(1) - (1)].realValue).integer << "." << (yyvsp[(1) - (1)].realValue).fractional << endl;
;}
break;
@@ -3111,7 +3111,7 @@ YYACCEPT;
Field *f = item->table()->field(item->name());
if(!f)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
}
@@ -3242,7 +3242,7 @@ YYACCEPT;
case 108:
#line 1352 "sqlparser.y"
{
- QString s( *(yyvsp[(1) - (3)].stringValue) );
+ TQString s( *(yyvsp[(1) - (3)].stringValue) );
s += ".*";
(yyval.expr) = new VariableExpr(s);
KexiDBDbg << " + all columns from " << s << endl;
diff --git a/kexi/kexidb/parser/sqlparser.h b/kexi/kexidb/parser/sqlparser.h
index 7caf4b879..6895e29f9 100644
--- a/kexi/kexidb/parser/sqlparser.h
+++ b/kexi/kexidb/parser/sqlparser.h
@@ -27,7 +27,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-/* As a special exception, you may create a larger work that contains
+/* As a special exception, you may create a larger work that tqcontains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
@@ -154,12 +154,12 @@ bool parseData(KexiDB::Parser *p, const char *data);
DISTINCT = 363,
DOMAIN_TOKEN = 364,
SQL_DOUBLE = 365,
- DOUBLE_QUOTED_STRING = 366,
+ DOUBLE_TQUOTED_STRING = 366,
DROP = 367,
ELSE = 368,
END = 369,
END_EXEC = 370,
- EQUAL = 371,
+ ETQUAL = 371,
ESCAPE = 372,
EXCEPT = 373,
SQL_EXCEPTION = 374,
@@ -276,7 +276,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
PARTIAL = 485,
SQL_PASCAL = 486,
PERSISTENT = 487,
- CQL_PI = 488,
+ CTQL_PI = 488,
PLI = 489,
POSITION = 490,
PRECISION = 491,
@@ -288,8 +288,8 @@ bool parseData(KexiDB::Parser *p, const char *data);
PROCEDURE = 497,
PRODUCT = 498,
PUBLIC = 499,
- QUARTER = 500,
- QUIT = 501,
+ TQUARTER = 500,
+ TQUIT = 501,
RAND = 502,
READ_ONLY = 503,
REAL = 504,
@@ -361,7 +361,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
TWO_DIGITS = 570,
UCASE = 571,
UNION = 572,
- UNIQUE = 573,
+ UNITQUE = 573,
SQL_UNKNOWN = 574,
UPDATE = 575,
UPPER = 576,
@@ -369,7 +369,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
USER = 578,
IDENTIFIER = 579,
IDENTIFIER_DOT_ASTERISK = 580,
- QUERY_PARAMETER = 581,
+ TQUERY_PARAMETER = 581,
USING = 582,
VALUE = 583,
VALUES = 584,
@@ -504,12 +504,12 @@ bool parseData(KexiDB::Parser *p, const char *data);
#define DISTINCT 363
#define DOMAIN_TOKEN 364
#define SQL_DOUBLE 365
-#define DOUBLE_QUOTED_STRING 366
+#define DOUBLE_TQUOTED_STRING 366
#define DROP 367
#define ELSE 368
#define END 369
#define END_EXEC 370
-#define EQUAL 371
+#define ETQUAL 371
#define ESCAPE 372
#define EXCEPT 373
#define SQL_EXCEPTION 374
@@ -626,7 +626,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
#define PARTIAL 485
#define SQL_PASCAL 486
#define PERSISTENT 487
-#define CQL_PI 488
+#define CTQL_PI 488
#define PLI 489
#define POSITION 490
#define PRECISION 491
@@ -638,8 +638,8 @@ bool parseData(KexiDB::Parser *p, const char *data);
#define PROCEDURE 497
#define PRODUCT 498
#define PUBLIC 499
-#define QUARTER 500
-#define QUIT 501
+#define TQUARTER 500
+#define TQUIT 501
#define RAND 502
#define READ_ONLY 503
#define REAL 504
@@ -711,7 +711,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
#define TWO_DIGITS 570
#define UCASE 571
#define UNION 572
-#define UNIQUE 573
+#define UNITQUE 573
#define SQL_UNKNOWN 574
#define UPDATE 575
#define UPPER 576
@@ -719,7 +719,7 @@ bool parseData(KexiDB::Parser *p, const char *data);
#define USER 578
#define IDENTIFIER 579
#define IDENTIFIER_DOT_ASTERISK 580
-#define QUERY_PARAMETER 581
+#define TQUERY_PARAMETER 581
#define USING 582
#define VALUE 583
#define VALUES 584
@@ -751,8 +751,8 @@ bool parseData(KexiDB::Parser *p, const char *data);
typedef union YYSTYPE
#line 511 "sqlparser.y"
{
- QString* stringValue;
- Q_LLONG integerValue;
+ TQString* stringValue;
+ TQ_LLONG integerValue;
bool booleanValue;
struct realType realValue;
KexiDB::Field::Type colType;
@@ -763,7 +763,7 @@ typedef union YYSTYPE
KexiDB::QuerySchema *querySchema;
SelectOptionsInternal *selectOptions;
OrderByColumnInternal::List *orderByColumns;
- QVariant *variantValue;
+ TQVariant *variantValue;
}
/* Line 1528 of yacc.c. */
#line 763 "sqlparser.tab.h"
diff --git a/kexi/kexidb/parser/sqlparser.y b/kexi/kexidb/parser/sqlparser.y
index 5a8357f22..426dec488 100644
--- a/kexi/kexidb/parser/sqlparser.y
+++ b/kexi/kexidb/parser/sqlparser.y
@@ -1003,7 +1003,7 @@ aExpr9 '/' aExpr8
aExpr9
;
-/* parenthesis, unary operators, and terminals precedence */
+/* tqparenthesis, unary operators, and terminals precedence */
aExpr9:
/* --- unary logical left --- */
'-' aExpr9
@@ -1201,7 +1201,7 @@ IDENTIFIER
Field *f = item->table()->field(item->name());
if(!f)
{
- ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").arg(item->name()).arg(schema->name()), ctoken, current);
+ ParserError err(i18n("Field List Error"), i18n("Unknown column '%1' in table '%2'").tqarg(item->name()).tqarg(schema->name()), ctoken, current);
parser->setError(err);
yyerror("fieldlisterror");
}
@@ -1360,7 +1360,7 @@ ColWildCard:
{
$$ = new VariableExpr($1);
KexiDBDbg << " Invalid identifier! " << $1 << endl;
- setError(i18n("Invalid identifier \"%1\"").arg($1));
+ setError(i18n("Invalid identifier \"%1\"").tqarg($1));
}*/
;
diff --git a/kexi/kexidb/parser/sqlscanner.cpp b/kexi/kexidb/parser/sqlscanner.cpp
index c3984a39d..10fe70a29 100644
--- a/kexi/kexidb/parser/sqlscanner.cpp
+++ b/kexi/kexidb/parser/sqlscanner.cpp
@@ -512,8 +512,8 @@ char *yytext;
#define YY_NO_UNPUT
#define ECOUNT current += yyleng; ctoken = yytext
-extern void setError(const QString& errDesc);
-extern void setError(const QString& errName, const QString& errDesc);
+extern void setError(const TQString& errDesc);
+extern void setError(const TQString& errName, const TQString& errDesc);
/* *** Please reflect changes to this file in ../driver_p.cpp *** */
#define YY_NEVER_INTERACTIVE 1
@@ -822,10 +822,10 @@ YY_RULE_SETUP
#line 91 "sqlscanner.l"
{
//TODO: what about hex or octal values?
- //we're using QString:toLongLong() here because atoll() is not so portable:
+ //we're using TQString:toLongLong() here because atoll() is not so portable:
ECOUNT;
bool ok;
- yylval.integerValue = QString(yytext).toLongLong( &ok );
+ yylval.integerValue = TQString(yytext).toLongLong( &ok );
if (!ok) {
setError(i18n("Invalid integer number"),i18n("This integer number may be too large."));
return SCAN_ERROR;
@@ -1097,7 +1097,7 @@ YY_RULE_SETUP
#line 273 "sqlscanner.l"
{
ECOUNT;
- yylval.stringValue = new QString(QString::fromUtf8(yytext+1, yyleng-2));
+ yylval.stringValue = new TQString(TQString::fromUtf8(yytext+1, yyleng-2));
return CHARACTER_STRING_LITERAL;
/* "ZZZ" sentinel for script */
@@ -1109,7 +1109,7 @@ YY_RULE_SETUP
{
KexiDBDbg << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
ECOUNT;
- yylval.stringValue = new QString(QString::fromUtf8(yytext, yyleng));
+ yylval.stringValue = new TQString(TQString::fromUtf8(yytext, yyleng));
if (yytext[0]>='0' && yytext[0]<='9') {
setError(i18n("Invalid identifier"),
i18n("Identifiers should start with a letter or '_' character"));
@@ -1124,8 +1124,8 @@ YY_RULE_SETUP
{
KexiDBDbg << "yytext: '" << yytext << "' (" << yyleng << ")" << endl;
ECOUNT;
- yylval.stringValue = new QString(QString::fromUtf8(yytext+1, yyleng-2));
- return QUERY_PARAMETER;
+ yylval.stringValue = new TQString(TQString::fromUtf8(yytext+1, yyleng-2));
+ return TQUERY_PARAMETER;
}
YY_BREAK
case 41:
diff --git a/kexi/kexidb/parser/sqltypes.h b/kexi/kexidb/parser/sqltypes.h
index c0879a3c4..52d921e7e 100644
--- a/kexi/kexidb/parser/sqltypes.h
+++ b/kexi/kexidb/parser/sqltypes.h
@@ -20,10 +20,10 @@
#ifndef SQLTYPES_H
#define SQLTYPES_H
-#include <qvariant.h>
+#include <tqvariant.h>
extern int current;
-extern QString ctoken;
+extern TQString ctoken;
struct dateType
{
@@ -41,26 +41,26 @@ struct realType
//! @internal
struct OrderByColumnInternal
{
- typedef QValueList<OrderByColumnInternal> List;
- typedef QValueListConstIterator<OrderByColumnInternal> ListConstIterator;
+ typedef TQValueList<OrderByColumnInternal> List;
+ typedef TQValueListConstIterator<OrderByColumnInternal> ListConstIterator;
OrderByColumnInternal()
: columnNumber(-1)
, ascending(true)
{
}
- void setColumnByNameOrNumber(const QVariant& nameOrNumber) {
- if (nameOrNumber.type()==QVariant::String) {
+ void setColumnByNameOrNumber(const TQVariant& nameOrNumber) {
+ if (nameOrNumber.type()==TQVariant::String) {
aliasOrName = nameOrNumber.toString();
columnNumber = -1;
}
else {
columnNumber = nameOrNumber.toInt();
- aliasOrName = QString::null;
+ aliasOrName = TQString();
}
}
- QString aliasOrName; //!< Can include a "tablename." prefix
+ TQString aliasOrName; //!< Can include a "tablename." prefix
int columnNumber; //!< Optional, used instead of aliasOrName to refer to column
//!< by its number rather than name.
bool ascending : 1;
diff --git a/kexi/kexidb/preparedstatement.cpp b/kexi/kexidb/preparedstatement.cpp
index 24947dffa..ce96f6308 100644
--- a/kexi/kexidb/preparedstatement.cpp
+++ b/kexi/kexidb/preparedstatement.cpp
@@ -26,11 +26,11 @@
using namespace KexiDB;
PreparedStatement::PreparedStatement(StatementType type, ConnectionInternal& conn,
- FieldList& fields, const QStringList& where)
+ FieldList& fields, const TQStringList& where)
: KShared()
, m_type(type)
, m_fields(&fields)
- , m_where(where.isEmpty() ? new QStringList(where) : 0)
+ , m_where(where.isEmpty() ? new TQStringList(where) : 0)
, m_whereFields(0)
{
Q_UNUSED(conn);
@@ -42,9 +42,9 @@ PreparedStatement::~PreparedStatement()
delete m_whereFields;
}
-QCString PreparedStatement::generateStatementString()
+TQCString PreparedStatement::generateStatementString()
{
- QCString s(1024);
+ TQCString s(1024);
if (m_type == SelectStatement) {
//! @todo only tables and trivial queries supported for select...
s = "SELECT ";
@@ -62,7 +62,7 @@ QCString PreparedStatement::generateStatementString()
// for (uint i=0; i<m_fields->fieldCount(); i++) {
m_whereFields = new Field::List();
- for (QStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) {
+ for (TQStringList::ConstIterator it=m_where->constBegin(); it!=m_where->constEnd(); ++it) {
// for (Field::ListIterator it(m_fields->fieldsIterator()); it.current(); ++it) {
if (first)
first = false;
@@ -86,7 +86,7 @@ QCString PreparedStatement::generateStatementString()
if (!table)
return ""; //err
- QCString namesList;
+ TQCString namesList;
bool first = true;
const bool allTableFieldsUsed = dynamic_cast<TableSchema*>(m_fields); //we are using a selection of fields only
Field::ListIterator it = m_fields->fieldsIterator();
@@ -99,18 +99,18 @@ QCString PreparedStatement::generateStatementString()
} else {
s.append( ",?" );
if (!allTableFieldsUsed)
- namesList.append(QCString(", ")+it.current()->name().latin1());
+ namesList.append(TQCString(", ")+it.current()->name().latin1());
}
}
s.append(")");
- s.prepend(QCString("INSERT INTO ") + table->name().latin1()
- + (allTableFieldsUsed ? QCString() : (" (" + namesList + ")"))
+ s.prepend(TQCString("INSERT INTO ") + table->name().latin1()
+ + (allTableFieldsUsed ? TQCString() : (" (" + namesList + ")"))
+ " VALUES (");
}
return s;
}
-PreparedStatement& PreparedStatement::operator<< ( const QVariant& value )
+PreparedStatement& PreparedStatement::operator<< ( const TQVariant& value )
{
m_args.append(value);
return *this;
diff --git a/kexi/kexidb/preparedstatement.h b/kexi/kexidb/preparedstatement.h
index 368140e5b..463c3c446 100644
--- a/kexi/kexidb/preparedstatement.h
+++ b/kexi/kexidb/preparedstatement.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_PREPAREDSTATEMENT_H
#define KEXIDB_PREPAREDSTATEMENT_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include <ksharedptr.h>
#include "field.h"
@@ -39,7 +39,7 @@ class FieldList;
connection.insertRecord(*tabelSchema, dbRowBuffer).
To use PreparedStatement, create is using KexiDB::Connection:prepareStatement(),
- providing table schema; set up arguments using operator << ( const QVariant& value );
+ providing table schema; set up arguments using operator << ( const TQVariant& value );
and call execute() when ready. PreparedStatement objects are accessed
using KDE shared pointers, i.e KexiDB::PreparedStatement::Ptr, so you do not need
to remember about destroying them. However, when underlying Connection object
@@ -83,12 +83,12 @@ class KEXI_DB_EXPORT PreparedStatement : public KShared
//! Creates Prepared statement. In your code use KexiDB::Connection:prepareStatement() instead.
PreparedStatement(StatementType type, ConnectionInternal& conn, FieldList& fields,
- const QStringList& where = QStringList());
+ const TQStringList& where = TQStringList());
virtual ~PreparedStatement();
//! Appends argument \a value to the statement.
- PreparedStatement& operator<< ( const QVariant& value );
+ PreparedStatement& operator<< ( const TQVariant& value );
//! Clears arguments of the prepared statement. Usually used after execute()
void clearArguments();
@@ -103,12 +103,12 @@ class KEXI_DB_EXPORT PreparedStatement : public KShared
protected:
//! @todo is this portable across backends?
- QCString generateStatementString();
+ TQCString generateStatementString();
StatementType m_type;
FieldList *m_fields;
- QValueList<QVariant> m_args;
- QStringList* m_where;
+ TQValueList<TQVariant> m_args;
+ TQStringList* m_where;
Field::List* m_whereFields;
};
diff --git a/kexi/kexidb/queryschema.cpp b/kexi/kexidb/queryschema.cpp
index 4da4d2b8e..4fae1cf12 100644
--- a/kexi/kexidb/queryschema.cpp
+++ b/kexi/kexidb/queryschema.cpp
@@ -27,18 +27,18 @@
#include <assert.h>
-#include <qvaluelist.h>
-#include <qasciidict.h>
-#include <qptrdict.h>
-#include <qintdict.h>
-#include <qbitarray.h>
+#include <tqvaluelist.h>
+#include <tqasciidict.h>
+#include <tqptrdict.h>
+#include <tqintdict.h>
+#include <tqbitarray.h>
#include <kdebug.h>
#include <klocale.h>
using namespace KexiDB;
-QueryColumnInfo::QueryColumnInfo(Field *f, const QCString& _alias, bool _visible,
+QueryColumnInfo::QueryColumnInfo(Field *f, const TQCString& _alias, bool _visible,
QueryColumnInfo *foreignColumn)
: field(f), alias(_alias), visible(_visible), m_indexForVisibleLookupValue(-1)
, m_foreignColumn(foreignColumn)
@@ -49,11 +49,11 @@ QueryColumnInfo::~QueryColumnInfo()
{
}
-QString QueryColumnInfo::debugString() const
+TQString QueryColumnInfo::debugString() const
{
return field->name() +
- ( alias.isEmpty() ? QString::null
- : (QString::fromLatin1(" AS ") + QString(alias)) );
+ ( alias.isEmpty() ? TQString()
+ : (TQString::tqfromLatin1(" AS ") + TQString(alias)) );
}
//=======================================
@@ -109,14 +109,14 @@ class QuerySchemaPrivate
if (copy->autoincFields)
autoincFields = new QueryColumnInfo::List(*copy->autoincFields);
if (copy->columnsOrder)
- columnsOrder = new QMap<QueryColumnInfo*,int>(*copy->columnsOrder);
+ columnsOrder = new TQMap<QueryColumnInfo*,int>(*copy->columnsOrder);
if (copy->columnsOrderWithoutAsterisks)
- columnsOrderWithoutAsterisks = new QMap<QueryColumnInfo*,int>(
+ columnsOrderWithoutAsterisks = new TQMap<QueryColumnInfo*,int>(
*copy->columnsOrderWithoutAsterisks);
if (copy->columnsOrderExpanded)
- columnsOrderExpanded = new QMap<QueryColumnInfo*,int>(*copy->columnsOrderExpanded);
+ columnsOrderExpanded = new TQMap<QueryColumnInfo*,int>(*copy->columnsOrderExpanded);
if (copy->pkeyFieldsOrder)
- pkeyFieldsOrder = new QValueVector<int>(*copy->pkeyFieldsOrder);
+ pkeyFieldsOrder = new TQValueVector<int>(*copy->pkeyFieldsOrder);
if (copy->whereExpr)
whereExpr = copy->whereExpr->copy();
if (copy->fakeRowIDCol)
@@ -156,7 +156,7 @@ class QuerySchemaPrivate
delete pkeyFieldsOrder;
pkeyFieldsOrder=0;
visibility.fill(false);
- tablesBoundToColumns = QValueVector<int>(64,-1);
+ tablesBoundToColumns = TQValueVector<int>(64,-1);
tablePositionsForAliases.clear();
columnPositionsForAliases.clear();
}
@@ -177,7 +177,7 @@ class QuerySchemaPrivate
columnsOrderExpanded = 0;
delete autoincFields;
autoincFields = 0;
- autoIncrementSQLFieldsList = QString::null;
+ autoIncrementSQLFieldsList = TQString();
columnInfosByNameExpanded.clear();
columnInfosByName.clear();
delete ownedVisibleColumns;
@@ -185,16 +185,16 @@ class QuerySchemaPrivate
}
}
- void setColumnAliasInternal(uint position, const QCString& alias)
+ void setColumnAliasInternal(uint position, const TQCString& alias)
{
- columnAliases.replace(position, new QCString(alias));
- columnPositionsForAliases.replace(alias, new int(position));
- maxIndexWithAlias = QMAX( maxIndexWithAlias, (int)position );
+ columnAliases.tqreplace(position, new TQCString(alias));
+ columnPositionsForAliases.tqreplace(alias, new int(position));
+ maxIndexWithAlias = TQMAX( maxIndexWithAlias, (int)position );
}
- void setColumnAlias(uint position, const QCString& alias)
+ void setColumnAlias(uint position, const TQCString& alias)
{
- QCString *oldAlias = columnAliases.take(position);
+ TQCString *oldAlias = columnAliases.take(position);
if (oldAlias) {
tablePositionsForAliases.remove(*oldAlias);
delete oldAlias;
@@ -213,7 +213,7 @@ class QuerySchemaPrivate
return !columnAliases.isEmpty();
}
- QCString* columnAlias(uint position)
+ TQCString* columnAlias(uint position)
{
tryRegenerateExprAliases();
return columnAliases[position];
@@ -241,14 +241,14 @@ class QuerySchemaPrivate
Field *f;
uint p=0;
uint colNum=0; //used to generate a name
- QCString columnAlias;
+ TQCString columnAlias;
for (Field::ListIterator it(query->fieldsIterator()); (f = it.current()); ++it, p++) {
if (f->isExpression() && !columnAliases[p]) {
//missing
- for (;;) { //find 1st unused
+ for (;;) { //tqfind 1st unused
colNum++;
columnAlias = (i18n("short for 'expression' word (only latin letters, please)", "expr")
- + QString::number(colNum)).latin1();
+ + TQString::number(colNum)).latin1();
if (!tablePositionsForAliases[columnAlias])
break;
}
@@ -259,11 +259,11 @@ class QuerySchemaPrivate
}
/*! Used to mapping columns to its aliases for this query */
- QIntDict<QCString> columnAliases;
+ TQIntDict<TQCString> columnAliases;
public:
/*! Used to mapping tables to its aliases for this query */
- QIntDict<QCString> tableAliases;
+ TQIntDict<TQCString> tableAliases;
/*! Helper used with aliases */
int maxIndexWithAlias;
@@ -272,7 +272,7 @@ class QuerySchemaPrivate
int maxIndexWithTableAlias;
/*! Used to store visibility flag for every field */
- QBitArray visibility;
+ TQBitArray visibility;
/*! List of asterisks defined for this query */
Field::List asterisks;
@@ -299,30 +299,30 @@ class QuerySchemaPrivate
QueryColumnInfo::List *autoincFields;
/*! A cache for autoIncrementSQLFieldsList(). */
- QString autoIncrementSQLFieldsList;
- QGuardedPtr<Driver> lastUsedDriverForAutoIncrementSQLFieldsList;
+ TQString autoIncrementSQLFieldsList;
+ TQGuardedPtr<Driver> lastUsedDriverForAutoIncrementSQLFieldsList;
/*! A map for fast lookup of query columns' order (unexpanded version). */
- QMap<QueryColumnInfo*,int> *columnsOrder;
+ TQMap<QueryColumnInfo*,int> *columnsOrder;
/*! A map for fast lookup of query columns' order (unexpanded version without asterisks). */
- QMap<QueryColumnInfo*,int> *columnsOrderWithoutAsterisks;
+ TQMap<QueryColumnInfo*,int> *columnsOrderWithoutAsterisks;
/*! A map for fast lookup of query columns' order.
This is exactly opposite information compared to vector returned
by fieldsExpanded() */
- QMap<QueryColumnInfo*,int> *columnsOrderExpanded;
+ TQMap<QueryColumnInfo*,int> *columnsOrderExpanded;
-// QValueList<bool> detailedVisibility;
+// TQValueList<bool> detailedVisibility;
/*! order of PKEY fields (e.g. for updateRow() ) */
- QValueVector<int> *pkeyFieldsOrder;
+ TQValueVector<int> *pkeyFieldsOrder;
/*! number of PKEY fields within the query */
uint pkeyFieldsCount;
/*! forced (predefined) statement */
- QString statement;
+ TQString statement;
/*! Relationships defined for this query. */
Relationship::List relations;
@@ -342,20 +342,20 @@ class QuerySchemaPrivate
- second coulmn is not specially bound (othertable.x isn't ambiguous)
- third column is bound to table 1 "t2"
*/
- QValueVector<int> tablesBoundToColumns;
+ TQValueVector<int> tablesBoundToColumns;
/*! Collects table positions for aliases: used in tablePositionForAlias(). */
- QAsciiDict<int> tablePositionsForAliases;
+ TQAsciiDict<int> tablePositionsForAliases;
/*! Collects column positions for aliases: used in columnPositionForAlias(). */
- QAsciiDict<int> columnPositionsForAliases;
+ TQAsciiDict<int> columnPositionsForAliases;
/*! WHERE expression */
BaseExpr *whereExpr;
- QDict<QueryColumnInfo> columnInfosByNameExpanded;
+ TQDict<QueryColumnInfo> columnInfosByNameExpanded;
- QDict<QueryColumnInfo> columnInfosByName; //!< Same as columnInfosByNameExpanded but asterisks are skipped
+ TQDict<QueryColumnInfo> columnInfosByName; //!< Same as columnInfosByNameExpanded but asterisks are skipped
//! field schemas created for multiple joined columns like a||' '||b||' '||c
Field::List *ownedVisibleColumns;
@@ -396,27 +396,27 @@ OrderByColumn::~OrderByColumn()
{
}
-QString OrderByColumn::debugString() const
+TQString OrderByColumn::debugString() const
{
- QString orderString( m_ascending ? "ascending" : "descending" );
+ TQString orderString( m_ascending ? "ascending" : "descending" );
if (m_column) {
if (m_pos>-1)
- return QString("COLUMN_AT_POSITION_%1(%2, %3)")
- .arg(m_pos+1).arg(m_column->debugString()).arg(orderString);
+ return TQString("COLUMN_AT_POSITION_%1(%2, %3)")
+ .tqarg(m_pos+1).tqarg(m_column->debugString()).tqarg(orderString);
else
- return QString("COLUMN(%1, %2)").arg(m_column->debugString()).arg(orderString);
+ return TQString("COLUMN(%1, %2)").tqarg(m_column->debugString()).tqarg(orderString);
}
- return m_field ? QString("FIELD(%1, %2)").arg(m_field->debugString()).arg(orderString)
- : QString("NONE");
+ return m_field ? TQString("FIELD(%1, %2)").tqarg(m_field->debugString()).tqarg(orderString)
+ : TQString("NONE");
}
-QString OrderByColumn::toSQLString(bool includeTableName, Driver *drv, int identifierEscaping) const
+TQString OrderByColumn::toSQLString(bool includeTableName, Driver *drv, int identifierEscaping) const
{
- const QString orderString( m_ascending ? "" : " DESC" );
- QString fieldName, tableName;
+ const TQString orderString( m_ascending ? "" : " DESC" );
+ TQString fieldName, tableName;
if (m_column) {
if (m_pos>-1)
- return QString::number(m_pos+1) + orderString;
+ return TQString::number(m_pos+1) + orderString;
else {
if (includeTableName && m_column->alias.isEmpty()) {
tableName = m_column->field->table()->name();
@@ -451,11 +451,11 @@ OrderByColumnList::OrderByColumnList()
}
bool OrderByColumnList::appendFields(QuerySchema& querySchema,
- const QString& field1, bool ascending1,
- const QString& field2, bool ascending2,
- const QString& field3, bool ascending3,
- const QString& field4, bool ascending4,
- const QString& field5, bool ascending5)
+ const TQString& field1, bool ascending1,
+ const TQString& field2, bool ascending2,
+ const TQString& field3, bool ascending3,
+ const TQString& field4, bool ascending4,
+ const TQString& field5, bool ascending5)
{
uint numAdded = 0;
#define ADD_COL(fieldName, ascending) \
@@ -504,7 +504,7 @@ void OrderByColumnList::appendField(Field& field, bool ascending)
}
bool OrderByColumnList::appendField(QuerySchema& querySchema,
- const QString& fieldName, bool ascending)
+ const TQString& fieldName, bool ascending)
{
QueryColumnInfo *columnInfo = querySchema.columnInfo( fieldName );
if (columnInfo) {
@@ -517,7 +517,7 @@ bool OrderByColumnList::appendField(QuerySchema& querySchema,
return true;
}
KexiDBWarn << "OrderByColumnList::addColumn(QuerySchema& querySchema, "
- "const QString& column, bool ascending): no such field \"" << fieldName << "\"" << endl;
+ "const TQString& column, bool ascending): no such field \"" << fieldName << "\"" << endl;
return false;
}
@@ -526,11 +526,11 @@ void OrderByColumnList::appendColumn(const OrderByColumn& column)
append( column );
}
-QString OrderByColumnList::debugString() const
+TQString OrderByColumnList::debugString() const
{
if (isEmpty())
return "NONE";
- QString dbg;
+ TQString dbg;
for (OrderByColumn::ListConstIterator it=constBegin(); it!=constEnd(); ++it) {
if (!dbg.isEmpty())
dbg += "\n";
@@ -539,9 +539,9 @@ QString OrderByColumnList::debugString() const
return dbg;
}
-QString OrderByColumnList::toSQLString(bool includeTableNames, Driver *drv, int identifierEscaping) const
+TQString OrderByColumnList::toSQLString(bool includeTableNames, Driver *drv, int identifierEscaping) const
{
- QString string;
+ TQString string;
for (OrderByColumn::ListConstIterator it=constBegin(); it!=constEnd(); ++it) {
if (!string.isEmpty())
string += ", ";
@@ -569,7 +569,7 @@ QuerySchema::QuerySchema(TableSchema& tableSchema)
init();
/* if (!d->masterTable) {
KexiDBWarn << "QuerySchema(TableSchema*): !d->masterTable" << endl;
- m_name = QString::null;
+ m_name = TQString();
return;
}*/
addTable(d->masterTable);
@@ -663,12 +663,12 @@ FieldList& QuerySchema::insertField(uint position, Field *field,
d->asterisks.append(field);
//if this is single-table asterisk,
//add a table to list if doesn't exist there:
- if (field->table() && (d->tables.findRef(field->table())==-1))
+ if (field->table() && (d->tables.tqfindRef(field->table())==-1))
d->tables.append(field->table());
}
else if (field->table()) {
//add a table to list if doesn't exist there:
- if (d->tables.findRef(field->table())==-1)
+ if (d->tables.tqfindRef(field->table())==-1)
d->tables.append(field->table());
}
// //visible by default
@@ -697,9 +697,9 @@ FieldList& QuerySchema::insertField(uint position, Field *field,
else
KexiDBDbg << " name=" << d->tables.at(bindToTable)->name()
<< " alias=" << tableAlias(bindToTable) << endl;
- QString s;
+ TQString s;
for (uint i=0; i<fieldCount();i++)
- s+= (QString::number(d->tablesBoundToColumns[i]) + " ");
+ s+= (TQString::number(d->tablesBoundToColumns[i]) + " ");
KexiDBDbg << "tablesBoundToColumns == [" << s << "]" <<endl;
if (field->isExpression())
@@ -763,7 +763,7 @@ FieldList& QuerySchema::addAsterisk(QueryAsterisk *asterisk, bool visible)
return *this;
//make unique name
asterisk->m_name = (asterisk->table() ? asterisk->table()->name() + ".*" : "*")
- + QString::number(asterisks()->count());
+ + TQString::number(asterisks()->count());
return addField(asterisk, visible);
}
@@ -773,19 +773,19 @@ Connection* QuerySchema::connection() const
return mt ? mt->connection() : 0;
}
-QString QuerySchema::debugString()
+TQString QuerySchema::debugString()
{
- QString dbg;
+ TQString dbg;
dbg.reserve(1024);
//fields
TableSchema *mt = masterTable();
- dbg = QString("QUERY ") + schemaDataDebugString() + "\n"
+ dbg = TQString("TQUERY ") + schemaDataDebugString() + "\n"
+ "-masterTable=" + (mt ? mt->name() :"<NULL>")
+ "\n-COLUMNS:\n"
+ ((fieldCount()>0) ? FieldList::debugString() : "<NONE>") + "\n"
+ "-FIELDS EXPANDED ";
- QString dbg1;
+ TQString dbg1;
uint fieldsExpandedCount = 0;
if (fieldCount()>0) {
QueryColumnInfo::Vector fe( fieldsExpanded() );
@@ -801,7 +801,7 @@ QString QuerySchema::debugString()
else {
dbg1 = "<NONE>\n";
}
- dbg1.prepend( QString("(%1):\n").arg(fieldsExpandedCount) );
+ dbg1.prepend( TQString("(%1):\n").tqarg(fieldsExpandedCount) );
dbg += dbg1;
//it's safer to delete fieldsExpanded for now
@@ -809,15 +809,15 @@ QString QuerySchema::debugString()
//causes a crash d->clearCachedData();
//bindings
- QString dbg2;
+ TQString dbg2;
dbg2.reserve(512);
for (uint i = 0; i<fieldCount(); i++) {
int tablePos = tableBoundToColumn(i);
if (tablePos>=0) {
- QCString tAlias = tableAlias(tablePos);
+ TQCString tAlias = tableAlias(tablePos);
if (!tAlias.isEmpty()) {
- dbg2 += (QString::fromLatin1(" field \"") + FieldList::field(i)->name()
- + "\" uses alias \"" + QString(tAlias) + "\" of table \""
+ dbg2 += (TQString::tqfromLatin1(" field \"") + FieldList::field(i)->name()
+ + "\" uses alias \"" + TQString(tAlias) + "\" of table \""
+ d->tables.at(tablePos)->name() + "\"\n");
}
}
@@ -829,50 +829,50 @@ QString QuerySchema::debugString()
//tables
TableSchema *table;
- QString table_names;
+ TQString table_names;
table_names.reserve(512);
for ( table = d->tables.first(); table; table = d->tables.next() ) {
if (!table_names.isEmpty())
table_names += ", ";
- table_names += (QString("'") + table->name() + "'");
+ table_names += (TQString("'") + table->name() + "'");
}
if (d->tables.isEmpty())
table_names = "<NONE>";
- dbg += (QString("-TABLES:\n") + table_names);
- QString aliases;
+ dbg += (TQString("-TABLES:\n") + table_names);
+ TQString aliases;
if (!d->hasColumnAliases())
aliases = "<NONE>\n";
else {
Field::ListIterator it( m_fields );
for (int i=0; it.current(); ++it, i++) {
- QCString *alias = d->columnAlias(i);
+ TQCString *alias = d->columnAlias(i);
if (alias)
- aliases += (QString("field #%1: ").arg(i)
+ aliases += (TQString("field #%1: ").tqarg(i)
+ (it.current()->name().isEmpty() ? "<noname>" : it.current()->name())
+ " -> " + (const char*)*alias + "\n");
}
}
//aliases
- dbg += QString("\n-COLUMN ALIASES:\n" + aliases);
+ dbg += TQString("\n-COLUMN ALIASES:\n" + aliases);
if (d->tableAliases.isEmpty())
aliases = "<NONE>";
else {
aliases = "";
TableSchema::ListIterator t_it(d->tables);
for (int i=0; t_it.current(); ++t_it, i++) {
- QCString *alias = d->tableAliases[i];
+ TQCString *alias = d->tableAliases[i];
if (alias)
- aliases += (QString("table #%1: ").arg(i)
+ aliases += (TQString("table #%1: ").tqarg(i)
+ (t_it.current()->name().isEmpty() ? "<noname>" : t_it.current()->name())
+ " -> " + (const char*)*alias + "\n");
}
}
- dbg += QString("-TABLE ALIASES:\n" + aliases);
- QString where = d->whereExpr ? d->whereExpr->debugString() : QString::null;
+ dbg += TQString("-TABLE ALIASES:\n" + aliases);
+ TQString where = d->whereExpr ? d->whereExpr->debugString() : TQString();
if (!where.isEmpty())
- dbg += (QString("\n-WHERE EXPRESSION:\n") + where);
+ dbg += (TQString("\n-WHERE EXPRESSION:\n") + where);
if (!orderByColumnList().isEmpty())
- dbg += (QString("\n-ORDER BY (%1):\n").arg(orderByColumnList().count())
+ dbg += (TQString("\n-ORDER BY (%1):\n").tqarg(orderByColumnList().count())
+ orderByColumnList().debugString());
return dbg;
}
@@ -886,7 +886,7 @@ TableSchema* QuerySchema::masterTable() const
//try to find master table if there's only one table (with possible aliasses)
int num = 0;
- QString tableNameLower;
+ TQString tableNameLower;
for (TableSchema::ListIterator it(d->tables); it.current(); ++it, num++) {
if (!tableNameLower.isEmpty() && it.current()->name().lower()!=tableNameLower) {
//two or more different tables
@@ -908,7 +908,7 @@ TableSchema::List* QuerySchema::tables() const
return &d->tables;
}
-void QuerySchema::addTable(TableSchema *table, const QCString& alias)
+void QuerySchema::addTable(TableSchema *table, const TQCString& alias)
{
KexiDBDbg << "QuerySchema::addTable() " << (void *)table
<< " alias=" << alias << endl;
@@ -918,13 +918,13 @@ void QuerySchema::addTable(TableSchema *table, const QCString& alias)
//only append table if:
//-it has alias
//-it has no alias but there is no such table on the list
- if (alias.isEmpty() && d->tables.findRef(table)!=-1) {
- const QString& tableNameLower = table->name().lower();
- const QString& aliasLower = QString(alias.lower());
+ if (alias.isEmpty() && d->tables.tqfindRef(table)!=-1) {
+ const TQString& tableNameLower = table->name().lower();
+ const TQString& aliasLower = TQString(alias.lower());
int num = 0;
for (TableSchema::ListIterator it(d->tables); it.current(); ++it, num++) {
if (it.current()->name().lower()==tableNameLower) {
- const QString& tAlias = tableAlias(num);
+ const TQString& tAlias = tableAlias(num);
if (tAlias == aliasLower) {
KexiDBWarn << "QuerySchema::addTable(): table with \""
<< tAlias << "\" alias already added!" << endl;
@@ -950,7 +950,7 @@ void QuerySchema::removeTable(TableSchema *table)
//todo: remove fields!
}
-TableSchema* QuerySchema::table(const QString& tableName) const
+TableSchema* QuerySchema::table(const TQString& tableName) const
{
//TODO: maybe use tables_byname?
for (TableSchema::ListIterator it(d->tables); it.current(); ++it) {
@@ -960,14 +960,14 @@ TableSchema* QuerySchema::table(const QString& tableName) const
return 0;
}
-bool QuerySchema::contains(TableSchema *table) const
+bool QuerySchema::tqcontains(TableSchema *table) const
{
- return d->tables.findRef(table)!=-1;
+ return d->tables.tqfindRef(table)!=-1;
}
-Field* QuerySchema::findTableField(const QString &tableOrTableAndFieldName) const
+Field* QuerySchema::findTableField(const TQString &tableOrTableAndFieldName) const
{
- QString tableName, fieldName;
+ TQString tableName, fieldName;
if (!KexiDB::splitToTableAndFieldParts(tableOrTableAndFieldName,
tableName, fieldName, KexiDB::SetFieldNameIfNoTableName)) {
return 0;
@@ -985,10 +985,10 @@ Field* QuerySchema::findTableField(const QString &tableOrTableAndFieldName) cons
return tableSchema->field(fieldName);
}
-QCString QuerySchema::columnAlias(uint position) const
+TQCString QuerySchema::columnAlias(uint position) const
{
- QCString *a = d->columnAlias(position);
- return a ? *a : QCString();
+ TQCString *a = d->columnAlias(position);
+ return a ? *a : TQCString();
}
bool QuerySchema::hasColumnAlias(uint position) const
@@ -996,14 +996,14 @@ bool QuerySchema::hasColumnAlias(uint position) const
return d->columnAlias(position)!=0;
}
-void QuerySchema::setColumnAlias(uint position, const QCString& alias)
+void QuerySchema::setColumnAlias(uint position, const TQCString& alias)
{
if (position >= m_fields.count()) {
KexiDBWarn << "QuerySchema::setColumnAlias(): position (" << position
<< ") out of range!" << endl;
return;
}
- QCString fixedAlias = alias.stripWhiteSpace();
+ TQCString fixedAlias = alias.stripWhiteSpace();
Field *f = FieldList::field(position);
if (f->captionOrName().isEmpty() && fixedAlias.isEmpty()) {
KexiDBWarn << "QuerySchema::setColumnAlias(): position (" << position
@@ -1013,13 +1013,13 @@ void QuerySchema::setColumnAlias(uint position, const QCString& alias)
d->setColumnAlias(position, fixedAlias);
}
-QCString QuerySchema::tableAlias(uint position) const
+TQCString QuerySchema::tableAlias(uint position) const
{
- QCString *a = d->tableAliases[position];
- return a ? *a : QCString();
+ TQCString *a = d->tableAliases[position];
+ return a ? *a : TQCString();
}
-int QuerySchema::tablePositionForAlias(const QCString& name) const
+int QuerySchema::tablePositionForAlias(const TQCString& name) const
{
int *num = d->tablePositionsForAliases[name];
if (!num)
@@ -1027,7 +1027,7 @@ int QuerySchema::tablePositionForAlias(const QCString& name) const
return *num;
}
-int QuerySchema::tablePosition(const QString& tableName) const
+int QuerySchema::tablePosition(const TQString& tableName) const
{
int num = 0;
for (TableSchema::ListIterator it(d->tables); it.current(); ++it, num++) {
@@ -1037,11 +1037,11 @@ int QuerySchema::tablePosition(const QString& tableName) const
return -1;
}
-QValueList<int> QuerySchema::tablePositions(const QString& tableName) const
+TQValueList<int> QuerySchema::tablePositions(const TQString& tableName) const
{
int num = 0;
- QValueList<int> result;
- const QString& tableNameLower = tableName.lower();
+ TQValueList<int> result;
+ const TQString& tableNameLower = tableName.lower();
for (TableSchema::ListIterator it(d->tables); it.current(); ++it, num++) {
if (it.current()->name().lower()==tableNameLower) {
result += num;
@@ -1055,7 +1055,7 @@ bool QuerySchema::hasTableAlias(uint position) const
return d->tableAliases[position]!=0;
}
-int QuerySchema::columnPositionForAlias(const QCString& name) const
+int QuerySchema::columnPositionForAlias(const TQCString& name) const
{
int *num = d->columnPositionsForAliases[name];
if (!num)
@@ -1063,16 +1063,16 @@ int QuerySchema::columnPositionForAlias(const QCString& name) const
return *num;
}
-void QuerySchema::setTableAlias(uint position, const QCString& alias)
+void QuerySchema::setTableAlias(uint position, const TQCString& alias)
{
if (position >= d->tables.count()) {
KexiDBWarn << "QuerySchema::setTableAlias(): position (" << position
<< ") out of range!" << endl;
return;
}
- QCString fixedAlias = alias.stripWhiteSpace();
+ TQCString fixedAlias = alias.stripWhiteSpace();
if (fixedAlias.isEmpty()) {
- QCString *oldAlias = d->tableAliases.take(position);
+ TQCString *oldAlias = d->tableAliases.take(position);
if (oldAlias) {
d->tablePositionsForAliases.remove(*oldAlias);
delete oldAlias;
@@ -1080,9 +1080,9 @@ void QuerySchema::setTableAlias(uint position, const QCString& alias)
// d->maxIndexWithTableAlias = -1;
}
else {
- d->tableAliases.replace(position, new QCString(fixedAlias));
- d->tablePositionsForAliases.replace(fixedAlias, new int(position));
-// d->maxIndexWithTableAlias = QMAX( d->maxIndexWithTableAlias, (int)index );
+ d->tableAliases.tqreplace(position, new TQCString(fixedAlias));
+ d->tablePositionsForAliases.tqreplace(fixedAlias, new int(position));
+// d->maxIndexWithTableAlias = TQMAX( d->maxIndexWithTableAlias, (int)index );
}
}
@@ -1096,23 +1096,23 @@ Field::List* QuerySchema::asterisks() const
return &d->asterisks;
}
-QString QuerySchema::statement() const
+TQString QuerySchema::statement() const
{
return d->statement;
}
-void QuerySchema::setStatement(const QString &s)
+void QuerySchema::setStatement(const TQString &s)
{
d->statement = s;
}
-Field* QuerySchema::field(const QString& identifier, bool expanded)
+Field* QuerySchema::field(const TQString& identifier, bool expanded)
{
QueryColumnInfo *ci = columnInfo(identifier, expanded);
return ci ? ci->field : 0;
}
-QueryColumnInfo* QuerySchema::columnInfo(const QString& identifier, bool expanded)
+QueryColumnInfo* QuerySchema::columnInfo(const TQString& identifier, bool expanded)
{
computeFieldsExpanded();
return expanded ? d->columnInfosByNameExpanded[identifier] : d->columnInfosByName[identifier];
@@ -1144,7 +1144,7 @@ QueryColumnInfo::Vector QuerySchema::fieldsExpanded(FieldsExpandedOptions option
if (options == WithInternalFieldsAndRowID) {
if (!d->fakeRowIDField) {
d->fakeRowIDField = new Field("rowID", Field::BigInteger);
- d->fakeRowIDCol = new QueryColumnInfo(d->fakeRowIDField, QCString(), true);
+ d->fakeRowIDCol = new QueryColumnInfo(d->fakeRowIDField, TQCString(), true);
}
tmpFieldsExpandedWithInternal->insert(
fieldsExpandedVectorSize + internalFieldsCount, d->fakeRowIDCol );
@@ -1157,14 +1157,14 @@ QueryColumnInfo::Vector QuerySchema::fieldsExpanded(FieldsExpandedOptions option
return *d->fieldsExpanded;
//options == Unique:
- QDict<char> columnsAlreadyFound;
+ TQDict<char> columnsAlreadyFound;
QueryColumnInfo::Vector result( d->fieldsExpanded->count() ); //initial size is set
-// QMapConstIterator<QueryColumnInfo*, bool> columnsAlreadyFoundIt;
+// TQMapConstIterator<QueryColumnInfo*, bool> columnsAlreadyFoundIt;
//compute unique list
uint uniqueListCount = 0;
for (uint i=0; i<d->fieldsExpanded->count(); i++) {
QueryColumnInfo *ci = (*d->fieldsExpanded)[i];
-// columnsAlreadyFoundIt = columnsAlreadyFound.find(ci);
+// columnsAlreadyFoundIt = columnsAlreadyFound.tqfind(ci);
// uint foundColumnIndex = -1;
if (!columnsAlreadyFound[ci->aliasOrName()]) {// columnsAlreadyFoundIt==columnsAlreadyFound.constEnd())
columnsAlreadyFound.insert(ci->aliasOrName(), (char*)1);
@@ -1187,9 +1187,9 @@ QueryColumnInfo* QuerySchema::expandedOrInternalField(uint index)
return (index < vector.size()) ? vector[index] : 0;
}
-inline QString lookupColumnKey(Field *foreignField, Field* field)
+inline TQString lookupColumnKey(Field *foreignField, Field* field)
{
- QString res;
+ TQString res;
if (field->table()) // can be 0 for anonymous fields built as joined multiple visible columns
res = field->table()->name() + ".";
return res + field->name() + "_" + foreignField->table()->name() + "." + foreignField->name();
@@ -1201,8 +1201,8 @@ void QuerySchema::computeFieldsExpanded()
return;
if (!d->columnsOrder) {
- d->columnsOrder = new QMap<QueryColumnInfo*,int>();
- d->columnsOrderWithoutAsterisks = new QMap<QueryColumnInfo*,int>();
+ d->columnsOrder = new TQMap<QueryColumnInfo*,int>();
+ d->columnsOrderWithoutAsterisks = new TQMap<QueryColumnInfo*,int>();
}
else {
d->columnsOrder->clear();
@@ -1214,7 +1214,7 @@ void QuerySchema::computeFieldsExpanded()
//collect all fields in a list (not a vector yet, because we do not know its size)
QueryColumnInfo::List list; //temporary
QueryColumnInfo::List lookup_list; //temporary, for collecting additional fields related to lookup fields
- QMap<QueryColumnInfo*, bool> columnInfosOutsideAsterisks; //helper for filling d->columnInfosByName
+ TQMap<QueryColumnInfo*, bool> columnInfosOutsideAsterisks; //helper for filling d->columnInfosByName
uint i = 0;
uint fieldPosition = 0;
uint numberOfColumnsWithMultipleVisibleFields = 0; //used to find an unique name for anonymous field
@@ -1225,7 +1225,7 @@ void QuerySchema::computeFieldsExpanded()
Field::List *ast_fields = static_cast<QueryAsterisk*>(f)->table()->fields();
for (Field *ast_f = ast_fields->first(); ast_f; ast_f=ast_fields->next()) {
// d->detailedVisibility += isFieldVisible(fieldPosition);
- QueryColumnInfo *ci = new QueryColumnInfo(ast_f, QCString()/*no field for asterisk!*/,
+ QueryColumnInfo *ci = new QueryColumnInfo(ast_f, TQCString()/*no field for asterisk!*/,
isColumnVisible(fieldPosition));
list.append( ci );
KexiDBDbg << "QuerySchema::computeFieldsExpanded(): caching (unexpanded) columns order: "
@@ -1242,7 +1242,7 @@ void QuerySchema::computeFieldsExpanded()
//! \todo (js): perhaps not all fields should be appended here
// d->detailedVisibility += isFieldVisible(fieldPosition);
// list.append(tab_f);
- QueryColumnInfo *ci = new QueryColumnInfo(tab_f, QCString()/*no field for asterisk!*/,
+ QueryColumnInfo *ci = new QueryColumnInfo(tab_f, TQCString()/*no field for asterisk!*/,
isColumnVisible(fieldPosition));
list.append( ci );
KexiDBDbg << "QuerySchema::computeFieldsExpanded(): caching (unexpanded) columns order: "
@@ -1291,10 +1291,10 @@ void QuerySchema::computeFieldsExpanded()
// (the expression object will be owned by column info)
visibleColumn = new Field();
visibleColumn->setName(
- QString::fromLatin1("[multiple_visible_fields_%1]")
- .arg( ++numberOfColumnsWithMultipleVisibleFields ));
+ TQString::tqfromLatin1("[multiple_visible_fields_%1]")
+ .tqarg( ++numberOfColumnsWithMultipleVisibleFields ));
visibleColumn->setExpression(
- new ConstExpr(CHARACTER_STRING_LITERAL, QVariant()/*not important*/));
+ new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/));
if (!d->ownedVisibleColumns) {
d->ownedVisibleColumns = new Field::List();
d->ownedVisibleColumns->setAutoDelete(true);
@@ -1303,14 +1303,14 @@ void QuerySchema::computeFieldsExpanded()
}
lookup_list.append(
- new QueryColumnInfo(visibleColumn, QCString(), true/*visible*/, ci/*foreign*/) );
+ new QueryColumnInfo(visibleColumn, TQCString(), true/*visible*/, ci/*foreign*/) );
/*
//add visibleField to the list of SELECTed fields if it is not yes present there
if (!findTableField( visibleField->table()->name()+"."+visibleField->name() )) {
if (!table( visibleField->table()->name() )) {
}
if (!sql.isEmpty())
- sql += QString::fromLatin1(", ");
+ sql += TQString::tqfromLatin1(", ");
sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "."
+ escapeIdentifier(visibleField->name(), drvEscaping));
}*/
@@ -1330,10 +1330,10 @@ void QuerySchema::computeFieldsExpanded()
Field *boundField = boundColumnInfo->field;
if (!boundField)
continue;
- const QValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
+ const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
bool ok = true;
// all indices in visibleColumns should be in [0..lookupQueryFieldsExpanded.size()-1]
- foreach (QValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) {
+ foreach (TQValueList<uint>::ConstIterator, visibleColumnsIt, visibleColumns) {
if ((*visibleColumnsIt) >= lookupQueryFieldsExpanded.count()) {
ok = false;
break;
@@ -1351,10 +1351,10 @@ void QuerySchema::computeFieldsExpanded()
// (the expression object will be owned by column info)
visibleColumn = new Field();
visibleColumn->setName(
- QString::fromLatin1("[multiple_visible_fields_%1]")
- .arg( ++numberOfColumnsWithMultipleVisibleFields ));
+ TQString::tqfromLatin1("[multiple_visible_fields_%1]")
+ .tqarg( ++numberOfColumnsWithMultipleVisibleFields ));
visibleColumn->setExpression(
- new ConstExpr(CHARACTER_STRING_LITERAL, QVariant()/*not important*/));
+ new ConstExpr(CHARACTER_STRING_LITERAL, TQVariant()/*not important*/));
if (!d->ownedVisibleColumns) {
d->ownedVisibleColumns = new Field::List();
d->ownedVisibleColumns->setAutoDelete(true);
@@ -1363,14 +1363,14 @@ void QuerySchema::computeFieldsExpanded()
}
lookup_list.append(
- new QueryColumnInfo(visibleColumn, QCString(), true/*visible*/, ci/*foreign*/) );
+ new QueryColumnInfo(visibleColumn, TQCString(), true/*visible*/, ci/*foreign*/) );
/*
//add visibleField to the list of SELECTed fields if it is not yes present there
if (!findTableField( visibleField->table()->name()+"."+visibleField->name() )) {
if (!table( visibleField->table()->name() )) {
}
if (!sql.isEmpty())
- sql += QString::fromLatin1(", ");
+ sql += TQString::tqfromLatin1(", ");
sql += (escapeIdentifier(visibleField->table()->name(), drvEscaping) + "."
+ escapeIdentifier(visibleField->name(), drvEscaping));
}*/
@@ -1381,7 +1381,7 @@ void QuerySchema::computeFieldsExpanded()
if (!d->fieldsExpanded) {
d->fieldsExpanded = new QueryColumnInfo::Vector( list.count() );// Field::Vector( list.count() );
d->fieldsExpanded->setAutoDelete(true);
- d->columnsOrderExpanded = new QMap<QueryColumnInfo*,int>();
+ d->columnsOrderExpanded = new TQMap<QueryColumnInfo*,int>();
}
else {//for future:
d->fieldsExpanded->clear();
@@ -1406,13 +1406,13 @@ void QuerySchema::computeFieldsExpanded()
//store alias and table.alias
if (!d->columnInfosByNameExpanded[ ci->alias ])
d->columnInfosByNameExpanded.insert( ci->alias, ci );
- QString tableAndAlias( ci->alias );
+ TQString tableAndAlias( ci->alias );
if (ci->field->table())
tableAndAlias.prepend(ci->field->table()->name() + ".");
if (!d->columnInfosByNameExpanded[ tableAndAlias ])
d->columnInfosByNameExpanded.insert( tableAndAlias, ci );
//the same for "unexpanded" list
- if (columnInfosOutsideAsterisks.contains(ci)) {
+ if (columnInfosOutsideAsterisks.tqcontains(ci)) {
if (!d->columnInfosByName[ ci->alias ])
d->columnInfosByName.insert( ci->alias, ci );
if (!d->columnInfosByName[ tableAndAlias ])
@@ -1423,13 +1423,13 @@ void QuerySchema::computeFieldsExpanded()
//no alias: store name and table.name
if (!d->columnInfosByNameExpanded[ ci->field->name() ])
d->columnInfosByNameExpanded.insert( ci->field->name(), ci );
- QString tableAndName( ci->field->name() );
+ TQString tableAndName( ci->field->name() );
if (ci->field->table())
tableAndName.prepend(ci->field->table()->name() + ".");
if (!d->columnInfosByNameExpanded[ tableAndName ])
d->columnInfosByNameExpanded.insert( tableAndName, ci );
//the same for "unexpanded" list
- if (columnInfosOutsideAsterisks.contains(ci)) {
+ if (columnInfosOutsideAsterisks.tqcontains(ci)) {
if (!d->columnInfosByName[ ci->field->name() ])
d->columnInfosByName.insert( ci->field->name(), ci );
if (!d->columnInfosByName[ tableAndName ])
@@ -1439,13 +1439,13 @@ void QuerySchema::computeFieldsExpanded()
}
//remove duplicates for lookup fields
- QDict<uint> lookup_dict(101); //used to fight duplicates and to update QueryColumnInfo::indexForVisibleLookupValue()
+ TQDict<uint> lookup_dict(101); //used to fight duplicates and to update QueryColumnInfo::indexForVisibleLookupValue()
// (a mapping from table.name string to uint* lookupFieldIndex
lookup_dict.setAutoDelete(true);
i=0;
for (QueryColumnInfo::ListIterator it(lookup_list); (ci = it.current());)
{
- const QString key( lookupColumnKey(ci->foreignColumn()->field, ci->field) );
+ const TQString key( lookupColumnKey(ci->foreignColumn()->field, ci->field) );
if ( /* not needed columnInfo( tableAndFieldName ) || */
lookup_dict[ key ]) {
// this table.field is already fetched by this query
@@ -1453,7 +1453,7 @@ void QuerySchema::computeFieldsExpanded()
lookup_list.removeRef( ci );
}
else {
- lookup_dict.replace( key, new uint( i ) );
+ lookup_dict.tqreplace( key, new uint( i ) );
++it;
i++;
}
@@ -1502,15 +1502,15 @@ void QuerySchema::computeFieldsExpanded()
if (visibleColumns->fieldCount() == 1)
{
visibleColumn = visibleColumns->fields()->first();
- const QString key( lookupColumnKey(ci->field, visibleColumn) );
+ const TQString key( lookupColumnKey(ci->field, visibleColumn) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
}
else {
- const QString key( QString::fromLatin1("[multiple_visible_fields_%1]_%2.%3")
- .arg( ++numberOfColumnsWithMultipleVisibleFields )
- .arg(ci->field->table()->name()).arg(ci->field->name()) );
+ const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3")
+ .tqarg( ++numberOfColumnsWithMultipleVisibleFields )
+ .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
@@ -1531,20 +1531,20 @@ void QuerySchema::computeFieldsExpanded()
Field *boundField = boundColumnInfo->field;
if (!boundField)
continue;
- const QValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
+ const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
Field *visibleColumn = 0;
// for single visible column, just add it as-is
if (visibleColumns.count() == 1) {
visibleColumn = lookupQueryFieldsExpanded[ visibleColumns.first() ]->field;
- const QString key( lookupColumnKey(ci->field, visibleColumn) );
+ const TQString key( lookupColumnKey(ci->field, visibleColumn) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
}
else {
- const QString key( QString::fromLatin1("[multiple_visible_fields_%1]_%2.%3")
- .arg( ++numberOfColumnsWithMultipleVisibleFields )
- .arg(ci->field->table()->name()).arg(ci->field->name()) );
+ const TQString key( TQString::tqfromLatin1("[multiple_visible_fields_%1]_%2.%3")
+ .tqarg( ++numberOfColumnsWithMultipleVisibleFields )
+ .tqarg(ci->field->table()->name()).tqarg(ci->field->name()) );
uint *index = lookup_dict[ key ];
if (index)
ci->setIndexForVisibleLookupValue( d->fieldsExpanded->size() + *index );
@@ -1557,7 +1557,7 @@ void QuerySchema::computeFieldsExpanded()
}
}
-QMap<QueryColumnInfo*,int> QuerySchema::columnsOrder(ColumnsOrderOptions options)
+TQMap<QueryColumnInfo*,int> QuerySchema::columnsOrder(ColumnsOrderOptions options)
{
if (!d->columnsOrder)
computeFieldsExpanded();
@@ -1568,20 +1568,20 @@ QMap<QueryColumnInfo*,int> QuerySchema::columnsOrder(ColumnsOrderOptions options
return *d->columnsOrderExpanded;
}
-QValueVector<int> QuerySchema::pkeyFieldsOrder()
+TQValueVector<int> QuerySchema::pkeyFieldsOrder()
{
if (d->pkeyFieldsOrder)
return *d->pkeyFieldsOrder;
TableSchema *tbl = masterTable();
if (!tbl || !tbl->primaryKey())
- return QValueVector<int>();
+ return TQValueVector<int>();
//get order of PKEY fields (e.g. for rows updating or inserting )
IndexSchema *pkey = tbl->primaryKey();
pkey->debug();
debug();
- d->pkeyFieldsOrder = new QValueVector<int>( pkey->fieldCount(), -1 );
+ d->pkeyFieldsOrder = new TQValueVector<int>( pkey->fieldCount(), -1 );
const uint fCount = fieldsExpanded().count();
d->pkeyFieldsCount = 0;
@@ -1600,7 +1600,7 @@ QValueVector<int> QuerySchema::pkeyFieldsOrder()
}
}
KexiDBDbg << "QuerySchema::pkeyFieldsOrder(): " << d->pkeyFieldsCount
- << " OUT OF " << pkey->fieldCount() << " PKEY'S FIELDS FOUND IN QUERY " << name() << endl;
+ << " OUT OF " << pkey->fieldCount() << " PKEY'S FIELDS FOUND IN TQUERY " << name() << endl;
return *d->pkeyFieldsOrder;
}
@@ -1645,11 +1645,11 @@ QueryColumnInfo::List* QuerySchema::autoIncrementFields()
return d->autoincFields;
}
-QString QuerySchema::sqlColumnsList(QueryColumnInfo::List* infolist, Driver *driver)
+TQString QuerySchema::sqlColumnsList(QueryColumnInfo::List* infolist, Driver *driver)
{
if (!infolist)
- return QString::null;
- QString result;
+ return TQString();
+ TQString result;
result.reserve(256);
QueryColumnInfo::ListIterator it( *infolist );
bool start = true;
@@ -1663,7 +1663,7 @@ QString QuerySchema::sqlColumnsList(QueryColumnInfo::List* infolist, Driver *dri
return result;
}
-QString QuerySchema::autoIncrementSQLFieldsList(Driver *driver)
+TQString QuerySchema::autoIncrementSQLFieldsList(Driver *driver)
{
if ((Driver *)d->lastUsedDriverForAutoIncrementSQLFieldsList != driver
|| d->autoIncrementSQLFieldsList.isEmpty())
@@ -1680,7 +1680,7 @@ void QuerySchema::setWhereExpression(BaseExpr *expr)
d->whereExpr = expr;
}
-void QuerySchema::addToWhereExpression(KexiDB::Field *field, const QVariant& value, int relation)
+void QuerySchema::addToWhereExpression(KexiDB::Field *field, const TQVariant& value, int relation)
{
int token;
if (value.isNull())
@@ -1700,7 +1700,7 @@ void QuerySchema::addToWhereExpression(KexiDB::Field *field, const QVariant& val
KexiDBExpr_Relational,
new ConstExpr( token, value ),
relation,
- new VariableExpr((field->table() ? (field->table()->name()+".") : QString::null)+field->name())
+ new VariableExpr((field->table() ? (field->table()->name()+".") : TQString())+field->name())
);
if (d->whereExpr) {
d->whereExpr = new BinaryExpr(
@@ -1716,7 +1716,7 @@ void QuerySchema::addToWhereExpression(KexiDB::Field *field, const QVariant& val
}
/*
-void QuerySchema::addToWhereExpression(KexiDB::Field *field, const QVariant& value)
+void QuerySchema::addToWhereExpression(KexiDB::Field *field, const TQVariant& value)
switch (value.type()) {
case Int: case UInt: case Bool: case LongLong: case ULongLong:
token = INTEGER_CONST;
@@ -1837,13 +1837,13 @@ void QueryAsterisk::setTable(TableSchema *table)
m_table=table;
}
-QString QueryAsterisk::debugString() const
+TQString QueryAsterisk::debugString() const
{
- QString dbg;
+ TQString dbg;
if (isAllTableAsterisk()) {
dbg += "ALL-TABLES ASTERISK (*) ON TABLES(";
TableSchema *table;
- QString table_names;
+ TQString table_names;
for (TableSchema::ListIterator it( *query()->tables() ); (table = it.current()); ++it) {
if (!table_names.isEmpty())
table_names += ", ";
diff --git a/kexi/kexidb/queryschema.h b/kexi/kexidb/queryschema.h
index 76dfa757b..a68acffe7 100644
--- a/kexi/kexidb/queryschema.h
+++ b/kexi/kexidb/queryschema.h
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIDB_QUERY_H
-#define KEXIDB_QUERY_H
+#ifndef KEXIDB_TQUERY_H
+#define KEXIDB_TQUERY_H
-#include <qvaluevector.h>
-#include <qstring.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
#include "fieldlist.h"
#include "schemadata.h"
@@ -36,7 +36,7 @@ class Connection;
class QueryAsterisk;
class QuerySchemaPrivate;
class QuerySchemaParameter;
-typedef QValueList<QuerySchemaParameter> QuerySchemaParameterList;
+typedef TQValueList<QuerySchemaParameter> QuerySchemaParameterList;
//! @short Helper class that assigns additional information for the column in a query
/*! The following information is assigned:
@@ -48,25 +48,25 @@ typedef QValueList<QuerySchemaParameter> QuerySchemaParameterList;
class KEXI_DB_EXPORT QueryColumnInfo
{
public:
- typedef QPtrVector<QueryColumnInfo> Vector;
- typedef QPtrList<QueryColumnInfo> List;
- typedef QPtrListIterator<QueryColumnInfo> ListIterator;
+ typedef TQPtrVector<QueryColumnInfo> Vector;
+ typedef TQPtrList<QueryColumnInfo> List;
+ typedef TQPtrListIterator<QueryColumnInfo> ListIterator;
- QueryColumnInfo(Field *f, const QCString& _alias, bool _visible, QueryColumnInfo *foreignColumn = 0);
+ QueryColumnInfo(Field *f, const TQCString& _alias, bool _visible, QueryColumnInfo *foreignColumn = 0);
~QueryColumnInfo();
//! \return alias if it is not empty, field's name otherwise.
- inline QCString aliasOrName() const {
+ inline TQCString aliasOrName() const {
return alias.isEmpty() ? field->name().latin1() : (const char*)alias;
}
//! \return field's caption if it is not empty, field's alias otherwise.
//! If alias is also empty - returns field's name.
- inline QString captionOrAliasOrName() const {
- return field->caption().isEmpty() ? QString(aliasOrName()) : field->caption(); }
+ inline TQString captionOrAliasOrName() const {
+ return field->caption().isEmpty() ? TQString(aliasOrName()) : field->caption(); }
Field *field;
- QCString alias;
+ TQCString alias;
/*! \return index of column with visible lookup value within the 'fields expanded' vector.
-1 means no visible lookup value is available because there is no lookup for the column defined.
@@ -81,7 +81,7 @@ class KEXI_DB_EXPORT QueryColumnInfo
QueryColumnInfo *foreignColumn() const { return m_foreignColumn; }
/*! \return string for debugging purposes. */
- QString debugString() const;
+ TQString debugString() const;
//! true if this column is visible to the user (and its data is fetched by the engine)
bool visible : 1;
@@ -100,7 +100,7 @@ class KEXI_DB_EXPORT QueryColumnInfo
class KEXI_DB_EXPORT OrderByColumn
{
public:
- typedef QValueListConstIterator<OrderByColumn> ListConstIterator;
+ typedef TQValueListConstIterator<OrderByColumn> ListConstIterator;
OrderByColumn();
OrderByColumn(QueryColumnInfo& column, bool ascending = true, int pos = -1);
@@ -130,13 +130,13 @@ class KEXI_DB_EXPORT OrderByColumn
&& m_ascending==col.m_ascending; }
/*! \return string for debugging purposes. */
- QString debugString() const;
+ TQString debugString() const;
/*! \return a string like "name ASC" usable for building a SQL statement.
If \a includeTableNames is true (the default) field is output in a form
of "tablename.fieldname" (but only if fieldname is not a name of alias).
\a drv and \a identifierEscaping are used for escaping the table and field identifiers. */
- QString toSQLString(bool includeTableName = true,
+ TQString toSQLString(bool includeTableName = true,
Driver *drv = 0, int identifierEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary) const;
protected:
@@ -152,7 +152,7 @@ class KEXI_DB_EXPORT OrderByColumn
};
//! A base for KexiDB::OrderByColumnList
-typedef QValueList<OrderByColumn> OrderByColumnListBase;
+typedef TQValueList<OrderByColumn> OrderByColumnListBase;
//! @short KexiDB::OrderByColumnList provides list of sorted columns for a query schema
class KEXI_DB_EXPORT OrderByColumnList : protected OrderByColumnListBase
@@ -168,11 +168,11 @@ class KEXI_DB_EXPORT OrderByColumnList : protected OrderByColumnListBase
\return false if there is at least one name for which a field or alias name does not exist
(all the newly appended fields are removed in this case) */
bool appendFields(QuerySchema& querySchema,
- const QString& field1, bool ascending1 = true,
- const QString& field2 = QString::null, bool ascending2 = true,
- const QString& field3 = QString::null, bool ascending3 = true,
- const QString& field4 = QString::null, bool ascending4 = true,
- const QString& field5 = QString::null, bool ascending5 = true);
+ const TQString& field1, bool ascending1 = true,
+ const TQString& field2 = TQString(), bool ascending2 = true,
+ const TQString& field3 = TQString(), bool ascending3 = true,
+ const TQString& field4 = TQString(), bool ascending4 = true,
+ const TQString& field5 = TQString(), bool ascending5 = true);
/*! Appends column \a columnInfo. Ascending sorting is set is \a ascending is true. */
void appendColumn(QueryColumnInfo& columnInfo, bool ascending = true);
@@ -185,7 +185,7 @@ class KEXI_DB_EXPORT OrderByColumnList : protected OrderByColumnListBase
/*! Appends field with a name \a field. Ascending sorting is set is \a ascending is true.
\return true on successful appending, and false if there is no such field or alias
name in the \a querySchema. */
- bool appendField(QuerySchema& querySchema, const QString& fieldName,
+ bool appendField(QuerySchema& querySchema, const TQString& fieldName,
bool ascending = true);
/*! Appends a column that is at position \a pos (counted from 0).
@@ -208,13 +208,13 @@ class KEXI_DB_EXPORT OrderByColumnList : protected OrderByColumnListBase
const_iterator constEnd () const { return OrderByColumnListBase::constEnd(); }
/*! \return string for debugging purposes. */
- QString debugString() const;
+ TQString debugString() const;
/*! \return a string like "name ASC, 2 DESC" usable for building a SQL statement.
If \a includeTableNames is true (the default) fields are output in a form
of "tablename.fieldname".
\a drv and \a identifierEscaping are used for escaping the table and field identifiers. */
- QString toSQLString(bool includeTableNames = true,
+ TQString toSQLString(bool includeTableNames = true,
Driver *drv = 0, int identifierEscaping = Driver::EscapeDriver|Driver::EscapeAsNecessary) const;
};
@@ -318,7 +318,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
virtual void clear();
/*! \return string for debugging purposes. */
- virtual QString debugString();
+ virtual TQString debugString();
/*! If query was created using a connection,
returns this connection object, otherwise NULL. */
@@ -352,19 +352,19 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
if \a alias is not empty, it will be assigned to this table
using setTableAlias(position, alias)
*/
- void addTable(TableSchema *table, const QCString& alias = QCString());
+ void addTable(TableSchema *table, const TQCString& alias = TQCString());
/*! Removes \a table schema from this query.
This does not destroy \a table object but only takes it out of the list.
If this table was master for the query, master table information is also
- invalidated. */
+ tqinvalidated. */
void removeTable(TableSchema *table);
/*! \return table with name \a tableName or 0 if this query has no such table. */
- TableSchema* table(const QString& tableName) const;
+ TableSchema* table(const TQString& tableName) const;
/*! \return true if the query uses \a table. */
- bool contains(TableSchema *table) const;
+ bool tqcontains(TableSchema *table) const;
/*! Convenience function.
\return table field by searching through all tables in this query.
@@ -384,7 +384,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
@see KexiDB::splitToTableAndFieldParts()
*/
- Field* findTableField(const QString &tableOrTableAndFieldName) const;
+ Field* findTableField(const TQString &tableOrTableAndFieldName) const;
/*! \return alias of a column at \a position or null string
If there is no alias for this column
@@ -392,7 +392,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
If the column is an expression and has no alias defined,
a new unique alias will be generated automatically on this call.
*/
- QCString columnAlias(uint position) const;
+ TQCString columnAlias(uint position) const;
/*! Provided for convenience.
\return true if a column at \a position has non empty alias defined
@@ -403,7 +403,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
/*! Sets \a alias for a column at \a position, within the query.
Passing empty string to \a alias clears alias for a given column. */
- void setColumnAlias(uint position, const QCString& alias);
+ void setColumnAlias(uint position, const TQCString& alias);
/*! \return a table position (within FROM section),
that is bound to column at \a columnPosition (within SELECT section).
@@ -431,7 +431,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
/*! \return alias of a table at \a position (within FROM section)
or null string if there is no alias for this table
or if there is no such table within the query defined. */
- QCString tableAlias(uint position) const;
+ TQCString tableAlias(uint position) const;
/*! \return table position (within FROM section) that has attached
alias \a name.
@@ -444,13 +444,13 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
e.g. "SELECT 1 from table1 t, table2 t" is ok
but "SELECT t.id from table1 t, table2 t" is not.
*/
- int tablePositionForAlias(const QCString& name) const;
+ int tablePositionForAlias(const TQCString& name) const;
/*! \return table position (within FROM section) for \a tableName.
-1 is returend if there's no such table declared in the FROM section.
\sa tablePositions()
*/
- int tablePosition(const QString& tableName) const;
+ int tablePosition(const TQString& tableName) const;
/*! \return a list of all \a tableName table occurrences (within FROM section).
E.g. for "SELECT * FROM table t, table t2" [0, 1] list is returned.
@@ -458,7 +458,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
in the FROM section at all.
\sa tablePosition()
*/
- QValueList<int> tablePositions(const QString& tableName) const;
+ TQValueList<int> tablePositions(const TQString& tableName) const;
/*! Provided for convenience.
\return true if a table at \a position (within FROM section of the the query)
@@ -469,13 +469,13 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
/*! \return column position that has defined alias \a name.
If there is no such alias, -1 is returned. */
- int columnPositionForAlias(const QCString& name) const;
+ int columnPositionForAlias(const TQCString& name) const;
/*! Sets \a alias for a table at \a position (within FROM section
of the the query).
Passing empty sting to \a alias clears alias for a given table
(only for specified \a position). */
- void setTableAlias(uint position, const QCString& alias);
+ void setTableAlias(uint position, const TQCString& alias);
/*! \return a list of relationships defined for this query */
Relationship::List* relationships() const;
@@ -516,12 +516,12 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
will return the same pointer.
- Calling field("T.A") will return the same pointer as field("A").
*/
- virtual Field* field(const QString& name, bool expanded = true);
+ virtual Field* field(const TQString& name, bool expanded = true);
/*! \return field id or NULL if there is no such a field. */
inline Field* field(uint id) { return FieldList::field(id); }
- /*! Like QuerySchema::field(const QString& name) but returns not only Field
+ /*! Like QuerySchema::field(const TQString& name) but returns not only Field
object for \a identifier but entire QueryColumnInfo object.
\a identifier can be:
- a fieldname
@@ -533,7 +533,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
calling columnInfo("name") for "SELECT t1.name, t2.name FROM t1, t2" statement
will only return the column related to t1.name and not t2.name, so you'll need to
explicitly specify "t2.name" as the identifier to get the second column. */
- QueryColumnInfo* columnInfo(const QString& identifier, bool expanded = true);
+ QueryColumnInfo* columnInfo(const TQString& identifier, bool expanded = true);
/*! Options used in fieldsExpanded(). */
enum FieldsExpandedOptions {
@@ -632,7 +632,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
- columnsOrder(UnexpandedListWithoutAsterisks) will return the following map:
QueryColumnInfo(id)->0,
*/
- QMap<QueryColumnInfo*,int> columnsOrder(ColumnsOrderOptions options = ExpandedList);
+ TQMap<QueryColumnInfo*,int> columnsOrder(ColumnsOrderOptions options = ExpandedList);
/*! \return table describing order of primary key (PKEY) fields within the query.
Indexing is performed against vector returned by fieldsExpanded().
@@ -656,7 +656,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
@see example for pkeyFieldsCount().
@todo js: UPDATE CACHE!
*/
- QValueVector<int> pkeyFieldsOrder();
+ TQValueVector<int> pkeyFieldsOrder();
/*! \return number of master table's primary key fields included in this query.
This method is useful to quickly check whether the vector returned by pkeyFieldsOrder()
@@ -685,26 +685,26 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
QueryColumnInfo::List* autoIncrementFields();
/*! \return a preset statement (if any). */
- QString statement() const;
+ TQString statement() const;
/*! Forces a query statement (i.e. no statement is composed from QuerySchema's content) */
- void setStatement(const QString &s);
+ void setStatement(const TQString &s);
/*! \return a string that is a result of concatenating all column names
for \a infolist, with "," between each one.
This is usable e.g. as argument like "field1,field2"
for "INSERT INTO (xxx) ..". The result of this method is effectively cached,
- and it is invalidated when set of fields changes (e.g. using clear()
+ and it is tqinvalidated when set of fields changes (e.g. using clear()
or addField()).
This method is similar to FieldList::sqlFieldsList() it just uses
QueryColumnInfo::List instead of Field::List.
*/
- static QString sqlColumnsList(QueryColumnInfo::List* infolist, Driver *driver);
+ static TQString sqlColumnsList(QueryColumnInfo::List* infolist, Driver *driver);
/*! \return cached sql list created using sqlColumnsList() on a list returned
by autoIncrementFields(). */
- QString autoIncrementSQLFieldsList(Driver *driver);
+ TQString autoIncrementSQLFieldsList(Driver *driver);
/*! Sets a WHERE expression \a exp. It will be owned by this query,
so you can forget about it. Previously set WHERE expression will be deleted.
@@ -717,7 +717,7 @@ class KEXI_DB_EXPORT QuerySchema : public FieldList, public SchemaData
/*! Adds a part to WHERE expression.
Simplifies creating of WHERE expression, if used instead
of setWhereExpression(BaseExpr *expr). */
- void addToWhereExpression(KexiDB::Field *field, const QVariant& value, int relation = '=');
+ void addToWhereExpression(KexiDB::Field *field, const TQVariant& value, int relation = '=');
/*! Sets a list of columns for ORDER BY section of the query.
Each name on the list must be a field or alias present within the query
@@ -815,7 +815,7 @@ class KEXI_DB_EXPORT QueryAsterisk : public Field
bool isAllTableAsterisk() const { return m_table==NULL; }
/*! \return String for debugging purposes. */
- virtual QString debugString() const;
+ virtual TQString debugString() const;
protected:
//! \return a deep copy of this object. Used in FieldList(const FieldList& fl).
diff --git a/kexi/kexidb/queryschemaparameter.cpp b/kexi/kexidb/queryschemaparameter.cpp
index 3703de247..4cead9627 100644
--- a/kexi/kexidb/queryschemaparameter.cpp
+++ b/kexi/kexidb/queryschemaparameter.cpp
@@ -21,7 +21,7 @@
#include "driver.h"
#include <kdebug.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
using namespace KexiDB;
@@ -34,14 +34,14 @@ QuerySchemaParameter::~QuerySchemaParameter()
{
}
-QString QuerySchemaParameter::debugString() const
+TQString QuerySchemaParameter::debugString() const
{
- return QString("msg=\"%1\" type=\"%2\"").arg(Field::typeName(type)).arg(message);
+ return TQString("msg=\"%1\" type=\"%2\"").tqarg(Field::typeName(type)).tqarg(message);
}
void KexiDB::debug(const QuerySchemaParameterList& list)
{
- KexiDBDbg << QString("Query parameters (%1):").arg(list.count()) << endl;
+ KexiDBDbg << TQString("Query parameters (%1):").tqarg(list.count()) << endl;
foreach(QuerySchemaParameterListConstIterator, it, list)
KexiDBDbg << " - " << (*it).debugString() << endl;
}
@@ -51,7 +51,7 @@ void KexiDB::debug(const QuerySchemaParameterList& list)
class QuerySchemaParameterValueListIterator::Private
{
public:
- Private(const Driver& aDriver, const QValueList<QVariant>& aParams)
+ Private(const Driver& aDriver, const TQValueList<TQVariant>& aParams)
: driver(&aDriver)
, params(aParams)
{
@@ -59,14 +59,14 @@ class QuerySchemaParameterValueListIterator::Private
paramsIt = params.fromLast(); //constBegin();
paramsItPosition = params.count();
}
- QGuardedPtr<const Driver> driver;
- const QValueList<QVariant> params;
- QValueList<QVariant>::ConstIterator paramsIt;
+ TQGuardedPtr<const Driver> driver;
+ const TQValueList<TQVariant> params;
+ TQValueList<TQVariant>::ConstIterator paramsIt;
uint paramsItPosition;
};
QuerySchemaParameterValueListIterator::QuerySchemaParameterValueListIterator(
- const Driver& driver, const QValueList<QVariant>& params)
+ const Driver& driver, const TQValueList<TQVariant>& params)
: d( new Private(driver, params) )
{
}
@@ -76,26 +76,26 @@ QuerySchemaParameterValueListIterator::~QuerySchemaParameterValueListIterator()
delete d;
}
-QVariant QuerySchemaParameterValueListIterator::getPreviousValue()
+TQVariant QuerySchemaParameterValueListIterator::getPreviousValue()
{
if (d->paramsItPosition == 0) { //d->params.constEnd()) {
KexiDBWarn << "QuerySchemaParameterValues::getPreviousValue() no prev value" << endl;
- return QVariant();
+ return TQVariant();
}
- QVariant res( *d->paramsIt );
+ TQVariant res( *d->paramsIt );
--d->paramsItPosition;
--d->paramsIt;
// ++d->paramsIt;
return res;
}
-QString QuerySchemaParameterValueListIterator::getPreviousValueAsString(Field::Type type)
+TQString QuerySchemaParameterValueListIterator::getPreviousValueAsString(Field::Type type)
{
if (d->paramsItPosition == 0) { //d->params.constEnd()) {
KexiDBWarn << "QuerySchemaParameterValues::getPreviousValueAsString() no prev value" << endl;
- return d->driver->valueToSQL(type, QVariant()); //"NULL"
+ return d->driver->valueToSQL(type, TQVariant()); //"NULL"
}
- QString res( d->driver->valueToSQL(type, *d->paramsIt) );
+ TQString res( d->driver->valueToSQL(type, *d->paramsIt) );
--d->paramsItPosition;
--d->paramsIt;
// ++d->paramsIt;
diff --git a/kexi/kexidb/queryschemaparameter.h b/kexi/kexidb/queryschemaparameter.h
index e7c008805..96168719e 100644
--- a/kexi/kexidb/queryschemaparameter.h
+++ b/kexi/kexidb/queryschemaparameter.h
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIDB_QUERYSCHEMAPARAMETER_H
-#define KEXIDB_QUERYSCHEMAPARAMETER_H
+#ifndef KEXIDB_TQUERYSCHEMAPARAMETER_H
+#define KEXIDB_TQUERYSCHEMAPARAMETER_H
#include "queryschema.h"
@@ -32,33 +32,33 @@ class KEXI_DB_EXPORT QuerySchemaParameter
QuerySchemaParameter();
~QuerySchemaParameter();
- QString debugString() const;
+ TQString debugString() const;
Field::Type type; //!< A datatype of the parameter
- QString message; //!< A user-visible message that will be displayed to ask for value of the parameter
+ TQString message; //!< A user-visible message that will be displayed to ask for value of the parameter
};
-typedef QValueList<QuerySchemaParameter> QuerySchemaParameterList;
-typedef QValueList<QuerySchemaParameter>::Iterator QuerySchemaParameterListIterator;
-typedef QValueList<QuerySchemaParameter>::ConstIterator QuerySchemaParameterListConstIterator;
+typedef TQValueList<QuerySchemaParameter> QuerySchemaParameterList;
+typedef TQValueList<QuerySchemaParameter>::Iterator QuerySchemaParameterListIterator;
+typedef TQValueList<QuerySchemaParameter>::ConstIterator QuerySchemaParameterListConstIterator;
//! Shows debug information for \a list
KEXI_DB_EXPORT void debug(const QuerySchemaParameterList& list);
//! @short An iteratof for a list of values of query schema parameters providing
-//! Allows to iterate over parameters and return QVariant value or well-formatted string.
+//! Allows to iterate over parameters and return TQVariant value or well-formatted string.
//! The iterator is initially set to the last item because of the parser requirements
class KEXI_DB_EXPORT QuerySchemaParameterValueListIterator
{
public:
- QuerySchemaParameterValueListIterator(const Driver& driver, const QValueList<QVariant>& params);
+ QuerySchemaParameterValueListIterator(const Driver& driver, const TQValueList<TQVariant>& params);
~QuerySchemaParameterValueListIterator();
//! \return previous value
- QVariant getPreviousValue();
+ TQVariant getPreviousValue();
//! \return previous value as string formatted using driver's escaping
- QString getPreviousValueAsString(Field::Type type);
+ TQString getPreviousValueAsString(Field::Type type);
protected:
class Private;
Private * const d;
diff --git a/kexi/kexidb/record.h b/kexi/kexidb/record.h
index 29f3d6702..b2b0906bc 100644
--- a/kexi/kexidb/record.h
+++ b/kexi/kexidb/record.h
@@ -20,8 +20,8 @@
#ifndef KEXIDB_RECORD_H
#define KEXIDB_RECORD_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kexidb/field.h>
@@ -32,37 +32,37 @@ namespace KexiDB {
class KEXI_DB_EXPORT Record {
public:
- Record(const QString & name);
+ Record(const TQString & name);
//TODO.............
Table();
~Table();
- const QString& name() const;
- void setName(const QString& name);
+ const TQString& name() const;
+ void setName(const TQString& name);
unsigned int fieldCount() const;
KexiDB::Field field(unsigned int id) const;
- QStringList primaryKeys() const;
+ TQStringList primaryKeys() const;
bool hasPrimaryKeys() const;
//js void addField(KexiDB::Field field);
-//js void addPrimaryKey(const QString& key);
+//js void addPrimaryKey(const TQString& key);
private:
-//js QStringList m_primaryKeys;
- QValueList<Field> m_fields;
- QString m_name;
+//js TQStringList m_primaryKeys;
+ TQValueList<Field> m_fields;
+ TQString m_name;
Connection* m_conn;
};
/*
-class KexiDBTableFields: public QValueList<KexiDBField> {
+class KexiDBTableFields: public TQValueList<KexiDBField> {
public:
- KexiDBTable(const QString & name);
+ KexiDBTable(const TQString & name);
~KexiDBTable();
void addField(KexiDBField);
-// const QString& tableName() const;
+// const TQString& tableName() const;
private:
-// QString m_tableName;
+// TQString m_tableName;
};
*/
diff --git a/kexi/kexidb/relationship.cpp b/kexi/kexidb/relationship.cpp
index a7796207b..bcb6ec898 100644
--- a/kexi/kexidb/relationship.cpp
+++ b/kexi/kexidb/relationship.cpp
@@ -80,7 +80,7 @@ void Relationship::createIndices( QuerySchema *query, Field *field1, Field *fiel
return;
}
// if (!query->hasField(field1) && !query->hasField(field2)) {
- if (!query->contains(field1->table()) || !query->contains(field2->table())) {
+ if (!query->tqcontains(field1->table()) || !query->tqcontains(field2->table())) {
KexiDBWarn << "Relationship::addRelationship(): fields do not belong to this query" << endl;
return;
}
diff --git a/kexi/kexidb/relationship.h b/kexi/kexidb/relationship.h
index b72c72094..827835e1e 100644
--- a/kexi/kexidb/relationship.h
+++ b/kexi/kexidb/relationship.h
@@ -77,8 +77,8 @@ class QuerySchema;
class KEXI_DB_EXPORT Relationship
{
public:
- typedef QPtrList<Relationship> List;
- typedef QPtrListIterator<Relationship> ListIterator;
+ typedef TQPtrList<Relationship> List;
+ typedef TQPtrListIterator<Relationship> ListIterator;
/*! Creates uninitialized Relationship object.
setIndices() will be required to call.
diff --git a/kexi/kexidb/roweditbuffer.cpp b/kexi/kexidb/roweditbuffer.cpp
index 7b5b57110..ba1bb7d58 100644
--- a/kexi/kexidb/roweditbuffer.cpp
+++ b/kexi/kexidb/roweditbuffer.cpp
@@ -30,8 +30,8 @@ RowEditBuffer::RowEditBuffer(bool dbAwareBuffer)
, m_simpleBufferIt(dbAwareBuffer ? 0 : new SimpleMap::ConstIterator())
, m_dbBuffer(dbAwareBuffer ? new DBMap() : 0)
, m_dbBufferIt(dbAwareBuffer ? new DBMap::Iterator() : 0)
-, m_defaultValuesDbBuffer(dbAwareBuffer ? new QMap<QueryColumnInfo*,bool>() : 0)
-, m_defaultValuesDbBufferIt(dbAwareBuffer ? new QMap<QueryColumnInfo*,bool>::ConstIterator() : 0)
+, m_defaultValuesDbBuffer(dbAwareBuffer ? new TQMap<QueryColumnInfo*,bool>() : 0)
+, m_defaultValuesDbBufferIt(dbAwareBuffer ? new TQMap<QueryColumnInfo*,bool>::ConstIterator() : 0)
{
}
@@ -44,14 +44,14 @@ RowEditBuffer::~RowEditBuffer()
delete m_dbBufferIt;
}
-const QVariant* RowEditBuffer::at( QueryColumnInfo& ci, bool useDefaultValueIfPossible ) const
+const TQVariant* RowEditBuffer::at( QueryColumnInfo& ci, bool useDefaultValueIfPossible ) const
{
if (!m_dbBuffer) {
KexiDBWarn << "RowEditBuffer::at(QueryColumnInfo&): not db-aware buffer!" << endl;
return 0;
}
- *m_dbBufferIt = m_dbBuffer->find( &ci );
- QVariant* result = 0;
+ *m_dbBufferIt = m_dbBuffer->tqfind( &ci );
+ TQVariant* result = 0;
if (*m_dbBufferIt!=m_dbBuffer->end())
result = &(*m_dbBufferIt).data();
if ( useDefaultValueIfPossible
@@ -65,28 +65,28 @@ const QVariant* RowEditBuffer::at( QueryColumnInfo& ci, bool useDefaultValueIfPo
result = &(*m_dbBuffer)[ &ci ];
m_defaultValuesDbBuffer->insert(&ci, true);
}
- return (const QVariant*)result;
+ return (const TQVariant*)result;
}
-const QVariant* RowEditBuffer::at( Field& f ) const
+const TQVariant* RowEditBuffer::at( Field& f ) const
{
if (!m_simpleBuffer) {
KexiDBWarn << "RowEditBuffer::at(Field&): this is db-aware buffer!" << endl;
return 0;
}
- *m_simpleBufferIt = m_simpleBuffer->find( f.name() );
+ *m_simpleBufferIt = m_simpleBuffer->tqfind( f.name() );
if (*m_simpleBufferIt==m_simpleBuffer->constEnd())
return 0;
return &(*m_simpleBufferIt).data();
}
-const QVariant* RowEditBuffer::at( const QString& fname ) const
+const TQVariant* RowEditBuffer::at( const TQString& fname ) const
{
if (!m_simpleBuffer) {
KexiDBWarn << "RowEditBuffer::at(Field&): this is db-aware buffer!" << endl;
return 0;
}
- *m_simpleBufferIt = m_simpleBuffer->find( fname );
+ *m_simpleBufferIt = m_simpleBuffer->tqfind( fname );
if (*m_simpleBufferIt==m_simpleBuffer->constEnd())
return 0;
return &(*m_simpleBufferIt).data();
@@ -116,7 +116,7 @@ void RowEditBuffer::debug()
KexiDBDbg << "RowEditBuffer type=DB-AWARE, " << m_dbBuffer->count() <<" items"<< endl;
for (DBMap::ConstIterator it = m_dbBuffer->constBegin(); it!=m_dbBuffer->constEnd(); ++it) {
KexiDBDbg << "* field name=" <<it.key()->field->name()<<" val="
- << (it.data().isNull() ? QString("<NULL>") : it.data().toString())
+ << (it.data().isNull() ? TQString("<NULL>") : it.data().toString())
<< (hasDefaultValueAt(*it.key()) ? " DEFAULT" : "") <<endl;
}
return;
@@ -124,6 +124,6 @@ void RowEditBuffer::debug()
KexiDBDbg << "RowEditBuffer type=SIMPLE, " << m_simpleBuffer->count() <<" items"<< endl;
for (SimpleMap::ConstIterator it = m_simpleBuffer->constBegin(); it!=m_simpleBuffer->constEnd(); ++it) {
KexiDBDbg << "* field name=" <<it.key()<<" val="
- << (it.data().isNull() ? QString("<NULL>") : it.data().toString()) <<endl;
+ << (it.data().isNull() ? TQString("<NULL>") : it.data().toString()) <<endl;
}
}
diff --git a/kexi/kexidb/roweditbuffer.h b/kexi/kexidb/roweditbuffer.h
index edf482065..438e525eb 100644
--- a/kexi/kexidb/roweditbuffer.h
+++ b/kexi/kexidb/roweditbuffer.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_ROWEDITBUFFER_H
#define KEXIDB_ROWEDITBUFFER_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kexidb/field.h>
#include <kexidb/queryschema.h>
@@ -64,17 +64,17 @@ namespace KexiDB {
// KexiDB::Connection::updateRow(), KexiDB::Connection::insertRow()
</code>
- You can use QMap::clear() to clear buffer contents,
- QMap::isEmpty() to see if buffer is empty.
- For more, see QMap documentation.
+ You can use TQMap::clear() to clear buffer contents,
+ TQMap::isEmpty() to see if buffer is empty.
+ For more, see TQMap documentation.
Notes: added fields should come from the same (common) QuerySchema object.
- However, this isn't checked at QValue& EditBuffer::operator[]( const Field& f ) level.
+ However, this isn't checked at TQValue& EditBuffer::operator[]( const Field& f ) level.
*/
class KEXI_DB_EXPORT RowEditBuffer {
public:
- typedef QMap<QString,QVariant> SimpleMap;
- typedef QMap<QueryColumnInfo*,QVariant> DBMap;
+ typedef TQMap<TQString,TQVariant> SimpleMap;
+ typedef TQMap<QueryColumnInfo*,TQVariant> DBMap;
RowEditBuffer(bool dbAwareBuffer);
~RowEditBuffer();
@@ -86,7 +86,7 @@ public:
bool isEmpty() const;
//! Inserts value \a val for db-aware buffer's column \a ci
- inline void insert( QueryColumnInfo& ci, QVariant &val ) {
+ inline void insert( QueryColumnInfo& ci, TQVariant &val ) {
if (m_dbBuffer) {
m_dbBuffer->insert(&ci, val);
m_defaultValuesDbBuffer->remove(&ci);
@@ -94,7 +94,7 @@ public:
}
//! Inserts value \a val for not-db-aware buffer's column \a fname
- inline void insert( const QString& fname, QVariant &val )
+ inline void insert( const TQString& fname, TQVariant &val )
{ if (m_simpleBuffer) m_simpleBuffer->insert(fname,val); }
/*! Useful only for db-aware buffer. \return value for column \a ci
@@ -102,18 +102,18 @@ public:
default value obtained from \a ci if \a useDefaultValueIfPossible is true.
Note that if the column is declared as unique (especially: primary key),
default value will not be used. */
- const QVariant* at( QueryColumnInfo& ci, bool useDefaultValueIfPossible = true ) const;
+ const TQVariant* at( QueryColumnInfo& ci, bool useDefaultValueIfPossible = true ) const;
//! Useful only for not-db-aware buffer. \return value for field \a f
- const QVariant* at( Field& f ) const;
+ const TQVariant* at( Field& f ) const;
//! Useful only for not-db-aware buffer. \return value for field \a fname
- const QVariant* at( const QString& fname ) const;
+ const TQVariant* at( const TQString& fname ) const;
//! Useful only for db-aware buffer: \return true if the value available as
//! at( ci ) is obtained from column's default value
inline bool hasDefaultValueAt( QueryColumnInfo& ci ) const {
- return m_defaultValuesDbBuffer->contains(&ci) && (*m_defaultValuesDbBuffer)[ &ci ];
+ return m_defaultValuesDbBuffer->tqcontains(&ci) && (*m_defaultValuesDbBuffer)[ &ci ];
}
inline const SimpleMap simpleBuffer() { return *m_simpleBuffer; }
@@ -127,8 +127,8 @@ protected:
SimpleMap::ConstIterator *m_simpleBufferIt;
DBMap *m_dbBuffer;
DBMap::Iterator *m_dbBufferIt;
- QMap<QueryColumnInfo*,bool> *m_defaultValuesDbBuffer;
- QMap<QueryColumnInfo*,bool>::ConstIterator *m_defaultValuesDbBufferIt;
+ TQMap<QueryColumnInfo*,bool> *m_defaultValuesDbBuffer;
+ TQMap<QueryColumnInfo*,bool>::ConstIterator *m_defaultValuesDbBufferIt;
};
} //namespace KexiDB
diff --git a/kexi/kexidb/schemadata.cpp b/kexi/kexidb/schemadata.cpp
index 0a0c2124a..9b6913499 100644
--- a/kexi/kexidb/schemadata.cpp
+++ b/kexi/kexidb/schemadata.cpp
@@ -38,18 +38,18 @@ SchemaData::~SchemaData()
void SchemaData::clear()
{
m_id = -1;
- m_name = QString::null;
- m_caption = QString::null;
- m_desc = QString::null;
+ m_name = TQString();
+ m_caption = TQString();
+ m_desc = TQString();
}
-QString SchemaData::schemaDataDebugString() const
+TQString SchemaData::schemaDataDebugString() const
{
- QString desc = m_desc;
+ TQString desc = m_desc;
if (desc.length()>40) {
desc.truncate(40);
desc+="...";
}
- return QString("id=%1 name='%2' caption='%3' desc='%4'")
- .arg(m_id).arg(m_name).arg(m_caption).arg(desc);
+ return TQString("id=%1 name='%2' caption='%3' desc='%4'")
+ .tqarg(m_id).tqarg(m_name).tqarg(m_caption).tqarg(desc);
}
diff --git a/kexi/kexidb/schemadata.h b/kexi/kexidb/schemadata.h
index 615f8602e..ec9a27df6 100644
--- a/kexi/kexidb/schemadata.h
+++ b/kexi/kexidb/schemadata.h
@@ -20,8 +20,8 @@
#ifndef KEXIDB_SCHEMADATA_H
#define KEXIDB_SCHEMADATA_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
#include <kexidb/global.h>
#include <kexidb/field.h>
@@ -41,17 +41,17 @@ class KEXI_DB_EXPORT SchemaData
int type() const { return m_type; }
int id() const { return m_id; }
- QString name() const { return m_name; }
- /*! The same as name(). Added to avoid conflict with QObject::name() */
- QString objectName() const { return m_name; }
- void setName(const QString& n) { m_name=n; }
- QString caption() const { return m_caption; }
- void setCaption(const QString& c) { m_caption=c; }
- QString description() const { return m_desc; }
- void setDescription(const QString& desc) { m_desc=desc; }
+ TQString name() const { return m_name; }
+ /*! The same as name(). Added to avoid conflict with TQObject::name() */
+ TQString objectName() const { return m_name; }
+ void setName(const TQString& n) { m_name=n; }
+ TQString caption() const { return m_caption; }
+ void setCaption(const TQString& c) { m_caption=c; }
+ TQString description() const { return m_desc; }
+ void setDescription(const TQString& desc) { m_desc=desc; }
/*! \return debug string useful for debugging */
- virtual QString schemaDataDebugString() const;
+ virtual TQString schemaDataDebugString() const;
/*! \return true if this is schema of native database object,
like, for example like, native table. This flag
@@ -79,9 +79,9 @@ class KEXI_DB_EXPORT SchemaData
int m_type;
int m_id;
- QString m_name;
- QString m_caption;
- QString m_desc;
+ TQString m_name;
+ TQString m_caption;
+ TQString m_desc;
bool m_native : 1;
friend class Connection;
diff --git a/kexi/kexidb/simplecommandlineapp.cpp b/kexi/kexidb/simplecommandlineapp.cpp
index ec73cde24..904469bca 100644
--- a/kexi/kexidb/simplecommandlineapp.cpp
+++ b/kexi/kexidb/simplecommandlineapp.cpp
@@ -19,7 +19,7 @@
#include "simplecommandlineapp.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kcmdlineargs.h>
#include <kdebug.h>
@@ -74,7 +74,7 @@ public:
KCmdLineOptions *allOptions;
KInstance* instance;
ConnectionData connData;
- QGuardedPtr<Connection> conn;
+ TQGuardedPtr<Connection> conn;
};
//-----------------------------------------
@@ -88,8 +88,8 @@ SimpleCommandLineApp::SimpleCommandLineApp(
: Object()
, d( new Private() )
{
- QFileInfo fi(argv[0]);
- QCString appName( fi.baseName().latin1() );
+ TQFileInfo fi(argv[0]);
+ TQCString appName( fi.baseName().latin1() );
KCmdLineArgs::init(argc, argv,
new KAboutData( appName, programName,
version, shortDescription, licenseType, copyrightStatement, text,
@@ -135,14 +135,14 @@ SimpleCommandLineApp::SimpleCommandLineApp(
d->connData.useLocalSocketFile = args->isSet("local-socket");
if (args->isSet("password")) {
- QString userAtHost = d->connData.userName;
+ TQString userAtHost = d->connData.userName;
if (!d->connData.userName.isEmpty())
userAtHost += "@";
userAtHost += (d->connData.hostName.isEmpty() ? "localhost" : d->connData.hostName);
- QTextStream cout(stdout,IO_WriteOnly);
- cout << i18n("Enter password for %1: ").arg(userAtHost);
+ TQTextStream cout(stdout,IO_WriteOnly);
+ cout << i18n("Enter password for %1: ").tqarg(userAtHost);
//! @todo make use of pty/tty here! (and care about portability)
- QTextStream cin(stdin,IO_ReadOnly);
+ TQTextStream cin(stdin,IO_ReadOnly);
cin >> d->connData.password;
KexiDBDbg << d->connData.password << endl;
}
@@ -154,7 +154,7 @@ SimpleCommandLineApp::~SimpleCommandLineApp()
delete d;
}
-bool SimpleCommandLineApp::openDatabase(const QString& databaseName)
+bool SimpleCommandLineApp::openDatabase(const TQString& databaseName)
{
if (!d->conn) {
if (d->manager.error()) {
diff --git a/kexi/kexidb/simplecommandlineapp.h b/kexi/kexidb/simplecommandlineapp.h
index 13d1f1158..c14a35ea1 100644
--- a/kexi/kexidb/simplecommandlineapp.h
+++ b/kexi/kexidb/simplecommandlineapp.h
@@ -63,7 +63,7 @@ namespace KexiDB
In details: the database driver is loaded, the connection is opened
and the database is used.
Use KexiDB::Object methods to get status of the operation on failure. */
- bool openDatabase(const QString& databaseName);
+ bool openDatabase(const TQString& databaseName);
/*! Closes database connection previously opened using openDatabase()
\return true on success. This method is called on destruction.
diff --git a/kexi/kexidb/tableschema.cpp b/kexi/kexidb/tableschema.cpp
index 8c0f5e07c..b794f2730 100644
--- a/kexi/kexidb/tableschema.cpp
+++ b/kexi/kexidb/tableschema.cpp
@@ -43,7 +43,7 @@ public:
void clearLookupFields()
{
- for (QMap<const Field*, LookupFieldSchema*>::ConstIterator it = lookupFields.constBegin();
+ for (TQMap<const Field*, LookupFieldSchema*>::ConstIterator it = lookupFields.constBegin();
it!=lookupFields.constEnd(); ++it)
{
delete it.data();
@@ -52,8 +52,8 @@ public:
}
Field *anyNonPKField;
- QMap<const Field*, LookupFieldSchema*> lookupFields;
- QPtrVector<LookupFieldSchema> lookupFieldsList;
+ TQMap<const Field*, LookupFieldSchema*> lookupFields;
+ TQPtrVector<LookupFieldSchema> lookupFieldsList;
};
}
//-------------------------------------
@@ -61,7 +61,7 @@ public:
using namespace KexiDB;
-TableSchema::TableSchema(const QString& name)
+TableSchema::TableSchema(const TQString& name)
: FieldList(true)
, SchemaData(KexiDB::TableObjectType)
, m_query(0)
@@ -105,7 +105,7 @@ TableSchema::TableSchema(const TableSchema& ts, int setId)
}
// used by Connection
-TableSchema::TableSchema(Connection *conn, const QString & name)
+TableSchema::TableSchema(Connection *conn, const TQString & name)
: FieldList(true)
, SchemaData(KexiDB::TableObjectType)
, m_conn( conn )
@@ -278,12 +278,12 @@ void TableSchema::clear()
}
/*
-void TableSchema::addPrimaryKey(const QString& key)
+void TableSchema::addPrimaryKey(const TQString& key)
{
m_primaryKeys.append(key);
}*/
-/*QStringList TableSchema::primaryKeys() const
+/*TQStringList TableSchema::primaryKeys() const
{
return m_primaryKeys;
}
@@ -294,12 +294,12 @@ bool TableSchema::hasPrimaryKeys() const
}
*/
-//const QString& TableSchema::name() const
+//const TQString& TableSchema::name() const
//{
// return m_name;
//}
-//void TableSchema::setName(const QString& name)
+//void TableSchema::setName(const TQString& name)
//{
// m_name=name;
/* ListIterator it( m_fields );
@@ -323,23 +323,23 @@ unsigned int TableSchema::fieldCount() const
return m_fields.count();
}*/
-QString TableSchema::debugString()
+TQString TableSchema::debugString()
{
return debugString(true);
}
-QString TableSchema::debugString(bool includeTableName)
+TQString TableSchema::debugString(bool includeTableName)
{
- QString s;
+ TQString s;
if (includeTableName)
- s = QString("TABLE ") + schemaDataDebugString() + "\n";
+ s = TQString("TABLE ") + schemaDataDebugString() + "\n";
s.append( FieldList::debugString() );
Field *f;
for (Field::ListIterator it(m_fields); (f = it.current()); ++it) {
LookupFieldSchema *lookupSchema = lookupFieldSchema( *f );
if (lookupSchema)
- s.append( QString("\n") + lookupSchema->debugString() );
+ s.append( TQString("\n") + lookupSchema->debugString() );
}
return s;
}
@@ -374,7 +374,7 @@ Field* TableSchema::anyNonPKField()
if (!d->anyNonPKField) {
Field *f;
Field::ListIterator it(m_fields);
- it.toLast(); //from the end (higher chances to find)
+ it.toLast(); //from the end (higher chances to tqfind)
for (; (f = it.current()); --it) {
if (!f->isPrimaryKey() && (!m_pkey || !m_pkey->hasField(f)))
break;
@@ -384,7 +384,7 @@ Field* TableSchema::anyNonPKField()
return d->anyNonPKField;
}
-bool TableSchema::setLookupFieldSchema( const QString& fieldName, LookupFieldSchema *lookupFieldSchema )
+bool TableSchema::setLookupFieldSchema( const TQString& fieldName, LookupFieldSchema *lookupFieldSchema )
{
Field *f = field(fieldName);
if (!f) {
@@ -393,7 +393,7 @@ bool TableSchema::setLookupFieldSchema( const QString& fieldName, LookupFieldSch
return false;
}
if (lookupFieldSchema)
- d->lookupFields.replace( f, lookupFieldSchema );
+ d->lookupFields.tqreplace( f, lookupFieldSchema );
else {
delete d->lookupFields[f];
d->lookupFields.remove( f );
@@ -407,7 +407,7 @@ LookupFieldSchema *TableSchema::lookupFieldSchema( const Field& field ) const
return d->lookupFields[ &field ];
}
-LookupFieldSchema *TableSchema::lookupFieldSchema( const QString& fieldName )
+LookupFieldSchema *TableSchema::lookupFieldSchema( const TQString& fieldName )
{
Field *f = TableSchema::field(fieldName);
if (!f)
@@ -415,7 +415,7 @@ LookupFieldSchema *TableSchema::lookupFieldSchema( const QString& fieldName )
return lookupFieldSchema( *f );
}
-const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
+const TQPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
{
if (d->lookupFields.isEmpty())
return d->lookupFieldsList;
@@ -426,7 +426,7 @@ const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
d->lookupFieldsList.resize( d->lookupFields.count() );
uint i = 0;
for (Field::ListIterator it(m_fields); it.current(); ++it) {
- QMap<const Field*, LookupFieldSchema*>::ConstIterator itMap = d->lookupFields.find( it.current() );
+ TQMap<const Field*, LookupFieldSchema*>::ConstIterator itMap = d->lookupFields.tqfind( it.current() );
if (itMap != d->lookupFields.constEnd()) {
d->lookupFieldsList.insert( i, itMap.data() );
i++;
@@ -437,7 +437,7 @@ const QPtrVector<LookupFieldSchema>& TableSchema::lookupFieldsList()
//--------------------------------------
-InternalTableSchema::InternalTableSchema(const QString& name)
+InternalTableSchema::InternalTableSchema(const TQString& name)
: TableSchema(name)
{
}
diff --git a/kexi/kexidb/tableschema.h b/kexi/kexidb/tableschema.h
index 7584d7037..c2d382371 100644
--- a/kexi/kexidb/tableschema.h
+++ b/kexi/kexidb/tableschema.h
@@ -21,10 +21,10 @@
#ifndef KEXIDB_TABLE_H
#define KEXIDB_TABLE_H
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
#include <kexidb/fieldlist.h>
#include <kexidb/schemadata.h>
@@ -42,10 +42,10 @@ class LookupFieldSchema;
class KEXI_DB_EXPORT TableSchema : public FieldList, public SchemaData
{
public:
- typedef QPtrList<TableSchema> List; //!< Type of tables list
- typedef QPtrListIterator<TableSchema> ListIterator; //!< Iterator for tables list
+ typedef TQPtrList<TableSchema> List; //!< Type of tables list
+ typedef TQPtrListIterator<TableSchema> ListIterator; //!< Iterator for tables list
- TableSchema(const QString & name);
+ TableSchema(const TQString & name);
TableSchema(const SchemaData& sdata);
TableSchema();
@@ -99,10 +99,10 @@ class KEXI_DB_EXPORT TableSchema : public FieldList, public SchemaData
/*! \return String for debugging purposes, if \a includeTableName is true,
table name, caption, etc. is prepended, else only debug string for
the fields are returned. */
- QString debugString(bool includeTableName);
+ TQString debugString(bool includeTableName);
/*! \return String for debugging purposes. Equal to debugString(true). */
- virtual QString debugString();
+ virtual TQString debugString();
/*! \return connection object if table was created/retrieved using a connection,
otherwise 0. */
@@ -150,7 +150,7 @@ class KEXI_DB_EXPORT TableSchema : public FieldList, public SchemaData
Passing null \a lookupFieldSchema will remove the previously set lookup field.
\return true if \a lookupFieldSchema has been added,
or false if there is no such field \a fieldName. */
- bool setLookupFieldSchema( const QString& fieldName, LookupFieldSchema *lookupFieldSchema );
+ bool setLookupFieldSchema( const TQString& fieldName, LookupFieldSchema *lookupFieldSchema );
/*! \return lookup field schema for \a field.
0 is returned if there is no such field in the table or this field has no lookup schema.
@@ -160,19 +160,19 @@ class KEXI_DB_EXPORT TableSchema : public FieldList, public SchemaData
LookupFieldSchema *lookupFieldSchema( const Field& field ) const;
/*! \overload LookupFieldSchema *TableSchema::lookupFieldSchema( Field& field ) const */
- LookupFieldSchema *lookupFieldSchema( const QString& fieldName );
+ LookupFieldSchema *lookupFieldSchema( const TQString& fieldName );
/*! \return list of lookup field schemas for this table.
The order is the same as the order of fields within the table. */
- const QPtrVector<LookupFieldSchema>& lookupFieldsList();
+ const TQPtrVector<LookupFieldSchema>& lookupFieldsList();
protected:
/*! Automatically retrieves table schema via connection. */
- TableSchema(Connection *conn, const QString & name = QString::null);
+ TableSchema(Connection *conn, const TQString & name = TQString());
IndexSchema::List m_indices;
- QGuardedPtr<Connection> m_conn;
+ TQGuardedPtr<Connection> m_conn;
IndexSchema *m_pkey;
@@ -200,7 +200,7 @@ class KEXI_DB_EXPORT TableSchema : public FieldList, public SchemaData
class KEXI_DB_EXPORT InternalTableSchema : public TableSchema
{
public:
- InternalTableSchema(const QString& name);
+ InternalTableSchema(const TQString& name);
InternalTableSchema(const TableSchema& ts);
virtual ~InternalTableSchema();
};
diff --git a/kexi/kexidb/transaction.cpp b/kexi/kexidb/transaction.cpp
index c06074488..6d6e37f14 100644
--- a/kexi/kexidb/transaction.cpp
+++ b/kexi/kexidb/transaction.cpp
@@ -58,13 +58,13 @@ TransactionData::~TransactionData()
const Transaction Transaction::null;
Transaction::Transaction()
- : QObject(0,"kexidb_transaction")
+ : TQObject(0,"kexidb_transaction")
, m_data(0)
{
}
Transaction::Transaction( const Transaction& trans )
- : QObject(0,"kexidb_transaction")
+ : TQObject(0,"kexidb_transaction")
, m_data(trans.m_data)
{
if (m_data) {
diff --git a/kexi/kexidb/transaction.h b/kexi/kexidb/transaction.h
index 2ec065d90..bee90b263 100644
--- a/kexi/kexidb/transaction.h
+++ b/kexi/kexidb/transaction.h
@@ -20,7 +20,7 @@
#ifndef KEXIDB_TRANSACTION_H
#define KEXIDB_TRANSACTION_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kexidb/kexidb_export.h>
@@ -56,7 +56,7 @@ class KEXI_DB_EXPORT TransactionData
Transaction object is value-based, internal data (handle) structure,
reference-counted.
*/
-class KEXI_DB_EXPORT Transaction : public QObject
+class KEXI_DB_EXPORT Transaction : public TQObject
{
public:
/*! Constructs uninitialised (null) transaction.
diff --git a/kexi/kexidb/utils.cpp b/kexi/kexidb/utils.cpp
index 78b7e4162..a44f9c362 100644
--- a/kexi/kexidb/utils.cpp
+++ b/kexi/kexidb/utils.cpp
@@ -22,11 +22,11 @@
#include "drivermanager.h"
#include "lookupfieldschema.h"
-#include <qmap.h>
-#include <qthread.h>
-#include <qdom.h>
-#include <qintdict.h>
-#include <qbuffer.h>
+#include <tqmap.h>
+#include <tqthread.h>
+#include <tqdom.h>
+#include <tqintdict.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -42,10 +42,10 @@ using namespace KexiDB;
//! Cache
struct TypeCache
{
- QMap< uint, TypeGroupList > tlist;
- QMap< uint, QStringList > nlist;
- QMap< uint, QStringList > slist;
- QMap< uint, Field::Type > def_tlist;
+ TQMap< uint, TypeGroupList > tlist;
+ TQMap< uint, TQStringList > nlist;
+ TQMap< uint, TQStringList > slist;
+ TQMap< uint, Field::Type > def_tlist;
};
static KStaticDeleter<TypeCache> KexiDB_typeCacheDeleter;
@@ -58,8 +58,8 @@ static void initList()
for (uint t=0; t<=KexiDB::Field::LastType; t++) {
const uint tg = KexiDB::Field::typeGroup( t );
TypeGroupList list;
- QStringList name_list, str_list;
- if (KexiDB_typeCache->tlist.find( tg )!=KexiDB_typeCache->tlist.end()) {
+ TQStringList name_list, str_list;
+ if (KexiDB_typeCache->tlist.tqfind( tg )!=KexiDB_typeCache->tlist.end()) {
list = KexiDB_typeCache->tlist[ tg ];
name_list = KexiDB_typeCache->nlist[ tg ];
str_list = KexiDB_typeCache->slist[ tg ];
@@ -88,14 +88,14 @@ const TypeGroupList KexiDB::typesForGroup(KexiDB::Field::TypeGroup typeGroup)
return KexiDB_typeCache->tlist[ typeGroup ];
}
-QStringList KexiDB::typeNamesForGroup(KexiDB::Field::TypeGroup typeGroup)
+TQStringList KexiDB::typeNamesForGroup(KexiDB::Field::TypeGroup typeGroup)
{
if (!KexiDB_typeCache)
initList();
return KexiDB_typeCache->nlist[ typeGroup ];
}
-QStringList KexiDB::typeStringsForGroup(KexiDB::Field::TypeGroup typeGroup)
+TQStringList KexiDB::typeStringsForGroup(KexiDB::Field::TypeGroup typeGroup)
{
if (!KexiDB_typeCache)
initList();
@@ -109,7 +109,7 @@ KexiDB::Field::Type KexiDB::defaultTypeForGroup(KexiDB::Field::TypeGroup typeGro
return (typeGroup <= Field::LastTypeGroup) ? KexiDB_typeCache->def_tlist[ typeGroup ] : Field::InvalidType;
}
-void KexiDB::getHTMLErrorMesage(Object* obj, QString& msg, QString &details)
+void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details)
{
Connection *conn = 0;
if (!obj || !obj->error()) {
@@ -138,9 +138,9 @@ void KexiDB::getHTMLErrorMesage(Object* obj, QString& msg, QString &details)
if (!obj->serverErrorMsg().isEmpty())
details += "<p><b><nobr>" +i18n("Message from server:") + "</nobr></b><br>" + obj->serverErrorMsg();
if (!obj->recentSQLString().isEmpty())
- details += "<p><b><nobr>" +i18n("SQL statement:") + QString("</nobr></b><br><tt>%1</tt>").arg(obj->recentSQLString());
+ details += "<p><b><nobr>" +i18n("SQL statement:") + TQString("</nobr></b><br><tt>%1</tt>").tqarg(obj->recentSQLString());
int serverResult;
- QString serverResultName;
+ TQString serverResultName;
if (obj->serverResult()!=0) {
serverResult = obj->serverResult();
serverResultName = obj->serverResultName();
@@ -150,22 +150,22 @@ void KexiDB::getHTMLErrorMesage(Object* obj, QString& msg, QString &details)
serverResultName = obj->previousServerResultName();
}
if (!serverResultName.isEmpty())
- details += (QString("<p><b><nobr>")+i18n("Server result name:")+"</nobr></b><br>"+serverResultName);
+ details += (TQString("<p><b><nobr>")+i18n("Server result name:")+"</nobr></b><br>"+serverResultName);
if (!details.isEmpty()
&& (!obj->serverErrorMsg().isEmpty() || !obj->recentSQLString().isEmpty() || !serverResultName.isEmpty() || serverResult!=0) )
{
- details += (QString("<p><b><nobr>")+i18n("Server result number:")+"</nobr></b><br>"+QString::number(serverResult));
+ details += (TQString("<p><b><nobr>")+i18n("Server result number:")+"</nobr></b><br>"+TQString::number(serverResult));
}
if (!details.isEmpty() && !details.startsWith("<qt>")) {
if (details.startsWith("<p>"))
- details = QString::fromLatin1("<qt>")+details;
+ details = TQString::tqfromLatin1("<qt>")+details;
else
- details = QString::fromLatin1("<qt><p>")+details;
+ details = TQString::tqfromLatin1("<qt><p>")+details;
}
}
-void KexiDB::getHTMLErrorMesage(Object* obj, QString& msg)
+void KexiDB::getHTMLErrorMesage(Object* obj, TQString& msg)
{
getHTMLErrorMesage(obj, msg, msg);
}
@@ -175,11 +175,11 @@ void KexiDB::getHTMLErrorMesage(Object* obj, ResultInfo *result)
getHTMLErrorMesage(obj, result->msg, result->desc);
}
-int KexiDB::idForObjectName( Connection &conn, const QString& objName, int objType )
+int KexiDB::idForObjectName( Connection &conn, const TQString& objName, int objType )
{
RowData data;
- if (true!=conn.querySingleRecord(QString("select o_id from kexi__objects where lower(o_name)='%1' and o_type=%2")
- .arg(objName.lower()).arg(objType), data))
+ if (true!=conn.querySingleRecord(TQString("select o_id from kexi__objects where lower(o_name)='%1' and o_type=%2")
+ .tqarg(objName.lower()).tqarg(objType), data))
return 0;
bool ok;
int id = data[0].toInt(&ok);
@@ -188,26 +188,26 @@ int KexiDB::idForObjectName( Connection &conn, const QString& objName, int objTy
//-----------------------------------------
-TableOrQuerySchema::TableOrQuerySchema(Connection *conn, const QCString& name)
+TableOrQuerySchema::TableOrQuerySchema(Connection *conn, const TQCString& name)
: m_name(name)
{
- m_table = conn->tableSchema(QString(name));
- m_query = m_table ? 0 : conn->querySchema(QString(name));
+ m_table = conn->tableSchema(TQString(name));
+ m_query = m_table ? 0 : conn->querySchema(TQString(name));
if (!m_table && !m_query)
KexiDBWarn << "TableOrQuery(FieldList &tableOrQuery) : "
" tableOrQuery is neither table nor query!" << endl;
}
-TableOrQuerySchema::TableOrQuerySchema(Connection *conn, const QCString& name, bool table)
+TableOrQuerySchema::TableOrQuerySchema(Connection *conn, const TQCString& name, bool table)
: m_name(name)
- , m_table(table ? conn->tableSchema(QString(name)) : 0)
- , m_query(table ? 0 : conn->querySchema(QString(name)))
+ , m_table(table ? conn->tableSchema(TQString(name)) : 0)
+ , m_query(table ? 0 : conn->querySchema(TQString(name)))
{
if (table && !m_table)
- KexiDBWarn << "TableOrQuery(Connection *conn, const QCString& name, bool table) : "
+ KexiDBWarn << "TableOrQuery(Connection *conn, const TQCString& name, bool table) : "
"no table specified!" << endl;
if (!table && !m_query)
- KexiDBWarn << "TableOrQuery(Connection *conn, const QCString& name, bool table) : "
+ KexiDBWarn << "TableOrQuery(Connection *conn, const TQCString& name, bool table) : "
"no query specified!" << endl;
}
@@ -266,7 +266,7 @@ const QueryColumnInfo::Vector TableOrQuerySchema::columns(bool unique)
return QueryColumnInfo::Vector();
}
-QCString TableOrQuerySchema::name() const
+TQCString TableOrQuerySchema::name() const
{
if (m_table)
return m_table->name().latin1();
@@ -275,7 +275,7 @@ QCString TableOrQuerySchema::name() const
return m_name;
}
-QString TableOrQuerySchema::captionOrName() const
+TQString TableOrQuerySchema::captionOrName() const
{
SchemaData *sdata = m_table ? static_cast<SchemaData *>(m_table) : static_cast<SchemaData *>(m_query);
if (!sdata)
@@ -283,7 +283,7 @@ QString TableOrQuerySchema::captionOrName() const
return sdata->caption().isEmpty() ? sdata->name() : sdata->caption();
}
-Field* TableOrQuerySchema::field(const QString& name)
+Field* TableOrQuerySchema::field(const TQString& name)
{
if (m_table)
return m_table->field(name);
@@ -293,7 +293,7 @@ Field* TableOrQuerySchema::field(const QString& name)
return 0;
}
-QueryColumnInfo* TableOrQuerySchema::columnInfo(const QString& name)
+QueryColumnInfo* TableOrQuerySchema::columnInfo(const TQString& name)
{
if (m_table)
return m_table->query()->columnInfo(name);
@@ -304,13 +304,13 @@ QueryColumnInfo* TableOrQuerySchema::columnInfo(const QString& name)
return 0;
}
-QString TableOrQuerySchema::debugString()
+TQString TableOrQuerySchema::debugString()
{
if (m_table)
return m_table->debugString();
else if (m_query)
return m_query->debugString();
- return QString::null;
+ return TQString();
}
void TableOrQuerySchema::debug()
@@ -333,7 +333,7 @@ Connection* TableOrQuerySchema::connection() const
//------------------------------------------
-class ConnectionTestThread : public QThread {
+class ConnectionTestThread : public TQThread {
public:
ConnectionTestThread(ConnectionTestDialog *dlg, const KexiDB::ConnectionData& connData);
virtual void run();
@@ -372,7 +372,7 @@ void ConnectionTestThread::run()
}
// SQL database backends like PostgreSQL require executing "USE database"
// if we really want to know connection to the server succeeded.
- QString tmpDbName;
+ TQString tmpDbName;
if (!conn->useTemporaryDatabaseIfNeeded( tmpDbName )) {
m_dlg->error(conn);
delete conn;
@@ -382,12 +382,12 @@ void ConnectionTestThread::run()
m_dlg->error(0);
}
-ConnectionTestDialog::ConnectionTestDialog(QWidget* parent,
+ConnectionTestDialog::ConnectionTestDialog(TQWidget* tqparent,
const KexiDB::ConnectionData& data,
KexiDB::MessageHandler& msgHandler)
- : KProgressDialog(parent, "testconn_dlg",
+ : KProgressDialog(tqparent, "testconn_dlg",
i18n("Test Connection"), i18n("<qt>Testing connection to <b>%1</b> database server...</qt>")
- .arg(data.serverInfoString(true)), true /*modal*/)
+ .tqarg(data.serverInfoString(true)), true /*modal*/)
, m_thread(new ConnectionTestThread(this, data))
, m_connData(data)
, m_msgHandler(&msgHandler)
@@ -398,7 +398,7 @@ ConnectionTestDialog::ConnectionTestDialog(QWidget* parent,
showCancelButton(true);
progressBar()->setPercentageVisible(false);
progressBar()->setTotalSteps(0);
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
adjustSize();
resize(250, height());
}
@@ -441,13 +441,13 @@ void ConnectionTestDialog::slotTimeout()
else if (notResponding) {
KMessageBox::sorry(0,
i18n("<qt>Test connection to <b>%1</b> database server failed. The server is not responding.</qt>")
- .arg(m_connData.serverInfoString(true)),
+ .tqarg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
else {
KMessageBox::information(0,
i18n("<qt>Test connection to <b>%1</b> database server established successfully.</qt>")
- .arg(m_connData.serverInfoString(true)),
+ .tqarg(m_connData.serverInfoString(true)),
i18n("Test Connection"));
}
// slotCancel();
@@ -483,17 +483,17 @@ void ConnectionTestDialog::slotCancel()
KProgressDialog::slotCancel();
}
-void KexiDB::connectionTestDialog(QWidget* parent, const KexiDB::ConnectionData& data,
+void KexiDB::connectionTestDialog(TQWidget* tqparent, const KexiDB::ConnectionData& data,
KexiDB::MessageHandler& msgHandler)
{
- ConnectionTestDialog dlg(parent, data, msgHandler);
+ ConnectionTestDialog dlg(tqparent, data, msgHandler);
dlg.exec();
}
-int KexiDB::rowCount(Connection &conn, const QString& sql)
+int KexiDB::rowCount(Connection &conn, const TQString& sql)
{
int count = -1; //will be changed only on success of querySingleNumber()
- QString selectSql( QString::fromLatin1("SELECT COUNT() FROM (") + sql + ")" );
+ TQString selectSql( TQString::tqfromLatin1("SELECT COUNT() FROM (") + sql + ")" );
conn.querySingleNumber(selectSql, count);
return count;
}
@@ -507,7 +507,7 @@ int KexiDB::rowCount(const KexiDB::TableSchema& tableSchema)
}
int count = -1; //will be changed only on success of querySingleNumber()
tableSchema.connection()->querySingleNumber(
- QString::fromLatin1("SELECT COUNT(*) FROM ")
+ TQString::tqfromLatin1("SELECT COUNT(*) FROM ")
+ tableSchema.connection()->driver()->escapeIdentifier(tableSchema.name()),
count
);
@@ -523,7 +523,7 @@ int KexiDB::rowCount(KexiDB::QuerySchema& querySchema)
}
int count = -1; //will be changed only on success of querySingleNumber()
querySchema.connection()->querySingleNumber(
- QString::fromLatin1("SELECT COUNT(*) FROM (")
+ TQString::tqfromLatin1("SELECT COUNT(*) FROM (")
+ querySchema.connection()->selectStatement(querySchema) + ")",
count
);
@@ -548,24 +548,24 @@ int KexiDB::fieldCount(KexiDB::TableOrQuerySchema& tableOrQuery)
return -1;
}
-QMap<QString,QString> KexiDB::toMap( const ConnectionData& data )
+TQMap<TQString,TQString> KexiDB::toMap( const ConnectionData& data )
{
- QMap<QString,QString> m;
+ TQMap<TQString,TQString> m;
m["caption"] = data.caption;
m["description"] = data.description;
m["driverName"] = data.driverName;
m["hostName"] = data.hostName;
- m["port"] = QString::number(data.port);
- m["useLocalSocketFile"] = QString::number((int)data.useLocalSocketFile);
+ m["port"] = TQString::number(data.port);
+ m["useLocalSocketFile"] = TQString::number((int)data.useLocalSocketFile);
m["localSocketFileName"] = data.localSocketFileName;
m["password"] = data.password;
- m["savePassword"] = QString::number((int)data.savePassword);
+ m["savePassword"] = TQString::number((int)data.savePassword);
m["userName"] = data.userName;
m["fileName"] = data.fileName();
return m;
}
-void KexiDB::fromMap( const QMap<QString,QString>& map, ConnectionData& data )
+void KexiDB::fromMap( const TQMap<TQString,TQString>& map, ConnectionData& data )
{
data.caption = map["caption"];
data.description = map["description"];
@@ -580,13 +580,13 @@ void KexiDB::fromMap( const QMap<QString,QString>& map, ConnectionData& data )
data.setFileName(map["fileName"]);
}
-bool KexiDB::splitToTableAndFieldParts(const QString& string,
- QString& tableName, QString& fieldName,
+bool KexiDB::splitToTableAndFieldParts(const TQString& string,
+ TQString& tableName, TQString& fieldName,
SplitToTableAndFieldPartsOptions option)
{
- const int id = string.find('.');
+ const int id = string.tqfind('.');
if (option & SetFieldNameIfNoTableName && id==-1) {
- tableName = QString::null;
+ tableName = TQString();
fieldName = string;
return !fieldName.isEmpty();
}
@@ -603,21 +603,21 @@ bool KexiDB::supportsVisibleDecimalPlacesProperty(Field::Type type)
return Field::isFPNumericType(type);
}
-QString KexiDB::formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces)
+TQString KexiDB::formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces)
{
//! @todo round?
if (decimalPlaces < 0) {
- QString s( QString::number(value, 'f', 10 /*reasonable precision*/));
+ TQString s( TQString::number(value, 'f', 10 /*reasonable precision*/));
uint i = s.length()-1;
while (i>0 && s[i]=='0')
i--;
if (s[i]=='.') //remove '.'
i--;
- s = s.left(i+1).replace('.', KGlobal::locale()->decimalSymbol());
+ s = s.left(i+1).tqreplace('.', KGlobal::locale()->decimalSymbol());
return s;
}
if (decimalPlaces == 0)
- return QString::number((int)value);
+ return TQString::number((int)value);
return KGlobal::locale()->formatNumber(value, decimalPlaces);
}
@@ -630,7 +630,7 @@ KexiDB::Field::Type KexiDB::intToFieldType( int type )
return (KexiDB::Field::Type)type;
}
-static bool setIntToFieldType( Field& field, const QVariant& value )
+static bool setIntToFieldType( Field& field, const TQVariant& value )
{
bool ok;
const int intType = value.toInt(&ok);
@@ -643,14 +643,14 @@ static bool setIntToFieldType( Field& field, const QVariant& value )
}
//! for KexiDB::isBuiltinTableFieldProperty()
-static KStaticDeleter< QAsciiDict<char> > KexiDB_builtinFieldPropertiesDeleter;
+static KStaticDeleter< TQAsciiDict<char> > KexiDB_builtinFieldPropertiesDeleter;
//! for KexiDB::isBuiltinTableFieldProperty()
-QAsciiDict<char>* KexiDB_builtinFieldProperties = 0;
+TQAsciiDict<char>* KexiDB_builtinFieldProperties = 0;
-bool KexiDB::isBuiltinTableFieldProperty( const QCString& propertyName )
+bool KexiDB::isBuiltinTableFieldProperty( const TQCString& propertyName )
{
if (!KexiDB_builtinFieldProperties) {
- KexiDB_builtinFieldPropertiesDeleter.setObject( KexiDB_builtinFieldProperties, new QAsciiDict<char>(499) );
+ KexiDB_builtinFieldPropertiesDeleter.setObject( KexiDB_builtinFieldProperties, new TQAsciiDict<char>(499) );
#define ADD(name) KexiDB_builtinFieldProperties->insert(name, (char*)1)
ADD("type");
ADD("primaryKey");
@@ -671,13 +671,13 @@ bool KexiDB::isBuiltinTableFieldProperty( const QCString& propertyName )
//! @todo always update this when new builtins appear!
#undef ADD
}
- return KexiDB_builtinFieldProperties->find( propertyName );
+ return KexiDB_builtinFieldProperties->tqfind( propertyName );
}
-bool KexiDB::setFieldProperties( Field& field, const QMap<QCString, QVariant>& values )
+bool KexiDB::setFieldProperties( Field& field, const TQMap<TQCString, TQVariant>& values )
{
- QMapConstIterator<QCString, QVariant> it;
- if ( (it = values.find("type")) != values.constEnd() ) {
+ TQMapConstIterator<TQCString, TQVariant> it;
+ if ( (it = values.tqfind("type")) != values.constEnd() ) {
if (!setIntToFieldType(field, *it))
return false;
}
@@ -690,57 +690,57 @@ bool KexiDB::setFieldProperties( Field& field, const QMap<QCString, QVariant>& v
uint constraints = field.constraints();
bool ok = true;
- if ( (it = values.find("primaryKey")) != values.constEnd() )
+ if ( (it = values.tqfind("primaryKey")) != values.constEnd() )
SET_BOOLEAN_FLAG(PrimaryKey, (*it).toBool());
- if ( (it = values.find("indexed")) != values.constEnd() )
+ if ( (it = values.tqfind("indexed")) != values.constEnd() )
SET_BOOLEAN_FLAG(Indexed, (*it).toBool());
- if ( (it = values.find("autoIncrement")) != values.constEnd()
+ if ( (it = values.tqfind("autoIncrement")) != values.constEnd()
&& KexiDB::Field::isAutoIncrementAllowed(field.type()) )
SET_BOOLEAN_FLAG(AutoInc, (*it).toBool());
- if ( (it = values.find("unique")) != values.constEnd() )
+ if ( (it = values.tqfind("unique")) != values.constEnd() )
SET_BOOLEAN_FLAG(Unique, (*it).toBool());
- if ( (it = values.find("notNull")) != values.constEnd() )
+ if ( (it = values.tqfind("notNull")) != values.constEnd() )
SET_BOOLEAN_FLAG(NotNull, (*it).toBool());
- if ( (it = values.find("allowEmpty")) != values.constEnd() )
+ if ( (it = values.tqfind("allowEmpty")) != values.constEnd() )
SET_BOOLEAN_FLAG(NotEmpty, !(*it).toBool());
field.setConstraints( constraints );
uint options = 0;
- if ( (it = values.find("unsigned")) != values.constEnd()) {
+ if ( (it = values.tqfind("unsigned")) != values.constEnd()) {
options |= KexiDB::Field::Unsigned;
if (!(*it).toBool())
options ^= KexiDB::Field::Unsigned;
}
field.setOptions( options );
- if ( (it = values.find("name")) != values.constEnd())
+ if ( (it = values.tqfind("name")) != values.constEnd())
field.setName( (*it).toString() );
- if ( (it = values.find("caption")) != values.constEnd())
+ if ( (it = values.tqfind("caption")) != values.constEnd())
field.setCaption( (*it).toString() );
- if ( (it = values.find("description")) != values.constEnd())
+ if ( (it = values.tqfind("description")) != values.constEnd())
field.setDescription( (*it).toString() );
- if ( (it = values.find("length")) != values.constEnd())
+ if ( (it = values.tqfind("length")) != values.constEnd())
field.setLength( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.find("precision")) != values.constEnd())
+ if ( (it = values.tqfind("precision")) != values.constEnd())
field.setPrecision( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.find("defaultValue")) != values.constEnd())
+ if ( (it = values.tqfind("defaultValue")) != values.constEnd())
field.setDefaultValue( *it );
- if ( (it = values.find("width")) != values.constEnd())
+ if ( (it = values.tqfind("width")) != values.constEnd())
field.setWidth( (*it).isNull() ? 0/*default*/ : (*it).toUInt(&ok) );
if (!ok)
return false;
- if ( (it = values.find("visibleDecimalPlaces")) != values.constEnd()
+ if ( (it = values.tqfind("visibleDecimalPlaces")) != values.constEnd()
&& KexiDB::supportsVisibleDecimalPlacesProperty(field.type()) )
field.setVisibleDecimalPlaces( (*it).isNull() ? -1/*default*/ : (*it).toInt(&ok) );
if (!ok)
return false;
// set custom properties
- typedef QMap<QCString, QVariant> PropertiesMap;
+ typedef TQMap<TQCString, TQVariant> PropertiesMap;
foreach( PropertiesMap::ConstIterator, it, values ) {
if (!isBuiltinTableFieldProperty( it.key() ) && !isExtendedTableFieldProperty( it.key() )) {
field.setCustomProperty( it.key(), it.data() );
@@ -751,14 +751,14 @@ bool KexiDB::setFieldProperties( Field& field, const QMap<QCString, QVariant>& v
}
//! for KexiDB::isExtendedTableFieldProperty()
-static KStaticDeleter< QAsciiDict<char> > KexiDB_extendedPropertiesDeleter;
+static KStaticDeleter< TQAsciiDict<char> > KexiDB_extendedPropertiesDeleter;
//! for KexiDB::isExtendedTableFieldProperty()
-QAsciiDict<char>* KexiDB_extendedProperties = 0;
+TQAsciiDict<char>* KexiDB_extendedProperties = 0;
-bool KexiDB::isExtendedTableFieldProperty( const QCString& propertyName )
+bool KexiDB::isExtendedTableFieldProperty( const TQCString& propertyName )
{
if (!KexiDB_extendedProperties) {
- KexiDB_extendedPropertiesDeleter.setObject( KexiDB_extendedProperties, new QAsciiDict<char>(499, false) );
+ KexiDB_extendedPropertiesDeleter.setObject( KexiDB_extendedProperties, new TQAsciiDict<char>(499, false) );
#define ADD(name) KexiDB_extendedProperties->insert(name, (char*)1)
ADD("visibleDecimalPlaces");
ADD("rowSource");
@@ -773,10 +773,10 @@ bool KexiDB::isExtendedTableFieldProperty( const QCString& propertyName )
ADD("displayWidget");
#undef ADD
}
- return KexiDB_extendedProperties->find( propertyName );
+ return KexiDB_extendedProperties->tqfind( propertyName );
}
-bool KexiDB::setFieldProperty( Field& field, const QCString& propertyName, const QVariant& value )
+bool KexiDB::setFieldProperty( Field& field, const TQCString& propertyName, const TQVariant& value )
{
#define SET_BOOLEAN_FLAG(flag, value) { \
constraints |= KexiDB::Field::flag; \
@@ -806,8 +806,8 @@ bool KexiDB::setFieldProperty( Field& field, const QCString& propertyName, const
}
else {
if (!field.table()) {
- KexiDBWarn << QString("KexiDB::setFieldProperty() Cannot set \"%1\" property - no table assinged for field!")
- .arg(propertyName) << endl;
+ KexiDBWarn << TQString("KexiDB::setFieldProperty() Cannot set \"%1\" property - no table assinged for field!")
+ .tqarg(propertyName.data()) << endl;
}
else {
LookupFieldSchema *lookup = field.table()->lookupFieldSchema(field);
@@ -886,45 +886,45 @@ bool KexiDB::setFieldProperty( Field& field, const QCString& propertyName, const
#undef GET_INT
}
-int KexiDB::loadIntPropertyValueFromDom( const QDomNode& node, bool* ok )
+int KexiDB::loadIntPropertyValueFromDom( const TQDomNode& node, bool* ok )
{
- QCString valueType = node.nodeName().latin1();
+ TQCString valueType = node.nodeName().latin1();
if (valueType.isEmpty() || valueType!="number") {
if (ok)
*ok = false;
return 0;
}
- const QString text( QDomNode(node).toElement().text() );
+ const TQString text( TQDomNode(node).toElement().text() );
int val = text.toInt(ok);
return val;
}
-QString KexiDB::loadStringPropertyValueFromDom( const QDomNode& node, bool* ok )
+TQString KexiDB::loadStringPropertyValueFromDom( const TQDomNode& node, bool* ok )
{
- QCString valueType = node.nodeName().latin1();
+ TQCString valueType = node.nodeName().latin1();
if (valueType!="string") {
if (ok)
*ok = false;
return 0;
}
- return QDomNode(node).toElement().text();
+ return TQDomNode(node).toElement().text();
}
-QVariant KexiDB::loadPropertyValueFromDom( const QDomNode& node )
+TQVariant KexiDB::loadPropertyValueFromDom( const TQDomNode& node )
{
- QCString valueType = node.nodeName().latin1();
+ TQCString valueType = node.nodeName().latin1();
if (valueType.isEmpty())
- return QVariant();
- const QString text( QDomNode(node).toElement().text() );
+ return TQVariant();
+ const TQString text( TQDomNode(node).toElement().text() );
bool ok;
if (valueType == "string") {
return text;
}
else if (valueType == "cstring") {
- return QCString(text.latin1());
+ return TQCString(text.latin1());
}
else if (valueType == "number") { // integer or double
- if (text.find('.')!=-1) {
+ if (text.tqfind('.')!=-1) {
double val = text.toDouble(&ok);
if (ok)
return val;
@@ -933,106 +933,106 @@ QVariant KexiDB::loadPropertyValueFromDom( const QDomNode& node )
const int val = text.toInt(&ok);
if (ok)
return val;
- const Q_LLONG valLong = text.toLongLong(&ok);
+ const TQ_LLONG valLong = text.toLongLong(&ok);
if (ok)
return valLong;
}
}
else if (valueType == "bool") {
- return QVariant(text.lower()=="true" || text=="1", 1);
+ return TQVariant(text.lower()=="true" || text=="1", 1);
}
-//! @todo add more QVariant types
+//! @todo add more TQVariant types
KexiDBWarn << "loadPropertyValueFromDom(): unknown type '" << valueType << "'" << endl;
- return QVariant();
+ return TQVariant();
}
-QDomElement KexiDB::saveNumberElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, int value)
+TQDomElement KexiDB::saveNumberElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, int value)
{
- QDomElement el( doc.createElement(elementName) );
- parentEl.appendChild( el );
- QDomElement numberEl( doc.createElement("number") );
+ TQDomElement el( doc.createElement(elementName) );
+ tqparentEl.appendChild( el );
+ TQDomElement numberEl( doc.createElement("number") );
el.appendChild( numberEl );
- numberEl.appendChild( doc.createTextNode( QString::number(value) ) );
+ numberEl.appendChild( doc.createTextNode( TQString::number(value) ) );
return el;
}
-QDomElement KexiDB::saveBooleanElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, bool value)
+TQDomElement KexiDB::saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, bool value)
{
- QDomElement el( doc.createElement(elementName) );
- parentEl.appendChild( el );
- QDomElement numberEl( doc.createElement("bool") );
+ TQDomElement el( doc.createElement(elementName) );
+ tqparentEl.appendChild( el );
+ TQDomElement numberEl( doc.createElement("bool") );
el.appendChild( numberEl );
numberEl.appendChild( doc.createTextNode(
- value ? QString::fromLatin1("true") : QString::fromLatin1("false") ) );
+ value ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("false") ) );
return el;
}
//! Used in KexiDB::emptyValueForType()
-static KStaticDeleter< QValueVector<QVariant> > KexiDB_emptyValueForTypeCacheDeleter;
-QValueVector<QVariant> *KexiDB_emptyValueForTypeCache = 0;
+static KStaticDeleter< TQValueVector<TQVariant> > KexiDB_emptyValueForTypeCacheDeleter;
+TQValueVector<TQVariant> *KexiDB_emptyValueForTypeCache = 0;
-QVariant KexiDB::emptyValueForType( KexiDB::Field::Type type )
+TQVariant KexiDB::emptyValueForType( KexiDB::Field::Type type )
{
if (!KexiDB_emptyValueForTypeCache) {
KexiDB_emptyValueForTypeCacheDeleter.setObject( KexiDB_emptyValueForTypeCache,
- new QValueVector<QVariant>(int(Field::LastType)+1) );
+ new TQValueVector<TQVariant>(int(Field::LastType)+1) );
#define ADD(t, value) (*KexiDB_emptyValueForTypeCache)[t]=value;
ADD(Field::Byte, 0);
ADD(Field::ShortInteger, 0);
ADD(Field::Integer, 0);
ADD(Field::BigInteger, 0);
- ADD(Field::Boolean, QVariant(false, 0));
+ ADD(Field::Boolean, TQVariant(false, 0));
ADD(Field::Float, 0.0);
ADD(Field::Double, 0.0);
//! @todo ok? we have no better defaults
- ADD(Field::Text, QString(" "));
- ADD(Field::LongText, QString(" "));
- ADD(Field::BLOB, QByteArray());
+ ADD(Field::Text, TQString(" "));
+ ADD(Field::LongText, TQString(" "));
+ ADD(Field::BLOB, TQByteArray());
#undef ADD
}
- const QVariant val( KexiDB_emptyValueForTypeCache->at(
+ const TQVariant val( KexiDB_emptyValueForTypeCache->at(
(type<=Field::LastType) ? type : Field::InvalidType) );
if (!val.isNull())
return val;
else { //special cases
if (type==Field::Date)
- return QDate::currentDate();
+ return TQDate::tqcurrentDate();
if (type==Field::DateTime)
- return QDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
if (type==Field::Time)
- return QTime::currentTime();
+ return TQTime::currentTime();
}
KexiDBWarn << "KexiDB::emptyValueForType() no value for type "
<< Field::typeName(type) << endl;
- return QVariant();
+ return TQVariant();
}
//! Used in KexiDB::notEmptyValueForType()
-static KStaticDeleter< QValueVector<QVariant> > KexiDB_notEmptyValueForTypeCacheDeleter;
-QValueVector<QVariant> *KexiDB_notEmptyValueForTypeCache = 0;
+static KStaticDeleter< TQValueVector<TQVariant> > KexiDB_notEmptyValueForTypeCacheDeleter;
+TQValueVector<TQVariant> *KexiDB_notEmptyValueForTypeCache = 0;
-QVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type )
+TQVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type )
{
if (!KexiDB_notEmptyValueForTypeCache) {
KexiDB_notEmptyValueForTypeCacheDeleter.setObject( KexiDB_notEmptyValueForTypeCache,
- new QValueVector<QVariant>(int(Field::LastType)+1) );
+ new TQValueVector<TQVariant>(int(Field::LastType)+1) );
#define ADD(t, value) (*KexiDB_notEmptyValueForTypeCache)[t]=value;
// copy most of the values
for (int i = int(Field::InvalidType) + 1; i<=Field::LastType; i++) {
if (i==Field::Date || i==Field::DateTime || i==Field::Time)
continue; //'current' value will be returned
if (i==Field::Text || i==Field::LongText) {
- ADD(i, QVariant(QString("")));
+ ADD(i, TQVariant(TQString("")));
continue;
}
if (i==Field::BLOB) {
//! @todo blobs will contain other mime types too
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
- QPixmap pm(SmallIcon("filenew"));
+ TQPixmap pm(SmallIcon("filenew"));
pm.save( &buffer, "PNG"/*! @todo default? */ );
ADD(i, ba);
continue;
@@ -1041,46 +1041,46 @@ QVariant KexiDB::notEmptyValueForType( KexiDB::Field::Type type )
}
#undef ADD
}
- const QVariant val( KexiDB_notEmptyValueForTypeCache->at(
+ const TQVariant val( KexiDB_notEmptyValueForTypeCache->at(
(type<=Field::LastType) ? type : Field::InvalidType) );
if (!val.isNull())
return val;
else { //special cases
if (type==Field::Date)
- return QDate::currentDate();
+ return TQDate::tqcurrentDate();
if (type==Field::DateTime)
- return QDateTime::currentDateTime();
+ return TQDateTime::tqcurrentDateTime();
if (type==Field::Time)
- return QTime::currentTime();
+ return TQTime::currentTime();
}
KexiDBWarn << "KexiDB::notEmptyValueForType() no value for type "
<< Field::typeName(type) << endl;
- return QVariant();
+ return TQVariant();
}
-QString KexiDB::escapeBLOB(const QByteArray& array, BLOBEscapingType type)
+TQString KexiDB::escapeBLOB(const TQByteArray& array, BLOBEscapingType type)
{
const int size = array.size();
if (size==0)
- return QString::null;
+ return TQString();
int escaped_length = size*2;
if (type == BLOBEscape0xHex || type == BLOBEscapeOctal)
escaped_length += 2/*0x or X'*/;
else if (type == BLOBEscapeXHex)
escaped_length += 3; //X' + '
- QString str;
+ TQString str;
str.reserve(escaped_length);
if (str.capacity() < (uint)escaped_length) {
KexiDBWarn << "KexiDB::Driver::escapeBLOB(): no enough memory (cannot allocate "<<
escaped_length<<" chars)" << endl;
- return QString::null;
+ return TQString();
}
if (type == BLOBEscapeXHex)
- str = QString::fromLatin1("X'");
+ str = TQString::tqfromLatin1("X'");
else if (type == BLOBEscape0xHex)
- str = QString::fromLatin1("0x");
+ str = TQString::tqfromLatin1("0x");
else if (type == BLOBEscapeOctal)
- str = QString::fromLatin1("'");
+ str = TQString::tqfromLatin1("'");
int new_length = str.length(); //after X' or 0x, etc.
if (type == BLOBEscapeOctal) {
@@ -1113,9 +1113,9 @@ QString KexiDB::escapeBLOB(const QByteArray& array, BLOBEscapingType type)
return str;
}
-QByteArray KexiDB::pgsqlByteaToByteArray(const char* data, int length)
+TQByteArray KexiDB::pgsqlByteaToByteArray(const char* data, int length)
{
- QByteArray array;
+ TQByteArray array;
int output=0;
for (int pass=0; pass<2; pass++) {//2 passes to avoid allocating buffer twice:
// 0: count #of chars; 1: copy data
@@ -1161,41 +1161,41 @@ QByteArray KexiDB::pgsqlByteaToByteArray(const char* data, int length)
return array;
}
-QString KexiDB::variantToString( const QVariant& v )
+TQString KexiDB::variantToString( const TQVariant& v )
{
- if (v.type()==QVariant::ByteArray)
+ if (v.type()==TQVariant::ByteArray)
return KexiDB::escapeBLOB(v.toByteArray(), KexiDB::BLOBEscapeHex);
return v.toString();
}
-QVariant KexiDB::stringToVariant( const QString& s, QVariant::Type type, bool &ok )
+TQVariant KexiDB::stringToVariant( const TQString& s, TQVariant::Type type, bool &ok )
{
if (s.isNull()) {
ok = true;
- return QVariant();
+ return TQVariant();
}
- if (QVariant::Invalid==type) {
+ if (TQVariant::Invalid==type) {
ok = false;
- return QVariant();
+ return TQVariant();
}
- if (type==QVariant::ByteArray) {//special case: hex string
+ if (type==TQVariant::ByteArray) {//special case: hex string
const uint len = s.length();
- QByteArray ba(len/2 + len%2);
+ TQByteArray ba(len/2 + len%2);
for (uint i=0; i<(len-1); i+=2) {
int c = s.mid(i,2).toInt(&ok, 16);
if (!ok) {
KexiDBWarn << "KexiDB::stringToVariant(): Error in digit " << i << endl;
- return QVariant();
+ return TQVariant();
}
ba[i/2] = (char)c;
}
ok = true;
return ba;
}
- QVariant result(s);
+ TQVariant result(s);
if (!result.cast( type )) {
ok = false;
- return QVariant();
+ return TQVariant();
}
ok = true;
return result;
@@ -1228,7 +1228,7 @@ void KexiDB::getLimitsForType(Field::Type type, int &minValue, int &maxValue)
void KexiDB::debugRowData(const RowData& rowData)
{
- KexiDBDbg << QString("ROW DATA (%1 columns):").arg(rowData.count()) << endl;
+ KexiDBDbg << TQString("ROW DATA (%1 columns):").tqarg(rowData.count()) << endl;
foreach(RowData::ConstIterator, it, rowData)
KexiDBDbg << "- " << (*it) << endl;
}
@@ -1248,7 +1248,7 @@ Field::Type KexiDB::maximumForIntegerTypes(Field::Type t1, Field::Type t2)
return KexiDB::maximumForIntegerTypes(t2, t1); //swap
}
-QString KexiDB::simplifiedTypeName(const Field& field)
+TQString KexiDB::simplifiedTypeName(const Field& field)
{
if (field.isNumericType())
return i18n("Number"); //simplify
diff --git a/kexi/kexidb/utils.h b/kexi/kexidb/utils.h
index a455f5b8e..fff7a0719 100644
--- a/kexi/kexidb/utils.h
+++ b/kexi/kexidb/utils.h
@@ -21,51 +21,51 @@
#ifndef KEXIDB_UTILS_H
#define KEXIDB_UTILS_H
-#include <qvaluelist.h>
-#include <qvariant.h>
+#include <tqvaluelist.h>
+#include <tqvariant.h>
#include <kexidb/connection.h>
#include <kexidb/driver.h>
-class QDomNode;
-class QDomElement;
-class QDomDocument;
+class TQDomNode;
+class TQDomElement;
+class TQDomDocument;
namespace KexiDB
{
//! for convenience
inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, TableSchema *table,
- const QString &keyname, const QString &keyval)
+ const TQString &keyname, const TQString &keyval)
{
return table!=0 && conn.executeSQL("DELETE FROM " + table->name() + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ));
}
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname, const QString &keyval)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname, const TQString &keyval)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ));
}
inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, TableSchema *table,
- const QString &keyname, int keyval)
+ const TQString &keyname, int keyval)
{
return table!=0 && conn.executeSQL("DELETE FROM " + table->name() + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, TQVariant(keyval) ));
}
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname, int keyval)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname, int keyval)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
- + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, QVariant(keyval) ));
+ + keyname + "=" + conn.driver()->valueToSQL( Field::Integer, TQVariant(keyval) ));
}
/*! Delete row with two generic criterias. */
- inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const QString &tableName,
- const QString &keyname1, Field::Type keytype1, const QVariant& keyval1,
- const QString &keyname2, Field::Type keytype2, const QVariant& keyval2)
+ inline KEXI_DB_EXPORT bool deleteRow(Connection &conn, const TQString &tableName,
+ const TQString &keyname1, Field::Type keytype1, const TQVariant& keyval1,
+ const TQString &keyname2, Field::Type keytype2, const TQVariant& keyval2)
{
return conn.executeSQL("DELETE FROM " + tableName + " WHERE "
+ keyname1 + "=" + conn.driver()->valueToSQL( keytype1, keyval1 )
@@ -73,26 +73,26 @@ namespace KexiDB
}
inline KEXI_DB_EXPORT bool replaceRow(Connection &conn, TableSchema *table,
- const QString &keyname, const QString &keyval, const QString &valname, QVariant val, int ftype)
+ const TQString &keyname, const TQString &keyval, const TQString &valname, TQVariant val, int ftype)
{
if (!table || !KexiDB::deleteRow(conn, table, keyname, keyval))
return false;
return conn.executeSQL("INSERT INTO " + table->name()
+ " (" + keyname + "," + valname + ") VALUES ("
- + conn.driver()->valueToSQL( Field::Text, QVariant(keyval) ) + ","
+ + conn.driver()->valueToSQL( Field::Text, TQVariant(keyval) ) + ","
+ conn.driver()->valueToSQL( ftype, val) + ")");
}
- typedef QValueList<uint> TypeGroupList;
+ typedef TQValueList<uint> TypeGroupList;
/*! \return list of types for type group \a typeGroup. */
KEXI_DB_EXPORT const TypeGroupList typesForGroup(Field::TypeGroup typeGroup);
/*! \return list of i18n'd type names for type group \a typeGroup. */
- KEXI_DB_EXPORT QStringList typeNamesForGroup(Field::TypeGroup typeGroup);
+ KEXI_DB_EXPORT TQStringList typeNamesForGroup(Field::TypeGroup typeGroup);
/*! \return list of (not-i18n'd) type names for type group \a typeGroup. */
- KEXI_DB_EXPORT QStringList typeStringsForGroup(Field::TypeGroup typeGroup);
+ KEXI_DB_EXPORT TQStringList typeStringsForGroup(Field::TypeGroup typeGroup);
/*! \return default field type for type group \a typeGroup,
for example, Field::Integer for Field::IntegerGroup.
@@ -105,11 +105,11 @@ namespace KexiDB
For numbers (either floating-point or integer) it returns i18n'd "Number: string.
For other types it the same string as Field::typeGroupName() is returned. */
//! @todo support names of other BLOB subtypes
- KEXI_DB_EXPORT QString simplifiedTypeName(const Field& field);
+ KEXI_DB_EXPORT TQString simplifiedTypeName(const Field& field);
/*! \return true if \a v represents an empty (but not null) value.
Values of some types (as for strings) can be both empty and not null. */
- inline bool isEmptyValue(Field *f, const QVariant &v) {
+ inline bool isEmptyValue(Field *f, const TQVariant &v) {
if (f->hasEmptyProperty() && v.toString().isEmpty() && !v.toString().isNull())
return true;
return v.isNull();
@@ -121,11 +121,11 @@ namespace KexiDB
\a msg and \a details strings are not overwritten.
If \a msg is not empty, \a obj's error message is appended to \a details.
*/
- KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, QString& msg, QString &details);
+ KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, TQString& msg, TQString &details);
/*! This methods works like above, but appends both a message and a description
to \a msg. */
- KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, QString& msg);
+ KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, TQString& msg);
/*! This methods works like above, but works on \a result's members instead. */
KEXI_DB_EXPORT void getHTMLErrorMesage(Object* obj, ResultInfo *result);
@@ -134,8 +134,8 @@ namespace KexiDB
Constructs an sql string like "fielname = value" for specific \a drv driver,
field type \a t, \a fieldName and \a value. If \a value is null, "fieldname is NULL"
string is returned. */
- inline KEXI_DB_EXPORT QString sqlWhere(Driver *drv, Field::Type t,
- const QString fieldName, const QVariant value)
+ inline KEXI_DB_EXPORT TQString sqlWhere(Driver *drv, Field::Type t,
+ const TQString fieldName, const TQVariant value)
{
if (value.isNull())
return fieldName + " is NULL";
@@ -144,7 +144,7 @@ namespace KexiDB
/*! \return identifier for object \a objName of type \a objType
or 0 if such object does not exist. */
- KEXI_DB_EXPORT int idForObjectName( Connection &conn, const QString& objName, int objType );
+ KEXI_DB_EXPORT int idForObjectName( Connection &conn, const TQString& objName, int objType );
/*! Variant class providing a pointer to table or query. */
class KEXI_DB_EXPORT TableOrQuerySchema {
@@ -154,14 +154,14 @@ namespace KexiDB
table has priority over query.
You should check whether a query or table has been found by testing
(query() || table()) expression. */
- TableOrQuerySchema(Connection *conn, const QCString& name);
+ TableOrQuerySchema(Connection *conn, const TQCString& name);
/*! Creates a new TableOrQuerySchema variant object, retrieving table or query schema
using \a conn connection and \a name. If \a table is true, \a name is assumed
to be a table name, otherwise \a name is assumed to be a query name.
You should check whether a query or table has been found by testing
(query() || table()) expression. */
- TableOrQuerySchema(Connection *conn, const QCString& name, bool table);
+ TableOrQuerySchema(Connection *conn, const TQCString& name, bool table);
/*! Creates a new TableOrQuerySchema variant object. \a tableOrQuery must be of
class TableSchema or QuerySchema.
@@ -190,10 +190,10 @@ namespace KexiDB
TableSchema* table() const { return m_table; }
//! \return name of a query or table
- QCString name() const;
+ TQCString name() const;
//! \return caption (if present) or name of the table/query
- QString captionOrName() const;
+ TQString captionOrName() const;
//! \return number of fields
uint fieldCount() const;
@@ -203,37 +203,37 @@ namespace KexiDB
/*! \return a field of the table or the query schema for name \a name
or 0 if there is no such field. */
- Field* field(const QString& name);
+ Field* field(const TQString& name);
- /*! Like Field* field(const QString& name);
+ /*! Like Field* field(const TQString& name);
but returns all information associated with field/column \a name. */
- QueryColumnInfo* columnInfo(const QString& name);
+ QueryColumnInfo* columnInfo(const TQString& name);
/*! \return connection object, for table or query or 0 if there's no table or query defined. */
Connection* connection() const;
/*! \return String for debugging purposes. */
- QString debugString();
+ TQString debugString();
/*! Shows debug information about table or query. */
void debug();
protected:
- QCString m_name; //!< the name is kept here because m_table and m_table can be 0
+ TQCString m_name; //!< the name is kept here because m_table and m_table can be 0
//! and we still want name() and acptionOrName() work.
TableSchema* m_table;
QuerySchema* m_query;
};
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of rows that can be retrieved after executing \a sql statement
within a connection \a conn. The statement should be of type SELECT.
For SQL data sources it does not fetch any records, only "COUNT(*)"
SQL aggregation is used at the backed.
-1 is returned if error occured. */
- int rowCount(Connection &conn, const QString& sql);
+ int rowCount(Connection &conn, const TQString& sql);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! \return number of rows that can be retrieved from \a tableSchema.
The table must be created or retrieved using a Connection object,
i.e. tableSchema.connection() must not return 0.
@@ -242,11 +242,11 @@ namespace KexiDB
-1 is returned if error occurred. */
KEXI_DB_EXPORT int rowCount(const TableSchema& tableSchema);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! Like above but operates on a query schema. */
KEXI_DB_EXPORT int rowCount(QuerySchema& querySchema);
-//! @todo perhaps use Q_ULLONG here?
+//! @todo perhaps use TQ_ULLONG here?
/*! Like above but operates on a table or query schema variant. */
KEXI_DB_EXPORT int rowCount(TableOrQuerySchema& tableOrQuery);
@@ -259,14 +259,14 @@ namespace KexiDB
(within a second thread).
\a data is used to perform a (temporary) test connection. \a msgHandler is used to display errors.
On successful connecting, a message is displayed. After testing, temporary connection is closed. */
- KEXI_DB_EXPORT void connectionTestDialog(QWidget* parent, const ConnectionData& data,
+ KEXI_DB_EXPORT void connectionTestDialog(TQWidget* tqparent, const ConnectionData& data,
MessageHandler& msgHandler);
/*! Saves connection data \a data into \a map. */
- KEXI_DB_EXPORT QMap<QString,QString> toMap( const ConnectionData& data );
+ KEXI_DB_EXPORT TQMap<TQString,TQString> toMap( const ConnectionData& data );
/*! Restores connection data \a data from \a map. */
- KEXI_DB_EXPORT void fromMap( const QMap<QString,QString>& map, ConnectionData& data );
+ KEXI_DB_EXPORT void fromMap( const TQMap<TQString,TQString>& map, ConnectionData& data );
//! Used in splitToTableAndFieldParts().
enum SplitToTableAndFieldPartsOptions {
@@ -284,13 +284,13 @@ namespace KexiDB
or field name could become empty what is not allowed).
If \a option is SetFieldNameIfNoTableName and \a string does not contain '.',
- \a string is passed to \a fieldName and \a tableName is set to QString::null
+ \a string is passed to \a fieldName and \a tableName is set to TQString()
without failure.
If function fails, \a tableName and \a fieldName remain unchanged.
\return true on success. */
- KEXI_DB_EXPORT bool splitToTableAndFieldParts(const QString& string,
- QString& tableName, QString& fieldName,
+ KEXI_DB_EXPORT bool splitToTableAndFieldParts(const TQString& string,
+ TQString& tableName, TQString& fieldName,
SplitToTableAndFieldPartsOptions option = FailIfNoTableOrFieldName);
/*! \return true if \a type supports "visibleDecimalPlaces" property. */
@@ -307,17 +307,17 @@ namespace KexiDB
KLocale::formatNumber() and KLocale::decimalSymbol() are used to get locale settings.
@see KexiDB::Field::visibleDecimalPlaces() */
- KEXI_DB_EXPORT QString formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces);
+ KEXI_DB_EXPORT TQString formatNumberForVisibleDecimalPlaces(double value, int decimalPlaces);
//! \return true if \a propertyName is a builtin field property.
- KEXI_DB_EXPORT bool isBuiltinTableFieldProperty( const QCString& propertyName );
+ KEXI_DB_EXPORT bool isBuiltinTableFieldProperty( const TQCString& propertyName );
//! \return true if \a propertyName is an extended field property.
- KEXI_DB_EXPORT bool isExtendedTableFieldProperty( const QCString& propertyName );
+ KEXI_DB_EXPORT bool isExtendedTableFieldProperty( const TQCString& propertyName );
/*! \return type of field for integer value \a type.
If \a type cannot be casted to KexiDB::Field::Type, KexiDB::Field::InvalidType is returned.
- This can be used when type information is deserialized from a string or QVariant. */
+ This can be used when type information is deserialized from a string or TQVariant. */
KEXI_DB_EXPORT Field::Type intToFieldType( int type );
/*! Sets property values for \a field. \return true if all the values are valid and allowed.
@@ -325,65 +325,65 @@ namespace KexiDB
Properties coming from extended schema are also supported.
This function is used e.g. by AlterTableHandler when property information comes in form of text.
*/
- KEXI_DB_EXPORT bool setFieldProperties( Field& field, const QMap<QCString, QVariant>& values );
+ KEXI_DB_EXPORT bool setFieldProperties( Field& field, const TQMap<TQCString, TQVariant>& values );
/*! Sets property value for \a field. \return true if the property has been found and
the value is valid for this property. On failure contents of \a field is undefined.
Properties coming from extended schema are also supported as well as
- QVariant customProperty(const QString& propertyName) const;
+ TQVariant customProperty(const TQString& propertyName) const;
This function is used e.g. by AlterTableHandler when property information comes in form of text.
*/
- KEXI_DB_EXPORT bool setFieldProperty(Field& field, const QCString& propertyName,
- const QVariant& value);
+ KEXI_DB_EXPORT bool setFieldProperty(Field& field, const TQCString& propertyName,
+ const TQVariant& value);
- /*! @return property value loaded from a DOM \a node, written in a QtDesigner-like
+ /*! @return property value loaded from a DOM \a node, written in a TQtDesigner-like
notation: &lt;number&gt;int&lt;/number&gt; or &lt;bool&gt;bool&lt;/bool&gt;, etc. Supported types are
- "string", "cstring", "bool", "number". For invalid values null QVariant is returned.
- You can check the validity of the returned value using QVariant::type(). */
- KEXI_DB_EXPORT QVariant loadPropertyValueFromDom( const QDomNode& node );
+ "string", "cstring", "bool", "number". For invalid values null TQVariant is returned.
+ You can check the validity of the returned value using TQVariant::type(). */
+ KEXI_DB_EXPORT TQVariant loadPropertyValueFromDom( const TQDomNode& node );
/*! Convenience version of loadPropertyValueFromDom(). \return int value. */
- KEXI_DB_EXPORT int loadIntPropertyValueFromDom( const QDomNode& node, bool* ok );
+ KEXI_DB_EXPORT int loadIntPropertyValueFromDom( const TQDomNode& node, bool* ok );
- /*! Convenience version of loadPropertyValueFromDom(). \return QString value. */
- KEXI_DB_EXPORT QString loadStringPropertyValueFromDom( const QDomNode& node, bool* ok );
+ /*! Convenience version of loadPropertyValueFromDom(). \return TQString value. */
+ KEXI_DB_EXPORT TQString loadStringPropertyValueFromDom( const TQDomNode& node, bool* ok );
- /*! Saves integer element for value \a value to \a doc document within parent element
- \a parentEl. The value will be enclosed in "number" element and "elementName" element.
- Example: saveNumberElementToDom(doc, parentEl, "height", 15) will create
+ /*! Saves integer element for value \a value to \a doc document within tqparent element
+ \a tqparentEl. The value will be enclosed in "number" element and "elementName" element.
+ Example: saveNumberElementToDom(doc, tqparentEl, "height", 15) will create
\code
<height><number>15</number></height>
\endcode
\return the reference to element created with tag elementName. */
- KEXI_DB_EXPORT QDomElement saveNumberElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, int value);
+ KEXI_DB_EXPORT TQDomElement saveNumberElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, int value);
- /*! Saves boolean element for value \a value to \a doc document within parent element
- \a parentEl. Like saveNumberElementToDom() but creates "bool" tags. True/false values will be
+ /*! Saves boolean element for value \a value to \a doc document within tqparent element
+ \a tqparentEl. Like saveNumberElementToDom() but creates "bool" tags. True/false values will be
saved as "true"/"false" strings.
\return the reference to element created with tag elementName. */
- KEXI_DB_EXPORT QDomElement saveBooleanElementToDom(QDomDocument& doc, QDomElement& parentEl,
- const QString& elementName, bool value);
+ KEXI_DB_EXPORT TQDomElement saveBooleanElementToDom(TQDomDocument& doc, TQDomElement& tqparentEl,
+ const TQString& elementName, bool value);
/*! \return an empty value that can be set for a database field of type \a type having
"null" property set. Empty string is returned for text type, 0 for integer
or floating-point types, false for boolean type, empty null byte array for BLOB type.
For date, time and date/time types current date, time, date+time is returned, respectively.
- Returns null QVariant for unsupported values like KexiDB::Field::InvalidType.
+ Returns null TQVariant for unsupported values like KexiDB::Field::InvalidType.
This function is efficient (uses a cache) and is heavily used by the AlterTableHandler
for filling new columns. */
- KEXI_DB_EXPORT QVariant emptyValueForType( Field::Type type );
+ KEXI_DB_EXPORT TQVariant emptyValueForType( Field::Type type );
/*! \return a value that can be set for a database field of type \a type having
"notEmpty" property set. It works in a similar way as
- @ref QVariant emptyValueForType( KexiDB::Field::Type type ) with the following differences:
+ @ref TQVariant emptyValueForType( KexiDB::Field::Type type ) with the following differences:
- " " string (a single space) is returned for Text and LongText types
- a byte array with saved "filenew" PNG image (icon) for BLOB type
- Returns null QVariant for unsupported values like KexiDB::Field::InvalidType.
+ Returns null TQVariant for unsupported values like KexiDB::Field::InvalidType.
This function is efficient (uses a cache) and is heavily used by the AlterTableHandler
for filling new columns. */
- KEXI_DB_EXPORT QVariant notEmptyValueForType( Field::Type type );
+ KEXI_DB_EXPORT TQVariant notEmptyValueForType( Field::Type type );
//! Escaping types used in escapeBLOB().
enum BLOBEscapingType {
@@ -397,30 +397,30 @@ namespace KexiDB
//! @todo reverse function for BLOBEscapeOctal is available: processBinaryData() in pqxxcursor.cpp - move it here
/*! \return a string containing escaped, printable representation of \a array.
- Escaping is controlled by \a type. For empty array QString::null is returned,
+ Escaping is controlled by \a type. For empty array TQString() is returned,
so if you want to use this function in an SQL statement, empty arrays should be
detected and "NULL" string should be put instead.
This is helper, used in Driver::escapeBLOB() and KexiDB::variantToString(). */
- KEXI_DB_EXPORT QString escapeBLOB(const QByteArray& array, BLOBEscapingType type);
+ KEXI_DB_EXPORT TQString escapeBLOB(const TQByteArray& array, BLOBEscapingType type);
/*! \return byte array converted from \a data of length \a length.
\a data is escaped in format used by PostgreSQL's bytea datatype
described at http://www.postgresql.org/docs/8.1/interactive/datatype-binary.html
This function is used by PostgreSQL KexiDB and migration drivers. */
- KEXI_DB_EXPORT QByteArray pgsqlByteaToByteArray(const char* data, int length);
+ KEXI_DB_EXPORT TQByteArray pgsqlByteaToByteArray(const char* data, int length);
/*! \return string value serialized from a variant value \a v.
- This functions works like QVariant::toString() except the case when \a v is of type ByteArray.
+ This functions works like TQVariant::toString() except the case when \a v is of type ByteArray.
In this case KexiDB::escapeBLOB(v.toByteArray(), KexiDB::BLOBEscapeHex) is used.
This function is needed for handling values of random type, for example "defaultValue"
property of table fields can contain value of any type.
Note: the returned string is an unescaped string. */
- KEXI_DB_EXPORT QString variantToString( const QVariant& v );
+ KEXI_DB_EXPORT TQString variantToString( const TQVariant& v );
/*! \return variant value of type \a type for a string \a s that was previously serialized using
- \ref variantToString( const QVariant& v ) function.
+ \ref variantToString( const TQVariant& v ) function.
\a ok is set to the result of the operation. */
- KEXI_DB_EXPORT QVariant stringToVariant( const QString& s, QVariant::Type type, bool &ok );
+ KEXI_DB_EXPORT TQVariant stringToVariant( const TQString& s, TQVariant::Type type, bool &ok );
/*! \return true if setting default value for \a field field is allowed. Fields with unique
(and thus primary key) flags set do not accept default values.
@@ -442,33 +442,33 @@ namespace KexiDB
If one of the types is not of the integer group, Field::InvalidType is returned. */
KEXI_DB_EXPORT Field::Type maximumForIntegerTypes(Field::Type t1, Field::Type t2);
- /*! \return QVariant value converted from null-terminated \a data string.
+ /*! \return TQVariant value converted from null-terminated \a data string.
In case of BLOB type, \a data is not nul lterminated, so passing length is needed. */
- inline QVariant cstringToVariant(const char* data, KexiDB::Field* f, int length = -1)
+ inline TQVariant cstringToVariant(const char* data, KexiDB::Field* f, int length = -1)
{
if (!data)
- return QVariant();
+ return TQVariant();
// from mo st to least frequently used types:
if (!f || f->isTextType())
- return QString::fromUtf8(data, length);
+ return TQString::fromUtf8(data, length);
if (f->isIntegerType()) {
if (f->type()==KexiDB::Field::BigInteger)
- return QVariant( QString::fromLatin1(data, length).toLongLong() );
- return QVariant( QString::fromLatin1(data, length).toInt() );
+ return TQVariant( TQString::tqfromLatin1(data, length).toLongLong() );
+ return TQVariant( TQString::tqfromLatin1(data, length).toInt() );
}
if (f->isFPNumericType())
- return QString::fromLatin1(data, length).toDouble();
+ return TQString::tqfromLatin1(data, length).toDouble();
if (f->type()==KexiDB::Field::BLOB) {
- QByteArray ba;
+ TQByteArray ba;
ba.duplicate(data, length);
return ba;
}
// the default
//! @todo date/time?
- QVariant result(QString::fromUtf8(data, length));
+ TQVariant result(TQString::fromUtf8(data, length));
if (!result.cast( KexiDB::Field::variantType(f->type()) ))
- return QVariant();
+ return TQVariant();
return result;
}
}
diff --git a/kexi/kexidb/utils_p.h b/kexi/kexidb/utils_p.h
index 6129196be..56c20267e 100644
--- a/kexi/kexidb/utils_p.h
+++ b/kexi/kexidb/utils_p.h
@@ -20,8 +20,8 @@
#ifndef KEXIDB_UTILS_P_H
#define KEXIDB_UTILS_P_H
-#include <qtimer.h>
-#include <qwaitcondition.h>
+#include <tqtimer.h>
+#include <tqwaitcondition.h>
#include <kprogress.h>
@@ -32,8 +32,9 @@ class ConnectionTestThread;
class ConnectionTestDialog : protected KProgressDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConnectionTestDialog(QWidget* parent,
+ ConnectionTestDialog(TQWidget* tqparent,
const KexiDB::ConnectionData& data, KexiDB::MessageHandler& msgHandler);
virtual ~ConnectionTestDialog();
@@ -48,11 +49,11 @@ class ConnectionTestDialog : protected KProgressDialog
protected:
ConnectionTestThread* m_thread;
KexiDB::ConnectionData m_connData;
- QTimer m_timer;
+ TQTimer m_timer;
KexiDB::MessageHandler* m_msgHandler;
uint m_elapsedTime;
KexiDB::Object *m_errorObj;
- QWaitCondition m_wait;
+ TQWaitCondition m_wait;
bool m_stopWaiting : 1;
};
diff --git a/kexi/kexiutils/debuggui.cpp b/kexi/kexiutils/debuggui.cpp
index 72948fd26..f0a5146c5 100644
--- a/kexi/kexiutils/debuggui.cpp
+++ b/kexi/kexiutils/debuggui.cpp
@@ -20,8 +20,8 @@
#include "utils.h"
#include "utils_p.h"
-#include <qheader.h>
-#include <qlayout.h>
+#include <tqheader.h>
+#include <tqlayout.h>
#include <ktabwidget.h>
#include <klistview.h>
@@ -37,12 +37,12 @@ static KTabWidget* debugWindowTab = 0;
static KListView* kexiDBDebugPage = 0;
static KListView* kexiAlterTableActionDebugPage = 0;
-QWidget *KexiUtils::createDebugWindow(QWidget *parent)
+TQWidget *KexiUtils::createDebugWindow(TQWidget *tqparent)
{
// (this is internal code - do not use i18n() here)
- debugWindow = new DebugWindowDialog(parent);
+ debugWindow = new DebugWindowDialog(tqparent);
debugWindow->setSizeGripEnabled( true );
- QBoxLayout *lyr = new QVBoxLayout(debugWindow, KDialogBase::marginHint());
+ TQBoxLayout *lyr = new TQVBoxLayout(debugWindow, KDialogBase::marginHint());
debugWindowTab = new KTabWidget(debugWindow, "debugWindowTab");
lyr->addWidget( debugWindowTab );
debugWindow->resize(900, 600);
@@ -52,49 +52,49 @@ QWidget *KexiUtils::createDebugWindow(QWidget *parent)
return debugWindow;
}
-void KexiUtils::addKexiDBDebug(const QString& text)
+void KexiUtils::addKexiDBDebug(const TQString& text)
{
// (this is internal code - do not use i18n() here)
if (!debugWindowTab)
return;
if (!kexiDBDebugPage) {
- QWidget *page = new QWidget(debugWindowTab);
- QVBoxLayout *vbox = new QVBoxLayout(page);
- QHBoxLayout *hbox = new QHBoxLayout(page);
+ TQWidget *page = new TQWidget(debugWindowTab);
+ TQVBoxLayout *vbox = new TQVBoxLayout(page);
+ TQHBoxLayout *hbox = new TQHBoxLayout(page);
vbox->addLayout(hbox);
hbox->addStretch(1);
KPushButton *btn_clear = new KPushButton(KGuiItem("Clear", "clear_left"), page);
hbox->addWidget(btn_clear);
kexiDBDebugPage = new KListView(page, "kexiDbDebugPage");
- QObject::connect(btn_clear, SIGNAL(clicked()), kexiDBDebugPage, SLOT(clear()));
+ TQObject::connect(btn_clear, TQT_SIGNAL(clicked()), kexiDBDebugPage, TQT_SLOT(clear()));
vbox->addWidget(kexiDBDebugPage);
kexiDBDebugPage->addColumn("");
kexiDBDebugPage->header()->hide();
kexiDBDebugPage->setSorting(-1);
kexiDBDebugPage->setAllColumnsShowFocus ( true );
- kexiDBDebugPage->setColumnWidthMode( 0, QListView::Maximum );
+ kexiDBDebugPage->setColumnWidthMode( 0, TQListView::Maximum );
kexiDBDebugPage->setRootIsDecorated( true );
debugWindowTab->addTab( page, "KexiDB" );
debugWindowTab->showPage(page);
kexiDBDebugPage->show();
}
//add \n after (about) every 30 characters
-//TODO QString realText
+//TODO TQString realText
KListViewItem * li = new KListViewItem( kexiDBDebugPage, kexiDBDebugPage->lastItem(), text );
li->setMultiLinesEnabled( true );
}
-void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
+void KexiUtils::addAlterTableActionDebug(const TQString& text, int nestingLevel)
{
// (this is internal code - do not use i18n() here)
if (!debugWindowTab)
return;
if (!kexiAlterTableActionDebugPage) {
- QWidget *page = new QWidget(debugWindowTab);
- QVBoxLayout *vbox = new QVBoxLayout(page);
- QHBoxLayout *hbox = new QHBoxLayout(page);
+ TQWidget *page = new TQWidget(debugWindowTab);
+ TQVBoxLayout *vbox = new TQVBoxLayout(page);
+ TQHBoxLayout *hbox = new TQHBoxLayout(page);
vbox->addLayout(hbox);
hbox->addStretch(1);
KPushButton *btn_exec = new KPushButton(KGuiItem("Real Alter Table", "filesave"), page);
@@ -107,13 +107,13 @@ void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
hbox->addWidget(btn_sim);
kexiAlterTableActionDebugPage = new KListView(page, "kexiAlterTableActionDebugPage");
- QObject::connect(btn_clear, SIGNAL(clicked()), kexiAlterTableActionDebugPage, SLOT(clear()));
+ TQObject::connect(btn_clear, TQT_SIGNAL(clicked()), kexiAlterTableActionDebugPage, TQT_SLOT(clear()));
vbox->addWidget(kexiAlterTableActionDebugPage);
kexiAlterTableActionDebugPage->addColumn("");
kexiAlterTableActionDebugPage->header()->hide();
kexiAlterTableActionDebugPage->setSorting(-1);
kexiAlterTableActionDebugPage->setAllColumnsShowFocus ( true );
- kexiAlterTableActionDebugPage->setColumnWidthMode( 0, QListView::Maximum );
+ kexiAlterTableActionDebugPage->setColumnWidthMode( 0, TQListView::Maximum );
kexiAlterTableActionDebugPage->setRootIsDecorated( true );
debugWindowTab->addTab( page, "AlterTable Actions" );
debugWindowTab->showPage(page);
@@ -124,10 +124,10 @@ void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
KListViewItem * li;
int availableNestingLevels = 0;
// compute availableNestingLevels
- QListViewItem * lastItem = kexiAlterTableActionDebugPage->lastItem();
- //kdDebug() << "lastItem: " << (lastItem ? lastItem->text(0) : QString::null) << endl;
+ TQListViewItem * lastItem = kexiAlterTableActionDebugPage->lastItem();
+ //kdDebug() << "lastItem: " << (lastItem ? lastItem->text(0) : TQString()) << endl;
while (lastItem) {
- lastItem = lastItem->parent();
+ lastItem = lastItem->tqparent();
availableNestingLevels++;
}
//kdDebug() << "availableNestingLevels: " << availableNestingLevels << endl;
@@ -135,12 +135,12 @@ void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
lastItem = kexiAlterTableActionDebugPage->lastItem();
int levelsToGoUp = availableNestingLevels - nestingLevel;
while (levelsToGoUp > 0 && lastItem) {
- lastItem = lastItem->parent();
+ lastItem = lastItem->tqparent();
levelsToGoUp--;
}
- //kdDebug() << "lastItem2: " << (lastItem ? lastItem->text(0) : QString::null) << endl;
+ //kdDebug() << "lastItem2: " << (lastItem ? lastItem->text(0) : TQString()) << endl;
if (lastItem) {
- QListViewItem *after = lastItem->firstChild(); //find last child so we can insert a new item after it
+ TQListViewItem *after = lastItem->firstChild(); //find last child so we can insert a new item after it
while (after && after->nextSibling())
after = after->nextSibling();
if (after)
@@ -150,9 +150,9 @@ void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
}
else {
lastItem = kexiAlterTableActionDebugPage->lastItem();
- while (lastItem && lastItem->parent())
- lastItem = lastItem->parent();
- //kdDebug() << "lastItem2: " << (lastItem ? lastItem->text(0) : QString::null) << endl;
+ while (lastItem && lastItem->tqparent())
+ lastItem = lastItem->tqparent();
+ //kdDebug() << "lastItem2: " << (lastItem ? lastItem->text(0) : TQString()) << endl;
li = new KListViewItem( kexiAlterTableActionDebugPage, lastItem, text ); //after
}
li->setOpen(true);
@@ -160,12 +160,12 @@ void KexiUtils::addAlterTableActionDebug(const QString& text, int nestingLevel)
}
void KexiUtils::connectPushButtonActionForDebugWindow(const char* actionName,
- const QObject *receiver, const char* slot)
+ const TQObject *receiver, const char* slot)
{
if (debugWindow) {
KPushButton* btn = findFirstChild<KPushButton>(debugWindow, "KPushButton", actionName);
if (btn)
- QObject::connect(btn, SIGNAL(clicked()), receiver, slot);
+ TQObject::connect(btn, TQT_SIGNAL(clicked()), receiver, slot);
}
}
diff --git a/kexi/kexiutils/identifier.cpp b/kexi/kexiutils/identifier.cpp
index 12c5b4da2..e09df22a6 100644
--- a/kexi/kexiutils/identifier.cpp
+++ b/kexi/kexiutils/identifier.cpp
@@ -23,48 +23,48 @@
using namespace KexiUtils;
-bool KexiUtils::isIdentifier(const QString& s)
+bool KexiUtils::isIdentifier(const TQString& s)
{
uint i;
for (i=0; i<s.length(); i++) {
- QChar c = s.at(i).lower();
- if (!(c=='_' || c>='a' && c<='z' || i>0 && c>='0' && c<='9'))
+ TQChar c = s.tqat(i).lower();
+ if (!((int)c=='_' || (int)c>='a' && (int)c<='z' || i>0 && (int)c>='0' && (int)c<='9'))
break;
}
return i>0 && i==s.length();
}
-QString KexiUtils::string2FileName(const QString &s)
+TQString KexiUtils::string2FileName(const TQString &s)
{
- QString fn( s.simplifyWhiteSpace() );
- fn.replace(' ',"_"); fn.replace('$',"_");
- fn.replace('\\',"-"); fn.replace('/',"-");
- fn.replace(':',"-"); fn.replace('*',"-");
+ TQString fn( s.simplifyWhiteSpace() );
+ fn.tqreplace(' ',"_"); fn.tqreplace('$',"_");
+ fn.tqreplace('\\',"-"); fn.tqreplace('/',"-");
+ fn.tqreplace(':',"-"); fn.tqreplace('*',"-");
return fn;
}
-inline QString char2Identifier(const QChar& c)
+inline TQString char2Identifier(const TQChar& c)
{
- if (c.unicode() >= TRANSLITERATION_TABLE_SIZE)
- return QString(QChar('_'));
- const char *const s = transliteration_table[c.unicode()];
- return s ? QString::fromLatin1(s) : QString(QChar('_'));
+ if (c.tqunicode() >= TRANSLITERATION_TABLE_SIZE)
+ return TQString(TQChar('_'));
+ const char *const s = transliteration_table[c.tqunicode()];
+ return s ? TQString::tqfromLatin1(s) : TQString(TQChar('_'));
}
-QString KexiUtils::string2Identifier(const QString &s)
+TQString KexiUtils::string2Identifier(const TQString &s)
{
if (s.isEmpty())
- return QString::null;
- QString r, id = s.simplifyWhiteSpace();
+ return TQString();
+ TQString r, id = s.simplifyWhiteSpace();
if (id.isEmpty())
- return QString::null;
+ return TQString();
r.reserve(id.length());
- id.replace(' ',"_");
- QChar c = id[0];
- QString add;
+ id.tqreplace(' ',"_");
+ TQChar c = id[0];
+ TQString add;
bool wasUnderscore = false;
- if (c>='0' && c<='9') {
+ if ((int)c>='0' && (int)c<='9') {
r+='_';
r+=c;
} else {
@@ -85,16 +85,16 @@ QString KexiUtils::string2Identifier(const QString &s)
//--------------------------------------------------------------------------------
-QString KexiUtils::identifierExpectedMessage(const QString &valueName, const QVariant& v)
+TQString KexiUtils::identifierExpectedMessage(const TQString &valueName, const TQVariant& v)
{
- return "<p>"+i18n("Value of \"%1\" column must be an identifier.").arg(valueName)
- +"</p><p>"+i18n("\"%1\" is not a valid identifier.").arg(v.toString())+"</p>";
+ return "<p>"+i18n("Value of \"%1\" column must be an identifier.").tqarg(valueName)
+ +"</p><p>"+i18n("\"%1\" is not a valid identifier.").tqarg(v.toString())+"</p>";
}
//--------------------------------------------------------------------------------
-IdentifierValidator::IdentifierValidator(QObject * parent, const char * name)
-: Validator(parent,name)
+IdentifierValidator::IdentifierValidator(TQObject * tqparent, const char * name)
+: Validator(tqparent,name)
{
}
@@ -102,7 +102,7 @@ IdentifierValidator::~IdentifierValidator()
{
}
-QValidator::State IdentifierValidator::validate( QString& input, int& pos ) const
+TQValidator::State IdentifierValidator::validate( TQString& input, int& pos ) const
{
uint i;
for (i=0; i<input.length() && input.at(i)==' '; i++)
@@ -120,8 +120,8 @@ QValidator::State IdentifierValidator::validate( QString& input, int& pos ) cons
}
Validator::Result IdentifierValidator::internalCheck(
- const QString &valueName, const QVariant& v,
- QString &message, QString & /*details*/)
+ const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString & /*details*/)
{
if (isIdentifier(v.toString()))
return Validator::Ok;
diff --git a/kexi/kexiutils/identifier.h b/kexi/kexiutils/identifier.h
index a1d9f8ba6..2987019b4 100644
--- a/kexi/kexiutils/identifier.h
+++ b/kexi/kexiutils/identifier.h
@@ -22,39 +22,39 @@
#define KEXIUTILS_IDENTIFIER_H
#include "validator.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace KexiUtils {
/*! \return true if \a s is a valid identifier, ie. starts with a letter or '_' character
and contains only letters, numbers and '_' character. */
- KEXIUTILS_EXPORT bool isIdentifier(const QString& s);
+ KEXIUTILS_EXPORT bool isIdentifier(const TQString& s);
/*! \return valid identifier based on \a s.
Non-alphanumeric characters (or spaces) are replaced with '_'.
If a number is at the beginning, '_' is added at start.
Empty strings are not changed. Case remains unchanged. */
- KEXIUTILS_EXPORT QString string2Identifier(const QString &s);
+ KEXIUTILS_EXPORT TQString string2Identifier(const TQString &s);
/*! \return useful message "Value of "valueName" column must be an identifier.
"v" is not a valid identifier.". It is also used by IdentifierValidator. */
- KEXIUTILS_EXPORT QString identifierExpectedMessage(const QString &valueName,
- const QVariant& v);
+ KEXIUTILS_EXPORT TQString identifierExpectedMessage(const TQString &valueName,
+ const TQVariant& v);
//! \return Valid filename based on \a s
- KEXIUTILS_EXPORT QString string2FileName(const QString &s);
+ KEXIUTILS_EXPORT TQString string2FileName(const TQString &s);
//! Validates input for identifier name.
class KEXIUTILS_EXPORT IdentifierValidator : public Validator
{
public:
- IdentifierValidator(QObject * parent = 0, const char * name = 0);
+ IdentifierValidator(TQObject * tqparent = 0, const char * name = 0);
virtual ~IdentifierValidator();
- virtual State validate( QString & input, int & pos) const;
+ virtual State validate( TQString & input, int & pos) const;
protected:
- virtual Validator::Result internalCheck(const QString &valueName, const QVariant& v,
- QString &message, QString &details);
+ virtual Validator::Result internalCheck(const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
};
}
diff --git a/kexi/kexiutils/longlongvalidator.cpp b/kexi/kexiutils/longlongvalidator.cpp
index 6e7c0f7e4..7d985c321 100644
--- a/kexi/kexiutils/longlongvalidator.cpp
+++ b/kexi/kexiutils/longlongvalidator.cpp
@@ -21,19 +21,19 @@
#include "longlongvalidator.h"
-#include <qwidget.h>
+#include <tqwidget.h>
using namespace KexiUtils;
-LongLongValidator::LongLongValidator( QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+LongLongValidator::LongLongValidator( TQWidget * tqparent, int base, const char * name )
+ : TQValidator(TQT_TQOBJECT(tqparent), name)
, m_min(0), m_max(0)
{
setBase(base);
}
-LongLongValidator::LongLongValidator( Q_LLONG bottom, Q_LLONG top, QWidget * parent, int base, const char * name )
- : QValidator(parent, name)
+LongLongValidator::LongLongValidator( TQ_LLONG bottom, TQ_LLONG top, TQWidget * tqparent, int base, const char * name )
+ : TQValidator(TQT_TQOBJECT(tqparent), name)
{
setBase(base);
setRange( bottom, top );
@@ -43,21 +43,21 @@ LongLongValidator::~LongLongValidator()
{
}
-QValidator::State LongLongValidator::validate( QString &str, int & ) const
+TQValidator::State LongLongValidator::validate( TQString &str, int & ) const
{
bool ok;
- Q_LLONG val = 0;
- QString newStr;
+ TQ_LLONG val = 0;
+ TQString newStr;
newStr = str.stripWhiteSpace();
if (m_base > 10)
newStr = newStr.upper();
- if (newStr == QString::fromLatin1("-")) {// a special case
+ if (newStr == TQString::tqfromLatin1("-")) {// a special case
if ((m_min || m_max) && m_min >= 0)
ok = false;
else
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
else if (!newStr.isEmpty())
val = newStr.toLongLong(&ok, m_base);
@@ -67,26 +67,26 @@ QValidator::State LongLongValidator::validate( QString &str, int & ) const
}
if (! ok)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
if ((! m_min && ! m_max) || (val >= m_min && val <= m_max))
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
if (m_max && m_min >= 0 && val < 0)
- return QValidator::Invalid;
+ return TQValidator::Invalid;
- return QValidator::Valid;
+ return TQValidator::Valid;
}
-void LongLongValidator::fixup( QString &str ) const
+void LongLongValidator::fixup( TQString &str ) const
{
int dummy;
- Q_LLONG val;
- QValidator::State state;
+ TQ_LLONG val;
+ TQValidator::State state;
state = validate(str, dummy);
- if (state == QValidator::Invalid || state == QValidator::Acceptable)
+ if (state == TQValidator::Invalid || state == TQValidator::Acceptable)
return;
if (! m_min && ! m_max)
@@ -102,7 +102,7 @@ void LongLongValidator::fixup( QString &str ) const
str.setNum(val, m_base);
}
-void LongLongValidator::setRange( Q_LLONG bottom, Q_LLONG top )
+void LongLongValidator::setRange( TQ_LLONG bottom, TQ_LLONG top )
{
m_min = bottom;
m_max = top;
@@ -120,12 +120,12 @@ void LongLongValidator::setBase( int base )
m_base = 36;
}
-Q_LLONG LongLongValidator::bottom() const
+TQ_LLONG LongLongValidator::bottom() const
{
return m_min;
}
-Q_LLONG LongLongValidator::top() const
+TQ_LLONG LongLongValidator::top() const
{
return m_max;
}
diff --git a/kexi/kexiutils/longlongvalidator.h b/kexi/kexiutils/longlongvalidator.h
index e20d2f954..bd211feb7 100644
--- a/kexi/kexiutils/longlongvalidator.h
+++ b/kexi/kexiutils/longlongvalidator.h
@@ -22,51 +22,51 @@
#include "kexiutils_export.h"
-#include <qvalidator.h>
-class QWidget;
+#include <tqvalidator.h>
+class TQWidget;
namespace KexiUtils {
//! @short A validator for longlong data type.
/*!
- This can be used by QLineEdit or subclass to provide validated
+ This can be used by TQLineEdit or subclass to provide validated
text entry. Can be provided with a base value (default is 10), to allow
the proper entry of hexadecimal, octal, or any other base numeric data.
Based on KIntValidator code by Glen Parker <glenebob@nwlink.com>
*/
-class KEXIUTILS_EXPORT LongLongValidator : public QValidator
+class KEXIUTILS_EXPORT LongLongValidator : public TQValidator
{
public:
- LongLongValidator( QWidget * parent, int base = 10, const char * name = 0 );
- LongLongValidator( Q_LLONG bottom, Q_LLONG top, QWidget * parent, int base = 10, const char * name = 0 );
+ LongLongValidator( TQWidget * tqparent, int base = 10, const char * name = 0 );
+ LongLongValidator( TQ_LLONG bottom, TQ_LLONG top, TQWidget * tqparent, int base = 10, const char * name = 0 );
virtual ~LongLongValidator();
//! Validates the text, and returns the result. Does not modify the parameters.
- virtual State validate( QString &, int & ) const;
+ virtual State validate( TQString &, int & ) const;
//! Fixes the text if possible, providing a valid string. The parameter may be modified.
- virtual void fixup( QString & ) const;
+ virtual void fixup( TQString & ) const;
//! Sets the minimum and maximum values allowed.
- virtual void setRange( Q_LLONG bottom, Q_LLONG top );
+ virtual void setRange( TQ_LLONG bottom, TQ_LLONG top );
//! Sets the numeric base value.
virtual void setBase( int base );
//! \return the current minimum value allowed
- virtual Q_LLONG bottom() const;
+ virtual TQ_LLONG bottom() const;
//! \return the current maximum value allowed
- virtual Q_LLONG top() const;
+ virtual TQ_LLONG top() const;
//! \return the current numeric base
virtual int base () const;
private:
- Q_LLONG m_base;
- Q_LLONG m_min;
- Q_LLONG m_max;
+ TQ_LLONG m_base;
+ TQ_LLONG m_min;
+ TQ_LLONG m_max;
};
}
diff --git a/kexi/kexiutils/styleproxy.cpp b/kexi/kexiutils/styleproxy.cpp
index e638cac79..56bf83913 100644
--- a/kexi/kexiutils/styleproxy.cpp
+++ b/kexi/kexiutils/styleproxy.cpp
@@ -21,10 +21,10 @@
using namespace KexiUtils;
-StyleProxy::StyleProxy(QStyle* parentStyle)
- : QStyle()
+StyleProxy::StyleProxy(TQStyle* tqparentStyle)
+ : TQStyle()
{
- setParentStyle(parentStyle);
+ setParentStyle(tqparentStyle);
}
StyleProxy::~StyleProxy()
@@ -32,12 +32,12 @@ StyleProxy::~StyleProxy()
delete m_style;
}
-void StyleProxy::setParentStyle(QStyle* style)
+void StyleProxy::setParentStyle(TQStyle* style)
{
- m_style = QStyleFactory::create(style->name());
+ m_style = TQStyleFactory::create(style->name());
}
-QStyle* StyleProxy::parentStyle() const
+TQStyle* StyleProxy::tqparentStyle() const
{
return m_style;
}
diff --git a/kexi/kexiutils/styleproxy.h b/kexi/kexiutils/styleproxy.h
index 667e20b12..779298ee9 100644
--- a/kexi/kexiutils/styleproxy.h
+++ b/kexi/kexiutils/styleproxy.h
@@ -20,15 +20,15 @@
#ifndef KEXIUTILS_STYLEPROXY_H
#define KEXIUTILS_STYLEPROXY_H
-#include <qstyle.h>
-#include <qstylefactory.h>
-#include <qpixmap.h>
+#include <tqstyle.h>
+#include <tqstylefactory.h>
+#include <tqpixmap.h>
#include "kexiutils_export.h"
namespace KexiUtils {
-//! @short a QStyle proxy allowing to customizing the currently used style
+//! @short a TQStyle proxy allowing to customizing the currently used style
/*! All you need is to reimplement one or more of the methods.
For example, you can reimpelmente drawPrimitive() and temporary
change the color in color group.
@@ -39,136 +39,136 @@ namespace KexiUtils {
class MyStyle : public KexiUtils::StyleProxy {
//reimplement method(s) here...
};
- QWidget *w = .....
+ TQWidget *w = .....
w->setStyle( new MyStyle(&w->style(), w) ); //this will alter w's style a bit
\endcode
More info at http://doc.trolltech.com/qq/qq09-q-and-a.html#style
*/
-class KEXIUTILS_EXPORT StyleProxy : public QStyle
+class KEXIUTILS_EXPORT StyleProxy : public TQStyle
{
public:
- /*! Creates a new style proxy object. \a parentStyle pointer will not be kept
- (because it's most likely owned by the application: a new QStyle instance
+ /*! Creates a new style proxy object. \a tqparentStyle pointer will not be kept
+ (because it's most likely owned by the application: a new TQStyle instance
for this name will be created internally. */
- StyleProxy(QStyle* parentStyle);
+ StyleProxy(TQStyle* tqparentStyle);
virtual ~StyleProxy();
- QStyle* parentStyle() const;
- void setParentStyle(QStyle* style);
+ TQStyle* tqparentStyle() const;
+ void setParentStyle(TQStyle* style);
- virtual void polish( QWidget *w ) { m_style->polish(w); }
- virtual void unPolish( QWidget *w ) { m_style->unPolish(w); }
+ virtual void polish( TQWidget *w ) { m_style->polish(w); }
+ virtual void unPolish( TQWidget *w ) { m_style->unPolish(w); }
- virtual void polish( QApplication *a ) { m_style->polish(a); }
- virtual void unPolish( QApplication *a ) { m_style->unPolish(a); }
+ virtual void polish( TQApplication *a ) { m_style->polish(a); }
+ virtual void unPolish( TQApplication *a ) { m_style->unPolish(a); }
- virtual void polish( QPalette &p ) { m_style->polish(p); };
+ virtual void polish( TQPalette &p ) { m_style->polish(p); };
- virtual void polishPopupMenu( QPopupMenu* p ) { m_style->polishPopupMenu(p); }
+ virtual void polishPopupMenu( TQPopupMenu* p ) { m_style->polishPopupMenu(p); }
- virtual QRect itemRect( QPainter *p, const QRect &r,
- int flags, bool enabled, const QPixmap *pixmap, const QString &text, int len = -1 ) const
+ virtual TQRect tqitemRect( TQPainter *p, const TQRect &r,
+ int flags, bool enabled, const TQPixmap *pixmap, const TQString &text, int len = -1 ) const
{
- return m_style->itemRect( p, r, flags, enabled, pixmap, text, len );
+ return m_style->tqitemRect( p, r, flags, enabled, pixmap, text, len );
}
- virtual void drawItem( QPainter *p, const QRect &r,
- int flags, const QColorGroup &g, bool enabled, const QPixmap *pixmap, const QString &text,
- int len = -1, const QColor *penColor = 0 ) const
+ virtual void drawItem( TQPainter *p, const TQRect &r,
+ int flags, const TQColorGroup &g, bool enabled, const TQPixmap *pixmap, const TQString &text,
+ int len = -1, const TQColor *penColor = 0 ) const
{
m_style->drawItem( p, r, flags, g, enabled, pixmap, text, len, penColor );
}
- virtual void drawPrimitive( PrimitiveElement pe,
- QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual void tqdrawPrimitive( TQ_PrimitiveElement pe,
+ TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
- m_style->drawPrimitive( pe, p, r, cg, flags, option );
+ m_style->tqdrawPrimitive( pe, p, r, cg, flags, option );
}
- virtual void drawControl( ControlElement element,
- QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg,
- SFlags how = Style_Default, const QStyleOption& option = QStyleOption::Default ) const
+ virtual void tqdrawControl( TQ_ControlElement element,
+ TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg,
+ SFlags how = Style_Default, const TQStyleOption& option = TQStyleOption::Default ) const
{
- m_style->drawControl( element, p, widget, r, cg, how, option );
+ m_style->tqdrawControl( element, p, widget, r, cg, how, option );
}
- virtual void drawControlMask( ControlElement element,
- QPainter *p, const QWidget *widget, const QRect &r,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual void tqdrawControlMask( TQ_ControlElement element,
+ TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
- m_style->drawControlMask( element, p, widget, r, option );
+ m_style->tqdrawControlMask( element, p, widget, r, option );
}
- virtual QRect subRect( SubRect r, const QWidget *widget ) const
+ virtual TQRect subRect( SubRect r, const TQWidget *widget ) const
{
return m_style->subRect( r, widget );
}
- virtual void drawComplexControl( ComplexControl control,
- QPainter *p, const QWidget *widget, const QRect &r,
- const QColorGroup &cg, SFlags how = Style_Default,
-#ifdef Q_QDOC
+ virtual void tqdrawComplexControl( TQ_ComplexControl control,
+ TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQColorGroup &cg, SFlags how = Style_Default,
+#ifdef TQ_TQDOC
SCFlags sub = SC_All,
#else
SCFlags sub = (uint)SC_All,
#endif
- SCFlags subActive = SC_None, const QStyleOption& option = QStyleOption::Default ) const
+ SCFlags subActive = SC_None, const TQStyleOption& option = TQStyleOption::Default ) const
{
- drawComplexControl( control, p, widget, r, cg, how, sub, subActive, option );
+ tqdrawComplexControl( control, p, widget, r, cg, how, sub, subActive, option );
}
- virtual void drawComplexControlMask( ComplexControl control,
- QPainter *p, const QWidget *widget, const QRect &r,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual void tqdrawComplexControlMask( TQ_ComplexControl control,
+ TQPainter *p, const TQWidget *widget, const TQRect &r,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
- m_style->drawComplexControlMask( control, p, widget, r, option );
+ m_style->tqdrawComplexControlMask( control, p, widget, r, option );
}
- virtual QRect querySubControlMetrics( ComplexControl control,
- const QWidget *widget, SubControl sc,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual TQRect querySubControlMetrics( TQ_ComplexControl control,
+ const TQWidget *widget, SubControl sc,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
return m_style->querySubControlMetrics( control, widget, sc, option );
}
- virtual SubControl querySubControl( ComplexControl control,
- const QWidget *widget, const QPoint &pos,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual SubControl querySubControl( TQ_ComplexControl control,
+ const TQWidget *widget, const TQPoint &pos,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
return m_style->querySubControl( control, widget, pos, option );
}
- virtual int pixelMetric( PixelMetric metric,
- const QWidget *widget = 0 ) const
+ virtual int tqpixelMetric( PixelMetric metric,
+ const TQWidget *widget = 0 ) const
{
- return m_style->pixelMetric( metric, widget );
+ return m_style->tqpixelMetric( metric, widget );
}
- virtual QSize sizeFromContents( ContentsType contents,
- const QWidget *widget, const QSize &contentsSize,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual TQSize tqsizeFromContents( ContentsType contents,
+ const TQWidget *widget, const TQSize &contentsSize,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
- return m_style->sizeFromContents( contents, widget, contentsSize, option );
+ return m_style->tqsizeFromContents( contents, widget, contentsSize, option );
}
- virtual int styleHint( StyleHint stylehint,
- const QWidget *widget = 0, const QStyleOption& option = QStyleOption::Default,
- QStyleHintReturn* returnData = 0 ) const
+ virtual int tqstyleHint( TQ_StyleHint stylehint,
+ const TQWidget *widget = 0, const TQStyleOption& option = TQStyleOption::Default,
+ TQStyleHintReturn* returnData = 0 ) const
{
- return m_style->styleHint( stylehint, widget, option, returnData );
+ return m_style->tqstyleHint( stylehint, widget, option, returnData );
}
- virtual QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget = 0,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget = 0,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
return m_style->stylePixmap( stylepixmap, widget, option );
}
protected:
- QStyle *m_style;
+ TQStyle *m_style;
};
}
diff --git a/kexi/kexiutils/transliteration_table.h b/kexi/kexiutils/transliteration_table.h
index 5be7dadc9..0eece11c1 100644
--- a/kexi/kexiutils/transliteration_table.h
+++ b/kexi/kexiutils/transliteration_table.h
@@ -1,4 +1,4 @@
-/* Transliteration table of 65535 unicode characters
+/* Transliteration table of 65535 tqunicode characters
Do not edit this file, it is generated
by ./generate_transliteration_table.sh script. */
diff --git a/kexi/kexiutils/tristate.h b/kexi/kexiutils/tristate.h
index a3de22bb4..0a8df95c8 100644
--- a/kexi/kexiutils/tristate.h
+++ b/kexi/kexiutils/tristate.h
@@ -20,7 +20,7 @@
#ifndef _TRISTATE_TYPE_H_
#define _TRISTATE_TYPE_H_
-#include <qstring.h>
+#include <tqstring.h>
/**
* \e cancelled value, in most cases usable if there is a need for returning
@@ -79,7 +79,7 @@ static const char dontKnow = cancelled;
* is irrelevant to the current situation.
*
* Other use for tristate class could be to allow cancellation within
- * a callback function or a Qt slot. Example:
+ * a callback function or a TQt slot. Example:
* \code
* public slots:
* void validateData(tristate& result);
@@ -87,10 +87,10 @@ static const char dontKnow = cancelled;
* Having the single parameter, signals and slots have still simple look.
* Developers can alter their code (by replacing 'bool& result' with 'tristate& result')
* in case when a possibility of canceling of, say, data provessing needs to be implemented.
- * Let's say \e validateData() function uses a QDialog to get some validation from a user.
- * While QDialog::Rejected is returned after cancellation of the validation process,
+ * Let's say \e validateData() function uses a TQDialog to get some validation from a user.
+ * While TQDialog::Rejected is returned after cancellation of the validation process,
* the information about cancellation needs to be transferred up to a higher level of the program.
- * Storing values of type QDialog::DialogCode there could be found as unreadable, and
+ * Storing values of type TQDialog::DialogCode there could be found as unreadable, and
* casting these to int is not typesafe. With tristate class it's easier to make it obvious that
* cancellation should be taken into account.
*
@@ -163,10 +163,10 @@ public:
/**
* \return text representation of the value: "true", "false" or "cancelled".
*/
- QString toString() const {
+ TQString toString() const {
if (m_value==False)
- return QString::fromLatin1("false");
- return m_value==True ? QString::fromLatin1("true") : QString::fromLatin1("cancelled");
+ return TQString::tqfromLatin1("false");
+ return m_value==True ? TQString::tqfromLatin1("true") : TQString::tqfromLatin1("cancelled");
}
private:
diff --git a/kexi/kexiutils/utils.cpp b/kexi/kexiutils/utils.cpp
index f96465a6d..6b3e26dc6 100644
--- a/kexi/kexiutils/utils.cpp
+++ b/kexi/kexiutils/utils.cpp
@@ -20,13 +20,13 @@
#include "utils.h"
#include "utils_p.h"
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qwmatrix.h>
-#include <qiconset.h>
-#include <qbitmap.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqwmatrix.h>
+#include <tqiconset.h>
+#include <tqbitmap.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kcursor.h>
@@ -36,7 +36,7 @@
#include <kpixmapeffect.h>
#include <kiconloader.h>
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
# include <win32_utils.h>
#endif
@@ -45,7 +45,7 @@ using namespace KexiUtils;
DelayedCursorHandler::DelayedCursorHandler()
: startedOrActive(false)
{
- connect(&timer, SIGNAL(timeout()), this, SLOT(show()));
+ connect(&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(show()));
}
void DelayedCursorHandler::start(bool noDelay) {
startedOrActive = true;
@@ -54,10 +54,10 @@ void DelayedCursorHandler::start(bool noDelay) {
void DelayedCursorHandler::stop() {
startedOrActive = false;
timer.stop();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
void DelayedCursorHandler::show() {
- QApplication::setOverrideCursor( KCursor::waitCursor() );
+ TQApplication::setOverrideCursor( KCursor::waitCursor() );
}
DelayedCursorHandler _delayedCursorHandler;
@@ -94,12 +94,12 @@ WaitCursorRemover::~WaitCursorRemover()
//--------------------------------------------------------------------------------
-QString KexiUtils::fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat)
+TQString KexiUtils::fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat)
{
if (mime==0)
- return QString::null;
+ return TQString();
- QString str;
+ TQString str;
if (kdeFormat) {
if (mime->patterns().isEmpty())
str = "*";
@@ -123,138 +123,138 @@ QString KexiUtils::fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFo
return str;
}
-QString KexiUtils::fileDialogFilterString(const QString& mimeString, bool kdeFormat)
+TQString KexiUtils::fileDialogFilterString(const TQString& mimeString, bool kdeFormat)
{
KMimeType::Ptr ptr = KMimeType::mimeType(mimeString);
return fileDialogFilterString( ptr, kdeFormat );
}
-QString KexiUtils::fileDialogFilterStrings(const QStringList& mimeStrings, bool kdeFormat)
+TQString KexiUtils::fileDialogFilterStrings(const TQStringList& mimeStrings, bool kdeFormat)
{
- QString ret;
- QStringList::ConstIterator endIt = mimeStrings.constEnd();
- for(QStringList::ConstIterator it = mimeStrings.constBegin(); it != endIt; ++it)
+ TQString ret;
+ TQStringList::ConstIterator endIt = mimeStrings.constEnd();
+ for(TQStringList::ConstIterator it = mimeStrings.constBegin(); it != endIt; ++it)
ret += fileDialogFilterString(*it, kdeFormat);
return ret;
}
-QColor KexiUtils::blendedColors(const QColor& c1, const QColor& c2, int factor1, int factor2)
+TQColor KexiUtils::blendedColors(const TQColor& c1, const TQColor& c2, int factor1, int factor2)
{
- return QColor(
+ return TQColor(
int( (c1.red()*factor1+c2.red()*factor2)/(factor1+factor2) ),
int( (c1.green()*factor1+c2.green()*factor2)/(factor1+factor2) ),
int( (c1.blue()*factor1+c2.blue()*factor2)/(factor1+factor2) ) );
}
-QColor KexiUtils::contrastColor(const QColor& c)
+TQColor KexiUtils::contrastColor(const TQColor& c)
{
- int g = qGray( c.rgb() );
+ int g = tqGray( c.rgb() );
if (g>110)
return c.dark(200);
else if (g>80)
return c.light(150);
else if (g>20)
return c.light(300);
- return Qt::gray;
+ return TQt::gray;
}
-QColor KexiUtils::bleachedColor(const QColor& c, int factor)
+TQColor KexiUtils::bleachedColor(const TQColor& c, int factor)
{
int h, s, v;
c.getHsv( &h, &s, &v );
- QColor c2;
+ TQColor c2;
if (factor < 100)
factor = 100;
if (s>=250 && v>=250) //for colors like cyan or red, make the result more white
- s = QMAX(0, s - factor - 50);
+ s = TQMAX(0, s - factor - 50);
else if (s<=5 && s<=5)
v += factor-50;
- c2.setHsv(h, s, QMIN(255,v + factor-100));
+ c2.setHsv(h, s, TQMIN(255,v + factor-100));
return c2;
}
-QIconSet KexiUtils::colorizeIconToTextColor(const QPixmap& icon, const QPalette& palette)
+TQIconSet KexiUtils::colorizeIconToTextColor(const TQPixmap& icon, const TQPalette& palette)
{
- QPixmap pm(
+ TQPixmap pm(
KIconEffect().apply( icon, KIconEffect::Colorize, 1.0f, palette.active().buttonText(), false ) );
KPixmap kpm(pm);
- return QIconSet(
+ return TQIconSet(
KPixmapEffect::fade( kpm, 0.33, palette.active().button() ) );
}
-QPixmap KexiUtils::emptyIcon(KIcon::Group iconGroup)
+TQPixmap KexiUtils::emptyIcon(KIcon::Group iconGroup)
{
- QPixmap noIcon( IconSize( iconGroup ), IconSize( iconGroup ) );
- QBitmap bmpNoIcon(noIcon.size());
- bmpNoIcon.fill(Qt::color0);
+ TQPixmap noIcon( IconSize( iconGroup ), IconSize( iconGroup ) );
+ TQBitmap bmpNoIcon(noIcon.size());
+ bmpNoIcon.fill(TQt::color0);
noIcon.setMask(bmpNoIcon);
return noIcon;
}
-void KexiUtils::serializeMap(const QMap<QString,QString>& map, const QByteArray& array)
+void KexiUtils::serializeMap(const TQMap<TQString,TQString>& map, const TQByteArray& array)
{
- QDataStream ds(array, IO_WriteOnly);
+ TQDataStream ds(array, IO_WriteOnly);
ds << map;
}
-void KexiUtils::serializeMap(const QMap<QString,QString>& map, QString& string)
+void KexiUtils::serializeMap(const TQMap<TQString,TQString>& map, TQString& string)
{
- QByteArray array;
- QDataStream ds(array, IO_WriteOnly);
+ TQByteArray array;
+ TQDataStream ds(array, IO_WriteOnly);
ds << map;
kdDebug() << array[3] << " " << array[4] << " " << array[5] << endl;
const uint size = array.size();
- string = QString::null;
+ string = TQString();
string.reserve(size);
for (uint i=0; i<size; i++) {
- string[i]=QChar(ushort(array[i]+1));
+ string[i]=TQChar(ushort(array[i]+1));
}
}
-QMap<QString,QString> KexiUtils::deserializeMap(const QByteArray& array)
+TQMap<TQString,TQString> KexiUtils::deserializeMap(const TQByteArray& array)
{
- QMap<QString,QString> map;
- QDataStream ds(array, IO_ReadOnly);
+ TQMap<TQString,TQString> map;
+ TQDataStream ds(array, IO_ReadOnly);
ds >> map;
return map;
}
-QMap<QString,QString> KexiUtils::deserializeMap(const QString& string)
+TQMap<TQString,TQString> KexiUtils::deserializeMap(const TQString& string)
{
const uint size = string.length();
- QCString cstr(string.latin1());
- QByteArray array( size );
+ TQCString cstr(string.latin1());
+ TQByteArray array( size );
for (uint i=0; i<size; i++) {
- array[i] = char(string[i].unicode()-1);
+ array[i] = char(string[i].tqunicode()-1);
}
- QMap<QString,QString> map;
- QDataStream ds(array, IO_ReadOnly);
+ TQMap<TQString,TQString> map;
+ TQDataStream ds(array, IO_ReadOnly);
ds >> map;
return map;
}
-QString KexiUtils::stringToFileName(const QString& string)
+TQString KexiUtils::stringToFileName(const TQString& string)
{
- QString _string(string);
- _string.replace(QRegExp("[\\\\/:\\*?\"<>|]"), " ");
+ TQString _string(string);
+ _string.tqreplace(TQRegExp("[\\\\/:\\*?\"<>|]"), " ");
return _string.simplifyWhiteSpace();
}
-void KexiUtils::simpleCrypt(QString& string)
+void KexiUtils::simpleCrypt(TQString& string)
{
for (uint i=0; i<string.length(); i++)
- string[i] = QChar( string[i].unicode() + 47 + i );
+ string[i] = TQChar( string[i].tqunicode() + 47 + i );
}
-void KexiUtils::simpleDecrypt(QString& string)
+void KexiUtils::simpleDecrypt(TQString& string)
{
for (uint i=0; i<string.length(); i++)
- string[i] = QChar( string[i].unicode() - 47 - i );
+ string[i] = TQChar( string[i].tqunicode() - 47 - i );
}
-void KexiUtils::drawPixmap( QPainter& p, int lineWidth, const QRect& rect,
- const QPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio)
+void KexiUtils::drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
+ const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio)
{
if (pixmap.isNull())
return;
@@ -263,69 +263,69 @@ void KexiUtils::drawPixmap( QPainter& p, int lineWidth, const QRect& rect,
const int w = rect.width()-lineWidth-lineWidth;
const int h = rect.height()-lineWidth-lineWidth;
//! @todo we can optimize drawing by drawing rescaled pixmap here
-//! and performing detailed painting later (using QTimer)
- QPixmap pixmapBuffer;
- QPainter p2;
- QPainter *target;
+//! and performing detailed painting later (using TQTimer)
+ TQPixmap pixmapBuffer;
+ TQPainter p2;
+ TQPainter *target;
if (fast) {
target = &p;
}
else {
-//moved pixmapBuffer.resize(rect.size()-QSize(lineWidth, lineWidth));
+//moved pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth));
//moved p2.begin(&pm, p.device());
target = &p2;
}
//! @todo only create buffered pixmap of the minimum size and then do not fillRect()
// target->fillRect(0,0,rect.width(),rect.height(), backgroundColor);
- QPoint pos;
+ TQPoint pos;
if (scaledContents) {
if (keepAspectRatio) {
- QImage img(pixmap.convertToImage());
- img = img.smoothScale(w, h, QImage::ScaleMin);
+ TQImage img(pixmap.convertToImage());
+ img = img.smoothScale(w, h, TQ_ScaleMin);
pos = rect.topLeft(); //0, 0);
if (img.width() < w) {
- int hAlign = QApplication::horizontalAlignment( alignment );
- if ( hAlign & Qt::AlignRight )
+ int hAlign = TQApplication::horizontalAlignment( tqalignment );
+ if ( hAlign & TQt::AlignRight )
pos.setX(pos.x() + w-img.width());
- else if ( hAlign & Qt::AlignHCenter )
+ else if ( hAlign & TQt::AlignHCenter )
pos.setX(pos.x() + w/2-img.width()/2);
}
else if (img.height() < h) {
- if ( alignment & Qt::AlignBottom )
+ if ( tqalignment & TQt::AlignBottom )
pos.setY(pos.y() + h-img.height());
- else if ( alignment & Qt::AlignVCenter )
+ else if ( tqalignment & TQt::AlignVCenter )
pos.setY(pos.y() + h/2-img.height()/2);
}
pixmapBuffer.convertFromImage(img);
if (!fast) {
- p2.begin(&pixmapBuffer, p.device());
+ p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice());
}
else
target->drawPixmap(pos, pixmapBuffer);
}
else {
if (!fast) {
- pixmapBuffer.resize(rect.size()-QSize(lineWidth, lineWidth));
- p2.begin(&pixmapBuffer, p.device());
- p2.drawPixmap(QRect(rect.x(), rect.y(), w, h), pixmap);
+ pixmapBuffer.resize(rect.size()-TQSize(lineWidth, lineWidth));
+ p2.tqbegin(TQT_TQPAINTDEVICE(&pixmapBuffer), p.tqdevice());
+ p2.drawPixmap(TQRect(rect.x(), rect.y(), w, h), pixmap);
}
else
- target->drawPixmap(QRect(rect.x() + lineWidth, rect.y() + lineWidth, w, h), pixmap);
+ target->drawPixmap(TQRect(rect.x() + lineWidth, rect.y() + lineWidth, w, h), pixmap);
}
}
else {
- int hAlign = QApplication::horizontalAlignment( alignment );
- if ( hAlign & Qt::AlignRight )
+ int hAlign = TQApplication::horizontalAlignment( tqalignment );
+ if ( hAlign & TQt::AlignRight )
pos.setX(pos.x() + w-pixmap.width());
- else if ( hAlign & Qt::AlignHCenter )
+ else if ( hAlign & TQt::AlignHCenter )
pos.setX(pos.x() + w/2-pixmap.width()/2);
else //left, etc.
pos.setX(pos.x());
- if ( alignment & Qt::AlignBottom )
+ if ( tqalignment & TQt::AlignBottom )
pos.setY(pos.y() + h-pixmap.height());
- else if ( alignment & Qt::AlignVCenter )
+ else if ( tqalignment & TQt::AlignVCenter )
pos.setY(pos.y() + h/2-pixmap.height()/2);
else //top, etc.
pos.setY(pos.y());
@@ -339,27 +339,27 @@ void KexiUtils::drawPixmap( QPainter& p, int lineWidth, const QRect& rect,
bitBlt( p.device(),
// pos.x(),
// pos.y(),
- (int)p.worldMatrix().dx() + rect.x() + lineWidth + pos.x(),
- (int)p.worldMatrix().dy() + rect.y() + lineWidth + pos.y(),
+ (int)p.tqworldMatrix().dx() + rect.x() + lineWidth + pos.x(),
+ (int)p.tqworldMatrix().dy() + rect.y() + lineWidth + pos.y(),
&pixmapBuffer);
}
}
-QString KexiUtils::ptrToStringInternal(void* ptr, uint size)
+TQString KexiUtils::ptrToStringInternal(void* ptr, uint size)
{
- QString str;
+ TQString str;
unsigned char* cstr_ptr = (unsigned char*)&ptr;
for (uint i=0; i<size; i++) {
- QString s;
+ TQString s;
s.sprintf("%2.2x", cstr_ptr[i]);
str.append( s );
}
return str;
}
-void* KexiUtils::stringToPtrInternal(const QString& str, uint size)
+void* KexiUtils::stringToPtrInternal(const TQString& str, uint size)
{
- QByteArray array(size);
+ TQByteArray array(size);
if ((str.length()/2)<size)
return 0;
bool ok;
@@ -371,26 +371,26 @@ void* KexiUtils::stringToPtrInternal(const QString& str, uint size)
return *(void**)(array.data());
}
-void KexiUtils::setFocusWithReason(QWidget* widget, QFocusEvent::Reason reason)
+void KexiUtils::setFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason)
{
- QEvent fe( QEvent::FocusIn );
- QFocusEvent::setReason(reason);
- QApplication::sendEvent( widget, &fe );
- QFocusEvent::resetReason();
+ TQEvent fe( TQEvent::FocusIn );
+ TQT_TQFOCUSEVENT(&fe)->setReason(reason);
+ TQApplication::sendEvent( widget, &fe );
+ TQT_TQFOCUSEVENT(&fe)->resetReason();
}
-void KexiUtils::unsetFocusWithReason(QWidget* widget, QFocusEvent::Reason reason)
+void KexiUtils::unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason)
{
- QEvent fe( QEvent::FocusOut );
- QFocusEvent::setReason(reason);
- QApplication::sendEvent( widget, &fe );
- QFocusEvent::resetReason();
+ TQEvent fe( TQEvent::FocusOut );
+ TQT_TQFOCUSEVENT(&fe)->setReason(reason);
+ TQApplication::sendEvent( widget, &fe );
+ TQT_TQFOCUSEVENT(&fe)->resetReason();
}
-CopyFileResult KexiUtils::copyFile(const QString& src, const QString& dest)
+CopyFileResult KexiUtils::copyFile(const TQString& src, const TQString& dest)
{
-#ifdef Q_WS_WIN
- int res = fcopy( QFile::encodeName( src ), QFile::encodeName( dest ) );
+#ifdef TQ_WS_WIN
+ int res = fcopy( TQFile::encodeName( src ), TQFile::encodeName( dest ) );
if (res == fcopy_src_err)
return CopyReadError;
else if (res == fcopy_dest_err)
@@ -404,10 +404,10 @@ CopyFileResult KexiUtils::copyFile(const QString& src, const QString& dest)
int c_in=0, c_out=0;
CopyFileResult res=CopySuccess;
- in=fopen(QFile::encodeName( src ), "rb");
+ in=fopen(TQFile::encodeName( src ), "rb");
if (!in)
return CopyReadError;
- out=fopen(QFile::encodeName( dest ), "wb");
+ out=fopen(TQFile::encodeName( dest ), "wb");
if (!out)
return CopyWriteError;
while (!feof(in) && !ferror(in) && !ferror(out)) {
diff --git a/kexi/kexiutils/utils.h b/kexi/kexiutils/utils.h
index 03b775c72..118f2d647 100644
--- a/kexi/kexiutils/utils.h
+++ b/kexi/kexiutils/utils.h
@@ -22,43 +22,43 @@
#include "kexiutils_export.h"
-#include <qguardedptr.h>
-#include <qobjectlist.h>
+#include <tqguardedptr.h>
+#include <tqobjectlist.h>
#include <kmimetype.h>
-class QColor;
+class TQColor;
//! @short General Utils
namespace KexiUtils
{
- //! \return true if \a o has parent \a par.
- inline bool hasParent(QObject* par, QObject* o)
+ //! \return true if \a o has tqparent \a par.
+ inline bool hasParent(TQObject* par, TQObject* o)
{
if (!o || !par)
return false;
while (o && o!=par)
- o = o->parent();
+ o = o->tqparent();
return o==par;
}
- //! \return parent object of \a o that inherits \a className or NULL if no such parent
+ //! \return tqparent object of \a o that inherits \a className or NULL if no such tqparent
template<class type>
- inline type* findParent(QObject* o, const char* className)
+ inline type* findParent(TQT_BASE_OBJECT_NAME* o, const char* className)
{
if (!o || !className || className[0]=='\0')
return 0;
- while ( ((o=o->parent())) && !o->inherits(className) )
+ while ( ((o=TQT_TQOBJECT(o)->tqparent())) && !TQT_TQOBJECT(o)->inherits(className) )
;
return static_cast<type*>(o);
}
//! Const version of findParent()
template<class type>
- inline const type* findParentConst(const QObject* const o, const char* className)
+ inline const type* findParentConst(const TQObject* const o, const char* className)
{
- const QObject * obj = o;
+ const TQObject * obj = o;
if (!obj || !className || className[0]=='\0')
return 0;
- while ( ((obj=obj->parent())) && !obj->inherits(className) )
+ while ( ((obj=obj->tqparent())) && !obj->inherits(className) )
;
return static_cast<const type*>(obj);
}
@@ -67,23 +67,23 @@ namespace KexiUtils
If objName is 0 (the default), all object names match.
Returned pointer type is casted. */
template<class type>
- type* findFirstChild(QObject *o, const char* className, const char* objName = 0)
+ type* findFirstChild(TQT_BASE_OBJECT_NAME *o, const char* className, const char* objName = 0)
{
if (!o || !className || className[0]=='\0')
return 0;
- QObjectList *l = o->queryList( className, objName );
- QObject *result = l->first();
+ TQObjectList *l = TQT_TQOBJECT(o)->queryList( className, objName );
+ TQT_BASE_OBJECT_NAME *result = l->first();
delete l;
return static_cast<type*>(result);
}
- //! QDateTime - a hack needed because QVariant(QTime) has broken isNull()
- inline QDateTime stringToHackedQTime(const QString& s)
+ //! TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull()
+ inline TQDateTime stringToHackedTQTime(const TQString& s)
{
if (s.isEmpty())
- return QDateTime();
- // kdDebug() << QDateTime( QDate(0,1,2), QTime::fromString( s, Qt::ISODate ) ).toString(Qt::ISODate) << endl;;
- return QDateTime( QDate(0,1,2), QTime::fromString( s, Qt::ISODate ) );
+ return TQDateTime();
+ // kdDebug() << TQDateTime( TQDate(0,1,2), TQTime::fromString( s, Qt::ISODate ) ).toString(Qt::ISODate) << endl;;
+ return TQDateTime( TQDate(0,1,2), TQTime::fromString( s, Qt::ISODate ) );
}
/*! Sets "wait" cursor with 1 second delay (or 0 seconds if noDelay is true).
@@ -126,118 +126,118 @@ namespace KexiUtils
bool m_reactivateCursor : 1;
};
- /*! \return filter string in QFileDialog format for a mime type pointed by \a mime
- If \a kdeFormat is true, QFileDialog-compatible filter string is generated,
+ /*! \return filter string in TQFileDialog format for a mime type pointed by \a mime
+ If \a kdeFormat is true, TQFileDialog-compatible filter string is generated,
eg. "Image files (*.png *.xpm *.jpg)", otherwise KFileDialog -compatible
filter string is generated, eg. "*.png *.xpm *.jpg|Image files (*.png *.xpm *.jpg)".
"\\n" is appended if \a kdeFormat is true, otherwise ";;" is appended. */
- KEXIUTILS_EXPORT QString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true);
+ KEXIUTILS_EXPORT TQString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true);
- /*! @overload QString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true) */
- KEXIUTILS_EXPORT QString fileDialogFilterString(const QString& mimeString, bool kdeFormat = true);
+ /*! @overload TQString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true) */
+ KEXIUTILS_EXPORT TQString fileDialogFilterString(const TQString& mimeString, bool kdeFormat = true);
- /*! Like QString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true)
+ /*! Like TQString fileDialogFilterString(const KMimeType::Ptr& mime, bool kdeFormat = true)
but returns a list of filter strings. */
- KEXIUTILS_EXPORT QString fileDialogFilterStrings(const QStringList& mimeStrings, bool kdeFormat);
+ KEXIUTILS_EXPORT TQString fileDialogFilterStrings(const TQStringList& mimeStrings, bool kdeFormat);
/*! \return a color being a result of blending \a c1 with \a c2 with \a factor1
and \a factor1 factors: (c1*factor1+c2*factor2)/(factor1+factor2). */
- KEXIUTILS_EXPORT QColor blendedColors(const QColor& c1, const QColor& c2, int factor1 = 1, int factor2 = 1);
+ KEXIUTILS_EXPORT TQColor blendedColors(const TQColor& c1, const TQColor& c2, int factor1 = 1, int factor2 = 1);
/*! \return a contrast color for a color \a c:
If \a c is light color, darker color created using c.dark(200) is returned;
otherwise lighter color created using c.light(200) is returned. */
- KEXIUTILS_EXPORT QColor contrastColor(const QColor& c);
+ KEXIUTILS_EXPORT TQColor contrastColor(const TQColor& c);
/*! \return a lighter color for a color \a c and a factor \a factor.
- For colors like Qt::red or Qt::green where hue and saturation are near to 255,
+ For colors like TQt::red or TQt::green where hue and saturation are near to 255,
hue is decreased so the result will be more bleached.
For black color the result is dark gray rather than black. */
- KEXIUTILS_EXPORT QColor bleachedColor(const QColor& c, int factor);
+ KEXIUTILS_EXPORT TQColor bleachedColor(const TQColor& c, int factor);
/*! \return icon set computed as a result of colorizing \a icon pixmap with "buttonText"
color of \a palette palette. This function is useful for displaying monochromed icons
on the list view or table view header, to avoid bloat, but still have the color compatible
with accessibility settings. */
- KEXIUTILS_EXPORT QIconSet colorizeIconToTextColor(const QPixmap& icon, const QPalette& palette);
+ KEXIUTILS_EXPORT TQIconSet colorizeIconToTextColor(const TQPixmap& icon, const TQPalette& palette);
/*! \return empty (fully transparent) pixmap that can be used as a place for icon of size \a iconGroup */
- KEXIUTILS_EXPORT QPixmap emptyIcon(KIcon::Group iconGroup);
+ KEXIUTILS_EXPORT TQPixmap emptyIcon(KIcon::Group iconGroup);
/*! Serializes \a map to \a array.
KexiUtils::deserializeMap() can be used to deserialize this array back to map. */
- KEXIUTILS_EXPORT void serializeMap(const QMap<QString,QString>& map, const QByteArray& array);
- KEXIUTILS_EXPORT void serializeMap(const QMap<QString,QString>& map, QString& string);
+ KEXIUTILS_EXPORT void serializeMap(const TQMap<TQString,TQString>& map, const TQByteArray& array);
+ KEXIUTILS_EXPORT void serializeMap(const TQMap<TQString,TQString>& map, TQString& string);
/*! \return a map deserialized from a byte array \a array.
\a array need to contain data previously serialized using KexiUtils::serializeMap(). */
- KEXIUTILS_EXPORT QMap<QString,QString> deserializeMap(const QByteArray& array);
+ KEXIUTILS_EXPORT TQMap<TQString,TQString> deserializeMap(const TQByteArray& array);
/*! \return a map deserialized from \a string.
\a string need to contain data previously serialized using KexiUtils::serializeMap(). */
- KEXIUTILS_EXPORT QMap<QString,QString> deserializeMap(const QString& string);
+ KEXIUTILS_EXPORT TQMap<TQString,TQString> deserializeMap(const TQString& string);
/*! \return a valid filename converted from \a string by:
- replacing \\, /, :, *, ?, ", <, >, |, \n \\t characters with a space
- - simplifing whitespace by removing redundant space characters using QString::simplifyWhiteSpace()
+ - simplifing whitespace by removing redundant space characters using TQString::simplifyWhiteSpace()
Do not pass full paths here, but only filename strings. */
- KEXIUTILS_EXPORT QString stringToFileName(const QString& string);
+ KEXIUTILS_EXPORT TQString stringToFileName(const TQString& string);
/*! Performs a simple \a string encryption using rot47-like algorithm.
- Each character's unicode value is increased by 47 + i (where i is index of the character).
+ Each character's tqunicode value is increased by 47 + i (where i is index of the character).
The resulting string still contains redable characters.
Do not use this for data that can be accessed by attackers! */
- KEXIUTILS_EXPORT void simpleCrypt(QString& string);
+ KEXIUTILS_EXPORT void simpleCrypt(TQString& string);
/*! Performs a simple \a string decryption using rot47-like algorithm,
using opposite operations to KexiUtils::simpleCrypt(). */
- KEXIUTILS_EXPORT void simpleDecrypt(QString& string);
+ KEXIUTILS_EXPORT void simpleDecrypt(TQString& string);
#ifdef KEXI_DEBUG_GUI
//! Creates debug window for convenient debugging output
- KEXIUTILS_EXPORT QWidget *createDebugWindow(QWidget *parent);
+ KEXIUTILS_EXPORT TQWidget *createDebugWindow(TQWidget *tqparent);
//! Adds debug line for for KexiDB database
- KEXIUTILS_EXPORT void addKexiDBDebug(const QString& text);
+ KEXIUTILS_EXPORT void addKexiDBDebug(const TQString& text);
//! Adds debug line for for Table Designer (Alter Table actions)
- KEXIUTILS_EXPORT void addAlterTableActionDebug(const QString& text, int nestingLevel = 0);
+ KEXIUTILS_EXPORT void addAlterTableActionDebug(const TQString& text, int nestingLevel = 0);
//! Connects push button action to \a receiver and its \a slot. This allows to execute debug-related actions
//! using buttons displayed in the debug window.
KEXIUTILS_EXPORT void connectPushButtonActionForDebugWindow(const char* actionName,
- const QObject *receiver, const char* slot);
+ const TQObject *receiver, const char* slot);
#endif
//! Draws pixmap on painter \a p using predefined parameters.
//! Used in KexiDBImageBox and KexiBlobTableEdit.
- KEXIUTILS_EXPORT void drawPixmap( QPainter& p, int lineWidth, const QRect& rect,
- const QPixmap& pixmap, int alignment, bool scaledContents, bool keepAspectRatio);
+ KEXIUTILS_EXPORT void drawPixmap( TQPainter& p, int lineWidth, const TQRect& rect,
+ const TQPixmap& pixmap, int tqalignment, bool scaledContents, bool keepAspectRatio);
//! @internal
- KEXIUTILS_EXPORT QString ptrToStringInternal(void* ptr, uint size);
+ KEXIUTILS_EXPORT TQString ptrToStringInternal(void* ptr, uint size);
//! @internal
- KEXIUTILS_EXPORT void* stringToPtrInternal(const QString& str, uint size);
+ KEXIUTILS_EXPORT void* stringToPtrInternal(const TQString& str, uint size);
//! \return a pointer \a ptr safely serialized to string
template<class type>
- QString ptrToString(type *ptr)
+ TQString ptrToString(type *ptr)
{
return ptrToStringInternal(ptr, sizeof(type*));
}
//! \return a pointer of type \a type safely deserialized from \a str
template<class type>
- type* stringToPtr(const QString& str)
+ type* stringToPtr(const TQString& str)
{
return static_cast<type*>( stringToPtrInternal(str, sizeof(type*)) );
}
//! Sets focus for widget \a widget with reason \a reason.
- KEXIUTILS_EXPORT void setFocusWithReason(QWidget* widget, QFocusEvent::Reason reason);
+ KEXIUTILS_EXPORT void setFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason);
//! Unsets focus for widget \a widget with reason \a reason.
- KEXIUTILS_EXPORT void unsetFocusWithReason(QWidget* widget, QFocusEvent::Reason reason);
+ KEXIUTILS_EXPORT void unsetFocusWithReason(TQWidget* widget, TQFocusEvent::Reason reason);
//! Used by copyFile()
enum CopyFileResult {
@@ -250,17 +250,17 @@ namespace KexiUtils
Copies @p src file to @p dest file.
@return CopySuccess on success, CopyReadError on source file error,
CopyWriteError on destination file error.
- @todo remove: QFile in Qt4 provides this.
+ @todo remove: TQFile in TQt4 provides this.
*/
- KEXIUTILS_EXPORT CopyFileResult copyFile(const QString& src, const QString& dest);
+ KEXIUTILS_EXPORT CopyFileResult copyFile(const TQString& src, const TQString& dest);
}
-//! sometimes we leave a space in the form of empty QFrame and want to insert here
+//! sometimes we leave a space in the form of empty TQFrame and want to insert here
//! a widget that must be instantiated by hand.
//! This macro inserts a widget \a what into a frame \a where.
#define GLUE_WIDGET(what, where) \
- { QVBoxLayout *lyr = new QVBoxLayout(where); \
+ { TQVBoxLayout *lyr = new TQVBoxLayout(where); \
lyr->addWidget(what); }
diff --git a/kexi/kexiutils/utils_p.h b/kexi/kexiutils/utils_p.h
index 821c22b10..b91f22371 100644
--- a/kexi/kexiutils/utils_p.h
+++ b/kexi/kexiutils/utils_p.h
@@ -20,14 +20,15 @@
#ifndef KEXIUTILS_P_H
#define KEXIUTILS_P_H
-#include <qtimer.h>
-#include <qapplication.h>
-#include <qdialog.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
+#include <tqdialog.h>
/*! @internal */
-class DelayedCursorHandler : public QObject
+class DelayedCursorHandler : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
DelayedCursorHandler();
void start(bool noDelay);
@@ -36,17 +37,17 @@ class DelayedCursorHandler : public QObject
protected slots:
void show();
protected:
- QTimer timer;
+ TQTimer timer;
};
/*! @internal */
-class DebugWindowDialog : public QDialog
+class DebugWindowDialog : public TQDialog
{
public:
- explicit DebugWindowDialog( QWidget * parent )
- : QDialog(parent, 0, false, Qt::WType_Dialog|Qt::WStyle_MinMax|Qt::WStyle_StaysOnTop)
+ explicit DebugWindowDialog( TQWidget * tqparent )
+ : TQDialog(tqparent, 0, false, TQt::WType_Dialog|TQt::WStyle_MinMax|TQt::WStyle_StaysOnTop)
{
- setWindowState( Qt::WindowMinimized );
+ setWindowState( TQt::WindowMinimized );
}
};
diff --git a/kexi/kexiutils/validator.cpp b/kexi/kexiutils/validator.cpp
index e27077ec4..54af4ccde 100644
--- a/kexi/kexiutils/validator.cpp
+++ b/kexi/kexiutils/validator.cpp
@@ -21,8 +21,8 @@
using namespace KexiUtils;
-Validator::Validator(QObject * parent, const char * name)
-: QValidator(parent,name)
+Validator::Validator(TQObject * tqparent, const char * name)
+: TQValidator(tqparent,name)
, m_acceptsEmptyValue(false)
{
}
@@ -31,12 +31,12 @@ Validator::~Validator()
{
}
-Validator::Result Validator::check(const QString &valueName, const QVariant& v,
- QString &message, QString &details)
+Validator::Result Validator::check(const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details)
{
- if (v.isNull() || v.type()==QVariant::String && v.toString().isEmpty()) {
+ if (v.isNull() || v.type()==TQVariant::String && v.toString().isEmpty()) {
if (!m_acceptsEmptyValue) {
- message = Validator::msgColumnNotEmpty().arg(valueName);
+ message = Validator::msgColumnNotEmpty().tqarg(valueName);
return Error;
}
return Ok;
@@ -44,46 +44,46 @@ Validator::Result Validator::check(const QString &valueName, const QVariant& v,
return internalCheck(valueName, v, message, details);
}
-Validator::Result Validator::internalCheck(const QString & /*valueName*/,
- const QVariant& /*v*/, QString & /*message*/, QString & /*details*/)
+Validator::Result Validator::internalCheck(const TQString & /*valueName*/,
+ const TQVariant& /*v*/, TQString & /*message*/, TQString & /*details*/)
{
return Error;
}
-QValidator::State Validator::validate ( QString & , int & ) const
+TQValidator::State Validator::validate ( TQString & , int & ) const
{
- return QValidator::Acceptable;
+ return TQValidator::Acceptable;
}
//-----------------------------------------------------------
-MultiValidator::MultiValidator(QObject* parent, const char * name)
- : Validator(parent, name)
+MultiValidator::MultiValidator(TQObject* tqparent, const char * name)
+ : Validator(tqparent, name)
{
m_ownedSubValidators.setAutoDelete(true);
}
-MultiValidator::MultiValidator(QValidator *validator,
- QObject * parent, const char * name)
- : Validator(parent, name)
+MultiValidator::MultiValidator(TQValidator *validator,
+ TQObject * tqparent, const char * name)
+ : Validator(tqparent, name)
{
addSubvalidator(validator);
}
-void MultiValidator::addSubvalidator( QValidator* validator, bool owned )
+void MultiValidator::addSubvalidator( TQValidator* validator, bool owned )
{
if (!validator)
return;
m_subValidators.append(validator);
- if (owned && !validator->parent())
+ if (owned && !validator->tqparent())
m_ownedSubValidators.append(validator);
}
-QValidator::State MultiValidator::validate( QString & input, int & pos ) const
+TQValidator::State MultiValidator::validate( TQString & input, int & pos ) const
{
State s;
- foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators ) {
+ foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators ) {
s = (*it)->validate(input, pos);
if (s==Intermediate || s==Invalid)
return s;
@@ -91,19 +91,19 @@ QValidator::State MultiValidator::validate( QString & input, int & pos ) const
return Acceptable;
}
-void MultiValidator::fixup ( QString & input ) const
+void MultiValidator::fixup ( TQString & input ) const
{
- foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators )
+ foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators )
(*it)->fixup(input);
}
Validator::Result MultiValidator::internalCheck(
- const QString &valueName, const QVariant& v,
- QString &message, QString &details)
+ const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details)
{
Result r;
bool warning = false;
- foreach( QValueList<QValidator*>::ConstIterator, it, m_subValidators ) {
+ foreach( TQValueList<TQValidator*>::ConstIterator, it, m_subValidators ) {
if (dynamic_cast<Validator*>(*it))
r = dynamic_cast<Validator*>(*it)->internalCheck(valueName, v, message, details);
else
diff --git a/kexi/kexiutils/validator.h b/kexi/kexiutils/validator.h
index 5a33d4c6f..b5c6e6cc1 100644
--- a/kexi/kexiutils/validator.h
+++ b/kexi/kexiutils/validator.h
@@ -22,32 +22,32 @@
#include "kexiutils_export.h"
-#include <qvalidator.h>
-#include <qvariant.h>
-#include <qstring.h>
+#include <tqvalidator.h>
+#include <tqvariant.h>
+#include <tqstring.h>
#include <klocale.h>
namespace KexiUtils {
-//! @short A validator extending QValidator with offline-checking for value's validity
+//! @short A validator extending TQValidator with offline-checking for value's validity
/*!
The offline-checking for value's validity is provided by \ref Validator::check() method.
The validator groups two purposes into one container:
- string validator for line editors (online checking, "on typing");
- - offline-checking for QVariant values, reimplementing validate().
+ - offline-checking for TQVariant values, reimplementing validate().
It also offers error and warning messages for check() method.
You may need to reimplement:
- - QValidator::State IdentifierValidator::validate( QString& input, int& pos ) const;
- - Result check(const QString &valueName, QVariant v, QString &message, QString &details);
+ - TQValidator::State IdentifierValidator::validate( TQString& input, int& pos ) const;
+ - Result check(const TQString &valueName, TQVariant v, TQString &message, TQString &details);
*/
-class KEXIUTILS_EXPORT Validator : public QValidator
+class KEXIUTILS_EXPORT Validator : public TQValidator
{
public:
typedef enum Result { Error = 0, Ok = 1, Warning = 2 };
- Validator(QObject * parent = 0, const char * name = 0);
+ Validator(TQObject * tqparent = 0, const char * name = 0);
virtual ~Validator();
/*! Sets accepting empty values on (true) or off (false).
@@ -67,14 +67,14 @@ class KEXIUTILS_EXPORT Validator : public QValidator
\a valueName can be used to contruct \a message as well, for example:
"[valueName] is not a valid login name".
Depending on acceptsEmptyValue(), immediately accepts empty values or not. */
- Result check(const QString &valueName, const QVariant& v, QString &message,
- QString &details);
+ Result check(const TQString &valueName, const TQVariant& v, TQString &message,
+ TQString &details);
- /*! This implementation always returns value QValidator::Acceptable. */
- virtual QValidator::State validate ( QString & input, int & pos ) const;
+ /*! This implementation always returns value TQValidator::Acceptable. */
+ virtual TQValidator::State validate ( TQString & input, int & pos ) const;
//! A generic error/warning message
- static const QString msgColumnNotEmpty() {
+ static const TQString msgColumnNotEmpty() {
return I18N_NOOP("\"%1\" value has to be entered.");
}
@@ -83,15 +83,15 @@ class KEXIUTILS_EXPORT Validator : public QValidator
protected:
/* Used by check(), for reimplementation, by default returns \a Error.*/
- virtual Result internalCheck(const QString &valueName, const QVariant& v,
- QString &message, QString &details);
+ virtual Result internalCheck(const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
bool m_acceptsEmptyValue : 1;
friend class MultiValidator;
};
-//! @short A validator groupping multiple QValidators
+//! @short A validator groupping multiple TQValidators
/*! MultiValidator behaves like normal KexiUtils::Validator,
but it allows to add define more than one different validator.
Given validation is successful if every subvalidator accepted given value.
@@ -105,10 +105,10 @@ class KEXIUTILS_EXPORT Validator : public QValidator
no validator returned error;
- Ok is returned only if exactly all subvalidators returned Ok.
- If there is no subvalidators defined, Error is always returned.
- - If a given subvalidator is not of class Validator but ust QValidator,
+ - If a given subvalidator is not of class Validator but ust TQValidator,
it's assumed it's check() method returned Ok.
- - result of calling validate() (a method implemented for QValidator)
+ - result of calling validate() (a method implemented for TQValidator)
depends on value of validate() returned by subvalidators:
- Invalid is returned if at least one subvalidator returned Invalid
- Intermediate is returned if at least one subvalidator returned Intermediate
@@ -122,35 +122,35 @@ class KEXIUTILS_EXPORT MultiValidator : public Validator
public:
/*! Constructs multivalidator with no subvalidators defined.
You can add more validators with addSubvalidator(). */
- MultiValidator(QObject * parent = 0, const char * name = 0);
+ MultiValidator(TQObject * tqparent = 0, const char * name = 0);
/*! Constructs multivalidator with one validator \a validator.
- It will be owned if has no parent defined.
+ It will be owned if has no tqparent defined.
You can add more validators with addSubvalidator(). */
- MultiValidator(QValidator *validator, QObject * parent = 0, const char * name = 0);
+ MultiValidator(TQValidator *validator, TQObject * tqparent = 0, const char * name = 0);
/*! Adds validator \a validator as another subvalidator.
Subvalidator will be owned by this multivalidator if \a owned is true
- and its parent is NULL. */
- void addSubvalidator( QValidator* validator, bool owned = true );
+ and its tqparent is NULL. */
+ void addSubvalidator( TQValidator* validator, bool owned = true );
/*! Reimplemented to call validate() on subvalidators. */
- virtual QValidator::State validate ( QString & input, int & pos ) const;
+ virtual TQValidator::State validate ( TQString & input, int & pos ) const;
- /*! Calls QValidator::fixup() on every subvalidator.
+ /*! Calls TQValidator::fixup() on every subvalidator.
This may be senseless to use this methog in certain cases
(can return weir results), so think twice before.. */
- virtual void fixup ( QString & input ) const;
+ virtual void fixup ( TQString & input ) const;
private:
virtual Validator::Result internalCheck(
- const QString &valueName, const QVariant& v,
- QString &message, QString &details);
+ const TQString &valueName, const TQVariant& v,
+ TQString &message, TQString &details);
protected:
- QPtrList<QValidator> m_ownedSubValidators;
- QValueList<QValidator*> m_subValidators;
+ TQPtrList<TQValidator> m_ownedSubValidators;
+ TQValueList<TQValidator*> m_subValidators;
};
}
diff --git a/kexi/main.cpp b/kexi/main.cpp
index d299e3cba..1c61d4e56 100644
--- a/kexi/main.cpp
+++ b/kexi/main.cpp
@@ -22,16 +22,16 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
+#include <tqapplication.h>
#include <main/keximainwindowimpl.h>
extern "C" int kdemain(int argc, char *argv[])
{
int result = KexiMainWindowImpl::create(argc, argv);
- if (!qApp)
+ if (!tqApp)
return result;
- result = qApp->exec();
- delete qApp;
+ result = tqApp->exec();
+ delete tqApp;
return result;
}
diff --git a/kexi/main/kexifinddialog.cpp b/kexi/main/kexifinddialog.cpp
index 58f693c06..d74749589 100644
--- a/kexi/main/kexifinddialog.cpp
+++ b/kexi/main/kexifinddialog.cpp
@@ -29,11 +29,11 @@
#include <kaction.h>
#include <kiconloader.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qguardedptr.h>
-#include <qlayout.h>
-#include <qaccel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqguardedptr.h>
+#include <tqlayout.h>
+#include <tqaccel.h>
//! @internal
class KexiFindDialog::Private
@@ -48,60 +48,60 @@ class KexiFindDialog::Private
}
//! Connects action \a action with appropriate signal \a member
//! and optionally adds accel that will receive shortcut for \a action
- //! at global scope of the dialog \a parent.
- void setActionAndAccel(KAction *action, QWidget* parent, const char* member)
+ //! at global scope of the dialog \a tqparent.
+ void setActionAndAccel(KAction *action, TQWidget* tqparent, const char* member)
{
if (!action)
return;
- QObject::connect(parent, member, action, SLOT(activate()));
+ TQObject::connect(tqparent, member, action, TQT_SLOT(activate()));
if (action->shortcut().isNull())
return;
- QAccel *accel = new QAccel(parent); // we want to handle dialog-wide shortcut as well
+ TQAccel *accel = new TQAccel(tqparent); // we want to handle dialog-wide shortcut as well
accels.append( accel );
accel->connectItem(
- accel->insertItem( action->shortcut() ), parent, member );
+ accel->insertItem( action->shortcut() ), tqparent, member );
}
- QStringList lookInColumnNames;
- QStringList lookInColumnCaptions;
- QString objectName; //!< for caption
- QGuardedPtr<KAction> findnextAction;
- QGuardedPtr<KAction> findprevAction;
- QGuardedPtr<KAction> replaceAction;
- QGuardedPtr<KAction> replaceallAction;
- QPtrList<QAccel> accels;
+ TQStringList lookInColumnNames;
+ TQStringList lookInColumnCaptions;
+ TQString objectName; //!< for caption
+ TQGuardedPtr<KAction> findnextAction;
+ TQGuardedPtr<KAction> findprevAction;
+ TQGuardedPtr<KAction> replaceAction;
+ TQGuardedPtr<KAction> replaceallAction;
+ TQPtrList<TQAccel> accels;
bool replaceMode : 1;
};
//------------------------------------------
-KexiFindDialog::KexiFindDialog( QWidget* parent )
- : KexiFindDialogBase(parent, "KexiFindDialog", false/*!modal*/,
- Qt::WType_Dialog|Qt::WStyle_NormalBorder|Qt::WStyle_Title
- |Qt::WStyle_SysMenu|Qt::WStyle_Customize|Qt::WStyle_Tool)
+KexiFindDialog::KexiFindDialog( TQWidget* tqparent )
+ : KexiFindDialogBase(tqparent, "KexiFindDialog", false/*!modal*/,
+ TQt::WType_Dialog|TQt::WStyle_NormalBorder|TQt::WStyle_Title
+ |TQt::WStyle_SysMenu|TQt::WStyle_Customize|TQt::WStyle_Tool)
, d( new Private() )
{
m_search->setCurrentItem((int)KexiSearchAndReplaceViewInterface::Options::SearchDown);
- layout()->setMargin( KDialog::marginHint() );
- layout()->setSpacing( KDialog::spacingHint() );
+ tqlayout()->setMargin( KDialog::marginHint() );
+ tqlayout()->setSpacing( KDialog::spacingHint() );
KAction *a = KStdAction::findNext(0, 0, 0);
m_btnFind->setText(a->text());
m_btnFind->setIconSet(a->iconSet());
delete a;
m_btnClose->setText(KStdGuiItem::close().text());
m_btnClose->setIconSet(KStdGuiItem::close().iconSet());
- connect(m_btnFind, SIGNAL(clicked()), this, SIGNAL(findNext()));
- connect(m_btnClose, SIGNAL(clicked()), this, SLOT(slotCloseClicked()));
- connect(m_btnReplace, SIGNAL(clicked()), this, SIGNAL(replaceNext()));
- connect(m_btnReplaceAll, SIGNAL(clicked()), this, SIGNAL(replaceAll()));
+ connect(m_btnFind, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(findNext()));
+ connect(m_btnClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCloseClicked()));
+ connect(m_btnReplace, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(replaceNext()));
+ connect(m_btnReplaceAll, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(replaceAll()));
// clear message after the text is changed
- connect(m_textToFind, SIGNAL(textChanged()), this, SIGNAL(updateMessage()));
- connect(m_textToReplace, SIGNAL(textChanged()), this, SIGNAL(updateMessage()));
+ connect(m_textToFind, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(updateMessage()));
+ connect(m_textToReplace, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(updateMessage()));
d->replaceMode = true; //to force updating by setReplaceMode()
setReplaceMode(false);
- setLookInColumnList(QStringList(), QStringList());
+ setLookInColumnList(TQStringList(), TQStringList());
}
KexiFindDialog::~KexiFindDialog()
@@ -110,51 +110,51 @@ KexiFindDialog::~KexiFindDialog()
}
void KexiFindDialog::setActions( KAction *findnext, KAction *findprev,
- KAction *replace, KAction *replaceall )
+ KAction *tqreplace, KAction *replaceall )
{
d->findnextAction = findnext;
d->findprevAction = findprev;
- d->replaceAction = replace;
+ d->replaceAction = tqreplace;
d->replaceallAction = replaceall;
d->accels.clear();
- d->setActionAndAccel(d->findnextAction, this, SIGNAL(findNext()));
- d->setActionAndAccel(d->findprevAction, this, SIGNAL(findPrevious()));
- d->setActionAndAccel(d->replaceAction, this, SIGNAL(replaceNext()));
- d->setActionAndAccel(d->replaceallAction, this, SIGNAL(replaceAll()));
+ d->setActionAndAccel(d->findnextAction, this, TQT_SIGNAL(findNext()));
+ d->setActionAndAccel(d->findprevAction, this, TQT_SIGNAL(findPrevious()));
+ d->setActionAndAccel(d->replaceAction, this, TQT_SIGNAL(replaceNext()));
+ d->setActionAndAccel(d->replaceallAction, this, TQT_SIGNAL(replaceAll()));
}
-QStringList KexiFindDialog::lookInColumnNames() const
+TQStringList KexiFindDialog::lookInColumnNames() const
{
return d->lookInColumnNames;
}
-QStringList KexiFindDialog::lookInColumnCaptions() const
+TQStringList KexiFindDialog::lookInColumnCaptions() const
{
return d->lookInColumnCaptions;
}
-QString KexiFindDialog::currentLookInColumnName() const
+TQString KexiFindDialog::currentLookInColumnName() const
{
int index = m_lookIn->currentItem();
if (index <= 0 || index >= (int)d->lookInColumnNames.count())
- return QString::null;
+ return TQString();
else if (index == 1)
return "(field)";
return d->lookInColumnNames[index - 1/*"(All fields)"*/ - 1/*"(Current field)"*/];
}
-QVariant KexiFindDialog::valueToFind() const
+TQVariant KexiFindDialog::valueToFind() const
{
return m_textToFind->currentText();
}
-QVariant KexiFindDialog::valueToReplaceWith() const
+TQVariant KexiFindDialog::valueToReplaceWith() const
{
return m_textToReplace->currentText();
}
-void KexiFindDialog::setLookInColumnList(const QStringList& columnNames,
- const QStringList& columnCaptions)
+void KexiFindDialog::setLookInColumnList(const TQStringList& columnNames,
+ const TQStringList& columnCaptions)
{
d->lookInColumnNames = columnNames;
d->lookInColumnCaptions = columnCaptions;
@@ -164,7 +164,7 @@ void KexiFindDialog::setLookInColumnList(const QStringList& columnNames,
m_lookIn->insertStringList(d->lookInColumnCaptions);
}
-void KexiFindDialog::setCurrentLookInColumnName(const QString& columnName)
+void KexiFindDialog::setCurrentLookInColumnName(const TQString& columnName)
{
int index;
if (columnName.isEmpty())
@@ -172,10 +172,10 @@ void KexiFindDialog::setCurrentLookInColumnName(const QString& columnName)
else if (columnName == "(field)")
index = 1;
else {
- index = d->lookInColumnNames.findIndex( columnName );
+ index = d->lookInColumnNames.tqfindIndex( columnName );
if (index == -1) {
- kdWarning() << QString("KexiFindDialog::setCurrentLookInColumn(%1) column name not found on the list")
- .arg(columnName) << endl;
+ kdWarning() << TQString("KexiFindDialog::setCurrentLookInColumn(%1) column name not found on the list")
+ .tqarg(columnName) << endl;
return;
}
index = index + 1/*"(All fields)"*/ + 1/*"(Current field)"*/;
@@ -207,20 +207,20 @@ void KexiFindDialog::setReplaceMode(bool set)
updateGeometry();
}
-void KexiFindDialog::setObjectNameForCaption(const QString& name)
+void KexiFindDialog::setObjectNameForCaption(const TQString& name)
{
d->objectName = name;
if (d->replaceMode) {
if (name.isEmpty())
setCaption(i18n("Replace"));
else
- setCaption(i18n("Replace in \"%1\"").arg(name));
+ setCaption(i18n("Replace in \"%1\"").tqarg(name));
}
else {
if (name.isEmpty())
setCaption(i18n("Find"));
else
- setCaption(i18n("Find in \"%1\"").arg(name));
+ setCaption(i18n("Find in \"%1\"").tqarg(name));
}
}
@@ -230,10 +230,10 @@ void KexiFindDialog::setButtonsEnabled(bool enable)
m_btnReplace->setEnabled(enable);
m_btnReplaceAll->setEnabled(enable);
if (!enable)
- setObjectNameForCaption(QString::null);
+ setObjectNameForCaption(TQString());
}
-void KexiFindDialog::setMessage(const QString& message)
+void KexiFindDialog::setMessage(const TQString& message)
{
m_messageLabel->setText(message);
}
@@ -241,7 +241,7 @@ void KexiFindDialog::setMessage(const QString& message)
void KexiFindDialog::updateMessage( bool found )
{
if (found)
- setMessage(QString::null);
+ setMessage(TQString());
else
setMessage(i18n("The search item was not found"));
}
@@ -254,7 +254,7 @@ void KexiFindDialog::slotCloseClicked()
void KexiFindDialog::show()
{
m_textToFind->setFocus();
- QDialog::show();
+ TQDialog::show();
}
KexiSearchAndReplaceViewInterface::Options KexiFindDialog::options() const
diff --git a/kexi/main/kexifinddialog.h b/kexi/main/kexifinddialog.h
index ea7777e06..9d0bf088c 100644
--- a/kexi/main/kexifinddialog.h
+++ b/kexi/main/kexifinddialog.h
@@ -34,14 +34,15 @@ class KAction;
class KexiFindDialog : public KexiFindDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Creates a new find dialog. Replace mode is off by default.
- KexiFindDialog(QWidget* parent);
+ KexiFindDialog(TQWidget* tqparent);
virtual ~KexiFindDialog();
//! Sets actions that receive button clicks and shortcuts within the dialog. Should be called once.
void setActions( KAction *findnext, KAction *findprev,
- KAction *replace, KAction *replaceall );
+ KAction *tqreplace, KAction *replaceall );
//! Shows the dialog as a modal dialog.
virtual void show();
@@ -52,54 +53,54 @@ class KexiFindDialog : public KexiFindDialogBase
/*! \return a list of column names for 'look in column' combo box.
Neither "(All fields)" nor "(Current field)" items are prepended. */
- QStringList lookInColumnNames() const;
+ TQStringList lookInColumnNames() const;
/*! \return a list of column captions (i.e. visible values) for 'look in column' combo box.
Neither "(All fields)" nor "(Current field)" items are prepended. */
- QStringList lookInColumnCaptions() const;
+ TQStringList lookInColumnCaptions() const;
/*! \return column name selected in "look in column" combo box.
If "(All fields)" item is selected, empty string is returned.
If "(Current field)" item is selected, "(field)" string is returned. */
- QString currentLookInColumnName() const;
+ TQString currentLookInColumnName() const;
//! \return value that to be used for searching
- QVariant valueToFind() const;
+ TQVariant valueToFind() const;
//! \return value that to be used as a replacement
- QVariant valueToReplaceWith() const;
+ TQVariant valueToReplaceWith() const;
public slots:
/*! Sets \a columnNames list and \a columnCaptions for 'look in column' combo box.
\a columnCaptions are visible values, while \a columnNames are used for returning
in currentLookInColumn().
"(All fields)" and "(Current field)" items are also prepended. */
- void setLookInColumnList(const QStringList& columnNames,
- const QStringList& columnCaptions);
+ void setLookInColumnList(const TQStringList& columnNames,
+ const TQStringList& columnCaptions);
/*! Selects \a columnName to be selected 'look in column'.
By default "(All fields)" item is selected. To select this item,
pass empty string as \a columnName.
To select "(Current field)" item, "(field)" string should be passed
as \a columnName. */
- void setCurrentLookInColumnName(const QString& columnName);
+ void setCurrentLookInColumnName(const TQString& columnName);
/*! Sets or clears replace mode.
- For replace mode 'prompt or replace' option is visible. */
+ For replace mode 'prompt or tqreplace' option is visible. */
void setReplaceMode(bool set);
/*! Sets object name for caption, so for example it will be set
to i18n("Find \"Persons\"")). */
- void setObjectNameForCaption(const QString& name);
+ void setObjectNameForCaption(const TQString& name);
- /*! Enables of disables the find/replace/replace all buttons.
+ /*! Enables of disables the tqfind/tqreplace/replace all buttons.
This is used if for the current context the dialog could not be used.
If \a enable is false, object name for caption is cleared
using setObjectNameForCaption() too. */
void setButtonsEnabled(bool enable);
/*! Sets message at the bottom to \a message. */
- void setMessage(const QString& message);
+ void setMessage(const TQString& message);
/*! Updates message at the bottom; "The search item was not found" is set if \a found is true,
else the message is cleared. */
diff --git a/kexi/main/kexifinddialogbase.ui b/kexi/main/kexifinddialogbase.ui
index 3ba82bb50..5c7e66304 100644
--- a/kexi/main/kexifinddialogbase.ui
+++ b/kexi/main/kexifinddialogbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiFindDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KexiFindDialogBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -30,7 +30,7 @@
<cstring>m_textToFind</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>m_replaceLbl</cstring>
</property>
@@ -52,7 +52,7 @@
<enum>NoInsertion</enum>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -63,7 +63,7 @@
<cstring>m_lookIn</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="2">
+ <widget class="TQCheckBox" row="5" column="2">
<property name="name">
<cstring>m_wholeWords</cstring>
</property>
@@ -74,7 +74,7 @@
<string>&amp;Whole words only</string>
</property>
</widget>
- <widget class="QCheckBox" row="6" column="2">
+ <widget class="TQCheckBox" row="6" column="2">
<property name="name">
<cstring>m_promptOnReplace</cstring>
</property>
@@ -82,15 +82,15 @@
<enum>WheelFocus</enum>
</property>
<property name="text">
- <string>Prompt on replace</string>
+ <string>Prompt on tqreplace</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="4" rowspan="7" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="4" rowspan="7" colspan="1">
<property name="name">
- <cstring>layout_btn</cstring>
+ <cstring>tqlayout_btn</cstring>
</property>
<vbox>
<property name="name">
@@ -150,7 +150,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -159,7 +159,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel2_2_3</cstring>
</property>
@@ -196,7 +196,7 @@
<enum>NoInsertion</enum>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -243,14 +243,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>2</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="4" column="2">
+ <widget class="TQCheckBox" row="4" column="2">
<property name="name">
<cstring>m_caseSensitive</cstring>
</property>
@@ -261,7 +261,7 @@
<string>C&amp;ase sensitive</string>
</property>
</widget>
- <widget class="QLabel" row="8" column="0" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="8" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>m_messageLabel</cstring>
</property>
@@ -279,7 +279,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
@@ -340,7 +340,7 @@
<tabstop>m_wholeWords</tabstop>
<tabstop>m_promptOnReplace</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kexi/main/keximainwindowimpl.cpp b/kexi/main/keximainwindowimpl.cpp
index d5ce9939c..15491d5c8 100644
--- a/kexi/main/keximainwindowimpl.cpp
+++ b/kexi/main/keximainwindowimpl.cpp
@@ -22,19 +22,19 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qfile.h>
-#include <qtimer.h>
-#include <qobjectlist.h>
-#include <qprocess.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
-#include <qfiledialog.h>
-#include <qdockwindow.h>
-#include <qdockarea.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqobjectlist.h>
+#include <tqprocess.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
+#include <tqfiledialog.h>
+#include <tqdockwindow.h>
+#include <tqdockarea.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
@@ -101,7 +101,7 @@
#include "printing/kexisimpleprintingpagesetup.h"
//Extreme verbose debug
-#if defined(Q_WS_WIN)
+#if defined(TQ_WS_WIN)
# include <krecentdirs.h>
# include <win32_utils.h>
//# define KexiVDebug kdDebug()
@@ -111,7 +111,7 @@
# define KexiVDebug if (0) kdDebug()
#endif
-//first fix the geometry
+//first fix the tqgeometry
//#define KEXI_NO_CTXT_HELP 1
#ifndef KEXI_NO_CTXT_HELP
@@ -127,7 +127,7 @@
//! width changes will be removed in KMDI
//#define PROPEDITOR_VISIBILITY_CHANGES
-//temporary fix to manage layout
+//temporary fix to manage tqlayout
#include "ksplitter.h"
#define KDOCKWIDGET_P 1
@@ -149,7 +149,7 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
Kexi::initCmdLineArgs( argc, argv, aboutdata );
bool GUIenabled = true;
- QWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created
+ TQWidget *dummyWidget = 0; //needed to have icon for dialogs before KexiMainWindowImpl is created
//! @todo switch GUIenabled off when needed
KApplication* app = new KApplication(true, GUIenabled);
@@ -165,10 +165,10 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
#endif
#ifdef KEXI_DEBUG_GUI
- QWidget* debugWindow = 0;
+ TQWidget* debugWindow = 0;
#endif
if (GUIenabled) {
- dummyWidget = new QWidget();
+ dummyWidget = new TQWidget();
dummyWidget->setIcon( DesktopIcon( "kexi" ) );
app->setMainWidget(dummyWidget);
#ifdef KEXI_DEBUG_GUI
@@ -203,7 +203,7 @@ int KexiMainWindowImpl::create(int argc, char *argv[], KAboutData* aboutdata)
app->setMainWidget(win);
#ifdef KEXI_DEBUG_GUI
//if (debugWindow)
- //debugWindow->reparent(win, QPoint(1,1));
+ //debugWindow->reparent(win, TQPoint(1,1));
#endif
delete dummyWidget;
@@ -242,11 +242,11 @@ KexiMainWindowImpl::KexiMainWindowImpl()
d->config = kapp->config();
if ( !initialGeometrySet() ) {
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(tqparentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
d->config->setGroup("MainWindow");
- QSize s ( d->config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 700 ),
- d->config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 480 ) );
+ TQSize s ( d->config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ),
+ d->config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) );
resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height()));
}
@@ -259,15 +259,15 @@ KexiMainWindowImpl::KexiMainWindowImpl()
KGlobal::iconLoader()->addAppDir("koffice");
//get informed
- connect(&Kexi::partManager(),SIGNAL(partLoaded(KexiPart::Part*)),this,SLOT(slotPartLoaded(KexiPart::Part*)));
- connect( m_pMdi, SIGNAL(nowMaximized(bool)), this, SLOT(slotCaptionForCurrentMDIChild(bool)) );
- connect( m_pMdi, SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), this, SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*)));
-// connect( this, SIGNAL(lastChildFrmClosed()), this, SLOT(slotLastChildFrmClosed()));
- connect( this, SIGNAL(lastChildViewClosed()), this, SLOT(slotLastChildViewClosed()));
+ connect(&Kexi::partManager(),TQT_SIGNAL(partLoaded(KexiPart::Part*)),this,TQT_SLOT(slotPartLoaded(KexiPart::Part*)));
+ connect( m_pMdi, TQT_SIGNAL(nowMaximized(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotCaptionForCurrentMDIChild(bool)) );
+ connect( m_pMdi, TQT_SIGNAL(noMaximizedChildFrmLeft(KMdiChildFrm*)), TQT_TQOBJECT(this), TQT_SLOT(slotNoMaximizedChildFrmLeft(KMdiChildFrm*)));
+// connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildFrmClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildFrmClosed()));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(lastChildViewClosed()), TQT_TQOBJECT(this), TQT_SLOT(slotLastChildViewClosed()));
- connect( this, SIGNAL(childViewIsDetachedNow(QWidget*)), this, SLOT(slotChildViewIsDetachedNow(QWidget*)));
- connect( this, SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)),
- this, SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode)));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(slotChildViewIsDetachedNow(TQWidget*)));
+ connect( TQT_TQOBJECT(this), TQT_SIGNAL(mdiModeHasBeenChangedTo(KMdi::MdiMode)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotMdiModeHasBeenChangedTo(KMdi::MdiMode)));
//if (!userMode()) {
@@ -290,19 +290,19 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
{//store menu popups list
- QObjectList *l = queryList( "QPopupMenu" );
- for (QObjectListIt it( *l ); it.current(); ++it ) {
+ TQObjectList *l = queryList( TQPOPUPMENU_OBJECT_NAME_STRING );
+ for (TQObjectListIt it( *l ); it.current(); ++it ) {
//kdDebug() << "name=" <<it.current()->name() << " cname="<<it.current()->className()<<endl;
//KexiMainWindowImpl::eventFilter() will filter our popups:
it.current()->installEventFilter(this);
- d->popups.insert(it.current()->name(), static_cast<QPopupMenu*>(it.current()));
+ d->popups.insert(it.current()->name(), static_cast<TQPopupMenu*>(TQT_TQWIDGET(it.current())));
}
delete l;
d->createMenu = d->popups["create"];
#ifdef KEXI_NO_REPORTBUG_COMMAND
//remove "bug report" action to avoid confusion for supported with commercial technical support
- QPopupMenu *helpMenu = d->popups["help"];
+ TQPopupMenu *helpMenu = d->popups["help"];
if (helpMenu) {
//const int idx = helpMenu->indexOf( (int)KHelpMenu::menuReportBug );
helpMenu->removeItemAt(int(KHelpMenu::menuReportBug)-1);
@@ -322,8 +322,8 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
if (!isFakingSDIApplication()/* && !userMode()*/) {
-// QPopupMenu *menu = (QPopupMenu*) child( "window", "KPopupMenu" );
- QPopupMenu *menu = d->popups["window"];
+// TQPopupMenu *menu = (TQPopupMenu*) child( "window", "KPopupMenu" );
+ TQPopupMenu *menu = d->popups["window"];
unsigned int count = menuBar()->count();
if (menu)
setWindowMenu(menu);
@@ -332,7 +332,7 @@ KexiMainWindowImpl::KexiMainWindowImpl()
}
if (userMode()) {
//hide "insert" menu and disable "project_import", "edit_paste_special" menus
- QPopupMenu *menu = d->popups["insert"];
+ TQPopupMenu *menu = d->popups["insert"];
if (menu) {
for (uint i=0; i < menuBar()->count(); i++) {
if (menuBar()->text( menuBar()->idAt(i) ) == i18n("&Insert")) {
@@ -348,8 +348,8 @@ KexiMainWindowImpl::KexiMainWindowImpl()
m_pTaskBar->setCaption(i18n("Task Bar")); //js TODO: move this to KMDIlib
// if (!userMode()) {
- invalidateActions();
- d->timer.singleShot(0,this,SLOT(slotLastActions()));
+ tqinvalidateActions();
+ d->timer.singleShot(0,this,TQT_SLOT(slotLastActions()));
// }
setTabWidgetVisibility(KMdi::AlwaysShowTabs);
@@ -357,17 +357,17 @@ KexiMainWindowImpl::KexiMainWindowImpl()
d->config->setGroup("MainWindow");
tabWidget()->setHoverCloseButton(d->config->readBoolEntry("HoverCloseButtonForTabs", false));
//create special close button as corner widget for IDEAl mode
- QToolButton *closeButton = new QToolButton( tabWidget() );
+ TQToolButton *closeButton = new TQToolButton( tabWidget() );
closeButton->setAutoRaise( true );
- closeButton->setPixmap( QPixmap( kde2_closebutton ) );
- closeButton->setPaletteBackgroundColor(closeButton->palette().active().background());
+ closeButton->setPixmap( TQPixmap( kde2_closebutton ) );
+ closeButton->setPaletteBackgroundColor(closeButton->tqpalette().active().background());
// closeButton->setIconSet(SmallIconSet("tab_remove"));
- tabWidget()->setCornerWidget( closeButton, Qt::TopRight );
+ tabWidget()->setCornerWidget( closeButton, TQt::TopRight );
closeButton->hide(); // hide until it's needed to avoid problems in "user mode"
// when initially the main window is empty
- QToolTip::add(closeButton,
+ TQToolTip::add(closeButton,
i18n("Close the current tab page in Kexi tab interface", "Close the current tab"));
- QObject::connect( closeButton, SIGNAL( clicked() ), this, SLOT( closeActiveView() ) );
+ TQObject::connect( closeButton, TQT_SIGNAL( clicked() ), TQT_TQOBJECT(this), TQT_SLOT( closeActiveView() ) );
}
#ifdef KEXI_ADD_CUSTOM_KEXIMAINWINDOWIMPL
@@ -387,13 +387,13 @@ KexiProject *KexiMainWindowImpl::project()
return d->prj;
}
-void KexiMainWindowImpl::setWindowMenu(QPopupMenu *menu)
+void KexiMainWindowImpl::setWindowMenu(TQPopupMenu *menu)
{
delete m_pWindowMenu;
m_pWindowMenu = menu;
int count = menuBar()->count();
//try to move "window" menu just before "Settings" menu (count-3)
- const QString txt = i18n("&Window");
+ const TQString txt = i18n("&Window");
int i;
for (i=0; i<count; i++) {
//kdDebug() << menuBar()->text( menuBar()->idAt(i) ) << endl;
@@ -406,7 +406,7 @@ void KexiMainWindowImpl::setWindowMenu(QPopupMenu *menu)
menuBar()->insertItem(txt, m_pWindowMenu, id, count-3);
}
m_pWindowMenu->setCheckable(true);
- QObject::connect( m_pWindowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu()) );
+ TQObject::connect( m_pWindowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(fillWindowMenu()) );
}
void KexiMainWindowImpl::fillWindowMenu()
@@ -433,7 +433,7 @@ void KexiMainWindowImpl::fillWindowMenu()
}
//insert window_next, window_previous actions:
-// const QString t = i18n("&Dock/Undock...");
+// const TQString t = i18n("&Dock/Undock...");
int i = m_pWindowMenu->count()-1;
for (int index;; i--) {
index = m_pWindowMenu->idAt(i);
@@ -465,7 +465,7 @@ void KexiMainWindowImpl::switchToIDEAlMode(bool showMessage)
else {
KMessageBox::information(this,
i18n("User interface mode will be switched to IDEAl at next %1 application startup.")
- .arg(KEXI_APP_NAME));
+ .tqarg(KEXI_APP_NAME));
//delayed
d->mdiModeToSwitchAfterRestart = KMdi::IDEAlMode;
}
@@ -492,7 +492,7 @@ void KexiMainWindowImpl::switchToChildframeMode(bool showMessage)
else {
KMessageBox::information(this,
i18n("User interface mode will be switched to Childframe at next %1 application startup.")
- .arg(KEXI_APP_NAME));
+ .tqarg(KEXI_APP_NAME));
//delayed
d->mdiModeToSwitchAfterRestart = KMdi::ChildframeMode;
}
@@ -501,7 +501,7 @@ void KexiMainWindowImpl::switchToChildframeMode(bool showMessage)
KexiMainWindow::switchToChildframeMode();
}
-QPopupMenu* KexiMainWindowImpl::findPopupMenu(const char *popupName)
+TQPopupMenu* KexiMainWindowImpl::findPopupMenu(const char *popupName)
{
return d->popups[popupName];
}
@@ -520,78 +520,78 @@ void KexiMainWindowImpl::initActions()
{
// setupGUI(KMainWindow::Keys|KMainWindow::StatusBar|KMainWindow::Save|KMainWindow::Create);
-// d->actionMapper = new QSignalMapper(this, "act_map");
-// connect(d->actionMapper, SIGNAL(mapped(const QString &)), this, SLOT(slotAction(const QString &)));
+// d->actionMapper = new TQSignalMapper(this, "act_map");
+// connect(d->actionMapper, TQT_SIGNAL(mapped(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotAction(const TQString &)));
// PROJECT MENU
KAction *action = new KAction(i18n("&New..."), "filenew", KStdAccel::shortcut(KStdAccel::New),
- this, SLOT(slotProjectNew()), actionCollection(), "project_new");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectNew()), actionCollection(), "project_new");
action->setToolTip(i18n("Create a new project"));
action->setWhatsThis(i18n("Creates a new project. Currently opened project is not affected."));
- action = KStdAction::open( this, SLOT( slotProjectOpen() ), actionCollection(), "project_open" );
+ action = KStdAction::open( TQT_TQOBJECT(this), TQT_SLOT( slotProjectOpen() ), actionCollection(), "project_open" );
action->setToolTip(i18n("Open an existing project"));
action->setWhatsThis(i18n("Opens an existing project. Currently opened project is not affected."));
#ifdef HAVE_KNEWSTUFF
action = new KAction(i18n("&Download Example Databases..."), "kget", KShortcut(0),
- this, SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples");
+ TQT_TQOBJECT(this), TQT_SLOT(slotGetNewStuff()), actionCollection(), "project_download_examples");
action->setToolTip(i18n("Download example databases from the Internet"));
action->setWhatsThis(i18n("Downloads example databases from the Internet."));
#endif
-// d->action_open_recent = KStdAction::openRecent( this, SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" );
+// d->action_open_recent = KStdAction::openRecent( TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecent(const KURL&)), actionCollection(), "project_open_recent" );
//#ifdef KEXI_SHOW_UNIMPLEMENTED
#ifndef KEXI_NO_UNFINISHED
d->action_open_recent = new KActionMenu(i18n("Open Recent"),
actionCollection(), "project_open_recent");
- connect(d->action_open_recent->popupMenu(),SIGNAL(activated(int)),
- this,SLOT(slotProjectOpenRecent(int)));
- connect(d->action_open_recent->popupMenu(), SIGNAL(aboutToShow()),
- this,SLOT(slotProjectOpenRecentAboutToShow()));
+ connect(d->action_open_recent->popupMenu(),TQT_SIGNAL(activated(int)),
+ this,TQT_SLOT(slotProjectOpenRecent(int)));
+ connect(d->action_open_recent->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this,TQT_SLOT(slotProjectOpenRecentAboutToShow()));
//moved down d->action_open_recent_projects_title_id =
// d->action_open_recent->popupMenu()->insertTitle(i18n("Recently Opened Databases"));
//moved down d->action_open_recent_connections_title_id =
// d->action_open_recent->popupMenu()->insertTitle(i18n("Recently Connected Database Servers"));
// d->action_open_recent->popupMenu()->insertSeparator();
// d->action_open_recent_more_id = d->action_open_recent->popupMenu()
-// ->insertItem(i18n("&More Projects..."), this, SLOT(slotProjectOpenRecentMore()), 0, 1000);
+// ->insertItem(i18n("&More Projects..."), TQT_TQOBJECT(this), TQT_SLOT(slotProjectOpenRecentMore()), 0, 1000);
#else
d->action_open_recent = d->dummy_action;
#endif
d->action_save = KStdAction::save(
- this, SLOT( slotProjectSave() ), actionCollection(), "project_save" );
+ TQT_TQOBJECT(this), TQT_SLOT( slotProjectSave() ), actionCollection(), "project_save" );
// d->action_save = new KAction(i18n("&Save"), "filesave", KStdAccel::shortcut(KStdAccel::Save),
-// this, SLOT(slotProjectSave()), actionCollection(), "project_save");
+// TQT_TQOBJECT(this), TQT_SLOT(slotProjectSave()), actionCollection(), "project_save");
d->action_save->setToolTip(i18n("Save object changes"));
d->action_save->setWhatsThis(i18n("Saves object changes from currently selected window."));
#ifdef KEXI_SHOW_UNIMPLEMENTED
d->action_save_as = new KAction(i18n("Save &As..."), "filesaveas", 0,
- this, SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectSaveAs()), actionCollection(), "project_saveas");
d->action_save_as->setToolTip(i18n("Save object as"));
d->action_save_as->setWhatsThis(
i18n("Saves object changes from currently selected window under a new name (within the same project)."));
d->action_project_properties = new KAction(i18n("Project Properties"), "info", 0,
- this, SLOT(slotProjectProperties()), actionCollection(), "project_properties");
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectProperties()), actionCollection(), "project_properties");
#else
d->action_save_as = d->dummy_action;
d->action_project_properties = d->dummy_action;
#endif
d->action_close = new KAction(i18n("&Close Project"), "fileclose", 0,
- this, SLOT(slotProjectClose()), actionCollection(), "project_close" );
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectClose()), actionCollection(), "project_close" );
d->action_close->setToolTip(i18n("Close the current project"));
d->action_close->setWhatsThis(i18n("Closes the current project."));
- KStdAction::quit( this, SLOT(slotProjectQuit()), actionCollection(), "quit");
+ KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT(slotProjectQuit()), actionCollection(), "quit");
#ifdef KEXI_SHOW_UNIMPLEMENTED
- d->action_project_relations = new KAction(i18n("&Relationships..."), "relation", Qt::CTRL + Qt::Key_R,
- this, SLOT(slotProjectRelations()), actionCollection(), "project_relations");
+ d->action_project_relations = new KAction(i18n("&Relationships..."), "relation", TQt::CTRL + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectRelations()), actionCollection(), "project_relations");
d->action_project_relations->setToolTip(i18n("Project relationships"));
d->action_project_relations->setWhatsThis(i18n("Shows project relationships."));
@@ -600,13 +600,13 @@ void KexiMainWindowImpl::initActions()
#endif
d->action_tools_data_migration = new KAction(
i18n("&Import Database..."), "database_import", 0,
- this, SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project");
+ TQT_TQOBJECT(this), TQT_SLOT(slotToolsProjectMigration()), actionCollection(), "tools_import_project");
d->action_tools_data_migration->setToolTip(i18n("Import entire database as a Kexi project"));
d->action_tools_data_migration->setWhatsThis(i18n("Imports entire database as a Kexi project."));
d->action_tools_compact_database = new KAction(
i18n("&Compact Database..."), "", 0,
- this, SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database");
+ TQT_TQOBJECT(this), TQT_SLOT(slotToolsCompactDatabase()), actionCollection(), "tools_compact_database");
d->action_tools_compact_database->setToolTip(i18n("Compact the current database project"));
d->action_tools_compact_database->setWhatsThis(
i18n("Compacts the current database project, so it will take less space and work faster."));
@@ -617,7 +617,7 @@ void KexiMainWindowImpl::initActions()
d->action_project_import_data_table = new KAction(
i18n("Import->Table Data From File...", "Table Data From &File..."),
"table"/*! @todo: change to "file_import" or so*/,
- 0, this, SLOT(slotProjectImportDataTable()), actionCollection(),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectImportDataTable()), actionCollection(),
"project_import_data_table");
d->action_project_import_data_table->setToolTip(i18n("Import table data from a file"));
d->action_project_import_data_table->setWhatsThis(i18n("Imports table data from a file."));
@@ -626,7 +626,7 @@ void KexiMainWindowImpl::initActions()
d->action_project_export_data_table = new KAction(i18n("Export->Table or Query Data to File...",
"Table or Query Data to &File..."),
"table"/*! @todo: change to "file_export" or so*/,
- 0, this, SLOT(slotProjectExportDataTable()), actionCollection(),
+ 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectExportDataTable()), actionCollection(),
"project_export_data_table");
d->action_project_export_data_table->setToolTip(
i18n("Export data from the active table or query data to a file"));
@@ -634,17 +634,17 @@ void KexiMainWindowImpl::initActions()
i18n("Exports data from the active table or query data to a file."));
//TODO new KAction(i18n("From File..."), "fileopen", 0,
-//TODO this, SLOT(slotImportFile()), actionCollection(), "project_import_file");
+//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportFile()), actionCollection(), "project_import_file");
//TODO new KAction(i18n("From Server..."), "server", 0,
-//TODO this, SLOT(slotImportServer()), actionCollection(), "project_import_server");
+//TODO TQT_TQOBJECT(this), TQT_SLOT(slotImportServer()), actionCollection(), "project_import_server");
- d->action_project_print = KStdAction::print(this, SLOT(slotProjectPrint()),
+ d->action_project_print = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrint()),
actionCollection(), "project_print" );
d->action_project_print->setToolTip(i18n("Print data from the active table or query"));
d->action_project_print->setWhatsThis(i18n("Prints data from the active table or query."));
d->action_project_print_preview = KStdAction::printPreview(
- this, SLOT(slotProjectPrintPreview()),
+ TQT_TQOBJECT(this), TQT_SLOT(slotProjectPrintPreview()),
actionCollection(), "project_print_preview" );
d->action_project_print_preview->setToolTip(
i18n("Show print preview for the active table or query"));
@@ -652,7 +652,7 @@ void KexiMainWindowImpl::initActions()
i18n("Shows print preview for the active table or query."));
d->action_project_print_setup = new KAction(i18n("Page Set&up..."),
- "", 0, this, SLOT(slotProjectPageSetup()), actionCollection(),
+ "", 0, TQT_TQOBJECT(this), TQT_SLOT(slotProjectPageSetup()), actionCollection(),
"project_print_setup");
d->action_project_print_setup->setToolTip(
i18n("Show page setup for printing the active table or query"));
@@ -669,7 +669,7 @@ void KexiMainWindowImpl::initActions()
else {
d->action_edit_paste_special_data_table =
new KAction(i18n("Paste Special->As Data &Table...", "As Data &Table..."),
- "table", 0, this, SLOT(slotEditPasteSpecialDataTable()),
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPasteSpecialDataTable()),
actionCollection(), "edit_paste_special_data_table");
d->action_edit_paste_special_data_table->setToolTip(
i18n("Paste clipboard data as a table"));
@@ -680,7 +680,7 @@ void KexiMainWindowImpl::initActions()
d->action_edit_copy_special_data_table =
new KAction(i18n("Copy Special->Table or Query Data...",
"Table or Query as Data Table..."),
- "table", 0, this, SLOT(slotEditCopySpecialDataTable()),
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditCopySpecialDataTable()),
actionCollection(), "edit_copy_special_data_table");
d->action_edit_copy_special_data_table->setToolTip(
i18n("Copy selected table or query data to clipboard"));
@@ -693,35 +693,35 @@ void KexiMainWindowImpl::initActions()
d->action_edit_redo->setWhatsThis(i18n("Reverts the most recent undo action."));
#if 0 //old
- d->action_edit_find = createSharedAction( KStdAction::Find, "edit_find");
+ d->action_edit_tqfind = createSharedAction( KStdAction::Find, "edit_tqfind");
d->action_edit_findnext = createSharedAction( KStdAction::FindNext, "edit_findnext");
d->action_edit_findprev = createSharedAction( KStdAction::FindPrev, "edit_findprevious");
-//! @todo d->action_edit_paste = createSharedAction( KStdAction::Replace, "edit_replace");
+//! @todo d->action_edit_paste = createSharedAction( KStdAction::Replace, "edit_tqreplace");
#endif
- d->action_edit_find = KStdAction::find(
- this, SLOT(slotEditFind()), actionCollection(), "edit_find" );
-// d->action_edit_find = createSharedAction( KStdAction::Find, "edit_find");
+ d->action_edit_tqfind = KStdAction::find(
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFind()), actionCollection(), "edit_tqfind" );
+// d->action_edit_tqfind = createSharedAction( KStdAction::Find, "edit_tqfind");
d->action_edit_findnext = KStdAction::findNext(
- this, SLOT(slotEditFindNext()), actionCollection(), "edit_findnext");
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFindNext()), actionCollection(), "edit_findnext");
d->action_edit_findprev = KStdAction::findPrev(
- this, SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious");
- d->action_edit_replace = 0;
-//! @todo d->action_edit_replace = KStdAction::replace(
-//! this, SLOT(slotEditReplace()), actionCollection(), "project_print_preview" );
+ TQT_TQOBJECT(this), TQT_SLOT(slotEditFindPrevious()), actionCollection(), "edit_findprevious");
+ d->action_edit_tqreplace = 0;
+//! @todo d->action_edit_tqreplace = KStdAction::tqreplace(
+//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplace()), actionCollection(), "project_print_preview" );
d->action_edit_replace_all = 0;
//! @todo d->action_edit_replace_all = new KAction( i18n("Replace All"), "", 0,
-//! this, SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall");
+//! TQT_TQOBJECT(this), TQT_SLOT(slotEditReplaceAll()), actionCollection(), "edit_replaceall");
d->action_edit_select_all = createSharedAction( KStdAction::SelectAll, "edit_select_all");
d->action_edit_delete = createSharedAction(i18n("&Delete"), "editdelete",
- 0/*Qt::Key_Delete*/, "edit_delete");
+ 0/*TQt::Key_Delete*/, "edit_delete");
d->action_edit_delete->setToolTip(i18n("Delete selected object"));
d->action_edit_delete->setWhatsThis(i18n("Deletes currently selected object."));
d->action_edit_delete_row = createSharedAction(i18n("Delete Row"), "delete_table_row",
- Qt::CTRL+Qt::Key_Delete, "edit_delete_row");
+ TQt::CTRL+TQt::Key_Delete, "edit_delete_row");
d->action_edit_delete_row->setToolTip(i18n("Delete currently selected row"));
d->action_edit_delete_row->setWhatsThis(i18n("Deletes currently selected row."));
@@ -731,21 +731,21 @@ void KexiMainWindowImpl::initActions()
d->action_edit_clear_table->setWhatsThis(i18n("Clears table contents."));
setActionVolatile( d->action_edit_clear_table, true );
- d->action_edit_edititem = createSharedAction(i18n("Edit Item"), 0, 0, /* CONFLICT in TV: Qt::Key_F2, */
+ d->action_edit_edititem = createSharedAction(i18n("Edit Item"), 0, 0, /* CONFLICT in TV: TQt::Key_F2, */
"edit_edititem");
d->action_edit_edititem->setToolTip(i18n("Edit currently selected item"));
d->action_edit_edititem->setWhatsThis(i18n("Edits currently selected item."));
d->action_edit_insert_empty_row = createSharedAction(i18n("&Insert Empty Row"), "insert_table_row",
- Qt::SHIFT | Qt::CTRL | Qt::Key_Insert, "edit_insert_empty_row");
+ TQt::SHIFT | TQt::CTRL | TQt::Key_Insert, "edit_insert_empty_row");
setActionVolatile( d->action_edit_insert_empty_row, true );
d->action_edit_insert_empty_row->setToolTip(i18n("Insert one empty row above"));
d->action_edit_insert_empty_row->setWhatsThis(i18n("Inserts one empty row above currently selected table row."));
//VIEW MENU
if (!userMode()) {
- d->action_view_data_mode = new KRadioAction(i18n("&Data View"), "state_data", Qt::Key_F6,
- this, SLOT(slotViewDataMode()), actionCollection(), "view_data_mode");
+ d->action_view_data_mode = new KRadioAction(i18n("&Data View"), "state_data", TQt::Key_F6,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewDataMode()), actionCollection(), "view_data_mode");
d->actions_for_view_modes.insert( Kexi::DataViewMode, d->action_view_data_mode );
d->action_view_data_mode->setExclusiveGroup("view_mode");
d->action_view_data_mode->setToolTip(i18n("Switch to data view"));
@@ -755,8 +755,8 @@ void KexiMainWindowImpl::initActions()
d->action_view_data_mode = 0;
if (!userMode()) {
- d->action_view_design_mode = new KRadioAction(i18n("D&esign View"), "state_edit", Qt::Key_F7,
- this, SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode");
+ d->action_view_design_mode = new KRadioAction(i18n("D&esign View"), "state_edit", TQt::Key_F7,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewDesignMode()), actionCollection(), "view_design_mode");
d->actions_for_view_modes.insert( Kexi::DesignViewMode, d->action_view_design_mode );
d->action_view_design_mode->setExclusiveGroup("view_mode");
d->action_view_design_mode->setToolTip(i18n("Switch to design view"));
@@ -766,8 +766,8 @@ void KexiMainWindowImpl::initActions()
d->action_view_design_mode = 0;
if (!userMode()) {
- d->action_view_text_mode = new KRadioAction(i18n("&Text View"), "state_sql", Qt::Key_F8,
- this, SLOT(slotViewTextMode()), actionCollection(), "view_text_mode");
+ d->action_view_text_mode = new KRadioAction(i18n("&Text View"), "state_sql", TQt::Key_F8,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewTextMode()), actionCollection(), "view_text_mode");
d->actions_for_view_modes.insert( Kexi::TextViewMode, d->action_view_text_mode );
d->action_view_text_mode->setExclusiveGroup("view_mode");
d->action_view_text_mode->setToolTip(i18n("Switch to text view"));
@@ -777,22 +777,22 @@ void KexiMainWindowImpl::initActions()
d->action_view_text_mode = 0;
if (d->isProjectNavigatorVisible) {
- d->action_view_nav = new KAction(i18n("Project Navigator"), "", Qt::ALT + Qt::Key_1,
- this, SLOT(slotViewNavigator()), actionCollection(), "view_navigator");
+ d->action_view_nav = new KAction(i18n("Project Navigator"), "", TQt::ALT + TQt::Key_1,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewNavigator()), actionCollection(), "view_navigator");
d->action_view_nav->setToolTip(i18n("Go to project navigator panel"));
d->action_view_nav->setWhatsThis(i18n("Goes to project navigator panel."));
}
else
d->action_view_nav = 0;
- d->action_view_mainarea = new KAction(i18n("Main Area"), "", Qt::ALT + Qt::Key_2,
- this, SLOT(slotViewMainArea()), actionCollection(), "view_mainarea");
+ d->action_view_mainarea = new KAction(i18n("Main Area"), "", TQt::ALT + TQt::Key_2,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewMainArea()), actionCollection(), "view_mainarea");
d->action_view_mainarea->setToolTip(i18n("Go to main area"));
d->action_view_mainarea->setWhatsThis(i18n("Goes to main area."));
if (!userMode()) {
- d->action_view_propeditor = new KAction(i18n("Property Editor"), "", Qt::ALT + Qt::Key_3,
- this, SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor");
+ d->action_view_propeditor = new KAction(i18n("Property Editor"), "", TQt::ALT + TQt::Key_3,
+ TQT_TQOBJECT(this), TQT_SLOT(slotViewPropertyEditor()), actionCollection(), "view_propeditor");
d->action_view_propeditor->setToolTip(i18n("Go to property editor panel"));
d->action_view_propeditor->setWhatsThis(i18n("Goes to property editor panel."));
}
@@ -801,7 +801,7 @@ void KexiMainWindowImpl::initActions()
//DATA MENU
d->action_data_save_row = createSharedAction(i18n("&Save Row"), "button_ok",
- Qt::SHIFT | Qt::Key_Return, "data_save_row");
+ TQt::SHIFT | TQt::Key_Return, "data_save_row");
d->action_data_save_row->setToolTip(i18n("Save changes made to the current row"));
d->action_data_save_row->setWhatsThis(i18n("Saves changes made to the current row."));
//temp. disable because of problems with volatile actions setActionVolatile( d->action_data_save_row, true );
@@ -849,7 +849,7 @@ void KexiMainWindowImpl::initActions()
//TOOLS MENU
//WINDOW MENU
-#ifndef Q_WS_WIN
+#ifndef TQ_WS_WIN
//KMDI <= 3.5.1 has no shortcut here:
KAction *closeWindowAction = actionCollection()->action("window_close");
if (closeWindowAction)
@@ -858,32 +858,32 @@ void KexiMainWindowImpl::initActions()
//additional 'Window' menu items
d->action_window_next = new KAction( i18n("&Next Window"), "",
-#ifdef Q_WS_WIN
- Qt::CTRL+Qt::Key_Tab,
+#ifdef TQ_WS_WIN
+ TQt::CTRL+TQt::Key_Tab,
#else
- Qt::ALT+Qt::Key_Right,
+ TQt::ALT+TQt::Key_Right,
#endif
- this, SLOT(activateNextWin()), actionCollection(), "window_next");
+ TQT_TQOBJECT(this), TQT_SLOT(activateNextWin()), actionCollection(), "window_next");
d->action_window_next->setToolTip( i18n("Next window") );
d->action_window_next->setWhatsThis(i18n("Switches to the next window."));
d->action_window_previous = new KAction( i18n("&Previous Window"), "",
-#ifdef Q_WS_WIN
- Qt::CTRL+Qt::SHIFT+Qt::Key_Tab,
+#ifdef TQ_WS_WIN
+ TQt::CTRL+TQt::SHIFT+TQt::Key_Tab,
#else
- Qt::ALT+Qt::Key_Left,
+ TQt::ALT+TQt::Key_Left,
#endif
- this, SLOT(activatePrevWin()), actionCollection(), "window_previous");
+ TQT_TQOBJECT(this), TQT_SLOT(activatePrevWin()), actionCollection(), "window_previous");
d->action_window_previous->setToolTip( i18n("Previous window") );
d->action_window_previous->setWhatsThis(i18n("Switches to the previous window."));
//SETTINGS MENU
setStandardToolBarMenuEnabled( true );
- action = KStdAction::keyBindings(this, SLOT( slotConfigureKeys() ), actionCollection() );
+ action = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT( slotConfigureKeys() ), actionCollection() );
action->setWhatsThis(i18n("Lets you configure shortcut keys."));
#ifdef KEXI_SHOW_UNIMPLEMENTED
- action = KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars() ), actionCollection() );
+ action = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotConfigureToolbars() ), actionCollection() );
action->setWhatsThis(i18n("Lets you configure toolbars."));
d->action_show_other = new KActionMenu(i18n("Other"),
@@ -891,7 +891,7 @@ void KexiMainWindowImpl::initActions()
#endif
#ifndef KEXI_NO_CTXT_HELP
- d->action_show_helper = new KToggleAction(i18n("Show Context Help"), "", Qt::CTRL + Qt::Key_H,
+ d->action_show_helper = new KToggleAction(i18n("Show Context Help"), "", TQt::CTRL + TQt::Key_H,
actionCollection(), "options_show_contexthelp");
#if KDE_IS_VERSION(3,2,90)
d->action_show_helper->setCheckedState(i18n("Hide Context Help"));
@@ -923,31 +923,31 @@ void KexiMainWindowImpl::initActions()
#endif
#ifdef KEXI_SHOW_UNIMPLEMENTED
- d->action_configure = KStdAction::preferences(this, SLOT(slotShowSettings()), actionCollection());
+ d->action_configure = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings()), actionCollection());
action->setWhatsThis(i18n("Lets you configure Kexi."));
#endif
//HELP MENU
#if 0//js: todo reenable later
- KStdAction::tipOfDay( this, SLOT( slotTipOfTheDayAction() ), actionCollection() )
+ KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotTipOfTheDayAction() ), actionCollection() )
->setWhatsThis(i18n("This shows useful tips on the use of this application."));
#endif
#if 0 //we don't have a time for updating info text for each new version
new KAction(i18n("Important Information"), "messagebox_info", 0,
- this, SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info");
+ TQT_TQOBJECT(this), TQT_SLOT(slotImportantInfo()), actionCollection(), "help_show_important_info");
#endif
//TODO: UNCOMMENT TO REMOVE MDI MODES SETTING m_pMdiModeMenu->hide();
#ifndef KEXI_NO_FEEDBACK_AGENT
#ifdef FEEDBACK_CLASS
new KAction(i18n("Give Feedback..."), "messagebox_info", 0,
- this, SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent");
+ TQT_TQOBJECT(this), TQT_SLOT(slotStartFeedbackAgent()), actionCollection(), "help_start_feedback_agent");
#endif
#endif
// KAction *actionSettings = new KAction(i18n("Configure Kexi..."), "configure", 0,
// actionCollection(), "kexi_settings");
// actionSettings->setWhatsThis(i18n("Lets you configure Kexi."));
-// connect(actionSettings, SIGNAL(activated()), this, SLOT(slotShowSettings()));
+// connect(actionSettings, TQT_SIGNAL(activated()), TQT_TQOBJECT(this), TQT_SLOT(slotShowSettings()));
// -- add a few missing tooltips (usable especially in Form's "Assign action" dialog)
if ((action = actionCollection()->action("window_close")))
@@ -1005,7 +1005,7 @@ void KexiMainWindowImpl::initActions()
acat->addAction("edit_edititem", Kexi::PartItemActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType);
- acat->addAction("edit_find", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
+ acat->addAction("edit_tqfind", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
acat->addAction("edit_findnext", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
@@ -1014,7 +1014,7 @@ void KexiMainWindowImpl::initActions()
acat->addAction("edit_findprevious", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
- acat->addAction("edit_replace", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
+ acat->addAction("edit_tqreplace", Kexi::GlobalActionCategory|Kexi::WindowActionCategory,
KexiPart::TableObjectType, KexiPart::QueryObjectType, KexiPart::FormObjectType);
acat->addAction("edit_paste_special_data_table", Kexi::GlobalActionCategory);
@@ -1112,13 +1112,13 @@ void KexiMainWindowImpl::initActions()
acat->addAction("scriptpart_create", Kexi::NoActionCategory);
}
-void KexiMainWindowImpl::invalidateActions()
+void KexiMainWindowImpl::tqinvalidateActions()
{
- invalidateProjectWideActions();
- invalidateSharedActions();
+ tqinvalidateProjectWideActions();
+ tqinvalidateSharedActions();
}
-void KexiMainWindowImpl::invalidateSharedActions(QObject *o)
+void KexiMainWindowImpl::tqinvalidateSharedActions(TQObject *o)
{
//TODO: enabling is more complex...
/* d->action_edit_cut->setEnabled(true);
@@ -1126,22 +1126,22 @@ void KexiMainWindowImpl::invalidateSharedActions(QObject *o)
d->action_edit_paste->setEnabled(true);*/
if (!o)
- o = focusWindow();
- KexiSharedActionHost::invalidateSharedActions(o);
+ o = TQT_TQOBJECT(focusWindow());
+ KexiSharedActionHost::tqinvalidateSharedActions(o);
}
-void KexiMainWindowImpl::invalidateSharedActions()
+void KexiMainWindowImpl::tqinvalidateSharedActions()
{
- invalidateSharedActions(0);
+ tqinvalidateSharedActions(0);
}
// unused, I think
-void KexiMainWindowImpl::invalidateSharedActionsLater()
+void KexiMainWindowImpl::tqinvalidateSharedActionsLater()
{
- QTimer::singleShot(1, this, SLOT(invalidateSharedActions()));
+ TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(tqinvalidateSharedActions()));
}
-void KexiMainWindowImpl::invalidateProjectWideActions()
+void KexiMainWindowImpl::tqinvalidateProjectWideActions()
{
// stateChanged("project_opened",d->prj ? StateNoReverse : StateReverse);
@@ -1234,7 +1234,7 @@ void KexiMainWindowImpl::invalidateProjectWideActions()
d->propEditorTabWidget->setEnabled(d->prj);
}
-void KexiMainWindowImpl::invalidateViewModeActions()
+void KexiMainWindowImpl::tqinvalidateViewModeActions()
{
if (d->curDialog) {
//update toggle action
@@ -1276,12 +1276,12 @@ tristate KexiMainWindowImpl::startup()
return true;
}
-static QString internalReason(KexiDB::Object *obj)
+static TQString internalReason(KexiDB::Object *obj)
{
- const QString &s = obj->errorMsg();
+ const TQString &s = obj->errorMsg();
if (s.isEmpty())
return s;
- return QString("<br>(%1) ").arg(i18n("reason:")+" <i>"+s+"</i>");
+ return TQString("<br>(%1) ").tqarg(i18n("reason:")+" <i>"+s+"</i>");
}
tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
@@ -1300,7 +1300,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
//ask for password
KexiDBPasswordDialog pwdDlg(this, *newProjectData->connectionData(),
false /*!showDetailsButton*/);
- if (QDialog::Accepted!=pwdDlg.exec()) {
+ if (TQDialog::Accepted!=pwdDlg.exec()) {
delete d->prj;
d->prj = 0;
return cancelled;
@@ -1319,7 +1319,7 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
if (incompatibleWithKexi) {
if (KMessageBox::Yes == KMessageBox::questionYesNo(this,
i18n("<qt>Database project %1 does not appear to have been created using Kexi.<br><br>"
- "Do you want to import it as a new Kexi project?</qt>").arg(projectData.infoString()),
+ "Do you want to import it as a new Kexi project?</qt>").tqarg(projectData.infoString()),
0, KGuiItem(i18n("Import Database", "&Import..."), "database_import"),
KStdGuiItem::quit()))
{
@@ -1341,30 +1341,30 @@ tristate KexiMainWindowImpl::openProject(const KexiProjectData& projectData)
initNavigator();
Kexi::recentProjects().addProjectData( newProjectData );
updateReadOnlyState();
- invalidateActions();
+ tqinvalidateActions();
// d->disableErrorMessages = true;
enableMessages( false );
- QTimer::singleShot(1, this, SLOT(slotAutoOpenObjectsLater()));
+ TQTimer::singleShot(1, TQT_TQOBJECT(this), TQT_SLOT(slotAutoOpenObjectsLater()));
return true;
}
tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& projectData)
{
- QStringList mimetypes;
+ TQStringList mimetypes;
mimetypes.append( KexiDB::Driver::defaultFileBasedDriverMimeType() );
- QString fname;
- const QString startDir(":OpenExistingOrCreateNewProject"/*as in KexiNewProjectWizard*/);
- const QString caption( i18n("Select New Project's Location") );
+ TQString fname;
+ const TQString startDir(":OpenExistingOrCreateNewProject"/*as in KexiNewProjectWizard*/);
+ const TQString caption( i18n("Select New Project's Location") );
while (true) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//! @todo remove
- QString recentDir = KGlobalSettings::documentPath();
+ TQString recentDir = KGlobalSettings::documentPath();
if (fname.isEmpty() && !projectData.constConnectionData()->dbFileName().isEmpty()) //propose filename from db template name
fname = KFileDialog::getStartURL(startDir, recentDir).path()
+ '/' + projectData.constConnectionData()->dbFileName();
- fname = QFileDialog::getSaveFileName(
+ fname = TQFileDialog::getSaveFileName(
KFileDialog::getStartURL(fname.isEmpty() ? startDir : fname, recentDir).path(),
KexiUtils::fileDialogFilterStrings(mimetypes, false),
this, "CreateProjectFromTemplate", caption);
@@ -1385,7 +1385,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr
}
const bool specialDir = fname.isEmpty();
kdDebug() << fname << "............." << endl;
- KFileDialog dlg( specialDir ? startDir : QString::null,
+ KFileDialog dlg( specialDir ? startDir : TQString(),
mimetypes.join(" "), this, "filedialog", true);
if ( !specialDir )
dlg.setSelection( fname ); // may also be a filename
@@ -1410,7 +1410,7 @@ tristate KexiMainWindowImpl::createProjectFromTemplate(const KexiProjectData& pr
return false;
}
- return openProject(fname, 0, QString::null, projectData.autoopenObjects/*copy*/);
+ return openProject(fname, 0, TQString(), projectData.autoopenObjects/*copy*/);
}
void KexiMainWindowImpl::updateReadOnlyState()
@@ -1422,7 +1422,7 @@ void KexiMainWindowImpl::updateReadOnlyState()
// update "insert ....." actions for every part
KActionCollection *ac = actionCollection();
for (KexiPart::PartInfoListIterator it(*Kexi::partManager().partInfoList()); it.current(); ++it) {
- KAction *a = ac->action( KexiPart::nameForCreateAction( *it.current() ) );
+ KAction *a = ac->action( TQString(KexiPart::nameForCreateAction( *it.current() )) );
if (a)
a->setEnabled(!readOnly);
}
@@ -1430,26 +1430,26 @@ void KexiMainWindowImpl::updateReadOnlyState()
void KexiMainWindowImpl::slotAutoOpenObjectsLater()
{
- QString not_found_msg;
+ TQString not_found_msg;
bool openingCancelled;
//ok, now open "autoopen: objects
if (d->prj) {
- for (QValueList<KexiProjectData::ObjectInfo>::ConstIterator it =
+ for (TQValueList<KexiProjectData::ObjectInfo>::ConstIterator it =
d->prj->data()->autoopenObjects.constBegin();
it != d->prj->data()->autoopenObjects.constEnd(); ++it )
{
KexiProjectData::ObjectInfo info = *it;
KexiPart::Info *i = Kexi::partManager().infoForMimeType(
- QCString("kexi/")+info["type"].lower().latin1() );
+ TQCString("kexi/")+info["type"].lower().latin1() );
if (!i) {
not_found_msg += "<li>";
if (!info["name"].isEmpty())
- not_found_msg += (QString("\"") + info["name"] + "\" - ");
+ not_found_msg += (TQString("\"") + info["name"] + "\" - ");
if (info["action"]=="new")
not_found_msg += i18n("cannot create object - unknown object type \"%1\"")
- .arg(info["type"]);
+ .tqarg(info["type"]);
else
- not_found_msg += i18n("unknown object type \"%1\"").arg(info["type"]);
+ not_found_msg += i18n("unknown object type \"%1\"").tqarg(info["type"]);
not_found_msg += internalReason(&Kexi::partManager())+"<br></li>";
continue;
}
@@ -1457,7 +1457,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (info["action"]=="new") {
if (!newObject( i, openingCancelled) && !openingCancelled) {
not_found_msg += "<li>";
- not_found_msg += (i18n("cannot create object of type \"%1\"").arg(info["type"])+
+ not_found_msg += (i18n("cannot create object of type \"%1\"").tqarg(info["type"])+
internalReason(d->prj)+"<br></li>");
}
else
@@ -1468,7 +1468,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
KexiPart::Item *item = d->prj->item(i, info["name"]);
if (!item) {
- QString taskName;
+ TQString taskName;
if (info["action"]=="print-preview")
taskName = i18n("making print preview for");
else if (info["action"]=="print")
@@ -1478,7 +1478,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else
taskName = i18n("opening");
- not_found_msg += (QString("<li>")+ taskName + " \"" + info["name"] + "\" - ");
+ not_found_msg += (TQString("<li>")+ taskName + " \"" + info["name"] + "\" - ");
if ("table"==info["type"].lower())
not_found_msg += i18n("table not found");
else if ("query"==info["type"].lower())
@@ -1496,7 +1496,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (info["action"]=="execute") {
tristate res = executeItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot execute object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot execute object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1504,7 +1504,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else if (info["action"]=="print") {
tristate res = printItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot print object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot print object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1512,7 +1512,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else if (info["action"]=="print-preview") {
tristate res = printPreviewForItem(item);
if (false == res) {
- not_found_msg += ( QString("<li>\"")+ info["name"] + "\" - " + i18n("cannot make print preview of object")+
+ not_found_msg += ( TQString("<li>\"")+ info["name"] + "\" - " + i18n("cannot make print preview of object")+
internalReason(d->prj)+"<br></li>" );
}
continue;
@@ -1528,11 +1528,11 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
else
continue; //sanity
- QString openObjectMessage;
+ TQString openObjectMessage;
if (!openObject(item, viewMode, openingCancelled, 0, &openObjectMessage)
&& (!openingCancelled || !openObjectMessage.isEmpty()))
{
- not_found_msg += (QString("<li>\"")+ info["name"] + "\" - ");
+ not_found_msg += (TQString("<li>\"")+ info["name"] + "\" - ");
if (openObjectMessage.isEmpty())
not_found_msg += i18n("cannot open object");
else
@@ -1551,13 +1551,13 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (!not_found_msg.isEmpty())
showErrorMessage(i18n("You have requested selected objects to be automatically opened "
"or processed on startup. Several objects cannot be opened or processed."),
- QString("<ul>%1</ul>").arg(not_found_msg) );
+ TQString("<ul>%1</ul>").tqarg(not_found_msg) );
d->updatePropEditorVisibility(d->curDialog ? d->curDialog->currentViewMode() : 0);
#if defined(KDOCKWIDGET_P)
if (d->propEditor) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if(ds)
ds->setSeparatorPosInPercent(d->config->readNumEntry("RightDockPosition", 80/* % */));
}
@@ -1579,8 +1579,8 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
d->restoreNavigatorWidth();
#ifndef PROPEDITOR_VISIBILITY_CHANGES
-// KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
-// KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+// KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
+// KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// const int pos = ds->separatorPos();
//if (!d->curDialog || d->curDialog->currentViewMode()==Kexi::DataViewMode)
@@ -1591,7 +1591,7 @@ void KexiMainWindowImpl::slotAutoOpenObjectsLater()
if (d->nav) {
d->nav->updateGeometry();
}
- qApp->processEvents();
+ tqApp->processEvents();
emit projectOpened();
}
@@ -1624,8 +1624,8 @@ tristate KexiMainWindowImpl::closeProject()
#if defined(KDOCKWIDGET_P)
//remember docks position - will be used on storeSettings()
if (d->propEditor) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if (ds)
d->propEditorDockSeparatorPos = ds->separatorPosInPercent();
}
@@ -1635,14 +1635,14 @@ tristate KexiMainWindowImpl::closeProject()
if (d->propEditor) {
if (d->openedDialogsCount() == 0)
makeWidgetDockVisible(d->propEditorTabWidget);
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if(ds)
ds->setSeparatorPosInPercent(80);
}
- KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
int dwWidth = dw->width();
if (ds) {
if (d->openedDialogsCount()!=0 && d->propEditorTabWidget && d->propEditorTabWidget->isVisible())
@@ -1691,7 +1691,7 @@ tristate KexiMainWindowImpl::closeProject()
// Kexi::partManager().unloadAllParts();
updateReadOnlyState();
- invalidateActions();
+ tqinvalidateActions();
// if (!userMode())
updateAppCaption();
@@ -1721,45 +1721,45 @@ void KexiMainWindowImpl::initNavigator()
if(!d->nav)
{
d->nav = new KexiBrowser(this, this);
- d->nav->installEventFilter(this);
+ d->nav->installEventFilter(TQT_TQOBJECT(this));
d->navToolWindow = addToolWindow(d->nav, KDockWidget::DockLeft, getMainDockWidget(), 20/*, lv, 35, "2"*/);
// d->navToolWindow->hide();
- connect(d->nav,SIGNAL(openItem(KexiPart::Item*,int)),this,SLOT(openObject(KexiPart::Item*,int)));
- connect(d->nav,SIGNAL(openOrActivateItem(KexiPart::Item*,int)),
- this,SLOT(openObjectFromNavigator(KexiPart::Item*,int)));
- connect(d->nav,SIGNAL(newItem( KexiPart::Info* )),
- this,SLOT(newObject(KexiPart::Info*)));
- connect(d->nav,SIGNAL(removeItem(KexiPart::Item*)),
- this,SLOT(removeObject(KexiPart::Item*)));
- connect(d->nav,SIGNAL(renameItem(KexiPart::Item*,const QString&, bool&)),
- this,SLOT(renameObject(KexiPart::Item*,const QString&, bool&)));
- connect(d->nav,SIGNAL(executeItem(KexiPart::Item*)),
- this,SLOT(executeItem(KexiPart::Item*)));
- connect(d->nav,SIGNAL(exportItemAsDataTable(KexiPart::Item*)),
- this,SLOT(exportItemAsDataTable(KexiPart::Item*)));
- connect(d->nav,SIGNAL(printItem( KexiPart::Item* )),
- this,SLOT(printItem(KexiPart::Item*)));
- connect(d->nav,SIGNAL(pageSetupForItem( KexiPart::Item*)),
- this,SLOT(showPageSetupForItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(openItem(KexiPart::Item*,int)),this,TQT_SLOT(openObject(KexiPart::Item*,int)));
+ connect(d->nav,TQT_SIGNAL(openOrActivateItem(KexiPart::Item*,int)),
+ this,TQT_SLOT(openObjectFromNavigator(KexiPart::Item*,int)));
+ connect(d->nav,TQT_SIGNAL(newItem( KexiPart::Info* )),
+ this,TQT_SLOT(newObject(KexiPart::Info*)));
+ connect(d->nav,TQT_SIGNAL(removeItem(KexiPart::Item*)),
+ this,TQT_SLOT(removeObject(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(renameItem(KexiPart::Item*,const TQString&, bool&)),
+ this,TQT_SLOT(renameObject(KexiPart::Item*,const TQString&, bool&)));
+ connect(d->nav,TQT_SIGNAL(executeItem(KexiPart::Item*)),
+ this,TQT_SLOT(executeItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(exportItemAsDataTable(KexiPart::Item*)),
+ this,TQT_SLOT(exportItemAsDataTable(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(printItem( KexiPart::Item* )),
+ this,TQT_SLOT(printItem(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(pageSetupForItem( KexiPart::Item*)),
+ this,TQT_SLOT(showPageSetupForItem(KexiPart::Item*)));
if (d->prj) {//connect to the project
- connect(d->prj, SIGNAL(itemRemoved(const KexiPart::Item&)),
- d->nav, SLOT(slotRemoveItem(const KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)),
+ d->nav, TQT_SLOT(slotRemoveItem(const KexiPart::Item&)));
}
- connect(d->nav,SIGNAL(selectionChanged(KexiPart::Item*)),
- this,SLOT(slotPartItemSelectedInNavigator(KexiPart::Item*)));
+ connect(d->nav,TQT_SIGNAL(selectionChanged(KexiPart::Item*)),
+ this,TQT_SLOT(slotPartItemSelectedInNavigator(KexiPart::Item*)));
// d->restoreNavigatorWidth();
}
if(d->prj->isConnected()) {
- QString partManagerErrorMessages;
- d->nav->setProject( d->prj, QString::null/*all mimetypes*/, &partManagerErrorMessages );
+ TQString partManagerErrorMessages;
+ d->nav->setProject( d->prj, TQString()/*all mimetypes*/, &partManagerErrorMessages );
if (!partManagerErrorMessages.isEmpty()) {
- showWarningContinueMessage(partManagerErrorMessages, QString::null,
+ showWarningContinueMessage(partManagerErrorMessages, TQString(),
"dontShowWarningsRelatedToPluginsLoading");
}
}
- connect(d->prj, SIGNAL(newItemStored(KexiPart::Item&)), d->nav, SLOT(addItem(KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(newItemStored(KexiPart::Item&)), d->nav, TQT_SLOT(addItem(KexiPart::Item&)));
d->nav->setFocus();
if (d->forceShowProjectNavigatorOnCreation) {
@@ -1772,23 +1772,23 @@ void KexiMainWindowImpl::initNavigator()
d->forceHideProjectNavigatorOnCreation = false;
}
- invalidateActions();
+ tqinvalidateActions();
}
void KexiMainWindowImpl::slotLastActions()
{
#if defined(KDOCKWIDGET_P)
if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) {
-// KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget();
- //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+// KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget();
+ //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// Q_UNUSED(ds);
//1 ds->resize(ds->width()*3, ds->height());
//1 ds->setSeparatorPos(30, true);
//1 ds->setForcedFixedWidth( dw, 200 );
}
#endif
-#ifdef Q_WS_WIN
- showMaximized();//js: workaround for not yet completed layout settings storage on win32
+#ifdef TQ_WS_WIN
+ showMaximized();//js: workaround for not yet completed tqlayout settings storage on win32
#endif
}
@@ -1807,15 +1807,15 @@ void KexiMainWindowImpl::initPropertyEditor()
d->config->setGroup("PropertyEditor");
int size = d->config->readNumEntry("FontSize", -1);
- QFont f( Kexi::smallFont() );
+ TQFont f( Kexi::smallFont() );
if (size>0)
f.setPixelSize( size );
d->propEditorTabWidget->setFont(f);
if (mdiMode()==KMdi::ChildframeMode || mdiMode()==KMdi::TabPageMode) {
- KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditorTabWidget->tqparentWidget();
#if defined(KDOCKWIDGET_P)
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// ds->setKeepSize(true);
makeWidgetDockVisible(d->propEditorTabWidget);
// ds->show();
@@ -1836,7 +1836,7 @@ void KexiMainWindowImpl::initPropertyEditor()
//1 dw->setMinimumWidth(200);
- // ds->setSeparatorPos(d->propEditor->sizeHint().width(), true);
+ // ds->setSeparatorPos(d->propEditor->tqsizeHint().width(), true);
//heh, this is for IDEAl only, I suppose?
//js if (m_rightContainer) {
@@ -1858,13 +1858,13 @@ void KexiMainWindowImpl::slotPartLoaded(KexiPart::Part* p)
{
if (!p)
return;
- connect(p, SIGNAL(newObjectRequest(KexiPart::Info*)),
- this, SLOT(newObject(KexiPart::Info*)));
+ connect(p, TQT_SIGNAL(newObjectRequest(KexiPart::Info*)),
+ TQT_TQOBJECT(this), TQT_SLOT(newObject(KexiPart::Info*)));
p->createGUIClients(this);
}
//! internal
-void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool childrenMaximized)
+void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool tqchildrenMaximized)
{
//js todo: allow to set custom "static" app caption
@@ -1877,18 +1877,18 @@ void KexiMainWindowImpl::slotCaptionForCurrentMDIChild(bool childrenMaximized)
//current dialog isn't attached! - find top level child
if (m_pMdi->topChild()) {
view = m_pMdi->topChild()->m_pClient;
- childrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized;
+ tqchildrenMaximized = view->mdiParent()->state()==KMdiChildFrm::Maximized;
}
else
view = 0;
}
- if (childrenMaximized && view) {
+ if (tqchildrenMaximized && view) {
setCaption( d->curDialog->caption()
- + (d->appCaptionPrefix.isEmpty() ? QString::null : (QString::fromLatin1(" - ") + d->appCaptionPrefix)) );
+ + (d->appCaptionPrefix.isEmpty() ? TQString() : (TQString::tqfromLatin1(" - ") + d->appCaptionPrefix)) );
}
else {
- setCaption( (d->appCaptionPrefix.isEmpty() ? QString::null : (d->appCaptionPrefix + QString::fromLatin1(" - ")))
+ setCaption( (d->appCaptionPrefix.isEmpty() ? TQString() : (d->appCaptionPrefix + TQString::tqfromLatin1(" - ")))
+ d->origAppCaption );
}
}
@@ -1954,13 +1954,13 @@ void KexiMainWindowImpl::slotLastChildViewClosed() //slotLastChildFrmClosed()
// d->propEditorToolWindow->hide();
}
-void KexiMainWindowImpl::slotChildViewIsDetachedNow(QWidget*)
+void KexiMainWindowImpl::slotChildViewIsDetachedNow(TQWidget*)
{
slotCaptionForCurrentMDIChild(false);
}
/*void
-KexiMainWindowImpl::closeEvent(QCloseEvent *ev)
+KexiMainWindowImpl::closeEvent(TQCloseEvent *ev)
{
storeSettings();
@@ -2014,7 +2014,7 @@ KexiMainWindowImpl::restoreSettings()
applyMainWindowSettings( d->config, "MainWindow" );
//small hack - set the default -- bottom
-// d->config->setGroup(QString(name()) + " KMdiTaskBar Toolbar style");
+// d->config->setGroup(TQString(name()) + " KMdiTaskBar Toolbar style");
d->config->setGroup("MainWindow Toolbar KMdiTaskBar");
const bool tbe = d->config->readEntry("Position").isEmpty();
if (tbe || d->config->readEntry("Position")=="Bottom") {
@@ -2070,14 +2070,14 @@ KexiMainWindowImpl::restoreSettings()
if ( !initialGeometrySet() ) {
// Default size
// int restoredWidth, restoredHeight;
- int scnum = QApplication::desktop()->screenNumber(parentWidget());
- QRect desk = QApplication::desktop()->screenGeometry(scnum);
+ int scnum = TQApplication::desktop()->screenNumber(tqparentWidget());
+ TQRect desk = TQApplication::desktop()->screenGeometry(scnum);
//#if KDE_IS_VERSION(3,1,90)
// restoredWidth = KGlobalSettings::screenGeometry(scnum).width();
// restoredHeight = KGlobalSettings::screenGeometry(scnum).height();
//#else
-// restoredWidth = QApplication::desktop()->width();
-// restoredHeight = QApplication::desktop()->height();
+// restoredWidth = TQApplication::desktop()->width();
+// restoredHeight = TQApplication::desktop()->height();
//#endif
/* if (restoredWidth > 1100) {// very big desktop ?
restoredWidth = 1000;
@@ -2088,13 +2088,13 @@ KexiMainWindowImpl::restoreSettings()
restoredHeight = 600;
}
else {// small (800x600, 640x480) desktop
- restoredWidth = QMIN( restoredWidth, 600 );
- restoredHeight = QMIN( restoredHeight, 400 );
+ restoredWidth = TQMIN( restoredWidth, 600 );
+ restoredHeight = TQMIN( restoredHeight, 400 );
}*/
config->setGroup("MainWindow");
- QSize s ( config->readNumEntry( QString::fromLatin1("Width %1").arg(desk.width()), 700 ),
- config->readNumEntry( QString::fromLatin1("Height %1").arg(desk.height()), 480 ) );
+ TQSize s ( config->readNumEntry( TQString::tqfromLatin1("Width %1").tqarg(desk.width()), 700 ),
+ config->readNumEntry( TQString::tqfromLatin1("Height %1").tqarg(desk.height()), 480 ) );
resize (kMin (s.width(), desk.width()), kMin(s.height(), desk.height()));
}
#endif
@@ -2134,25 +2134,25 @@ KexiMainWindowImpl::storeSettings()
d->propEditorDockSeparatorPos = 80;
if (d->nav && d->navDockSeparatorPos >= 0 && d->navDockSeparatorPos <= 100) {
d->config->setGroup("MainWindow");
- //KDockWidget *dw = (KDockWidget *)d->nav->parentWidget();
+ //KDockWidget *dw = (KDockWidget *)d->nav->tqparentWidget();
//int w = dw->width();
//int ww = width();
//int d1 = (100 * dw->width()) / width() + 1;
- //KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ //KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
//int d2 = ds->separatorPosInPercent();
if (d->wasAutoOpen && d->dialogExistedBeforeCloseProject) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
d->config->writeEntry("LeftDockPositionWithAutoOpen",
d->navDockSeparatorPos);
#endif
// d->config->writeEntry("LeftDockPosition", dw->width());
// d->config->writeEntry("LeftDockPosition", d->nav->width());
} else {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
if (d->dialogExistedBeforeCloseProject)
d->config->writeEntry("LeftDockPosition", d->navDockSeparatorPos);
else
- d->config->writeEntry("LeftDockPosition", qRound(double(d->navDockSeparatorPos) / 0.77
+ d->config->writeEntry("LeftDockPosition", tqRound(double(d->navDockSeparatorPos) / 0.77
/ (double(d->propEditorDockSeparatorPos) / 80) ));
#endif
}
@@ -2172,7 +2172,7 @@ KexiMainWindowImpl::restoreWindowConfiguration(KConfig *config)
config->setGroup("MainWindow");
- QString dockGrp;
+ TQString dockGrp;
if (kapp->isRestored())
dockGrp=config->group()+"-Docking";
@@ -2188,9 +2188,9 @@ KexiMainWindowImpl::storeWindowConfiguration(KConfig *config)
{
kdDebug()<<"preparing session saving"<<endl;
config->setGroup("MainWindow");
- QString dockGrp;
+ TQString dockGrp;
-#if KDE_IS_VERSION(3,1,9) && !defined(Q_WS_WIN)
+#if KDE_IS_VERSION(3,1,9) && !defined(TQ_WS_WIN)
if (kapp->sessionSaving())
dockGrp=config->group()+"-Docking";
else
@@ -2224,12 +2224,12 @@ void
KexiMainWindowImpl::registerChild(KexiDialogBase *dlg)
{
kdDebug() << "KexiMainWindowImpl::registerChild()" << endl;
- connect(dlg, SIGNAL(activated(KMdiChildView *)),
- this, SLOT(activeWindowChanged(KMdiChildView *)));
- connect(dlg, SIGNAL(dirtyChanged(KexiDialogBase*)),
- this, SLOT(slotDirtyFlagChanged(KexiDialogBase*)));
+ connect(dlg, TQT_SIGNAL(activated(KMdiChildView *)),
+ TQT_TQOBJECT(this), TQT_SLOT(activeWindowChanged(KMdiChildView *)));
+ connect(dlg, TQT_SIGNAL(dirtyChanged(KexiDialogBase*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotDirtyFlagChanged(KexiDialogBase*)));
-// connect(dlg, SIGNAL(childWindowCloseRequest(KMdiChildView *)), this, SLOT(childClosed(KMdiChildView *)));
+// connect(dlg, TQT_SIGNAL(childWindowCloseRequest(KMdiChildView *)), TQT_TQOBJECT(this), TQT_SLOT(childClosed(KMdiChildView *)));
if(dlg->id() != -1) {
d->insertDialog(dlg);
}
@@ -2323,7 +2323,7 @@ void KexiMainWindowImpl::updateCustomPropertyPanelTabs(
curDialogPart->setupCustomPropertyPanelTabs(d->propEditorTabWidget, this);
//restore current page number for this part
- if (d->recentlySelectedPropertyPanelPages.contains( curDialogPart )) {
+ if (d->recentlySelectedPropertyPanelPages.tqcontains( curDialogPart )) {
d->propEditorTabWidget->setCurrentPage(
d->recentlySelectedPropertyPanelPages[ curDialogPart ]
);
@@ -2440,7 +2440,7 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v)
d->curDialog->selectedView()->propertySetSwitched();
if (dialogChanged) {
-// invalidateSharedActions();
+// tqinvalidateSharedActions();
//update property editor's contents...
// if ((KexiPropertyBuffer*)d->propBuffer!=d->curDialog->propertyBuffer()) {
// propertyBufferSwitched();//d->curDialog);
@@ -2457,8 +2457,8 @@ void KexiMainWindowImpl::activeWindowChanged(KMdiChildView *v)
}
// if (!d->curDialog.isNull())
// d->last_checked_mode = d->actions_for_view_modes[ d->curDialog->currentViewMode() ];
- invalidateViewModeActions();
- invalidateActions();
+ tqinvalidateViewModeActions();
+ tqinvalidateActions();
d->updateFindDialogContents();
if (dlg)
dlg->setFocus();
@@ -2523,7 +2523,7 @@ void
KexiMainWindowImpl::slotConfigureToolbars()
{
KEditToolbar edit(factory());
-// connect(&edit,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+// connect(&edit,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
(void) edit.exec();
}
@@ -2538,7 +2538,7 @@ KexiMainWindowImpl::slotProjectNew()
//TODO use KexiStartupDialog(KexiStartupDialog::Templates...)
bool cancel;
- QString fileName;
+ TQString fileName;
KexiProjectData *new_data = createBlankProjectData(
cancel,
false, /* do not confirm prj overwrites: user will be asked on process startup */
@@ -2547,8 +2547,8 @@ KexiMainWindowImpl::slotProjectNew()
if (!new_data)
return;
- QStringList args;
- args << qApp->applicationFilePath() << "-create-opendb";
+ TQStringList args;
+ args << tqApp->applicationFilePath() << "-create-opendb";
if (new_data->connectionData()->fileName().isEmpty()) {
//server based - pass .kexic file
if (fileName.isEmpty())
@@ -2564,10 +2564,10 @@ KexiMainWindowImpl::slotProjectNew()
//todo: pass new_data->caption()
//start new instance
//! @todo use KProcess?
- QProcess proc(args, this, "process");
- proc.setCommunication((QProcess::Communication)0);
-// proc.setWorkingDirectory( QFileInfo(new_data->connectionData()->fileName()).dir(true) );
- proc.setWorkingDirectory( QFileInfo(fileName).dir(true) );
+ TQProcess proc(args, TQT_TQOBJECT(this), "process");
+ proc.setCommunication((TQProcess::Communication)0);
+// proc.setWorkingDirectory( TQFileInfo(new_data->connectionData()->fileName()).dir(true) );
+ proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) );
if (!proc.start()) {
d->showStartProcessMsg(args);
}
@@ -2579,22 +2579,22 @@ KexiMainWindowImpl::createKexiProject(KexiProjectData* new_data)
{
d->prj = new KexiProject( new_data, this );
// d->prj = ::createKexiProject(new_data);
-//provided by KexiMessageHandler connect(d->prj, SIGNAL(error(const QString&,KexiDB::Object*)), this, SLOT(showErrorMessage(const QString&,KexiDB::Object*)));
-//provided by KexiMessageHandler connect(d->prj, SIGNAL(error(const QString&,const QString&)), this, SLOT(showErrorMessage(const QString&,const QString&)));
- connect(d->prj, SIGNAL(itemRenamed(const KexiPart::Item&, const QCString&)), this, SLOT(slotObjectRenamed(const KexiPart::Item&, const QCString&)));
+//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,KexiDB::Object*)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,KexiDB::Object*)));
+//provided by KexiMessageHandler connect(d->prj, TQT_SIGNAL(error(const TQString&,const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(showErrorMessage(const TQString&,const TQString&)));
+ connect(d->prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)), TQT_TQOBJECT(this), TQT_SLOT(slotObjectRenamed(const KexiPart::Item&, const TQCString&)));
if (d->nav)
- connect(d->prj, SIGNAL(itemRemoved(const KexiPart::Item&)), d->nav, SLOT(slotRemoveItem(const KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)), d->nav, TQT_SLOT(slotRemoveItem(const KexiPart::Item&)));
}
KexiProjectData*
KexiMainWindowImpl::createBlankProjectData(bool &cancelled, bool confirmOverwrites,
- QString* shortcutFileName)
+ TQString* shortcutFileName)
{
cancelled = false;
KexiNewProjectWizard wiz(Kexi::connset(), 0, "KexiNewProjectWizard", true);
wiz.setConfirmOverwrites(confirmOverwrites);
- if (wiz.exec() != QDialog::Accepted) {
+ if (wiz.exec() != TQDialog::Accepted) {
cancelled=true;
return 0;
}
@@ -2602,7 +2602,7 @@ KexiMainWindowImpl::createBlankProjectData(bool &cancelled, bool confirmOverwrit
KexiProjectData *new_data;
if (shortcutFileName)
- *shortcutFileName = QString::null;
+ *shortcutFileName = TQString();
if (wiz.projectConnectionData()) {
//server-based project
KexiDB::ConnectionData *cdata = wiz.projectConnectionData();
@@ -2648,7 +2648,7 @@ KexiMainWindowImpl::createBlankProject()
initNavigator();
Kexi::recentProjects().addProjectData( new_data );
- invalidateActions();
+ tqinvalidateActions();
updateAppCaption();
return true;
}
@@ -2660,14 +2660,14 @@ KexiMainWindowImpl::slotProjectOpen()
KexiStartupDialog::OpenExisting, 0, Kexi::connset(), Kexi::recentProjects(),
this, "KexiOpenDialog");
- if (dlg.exec()!=QDialog::Accepted)
+ if (dlg.exec()!=TQDialog::Accepted)
return;
openProject(dlg.selectedFileName(), dlg.selectedExistingConnection());
}
-tristate KexiMainWindowImpl::openProject(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName)
+tristate KexiMainWindowImpl::openProject(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName)
{
if (d->prj)
return openProjectInExternalKexiInstance(aFileName, fileNameForConnectionData, dbName);
@@ -2683,9 +2683,9 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
return openProject(aFileName, cdata, dbName);
}
-tristate KexiMainWindowImpl::openProject(const QString& aFileName,
- KexiDB::ConnectionData *cdata, const QString& dbName,
- const QValueList<KexiProjectData::ObjectInfo>& autoopenObjects)
+tristate KexiMainWindowImpl::openProject(const TQString& aFileName,
+ KexiDB::ConnectionData *cdata, const TQString& dbName,
+ const TQValueList<KexiProjectData::ObjectInfo>& autoopenObjects)
{
if (d->prj) {
return openProjectInExternalKexiInstance(aFileName, cdata, dbName);
@@ -2708,7 +2708,7 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
}
}
else {
-// QString selFile = dlg.selectedExistingFile();
+// TQString selFile = dlg.selectedExistingFile();
if (aFileName.isEmpty()) {
kdWarning() << "KexiMainWindowImpl::openProject(): aFileName.isEmpty()" << endl;
return false;
@@ -2718,7 +2718,7 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
KexiDB::ConnectionData cdata;
cdata.setFileName( aFileName );
// cdata.driverName = KexiStartupHandler::detectDriverForFile( cdata.driverName, fileName, this );
- QString detectedDriverName;
+ TQString detectedDriverName;
KexiStartupData::Import importActionData;
const tristate res = KexiStartupHandler::detectActionForFile(
importActionData, detectedDriverName, cdata.driverName, aFileName, this );
@@ -2746,10 +2746,10 @@ tristate KexiMainWindowImpl::openProject(const QString& aFileName,
return res;
}
-tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aFileName,
- KexiDB::ConnectionData *cdata, const QString& dbName)
+tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const TQString& aFileName,
+ KexiDB::ConnectionData *cdata, const TQString& dbName)
{
- QString fileNameForConnectionData;
+ TQString fileNameForConnectionData;
if (aFileName.isEmpty()) { //try .kexic file
if (cdata)
fileNameForConnectionData = Kexi::connset().fileNameForConnectionData(cdata);
@@ -2757,12 +2757,12 @@ tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aF
return openProjectInExternalKexiInstance(aFileName, fileNameForConnectionData, dbName);
}
-tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName)
+tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName)
{
- QString fileName(aFileName);
- QStringList args;
- args << qApp->applicationFilePath();
+ TQString fileName(aFileName);
+ TQStringList args;
+ args << tqApp->applicationFilePath();
// open a file-based project or a server connection provided as a .kexic file
// (we have no other simple way to provide the startup data to a new process)
if (fileName.isEmpty()) { //try .kexic file
@@ -2783,8 +2783,8 @@ tristate KexiMainWindowImpl::openProjectInExternalKexiInstance(const QString& aF
}
//! @todo use KRun
args << fileName;
- QProcess proc(args, this, "process");
- proc.setWorkingDirectory( QFileInfo(fileName).dir(true) );
+ TQProcess proc(args, TQT_TQOBJECT(this), "process");
+ proc.setWorkingDirectory( TQFileInfo(fileName).dir(true) );
const bool ok = proc.start();
if (!ok) {
d->showStartProcessMsg(args);
@@ -2873,7 +2873,7 @@ KexiMainWindowImpl::slotProjectSave()
return;
saveObject( d->curDialog );
updateAppCaption();
- invalidateActions();
+ tqinvalidateActions();
}
void
@@ -2992,8 +2992,8 @@ void KexiMainWindowImpl::slotViewPropertyEditor()
d->block_KMdiMainFrm_eventFilter=false;
/*#if defined(KDOCKWIDGET_P)
- KDockWidget *dw = (KDockWidget *)d->propEditor->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)d->propEditor->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
ds->setSeparatorPos(80,true);//d->config->readNumEntry("RightDockPosition", 80), true);
#endif*/
}
@@ -3006,10 +3006,10 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
}
if (!d->curDialog->supportsViewMode( viewMode )) {
showErrorMessage(i18n("Selected view is not supported for \"%1\" object.")
- .arg(d->curDialog->partItem()->name()),
+ .tqarg(d->curDialog->partItem()->name()),
i18n("Selected view (%1) is not supported by this object type (%2).")
- .arg(Kexi::nameForViewMode(viewMode))
- .arg(d->curDialog->part()->instanceCaption()) );
+ .tqarg(Kexi::nameForViewMode(viewMode))
+ .tqarg(d->curDialog->part()->instanceCaption()) );
d->toggleLastCheckedMode();
return false;
}
@@ -3019,7 +3019,7 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
tristate res = d->curDialog->switchToViewMode( viewMode );
if (!res) {
updateCustomPropertyPanelTabs(0, Kexi::NoViewMode); //revert
- showErrorMessage(i18n("Switching to other view failed (%1).").arg(Kexi::nameForViewMode(viewMode)),
+ showErrorMessage(i18n("Switching to other view failed (%1).").tqarg(Kexi::nameForViewMode(viewMode)),
d->curDialog);
d->toggleLastCheckedMode();
return false;
@@ -3038,8 +3038,8 @@ bool KexiMainWindowImpl::switchToViewMode(int viewMode)
d->curDialogViewGUIClient=viewClient; //remember
d->updatePropEditorVisibility(viewMode);
- invalidateProjectWideActions();
- invalidateSharedActions();
+ tqinvalidateProjectWideActions();
+ tqinvalidateSharedActions();
d->updateFindDialogContents();
return true;
}
@@ -3060,7 +3060,7 @@ void KexiMainWindowImpl::slotViewTextMode()
switchToViewMode(Kexi::TextViewMode);
}
-void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool layoutTaskBar)
+void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool tqlayoutTaskBar)
{
if (d->insideCloseDialog && dynamic_cast<KexiDialogBase *>(pWnd)) {
d->windowsToClose.append(dynamic_cast<KexiDialogBase *>(pWnd));
@@ -3075,12 +3075,12 @@ void KexiMainWindowImpl::closeWindow(KMdiChildView *pWnd, bool layoutTaskBar)
}
}
*/
- closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), layoutTaskBar);
+ closeDialog(dynamic_cast<KexiDialogBase *>(pWnd), tqlayoutTaskBar);
}
tristate KexiMainWindowImpl::getNewObjectInfo(
KexiPart::Item *partItem, KexiPart::Part *part,
- bool& allowOverwriting, const QString& messageWhenAskingForName )
+ bool& allowOverwriting, const TQString& messageWhenAskingForName )
{
//data was never saved in the past -we need to create a new object at the backend
KexiPart::Info *info = part->info();
@@ -3104,7 +3104,7 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
allowOverwriting = false;
bool found;
do {
- if (d->nameDialog->exec()!=QDialog::Accepted)
+ if (d->nameDialog->exec()!=TQDialog::Accepted)
return cancelled;
//check if that name already exists
KexiDB::SchemaData tmp_sdata;
@@ -3118,11 +3118,11 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
if (allowOverwriting) {
int res = KMessageBox::warningYesNoCancel(this,
"<p>"+part->i18nMessage("Object \"%1\" already exists.", 0)
- .arg(d->nameDialog->widget()->nameText())
+ .tqarg(d->nameDialog->widget()->nameText())
+"</p><p>"+i18n("Do you want to replace it?")+"</p>", 0,
KGuiItem(i18n("&Replace"), "button_yes"),
KGuiItem(i18n("&Choose Other Name...")),
- QString::null, KMessageBox::Notify|KMessageBox::Dangerous);
+ TQString(), KMessageBox::Notify|KMessageBox::Dangerous);
if (res == KMessageBox::No)
continue;
else if (res == KMessageBox::Cancel)
@@ -3135,11 +3135,11 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
else {
KMessageBox::information(this,
"<p>"+part->i18nMessage("Object \"%1\" already exists.", 0)
- .arg(d->nameDialog->widget()->nameText())
+ .tqarg(d->nameDialog->widget()->nameText())
+"</p><p>"+i18n("Please choose other name.")+"</p>");
// " For example: Table \"my_table\" already exists" ,
// "%1 \"%2\" already exists.\nPlease choose other name.")
-// .arg(dlg->part()->instanceName()).arg(d->nameDialog->widget()->nameText()));
+// .tqarg(dlg->part()->instanceName()).tqarg(d->nameDialog->widget()->nameText()));
continue;
}
}
@@ -3152,7 +3152,7 @@ tristate KexiMainWindowImpl::getNewObjectInfo(
return true;
}
-tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& messageWhenAskingForName,
+tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const TQString& messageWhenAskingForName,
bool dontAsk)
{
tristate res;
@@ -3160,7 +3160,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
//data was saved in the past -just save again
res = dlg->storeData(dontAsk);
if (!res)
- showErrorMessage(i18n("Saving \"%1\" object failed.").arg(dlg->partItem()->name()),
+ showErrorMessage(i18n("Saving \"%1\" object failed.").tqarg(dlg->partItem()->name()),
d->curDialog);
return res;
}
@@ -3177,7 +3177,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
if (~res)
return cancelled;
if (!res) {
- showErrorMessage(i18n("Saving new \"%1\" object failed.").arg(dlg->partItem()->name()),
+ showErrorMessage(i18n("Saving new \"%1\" object failed.").tqarg(dlg->partItem()->name()),
d->curDialog);
return false;
}
@@ -3187,7 +3187,7 @@ tristate KexiMainWindowImpl::saveObject( KexiDialogBase *dlg, const QString& mes
//item id changed to final one: update association in dialogs' dictionary
// d->dialogs.take(oldItemID);
d->updateDialogId(dlg, oldItemID);
- invalidateProjectWideActions();
+ tqinvalidateProjectWideActions();
return true;
}
@@ -3196,7 +3196,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg)
return closeDialog(dlg, true);
}
-tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar, bool doNotSaveChanges)
+tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskBar, bool doNotSaveChanges)
{
if (!dlg)
return true;
@@ -3224,28 +3224,28 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
saveChanges.setToolTip(i18n("Save changes"));
saveChanges.setWhatsThis(
i18n( "Pressing this button will save all recent changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
KGuiItem discardChanges( KStdGuiItem::discard() );
discardChanges.setWhatsThis(
i18n( "Pressing this button will discard all recent changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
//dialog's data is dirty:
//--adidional message, e.g. table designer will return
// "Note: This table is already filled with data which will be removed."
// if the dlg is in design view mode.
- QString additionalMessage = dlg->part()->i18nMessage(
+ TQString additionalMessage = dlg->part()->i18nMessage(
":additional message before saving design", dlg);
if (additionalMessage.startsWith(":"))
- additionalMessage = QString::null;
+ additionalMessage = TQString();
if (!additionalMessage.isEmpty())
additionalMessage = "<p>"+additionalMessage+"</p>";
const int questionRes = KMessageBox::warningYesNoCancel( this,
"<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg)
- .arg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>"
+ .tqarg(dlg->partItem()->name())+"</p><p>"+i18n("Do you want to save changes?")+"</p>"
+ additionalMessage /*may be empty*/,
- QString::null,
+ TQString(),
saveChanges,
discardChanges);
if (questionRes==KMessageBox::Cancel) {
@@ -3259,7 +3259,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
if (questionRes==KMessageBox::Yes) {
//save it
// if (!dlg->storeData())
- tristate res = saveObject( dlg, QString::null, true /*dontAsk*/ );
+ tristate res = saveObject( dlg, TQString(), true /*dontAsk*/ );
if (!res || ~res) {
//js:TODO show error info; (retry/ignore/cancel)
#ifndef KEXI_NO_PENDING_DIALOGS
@@ -3297,7 +3297,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
d->removeDialog(dlg_id); //don't remove -KMDI will do that
//also remove from 'print setup dialogs' cache, if needed
int printedObjectID = 0;
- if (d->pageSetupDialogItemID2dataItemID_map.contains(dlg_id))
+ if (d->pageSetupDialogItemID2dataItemID_map.tqcontains(dlg_id))
printedObjectID = d->pageSetupDialogItemID2dataItemID_map[ dlg_id ];
d->pageSetupDialogs.take(printedObjectID);
@@ -3338,7 +3338,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
const bool isInMaximizedChildFrmMode = this->isInMaximizedChildFrmMode();
- KMdiMainFrm::closeWindow(dlg, layoutTaskBar);
+ KMdiMainFrm::closeWindow(dlg, tqlayoutTaskBar);
//focus navigator if nothing else available
if (d->openedDialogsCount()==0) {
@@ -3348,7 +3348,7 @@ tristate KexiMainWindowImpl::closeDialog(KexiDialogBase *dlg, bool layoutTaskBar
d->updatePropEditorVisibility(0);
}
- invalidateActions();
+ tqinvalidateActions();
d->insideCloseDialog = false;
if (!d->windowsToClose.isEmpty()) //continue 'close all'
closeDialog(d->windowsToClose.take(0), true);
@@ -3376,13 +3376,13 @@ void KexiMainWindowImpl::detachWindow(KMdiChildView *pWnd,bool bShow)
void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool bAutomaticResize)
{
-// if (bAutomaticResize || w->size().isEmpty() || (w->size() == QSize(1,1))) {
+// if (bAutomaticResize || w->size().isEmpty() || (w->size() == TQSize(1,1))) {
KMdiMainFrm::attachWindow(pWnd,true,bAutomaticResize);
//for dialogs in normal state: decrease dialog's height if it exceeds area contents
if (pWnd->mdiParent()->state() == KMdiChildFrm::Normal
- && pWnd->geometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom())
+ && pWnd->tqgeometry().bottom() > pWnd->mdiParent()->mdiAreaContentsRect().bottom())
{
- QRect r = pWnd->geometry();
+ TQRect r = pWnd->tqgeometry();
r.setBottom( pWnd->mdiParent()->mdiAreaContentsRect().bottom() - 5 );
pWnd->setGeometry( r );
}
@@ -3392,157 +3392,157 @@ void KexiMainWindowImpl::attachWindow(KMdiChildView *pWnd, bool /*bShow*/, bool
dynamic_cast<KexiDialogBase*>(pWnd)->sendAttachedStateToCurrentView();
}
-QWidget* KexiMainWindowImpl::findWindow(QWidget *w)
+TQWidget* KexiMainWindowImpl::findWindow(TQWidget *w)
{
- while (w && !acceptsSharedActions(w))
- w = w->parentWidget();
+ while (w && !acceptsSharedActions(TQT_TQOBJECT(w)))
+ w = w->tqparentWidget();
return w;
}
-bool KexiMainWindowImpl::acceptsSharedActions(QObject *w)
+bool KexiMainWindowImpl::acceptsSharedActions(TQObject *w)
{
return w->inherits("KexiDialogBase") || w->inherits("KexiViewBase");
}
-bool KexiMainWindowImpl::eventFilter( QObject *obj, QEvent * e )
+bool KexiMainWindowImpl::eventFilter( TQObject *obj, TQEvent * e )
{
//KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl;
- if (e->type()==QEvent::KeyPress) {
- KexiVDebug << "KEY EVENT " << QString::number(static_cast<QKeyEvent*>(e)->key(), 16) << endl;
+ if (e->type()==TQEvent::KeyPress) {
+ KexiVDebug << "KEY EVENT " << TQString::number(TQT_TQKEYEVENT(e)->key(), 16) << endl;
KexiVDebug << endl;
}
- if (e->type()==QEvent::AccelOverride) {
- //KexiVDebug << "AccelOverride EVENT " << static_cast<QKeyEvent*>(e)->key() << " " << static_cast<QKeyEvent*>(e)->state() == ControlButton << endl;
+ if (e->type()==TQEvent::AccelOverride) {
+ //KexiVDebug << "AccelOverride EVENT " << TQT_TQKEYEVENT(e)->key() << " " << TQT_TQKEYEVENT(e)->state() == ControlButton << endl;
//avoid sending CTRL+Tab key twice for tabbed/ideal mode, epecially for win32
- if (static_cast<QKeyEvent*>(e)->key()==Qt::Key_Tab && static_cast<QKeyEvent*>(e)->state() == ControlButton) {
- if (d->action_window_next->shortcut().keyCodeQt()==Qt::Key_Tab+Qt::CTRL && d->action_window_next->shortcut().count()==1
+ if (TQT_TQKEYEVENT(e)->key()==TQt::Key_Tab && TQT_TQKEYEVENT(e)->state() == ControlButton) {
+ if (d->action_window_next->shortcut().keyCodeQt()==TQt::Key_Tab+TQt::CTRL && d->action_window_next->shortcut().count()==1
&& (mdiMode()==KMdi::TabPageMode || mdiMode()==KMdi::IDEAlMode))
{
- static_cast<QKeyEvent*>(e)->accept();
+ TQT_TQKEYEVENT(e)->accept();
}
}
}
- if (e->type()==QEvent::Close) {
+ if (e->type()==TQEvent::Close) {
KexiVDebug << "Close EVENT" << endl;
}
- if (e->type()==QEvent::Resize) {
+ if (e->type()==TQEvent::Resize) {
KexiVDebug << "Resize EVENT" << endl;
}
- if (e->type()==QEvent::ShowMaximized) {
+ if (e->type()==TQEvent::ShowMaximized) {
KexiVDebug << "ShowMaximized EVENT" << endl;
}
/* if (obj==d->propEditor) {
- if (e->type()==QEvent::Resize) {
+ if (e->type()==TQEvent::Resize) {
d->updatePropEditorDockWidthInfo();
}
}*/
- QWidget *focus_w = 0;
- if (obj->inherits("QPopupMenu")) {
+ TQWidget *focus_w = 0;
+ if (obj->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) {
/* Fixes for popup menus behaviour:
For hiding/showing: focus previously (d->focus_before_popup)
focused window, if known, otherwise focus currently focused one.
- And: just invalidate actions.
+ And: just tqinvalidate actions.
*/
- if (e->type()==QEvent::Hide || e->type()==QEvent::Show) {
+ if (e->type()==TQEvent::Hide || e->type()==TQEvent::Show) {
KexiVDebug << e->type() << endl;
focus_w = focusWindow();
if (!d->focus_before_popup.isNull()) {
d->focus_before_popup->setFocus();
d->focus_before_popup=0;
- invalidateSharedActions();
+ tqinvalidateSharedActions();
} else {
if (focus_w) {
focus_w->setFocus();
- invalidateSharedActions();
+ tqinvalidateSharedActions();
}
}
}
return false;
}
- /*! On mouse click on the findow, make sure it's focused and actions are invalidated */
- if (e->type()==QEvent::MouseButtonPress) {
- QWidget *w = findWindow(static_cast<QWidget*>(obj));
+ /*! On mouse click on the findow, make sure it's focused and actions are tqinvalidated */
+ if (e->type()==TQEvent::MouseButtonPress) {
+ TQWidget *w = findWindow(TQT_TQWIDGET(obj));
KexiVDebug << "MouseButtonPress EVENT " << (w ? w->name() : 0) << endl;
if (w) {
w->setFocus();
- invalidateSharedActions(d->curDialog);
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
}
}
- QWidget *w = findWindow(static_cast<QWidget*>(obj));
- if (e->type()==QEvent::FocusIn) {
+ TQWidget *w = findWindow(TQT_TQWIDGET(obj));
+ if (e->type()==TQEvent::FocusIn) {
focus_w = focusWindow();
KexiVDebug << "Focus EVENT" << endl;
KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl;
#ifdef KEXI_STATUSBAR_DEBUG
- QWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0;
- d->statusBar->setStatus(QString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
- .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "")
- .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "")
+ TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0;
+ d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
+ .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "")
+ .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "")
);
#endif
}
- else if (e->type()==QEvent::FocusOut) {
+ else if (e->type()==TQEvent::FocusOut) {
focus_w = focusWindow();
KexiVDebug << "Focus OUT EVENT" << endl;
KexiVDebug << (focus_w ? focus_w->name() : "" ) << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name() <<endl;
#ifdef KEXI_STATUSBAR_DEBUG
- QWidget *focus_widget = focus_w ? focus_w->focusWidget() : 0;
- d->statusBar->setStatus(QString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
- .arg(focus_w ? focus_w->className() : "").arg(focus_w ? focus_w->name() : "")
- .arg(focus_widget ? focus_widget->className() : "").arg(focus_widget ? focus_widget->name() : "")
+ TQWidget *focus_widget = focus_w ? focus_w->tqfocusWidget() : 0;
+ d->statusBar->settqStatus(TQString("FOCUS VIEW: %1 %2, FOCUS WIDGET: %3 %4")
+ .tqarg(focus_w ? focus_w->className() : "").tqarg(focus_w ? focus_w->name() : "")
+ .tqarg(focus_widget ? focus_widget->className() : "").tqarg(focus_widget ? focus_widget->name() : "")
);
#endif
}
- if (e->type()==QEvent::WindowActivate) {
+ if (e->type()==TQEvent::WindowActivate) {
KexiVDebug << "WindowActivate EVENT" << endl;
KexiVDebug << "eventFilter: " <<e->type() << " " <<obj->name()<<endl;
}
#if 0
- if (e->type()==QEvent::FocusIn) {
+ if (e->type()==TQEvent::FocusIn) {
if (focus_w) {
// if (d->actionProxies[ w ])
// if (d->actionProxies[ focus_w ]) {
if (actionProxyFor( focus_w )) {
-// invalidateSharedActions();
+// tqinvalidateSharedActions();
}
else {
-/* QObject* o = focusWidget();
+/* TQObject* o = tqfocusWidget();
while (o && !o->inherits("KexiDialogBase") && !o->inherits("KexiDockBase"))
- o = o->parent();*/
-//js invalidateSharedActions(focus_w);
+ o = o->tqparent();*/
+//js tqinvalidateSharedActions(focus_w);
}
}
-// /*|| e->type()==QEvent::FocusOut*/) && /*(!obj->inherits("KexiDialogBase")) &&*/ d->actionProxies[ obj ]) {
-// invalidateSharedActions();
+// /*|| e->type()==TQEvent::FocusOut*/) && /*(!obj->inherits("KexiDialogBase")) &&*/ d->actionProxies[ obj ]) {
+// tqinvalidateSharedActions();
}
- if (e->type()==QEvent::FocusOut && focus_w && focus_w==d->curDialog && actionProxyFor( obj )) {
- invalidateSharedActions(d->curDialog);
+ if (e->type()==TQEvent::FocusOut && focus_w && focus_w==d->curDialog && actionProxyFor( obj )) {
+ tqinvalidateSharedActions(d->curDialog);
}
#endif
- if (!d->focus_before_popup.isNull() && e->type()==QEvent::FocusOut && obj->inherits("KMenuBar")) {
+ if (!d->focus_before_popup.isNull() && e->type()==TQEvent::FocusOut && obj->inherits("KMenuBar")) {
//d->nav->setFocus();
d->focus_before_popup->setFocus();
d->focus_before_popup=0;
- invalidateSharedActions(d->curDialog);
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
return true;
}
- //remember currently focued window invalidate act.
- if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
- if (KexiUtils::hasParent(d->curDialog, focus_w)) {
- invalidateSharedActions(d->curDialog);
+ //remember currently focued window tqinvalidate act.
+ if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
+ if (KexiUtils::hasParent(TQT_TQOBJECT(d->curDialog), TQT_TQOBJECT(focus_w))) {
+ tqinvalidateSharedActions(TQT_TQOBJECT(d->curDialog));
d->focus_before_popup=d->curDialog;
}
else {
-//not needed??? invalidateSharedActions(focus_w);
+//not needed??? tqinvalidateSharedActions(focus_w);
d->focus_before_popup=focus_w;
}
}
@@ -3551,25 +3551,25 @@ bool KexiMainWindowImpl::eventFilter( QObject *obj, QEvent * e )
//keep focus in main window:
if (w && w==d->nav) {
// kdDebug() << "NAV" << endl;
- if (e->type()==QEvent::FocusIn) {
+ if (e->type()==TQEvent::FocusIn) {
return true;
- } else if (e->type()==QEvent::WindowActivate && w==d->focus_before_popup) {
+ } else if (e->type()==TQEvent::WindowActivate && w==d->focus_before_popup) {
// d->nav->setFocus();
d->focus_before_popup=0;
return true;
- } else if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Tab) {
+ } else if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Tab) {
//activate current child:
if (d->curDialog) {
d->curDialog->activate();
return true;
}
}
- else if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
+ else if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
d->focus_before_popup=w;
}
- //invalidateSharedActions();
- } else if (e->type()==QEvent::Hide) {
+ //tqinvalidateSharedActions();
+ } else if (e->type()==TQEvent::Hide) {
setFocus();
return false;
}
@@ -3589,8 +3589,8 @@ bool KexiMainWindowImpl::openingAllowed(KexiPart::Item* item, int viewMode)
}
KexiDialogBase *
-KexiMainWindowImpl::openObject(const QCString& mimeType, const QString& name,
- int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs)
+KexiMainWindowImpl::openObject(const TQCString& mimeType, const TQString& name,
+ int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs)
{
KexiPart::Item *item = d->prj->itemForMimeType(mimeType,name);
if (!item)
@@ -3600,12 +3600,12 @@ KexiMainWindowImpl::openObject(const QCString& mimeType, const QString& name,
KexiDialogBase *
KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &openingCancelled,
- QMap<QString,QString>* staticObjectArgs, QString* errorMessage)
+ TQMap<TQString,TQString>* staticObjectArgs, TQString* errorMessage)
{
if (!openingAllowed(item, viewMode)) {
if (errorMessage)
*errorMessage = i18n("opening is not allowed in \"data view/design view/text view\" mode",
- "opening is not allowed in \"%1\" mode").arg(Kexi::nameForViewMode(viewMode));
+ "opening is not allowed in \"%1\" mode").tqarg(Kexi::nameForViewMode(viewMode));
openingCancelled = true;
return 0;
}
@@ -3666,9 +3666,9 @@ KexiMainWindowImpl::openObject(KexiPart::Item* item, int viewMode, bool &opening
d->curDialogViewGUIClient=viewClient; //remember
}
- invalidateViewModeActions();
+ tqinvalidateViewModeActions();
if (viewMode!=dlg->currentViewMode())
- invalidateSharedActions();
+ tqinvalidateSharedActions();
#ifndef KEXI_NO_PENDING_DIALOGS
d->removePendingDialog( dlg->id() );
@@ -3711,7 +3711,7 @@ KexiMainWindowImpl::openObjectFromNavigator(KexiPart::Item* item, int viewMode,
openingCancelled = false;
if (dlg) {
if (activateWindow(dlg)) {//item->identifier())) {//just activate
- invalidateViewModeActions();
+ tqinvalidateViewModeActions();
return dlg;
}
}
@@ -3790,7 +3790,7 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
"<p>"+i18n("Do you want to permanently delete:\n"
"%1\n"
"If you click \"Delete\", you will not be able to undo the deletion.")
- .arg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ),
+ .tqarg( "</p><p>"+part->instanceCaption()+" \""+ item->name() + "\"?</p>" ),
0, KGuiItem(i18n("Delete"), "editdelete"), KStdGuiItem::no()))
return cancelled;
}
@@ -3798,7 +3798,7 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
//also close 'print setup' dialog for this item, if any
tristate res;
// int printedObjectID = 0;
-// if (d->pageSetupDialogItemID2dataItemID_map.contains(item->identifier()))
+// if (d->pageSetupDialogItemID2dataItemID_map.tqcontains(item->identifier()))
// printedObjectID = d->pageSetupDialogItemID2dataItemID_map[ item->identifier() ];
KexiDialogBase * pageSetupDlg = d->pageSetupDialogs[ item->identifier() ];
const bool oldInsideCloseDialog = d->insideCloseDialog;
@@ -3848,14 +3848,14 @@ tristate KexiMainWindowImpl::removeObject( KexiPart::Item *item, bool dontAsk )
return true;
}
-void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const QString& _newName, bool &success )
+void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const TQString& _newName, bool &success )
{
if (userMode()) {
success = false;
return;
}
d->pendingDialogsExist();
- QString newName = _newName.stripWhiteSpace();
+ TQString newName = _newName.stripWhiteSpace();
if (newName.isEmpty()) {
showSorryMessage( i18n("Could not set empty name for this object.") );
success = false;
@@ -3865,14 +3865,14 @@ void KexiMainWindowImpl::renameObject( KexiPart::Item *item, const QString& _new
const bool res = d->prj->renameObject(this, *item, newName);
enableMessages(true);
if (!res) {
- showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").arg(newName) );
+ showErrorMessage( d->prj, i18n("Renaming object \"%1\" failed.").tqarg(newName) );
success = false;
return;
}
d->pendingDialogsExist();
}
-void KexiMainWindowImpl::slotObjectRenamed(const KexiPart::Item &item, const QCString& /*oldName*/)
+void KexiMainWindowImpl::slotObjectRenamed(const KexiPart::Item &item, const TQCString& /*oldName*/)
{
#ifndef KEXI_NO_PENDING_DIALOGS
Private::PendingJobType pendingType;
@@ -3903,10 +3903,10 @@ void KexiMainWindowImpl::acceptPropertySetEditing()
}
void KexiMainWindowImpl::propertySetSwitched(KexiDialogBase *dlg, bool force,
- bool preservePrevSelection, const QCString& propertyToSelect)
+ bool preservePrevSelection, const TQCString& propertyToSelect)
{
kdDebug() << "KexiMainWindowImpl::propertySetSwitched() d->curDialog: "
- << (d->curDialog ? d->curDialog->caption() : QString("NULL")) << " dlg: " << (dlg ? dlg->caption() : QString("NULL"))<< endl;
+ << (d->curDialog ? d->curDialog->caption() : TQString("NULL")) << " dlg: " << (dlg ? dlg->caption() : TQString("NULL"))<< endl;
if ((KexiDialogBase*)d->curDialog!=dlg) {
d->propBuffer = 0; //we'll need to move to another prop. set
return;
@@ -3932,7 +3932,7 @@ void KexiMainWindowImpl::slotDirtyFlagChanged(KexiDialogBase* dlg)
if(!userMode())
d->nav->updateItemName( *item, dlg->dirty() );
- invalidateActions();
+ tqinvalidateActions();
updateAppCaption();
}
@@ -3964,8 +3964,8 @@ void KexiMainWindowImpl::slotStartFeedbackAgent()
if ( wizard->exec() )
{
KApplication::kApplication()->invokeMailer( "kexi-reports-dummy@kexi.org",
- QString::null, QString::null,
- about->appName() + QCString( " [feedback]" ),
+ TQString(), TQString(),
+ about->appName() + TQCString( " [feedback]" ),
wizard->feedbackDocument().toString( 2 ).local8Bit() );
}
@@ -3980,7 +3980,7 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
if (onStartup && !d->showImportantInfoOnStartup)
return;
- QString key = QString("showImportantInfo %1").arg(KEXI_VERSION_STRING);
+ TQString key = TQString("showImportantInfo %1").tqarg(KEXI_VERSION_STRING);
d->config->setGroup("Startup");
bool show = d->config->readBoolEntry(key,true);
@@ -3989,30 +3989,30 @@ void KexiMainWindowImpl::importantInfo(bool /*onStartup*/)
if (!d->config->hasKey("RunOnStart"))
d->config->writeEntry("RunOnStart",true);
- QString lang = KGlobal::locale()->language();
- QString fname = locate("data", QString("kexi/readme_")+lang);
+ TQString lang = KGlobal::locale()->language();
+ TQString fname = locate("data", TQString("kexi/readme_")+lang);
if (fname.isEmpty())//back to default
fname = locate("data", "kexi/readme_en");
- KTipDialog tipDialog(new KTipDatabase(QString::null), 0);
+ KTipDialog tipDialog(new KTipDatabase(TQString()), 0);
tipDialog.setCaption(i18n("Important Information"));
- QObjectList *l = tipDialog.queryList( "KPushButton" );//hack: hide <- -> buttons
+ TQObjectList *l = tipDialog.queryList( "KPushButton" );//hack: hide <- -> buttons
int i=0;
- for (QObjectListIt it( *l ); it.current() && i<2; ++it, i++ )
+ for (TQObjectListIt it( *l ); it.current() && i<2; ++it, i++ )
static_cast<KPushButton*>(it.current())->hide();
- QFile f(fname);
+ TQFile f(fname);
if ( f.open( IO_ReadOnly ) ) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
ts.setCodec( KGlobal::locale()->codecForEncoding() );
- QTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser");
+ TQTextBrowser *tb = KexiUtils::findFirstChild<KTextBrowser>(&tipDialog,"KTextBrowser");
if (tb) {
- tb->setText( QString("<qt>%1</qt>").arg(ts.read()) );
+ tb->setText( TQString("<qt>%1</qt>").tqarg(ts.read()) );
}
f.close();
}
tipDialog.adjustSize();
- QRect desk = QApplication::desktop()->screenGeometry( QApplication::desktop()->screenNumber(this) );
- tipDialog.resize( QMAX(tipDialog.width(),desk.width()*3/5), QMAX(tipDialog.height(),desk.height()*3/5) );
+ TQRect desk = TQApplication::desktop()->screenGeometry( TQApplication::desktop()->screenNumber(this) );
+ tipDialog.resize( TQMAX(tipDialog.width(),desk.width()*3/5), TQMAX(tipDialog.height(),desk.height()*3/5) );
KDialog::centerOnScreen(&tipDialog);
tipDialog.setModal ( true );
tipDialog.exec();
@@ -4061,8 +4061,8 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
#if 0 //todo reenable; autoopen objects are handled elsewhere
KexiDB::TableSchema *sch = d->prj->dbConnection()->tableSchema("kexi__final");
- QString err_msg = i18n("Could not start project \"%1\" in Final Mode.")
- .arg(static_cast<KexiDB::SchemaData*>(projectData)->name());
+ TQString err_msg = i18n("Could not start project \"%1\" in Final Mode.")
+ .tqarg(static_cast<KexiDB::SchemaData*>(projectData)->name());
if(!sch)
{
hide();
@@ -4078,8 +4078,8 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
return false;
}
- QString startupPart;
- QString startupItem;
+ TQString startupPart;
+ TQString startupItem;
while(c->moveNext())
{
kdDebug() << "KexiMainWinImpl::initFinalMode(): property: [" << c->value(1).toString() << "] " << c->value(2).toString() << endl;
@@ -4117,7 +4117,7 @@ KexiMainWindowImpl::initUserMode(KexiProjectData *projectData)
return false;
}
- QWidget::setCaption("MyApp");//TODO
+ TQWidget::setCaption("MyApp");//TODO
#endif
return true;
}
@@ -4138,8 +4138,8 @@ KexiMainWindowImpl::initUserActions()
/*
KexiUserAction *a1 = new KexiUserAction(this, actionCollection(), "user_dataview", "Change to dataview", "table");
Arguments args;
- args.append(QVariant("kexi/table"));
- args.append(QVariant("persons"));
+ args.append(TQVariant("kexi/table"));
+ args.append(TQVariant("persons"));
a1->setMethod(KexiUserAction::OpenObject, args);
*/
#endif
@@ -4147,7 +4147,7 @@ KexiMainWindowImpl::initUserActions()
void KexiMainWindowImpl::slotToolsProjectMigration()
{
- showProjectMigrationWizard(QString::null, QString::null);
+ showProjectMigrationWizard(TQString(), TQString());
}
void KexiMainWindowImpl::slotToolsCompactDatabase()
@@ -4161,7 +4161,7 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
KexiStartupDialog::OpenExisting, 0, Kexi::connset(), Kexi::recentProjects(),
this, "KexiOpenDialog");
- if (dlg.exec()!=QDialog::Accepted)
+ if (dlg.exec()!=TQDialog::Accepted)
return;
if (dlg.selectedFileName().isEmpty()) {
@@ -4184,7 +4184,7 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
if (!drv || !(drv->features() & KexiDB::Driver::CompactingDatabaseSupported)) {
KMessageBox::information(this, "<qt>"+
i18n("Compacting database file <nobr>\"%1\"</nobr> is not supported.")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
return;
}
data = new KexiProjectData( cdata, cdata.fileName() );
@@ -4219,40 +4219,40 @@ void KexiMainWindowImpl::slotToolsCompactDatabase()
}
tristate KexiMainWindowImpl::showProjectMigrationWizard(
- const QString& mimeType, const QString& databaseName, const KexiDB::ConnectionData *cdata)
+ const TQString& mimeType, const TQString& databaseName, const KexiDB::ConnectionData *cdata)
{
//pass arguments
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("mimeType", mimeType);
args.insert("databaseName", databaseName);
if (cdata) { //pass ConnectionData serialized as a string...
- QString str;
+ TQString str;
KexiUtils::serializeMap( KexiDB::toMap( *cdata ), str );
args.insert("connectionData", str);
}
- QDialog *dlg = KexiInternalPart::createModalDialogInstance("migration", this, this, 0, &args);
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance("migration", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
const int result = dlg->exec();
delete dlg;
//raise();
- if (result!=QDialog::Accepted)
+ if (result!=TQDialog::Accepted)
return cancelled;
//open imported project in a new Kexi instance
- QString destinationDatabaseName( args["destinationDatabaseName"] );
- QString fileName, destinationConnectionShortcut, dbName;
+ TQString destinationDatabaseName( args["destinationDatabaseName"] );
+ TQString fileName, destinationConnectionShortcut, dbName;
if (!destinationDatabaseName.isEmpty()) {
- if (args.contains("destinationConnectionShortcut")) {
+ if (args.tqcontains("destinationConnectionShortcut")) {
// server-based
destinationConnectionShortcut = args["destinationConnectionShortcut"];
}
else {
// file-based
fileName = destinationDatabaseName;
- destinationDatabaseName = QString::null;
+ destinationDatabaseName = TQString();
}
tristate res = openProject(fileName, destinationConnectionShortcut,
destinationDatabaseName);
@@ -4281,9 +4281,9 @@ void KexiMainWindowImpl::slotProjectImportDataTable()
//! @todo allow data appending (it is not possible now)
if (userMode())
return;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("sourceType", "file");
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", this, this, 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -4292,7 +4292,7 @@ void KexiMainWindowImpl::slotProjectImportDataTable()
}
tristate KexiMainWindowImpl::executeCustomActionForObject(KexiPart::Item* item,
- const QString& actionName)
+ const TQString& actionName)
{
if (actionName == "exportToCSV")
return exportItemAsDataTable(item);
@@ -4311,30 +4311,30 @@ tristate KexiMainWindowImpl::exportItemAsDataTable(KexiPart::Item* item)
//! @todo: check if changes to this are saved, if not: ask for saving
//! @todo: accept row changes...
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("destinationType", "file");
- args.insert("itemId", QString::number(item->identifier()));
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ args.insert("itemId", TQString::number(item->identifier()));
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
int result = dlg->exec();
delete dlg;
- return result == QDialog::Rejected ? cancelled : true;
+ return result == TQDialog::Rejected ? cancelled : true;
}
-bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const QString& titleText)
+bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const TQString& titleText)
{
return printItem(item, KexiSimplePrintingSettings::load(), titleText);
}
tristate KexiMainWindowImpl::printItem(KexiPart::Item* item)
{
- return printItem(item, QString::null);
+ return printItem(item, TQString());
}
bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const KexiSimplePrintingSettings& settings,
- const QString& titleText)
+ const TQString& titleText)
{
//! @todo: check if changes to this object's design are saved, if not: ask for saving
//! @todo: accept row changes...
@@ -4343,20 +4343,20 @@ bool KexiMainWindowImpl::printItem(KexiPart::Item* item, const KexiSimplePrintin
return cmd.print(settings, titleText);
}
-bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item, const QString& titleText, bool reload)
+bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item, const TQString& titleText, bool reload)
{
return printPreviewForItem(item, KexiSimplePrintingSettings::load(), titleText, reload);
}
tristate KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item)
{
- return printPreviewForItem(item, QString::null,
+ return printPreviewForItem(item, TQString(),
//! @todo store cached row data?
true/*reload*/);
}
bool KexiMainWindowImpl::printPreviewForItem(KexiPart::Item* item,
- const KexiSimplePrintingSettings& settings, const QString& titleText, bool reload)
+ const KexiSimplePrintingSettings& settings, const TQString& titleText, bool reload)
{
//! @todo: check if changes to this object's design are saved, if not: ask for saving
//! @todo: accept row changes...
@@ -4392,8 +4392,8 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
if (!activateWindow(printingDialog))
return false;
if (action == PreviewItem || action == PrintItem) {
- QTimer::singleShot(0,printingDialog->selectedView(),
- (action == PreviewItem) ? SLOT(printPreview()) : SLOT(print()));
+ TQTimer::singleShot(0,printingDialog->selectedView(),
+ (action == PreviewItem) ? TQT_SLOT(printPreview()) : TQT_SLOT(print()));
}
return true;
}
@@ -4409,7 +4409,7 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
if (dlg) {
// accept row changes
- QWidget *prevFocusWidget = focusWidget();
+ TQWidget *prevFocusWidget = tqfocusWidget();
dlg->setFocus();
d->action_data_save_row->activate();
if (prevFocusWidget)
@@ -4423,13 +4423,13 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
saveChanges.setToolTip(i18n("Save changes"));
saveChanges.setWhatsThis(
i18n( "Pressing this button will save all recent changes made in \"%1\" object." )
- .arg(item->name()) );
+ .tqarg(item->name()) );
KGuiItem doNotSave( KStdGuiItem::no() );
doNotSave.setWhatsThis(
i18n( "Pressing this button will ignore all unsaved changes made in \"%1\" object." )
- .arg(dlg->partItem()->name()) );
+ .tqarg(dlg->partItem()->name()) );
- QString question;
+ TQString question;
if (action == PrintItem)
question = i18n("Do you want to save changes before printing?");
else if (action == PreviewItem)
@@ -4441,14 +4441,14 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
const int questionRes = KMessageBox::warningYesNoCancel( this,
"<p>"+dlg->part()->i18nMessage("Design of object \"%1\" has been modified.", dlg)
- .arg(item->name()) + "</p><p>" + question + "</p>",
- QString::null,
+ .tqarg(item->name()) + "</p><p>" + question + "</p>",
+ TQString(),
saveChanges,
doNotSave);
if (KMessageBox::Cancel == questionRes)
return cancelled;
if (KMessageBox::Yes == questionRes) {
- tristate savingRes = saveObject( dlg, QString::null, true /*dontAsk*/ );
+ tristate savingRes = saveObject( dlg, TQString(), true /*dontAsk*/ );
if (true != savingRes)
return savingRes;
}
@@ -4460,8 +4460,8 @@ tristate KexiMainWindowImpl::printActionForItem(KexiPart::Item* item, PrintActio
KexiPart::Item* printingPartItem = d->prj->createPartItem(
printingPart, item->name() //<-- this will look like "table1 : printing" on the window list
);
- QMap<QString,QString> staticObjectArgs;
- staticObjectArgs["identifier"] = QString::number(item->identifier());
+ TQMap<TQString,TQString> staticObjectArgs;
+ staticObjectArgs["identifier"] = TQString::number(item->identifier());
if (action == PrintItem)
staticObjectArgs["action"] = "print";
else if (action == PreviewItem)
@@ -4496,16 +4496,16 @@ tristate KexiMainWindowImpl::copyItemToClipboardAsDataTable(KexiPart::Item* item
if (!item)
return false;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("destinationType", "clipboard");
- args.insert("itemId", QString::number(item->identifier()));
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ args.insert("itemId", TQString::number(item->identifier()));
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", this, this, 0, &args);
if (!dlg)
return false; //error msg has been shown by KexiInternalPart
const int result = dlg->exec();
delete dlg;
- return result == QDialog::Rejected ? cancelled : true;
+ return result == TQDialog::Rejected ? cancelled : true;
}
void KexiMainWindowImpl::slotEditPasteSpecialDataTable()
@@ -4513,9 +4513,9 @@ void KexiMainWindowImpl::slotEditPasteSpecialDataTable()
//! @todo allow data appending (it is not possible now)
if (userMode())
return;
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
args.insert("sourceType", "clipboard");
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", this, this, 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -4542,7 +4542,7 @@ void KexiMainWindowImpl::slotEditFind(bool next)
KexiSearchAndReplaceViewInterface* iface = d->currentViewSupportingSearchAndReplaceInterface();
if (!iface)
return;
- tristate res = iface->find(
+ tristate res = iface->tqfind(
d->findDialog()->valueToFind(), d->findDialog()->options(), next);
if (~res)
return;
@@ -4620,7 +4620,7 @@ void KexiMainWindowImpl::slotGetNewStuff()
#endif
}
-void KexiMainWindowImpl::highlightObject(const QCString& mime, const QCString& name)
+void KexiMainWindowImpl::highlightObject(const TQCString& mime, const TQCString& name)
{
slotViewNavigator();
if (!d->prj)
diff --git a/kexi/main/keximainwindowimpl.h b/kexi/main/keximainwindowimpl.h
index 935454394..a2d820e8c 100644
--- a/kexi/main/keximainwindowimpl.h
+++ b/kexi/main/keximainwindowimpl.h
@@ -45,6 +45,7 @@ namespace KexiPart {
class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUIMessageHandler
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates an empty mainwindow. */
@@ -57,7 +58,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
static int create(int argc, char *argv[], KAboutData* aboutdata = 0);
//! \return KexiMainWindowImpl singleton (if it is instantiated)
- static KexiMainWindowImpl* self() { return dynamic_cast<KexiMainWindowImpl*>(qApp->mainWidget()); }
+ static KexiMainWindowImpl* self() { return dynamic_cast<KexiMainWindowImpl*>(tqApp->mainWidget()); }
//! Project data of currently opened project or NULL if no project here yet.
virtual KexiProject *project();
@@ -84,10 +85,10 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
as KexiPart::Part::supportedUserViewModes() for \a item. */
bool openingAllowed(KexiPart::Item* item, int viewMode);
- virtual bool eventFilter( QObject *obj, QEvent * e );
+ virtual bool eventFilter( TQObject *obj, TQEvent * e );
//! \return popup menu for \a popupName name.
- virtual QPopupMenu* findPopupMenu(const char *popupName);
+ virtual TQPopupMenu* findPopupMenu(const char *popupName);
/*! Implemented for KexiMainWindow. */
virtual KActionPtrList allActions() const;
@@ -112,7 +113,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
public slots:
/*! Inherited from KMdiMainFrm: we need to do some tasks before child is closed.
Just calls closeDialog(). Use closeDialog() if you need, not this one. */
- virtual void closeWindow(KMdiChildView *pWnd, bool layoutTaskBar = true);
+ virtual void closeWindow(KMdiChildView *pWnd, bool tqlayoutTaskBar = true);
/*! Reimplemented for internal reasons. */
virtual void addWindow( KMdiChildView* pView, int flags = KMdi::StandardAdd );
@@ -124,7 +125,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
messages asking for saving the will be skipped and the changes will be dropped.
This should not be usually used, maybe except for test suites
(see kexi/tests/altertable/ directory). */
- tristate closeDialog(KexiDialogBase *dlg, bool layoutTaskBar, bool doNotSaveChanges = false);
+ tristate closeDialog(KexiDialogBase *dlg, bool tqlayoutTaskBar, bool doNotSaveChanges = false);
virtual void detachWindow(KMdiChildView *pWnd,bool bShow=true);
virtual void attachWindow(KMdiChildView *pWnd,bool bShow=true,bool bAutomaticResize=false);
@@ -137,12 +138,12 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
\a errorMessage, if not 0, points to a string that can be set to error message
if one encountered. */
virtual KexiDialogBase* openObject(KexiPart::Item *item, int viewMode,
- bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0,
- QString* errorMessage = 0);
+ bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0,
+ TQString* errorMessage = 0);
//! For convenience
- virtual KexiDialogBase* openObject(const QCString& mime, const QString& name,
- int viewMode, bool &openingCancelled, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiDialogBase* openObject(const TQCString& mime, const TQString& name,
+ int viewMode, bool &openingCancelled, TQMap<TQString,TQString>* staticObjectArgs = 0);
/*! Closes the object for \a item.
\return true on success (closing can be dealyed though), false on failure and cancelled
@@ -151,14 +152,14 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
/*! Implemented for KexiMainWindow */
virtual tristate saveObject( KexiDialogBase *dlg,
- const QString& messageWhenAskingForName = QString::null, bool dontAsk = false );
+ const TQString& messageWhenAskingForName = TQString(), bool dontAsk = false );
/*! Implemented for KexiMainWindow */
virtual tristate getNewObjectInfo( KexiPart::Item *partItem, KexiPart::Part *part,
- bool& allowOverwriting, const QString& messageWhenAskingForName = QString::null );
+ bool& allowOverwriting, const TQString& messageWhenAskingForName = TQString() );
/*! Implemented for KexiMainWindow */
- virtual void highlightObject(const QCString& mime, const QCString& name);
+ virtual void highlightObject(const TQCString& mime, const TQCString& name);
/*! Opens project pointed by \a projectData.
Application state (e.g. actions) is updated.
@@ -176,9 +177,9 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
* If connection shortcut has been found and \a dbName is not provided,
'kexi --skip-dialog file.kexic' is executed (or the connection is opened
directly if there's no porject opened in the current Kexi main window. */
- tristate openProject(const QString& aFileName, KexiDB::ConnectionData *cdata,
- const QString& dbName = QString::null,
- const QValueList<KexiProjectData::ObjectInfo>& autoopenObjects = QValueList<KexiProjectData::ObjectInfo>());
+ tristate openProject(const TQString& aFileName, KexiDB::ConnectionData *cdata,
+ const TQString& dbName = TQString(),
+ const TQValueList<KexiProjectData::ObjectInfo>& autoopenObjects = TQValueList<KexiProjectData::ObjectInfo>());
/*! Helper. Opens project pointed by \a aFileName.
Like above but \a fileNameForConnectionData can be passed instead of
@@ -186,8 +187,8 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
\return false if \a fileNameForConnectionData is not empty but there is no such
connection in Kexi::connset() for this filename.
\a fileNameForConnectionData can be empty. */
- tristate openProject(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName = QString::null);
+ tristate openProject(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName = TQString());
/*! Creates a new project usign template pointed by \a projectData.
Application state (e.g. actions) is updated.
@@ -215,7 +216,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
/*! Executes custom action for the main window, usually provided by a plugin.
Also used by KexiFormEventAction. */
- virtual tristate executeCustomActionForObject(KexiPart::Item* item, const QString& actionName);
+ virtual tristate executeCustomActionForObject(KexiPart::Item* item, const TQString& actionName);
signals:
//! Emitted after opening a project, even after slotAutoOpenObjectsLater().
@@ -239,7 +240,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
void initPropertyEditor();
//! reimplementation of events
-// virtual void closeEvent(QCloseEvent *);
+// virtual void closeEvent(TQCloseEvent *);
/*! Creates standard actions like new, open, save ... */
void initActions();
@@ -254,20 +255,20 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
void storeSettings();
/*! Invalidates availability of all actions for current application state. */
- void invalidateActions();
+ void tqinvalidateActions();
/*! Invalidates action availability for current application state.
These actions are dependent on curently selected dialog. */
- virtual void invalidateSharedActions(QObject *o);
+ virtual void tqinvalidateSharedActions(TQObject *o);
/*! Invalidates action availability for current application state.
These actions only depend on project availability, not on curently selected dialog. */
- void invalidateProjectWideActions();
+ void tqinvalidateProjectWideActions();
/*! Invalidates action availability for current application state.
These actions only depend on curently selected dialog and currently selected view
(KexiViewBase derived object) within this dialog. */
- void invalidateViewModeActions();
+ void tqinvalidateViewModeActions();
/*! Shows dialog for creating new blank project,
and creates one. Dialog is not shown if option for automatic creation
@@ -283,21 +284,21 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
\a shortcutFileName, if not 0, will be set to a shortcut filename
(in case when server database project was selected). */
KexiProjectData* createBlankProjectData(bool &cancelled, bool confirmOverwrites = true,
- QString *shortcutFileName = 0);
+ TQString *shortcutFileName = 0);
- void setWindowMenu(QPopupMenu *menu);
+ void setWindowMenu(TQPopupMenu *menu);
/*! \return focused kexi window (KexiDialogBase or KexiDockBase subclass) */
-// QWidget* focusWindow() const;
+// TQWidget* focusWindow() const;
/*! Reimplemented from KexiSharedActionHost:
accepts only KexiDockBase and KexiDialogBase subclasses. */
- virtual bool acceptsSharedActions(QObject *w);
+ virtual bool acceptsSharedActions(TQObject *w);
/*! Performs lookup like in KexiSharedActionHost::focusWindow()
- but starting from \a w instead of a widget returned by QWidget::focusWidget().
+ but starting from \a w instead of a widget returned by TQWidget::tqfocusWidget().
\return NULL if no widget matches acceptsSharedActions() or if \a w is NULL. */
- QWidget* findWindow(QWidget *w);
+ TQWidget* findWindow(TQWidget *w);
/*! Updates application's caption - also shows project's name. */
void updateAppCaption();
@@ -325,12 +326,12 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
KexiPart::Part *prevDialogPart, int prevViewMode, KexiPart::Part *curDialogPart, int curViewMode );
/*! Used in openProject when running another Kexi process is required. */
- tristate openProjectInExternalKexiInstance(const QString& aFileName,
- KexiDB::ConnectionData *cdata, const QString& dbName);
+ tristate openProjectInExternalKexiInstance(const TQString& aFileName,
+ KexiDB::ConnectionData *cdata, const TQString& dbName);
/*! Used in openProject when running another Kexi process is required. */
- tristate openProjectInExternalKexiInstance(const QString& aFileName,
- const QString& fileNameForConnectionData, const QString& dbName);
+ tristate openProjectInExternalKexiInstance(const TQString& aFileName,
+ const TQString& fileNameForConnectionData, const TQString& dbName);
protected slots:
@@ -345,10 +346,10 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
void slotPartLoaded(KexiPart::Part* p);
- void slotCaptionForCurrentMDIChild(bool childrenMaximized);
+ void slotCaptionForCurrentMDIChild(bool tqchildrenMaximized);
void slotNoMaximizedChildFrmLeft(KMdiChildFrm*);
void slotLastChildViewClosed();
- void slotChildViewIsDetachedNow(QWidget*);
+ void slotChildViewIsDetachedNow(TQWidget*);
//! internal - creates and initializes kexi project
void createKexiProject(KexiProjectData* new_data);
@@ -377,7 +378,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
//! For convenience
KexiDialogBase* openObject(KexiPart::Item *item, int viewMode,
- QMap<QString,QString>* staticObjectArgs = 0)
+ TQMap<TQString,TQString>* staticObjectArgs = 0)
{
bool openingCancelled;
return openObject(item, viewMode, openingCancelled, staticObjectArgs);
@@ -391,17 +392,17 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
/*! Renames object pointed by \a item to a new name \a _newName.
Sets \a success to false on failure. Used as a slot connected
to KexiBrowser::renameItem() signal. */
- void renameObject( KexiPart::Item *item, const QString& _newName, bool &succes );
+ void renameObject( KexiPart::Item *item, const TQString& _newName, bool &succes );
/*! Reaction for object rename (signalled by KexiProject).
If this item has opened dialog, it's caption is updated,
and also optionally application's caption. */
- virtual void slotObjectRenamed(const KexiPart::Item &item, const QCString& oldName);
+ virtual void slotObjectRenamed(const KexiPart::Item &item, const TQCString& oldName);
virtual void fillWindowMenu();
- void invalidateSharedActions();
- void invalidateSharedActionsLater();
+ void tqinvalidateSharedActions();
+ void tqinvalidateSharedActionsLater();
//! Updates the statusbar, navigator and "Insert->....." actions, dependent on read-only state.
//! Only called on project opening and closing.
@@ -466,7 +467,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
virtual void acceptPropertySetEditing();
virtual void propertySetSwitched(KexiDialogBase *dlg, bool force=false,
- bool preservePrevSelection = true, const QCString& propertyToSelect = QCString());
+ bool preservePrevSelection = true, const TQCString& propertyToSelect = TQCString());
/*! Handles changes in 'dirty' flag for dialogs. */
void slotDirtyFlagChanged(KexiDialogBase*);
@@ -484,7 +485,7 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
If \a mimeType and \a databaseName are not empty, the wizard will only ask about
parameters of destination project and skip pages related to source project.
\a cdata connection data can be also provided to preselect server-based connections. */
- tristate showProjectMigrationWizard(const QString& mimeType, const QString& databaseName,
+ tristate showProjectMigrationWizard(const TQString& mimeType, const TQString& databaseName,
const KexiDB::ConnectionData *cdata = 0);
//! Receives "selectionChanged()" signal from navigator to update some actions.
@@ -502,24 +503,24 @@ class KEXIMAIN_EXPORT KexiMainWindowImpl : public KexiMainWindow, public KexiGUI
//! Shows "print" dialog for \a item.
//! \return true on success.
- bool printItem(KexiPart::Item* item, const QString& titleText);
+ bool printItem(KexiPart::Item* item, const TQString& titleText);
//! Shows "print" dialog for \a item and \a settings.
//! \return true on success.
bool printItem(KexiPart::Item* item, const KexiSimplePrintingSettings& settings,
- const QString& titleText = QString::null);
+ const TQString& titleText = TQString());
/*! Shows "print preview" dialog for \a item.
The preview dialog is cached, so \a reload == true is sometimes needed
if data or print settings have changed in the meantime.
\return true on success. */
- bool printPreviewForItem(KexiPart::Item* item, const QString& titleText,
+ bool printPreviewForItem(KexiPart::Item* item, const TQString& titleText,
bool reload);
//! Shows "print preview" dialog.
//! \return true on success.
bool printPreviewForItem(KexiPart::Item* item, const KexiSimplePrintingSettings& settings,
- const QString& titleText = QString::null, bool reload = false);
+ const TQString& titleText = TQString(), bool reload = false);
/*! Implemented for KexiMainWindow. Helper for printItem() and printPreviewForItem().
Also used by KexiFormEventAction.
diff --git a/kexi/main/keximainwindowimpl_p.h b/kexi/main/keximainwindowimpl_p.h
index b48c7ca00..0abd513ad 100644
--- a/kexi/main/keximainwindowimpl_p.h
+++ b/kexi/main/keximainwindowimpl_p.h
@@ -23,7 +23,7 @@
#endif
//! @internal safer dictionary
-typedef QMap< int, QGuardedPtr<KexiDialogBase> > KexiDialogDict;
+typedef TQMap< int, TQGuardedPtr<KexiDialogBase> > KexiDialogDict;
//! @internal
class KexiMainWindowImpl::Private
@@ -73,7 +73,7 @@ public:
wasAutoOpen = false;
dialogExistedBeforeCloseProject = false;
#ifndef KEXI_SHOW_UNIMPLEMENTED
- dummy_action = new KActionMenu("", wnd);
+ dummy_action = new KActionMenu(TQString(""), TQT_TQOBJECT(wnd));
#endif
maximizeFirstOpenedChildFrm = false;
#ifdef HAVE_KNEWSTUFF
@@ -104,8 +104,8 @@ public:
KexiDialogBase *openedDialogFor( int identifier, PendingJobType &pendingType )
{
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
- QMap<int, PendingJobType>::ConstIterator it = pendingDialogs.find( identifier );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
+ TQMap<int, PendingJobType>::ConstIterator it = pendingDialogs.tqfind( identifier );
if (it==pendingDialogs.constEnd())
pendingType = NoJob;
else
@@ -124,14 +124,14 @@ public:
KexiDialogBase *openedDialogFor( int identifier )
{
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
return (KexiDialogBase*)dialogs[ identifier ];
}
#endif
void insertDialog(KexiDialogBase *dlg) {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
- dialogs.insert(dlg->id(), QGuardedPtr<KexiDialogBase>(dlg));
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
+ dialogs.insert(dlg->id(), TQGuardedPtr<KexiDialogBase>(dlg));
#ifndef KEXI_NO_PENDING_DIALOGS
pendingDialogs.remove(dlg->id());
#endif
@@ -139,47 +139,47 @@ public:
#ifndef KEXI_NO_PENDING_DIALOGS
void addItemToPendingDialogs(const KexiPart::Item* item, PendingJobType jobType) {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
- pendingDialogs.replace( item->identifier(), jobType );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
+ pendingDialogs.tqreplace( item->identifier(), jobType );
}
bool pendingDialogsExist() {
if (pendingDialogs.constBegin()!=pendingDialogs.constEnd())
kdDebug() << pendingDialogs.constBegin().key() << " " << (int)pendingDialogs.constBegin().data() << endl;
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
return !pendingDialogs.isEmpty();
}
#endif
void updateDialogId(KexiDialogBase *dlg, int oldItemID) {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
dialogs.remove(oldItemID);
#ifndef KEXI_NO_PENDING_DIALOGS
pendingDialogs.remove(oldItemID);
#endif
- dialogs.insert(dlg->id(), QGuardedPtr<KexiDialogBase>(dlg));
+ dialogs.insert(dlg->id(), TQGuardedPtr<KexiDialogBase>(dlg));
}
void removeDialog(int identifier) {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
dialogs.remove(identifier);
}
#ifndef KEXI_NO_PENDING_DIALOGS
void removePendingDialog(int identifier) {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
pendingDialogs.remove(identifier);
}
#endif
uint openedDialogsCount() {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
return dialogs.count();
}
//! Used in KexiMainWindowImple::closeProject()
void clearDialogs() {
-//todo(threads) QMutexLocker dialogsLocker( &dialogsMutex );
+//todo(threads) TQMutexLocker dialogsLocker( &dialogsMutex );
dialogs.clear();
#ifndef KEXI_NO_PENDING_DIALOGS
pendingDialogs.clear();
@@ -202,9 +202,9 @@ public:
/*
void updatePropEditorDockWidthInfo() {
if (propEditor) {
- KDockWidget *dw = (KDockWidget *)propEditor->parentWidget();
+ KDockWidget *dw = (KDockWidget *)propEditor->tqparentWidget();
#if defined(KDOCKWIDGET_P)
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
if (ds) {
propEditorDockSeparatorPos = ds->separatorPosInPercent();*/
/* if (propEditorDockSeparatorPos<=0) {
@@ -217,15 +217,15 @@ void updatePropEditorDockWidthInfo() {
}
}*/
- void showStartProcessMsg(const QStringList& args)
+ void showStartProcessMsg(const TQStringList& args)
{
- wnd->showErrorMessage(i18n("Could not start %1 application.").arg(KEXI_APP_NAME),
- i18n("Command \"%1\" failed.").arg(args.join(" ")));
+ wnd->showErrorMessage(i18n("Could not start %1 application.").tqarg(KEXI_APP_NAME),
+ i18n("Command \"%1\" failed.").tqarg(args.join(" ")));
}
- void hideMenuItem(const QString& menuName, const QString& itemText, bool alsoSeparator)
+ void hideMenuItem(const TQString& menuName, const TQString& itemText, bool alsoSeparator)
{
- QPopupMenu *pm = popups[menuName.ascii()];
+ TQPopupMenu *pm = popups[menuName.ascii()];
if (!pm)
return;
uint i=0;
@@ -242,9 +242,9 @@ void updatePropEditorDockWidthInfo() {
}
}
- void disableMenuItem(const QString& menuName, const QString& itemText)
+ void disableMenuItem(const TQString& menuName, const TQString& itemText)
{
- QPopupMenu *pm = popups[menuName.ascii()];
+ TQPopupMenu *pm = popups[menuName.ascii()];
if (!pm)
return;
uint i=0;
@@ -267,14 +267,14 @@ void updatePropEditorDockWidthInfo() {
#endif
} else {
//propEditorToolWindow->show();
- QWidget *origFocusWidget = qApp->focusWidget();
+ TQWidget *origFocusWidget = tqApp->tqfocusWidget();
wnd->makeWidgetDockVisible(propEditorTabWidget);
if (origFocusWidget)
origFocusWidget->setFocus();
/*moved
#if defined(KDOCKWIDGET_P)
- KDockWidget *dw = (KDockWidget *)propEditor->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)propEditor->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
ds->setSeparatorPosInPercent(config->readNumEntry("RightDockPosition", 80));//%
#endif*/
}
@@ -285,8 +285,8 @@ void updatePropEditorDockWidthInfo() {
{
#if defined(KDOCKWIDGET_P)
if (wnd->mdiMode()==KMdi::ChildframeMode || wnd->mdiMode()==KMdi::TabPageMode) {
- KDockWidget *dw = (KDockWidget *)nav->parentWidget();
- KDockSplitter *ds = (KDockSplitter *)dw->parentWidget();
+ KDockWidget *dw = (KDockWidget *)nav->tqparentWidget();
+ KDockSplitter *ds = (KDockSplitter *)dw->tqparentWidget();
// ds->setKeepSize(true);
config->setGroup("MainWindow");
@@ -295,12 +295,12 @@ void updatePropEditorDockWidthInfo() {
if (wasAutoOpen) //(dw2->isVisible())
// ds->setSeparatorPosInPercent( 100 * nav->width() / wnd->width() );
ds->setSeparatorPosInPercent(
- QMAX(QMAX( config->readNumEntry("LeftDockPositionWithAutoOpen",20),
+ TQMAX(TQMAX( config->readNumEntry("LeftDockPositionWithAutoOpen",20),
config->readNumEntry("LeftDockPosition",20)),20)
);
else
ds->setSeparatorPosInPercent(
- QMAX(20, config->readNumEntry("LeftDockPosition", 20/* % */)));
+ TQMAX(20, config->readNumEntry("LeftDockPosition", 20/* % */)));
// dw->resize( d->config->readNumEntry("LeftDockPosition", 115/* % */), dw->height() );
# else
@@ -321,13 +321,13 @@ void updatePropEditorDockWidthInfo() {
"KexiMainWindowImpl::Private::openedCustomObjectsForItem(): !item || !name" << endl;
return 0;
}
- QString key( QString::number(item->identifier()) + name );
- return dynamic_cast<type*>( m_openedCustomObjectsForItem.find( key.latin1() ) );
+ TQString key( TQString::number(item->identifier()) + name );
+ return dynamic_cast<type*>( m_openedCustomObjectsForItem.tqfind( key.latin1() ) );
}
- void addOpenedCustomObjectForItem(KexiPart::Item* item, QObject* object, const char* name)
+ void addOpenedCustomObjectForItem(KexiPart::Item* item, TQObject* object, const char* name)
{
- QString key = QString::number(item->identifier()) + name;
+ TQString key = TQString::number(item->identifier()) + name;
m_openedCustomObjectsForItem.insert( key.latin1(), object );
}
@@ -335,16 +335,16 @@ void updatePropEditorDockWidthInfo() {
if (!m_findDialog) {
m_findDialog = new KexiFindDialog(wnd);
m_findDialog->setActions( action_edit_findnext, action_edit_findprev,
- action_edit_replace, action_edit_replace_all );
-/* connect(m_findDialog, SIGNAL(findNext()), action_edit_findnext, SLOT(activate()));
- connect(m_findDialog, SIGNAL(find()), wnd, SLOT(slotEditFindNext()));
- connect(m_findDialog, SIGNAL(replace()), wnd, SLOT(slotEditReplaceNext()));
- connect(m_findDialog, SIGNAL(replaceAll()), wnd, SLOT(slotEditReplaceAll()));*/
+ action_edit_tqreplace, action_edit_replace_all );
+/* connect(m_findDialog, TQT_SIGNAL(findNext()), action_edit_findnext, TQT_SLOT(activate()));
+ connect(m_findDialog, TQT_SIGNAL(tqfind()), wnd, TQT_SLOT(slotEditFindNext()));
+ connect(m_findDialog, TQT_SIGNAL(tqreplace()), wnd, TQT_SLOT(slotEditReplaceNext()));
+ connect(m_findDialog, TQT_SIGNAL(replaceAll()), wnd, TQT_SLOT(slotEditReplaceAll()));*/
}
return m_findDialog;
}
- /*! Updates the find/replace dialog depending on the active view.
+ /*! Updates the tqfind/replace dialog depending on the active view.
Nothing is performed if the dialog is not instantiated yet or is invisible. */
void updateFindDialogContents(bool createIfDoesNotExist = false) {
if (!createIfDoesNotExist && (!m_findDialog || !m_findDialog->isVisible()))
@@ -353,34 +353,34 @@ void updatePropEditorDockWidthInfo() {
if (!iface) {
if (m_findDialog) {
m_findDialog->setButtonsEnabled(false);
- m_findDialog->setLookInColumnList(QStringList(), QStringList());
+ m_findDialog->setLookInColumnList(TQStringList(), TQStringList());
}
return;
}
//! @todo use ->caption() here, depending on global settings related to displaying captions
findDialog()->setObjectNameForCaption(curDialog->partItem()->name());
- QStringList columnNames;
- QStringList columnCaptions;
- QString currentColumnName; // for 'look in'
+ TQStringList columnNames;
+ TQStringList columnCaptions;
+ TQString currentColumnName; // for 'look in'
if (!iface->setupFindAndReplace(columnNames, columnCaptions, currentColumnName)) {
m_findDialog->setButtonsEnabled(false);
- m_findDialog->setLookInColumnList(QStringList(), QStringList());
+ m_findDialog->setLookInColumnList(TQStringList(), TQStringList());
return;
}
m_findDialog->setButtonsEnabled(true);
/* //update "look in" list
KexiTableViewColumn::List columns( dataAwareObject()->data()->columns );
- QStringList columnNames;
- QStringList columnCaptions;
+ TQStringList columnNames;
+ TQStringList columnCaptions;
for (KexiTableViewColumn::ListIterator it(columns); it.current(); ++it) {
if (!it.current()->visible())
continue;
columnNames.append( it.current()->field()->name() );
columnCaptions.append( it.current()->captionAliasOrName() );
}*/
- const QString prevColumnName( m_findDialog->currentLookInColumnName());
+ const TQString prevColumnName( m_findDialog->currentLookInColumnName());
m_findDialog->setLookInColumnList(columnNames, columnCaptions);
m_findDialog->setCurrentLookInColumnName( prevColumnName );
}
@@ -421,25 +421,25 @@ void updatePropEditorDockWidthInfo() {
KTabWidget *propEditorTabWidget;
//! poits to kexi part which has been previously used to setup proppanel's tabs using
//! KexiPart::setupCustomPropertyPanelTabs(), in updateCustomPropertyPanelTabs().
- QGuardedPtr<KexiPart::Part> partForPreviouslySetupPropertyPanelTabs;
- QMap<KexiPart::Part*, int> recentlySelectedPropertyPanelPages;
- QGuardedPtr<KexiPropertyEditorView> propEditor;
- QGuardedPtr<KoProperty::Set> propBuffer;
+ TQGuardedPtr<KexiPart::Part> partForPreviouslySetupPropertyPanelTabs;
+ TQMap<KexiPart::Part*, int> recentlySelectedPropertyPanelPages;
+ TQGuardedPtr<KexiPropertyEditorView> propEditor;
+ TQGuardedPtr<KoProperty::Set> propBuffer;
KXMLGUIClient *curDialogGUIClient, *curDialogViewGUIClient,
*closedDialogGUIClient, *closedDialogViewGUIClient;
- QGuardedPtr<KexiDialogBase> curDialog;
+ TQGuardedPtr<KexiDialogBase> curDialog;
KexiNameDialog *nameDialog;
- QTimer timer; //helper timer
-// QSignalMapper *actionMapper;
+ TQTimer timer; //helper timer
+// TQSignalMapper *actionMapper;
- QAsciiDict<QPopupMenu> popups; //list of menu popups
- QPopupMenu *createMenu;
+ TQAsciiDict<TQPopupMenu> popups; //list of menu popups
+ TQPopupMenu *createMenu;
- QString origAppCaption; //<! original application's caption (without project name)
- QString appCaptionPrefix; //<! application's caption prefix - prj name (if opened), else: null
+ TQString origAppCaption; //<! original application's caption (without project name)
+ TQString appCaptionPrefix; //<! application's caption prefix - prj name (if opened), else: null
#ifndef KEXI_SHOW_UNIMPLEMENTED
KActionMenu *dummy_action;
@@ -461,8 +461,8 @@ void updatePropEditorDockWidthInfo() {
//! edit menu
KAction *action_edit_delete, *action_edit_delete_row,
*action_edit_cut, *action_edit_copy, *action_edit_paste,
- *action_edit_find, *action_edit_findnext, *action_edit_findprev,
- *action_edit_replace, *action_edit_replace_all,
+ *action_edit_tqfind, *action_edit_findnext, *action_edit_findprev,
+ *action_edit_tqreplace, *action_edit_replace_all,
*action_edit_select_all,
*action_edit_undo, *action_edit_redo,
*action_edit_insert_empty_row,
@@ -473,7 +473,7 @@ void updatePropEditorDockWidthInfo() {
//! view menu
KAction *action_view_nav, *action_view_propeditor, *action_view_mainarea;
KRadioAction *action_view_data_mode, *action_view_design_mode, *action_view_text_mode;
- QIntDict<KRadioAction> actions_for_view_modes;
+ TQIntDict<KRadioAction> actions_for_view_modes;
// KRadioAction *last_checked_mode;
#ifndef KEXI_NO_CTXT_HELP
KToggleAction *action_show_helper;
@@ -500,7 +500,7 @@ void updatePropEditorDockWidthInfo() {
KMdiToolViewAccessor* navToolWindow;
KMdiToolViewAccessor* propEditorToolWindow;
- QGuardedPtr<QWidget> focus_before_popup;
+ TQGuardedPtr<TQWidget> focus_before_popup;
// KexiRelationPart *relationPart;
int privateIDCounter; //!< counter: ID for private "document" like Relations window
@@ -530,7 +530,7 @@ void updatePropEditorDockWidthInfo() {
actionToExecuteWhenPendingJobsAreFinished = NoAction;
switch (a) {
case QuitAction:
- qApp->quit();
+ tqApp->quit();
break;
case CloseProjectAction:
wnd->closeProject();
@@ -541,15 +541,15 @@ void updatePropEditorDockWidthInfo() {
#endif
//! Used for delayed dialogs closing for 'close all'
- QPtrList<KexiDialogBase> windowsToClose;
+ TQPtrList<KexiDialogBase> windowsToClose;
//! Opened page setup dialogs, used by printOrPrintPreviewForItem().
- QIntDict<KexiDialogBase> pageSetupDialogs;
+ TQIntDict<KexiDialogBase> pageSetupDialogs;
/*! A map from Kexi dialog to "print setup" part item's ID of the data item
used by closeDialog() to find an ID of the data item, so the entry
can be removed from pageSetupDialogs dictionary. */
- QMap<int, int> pageSetupDialogItemID2dataItemID_map;
+ TQMap<int, int> pageSetupDialogItemID2dataItemID_map;
//! Used in several places to show info dialog at startup (only once per session)
//! before displaying other stuff
@@ -579,7 +579,7 @@ void updatePropEditorDockWidthInfo() {
#endif
//! Used by openedCustomObjectsForItem() and addOpenedCustomObjectForItem()
- QAsciiDict<QObject> m_openedCustomObjectsForItem;
+ TQAsciiDict<TQObject> m_openedCustomObjectsForItem;
int propEditorDockSeparatorPos, navDockSeparatorPos;
// int navDockSeparatorPosWithAutoOpen;
@@ -592,8 +592,8 @@ void updatePropEditorDockWidthInfo() {
//! @todo move to KexiProject
KexiDialogDict dialogs;
#ifndef KEXI_NO_PROCESS_EVENTS
- QMap<int, PendingJobType> pendingDialogs; //!< part item identifiers for dialogs whoose opening has been started
- //todo(threads) QMutex dialogsMutex; //!< used for locking dialogs and pendingDialogs dicts
+ TQMap<int, PendingJobType> pendingDialogs; //!< part item identifiers for dialogs whoose opening has been started
+ //todo(threads) TQMutex dialogsMutex; //!< used for locking dialogs and pendingDialogs dicts
#endif
KexiFindDialog *m_findDialog;
};
diff --git a/kexi/main/kexinamedialog.cpp b/kexi/main/kexinamedialog.cpp
index 85f7f04af..c9b78f364 100644
--- a/kexi/main/kexinamedialog.cpp
+++ b/kexi/main/kexinamedialog.cpp
@@ -19,26 +19,26 @@
#include "kexinamedialog.h"
-KexiNameDialog::KexiNameDialog(const QString& message,
- QWidget * parent, const char * name)
- : KDialogBase(KDialogBase::Plain, QString::null,
+KexiNameDialog::KexiNameDialog(const TQString& message,
+ TQWidget * tqparent, const char * name)
+ : KDialogBase(KDialogBase::Plain, TQString(),
KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Help,
KDialogBase::Ok,
- parent, name)
+ tqparent, name)
{
-// QHBox ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 )
+// TQHBox ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 )
m_widget= new KexiNameWidget(message, plainPage(), "KexiNameWidget");
init();
}
-KexiNameDialog::KexiNameDialog(const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText,
- QWidget * parent, const char * name)
- : KDialogBase(KDialogBase::Plain, QString::null,
+KexiNameDialog::KexiNameDialog(const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText,
+ TQWidget * tqparent, const char * name)
+ : KDialogBase(KDialogBase::Plain, TQString(),
KDialogBase::Ok|KDialogBase::Cancel,
KDialogBase::Ok,
- parent, name)
+ tqparent, name)
{
m_widget= new KexiNameWidget(message, nameLabel, nameText,
captionLabel, captionText, plainPage(), "KexiNameWidget");
@@ -51,31 +51,31 @@ KexiNameDialog::~KexiNameDialog()
void KexiNameDialog::init()
{
- QGridLayout *lyr = new QGridLayout(plainPage(), 2, 3);
- m_icon = new QLabel( plainPage(), "icon" );
- m_icon->setAlignment( int( AlignTop | AlignLeft ) );
- m_icon->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred,1,0));
+ TQGridLayout *lyr = new TQGridLayout(plainPage(), 2, 3);
+ m_icon = new TQLabel( plainPage(), "icon" );
+ m_icon->tqsetAlignment( int( AlignTop | AlignLeft ) );
+ m_icon->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred,1,0));
m_icon->setFixedWidth(50);
lyr->addWidget(m_icon,0,0);
- m_widget->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred,1,0));
+ m_widget->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred,1,0));
lyr->addWidget(m_widget,0,1);
- lyr->addItem(new QSpacerItem( 25, 10, QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2);
- lyr->addItem(new QSpacerItem( 5, 10, QSizePolicy::Minimum, QSizePolicy::Expanding ), 1, 1);
+ lyr->addItem(new TQSpacerItem( 25, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum ), 0, 2);
+ lyr->addItem(new TQSpacerItem( 5, 10, TQSizePolicy::Minimum, TQSizePolicy::Expanding ), 1, 1);
// m_widget->captionLineEdit()->selectAll();
// m_widget->captionLineEdit()->setFocus();
- connect(m_widget,SIGNAL(messageChanged()),this, SLOT(updateSize()));
+ connect(m_widget,TQT_SIGNAL(messageChanged()),this, TQT_SLOT(updateSize()));
updateSize();
enableButtonOK( true );
slotTextChanged();
- connect(m_widget, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(m_widget, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
}
void KexiNameDialog::updateSize()
{
-// resize( QSize(400, 140 + (m_widget->lbl_message->isVisible()?m_widget->lbl_message->height():0) )
- resize( QSize(400, 140 + (!m_widget->lbl_message->text().isEmpty()?m_widget->lbl_message->height():0) )
- .expandedTo(minimumSizeHint()) );
+// resize( TQSize(400, 140 + (m_widget->lbl_message->isVisible()?m_widget->lbl_message->height():0) )
+ resize( TQSize(400, 140 + (!m_widget->lbl_message->text().isEmpty()?m_widget->lbl_message->height():0) )
+ .expandedTo(tqminimumSizeHint()) );
// updateGeometry();
}
@@ -95,7 +95,7 @@ void KexiNameDialog::accept()
KDialogBase::accept();
}
-void KexiNameDialog::setDialogIcon(const QPixmap& icon)
+void KexiNameDialog::setDialogIcon(const TQPixmap& icon)
{
m_icon->setPixmap(icon);
}
diff --git a/kexi/main/kexinamedialog.h b/kexi/main/kexinamedialog.h
index 27707c0d7..c4453c0d3 100644
--- a/kexi/main/kexinamedialog.h
+++ b/kexi/main/kexinamedialog.h
@@ -27,15 +27,16 @@
class KEXIMAIN_EXPORT KexiNameDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiNameDialog(const QString& message,
- QWidget * parent = 0, const char * name = 0);
+ KexiNameDialog(const TQString& message,
+ TQWidget * tqparent = 0, const char * name = 0);
- KexiNameDialog(const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText,
- QWidget * parent = 0, const char * name = 0);
+ KexiNameDialog(const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText,
+ TQWidget * tqparent = 0, const char * name = 0);
virtual ~KexiNameDialog();
@@ -44,7 +45,7 @@ class KEXIMAIN_EXPORT KexiNameDialog : public KDialogBase
virtual void show();
public slots:
- virtual void setDialogIcon(const QPixmap& icon);
+ virtual void setDialogIcon(const TQPixmap& icon);
protected slots:
void slotTextChanged();
@@ -54,7 +55,7 @@ class KEXIMAIN_EXPORT KexiNameDialog : public KDialogBase
protected:
void init();
- QLabel *m_icon;
+ TQLabel *m_icon;
KexiNameWidget* m_widget;
};
diff --git a/kexi/main/kexinamewidget.cpp b/kexi/main/kexinamewidget.cpp
index 39cb084a2..db061d936 100644
--- a/kexi/main/kexinamewidget.cpp
+++ b/kexi/main/kexinamewidget.cpp
@@ -19,8 +19,8 @@
#include "kexinamewidget.h"
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
#include <kmessagebox.h>
@@ -32,19 +32,19 @@
using namespace KexiUtils;
-KexiNameWidget::KexiNameWidget( const QString& message,
- QWidget* parent, const char* name, WFlags fl )
- : QWidget(parent, name, fl)
+KexiNameWidget::KexiNameWidget( const TQString& message,
+ TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget(tqparent, name, fl)
{
- init(message, QString::null, QString::null, QString::null, QString::null);
+ init(message, TQString(), TQString(), TQString(), TQString());
}
-KexiNameWidget::KexiNameWidget(const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText,
- QWidget * parent, const char * name, WFlags fl)
+KexiNameWidget::KexiNameWidget(const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText,
+ TQWidget * tqparent, const char * name, WFlags fl)
{
- Q_UNUSED( parent );
+ Q_UNUSED( tqparent );
Q_UNUSED( name );
Q_UNUSED( fl );
@@ -52,9 +52,9 @@ KexiNameWidget::KexiNameWidget(const QString& message,
}
void KexiNameWidget::init(
- const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText)
+ const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText)
{
Q_UNUSED( captionText );
@@ -62,53 +62,53 @@ void KexiNameWidget::init(
m_le_name_autofill = true;
m_caption_required = false;
- lyr = new QGridLayout( this, 1, 1, 0, 6, "lyr");
+ lyr = new TQGridLayout( this, 1, 1, 0, 6, "lyr");
- lbl_message = new QLabel( this, "message" );
+ lbl_message = new TQLabel( this, "message" );
setMessageText( message );
- lbl_message->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
- lbl_message->setAlignment( QLabel::AlignTop | QLabel::WordBreak );
+ lbl_message->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
+ lbl_message->tqsetAlignment( TQLabel::AlignTop | TQLabel::WordBreak );
lyr->addMultiCellWidget( lbl_message, 0, 0, 0, 1 );
- lbl_caption = new QLabel( captionLabel.isEmpty() ? i18n( "Caption:" ) : captionLabel,
+ lbl_caption = new TQLabel( captionLabel.isEmpty() ? i18n( "Caption:" ) : captionLabel,
this, "lbl_caption" );
lyr->addWidget( lbl_caption, 1, 0 );
- lbl_name = new QLabel( nameLabel.isEmpty() ? tr( "Name:" ) : nameLabel,
+ lbl_name = new TQLabel( nameLabel.isEmpty() ? tqtr( "Name:" ) : nameLabel,
this, "lbl_name" );
lyr->addWidget( lbl_name, 2, 0 );
le_caption = new KLineEdit( nameText, this, "le_caption" );
- le_caption->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed, 1, 0));
+ le_caption->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 1, 0));
lyr->addWidget( le_caption, 1, 1 );
le_name = new KLineEdit( nameText, this, "le_name" );
- le_name->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed,1,0));
+ le_name->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed,1,0));
Validator *idValidator = new IdentifierValidator(0, "id_val");
- le_name->setValidator( m_validator = new MultiValidator(idValidator, this, "val") );
+ le_name->setValidator( m_validator = new MultiValidator(idValidator, TQT_TQOBJECT(this), "val") );
lyr->addWidget( le_name, 2, 1 );
setFocusProxy(le_caption);
- resize( QSize(342, 123).expandedTo(minimumSizeHint()) );
+ resize( TQSize(342, 123).expandedTo(tqminimumSizeHint()) );
m_nameWarning = i18n("Please enter the name.");
m_captionWarning = i18n("Please enter the caption.");
- connect(le_caption, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotCaptionTxtChanged(const QString&)));
- connect(le_name, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotNameTxtChanged(const QString&)));
- connect(le_caption, SIGNAL(returnPressed()),
- this,SIGNAL(returnPressed()));
- connect(le_name, SIGNAL(returnPressed()),
- this,SIGNAL(returnPressed()));
+ connect(le_caption, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotCaptionTxtChanged(const TQString&)));
+ connect(le_name, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotNameTxtChanged(const TQString&)));
+ connect(le_caption, TQT_SIGNAL(returnPressed()),
+ this,TQT_SIGNAL(returnPressed()));
+ connect(le_name, TQT_SIGNAL(returnPressed()),
+ this,TQT_SIGNAL(returnPressed()));
}
KexiNameWidget::~KexiNameWidget()
{
}
-void KexiNameWidget::slotCaptionTxtChanged(const QString &capt)
+void KexiNameWidget::slotCaptionTxtChanged(const TQString &capt)
{
emit textChanged();
if (le_name->text().isEmpty())
@@ -120,7 +120,7 @@ void KexiNameWidget::slotCaptionTxtChanged(const QString &capt)
}
}
-void KexiNameWidget::slotNameTxtChanged(const QString &)
+void KexiNameWidget::slotNameTxtChanged(const TQString &)
{
emit textChanged();
if (m_le_name_txtchanged_disable)
@@ -145,19 +145,19 @@ void KexiNameWidget::setNameRequired( bool set )
bool KexiNameWidget::isNameRequired() const
{ return !m_validator->acceptsEmptyValue(); }
-void KexiNameWidget::setCaptionText(const QString& capt)
+void KexiNameWidget::setCaptionText(const TQString& capt)
{
le_caption->setText(capt);
m_le_name_autofill = true;
}
-void KexiNameWidget::setNameText(const QString& name)
+void KexiNameWidget::setNameText(const TQString& name)
{
le_name->setText(name);
m_le_name_autofill = true;
}
-void KexiNameWidget::setMessageText(const QString& msg)
+void KexiNameWidget::setMessageText(const TQString& msg)
{
if (msg.stripWhiteSpace().isEmpty()) {
lbl_message->setText("");
@@ -169,12 +169,12 @@ void KexiNameWidget::setMessageText(const QString& msg)
messageChanged();
}
-QString KexiNameWidget::captionText() const
+TQString KexiNameWidget::captionText() const
{
return le_caption->text();
}
-QString KexiNameWidget::nameText() const
+TQString KexiNameWidget::nameText() const
{
return le_name->text().lower();
}
@@ -191,7 +191,7 @@ bool KexiNameWidget::checkValidity()
le_caption->setFocus();
return false;
}
- QString dummy, message, details;
+ TQString dummy, message, details;
if (m_validator->check(dummy, le_name->text(), message, details)
==Validator::Error) {
KMessageBox::detailedSorry(0, message, details);
@@ -211,9 +211,9 @@ void KexiNameWidget::addNameSubvalidator( Validator* validator, bool owned )
m_validator->addSubvalidator( validator, owned );
}
-/*bool KexiNameWidget::eventFilter( QObject *obj, QEvent *ev )
+/*bool KexiNameWidget::eventFilter( TQObject *obj, TQEvent *ev )
{
- if (ev->type()==QEvent::FocusOut && !acceptsEmptyValue()) {
+ if (ev->type()==TQEvent::FocusOut && !acceptsEmptyValue()) {
if (obj==le_name) {
if (le_name->text().isEmpty()) {
KMessageBox::information(0, m_nameWarning);
diff --git a/kexi/main/kexinamewidget.h b/kexi/main/kexinamewidget.h
index 07962b6c6..1ab1d1068 100644
--- a/kexi/main/kexinamewidget.h
+++ b/kexi/main/kexinamewidget.h
@@ -20,8 +20,8 @@
#ifndef KEXINAMEWIDGET_H
#define KEXINAMEWIDGET_H
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
namespace KexiUtils {
@@ -29,49 +29,50 @@ class Validator;
class MultiValidator;
}
-class KEXIMAIN_EXPORT KexiNameWidget : public QWidget
+class KEXIMAIN_EXPORT KexiNameWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiNameWidget(const QString& message,
- QWidget * parent = 0, const char * name = 0, WFlags fl = 0);
+ KexiNameWidget(const TQString& message,
+ TQWidget * tqparent = 0, const char * name = 0, WFlags fl = 0);
- KexiNameWidget(const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText,
- QWidget * parent = 0, const char * name = 0, WFlags fl = 0);
+ KexiNameWidget(const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText,
+ TQWidget * tqparent = 0, const char * name = 0, WFlags fl = 0);
virtual ~KexiNameWidget();
- QLabel* captionLabel() const { return lbl_caption; }
- QLabel* nameLabel() const { return lbl_name; }
+ TQLabel* captionLabel() const { return lbl_caption; }
+ TQLabel* nameLabel() const { return lbl_name; }
KLineEdit* captionLineEdit() const { return le_caption; }
KLineEdit* nameLineEdit() const { return le_name; }
- QString messageText() const { return lbl_message->text(); }
+ TQString messageText() const { return lbl_message->text(); }
- void setMessageText(const QString& msg);
+ void setMessageText(const TQString& msg);
//! \return entered caption text
- QString captionText() const;
+ TQString captionText() const;
- void setCaptionText(const QString& capt);
+ void setCaptionText(const TQString& capt);
//! \return entered name text, always in lower case
- QString nameText() const;
+ TQString nameText() const;
- void setNameText(const QString& name);
+ void setNameText(const TQString& name);
/*! Sets i18n'ed warning message displayed when user leaves 'name' field
without filling it (if acceptsEmptyValue() is false).
By default the message is equal "Please enter the name.". */
- void setWarningForName( const QString& txt ) { m_nameWarning = txt; }
+ void setWarningForName( const TQString& txt ) { m_nameWarning = txt; }
/*! Sets i18n'ed warning message displayed when user leaves 'name' field
without filling it (if acceptsEmptyValue() is false).
By default the message is equal "Please enter the caption." */
- void setWarningForCaption( const QString& txt ) { m_captionWarning = txt; }
+ void setWarningForCaption( const TQString& txt ) { m_captionWarning = txt; }
/*! \return true if name or caption is empty. */
bool empty() const;
@@ -113,24 +114,24 @@ class KEXIMAIN_EXPORT KexiNameWidget : public QWidget
void messageChanged();
protected slots:
- void slotNameTxtChanged(const QString&);
- void slotCaptionTxtChanged(const QString&);
-// bool eventFilter( QObject *obj, QEvent *ev );
+ void slotNameTxtChanged(const TQString&);
+ void slotCaptionTxtChanged(const TQString&);
+// bool eventFilter( TQObject *obj, TQEvent *ev );
protected:
void init(
- const QString& message,
- const QString& nameLabel, const QString& nameText,
- const QString& captionLabel, const QString& captionText);
+ const TQString& message,
+ const TQString& nameLabel, const TQString& nameText,
+ const TQString& captionLabel, const TQString& captionText);
- QLabel* lbl_message;
- QLabel* lbl_caption;
- QLabel* lbl_name;
+ TQLabel* lbl_message;
+ TQLabel* lbl_caption;
+ TQLabel* lbl_name;
KLineEdit* le_caption;
KLineEdit* le_name;
- QGridLayout* lyr;
+ TQGridLayout* lyr;
KexiUtils::MultiValidator *m_validator;
- QString m_nameWarning, m_captionWarning;
+ TQString m_nameWarning, m_captionWarning;
bool m_le_name_txtchanged_disable : 1;
bool m_le_name_autofill : 1;
diff --git a/kexi/main/kexinewstuff.cpp b/kexi/main/kexinewstuff.cpp
index adc0fc833..23058e059 100644
--- a/kexi/main/kexinewstuff.cpp
+++ b/kexi/main/kexinewstuff.cpp
@@ -21,7 +21,7 @@
#include <kdebug.h>
#include <ktar.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kaction.h>
#include <kapplication.h>
#include <kfiledialog.h>
@@ -30,18 +30,18 @@
#include "kexinewstuff.h"
-KexiNewStuff::KexiNewStuff(QWidget *parent)
+KexiNewStuff::KexiNewStuff(TQWidget *tqparent)
: KNewStuff( "kexi/template"
#if KDE_IS_VERSION(3,3,0)
, "http://download.kde.org/khotnewstuff/kexi-providers.xml"
#endif
- , parent)
+ , tqparent)
{
// Prevent GHNS to deny downloading a second time. If GHNS
// fails to download something, it still marks the thing as
// successfully downloaded and therefore we arn't able to
// download it again :-/
- KGlobal::config()->deleteGroup("KNewStuffStatus");
+ KGlobal::config()->deleteGroup("KNewStufftqStatus");
}
KexiNewStuff::~KexiNewStuff()
@@ -49,21 +49,21 @@ KexiNewStuff::~KexiNewStuff()
}
bool
-KexiNewStuff::install(const QString &fileName)
+KexiNewStuff::install(const TQString &fileName)
{
kdDebug() << "KexiNewStuff::install(): " << fileName << endl;
KTar archive( fileName );
if ( !archive.open( IO_ReadOnly ) ) {
- kdDebug() << QString("KexiNewStuff::install: Failed to open archivefile \"%1\"").arg(fileName) << endl;
+ kdDebug() << TQString("KexiNewStuff::install: Failed to open archivefile \"%1\"").tqarg(fileName) << endl;
return false;
}
const KArchiveDirectory *archiveDir = archive.directory();
- const QString destDir = KFileDialog::getExistingDirectory(
- ":DownloadExampleDatabases", parentWidget(),
+ const TQString destDir = KFileDialog::getExistingDirectory(
+ ":DownloadExampleDatabases", tqparentWidget(),
i18n("Choose Directory Where to Install Example Database"));
if (destDir.isEmpty()) {
- kdDebug() << QString("KexiNewStuff::install: Destination-directory is empty.") << endl;
+ kdDebug() << TQString("KexiNewStuff::install: Destination-directory is empty.") << endl;
return false;
}
archiveDir->copyTo(destDir);
@@ -73,7 +73,7 @@ KexiNewStuff::install(const QString &fileName)
}
bool
-KexiNewStuff::createUploadFile(const QString &)
+KexiNewStuff::createUploadFile(const TQString &)
{
return true;
}
diff --git a/kexi/main/kexinewstuff.h b/kexi/main/kexinewstuff.h
index 0af25276f..0247e7067 100644
--- a/kexi/main/kexinewstuff.h
+++ b/kexi/main/kexinewstuff.h
@@ -27,11 +27,11 @@
class KexiNewStuff : public KNewStuff
{
public:
- KexiNewStuff(QWidget *parent);
+ KexiNewStuff(TQWidget *tqparent);
virtual ~KexiNewStuff();
- virtual bool install( const QString &fileName );
- virtual bool createUploadFile( const QString &fileName );
+ virtual bool install( const TQString &fileName );
+ virtual bool createUploadFile( const TQString &fileName );
//KNS::Engine* customEngine() { return KNewStuff::engine(); }
};
diff --git a/kexi/main/kexistatusbar.cpp b/kexi/main/kexistatusbar.cpp
index c05f0eeb3..2d51cad54 100644
--- a/kexi/main/kexistatusbar.cpp
+++ b/kexi/main/kexistatusbar.cpp
@@ -22,11 +22,11 @@
#include "kexistatusbar.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpainter.h>
-#include <qtimer.h>
-#include <qfontmetrics.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
+#include <tqfontmetrics.h>
#include <kdebug.h>
#include <kglobalsettings.h>
@@ -38,8 +38,8 @@
#include <ktexteditor/viewstatusmsginterface.h>
#endif
-KexiStatusBar::KexiStatusBar(QWidget *parent, const char *name)
- : KStatusBar(parent, name)
+KexiStatusBar::KexiStatusBar(TQWidget *tqparent, const char *name)
+ : KStatusBar(tqparent, name)
#if KexiStatusBar_KTEXTEDITOR_USED
, m_cursorIface(0)
#endif
@@ -54,8 +54,8 @@ KexiStatusBar::KexiStatusBar(QWidget *parent, const char *name)
setReadOnlyFlag(false);
// @todo
-// connect(PartController::getInstance(), SIGNAL(activePartChanged(KParts::Part*)),
-// this, SLOT(activePartChanged(KParts::Part*)));
+// connect(PartController::getInstance(), TQT_SIGNAL(activePartChanged(KParts::Part*)),
+// this, TQT_SLOT(activePartChanged(KParts::Part*)));
/// @todo remove parts from the map on PartRemoved() ?
}
@@ -77,8 +77,8 @@ void KexiStatusBar::activePartChanged(KParts::Part *part)
// @todo
if (part && part->widget()) {
if ((m_viewmsgIface = dynamic_cast<KTextEditor::ViewStatusMsgInterface*>(part->widget()))) {
- connect( part->widget(), SIGNAL( viewStatusMsg( const QString & ) ),
- this, SLOT( setStatus( const QString & ) ) );
+ connect( part->widget(), TQT_SIGNAL( viewStatusMsg( const TQString & ) ),
+ this, TQT_SLOT( settqStatus( const TQString & ) ) );
# if KDE_VERSION < KDE_MAKE_VERSION(3,1,90)
changeItem(m_map[ m_activePart ], m_msgID);
@@ -86,7 +86,7 @@ void KexiStatusBar::activePartChanged(KParts::Part *part)
# endif
}
else if ((m_cursorIface = dynamic_cast<KTextEditor::ViewCursorInterface*>(part->widget()))) {
- connect(part->widget(), SIGNAL(cursorPositionChanged()), this, SLOT(cursorPositionChanged()));
+ connect(part->widget(), TQT_SIGNAL(cursorPositionChanged()), this, TQT_SLOT(cursorPositionChanged()));
cursorPositionChanged();
}
else {
@@ -110,9 +110,9 @@ void KexiStatusBar::cursorPositionChanged()
#endif
}
-void KexiStatusBar::setStatus(const QString &str)
+void KexiStatusBar::settqStatus(const TQString &str)
{
- kdDebug() << "KexiStatusBar::setStatus(" << str << ")" << endl;
+ kdDebug() << "KexiStatusBar::settqStatus(" << str << ")" << endl;
// m_status->setText(str);
changeItem(str, m_msgID);
@@ -125,21 +125,21 @@ void KexiStatusBar::setStatus(const QString &str)
void KexiStatusBar::setCursorPosition(int line, int col)
{
-// m_status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col));
- changeItem(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col), m_msgID);
+// m_status->setText(i18n(" Line: %1 Col: %2 ").tqarg(line+1).tqarg(col));
+ changeItem(i18n(" Line: %1 Col: %2 ").tqarg(line+1).tqarg(col), m_msgID);
}
-/*void KexiStatusBar::addWidget ( QWidget *widget, int stretch, bool permanent)
+/*void KexiStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent)
{
KStatusBar::addWidget(widget,stretch,permanent);
- if(widget->sizeHint().height() + 4 > height())
- setFixedHeight(widget->sizeHint().height() + 4);
+ if(widget->tqsizeHint().height() + 4 > height())
+ setFixedHeight(widget->tqsizeHint().height() + 4);
}*/
void KexiStatusBar::setReadOnlyFlag(bool readOnly)
{
- changeItem(readOnly ? i18n("Read only") : QString::null, m_readOnlyID);
+ changeItem(readOnly ? i18n("Read only") : TQString(), m_readOnlyID);
}
#include "kexistatusbar.moc"
diff --git a/kexi/main/kexistatusbar.h b/kexi/main/kexistatusbar.h
index eec249325..0cd5f6c6c 100644
--- a/kexi/main/kexistatusbar.h
+++ b/kexi/main/kexistatusbar.h
@@ -28,9 +28,9 @@
#include <kdeversion.h>
#include <kstatusbar.h>
-#include <qmap.h>
+#include <tqmap.h>
-class QLabel;
+class TQLabel;
#if KexiStatusBar_KTEXTEDITOR_USED
namespace KTextEditor { class ViewStatusMsgInterface; }
@@ -41,13 +41,14 @@ namespace KParts { class Part; }
class KexiStatusBar : public KStatusBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiStatusBar( QWidget *parent=0, const char *name=0 );
+ KexiStatusBar( TQWidget *tqparent=0, const char *name=0 );
virtual ~KexiStatusBar();
-// virtual void addWidget( QWidget *widget, int stretch = 0, bool permanent = false);
+// virtual void addWidget( TQWidget *widget, int stretch = 0, bool permanent = false);
public slots:
- virtual void setStatus(const QString &str);
+ virtual void settqStatus(const TQString &str);
virtual void setReadOnlyFlag(bool readOnly);
protected slots:
@@ -57,7 +58,7 @@ class KexiStatusBar : public KStatusBar
protected:
int m_msgID, m_readOnlyID;
-// QLabel *m_status, *m_readOnlyStatus;
+// TQLabel *m_status, *m_readOnlytqStatus;
#if KexiStatusBar_KTEXTEDITOR_USED
KTextEditor::ViewCursorInterface * m_cursorIface;
@@ -68,7 +69,7 @@ class KexiStatusBar : public KStatusBar
// still hoping for a fix for KDE-3.1
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION < KDE_MAKE_VERSION(3,1,90)
- QMap<KParts::Part*, QString> m_map;
+ TQMap<KParts::Part*, TQString> m_map;
# endif
#endif
};
diff --git a/kexi/main/ksplitter.h b/kexi/main/ksplitter.h
index db72ec880..9bf359b17 100644
--- a/kexi/main/ksplitter.h
+++ b/kexi/main/ksplitter.h
@@ -18,14 +18,14 @@
*/
/*
- IMPORTANT Note: This file compiles also in Qt-only mode by using the NO_KDE2 precompiler definition
+ IMPORTANT Note: This file compiles also in TQt-only mode by using the NO_KDE2 precompiler definition
*/
#ifndef KDOCKWIDGET_PRIVATE_H
#define KDOCKWIDGET_PRIVATE_H
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
#include <kdeversion.h>
@@ -33,29 +33,30 @@
#include <netwm_def.h>
#endif
-class QFrame;
+class TQFrame;
class KDockContainer;
class KDockWidget;
/**
- * Like QSplitter but specially designed for dockwidgets stuff.
+ * Like TQSplitter but specially designed for dockwidgets stuff.
* @internal
*
* @author Max Judin.
*/
-class KDockSplitter : public QWidget
+class KDockSplitter : public TQWidget
{
//Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
- * @param parent parent widget
+ * @param tqparent tqparent widget
* @param name name
- * @param orient orientation. Either @p Vertical or @p Horizontal
+ * @param orient orientation. Either @pQt::Vertical or @pQt::Horizontal
* @param pos procentual position of the splitter. Must be int [0...100].
*/
- KDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50);
+ KDockSplitter(TQWidget *tqparent= 0, const char *name= 0, Qt::Orientation orient=Qt::Vertical, int pos= 50);
virtual ~KDockSplitter(){};
/**
@@ -66,7 +67,7 @@ public:
* @param c0 the widget on top/left
* @param c1 the widget on borrom/right
*/
- void activate(QWidget *c0, QWidget *c1 = 0L);
+ void activate(TQWidget *c0, TQWidget *c1 = 0L);
/**
* Disables the splitter.
*/
@@ -129,22 +130,22 @@ public:
* The eventfilter installed on the @p divider processes
* all splitter resizing events.
*/
- virtual bool eventFilter(QObject *, QEvent *);
- virtual bool event( QEvent * );
+ virtual bool eventFilter(TQObject *, TQEvent *);
+ virtual bool event( TQEvent * );
/**
* @return the top/left child widget.
*/
- QWidget* getFirst() const { return child0; }
+ TQWidget* getFirst() const { return child0; }
/**
* @return the bottom/right child widget.
*/
- QWidget* getLast() const { return child1; }
+ TQWidget* getLast() const { return child1; }
/**
* If @p w is child0, return child1, otherwise child0.
* @return the other child widget
*/
- QWidget* getAnother( QWidget* w ) const;
+ TQWidget* getAnother( TQWidget* w ) const;
void updateName();
/**
@@ -168,9 +169,9 @@ public:
void restoreFromForcedFixedSize(KDockWidget *dw);
/**
- * The orientation is either @p Horizontal or @p Vertical.
+ * The orientation is either @pQt::Horizontal or @pQt::Vertical.
*/
- Orientation orientation(){return m_orientation;}
+ Qt::Orientation orientation(){return m_orientation;}
protected:
friend class KDockContainer;
@@ -187,7 +188,7 @@ protected:
* @param child the overlapping child
* @return the (new) splitter position.
*/
- int checkValueOverlapped(int position, QWidget* child) const;
+ int checkValueOverlapped(int position, TQWidget* child) const;
/**
* The resize event resizes @p child0, @p child1 and the @p divider.
@@ -203,7 +204,7 @@ protected:
* @param ev the resize Event. If @p ev=0L the user changed
* the mode (for example from overlap to nonoverlap mode).
*/
- virtual void resizeEvent(QResizeEvent *ev);
+ virtual void resizeEvent(TQResizeEvent *ev);
/*
protected slots:
@@ -221,8 +222,8 @@ private:
* so no need to make pointer checks.
* child[01]->getWidget() may be KDockContainer.
*/
- QWidget *child0, *child1;
- Orientation m_orientation;
+ TQWidget *child0, *child1;
+ Qt::Orientation m_orientation;
/**
* If initialised is true, the divider!=0L. If false, the divider==0L!
*/
@@ -231,10 +232,10 @@ private:
* The splitter controller which is between child0 and child1.
* Its size is 4 pixel.
*/
- QFrame* divider;
+ TQFrame* divider;
/**
* @p xpos and @p savedXPos represent the current divider position.
- * If the orientation is Horizontal @p xpos actually is "ypos". So
+ * If the orientation isQt::Horizontal @p xpos actually is "ypos". So
* do not get confused only because of the 'x'.
*
* xpos and savedXPos are internally high resolution. So *not* 0..100%
diff --git a/kexi/main/printing/kexisimpleprintingengine.cpp b/kexi/main/printing/kexisimpleprintingengine.cpp
index e021c912d..34b8af211 100644
--- a/kexi/main/printing/kexisimpleprintingengine.cpp
+++ b/kexi/main/printing/kexisimpleprintingengine.cpp
@@ -29,13 +29,13 @@
#include <kurllabel.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qpaintdevicemetrics.h>
-#include <qimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqimage.h>
#include <kexiutils/tristate.h>
#include <kexidb/connection.h>
@@ -51,7 +51,7 @@ KexiSimplePrintingSettings::KexiSimplePrintingSettings()
addDateAndTime = true;
addTableBorders = false;
pageTitleFont = kapp->font();
- pageTitleFont.setPointSizeFloat( (double)QFontInfo(pageTitleFont).pointSize()*1.5 );
+ pageTitleFont.setPointSizeFloat( (double)TQFontInfo(pageTitleFont).pointSize()*1.5 );
pageTitleFont.setBold(true);
}
@@ -71,7 +71,7 @@ KexiSimplePrintingSettings KexiSimplePrintingSettings::load()
if (config->hasKey("pageFormat"))
settings.pageLayout.format = KoPageFormat::formatFromString(
config->readEntry("pageFormat" ) );
- if (config->readEntry("pageOrientation", "portrait").lower()=="landscape")
+ if (config->readEntry("pageQt::Orientation", "portrait").lower()=="landscape")
settings.pageLayout.orientation = PG_LANDSCAPE;
else
settings.pageLayout.orientation = PG_PORTRAIT;
@@ -99,7 +99,7 @@ void KexiSimplePrintingSettings::save()
config->setGroup("Simple Printing");
config->writeEntry( "pageTitleFont", pageTitleFont );
config->writeEntry( "pageFormat", KoPageFormat::formatString( pageLayout.format ) );
- config->writeEntry("pageOrientation",
+ config->writeEntry("pageQt::Orientation",
pageLayout.orientation == PG_PORTRAIT ? "portrait" : "landscape");
config->writeEntry("pageWidth", pageLayout.ptWidth);
config->writeEntry("pageHeight", pageLayout.ptHeight);
@@ -116,8 +116,8 @@ void KexiSimplePrintingSettings::save()
//------------------------
KexiSimplePrintingEngine::KexiSimplePrintingEngine(
- const KexiSimplePrintingSettings& settings, QObject* parent)
- : QObject(parent, "KexiSimplePrintingEngine")
+ const KexiSimplePrintingSettings& settings, TQObject* tqparent)
+ : TQObject(tqparent, "KexiSimplePrintingEngine")
, m_settings(&settings)
, m_pdm(0)
{
@@ -134,9 +134,9 @@ KexiSimplePrintingEngine::~KexiSimplePrintingEngine()
}
bool KexiSimplePrintingEngine::init(KexiDB::Connection& conn,
- KexiDB::TableOrQuerySchema& tableOrQuery, const QString& titleText, QString& errorMessage)
+ KexiDB::TableOrQuerySchema& tableOrQuery, const TQString& titleText, TQString& errorMessage)
{
- errorMessage = QString::null;
+ errorMessage = TQString();
done();
m_headerText = titleText; //tableOrQuery.captionOrName();
@@ -199,7 +199,7 @@ void KexiSimplePrintingEngine::clear()
m_paintInitialized = false;
}
-void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool paint)
+void KexiSimplePrintingEngine::paintPage(int pageNumber, TQPainter& painter, bool paint)
{
uint offset = 0;
if (pageNumber < (int)m_dataOffsets.count()) {
@@ -208,19 +208,19 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
double y = 0.0;
- const bool printing = painter.device()->devType() == QInternal::Printer;
+ const bool printing = painter.device()->devType() == TQInternal::Printer;
m_SCALE = printing ? 1 : 20;
double w, h;
- m_pdm = QPaintDeviceMetrics( painter.device() );
+ m_pdm = TQPaintDeviceMetrics( painter.device() );
- if (dynamic_cast<QWidget*>(painter.device())) {
- w = dynamic_cast<QWidget*>(painter.device())->width() * m_SCALE;
- h = dynamic_cast<QWidget*>(painter.device())->height() * m_SCALE;
+ if (dynamic_cast<TQWidget*>(painter.device())) {
+ w = dynamic_cast<TQWidget*>(painter.device())->width() * m_SCALE;
+ h = dynamic_cast<TQWidget*>(painter.device())->height() * m_SCALE;
}
- else if (dynamic_cast<QPixmap*>(painter.device())) {
- w = dynamic_cast<QPixmap*>(painter.device())->width() * m_SCALE;
- h = dynamic_cast<QPixmap*>(painter.device())->height() * m_SCALE;
+ else if (dynamic_cast<TQPixmap*>(painter.device())) {
+ w = dynamic_cast<TQPixmap*>(painter.device())->width() * m_SCALE;
+ h = dynamic_cast<TQPixmap*>(painter.device())->height() * m_SCALE;
}
else {//KPrinter...
w = m_pdm.widthMM();
@@ -237,7 +237,7 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
m_dpiY = m_pdm.logicalDpiY();
m_dpiX = m_pdm.logicalDpiX();
-#ifdef Q_WS_WIN //fix for 120dpi
+#ifdef TQ_WS_WIN //fix for 120dpi
if (!printing) {
m_dpiY = 96;
m_dpiX = 96;
@@ -260,12 +260,12 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
m_fy = heightMM / (pdHeightMM);// * screenF);
//screen only
- // painter.fillRect(QRect(0,0,w,h), QBrush(white));
+ // painter.fillRect(TQRect(0,0,w,h), TQBrush(white));
m_pageWidth = uint( m_fx*double(m_pdm.width()) * m_SCALE - m_leftMargin - m_rightMargin );
m_pageHeight = uint( m_fy*double(m_pdm.height()) * m_SCALE - m_topMargin - m_bottomMargin );
m_headerFont = m_settings->pageTitleFont;
if(!printing) {
- int pixelSize = int( POINT_TO_INCH((double)QFontInfo(m_headerFont).pointSize())*m_dpiX ) * m_SCALE;
+ int pixelSize = int( POINT_TO_INCH((double)TQFontInfo(m_headerFont).pointSize())*m_dpiX ) * m_SCALE;
m_headerFont.setPixelSize(pixelSize);
}
@@ -278,7 +278,7 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
}
painter.setFont(m_mainFont);
- m_dateTimeText = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(),
+ m_dateTimeText = KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime(),
true, false);
m_dateTimeWidth = painter.fontMetrics().width(m_dateTimeText+" ");
m_mainLineSpacing = painter.fontMetrics().lineSpacing();
@@ -287,10 +287,10 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
m_headerTextRect = painter.fontMetrics().boundingRect(
(int)m_leftMargin, (int)m_topMargin,
m_pageWidth - m_dateTimeWidth,
- m_pageHeight, Qt::AlignAuto|Qt::WordBreak, m_headerText);
+ m_pageHeight, TQt::AlignAuto|TQt::WordBreak, m_headerText);
m_headerTextRect.setRight(m_headerTextRect.right()+10);
m_headerTextRect.setWidth(
- QMIN(int(m_pageWidth - m_dateTimeWidth), m_headerTextRect.width()));
+ TQMIN(int(m_pageWidth - m_dateTimeWidth), m_headerTextRect.width()));
//--compute max width of field names
m_maxFieldNameWidth = 0;
@@ -315,24 +315,24 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
//paint header
painter.setFont(m_headerFont);
if (paint) {
- painter.drawText(m_headerTextRect, Qt::AlignAuto|Qt::WordBreak, m_headerText);
+ painter.drawText(m_headerTextRect, TQt::AlignAuto|TQt::WordBreak, m_headerText);
}
painter.setFont(m_mainFont);
if (paint) {
painter.drawText((int)m_leftMargin + m_pageWidth - m_dateTimeWidth,
(int)m_topMargin, m_dateTimeWidth,
- m_headerTextRect.height(), Qt::AlignRight, m_dateTimeText);
+ m_headerTextRect.height(), TQt::AlignRight, m_dateTimeText);
//footer
- QString pageNumString;
+ TQString pageNumString;
if (m_pagesCount>0)
pageNumString = i18n("Page (number) of (total)", "Page %1 of %2")
- .arg(pageNumber+1).arg(m_pagesCount);
+ .tqarg(pageNumber+1).tqarg(m_pagesCount);
else
- pageNumString = i18n("Page %1").arg(pageNumber+1);
+ pageNumString = i18n("Page %1").tqarg(pageNumber+1);
painter.drawText((int)m_leftMargin,
(int)m_topMargin + m_pageHeight - m_mainLineSpacing,
m_pageWidth, m_mainLineSpacing,
- Qt::AlignRight | Qt::AlignBottom, pageNumString);
+ TQt::AlignRight | TQt::AlignBottom, pageNumString);
painter.drawLine((int)m_leftMargin,
(int)m_topMargin + m_pageHeight - m_mainLineSpacing*3/2,
(int)m_leftMargin + m_pageWidth,
@@ -387,16 +387,16 @@ void KexiSimplePrintingEngine::paintPage(int pageNumber, QPainter& painter, bool
m_eof = offset == rows;
}
-void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *item,
+void KexiSimplePrintingEngine::paintRecord(TQPainter& painter, KexiTableItem *item,
int cellMargin, double &y, uint paintedRows, bool paint, bool printing)
{
if (paintedRows>0 && !m_settings->addTableBorders) {//separator
if (paint) {
- painter.setPen(Qt::darkGray);
+ painter.setPen(TQt::darkGray);
painter.drawLine(
int(m_leftMargin), int( y-(double)m_mainLineSpacing ),
int(m_leftMargin)+m_pageWidth-1, int(y-(double)m_mainLineSpacing));
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
}
}
@@ -405,10 +405,10 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
if (paint) {
painter.drawText(
(int)m_leftMargin+cellMargin, (int)y, m_maxFieldNameWidth-cellMargin*2, m_mainLineSpacing,
- Qt::AlignTop, m_fieldsExpanded[i]->captionOrAliasOrName()
+ TQt::AlignTop, m_fieldsExpanded[i]->captionOrAliasOrName()
+ (m_settings->addTableBorders ? "" : ":"));
}
- QString text;
+ TQString text;
//! @todo optimize like in KexiCSVExport::exportData()
//get real column and real index to get the visible value
KexiDB::QueryColumnInfo* ci;
@@ -420,9 +420,9 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
indexForVisibleLookupValue = i;
}
- QVariant v(item->at( indexForVisibleLookupValue ));
+ TQVariant v(item->at( indexForVisibleLookupValue ));
KexiDB::Field::Type ftype = ci->field->type();
- QRect rect( (int)m_leftMargin + m_maxFieldNameWidth + cellMargin, (int)y,
+ TQRect rect( (int)m_leftMargin + m_maxFieldNameWidth + cellMargin, (int)y,
m_pageWidth - m_maxFieldNameWidth - cellMargin*2, m_pageHeight - (int)y);
if (v.isNull() || !v.isValid()) {
@@ -430,19 +430,19 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
}
//! todo inherit format
else if (ftype==KexiDB::Field::DateTime) {
- QDateTime dt(v.toDateTime());
+ TQDateTime dt(v.toDateTime());
if (dt.isValid())
text = KGlobal::locale()->formatDateTime(dt);
}
//! todo inherit format
else if (ftype==KexiDB::Field::Date) {
- QDate date(v.toDate());
+ TQDate date(v.toDate());
if (date.isValid())
text = KGlobal::locale()->formatDate(date, true/*short*/);
}
//! todo inherit format
else if (ftype==KexiDB::Field::Time) {
- QTime time(v.toTime());
+ TQTime time(v.toTime());
if (time.isValid())
text = KGlobal::locale()->formatTime(time);
}
@@ -453,9 +453,9 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
text = v.toBool()
? i18n("Boolean Yes (true)","Yes") : i18n("Boolean No (false)", "No");
else if (ftype==KexiDB::Field::BLOB) {
- const QByteArray ba( v.toByteArray() );
+ const TQByteArray ba( v.toByteArray() );
if (!ba.isEmpty()) {
- QPixmap pixmap(ba);
+ TQPixmap pixmap(ba);
#define MAX_PIXMAP_HEIGHT (m_mainLineSpacing * 5)
double pixmapHeight = MAX_PIXMAP_HEIGHT;
double pixmapWidth = double(MAX_PIXMAP_HEIGHT) * pixmap.width() / (double)pixmap.height();
@@ -467,21 +467,21 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
if (paint && !pixmap.isNull()) {
if (printing) {
painter.drawPixmap(
- QRect(rect.x(), rect.y()+m_mainLineSpacing/4,
+ TQRect(rect.x(), rect.y()+m_mainLineSpacing/4,
int(pixmapWidth), int(pixmapHeight)), pixmap );
}
else {// we're just previewing the pixmap, so let's resize it and cache
// so redrawing will be faster
painter.save();
painter.setWindow( // set 1:1 scale to avoid unnecessary image scaling
- QRect(painter.window().topLeft(),
+ TQRect(painter.window().topLeft(),
painter.window().size() / (int)m_SCALE ) );
painter.drawImage(
int(rect.x() / m_SCALE),
int( (rect.y()+m_mainLineSpacing/4) / m_SCALE),
pixmap.convertToImage().smoothScale(
int(pixmapWidth / m_SCALE), int(pixmapHeight / m_SCALE),
- QImage::ScaleMin ));
+ TQ_ScaleMin ));
painter.restore(); // back to m_SCALE:1 scale
}
}
@@ -491,9 +491,9 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
text = v.toString();
if (ftype!=KexiDB::Field::BLOB || v.isNull() || !v.isValid())
- rect = QRect( painter.fontMetrics().boundingRect(
+ rect = TQRect( painter.fontMetrics().boundingRect(
rect.x(), rect.y(), rect.width(), rect.height(),
- Qt::AlignAuto|Qt::WordBreak, text) );
+ TQt::AlignAuto|TQt::WordBreak, text) );
if (!text.isEmpty() && paint) {
// kdDebug() << "print engine: painter.drawText: "
// << rect.x() <<" "<< rect.y() <<" "<< m_pageWidth - m_maxFieldNameWidth - cellMargin*2
@@ -502,11 +502,11 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
// rect.x(), rect.y(), rect.width(), rect.height(),
rect.x(), rect.y(), m_pageWidth - m_maxFieldNameWidth - cellMargin*2,
int(m_topMargin + m_pageHeight - (int)y),
- Qt::AlignTop|Qt::WordBreak, text);
+ TQt::AlignTop|TQt::WordBreak, text);
}
if (m_settings->addTableBorders) {
if (paint) {
- painter.setPen(Qt::darkGray);
+ painter.setPen(TQt::darkGray);
painter.drawLine(
(int)m_leftMargin, rect.top(), (int)m_leftMargin+m_pageWidth-1, rect.top());
painter.drawLine(
@@ -517,17 +517,17 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
painter.drawLine(
(int)m_leftMargin+m_maxFieldNameWidth, rect.top(),
(int)m_leftMargin+m_maxFieldNameWidth, rect.bottom());
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
}
}
y += (double)rect.height();
}
if (m_settings->addTableBorders) {
if (paint) {
- painter.setPen(Qt::darkGray);
+ painter.setPen(TQt::darkGray);
painter.drawLine(
(int)m_leftMargin, (int)y, (int)m_leftMargin+m_pageWidth-1, (int)y);
- painter.setPen(Qt::black);
+ painter.setPen(TQt::black);
}
}
//record spacing
@@ -536,7 +536,7 @@ void KexiSimplePrintingEngine::paintRecord(QPainter& painter, KexiTableItem *ite
// y -= m_mainLineSpacing; //a bit less
}
-void KexiSimplePrintingEngine::calculatePagesCount(QPainter& painter)
+void KexiSimplePrintingEngine::calculatePagesCount(TQPainter& painter)
{
if (m_eof || !m_data) {
m_pagesCount = 0;
@@ -550,7 +550,7 @@ void KexiSimplePrintingEngine::calculatePagesCount(QPainter& painter)
m_pagesCount = pageNumber;
}
-void KexiSimplePrintingEngine::setTitleText(const QString& titleText)
+void KexiSimplePrintingEngine::setTitleText(const TQString& titleText)
{
m_headerText = titleText;
}
diff --git a/kexi/main/printing/kexisimpleprintingengine.h b/kexi/main/printing/kexisimpleprintingengine.h
index 551ed2480..f3a5371de 100644
--- a/kexi/main/printing/kexisimpleprintingengine.h
+++ b/kexi/main/printing/kexisimpleprintingengine.h
@@ -30,9 +30,9 @@ class KexiSimplePrintingSettings;
#include <widget/tableview/kexitableviewdata.h>
#include <KoPageLayoutDia.h>
-#include <qpaintdevicemetrics.h>
-#include <qfontmetrics.h>
-#include <qfont.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqfontmetrics.h>
+#include <tqfont.h>
//! @short Settings data for simple printing engine.
class KexiSimplePrintingSettings
@@ -46,30 +46,31 @@ class KexiSimplePrintingSettings
KoPageLayout pageLayout;
KoUnit::Unit unit;
- QFont pageTitleFont;
+ TQFont pageTitleFont;
bool addPageNumbers : 1;
bool addDateAndTime : 1;
bool addTableBorders : 1;
};
-/*! @short An engine painting data on pages using QPainter.
+/*! @short An engine painting data on pages using TQPainter.
The engine allows for random access to any page. */
-class KexiSimplePrintingEngine : public QObject
+class KexiSimplePrintingEngine : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiSimplePrintingEngine( const KexiSimplePrintingSettings& settings, QObject* parent );
+ KexiSimplePrintingEngine( const KexiSimplePrintingSettings& settings, TQObject* tqparent );
~KexiSimplePrintingEngine();
bool init(KexiDB::Connection& conn, KexiDB::TableOrQuerySchema& tableOrQuery,
- const QString& titleText, QString& errorMessage);
+ const TQString& titleText, TQString& errorMessage);
- void setTitleText(const QString& titleText);
+ void setTitleText(const TQString& titleText);
//! Calculates pafe count that can be later obtained using pagesCount().
//! Page count can depend on \a painter (printer/screen) and on printing settings.
- void calculatePagesCount(QPainter& painter);
+ void calculatePagesCount(TQPainter& painter);
bool done();
void clear();
@@ -89,29 +90,29 @@ class KexiSimplePrintingEngine : public QObject
/*! Paints a page number \a pageNumber (counted from 0) on \a painter.
If \a paint is false, drawings are only computed but not painted,
so this can be used for calculating page number before printing or previewing. */
- void paintPage(int pageNumber, QPainter& painter, bool paint = true);
+ void paintPage(int pageNumber, TQPainter& painter, bool paint = true);
protected:
- void paintRecord(QPainter& painter, KexiTableItem *item,
+ void paintRecord(TQPainter& painter, KexiTableItem *item,
int cellMargin, double &y, uint paintedRows, bool paint, bool printing);
const KexiSimplePrintingSettings* m_settings;
-// QPainter* m_painter;
- QFont m_mainFont, m_headerFont;
- QPaintDeviceMetrics m_pdm;
+// TQPainter* m_painter;
+ TQFont m_mainFont, m_headerFont;
+ TQPaintDeviceMetrics m_pdm;
double m_dpiX, m_dpiY;
uint m_pageWidth, m_pageHeight;
uint m_SCALE;
- //QFontMetrics m_headerFM, m_mainFM;
+ //TQFontMetrics m_headerFM, m_mainFM;
KexiDB::Cursor *m_cursor;
KexiTableViewData *m_data;
// KexiTableViewData::Iterator *m_dataIterator;
- QPtrList<uint> m_dataOffsets;
- QString m_headerText;
- QString m_dateTimeText;
+ TQPtrList<uint> m_dataOffsets;
+ TQString m_headerText;
+ TQString m_dateTimeText;
uint m_dateTimeWidth;
- QRect m_headerTextRect;
+ TQRect m_headerTextRect;
int m_maxFieldNameWidth;
int m_mainLineSpacing;
int m_footerHeight;
diff --git a/kexi/main/printing/kexisimpleprintingpagesetup.cpp b/kexi/main/printing/kexisimpleprintingpagesetup.cpp
index 5d20f36e1..f528cb234 100644
--- a/kexi/main/printing/kexisimpleprintingpagesetup.cpp
+++ b/kexi/main/printing/kexisimpleprintingpagesetup.cpp
@@ -36,27 +36,27 @@
#include <kpushbutton.h>
#include <kdeversion.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qcheckbox.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqcheckbox.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
#include <kexiutils/tristate.h>
KexiSimplePrintingCommand::KexiSimplePrintingCommand(
- KexiMainWindow* mainWin, int objectId, QObject* parent)
- : QObject(parent, "KexiSimplePrintCommand")
+ KexiMainWindow* mainWin, int objectId, TQObject* tqparent)
+ : TQObject(tqparent, "KexiSimplePrintCommand")
, m_previewEngine(0)
, m_mainWin(mainWin)
, m_objectId(objectId)
, m_previewWindow(0)
, m_printPreviewNeedsReloading(false)
{
- connect(this, SIGNAL(showPageSetupRequested(KexiPart::Item*)),
- m_mainWin, SLOT(showPageSetupForItem(KexiPart::Item*)));
+ connect(this, TQT_SIGNAL(showPageSetupRequested(KexiPart::Item*)),
+ m_mainWin, TQT_SLOT(showPageSetupForItem(KexiPart::Item*)));
}
KexiSimplePrintingCommand::~KexiSimplePrintingCommand()
@@ -68,13 +68,13 @@ KexiSimplePrintingCommand::~KexiSimplePrintingCommand()
bool KexiSimplePrintingCommand::print(const KexiSimplePrintingSettings& settings,
- const QString& aTitleText)
+ const TQString& aTitleText)
{
m_settings = settings;
return print(aTitleText);
}
-bool KexiSimplePrintingCommand::print(const QString& aTitleText)
+bool KexiSimplePrintingCommand::print(const TQString& aTitleText)
{
KexiDB::Connection *conn = m_mainWin->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(conn, m_objectId);
@@ -82,12 +82,12 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
//! @todo item not found
return false;
}
- QString titleText(aTitleText.stripWhiteSpace());
+ TQString titleText(aTitleText.stripWhiteSpace());
if (titleText.isEmpty())
titleText = tableOrQuery.captionOrName();
KexiSimplePrintingEngine engine(m_settings, this);
- QString errorMessage;
+ TQString errorMessage;
if (!engine.init(*conn, tableOrQuery, titleText, errorMessage)) {
if (!errorMessage.isEmpty())
KMessageBox::sorry(m_mainWin, errorMessage, i18n("Printing"));
@@ -95,12 +95,12 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
}
//setup printing
-#ifdef Q_WS_WIN
- QPrinter printer(QPrinter::HighResolution);
+#ifdef TQ_WS_WIN
+ TQPrinter printer(TQPrinter::HighResolution);
printer.setOrientation( m_settings.pageLayout.orientation == PG_PORTRAIT
- ? QPrinter::Portrait : QPrinter::Landscape );
+ ? TQPrinter::Portrait : TQPrinter::Landscape );
printer.setPageSize(
- (QPrinter::PageSize)KoPageFormat::printerPageSize( m_settings.pageLayout.format ) );
+ (TQPrinter::PageSize)KoPageFormat::printerPageSize( m_settings.pageLayout.format ) );
// "chicken-egg" problem:
// we cannot use real from/to values in setMinMax() and setFromTo()
@@ -115,7 +115,7 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
#endif
printer.setFullPage(true);
- QString docName( titleText );
+ TQString docName( titleText );
printer.setDocName( docName );
printer.setCreator(KEXI_APP_NAME);
if ( !printer.setup( m_mainWin ) ) {
@@ -125,7 +125,7 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
// now we have final settings
//! @todo get printer.pageOrder() (for reversed order requires improved engine)
- QPainter painter;
+ TQPainter painter;
if (!painter.begin(&printer)) {
//! @todo msg
@@ -134,11 +134,11 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
engine.calculatePagesCount(painter);
uint loops, loopsPerPage;
- QValueList<int> pagesToPrint;
+ TQValueList<int> pagesToPrint;
int fromPage = 0;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
int toPage = 0;
- if (QPrinter::PageRange == printer.printRange()) {
+ if (TQPrinter::PageRange == printer.printRange()) {
fromPage = printer.fromPage();
toPage = printer.toPage();
}
@@ -160,7 +160,7 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
loops = 1;
loopsPerPage = printer.collateCopies() ? 1 : printer.numCopies();
#else
- // on !win32 print QPrinter::numCopies() times (the OS does not perform buffering)
+ // on !win32 print TQPrinter::numCopies() times (the OS does not perform buffering)
pagesToPrint = printer.pageList();
kdDebug() << pagesToPrint << endl;
if (pagesToPrint.isEmpty()) {
@@ -190,7 +190,7 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
for (uint copy = 0;copy < loops; copy++) {
kdDebug() << "copy " << (copy+1) << " of " << loops << endl;
uint pageNumber = fromPage;
- QValueList<int>::ConstIterator pagesIt = pagesToPrint.constBegin();
+ TQValueList<int>::ConstIterator pagesIt = pagesToPrint.constBegin();
for(;(int)pageNumber == fromPage || !engine.eof(); ++pageNumber) {
kdDebug() << "printing..." << endl;
if (pagesIt == pagesToPrint.constEnd()) //no more pages to print
@@ -227,7 +227,7 @@ bool KexiSimplePrintingCommand::print(const QString& aTitleText)
}
bool KexiSimplePrintingCommand::showPrintPreview(const KexiSimplePrintingSettings& settings,
- const QString& aTitleText, bool reload)
+ const TQString& aTitleText, bool reload)
{
m_settings = settings;
if (!m_previewEngine)
@@ -237,7 +237,7 @@ bool KexiSimplePrintingCommand::showPrintPreview(const KexiSimplePrintingSetting
m_printPreviewNeedsReloading = true;
bool backToPage0 = true;
- QString titleText(aTitleText.stripWhiteSpace());
+ TQString titleText(aTitleText.stripWhiteSpace());
KexiDB::Connection *conn = m_mainWin->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(conn, m_objectId);
if (!tableOrQuery.table() && !tableOrQuery.query()) {
@@ -247,7 +247,7 @@ bool KexiSimplePrintingCommand::showPrintPreview(const KexiSimplePrintingSetting
if (titleText.isEmpty())
titleText = tableOrQuery.captionOrName();
if (!m_previewWindow || m_printPreviewNeedsReloading) {
- QString errorMessage;
+ TQString errorMessage;
if (!m_previewEngine->init(
*conn, tableOrQuery, titleText, errorMessage)) {
if (!errorMessage.isEmpty())
@@ -259,10 +259,10 @@ bool KexiSimplePrintingCommand::showPrintPreview(const KexiSimplePrintingSetting
backToPage0 = false;
m_previewWindow = new KexiSimplePrintPreviewWindow(
*m_previewEngine, tableOrQuery.captionOrName(), 0,
- Qt::WStyle_Customize|Qt::WStyle_NormalBorder|Qt::WStyle_Title|
- Qt::WStyle_SysMenu|Qt::WStyle_MinMax|Qt::WStyle_ContextHelp);
- connect(m_previewWindow, SIGNAL(printRequested()), this, SLOT(print()));
- connect(m_previewWindow, SIGNAL(pageSetupRequested()), this, SLOT(slotShowPageSetupRequested()));
+ TQt::WStyle_Customize|TQt::WStyle_NormalBorder|TQt::WStyle_Title|
+ TQt::WStyle_SysMenu|TQt::WStyle_MinMax|TQt::WStyle_ContextHelp);
+ connect(m_previewWindow, TQT_SIGNAL(printRequested()), this, TQT_SLOT(print()));
+ connect(m_previewWindow, TQT_SIGNAL(pageSetupRequested()), this, TQT_SLOT(slotShowPageSetupRequested()));
m_previewWindow->show();
KDialog::centerOnScreen(m_previewWindow);
m_printPreviewNeedsReloading = false;
@@ -297,9 +297,9 @@ void KexiSimplePrintingCommand::slotShowPageSetupRequested()
//----------------------------------------------------------
-KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWin, QWidget *parent,
- QMap<QString,QString>* args )
- : KexiViewBase( mainWin, parent, "KexiSimplePrintingPageSetup" )
+KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWin, TQWidget *tqparent,
+ TQMap<TQString,TQString>* args )
+ : KexiViewBase( mainWin, tqparent, "KexiSimplePrintingPageSetup" )
, m_settings( KexiSimplePrintingSettings::load() )
// , m_command(0)
{
@@ -327,7 +327,7 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
m_unit = KLocale::Metric == KGlobal::locale()->measureSystem() ? KoUnit::U_CM : KoUnit::U_INCH;
// GUI
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
m_contents = new KexiSimplePrintingPageSetupBase(this, "KexiSimplePrintingPageSetupBase");
lyr->addWidget(m_contents);
@@ -337,17 +337,17 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
m_contents->printButton->setIconSet( KStdGuiItem::print().iconSet(KIcon::Small) );
m_contents->printButton->setText( KStdGuiItem::print().text() );
- connect(m_contents->printButton, SIGNAL(clicked()), this, SLOT(print()));
+ connect(m_contents->printButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(print()));
m_contents->printPreviewButton->setIconSet( SmallIconSet("filequickprint") );
m_contents->printPreviewButton->setText( i18n("Print Previe&w...") );
- connect(m_contents->printPreviewButton, SIGNAL(clicked()), this, SLOT(printPreview()));
+ connect(m_contents->printPreviewButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(printPreview()));
m_contents->iconLabel->setFixedWidth(32+6);
m_contents->iconLabel->setPixmap( DesktopIcon("document", 32) );
- QWhatsThis::add(m_contents->headerTitleFontButton, i18n("Changes font for title text."));
- connect(m_contents->headerTitleFontButton, SIGNAL(clicked()),
- this, SLOT(slotChangeTitleFont()));
+ TQWhatsThis::add(m_contents->headerTitleFontButton, i18n("Changes font for title text."));
+ connect(m_contents->headerTitleFontButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangeTitleFont()));
if (m_item) {
m_origCaptionLabelText = m_contents->captionLabel->text();
@@ -356,29 +356,29 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
m_contents->openDataLink->setText( i18n("Open This Query") );
m_origCaptionLabelText = i18n("<h2>Page setup for printing \"%1\" query data</h2>");
}
- m_contents->captionLabel->setText( m_origCaptionLabelText.arg(m_item->name()) );
+ m_contents->captionLabel->setText( m_origCaptionLabelText.tqarg(m_item->name()) );
}
- connect(m_contents->headerTitleLineEdit,SIGNAL(textChanged(const QString&)),
- this, SLOT(slotTitleTextChanged(const QString&)));
+ connect(m_contents->headerTitleLineEdit,TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotTitleTextChanged(const TQString&)));
m_contents->headerTitleLineEdit->setFont( m_settings.pageTitleFont );
- QWhatsThis::add(m_contents->openDataLink,
+ TQWhatsThis::add(m_contents->openDataLink,
i18n("Shows data for table or query associated with this page setup."));
- QToolTip::add(m_contents->openDataLink,
+ TQToolTip::add(m_contents->openDataLink,
i18n("Shows data for table or query associated with this page setup."));
- connect(m_contents->openDataLink, SIGNAL(leftClickedURL()), this, SLOT(slotOpenData()));
+ connect(m_contents->openDataLink, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(slotOpenData()));
- QWhatsThis::add(m_contents->saveSetupLink, i18n("Saves settings for this setup as default."));
- connect(m_contents->saveSetupLink, SIGNAL(leftClickedURL()), this, SLOT(slotSaveSetup()));
-#if !KDE_IS_VERSION(3,5,1) && !defined(Q_WS_WIN)
+ TQWhatsThis::add(m_contents->saveSetupLink, i18n("Saves settings for this setup as default."));
+ connect(m_contents->saveSetupLink, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(slotSaveSetup()));
+#if !KDE_IS_VERSION(3,5,1) && !defined(TQ_WS_WIN)
//a fix for problems with focusable KUrlLabel on KDElibs<=3.5.0
m_contents->openDataLink->setFocusPolicy(NoFocus);
m_contents->saveSetupLink->setFocusPolicy(NoFocus);
#endif
- QWhatsThis::add(m_contents->addDateTimeCheckbox, i18n("Adds date and time to the header."));
- QWhatsThis::add(m_contents->addPageNumbersCheckbox, i18n("Adds page numbers to the footer."));
- QWhatsThis::add(m_contents->addTableBordersCheckbox, i18n("Adds table borders."));
+ TQWhatsThis::add(m_contents->addDateTimeCheckbox, i18n("Adds date and time to the header."));
+ TQWhatsThis::add(m_contents->addPageNumbersCheckbox, i18n("Adds page numbers to the footer."));
+ TQWhatsThis::add(m_contents->addTableBordersCheckbox, i18n("Adds table borders."));
#ifdef KEXI_NO_UNFINISHED
m_contents->addDateTimeCheckbox->hide();
@@ -386,17 +386,17 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
#endif
updatePageLayoutAndUnitInfo();
- QWhatsThis::add(m_contents->changePageSizeAndMarginsButton,
+ TQWhatsThis::add(m_contents->changePageSizeAndMarginsButton,
i18n("Changes page size and margins."));
- connect(m_contents->changePageSizeAndMarginsButton, SIGNAL(clicked()),
- this, SLOT(slotChangePageSizeAndMargins()));
+ connect(m_contents->changePageSizeAndMarginsButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotChangePageSizeAndMargins()));
- connect(m_contents->addPageNumbersCheckbox, SIGNAL(toggled(bool)),
- this, SLOT(slotAddPageNumbersCheckboxToggled(bool)));
- connect(m_contents->addDateTimeCheckbox, SIGNAL(toggled(bool)),
- this, SLOT(slotAddDateTimeCheckboxToggled(bool)));
- connect(m_contents->addTableBordersCheckbox, SIGNAL(toggled(bool)),
- this, SLOT(slotAddTableBordersCheckboxToggled(bool)));
+ connect(m_contents->addPageNumbersCheckbox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAddPageNumbersCheckboxToggled(bool)));
+ connect(m_contents->addDateTimeCheckbox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAddDateTimeCheckboxToggled(bool)));
+ connect(m_contents->addTableBordersCheckbox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAddTableBordersCheckboxToggled(bool)));
if (!ok) {
// no data!
@@ -414,17 +414,17 @@ KexiSimplePrintingPageSetup::KexiSimplePrintingPageSetup( KexiMainWindow *mainWi
m_printPreviewNeedsReloading = false;
/* if (printPreview)
- QTimer::singleShot(50, this, SLOT(printPreview()));
+ TQTimer::singleShot(50, this, TQT_SLOT(printPreview()));
else if (print)
- QTimer::singleShot(50, this, SLOT(print()));*/
- connect(this, SIGNAL(printItemRequested(KexiPart::Item*,const KexiSimplePrintingSettings&,
- const QString&)),
- m_mainWin, SLOT(printItem(KexiPart::Item*,const KexiSimplePrintingSettings&,
- const QString&)));
- connect(this, SIGNAL(printPreviewForItemRequested(KexiPart::Item*,
- const KexiSimplePrintingSettings&,const QString&,bool)),
- m_mainWin, SLOT(printPreviewForItem(KexiPart::Item*,
- const KexiSimplePrintingSettings&,const QString&,bool)));
+ TQTimer::singleShot(50, this, TQT_SLOT(print()));*/
+ connect(this, TQT_SIGNAL(printItemRequested(KexiPart::Item*,const KexiSimplePrintingSettings&,
+ const TQString&)),
+ m_mainWin, TQT_SLOT(printItem(KexiPart::Item*,const KexiSimplePrintingSettings&,
+ const TQString&)));
+ connect(this, TQT_SIGNAL(printPreviewForItemRequested(KexiPart::Item*,
+ const KexiSimplePrintingSettings&,const TQString&,bool)),
+ m_mainWin, TQT_SLOT(printPreviewForItem(KexiPart::Item*,
+ const KexiSimplePrintingSettings&,const TQString&,bool)));
}
KexiSimplePrintingPageSetup::~KexiSimplePrintingPageSetup()
@@ -439,15 +439,15 @@ void KexiSimplePrintingPageSetup::slotSaveSetup()
void KexiSimplePrintingPageSetup::updatePageLayoutAndUnitInfo()
{
- QString s;
+ TQString s;
if (m_settings.pageLayout.format == PG_CUSTOM) {
- s += QString(" (%1 %2 x %3 %4)")
- .arg(m_settings.pageLayout.ptWidth).arg(KoUnit::unitName(m_unit))
- .arg(m_settings.pageLayout.ptHeight).arg(KoUnit::unitName(m_unit));
+ s += TQString(" (%1 %2 x %3 %4)")
+ .tqarg(m_settings.pageLayout.ptWidth).tqarg(KoUnit::unitName(m_unit))
+ .tqarg(m_settings.pageLayout.ptHeight).tqarg(KoUnit::unitName(m_unit));
}
else
s += KoPageFormat::name(m_settings.pageLayout.format);
- s += QString(", ")
+ s += TQString(", ")
+ (m_settings.pageLayout.orientation == PG_PORTRAIT ? i18n("Portrait") : i18n("Landscape"))
+ ", " + i18n("margins:")
+ " " + KoUnit::toUserStringValue(m_settings.pageLayout.ptLeft, m_unit)
@@ -488,7 +488,7 @@ void KexiSimplePrintingPageSetup::slotOpenData()
m_mainWin->openObject(m_item, Kexi::DataViewMode, openingCancelled);
}
-void KexiSimplePrintingPageSetup::slotTitleTextChanged(const QString&)
+void KexiSimplePrintingPageSetup::slotTitleTextChanged(const TQString&)
{
if (m_contents->headerTitleLineEdit->isModified()) {
m_printPreviewNeedsReloading = true;
@@ -501,7 +501,7 @@ void KexiSimplePrintingPageSetup::slotTitleTextChanged(const QString&)
void KexiSimplePrintingPageSetup::slotChangeTitleFont()
{
- if (QDialog::Accepted != KFontDialog::getFont(m_settings.pageTitleFont, false, this))
+ if (TQDialog::Accepted != KFontDialog::getFont(m_settings.pageTitleFont, false, this))
return;
m_contents->headerTitleLineEdit->setFont( m_settings.pageTitleFont );
setDirty(true);
@@ -511,7 +511,7 @@ void KexiSimplePrintingPageSetup::slotChangePageSizeAndMargins()
{
KoHeadFoot headfoot; //dummy
- if (int(QDialog::Accepted) != KoPageLayoutDia::pageLayout(
+ if (int(TQDialog::Accepted) != KoPageLayoutDia::pageLayout(
m_settings.pageLayout, headfoot, FORMAT_AND_BORDERS | DISABLE_UNIT, m_unit, this ))
return;
diff --git a/kexi/main/printing/kexisimpleprintingpagesetup.h b/kexi/main/printing/kexisimpleprintingpagesetup.h
index e4e99bd51..b2fbc6686 100644
--- a/kexi/main/printing/kexisimpleprintingpagesetup.h
+++ b/kexi/main/printing/kexisimpleprintingpagesetup.h
@@ -35,21 +35,22 @@ class KexiSimplePrintPreviewWindow;
- a single printing engine per part item regardless of a way how user started
(using 'File->Print' command or 'Print' button of the 'Page Setup' dialog)
*/
-class KexiSimplePrintingCommand : public QObject
+class KexiSimplePrintingCommand : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSimplePrintingCommand(KexiMainWindow* mainWin, int objectId,
- QObject* parent = 0);
+ TQObject* tqparent = 0);
~KexiSimplePrintingCommand();
public slots:
bool print(const KexiSimplePrintingSettings& settings,
- const QString& aTitleText = QString::null);
- bool print(const QString& aTitleText = QString::null);
+ const TQString& aTitleText = TQString());
+ bool print(const TQString& aTitleText = TQString());
bool showPrintPreview(const KexiSimplePrintingSettings& settings,
- const QString& aTitleText = QString::null, bool reload = false);
+ const TQString& aTitleText = TQString(), bool reload = false);
// void setPrintPreviewNeedsReloading();
signals:
@@ -72,9 +73,10 @@ class KexiSimplePrintingCommand : public QObject
class KexiSimplePrintingPageSetup : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiSimplePrintingPageSetup( KexiMainWindow *mainWin, QWidget *parent, QMap<QString,QString>* args );
+ KexiSimplePrintingPageSetup( KexiMainWindow *mainWin, TQWidget *tqparent, TQMap<TQString,TQString>* args );
~KexiSimplePrintingPageSetup();
public slots:
@@ -83,9 +85,9 @@ class KexiSimplePrintingPageSetup : public KexiViewBase
signals:
void printItemRequested(KexiPart::Item* item,
- const KexiSimplePrintingSettings& settings, const QString& titleText);
+ const KexiSimplePrintingSettings& settings, const TQString& titleText);
void printPreviewForItemRequested(KexiPart::Item* item,
- const KexiSimplePrintingSettings& settings, const QString& titleText, bool reload);
+ const KexiSimplePrintingSettings& settings, const TQString& titleText, bool reload);
protected slots:
void slotOpenData();
@@ -95,7 +97,7 @@ class KexiSimplePrintingPageSetup : public KexiViewBase
void slotAddPageNumbersCheckboxToggled(bool set);
void slotAddDateTimeCheckboxToggled(bool set);
void slotAddTableBordersCheckboxToggled(bool set);
- void slotTitleTextChanged(const QString&);
+ void slotTitleTextChanged(const TQString&);
protected:
void setupPrintingCommand();
@@ -109,7 +111,7 @@ class KexiSimplePrintingPageSetup : public KexiViewBase
KoPageLayoutSize *m_pageLayoutWidget;
KexiPart::Item *m_item;
// KexiSimplePrintingCommand *m_command;
- QString m_origCaptionLabelText;
+ TQString m_origCaptionLabelText;
bool m_printPreviewNeedsReloading : 1;
};
diff --git a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui
index 13c29ab0d..798ae0e55 100644
--- a/kexi/main/printing/kexisimpleprintingpagesetupbase.ui
+++ b/kexi/main/printing/kexisimpleprintingpagesetupbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiSimplePrintingPageSetupBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiSimplePrintingPageSetupBase</cstring>
</property>
@@ -22,15 +22,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="6">
+ <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="6">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconLabel</cstring>
</property>
@@ -45,11 +45,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>captionLabel</cstring>
</property>
@@ -91,7 +91,7 @@
<string>Set Font...</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -106,16 +106,16 @@
<property name="text">
<string>Page title:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignBottom</set>
</property>
<property name="buddy" stdset="0">
<cstring>headerTitleLineEdit</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="6">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="6">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<hbox>
<property name="name">
@@ -158,7 +158,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>230</width>
<height>20</height>
@@ -167,7 +167,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox" row="8" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="8" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>addPageNumbersCheckbox</cstring>
</property>
@@ -183,7 +183,7 @@
<string>Add page numbers</string>
</property>
</widget>
- <widget class="QGroupBox" row="7" column="0" rowspan="1" colspan="5">
+ <widget class="TQGroupBox" row="7" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -194,7 +194,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pageSizeAndMarginsLabel</cstring>
</property>
@@ -220,9 +220,9 @@
<string>Change...</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="12" column="0" rowspan="1" colspan="6">
+ <widget class="TQLayoutWidget" row="12" column="0" rowspan="1" colspan="6">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<grid>
<property name="name">
@@ -238,7 +238,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>80</width>
<height>6</height>
@@ -291,7 +291,7 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -301,7 +301,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="9" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="9" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>addDateTimeCheckbox</cstring>
</property>
@@ -317,7 +317,7 @@
<string>Add date and time</string>
</property>
</widget>
- <widget class="QCheckBox" row="10" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="10" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>addTableBordersCheckbox</cstring>
</property>
@@ -343,7 +343,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -360,7 +360,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>4</height>
@@ -377,7 +377,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>4</height>
@@ -394,7 +394,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>4</height>
@@ -411,7 +411,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>4</height>
@@ -434,7 +434,7 @@
<tabstop>openDataLink</tabstop>
<tabstop>saveSetupLink</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kexi/main/printing/kexisimpleprintingpart.cpp b/kexi/main/printing/kexisimpleprintingpart.cpp
index 765f6db26..ca751003e 100644
--- a/kexi/main/printing/kexisimpleprintingpart.cpp
+++ b/kexi/main/printing/kexisimpleprintingpart.cpp
@@ -48,12 +48,12 @@ KexiSimplePrintingPart::~KexiSimplePrintingPart()
{
}
-KexiViewBase* KexiSimplePrintingPart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>* args)
+KexiViewBase* KexiSimplePrintingPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>* args)
{
Q_UNUSED( item );
if (viewMode == Kexi::DesignViewMode) {
- KexiSimplePrintingPageSetup *w = new KexiSimplePrintingPageSetup( dialog->mainWin(), parent, args );
+ KexiSimplePrintingPageSetup *w = new KexiSimplePrintingPageSetup( dialog->mainWin(), tqparent, args );
return w;
}
diff --git a/kexi/main/printing/kexisimpleprintingpart.h b/kexi/main/printing/kexisimpleprintingpart.h
index 1d2df3be2..6e44ff4c3 100644
--- a/kexi/main/printing/kexisimpleprintingpart.h
+++ b/kexi/main/printing/kexisimpleprintingpart.h
@@ -37,14 +37,15 @@ class KexiProject;
class KexiSimplePrintingPart : public KexiPart::StaticPart
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSimplePrintingPart();
virtual ~KexiSimplePrintingPart();
protected:
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>* staticObjectArgs);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>* staticObjectArgs);
};
#endif
diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp
index 4ba487d9a..960a23b2f 100644
--- a/kexi/main/printing/kexisimpleprintpreviewwindow.cpp
+++ b/kexi/main/printing/kexisimpleprintpreviewwindow.cpp
@@ -22,10 +22,10 @@
#include "kexisimpleprintpreviewwindow_p.h"
#include <kexi_version.h>
-#include <qlayout.h>
-#include <qaccel.h>
-#include <qtimer.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqaccel.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
#include <kdialogbase.h>
#include <ktoolbarbutton.h>
@@ -36,8 +36,8 @@
#include <kapplication.h>
KexiSimplePrintPreviewView::KexiSimplePrintPreviewView(
- QWidget *parent, KexiSimplePrintPreviewWindow *window)
- : QWidget(parent, "KexiSimplePrintPreviewView", WStaticContents)//|WNoAutoErase)
+ TQWidget *tqparent, KexiSimplePrintPreviewWindow *window)
+ : TQWidget(tqparent, "KexiSimplePrintPreviewView", WStaticContents)//|WNoAutoErase)
, m_window(window)
{
enablePainting = false;
@@ -45,16 +45,16 @@ KexiSimplePrintPreviewView::KexiSimplePrintPreviewView(
// resizeContents(200, 400);
}
-void KexiSimplePrintPreviewView::paintEvent( QPaintEvent *pe )
+void KexiSimplePrintPreviewView::paintEvent( TQPaintEvent *pe )
{
Q_UNUSED(pe);
if (!enablePainting)
return;
- QPixmap pm(size()); //dbl buffered
- QPainter p;
- p.begin(&pm, this);
+ TQPixmap pm(size()); //dbl buffered
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
//! @todo only for screen!
- p.fillRect(QRect(QPoint(0,0),pm.size()), QBrush(white));//pe->rect(), QBrush(white));
+ p.fillRect(TQRect(TQPoint(0,0),pm.size()), TQBrush(white));//pe->rect(), TQBrush(white));
if (m_window->currentPage()>=0)
m_window->m_engine.paintPage(m_window->currentPage(), p);
// emit m_window->paintingPageRequested(m_window->currentPage(), p);
@@ -68,7 +68,7 @@ void KexiSimplePrintPreviewView::paintEvent( QPaintEvent *pe )
KexiSimplePrintPreviewScrollView::KexiSimplePrintPreviewScrollView(
KexiSimplePrintPreviewWindow *window)
- : QScrollView(window, "scrollview", WStaticContents|WNoAutoErase)
+ : TQScrollView(window, "scrollview", WStaticContents|WNoAutoErase)
, m_window(window)
{
// this->settings = settings;
@@ -84,9 +84,9 @@ KexiSimplePrintPreviewScrollView::KexiSimplePrintPreviewScrollView(
addChild(widget);
}
-void KexiSimplePrintPreviewScrollView::resizeEvent( QResizeEvent *re )
+void KexiSimplePrintPreviewScrollView::resizeEvent( TQResizeEvent *re )
{
- QScrollView::resizeEvent(re);
+ TQScrollView::resizeEvent(re);
// kdDebug() << re->size().width() << " " << re->size().height() << endl;
// kdDebug() << contentsWidth() << " " << contentsHeight() << endl;
// kdDebug() << widget->width() << " " << widget->height() << endl;
@@ -95,13 +95,13 @@ void KexiSimplePrintPreviewScrollView::resizeEvent( QResizeEvent *re )
|| re->size().height() > (widget->height()+2*KexiSimplePrintPreviewScrollView_MARGIN))
{
resizeContents(
- QMAX(re->size().width(), widget->width()+2*KexiSimplePrintPreviewScrollView_MARGIN),
- QMAX(re->size().height(), widget->height()+2*KexiSimplePrintPreviewScrollView_MARGIN));
+ TQMAX(re->size().width(), widget->width()+2*KexiSimplePrintPreviewScrollView_MARGIN),
+ TQMAX(re->size().height(), widget->height()+2*KexiSimplePrintPreviewScrollView_MARGIN));
int vscrbarWidth = verticalScrollBar()->isVisible() ? verticalScrollBar()->width() : 0;
int newContentsWidth
- = QMAX(re->size().width(), widget->width()+2*KexiSimplePrintPreviewScrollView_MARGIN);
+ = TQMAX(re->size().width(), widget->width()+2*KexiSimplePrintPreviewScrollView_MARGIN);
int newContentsHeight
- = QMAX(re->size().height(), widget->height()+2*KexiSimplePrintPreviewScrollView_MARGIN);
+ = TQMAX(re->size().height(), widget->height()+2*KexiSimplePrintPreviewScrollView_MARGIN);
moveChild(widget, (newContentsWidth - vscrbarWidth - widget->width())/2,
(newContentsHeight - widget->height())/2);
resizeContents( newContentsWidth, newContentsHeight );
@@ -120,10 +120,10 @@ void KexiSimplePrintPreviewScrollView::setFullWidth()
// int constantWidth = m_window->width()- KexiSimplePrintPreviewScrollView_MARGIN*6;
double constantWidth = width()- KexiSimplePrintPreviewScrollView_MARGIN*6;
double heightForWidth = constantWidth * heightMM / widthMM;
-// heightForWidth = QMIN(kapp->desktop()->height()*4/5, heightForWidth);
+// heightForWidth = TQMIN(kapp->desktop()->height()*4/5, heightForWidth);
kdDebug() << "1: " << heightForWidth << endl;
#if 0 //todo we can use this if we want to fix the height to width of the page
- heightForWidth = QMIN(height(), heightForWidth);
+ heightForWidth = TQMIN(height(), heightForWidth);
kdDebug() << "2: " << heightForWidth << endl;
#endif
constantWidth = heightForWidth * widthMM / heightMM;
@@ -133,9 +133,9 @@ void KexiSimplePrintPreviewScrollView::setFullWidth()
moveChild(widget, (contentsWidth()-widget->width())/2,
(contentsHeight()-widget->height())/2);
viewport()->setUpdatesEnabled(true);
- resize(size()+QSize(1,1)); //to update pos.
+ resize(size()+TQSize(1,1)); //to update pos.
widget->enablePainting = true;
- widget->repaint();
+ widget->tqrepaint();
}
void KexiSimplePrintPreviewScrollView::setContentsPos(int x, int y)
@@ -143,65 +143,65 @@ void KexiSimplePrintPreviewScrollView::setContentsPos(int x, int y)
// kdDebug() << "############" << x << " " << y << " " << contentsX()<< " " <<contentsY() << endl;
if (x<0 || y<0) //to avoid endless loop on Linux
return;
- QScrollView::setContentsPos(x,y);
+ TQScrollView::setContentsPos(x,y);
}
//------------------
KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow(
- KexiSimplePrintingEngine &engine, const QString& previewName,
- QWidget *parent, WFlags f)
- : QWidget(parent, "KexiSimplePrintPreviewWindow", f)
+ KexiSimplePrintingEngine &engine, const TQString& previewName,
+ TQWidget *tqparent, WFlags f)
+ : TQWidget(tqparent, "KexiSimplePrintPreviewWindow", f)
, m_engine(engine)
, m_settings(*m_engine.settings())
, m_pageNumber(-1)
, m_pagesCount(-1)
{
- setCaption(i18n("%1 - Print Preview - %2").arg(previewName).arg(KEXI_APP_NAME));
+ setCaption(i18n("%1 - Print Preview - %2").tqarg(previewName).tqarg(KEXI_APP_NAME));
setIcon(DesktopIcon("filequickprint"));
- QVBoxLayout *lyr = new QVBoxLayout(this, 6);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this, 6);
int id;
m_toolbar = new KToolBar(0, this);
m_toolbar->setLineWidth(0);
- m_toolbar->setFrameStyle(QFrame::NoFrame);
+ m_toolbar->setFrameStyle(TQFrame::NoFrame);
m_toolbar->setIconText(KToolBar::IconTextRight);
lyr->addWidget(m_toolbar);
id = m_toolbar->insertWidget( -1, 0, new KPushButton(KStdGuiItem::print(), m_toolbar) );
- m_toolbar->addConnection(id, SIGNAL(clicked()), this, SLOT(slotPrintClicked()));
- static_cast<KPushButton*>(m_toolbar->getWidget(id))->setAccel(Qt::CTRL|Qt::Key_P);
+ m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPrintClicked()));
+ static_cast<KPushButton*>(m_toolbar->getWidget(id))->setAccel(TQt::CTRL|TQt::Key_P);
m_toolbar->insertSeparator();
id = m_toolbar->insertWidget(-1, 0, new KPushButton(i18n("Page Set&up..."), m_toolbar));
- m_toolbar->addConnection(id, SIGNAL(clicked()), this, SLOT(slotPageSetup()));
+ m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPageSetup()));
m_toolbar->insertSeparator();
#ifndef KEXI_NO_UNFINISHED
//! @todo unfinished
id = m_toolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("viewmag+"), i18n("Zoom In"), m_toolbar));
- m_toolbar->addConnection(id, SIGNAL(clicked()), this, SLOT(slotZoomInClicked()));
+ m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomInClicked()));
m_toolbar->insertSeparator();
id = m_toolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("viewmag-"), i18n("Zoom Out"), m_toolbar));
- m_toolbar->addConnection(id, SIGNAL(clicked()), this, SLOT(slotZoomOutClicked()));
+ m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotZoomOutClicked()));
m_toolbar->insertSeparator();
#endif
id = m_toolbar->insertWidget(-1, 0, new KPushButton(KStdGuiItem::close(), m_toolbar));
- m_toolbar->addConnection(id, SIGNAL(clicked()), this, SLOT(close()));
+ m_toolbar->addConnection(id, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(close()));
m_toolbar->alignItemRight(id);
m_scrollView = new KexiSimplePrintPreviewScrollView(this);
m_scrollView->setUpdatesEnabled(false);
m_view = m_scrollView->widget;
- m_scrollView->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ m_scrollView->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
lyr->addWidget(m_scrollView);
- QWidget* navToolbarWidget = new QWidget(this); //widget used to center the navigator toolbar
- navToolbarWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- QHBoxLayout *navToolbarLyr = new QHBoxLayout(navToolbarWidget);
+ TQWidget* navToolbarWidget = new TQWidget(this); //widget used to center the navigator toolbar
+ navToolbarWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ TQHBoxLayout *navToolbarLyr = new TQHBoxLayout(navToolbarWidget);
lyr->addWidget(navToolbarWidget);
m_navToolbar = new KToolBar(0, navToolbarWidget);
@@ -210,33 +210,33 @@ KexiSimplePrintPreviewWindow::KexiSimplePrintPreviewWindow(
navToolbarLyr->addStretch(1);
// m_navToolbar->setFullWidth(true);
m_navToolbar->setLineWidth(0);
- m_navToolbar->setFrameStyle(QFrame::NoFrame);
+ m_navToolbar->setFrameStyle(TQFrame::NoFrame);
m_navToolbar->setIconText(KToolBar::IconTextRight);
m_idFirst = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("start"), i18n("First Page"), m_navToolbar));
- m_navToolbar->addConnection(m_idFirst, SIGNAL(clicked()), this, SLOT(slotFirstClicked()));
+ m_navToolbar->addConnection(m_idFirst, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotFirstClicked()));
m_navToolbar->insertSeparator();
m_idPrevious = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("previous"), i18n("Previous Page"), m_navToolbar));
- m_navToolbar->addConnection(m_idPrevious, SIGNAL(clicked()), this, SLOT(slotPreviousClicked()));
+ m_navToolbar->addConnection(m_idPrevious, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotPreviousClicked()));
m_navToolbar->insertSeparator();
- m_idPageNumberLabel = m_navToolbar->insertWidget( -1, 0, new QLabel(m_navToolbar));
+ m_idPageNumberLabel = m_navToolbar->insertWidget( -1, 0, new TQLabel(m_navToolbar));
m_navToolbar->insertSeparator();
m_idNext = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("next"), i18n("Next Page"), m_navToolbar));
- m_navToolbar->addConnection(m_idNext, SIGNAL(clicked()), this, SLOT(slotNextClicked()));
+ m_navToolbar->addConnection(m_idNext, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNextClicked()));
m_navToolbar->insertSeparator();
m_idLast = m_navToolbar->insertWidget( -1, 0, new KPushButton(BarIconSet("finish"), i18n("Last Page"), m_navToolbar));
- m_navToolbar->addConnection(m_idLast, SIGNAL(clicked()), this, SLOT(slotLastClicked()));
+ m_navToolbar->addConnection(m_idLast, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotLastClicked()));
m_navToolbar->insertSeparator();
resize(width(), kapp->desktop()->height()*4/5);
//! @todo progress bar...
- QTimer::singleShot(50, this, SLOT(initLater()));
+ TQTimer::singleShot(50, TQT_TQOBJECT(this), TQT_SLOT(initLater()));
}
void KexiSimplePrintPreviewWindow::initLater()
@@ -308,14 +308,14 @@ void KexiSimplePrintPreviewWindow::goToPage(int pageNumber)
m_pageNumber = pageNumber;
m_pagesCount = m_engine.pagesCount();
- m_view->repaint(); //this will automatically paint a new page
+ m_view->tqrepaint(); //this will automatically paint a new page
m_navToolbar->setItemEnabled(m_idNext, pageNumber < ((int)m_engine.pagesCount()-1));
m_navToolbar->setItemEnabled(m_idLast, pageNumber < ((int)m_engine.pagesCount()-1));
m_navToolbar->setItemEnabled(m_idPrevious, pageNumber > 0);
m_navToolbar->setItemEnabled(m_idFirst, pageNumber > 0);
- static_cast<QLabel*>(m_navToolbar->getWidget(m_idPageNumberLabel))->setText(
- i18n("Page (number) of (total)", "Page %1 of %2").arg(m_pageNumber+1).arg(m_engine.pagesCount()));
+ static_cast<TQLabel*>(m_navToolbar->getWidget(m_idPageNumberLabel))->setText(
+ i18n("Page (number) of (total)", "Page %1 of %2").tqarg(m_pageNumber+1).tqarg(m_engine.pagesCount()));
}
void KexiSimplePrintPreviewWindow::setFullWidth()
@@ -325,29 +325,29 @@ void KexiSimplePrintPreviewWindow::setFullWidth()
void KexiSimplePrintPreviewWindow::updatePagesCount()
{
- QPixmap pm(m_view->size()); //dbl buffered
- QPainter p(m_view);
+ TQPixmap pm(m_view->size()); //dbl buffered
+ TQPainter p(m_view);
//p.begin(&pm, this);
////! @todo only for screen!
-// p.fillRect(pe->rect(), QBrush(white));
+// p.fillRect(pe->rect(), TQBrush(white));
m_engine.calculatePagesCount(p);
p.end();
}
-bool KexiSimplePrintPreviewWindow::event( QEvent * e )
+bool KexiSimplePrintPreviewWindow::event( TQEvent * e )
{
- QEvent::Type t = e->type();
- if (t==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ TQEvent::Type t = e->type();
+ if (t==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int k = ke->key();
bool ok = true;
- if (k==Qt::Key_Equal || k==Qt::Key_Plus)
+ if (k==TQt::Key_Equal || k==TQt::Key_Plus)
slotZoomInClicked();
- else if (k==Qt::Key_Minus)
+ else if (k==TQt::Key_Minus)
slotZoomOutClicked();
- else if (k==Qt::Key_Home)
+ else if (k==TQt::Key_Home)
slotFirstClicked();
- else if (k==Qt::Key_End)
+ else if (k==TQt::Key_End)
slotLastClicked();
else
ok = false;
@@ -357,13 +357,13 @@ bool KexiSimplePrintPreviewWindow::event( QEvent * e )
return true;
}
}
- else if (t==QEvent::AccelOverride) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ else if (t==TQEvent::AccelOverride) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int k = ke->key();
bool ok = true;
- if (k==Qt::Key_PageUp)
+ if (k==TQt::Key_PageUp)
slotPreviousClicked();
- else if (k==Qt::Key_PageDown)
+ else if (k==TQt::Key_PageDown)
slotNextClicked();
else
ok = false;
@@ -373,7 +373,7 @@ bool KexiSimplePrintPreviewWindow::event( QEvent * e )
return true;
}
}
- return QWidget::event(e);
+ return TQWidget::event(e);
}
diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow.h b/kexi/main/printing/kexisimpleprintpreviewwindow.h
index c91fa2f26..d3119339d 100644
--- a/kexi/main/printing/kexisimpleprintpreviewwindow.h
+++ b/kexi/main/printing/kexisimpleprintpreviewwindow.h
@@ -20,8 +20,8 @@
#ifndef KEXISIMPLEPRINTPREVIEWWINDOW_H
#define KEXISIMPLEPRINTPREVIEWWINDOW_H
-#include <qpainter.h>
-#include <qscrollview.h>
+#include <tqpainter.h>
+#include <tqscrollview.h>
#include <ktoolbar.h>
#include <KoPageLayoutDia.h>
@@ -31,13 +31,14 @@ class KexiSimplePrintingSettings;
class KexiSimplePrintingEngine;
//! @short A window for displaying print preview for simple printing.
-class KexiSimplePrintPreviewWindow : public QWidget
+class KexiSimplePrintPreviewWindow : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSimplePrintPreviewWindow(KexiSimplePrintingEngine &engine,
- const QString& previewName, QWidget *parent, WFlags f = 0);
+ const TQString& previewName, TQWidget *tqparent, WFlags f = 0);
~KexiSimplePrintPreviewWindow();
int currentPage() const { return m_pageNumber; }
@@ -66,7 +67,7 @@ class KexiSimplePrintPreviewWindow : public QWidget
void initLater();
protected:
- virtual bool event( QEvent * e );
+ virtual bool event( TQEvent * e );
KexiSimplePrintingEngine &m_engine;
const KexiSimplePrintingSettings& m_settings;
diff --git a/kexi/main/printing/kexisimpleprintpreviewwindow_p.h b/kexi/main/printing/kexisimpleprintpreviewwindow_p.h
index e7a3804d5..2c72e8a16 100644
--- a/kexi/main/printing/kexisimpleprintpreviewwindow_p.h
+++ b/kexi/main/printing/kexisimpleprintpreviewwindow_p.h
@@ -22,21 +22,22 @@
#include <kexisimpleprintpreviewwindow.h>
-class KexiSimplePrintPreviewView : public QWidget
+class KexiSimplePrintPreviewView : public TQWidget
{
public:
- KexiSimplePrintPreviewView(QWidget *parent, KexiSimplePrintPreviewWindow *window);
+ KexiSimplePrintPreviewView(TQWidget *tqparent, KexiSimplePrintPreviewWindow *window);
- virtual void paintEvent( QPaintEvent *pe );
+ virtual void paintEvent( TQPaintEvent *pe );
bool enablePainting;
protected:
KexiSimplePrintPreviewWindow *m_window;
};
-class KexiSimplePrintPreviewScrollView : public QScrollView
+class KexiSimplePrintPreviewScrollView : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiSimplePrintPreviewScrollView(KexiSimplePrintPreviewWindow *window);
@@ -48,7 +49,7 @@ class KexiSimplePrintPreviewScrollView : public QScrollView
void setContentsPos(int x, int y);
protected:
- virtual void resizeEvent( QResizeEvent *re );
+ virtual void resizeEvent( TQResizeEvent *re );
KexiSimplePrintPreviewWindow *m_window;
};
diff --git a/kexi/main/startup/KexiConnSelector.cpp b/kexi/main/startup/KexiConnSelector.cpp
index 454f1e085..a6c4d1609 100644
--- a/kexi/main/startup/KexiConnSelector.cpp
+++ b/kexi/main/startup/KexiConnSelector.cpp
@@ -40,19 +40,19 @@
#include <ktoolbarbutton.h>
#include <kactionclasses.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qtextedit.h>
-#include <qgroupbox.h>
-#include <qwidgetstack.h>
-#include <qbuttongroup.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqtextedit.h>
+#include <tqgroupbox.h>
+#include <tqwidgetstack.h>
+#include <tqbuttongroup.h>
ConnectionDataLVItem::ConnectionDataLVItem(KexiDB::ConnectionData *data,
- const KexiDB::Driver::Info& info, QListView *list)
- : QListViewItem(list)
+ const KexiDB::Driver::Info& info, TQListView *list)
+ : TQListViewItem(list)
, m_data(data)
{
update(info);
@@ -65,13 +65,13 @@ ConnectionDataLVItem::~ConnectionDataLVItem()
void ConnectionDataLVItem::update(const KexiDB::Driver::Info& info)
{
setText(0, m_data->caption+" ");
- const QString &sfile = i18n("File");
- QString drvname = info.caption.isEmpty() ? m_data->driverName : info.caption;
+ const TQString &sfile = i18n("File");
+ TQString drvname = info.caption.isEmpty() ? m_data->driverName : info.caption;
if (info.fileBased)
setText(1, sfile + " ("+drvname+") " );
else
setText(1, drvname+" " );
- setText(2, (info.fileBased ? (QString("<")+sfile.lower()+">") : m_data->serverInfoString(true))+" " );
+ setText(2, (info.fileBased ? (TQString("<")+sfile.lower()+">") : m_data->serverInfoString(true))+" " );
}
/*================================================================*/
@@ -87,11 +87,11 @@ public:
{
}
- QWidget* openExistingWidget;
+ TQWidget* openExistingWidget;
KexiPrjTypeSelector* prjTypeSelector;
- QString startDirOrVariable;
- QWidgetStack *stack;
- QGuardedPtr<KexiDBConnectionSet> conn_set;
+ TQString startDirOrVariable;
+ TQWidgetStack *stack;
+ TQGuardedPtr<KexiDBConnectionSet> conn_set;
KexiDB::DriverManager manager;
bool conn_sel_shown;//! helper
bool file_sel_shown;
@@ -101,34 +101,34 @@ public:
/*================================================================*/
KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
- const QString& startDirOrVariable, QWidget* parent, const char* name )
- : QWidget( parent, name )
+ const TQString& startDirOrVariable, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
,d(new KexiConnSelectorWidgetPrivate())
{
d->conn_set = &conn_set;
d->startDirOrVariable = startDirOrVariable;
- QString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
- const QPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
+ TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
+ const TQPixmap &icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( icon );
- QVBoxLayout* globalLyr = new QVBoxLayout( this );
+ TQVBoxLayout* globalLyr = new TQVBoxLayout( this );
//create header with radio buttons
- d->openExistingWidget = new QWidget(this, "openExistingWidget");
- QVBoxLayout* openExistingWidgetLyr = new QVBoxLayout( d->openExistingWidget );
-// QLabel* lbl = new QLabel(i18n("<b>Select existing Kexi project to open:</b>"), openExistingWidget);
+ d->openExistingWidget = new TQWidget(this, "openExistingWidget");
+ TQVBoxLayout* openExistingWidgetLyr = new TQVBoxLayout( d->openExistingWidget );
+// TQLabel* lbl = new TQLabel(i18n("<b>Select existing Kexi project to open:</b>"), openExistingWidget);
// openExistingWidgetLyr->addWidget( lbl );
d->prjTypeSelector = new KexiPrjTypeSelector( d->openExistingWidget );
- connect(d->prjTypeSelector->buttonGroup,SIGNAL(clicked(int)),this,SLOT(slotPrjTypeSelected(int)));
+ connect(d->prjTypeSelector->buttonGroup,TQT_SIGNAL(clicked(int)),this,TQT_SLOT(slotPrjTypeSelected(int)));
openExistingWidgetLyr->addWidget( d->prjTypeSelector );
openExistingWidgetLyr->addSpacing( KDialogBase::spacingHint() );
- QFrame* line = new QFrame( d->openExistingWidget, "line" );
- line->setFrameShape( QFrame::HLine );
- line->setFrameShadow( QFrame::Sunken );
+ TQFrame* line = new TQFrame( d->openExistingWidget, "line" );
+ line->setFrameShape( TQFrame::HLine );
+ line->setFrameShadow( TQFrame::Sunken );
openExistingWidgetLyr->addWidget( line );
globalLyr->addWidget(d->openExistingWidget);
- d->stack = new QWidgetStack(this, "stack");
+ d->stack = new TQWidgetStack(this, "stack");
globalLyr->addWidget(d->stack);
// m_file = new KexiOpenExistingFile( this, "KexiOpenExistingFile");
@@ -136,28 +136,28 @@ KexiConnSelectorWidget::KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
m_fileDlg = 0;
// addWidget(m_file);
-// connect(m_file->btn_advanced,SIGNAL(clicked()),this,SLOT(showAdvancedConn()));
+// connect(m_file->btn_advanced,TQT_SIGNAL(clicked()),this,TQT_SLOT(showAdvancedConn()));
m_remote = new KexiConnSelectorBase(d->stack, "conn_sel");
m_remote->icon->setPixmap( DesktopIcon("network") );
m_remote->icon->setFixedSize( m_remote->icon->pixmap()->size() );
// m_remote->btn_back->setIconSet( SmallIconSet("1uparrow") );
- connect(m_remote->btn_add, SIGNAL(clicked()), this, SLOT(slotRemoteAddBtnClicked()));
- connect(m_remote->btn_edit, SIGNAL(clicked()), this, SLOT(slotRemoteEditBtnClicked()));
- connect(m_remote->btn_remove, SIGNAL(clicked()), this, SLOT(slotRemoteRemoveBtnClicked()));
- QToolTip::add(m_remote->btn_add, i18n("Add a new database connection"));
- QToolTip::add(m_remote->btn_edit, i18n("Edit selected database connection"));
- QToolTip::add(m_remote->btn_remove, i18n("Remove selected database connections"));
+ connect(m_remote->btn_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteAddBtnClicked()));
+ connect(m_remote->btn_edit, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteEditBtnClicked()));
+ connect(m_remote->btn_remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoteRemoveBtnClicked()));
+ TQToolTip::add(m_remote->btn_add, i18n("Add a new database connection"));
+ TQToolTip::add(m_remote->btn_edit, i18n("Edit selected database connection"));
+ TQToolTip::add(m_remote->btn_remove, i18n("Remove selected database connections"));
d->stack->addWidget(m_remote);
- if (m_remote->layout())
- m_remote->layout()->setMargin(0);
-// connect(m_remote->btn_back,SIGNAL(clicked()),this,SLOT(showSimpleConn()));
- connect(m_remote->list,SIGNAL(doubleClicked(QListViewItem*)),
- this,SLOT(slotConnectionItemExecuted(QListViewItem*)));
- connect(m_remote->list,SIGNAL(returnPressed(QListViewItem*)),
- this,SLOT(slotConnectionItemExecuted(QListViewItem*)));
- connect(m_remote->list,SIGNAL(selectionChanged()),
- this,SLOT(slotConnectionSelectionChanged()));
+ if (m_remote->tqlayout())
+ m_remote->tqlayout()->setMargin(0);
+// connect(m_remote->btn_back,TQT_SIGNAL(clicked()),this,TQT_SLOT(showSimpleConn()));
+ connect(m_remote->list,TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this,TQT_SLOT(slotConnectionItemExecuted(TQListViewItem*)));
+ connect(m_remote->list,TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this,TQT_SLOT(slotConnectionItemExecuted(TQListViewItem*)));
+ connect(m_remote->list,TQT_SIGNAL(selectionChanged()),
+ this,TQT_SLOT(slotConnectionSelectionChanged()));
}
KexiConnSelectorWidget::~KexiConnSelectorWidget()
@@ -167,7 +167,7 @@ KexiConnSelectorWidget::~KexiConnSelectorWidget()
/*void KexiConnSelectorWidget::disconnectShowSimpleConnButton()
{
- m_remote->btn_back->disconnect(this,SLOT(showSimpleConn()));
+ m_remote->btn_back->disconnect(this,TQT_SLOT(showSimpleConn()));
}*/
void KexiConnSelectorWidget::showAdvancedConn()
@@ -197,8 +197,8 @@ void KexiConnSelectorWidget::slotPrjTypeSelected(int id)
if (m_remote->list->firstChild()) {
m_remote->list->setSelected(m_remote->list->firstChild(),true);
}
- m_remote->descriptionEdit->setPaletteBackgroundColor(palette().active().background());
- m_remote->descGroupBox->layout()->setMargin(2);
+ m_remote->descriptionEdit->setPaletteBackgroundColor(tqpalette().active().background());
+ m_remote->descGroupBox->tqlayout()->setMargin(2);
m_remote->list->setFocus();
slotConnectionSelectionChanged();
}
@@ -222,15 +222,15 @@ void KexiConnSelectorWidget::showSimpleConn()
m_fileDlg = new KexiStartupFileDialog( d->startDirOrVariable, KexiStartupFileDialog::Opening,
d->stack, "openExistingFileDlg");
m_fileDlg->setConfirmOverwrites( d->confirmOverwrites );
-// static_cast<QVBoxLayout*>(m_file->layout())->insertWidget( 2, m_fileDlg );
+// static_cast<TQVBoxLayout*>(m_file->tqlayout())->insertWidget( 2, m_fileDlg );
d->stack->addWidget(m_fileDlg);
- for (QWidget *w = parentWidget(true);w;w=w->parentWidget(true)) {
+ for (TQWidget *w = tqparentWidget(true);w;w=w->tqparentWidget(true)) {
if (w->isDialog()) {
-//#ifndef Q_WS_WIN
- connect(m_fileDlg,SIGNAL(rejected()),static_cast<QDialog*>(w),SLOT(reject()));
+//#ifndef TQ_WS_WIN
+ connect(m_fileDlg,TQT_SIGNAL(rejected()),static_cast<TQDialog*>(w),TQT_SLOT(reject()));
//#endif
-// connect(m_fileDlg,SIGNAL(cancelled()),static_cast<QDialog*>(w),SLOT(reject()));
+// connect(m_fileDlg,TQT_SIGNAL(cancelled()),static_cast<TQDialog*>(w),TQT_SLOT(reject()));
break;
}
}
@@ -248,7 +248,7 @@ int KexiConnSelectorWidget::selectedConnectionType() const
if (selectedConnectionType()!=KexiConnSelectorWidget::ServerBased)
return 0;
ConnectionDataLVItem *item = 0; // = static_cast<ConnectionDataLVItem*>(m_remote->list->selectedItem());
- for (QListViewItemIterator it(m_remote->list); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_remote->list); it.current(); ++it) {
if (it.current()->isSelected()) {
if (item)
return 0; //multiple
@@ -266,21 +266,21 @@ KexiDB::ConnectionData* KexiConnSelectorWidget::selectedConnectionData() const
return item->data();
}
-QString KexiConnSelectorWidget::selectedFileName()
+TQString KexiConnSelectorWidget::selectedFileName()
{
if (selectedConnectionType()!=KexiConnSelectorWidget::FileBased)
- return QString::null;
+ return TQString();
return m_fileDlg->currentFileName();
}
-void KexiConnSelectorWidget::setSelectedFileName(const QString& fileName)
+void KexiConnSelectorWidget::setSelectedFileName(const TQString& fileName)
{
if (selectedConnectionType()!=KexiConnSelectorWidget::FileBased)
return;
return m_fileDlg->setSelection(fileName);
}
-void KexiConnSelectorWidget::slotConnectionItemExecuted(QListViewItem *item)
+void KexiConnSelectorWidget::slotConnectionItemExecuted(TQListViewItem *item)
{
emit connectionItemExecuted(static_cast<ConnectionDataLVItem*>(item));
}
@@ -291,7 +291,7 @@ void KexiConnSelectorWidget::slotConnectionSelectionChanged()
//update buttons availability
/* ConnectionDataLVItem *singleItem = 0;
bool multi = false;
- for (QListViewItemIterator it(m_remote->list); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_remote->list); it.current(); ++it) {
if (it.current()->isSelected()) {
if (singleItem) {
singleItem = 0;
@@ -304,18 +304,18 @@ void KexiConnSelectorWidget::slotConnectionSelectionChanged()
}*/
m_remote->btn_edit->setEnabled(item);
m_remote->btn_remove->setEnabled(item);
- m_remote->descriptionEdit->setText(item ? item->data()->description : QString::null);
+ m_remote->descriptionEdit->setText(item ? item->data()->description : TQString());
emit connectionItemHighlighted(item);
}
-QListView* KexiConnSelectorWidget::connectionsList() const
+TQListView* KexiConnSelectorWidget::connectionsList() const
{
return m_remote->list;
}
void KexiConnSelectorWidget::setFocus()
{
- QWidget::setFocus();
+ TQWidget::setFocus();
if (d->stack->visibleWidget()==m_fileDlg)
m_fileDlg->setFocus(); //m_fileDlg->locationWidget()->setFocus();
else
@@ -348,20 +348,20 @@ bool KexiConnSelectorWidget::confirmOverwrites() const
return d->confirmOverwrites;
}
-/*static QString msgUnfinished() {
+/*static TQString msgUnfinished() {
return i18n("To define or change a connection, use command line options or click on .kexis file. "
- "You can find example .kexis file at <a href=\"%1\">here</a>.").arg("") //temporary, please do not change for 0.8!
+ "You can find example .kexis file at <a href=\"%1\">here</a>.").tqarg("") //temporary, please do not change for 0.8!
+ "\nhttp://www.kexi-project.org/resources/testdb.kexis"; */
-// .arg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis");
+// .tqarg("http://websvn.kde.org/*checkout*/branches/kexi/0.9/koffice/kexi/tests/startup/testdb.kexis");
//}
void KexiConnSelectorWidget::slotRemoteAddBtnClicked()
{
KexiDB::ConnectionData data;
- KexiDBConnectionDialog dlg(data, QString::null,
+ KexiDBConnectionDialog dlg(data, TQString(),
KGuiItem(i18n("&Add"), "button_ok", i18n("Add database connection")) );
dlg.setCaption(i18n("Add New Database Connection"));
- if (QDialog::Accepted!=dlg.exec())
+ if (TQDialog::Accepted!=dlg.exec())
return;
//store this conn. data
@@ -383,10 +383,10 @@ void KexiConnSelectorWidget::slotRemoteEditBtnClicked()
ConnectionDataLVItem* item = static_cast<ConnectionDataLVItem*>(m_remote->list->selectedItem());
if (!item)
return;
- KexiDBConnectionDialog dlg(*item->data(), QString::null,
+ KexiDBConnectionDialog dlg(*item->data(), TQString(),
KGuiItem(i18n("&Save"), "filesave", i18n("Save changes made to this database connection")) );
dlg.setCaption(i18n("Edit Database Connection"));
- if (QDialog::Accepted!=dlg.exec())
+ if (TQDialog::Accepted!=dlg.exec())
return;
KexiDB::ConnectionData *newData = new KexiDB::ConnectionData( *dlg.currentProjectData().connectionData() );
@@ -407,11 +407,11 @@ void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked()
return;
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel(0,
i18n("Do you want to remove database connection \"%1\" from the list of available connections?")
- .arg(item->data()->serverInfoString(true)), QString::null, KStdGuiItem::del(), QString::null,
+ .tqarg(item->data()->serverInfoString(true)), TQString(), KStdGuiItem::del(), TQString(),
KMessageBox::Notify|KMessageBox::Dangerous))
return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem)
nextItem = item->itemAbove();
if (!d->conn_set->removeConnectionData(item->data()))
@@ -426,7 +426,7 @@ void KexiConnSelectorWidget::slotRemoteRemoveBtnClicked()
void KexiConnSelectorWidget::hideConnectonIcon()
{
m_remote->icon->setFixedWidth(0);
- m_remote->icon->setPixmap(QPixmap());
+ m_remote->icon->setPixmap(TQPixmap());
}
#include "KexiConnSelector.moc"
diff --git a/kexi/main/startup/KexiConnSelector.h b/kexi/main/startup/KexiConnSelector.h
index a52dd8ae3..2f4a9fe96 100644
--- a/kexi/main/startup/KexiConnSelector.h
+++ b/kexi/main/startup/KexiConnSelector.h
@@ -27,16 +27,16 @@
#include <kdialogbase.h>
#include <klistview.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class KexiConnSelectorBase;
//! helper class
-class ConnectionDataLVItem : public QListViewItem
+class ConnectionDataLVItem : public TQListViewItem
{
public:
ConnectionDataLVItem(KexiDB::ConnectionData *data,
- const KexiDB::Driver::Info& info, QListView *list);
+ const KexiDB::Driver::Info& info, TQListView *list);
~ConnectionDataLVItem();
void update(const KexiDB::Driver::Info& info);
@@ -52,9 +52,10 @@ class KexiConnSelectorWidgetPrivate;
/*! Widget that allows to select a database connection (without choosing database itself)
*/
-class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
+class KEXIMAIN_EXPORT KexiConnSelectorWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ConnType { FileBased=1, ServerBased=2 };
@@ -65,8 +66,8 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
(it can also contain a configuration variable name with ":" prefix as described
in KRecentDirs documentation). */
KexiConnSelectorWidget( KexiDBConnectionSet& conn_set,
- const QString& startDirOrVariable,
- QWidget* parent = 0, const char* name = 0 );
+ const TQString& startDirOrVariable,
+ TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KexiConnSelectorWidget();
@@ -86,16 +87,16 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
has been selected.
@see selectedConnectionType()
*/
- QString selectedFileName();
+ TQString selectedFileName();
/*! Sets selected filename to \a fileName.
Only works when selectedConnectionType()==FileBased. */
- void setSelectedFileName(const QString& fileName);
+ void setSelectedFileName(const TQString& fileName);
// //! Usable when we want to do other things for "back" button
// void disconnectShowSimpleConnButton();
- QListView* connectionsList() const;
+ TQListView* connectionsList() const;
KexiConnSelectorBase *m_remote;
// KexiOpenExistingFile *m_file;
@@ -125,7 +126,7 @@ class KEXIMAIN_EXPORT KexiConnSelectorWidget : public QWidget
void hideConnectonIcon();
protected slots:
- void slotConnectionItemExecuted(QListViewItem *item);
+ void slotConnectionItemExecuted(TQListViewItem *item);
void slotRemoteAddBtnClicked();
void slotRemoteEditBtnClicked();
void slotRemoteRemoveBtnClicked();
diff --git a/kexi/main/startup/KexiConnSelectorBase.ui b/kexi/main/startup/KexiConnSelectorBase.ui
index dde800f37..908404c06 100644
--- a/kexi/main/startup/KexiConnSelectorBase.ui
+++ b/kexi/main/startup/KexiConnSelectorBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiConnSelectorBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiConnSelectorBase</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QListView" row="1" column="0" rowspan="1" colspan="6">
+ <widget class="TQListView" row="1" column="0" rowspan="1" colspan="6">
<column>
<property name="text">
<string>Name</string>
@@ -72,7 +72,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>60</height>
@@ -91,7 +91,7 @@
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QPushButton" row="2" column="4">
+ <widget class="TQPushButton" row="2" column="4">
<property name="name">
<cstring>btn_edit</cstring>
</property>
@@ -107,7 +107,7 @@
<string>&amp;Edit...</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="3">
+ <widget class="TQPushButton" row="2" column="3">
<property name="name">
<cstring>btn_add</cstring>
</property>
@@ -123,7 +123,7 @@
<string>&amp;Add...</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="5">
+ <widget class="TQPushButton" row="2" column="5">
<property name="name">
<cstring>btn_remove</cstring>
</property>
@@ -149,7 +149,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -166,18 +166,18 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>41</height>
</size>
</property>
</spacer>
- <widget class="QGroupBox" row="2" column="0" rowspan="2" colspan="2">
+ <widget class="TQGroupBox" row="2" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>descGroupBox</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>80</height>
@@ -193,7 +193,7 @@
<property name="margin">
<number>2</number>
</property>
- <widget class="QTextEdit">
+ <widget class="TQTextEdit">
<property name="name">
<cstring>descriptionEdit</cstring>
</property>
@@ -205,7 +205,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>50</height>
@@ -229,7 +229,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLabel" row="0" column="1" rowspan="1" colspan="5">
+ <widget class="TQLabel" row="0" column="1" rowspan="1" colspan="5">
<property name="name">
<cstring>label</cstring>
</property>
@@ -246,14 +246,14 @@
&lt;p&gt;You will see existing Kexi projects available for the selected connection. Here you may also add, edit or remove connections from the list.
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
<property name="buddy" stdset="0">
<cstring>list</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>icon</cstring>
</property>
@@ -268,7 +268,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
@@ -281,5 +281,5 @@
<tabstop>btn_remove</tabstop>
<tabstop>descriptionEdit</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiDBTitlePage.cpp b/kexi/main/startup/KexiDBTitlePage.cpp
index 3b0487938..4d686039b 100644
--- a/kexi/main/startup/KexiDBTitlePage.cpp
+++ b/kexi/main/startup/KexiDBTitlePage.cpp
@@ -19,10 +19,10 @@
#include "KexiDBTitlePage.h"
-#include <qlabel.h>
+#include <tqlabel.h>
-KexiDBTitlePage::KexiDBTitlePage( const QString& labelText, QWidget* parent, const char* name )
- : KexiDBTitlePageBase( parent, name )
+KexiDBTitlePage::KexiDBTitlePage( const TQString& labelText, TQWidget* tqparent, const char* name )
+ : KexiDBTitlePageBase( tqparent, name )
{
if (!labelText.isEmpty())
label->setText(labelText);
diff --git a/kexi/main/startup/KexiDBTitlePage.h b/kexi/main/startup/KexiDBTitlePage.h
index 983419462..15030c7bc 100644
--- a/kexi/main/startup/KexiDBTitlePage.h
+++ b/kexi/main/startup/KexiDBTitlePage.h
@@ -22,15 +22,16 @@
#include "KexiDBTitlePageBase.h"
-//! @short A helper widget used to displaying a line edit with a label and layout
+//! @short A helper widget used to displaying a line edit with a label and tqlayout
class KEXIMAIN_EXPORT KexiDBTitlePage : public KexiDBTitlePageBase
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Constructs title page. \a labelText can be provided to change default
//! "Project caption:" label.
- KexiDBTitlePage( const QString& labelText, QWidget* parent = 0, const char* name = 0 );
+ KexiDBTitlePage( const TQString& labelText, TQWidget* tqparent = 0, const char* name = 0 );
~KexiDBTitlePage();
protected slots:
diff --git a/kexi/main/startup/KexiDBTitlePageBase.ui b/kexi/main/startup/KexiDBTitlePageBase.ui
index 991bc73f4..1770a6dd5 100644
--- a/kexi/main/startup/KexiDBTitlePageBase.ui
+++ b/kexi/main/startup/KexiDBTitlePageBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiDBTitlePageBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiDBTitlePageBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>label</cstring>
</property>
@@ -40,7 +40,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>111</height>
@@ -57,7 +57,7 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -76,7 +76,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -87,7 +87,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/kexi/main/startup/KexiNewPrjTypeSelector.ui b/kexi/main/startup/KexiNewPrjTypeSelector.ui
index 30adfb063..162263079 100644
--- a/kexi/main/startup/KexiNewPrjTypeSelector.ui
+++ b/kexi/main/startup/KexiNewPrjTypeSelector.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiNewPrjTypeSelector</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiNewPrjTypeSelector</cstring>
</property>
@@ -29,7 +29,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -58,7 +58,7 @@
<enum>LastColumn</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lbl</cstring>
</property>
@@ -74,7 +74,7 @@
<string>Kexi will create a new database project. Select a storage method which will be used to store the new project.
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -87,7 +87,7 @@
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kexi/main/startup/KexiNewProjectWizard.cpp b/kexi/main/startup/KexiNewProjectWizard.cpp
index 15102864e..9e897e8fb 100644
--- a/kexi/main/startup/KexiNewProjectWizard.cpp
+++ b/kexi/main/startup/KexiNewProjectWizard.cpp
@@ -43,12 +43,12 @@
#include <kmessagebox.h>
#include <klineedit.h>
-#include <qobjectlist.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qheader.h>
+#include <tqobjectlist.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqheader.h>
//! @internal
class KexiNewProjectWizardPrivate
@@ -69,12 +69,12 @@ class KexiNewProjectWizardPrivate
}
// KListView *lv_types;
KListViewItem *lvi_file, *lvi_server;
- QString chk_file_txt, chk_server_txt; //!< helper
+ TQString chk_file_txt, chk_server_txt; //!< helper
- QString server_db_name_dblist_lbl_txt; //!< helper
+ TQString server_db_name_dblist_lbl_txt; //!< helper
//for displaying db list of the selected conn.
- QGuardedPtr<KexiDB::ConnectionData> conndata_to_show;
+ TQGuardedPtr<KexiDB::ConnectionData> conndata_to_show;
KexiProjectSet *project_set_to_show;
KexiGUIMessageHandler* msgHandler;
@@ -84,8 +84,8 @@ class KexiNewProjectWizardPrivate
};
KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
- QWidget *parent, const char *name, bool modal, WFlags f)
-: KWizard(parent, name, modal, f)
+ TQWidget *tqparent, const char *name, bool modal, WFlags f)
+: KWizard(tqparent, name, modal, f)
, d(new KexiNewProjectWizardPrivate() )
{
d->msgHandler = new KexiGUIMessageHandler(this);
@@ -96,15 +96,15 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
//page: type selector
m_prjtype_sel = new KexiNewPrjTypeSelector(this, "KexiNewPrjTypeSelector");
// lv_types = new KListView(m_prjtype_sel, "types listview");
-// m_prjtype_sel->lv_types->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum, 0, 2));
+// m_prjtype_sel->lv_types->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum, 0, 2));
#if KDE_IS_VERSION(3,3,9)
m_prjtype_sel->lv_types->setShadeSortColumn(false);
#endif
m_prjtype_sel->lv_types->header()->hide();
m_prjtype_sel->lv_types->setSorting(-1);
- m_prjtype_sel->lv_types->setAlternateBackground(QColor()); //disable altering
+ m_prjtype_sel->lv_types->setAlternateBackground(TQColor()); //disable altering
m_prjtype_sel->lv_types->setItemMargin( KDialogBase::marginHint() );
- QString none;
+ TQString none;
d->lvi_file = new KListViewItem( m_prjtype_sel->lv_types, i18n("New Project Stored in File") );
d->lvi_file->setPixmap(0,
KGlobal::iconLoader()->loadIcon( KMimeType::mimeType(
@@ -118,31 +118,31 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
d->lvi_server->setMultiLinesEnabled( true );
// m_prjtype_sel->lv_types->resize(d->m_prjtype_sel->lv_types->width(), d->lvi_file->height()*3);
m_prjtype_sel->lv_types->setFocus();
-// QString txt_dns = i18n("Don't show me this question again.");
+// TQString txt_dns = i18n("Don't show me this question again.");
// d->chk_file_txt = m_prjtype_sel->chk_always->text() +"\n"+txt_dns;
// d->chk_server_txt = i18n("Always &use database server for creating new projects.")
// +"\n"+txt_dns;
- connect(m_prjtype_sel->lv_types,SIGNAL(executed(QListViewItem*)),this,SLOT(slotLvTypesExecuted(QListViewItem*)));
- connect(m_prjtype_sel->lv_types,SIGNAL(returnPressed(QListViewItem*)),this,SLOT(slotLvTypesExecuted(QListViewItem*)));
- connect(m_prjtype_sel->lv_types,SIGNAL(selectionChanged( QListViewItem*)),this,SLOT(slotLvTypesSelected(QListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(executed(TQListViewItem*)),this,TQT_SLOT(slotLvTypesExecuted(TQListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(returnPressed(TQListViewItem*)),this,TQT_SLOT(slotLvTypesExecuted(TQListViewItem*)));
+ connect(m_prjtype_sel->lv_types,TQT_SIGNAL(selectionChanged( TQListViewItem*)),this,TQT_SLOT(slotLvTypesSelected(TQListViewItem*)));
-// static_cast<QVBoxLayout*>(m_prjtype_sel->layout())->insertWidget(1,d->m_prjtype_sel->lv_types);
-// static_cast<QVBoxLayout*>(m_prjtype_sel->layout())->insertStretch(3,1);
+// static_cast<TQVBoxLayout*>(m_prjtype_sel->tqlayout())->insertWidget(1,d->m_prjtype_sel->lv_types);
+// static_cast<TQVBoxLayout*>(m_prjtype_sel->tqlayout())->insertStretch(3,1);
// updateGeometry();
addPage(m_prjtype_sel, i18n("Select Storage Method"));
-// d->m_prjtype_sel->lv_types->setMinimumHeight(QMAX(d->lvi_file->height(),d->lvi_server->height())+25);
+// d->m_prjtype_sel->lv_types->setMinimumHeight(TQMAX(d->lvi_file->height(),d->lvi_server->height())+25);
//page: db title
- m_db_title = new KexiDBTitlePage(QString::null, this, "KexiDBTitlePage");
+ m_db_title = new KexiDBTitlePage(TQString(), this, "KexiDBTitlePage");
addPage(m_db_title, i18n("Select Project's Caption"));
//page: connection selector
- m_conn_sel_widget = new QWidget(this);
- QVBoxLayout* conn_sel_lyr = new QVBoxLayout(m_conn_sel_widget);
- QLabel *conn_sel_label = new QLabel(i18n("Enter a new Kexi project's file name:"), m_conn_sel_widget);
- conn_sel_label->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ m_conn_sel_widget = new TQWidget(this);
+ TQVBoxLayout* conn_sel_lyr = new TQVBoxLayout(m_conn_sel_widget);
+ TQLabel *conn_sel_label = new TQLabel(i18n("Enter a new Kexi project's file name:"), m_conn_sel_widget);
+ conn_sel_label->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
conn_sel_lyr->addWidget( conn_sel_label );
conn_sel_lyr->addSpacing(KDialogBase::spacingHint());
@@ -167,32 +167,32 @@ KexiNewProjectWizard::KexiNewProjectWizard(KexiDBConnectionSet& conn_set,
m_conn_sel->m_fileDlg->setMode( KexiStartupFileDialog::SavingFileBasedDB );
// m_conn_sel->m_fileDlg->setMode( KFile::LocalOnly | KFile::File );
// m_conn_sel->m_fileDlg->setOperationMode( KFileDialog::Saving );
-////js connect(m_conn_sel->m_fileDlg,SIGNAL(rejected()),this,SLOT(reject()));
-// connect(m_conn_sel->m_fileDlg,SIGNAL(fileHighlighted(const QString&)),this,SLOT(slotFileHighlighted(const QString&)));
- connect(m_conn_sel->m_fileDlg,SIGNAL(accepted()),this,SLOT(accept()));
+////js connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(rejected()),this,TQT_SLOT(reject()));
+// connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(fileHighlighted(const TQString&)),this,TQT_SLOT(slotFileHighlighted(const TQString&)));
+ connect(m_conn_sel->m_fileDlg,TQT_SIGNAL(accepted()),this,TQT_SLOT(accept()));
m_conn_sel->showAdvancedConn();
- connect(m_conn_sel,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
- this,SLOT(next()));
+ connect(m_conn_sel,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(next()));
addPage(m_conn_sel_widget, i18n("Select Project's Location"));
//page: server db name
m_server_db_name = new KexiServerDBNamePage(this, "KexiServerDBNamePage");
d->server_db_name_dblist_lbl_txt = i18n("Existing project databases on <b>%1</b> database server:");
- connect(m_server_db_name->le_caption, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotServerDBCaptionTxtChanged(const QString&)));
- connect(m_server_db_name->le_dbname, SIGNAL(textChanged(const QString&)),
- this,SLOT(slotServerDBNameTxtChanged(const QString&)));
- connect(m_server_db_name->le_caption, SIGNAL(returnPressed()),
- this,SLOT(accept()));
- connect(m_server_db_name->le_dbname, SIGNAL(returnPressed()),
- this,SLOT(accept()));
+ connect(m_server_db_name->le_caption, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotServerDBCaptionTxtChanged(const TQString&)));
+ connect(m_server_db_name->le_dbname, TQT_SIGNAL(textChanged(const TQString&)),
+ this,TQT_SLOT(slotServerDBNameTxtChanged(const TQString&)));
+ connect(m_server_db_name->le_caption, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(accept()));
+ connect(m_server_db_name->le_dbname, TQT_SIGNAL(returnPressed()),
+ this,TQT_SLOT(accept()));
m_server_db_name->le_caption->setText(i18n("New database"));
- m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(this, "id_val"));
+ m_server_db_name->le_dbname->setValidator(new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this), "id_val"));
m_project_selector = new KexiProjectSelectorWidget(
m_server_db_name->frm_dblist, "KexiProjectSelectorWidget", 0, false, false );
GLUE_WIDGET(m_project_selector, m_server_db_name->frm_dblist);
- m_project_selector->setFocusPolicy(NoFocus);
+ m_project_selector->setFocusPolicy(TQ_NoFocus);
m_project_selector->setSelectable(false);
addPage(m_server_db_name, i18n("Select Project's Caption & Database Name"));
@@ -217,12 +217,12 @@ void KexiNewProjectWizard::show()
KWizard::show();
}
-void KexiNewProjectWizard::slotLvTypesExecuted(QListViewItem *)
+void KexiNewProjectWizard::slotLvTypesExecuted(TQListViewItem *)
{
next();
}
-void KexiNewProjectWizard::slotLvTypesSelected(QListViewItem *item)
+void KexiNewProjectWizard::slotLvTypesSelected(TQListViewItem *item)
{
/* if (item==d->lvi_file) {
m_prjtype_sel->chk_always->setText(d->chk_file_txt);
@@ -234,7 +234,7 @@ void KexiNewProjectWizard::slotLvTypesSelected(QListViewItem *item)
setAppropriate( m_server_db_name, item==d->lvi_server );
}
-void KexiNewProjectWizard::showPage(QWidget *page)
+void KexiNewProjectWizard::showPage(TQWidget *page)
{
if (page==m_prjtype_sel) {//p 1
m_prjtype_sel->lv_types->setFocus();
@@ -247,7 +247,7 @@ void KexiNewProjectWizard::showPage(QWidget *page)
} else if (page==m_conn_sel_widget) {//p 3
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) {
m_conn_sel->showSimpleConn();
- QString fn = KexiUtils::string2FileName( m_db_title->le_caption->text() );
+ TQString fn = KexiUtils::string2FileName( m_db_title->le_caption->text() );
if (!fn.endsWith(".kexi"))
fn += ".kexi";
m_conn_sel->m_fileDlg->setLocationText(fn);
@@ -301,7 +301,7 @@ void KexiNewProjectWizard::next()
return;
}
m_project_selector->label->setText(
- d->server_db_name_dblist_lbl_txt.arg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) );
+ d->server_db_name_dblist_lbl_txt.tqarg(m_conn_sel->selectedConnectionData()->serverInfoString(false)) );
m_server_db_name->le_caption->setFocus();
}
@@ -313,9 +313,9 @@ void KexiNewProjectWizard::accept()
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_file) {//FILE:
//check if new db file name is ok
- kdDebug() << "********** sender() " << sender()->className() << endl;
+ kdDebug() << "********** TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())) " << TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->className() << endl;
if (sender()==finishButton()) { /*(only if signal does not come from filedialog)*/
- kdDebug() << "********** sender()==finishButton() ********" << endl;
+ kdDebug() << "********** TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))==finishButton() ********" << endl;
// if (!m_conn_sel->m_fileDlg->checkURL()) {
if (!m_conn_sel->m_fileDlg->checkFileName()) {
return;
@@ -329,7 +329,7 @@ void KexiNewProjectWizard::accept()
m_server_db_name->le_caption->setFocus();
return;
}
- QString dbname = m_server_db_name->le_dbname->text().stripWhiteSpace();
+ TQString dbname = m_server_db_name->le_dbname->text().stripWhiteSpace();
if (dbname.isEmpty()) {
KMessageBox::information(this, i18n("Enter project's database name."));
m_server_db_name->le_dbname->setText("");
@@ -342,8 +342,8 @@ void KexiNewProjectWizard::accept()
if (KMessageBox::Continue!=KMessageBox::warningContinueCancel( this, "<qt>"
+i18n("<b>A project with database name \"%1\" already exists</b>"
"<p>Do you want to delete it and create a new one?")
- .arg( m_server_db_name->le_dbname->text() ), QString::null, KStdGuiItem::del(),
- QString::null, KMessageBox::Notify|KMessageBox::Dangerous ))
+ .tqarg( m_server_db_name->le_dbname->text() ), TQString(), KStdGuiItem::del(),
+ TQString(), KMessageBox::Notify|KMessageBox::Dangerous ))
{
m_server_db_name->le_dbname->setFocus();
return;
@@ -369,14 +369,14 @@ void KexiNewProjectWizard::done(int r)
KWizard::done(r);
}
-QString KexiNewProjectWizard::projectDBName() const
+TQString KexiNewProjectWizard::projectDBName() const
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_server)
return m_server_db_name->le_dbname->text();
return m_conn_sel->selectedFileName();
}
-QString KexiNewProjectWizard::projectCaption() const
+TQString KexiNewProjectWizard::projectCaption() const
{
if (m_prjtype_sel->lv_types->currentItem()==d->lvi_server) {
return m_server_db_name->le_caption->text();
@@ -391,19 +391,19 @@ KexiDB::ConnectionData* KexiNewProjectWizard::projectConnectionData() const
return m_conn_sel->selectedConnectionData();
}
-void KexiNewProjectWizard::slotServerDBCaptionTxtChanged(const QString &capt)
+void KexiNewProjectWizard::slotServerDBCaptionTxtChanged(const TQString &capt)
{
if (m_server_db_name->le_dbname->text().isEmpty())
d->le_dbname_autofill=true;
if (d->le_dbname_autofill) {
d->le_dbname_txtchanged_disable = true;
- QString captionAsId = KexiUtils::string2Identifier(capt);
+ TQString captionAsId = KexiUtils::string2Identifier(capt);
m_server_db_name->le_dbname->setText(captionAsId);
d->le_dbname_txtchanged_disable = false;
}
}
-void KexiNewProjectWizard::slotServerDBNameTxtChanged(const QString &)
+void KexiNewProjectWizard::slotServerDBNameTxtChanged(const TQString &)
{
if (d->le_dbname_txtchanged_disable)
return;
diff --git a/kexi/main/startup/KexiNewProjectWizard.h b/kexi/main/startup/KexiNewProjectWizard.h
index 9f9eaa626..18dab2570 100644
--- a/kexi/main/startup/KexiNewProjectWizard.h
+++ b/kexi/main/startup/KexiNewProjectWizard.h
@@ -25,7 +25,7 @@
#include <kwizard.h>
-class QListViewItem;
+class TQListViewItem;
class KexiNewPrjTypeSelector;
class KexiConnSelectorWidget;
@@ -37,17 +37,18 @@ class KexiProjectSelectorWidget;
class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiNewProjectWizard(KexiDBConnectionSet& conn_set, QWidget *parent=0,
+ KexiNewProjectWizard(KexiDBConnectionSet& conn_set, TQWidget *tqparent=0,
const char *name=0, bool modal=false, WFlags f=0);
~KexiNewProjectWizard();
/*! \return name for a new project's database if server-based project
type was selected. Returns file name if file-based project was selected. */
- QString projectDBName() const;
+ TQString projectDBName() const;
/*! \return name for a new project. Used for both file- and serever- based projects. */
- QString projectCaption() const;
+ TQString projectCaption() const;
/*! \return data of selected connection for new project,
if server-based project type was selected.
@@ -63,17 +64,17 @@ class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
void setConfirmOverwrites(bool set);
protected slots:
- void slotLvTypesSelected(QListViewItem *);
- void slotLvTypesExecuted(QListViewItem *);
- void slotServerDBCaptionTxtChanged(const QString &capt);
- void slotServerDBNameTxtChanged(const QString &n);
+ void slotLvTypesSelected(TQListViewItem *);
+ void slotLvTypesExecuted(TQListViewItem *);
+ void slotServerDBCaptionTxtChanged(const TQString &capt);
+ void slotServerDBNameTxtChanged(const TQString &n);
virtual void done(int r);
virtual void next();
virtual void accept();
protected:
- virtual void showPage(QWidget *page);
+ virtual void showPage(TQWidget *page);
KexiNewPrjTypeSelector *m_prjtype_sel;
KexiDBTitlePage *m_db_title;
@@ -81,7 +82,7 @@ class KEXIMAIN_EXPORT KexiNewProjectWizard : public KWizard
KexiProjectSelectorWidget* m_project_selector;
KexiConnSelectorWidget *m_conn_sel;
- QWidget *m_conn_sel_widget;
+ TQWidget *m_conn_sel_widget;
KexiNewProjectWizardPrivate *d;
};
diff --git a/kexi/main/startup/KexiOpenExistingFile.ui b/kexi/main/startup/KexiOpenExistingFile.ui
index ae4c05a9d..101be957f 100644
--- a/kexi/main/startup/KexiOpenExistingFile.ui
+++ b/kexi/main/startup/KexiOpenExistingFile.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiOpenExistingFile</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiOpenExistingFile</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lbl</cstring>
</property>
@@ -35,15 +35,15 @@
<string>&lt;b&gt;Select existing Kexi project file to open:&lt;/b&gt;
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>line</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>8</height>
@@ -56,32 +56,32 @@
<enum>Sunken</enum>
</property>
</widget>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>spacer</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>6</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>6</height>
</size>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btn_advanced</cstring>
</property>
@@ -97,7 +97,7 @@
<string>&amp;Advanced </string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>label</cstring>
</property>
@@ -112,7 +112,7 @@
<property name="text">
<string>Click "Advanced" button if you want to find an existing project on a server rather than a file.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -123,5 +123,5 @@
<tabstops>
<tabstop>btn_advanced</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiProjectSelector.cpp b/kexi/main/startup/KexiProjectSelector.cpp
index c28ab6d5c..55aa930f6 100644
--- a/kexi/main/startup/KexiProjectSelector.cpp
+++ b/kexi/main/startup/KexiProjectSelector.cpp
@@ -29,10 +29,10 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
#include <assert.h>
@@ -44,7 +44,7 @@ public:
{
selectable = true;
}
- QPixmap fileicon, dbicon;
+ TQPixmap fileicon, dbicon;
bool showProjectNameColumn : 1;
bool showConnectionColumns : 1;
bool selectable : 1;
@@ -53,12 +53,12 @@ public:
/*================================================================*/
//! helper class
-class ProjectDataLVItem : public QListViewItem
+class ProjectDataLVItem : public TQListViewItem
{
public:
ProjectDataLVItem(KexiProjectData *d,
const KexiDB::Driver::Info& info, KexiProjectSelectorWidget *selector )
- : QListViewItem(selector->list)
+ : TQListViewItem(selector->list)
, data(d)
{
int colnum = 0;
@@ -69,14 +69,14 @@ public:
setText(colnum++, data->databaseName()+" ");
if (selector->d->showConnectionColumns) {
- QString drvname = info.caption.isEmpty() ? cdata->driverName : info.caption;
+ TQString drvname = info.caption.isEmpty() ? cdata->driverName : info.caption;
if (info.fileBased) {
setText(colnum++, i18n("File") + " ("+drvname+") " );
} else {
setText(colnum++, drvname+" " );
}
- QString conn;
+ TQString conn;
if (!cdata->caption.isEmpty())
conn = cdata->caption + ": ";
conn += cdata->serverInfoString();
@@ -91,24 +91,24 @@ public:
/*================================================================*/
/*!
- * Constructs a KexiProjectSelector which is a child of 'parent', with the
+ * Constructs a KexiProjectSelector which is a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'
*/
KexiProjectSelectorWidget::KexiProjectSelectorWidget(
- QWidget* parent, const char* name,
+ TQWidget* tqparent, const char* name,
KexiProjectSet* prj_set, bool showProjectNameColumn,
bool showConnectionColumns )
- : KexiProjectSelectorBase( parent, name )
+ : KexiProjectSelectorBase( tqparent, name )
,m_prj_set(prj_set)
,d(new KexiProjectSelectorWidgetPrivate())
{
d->showProjectNameColumn = showProjectNameColumn;
d->showConnectionColumns = showConnectionColumns;
- QString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
+ TQString none, iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
d->fileicon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
setIcon( d->fileicon );
d->dbicon = SmallIcon("database");
-// list->setHScrollBarMode( QScrollView::AlwaysOn );
+// list->setHScrollBarMode( TQScrollView::AlwaysOn );
if (!d->showConnectionColumns) {
list->removeColumn(2);
@@ -121,9 +121,9 @@ KexiProjectSelectorWidget::KexiProjectSelectorWidget(
//show projects
setProjectSet( m_prj_set );
- connect(list,SIGNAL(doubleClicked(QListViewItem*)),this,SLOT(slotItemExecuted(QListViewItem*)));
- connect(list,SIGNAL(returnPressed(QListViewItem*)),this,SLOT(slotItemExecuted(QListViewItem*)));
- connect(list,SIGNAL(selectionChanged()),this,SLOT(slotItemSelected()));
+ connect(list,TQT_SIGNAL(doubleClicked(TQListViewItem*)),this,TQT_SLOT(slotItemExecuted(TQListViewItem*)));
+ connect(list,TQT_SIGNAL(returnPressed(TQListViewItem*)),this,TQT_SLOT(slotItemExecuted(TQListViewItem*)));
+ connect(list,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(slotItemSelected()));
}
/*!
@@ -142,7 +142,7 @@ KexiProjectData* KexiProjectSelectorWidget::selectedProjectData() const
return 0;
}
-void KexiProjectSelectorWidget::slotItemExecuted(QListViewItem *item)
+void KexiProjectSelectorWidget::slotItemExecuted(TQListViewItem *item)
{
if (!d->selectable)
return;
@@ -204,7 +204,7 @@ void KexiProjectSelectorWidget::setSelectable(bool set)
return;
d->selectable = set;
//update items' state
- QListViewItemIterator it( list );
+ TQListViewItemIterator it( list );
while ( it.current() ) {
it.current()->setSelectable( d->selectable );
}
@@ -217,19 +217,19 @@ bool KexiProjectSelectorWidget::isSelectable() const
/*================================================================*/
-KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const char *name,
+KexiProjectSelectorDialog::KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiProjectSet* prj_set, bool showProjectNameColumn, bool showConnectionColumns)
: KDialogBase( Plain, i18n("Open Recent Project"),
#ifndef KEXI_NO_UNFINISHED
//! @todo re-add Help when doc is available
Help |
#endif
- Ok | Cancel, Ok, parent, name )
+ Ok | Cancel, Ok, tqparent, name )
{
init(prj_set, showProjectNameColumn, showConnectionColumns);
}
-KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const char *name,
+KexiProjectSelectorDialog::KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiDB::ConnectionData* cdata,
bool showProjectNameColumn, bool showConnectionColumns)
: KDialogBase(
@@ -238,7 +238,7 @@ KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const cha
//! @todo re-add Help when doc is available
Help |
#endif
- Ok | Cancel, Ok, parent, name, true/*modal*/, false/*sep*/ )
+ Ok | Cancel, Ok, tqparent, name, true/*modal*/, false/*sep*/ )
{
setButtonGuiItem(Ok, KGuiItem(i18n("&Open"), "fileopen", i18n("Open Database Connection")));
assert(cdata);
@@ -248,7 +248,7 @@ KexiProjectSelectorDialog::KexiProjectSelectorDialog( QWidget *parent, const cha
init(prj_set, showProjectNameColumn, showConnectionColumns);
m_sel->label->setText( i18n("Select a project on <b>%1</b> database server to open:")
- .arg(cdata->serverInfoString(false)) );
+ .tqarg(cdata->serverInfoString(false)) );
}
KexiProjectSelectorDialog::~KexiProjectSelectorDialog()
@@ -260,17 +260,17 @@ void KexiProjectSelectorDialog::init(KexiProjectSet* prj_set, bool showProjectNa
{
setSizeGripEnabled(true);
- QVBoxLayout *lyr = new QVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
+ TQVBoxLayout *lyr = new TQVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
m_sel = new KexiProjectSelectorWidget(plainPage(), "sel",
prj_set, showProjectNameColumn, showConnectionColumns);
lyr->addWidget(m_sel);
setIcon(*m_sel->icon());
m_sel->setFocus();
- connect(m_sel,SIGNAL(projectExecuted(KexiProjectData*)),
- this,SLOT(slotProjectExecuted(KexiProjectData*)));
- connect(m_sel,SIGNAL(selectionChanged(KexiProjectData*)),
- this,SLOT(slotProjectSelectionChanged(KexiProjectData*)));
+ connect(m_sel,TQT_SIGNAL(projectExecuted(KexiProjectData*)),
+ this,TQT_SLOT(slotProjectExecuted(KexiProjectData*)));
+ connect(m_sel,TQT_SIGNAL(selectionChanged(KexiProjectData*)),
+ this,TQT_SLOT(slotProjectSelectionChanged(KexiProjectData*)));
}
KexiProjectData* KexiProjectSelectorDialog::selectedProjectData() const
diff --git a/kexi/main/startup/KexiProjectSelector.h b/kexi/main/startup/KexiProjectSelector.h
index 3151be3b2..91c137124 100644
--- a/kexi/main/startup/KexiProjectSelector.h
+++ b/kexi/main/startup/KexiProjectSelector.h
@@ -24,7 +24,7 @@
#include "kexiprojectset.h"
#include <kdialogbase.h>
-#include <qwidgetstack.h>
+#include <tqwidgetstack.h>
class KexiNewFileDBWidget;
class KexiProjectSelectorWidgetPrivate;
@@ -34,6 +34,7 @@ class KexiProjectSelectorWidgetPrivate;
class KEXIMAIN_EXPORT KexiProjectSelectorWidget : public KexiProjectSelectorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
// enum ConnType { FileBased=1, ServerBased=2 };
@@ -44,7 +45,7 @@ public:
information about database driver and connection columns are added.
\a prj_set may be NULL - you can assign a set later with setProjectSet().
*/
- KexiProjectSelectorWidget( QWidget* parent = 0, const char* name = 0,
+ KexiProjectSelectorWidget( TQWidget* tqparent = 0, const char* name = 0,
KexiProjectSet* prj_set = 0, bool showProjectNameColumn = true,
bool showConnectionColumns = true );
@@ -77,7 +78,7 @@ signals:
void selectionChanged(KexiProjectData*);
protected slots:
- void slotItemExecuted(QListViewItem*);
+ void slotItemExecuted(TQListViewItem*);
void slotItemSelected();
virtual void languageChange() { KexiProjectSelectorBase::languageChange(); }
@@ -93,11 +94,12 @@ protected:
class KexiProjectSelectorDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Constructor 1, used for displaying recent projects list
Label "there are recently opened projects" is displayed automatically
*/
- KexiProjectSelectorDialog( QWidget *parent, const char *name,
+ KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiProjectSet* prj_set,
bool showProjectNameColumn = true, bool showConnectionColumns = true);
@@ -105,7 +107,7 @@ public:
Label "Select one of these existing projects on server" is displayed automatically
You should test if project set was properly loaded using projectSet()->error().
*/
- KexiProjectSelectorDialog( QWidget *parent, const char *name,
+ KexiProjectSelectorDialog( TQWidget *tqparent, const char *name,
KexiDB::ConnectionData* cdata,
bool showProjectNameColumn = true, bool showConnectionColumns = true);
diff --git a/kexi/main/startup/KexiProjectSelectorBase.ui b/kexi/main/startup/KexiProjectSelectorBase.ui
index 4d51751bd..aa36a55a1 100644
--- a/kexi/main/startup/KexiProjectSelectorBase.ui
+++ b/kexi/main/startup/KexiProjectSelectorBase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiProjectSelectorBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiProjectSelectorBase</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>label</cstring>
</property>
@@ -43,11 +43,11 @@
<string>&lt;b&gt;There are Kexi projects you have recently opened.&lt;/b&gt; Select one you wish to open:
</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QListView">
+ <widget class="TQListView">
<column>
<property name="text">
<string>Project Name</string>
@@ -103,7 +103,7 @@
<verstretch>1</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>60</height>
@@ -124,5 +124,5 @@
<tabstops>
<tabstop>list</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiServerDBNamePage.ui b/kexi/main/startup/KexiServerDBNamePage.ui
index 3ea61dc37..0d20fe3ec 100644
--- a/kexi/main/startup/KexiServerDBNamePage.ui
+++ b/kexi/main/startup/KexiServerDBNamePage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiServerDBNamePage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiServerDBNamePage</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -24,7 +24,7 @@
<string>Project caption: </string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Project's database name: </string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>le_caption</cstring>
</property>
@@ -44,18 +44,18 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>le_dbname</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -72,7 +72,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
@@ -89,14 +89,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame" row="4" column="0" rowspan="1" colspan="3">
+ <widget class="TQFrame" row="4" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>frm_dblist</cstring>
</property>
@@ -128,7 +128,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>12</height>
@@ -137,5 +137,5 @@
</spacer>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/main/startup/KexiStartup.cpp b/kexi/main/startup/KexiStartup.cpp
index 19ae8d28a..54d977e4c 100644
--- a/kexi/main/startup/KexiStartup.cpp
+++ b/kexi/main/startup/KexiStartup.cpp
@@ -18,7 +18,7 @@
*/
#include "KexiStartup.h"
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
# include "KexiStartup_p_win.h"
#else
# include "KexiStartup_p.h"
@@ -52,9 +52,9 @@
#include <unistd.h>
-#include <qcstring.h>
-#include <qapplication.h>
-#include <qlayout.h>
+#include <tqcstring.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
namespace Kexi {
static KStaticDeleter<KexiStartupHandler> Kexi_startupHandlerDeleter;
@@ -92,13 +92,13 @@ class KexiStartupHandlerPrivate
KexiDBShortcutFile *shortcutFile;
KexiDBConnShortcutFile *connShortcutFile;
KexiDBConnectionDialog *connDialog;
- QString shortcutFileGroupKey;
+ TQString shortcutFileGroupKey;
KexiStartupDialog *startupDialog;
};
//---------------------------------
-static bool stripQuotes(const QString &item, QString &name)
+static bool stripQuotes(const TQString &item, TQString &name)
{
if (item.left(1)=="\"" && item.right(1)=="\"") {
name = item.mid(1, item.length()-2);
@@ -111,7 +111,7 @@ static bool stripQuotes(const QString &item, QString &name)
void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
{
char *p = buffer;
- QCString line(80);
+ TQCString line(80);
for (int i=0; i<buflen; i++, p++) {
if ((i==0 || buffer[i-1]=='\n') && buffer[i]=='%') {
bool ok;
@@ -120,13 +120,13 @@ void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
++i;
line="";
for (;i<buflen && *p>='0' && *p<='9'; j++, i++, p++)
- line+=QChar(*p);
+ line+=TQChar(*p).latin1();
--i; --p;
int percent = line.toInt(&ok);
if (ok && percent>=0 && percent<=100 && pd->progressBar()->progress()<percent) {
// kdDebug() << percent << endl;
pd->progressBar()->setProgress(percent);
- qApp->processEvents(100);
+ tqApp->tqprocessEvents(100);
}
}
}
@@ -134,36 +134,36 @@ void updateProgressBar(KProgressDialog *pd, char *buffer, int buflen)
//---------------------------------
-KexiDBPasswordDialog::KexiDBPasswordDialog(QWidget *parent, KexiDB::ConnectionData& cdata, bool showDetailsButton)
+KexiDBPasswordDialog::KexiDBPasswordDialog(TQWidget *tqparent, KexiDB::ConnectionData& cdata, bool showDetailsButton)
: KPasswordDialog( KPasswordDialog::Password, false/*keep*/,
- showDetailsButton ? (int)KDialogBase::User1 : 0, parent )
+ showDetailsButton ? (int)KDialogBase::User1 : 0, tqparent )
, m_cdata(&cdata)
, m_showConnectionDetailsRequested(false)
{
- QString msg = "<H2>" + i18n("Opening database") + "</H2><p>"
+ TQString msg = "<H2>" + i18n("Opening database") + "</H2><p>"
+ i18n("Please enter the password.") + "</p>";
/* msg += cdata.userName.isEmpty() ?
"<p>"+i18n("Please enter the password.")
- : "<p>"+i18n("Please enter the password for user.").arg("<b>"+cdata.userName+"</b>");*/
+ : "<p>"+i18n("Please enter the password for user.").tqarg("<b>"+cdata.userName+"</b>");*/
- QString srv = cdata.serverInfoString(false);
+ TQString srv = cdata.serverInfoString(false);
if (srv.isEmpty() || srv.lower()=="localhost")
srv = i18n("local database server");
- msg += ("</p><p>"+i18n("Database server: %1").arg(QString("<nobr>")+srv+"</nobr>")+"</p>");
+ msg += ("</p><p>"+i18n("Database server: %1").tqarg(TQString("<nobr>")+srv+"</nobr>")+"</p>");
- QString usr;
+ TQString usr;
if (cdata.userName.isEmpty())
usr = i18n("unspecified user", "(unspecified)");
else
usr = cdata.userName;
- msg += ("<p>"+i18n("Username: %1").arg(usr)+"</p>");
+ msg += ("<p>"+i18n("Username: %1").tqarg(usr)+"</p>");
setPrompt( msg );
if (showDetailsButton) {
- connect( this, SIGNAL(user1Clicked()),
- this, SLOT(slotShowConnectionDetails()) );
+ connect( this, TQT_SIGNAL(user1Clicked()),
+ this, TQT_SLOT(slotShowConnectionDetails()) );
setButtonText(KDialogBase::User1, i18n("&Details")+ " >>");
}
setButtonOK(KGuiItem(i18n("&Open"), "fileopen"));
@@ -175,10 +175,10 @@ KexiDBPasswordDialog::~KexiDBPasswordDialog()
void KexiDBPasswordDialog::done(int r)
{
- if (r == QDialog::Accepted) {
- m_cdata->password = QString::fromLatin1(password());
+ if (r == TQDialog::Accepted) {
+ m_cdata->password = TQString::tqfromLatin1(password());
}
-// if (d->showConnectionDetailsExecuted || ret == QDialog::Accepted) {
+// if (d->showConnectionDetailsExecuted || ret == TQDialog::Accepted) {
/* } else {
m_action = Exit;
return true;
@@ -195,7 +195,7 @@ void KexiDBPasswordDialog::slotShowConnectionDetails()
//---------------------------------
KexiStartupHandler::KexiStartupHandler()
- : QObject(0,"KexiStartupHandler")
+ : TQObject(0,"KexiStartupHandler")
, KexiStartupData()
, d( new KexiStartupHandlerPrivate() )
{
@@ -206,13 +206,13 @@ KexiStartupHandler::~KexiStartupHandler()
delete d;
}
-bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &action_name)
+bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name)
{
QCStringList list = args->getOptionList(action_name);
QCStringList::ConstIterator it;
bool atLeastOneFound = false;
for ( it = list.constBegin(); it!=list.constEnd(); ++it) {
- QString type_name, obj_name, item=*it;
+ TQString type_name, obj_name, item=*it;
int idx;
bool name_required = true;
if (action_name=="new") {
@@ -221,7 +221,7 @@ bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &
name_required = false;
}
else {//open, design, text...
- QString defaultType;
+ TQString defaultType;
if (action_name=="execute")
defaultType = "macro";
else
@@ -231,7 +231,7 @@ bool KexiStartupHandler::getAutoopenObjects(KCmdLineArgs *args, const QCString &
if (stripQuotes(item, obj_name)) {
type_name = defaultType;
}
- else if ((idx = item.find(':'))!=-1) {
+ else if ((idx = item.tqfind(':'))!=-1) {
//option with type name specified:
type_name = item.left(idx).lower();
obj_name = item.mid(idx+1);
@@ -274,7 +274,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KexiDB::ConnectionData cdata;
- const QString connectionShortcutFileName( args->getOption("connection") );
+ const TQString connectionShortcutFileName( args->getOption("connection") );
if (!connectionShortcutFileName.isEmpty()) {
KexiDBConnShortcutFile connectionShortcut( connectionShortcutFileName );
if (!connectionShortcut.loadConnectionData(cdata)) {
@@ -283,7 +283,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KMessageBox::sorry( 0, "<qt>"
+i18n("Could not read connection information from connection shortcut "
"file <nobr>\"%1\"</nobr>.<br><br>Check whether the file has valid contents.")
- .arg(QDir::convertSeparators(connectionShortcut.fileName())));
+ .tqarg(TQDir::convertSeparators(connectionShortcut.fileName())));
return false;
}
}
@@ -291,11 +291,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!args->getOption("dbdriver").isEmpty())
cdata.driverName = args->getOption("dbdriver");
- QString fileType( args->getOption("type").lower() );
+ TQString fileType( args->getOption("type").lower() );
if (args->count()>0 && (!fileType.isEmpty() && fileType!="project" && fileType!="shortcut" && fileType!="connection")) {
KMessageBox::sorry( 0,
i18n("You have specified invalid argument (\"%1\") for \"type\" command-line option.")
- .arg(fileType));
+ .tqarg(fileType));
return false;
}
@@ -330,7 +330,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (qstrcmp("--password",argv[i])==0
|| qstrcmp("-password",argv[i])==0)
{
- QCString pwd(argv[i+1]);
+ TQCString pwd(argv[i+1]);
if (!pwd.isEmpty()) {
pwd.fill(' ');
pwd[0]='x';
@@ -341,7 +341,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
*/
- const QString portStr = args->getOption("port");
+ const TQString portStr = args->getOption("port");
if (!portStr.isEmpty()) {
bool ok;
const int p = portStr.toInt(&ok);
@@ -364,7 +364,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
const bool dropDB = args->isSet("dropdb");
const bool openExisting = !createDB && !dropDB;
const bool readOnly = args->isSet("readonly");
- const QString couldnotMsg = QString::fromLatin1("\n")
+ const TQString couldnotMsg = TQString::tqfromLatin1("\n")
+i18n("Could not start Kexi application this way.");
if (createDB && dropDB) {
@@ -388,13 +388,13 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (cdata.password.isEmpty()) {
delete d->passwordDialog;
d->passwordDialog = new KexiDBPasswordDialog(0, cdata, true);
-// connect( d->passwordDialog, SIGNAL(user1Clicked()),
-// this, SLOT(slotShowConnectionDetails()) );
+// connect( d->passwordDialog, TQT_SIGNAL(user1Clicked()),
+// this, TQT_SLOT(slotShowConnectionDetails()) );
const int ret = d->passwordDialog->exec();
- if (d->passwordDialog->showConnectionDetailsRequested() || ret == QDialog::Accepted) {
-// if ( ret == QDialog::Accepted ) {
- // if (QDialog::Accepted == KPasswordDialog::getPassword(pwd, msg)) {
-//moved cdata.password = QString(pwd);
+ if (d->passwordDialog->showConnectionDetailsRequested() || ret == TQDialog::Accepted) {
+// if ( ret == TQDialog::Accepted ) {
+ // if (TQDialog::Accepted == KPasswordDialog::getPassword(pwd, msg)) {
+//moved cdata.password = TQString(pwd);
// }
} else {
m_action = Exit;
@@ -416,17 +416,17 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
//database filenames, shortcut filenames or db names on a server
if (args->count()>=1) {
- QString prjName;
- QString fileName;
+ TQString prjName;
+ TQString fileName;
if (fileDriverSelected) {
- fileName = QFile::decodeName(args->arg(0));
+ fileName = TQFile::decodeName(args->arg(0));
}
else {
- prjName = QString::fromLocal8Bit(args->arg(0));
+ prjName = TQString::fromLocal8Bit(args->arg(0));
}
if (fileDriverSelected) {
- QFileInfo finfo(fileName);
+ TQFileInfo finfo(fileName);
prjName = finfo.fileName(); //filename only, to avoid messy names like when Kexi is started with "../../db" arg
cdata.setFileName( finfo.absFilePath() );
projectFileExists = finfo.exists();
@@ -434,7 +434,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (dropDB && !projectFileExists) {
KMessageBox::sorry(0,
i18n("Could not remove project.\nThe file \"%1\" does not exist.")
- .arg(QDir::convertSeparators(cdata.dbFileName())));
+ .tqarg(TQDir::convertSeparators(cdata.dbFileName())));
return 0;
}
}
@@ -457,7 +457,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (dropDB)
detectOptions |= DontConvert;
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, cdata.fileName(), 0, detectOptions );
if (true != res)
@@ -476,7 +476,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
m_projectData = new KexiProjectData();
if (!d->shortcutFile->loadProjectData(*m_projectData, &d->shortcutFileGroupKey)) {
KMessageBox::sorry(0, i18n("Could not open shortcut file\n\"%1\".")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
delete m_projectData;
m_projectData = 0;
delete d->shortcutFile;
@@ -485,10 +485,10 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
d->connDialog = new KexiDBConnectionDialog(
*m_projectData, d->shortcutFile->fileName());
- connect(d->connDialog, SIGNAL(saveChanges()),
- this, SLOT(slotSaveShortcutFileChanges()));
+ connect(d->connDialog, TQT_SIGNAL(saveChanges()),
+ this, TQT_SLOT(slotSaveShortcutFileChanges()));
int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
*m_projectData = d->connDialog->currentProjectData();
}
@@ -498,7 +498,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
delete d->shortcutFile;
d->shortcutFile = 0;
- if (res == QDialog::Rejected) {
+ if (res == TQDialog::Rejected) {
delete m_projectData;
m_projectData = 0;
return cancelled;
@@ -509,7 +509,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
d->connShortcutFile = new KexiDBConnShortcutFile(cdata.fileName());
if (!d->connShortcutFile->loadConnectionData(cdata, &d->shortcutFileGroupKey)) {
KMessageBox::sorry(0, i18n("Could not open connection data file\n\"%1\".")
- .arg(QDir::convertSeparators(cdata.fileName())));
+ .tqarg(TQDir::convertSeparators(cdata.fileName())));
delete d->connShortcutFile;
d->connShortcutFile = 0;
return false;
@@ -522,11 +522,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!d->connDialog) {
d->connDialog = new KexiDBConnectionDialog(
cdata, d->connShortcutFile->fileName());
- connect(d->connDialog, SIGNAL(saveChanges()),
- this, SLOT(slotSaveShortcutFileChanges()));
+ connect(d->connDialog, TQT_SIGNAL(saveChanges()),
+ this, TQT_SLOT(slotSaveShortcutFileChanges()));
}
const int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
cdata = *d->connDialog->currentProjectData().constConnectionData();
}
@@ -565,11 +565,11 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
//let's show connection details, user asked for that in the "password dialog"
if (d->passwordDialog && d->passwordDialog->showConnectionDetailsRequested()) {
d->connDialog = new KexiDBConnectionDialog(*m_projectData);
-// connect(d->connDialog->tabWidget->mainWidget, SIGNAL(saveChanges()),
-// this, SLOT(slotSaveShortcutFileChanges()));
+// connect(d->connDialog->tabWidget->mainWidget, TQT_SIGNAL(saveChanges()),
+// this, TQT_SLOT(slotSaveShortcutFileChanges()));
int res = d->connDialog->exec();
- if (res == QDialog::Accepted) {
+ if (res == TQDialog::Accepted) {
//get (possibly changed) prj data
*m_projectData = d->connDialog->currentProjectData();
}
@@ -577,7 +577,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
delete d->connDialog;
d->connDialog = 0;
- if (res == QDialog::Rejected) {
+ if (res == TQDialog::Rejected) {
delete m_projectData;
m_projectData = 0;
return cancelled;
@@ -612,7 +612,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
if (!alsoOpenDB) {
if (ok) {
KMessageBox::information( 0, i18n("Project \"%1\" created successfully.")
- .arg( QDir::convertSeparators(projectData()->databaseName()) ));
+ .tqarg( TQDir::convertSeparators(projectData()->databaseName()) ));
}
return ok;
}
@@ -622,7 +622,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
tristate res = KexiProject::dropProject(projectData(), &gui, false/*ask*/);
if (res==true)
KMessageBox::information( 0, i18n("Project \"%1\" dropped successfully.")
- .arg( QDir::convertSeparators(projectData()->databaseName()) ));
+ .tqarg( TQDir::convertSeparators(projectData()->databaseName()) ));
return res!=false;
}
@@ -646,7 +646,7 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
KexiStartupDialog::Everything, KexiStartupDialog::CheckBoxDoNotShowAgain,
Kexi::connset(), Kexi::recentProjects(), 0, "KexiStartupDialog");
}
- if (d->startupDialog->exec()!=QDialog::Accepted)
+ if (d->startupDialog->exec()!=TQDialog::Accepted)
return true;
const int r = d->startupDialog->result();
@@ -659,9 +659,9 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
return true;
}
else if (r == KexiStartupDialog::CreateFromTemplateResult) {
- const QString selFile( d->startupDialog->selectedFileName() );
+ const TQString selFile( d->startupDialog->selectedFileName() );
cdata.setFileName( selFile );
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, selFile );
if (true != res)
@@ -676,12 +676,12 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
else if (r == KexiStartupDialog::OpenExistingResult) {
// kdDebug() << "Existing project --------" << endl;
- const QString selFile( d->startupDialog->selectedFileName() );
+ const TQString selFile( d->startupDialog->selectedFileName() );
if (!selFile.isEmpty()) {
//file-based project
// kdDebug() << "Project File: " << selFile << endl;
cdata.setFileName( selFile );
- QString detectedDriverName;
+ TQString detectedDriverName;
const tristate res = detectActionForFile( m_importActionData, detectedDriverName,
cdata.driverName, selFile );
if (true != res)
@@ -738,25 +738,25 @@ tristate KexiStartupHandler::init(int /*argc*/, char ** /*argv*/)
}
tristate KexiStartupHandler::detectActionForFile(
- KexiStartupData::Import& detectedImportAction, QString& detectedDriverName,
- const QString& _suggestedDriverName, const QString &dbFileName, QWidget *parent, int options )
+ KexiStartupData::Import& detectedImportAction, TQString& detectedDriverName,
+ const TQString& _suggestedDriverName, const TQString &dbFileName, TQWidget *tqparent, int options )
{
detectedImportAction = KexiStartupData::Import(); //clear
- QString suggestedDriverName(_suggestedDriverName); //safe
- detectedDriverName = QString::null;
- QFileInfo finfo(dbFileName);
+ TQString suggestedDriverName(_suggestedDriverName); //safe
+ detectedDriverName = TQString();
+ TQFileInfo finfo(dbFileName);
if (dbFileName.isEmpty() || !finfo.isReadable()) {
if (!(options & SkipMessages))
- KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>")
+ KMessageBox::sorry(tqparent, i18n("<p>Could not open project.</p>")
+i18n("<p>The file <nobr>\"%1\"</nobr> does not exist or is not readable.</p>")
- .arg(QDir::convertSeparators(dbFileName))
+ .tqarg(TQDir::convertSeparators(dbFileName))
+i18n("Check the file's permissions and whether it is already opened "
"and locked by another application."));
return false;
}
KMimeType::Ptr ptr;
- QString mimename;
+ TQString mimename;
const bool thisIsShortcut = (options & ThisIsAShortcutToAProjectFile)
|| (options & ThisIsAShortcutToAConnectionData);
@@ -775,13 +775,13 @@ tristate KexiStartupHandler::detectActionForFile(
}
if (mimename.isEmpty() || mimename=="application/octet-stream") {
// perhaps the file is locked
- QFile f(dbFileName);
+ TQFile f(dbFileName);
if (!f.open(IO_ReadOnly)) {
// BTW: similar error msg is provided in SQLiteConnection::drv_useDatabase()
if (!(options & SkipMessages))
- KMessageBox::sorry(parent, i18n("<p>Could not open project.</p>")
+ KMessageBox::sorry(tqparent, i18n("<p>Could not open project.</p>")
+i18n("<p>The file <nobr>\"%1\"</nobr> is not readable.</p>")
- .arg(QDir::convertSeparators(dbFileName))
+ .tqarg(TQDir::convertSeparators(dbFileName))
+i18n("Check the file's permissions and whether it is already opened "
"and locked by another application."));
return false;
@@ -802,9 +802,9 @@ tristate KexiStartupHandler::detectActionForFile(
if (ptr.data()) {
if (mimename=="application/x-msaccess") {
if ((options & SkipMessages) || KMessageBox::Yes != KMessageBox::questionYesNo(
- parent, i18n("\"%1\" is an external file of type:\n\"%2\".\n"
+ tqparent, i18n("\"%1\" is an external file of type:\n\"%2\".\n"
"Do you want to import the file as a Kexi project?")
- .arg(QDir::convertSeparators(dbFileName)).arg(ptr.data()->comment()),
+ .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(ptr.data()->comment()),
i18n("Open External File"), KGuiItem(i18n("Import...")), KStdGuiItem::cancel() ) )
{
return cancelled;
@@ -820,18 +820,18 @@ tristate KexiStartupHandler::detectActionForFile(
}
// "application/x-kexiproject-sqlite", etc.:
- QString tmpDriverName = Kexi::driverManager().lookupByMime(mimename).latin1();
+ TQString tmpDriverName = Kexi::driverManager().lookupByMime(mimename).latin1();
//@todo What about trying to reuse KOFFICE FILTER CHAINS here?
bool useDetectedDriver = suggestedDriverName.isEmpty() || suggestedDriverName.lower()==detectedDriverName.lower();
if (!useDetectedDriver) {
int res = KMessageBox::Yes;
if (!(options & SkipMessages))
- res = KMessageBox::warningYesNoCancel(parent, i18n(
+ res = KMessageBox::warningYesNoCancel(tqparent, i18n(
"The project file \"%1\" is recognized as compatible with \"%2\" database driver, "
"while you have asked for \"%3\" database driver to be used.\n"
"Do you want to use \"%4\" database driver?")
- .arg(QDir::convertSeparators(dbFileName))
- .arg(tmpDriverName).arg(suggestedDriverName).arg(tmpDriverName));
+ .tqarg(TQDir::convertSeparators(dbFileName))
+ .tqarg(tmpDriverName).tqarg(suggestedDriverName).tqarg(tmpDriverName));
if (KMessageBox::Yes == res)
useDetectedDriver = true;
else if (KMessageBox::Cancel == res)
@@ -845,13 +845,13 @@ tristate KexiStartupHandler::detectActionForFile(
}
// kdDebug() << "KexiStartupHandler::detectActionForFile(): driver name: " << detectedDriverName << endl;
//hardcoded for convenience:
- const QString newFileFormat = "SQLite3";
+ const TQString newFileFormat = "SQLite3";
if (!(options & DontConvert || options & SkipMessages)
&& detectedDriverName.lower()=="sqlite2" && detectedDriverName.lower()!=suggestedDriverName.lower()
- && KMessageBox::Yes == KMessageBox::questionYesNo(parent, i18n(
+ && KMessageBox::Yes == KMessageBox::questionYesNo(tqparent, i18n(
"Previous version of database file format (\"%1\") is detected in the \"%2\" "
"project file.\nDo you want to convert the project to a new \"%3\" format (recommended)?")
- .arg(detectedDriverName).arg(QDir::convertSeparators(dbFileName)).arg(newFileFormat)) )
+ .tqarg(detectedDriverName).tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat)) )
{
// SQLite2ToSQLite3Migration *migr = new
SQLite2ToSQLite3Migration migr( finfo.absFilePath() );
@@ -859,10 +859,10 @@ tristate KexiStartupHandler::detectActionForFile(
// kdDebug() << "--- migr.run() END ---" <<endl;
if (!res) {
//TODO msg
- KMessageBox::sorry(parent, i18n(
+ KMessageBox::sorry(tqparent, i18n(
"Failed to convert project file \"%1\" to a new \"%2\" format.\n"
"The file format remains unchanged.")
- .arg(QDir::convertSeparators(dbFileName)).arg(newFileFormat) );
+ .tqarg(TQDir::convertSeparators(dbFileName)).tqarg(newFileFormat) );
//continue...
}
if (res==true)
@@ -870,21 +870,21 @@ tristate KexiStartupHandler::detectActionForFile(
}
// action.driverName = detectedDriverName;
if (detectedDriverName.isEmpty()) {
- QString possibleProblemsInfoMsg( Kexi::driverManager().possibleProblemsInfoMsg() );
+ TQString possibleProblemsInfoMsg( Kexi::driverManager().possibleProblemsInfoMsg() );
if (!possibleProblemsInfoMsg.isEmpty()) {
- possibleProblemsInfoMsg.prepend(QString::fromLatin1("<p>")+i18n("Possible problems:"));
- possibleProblemsInfoMsg += QString::fromLatin1("</p>");
+ possibleProblemsInfoMsg.prepend(TQString::tqfromLatin1("<p>")+i18n("Possible problems:"));
+ possibleProblemsInfoMsg += TQString::tqfromLatin1("</p>");
}
if (!(options & SkipMessages))
- KMessageBox::detailedSorry(parent,
+ KMessageBox::detailedSorry(tqparent,
i18n( "The file \"%1\" is not recognized as being supported by Kexi.")
- .arg(QDir::convertSeparators(dbFileName)),
- QString::fromLatin1("<p>")
+ .tqarg(TQDir::convertSeparators(dbFileName)),
+ TQString::tqfromLatin1("<p>")
+i18n("Database driver for this file type not found.\nDetected MIME type: %1")
- .arg(mimename)
+ .tqarg(mimename)
+(ptr.data()->comment().isEmpty()
- ? QString::fromLatin1(".") : QString::fromLatin1(" (%1).").arg(ptr.data()->comment()))
- +QString::fromLatin1("</p>")
+ ? TQString::tqfromLatin1(".") : TQString::tqfromLatin1(" (%1).").tqarg(ptr.data()->comment()))
+ +TQString::tqfromLatin1("</p>")
+possibleProblemsInfoMsg);
return false;
}
@@ -892,9 +892,9 @@ tristate KexiStartupHandler::detectActionForFile(
}
KexiProjectData*
-KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, QWidget *parent)
+KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, TQWidget *tqparent)
{
- clearStatus();
+ cleartqStatus();
cancelled = false;
if (!cdata)
return 0;
@@ -902,7 +902,7 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled
if (!d->passwordDialog)
d->passwordDialog = new KexiDBPasswordDialog(0, *cdata, false);
const int ret = d->passwordDialog->exec();
- if (d->passwordDialog->showConnectionDetailsRequested() || ret == QDialog::Accepted) {
+ if (d->passwordDialog->showConnectionDetailsRequested() || ret == TQDialog::Accepted) {
} else {
cancelled = true;
@@ -911,22 +911,22 @@ KexiStartupHandler::selectProject(KexiDB::ConnectionData *cdata, bool& cancelled
}
KexiProjectData* projectData = 0;
//dialog for selecting a project
- KexiProjectSelectorDialog prjdlg( parent, "prjdlg", cdata, true, false );
+ KexiProjectSelectorDialog prjdlg( tqparent, "prjdlg", cdata, true, false );
if (!prjdlg.projectSet() || prjdlg.projectSet()->error()) {
KexiGUIMessageHandler msgh;
if (prjdlg.projectSet())
msgh.showErrorMessage(prjdlg.projectSet(),
i18n("Could not load list of available projects for <b>%1</b> database server.")
- .arg(cdata->serverInfoString(true)));
+ .tqarg(cdata->serverInfoString(true)));
else
msgh.showErrorMessage(
i18n("Could not load list of available projects for <b>%1</b> database server.")
- .arg(cdata->serverInfoString(true)));
-// setStatus(i18n("Could not load list of available projects for database server \"%1\"")
-// .arg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg());
+ .tqarg(cdata->serverInfoString(true)));
+// settqStatus(i18n("Could not load list of available projects for database server \"%1\"")
+// .tqarg(cdata->serverInfoString(true)), prjdlg.projectSet()->errorMsg());
return 0;
}
- if (prjdlg.exec()!=QDialog::Accepted) {
+ if (prjdlg.exec()!=TQDialog::Accepted) {
cancelled = true;
return 0;
}
@@ -952,7 +952,7 @@ void KexiStartupHandler::slotSaveShortcutFileChanges()
if (!ok) {
KMessageBox::sorry(0, i18n("Failed saving connection data to\n\"%1\" file.")
- .arg(QDir::convertSeparators(d->shortcutFile->fileName())));
+ .tqarg(TQDir::convertSeparators(d->shortcutFile->fileName())));
}
}
diff --git a/kexi/main/startup/KexiStartup.h b/kexi/main/startup/KexiStartup.h
index 294ad7dd0..22c554403 100644
--- a/kexi/main/startup/KexiStartup.h
+++ b/kexi/main/startup/KexiStartup.h
@@ -20,8 +20,8 @@
#ifndef KEXI_STARTUPHANDLER_H
#define KEXI_STARTUPHANDLER_H
-#include <qstring.h>
-#include <qwidget.h>
+#include <tqstring.h>
+#include <tqwidget.h>
#include <kpassdlg.h>
#include <core/kexistartupdata.h>
@@ -40,8 +40,9 @@ namespace KexiDB {
class KEXIMAIN_EXPORT KexiDBPasswordDialog : public KPasswordDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBPasswordDialog(QWidget *parent, KexiDB::ConnectionData& cdata, bool showDetailsButton = false);
+ KexiDBPasswordDialog(TQWidget *tqparent, KexiDB::ConnectionData& cdata, bool showDetailsButton = false);
virtual ~KexiDBPasswordDialog();
bool showConnectionDetailsRequested() const { return m_showConnectionDetailsRequested; }
@@ -58,9 +59,10 @@ class KEXIMAIN_EXPORT KexiDBPasswordDialog : public KPasswordDialog
/*! Handles startup actions for Kexi application.
*/
class KEXIMAIN_EXPORT KexiStartupHandler
- : public QObject, public KexiStartupData, public Kexi::ObjectStatus
+ : public TQObject, public KexiStartupData, public Kexi::ObjecttqStatus
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiStartupHandler();
@@ -71,12 +73,12 @@ class KEXIMAIN_EXPORT KexiStartupHandler
#if 0
/*! Used for opening existing projects.
Detects project file type by mime type and returns project data, if it can be detected,
- otherwise - NULL. \a parent is passed as parent for potential error message boxes.
+ otherwise - NULL. \a tqparent is passed as tqparent for potential error message boxes.
Also uses \a cdata connection data for server-based projects.
cdata.driverName is adjusted, if a file-based project has been detected.
*/
static KexiProjectData* detectProjectData(
- KexiDB::ConnectionData& cdata, const QString &dbname, QWidget *parent);
+ KexiDB::ConnectionData& cdata, const TQString &dbname, TQWidget *tqparent);
#endif
/*! Options for detectDriverForFile() */
@@ -101,27 +103,27 @@ class KEXIMAIN_EXPORT KexiStartupHandler
- "shortcut" if the file looks like a shortcut to a project/connection file
- "connection" if the file looks like a connection data file.
- \a parent is passed as a parent for potential error message boxes.
+ \a tqparent is passed as a tqparent for potential error message boxes.
\a driverName is a preferred driver name.
\a options should be a combination of DetectDriverForFileOptions enum values. */
static tristate detectActionForFile(
- KexiStartupData::Import& detectedImportAction, QString& detectedDriverName,
- const QString& _suggestedDriverName,
- const QString &dbFileName, QWidget *parent = 0, int options = 0 );
+ KexiStartupData::Import& detectedImportAction, TQString& detectedDriverName,
+ const TQString& _suggestedDriverName,
+ const TQString &dbFileName, TQWidget *tqparent = 0, int options = 0 );
/*! Allows user to select a project with KexiProjectSelectorDialog.
\return selected project's data
Returns NULL and sets cancelled to true if the dialog was cancelled.
Returns NULL and sets cancelled to false if there was an error.
*/
- KexiProjectData* selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, QWidget *parent = 0);
+ KexiProjectData* selectProject(KexiDB::ConnectionData *cdata, bool& cancelled, TQWidget *tqparent = 0);
protected slots:
void slotSaveShortcutFileChanges();
// void slotShowConnectionDetails();
protected:
- bool getAutoopenObjects(KCmdLineArgs *args, const QCString &action_name);
+ bool getAutoopenObjects(KCmdLineArgs *args, const TQCString &action_name);
KexiStartupHandlerPrivate *d;
};
diff --git a/kexi/main/startup/KexiStartupDialog.cpp b/kexi/main/startup/KexiStartupDialog.cpp
index 3b524492d..40ced9b1e 100644
--- a/kexi/main/startup/KexiStartupDialog.cpp
+++ b/kexi/main/startup/KexiStartupDialog.cpp
@@ -25,16 +25,16 @@
#include "KexiConnSelector.h"
#include "KexiConnSelectorBase.h"
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qpoint.h>
-#include <qobjectlist.h>
-#include <qvgroupbox.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqpoint.h>
+#include <tqobjectlist.h>
+#include <tqvgroupbox.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
#include <klocale.h>
#include <kdeversion.h>
@@ -67,7 +67,7 @@ public:
, pageOpenRecentID(-1)
{
result = 0;
- QString none, iconname;
+ TQString none, iconname;
iconname = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
kexi_sqlite_icon = KGlobal::iconLoader()->loadIcon( iconname, KIcon::Desktop );
iconname = KMimeType::mimeType("application/x-kexiproject-shortcut")->icon(none,0);
@@ -83,35 +83,35 @@ public:
int dialogType, dialogOptions;
- QFrame *pageTemplates, *pageOpenExisting, *pageOpenRecent;
+ TQFrame *pageTemplates, *pageOpenExisting, *pageOpenRecent;
int pageTemplatesID;
int pageOpenExistingID, pageOpenRecentID;
int templatesSectionID_blank, templatesSectionID_import;
#ifdef DB_TEMPLATES
int templatesSectionID_templates; //, templatesSectionID_custom2;
#endif
- QCheckBox *chkDoNotShow;
+ TQCheckBox *chkDoNotShow;
//widgets for template tab:
KJanusWidget* templatesWidget;
- QObject *templatesWidget_IconListBox;//helper
+ TQObject *templatesWidget_IconListBox;//helper
- QWidgetStack *viewBlankTempl;
+ TQWidgetStack *viewBlankTempl;
KexiStartupDialogTemplatesPage *viewTemplates;
//TemplatesPage *viewBusinessTempl;
int result;
- QPixmap kexi_sqlite_icon, kexi_shortcut_icon;
+ TQPixmap kexi_sqlite_icon, kexi_shortcut_icon;
// //! Key string of selected database template. \sa selectedTemplateKey()
-// QString selectedTemplateKey;
+// TQString selectedTemplateKey;
//! used for "open existing"
KexiDBConnectionSet *connSet;
KexiStartupFileDialog *openExistingFileDlg; //! embedded file dialog
KexiConnSelectorWidget *openExistingConnWidget;
- QString existingFileToOpen; //! helper for returning a file name to open
+ TQString existingFileToOpen; //! helper for returning a file name to open
KexiDB::ConnectionData* selectedExistingConnection; //! helper for returning selected connection
//! used for "open recent"
@@ -129,7 +129,7 @@ bool dlgSinglePage(int type)
|| (type==KexiStartupDialog::OpenRecent);
}
-QString captionForDialogType(int type)
+TQString captionForDialogType(int type)
{
if (type==KexiStartupDialog::Templates)
return i18n("Create Project");
@@ -142,21 +142,21 @@ QString captionForDialogType(int type)
}
/*================================================================*/
-/*KexiStartupDialog::KexiStartupDialog(QWidget *parent, const char *name, KInstance* global,
- const QCString &format, const QString &nativePattern,
- const QString &nativeName, const DialogType &dialogType,
- const QCString& templateType) :
- KDialogBase(parent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
+/*KexiStartupDialog::KexiStartupDialog(TQWidget *tqparent, const char *name, KInstance* global,
+ const TQCString &format, const TQString &nativePattern,
+ const TQString &nativeName, const DialogType &dialogType,
+ const TQCString& templateType) :
+ KDialogBase(tqparent, name, true, i18n("Open Document"), KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok) {
*/
KexiStartupDialog::KexiStartupDialog(
int dialogType, int dialogOptions,
KexiDBConnectionSet& connSet, KexiProjectSet& recentProjects,
- QWidget *parent, const char *name )
+ TQWidget *tqparent, const char *name )
: KDialogBase(
dlgSinglePage(dialogType) ? Plain : Tabbed
,captionForDialogType(dialogType)
- ,Help | Ok | Cancel, Ok, parent, name )
+ ,Help | Ok | Cancel, Ok, tqparent, name )
, d(new KexiStartupDialogPrivate())
{
d->recentProjects = &recentProjects;
@@ -194,7 +194,7 @@ KexiStartupDialog::KexiStartupDialog(
#endif
if (!d->singlePage) {
- connect(this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotPageShown(QWidget*)));
+ connect(this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotPageShown(TQWidget*)));
d->templatesWidget->setFocus();
}
showPage(0);
@@ -215,8 +215,8 @@ bool KexiStartupDialog::shouldBeShown()
void KexiStartupDialog::show()
{
//just some cleanup
-// d->selectedTemplateKey=QString::null;
- d->existingFileToOpen=QString::null;
+// d->selectedTemplateKey=TQString();
+ d->existingFileToOpen=TQString();
d->result=-1;
KDialog::centerOnScreen(this);
@@ -236,7 +236,7 @@ void KexiStartupDialog::done(int r)
// kdDebug() << "KexiStartupDialog::done(" << r << ")" << endl;
// updateSelectedTemplateKeyInfo();
- if (r==QDialog::Rejected) {
+ if (r==TQDialog::Rejected) {
d->result = CancelResult;
} else {
const int idx = activePageIndex();
@@ -260,7 +260,7 @@ void KexiStartupDialog::done(int r)
// d->existingFileToOpen = d->openExistingFileDlg->currentURL().path();
d->selectedExistingConnection = 0;
} else {
- d->existingFileToOpen = QString::null;
+ d->existingFileToOpen = TQString();
d->selectedExistingConnection
= d->openExistingConnWidget->selectedConnectionData();
}
@@ -294,7 +294,7 @@ void KexiStartupDialog::reject()
void KexiStartupDialog::setupPageTemplates()
{
d->pageTemplates = addPage( i18n("&Create Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageTemplates, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageTemplates, 0, KDialogBase::spacingHint() );
d->templatesWidget = new KJanusWidget(
d->pageTemplates, "templatesWidget", KJanusWidget::IconList);
@@ -304,27 +304,27 @@ void KexiStartupDialog::setupPageTemplates()
d->templatesWidget_IconListBox->installEventFilter(this);
}
lyr->addWidget(d->templatesWidget);
- connect(d->templatesWidget, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotPageShown(QWidget*)));
+ connect(d->templatesWidget, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotPageShown(TQWidget*)));
if (d->dialogOptions & CheckBoxDoNotShowAgain) {
- d->chkDoNotShow = new QCheckBox(i18n("Don't show me this dialog again"), d->pageTemplates, "chkDoNotShow");
+ d->chkDoNotShow = new TQCheckBox(i18n("Don't show me this dialog again"), d->pageTemplates, "chkDoNotShow");
lyr->addWidget(d->chkDoNotShow);
}
//template groups:
- QFrame *templPageFrame;
- QVBoxLayout *tmplyr;
+ TQFrame *templPageFrame;
+ TQVBoxLayout *tmplyr;
int itemID = 0; //used just to set up templatesSectionID_*
//- page "blank db"
d->templatesSectionID_blank = itemID++;
- QString clickMsg( "\n\n" + i18n("Click \"OK\" button to proceed.") );
+ TQString clickMsg( "\n\n" + i18n("Click \"OK\" button to proceed.") );
templPageFrame = d->templatesWidget->addPage(
i18n("Blank Database"), i18n("New Blank Database Project"), DesktopIcon("empty") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_blank = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_blank = new TQLabel(
i18n("Kexi will create a new blank database project.")+clickMsg, templPageFrame );
- lbl_blank->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_blank->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_blank->setMargin(0);
tmplyr->addWidget( lbl_blank );
tmplyr->addStretch(1);
@@ -332,37 +332,37 @@ void KexiStartupDialog::setupPageTemplates()
#ifdef DB_TEMPLATES
//- page "templates"
d->templatesSectionID_templates = itemID++;
- QString none;
- QString kexi_sqlite_icon_name
+ TQString none;
+ TQString kexi_sqlite_icon_name
= KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0);
templPageFrame = d->templatesWidget->addPage (
i18n("Keep this text narrow: split to multiple rows if needed", "Create From\nTemplate"),
i18n("New Database Project From Template"), DesktopIcon(kexi_sqlite_icon_name) );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_templ = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_templ = new TQLabel(
i18n("Kexi will create a new database project using selected template.\n"
"Select template and click \"OK\" button to proceed."), templPageFrame );
- lbl_templ->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_templ->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_templ->setMargin(0);
tmplyr->addWidget( lbl_templ );
d->viewTemplates = new KexiStartupDialogTemplatesPage( templPageFrame );
tmplyr->addWidget( d->viewTemplates );
- connect(d->viewTemplates,SIGNAL(selected(const QString&)),
- this,SLOT(templateSelected(const QString&)));
-/* connect(d->viewTemplates->templates,SIGNAL(returnPressed(QIconViewItem*)),
- this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewTemplates->templates,SIGNAL(currentChanged(QIconViewItem*)),
- this,SLOT(templateItemSelected(QIconViewItem*)));*/
+ connect(d->viewTemplates,TQT_SIGNAL(selected(const TQString&)),
+ this,TQT_SLOT(templateSelected(const TQString&)));
+/* connect(d->viewTemplates->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),
+ this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewTemplates->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),
+ this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));*/
/*later
templPageFrame = d->templatesWidget->addPage (
i18n("Personal Databases"), i18n("New Personal Database Project Templates"), DesktopIcon("folder_home") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- d->viewPersonalTempl = new TemplatesPage( Vertical, templPageFrame, "personal_page" );
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ d->viewPersonalTempl = new TemplatesPage(Qt::Vertical, templPageFrame, "personal_page" );
tmplyr->addWidget( d->viewPersonalTempl );
- connect(d->viewPersonalTempl->templates,SIGNAL(doubleClicked(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewPersonalTempl->templates,SIGNAL(returnPressed(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewPersonalTempl->templates,SIGNAL(currentChanged(QIconViewItem*)),this,SLOT(templateItemSelected(QIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(doubleClicked(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewPersonalTempl->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));
*/
//- page "business db"
@@ -371,12 +371,12 @@ void KexiStartupDialog::setupPageTemplates()
templPageFrame = d->templatesWidget->addPage (
i18n("Business Databases"), i18n("New Business Database Project Templates"),
DesktopIcon( "business_user" ));
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- d->viewBusinessTempl = new TemplatesPage( Vertical, templPageFrame, "business_page" );
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ d->viewBusinessTempl = new TemplatesPage(Qt::Vertical, templPageFrame, "business_page" );
tmplyr->addWidget( d->viewBusinessTempl );
- connect(d->viewBusinessTempl->templates,SIGNAL(doubleClicked(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewBusinessTempl->templates,SIGNAL(returnPressed(QIconViewItem*)),this,SLOT(templateItemExecuted(QIconViewItem*)));
- connect(d->viewBusinessTempl->templates,SIGNAL(currentChanged(QIconViewItem*)),this,SLOT(templateItemSelected(QIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(doubleClicked(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(returnPressed(TQIconViewItem*)),this,TQT_SLOT(templateItemExecuted(TQIconViewItem*)));
+ connect(d->viewBusinessTempl->templates,TQT_SIGNAL(currentChanged(TQIconViewItem*)),this,TQT_SLOT(templateItemSelected(TQIconViewItem*)));
*/
#endif //DB_TEMPLATES
@@ -385,17 +385,17 @@ void KexiStartupDialog::setupPageTemplates()
templPageFrame = d->templatesWidget->addPage(
i18n("Import Existing\nDatabase"), i18n("Import Existing Database as New Database Project"),
DesktopIcon("database_import") );
- tmplyr = new QVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
- QLabel *lbl_import = new QLabel(
+ tmplyr = new TQVBoxLayout(templPageFrame, 0, KDialogBase::spacingHint());
+ TQLabel *lbl_import = new TQLabel(
i18n("Kexi will import the structure and data of an existing database as a new database project.")
+clickMsg, templPageFrame );
- lbl_import->setAlignment(Qt::AlignAuto|Qt::AlignTop|Qt::WordBreak);
+ lbl_import->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop|TQt::WordBreak);
lbl_import->setMargin(0);
tmplyr->addWidget( lbl_import );
tmplyr->addStretch(1);
}
-void KexiStartupDialog::slotPageShown(QWidget *page)
+void KexiStartupDialog::slotPageShown(TQWidget *page)
{
int idx = d->templatesWidget->pageIndex(page);
// KIconView *templ = 0;
@@ -436,12 +436,12 @@ void KexiStartupDialog::slotPageShown(QWidget *page)
}
#if 0
-void KexiStartupDialog::templateItemSelected(QIconViewItem *)
+void KexiStartupDialog::templateItemSelected(TQIconViewItem *)
{
updateDialogOKButton(d->pageTemplates);
}
-void KexiStartupDialog::templateItemExecuted(QIconViewItem *item)
+void KexiStartupDialog::templateItemExecuted(TQIconViewItem *item)
{
if (!item)
return;
@@ -454,10 +454,10 @@ void KexiStartupDialog::templateItemExecuted(QIconViewItem *item)
void KexiStartupDialog::updateSelectedTemplateKeyInfo()
{
if (activePageIndex()!=d->pageTemplatesID) {//not a 'new db' tab is selected
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- QIconViewItem *item;
+ TQIconViewItem *item;
if (d->templatesWidget->activePageIndex()==d->templatesSectionID_blank) {
d->selectedTemplateKey = "blank";
}
@@ -468,25 +468,25 @@ void KexiStartupDialog::updateSelectedTemplateKeyInfo()
else if (d->templatesWidget->activePageIndex()==d->templatesSectionID_templates) {
item = d->viewTemplates->templates->currentItem();
if (!item) {
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- d->selectedTemplateKey=QString("personal/")+static_cast<TemplateItem*>(item)->key;
+ d->selectedTemplateKey=TQString("personal/")+static_cast<TemplateItem*>(item)->key;
}
/*later?
else if (d->templatesWidget->activePageIndex()==d->templatesSectionID_custom2) {
item = d->viewBusinessTempl->templates->currentItem();
if (!item) {
- d->selectedTemplateKey=QString::null;
+ d->selectedTemplateKey=TQString();
return;
}
- d->selectedTemplateKey=QString("business/")+static_cast<TemplateItem*>(item)->key;
+ d->selectedTemplateKey=TQString("business/")+static_cast<TemplateItem*>(item)->key;
}*/
#endif
}
#endif // 0
-void KexiStartupDialog::tabShown(QWidget *w)
+void KexiStartupDialog::tabShown(TQWidget *w)
{
// kdDebug() << "KexiStartupDialog::tabShown " << (long)w << " "<< long(d->pageTemplates)<<endl;
@@ -497,7 +497,7 @@ void KexiStartupDialog::tabShown(QWidget *w)
}
}
-void KexiStartupDialog::updateDialogOKButton(QWidget *w)
+void KexiStartupDialog::updateDialogOKButton(TQWidget *w)
{
if (!w) {
int idx = activePageIndex();
@@ -534,7 +534,7 @@ void KexiStartupDialog::updateDialogOKButton(QWidget *w)
enableButton(Ok,enable);
}
-/*QString KexiStartupDialog::selectedTemplateKey() const
+/*TQString KexiStartupDialog::selectedTemplateKey() const
{
return d->selectedTemplateKey;
}*/
@@ -545,7 +545,7 @@ void KexiStartupDialog::setupPageOpenExisting()
d->pageOpenExisting = plainPage();
else
d->pageOpenExisting = addPage( i18n("Open &Existing Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageOpenExisting, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageOpenExisting, 0, KDialogBase::spacingHint() );
d->openExistingConnWidget = new KexiConnSelectorWidget(*d->connSet,
":OpenExistingOrCreateNewProject",
@@ -559,11 +559,11 @@ void KexiStartupDialog::setupPageOpenExisting()
d->openExistingConnWidget->showAdvancedConn();
}
d->openExistingFileDlg = d->openExistingConnWidget->m_fileDlg;
- connect(d->openExistingFileDlg,SIGNAL(accepted()),this,SLOT(accept()));
- connect(d->openExistingConnWidget,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
- this,SLOT(connectionItemForOpenExistingExecuted(ConnectionDataLVItem*)));
- connect(d->openExistingConnWidget,SIGNAL(connectionItemHighlighted(ConnectionDataLVItem*)),
- this,SLOT(connectionItemForOpenExistingHighlighted(ConnectionDataLVItem*)));
+ connect(d->openExistingFileDlg,TQT_SIGNAL(accepted()),this,TQT_SLOT(accept()));
+ connect(d->openExistingConnWidget,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(connectionItemForOpenExistingExecuted(ConnectionDataLVItem*)));
+ connect(d->openExistingConnWidget,TQT_SIGNAL(connectionItemHighlighted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(connectionItemForOpenExistingHighlighted(ConnectionDataLVItem*)));
}
void KexiStartupDialog::connectionItemForOpenExistingExecuted(ConnectionDataLVItem *item)
@@ -602,14 +602,14 @@ void KexiStartupDialog::showAdvancedConnForOpenExisting()
d->openExistingConnWidget->showAdvancedConn();
}
-QString KexiStartupDialog::selectedFileName() const
+TQString KexiStartupDialog::selectedFileName() const
{
if (d->result == OpenExistingResult)
return d->existingFileToOpen;
else if (d->result == CreateFromTemplateResult && d->viewTemplates)
return d->viewTemplates->selectedFileName();
else
- return QString::null;
+ return TQString();
}
KexiDB::ConnectionData* KexiStartupDialog::selectedExistingConnection() const
@@ -617,7 +617,7 @@ KexiDB::ConnectionData* KexiStartupDialog::selectedExistingConnection() const
return d->selectedExistingConnection;
}
-void KexiStartupDialog::existingFileSelected(const QString &f)
+void KexiStartupDialog::existingFileSelected(const TQString &f)
{
if (f.isEmpty())
return;
@@ -629,11 +629,11 @@ void KexiStartupDialog::setupPageOpenRecent()
{
#ifdef KEXI_STARTUP_SHOW_RECENT
d->pageOpenRecent = addPage( i18n("Open &Recent Project") );
- QVBoxLayout *lyr = new QVBoxLayout( d->pageOpenRecent, 0, KDialogBase::spacingHint() );
+ TQVBoxLayout *lyr = new TQVBoxLayout( d->pageOpenRecent, 0, KDialogBase::spacingHint() );
lyr->addWidget( d->prj_selector = new KexiProjectSelectorWidget(
d->pageOpenRecent, "prj_selector", d->recentProjects ) );
- connect(d->prj_selector,SIGNAL(projectExecuted(KexiProjectData*)),
- this,SLOT(recentProjectItemExecuted(KexiProjectData*)));
+ connect(d->prj_selector,TQT_SIGNAL(projectExecuted(KexiProjectData*)),
+ this,TQT_SLOT(recentProjectItemExecuted(KexiProjectData*)));
#endif
}
@@ -654,12 +654,12 @@ void KexiStartupDialog::recentProjectItemExecuted(KexiProjectData *data)
}
//! used for accepting templates dialog with just return key press
-bool KexiStartupDialog::eventFilter( QObject *o, QEvent *e )
+bool KexiStartupDialog::eventFilter( TQObject *o, TQEvent *e )
{
if (o==d->templatesWidget_IconListBox && d->templatesWidget_IconListBox) {
- if (e->type()==QEvent::KeyPress
- && (static_cast<QKeyEvent*>(e)->key()==Key_Enter || static_cast<QKeyEvent*>(e)->key()==Key_Return)
- || e->type()==QEvent::MouseButtonDblClick)
+ if (e->type()==TQEvent::KeyPress
+ && (TQT_TQKEYEVENT(e)->key()==Key_Enter || TQT_TQKEYEVENT(e)->key()==Key_Return)
+ || e->type()==TQEvent::MouseButtonDblClick)
{
const int t_id = d->templatesWidget->activePageIndex();
if (t_id==d->templatesSectionID_blank || t_id==d->templatesSectionID_import) {
@@ -682,16 +682,16 @@ int KexiStartupDialog::activePageIndex() const
return 0; //there is always "plain page" #0 selected
}
-void KexiStartupDialog::templateSelected(const QString& fileName)
+void KexiStartupDialog::templateSelected(const TQString& fileName)
{
if (!fileName.isEmpty())
accept();
}
-QValueList<KexiProjectData::ObjectInfo> KexiStartupDialog::autoopenObjects() const
+TQValueList<KexiProjectData::ObjectInfo> KexiStartupDialog::autoopenObjects() const
{
if (d->result != CreateFromTemplateResult || !d->viewTemplates)
- QValueList<KexiProjectData::ObjectInfo>();
+ TQValueList<KexiProjectData::ObjectInfo>();
return d->viewTemplates->autoopenObjectsForSelectedTemplate();
}
diff --git a/kexi/main/startup/KexiStartupDialog.h b/kexi/main/startup/KexiStartupDialog.h
index 41f6064b9..0f994ff32 100644
--- a/kexi/main/startup/KexiStartupDialog.h
+++ b/kexi/main/startup/KexiStartupDialog.h
@@ -26,8 +26,8 @@
#include <kfileiconview.h>
#include <kfiledialog.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kexidb/connectiondata.h>
#include <core/kexiprojectdata.h>
@@ -46,6 +46,7 @@ class ConnectionDataLVItem;
class KEXIMAIN_EXPORT KexiStartupDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! The Dialog returns one of these values depending
@@ -88,7 +89,7 @@ public:
@param recentProjects a set of recent projects' info, used for "Open recent" tab
@param connSet conenction set used to present available conenctions
in "Open Existing" tab. Pass an empty object is this tab is not used.
- @param parent parent widget, if any.
+ @param tqparent tqparent widget, if any.
@param name name of this object.
*/
KexiStartupDialog(
@@ -96,7 +97,7 @@ public:
int dialogOptions,
KexiDBConnectionSet& connSet,
KexiProjectSet& recentProjects,
- QWidget *parent = 0, const char *name = 0 );
+ TQWidget *tqparent = 0, const char *name = 0 );
~KexiStartupDialog();
/*! \return true if startup dialog should be shown (info is taken from kexi config)
@@ -118,11 +119,11 @@ public:
(if result() == CreateFromTemplateResult).
Returns empty string if no such selection has been made or other tab was selected.
*/
- QString selectedFileName() const;
+ TQString selectedFileName() const;
/*! \return "autoopen" objects defined for selected template.
Only makes sense if template was used. */
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects() const;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects() const;
/*! \return a pointer to selected Kexi connection data.
(if "Open Existing" tab was selected and this connection data was clicked).
@@ -141,32 +142,32 @@ protected slots:
virtual void slotOk();
//! slot activated when one of page in templates window is shown
- void slotPageShown(QWidget *page);
+ void slotPageShown(TQWidget *page);
/*
//! Any icon view item has been executed (dblclicked)
- void templateItemExecuted(QIconViewItem *item);
+ void templateItemExecuted(TQIconViewItem *item);
//! Any icon view item has been selected
- void templateItemSelected(QIconViewItem *item);*/
+ void templateItemSelected(TQIconViewItem *item);*/
//! Any tab has been selected
- void tabShown(QWidget *w);
+ void tabShown(TQWidget *w);
- void templateSelected(const QString& fileName);
+ void templateSelected(const TQString& fileName);
//! helper
void recentProjectItemExecuted(KexiProjectData *data);
- void existingFileSelected(const QString &f);
+ void existingFileSelected(const TQString &f);
void showSimpleConnForOpenExisting();
void showAdvancedConnForOpenExisting();
void connectionItemForOpenExistingExecuted(ConnectionDataLVItem *item);
void connectionItemForOpenExistingHighlighted(ConnectionDataLVItem *item);
protected:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! helper: updates a state of dialog's OK button
- void updateDialogOKButton(QWidget *w);
+ void updateDialogOKButton(TQWidget *w);
//! internal reimplementation
int activePageIndex() const;
diff --git a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
index 3a64fbace..52fe08707 100644
--- a/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
+++ b/kexi/main/startup/KexiStartupDialogTemplatesPage.cpp
@@ -26,7 +26,7 @@
#include "KexiConnSelector.h"
#include "KexiConnSelectorBase.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -36,14 +36,14 @@
#define KEXI_STARTUP_SHOW_RECENT
#endif
-/*QPixmap createIcon()
+/*TQPixmap createIcon()
{
}*/
-/*QString createText(const QString& name, const QString& description)
+/*TQString createText(const TQString& name, const TQString& description)
{
- QString txt = "<H2>" + name + "</H2>";
+ TQString txt = "<H2>" + name + "</H2>";
if (description.isEmpty())
return name + description
}*/
@@ -52,10 +52,10 @@
class TemplateItem : public KListViewItem
{
public:
- TemplateItem(QListView* parent, const QString& aFilename,
- const QString& name, const QString& description, const QPixmap& icon,
- const QValueList<KexiProjectData::ObjectInfo>& aAutoopenObjects)
- : KListViewItem(parent, name + "\n" + description)
+ TemplateItem(TQListView* tqparent, const TQString& aFilename,
+ const TQString& name, const TQString& description, const TQPixmap& icon,
+ const TQValueList<KexiProjectData::ObjectInfo>& aAutoopenObjects)
+ : KListViewItem(tqparent, name + "\n" + description)
, autoopenObjects(aAutoopenObjects)
, filename(aFilename)
{
@@ -63,22 +63,22 @@ class TemplateItem : public KListViewItem
}
~TemplateItem() {}
- QValueList<KexiProjectData::ObjectInfo> autoopenObjects;
- QString filename;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjects;
+ TQString filename;
};
//-----------------------
-KexiStartupDialogTemplatesPage::KexiStartupDialogTemplatesPage( QWidget * parent )
- : KListView(parent, "KexiStartupDialogTemplatesPage")
+KexiStartupDialogTemplatesPage::KexiStartupDialogTemplatesPage( TQWidget * tqparent )
+ : KListView(tqparent, "KexiStartupDialogTemplatesPage")
, m_popuplated(false)
{
- addColumn(QString::null);
+ addColumn(TQString());
header()->hide();
setColumnWidthMode(0, Maximum);
setResizeMode(LastColumn);
setItemMargin(6);
- connect(this,SIGNAL(executed(QListViewItem*)), this, SLOT(slotExecuted(QListViewItem*)));
+ connect(this,TQT_SIGNAL(executed(TQListViewItem*)), this, TQT_SLOT(slotExecuted(TQListViewItem*)));
}
KexiStartupDialogTemplatesPage::~KexiStartupDialogTemplatesPage()
@@ -91,7 +91,7 @@ void KexiStartupDialogTemplatesPage::populate()
return;
m_popuplated = true;
KexiTemplateInfo::List list = KexiTemplateLoader::loadListInfo();
- foreach( QValueList<KexiTemplateInfo>::ConstIterator, it, list ) {
+ foreach( TQValueList<KexiTemplateInfo>::ConstIterator, it, list ) {
new TemplateItem(this, (*it).filename, (*it).name,
(*it).description, (*it).icon, (*it).autoopenObjects);
}
@@ -104,12 +104,12 @@ void KexiStartupDialogTemplatesPage::populate()
// info = new KTextBrowser(this,"info");
// setResizeMode(templates,KeepSize);
// setResizeMode(info,KeepSize);
-// connect(templates,SIGNAL(selectionChanged(QIconViewItem*)),this,SLOT(itemClicked(QIconViewItem*)));
+// connect(templates,TQT_SIGNAL(selectionChanged(TQIconViewItem*)),this,TQT_SLOT(itemClicked(TQIconViewItem*)));
}
/*
-void TemplatesPage::addItem(const QString& key, const QString& name,
- const QString& description, const QPixmap& icon)
+void TemplatesPage::addItem(const TQString& key, const TQString& name,
+ const TQString& description, const TQPixmap& icon)
{
TemplateItem *item = new TemplateItem(templates, name, icon);
item->key=key;
@@ -117,35 +117,35 @@ void TemplatesPage::addItem(const QString& key, const QString& name,
item->description=description;
}
-void TemplatesPage::itemClicked(QIconViewItem *item) {
+void TemplatesPage::itemClicked(TQIconViewItem *item) {
if (!item) {
info->setText("");
return;
}
- QString t = QString("<h2>%1</h2><p>%2</p>")
- .arg(static_cast<TemplateItem*>(item)->name)
- .arg(static_cast<TemplateItem*>(item)->description);
+ TQString t = TQString("<h2>%1</h2><p>%2</p>")
+ .tqarg(static_cast<TemplateItem*>(item)->name)
+ .tqarg(static_cast<TemplateItem*>(item)->description);
#ifndef DB_TEMPLATES
- t += QString("<p>") + i18n("We are sorry, templates are not yet available.") +"</p>";
+ t += TQString("<p>") + i18n("We are sorry, templates are not yet available.") +"</p>";
#endif
info->setText( t );
}*/
-QString KexiStartupDialogTemplatesPage::selectedFileName() const
+TQString KexiStartupDialogTemplatesPage::selectedFileName() const
{
TemplateItem* templateItem = static_cast<TemplateItem*>(selectedItem());
- return templateItem ? templateItem->filename : QString::null;
+ return templateItem ? templateItem->filename : TQString();
}
-QValueList<KexiProjectData::ObjectInfo>
+TQValueList<KexiProjectData::ObjectInfo>
KexiStartupDialogTemplatesPage::autoopenObjectsForSelectedTemplate() const
{
TemplateItem* templateItem = static_cast<TemplateItem*>(selectedItem());
- return templateItem ? templateItem->autoopenObjects : QValueList<KexiProjectData::ObjectInfo>();
+ return templateItem ? templateItem->autoopenObjects : TQValueList<KexiProjectData::ObjectInfo>();
}
-void KexiStartupDialogTemplatesPage::slotExecuted(QListViewItem* item)
+void KexiStartupDialogTemplatesPage::slotExecuted(TQListViewItem* item)
{
TemplateItem* templateItem = static_cast<TemplateItem*>(item);
if (!templateItem)
diff --git a/kexi/main/startup/KexiStartupDialogTemplatesPage.h b/kexi/main/startup/KexiStartupDialogTemplatesPage.h
index 8613065f6..2cf50b7bf 100644
--- a/kexi/main/startup/KexiStartupDialogTemplatesPage.h
+++ b/kexi/main/startup/KexiStartupDialogTemplatesPage.h
@@ -27,26 +27,27 @@
class KEXIMAIN_EXPORT KexiStartupDialogTemplatesPage : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiStartupDialogTemplatesPage( QWidget * parent = 0 );
+ KexiStartupDialogTemplatesPage( TQWidget * tqparent = 0 );
~KexiStartupDialogTemplatesPage();
-// void addItem(const QString& key, const QString& name,
-// const QString& description, const QPixmap& icon);
+// void addItem(const TQString& key, const TQString& name,
+// const TQString& description, const TQPixmap& icon);
- QString selectedFileName() const;
+ TQString selectedFileName() const;
- QValueList<KexiProjectData::ObjectInfo> autoopenObjectsForSelectedTemplate() const;
+ TQValueList<KexiProjectData::ObjectInfo> autoopenObjectsForSelectedTemplate() const;
void populate();
signals:
- void selected(const QString& filename);
+ void selected(const TQString& filename);
protected slots:
- void slotExecuted(QListViewItem* item);
+ void slotExecuted(TQListViewItem* item);
-// void itemClicked(QIconViewItem *item);
+// void itemClicked(TQIconViewItem *item);
private:
bool m_popuplated : 1;
diff --git a/kexi/main/startup/KexiStartupFileDialog.cpp b/kexi/main/startup/KexiStartupFileDialog.cpp
index d28699250..c19a96c0b 100644
--- a/kexi/main/startup/KexiStartupFileDialog.cpp
+++ b/kexi/main/startup/KexiStartupFileDialog.cpp
@@ -23,10 +23,10 @@
#include <core/kexi.h>
#include <kexiutils/utils.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpushbutton.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpushbutton.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -36,46 +36,46 @@
#include <kurlcombobox.h>
KexiStartupFileDialog::KexiStartupFileDialog(
- const QString& startDirOrVariable, int mode,
- QWidget *parent, const char *name)
- : KexiStartupFileDialogBase(startDirOrVariable, "", parent, name, 0)
+ const TQString& startDirOrVariable, int mode,
+ TQWidget *tqparent, const char *name)
+ : KexiStartupFileDialogBase(startDirOrVariable, "", tqparent, name, 0)
, m_confirmOverwrites(true)
, m_filtersUpdated(false)
{
- setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Minimum);
+ tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Minimum);
setMode( mode );
- QPoint point( 0, 0 );
- reparent( parentWidget(), point );
+ TQPoint point( 0, 0 );
+ reparent( tqparentWidget(), point );
- if (layout())
- layout()->setMargin(0);
+ if (tqlayout())
+ tqlayout()->setMargin(0);
setMinimumHeight(100);
setSizeGripEnabled ( false );
//dirty hack to customize filedialog view:
{
- QObjectList *l = queryList( "QPushButton" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList( TQPUSHBUTTON_OBJECT_NAME_STRING );
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- static_cast<QPushButton*>(obj)->hide();
+ static_cast<TQPushButton*>(TQT_TQWIDGET(obj))->hide();
}
delete l;
}
{
- QObjectList *l = queryList("QWidget");
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- static_cast<QWidget*>(obj)->installEventFilter(this);
+ TQT_TQWIDGET(obj)->installEventFilter(this);
}
delete l;
}
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
if (startDirOrVariable.startsWith(":"))
m_lastVisitedPathsVariable = startDirOrVariable; //store for later use
#else
@@ -86,7 +86,7 @@ KexiStartupFileDialog::KexiStartupFileDialog(
KexiStartupFileDialog::~KexiStartupFileDialog()
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
saveLastVisitedPath(currentFileName());
#endif
}
@@ -98,24 +98,24 @@ void KexiStartupFileDialog::setMode(int mode)
m_filtersUpdated = false;
}
-QStringList KexiStartupFileDialog::additionalFilters() const
+TQStringList KexiStartupFileDialog::additionalFilters() const
{
return m_additionalMimeTypes;
}
-void KexiStartupFileDialog::setAdditionalFilters(const QStringList &mimeTypes)
+void KexiStartupFileDialog::setAdditionalFilters(const TQStringList &mimeTypes)
{
//delayed
m_additionalMimeTypes = mimeTypes;
m_filtersUpdated = false;
}
-QStringList KexiStartupFileDialog::excludedFilters() const
+TQStringList KexiStartupFileDialog::excludedFilters() const
{
return m_excludedMimeTypes;
}
-void KexiStartupFileDialog::setExcludedFilters(const QStringList &mimeTypes)
+void KexiStartupFileDialog::setExcludedFilters(const TQStringList &mimeTypes)
{
//delayed
m_excludedMimeTypes = mimeTypes;
@@ -128,35 +128,35 @@ void KexiStartupFileDialog::updateFilters()
return;
m_filtersUpdated = true;
- m_lastFileName = QString::null;
+ m_lastFileName = TQString();
// m_lastUrl = KURL();
clearFilter();
- QString filter;
+ TQString filter;
KMimeType::Ptr mime;
- QStringList allfilters;
+ TQStringList allfilters;
const bool normalOpeningMode = m_mode & Opening && !(m_mode & Custom);
const bool normalSavingMode = m_mode & SavingFileBasedDB && !(m_mode & Custom);
if (normalOpeningMode || normalSavingMode) {
mime = KMimeType::mimeType( KexiDB::Driver::defaultFileBasedDriverMimeType() );
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
if (normalOpeningMode || m_mode & SavingServerBasedDB) {
mime = KMimeType::mimeType("application/x-kexiproject-shortcut");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
if (normalOpeningMode || m_mode & SavingServerBasedDB) {
mime = KMimeType::mimeType("application/x-kexi-connectiondata");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
@@ -165,37 +165,37 @@ void KexiStartupFileDialog::updateFilters()
//! @todo hardcoded for MSA:
if (normalOpeningMode) {
mime = KMimeType::mimeType("application/x-msaccess");
- if (mime && m_excludedMimeTypes.find(mime->name())==m_excludedMimeTypes.end()) {
+ if (mime && m_excludedMimeTypes.tqfind(mime->name())==m_excludedMimeTypes.end()) {
filter += KexiUtils::fileDialogFilterString(mime);
allfilters += mime->patterns();
}
}
- foreach (QStringList::ConstIterator, it, m_additionalMimeTypes) {
+ foreach (TQStringList::ConstIterator, it, m_additionalMimeTypes) {
if (*it == "all/allfiles")
continue;
- if (m_excludedMimeTypes.find(*it)!=m_excludedMimeTypes.end())
+ if (m_excludedMimeTypes.tqfind(*it)!=m_excludedMimeTypes.end())
continue;
filter += KexiUtils::fileDialogFilterString(*it);
mime = KMimeType::mimeType(*it);
allfilters += mime->patterns();
}
- if (m_excludedMimeTypes.find("all/allfiles")==m_excludedMimeTypes.end())
+ if (m_excludedMimeTypes.tqfind("all/allfiles")==m_excludedMimeTypes.end())
filter += KexiUtils::fileDialogFilterString("all/allfiles");
// mime = KMimeType::mimeType("all/allfiles");
// if (mime) {
-// filter += QString(mime->patterns().isEmpty() ? "*" : mime->patterns().join(" "))
+// filter += TQString(mime->patterns().isEmpty() ? "*" : mime->patterns().join(" "))
// + "|" + mime->comment()+ " (*)\n";
// }
//remove duplicates made because upper- and lower-case extenstions are used:
- QStringList allfiltersUnique;
- QDict<char> uniqueDict(499, false);
- foreach (QStringList::ConstIterator, it, allfilters) {
+ TQStringList allfiltersUnique;
+ TQDict<char> uniqueDict(499, false);
+ foreach (TQStringList::ConstIterator, it, allfilters) {
// kdDebug() << *it << endl;
uniqueDict.insert(*it, (char*)1);
}
- foreach_dict (QDictIterator<char>, it, uniqueDict) {
+ foreach_dict (TQDictIterator<char>, it, uniqueDict) {
allfiltersUnique += it.currentKey();
}
allfiltersUnique.sort();
@@ -226,22 +226,22 @@ void KexiStartupFileDialog::show()
}
//KURL KexiStartupFileDialog::currentURL()
-QString KexiStartupFileDialog::currentFileName()
+TQString KexiStartupFileDialog::currentFileName()
{
- setResult( QDialog::Accepted ); // selectedURL tests for it
+ setResult( TQDialog::Accepted ); // selectedURL tests for it
-#ifdef Q_WS_WIN
-// QString path = selectedFile();
+#ifdef TQ_WS_WIN
+// TQString path = selectedFile();
//js @todo
// kdDebug() << "selectedFile() == " << path << " '" << url().fileName() << "' " << m_lineEdit->text() << endl;
- QString path = dir()->absPath();
+ TQString path = dir()->absPath();
if (!path.endsWith("/") && !path.endsWith("\\"))
path.append("/");
path += m_lineEdit->text();
-// QString path = QFileInfo(selectedFile()).dirPath(true) + "/" + m_lineEdit->text();
+// TQString path = TQFileInfo(selectedFile()).dirPath(true) + "/" + m_lineEdit->text();
#else
-// QString path = locationEdit->currentText().stripWhiteSpace(); //url.path().stripWhiteSpace(); that does not work, if the full path is not in the location edit !!!!!
- QString path=KexiStartupFileDialogBase::selectedURL().path();
+// TQString path = locationEdit->currentText().stripWhiteSpace(); //url.path().stripWhiteSpace(); that does not work, if the full path is not in the location edit !!!!!
+ TQString path=KexiStartupFileDialogBase::selectedURL().path();
kdDebug() << "prev selectedURL() == " << path <<endl;
kdDebug() << "locationEdit == " << locationEdit->currentText().stripWhiteSpace() <<endl;
//make sure user-entered path is acceped:
@@ -254,22 +254,22 @@ QString KexiStartupFileDialog::currentFileName()
if (!currentFilter().isEmpty()) {
if (m_mode & SavingFileBasedDB) {
- QStringList filters = QStringList::split(" ", currentFilter()); //.first().stripWhiteSpace();
+ TQStringList filters = TQStringList::split(" ", currentFilter()); //.first().stripWhiteSpace();
kdDebug()<< " filter == " << filters << endl;
- QString ext = QFileInfo(path).extension(false);
+ TQString ext = TQFileInfo(path).extension(false);
bool hasExtension = false;
- for (QStringList::ConstIterator filterIt = filters.constBegin();
+ for (TQStringList::ConstIterator filterIt = filters.constBegin();
filterIt != filters.constEnd() && !hasExtension; ++filterIt)
{
- QString f( (*filterIt).stripWhiteSpace() );
+ TQString f( (*filterIt).stripWhiteSpace() );
hasExtension = !f.mid(2).isEmpty() && ext==f.mid(2);
}
if (!hasExtension) {
//no extension: add one
- QString defaultExtension( m_defaultExtension );
+ TQString defaultExtension( m_defaultExtension );
if (defaultExtension.isEmpty())
defaultExtension = filters.first().stripWhiteSpace().mid(2); //first one
- path+=(QString(".")+defaultExtension);
+ path+=(TQString(".")+defaultExtension);
kdDebug() << "KexiStartupFileDialog::checkURL(): append extension, " << path << endl;
setSelection( path );
}
@@ -284,8 +284,8 @@ QString KexiStartupFileDialog::currentFileName()
bool KexiStartupFileDialog::checkFileName()
{
// KURL url = currentURL();
-// QString path = url.path().stripWhiteSpace();
- QString path = currentFileName().stripWhiteSpace();
+// TQString path = url.path().stripWhiteSpace();
+ TQString path = currentFileName().stripWhiteSpace();
// if (url.fileName().stripWhiteSpace().isEmpty()) {
if (path.isEmpty()) {
@@ -296,11 +296,11 @@ bool KexiStartupFileDialog::checkFileName()
kdDebug() << "KexiStartupFileDialog::checkURL() path: " << path << endl;
// kdDebug() << "KexiStartupFileDialog::checkURL() fname: " << url.fileName() << endl;
//todo if ( url.isLocalFile() ) {
- QFileInfo fi(path);
+ TQFileInfo fi(path);
if (mode() & KFile::ExistingOnly) {
if ( !fi.exists() ) {
KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" does not exist." )
- .arg( QDir::convertSeparators(path) ) );
+ .tqarg( TQDir::convertSeparators(path) ) );
return false;
}
else if (mode() & KFile::File) {
@@ -310,7 +310,7 @@ bool KexiStartupFileDialog::checkFileName()
}
else if (!fi.isReadable()) {
KMessageBox::error( this, "<qt>"+i18n( "The file \"%1\" is not readable." )
- .arg( QDir::convertSeparators(path) ) );
+ .tqarg( TQDir::convertSeparators(path) ) );
return false;
}
}
@@ -323,13 +323,13 @@ bool KexiStartupFileDialog::checkFileName()
}
//static
-bool KexiStartupFileDialog::askForOverwriting(const QString& filePath, QWidget *parent)
+bool KexiStartupFileDialog::askForOverwriting(const TQString& filePath, TQWidget *tqparent)
{
- QFileInfo fi(filePath);
+ TQFileInfo fi(filePath);
if (!fi.exists())
return true;
- const int res = KMessageBox::warningYesNo( parent, i18n( "The file \"%1\" already exists.\n"
- "Do you want to overwrite it?").arg( QDir::convertSeparators(filePath) ), QString::null,
+ const int res = KMessageBox::warningYesNo( tqparent, i18n( "The file \"%1\" already exists.\n"
+ "Do you want to overwrite it?").tqarg( TQDir::convertSeparators(filePath) ), TQString(),
i18n("Overwrite"), KStdGuiItem::no() );
if (res == KMessageBox::Yes)
return true;
@@ -339,17 +339,17 @@ bool KexiStartupFileDialog::askForOverwriting(const QString& filePath, QWidget *
void KexiStartupFileDialog::accept()
{
// locationEdit->setFocus();
-// QKeyEvent ev(QEvent::KeyPress, Qt::Key_Enter, '\n', 0);
-// QApplication::sendEvent(locationEdit, &ev);
-// QApplication::postEvent(locationEdit, &ev);
+// TQKeyEvent ev(TQEvent::KeyPress, TQt::Key_Enter, '\n', 0);
+// TQApplication::sendEvent(locationEdit, &ev);
+// TQApplication::postEvent(locationEdit, &ev);
// kdDebug() << "KexiStartupFileDialog::accept() m_lastUrl == " << m_lastUrl.path() << endl;
// if (m_lastUrl.path()==currentURL().path()) {//(js) to prevent more multiple kjob signals (I do not know why this is)
if (m_lastFileName==currentFileName()) {//(js) to prevent more multiple kjob signals (I do not know why this is)
// m_lastUrl=KURL();
- m_lastFileName=QString::null;
+ m_lastFileName=TQString();
kdDebug() << "m_lastFileName==currentFileName()" << endl;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
return;
#endif
}
@@ -365,7 +365,7 @@ void KexiStartupFileDialog::accept()
// m_lastUrl = currentURL();
m_lastFileName = currentFileName();
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
saveLastVisitedPath(m_lastFileName);
#endif
}
@@ -376,7 +376,7 @@ void KexiStartupFileDialog::reject()
emit rejected();
}
-/*#ifndef Q_WS_WIN
+/*#ifndef TQ_WS_WIN
KURLComboBox *KexiStartupFileDialog::locationWidget() const
{
return locationEdit;
@@ -384,9 +384,9 @@ KURLComboBox *KexiStartupFileDialog::locationWidget() const
#endif
*/
-void KexiStartupFileDialog::setLocationText(const QString& fn)
+void KexiStartupFileDialog::setLocationText(const TQString& fn)
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//js @todo
setSelection(fn);
#else
@@ -399,19 +399,19 @@ void KexiStartupFileDialog::setLocationText(const QString& fn)
void KexiStartupFileDialog::setFocus()
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
m_lineEdit->setFocus();
#else
locationEdit->setFocus();
#endif
}
-bool KexiStartupFileDialog::eventFilter ( QObject * watched, QEvent * e )
+bool KexiStartupFileDialog::eventFilter ( TQObject * watched, TQEvent * e )
{
//filter-out ESC key
- if (e->type()==QEvent::KeyPress && static_cast<QKeyEvent*>(e)->key()==Qt::Key_Escape
- && static_cast<QKeyEvent*>(e)->state()==Qt::NoButton) {
- static_cast<QKeyEvent*>(e)->accept();
+ if (e->type()==TQEvent::KeyPress && TQT_TQKEYEVENT(e)->key()==TQt::Key_Escape
+ && TQT_TQKEYEVENT(e)->state()==Qt::NoButton) {
+ TQT_TQKEYEVENT(e)->accept();
emit rejected();
return true;
}
diff --git a/kexi/main/startup/KexiStartupFileDialog.h b/kexi/main/startup/KexiStartupFileDialog.h
index 87ebf7f4d..12fc3ef40 100644
--- a/kexi/main/startup/KexiStartupFileDialog.h
+++ b/kexi/main/startup/KexiStartupFileDialog.h
@@ -22,7 +22,7 @@
#include <kfiledialog.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
# include "KexiStartupFileDialogBase_win.h"
#else
typedef KFileDialog KexiStartupFileDialogBase;
@@ -33,6 +33,7 @@
class KEXIMAIN_EXPORT KexiStartupFileDialog : public KexiStartupFileDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Dialog mode:
@@ -49,43 +50,43 @@ public:
};
KexiStartupFileDialog(
- const QString& startDirOrVariable, int mode, QWidget *parent=0, const char *name=0);
+ const TQString& startDirOrVariable, int mode, TQWidget *tqparent=0, const char *name=0);
virtual ~KexiStartupFileDialog();
/*! Helper. Displays "The file %1 already exists. Do you want to overwrite it?" yes/no message box.
- \a parent is used as a parent of the KMessageBox.
+ \a tqparent is used as a tqparent of the KMessageBox.
\return true if \a filePath file does not exists or user has agreed on overwriting,
false in user do not want to overwrite. */
- static bool askForOverwriting(const QString& filePath, QWidget *parent = 0);
+ static bool askForOverwriting(const TQString& filePath, TQWidget *tqparent = 0);
void setMode(int mode);
- QStringList additionalFilters() const;
+ TQStringList additionalFilters() const;
//! Sets additional filters list, e.g. "text/x-csv"
- void setAdditionalFilters(const QStringList &mimeTypes);
+ void setAdditionalFilters(const TQStringList &mimeTypes);
- QStringList excludedFilters() const;
+ TQStringList excludedFilters() const;
//! Excludes filters list
- void setExcludedFilters(const QStringList &mimeTypes);
+ void setExcludedFilters(const TQStringList &mimeTypes);
// KURL currentURL();
- QString currentFileName();
+ TQString currentFileName();
-//#ifndef Q_WS_WIN
+//#ifndef TQ_WS_WIN
// KURLComboBox *locationWidget() const;
//#endif
//! just sets locationWidget()->setCurrentText(fn)
//! (and something similar on win32)
- void setLocationText(const QString& fn);
+ void setLocationText(const TQString& fn);
//! Sets default extension which will be added after accepting
//! if user didn't provided one. This method is usable when there is
//! more than one filter so there is no rule what extension should be selected
//! (by default first one is selected).
- void setDefaultExtension(const QString& ext) { m_defaultExtension = ext; }
+ void setDefaultExtension(const TQString& ext) { m_defaultExtension = ext; }
/*! \return true if the current URL meets requies constraints
(i.e. exists or doesn't exist);
@@ -97,7 +98,7 @@ public:
This is true by default. */
void setConfirmOverwrites(bool set) { m_confirmOverwrites = set; }
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
public slots:
virtual void show();
@@ -120,10 +121,10 @@ private:
void updateFilters();
// KURL m_lastUrl;
- QString m_lastFileName;
+ TQString m_lastFileName;
int m_mode;
- QStringList m_additionalMimeTypes, m_excludedMimeTypes;
- QString m_defaultExtension;
+ TQStringList m_additionalMimeTypes, m_excludedMimeTypes;
+ TQString m_defaultExtension;
bool m_confirmOverwrites : 1;
bool m_filtersUpdated : 1;
};
diff --git a/kexi/main/startup/KexiStartupFileDialogBase_win.h b/kexi/main/startup/KexiStartupFileDialogBase_win.h
index 7d7f56e03..00742c690 100644
--- a/kexi/main/startup/KexiStartupFileDialogBase_win.h
+++ b/kexi/main/startup/KexiStartupFileDialogBase_win.h
@@ -20,47 +20,47 @@
#ifndef _KexiStartupFileDialogBase_win_h_
#define _KexiStartupFileDialogBase_win_h_
-#include <qfiledialog.h>
-#include <qpushbutton.h>
+#include <tqfiledialog.h>
+#include <tqpushbutton.h>
class KexiStartupFileDialogBasePrivate;
-/*! Wrapper for win32-like file dialog. QFileDialog is used for this.
- Temporary moved from QKW KFileDialog implementation.
+/*! Wrapper for win32-like file dialog. TQFileDialog is used for this.
+ Temporary moved from TQKW KFileDialog implementation.
TODO: move to KDElibs/win32 KFileDialog wrapper
*/
-class KexiStartupFileDialogBase : public QFileDialog
+class KexiStartupFileDialogBase : public TQFileDialog
{
public:
- KexiStartupFileDialogBase(const QString & dirName, const QString & filter = QString::null,
- QWidget * parent = 0, const char * name = 0, bool modal = false );
+ KexiStartupFileDialogBase(const TQString & dirName, const TQString & filter = TQString(),
+ TQWidget * tqparent = 0, const char * name = 0, bool modal = false );
~KexiStartupFileDialogBase();
- QPushButton * okButton() const { return m_okBtn; }
+ TQPushButton * okButton() const { return m_okBtn; }
void clearFilter();
- void setFilter(const QString& filter);
+ void setFilter(const TQString& filter);
void setOperationMode( KFileDialog::OperationMode mode );
void setMode( KFile::Mode m );
void setMode( unsigned int m );
- QString currentFilter() const;
- void setMimeFilter( const QStringList& mimeTypes, const QString& defaultType = QString::null );
+ TQString currentFilter() const;
+ void setMimeFilter( const TQStringList& mimeTypes, const TQString& defaultType = TQString() );
KFile::Mode mode() const;
protected:
- void init(const QString& startDir, const QString& filter, QWidget* widget);
+ void init(const TQString& startDir, const TQString& filter, TQWidget* widget);
void updateAutoSelectExtension() {};
- //! Helper added because QFileDialog on win32 doesn't support ":" prefixes
+ //! Helper added because TQFileDialog on win32 doesn't support ":" prefixes
//! for recent dir's storage.
- QString realStartDir(const QString& startDir);
+ TQString realStartDir(const TQString& startDir);
- void saveLastVisitedPath(const QString& path);
+ void saveLastVisitedPath(const TQString& path);
- QPushButton* m_okBtn;
- QLineEdit* m_lineEdit;
- QString m_lastVisitedPathsVariable; //!< Used by win32; @see realStartDir()
+ TQPushButton* m_okBtn;
+ TQLineEdit* m_lineEdit;
+ TQString m_lastVisitedPathsVariable; //!< Used by win32; @see realStartDir()
KexiStartupFileDialogBasePrivate* d;
};
diff --git a/kexi/main/startup/KexiStartupFileDialog_win.cpp b/kexi/main/startup/KexiStartupFileDialog_win.cpp
index aa06fb9a1..a51cd0c4e 100644
--- a/kexi/main/startup/KexiStartupFileDialog_win.cpp
+++ b/kexi/main/startup/KexiStartupFileDialog_win.cpp
@@ -18,7 +18,7 @@
*/
/*!
- Temporary moved from QKW KFileDialog implementation.
+ Temporary moved from TQKW KFileDialog implementation.
TODO: move to KDElibs/win32 KFileDialog wrapper
*/
@@ -29,8 +29,8 @@
#include <kdebug.h>
#include <krecentdirs.h>
-#include <qobjectlist.h>
-#include <qlineedit.h>
+#include <tqobjectlist.h>
+#include <tqlineedit.h>
#include <win/win32_utils.h>
@@ -41,31 +41,31 @@ class KexiStartupFileDialogBasePrivate
KexiStartupFileDialogBasePrivate()
{}
KFile::Mode mode;
- QString kde_filters;
- QStringList mimetypes;
+ TQString kde_filters;
+ TQStringList mimetypes;
};
KexiStartupFileDialogBase::KexiStartupFileDialogBase(
- const QString & dirName, const QString & filter,
- QWidget * parent, const char * name, bool modal )
- : QFileDialog( realStartDir(dirName), filter, parent, name, modal )
+ const TQString & dirName, const TQString & filter,
+ TQWidget * tqparent, const char * name, bool modal )
+ : TQFileDialog( realStartDir(dirName), filter, tqparent, name, modal )
, d(new KexiStartupFileDialogBasePrivate())
{
-// QString _dirName = dirName;
- QString _dirName = dirPath();
+// TQString _dirName = dirName;
+ TQString _dirName = dirPath();
//make default 'My Documents' folder
//TODO: store changes in the app's config file?
if (_dirName.isEmpty())
_dirName = KGlobalSettings::documentPath();
- init(_dirName, filter, parent);
+ init(_dirName, filter, tqparent);
- //find "OK" button
- QObjectList *l = queryList( "QPushButton", "OK", false );
- m_okBtn = dynamic_cast<QPushButton*>(l->first());
+ //tqfind "OK" button
+ TQObjectList *l = queryList( TQPUSHBUTTON_OBJECT_NAME_STRING, "OK", false );
+ m_okBtn = dynamic_cast<TQPushButton*>(l->first());
delete l;
- l = queryList( "QLineEdit", "name/filter editor", false );
- m_lineEdit = dynamic_cast<QLineEdit*>(l->first());
+ l = queryList( TQLINEEDIT_OBJECT_NAME_STRING, "name/filter editor", false );
+ m_lineEdit = dynamic_cast<TQLineEdit*>(l->first());
delete l;
adjustSize();
@@ -75,7 +75,7 @@ KexiStartupFileDialogBase::~KexiStartupFileDialogBase()
{
}
-void KexiStartupFileDialogBase::init(const QString& startDir, const QString& filter, QWidget* widget)
+void KexiStartupFileDialogBase::init(const TQString& startDir, const TQString& filter, TQWidget* widget)
{
//TODO initStatic();
//TODO d = new KFileDialogPrivate();
@@ -85,16 +85,16 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
//TODO d->operationMode = Opening;
setMode(KFile::File | KFile::ExistingOnly); //(js) default: open action
setIcon( KGlobal::iconLoader()->loadIcon("fileopen", KIcon::Desktop) );
- setDir(QDir(startDir));
+ setDir(TQDir(startDir));
//TODO d->hasDefaultFilter = false;
//TODO d->hasView = false;
-//(js) d->mainWidget = new QWidget( this, "KFileDialog::mainWidget");
+//(js) d->mainWidget = new TQWidget( this, "KFileDialog::mainWidget");
//(js) setMainWidget( d->mainWidget );
//(js) d->okButton = new KPushButton( KStdGuiItem::ok(), d->mainWidget );
//(js) d->okButton->setDefault( true );
//(js) d->cancelButton = new KPushButton(KStdGuiItem::cancel(), d->mainWidget);
-//(js) connect( d->okButton, SIGNAL( clicked() ), SLOT( slotOk() ));
-//(js) connect( d->cancelButton, SIGNAL( clicked() ), SLOT( slotCancel() ));
+//(js) connect( d->okButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOk() ));
+//(js) connect( d->cancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancel() ));
//(js) d->customWidget = widget;
//(js) d->autoSelectExtCheckBox = 0; // delayed loading
//TODO d->autoSelectExtChecked = false;
@@ -105,42 +105,42 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
//TODO true );
//TODO d->completionLock = false;
-//TODO QtMsgHandler oldHandler = qInstallMsgHandler( silenceQToolBar );
+//TODO TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar );
//TODO toolbar = 0; //(js)
//(js) toolbar = new KToolBar( d->mainWidget, "KFileDialog::toolbar", true);
//(js) toolbar->setFlat(true);
-//TODO qInstallMsgHandler( oldHandler );
+//TODO tqInstallMsgHandler( oldHandler );
//(js) d->pathCombo = new KURLComboBox( KURLComboBox::Directories, true,
//(js) toolbar, "path combo" );
-//(js) QToolTip::add( d->pathCombo, i18n("Often used directories") );
-//(js) QWhatsThis::add( d->pathCombo, "<qt>" + i18n("Commonly used locations are listed here. "
+//(js) TQToolTip::add( d->pathCombo, i18n("Often used directories") );
+//(js) TQWhatsThis::add( d->pathCombo, "<qt>" + i18n("Commonly used locations are listed here. "
//(js) "This includes standard locations, such as your home directory, as well as "
//(js) "locations that have been visited recently.") + autocompletionWhatsThisText);
/*
KURL u;
- u.setPath( QDir::rootDirPath() );
- QString text = i18n("Root Directory: %1").arg( u.path() );
+ u.setPath( TQDir::rootDirPath() );
+ TQString text = i18n("Root Directory: %1").tqarg( u.path() );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
- u.setPath( QDir::homeDirPath() );
- text = i18n("Home Directory: %1").arg( u.path( +1 ) );
+ u.setPath( TQDir::homeDirPath() );
+ text = i18n("Home Directory: %1").tqarg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u, KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
KURL docPath;
docPath.setPath( KGlobalSettings::documentPath() );
if ( u.path(+1) != docPath.path(+1) ) {
- text = i18n("Documents: %1").arg( docPath.path( +1 ) );
+ text = i18n("Documents: %1").tqarg( docPath.path( +1 ) );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
}
u.setPath( KGlobalSettings::desktopPath() );
- text = i18n("Desktop: %1").arg( u.path( +1 ) );
+ text = i18n("Desktop: %1").tqarg( u.path( +1 ) );
d->pathCombo->addDefaultURL( u,
KMimeType::pixmapForURL( u, 0, KIcon::Small ),
text );
@@ -153,10 +153,10 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// If local, check it exists. If not, go up until it exists.
if ( d->url.isLocalFile() )
{
- if ( !QFile::exists( d->url.path() ) )
+ if ( !TQFile::exists( d->url.path() ) )
{
d->url = d->url.upURL();
- QDir dir( d->url.path() );
+ TQDir dir( d->url.path() );
while ( !dir.exists() )
{
d->url = d->url.upURL();
@@ -167,14 +167,14 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
ops = new KDirOperator(d->url, d->mainWidget, "KFileDialog::ops");
ops->setOnlyDoubleClickSelectsFiles( true );
- connect(ops, SIGNAL(urlEntered(const KURL&)),
- SLOT(urlEntered(const KURL&)));
- connect(ops, SIGNAL(fileHighlighted(const KFileItem *)),
- SLOT(fileHighlighted(const KFileItem *)));
- connect(ops, SIGNAL(fileSelected(const KFileItem *)),
- SLOT(fileSelected(const KFileItem *)));
- connect(ops, SIGNAL(finishedLoading()),
- SLOT(slotLoadingFinished()));
+ connect(ops, TQT_SIGNAL(urlEntered(const KURL&)),
+ TQT_SLOT(urlEntered(const KURL&)));
+ connect(ops, TQT_SIGNAL(fileHighlighted(const KFileItem *)),
+ TQT_SLOT(fileHighlighted(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(fileSelected(const KFileItem *)),
+ TQT_SLOT(fileSelected(const KFileItem *)));
+ connect(ops, TQT_SIGNAL(finishedLoading()),
+ TQT_SLOT(slotLoadingFinished()));
ops->setupMenu(KDirOperator::SortActions |
KDirOperator::FileActions |
@@ -183,9 +183,9 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// plug nav items into the toolbar
coll->action( "up" )->plug( toolbar );
- coll->action( "up" )->setWhatsThis(i18n("<qt>Click this button to enter the parent directory.<p>"
+ coll->action( "up" )->setWhatsThis(i18n("<qt>Click this button to enter the tqparent directory.<p>"
"For instance, if the current location is file:/home/%1 clicking this "
- "button will take you to file:/home.</qt>").arg(getlogin()));
+ "button will take you to file:/home.</qt>").tqarg(getlogin()));
coll->action( "back" )->plug( toolbar );
coll->action( "back" )->setWhatsThis(i18n("Click this button to move backwards one step in the browsing history."));
coll->action( "forward" )->plug( toolbar );
@@ -197,24 +197,24 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
coll->action( "mkdir" )->setWhatsThis(i18n("Click this button to create a new directory."));
d->bookmarkHandler = new KFileBookmarkHandler( this );
- toolbar->insertButton(QString::fromLatin1("bookmark"),
+ toolbar->insertButton(TQString::tqfromLatin1("bookmark"),
(int)HOTLIST_BUTTON, true,
i18n("Bookmarks"));
toolbar->getButton(HOTLIST_BUTTON)->setPopup( d->bookmarkHandler->menu(),
true);
- QWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
+ TQWhatsThis::add(toolbar->getButton(HOTLIST_BUTTON),
i18n("<qt>This button allows you to bookmark specific locations. "
"Click on this button to open the bookmark menu where you may add, "
"edit or select a bookmark.<p>"
"These bookmarks are specific to the file dialog, but otherwise operate "
"like bookmarks elsewhere in KDE.</qt>"));
- connect( d->bookmarkHandler, SIGNAL( openURL( const QString& )),
- SLOT( enterURL( const QString& )));
+ connect( d->bookmarkHandler, TQT_SIGNAL( openURL( const TQString& )),
+ TQT_SLOT( enterURL( const TQString& )));
KToggleAction *showSidebarAction =
new KToggleAction(i18n("Show Quick Access Navigation Panel"), Key_F9, coll,"toggleSpeedbar");
- connect( showSidebarAction, SIGNAL( toggled( bool ) ),
- SLOT( toggleSpeedbar( bool )) );
+ connect( showSidebarAction, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( toggleSpeedbar( bool )) );
KActionMenu *menu = new KActionMenu( i18n("Configure"), "configure", this, "extra menu" );
menu->setWhatsThis(i18n("<qt>This is the configuration menu for the file dialog. "
@@ -241,15 +241,15 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
menu->insert( coll->action( "separate dirs" ));
menu->setDelayed( false );
- connect( menu->popupMenu(), SIGNAL( aboutToShow() ),
- ops, SLOT( updateSelectionDependentActions() ));
+ connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ ops, TQT_SLOT( updateSelectionDependentActions() ));
menu->plug( toolbar );
*/
/*
* ugly little hack to have a 5 pixel space between the buttons
* and the combo box
*/
-/* QWidget *spacerWidget = new QWidget(toolbar);
+/* TQWidget *spacerWidget = new TQWidget(toolbar);
//(js) spacerWidget->setMinimumWidth(spacingHint());
//(js) spacerWidget->setMaximumWidth(spacingHint());
d->m_pathComboIndex = toolbar->insertWidget(-1, -1, spacerWidget);
@@ -264,21 +264,21 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
d->pathCombo->setCompletionObject( ops->dirCompletionObject(), false );
- connect( d->pathCombo, SIGNAL( urlActivated( const KURL& )),
- this, SLOT( enterURL( const KURL& ) ));
- connect( d->pathCombo, SIGNAL( returnPressed( const QString& )),
- this, SLOT( enterURL( const QString& ) ));
- connect( d->pathCombo, SIGNAL(textChanged( const QString& )),
- SLOT( pathComboChanged( const QString& ) ));
- connect( d->pathCombo, SIGNAL( completion( const QString& )),
- SLOT( dirCompletion( const QString& )));
- connect( d->pathCombo, SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
- d->pathCombo, SLOT( rotateText(KCompletionBase::KeyBindingType) ));
+ connect( d->pathCombo, TQT_SIGNAL( urlActivated( const KURL& )),
+ this, TQT_SLOT( enterURL( const KURL& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( returnPressed( const TQString& )),
+ this, TQT_SLOT( enterURL( const TQString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL(textChanged( const TQString& )),
+ TQT_SLOT( pathComboChanged( const TQString& ) ));
+ connect( d->pathCombo, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SLOT( dirCompletion( const TQString& )));
+ connect( d->pathCombo, TQT_SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
+ d->pathCombo, TQT_SLOT( rotateText(KCompletionBase::KeyBindingType) ));
- QString whatsThisText;
+ TQString whatsThisText;
// the Location label/edit
- d->locationLabel = new QLabel(i18n("&Location:"), d->mainWidget);
+ d->locationLabel = new TQLabel(i18n("&Location:"), d->mainWidget);
locationEdit = new KURLComboBox(KURLComboBox::Files, true,
d->mainWidget, "LocationEdit");
updateLocationWhatsThis ();
@@ -293,14 +293,14 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
// locationEdit->setAutoDeleteCompletionObject( true );
locationEdit->setCompletionObject( ops->completionObject(), false );
- connect( locationEdit, SIGNAL( returnPressed() ),
- this, SLOT( slotOk()));
- connect(locationEdit, SIGNAL( activated( const QString& )),
- this, SLOT( locationActivated( const QString& ) ));
- connect( locationEdit, SIGNAL( completion( const QString& )),
- SLOT( fileCompletion( const QString& )));
- connect( locationEdit, SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
- locationEdit, SLOT( rotateText(KCompletionBase::KeyBindingType) ));
+ connect( locationEdit, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotOk()));
+ connect(locationEdit, TQT_SIGNAL( activated( const TQString& )),
+ this, TQT_SLOT( locationActivated( const TQString& ) ));
+ connect( locationEdit, TQT_SIGNAL( completion( const TQString& )),
+ TQT_SLOT( fileCompletion( const TQString& )));
+ connect( locationEdit, TQT_SIGNAL( textRotation(KCompletionBase::KeyBindingType) ),
+ locationEdit, TQT_SLOT( rotateText(KCompletionBase::KeyBindingType) ));
// the Filter label/edit
whatsThisText = i18n("<qt>This is the filter to apply to the file list. "
@@ -309,19 +309,19 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
"drop down menu, or you may enter a custom filter "
"directly into the text area.<p>"
"Wildcards such as * and ? are allowed.</qt>");
- d->filterLabel = new QLabel(i18n("&Filter:"), d->mainWidget);
- QWhatsThis::add(d->filterLabel, whatsThisText);
+ d->filterLabel = new TQLabel(i18n("&Filter:"), d->mainWidget);
+ TQWhatsThis::add(d->filterLabel, whatsThisText);
filterWidget = new KFileFilterCombo(d->mainWidget,
"KFileDialog::filterwidget");
- QWhatsThis::add(filterWidget, whatsThisText);
+ TQWhatsThis::add(filterWidget, whatsThisText);
setFilter(filter);
d->filterLabel->setBuddy(filterWidget);
- connect(filterWidget, SIGNAL(filterChanged()), SLOT(slotFilterChanged()));
+ connect(filterWidget, TQT_SIGNAL(filterChanged()), TQT_SLOT(slotFilterChanged()));
// the Automatically Select Extension checkbox
// (the text, visibility etc. is set in updateAutoSelectExtension(), which is called by readConfig())
- d->autoSelectExtCheckBox = new QCheckBox (d->mainWidget);
- connect(d->autoSelectExtCheckBox, SIGNAL(clicked()), SLOT(slotAutoSelectExtClicked()));
+ d->autoSelectExtCheckBox = new TQCheckBox (d->mainWidget);
+ connect(d->autoSelectExtCheckBox, TQT_SIGNAL(clicked()), TQT_SLOT(slotAutoSelectExtClicked()));
initGUI(); // activate GM
@@ -342,7 +342,7 @@ void KexiStartupFileDialogBase::init(const QString& startDir, const QString& fil
void KexiStartupFileDialogBase::clearFilter()
{
d->kde_filters = "";//(js)
- QFileDialog::setFilter(""); //(js);
+ TQFileDialog::setFilter(""); //(js);
//todo d->mimetypes.clear();
//todo d->hasDefaultFilter = false;
@@ -356,15 +356,15 @@ KFile::Mode KexiStartupFileDialogBase::mode() const
void KexiStartupFileDialogBase::setMode( KFile::Mode m )
{
- //(js) translate mode for QFileDialog
+ //(js) translate mode for TQFileDialog
d->mode = m;
- QFileDialog::Mode qm = (QFileDialog::Mode)0;
- if (m & KFile::File) qm = Mode(qm | QFileDialog::AnyFile);
- else if (m & KFile::Directory) qm = Mode(qm | QFileDialog::DirectoryOnly);
- if (m & KFile::Files) qm = Mode(qm | QFileDialog::ExistingFiles);
- if (m & KFile::ExistingOnly) qm = Mode(qm | QFileDialog::ExistingFile);
+ TQFileDialog::Mode qm = (TQFileDialog::Mode)0;
+ if (m & KFile::File) qm = Mode(qm | TQFileDialog::AnyFile);
+ else if (m & KFile::Directory) qm = Mode(qm | TQFileDialog::DirectoryOnly);
+ if (m & KFile::Files) qm = Mode(qm | TQFileDialog::ExistingFiles);
+ if (m & KFile::ExistingOnly) qm = Mode(qm | TQFileDialog::ExistingFile);
- QFileDialog::setMode( qm );
+ TQFileDialog::setMode( qm );
/*(js) ops->setMode(m);
if ( ops->dirOnlyMode() ) {
//(js) filterWidget->setDefaultFilter( i18n("*|All Directories") );
@@ -395,35 +395,35 @@ void KexiStartupFileDialogBase::setOperationMode( KFileDialog::OperationMode mod
updateAutoSelectExtension ();
}
-QString KexiStartupFileDialogBase::currentFilter() const
+TQString KexiStartupFileDialogBase::currentFilter() const
{
//(js)filterWidget->currentFilter();
- //we need to convert Qt filter format to KDE format
- //Qt format: "some text (*.first *.second)" or "All (*)"
+ //we need to convert TQt filter format to KDE format
+ //TQt format: "some text (*.first *.second)" or "All (*)"
//KDE format: "*.first *.second" or "*"
- QString f = selectedFilter();
- if (f.find('(')!=-1)
- f = f.mid(f.find('(')+1);
- if (f.mid(f.find(')')!=-1))
- f = f.left(f.find(')'));
+ TQString f = selectedFilter();
+ if (f.tqfind('(')!=-1)
+ f = f.mid(f.tqfind('(')+1);
+ if (f.mid(f.tqfind(')')!=-1))
+ f = f.left(f.tqfind(')'));
return f;
}
-void KexiStartupFileDialogBase::setFilter(const QString& filter)
+void KexiStartupFileDialogBase::setFilter(const TQString& filter)
{
d->kde_filters = filter;
- int pos = d->kde_filters.find('/');
+ int pos = d->kde_filters.tqfind('/');
// Check for an un-escaped '/', if found
// interpret as a MIME filter.
if (pos > 0 && filter[pos - 1] != '\\') {
- QStringList filters = QStringList::split( " ", d->kde_filters );
+ TQStringList filters = TQStringList::split( " ", d->kde_filters );
setMimeFilter( filters );
return;
}
- QFileDialog::setFilters( convertKFileDialogFilterToQFileDialogFilter(filter) );
+ TQFileDialog::setFilters( convertKFileDialogFilterToTQFileDialogFilter(filter) );
//</js>
//(js) ops->clearFilter();
//(js) filterWidget->setFilter(copy);
@@ -434,14 +434,14 @@ void KexiStartupFileDialogBase::setFilter(const QString& filter)
updateAutoSelectExtension ();
}
-void KexiStartupFileDialogBase::setMimeFilter( const QStringList& mimeTypes,
- const QString& defaultType )
+void KexiStartupFileDialogBase::setMimeFilter( const TQStringList& mimeTypes,
+ const TQString& defaultType )
{
d->mimetypes = mimeTypes;
//(js) filterWidget->setMimeFilter( mimeTypes, defaultType );
-//(js) QStringList types = QStringList::split(" ", filterWidget->currentFilter());
-//(js) types.append( QString::fromLatin1( "inode/directory" ));
+//(js) TQStringList types = TQStringList::split(" ", filterWidget->currentFilter());
+//(js) types.append( TQString::tqfromLatin1( "inode/directory" ));
//(js) ops->clearFilter();
//(js) ops->setMimeFilter( types );
//(js) d->hasDefaultFilter = !defaultType.isEmpty();
@@ -451,25 +451,25 @@ void KexiStartupFileDialogBase::setMimeFilter( const QStringList& mimeTypes,
//TODO updateAutoSelectExtension ();
}
-QString KexiStartupFileDialogBase::realStartDir(const QString& startDir)
+TQString KexiStartupFileDialogBase::realStartDir(const TQString& startDir)
{
if (!startDir.startsWith(":"))
return startDir;
- QString recentDir; //dummy
- QString path( KFileDialog::getStartURL(startDir, recentDir).path() );
+ TQString recentDir; //dummy
+ TQString path( KFileDialog::getStartURL(startDir, recentDir).path() );
if (path.isEmpty())
- return QString::null;
- QFileInfo fi(path);
+ return TQString();
+ TQFileInfo fi(path);
return fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath();
}
-void KexiStartupFileDialogBase::saveLastVisitedPath(const QString& path)
+void KexiStartupFileDialogBase::saveLastVisitedPath(const TQString& path)
{
if (!m_lastVisitedPathsVariable.isEmpty()) {
//save last visited dir path
-// QString dir = QDir(path).absPath();
- QFileInfo fi(path);
- QString dir( fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath() );
+// TQString dir = TQDir(path).absPath();
+ TQFileInfo fi(path);
+ TQString dir( fi.isDir() ? fi.absFilePath() : fi.dir(true).absPath() );
if (!dir.isEmpty())
KRecentDirs::add(m_lastVisitedPathsVariable, dir);
}
diff --git a/kexi/main/startup/KexiStartup_p.cpp b/kexi/main/startup/KexiStartup_p.cpp
index df7cddc66..e8139e181 100644
--- a/kexi/main/startup/KexiStartup_p.cpp
+++ b/kexi/main/startup/KexiStartup_p.cpp
@@ -25,11 +25,11 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qapplication.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
+#include <tqapplication.h>
-SQLite2ToSQLite3Migration::SQLite2ToSQLite3Migration(const QString& filePath)
+SQLite2ToSQLite3Migration::SQLite2ToSQLite3Migration(const TQString& filePath)
: m_filePath(filePath)
{
m_process = 0;
@@ -50,33 +50,33 @@ tristate SQLite2ToSQLite3Migration::run()
if (m_run)
return false;
m_run = true;
- const QString ksqlite2to3_app = KStandardDirs::findExe( "ksqlite2to3" );
+ const TQString ksqlite2to3_app = KStandardDirs::findExe( "ksqlite2to3" );
if (ksqlite2to3_app.isEmpty())
return false;
- QFileInfo fi(m_filePath);
+ TQFileInfo fi(m_filePath);
if (fi.isSymLink()) {
m_filePath = fi.readLink();
- fi = QFileInfo(m_filePath);
+ fi = TQFileInfo(m_filePath);
}
//remember permissions of m_filePath
- m_restoreStat = (0==stat(QFile::encodeName(m_filePath), &m_st));
+ m_restoreStat = (0==stat(TQFile::encodeName(m_filePath), &m_st));
m_process = new KProcess(this, "process");
*m_process << ksqlite2to3_app << m_filePath;
m_process->setWorkingDirectory( fi.dir(true).absPath() );
- connect( m_process, SIGNAL(receivedStderr(KProcess*,char*,int)),
- this, SLOT(receivedStderr(KProcess*,char*,int)));
- connect( m_process, SIGNAL(processExited(KProcess*)), this, SLOT(processExited(KProcess*)) );
+ connect( m_process, TQT_SIGNAL(receivedStderr(KProcess*,char*,int)),
+ this, TQT_SLOT(receivedStderr(KProcess*,char*,int)));
+ connect( m_process, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(processExited(KProcess*)) );
if (!m_process->start(KProcess::NotifyOnExit, KProcess::Stderr))
return false;
- m_dlg = new KProgressDialog(0, 0, QString::null,
+ m_dlg = new KProgressDialog(0, 0, TQString(),
i18n("Saving \"%1\" project file to a new \"%2\" database format...")
- .arg(QDir::convertSeparators(QFileInfo(m_filePath).fileName())).arg("SQLite3")
+ .tqarg(TQDir::convertSeparators(TQFileInfo(m_filePath).fileName())).tqarg("SQLite3")
);
m_dlg->setModal(true);
- connect(m_dlg, SIGNAL(cancelClicked()), this, SLOT(cancelClicked()));
+ connect(m_dlg, TQT_SIGNAL(cancelClicked()), this, TQT_SLOT(cancelClicked()));
m_dlg->setMinimumDuration(1000);
m_dlg->setAutoClose(true);
m_dlg->progressBar()->setTotalSteps(100);
@@ -107,8 +107,8 @@ void SQLite2ToSQLite3Migration::processExited(KProcess* process)
if (result == true) {
if (m_restoreStat) {
//restore permissions for m_filePath
- chmod(QFile::encodeName(m_filePath), m_st.st_mode);
- chown(QFile::encodeName(m_filePath), m_st.st_uid, m_st.st_gid);
+ chmod(TQFile::encodeName(m_filePath), m_st.st_mode);
+ chown(TQFile::encodeName(m_filePath), m_st.st_uid, m_st.st_gid);
}
}
}
diff --git a/kexi/main/startup/KexiStartup_p.h b/kexi/main/startup/KexiStartup_p.h
index 1e60d7023..1e9e5d271 100644
--- a/kexi/main/startup/KexiStartup_p.h
+++ b/kexi/main/startup/KexiStartup_p.h
@@ -20,8 +20,8 @@
#ifndef KEXI_STARTUPHANDLER_P_H
#define KEXI_STARTUPHANDLER_P_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <sys/stat.h>
@@ -30,11 +30,12 @@
class KProcess;
class KProgressDialog;
-class SQLite2ToSQLite3Migration : public QObject
+class SQLite2ToSQLite3Migration : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- SQLite2ToSQLite3Migration(const QString& filePath);
+ SQLite2ToSQLite3Migration(const TQString& filePath);
~SQLite2ToSQLite3Migration();
tristate run();
@@ -45,7 +46,7 @@ class SQLite2ToSQLite3Migration : public QObject
void cancelClicked();
protected:
- QString m_filePath;
+ TQString m_filePath;
KProcess *m_process;
KProgressDialog* m_dlg;
diff --git a/kexi/migration/importoptionsdlg.cpp b/kexi/migration/importoptionsdlg.cpp
index 24ff3259b..4741bf5ce 100644
--- a/kexi/migration/importoptionsdlg.cpp
+++ b/kexi/migration/importoptionsdlg.cpp
@@ -20,11 +20,11 @@
#include "importoptionsdlg.h"
#include <widget/kexicharencodingcombobox.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qcheckbox.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -36,48 +36,48 @@
using namespace KexiMigration;
-OptionsDialog::OptionsDialog( const QString& databaseFile, const QString& selectedEncoding, QWidget* parent )
+OptionsDialog::OptionsDialog( const TQString& databaseFile, const TQString& selectedEncoding, TQWidget* tqparent )
: KDialogBase(
KDialogBase::Plain,
i18n( "Advanced Import Options" ),
Ok|Cancel,
Ok,
- parent,
+ tqparent,
"KexiMigration::OptionsDialog",
true,
false
)
{
setIcon(DesktopIcon("configure"));
- QGridLayout *lyr = new QGridLayout( plainPage(), 4, 3, KDialogBase::marginHint(),
+ TQGridLayout *lyr = new TQGridLayout( plainPage(), 4, 3, KDialogBase::marginHint(),
KDialogBase::spacingHint());
m_encodingComboBox = new KexiCharacterEncodingComboBox(plainPage(), selectedEncoding);
- m_encodingComboBox->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ m_encodingComboBox->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
lyr->addWidget( m_encodingComboBox, 1, 1 );
- QLabel* lbl = new QLabel(
+ TQLabel* lbl = new TQLabel(
i18n("<h3>Text encoding for Microsoft Access database</h3>\n"
"<p>Database file \"%1\" appears to be created by a version of Microsoft Access older than 2000.</p>"
"<p>In order to properly import national characters, you may need to choose a proper text encoding "
"if the database was created on a computer with a different character set.</p>")
- .arg(QDir::convertSeparators(databaseFile)), plainPage());
- lbl->setAlignment( Qt::AlignAuto | Qt::WordBreak );
- lbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ .tqarg(TQDir::convertSeparators(databaseFile)), plainPage());
+ lbl->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak );
+ lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
lyr->addMultiCellWidget( lbl, 0, 0, 0, 2 );
- QLabel* lbl2 = new QLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
+ TQLabel* lbl2 = new TQLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
lyr->addWidget( lbl2, 1, 0 );
- m_chkAlwaysUseThisEncoding = new QCheckBox(
+ m_chkAlwaysUseThisEncoding = new TQCheckBox(
i18n("Always use this encoding in similar situations"), plainPage());
lyr->addMultiCellWidget( m_chkAlwaysUseThisEncoding, 2, 2, 1,2 );
- lyr->addItem( new QSpacerItem( 20, 111, QSizePolicy::Minimum, QSizePolicy::Expanding ), 3, 1 );
- lyr->addItem( new QSpacerItem( 121, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ), 1, 2 );
+ lyr->addItem( new TQSpacerItem( 20, 111, TQSizePolicy::Minimum, TQSizePolicy::Expanding ), 3, 1 );
+ lyr->addItem( new TQSpacerItem( 121, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ), 1, 2 );
//read config
kapp->config()->setGroup("ImportExport");
- QString defaultEncodingForMSAccessFiles = kapp->config()->readEntry("DefaultEncodingForMSAccessFiles");
+ TQString defaultEncodingForMSAccessFiles = kapp->config()->readEntry("DefaultEncodingForMSAccessFiles");
if (!defaultEncodingForMSAccessFiles.isEmpty()) {
m_encodingComboBox->setSelectedEncoding(defaultEncodingForMSAccessFiles);
m_chkAlwaysUseThisEncoding->setChecked(true);
diff --git a/kexi/migration/importoptionsdlg.h b/kexi/migration/importoptionsdlg.h
index 736cb174f..f40e82302 100644
--- a/kexi/migration/importoptionsdlg.h
+++ b/kexi/migration/importoptionsdlg.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-class QCheckBox;
+class TQCheckBox;
class KexiCharacterEncodingComboBox;
namespace KexiMigration {
@@ -33,8 +33,9 @@ namespace KexiMigration {
class OptionsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- OptionsDialog( const QString& databaseFile, const QString& selectedEncoding, QWidget* parent = 0 );
+ OptionsDialog( const TQString& databaseFile, const TQString& selectedEncoding, TQWidget* tqparent = 0 );
virtual ~OptionsDialog();
KexiCharacterEncodingComboBox* encodingComboBox() const;
@@ -44,7 +45,7 @@ class OptionsDialog : public KDialogBase
protected:
KexiCharacterEncodingComboBox *m_encodingComboBox;
- QCheckBox *m_chkAlwaysUseThisEncoding;
+ TQCheckBox *m_chkAlwaysUseThisEncoding;
};
}
diff --git a/kexi/migration/importwizard.cpp b/kexi/migration/importwizard.cpp
index dda3d200d..4fd7497b5 100644
--- a/kexi/migration/importwizard.cpp
+++ b/kexi/migration/importwizard.cpp
@@ -23,11 +23,11 @@
#include "keximigrate.h"
#include "importoptionsdlg.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <kmessagebox.h>
@@ -58,8 +58,8 @@ using namespace KexiMigration;
//===========================================================
//
-ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args)
- : KWizard(parent)
+ImportWizard::ImportWizard(TQWidget *tqparent, TQMap<TQString,TQString>* args)
+ : KWizard(tqparent)
, m_args(args)
{
setCaption(i18n("Import Database"));
@@ -83,8 +83,8 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args)
setupImporting();
setupFinish();
- connect(this, SIGNAL(selected(const QString &)), this, SLOT(pageSelected(const QString &)));
- connect(this, SIGNAL(helpClicked()), this, SLOT(helpClicked()));
+ connect(this, TQT_SIGNAL(selected(const TQString &)), this, TQT_SLOT(pageSelected(const TQString &)));
+ connect(this, TQT_SIGNAL(helpClicked()), this, TQT_SLOT(helpClicked()));
if (m_predefinedConnectionData) {
// setup wizard for predefined server source
@@ -96,7 +96,7 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args)
// setup wizard for predefined source
// (used when external project type was opened in Kexi, e.g. mdb file)
// MigrateManager manager;
-// QString driverName = manager.driverForMimeType( m_predefinedMimeType );
+// TQString driverName = manager.driverForMimeType( m_predefinedMimeType );
// m_srcTypeCombo->setCurrentText( driverName );
// showPage( m_srcConnPage );
@@ -110,7 +110,7 @@ ImportWizard::ImportWizard(QWidget *parent, QMap<QString,QString>* args)
}
}
- m_sourceDBEncoding = QString::fromLatin1(KGlobal::locale()->encoding()); //default
+ m_sourceDBEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding()); //default
}
//===========================================================
@@ -130,7 +130,7 @@ void ImportWizard::parseArguments()
if (!(*m_args)["databaseName"].isEmpty() && !(*m_args)["mimeType"].isEmpty()) {
m_predefinedDatabaseName = (*m_args)["databaseName"];
m_predefinedMimeType = (*m_args)["mimeType"];
- if (m_args->contains("connectionData")) {
+ if (m_args->tqcontains("connectionData")) {
m_predefinedConnectionData = new KexiDB::ConnectionData();
KexiDB::fromMap(
KexiUtils::deserializeMap((*m_args)["connectionData"]), *m_predefinedConnectionData
@@ -144,23 +144,23 @@ void ImportWizard::parseArguments()
//
void ImportWizard::setupIntro()
{
- m_introPage = new QWidget(this);
- QVBoxLayout *vbox = new QVBoxLayout(m_introPage, KDialog::marginHint());
+ m_introPage = new TQWidget(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_introPage, KDialog::marginHint());
- QLabel *lblIntro = new QLabel(m_introPage);
- lblIntro->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak );
- QString msg;
+ TQLabel *lblIntro = new TQLabel(m_introPage);
+ lblIntro->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
+ TQString msg;
if (m_predefinedConnectionData) { //predefined import: server source
msg = i18n("<qt>Database Importing wizard is about to import \"%1\" database "
"<nobr>(connection %2)</nobr> into a Kexi database.</qt>")
- .arg(m_predefinedDatabaseName).arg(m_predefinedConnectionData->serverInfoString());
+ .tqarg(m_predefinedDatabaseName).tqarg(m_predefinedConnectionData->serverInfoString());
}
else if (!m_predefinedDatabaseName.isEmpty()) { //predefined import: file source
//! @todo this message is currently ok for files only
KMimeType::Ptr mimeTypePtr = KMimeType::mimeType(m_predefinedMimeType);
msg = i18n("<qt>Database Importing wizard is about to import <nobr>\"%1\"</nobr> file "
"of type \"%2\" into a Kexi database.</qt>")
- .arg(QDir::convertSeparators(m_predefinedDatabaseName)).arg(mimeTypePtr->comment());
+ .tqarg(TQDir::convertSeparators(m_predefinedDatabaseName)).tqarg(mimeTypePtr->comment());
}
else {
msg = i18n("Database Importing wizard allows you to import an existing database "
@@ -177,13 +177,13 @@ void ImportWizard::setupIntro()
/*
void ImportWizard::setupSrcType()
{
- m_srcTypePage = new QWidget(this);
+ m_srcTypePage = new TQWidget(this);
//! @todo Would be good if KexiDBDriverComboBox worked for migration drivers
- QVBoxLayout *vbox = new QVBoxLayout(m_srcTypePage, KDialog::marginHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_srcTypePage, KDialog::marginHint());
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
- QLabel *lbl = new QLabel(i18n("Source database type:")+" ", m_srcTypePage);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
+ TQLabel *lbl = new TQLabel(i18n("Source database type:")+" ", m_srcTypePage);
hbox->addWidget(lbl);
m_srcTypeCombo = new KComboBox(m_srcTypePage);
@@ -193,7 +193,7 @@ void ImportWizard::setupSrcType()
lbl->setBuddy(m_srcTypeCombo);
MigrateManager manager;
- QStringList names = manager.driverNames();
+ TQStringList names = manager.driverNames();
m_srcTypeCombo->insertStringList(names);
addPage(m_srcTypePage, i18n("Select Source Database Type"));
@@ -203,8 +203,8 @@ void ImportWizard::setupSrcType()
//
void ImportWizard::setupSrcConn()
{
- m_srcConnPage = new QWidget(this);
- QVBoxLayout *vbox = new QVBoxLayout(m_srcConnPage, KDialog::marginHint());
+ m_srcConnPage = new TQWidget(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_srcConnPage, KDialog::marginHint());
m_srcConn = new KexiConnSelectorWidget(Kexi::connset(),
":ProjectMigrationSourceDir", m_srcConnPage, "m_srcConnSelector");
@@ -212,7 +212,7 @@ void ImportWizard::setupSrcConn()
m_srcConn->hideConnectonIcon();
m_srcConn->showSimpleConn();
- QStringList excludedFilters;
+ TQStringList excludedFilters;
//! @todo remove when support for kexi files as source prj is added in migration
excludedFilters += KexiDB::Driver::defaultFileBasedDriverMimeType();
excludedFilters += "application/x-kexiproject-shortcut";
@@ -229,7 +229,7 @@ void ImportWizard::setupSrcConn()
void ImportWizard::setupSrcDB()
{
// arrivesrcdbPage creates widgets on that page
- m_srcDBPage = new QWidget(this);
+ m_srcDBPage = new TQWidget(this);
m_srcDBName = NULL;
addPage(m_srcDBPage, i18n("Select Source Database"));
}
@@ -238,16 +238,16 @@ void ImportWizard::setupSrcDB()
//
void ImportWizard::setupDstType()
{
- m_dstTypePage = new QWidget(this);
+ m_dstTypePage = new TQWidget(this);
KexiDB::DriverManager manager;
KexiDB::Driver::InfoMap drvs = manager.driversInfo();
- QVBoxLayout *vbox = new QVBoxLayout(m_dstTypePage, KDialog::marginHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_dstTypePage, KDialog::marginHint());
- QHBoxLayout *hbox = new QHBoxLayout(vbox);
- QLabel *lbl = new QLabel(i18n("Destination database type:")+" ", m_dstTypePage);
- lbl->setAlignment(Qt::AlignAuto|Qt::AlignTop);
+ TQHBoxLayout *hbox = new TQHBoxLayout(vbox);
+ TQLabel *lbl = new TQLabel(i18n("Destination database type:")+" ", m_dstTypePage);
+ lbl->tqsetAlignment(TQt::AlignAuto|TQt::AlignTop);
hbox->addWidget(lbl);
m_dstPrjTypeSelector = new KexiPrjTypeSelector(m_dstTypePage);
@@ -255,7 +255,7 @@ void ImportWizard::setupDstType()
m_dstPrjTypeSelector->option_file->setText(i18n("Database project stored in a file"));
m_dstPrjTypeSelector->option_server->setText(i18n("Database project stored on a server"));
- QVBoxLayout *frame_server_vbox = new QVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint());
+ TQVBoxLayout *frame_server_vbox = new TQVBoxLayout(m_dstPrjTypeSelector->frame_server, KDialog::spacingHint());
m_dstServerTypeCombo = new KexiDBDriverComboBox(m_dstPrjTypeSelector->frame_server, drvs,
KexiDBDriverComboBox::ShowServerDrivers);
frame_server_vbox->addWidget(m_dstServerTypeCombo);
@@ -274,7 +274,7 @@ void ImportWizard::setupDstTitle()
{
m_dstTitlePage = new KexiDBTitlePage(i18n("Destination project's caption:"),
this, "KexiDBTitlePage");
- m_dstTitlePage->layout()->setMargin( KDialog::marginHint() );
+ m_dstTitlePage->tqlayout()->setMargin( KDialog::marginHint() );
m_dstTitlePage->updateGeometry();
m_dstNewDBNameLineEdit = m_dstTitlePage->le_caption;
addPage(m_dstTitlePage, i18n("Select Destination Database Project's Caption"));
@@ -284,18 +284,18 @@ void ImportWizard::setupDstTitle()
//
void ImportWizard::setupDst()
{
- m_dstPage = new QWidget(this);
- QVBoxLayout *vbox = new QVBoxLayout(m_dstPage, KDialog::marginHint());
+ m_dstPage = new TQWidget(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_dstPage, KDialog::marginHint());
m_dstConn = new KexiConnSelectorWidget(Kexi::connset(),
":ProjectMigrationDestinationDir", m_dstPage, "m_dstConnSelector");
m_dstConn->hideHelpers();
//me: Can't connect m_dstConn->m_fileDlg here, it doesn't exist yet
- //connect(this, SLOT(next()), m_dstConn->m_fileDlg, SIGNAL(accepted()));
+ //connect(this, TQT_SLOT(next()), m_dstConn->m_fileDlg, TQT_SIGNAL(accepted()));
vbox->addWidget( m_dstConn );
- connect(m_dstConn,SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
- this,SLOT(next()));
+ connect(m_dstConn,TQT_SIGNAL(connectionItemExecuted(ConnectionDataLVItem*)),
+ this,TQT_SLOT(next()));
// m_dstConn->hideHelpers();
m_dstConn->showSimpleConn();
@@ -317,14 +317,14 @@ void ImportWizard::setupDst()
//
void ImportWizard::setupImportType()
{
- m_importTypePage = new QWidget(this);
- QVBoxLayout *vbox = new QVBoxLayout(m_importTypePage, KDialog::marginHint());
- m_importTypeButtonGroup = new QVButtonGroup(m_importTypePage);
+ m_importTypePage = new TQWidget(this);
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_importTypePage, KDialog::marginHint());
+ m_importTypeButtonGroup = new TQVButtonGroup(m_importTypePage);
m_importTypeButtonGroup->setLineWidth(0);
vbox->addWidget( m_importTypeButtonGroup );
- (void)new QRadioButton(i18n("Structure and data"), m_importTypeButtonGroup);
- (void)new QRadioButton(i18n("Structure only"), m_importTypeButtonGroup);
+ (void)new TQRadioButton(i18n("Structure and data"), m_importTypeButtonGroup);
+ (void)new TQRadioButton(i18n("Structure only"), m_importTypeButtonGroup);
m_importTypeButtonGroup->setExclusive( true );
m_importTypeButtonGroup->setButton( 0 );
@@ -335,14 +335,14 @@ void ImportWizard::setupImportType()
//
void ImportWizard::setupImporting()
{
- m_importingPage = new QWidget(this);
+ m_importingPage = new TQWidget(this);
m_importingPage->hide();
- QVBoxLayout *vbox = new QVBoxLayout(m_importingPage, KDialog::marginHint());
- m_lblImportingTxt = new QLabel(m_importingPage);
- m_lblImportingTxt->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak );
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_importingPage, KDialog::marginHint());
+ m_lblImportingTxt = new TQLabel(m_importingPage);
+ m_lblImportingTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
- m_lblImportingErrTxt = new QLabel(m_importingPage);
- m_lblImportingErrTxt->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak );
+ m_lblImportingErrTxt = new TQLabel(m_importingPage);
+ m_lblImportingErrTxt->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
m_progressBar = new KProgress(100, m_importingPage);
m_progressBar->hide();
@@ -353,7 +353,7 @@ void ImportWizard::setupImporting()
KButtonBox *optionsBox = new KButtonBox(m_importingPage);
vbox->addWidget( optionsBox );
- m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), this, SLOT(slotOptionsButtonClicked()));
+ m_importOptionsButton = optionsBox->addButton(i18n("Advanced Options"), TQT_TQOBJECT(this), TQT_SLOT(slotOptionsButtonClicked()));
m_importOptionsButton->setIconSet(SmallIconSet("configure"));
optionsBox->addStretch(1);
@@ -370,14 +370,14 @@ void ImportWizard::setupImporting()
//
void ImportWizard::setupFinish()
{
- m_finishPage = new QWidget(this);
+ m_finishPage = new TQWidget(this);
m_finishPage->hide();
- QVBoxLayout *vbox = new QVBoxLayout(m_finishPage, KDialog::marginHint());
- m_finishLbl = new QLabel(m_finishPage);
- m_finishLbl->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak );
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_finishPage, KDialog::marginHint());
+ m_finishLbl = new TQLabel(m_finishPage);
+ m_finishLbl->tqsetAlignment( TQt::AlignTop | TQt::AlignLeft | TQt::WordBreak );
vbox->addWidget( m_finishLbl );
- m_openImportedProjectCheckBox = new QCheckBox(i18n("Open imported project"),
+ m_openImportedProjectCheckBox = new TQCheckBox(i18n("Open imported project"),
m_finishPage, "openImportedProjectCheckBox");
m_openImportedProjectCheckBox->setChecked(true);
vbox->addSpacing( KDialog::spacingHint() );
@@ -391,14 +391,14 @@ void ImportWizard::setupFinish()
//
bool ImportWizard::checkUserInput()
{
- QString finishtxt;
+ TQString finishtxt;
if (m_dstNewDBNameLineEdit->text().isEmpty())
{
finishtxt = finishtxt + "<br>" + i18n("No new database name was entered.");
}
- Kexi::ObjectStatus result;
+ Kexi::ObjecttqStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
if (sourceDriver && sourceDriver->isSourceAndDestinationDataSourceTheSame())
{
@@ -427,17 +427,17 @@ void ImportWizard::arriveSrcConnPage()
in addition to just "open" */
if (m_setupFileBasedSrcNeeded) {
m_setupFileBasedSrcNeeded = false;
- QStringList additionalMimeTypes;
+ TQStringList additionalMimeTypes;
/* moved
- if (m_srcTypeCombo->currentText().contains("Access")) {
+ if (m_srcTypeCombo->currentText().tqcontains("Access")) {
//! @todo tmp: hardcoded!
additionalMimeTypes << "application/x-msaccess";
}*/
m_srcConn->m_fileDlg->setMode(KexiStartupFileDialog::Opening);
m_srcConn->m_fileDlg->setAdditionalFilters(additionalMimeTypes);
-/*moved if (m_srcTypeCombo->currentText().contains("Access")) {
+/*moved if (m_srcTypeCombo->currentText().tqcontains("Access")) {
//! @todo tmp: hardcoded!
- #ifdef Q_WS_WIN
+ #ifdef TQ_WS_WIN
m_srcConn->m_fileDlg->setSelectedFilter("*.mdb");
#else
m_srcConn->m_fileDlg->setFilter("*.mdb");
@@ -445,7 +445,7 @@ void ImportWizard::arriveSrcConnPage()
}*/
//m_srcConn->m_file->label->hide();
//m_srcConn->m_file->btn_advanced->hide();
- //m_srcConn->m_file->label->parentWidget()->hide();
+ //m_srcConn->m_file->label->tqparentWidget()->hide();
}
// } else {
// m_srcConn->showAdvancedConn();
@@ -467,7 +467,7 @@ void ImportWizard::arriveSrcDBPage()
KexiDB::ConnectionData* condata = m_srcConn->selectedConnectionData();
if(condata) {
m_prjSet = new KexiProjectSet(*condata);
- QVBoxLayout *vbox = new QVBoxLayout(m_srcDBPage, KDialog::marginHint());
+ TQVBoxLayout *vbox = new TQVBoxLayout(m_srcDBPage, KDialog::marginHint());
m_srcDBName = new KexiProjectSelectorWidget(m_srcDBPage,
"KexiMigrationProjectSelector", m_prjSet);
vbox->addWidget( m_srcDBName );
@@ -480,8 +480,8 @@ void ImportWizard::arriveSrcDBPage()
void ImportWizard::arriveDstTitlePage()
{
if(fileBasedSrcSelected()) {
- QString suggestedDBName( QFileInfo(m_srcConn->selectedFileName()).fileName() );
- const QFileInfo fi( suggestedDBName );
+ TQString suggestedDBName( TQFileInfo(m_srcConn->selectedFileName()).fileName() );
+ const TQFileInfo fi( suggestedDBName );
suggestedDBName = suggestedDBName.left(suggestedDBName.length()
- (fi.extension().length() ? (fi.extension().length()+1) : 0));
m_dstNewDBNameLineEdit->setText( suggestedDBName );
@@ -551,11 +551,11 @@ void ImportWizard::arriveImportingPage() {
//! and KexiMigration::Driver classes
bool showOptions = false;
if (fileBasedSrcSelected()) {
- Kexi::ObjectStatus result;
+ Kexi::ObjecttqStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
if (sourceDriver) {
showOptions = !result.error()
- && sourceDriver->propertyValue( "source_database_has_nonunicode_encoding" ).toBool();
+ && sourceDriver->propertyValue( "source_database_has_nontqunicode_encoding" ).toBool();
KexiMigration::Data *data = sourceDriver->data();
sourceDriver->setData( 0 );
delete data;
@@ -572,7 +572,7 @@ void ImportWizard::arriveImportingPage() {
void ImportWizard::arriveFinishPage() {
// backButton()->hide();
// cancelButton()->setEnabled(false);
-// m_finishLbl->setText( m_successText.arg(m_dstNewDBNameLineEdit->text()) );
+// m_finishLbl->setText( m_successText.tqarg(m_dstNewDBNameLineEdit->text()) );
}
bool ImportWizard::fileBasedSrcSelected() const
@@ -586,7 +586,7 @@ bool ImportWizard::fileBasedSrcSelected() const
bool ImportWizard::fileBasedDstSelected() const
{
-// QString dstType(m_dstServerTypeCombo->currentText());
+// TQString dstType(m_dstServerTypeCombo->currentText());
return m_dstPrjTypeSelector->buttonGroup->selectedId() == 1;
@@ -605,7 +605,7 @@ void ImportWizard::progressUpdated(int percent) {
//===========================================================
//
-QString ImportWizard::driverNameForSelectedSource()
+TQString ImportWizard::driverNameForSelectedSource()
{
if (fileBasedSrcSelected()) {
KMimeType::Ptr ptr = KMimeType::findByFileContent( m_srcConn->selectedFileName() );
@@ -613,7 +613,7 @@ QString ImportWizard::driverNameForSelectedSource()
//try by URL:
ptr = KMimeType::findByURL( m_srcConn->selectedFileName() );
}
- return ptr ? m_migrateManager.driverForMimeType( ptr.data()->name() ) : QString::null;
+ return ptr ? m_migrateManager.driverForMimeType( ptr.data()->name() ) : TQString();
}
//server-based
@@ -622,7 +622,7 @@ QString ImportWizard::driverNameForSelectedSource()
}
return m_srcConn->selectedConnectionData()
- ? m_srcConn->selectedConnectionData()->driverName : QString::null;
+ ? m_srcConn->selectedConnectionData()->driverName : TQString();
}
//===========================================================
@@ -639,7 +639,7 @@ void ImportWizard::accept()
// cancelButton()->setEnabled(true);
*/
if (m_args) {
- if ((!fileBasedDstSelected() && !m_args->contains("destinationConnectionShortcut"))
+ if ((!fileBasedDstSelected() && !m_args->tqcontains("destinationConnectionShortcut"))
|| !m_openImportedProjectCheckBox->isChecked())
{
//do not open dest db if used didn't want it
@@ -650,7 +650,7 @@ void ImportWizard::accept()
KWizard::accept();
}
-KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
+KexiMigrate* ImportWizard::prepareImport(Kexi::ObjecttqStatus& result)
{
KexiUtils::WaitCursor wait;
@@ -667,16 +667,16 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
);
if (!destDriver || manager.error())
{
- result.setStatus(&manager);
+ result.settqStatus(&manager);
kdDebug() << "Manager error..." << endl;
manager.debugError();
-// result.setStatus(&manager);
+// result.settqStatus(&manager);
}
// Set up destination connection data
KexiDB::ConnectionData *cdata;
bool cdataOwned = false;
- QString dbname;
+ TQString dbname;
if (!result.error())
{
if (m_dstConn->selectedConnectionData())
@@ -702,18 +702,18 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
{
//TODO This needs a better message
//KMessageBox::error(this,
- result.setStatus(i18n("No connection data is available. You did not select a destination filename."),"");
+ result.settqStatus(i18n("No connection data is available. You did not select a destination filename."),"");
//return false;
} */
}
// Find a source (migration) driver name
- QString sourceDriverName;
+ TQString sourceDriverName;
if (!result.error())
{
sourceDriverName = driverNameForSelectedSource();
if (sourceDriverName.isEmpty())
- result.setStatus(i18n("No appropriate migration driver found."),
+ result.settqStatus(i18n("No appropriate migration driver found."),
m_migrateManager.possibleProblemsInfoMsg());
}
@@ -724,7 +724,7 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
sourceDriver = m_migrateManager.driver( sourceDriverName );
if(!sourceDriver || m_migrateManager.error()) {
kdDebug() << "Import migrate driver error..." << endl;
- result.setStatus(&m_migrateManager);
+ result.settqStatus(&m_migrateManager);
}
}
@@ -736,10 +736,10 @@ KexiMigrate* ImportWizard::prepareImport(Kexi::ObjectStatus& result)
// Setup progress feedback for the GUI
if(sourceDriver->progressSupported()) {
m_progressBar->updateGeometry();
- disconnect(sourceDriver, SIGNAL(progressPercent(int)),
- this, SLOT(progressUpdated(int)));
- connect(sourceDriver, SIGNAL(progressPercent(int)),
- this, SLOT(progressUpdated(int)));
+ disconnect(sourceDriver, TQT_SIGNAL(progressPercent(int)),
+ this, TQT_SLOT(progressUpdated(int)));
+ connect(sourceDriver, TQT_SIGNAL(progressPercent(int)),
+ this, TQT_SLOT(progressUpdated(int)));
progressUpdated(0);
}
@@ -793,7 +793,7 @@ tristate ImportWizard::import()
{
m_importExecuted = true;
- Kexi::ObjectStatus result;
+ Kexi::ObjecttqStatus result;
KexiMigrate* sourceDriver = prepareImport(result);
bool acceptingNeeded = false;
@@ -802,8 +802,8 @@ tristate ImportWizard::import()
if (sourceDriver && !result.error())
{
if (!m_sourceDBEncoding.isEmpty()) {
- sourceDriver->setPropertyValue( "source_database_nonunicode_encoding",
- QVariant(m_sourceDBEncoding.upper().replace(' ',"")) // "CP1250", not "cp 1250"
+ sourceDriver->setPropertyValue( "source_database_nontqunicode_encoding",
+ TQVariant(m_sourceDBEncoding.upper().tqreplace(' ',"")) // "CP1250", not "cp 1250"
);
}
@@ -820,7 +820,7 @@ tristate ImportWizard::import()
if (KMessageBox::Yes != KMessageBox::warningYesNo(this,
"<qt>"+i18n("Database %1 already exists."
"<p>Do you want to replace it with a new one?")
- .arg(sourceDriver->data()->destination->infoString()),
+ .tqarg(sourceDriver->data()->destination->infoString()),
0, KGuiItem(i18n("&Replace")), KGuiItem(i18n("No"))))
{
return cancelled;
@@ -838,7 +838,7 @@ tristate ImportWizard::import()
m_args->insert("destinationDatabaseName",
sourceDriver->data()->destination->databaseName());
// }
- QString destinationConnectionShortcut(
+ TQString destinationConnectionShortcut(
Kexi::connset().fileNameForConnectionData( m_dstConn->selectedConnectionData() ) );
if (!destinationConnectionShortcut.isEmpty()) {
m_args->insert("destinationConnectionShortcut", destinationConnectionShortcut);
@@ -853,7 +853,7 @@ tristate ImportWizard::import()
m_progressBar->setProgress(0);
m_progressBar->hide();
- QString msg, details;
+ TQString msg, details;
KexiTextMessageHandler handler(msg, details);
handler.showErrorMessage(&result);
@@ -861,7 +861,7 @@ tristate ImportWizard::import()
setTitle(m_finishPage, i18n("Failure"));
m_finishLbl->setText(
i18n("<p>Import failed.</p>%1<p>%2</p><p>You can click \"Back\" button and try again.</p>")
- .arg(msg).arg(details));
+ .tqarg(msg).tqarg(details));
return false;
}
// delete kexi_conn;
@@ -879,7 +879,7 @@ void ImportWizard::next()
{
if (currentPage() == m_srcConnPage) {
if (fileBasedSrcSelected()
- && /*! @todo use KURL? */!QFileInfo(m_srcConn->selectedFileName()).isFile()) {
+ && /*! @todo use KURL? */!TQFileInfo(m_srcConn->selectedFileName()).isFile()) {
KMessageBox::sorry(this,i18n("Select source database filename."));
return;
@@ -892,16 +892,16 @@ void ImportWizard::next()
KexiMigrate* import = m_migrateManager.driver( driverNameForSelectedSource() );
if(!import || m_migrateManager.error()) {
- QString dbname;
+ TQString dbname;
if (fileBasedSrcSelected())
dbname = m_srcConn->selectedFileName();
else
dbname = m_srcConn->selectedConnectionData()
- ? m_srcConn->selectedConnectionData()->serverInfoString() : QString::null;
+ ? m_srcConn->selectedConnectionData()->serverInfoString() : TQString();
if (!dbname.isEmpty())
- dbname = QString(" \"%1\"").arg(dbname);
+ dbname = TQString(" \"%1\"").tqarg(dbname);
KMessageBox::error(this, i18n("Could not import database%1. This type is not supported.")
- .arg(dbname));
+ .tqarg(dbname));
return;
}
}
@@ -922,7 +922,7 @@ void ImportWizard::next()
if (true == res) {
m_finishLbl->setText(
i18n("Database has been imported into Kexi database project \"%1\".")
- .arg(m_dstNewDBNameLineEdit->text()) );
+ .tqarg(m_dstNewDBNameLineEdit->text()) );
cancelButton()->setEnabled(false);
setBackEnabled(m_finishPage, false);
setFinishEnabled(m_finishPage, true);
@@ -957,7 +957,7 @@ void ImportWizard::back()
KWizard::back();
}
-void ImportWizard::pageSelected(const QString &)
+void ImportWizard::pageSelected(const TQString &)
{
if (currentPage() == m_introPage) {
}
@@ -1020,7 +1020,7 @@ void ImportWizard::helpClicked()
void ImportWizard::slotOptionsButtonClicked()
{
OptionsDialog dlg(m_srcConn->selectedFileName(), m_sourceDBEncoding, this);
- if (QDialog::Accepted != dlg.exec())
+ if (TQDialog::Accepted != dlg.exec())
return;
if (m_sourceDBEncoding != dlg.encodingComboBox()->selectedEncoding()) {
diff --git a/kexi/migration/importwizard.h b/kexi/migration/importwizard.h
index 7d51a9341..95da22cdb 100644
--- a/kexi/migration/importwizard.h
+++ b/kexi/migration/importwizard.h
@@ -29,12 +29,12 @@
#include <kexiutils/tristate.h>
#include "migratemanager.h"
-class QLabel;
-class QCheckBox;
-class QPushButton;
-class QHBoxLayout;
-class QVBoxLayout;
-class QVButtonGroup;
+class TQLabel;
+class TQCheckBox;
+class TQPushButton;
+class TQHBoxLayout;
+class TQVBoxLayout;
+class TQVButtonGroup;
class KComboBox;
class KListView;
class KLineEdit;
@@ -47,7 +47,7 @@ class KexiPrjTypeSelector;
namespace Kexi
{
- class ObjectStatus;
+ class ObjecttqStatus;
}
namespace KexiDB
@@ -63,12 +63,13 @@ class KexiMigrate;
class KEXIMIGR_EXPORT ImportWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates wizard's instance.
\a args contains arguments that can be parsed by parseArguments().
\a *arg will be also set to imported project's filename on success
and to null value on failure or cancellation. */
- ImportWizard(QWidget *parent = 0, QMap<QString,QString>* args = 0);
+ ImportWizard(TQWidget *tqparent = 0, TQMap<TQString,TQString>* args = 0);
virtual ~ImportWizard();
public slots:
@@ -77,7 +78,7 @@ public slots:
protected slots:
virtual void next();
virtual void back();
- void pageSelected(const QString &);
+ void pageSelected(const TQString &);
virtual void accept();
virtual void reject();
void helpClicked();
@@ -97,7 +98,7 @@ private:
void setupImporting();
bool checkUserInput();
- KexiMigrate* prepareImport(Kexi::ObjectStatus& result);
+ KexiMigrate* prepareImport(Kexi::ObjecttqStatus& result);
/*! Performs import. \return true/false on success/faulure
or cancelled when user cancelled importing (mainly
@@ -106,9 +107,9 @@ private:
bool fileBasedSrcSelected() const;
bool fileBasedDstSelected() const;
- QString driverNameForSelectedSource();
-// void checkIfSrcTypeFileBased(const QString& srcType);
-// void checkIfDstTypeFileBased(const QString& dstType);
+ TQString driverNameForSelectedSource();
+// void checkIfSrcTypeFileBased(const TQString& srcType);
+// void checkIfDstTypeFileBased(const TQString& dstType);
void arriveSrcConnPage();
void arriveSrcDBPage();
@@ -117,10 +118,10 @@ private:
void arriveFinishPage();
void arriveImportingPage();
- QWidget *m_introPage, /* *m_srcTypePage,*/ *m_srcConnPage, *m_srcDBPage,
+ TQWidget *m_introPage, /* *m_srcTypePage,*/ *m_srcConnPage, *m_srcDBPage,
*m_dstTypePage, *m_dstPage, *m_importTypePage, *m_importingPage, *m_finishPage;
- QVButtonGroup *m_importTypeButtonGroup;
+ TQVButtonGroup *m_importTypeButtonGroup;
KexiDBTitlePage* m_dstTitlePage;
KComboBox *m_srcTypeCombo;
@@ -131,21 +132,21 @@ private:
KLineEdit *m_dstNewDBNameLineEdit;
KexiProjectSelectorWidget *m_srcDBName;
- QLabel *m_lblImportingTxt, *m_lblImportingErrTxt, *m_finishLbl;
- QCheckBox *m_openImportedProjectCheckBox;
+ TQLabel *m_lblImportingTxt, *m_lblImportingErrTxt, *m_finishLbl;
+ TQCheckBox *m_openImportedProjectCheckBox;
bool m_fileBasedDstWasPresented, m_setupFileBasedSrcNeeded,
m_importExecuted; //!< used in import()
KexiProjectSet* m_prjSet;
KProgress *m_progressBar;
- QPushButton* m_importOptionsButton;
- QMap<QString,QString> *m_args;
- QString m_predefinedDatabaseName, m_predefinedMimeType;
+ TQPushButton* m_importOptionsButton;
+ TQMap<TQString,TQString> *m_args;
+ TQString m_predefinedDatabaseName, m_predefinedMimeType;
KexiDB::ConnectionData *m_predefinedConnectionData;
MigrateManager m_migrateManager; //!< object lives here, so status messages can be globally preserved
//! Encoding for source db. Currently only used for MDB driver.
//! @todo Hardcoded. Move to KexiMigrate driver's impl.
- QString m_sourceDBEncoding;
+ TQString m_sourceDBEncoding;
};
}
diff --git a/kexi/migration/keximigrate.cpp b/kexi/migration/keximigrate.cpp
index 262293238..989a002a9 100644
--- a/kexi/migration/keximigrate.cpp
+++ b/kexi/migration/keximigrate.cpp
@@ -33,9 +33,9 @@
using namespace KexiDB;
using namespace KexiMigration;
-KexiMigrate::KexiMigrate(QObject *parent, const char *name,
- const QStringList&)
- : QObject( parent, name )
+KexiMigrate::KexiMigrate(TQObject *tqparent, const char *name,
+ const TQStringList&)
+ : TQObject( tqparent, name )
, m_migrateData(0)
, m_destPrj(0)
{
@@ -61,20 +61,20 @@ KexiMigrate::~KexiMigrate()
delete m_destPrj;
}
-bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result,
+bool KexiMigrate::checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result,
bool& acceptingNeeded)
{
acceptingNeeded = false;
if (result)
- result->clearStatus();
+ result->cleartqStatus();
KexiDB::DriverManager drvManager;
KexiDB::Driver *destDriver = drvManager.driver(
m_migrateData->destination->connectionData()->driverName);
if (!destDriver) {
- result->setStatus(&drvManager,
+ result->settqStatus(&drvManager,
i18n("Could not create database \"%1\".")
- .arg(m_migrateData->destination->databaseName()));
+ .tqarg(m_migrateData->destination->databaseName()));
return false;
}
@@ -113,30 +113,30 @@ bool KexiMigrate::isSourceAndDestinationDataSourceTheSame() const
//=============================================================================
// Perform Import operation
-bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
+bool KexiMigrate::performImport(Kexi::ObjecttqStatus* result)
{
if (result)
- result->clearStatus();
+ result->cleartqStatus();
KexiDB::DriverManager drvManager;
KexiDB::Driver *destDriver = drvManager.driver(
m_migrateData->destination->connectionData()->driverName);
if (!destDriver) {
- result->setStatus(&drvManager,
+ result->settqStatus(&drvManager,
i18n("Could not create database \"%1\".")
- .arg(m_migrateData->destination->databaseName()));
+ .tqarg(m_migrateData->destination->databaseName()));
return false;
}
- QStringList tables;
+ TQStringList tables;
// Step 1 - connect
kdDebug() << "KexiMigrate::performImport() CONNECTING..." << endl;
if (!drv_connect()) {
kdDebug() << "Couldnt connect to database server" << endl;
if (result)
- result->setStatus(i18n("Could not connect to data source \"%1\".")
- .arg(m_migrateData->source->serverInfoString()), "");
+ result->settqStatus(i18n("Could not connect to data source \"%1\".")
+ .tqarg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -145,9 +145,9 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (!tableNames(tables)) {
kdDebug() << "Couldnt get list of tables" << endl;
if (result)
- result->setStatus(
+ result->settqStatus(
i18n("Could not get a list of table names for data source \"%1\".")
- .arg(m_migrateData->source->serverInfoString()), "");
+ .tqarg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -155,9 +155,9 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (tables.isEmpty()) {
kdDebug() << "There were no tables to import" << endl;
if (result)
- result->setStatus(
+ result->settqStatus(
i18n("No tables to import found in data source \"%1\".")
- .arg(m_migrateData->source->serverInfoString()), "");
+ .tqarg(m_migrateData->source->serverInfoString()), "");
return false;
}
@@ -165,20 +165,20 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
tables.sort();
m_tableSchemas.clear();
if (!destDriver) {
- result->setStatus(&drvManager);
+ result->settqStatus(&drvManager);
return false;
}
- const bool kexi__objects_exists = tables.find("kexi__objects")!=tables.end();
- QStringList kexiDBTables;
+ const bool kexi__objects_exists = tables.tqfind("kexi__objects")!=tables.end();
+ TQStringList kexiDBTables;
if (kexi__objects_exists) {
tristate res = drv_queryStringListFromSQL(
- QString::fromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1")
- .arg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1);
+ TQString::tqfromLatin1("SELECT o_name FROM kexi__objects WHERE o_type=%1")
+ .tqarg((int)KexiDB::TableObjectType), 0, kexiDBTables, -1);
if (res == true) {
// prepend KexiDB-compatible tables to 'tables' list, so we'll copy KexiDB-compatible tables first,
// to make sure existing IDs will not be in conflict with IDs newly generated for non-KexiDB tables
kexiDBTables.sort();
- foreach(QStringList::ConstIterator, it, kexiDBTables)
+ foreach(TQStringList::ConstIterator, it, kexiDBTables)
tables.remove( *it );
//kdDebug() << "KexiDB-compat tables: " << kexiDBTables << endl;
//kdDebug() << "non-KexiDB tables: " << tables << endl;
@@ -187,21 +187,21 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
// uint i=0;
// -- read table schemas and create them in memory (only for non-KexiDB-compat tables)
- foreach (QStringList::ConstIterator, it, tables) {
+ foreach (TQStringList::ConstIterator, it, tables) {
if (destDriver->isSystemObjectName( *it ) //"kexi__objects", etc.
|| (*it).lower().startsWith("kexi__")) //tables at KexiProject level, e.g. "kexi__blobs"
continue;
// this is a non-KexiDB table: generate schema from native data source
- const QString tableName( KexiUtils::string2Identifier(*it) );
+ const TQString tableName( KexiUtils::string2Identifier(*it) );
KexiDB::TableSchema *tableSchema = new KexiDB::TableSchema(tableName);
tableSchema->setCaption( *it ); //caption is equal to the original name
if (!drv_readTableSchema(*it, *tableSchema)) {
delete tableSchema;
if (result)
- result->setStatus(
+ result->settqStatus(
i18n("Could not import project from data source \"%1\". Error reading table \"%2\".")
- .arg(m_migrateData->source->serverInfoString()).arg(tableName), "");
+ .tqarg(m_migrateData->source->serverInfoString()).tqarg(tableName), "");
return false;
}
//yeah, got a table
@@ -228,9 +228,9 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (trans.isNull()) {
ok = false;
if (result)
- result->setStatus(destConn,
+ result->settqStatus(destConn,
i18n("Could not create database \"%1\".")
- .arg(m_migrateData->destination->databaseName()));
+ .tqarg(m_migrateData->destination->databaseName()));
//later destConn->dropDatabase(m_migrateData->destination->databaseName());
//don't delete prj, otherwise eror message will be deleted delete prj;
//later return m_destPrj;
@@ -243,24 +243,24 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
// Step 5 - Create the copies of KexiDB-compat tables in memory (to maintain the same IDs)
m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport.clear();
- foreach (QStringList::ConstIterator, it, kexiDBTables) {
+ foreach (TQStringList::ConstIterator, it, kexiDBTables) {
//load the schema from kexi__objects and kexi__fields
TableSchema *t = new TableSchema();
RowData data;
bool firstRecord = true;
if (true == drv_fetchRecordFromSQL(
- QString("SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects "
- "WHERE o_name='%1' AND o_type=%1").arg(*it).arg((int)KexiDB::TableObjectType),
+ TQString("SELECT o_id, o_type, o_name, o_caption, o_desc FROM kexi__objects "
+ "WHERE o_name='%1' AND o_type=%1").tqarg(*it).tqarg((int)KexiDB::TableObjectType),
data, firstRecord)
&& destConn->setupObjectSchemaData( data, *t ))
{
//! @todo to reuse Connection::setupTableSchema()'s statement somehow...
//load schema for every field and add it
firstRecord = true;
- QString sql(
- QString::fromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
+ TQString sql(
+ TQString::tqfromLatin1("SELECT t_id, f_type, f_name, f_length, f_precision, f_constraints, "
"f_options, f_default, f_order, f_caption, f_help"
- " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").arg(t->id()) );
+ " FROM kexi__fields WHERE t_id=%1 ORDER BY f_order").tqarg(t->id()) );
while (ok) {
tristate res = drv_fetchRecordFromSQL(sql, data, firstRecord);
if (res != true) {
@@ -293,19 +293,19 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
// Step 7 - Create the non-KexiDB-compatible tables: new IDs will be assigned to them
if (ok) {
KexiDB::TableSchema *ts;
- for (QPtrListIterator<TableSchema> it (m_tableSchemas); (ts = it.current()); ++it) {
+ for (TQPtrListIterator<TableSchema> it (m_tableSchemas); (ts = it.current()); ++it) {
ok = destConn->createTable( ts );
if (!ok) {
kdDebug() << "Failed to create a table " << ts->name() << endl;
destConn->debugError();
if (result)
- result->setStatus(destConn,
+ result->settqStatus(destConn,
i18n("Could not create database \"%1\".")
- .arg(m_migrateData->destination->databaseName()));
+ .tqarg(m_migrateData->destination->databaseName()));
m_tableSchemas.remove(ts);
break;
}
- updateProgress((Q_ULLONG)NUM_OF_ROWS_PER_CREATE_TABLE);
+ updateProgress((TQ_ULLONG)NUM_OF_ROWS_PER_CREATE_TABLE);
}
}
@@ -315,7 +315,7 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (ok) {
//add compatible tables to the list, so data will be copied, if needed
if (m_migrateData->keepData) {
- for(QPtrListIterator<TableSchema> it (m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport);
+ for(TQPtrListIterator<TableSchema> it (m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport);
it.current(); ++it)
{
m_tableSchemas.append(it.current());
@@ -329,9 +329,9 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (m_destPrj->error()) {
ok = false;
if (result)
- result->setStatus(m_destPrj,
+ result->settqStatus(m_destPrj,
i18n("Could not import project from data source \"%1\".")
- .arg(m_migrateData->source->serverInfoString()));
+ .tqarg(m_migrateData->source->serverInfoString()));
}
}
@@ -344,19 +344,19 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (m_migrateData->keepData) {
//! @todo check detailed "copy forms/blobs/tables" flags here when we add them
// Copy data for "kexi__objectdata" as well, if available in the source db
- if (tables.find("kexi__objectdata")!=tables.end())
+ if (tables.tqfind("kexi__objectdata")!=tables.end())
m_tableSchemas.append(destConn->tableSchema("kexi__objectdata"));
// Copy data for "kexi__blobs" as well, if available in the source db
- if (tables.find("kexi__blobs")!=tables.end())
+ if (tables.tqfind("kexi__blobs")!=tables.end())
m_tableSchemas.append(destConn->tableSchema("kexi__blobs"));
// Copy data for "kexi__fields" as well, if available in the source db
- if (tables.find("kexi__fields")!=tables.end())
+ if (tables.tqfind("kexi__fields")!=tables.end())
m_tableSchemas.append(destConn->tableSchema("kexi__fields"));
}
- for(QPtrListIterator<TableSchema> ts(m_tableSchemas); ok && ts.current() != 0 ; ++ts)
+ for(TQPtrListIterator<TableSchema> ts(m_tableSchemas); ok && ts.current() != 0 ; ++ts)
{
- const QString tname( ts.current()->name().lower() );
+ const TQString tname( ts.current()->name().lower() );
if (destConn->driver()->isSystemObjectName( tname )
//! @todo what if these two tables are not compatible with tables created in destination db
//! because newer db format was used?
@@ -370,8 +370,8 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
continue;
}
kdDebug() << "Copying data for table: " << tname << endl;
- QString originalTableName;
- if (kexiDBTables.find(tname)==kexiDBTables.end())
+ TQString originalTableName;
+ if (kexiDBTables.tqfind(tname)==kexiDBTables.end())
//caption is equal to the original name
originalTableName = ts.current()->caption().isEmpty() ? tname : ts.current()->caption();
else
@@ -380,8 +380,8 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
if (!ok) {
kdDebug() << "Failed to copy table " << tname << endl;
if (result)
- result->setStatus(destConn,
- i18n("Could not copy table \"%1\" to destination database.").arg(tname));
+ result->settqStatus(destConn,
+ i18n("Could not copy table \"%1\" to destination database.").tqarg(tname));
break;
}
}//for
@@ -404,9 +404,9 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
// Finally: error handling
if (result && result->error())
- result->setStatus(destConn,
+ result->settqStatus(destConn,
i18n("Could not import data from data source \"%1\".")
- .arg(m_migrateData->source->serverInfoString()));
+ .tqarg(m_migrateData->source->serverInfoString()));
if (destConn) {
destConn->debugError();
destConn->rollbackTransaction(trans);
@@ -420,10 +420,10 @@ bool KexiMigrate::performImport(Kexi::ObjectStatus* result)
}
//=============================================================================
-bool KexiMigrate::performExport(Kexi::ObjectStatus* result)
+bool KexiMigrate::performExport(Kexi::ObjecttqStatus* result)
{
if (result)
- result->clearStatus();
+ result->cleartqStatus();
//! @todo performExport
@@ -432,7 +432,7 @@ bool KexiMigrate::performExport(Kexi::ObjectStatus* result)
//=============================================================================
// Functions for getting table data
-bool KexiMigrate::tableNames(QStringList & tn)
+bool KexiMigrate::tableNames(TQStringList & tn)
{
//! @todo Cache list of table names
kdDebug() << "Reading list of tables..." << endl;
@@ -442,17 +442,17 @@ bool KexiMigrate::tableNames(QStringList & tn)
//=============================================================================
// Progress functions
bool KexiMigrate::progressInitialise() {
- Q_ULLONG sum = 0, size;
+ TQ_ULLONG sum = 0, size;
emit progressPercent(0);
//! @todo Don't copy table names here
- QStringList tables;
+ TQStringList tables;
if(!tableNames(tables))
return false;
// 1) Get the number of rows/bytes to import
int tableNumber = 1;
- for(QStringList::Iterator it = tables.begin();
+ for(TQStringList::Iterator it = tables.begin();
it != tables.end(); ++it, tableNumber++)
{
if(drv_getTableSize(*it, size)) {
@@ -475,7 +475,7 @@ bool KexiMigrate::progressInitialise() {
}
-void KexiMigrate::updateProgress(Q_ULLONG step) {
+void KexiMigrate::updateProgress(TQ_ULLONG step) {
m_progressDone += step;
if (m_progressDone >= m_progressNextReport) {
int percent = (m_progressDone+1) * 100 / m_progressTotal;
@@ -489,11 +489,11 @@ void KexiMigrate::updateProgress(Q_ULLONG step) {
//=============================================================================
// Prompt the user to choose a field type
-KexiDB::Field::Type KexiMigrate::userType(const QString& fname)
+KexiDB::Field::Type KexiMigrate::userType(const TQString& fname)
{
KInputDialog *dlg;
- QStringList types;
- QString res;
+ TQStringList types;
+ TQString res;
types << "Byte";
types << "Short Integer";
@@ -512,10 +512,10 @@ KexiDB::Field::Type KexiMigrate::userType(const QString& fname)
res = dlg->getItem( i18n("Field Type"),
i18n("The data type for %1 could not be determined. "
"Please select one of the following data "
- "types").arg(fname),
+ "types").tqarg(fname),
types, 0, false);
-//! @todo use QMap<QCString, KexiDB::Field::Type> here!
+//! @todo use TQMap<TQCString, KexiDB::Field::Type> here!
if (res == *types.at(0))
return KexiDB::Field::Byte;
else if (res == *types.at(1))
@@ -546,24 +546,24 @@ KexiDB::Field::Type KexiMigrate::userType(const QString& fname)
return KexiDB::Field::Text;
}
-QVariant KexiMigrate::propertyValue( const QCString& propName )
+TQVariant KexiMigrate::propertyValue( const TQCString& propName )
{
return m_properties[propName.lower()];
}
-QString KexiMigrate::propertyCaption( const QCString& propName ) const
+TQString KexiMigrate::propertyCaption( const TQCString& propName ) const
{
return m_propertyCaptions[propName.lower()];
}
-void KexiMigrate::setPropertyValue( const QCString& propName, const QVariant& value )
+void KexiMigrate::setPropertyValue( const TQCString& propName, const TQVariant& value )
{
m_properties[propName.lower()] = value;
}
-QValueList<QCString> KexiMigrate::propertyNames() const
+TQValueList<TQCString> KexiMigrate::propertyNames() const
{
- QValueList<QCString> names = m_properties.keys();
+ TQValueList<TQCString> names = m_properties.keys();
qHeapSort(names);
return names;
}
@@ -575,21 +575,21 @@ bool KexiMigrate::isValid()
{
setError(ERR_INCOMPAT_DRIVER_VERSION,
i18n("Incompatible migration driver's \"%1\" version: found version %2, expected version %3.")
- .arg(name())
- .arg(QString("%1.%2").arg(versionMajor()).arg(versionMinor()))
- .arg(QString("%1.%2").arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor())));
+ .tqarg(name())
+ .tqarg(TQString("%1.%2").tqarg(versionMajor()).tqarg(versionMinor()))
+ .tqarg(TQString("%1.%2").tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor())));
return false;
}
return true;
}
-bool KexiMigrate::drv_queryMaxNumber(const QString& tableName,
- const QString& columnName, int& result)
+bool KexiMigrate::drv_queryMaxNumber(const TQString& tableName,
+ const TQString& columnName, int& result)
{
- QString string;
+ TQString string;
tristate r = drv_querySingleStringFromSQL(
- QString::fromLatin1("SELECT MAX(%1) FROM %2").arg(drv_escapeIdentifier(columnName))
- .arg(drv_escapeIdentifier(tableName)), 0, string);
+ TQString::tqfromLatin1("SELECT MAX(%1) FROM %2").tqarg(drv_escapeIdentifier(columnName))
+ .tqarg(drv_escapeIdentifier(tableName)), 0, string);
if (r == false)
return false;
if (~r) {
@@ -604,9 +604,9 @@ bool KexiMigrate::drv_queryMaxNumber(const QString& tableName,
}
tristate KexiMigrate::drv_querySingleStringFromSQL(
- const QString& sqlStatement, uint columnNumber, QString& string)
+ const TQString& sqlStatement, uint columnNumber, TQString& string)
{
- QStringList stringList;
+ TQStringList stringList;
const tristate res = drv_queryStringListFromSQL(sqlStatement, columnNumber, stringList, 1);
if (true == res)
string = stringList.first();
diff --git a/kexi/migration/keximigrate.h b/kexi/migration/keximigrate.h
index 3d5ed65f5..e618ed728 100644
--- a/kexi/migration/keximigrate.h
+++ b/kexi/migration/keximigrate.h
@@ -28,13 +28,13 @@
#include "keximigratedata.h"
#include <kgenericfactory.h>
-#include <qstringlist.h>
-#include <qguardedptr.h>
+#include <tqstringlist.h>
+#include <tqguardedptr.h>
class KexiProject;
namespace Kexi
{
- class ObjectStatus;
+ class ObjecttqStatus;
}
/*! KexiMigration implementation version.
@@ -75,9 +75,10 @@ Basic idea is this:
See kexi/doc/dev/kexi_import.txt for more info.
*/
-class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
+class KEXIMIGR_EXPORT KexiMigrate : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
virtual ~KexiMigrate();
@@ -98,7 +99,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\a acceptingNeeded is set to true if destination database exists.
In this case you should ask about accepting database overwriting.
Used in ImportWizard::import(). */
- bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjectStatus* result,
+ bool checkIfDestinationDatabaseOverwritingNeedsAccepting(Kexi::ObjecttqStatus* result,
bool& acceptingNeeded);
/*! Checks if the source- and the destination databases are identical.
@@ -106,10 +107,10 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
bool isSourceAndDestinationDataSourceTheSame() const;
//! Perform an import operation
- bool performImport(Kexi::ObjectStatus* result = 0);
+ bool performImport(Kexi::ObjecttqStatus* result = 0);
//! Perform an export operation
- bool performExport(Kexi::ObjectStatus* result = 0);
+ bool performExport(Kexi::ObjecttqStatus* result = 0);
//! Returns true if the migration driver supports progress updates.
inline bool progressSupported() { return drv_progressSupported(); }
@@ -119,20 +120,20 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return property value for \a propeName available for this driver.
- //! If there's no such property defined for driver, Null QVariant value is returned.
- virtual QVariant propertyValue( const QCString& propName );
+ //! If there's no such property defined for driver, Null TQVariant value is returned.
+ virtual TQVariant propertyValue( const TQCString& propName );
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
- void setPropertyValue( const QCString& propName, const QVariant& value );
+ void setPropertyValue( const TQCString& propName, const TQVariant& value );
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return translated property caption for \a propeName.
//! If there's no such property defined for driver, empty string value is returned.
- QString propertyCaption( const QCString& propName ) const;
+ TQString propertyCaption( const TQCString& propName ) const;
//! @todo This is copied from KexiDB::Driver. One day it will be merged with KexiDB.
//! \return a list of property names available for this driver.
- QValueList<QCString> propertyNames() const;
+ TQValueList<TQCString> propertyNames() const;
/*! \return true is driver is valid. Checks if KexiMigrate::versionMajor()
and KexiMigrate::versionMinor() are matching.
@@ -144,7 +145,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
protected:
//! Used by MigrateManager.
- KexiMigrate(QObject *parent, const char *name, const QStringList &args = QStringList());
+ KexiMigrate(TQObject *tqparent, const char *name, const TQStringList &args = TQStringList());
//! Connect to source database (driver specific)
virtual bool drv_connect() = 0;
@@ -152,11 +153,11 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
virtual bool drv_disconnect() = 0;
//! Get table names in source database (driver specific)
- virtual bool drv_tableNames(QStringList& tablenames) = 0;
+ virtual bool drv_tableNames(TQStringList& tablenames) = 0;
//! Read schema for a given table (driver specific)
virtual bool drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema) = 0;
+ const TQString& originalName, KexiDB::TableSchema& tableSchema) = 0;
/*! Fetches maximum number from table \a tableName, column \a columnName
into \a result. On success true is returned. If there is no records in the table,
@@ -167,8 +168,8 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
with "SELECT MAX(columName) FROM tableName" statement, assuming SQL-compliant
backend.
*/
- virtual bool drv_queryMaxNumber(const QString& tableName,
- const QString& columnName, int& result);
+ virtual bool drv_queryMaxNumber(const TQString& tableName,
+ const TQString& columnName, int& result);
/*! Fetches single string at column \a columnNumber for each record from result obtained
by running \a sqlStatement. \a numRecords can be specified to limit number of records read.
@@ -179,7 +180,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
(so e.g. keximdb driver does not need this). */
//! @todo SQL-dependent!
virtual tristate drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber, QStringList& stringList,
+ const TQString& sqlStatement, uint columnNumber, TQStringList& stringList,
int numRecords = -1)
{ Q_UNUSED(sqlStatement); Q_UNUSED(columnNumber); Q_UNUSED(stringList);
Q_UNUSED(numRecords);
@@ -191,8 +192,8 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\return cancelled if there are no records available.
This implementation uses drv_queryStringListFromSQL() with numRecords == 1. */
//! @todo SQL-dependent!
- virtual tristate drv_querySingleStringFromSQL(const QString& sqlStatement,
- uint columnNumber, QString& string);
+ virtual tristate drv_querySingleStringFromSQL(const TQString& sqlStatement,
+ uint columnNumber, TQString& string);
/*! Fetches single record from result obtained
by running \a sqlStatement.
@@ -202,7 +203,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
On success the result is stored in \a data and true is returned,
\a data is resized to appropriate size. cancelled is returned on EOF. */
//! @todo SQL-dependent!
- virtual tristate drv_fetchRecordFromSQL(const QString& sqlStatement,
+ virtual tristate drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord)
{ Q_UNUSED(sqlStatement); Q_UNUSED(data); Q_UNUSED(firstRecord);
return cancelled; }
@@ -210,7 +211,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
//! Copy a table from source DB to target DB (driver specific)
//! - create copies of KexiDB tables
//! - create copies of non-KexiDB tables
- virtual bool drv_copyTable(const QString& srcTable, KexiDB::Connection *destConn,
+ virtual bool drv_copyTable(const TQString& srcTable, KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable) = 0;
virtual bool drv_progressSupported() { return false; }
@@ -232,16 +233,16 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
\return size of the specified table
*/
- virtual bool drv_getTableSize(const QString&, Q_ULLONG&)
+ virtual bool drv_getTableSize(const TQString&, TQ_ULLONG&)
{ return false; }
- void updateProgress(Q_ULLONG step = 1ULL);
+ void updateProgress(TQ_ULLONG step = 1ULL);
//! @todo user should be asked ONCE using a convenient wizard's page, not a popup dialog
//! Prompt user to select a field type for unrecognized fields
- KexiDB::Field::Type userType(const QString& fname);
+ KexiDB::Field::Type userType(const TQString& fname);
- virtual QString drv_escapeIdentifier( const QString& str ) const {
+ virtual TQString drv_escapeIdentifier( const TQString& str ) const {
return m_kexiDBDriver ? m_kexiDBDriver->escapeIdentifier(str) : str; }
//! @todo Remove this! KexiMigrate should be usable for multiple concurrent migrations!
@@ -254,24 +255,24 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
/*! Driver properties dictionary (indexed by name),
useful for presenting properties to the user.
Set available properties here in driver implementation. */
- QMap<QCString,QVariant> m_properties;
+ TQMap<TQCString,TQVariant> m_properties;
/*! i18n'd captions for properties. You do not need
to set predefined properties' caption in driver implementation
-it's done automatically. */
- QMap<QCString,QString> m_propertyCaptions;
+ TQMap<TQCString,TQString> m_propertyCaptions;
//! KexiDB driver. For instance, it is used for escaping identifiers
- QGuardedPtr<KexiDB::Driver> m_kexiDBDriver;
+ TQGuardedPtr<KexiDB::Driver> m_kexiDBDriver;
private:
//! Get the list of tables
- bool tableNames(QStringList& tablenames);
+ bool tableNames(TQStringList& tablenames);
//! Table schemas from source DB
- QPtrList<KexiDB::TableSchema> m_tableSchemas;
+ TQPtrList<KexiDB::TableSchema> m_tableSchemas;
- QPtrList<KexiDB::TableSchema> m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport;
+ TQPtrList<KexiDB::TableSchema> m_kexiDBCompatibleTableSchemasToRemoveFromMemoryAfterImport;
/*! Estimate size of migration job
Calls drv_getTableSize for each table to be copied.
@@ -282,13 +283,13 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
KexiProject *m_destPrj;
//! Size of migration job
- Q_ULLONG m_progressTotal;
+ TQ_ULLONG m_progressTotal;
//! Amount of migration job complete
- Q_ULLONG m_progressDone;
+ TQ_ULLONG m_progressDone;
//! Don't recalculate progress done until this value is reached.
- Q_ULLONG m_progressNextReport;
+ TQ_ULLONG m_progressNextReport;
friend class MigrateManager;
};
@@ -304,7 +305,7 @@ class KEXIMIGR_EXPORT KexiMigrate : public QObject, public KexiDB::Object
KGenericFactory<KexiMigration::class_name>( "keximigrate_" #internal_name ))
/*! Driver's static version information, automatically implemented for KexiDB drivers.
- Put this into migration driver class declaration just like Q_OBJECT macro. */
+ Put this into migration driver class declaration just like TQ_OBJECT macro. */
#define KEXIMIGRATION_DRIVER \
public: \
virtual int versionMajor() const; \
diff --git a/kexi/migration/keximigratedata.h b/kexi/migration/keximigratedata.h
index 81e8c0f5b..075240bc2 100644
--- a/kexi/migration/keximigratedata.h
+++ b/kexi/migration/keximigratedata.h
@@ -41,7 +41,7 @@ namespace KexiMigration
KexiDB::ConnectionData* source;
//! Name of the source database
- QString sourceName;
+ TQString sourceName;
//! Destination project data
KexiProjectData* destination;
@@ -50,7 +50,7 @@ namespace KexiMigration
// KexiDB::Connection* dest;
// //! New database name
-// QString destName;
+// TQString destName;
//! Flag to determine structure copy, or structure + data
bool keepData;
diff --git a/kexi/migration/migratemanager.cpp b/kexi/migration/migratemanager.cpp
index 320ad718e..8cd26c3c4 100644
--- a/kexi/migration/migratemanager.cpp
+++ b/kexi/migration/migratemanager.cpp
@@ -32,7 +32,7 @@
#include <assert.h>
-#include <qapplication.h>
+#include <tqapplication.h>
//remove debug
#undef KexiDBDbg
@@ -50,7 +50,7 @@ MigrateManagerInternal* MigrateManagerInternal::s_self = 0L;
MigrateManager __manager;
MigrateManagerInternal::MigrateManagerInternal() /* protected */
- : QObject( 0, "KexiMigrate::MigrateManagerInternal" )
+ : TQObject( 0, "KexiMigrate::MigrateManagerInternal" )
, Object()
, m_drivers(17, false)
, m_refCount(0)
@@ -72,7 +72,7 @@ MigrateManagerInternal::~MigrateManagerInternal()
void MigrateManagerInternal::slotAppQuits()
{
- if (qApp->mainWidget() && qApp->mainWidget()->isVisible())
+ if (tqApp->mainWidget() && tqApp->mainWidget()->isVisible())
return; //what a hack! - we give up when app is still there
KexiDBDbg << "MigrateManagerInternal::slotAppQuits(): let's clear drivers..." << endl;
m_drivers.clear();
@@ -91,8 +91,8 @@ bool MigrateManagerInternal::lookupDrivers()
if (!lookupDriversNeeded)
return true;
- if (qApp) {
- connect(qApp,SIGNAL(aboutToQuit()),this,SLOT(slotAppQuits()));
+ if (tqApp) {
+ connect(tqApp,TQT_SIGNAL(aboutToQuit()),this,TQT_SLOT(slotAppQuits()));
}
//TODO: for QT-only version check for KInstance wrapper
// KexiDBWarn << "DriverManagerInternal::lookupDrivers(): cannot work without KInstance (KGlobal::instance()==0)!" << endl;
@@ -105,21 +105,21 @@ bool MigrateManagerInternal::lookupDrivers()
for(; it != tlist.constEnd(); ++it)
{
KService::Ptr ptr = (*it);
- QString srv_name = ptr->property("X-Kexi-MigrationDriverName").toString();
+ TQString srv_name = ptr->property("X-Kexi-MigrationDriverName").toString();
if (srv_name.isEmpty()) {
KexiDBWarn << "MigrateManagerInternal::lookupDrivers(): "
"X-Kexi-MigrationDriverName must be set for migration driver \""
<< ptr->property("Name").toString() << "\" service!\n -- skipped!" << endl;
continue;
}
- if (m_services_lcase.contains(srv_name.lower())) {
+ if (m_services_lcase.tqcontains(srv_name.lower())) {
continue;
}
//! @todo could be merged. Copied from KexiDB::DriverManager.
//<COPIED>
- QString srv_ver_str = ptr->property("X-Kexi-KexiMigrationVersion").toString();
- QStringList lst( QStringList::split(".", srv_ver_str) );
+ TQString srv_ver_str = ptr->property("X-Kexi-KexiMigrationVersion").toString();
+ TQStringList lst( TQStringList::split(".", srv_ver_str) );
int minor_ver, major_ver;
bool ok = (lst.count() == 2);
if (ok)
@@ -129,30 +129,30 @@ bool MigrateManagerInternal::lookupDrivers()
if (!ok) {
KexiDBWarn << "MigrateManagerInternal::lookupDrivers(): problem with detecting '"
<< srv_name.lower() << "' driver's version -- skipping it!" << endl;
- possibleProblems += QString("\"%1\" migration driver has unrecognized version; "
+ possibleProblems += TQString("\"%1\" migration driver has unrecognized version; "
"required driver version is \"%2.%3\"")
- .arg(srv_name.lower())
- .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor());
+ .tqarg(srv_name.lower())
+ .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor());
continue;
}
if (major_ver != KexiMigration::versionMajor() || minor_ver != KexiMigration::versionMinor()) {
- KexiDBWarn << QString("MigrateManagerInternal::lookupDrivers(): '%1' driver"
+ KexiDBWarn << TQString("MigrateManagerInternal::lookupDrivers(): '%1' driver"
" has version '%2' but required migration driver version is '%3.%4'\n"
- " -- skipping this driver!").arg(srv_name.lower()).arg(srv_ver_str)
- .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor()) << endl;
- possibleProblems += QString("\"%1\" migration driver has version \"%2\" "
+ " -- skipping this driver!").tqarg(srv_name.lower()).tqarg(srv_ver_str)
+ .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor()) << endl;
+ possibleProblems += TQString("\"%1\" migration driver has version \"%2\" "
"but required driver version is \"%3.%4\"")
- .arg(srv_name.lower()).arg(srv_ver_str)
- .arg(KexiMigration::versionMajor()).arg(KexiMigration::versionMinor());
+ .tqarg(srv_name.lower()).tqarg(srv_ver_str)
+ .tqarg(KexiMigration::versionMajor()).tqarg(KexiMigration::versionMinor());
continue;
}
//</COPIED>
- QString mime = ptr->property("X-Kexi-FileDBDriverMime").toString().lower();
- QString drvType = ptr->property("X-Kexi-MigrationDriverType").toString().lower();
+ TQString mime = ptr->property("X-Kexi-FileDBDriverMime").toString().lower();
+ TQString drvType = ptr->property("X-Kexi-MigrationDriverType").toString().lower();
if (drvType=="file") {
if (!mime.isEmpty()) {
- if (!m_services_by_mimetype.contains(mime)) {
+ if (!m_services_by_mimetype.tqcontains(mime)) {
m_services_by_mimetype.insert(mime, ptr);
}
else {
@@ -175,7 +175,7 @@ bool MigrateManagerInternal::lookupDrivers()
return true;
}
-KexiMigrate* MigrateManagerInternal::driver(const QString& name)
+KexiMigrate* MigrateManagerInternal::driver(const TQString& name)
{
if (!lookupDrivers())
return 0;
@@ -183,25 +183,25 @@ KexiMigrate* MigrateManagerInternal::driver(const QString& name)
clearError();
KexiDBDbg << "MigrationrManagerInternal::migrationDriver(): loading " << name << endl;
- KexiMigrate *drv = name.isEmpty() ? 0 : m_drivers.find(name.latin1());
+ KexiMigrate *drv = name.isEmpty() ? 0 : m_drivers.tqfind(name.latin1());
if (drv)
return drv; //cached
- if (!m_services_lcase.contains(name.lower())) {
- setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").arg(name) );
+ if (!m_services_lcase.tqcontains(name.lower())) {
+ setError(ERR_DRIVERMANAGER, i18n("Could not find import/export database driver \"%1\".").tqarg(name) );
return 0;
}
- KService::Ptr ptr= *(m_services_lcase.find(name.lower()));
- QString srv_name = ptr->property("X-Kexi-MigrationDriverName").toString();
+ KService::Ptr ptr= *(m_services_lcase.tqfind(name.lower()));
+ TQString srv_name = ptr->property("X-Kexi-MigrationDriverName").toString();
KexiDBDbg << "MigrateManagerInternal::driver(): library: "<<ptr->library()<<endl;
drv = KParts::ComponentFactory::createInstanceFromService<KexiMigrate>(ptr,
- this, srv_name.latin1(), QStringList(),&m_serverResultNum);
+ this, srv_name.latin1(), TQStringList(),&m_serverResultNum);
if (!drv) {
setError(ERR_DRIVERMANAGER, i18n("Could not load import/export database driver \"%1\".")
- .arg(name) );
+ .tqarg(name) );
if (m_componentLoadingErrors.isEmpty()) {//fill errtable on demand
m_componentLoadingErrors[KParts::ComponentFactory::ErrNoServiceFound]="ErrNoServiceFound";
m_componentLoadingErrors[KParts::ComponentFactory::ErrServiceProvidesNoLibrary]="ErrServiceProvidesNoLibrary";
@@ -252,7 +252,7 @@ void MigrateManagerInternal::decRefCount()
// ---------------------------
MigrateManager::MigrateManager()
- : QObject( 0, "KexiMigrate::MigrateManager" )
+ : TQObject( 0, "KexiMigrate::MigrateManager" )
, Object()
, d_int( MigrateManagerInternal::self() )
{
@@ -284,27 +284,27 @@ MigrateManager::~MigrateManager()
}
-const QStringList MigrateManager::driverNames()
+const TQStringList MigrateManager::driverNames()
{
if (!d_int->lookupDrivers()) {
kdDebug() << "MigrateManager::driverNames() lookupDrivers failed" << endl;
- return QStringList();
+ return TQStringList();
}
if (d_int->m_services.isEmpty()) {
kdDebug() << "MigrateManager::driverNames() MigrateManager::ServicesMap is empty" << endl;
- return QStringList();
+ return TQStringList();
}
if (d_int->error()) {
kdDebug() << "MigrateManager::driverNames() Error: " << d_int->errorMsg() << endl;
- return QStringList();
+ return TQStringList();
}
return d_int->m_services.keys();
}
-QString MigrateManager::driverForMimeType(const QString &mimeType)
+TQString MigrateManager::driverForMimeType(const TQString &mimeType)
{
if (!d_int->lookupDrivers()) {
kdDebug() << "MigrateManager::driverForMimeType() lookupDrivers() failed" << endl;
@@ -314,24 +314,24 @@ QString MigrateManager::driverForMimeType(const QString &mimeType)
KService::Ptr ptr = d_int->m_services_by_mimetype[mimeType.lower()];
if (!ptr) {
- kdDebug() << QString("MigrateManager::driverForMimeType(%1) No such mimetype").arg(mimeType) << endl;
- return QString::null;
+ kdDebug() << TQString("MigrateManager::driverForMimeType(%1) No such mimetype").tqarg(mimeType) << endl;
+ return TQString();
}
return ptr->property("X-Kexi-MigrationDriverName").toString();
}
-KexiMigrate* MigrateManager::driver(const QString& name)
+KexiMigrate* MigrateManager::driver(const TQString& name)
{
KexiMigrate *drv = d_int->driver(name);
if (d_int->error()) {
- kdDebug() << QString("MigrateManager::driver(%1) Error: %2").arg(name).arg(d_int->errorMsg()) << endl;
+ kdDebug() << TQString("MigrateManager::driver(%1) Error: %2").tqarg(name).tqarg(d_int->errorMsg()) << endl;
setError(d_int);
}
return drv;
}
-QString MigrateManager::serverErrorMsg()
+TQString MigrateManager::serverErrorMsg()
{
return d_int->m_serverErrMsg;
}
@@ -341,29 +341,29 @@ int MigrateManager::serverResult()
return d_int->m_serverResultNum;
}
-QString MigrateManager::serverResultName()
+TQString MigrateManager::serverResultName()
{
return d_int->m_serverResultName;
}
void MigrateManager::drv_clearServerResult()
{
- d_int->m_serverErrMsg=QString::null;
+ d_int->m_serverErrMsg=TQString();
d_int->m_serverResultNum=0;
- d_int->m_serverResultName=QString::null;
+ d_int->m_serverResultName=TQString();
}
-QString MigrateManager::possibleProblemsInfoMsg() const
+TQString MigrateManager::possibleProblemsInfoMsg() const
{
if (d_int->possibleProblems.isEmpty())
- return QString::null;
- QString str;
+ return TQString();
+ TQString str;
str.reserve(1024);
str = "<ul>";
- for (QStringList::ConstIterator it = d_int->possibleProblems.constBegin();
+ for (TQStringList::ConstIterator it = d_int->possibleProblems.constBegin();
it!=d_int->possibleProblems.constEnd(); ++it)
{
- str += (QString::fromLatin1("<li>") + *it + QString::fromLatin1("</li>"));
+ str += (TQString::tqfromLatin1("<li>") + *it + TQString::tqfromLatin1("</li>"));
}
str += "</ul>";
return str;
diff --git a/kexi/migration/migratemanager.h b/kexi/migration/migratemanager.h
index c876ab91c..593a931be 100644
--- a/kexi/migration/migratemanager.h
+++ b/kexi/migration/migratemanager.h
@@ -20,10 +20,10 @@
#ifndef KEXI_MIGRATION_MNGR_H
#define KEXI_MIGRATION_MNGR_H
-#include <qobject.h>
-#include <qcstring.h>
-#include <qmap.h>
-#include <qdict.h>
+#include <tqobject.h>
+#include <tqcstring.h>
+#include <tqmap.h>
+#include <tqdict.h>
#include <klibloader.h>
#include <kservice.h>
@@ -35,10 +35,10 @@ namespace KexiMigration {
class MigrateManagerInternal;
//! @short Migration library management, for finding and loading mogration drivers.
-class KEXIMIGR_EXPORT MigrateManager : public QObject, public KexiDB::Object
+class KEXIMIGR_EXPORT MigrateManager : public TQObject, public KexiDB::Object
{
public:
- typedef QMap<QString, KService::Ptr> ServicesMap;
+ typedef TQMap<TQString, KService::Ptr> ServicesMap;
MigrateManager();
virtual ~MigrateManager();
@@ -46,29 +46,29 @@ class KEXIMIGR_EXPORT MigrateManager : public QObject, public KexiDB::Object
/*! Tries to load db driver with named name \a name.
The name is case insensitive.
\return db driver, or 0 if error (then error message is also set) */
- KexiMigrate* driver(const QString& name);
+ KexiMigrate* driver(const TQString& name);
/*! returns list of available drivers names.
That drivers can be loaded by first use of driver() method. */
- const QStringList driverNames();
+ const TQStringList driverNames();
/*! Looks up a drivers list by MIME type of database file.
Only file-based database drivers are checked.
The lookup is case insensitive.
\return driver name or null string if no driver found.
*/
- QString driverForMimeType(const QString &mimeType);
+ TQString driverForMimeType(const TQString &mimeType);
//! server error is set if there is error at KService level (useful for debugging)
- virtual QString serverErrorMsg();
+ virtual TQString serverErrorMsg();
virtual int serverResult();
- virtual QString serverResultName();
+ virtual TQString serverResultName();
//! @todo copied from KexiDB::DriverManager, merge it.
/*! HTML information about possible problems encountered.
It's displayed in 'details' section, if an error encountered.
Currently it contains a list of incompatible migration drivers. */
- QString possibleProblemsInfoMsg() const;
+ TQString possibleProblemsInfoMsg() const;
protected:
virtual void drv_clearServerResult();
diff --git a/kexi/migration/migratemanager_p.h b/kexi/migration/migratemanager_p.h
index 0d90acfef..59824573d 100644
--- a/kexi/migration/migratemanager_p.h
+++ b/kexi/migration/migratemanager_p.h
@@ -20,22 +20,23 @@
#ifndef KEXI_MIGRATE_MNGR_P_H
#define KEXI_MIGRATE_MNGR_P_H
-#include <qobject.h>
-#include <qasciidict.h>
+#include <tqobject.h>
+#include <tqasciidict.h>
namespace KexiMigration {
/*! Internal class of driver manager.
*/
-class MigrateManagerInternal : public QObject, public KexiDB::Object
+class MigrateManagerInternal : public TQObject, public KexiDB::Object
{
Q_OBJECT
+ TQ_OBJECT
public:
~MigrateManagerInternal();
/*! Tries to load db driver \a name.
\return db driver, or 0 if error (then error message is also set) */
- KexiMigrate* driver(const QString& name);
+ KexiMigrate* driver(const TQString& name);
static MigrateManagerInternal *self();
@@ -47,9 +48,9 @@ class MigrateManagerInternal : public QObject, public KexiDB::Object
void decRefCount();
protected slots:
- /*! Used to destroy all drivers on QApplication quit, so even if there are
+ /*! Used to destroy all drivers on TQApplication quit, so even if there are
DriverManager's static instances that are destroyed on program
- "static destruction", drivers are not kept after QApplication death.
+ "static destruction", drivers are not kept after TQApplication death.
*/
void slotAppQuits();
@@ -65,18 +66,18 @@ class MigrateManagerInternal : public QObject, public KexiDB::Object
MigrateManager::ServicesMap m_services_lcase; //! as above but service names in lowercase
MigrateManager::ServicesMap m_services_by_mimetype;
- QAsciiDict<KexiMigrate> m_drivers;
+ TQAsciiDict<KexiMigrate> m_drivers;
ulong m_refCount;
- QString m_serverErrMsg;
+ TQString m_serverErrMsg;
int m_serverResultNum;
- QString m_serverResultName;
+ TQString m_serverResultName;
//! result names for KParts::ComponentFactory::ComponentLoadingError
- QMap<int,QString> m_componentLoadingErrors;
+ TQMap<int,TQString> m_componentLoadingErrors;
bool lookupDriversNeeded : 1;
- QStringList possibleProblems;
+ TQStringList possibleProblems;
friend class MigrateManager;
};
diff --git a/kexi/migration/mysql/mysqlmigrate.cpp b/kexi/migration/mysql/mysqlmigrate.cpp
index a2c62dd5c..013613eac 100644
--- a/kexi/migration/mysql/mysqlmigrate.cpp
+++ b/kexi/migration/mysql/mysqlmigrate.cpp
@@ -20,11 +20,11 @@
#include "mysqlmigrate.h"
-#include <qstring.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
#include <mysql_version.h>
@@ -52,9 +52,9 @@ KEXIMIGRATE_DRIVER_INFO( MySQLMigrate, mysql )
}*/
//! Constructor (needed for trading interface)
-MySQLMigrate::MySQLMigrate(QObject *parent, const char *name,
- const QStringList &args) :
- KexiMigrate(parent, name, args)
+MySQLMigrate::MySQLMigrate(TQObject *tqparent, const char *name,
+ const TQStringList &args) :
+ KexiMigrate(tqparent, name, args)
,d(new MySqlConnectionInternal(0))
,m_mysqlres(0)
{
@@ -92,7 +92,7 @@ bool MySQLMigrate::drv_disconnect()
/* ************************************************************************** */
/*! Get the types and properties for each column. */
bool MySQLMigrate::drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema)
+ const TQString& originalName, KexiDB::TableSchema& tableSchema)
{
// m_table = new KexiDB::TableSchema(table);
@@ -100,7 +100,7 @@ bool MySQLMigrate::drv_readTableSchema(
// tableSchema.setCaption(table + " table");
//Perform a query on the table to get some data
- QString query = QString("SELECT * FROM `") + drv_escapeIdentifier(originalName) + "` LIMIT 0";
+ TQString query = TQString("SELECT * FROM `") + drv_escapeIdentifier(originalName) + "` LIMIT 0";
if(d->executeSQL(query)) {
MYSQL_RES *res = mysql_store_result(d->mysql);
if (res != NULL) {
@@ -109,14 +109,14 @@ bool MySQLMigrate::drv_readTableSchema(
MYSQL_FIELD *fields = mysql_fetch_fields(res);
for(unsigned int i = 0; i < numFlds; i++) {
- QString fldName(fields[i].name);
- QString fldID( KexiUtils::string2Identifier(fldName) );
+ TQString fldName(fields[i].name);
+ TQString fldID( KexiUtils::string2Identifier(fldName) );
KexiDB::Field *fld =
new KexiDB::Field(fldID, type(originalName, &fields[i]));
if(fld->type() == KexiDB::Field::Enum) {
- QStringList values = examineEnumField(originalName, &fields[i]);
+ TQStringList values = examineEnumField(originalName, &fields[i]);
}
fld->setCaption(fldName);
@@ -136,14 +136,14 @@ bool MySQLMigrate::drv_readTableSchema(
/*! Get a list of tables and put into the supplied string list */
-bool MySQLMigrate::drv_tableNames(QStringList& tableNames)
+bool MySQLMigrate::drv_tableNames(TQStringList& tableNames)
{
if(d->executeSQL("SHOW TABLES")) {
MYSQL_RES *res = mysql_store_result(d->mysql);
if (res != NULL) {
MYSQL_ROW row;
while ((row = mysql_fetch_row(res)) != NULL) {
- tableNames << QString::fromUtf8(row[0]); //utf8.. ok?
+ tableNames << TQString::fromUtf8(row[0]); //utf8.. ok?
}
mysql_free_result(res);
} else {
@@ -160,7 +160,7 @@ bool MySQLMigrate::drv_tableNames(QStringList& tableNames)
On success the result is stored in \a stringList and true is returned.
\return cancelled if there are no records available. */
tristate MySQLMigrate::drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber, QStringList& stringList, int numRecords)
+ const TQString& sqlStatement, uint columnNumber, TQStringList& stringList, int numRecords)
{
stringList.clear();
if (d->executeSQL(sqlStatement)) {
@@ -190,7 +190,7 @@ tristate MySQLMigrate::drv_queryStringListFromSQL(
mysql_free_result(res);
return false;
}
- stringList.append( QString::fromUtf8(row[columnNumber], lengths[columnNumber]) ); //ok? utf8?
+ stringList.append( TQString::fromUtf8(row[columnNumber], lengths[columnNumber]) ); //ok? utf8?
}
mysql_free_result(res);
} else {
@@ -204,7 +204,7 @@ tristate MySQLMigrate::drv_queryStringListFromSQL(
/*! Fetches single record from result obtained
by running \a sqlStatement. */
-tristate MySQLMigrate::drv_fetchRecordFromSQL(const QString& sqlStatement,
+tristate MySQLMigrate::drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord)
{
if (firstRecord || !m_mysqlres) {
@@ -235,12 +235,12 @@ tristate MySQLMigrate::drv_fetchRecordFromSQL(const QString& sqlStatement,
}
data.resize(numFields);
for (int i=0; i < numFields; i++)
- data[i] = QString::fromUtf8(row[i], lengths[i] ); //ok? utf8?
+ data[i] = TQString::fromUtf8(row[i], lengths[i] ); //ok? utf8?
return true;
}
/*! Copy MySQL table to KexiDB database */
-bool MySQLMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *destConn,
+bool MySQLMigrate::drv_copyTable(const TQString& srcTable, KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable)
{
if(d->executeSQL("SELECT * FROM `" + drv_escapeIdentifier(srcTable)) + "`") {
@@ -249,8 +249,8 @@ bool MySQLMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *de
MYSQL_ROW row;
const KexiDB::QueryColumnInfo::Vector fieldsExpanded( dstTable->query()->fieldsExpanded() );
while ((row = mysql_fetch_row(res)) != NULL) {
- const int numFields = QMIN((int)fieldsExpanded.count(), (int)mysql_num_fields(res));
- QValueList<QVariant> vals;
+ const int numFields = TQMIN((int)fieldsExpanded.count(), (int)mysql_num_fields(res));
+ TQValueList<TQVariant> vals;
unsigned long *lengths = mysql_fetch_lengths(res);
if (!lengths) {
mysql_free_result(res);
@@ -280,14 +280,14 @@ bool MySQLMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *de
}
-bool MySQLMigrate::drv_getTableSize(const QString& table, Q_ULLONG& size) {
+bool MySQLMigrate::drv_getTableSize(const TQString& table, TQ_ULLONG& size) {
if(d->executeSQL("SELECT COUNT(*) FROM `" + drv_escapeIdentifier(table)) + "`") {
MYSQL_RES *res = mysql_store_result(d->mysql);
if (res != NULL) {
MYSQL_ROW row;
while ((row = mysql_fetch_row(res)) != NULL) {
//! @todo check result valid
- size = QString(row[0]).toULongLong();
+ size = TQString(row[0]).toULongLong();
}
mysql_free_result(res);
} else {
@@ -300,7 +300,7 @@ bool MySQLMigrate::drv_getTableSize(const QString& table, Q_ULLONG& size) {
}
//! Convert a MySQL type to a KexiDB type, prompting user if necessary.
-KexiDB::Field::Type MySQLMigrate::type(const QString& table,
+KexiDB::Field::Type MySQLMigrate::type(const TQString& table,
const MYSQL_FIELD *fld)
{
// Field type
@@ -391,12 +391,12 @@ KexiDB::Field::Type MySQLMigrate::type(const QString& table,
Assumes fld is a CHAR, VARCHAR, one of the BLOBs or TEXTs.
\return KexiDB::Field::Text, KexiDB::Field::LongText or KexiDB::Field::BLOB
*/
-KexiDB::Field::Type MySQLMigrate::examineBlobField(const QString& table,
+KexiDB::Field::Type MySQLMigrate::examineBlobField(const TQString& table,
const MYSQL_FIELD* fld) {
- QString mysqlType;
+ TQString mysqlType;
KexiDB::Field::Type kexiType;
- QString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
- "` LIKE '" + QString::fromLatin1(fld->name) + "'";
+ TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
+ "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'";
if(d->executeSQL(query)) {
MYSQL_RES *res = mysql_store_result(d->mysql);
@@ -404,7 +404,7 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const QString& table,
if (res != NULL) {
MYSQL_ROW row;
while ((row = mysql_fetch_row(res)) != NULL) {
- mysqlType = QString(row[1]);
+ mysqlType = TQString(row[1]);
}
mysql_free_result(res);
} else {
@@ -417,10 +417,10 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const QString& table,
kdDebug() << "MySQLMigrate::examineBlobField: considering "
<< mysqlType << endl;
- if(mysqlType.contains("blob", false) != 0) {
+ if(mysqlType.tqcontains("blob", false) != 0) {
// Doesn't matter how big it is, it's binary
kexiType = KexiDB::Field::BLOB;
- } else if(mysqlType.contains("text", false) != 0) {
+ } else if(mysqlType.tqcontains("text", false) != 0) {
// All the TEXT types are too big for Kexi text.
kexiType = KexiDB::Field::BLOB;
} else if(fld->length < 200) {
@@ -440,11 +440,11 @@ KexiDB::Field::Type MySQLMigrate::examineBlobField(const QString& table,
strings, "option1", "option2".
\return list of possible values the field can take
*/
-QStringList MySQLMigrate::examineEnumField(const QString& table,
+TQStringList MySQLMigrate::examineEnumField(const TQString& table,
const MYSQL_FIELD* fld) {
- QString vals;
- QString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
- "` LIKE '" + QString::fromLatin1(fld->name) + "'";
+ TQString vals;
+ TQString query = "SHOW COLUMNS FROM `" + drv_escapeIdentifier(table) +
+ "` LIKE '" + TQString::tqfromLatin1(fld->name) + "'";
if(d->executeSQL(query)) {
MYSQL_RES *res = mysql_store_result(d->mysql);
@@ -452,7 +452,7 @@ QStringList MySQLMigrate::examineEnumField(const QString& table,
if (res != NULL) {
MYSQL_ROW row;
while ((row = mysql_fetch_row(res)) != NULL) {
- vals = QString(row[1]);
+ vals = TQString(row[1]);
}
mysql_free_result(res);
} else {
@@ -460,7 +460,7 @@ QStringList MySQLMigrate::examineEnumField(const QString& table,
}
} else {
// Huh? MySQL wont tell us what values it can take.
- return QStringList();
+ return TQStringList();
}
kdDebug() << "MySQLMigrate::examineEnumField: considering "
@@ -470,22 +470,22 @@ QStringList MySQLMigrate::examineEnumField(const QString& table,
if(!vals.startsWith("enum(")) {
// Huh? We're supposed to be parsing an enum!
kdDebug() << "MySQLMigrate::examineEnumField:1 not an enum!" << endl;
- return QStringList();
+ return TQStringList();
}
if(!vals.endsWith(")")) {
kdDebug() << "MySQLMigrate::examineEnumField:2 not an enum!" << endl;
- return QStringList();
+ return TQStringList();
}
- // It'd be nice to use QString.section or QStringList.split, but we need
+ // It'd be nice to use TQString.section or TQStringList.split, but we need
// to be careful as enum values can have commas and quote marks in them
// e.g. CREATE TABLE t(f enum('option,''') gives one option: "option,'"
vals = vals.remove(0,5);
- QRegExp rx = QRegExp("^'((?:[^,']|,|'')*)'");
- QStringList values = QStringList();
+ TQRegExp rx = TQRegExp("^'((?:[^,']|,|'')*)'");
+ TQStringList values = TQStringList();
int index = 0;
- while ((index = rx.search(vals, index, QRegExp::CaretAtOffset)) != -1) {
+ while ((index = rx.search(vals, index, TQRegExp::CaretAtOffset)) != -1) {
int len = rx.matchedLength();
if (len != -1) {
kdDebug() << "MySQLMigrate::examineEnumField:3 " << rx.cap(1) << endl;
@@ -494,8 +494,8 @@ QStringList MySQLMigrate::examineEnumField(const QString& table,
kdDebug() << "MySQLMigrate::examineEnumField:4 lost" << endl;
}
- QChar next = vals[index + len];
- if (next != QChar(',') && next != QChar(')')) {
+ TQChar next = vals[index + len];
+ if (next != TQChar(',') && next != TQChar(')')) {
kdDebug() << "MySQLMigrate::examineEnumField:5 " << (char)next << endl;
}
index += len + 1;
@@ -509,7 +509,7 @@ void MySQLMigrate::getConstraints(int flags, KexiDB::Field* fld) {
fld->setPrimaryKey(flags & PRI_KEY_FLAG);
fld->setAutoIncrement(flags & AUTO_INCREMENT_FLAG);
fld->setNotNull(flags & NOT_NULL_FLAG);
- fld->setUniqueKey(flags & UNIQUE_KEY_FLAG);
+ fld->setUniqueKey(flags & UNITQUE_KEY_FLAG);
//! @todo: Keys and uniqueness
}
diff --git a/kexi/migration/mysql/mysqlmigrate.h b/kexi/migration/mysql/mysqlmigrate.h
index 9f32bd2f4..e7627e76c 100644
--- a/kexi/migration/mysql/mysqlmigrate.h
+++ b/kexi/migration/mysql/mysqlmigrate.h
@@ -30,6 +30,7 @@ namespace KexiMigration
class MySQLMigrate : public KexiMigrate
{
Q_OBJECT
+ TQ_OBJECT
KEXIMIGRATION_DRIVER
private:
@@ -38,44 +39,44 @@ namespace KexiMigration
protected:
//Driver specific function to return table names
- virtual bool drv_tableNames(QStringList& tablenames);
+ virtual bool drv_tableNames(TQStringList& tablenames);
//Driver specific implementation to read a table schema
virtual bool drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema);
+ const TQString& originalName, KexiDB::TableSchema& tableSchema);
//Driver specific connection implementation
virtual bool drv_connect();
virtual bool drv_disconnect();
virtual tristate drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber,
- QStringList& stringList, int numRecords = -1);
+ const TQString& sqlStatement, uint columnNumber,
+ TQStringList& stringList, int numRecords = -1);
- virtual tristate drv_fetchRecordFromSQL(const QString& sqlStatement,
+ virtual tristate drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord);
- virtual bool drv_copyTable(const QString& srcTable,
+ virtual bool drv_copyTable(const TQString& srcTable,
KexiDB::Connection *destConn, KexiDB::TableSchema* dstTable);
virtual bool drv_progressSupported() { return true; }
- virtual bool drv_getTableSize(const QString& table, Q_ULLONG& size);
+ virtual bool drv_getTableSize(const TQString& table, TQ_ULLONG& size);
//TODO: move this somewhere to low level class (MIGRATION?)
-// virtual bool drv_getTablesList( QStringList &list );
+// virtual bool drv_getTablesList( TQStringList &list );
//TODO: move this somewhere to low level class (MIGRATION?)
-// virtual bool drv_containsTable( const QString &tableName );
+// virtual bool drv_containsTable( const TQString &tableName );
public:
// MySQLMigrate();
- MySQLMigrate(QObject *parent, const char *name, const QStringList& args = QStringList());
+ MySQLMigrate(TQObject *tqparent, const char *name, const TQStringList& args = TQStringList());
~MySQLMigrate();
- KexiDB::Field::Type type(const QString& table, const MYSQL_FIELD* t);
+ KexiDB::Field::Type type(const TQString& table, const MYSQL_FIELD* t);
- KexiDB::Field::Type examineBlobField(const QString& table,
+ KexiDB::Field::Type examineBlobField(const TQString& table,
const MYSQL_FIELD* fld);
- QStringList examineEnumField(const QString& table,
+ TQStringList examineEnumField(const TQString& table,
const MYSQL_FIELD* fld);
void getConstraints(int mysqlConstraints, KexiDB::Field* fld);
void getOptions(int flags, KexiDB::Field* fld);
diff --git a/kexi/migration/pqxx/pg_type.h b/kexi/migration/pqxx/pg_type.h
index e0ead91ad..a8b94f0a3 100644
--- a/kexi/migration/pqxx/pg_type.h
+++ b/kexi/migration/pqxx/pg_type.h
@@ -152,10 +152,10 @@
//XX:XX:XX:XX:XX:XX, MAC address
#define MACADDROID 829
-//IP address/netmask, host address, netmask optional
+//IP address/nettqmask, host address, nettqmask optional
#define INETOID 869
-//network IP address/netmask, network address
+//network IP address/nettqmask, network address
#define CIDROID 650
//access control list
diff --git a/kexi/migration/pqxx/pqxxmigrate.cpp b/kexi/migration/pqxx/pqxxmigrate.cpp
index 157158973..c01d68fda 100644
--- a/kexi/migration/pqxx/pqxxmigrate.cpp
+++ b/kexi/migration/pqxx/pqxxmigrate.cpp
@@ -21,9 +21,9 @@
#include "pqxxmigrate.h"
#include "pg_type.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
//I maybe should not use stl?
#include <string>
@@ -50,15 +50,15 @@ KEXIMIGRATE_DRIVER_INFO( PqxxMigrate, pqxx )
//==================================================================================
//Constructor
/*PqxxMigrate::PqxxMigrate()
- : KexiMigrate(parent, name, args)
+ : KexiMigrate(tqparent, name, args)
{
m_res=0;
m_trans=0;
m_conn=0;
}*/
-PqxxMigrate::PqxxMigrate(QObject *parent, const char *name, const QStringList &args)
- : KexiMigrate(parent, name, args)
+PqxxMigrate::PqxxMigrate(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiMigrate(tqparent, name, args)
{
m_res=0;
m_trans=0;
@@ -78,7 +78,7 @@ PqxxMigrate::~PqxxMigrate()
//any any other attributes required by kexi
//helped by reading the 'tables' test program
bool PqxxMigrate::drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema)
+ const TQString& originalName, KexiDB::TableSchema& tableSchema)
{
// m_table = new KexiDB::TableSchema(table);
@@ -91,9 +91,9 @@ bool PqxxMigrate::drv_readTableSchema(
//Loop round the fields
for (uint i = 0; i < (uint)m_res->columns(); i++)
{
- QString fldName(m_res->column_name(i));
+ TQString fldName(m_res->column_name(i));
KexiDB::Field::Type fldType = type(m_res->column_type(i), fldName);
- QString fldID( KexiUtils::string2Identifier(fldName) );
+ TQString fldID( KexiUtils::string2Identifier(fldName) );
const pqxx::oid toid = tableOid(originalName);
if (toid==0)
return false;
@@ -124,7 +124,7 @@ bool PqxxMigrate::drv_readTableSchema(
//==================================================================================
//get a list of tables and put into the supplied string list
-bool PqxxMigrate::drv_tableNames(QStringList& tableNames)
+bool PqxxMigrate::drv_tableNames(TQStringList& tableNames)
{
/*
//pg_ = standard postgresql tables, pga_ = tables added by pgaccess, sql_ = probably information schemas, kexi__ = existing kexi tables
@@ -135,7 +135,7 @@ bool PqxxMigrate::drv_tableNames(QStringList& tableNames)
for (pqxx::result::const_iterator c = m_res->begin(); c != m_res->end(); ++c)
{
// Copy the result into the return list
- tableNames << QString::fromLatin1 (c[0].c_str());
+ tableNames << TQString::tqfromLatin1 (c[0].c_str());
}
return true;
}
@@ -147,7 +147,7 @@ bool PqxxMigrate::drv_tableNames(QStringList& tableNames)
//==================================================================================
//Convert a postgresql type to a kexi type
-KexiDB::Field::Type PqxxMigrate::type(int t, const QString& fname)
+KexiDB::Field::Type PqxxMigrate::type(int t, const TQString& fname)
{
switch(t)
{
@@ -193,8 +193,8 @@ bool PqxxMigrate::drv_connect()
{
kdDebug() << "drv_connect: " << m_migrateData->sourceName << endl;
- QString conninfo;
- QString socket;
+ TQString conninfo;
+ TQString socket;
//Setup local/remote connection
if (m_migrateData->source->hostName.isEmpty())
@@ -217,15 +217,15 @@ bool PqxxMigrate::drv_connect()
if (m_migrateData->source->port == 0)
m_migrateData->source->port = 5432;
- conninfo += QString::fromLatin1(" port='%1'").arg(m_migrateData->source->port);
+ conninfo += TQString::tqfromLatin1(" port='%1'").tqarg(m_migrateData->source->port);
- conninfo += QString::fromLatin1(" dbname='%1'").arg(m_migrateData->sourceName);
+ conninfo += TQString::tqfromLatin1(" dbname='%1'").tqarg(m_migrateData->sourceName);
if (!m_migrateData->source->userName.isNull())
- conninfo += QString::fromLatin1(" user='%1'").arg(m_migrateData->source->userName);
+ conninfo += TQString::tqfromLatin1(" user='%1'").tqarg(m_migrateData->source->userName);
if (!m_migrateData->source->password.isNull())
- conninfo += QString::fromLatin1(" password='%1'").arg(m_migrateData->source->password);
+ conninfo += TQString::tqfromLatin1(" password='%1'").tqarg(m_migrateData->source->password);
try
{
@@ -257,7 +257,7 @@ bool PqxxMigrate::drv_disconnect()
}
//==================================================================================
//Perform a query on the database and store result in m_res
-bool PqxxMigrate::query(const QString& statement)
+bool PqxxMigrate::query(const TQString& statement)
{
kdDebug() << "query: " << statement.latin1() << endl;
@@ -303,10 +303,10 @@ void PqxxMigrate::clearResultInfo()
//=========================================================================
//Return the OID for a table
-pqxx::oid PqxxMigrate::tableOid(const QString& table)
+pqxx::oid PqxxMigrate::tableOid(const TQString& table)
{
- QString statement;
- static QString otable;
+ TQString statement;
+ static TQString otable;
static pqxx::oid toid;
pqxx::nontransaction* tran = 0;
@@ -368,7 +368,7 @@ pqxx::oid PqxxMigrate::tableOid(const QString& table)
//TODO: Add result caching for speed
bool PqxxMigrate::primaryKey(pqxx::oid table_uid, int col) const
{
- QString statement;
+ TQString statement;
bool pkey;
int keyf;
@@ -377,7 +377,7 @@ bool PqxxMigrate::primaryKey(pqxx::oid table_uid, int col) const
try
{
- statement = QString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").arg(table_uid);
+ statement = TQString("SELECT indkey FROM pg_index WHERE ((indisprimary = true) AND (indrelid = %1))").tqarg(table_uid);
tran = new pqxx::nontransaction(*m_conn, "find_pkey");
tmpres = new pqxx::result(tran->exec(statement.latin1()));
@@ -425,7 +425,7 @@ bool PqxxMigrate::primaryKey(pqxx::oid table_uid, int col) const
On success the result is stored in \a string and true is returned.
\return cancelled if there are no records available. */
tristate PqxxMigrate::drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber, QStringList& stringList, int numRecords)
+ const TQString& sqlStatement, uint columnNumber, TQStringList& stringList, int numRecords)
{
std::string result;
int i = 0;
@@ -436,7 +436,7 @@ tristate PqxxMigrate::drv_queryStringListFromSQL(
{
if (it.size() > 0 && it.size() > columnNumber) {
it.at(columnNumber).to(result);
- stringList.append( QString::fromUtf8(result.c_str()) );
+ stringList.append( TQString::fromUtf8(result.c_str()) );
}
else {
clearResultInfo();
@@ -480,7 +480,7 @@ tristate PqxxMigrate::drv_queryStringListFromSQL(
mysql_free_result(res);
return false;
}
- string = QString::fromLatin1(row[columnNumber], lengths[columnNumber]);
+ string = TQString::tqfromLatin1(row[columnNumber], lengths[columnNumber]);
mysql_free_result(res);
} else {
kdDebug() << "PqxxMigrate::drv_querySingleStringFromSQL(): null result" << endl;
@@ -491,7 +491,7 @@ tristate PqxxMigrate::drv_queryStringListFromSQL(
}*/
}
-tristate PqxxMigrate::drv_fetchRecordFromSQL(const QString& sqlStatement,
+tristate PqxxMigrate::drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord)
{
if (firstRecord || !m_res) {
@@ -520,7 +520,7 @@ tristate PqxxMigrate::drv_fetchRecordFromSQL(const QString& sqlStatement,
//=========================================================================
/*! Copy PostgreSQL table to KexiDB database */
-bool PqxxMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *destConn,
+bool PqxxMigrate::drv_copyTable(const TQString& srcTable, KexiDB::Connection *destConn,
KexiDB::TableSchema* dstTable)
{
std::vector<std::string> R;
@@ -533,7 +533,7 @@ bool PqxxMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *des
const KexiDB::QueryColumnInfo::Vector fieldsExpanded( dstTable->query()->fieldsExpanded() );
for (int n=0; (stream >> R); ++n)
{
- QValueList<QVariant> vals;
+ TQValueList<TQVariant> vals;
std::vector<std::string>::const_iterator i, end( R.end() );
int index = 0;
for ( i = R.begin(); i != end; ++i, index++) {
@@ -560,7 +560,7 @@ bool PqxxMigrate::drv_copyTable(const QString& srcTable, KexiDB::Connection *des
//TODO: Add result caching for speed
bool PqxxMigrate::uniqueKey(pqxx::oid table_uid, int col) const
{
- QString statement;
+ TQString statement;
bool ukey;
int keyf;
@@ -569,7 +569,7 @@ bool PqxxMigrate::uniqueKey(pqxx::oid table_uid, int col) const
try
{
- statement = QString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").arg(table_uid);
+ statement = TQString("SELECT indkey FROM pg_index WHERE ((indisunique = true) AND (indrelid = %1))").tqarg(table_uid);
tran = new pqxx::nontransaction(*m_conn, "find_ukey");
tmpres = new pqxx::result(tran->exec(statement.latin1()));
@@ -635,7 +635,7 @@ bool PqxxMigrate::notEmpty(pqxx::oid /*table_uid*/, int /*col*/) const
//==================================================================================
//Return a list of database names
-/*bool PqxxMigrate::drv_getDatabasesList( QStringList &list )
+/*bool PqxxMigrate::drv_getDatabasesList( TQStringList &list )
{
KexiDBDrvDbg << "pqxxSqlConnection::drv_getDatabaseList" << endl;
@@ -647,7 +647,7 @@ bool PqxxMigrate::notEmpty(pqxx::oid /*table_uid*/, int /*col*/) const
// Read value of column 0 into a string N
c[0].to(N);
// Copy the result into the return list
- list << QString::fromLatin1 (N.c_str());
+ list << TQString::tqfromLatin1 (N.c_str());
KexiDBDrvDbg << N.c_str() << endl;
}
return true;
diff --git a/kexi/migration/pqxx/pqxxmigrate.h b/kexi/migration/pqxx/pqxxmigrate.h
index c09c8a7a9..ee33c1386 100644
--- a/kexi/migration/pqxx/pqxxmigrate.h
+++ b/kexi/migration/pqxx/pqxxmigrate.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef PQXXIMPORT_H
-#define PQXXIMPORT_H
+#ifndef PTQXXIMPORT_H
+#define PTQXXIMPORT_H
#include <migration/keximigrate.h>
@@ -34,26 +34,27 @@ namespace KexiMigration
class PqxxMigrate : public KexiMigrate
{
Q_OBJECT
+ TQ_OBJECT
KEXIMIGRATION_DRIVER
public:
- PqxxMigrate(QObject *parent, const char *name, const QStringList &args = QStringList());
+ PqxxMigrate(TQObject *tqparent, const char *name, const TQStringList &args = TQStringList());
virtual ~PqxxMigrate();
protected:
//Driver specific function to return table names
- virtual bool drv_tableNames(QStringList& tablenames);
+ virtual bool drv_tableNames(TQStringList& tablenames);
//Driver specific implementation to read a table schema
virtual bool drv_readTableSchema(
- const QString& originalName, KexiDB::TableSchema& tableSchema);
+ const TQString& originalName, KexiDB::TableSchema& tableSchema);
//Driver specific connection implementation
virtual bool drv_connect();
virtual bool drv_disconnect();
virtual tristate drv_queryStringListFromSQL(
- const QString& sqlStatement, uint columnNumber, QStringList& stringList,
+ const TQString& sqlStatement, uint columnNumber, TQStringList& stringList,
int numRecords = -1);
/*! Fetches single record from result obtained
@@ -64,10 +65,10 @@ namespace KexiMigration
On success the result is stored in \a data and true is returned,
\a data is resized to appropriate size. cancelled is returned on EOF. */
//! @todo SQL-dependent!
- virtual tristate drv_fetchRecordFromSQL(const QString& sqlStatement,
+ virtual tristate drv_fetchRecordFromSQL(const TQString& sqlStatement,
KexiDB::RowData& data, bool &firstRecord);
- virtual bool drv_copyTable(const QString& srcTable,
+ virtual bool drv_copyTable(const TQString& srcTable,
KexiDB::Connection *destConn, KexiDB::TableSchema* dstTable);
private:
@@ -85,15 +86,15 @@ namespace KexiMigration
pqxx::result::const_iterator m_fetchRecordFromSQL_iter;
//perform a query on the database
- bool query(const QString& statement);
+ bool query(const TQString& statement);
//Clear the result info
void clearResultInfo ();
- pqxx::oid tableOid(const QString& tablename);
+ pqxx::oid tableOid(const TQString& tablename);
//Convert the pqxx type to a kexi type
- KexiDB::Field::Type type(int t, const QString& fname);
+ KexiDB::Field::Type type(int t, const TQString& fname);
//Find out the field constraints
//Return whether or not the field is a pkey
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.cpp b/kexi/plugins/forms/kexiactionselectiondialog.cpp
index 26b4a9a68..31ab61d03 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog.cpp
+++ b/kexi/plugins/forms/kexiactionselectiondialog.cpp
@@ -34,38 +34,38 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qbitmap.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
+#include <tqbitmap.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
#include <widget/utils/klistviewitemtemplate.h>
#include <widget/kexibrowser.h>
#include <widget/kexibrowseritem.h>
#include <kexiutils/utils.h>
-typedef KListViewItemTemplate<QString> ActionSelectorDialogListItemBase;
+typedef KListViewItemTemplate<TQString> ActionSelectorDialogListItemBase;
class ActionSelectorDialogListItem : public ActionSelectorDialogListItemBase
{
public:
- ActionSelectorDialogListItem(const QString& data, QListView *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListView *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- ActionSelectorDialogListItem(const QString& data, QListViewItem *parent, QString label1)
- : ActionSelectorDialogListItemBase(data, parent, label1)
+ ActionSelectorDialogListItem(const TQString& data, TQListViewItem *tqparent, TQString label1)
+ : ActionSelectorDialogListItemBase(data, tqparent, label1)
, fifoSorting(true)
{
- m_sortKey.sprintf("%2.2d", parent->childCount());
+ m_sortKey.sprintf("%2.2d", tqparent->childCount());
}
- virtual QString key( int column, bool ascending ) const
+ virtual TQString key( int column, bool ascending ) const
{
return fifoSorting ? m_sortKey : ActionSelectorDialogListItemBase::key(column, ascending);
}
@@ -73,18 +73,18 @@ public:
bool fifoSorting : 1;
protected:
- QString m_sortKey;
+ TQString m_sortKey;
};
//---------------------------------------
-ActionsListViewBase::ActionsListViewBase(QWidget* parent)
- : KListView(parent)
+ActionsListViewBase::ActionsListViewBase(TQWidget* tqparent)
+ : KListView(tqparent)
{
- setResizeMode(QListView::AllColumns);
+ setResizeMode(TQListView::AllColumns);
addColumn("");
header()->hide();
- setColumnWidthMode(0, QListView::Maximum);
+ setColumnWidthMode(0, TQListView::Maximum);
setAllColumnsShowFocus(true);
setTooltipColumn(0);
}
@@ -93,9 +93,9 @@ ActionsListViewBase::~ActionsListViewBase()
{
}
-QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
+TQListViewItem *ActionsListViewBase::itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item && item->data == actionName)
return item;
@@ -103,9 +103,9 @@ QListViewItem *ActionsListViewBase::itemForAction(const QString& actionName)
return 0;
}
-void ActionsListViewBase::selectAction(const QString& actionName)
+void ActionsListViewBase::selectAction(const TQString& actionName)
{
- QListViewItem *item = itemForAction(actionName);
+ TQListViewItem *item = itemForAction(actionName);
if (item) {
setSelected(item, true);
ensureItemVisible(firstChild());
@@ -115,8 +115,8 @@ void ActionsListViewBase::selectAction(const QString& actionName)
//---------------------------------------
-KActionsListViewBase::KActionsListViewBase(QWidget* parent, KexiMainWindow* mainWin)
- : ActionsListViewBase(parent)
+KActionsListViewBase::KActionsListViewBase(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : ActionsListViewBase(tqparent)
, m_mainWin(mainWin)
{
}
@@ -126,7 +126,7 @@ KActionsListViewBase::~KActionsListViewBase() {}
void KActionsListViewBase::init()
{
setSorting(0);
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
KActionPtrList sharedActions( m_mainWin->allActions() );
const Kexi::ActionCategories *acat = Kexi::actionCategories();
foreach (KActionPtrList::ConstIterator, it, sharedActions) {
@@ -142,9 +142,9 @@ void KActionsListViewBase::init()
if (!isActionVisible((*it)->name(), actionCategories))
continue;
ActionSelectorDialogListItem *pitem = new ActionSelectorDialogListItem((*it)->name(),
- this, (*it)->toolTip().isEmpty() ? (*it)->text().replace("&", "") : (*it)->toolTip() );
+ this, (*it)->toolTip().isEmpty() ? (*it)->text().tqreplace("&", "") : (*it)->toolTip() );
pitem->fifoSorting = false; //alpha sort
- pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( QIconSet::Small, QIconSet::Active ) );
+ pitem->setPixmap( 0, (*it)->iconSet( KIcon::Small, 16 ).pixmap( TQIconSet::Small, TQIconSet::Active ) );
if (!pitem->pixmap(0) || pitem->pixmap(0)->isNull())
pitem->setPixmap( 0, noIcon );
}
@@ -156,8 +156,8 @@ void KActionsListViewBase::init()
class KActionsListView : public KActionsListViewBase
{
public:
- KActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ KActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~KActionsListView() {}
@@ -172,8 +172,8 @@ public:
class CurrentFormActionsListView : public KActionsListViewBase
{
public:
- CurrentFormActionsListView(QWidget* parent, KexiMainWindow* mainWin)
- : KActionsListViewBase(parent, mainWin)
+ CurrentFormActionsListView(TQWidget* tqparent, KexiMainWindow* mainWin)
+ : KActionsListViewBase(tqparent, mainWin)
{
}
virtual ~CurrentFormActionsListView() {}
@@ -188,11 +188,11 @@ public:
class ActionCategoriesListView : public ActionsListViewBase
{
public:
- ActionCategoriesListView(QWidget* parent) //, KexiProject& project)
- : ActionsListViewBase(parent)
+ ActionCategoriesListView(TQWidget* tqparent) //, KexiProject& project)
+ : ActionsListViewBase(tqparent)
{
- QListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ TQListViewItem *item = new ActionSelectorDialogListItem("noaction", this, i18n("No action") );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
item->setPixmap(0, noIcon);
item = new ActionSelectorDialogListItem("kaction", this, i18n("Application actions") );
item->setPixmap(0, SmallIcon("form_action"));
@@ -205,7 +205,7 @@ public:
item = new KexiBrowserItem(this, info);
item->setText(0, part->instanceCaption());
}
- QListViewItem *formItem = itemForAction("form");
+ TQListViewItem *formItem = itemForAction("form");
if (formItem) {
item = new ActionSelectorDialogListItem("currentForm", formItem,
i18n("Current form's actions", "Current"));
@@ -219,9 +219,9 @@ public:
}
//! \return item for action \a actionName, reimplemented to support KexiBrowserItem items
- virtual QListViewItem *itemForAction(const QString& actionName)
+ virtual TQListViewItem *itemForAction(const TQString& actionName)
{
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
//simple case
ActionSelectorDialogListItem* item = dynamic_cast<ActionSelectorDialogListItem*>(it.current());
if (item) {
@@ -243,8 +243,8 @@ public:
class ActionToExecuteListView : public ActionsListViewBase
{
public:
- ActionToExecuteListView(QWidget* parent)
- : ActionsListViewBase(parent)
+ ActionToExecuteListView(TQWidget* tqparent)
+ : ActionsListViewBase(tqparent)
{
}
@@ -253,7 +253,7 @@ class ActionToExecuteListView : public ActionsListViewBase
}
//! Updates actions
- void showActionsForMimeType(const QString& mimeType) {
+ void showActionsForMimeType(const TQString& mimeType) {
if (m_currentMimeType == mimeType)
return;
m_currentMimeType = mimeType;
@@ -263,7 +263,7 @@ class ActionToExecuteListView : public ActionsListViewBase
return;
int supportedViewModes = part->supportedViewModes();
ActionSelectorDialogListItem *item;
- const QPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
+ const TQPixmap noIcon( KexiUtils::emptyIcon(KIcon::Small) );
if (supportedViewModes & Kexi::DataViewMode) {
item = new ActionSelectorDialogListItem("open", this, i18n("Open in Data View"));
item->setPixmap(0, SmallIcon("fileopen"));
@@ -278,7 +278,7 @@ class ActionToExecuteListView : public ActionsListViewBase
printItem->setPixmap(0, SmallIcon("fileprint"));
KAction *a = KStdAction::printPreview(0, 0, 0);
item = new ActionSelectorDialogListItem("printPreview", printItem,
- a->text().replace("&", "").replace("...", ""));
+ a->text().tqreplace("&", "").tqreplace("...", ""));
item->setPixmap(0, SmallIcon(a->icon()));
delete a;
item = new ActionSelectorDialogListItem("pageSetup", printItem, i18n("Show Page Setup"));
@@ -321,7 +321,7 @@ class ActionToExecuteListView : public ActionsListViewBase
setMinimumWidth( columnWidth(0) );
}
- QString m_currentMimeType;
+ TQString m_currentMimeType;
};
//-------------------------------------
@@ -339,25 +339,25 @@ public:
{
}
- void raiseWidget(QWidget *w)
+ void raiseWidget(TQWidget *w)
{
secondAnd3rdColumnStack->raiseWidget( w );
selectActionToBeExecutedLbl->setBuddy(w);
}
- void updateSelectActionToBeExecutedMessage(const QString& actionType)
+ void updateSelectActionToBeExecutedMessage(const TQString& actionType)
{
- QString msg;
+ TQString msg;
if (actionType=="noaction")
- msg = QString::null;
+ msg = TQString();
// hardcoded, but it's not that bad
else if (actionType=="macro")
- msg = i18n("&Select macro to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select macro to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
else if (actionType=="script")
- msg = i18n("&Select script to be executed after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select script to be executed after clicking \"%1\" button:").tqarg(actionWidgetName);
//default: table/query/form/report...
else
- msg = i18n("&Select object to be opened after clicking \"%1\" button:").arg(actionWidgetName);
+ msg = i18n("&Select object to be opened after clicking \"%1\" button:").tqarg(actionWidgetName);
selectActionToBeExecutedLbl->setText(msg);
}
@@ -374,29 +374,29 @@ public:
}
KexiMainWindow* mainWin;
- QString actionWidgetName;
+ TQString actionWidgetName;
ActionCategoriesListView* actionCategoriesListView; //!< for column #1
- QWidget *kactionPageWidget;
+ TQWidget *kactionPageWidget;
KActionsListView* kactionListView; //!< for column #2
KexiBrowser* objectsListView; //!< for column #2
- QWidget *currentFormActionsPageWidget; //!< for column #2
+ TQWidget *currentFormActionsPageWidget; //!< for column #2
CurrentFormActionsListView* currentFormActionsListView; //!< for column #2
- QWidget *emptyWidget;
- QLabel* selectActionToBeExecutedLbl;
+ TQWidget *emptyWidget;
+ TQLabel* selectActionToBeExecutedLbl;
ActionToExecuteListView* actionToExecuteListView;
- QLabel *actionToExecuteLbl;
- QWidget *secondAnd3rdColumnMainWidget;
- QGridLayout *glyr;
- QGridLayout *secondAnd3rdColumnGrLyr;
- QWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
+ TQLabel *actionToExecuteLbl;
+ TQWidget *secondAnd3rdColumnMainWidget;
+ TQGridLayout *glyr;
+ TQGridLayout *secondAnd3rdColumnGrLyr;
+ TQWidgetStack *secondAnd3rdColumnStack, *secondColumnStack;
bool hideActionToExecuteListView;
};
//-------------------------------------
-KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QWidget *parent,
- const KexiFormEventAction::ActionData& action, const QCString& actionWidgetName)
- : KDialogBase(parent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
+KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, TQWidget *tqparent,
+ const KexiFormEventAction::ActionData& action, const TQCString& actionWidgetName)
+ : KDialogBase(tqparent, "actionSelectorDialog", true, i18n("Assigning Action to Command Button"),
KDialogBase::Ok | KDialogBase::Cancel )
, d( new KexiActionSelectionDialogPrivate() )
{
@@ -404,8 +404,8 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
d->actionWidgetName = actionWidgetName;
setButtonOK( KGuiItem(i18n("Assign action", "&Assign"), "button_ok", i18n("Assign action")) );
- QWidget *mainWidget = new QWidget( this );
- mainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ TQWidget *mainWidget = new TQWidget( this );
+ mainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
setMainWidget(mainWidget);
/* lbl 1
@@ -418,80 +418,80 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
+------------+ +-------------------------------+
\______________________________________________/
glyr
- [a]- QWidgetStack *secondAnd3rdColumnStack,
- - for displaying KActions, the stack contains d->kactionPageWidget QWidget
- - for displaying objects, the stack contains secondAnd3rdColumnMainWidget QWidget and QGridLayout *secondAnd3rdColumnGrLyr
- - kactionPageWidget contains only a QVBoxLayout and label+kactionListView
+ [a]- TQWidgetStack *secondAnd3rdColumnStack,
+ - for displaying KActions, the stack contains d->kactionPageWidget TQWidget
+ - for displaying objects, the stack contains secondAnd3rdColumnMainWidget TQWidget and TQGridLayout *secondAnd3rdColumnGrLyr
+ - kactionPageWidget contains only a TQVBoxLayout and label+kactionListView
*/
- d->glyr = new QGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
+ d->glyr = new TQGridLayout(mainWidget, 2, 2, KDialog::marginHint(), KDialog::spacingHint());
d->glyr->setRowStretch(1, 1);
// 1st column: action types
d->actionCategoriesListView = new ActionCategoriesListView(mainWidget);
- d->actionCategoriesListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
+ d->actionCategoriesListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
d->glyr->addWidget(d->actionCategoriesListView, 1, 0);
- connect( d->actionCategoriesListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionCategorySelected(QListViewItem*)));
+ connect( d->actionCategoriesListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionCategorySelected(TQListViewItem*)));
- QLabel *lbl = new QLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
+ TQLabel *lbl = new TQLabel(d->actionCategoriesListView, i18n("Action category:"), mainWidget);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
- lbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->glyr->addWidget(lbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ lbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->glyr->addWidget(lbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
// widget stack for 2nd and 3rd column
- d->secondAnd3rdColumnStack = new QWidgetStack(mainWidget);
- d->secondAnd3rdColumnStack->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnStack = new TQWidgetStack(mainWidget);
+ d->secondAnd3rdColumnStack->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->glyr->addMultiCellWidget(d->secondAnd3rdColumnStack, 0, 1, 1, 1);//, TQt::AlignTop|TQt::AlignLeft);
- d->secondAnd3rdColumnMainWidget = new QWidget(d->secondAnd3rdColumnStack);
- d->secondAnd3rdColumnMainWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- d->secondAnd3rdColumnGrLyr = new QGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
+ d->secondAnd3rdColumnMainWidget = new TQWidget(d->secondAnd3rdColumnStack);
+ d->secondAnd3rdColumnMainWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ d->secondAnd3rdColumnGrLyr = new TQGridLayout(d->secondAnd3rdColumnMainWidget, 2, 2, 0, KDialog::spacingHint());
d->secondAnd3rdColumnGrLyr->setRowStretch(1, 2);
d->secondAnd3rdColumnStack->addWidget(d->secondAnd3rdColumnMainWidget);
// 2nd column: list of actions/objects
d->objectsListView = new KexiBrowser(d->secondAnd3rdColumnMainWidget, d->mainWin, 0/*features*/);
d->secondAnd3rdColumnGrLyr->addWidget(d->objectsListView, 1, 0);
- connect(d->objectsListView, SIGNAL(selectionChanged(KexiPart::Item*)),
- this, SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
+ connect(d->objectsListView, TQT_SIGNAL(selectionChanged(KexiPart::Item*)),
+ this, TQT_SLOT(slotItemForOpeningOrExecutingSelected(KexiPart::Item*)));
- d->selectActionToBeExecutedLbl = new QLabel(d->secondAnd3rdColumnMainWidget);
- d->selectActionToBeExecutedLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->selectActionToBeExecutedLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ d->selectActionToBeExecutedLbl = new TQLabel(d->secondAnd3rdColumnMainWidget);
+ d->selectActionToBeExecutedLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->selectActionToBeExecutedLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
d->selectActionToBeExecutedLbl->setMinimumHeight(d->selectActionToBeExecutedLbl->fontMetrics().height()*2);
- d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, Qt::AlignTop|Qt::AlignLeft);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->selectActionToBeExecutedLbl, 0, 0, TQt::AlignTop|TQt::AlignLeft);
- d->emptyWidget = new QWidget(d->secondAnd3rdColumnStack);
+ d->emptyWidget = new TQWidget(d->secondAnd3rdColumnStack);
d->secondAnd3rdColumnStack->addWidget(d->emptyWidget);
// 3rd column: actions to execute
d->actionToExecuteListView = new ActionToExecuteListView(d->secondAnd3rdColumnMainWidget);
d->actionToExecuteListView->installEventFilter(this); //to be able to disable painting
d->actionToExecuteListView->viewport()->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteListView->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
- connect(d->actionToExecuteListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemExecuted(QListViewItem*)));
- connect(d->actionToExecuteListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotActionToExecuteItemSelected(QListViewItem*)));
+ d->actionToExecuteListView->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
+ connect(d->actionToExecuteListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemExecuted(TQListViewItem*)));
+ connect(d->actionToExecuteListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotActionToExecuteItemSelected(TQListViewItem*)));
d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteListView, 1, 1);
- d->actionToExecuteLbl = new QLabel(d->actionToExecuteListView,
+ d->actionToExecuteLbl = new TQLabel(d->actionToExecuteListView,
i18n("Action to execute:"), d->secondAnd3rdColumnMainWidget);
d->actionToExecuteLbl->installEventFilter(this); //to be able to disable painting
- d->actionToExecuteLbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
- d->actionToExecuteLbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
- d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, Qt::AlignTop|Qt::AlignLeft);
+ d->actionToExecuteLbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
+ d->actionToExecuteLbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
+ d->secondAnd3rdColumnGrLyr->addWidget(d->actionToExecuteLbl, 0, 1, TQt::AlignTop|TQt::AlignLeft);
// temporary show all sections to avoid resizing the dialog in the future
d->actionCategoriesListView->selectAction("table");
d->setActionToExecuteSectionVisible(true);
adjustSize();
- resize(QMAX(700, width()), QMAX(450, height()));
+ resize(TQMAX(700, width()), TQMAX(450, height()));
d->actionToExecuteListView->updateWidth();
bool ok;
- QString actionType, actionArg;
+ TQString actionType, actionArg;
KexiPart::Info* partInfo = action.decodeString(actionType, actionArg, ok);
if (ok) {
d->actionCategoriesListView->selectAction(actionType);
@@ -511,7 +511,7 @@ KexiActionSelectionDialog::KexiActionSelectionDialog(KexiMainWindow* mainWin, QW
KexiPart::Item *item = d->mainWin->project()->item(partInfo, actionArg);
if (d->objectsListView && item) {
d->objectsListView->selectItem(*item);
- QString actionOption( action.option );
+ TQString actionOption( action.option );
if (actionOption.isEmpty())
actionOption = "open"; // for backward compatibility
d->actionToExecuteListView->selectAction(actionOption);
@@ -530,26 +530,26 @@ KexiActionSelectionDialog::~KexiActionSelectionDialog()
delete d;
}
-void KexiActionSelectionDialog::slotKActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotKActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotKActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemExecuted(TQListViewItem*)
{
accept();
}
-void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotCurrentFormActionItemSelected(TQListViewItem*)
{
d->setActionToExecuteSectionVisible(false);
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::Item* item)
@@ -557,7 +557,7 @@ void KexiActionSelectionDialog::slotItemForOpeningOrExecutingSelected(KexiPart::
d->setActionToExecuteSectionVisible(item);
}
-void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(TQListViewItem* item)
{
if (!item)
return;
@@ -566,38 +566,38 @@ void KexiActionSelectionDialog::slotActionToExecuteItemExecuted(QListViewItem* i
accept();
}
-void KexiActionSelectionDialog::slotActionToExecuteItemSelected(QListViewItem*)
+void KexiActionSelectionDialog::slotActionToExecuteItemSelected(TQListViewItem*)
{
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
-void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
+void KexiActionSelectionDialog::slotActionCategorySelected(TQListViewItem* item)
{
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(item);
// simple case: part-less item, e.g. kaction:
if (simpleItem) {
d->updateSelectActionToBeExecutedMessage(simpleItem->data);
- QString selectActionToBeExecutedMsg(
+ TQString selectActionToBeExecutedMsg(
i18n("&Select action to be executed after clicking \"%1\" button:")); // msg for a label
if (simpleItem->data == "kaction") {
if (!d->kactionPageWidget) {
- //create lbl+list view with a vlayout
- d->kactionPageWidget = new QWidget();
- d->kactionPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->kactionPageWidget = new TQWidget();
+ d->kactionPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->kactionPageWidget, 0, KDialog::spacingHint());
d->kactionListView = new KActionsListView(d->kactionPageWidget, d->mainWin);
d->kactionListView->init();
- QLabel *lbl = new QLabel(d->kactionListView, selectActionToBeExecutedMsg.arg(d->actionWidgetName),
+ TQLabel *lbl = new TQLabel(d->kactionListView, selectActionToBeExecutedMsg.tqarg(d->actionWidgetName),
d->kactionPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->kactionListView);
d->secondAnd3rdColumnStack->addWidget(d->kactionPageWidget);
- connect(d->kactionListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotKActionItemExecuted(QListViewItem*)));
- connect( d->kactionListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotKActionItemSelected(QListViewItem*)));
+ connect(d->kactionListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemExecuted(TQListViewItem*)));
+ connect( d->kactionListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotKActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->kactionPageWidget);
@@ -605,24 +605,24 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
}
else if (simpleItem->data == "currentForm") {
if (!d->currentFormActionsPageWidget) {
- //create lbl+list view with a vlayout
- d->currentFormActionsPageWidget = new QWidget();
- d->currentFormActionsPageWidget->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
- QVBoxLayout *vlyr = new QVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
+ //create lbl+list view with a vtqlayout
+ d->currentFormActionsPageWidget = new TQWidget();
+ d->currentFormActionsPageWidget->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(d->currentFormActionsPageWidget, 0, KDialog::spacingHint());
d->currentFormActionsListView = new CurrentFormActionsListView(
d->currentFormActionsPageWidget, d->mainWin);
d->currentFormActionsListView->init();
- QLabel *lbl = new QLabel(d->currentFormActionsListView,
- selectActionToBeExecutedMsg.arg(d->actionWidgetName), d->currentFormActionsPageWidget);
- lbl->setAlignment(Qt::AlignTop|Qt::AlignLeft|Qt::WordBreak);
+ TQLabel *lbl = new TQLabel(d->currentFormActionsListView,
+ selectActionToBeExecutedMsg.tqarg(d->actionWidgetName), d->currentFormActionsPageWidget);
+ lbl->tqsetAlignment(TQt::AlignTop|TQt::AlignLeft|TQt::WordBreak);
lbl->setMinimumHeight(lbl->fontMetrics().height()*2);
vlyr->addWidget(lbl);
vlyr->addWidget(d->currentFormActionsListView);
d->secondAnd3rdColumnStack->addWidget(d->currentFormActionsPageWidget);
- connect(d->currentFormActionsListView, SIGNAL(executed(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemExecuted(QListViewItem*)));
- connect( d->currentFormActionsListView, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(slotCurrentFormActionItemSelected(QListViewItem*)));
+ connect(d->currentFormActionsListView, TQT_SIGNAL(executed(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemExecuted(TQListViewItem*)));
+ connect( d->currentFormActionsListView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(slotCurrentFormActionItemSelected(TQListViewItem*)));
}
d->setActionToExecuteSectionVisible(false);
d->raiseWidget(d->currentFormActionsPageWidget);
@@ -635,7 +635,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->setActionToExecuteSectionVisible(false);
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
return;
}
// other case
@@ -656,7 +656,7 @@ void KexiActionSelectionDialog::slotActionCategorySelected(QListViewItem* item)
d->raiseWidget( d->secondAnd3rdColumnMainWidget );
}
d->actionCategoriesListView->update();
- updateOKButtonStatus();
+ updateOKButtontqStatus();
}
KexiMainWindow* KexiActionSelectionDialog::mainWin() const
@@ -673,14 +673,14 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
if (simpleItem) {
if (simpleItem->data == "kaction") {
if (d->kactionListView->selectedItem()) {
- data.string = QString("kaction:")
+ data.string = TQString("kaction:")
+ dynamic_cast<ActionSelectorDialogListItem*>( d->kactionListView->selectedItem() )->data;
return data;
}
}
else if (simpleItem->data == "currentForm") {
if (d->currentFormActionsListView->selectedItem()) {
- data.string = QString("currentForm:")
+ data.string = TQString("currentForm:")
+ dynamic_cast<ActionSelectorDialogListItem*>(
d->currentFormActionsListView->selectedItem() )->data;
return data;
@@ -696,7 +696,7 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
KexiPart::Info* partInfo = partItem ? Kexi::partManager().infoForMimeType( partItem->mimeType() ) : 0;
if (partInfo) {
// opening or executing: table:name, query:name, form:name, macro:name, script:name, etc.
- data.string = QString("%1:%2").arg(partInfo->objectName()).arg(partItem->name());
+ data.string = TQString("%1:%2").tqarg(partInfo->objectName()).tqarg(partItem->name());
data.option = actionToExecute->data;
return data;
}
@@ -705,15 +705,15 @@ KexiFormEventAction::ActionData KexiActionSelectionDialog::currentAction() const
return data; // No Action
}
-void KexiActionSelectionDialog::updateOKButtonStatus()
+void KexiActionSelectionDialog::updateOKButtontqStatus()
{
- QPushButton *btn = actionButton(Ok);
+ TQPushButton *btn = actionButton(Ok);
ActionSelectorDialogListItem *simpleItem = dynamic_cast<ActionSelectorDialogListItem*>(
d->actionCategoriesListView->selectedItem());
btn->setEnabled( (simpleItem && simpleItem->data == "noaction") || !currentAction().isEmpty() );
}
-bool KexiActionSelectionDialog::eventFilter(QObject *o, QEvent *e)
+bool KexiActionSelectionDialog::eventFilter(TQObject *o, TQEvent *e)
{
if (d->hideActionToExecuteListView)
return true;
diff --git a/kexi/plugins/forms/kexiactionselectiondialog.h b/kexi/plugins/forms/kexiactionselectiondialog.h
index 6b6a896ba..a9c4d5498 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog.h
+++ b/kexi/plugins/forms/kexiactionselectiondialog.h
@@ -37,9 +37,10 @@ namespace KexiPart {
class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiActionSelectionDialog(KexiMainWindow* mainWin, QWidget *parent,
- const KexiFormEventAction::ActionData& action, const QCString& actionWidgetName);
+ KexiActionSelectionDialog(KexiMainWindow* mainWin, TQWidget *tqparent,
+ const KexiFormEventAction::ActionData& action, const TQCString& actionWidgetName);
~KexiActionSelectionDialog();
/*! \return selected action data or empty action if dialog has been rejected
@@ -49,20 +50,20 @@ class KEXIFORMUTILS_EXPORT KexiActionSelectionDialog : public KDialogBase
//! \return the \a KexiMainWindow instance.
KexiMainWindow* mainWin() const;
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
- void slotActionCategorySelected(QListViewItem* item);
- void slotKActionItemExecuted(QListViewItem*);
- void slotKActionItemSelected(QListViewItem*);
- void slotActionToExecuteItemExecuted(QListViewItem* item);
- void slotActionToExecuteItemSelected(QListViewItem*);
- void slotCurrentFormActionItemExecuted(QListViewItem*);
- void slotCurrentFormActionItemSelected(QListViewItem*);
+ void slotActionCategorySelected(TQListViewItem* item);
+ void slotKActionItemExecuted(TQListViewItem*);
+ void slotKActionItemSelected(TQListViewItem*);
+ void slotActionToExecuteItemExecuted(TQListViewItem* item);
+ void slotActionToExecuteItemSelected(TQListViewItem*);
+ void slotCurrentFormActionItemExecuted(TQListViewItem*);
+ void slotCurrentFormActionItemSelected(TQListViewItem*);
void slotItemForOpeningOrExecutingSelected(KexiPart::Item* item);
protected:
- void updateOKButtonStatus();
+ void updateOKButtontqStatus();
class KexiActionSelectionDialogPrivate;
KexiActionSelectionDialogPrivate* d;
diff --git a/kexi/plugins/forms/kexiactionselectiondialog_p.h b/kexi/plugins/forms/kexiactionselectiondialog_p.h
index 51f5c3696..a25790741 100644
--- a/kexi/plugins/forms/kexiactionselectiondialog_p.h
+++ b/kexi/plugins/forms/kexiactionselectiondialog_p.h
@@ -26,20 +26,21 @@
class ActionsListViewBase : public KListView
{
public:
- ActionsListViewBase(QWidget* parent);
+ ActionsListViewBase(TQWidget* tqparent);
virtual ~ActionsListViewBase();
//! \return item for action \a actionName
- virtual QListViewItem *itemForAction(const QString& actionName);
- void selectAction(const QString& actionName);
+ virtual TQListViewItem *itemForAction(const TQString& actionName);
+ void selectAction(const TQString& actionName);
};
//! @internal Used by KActionsListView and CurrentFormActionsListView (in column 2)
class KActionsListViewBase : public ActionsListViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KActionsListViewBase(QWidget* parent, KexiMainWindow* mainWin);
+ KActionsListViewBase(TQWidget* tqparent, KexiMainWindow* mainWin);
virtual ~KActionsListViewBase();
void init();
virtual bool isActionVisible(const char* actionName, int actionCategories) const = 0;
diff --git a/kexi/plugins/forms/kexidataawarewidgetinfo.cpp b/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
index a6033c706..0947c8a15 100644
--- a/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
+++ b/kexi/plugins/forms/kexidataawarewidgetinfo.cpp
@@ -26,8 +26,8 @@ KexiDataAwareWidgetInfo::KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f
}
KexiDataAwareWidgetInfo::KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f,
- const char* parentFactoryName, const char* inheritedClassName)
- : KFormDesigner::WidgetInfo(f, parentFactoryName, inheritedClassName)
+ const char* tqparentFactoryName, const char* inheritedClassName)
+ : KFormDesigner::WidgetInfo(f, tqparentFactoryName, inheritedClassName)
{
init();
}
diff --git a/kexi/plugins/forms/kexidataawarewidgetinfo.h b/kexi/plugins/forms/kexidataawarewidgetinfo.h
index 41e67d85d..eddcf909d 100644
--- a/kexi/plugins/forms/kexidataawarewidgetinfo.h
+++ b/kexi/plugins/forms/kexidataawarewidgetinfo.h
@@ -33,7 +33,7 @@ class KEXIFORMUTILS_EXPORT KexiDataAwareWidgetInfo : public KFormDesigner::Widge
KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f);
KexiDataAwareWidgetInfo(KFormDesigner::WidgetFactory *f,
- const char* parentFactoryName, const char* inheritedClassName = 0);
+ const char* tqparentFactoryName, const char* inheritedClassName = 0);
virtual ~KexiDataAwareWidgetInfo();
diff --git a/kexi/plugins/forms/kexidataprovider.cpp b/kexi/plugins/forms/kexidataprovider.cpp
index 6706f838c..400e6d376 100644
--- a/kexi/plugins/forms/kexidataprovider.cpp
+++ b/kexi/plugins/forms/kexidataprovider.cpp
@@ -19,8 +19,8 @@
#include "kexidataprovider.h"
-#include <qwidget.h>
-#include <qobjectlist.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -46,7 +46,7 @@ KexiFormDataProvider::~KexiFormDataProvider()
delete m_duplicatedItems;
}
-void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
+void KexiFormDataProvider::setMainDataSourceWidget(TQWidget* mainWidget)
{
m_mainWidget = mainWidget;
m_dataItems.clear();
@@ -56,15 +56,15 @@ void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
return;
//find widgets whose will work as data items
- QObjectList *l = m_mainWidget->queryList( "QWidget" );
- QObjectListIt it( *l );
- QObject *obj;
- QDict<char> tmpSources;
+ TQObjectList *l = m_mainWidget->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectListIt it( *l );
+ TQObject *obj;
+ TQDict<char> tmpSources;
for ( ; (obj = it.current()) != 0; ++it ) {
KexiFormDataItemInterface* const formDataItem = dynamic_cast<KexiFormDataItemInterface*>(obj);
if (!formDataItem)
continue;
- if (formDataItem->parentInterface()) //item with parent interface: collect parent instead...
+ if (formDataItem->tqparentInterface()) //item with tqparent interface: collect tqparent instead...
continue;
#if 0 //! @todo reenable when subform is moved to KexiDBForm
KexiDBForm *dbForm = KexiUtils::findParent<KexiDBForm>(obj, "KexiDBForm"); //form's surface...
@@ -75,18 +75,18 @@ void KexiFormDataProvider::setMainDataSourceWidget(QWidget* mainWidget)
if (KexiUtils::findParent<KexiDBForm>(obj, "KexiDBSubForm"))
continue;
#endif
- QString dataSource( formDataItem->dataSource().lower() );
+ TQString dataSource( formDataItem->dataSource().lower() );
if (dataSource.isEmpty())
continue;
kexipluginsdbg << obj->name() << endl;
m_dataItems.append( formDataItem );
formDataItem->installListener( this );
- tmpSources.replace( dataSource, (char*)1 );
+ tmpSources.tqreplace( dataSource, (char*)1 );
}
delete l;
//now we've got a set (unique list) of field names in tmpSources
//remember it in m_usedDataSources
- for (QDictIterator<char> it(tmpSources); it.current(); ++it) {
+ for (TQDictIterator<char> it(tmpSources); it.current(); ++it) {
m_usedDataSources += it.currentKey();
}
}
@@ -106,46 +106,46 @@ void KexiFormDataProvider::fillDataItems(KexiTableItem& row, bool cursorAtNewRow
int indexForVisibleLookupValue = itemIface->columnInfo()->indexForVisibleLookupValue();
if (indexForVisibleLookupValue<0 && indexForVisibleLookupValue>=(int)row.count()) //sanity
indexForVisibleLookupValue = -1; //no
- const QVariant value(row.at(it.data()));
- QVariant visibleLookupValue;
+ const TQVariant value(row.at(it.data()));
+ TQVariant visibleLookupValue;
if (indexForVisibleLookupValue!=-1 && (int)row.size()>indexForVisibleLookupValue)
visibleLookupValue = row.at(indexForVisibleLookupValue);
kexipluginsdbg << "fill data of '" << itemIface->dataSource() << "' at idx=" << it.data()
<< " data=" << value << (indexForVisibleLookupValue!=-1
- ? QString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2")
- .arg(indexForVisibleLookupValue).arg(visibleLookupValue.toString())
- : QString::null)
+ ? TQString(" SPECIAL: indexForVisibleLookupValue=%1 visibleValue=%2")
+ .tqarg(indexForVisibleLookupValue).tqarg(visibleLookupValue.toString())
+ : TQString())
<< endl;
const bool displayDefaultValue = cursorAtNewRow && (value.isNull() && visibleLookupValue.isNull())
&& !itemIface->columnInfo()->field->defaultValue().isNull()
&& !itemIface->columnInfo()->field->isAutoIncrement(); //no value to set but there is default value defined
itemIface->setValue(
displayDefaultValue ? itemIface->columnInfo()->field->defaultValue() : value,
- QVariant(), /*add*/
+ TQVariant(), /*add*/
/*!remove old*/false,
indexForVisibleLookupValue==-1 ? 0 : &visibleLookupValue //pass visible value if available
);
// now disable/enable "display default value" if needed (do it after setValue(), before setValue() turns it off)
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
}
}
void KexiFormDataProvider::fillDuplicatedDataItems(
- KexiFormDataItemInterface* item, const QVariant& value)
+ KexiFormDataItemInterface* item, const TQVariant& value)
{
if (m_disableFillDuplicatedDataItems)
return;
if (!m_duplicatedItems) {
//build (once) a set of duplicated data items (having the same fields assigned)
//so we can later check if an item is duplicated with a cost of o(1)
- QMap<KexiDB::Field*,int> tmpDuplicatedItems;
- QMapIterator<KexiDB::Field*,int> it_dup;
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ TQMap<KexiDB::Field*,int> tmpDuplicatedItems;
+ TQMapIterator<KexiDB::Field*,int> it_dup;
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
if (!it.current()->columnInfo() || !it.current()->columnInfo()->field)
continue;
kdDebug() << " ** " << it.current()->columnInfo()->field->name() << endl;
- it_dup = tmpDuplicatedItems.find( it.current()->columnInfo()->field );
+ it_dup = tmpDuplicatedItems.tqfind( it.current()->columnInfo()->field );
uint count;
if (it_dup==tmpDuplicatedItems.end())
count = 0;
@@ -153,7 +153,7 @@ void KexiFormDataProvider::fillDuplicatedDataItems(
count = it_dup.data();
tmpDuplicatedItems.insert( it.current()->columnInfo()->field, ++count );
}
- m_duplicatedItems = new QPtrDict<char>(101);
+ m_duplicatedItems = new TQPtrDict<char>(101);
for (it_dup = tmpDuplicatedItems.begin(); it_dup!=tmpDuplicatedItems.end(); ++it_dup) {
if (it_dup.data() > 1) {
m_duplicatedItems->insert( it_dup.key(), (char*)1 );
@@ -162,11 +162,11 @@ void KexiFormDataProvider::fillDuplicatedDataItems(
}
}
}
- if (item->columnInfo() && m_duplicatedItems->find( item->columnInfo()->field )) {
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ if (item->columnInfo() && m_duplicatedItems->tqfind( item->columnInfo()->field )) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
if (it.current()!=item && item->columnInfo()->field == it.current()->columnInfo()->field) {
kexipluginsdbg << "- setting a copy of value for item '"
- << dynamic_cast<QObject*>(it.current())->name() << "' == " << value << endl;
+ << dynamic_cast<TQObject*>(it.current())->name() << "' == " << value << endl;
it.current()->setValue( value );
}
}
@@ -183,7 +183,7 @@ bool KexiFormDataProvider::cursorAtNewRow() const
return false;
}
-void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSources,
+void KexiFormDataProvider::tqinvalidateDataSources( const TQDict<char>& invalidSources,
KexiDB::QuerySchema* query)
{
//fill m_fieldNumbersForDataItems mapping from data item to field number
@@ -194,16 +194,16 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
if (query) {
fieldsExpanded = query->fieldsExpanded( KexiDB::QuerySchema::WithInternalFields );
// dataFieldsCount = fieldsExpanded.count();
- QMap<KexiDB::QueryColumnInfo*,int> columnsOrder( query->columnsOrder() );
- for (QMapConstIterator<KexiDB::QueryColumnInfo*,int> it = columnsOrder.constBegin(); it!=columnsOrder.constEnd(); ++it) {
+ TQMap<KexiDB::QueryColumnInfo*,int> columnsOrder( query->columnsOrder() );
+ for (TQMapConstIterator<KexiDB::QueryColumnInfo*,int> it = columnsOrder.constBegin(); it!=columnsOrder.constEnd(); ++it) {
kexipluginsdbg << "query->columnsOrder()[ " << it.key()->field->name() << " ] = " << it.data() << endl;
}
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
KexiFormDataItemInterface *item = it.current();
KexiDB::QueryColumnInfo* ci = query->columnInfo( it.current()->dataSource() );
int index = ci ? columnsOrder[ ci ] : -1;
kexipluginsdbg << "query->columnsOrder()[ " << (ci ? ci->field->name() : "") << " ] = " << index
- << " (dataSource: " << item->dataSource() << ", name=" << dynamic_cast<QObject*>(item)->name() << ")" << endl;
+ << " (dataSource: " << item->dataSource() << ", name=" << dynamic_cast<TQObject*>(item)->name() << ")" << endl;
if (index!=-1 && !m_fieldNumbersForDataItems[ item ])
m_fieldNumbersForDataItems.insert( item, index );
//todo
@@ -218,26 +218,26 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
#if 0 //moved down
//in 'newIndices' let's collect new indices for every data source
- foreach(QValueList<uint>::ConstIterator, it, invalidSources) {
+ foreach(TQValueList<uint>::ConstIterator, it, invalidSources) {
//all previous indices have corresponding data source
// for (; i < (*it); i++) {
// newIndices[i] = number++;
- //kexipluginsdbg << "invalidateDataSources(): " << i << " -> " << number-1 << endl;
+ //kexipluginsdbg << "tqinvalidateDataSources(): " << i << " -> " << number-1 << endl;
// }
//this index have no corresponding data source
// newIndices[i]=-1;
KexiFormDataItemInterface *item = m_dataItems.at( *it );
if (item)
- item->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
m_dataItems.remove(*it);
- kexipluginsdbg << "invalidateDataSources(): " << (*it) << " -> " << -1 << endl;
+ kexipluginsdbg << "tqinvalidateDataSources(): " << (*it) << " -> " << -1 << endl;
// i++;
}
#endif
//fill remaining part of the vector
// for (; i < dataFieldsCount; i++) { //m_dataItems.count(); i++) {
//newIndices[i] = number++;
- //kexipluginsdbg << "invalidateDataSources(): " << i << " -> " << number-1 << endl;
+ //kexipluginsdbg << "tqinvalidateDataSources(): " << i << " -> " << number-1 << endl;
//}
#if 0
@@ -247,35 +247,35 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
bool ok;
const int newIndex = newIndices.at( it.data(), &ok );
if (ok && newIndex!=-1) {
- kexipluginsdbg << "invalidateDataSources(): " << it.key()->dataSource() << ": " << it.data() << " -> " << newIndex << endl;
- newFieldNumbersForDataItems.replace(it.key(), newIndex);
+ kexipluginsdbg << "tqinvalidateDataSources(): " << it.key()->dataSource() << ": " << it.data() << " -> " << newIndex << endl;
+ newFieldNumbersForDataItems.tqreplace(it.key(), newIndex);
}
else {
- kexipluginsdbg << "invalidateDataSources(): removing " << it.key()->dataSource() << endl;
+ kexipluginsdbg << "tqinvalidateDataSources(): removing " << it.key()->dataSource() << endl;
m_dataItems.remove(it.key());
- it.key()->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ it.key()->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
}
}
#endif
// m_fieldNumbersForDataItems = newFieldNumbersForDataItems;
//update data sources set (some of them may be removed)
- QDict<char> tmpUsedDataSources(1013);
+ TQDict<char> tmpUsedDataSources(1013);
if (query)
query->debug();
//if (query && m_dataItems.count()!=query->fieldCount()) {
- // kdWarning() << "KexiFormDataProvider::invalidateDataSources(): m_dataItems.count()!=query->fieldCount() ("
+ // kdWarning() << "KexiFormDataProvider::tqinvalidateDataSources(): m_dataItems.count()!=query->fieldCount() ("
// << m_dataItems.count() << "," << query->fieldCount() << ")" << endl;
//}
//i = 0;
m_disableFillDuplicatedDataItems = true; // temporary disable fillDuplicatedDataItems()
// because setColumnInfo() can activate it
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current();) {
KexiFormDataItemInterface * item = it.current();
if (invalidSources[ item->dataSource().lower() ]) {
- item->setInvalidState( QString::fromLatin1("#") + i18n("NAME") + QString::fromLatin1("?") );
+ item->setInvalidState( TQString::tqfromLatin1("#") + i18n("NAME") + TQString::tqfromLatin1("?") );
m_dataItems.remove(item);
continue;
}
@@ -283,7 +283,7 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
if (query) {
KexiDB::QueryColumnInfo *ci = fieldsExpanded[fieldNumber];
item->setColumnInfo(ci);
- kexipluginsdbg << "- item=" << dynamic_cast<QObject*>(item)->name()
+ kexipluginsdbg << "- item=" << dynamic_cast<TQObject*>(item)->name()
<< " dataSource=" << item->dataSource()
<< " field=" << ci->field->name() << endl;
const int indexForVisibleLookupValue = ci->indexForVisibleLookupValue();
@@ -304,12 +304,12 @@ void KexiFormDataProvider::invalidateDataSources( const QDict<char>& invalidSour
}
}
}
- tmpUsedDataSources.replace( item->dataSource().lower(), (char*)1 );
+ tmpUsedDataSources.tqreplace( item->dataSource().lower(), (char*)1 );
++it;
}
m_disableFillDuplicatedDataItems = false;
m_usedDataSources.clear();
- foreach_list(QDictIterator<char>, it, tmpUsedDataSources) {
+ foreach_list(TQDictIterator<char>, it, tmpUsedDataSources) {
m_usedDataSources += it.currentKey();
}
}
diff --git a/kexi/plugins/forms/kexidataprovider.h b/kexi/plugins/forms/kexidataprovider.h
index 64019842a..f1e9d7557 100644
--- a/kexi/plugins/forms/kexidataprovider.h
+++ b/kexi/plugins/forms/kexidataprovider.h
@@ -21,8 +21,8 @@
#define KEXIFORMDATAPROVIDER_H
#include "kexiformdataiteminterface.h"
-#include <qptrdict.h>
-#include <qdict.h>
+#include <tqptrdict.h>
+#include <tqdict.h>
class KexiTableItem;
namespace KexiDB {
@@ -50,11 +50,11 @@ class KEXIFORMUTILS_EXPORT KexiFormDataProvider : public KexiDataItemChangesList
Also find widgets whose will work as data items
(all of them must implement KexiFormDataItemInterface), so these could be
filled with data on demand. */
- void setMainDataSourceWidget(QWidget* mainWidget);
+ void setMainDataSourceWidget(TQWidget* mainWidget);
- QStringList usedDataSources() const { return m_usedDataSources; }
+ TQStringList usedDataSources() const { return m_usedDataSources; }
- //unused QPtrList<KexiFormDataItemInterface>& dataItems() { return m_dataItems; }
+ //unused TQPtrList<KexiFormDataItemInterface>& dataItems() { return m_dataItems; }
/*! Fills data items with appropriate data fetched from \a cursor.
\a newRowEditing == true means that we are at new (not yet inserted) database row. */
@@ -74,20 +74,20 @@ class KEXIFORMUTILS_EXPORT KexiFormDataProvider : public KexiDataItemChangesList
\a invalidSources is the set of data sources that should
be omitted for fillDataItems().
Used by KexiFormView::initDataSource(). */
- void invalidateDataSources( const QDict<char>& invalidSources,
+ void tqinvalidateDataSources( const TQDict<char>& invalidSources,
KexiDB::QuerySchema* query = 0 );
/*! Fills the same data provided by \a value to every data item (other than \a item)
having the same data source as \a item. This method is called immediately when
\a value is changed, so duplicated data items are quickly updated. */
- void fillDuplicatedDataItems(KexiFormDataItemInterface* item, const QVariant& value);
+ void fillDuplicatedDataItems(KexiFormDataItemInterface* item, const TQVariant& value);
protected:
- QWidget *m_mainWidget;
- QPtrDict<char> *m_duplicatedItems;
- typedef QMap<KexiFormDataItemInterface*,uint> KexiFormDataItemInterfaceToIntMap;
- QPtrList<KexiFormDataItemInterface> m_dataItems;
- QStringList m_usedDataSources;
+ TQWidget *m_mainWidget;
+ TQPtrDict<char> *m_duplicatedItems;
+ typedef TQMap<KexiFormDataItemInterface*,uint> KexiFormDataItemInterfaceToIntMap;
+ TQPtrList<KexiFormDataItemInterface> m_dataItems;
+ TQStringList m_usedDataSources;
KexiFormDataItemInterfaceToIntMap m_fieldNumbersForDataItems;
bool m_disableFillDuplicatedDataItems : 1;
};
diff --git a/kexi/plugins/forms/kexidatasourcepage.cpp b/kexi/plugins/forms/kexidatasourcepage.cpp
index 6c0de8303..ce11e7d98 100644
--- a/kexi/plugins/forms/kexidatasourcepage.cpp
+++ b/kexi/plugins/forms/kexidatasourcepage.cpp
@@ -19,10 +19,10 @@
#include "kexidatasourcepage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -43,11 +43,11 @@
#include <koproperty/property.h>
#include <koproperty/utils.h>
-KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
- : QWidget(parent, name)
+KexiDataSourcePage::KexiDataSourcePage(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name)
, m_insideClearDataSourceSelection(false)
{
- QVBoxLayout *vlyr = new QVBoxLayout(this);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(this);
m_objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
vlyr->addWidget(m_objectInfoLabel);
@@ -60,67 +60,67 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
KoProperty::GroupContainer *container = new KoProperty::GroupContainer(i18n("Data Source"), this);
vlyr->addWidget(container);
- QWidget *contents = new QWidget(container);
+ TQWidget *contents = new TQWidget(container);
container->setContents(contents);
- QVBoxLayout *contentsVlyr = new QVBoxLayout(contents);
+ TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents);
- m_noDataSourceAvailableLabel = new QLabel(m_noDataSourceAvailableSingleText, contents);
- m_noDataSourceAvailableLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ m_noDataSourceAvailableLabel = new TQLabel(m_noDataSourceAvailableSingleText, contents);
+ m_noDataSourceAvailableLabel->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
m_noDataSourceAvailableLabel->setMargin(2);
- m_noDataSourceAvailableLabel->setAlignment(Qt::WordBreak | Qt::AlignBottom | Qt::AlignLeft);
+ m_noDataSourceAvailableLabel->tqsetAlignment(TQt::WordBreak | TQt::AlignBottom | TQt::AlignLeft);
contentsVlyr->addWidget(m_noDataSourceAvailableLabel);
//-Widget's Data Source
- QHBoxLayout *hlyr = new QHBoxLayout(contentsVlyr);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr);
#if 0
//! @todo unhide this when expression work
-// m_widgetDSLabel = new QLabel(i18n("Table Field, Query Field or Expression", "Source field or expression:"), this);
+// m_widgetDSLabel = new TQLabel(i18n("Table Field, Query Field or Expression", "Source field or expression:"), this);
#else
- m_widgetDSLabel = new QLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents);
+ m_widgetDSLabel = new TQLabel(i18n("Table Field or Query Field", "Widget's data source:"), contents);
#endif
- m_widgetDSLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ m_widgetDSLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_widgetDSLabel->setMargin(2);
m_widgetDSLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- m_widgetDSLabel->setAlignment(AlignLeft|AlignBottom);
+ m_widgetDSLabel->tqsetAlignment(AlignLeft|AlignBottom);
hlyr->addWidget(m_widgetDSLabel);
- m_clearWidgetDSButton = new KexiSmallToolButton(contents, QString::null, "clear_left", "clearWidgetDSButton");
+ m_clearWidgetDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearWidgetDSButton");
m_clearWidgetDSButton->setMinimumHeight(m_widgetDSLabel->minimumHeight());
- QToolTip::add(m_clearWidgetDSButton, i18n("Clear widget's data source"));
+ TQToolTip::add(m_clearWidgetDSButton, i18n("Clear widget's data source"));
hlyr->addWidget(m_clearWidgetDSButton);
- connect(m_clearWidgetDSButton, SIGNAL(clicked()), this, SLOT(clearWidgetDataSourceSelection()));
+ connect(m_clearWidgetDSButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearWidgetDataSourceSelection()));
m_sourceFieldCombo = new KexiFieldComboBox(contents, "sourceFieldCombo");
m_widgetDSLabel->setBuddy(m_sourceFieldCombo);
contentsVlyr->addWidget(m_sourceFieldCombo);
-/* m_dataSourceSeparator = new QFrame(contents);
- m_dataSourceSeparator->setFrameShape(QFrame::HLine);
- m_dataSourceSeparator->setFrameShadow(QFrame::Sunken);
+/* m_dataSourceSeparator = new TQFrame(contents);
+ m_dataSourceSeparator->setFrameShape(TQFrame::HLine);
+ m_dataSourceSeparator->setFrameShadow(TQFrame::Sunken);
contentsVlyr->addWidget(m_dataSourceSeparator);*/
contentsVlyr->addSpacing(8);
//- Form's Data Source
- hlyr = new QHBoxLayout(contentsVlyr);
- m_dataSourceLabel = new QLabel(i18n("Form's data source:"), contents);
- m_dataSourceLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_dataSourceLabel = new TQLabel(i18n("Form's data source:"), contents);
+ m_dataSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_dataSourceLabel->setMargin(2);
m_dataSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- m_dataSourceLabel->setAlignment(AlignLeft|AlignBottom);
+ m_dataSourceLabel->tqsetAlignment(AlignLeft|AlignBottom);
hlyr->addWidget(m_dataSourceLabel);
- m_gotoButton = new KexiSmallToolButton(contents, QString::null, "goto", "gotoButton");
+ m_gotoButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoButton");
m_gotoButton->setMinimumHeight(m_dataSourceLabel->minimumHeight());
- QToolTip::add(m_gotoButton, i18n("Go to selected form's data source"));
+ TQToolTip::add(m_gotoButton, i18n("Go to selected form's data source"));
hlyr->addWidget(m_gotoButton);
- connect(m_gotoButton, SIGNAL(clicked()), this, SLOT(slotGotoSelected()));
+ connect(m_gotoButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGotoSelected()));
- m_clearDSButton = new KexiSmallToolButton(contents, QString::null, "clear_left", "clearDSButton");
+ m_clearDSButton = new KexiSmallToolButton(contents, TQString(), "clear_left", "clearDSButton");
m_clearDSButton->setMinimumHeight(m_dataSourceLabel->minimumHeight());
- QToolTip::add(m_clearDSButton, i18n("Clear form's data source"));
+ TQToolTip::add(m_clearDSButton, i18n("Clear form's data source"));
hlyr->addWidget(m_clearDSButton);
- connect(m_clearDSButton, SIGNAL(clicked()), this, SLOT(clearDataSourceSelection()));
+ connect(m_clearDSButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearDataSourceSelection()));
m_dataSourceCombo = new KexiDataSourceComboBox(contents, "dataSourceCombo");
m_dataSourceLabel->setBuddy(m_dataSourceCombo);
@@ -133,9 +133,9 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
vlyr->addStretch();
#else
vlyr->addSpacing(fontMetrics().height());
-/* QFrame *separator = new QFrame(this);
- separator->setFrameShape(QFrame::HLine);
- separator->setFrameShadow(QFrame::Sunken);
+/* TQFrame *separator = new TQFrame(this);
+ separator->setFrameShape(TQFrame::HLine);
+ separator->setFrameShadow(TQFrame::Sunken);
vlyr->addWidget(separator);*/
/*
KPopupTitle *title = new KPopupTitle(this);
@@ -150,24 +150,24 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
//helper info
//! @todo allow to hide such helpers by adding global option
- contents = new QWidget(container);
+ contents = new TQWidget(container);
container->setContents(contents);
- contentsVlyr = new QVBoxLayout(contents);
- hlyr = new QHBoxLayout(contentsVlyr);
- m_mousePointerLabel = new QLabel(contents);
+ contentsVlyr = new TQVBoxLayout(contents);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_mousePointerLabel = new TQLabel(contents);
hlyr->addWidget(m_mousePointerLabel);
m_mousePointerLabel->setPixmap( SmallIcon("mouse_pointer") );
m_mousePointerLabel->setFixedWidth( m_mousePointerLabel->pixmap() ? m_mousePointerLabel->pixmap()->width() : 0);
- m_availableFieldsDescriptionLabel = new QLabel(
+ m_availableFieldsDescriptionLabel = new TQLabel(
i18n("Select fields from the list below and drag them onto a form or click the \"Insert\" button"), contents);
- m_availableFieldsDescriptionLabel->setAlignment( Qt::AlignAuto | Qt::WordBreak );
+ m_availableFieldsDescriptionLabel->tqsetAlignment( TQt::AlignAuto | TQt::WordBreak );
hlyr->addWidget(m_availableFieldsDescriptionLabel);
//Available Fields
contentsVlyr->addSpacing(4);
- hlyr = new QHBoxLayout(contentsVlyr);
- m_availableFieldsLabel = new QLabel(i18n("Available fields:"), contents);
- m_availableFieldsLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ m_availableFieldsLabel = new TQLabel(i18n("Available fields:"), contents);
+ m_availableFieldsLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
m_availableFieldsLabel->setMargin(2);
m_availableFieldsLabel->setMinimumHeight(IconSize(KIcon::Small));
hlyr->addWidget(m_availableFieldsLabel);
@@ -175,27 +175,27 @@ KexiDataSourcePage::KexiDataSourcePage(QWidget *parent, const char *name)
m_addField = new KexiSmallToolButton(contents, i18n("Insert selected field into form", "Insert"),
"add_field", "addFieldButton");
m_addField->setMinimumHeight(m_availableFieldsLabel->minimumHeight());
-// m_addField->setTextPosition(QToolButton::Right);
- m_addField->setFocusPolicy(StrongFocus);
- QToolTip::add(m_addField, i18n("Insert selected fields into form"));
+// m_addField->setTextPosition(TQToolButton::Right);
+ m_addField->setFocusPolicy(TQ_StrongFocus);
+ TQToolTip::add(m_addField, i18n("Insert selected fields into form"));
hlyr->addWidget(m_addField);
- connect(m_addField, SIGNAL(clicked()), this, SLOT(slotInsertSelectedFields()));
+ connect(m_addField, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotInsertSelectedFields()));
m_fieldListView = new KexiFieldListView(contents, "fieldListView",
KexiFieldListView::ShowDataTypes | KexiFieldListView::AllowMultiSelection );
- m_fieldListView->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding));
+ m_fieldListView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
m_availableFieldsLabel->setBuddy(m_fieldListView);
contentsVlyr->addWidget(m_fieldListView, 1);
- connect(m_fieldListView, SIGNAL(selectionChanged()), this, SLOT(slotFieldListViewSelectionChanged()));
- connect(m_fieldListView, SIGNAL(fieldDoubleClicked(const QString&, const QString&, const QString&)),
- this, SLOT(slotFieldDoubleClicked(const QString&, const QString&, const QString&)));
+ connect(m_fieldListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotFieldListViewSelectionChanged()));
+ connect(m_fieldListView, TQT_SIGNAL(fieldDoubleClicked(const TQString&, const TQString&, const TQString&)),
+ this, TQT_SLOT(slotFieldDoubleClicked(const TQString&, const TQString&, const TQString&)));
#endif
vlyr->addStretch(1);
- connect(m_dataSourceCombo, SIGNAL(textChanged(const QString &)), this, SLOT(slotDataSourceTextChanged(const QString &)));
- connect(m_dataSourceCombo, SIGNAL(dataSourceChanged()), this, SLOT(slotDataSourceChanged()));
- connect(m_sourceFieldCombo, SIGNAL(selected()), this, SLOT(slotFieldSelected()));
+ connect(m_dataSourceCombo, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotDataSourceTextChanged(const TQString &)));
+ connect(m_dataSourceCombo, TQT_SIGNAL(dataSourceChanged()), this, TQT_SLOT(slotDataSourceChanged()));
+ connect(m_sourceFieldCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotFieldSelected()));
clearDataSourceSelection();
slotFieldListViewSelectionChanged();
@@ -235,7 +235,7 @@ void KexiDataSourcePage::clearWidgetDataSourceSelection()
{
if (!m_sourceFieldCombo->currentText().isEmpty()) {
m_sourceFieldCombo->setCurrentText("");
- m_sourceFieldCombo->setFieldOrExpression(QString::null);
+ m_sourceFieldCombo->setFieldOrExpression(TQString());
slotFieldSelected();
}
m_clearWidgetDSButton->setEnabled(false);
@@ -243,7 +243,7 @@ void KexiDataSourcePage::clearWidgetDataSourceSelection()
void KexiDataSourcePage::slotGotoSelected()
{
- QCString mime = m_dataSourceCombo->selectedMimeType().latin1();
+ TQCString mime = m_dataSourceCombo->selectedMimeType().latin1();
if (mime=="kexi/table" || mime=="kexi/query") {
if (m_dataSourceCombo->isSelectionValid())
emit jumpToObjectRequested(mime, m_dataSourceCombo->selectedName().latin1());
@@ -253,7 +253,7 @@ void KexiDataSourcePage::slotGotoSelected()
void KexiDataSourcePage::slotInsertSelectedFields()
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
- QStringList selectedFieldNames(m_fieldListView->selectedFieldNames());
+ TQStringList selectedFieldNames(m_fieldListView->selectedFieldNames());
if (selectedFieldNames.isEmpty())
return;
@@ -262,17 +262,17 @@ void KexiDataSourcePage::slotInsertSelectedFields()
#endif
}
-void KexiDataSourcePage::slotFieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
- const QString& fieldName)
+void KexiDataSourcePage::slotFieldDoubleClicked(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& fieldName)
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
- QStringList selectedFields;
+ TQStringList selectedFields;
selectedFields.append(fieldName);
emit insertAutoFields(sourceMimeType, sourceName, selectedFields);
#endif
}
-void KexiDataSourcePage::slotDataSourceTextChanged(const QString & string)
+void KexiDataSourcePage::slotDataSourceTextChanged(const TQString & string)
{
Q_UNUSED(string);
const bool enable = m_dataSourceCombo->isSelectionValid(); //!string.isEmpty() && m_dataSourceCombo->selectedName() == string.latin1();
@@ -291,9 +291,9 @@ void KexiDataSourcePage::slotDataSourceChanged()
{
if (!m_dataSourceCombo->project())
return;
- QCString mime = m_dataSourceCombo->selectedMimeType().latin1();
+ TQCString mime = m_dataSourceCombo->selectedMimeType().latin1();
bool dataSourceFound = false;
- QCString name = m_dataSourceCombo->selectedName().latin1();
+ TQCString name = m_dataSourceCombo->selectedName().latin1();
if ((mime=="kexi/table" || mime=="kexi/query") && m_dataSourceCombo->isSelectionValid()) {
KexiDB::TableOrQuerySchema *tableOrQuery = new KexiDB::TableOrQuerySchema(
m_dataSourceCombo->project()->dbConnection(), name, mime=="kexi/table");
@@ -349,34 +349,34 @@ void KexiDataSourcePage::slotFieldSelected()
);
}
-void KexiDataSourcePage::setDataSource(const QCString& mimeType, const QCString& name)
+void KexiDataSourcePage::setDataSource(const TQCString& mimeType, const TQCString& name)
{
m_dataSourceCombo->setDataSource(mimeType, name);
}
void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
{
- QCString objectName;
- if (propertySet && propertySet->contains("name"))
+ TQCString objectName;
+ if (propertySet && propertySet->tqcontains("name"))
objectName = (*propertySet)["name"].value().toCString();
if (!objectName.isEmpty() && objectName == m_currentObjectName)
return; //the same object
m_currentObjectName = objectName;
- QCString objectClassName;
- if (propertySet && propertySet->contains("this:className"))
+ TQCString objectClassName;
+ if (propertySet && propertySet->tqcontains("this:className"))
objectClassName = (*propertySet)["this:className"].value().toCString();
/*moved if (propertySet) {
- QCString iconName;
- QString objectClassString;
- if (propertySet->contains("this:iconName"))
+ TQCString iconName;
+ TQString objectClassString;
+ if (propertySet->tqcontains("this:iconName"))
iconName = (*propertySet)["this:iconName"].value().toCString();
- if (propertySet->contains("this:classString"))
+ if (propertySet->tqcontains("this:classString"))
objectClassString = (*propertySet)["this:classString"].value().toString();
m_objectInfoLabel->setObjectName(objectName);
m_objectInfoLabel->setObjectClassIcon(iconName);
m_objectInfoLabel->setObjectClassName(objectClassString);
- if (propertySet->contains("this:className"))
+ if (propertySet->tqcontains("this:className"))
objectClassName = (*propertySet)["this:className"].value().toCString();
}*/
KexiPropertyEditorView::updateInfoLabelForPropertySet(
@@ -386,7 +386,7 @@ void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
// kdDebug() << "objectClassName=" << objectClassName << endl;
// {
/* //this is top level form's surface: data source means table or query
- QCString dataSourceMimeType, dataSource;
+ TQCString dataSourceMimeType, dataSource;
if (buffer->hasProperty("dataSourceMimeType"))
dataSourceMimeType = (*buffer)["dataSourceMimeType"].value().toCString();
if (buffer->hasProperty("dataSource"))
@@ -396,16 +396,16 @@ void KexiDataSourcePage::assignPropertySet(KoProperty::Set* propertySet)
// else {
const bool multipleSelection = objectClassName=="special:multiple";
- const bool hasDataSourceProperty = propertySet && propertySet->contains("dataSource") && !multipleSelection;
+ const bool hasDataSourceProperty = propertySet && propertySet->tqcontains("dataSource") && !multipleSelection;
if (!isForm) {
//this is a widget
- QCString dataSource;
+ TQCString dataSource;
if (hasDataSourceProperty) {
if (propertySet)
dataSource = (*propertySet)["dataSource"].value().toCString();
m_noDataSourceAvailableLabel->hide();
- m_sourceFieldCombo->setFieldOrExpression(dataSource);
+ m_sourceFieldCombo->setFieldOrExpression(dataSource.data());
m_sourceFieldCombo->setEnabled(true);
m_clearWidgetDSButton->setEnabled(!m_sourceFieldCombo->currentText().isEmpty());
m_widgetDSLabel->show();
@@ -445,7 +445,7 @@ void KexiDataSourcePage::slotFieldListViewSelectionChanged()
{
#ifndef KEXI_NO_AUTOFIELD_WIDGET
//update "add field" button's state
- for (QListViewItemIterator it(m_fieldListView); it.current(); ++it) {
+ for (TQListViewItemIterator it(m_fieldListView); it.current(); ++it) {
if (it.current()->isSelected()) {
m_addField->setEnabled(true);
return;
diff --git a/kexi/plugins/forms/kexidatasourcepage.h b/kexi/plugins/forms/kexidatasourcepage.h
index 0f113aa7e..914a869be 100644
--- a/kexi/plugins/forms/kexidatasourcepage.h
+++ b/kexi/plugins/forms/kexidatasourcepage.h
@@ -19,7 +19,7 @@
#ifndef KEXIDATASOURCEPAGE_H
#define KEXIDATASOURCEPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <kexidb/utils.h>
#include <koproperty/set.h>
@@ -30,17 +30,18 @@ class KexiDataSourceComboBox;
class KexiFieldComboBox;
class KexiFieldListView;
class KexiProject;
-class QToolButton;
-class QLabel;
-class QFrame;
+class TQToolButton;
+class TQLabel;
+class TQFrame;
//! A page within form designer's property tabbed pane, providing data source editor
-class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
+class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDataSourcePage(QWidget *parent, const char *name = 0);
+ KexiDataSourcePage(TQWidget *tqparent, const char *name = 0);
virtual ~KexiDataSourcePage();
KexiDataSourceComboBox* dataSourceCombo() const { return m_dataSourceCombo; }
@@ -53,37 +54,37 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
//! Sets data source of a currently selected form.
//! This is performed on form initialization and on activating.
- void setDataSource(const QCString& mimeType, const QCString& name);
+ void setDataSource(const TQCString& mimeType, const TQCString& name);
//! Receives a pointer to a new property \a set (from KexiFormView::managerPropertyChanged())
void assignPropertySet(KoProperty::Set* propertySet);
signals:
//! Signal emitted when helper button 'go to selected data source' is clicked.
- void jumpToObjectRequested(const QCString& mime, const QCString& name);
+ void jumpToObjectRequested(const TQCString& mime, const TQCString& name);
//! Signal emitted when form's data source has been changed. It's connected to the Form Manager.
- void formDataSourceChanged(const QCString& mime, const QCString& name);
+ void formDataSourceChanged(const TQCString& mime, const TQCString& name);
/*! Signal emitted when current widget's data source (field/expression)
has been changed. It's connected to the Form Manager.
\a caption for this field is also provided (e.g. AutoField form widget use it) */
- void dataSourceFieldOrExpressionChanged(const QString& string, const QString& caption,
+ void dataSourceFieldOrExpressionChanged(const TQString& string, const TQString& caption,
KexiDB::Field::Type type);
/*! Signal emitted when 'insert fields' button has been clicked */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields);
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields);
protected slots:
- void slotDataSourceTextChanged(const QString & string);
+ void slotDataSourceTextChanged(const TQString & string);
void slotDataSourceChanged();
void slotFieldSelected();
void slotGotoSelected();
void slotInsertSelectedFields();
void slotFieldListViewSelectionChanged();
- void slotFieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
- const QString& fieldName);
+ void slotFieldDoubleClicked(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& fieldName);
protected:
void updateSourceFieldWidgetsAvailability();
@@ -91,12 +92,12 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
KexiFieldComboBox *m_sourceFieldCombo;
KexiObjectInfoLabel *m_objectInfoLabel;
KexiDataSourceComboBox* m_dataSourceCombo;
- QLabel *m_dataSourceLabel, *m_noDataSourceAvailableLabel,
+ TQLabel *m_dataSourceLabel, *m_noDataSourceAvailableLabel,
*m_widgetDSLabel, *m_availableFieldsLabel,
*m_mousePointerLabel, *m_availableFieldsDescriptionLabel;
- QToolButton *m_clearWidgetDSButton, *m_clearDSButton, *m_gotoButton, *m_addField;
- QFrame *m_dataSourceSeparator;
- QString m_noDataSourceAvailableSingleText, m_noDataSourceAvailableMultiText;
+ TQToolButton *m_clearWidgetDSButton, *m_clearDSButton, *m_gotoButton, *m_addField;
+ TQFrame *m_dataSourceSeparator;
+ TQString m_noDataSourceAvailableSingleText, m_noDataSourceAvailableMultiText;
bool m_insideClearDataSourceSelection : 1;
#ifdef KEXI_NO_AUTOFIELD_WIDGET
KexiDB::TableOrQuerySchema *m_tableOrQuerySchema; //!< temp.
@@ -105,8 +106,8 @@ class KEXIFORMUTILS_EXPORT KexiDataSourcePage : public QWidget
#endif
//! Used only in assignPropertySet() to check whether we already have the set assigned
- QCString m_currentObjectName;
- //QGuardedPtr<KoProperty::Set> m_propertySet;
+ TQCString m_currentObjectName;
+ //TQGuardedPtr<KoProperty::Set> m_propertySet;
};
#endif
diff --git a/kexi/plugins/forms/kexidbfactory.cpp b/kexi/plugins/forms/kexidbfactory.cpp
index 4ab05d76c..5f379e6ea 100644
--- a/kexi/plugins/forms/kexidbfactory.cpp
+++ b/kexi/plugins/forms/kexidbfactory.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qscrollview.h>
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqpopupmenu.h>
+#include <tqscrollview.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kgenericfactory.h>
#include <klocale.h>
@@ -69,8 +69,8 @@
//////////////////////////////////////////
-KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, name)
+KexiDBFactory::KexiDBFactory(TQObject *tqparent, const char *name, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, name)
{
KFormDesigner::WidgetInfo *wi;
wi = new KexiDataAwareWidgetInfo(this);
@@ -101,7 +101,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KLineEdit");
wi->setPixmap("lineedit");
wi->setClassName("KexiDBLineEdit");
- wi->addAlternateClassName("QLineEdit", true/*override*/);
+ wi->addAlternateClassName(TQLINEEDIT_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KLineEdit", true/*override*/);
wi->setIncludeFileName("klineedit.h");
wi->setName(i18n("Text Box"));
@@ -115,7 +115,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KTextEdit");
wi->setPixmap("textedit");
wi->setClassName("KexiDBTextEdit");
- wi->addAlternateClassName("QTextEdit", true/*override*/);
+ wi->addAlternateClassName(TQTEXTEDIT_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KTextEdit", true/*override*/);
wi->setIncludeFileName("ktextedit.h");
wi->setName(i18n("Text Editor"));
@@ -126,10 +126,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
wi = new KFormDesigner::WidgetInfo(
- this, "containers", "QFrame" /*we're inheriting to get i18n'd strings already translated there*/);
+ this, "containers", TQFRAME_OBJECT_NAME_STRING /*we're inheriting to get i18n'd strings already translated there*/);
wi->setPixmap("frame");
wi->setClassName("KexiFrame");
- wi->addAlternateClassName("QFrame", true/*override*/);
+ wi->addAlternateClassName(TQFRAME_OBJECT_NAME_STRING, true/*override*/);
wi->setName(i18n("Frame"));
wi->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. "
@@ -138,10 +138,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
wi = new KexiDataAwareWidgetInfo(
- this, "stdwidgets", "QLabel" /*we're inheriting to get i18n'd strings already translated there*/);
+ this, "stdwidgets", TQLABEL_OBJECT_NAME_STRING /*we're inheriting to get i18n'd strings already translated there*/);
wi->setPixmap("label");
wi->setClassName("KexiDBLabel");
- wi->addAlternateClassName("QLabel", true/*override*/);
+ wi->addAlternateClassName(TQLABEL_OBJECT_NAME_STRING, true/*override*/);
wi->addAlternateClassName("KexiLabel", true/*override*/); //older
wi->setName(i18n("Text Label", "Label"));
wi->setNamePrefix(
@@ -184,10 +184,10 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
addClass(wi);
#endif
- wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QCheckBox");
+ wi = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQCHECKBOX_OBJECT_NAME_STRING);
wi->setPixmap("check");
wi->setClassName("KexiDBCheckBox");
- wi->addAlternateClassName("QCheckBox", true/*override*/);
+ wi->addAlternateClassName(TQCHECKBOX_OBJECT_NAME_STRING, true/*override*/);
wi->setName(i18n("Check Box"));
wi->setNamePrefix(
i18n("Widget name. This string will be used to name widgets of this class. "
@@ -213,11 +213,11 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KDateWidget");
#else
- KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QDateEdit");
+ KexiDataAwareWidgetInfo *wDate = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQDATEEDIT_OBJECT_NAME_STRING);
#endif
wDate->setPixmap("dateedit");
wDate->setClassName("KexiDBDateEdit");
- wDate->addAlternateClassName("QDateEdit", true);//override
+ wDate->addAlternateClassName(TQDATEEDIT_OBJECT_NAME_STRING, true);//override
wDate->addAlternateClassName("KDateWidget", true);//override
wDate->setName(i18n("Date Widget"));
wDate->setNamePrefix(
@@ -228,11 +228,11 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#if KDE_VERSION >= KDE_MAKE_VERSION(3,1,9)
KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KTimeWidget");
#else
- KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", "QTimeEdit");
+ KexiDataAwareWidgetInfo *wTime = new KexiDataAwareWidgetInfo(this, "stdwidgets", TQTIMEEDIT_OBJECT_NAME_STRING);
#endif
wTime->setPixmap("timeedit");
wTime->setClassName("KexiDBTimeEdit");
- wTime->addAlternateClassName("QTimeEdit", true);//override
+ wTime->addAlternateClassName(TQTIMEEDIT_OBJECT_NAME_STRING, true);//override
wTime->addAlternateClassName("KTimeWidget", true);//override
wTime->setName(i18n("Time Widget"));
wTime->setNamePrefix(
@@ -247,7 +247,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
#endif
wDateTime->setPixmap("datetimeedit");
wDateTime->setClassName("KexiDBDateTimeEdit");
- wDateTime->addAlternateClassName("QDateTimeEdit", true);//override
+ wDateTime->addAlternateClassName(TQDATETIMEEDIT_OBJECT_NAME_STRING, true);//override
wDateTime->addAlternateClassName("KDateTimeWidget", true);//override
wDateTime->setName(i18n("Date/Time Widget"));
wDateTime->setNamePrefix(
@@ -259,7 +259,7 @@ KexiDBFactory::KexiDBFactory(QObject *parent, const char *name, const QStringLis
/* KexiDataAwareWidgetInfo *wIntSpinBox = new KexiDataAwareWidgetInfo(this, "stdwidgets", "KIntSpinBox");
wIntSpinBox->setPixmap("spin");
wIntSpinBox->setClassName("KexiDBIntSpinBox");
- wIntSpinBox->addAlternateClassName("QSpinBox", true);
+ wIntSpinBox->addAlternateClassName(TQSPINBOX_OBJECT_NAME_STRING, true);
wIntSpinBox->addAlternateClassName("KIntSpinBox", true);
wIntSpinBox->setName(i18n("Integer Number Spin Box"));
wIntSpinBox->setNamePrefix(
@@ -350,14 +350,14 @@ KexiDBFactory::~KexiDBFactory()
{
}
-QWidget*
-KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+KexiDBFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
kexipluginsdbg << "KexiDBFactory::createWidget() " << this << endl;
- QWidget *w=0;
- QString text( container->form()->library()->textForWidgetName(n, c) );
+ TQWidget *w=0;
+ TQString text( container->form()->library()->textForWidgetName(n, c) );
const bool designMode = options & KFormDesigner::WidgetFactory::DesignViewMode;
if(c == "KexiDBSubForm")
@@ -366,15 +366,15 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
{
w = new KexiDBLineEdit(p, n);
if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+ w->setCursor(TQCursor(TQt::ArrowCursor));
}
else if(c == "KexiDBTextEdit")
{
w = new KexiDBTextEdit(p, n);
if (designMode)
- w->setCursor(QCursor(Qt::ArrowCursor));
+ w->setCursor(TQCursor(TQt::ArrowCursor));
}
- else if(c == "QFrame" || c == "KexiFrame")
+ else if(c == TQFRAME_OBJECT_NAME_STRING || c == "KexiFrame")
{
w = new KexiFrame(p, n);
new KFormDesigner::Container(container, w, container);
@@ -384,7 +384,7 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
#ifndef KEXI_NO_IMAGEBOX_WIDGET
else if(c == "KexiDBImageBox") {
w = new KexiDBImageBox(designMode, p, n);
- connect(w, SIGNAL(idChanged(long)), this, SLOT(slotImageBoxIdChanged(long)));
+ connect(w, TQT_SIGNAL(idChanged(long)), this, TQT_SLOT(slotImageBoxIdChanged(long)));
}
#endif
#ifndef KEXI_NO_AUTOFIELD_WIDGET
@@ -396,11 +396,11 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
else if(c == "KexiDBComboBox")
w = new KexiDBComboBox(p, n, designMode);
/* else if(c == "KexiDBTimeEdit")
- w = new KexiDBTimeEdit(QTime::currentTime(), p, n);
+ w = new KexiDBTimeEdit(TQTime::currentTime(), p, n);
else if(c == "KexiDBDateEdit")
- w = new KexiDBDateEdit(QDate::currentDate(), p, n);
+ w = new KexiDBDateEdit(TQDate::tqcurrentDate(), p, n);
else if(c == "KexiDBDateTimeEdit")
- w = new KexiDBDateTimeEdit(QDateTime::currentDateTime(), p, n);*/
+ w = new KexiDBDateTimeEdit(TQDateTime::tqcurrentDateTime(), p, n);*/
// else if(c == "KexiDBIntSpinBox")
// w = new KexiDBIntSpinBox(p, n);
// else if(c == "KexiDBDoubleSpinBox")
@@ -412,10 +412,10 @@ KexiDBFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-KexiDBFactory::createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+KexiDBFactory::createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *)
{
- if(classname == "QPushButton" || classname == "KPushButton" || classname == "KexiPushButton")
+ if(classname == TQPUSHBUTTON_OBJECT_NAME_STRING || classname == "KPushButton" || classname == "KexiPushButton")
{
/*! @todo also call createMenuActions() for inherited factory! */
m_assignAction->plug( menu );
@@ -453,7 +453,7 @@ KexiDBFactory::createCustomActions(KActionCollection* col)
}
bool
-KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container)
+KexiDBFactory::startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
if(classname == "KexiDBLineEdit")
@@ -462,7 +462,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
KLineEdit *lineedit = static_cast<KLineEdit*>(w);
createEditor(classname, lineedit->text(), lineedit, container,
- lineedit->geometry(), lineedit->alignment(), true);
+ lineedit->tqgeometry(), lineedit->tqalignment(), true);
return true;
}
if(classname == "KexiDBTextEdit")
@@ -471,7 +471,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
KTextEdit *textedit = static_cast<KTextEdit*>(w);
createEditor(classname, textedit->text(), textedit, container,
- textedit->geometry(), textedit->alignment(), true, true);
+ textedit->tqgeometry(), textedit->tqalignment(), true, true);
//copy a few properties
KTextEdit *ed = dynamic_cast<KTextEdit *>( editor(w) );
ed->setWrapPolicy(textedit->wrapPolicy());
@@ -489,7 +489,7 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
m_widget = w;
if(label->textFormat() == RichText)
{
- QString text = label->text();
+ TQString text = label->text();
if ( editRichText( label, text ) )
{
changeProperty( "textFormat", "RichText", container->form() );
@@ -497,13 +497,13 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
}
if ( classname == "KexiDBLabel" )
- w->resize(w->sizeHint());
+ w->resize(w->tqsizeHint());
}
else
{
createEditor(classname, label->text(), label, container,
- label->geometry(), label->alignment(),
- false, label->alignment() & Qt::WordBreak /*multiline*/);
+ label->tqgeometry(), label->tqalignment(),
+ false, label->tqalignment() & TQt::WordBreak /*multiline*/);
}
return true;
}
@@ -528,15 +528,15 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
else if(classname == "KexiDBAutoField") {
if(static_cast<KexiDBAutoField*>(w)->hasAutoCaption())
return false; // caption is auto, abort editing
- QLabel *label = static_cast<KexiDBAutoField*>(w)->label();
- createEditor(classname, label->text(), label, container, label->geometry(), label->alignment());
+ TQLabel *label = static_cast<KexiDBAutoField*>(w)->label();
+ createEditor(classname, label->text(), label, container, label->tqgeometry(), label->tqalignment());
return true;
}
else if (classname == "KexiDBCheckBox") {
KexiDBCheckBox *cb = static_cast<KexiDBCheckBox*>(w);
- QRect r( cb->geometry() );
- r.setLeft( r.left() + 2 + cb->style().subRect( QStyle::SR_CheckBoxIndicator, cb ).width() );
- createEditor(classname, cb->text(), cb, container, r, Qt::AlignAuto);
+ TQRect r( cb->tqgeometry() );
+ r.setLeft( r.left() + 2 + cb->tqstyle().subRect( TQStyle::SR_CheckBoxIndicator, cb ).width() );
+ createEditor(classname, cb->text(), cb, container, r, TQt::AlignAuto);
return true;
}
else if(classname == "KexiDBImageBox") {
@@ -548,13 +548,13 @@ KexiDBFactory::startEditing(const QCString &classname, QWidget *w, KFormDesigner
}
bool
-KexiDBFactory::previewWidget(const QCString &, QWidget *, KFormDesigner::Container *)
+KexiDBFactory::previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *)
{
return false;
}
bool
-KexiDBFactory::clearWidgetContent(const QCString & /*classname*/, QWidget *w)
+KexiDBFactory::clearWidgetContent(const TQCString & /*classname*/, TQWidget *w)
{
//! @todo this code should not be copied here but
//! just inherited StdWidgetFactory::clearWidgetContent() should be called
@@ -564,10 +564,10 @@ KexiDBFactory::clearWidgetContent(const QCString & /*classname*/, QWidget *w)
return true;
}
-QValueList<QCString>
-KexiDBFactory::autoSaveProperties(const QCString & /*classname*/)
+TQValueList<TQCString>
+KexiDBFactory::autoSaveProperties(const TQCString & /*classname*/)
{
- QValueList<QCString> lst;
+ TQValueList<TQCString> lst;
// if(classname == "KexiDBSubForm")
//lst << "formName";
// if(classname == "KexiDBLineEdit")
@@ -578,8 +578,8 @@ KexiDBFactory::autoSaveProperties(const QCString & /*classname*/)
}
bool
-KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
- const QCString& property, bool isTopLevel)
+KexiDBFactory::isPropertyVisibleInternal(const TQCString& classname, TQWidget *w,
+ const TQCString& property, bool isTopLevel)
{
//general
if (property=="dataSource" || property=="dataSourceMimeType") {
@@ -646,7 +646,7 @@ KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
}
else if(classname == "KexiDBCheckBox") {
//hide text property if the widget is a child of an autofield beause there's already "caption" for this purpose
- if (property=="text" && w && dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w->parentWidget()))
+ if (property=="text" && w && dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>(w->tqparentWidget()))
return false;
ok = property!="autoRepeat";
}
@@ -655,8 +655,8 @@ KexiDBFactory::isPropertyVisibleInternal(const QCString& classname, QWidget *w,
}
bool
-KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname,
- QWidget *w, const QCString& property)
+KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname,
+ TQWidget *w, const TQCString& property)
{
Q_UNUSED(classname);
Q_UNUSED(w);
@@ -666,41 +666,41 @@ KexiDBFactory::propertySetShouldBeReloadedAfterPropertyChange(const QCString& cl
}
bool
-KexiDBFactory::changeText(const QString &text)
+KexiDBFactory::changeText(const TQString &text)
{
KFormDesigner::Form *form = m_container ? m_container->form() : 0;
if (!form)
return false;
if (!form->selectedWidget())
return false;
- QCString n( form->selectedWidget()->className() );
-// QWidget *w = WidgetFactory::widget();
+ TQCString n( form->selectedWidget()->className() );
+// TQWidget *w = WidgetFactory::widget();
if(n == "KexiDBAutoField") {
changeProperty("caption", text, form);
return true;
}
- //! \todo check field's geometry
+ //! \todo check field's tqgeometry
return false;
}
void
-KexiDBFactory::resizeEditor(QWidget *editor, QWidget *w, const QCString &classname)
+KexiDBFactory::resizeEditor(TQWidget *editor, TQWidget *w, const TQCString &classname)
{
- //QSize s = widget->size();
- //QPoint p = widget->pos();
+ //TQSize s = widget->size();
+ //TQPoint p = widget->pos();
if(classname == "KexiDBAutoField")
- editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->geometry() );
+ editor->setGeometry( static_cast<KexiDBAutoField*>(w)->label()->tqgeometry() );
}
void
KexiDBFactory::slotImageBoxIdChanged(KexiBLOBBuffer::Id_t id)
{
-//old KexiFormView *formView = KexiUtils::findParent<KexiFormView>((QWidget*)m_widget, "KexiFormView");
+//old KexiFormView *formView = KexiUtils::findParent<KexiFormView>((TQWidget*)m_widget, "KexiFormView");
// (js) heh, porting to KFormDesigner::FormManager::self() singleton took me entire day of work...
KFormDesigner::Form *form = KFormDesigner::FormManager::self()->activeForm();
- KexiFormView *formView = form ? KexiUtils::findParent<KexiFormView>((QWidget*)form->widget(), "KexiFormView") : 0;
+ KexiFormView *formView = form ? KexiUtils::findParent<KexiFormView>((TQWidget*)form->widget(), "KexiFormView") : 0;
if (formView) {
changeProperty("pixmapId", (uint)/*! @todo unsafe */id, form);
//old formView->setUnsavedLocalBLOB(m_widget, id);
diff --git a/kexi/plugins/forms/kexidbfactory.h b/kexi/plugins/forms/kexidbfactory.h
index 6064a0011..f15f8c395 100644
--- a/kexi/plugins/forms/kexidbfactory.h
+++ b/kexi/plugins/forms/kexidbfactory.h
@@ -34,39 +34,40 @@ namespace KFormDesigner {
class KexiDBFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBFactory(QObject *parent, const char *name, const QStringList &args);
+ KexiDBFactory(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiDBFactory();
- virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name,
+ virtual TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name,
KFormDesigner::Container *container, int options = DefaultOptions );
virtual void createCustomActions(KActionCollection* col);
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
- virtual bool clearWidgetContent(const QCString &classname, QWidget *w);
+ virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container);
+ virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *);
+ virtual bool clearWidgetContent(const TQCString &classname, TQWidget *w);
- //virtual void saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
- //QDomElement &parentNode, QDomDocument &parent) {}
- //virtual void readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ //virtual void saveSpecialProperty(const TQString &classname, const TQString &name, const TQVariant &value, TQWidget *w,
+ //TQDomElement &tqparentNode, TQDomDocument &tqparent) {}
+ //virtual void readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) {}
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
protected slots:
void slotImageBoxIdChanged(long id); /*KexiBLOBBuffer::Id_t*/
protected:
- virtual bool changeText(const QString &newText);
- virtual void resizeEditor(QWidget *editor, QWidget *widget, const QCString &classname);
+ virtual bool changeText(const TQString &newText);
+ virtual void resizeEditor(TQWidget *editor, TQWidget *widget, const TQCString &classname);
- virtual bool isPropertyVisibleInternal(const QCString& classname, QWidget *w,
- const QCString& property, bool isTopLevel);
+ virtual bool isPropertyVisibleInternal(const TQCString& classname, TQWidget *w,
+ const TQCString& property, bool isTopLevel);
//! Sometimes property sets should be reloaded when a given property value changed.
- virtual bool propertySetShouldBeReloadedAfterPropertyChange(const QCString& classname, QWidget *w,
- const QCString& property);
+ virtual bool propertySetShouldBeReloadedAfterPropertyChange(const TQCString& classname, TQWidget *w,
+ const TQCString& property);
KAction* m_assignAction;
};
diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
index 47eabe9dd..3c20510ed 100644
--- a/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
+++ b/kexi/plugins/forms/kexidbtextwidgetinterface.cpp
@@ -21,8 +21,8 @@
#include "kexiformdataiteminterface.h"
#include <kexidb/queryschema.h>
#include <kexiutils/utils.h>
-#include <qframe.h>
-#include <qpainter.h>
+#include <tqframe.h>
+#include <tqpainter.h>
KexiDBTextWidgetInterface::KexiDBTextWidgetInterface()
: m_autonumberDisplayParameters(0)
@@ -34,7 +34,7 @@ KexiDBTextWidgetInterface::~KexiDBTextWidgetInterface()
delete m_autonumberDisplayParameters;
}
-void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QWidget *w)
+void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w)
{
if (cinfo->field->isAutoIncrement()) {
if (!m_autonumberDisplayParameters)
@@ -43,7 +43,7 @@ void KexiDBTextWidgetInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QW
}
}
-void KexiDBTextWidgetInterface::paint( QFrame *w, QPainter* p, bool textIsEmpty, int alignment, bool hasFocus )
+void KexiDBTextWidgetInterface::paint( TQFrame *w, TQPainter* p, bool textIsEmpty, int tqalignment, bool hasFocus )
{
KexiFormDataItemInterface *dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(w);
KexiDB::QueryColumnInfo *columnInfo = dataItemIface ? dataItemIface->columnInfo() : 0;
@@ -53,19 +53,19 @@ void KexiDBTextWidgetInterface::paint( QFrame *w, QPainter* p, bool textIsEmpty,
if (w->hasFocus()) {
p->setPen(
KexiUtils::blendedColors(
- m_autonumberDisplayParameters->textColor, w->palette().active().base(), 1, 3));
+ m_autonumberDisplayParameters->textColor, w->tqpalette().active().base(), 1, 3));
}
KexiDisplayUtils::paintAutonumberSign(*m_autonumberDisplayParameters, p,
2 + margin + w->margin(), margin, w->width() - margin*2 -2-2,
- w->height() - margin*2 -2, alignment, hasFocus);
+ w->height() - margin*2 -2, tqalignment, hasFocus);
}
}
}
-void KexiDBTextWidgetInterface::event( QEvent * e, QWidget *w, bool textIsEmpty )
+void KexiDBTextWidgetInterface::event( TQEvent * e, TQWidget *w, bool textIsEmpty )
{
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut) {
+ if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut) {
if (m_autonumberDisplayParameters && textIsEmpty)
- w->repaint();
+ w->tqrepaint();
}
}
diff --git a/kexi/plugins/forms/kexidbtextwidgetinterface.h b/kexi/plugins/forms/kexidbtextwidgetinterface.h
index ca10fc4e0..6e0299c0d 100644
--- a/kexi/plugins/forms/kexidbtextwidgetinterface.h
+++ b/kexi/plugins/forms/kexidbtextwidgetinterface.h
@@ -25,7 +25,7 @@
namespace KexiDB {
class QueryColumnInfo;
}
-class QFrame;
+class TQFrame;
//! @short An interface providing common text editor's functionality
/*! Widgets (e.g. KexiDBLineEdit, KexiDBTextEdit) implementing KexiFormDataItemInterface
@@ -37,13 +37,13 @@ class KEXIFORMUTILS_EXPORT KexiDBTextWidgetInterface
~KexiDBTextWidgetInterface();
//! Called from KexiFormDataItemInterface::setColumnInfo(KexiDB::QueryColumnInfo* cinfo) implementation.
- void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, QWidget *w);
+ void setColumnInfo(KexiDB::QueryColumnInfo* cinfo, TQWidget *w);
- //! Called from paintEvent( QPaintEvent *pe ) method of the data aware widget.
- void paint( QFrame *w, QPainter *p, bool textIsEmpty, int alignment, bool hasFocus );
+ //! Called from paintEvent( TQPaintEvent *pe ) method of the data aware widget.
+ void paint( TQFrame *w, TQPainter *p, bool textIsEmpty, int tqalignment, bool hasFocus );
- //! Called from event( QEvent * e ) method of the data aware widget.
- void event( QEvent * e, QWidget *w, bool textIsEmpty );
+ //! Called from event( TQEvent * e ) method of the data aware widget.
+ void event( TQEvent * e, TQWidget *w, bool textIsEmpty );
protected:
//! parameters for displaying autonumber sign
diff --git a/kexi/plugins/forms/kexiformdataiteminterface.cpp b/kexi/plugins/forms/kexiformdataiteminterface.cpp
index c87a2dabf..9a861917f 100644
--- a/kexi/plugins/forms/kexiformdataiteminterface.cpp
+++ b/kexi/plugins/forms/kexiformdataiteminterface.cpp
@@ -40,7 +40,7 @@ KexiFormDataItemInterface::~KexiFormDataItemInterface()
void KexiFormDataItemInterface::undoChanges()
{
// m_disable_signalValueChanged = true;
- setValueInternal(QString::null, false);
+ setValueInternal(TQString(), false);
// m_disable_signalValueChanged = false;
}
@@ -49,7 +49,7 @@ KexiDB::Field* KexiFormDataItemInterface::field() const
return m_columnInfo ? m_columnInfo->field : 0;
}
-void KexiFormDataItemInterface::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiFormDataItemInterface::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
m_displayDefaultValue = displayDefaultValue;
if (!m_displayParametersForDefaultValue) {
@@ -61,8 +61,8 @@ void KexiFormDataItemInterface::setDisplayDefaultValue(QWidget* widget, bool dis
void KexiFormDataItemInterface::cancelEditor()
{
- QWidget *parentWidget = dynamic_cast<QWidget*>(this)->parentWidget();
- KexiFormScrollView* view = KexiUtils::findParent<KexiFormScrollView>(parentWidget, "KexiFormScrollView");
+ TQWidget *tqparentWidget = dynamic_cast<TQWidget*>(this)->tqparentWidget();
+ KexiFormScrollView* view = KexiUtils::findParent<KexiFormScrollView>(tqparentWidget, "KexiFormScrollView");
if (view)
view->cancelEditor();
}
diff --git a/kexi/plugins/forms/kexiformdataiteminterface.h b/kexi/plugins/forms/kexiformdataiteminterface.h
index 99d20db4e..1cb7a11f4 100644
--- a/kexi/plugins/forms/kexiformdataiteminterface.h
+++ b/kexi/plugins/forms/kexiformdataiteminterface.h
@@ -22,7 +22,7 @@
#include <widget/utils/kexidisplayutils.h>
#include <kexidataiteminterface.h>
-#include <qwidget.h>
+#include <tqwidget.h>
namespace KexiDB {
class Field;
@@ -37,22 +37,22 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
//! \return the name of the data source for this widget.
//! Data source usually means here a table or query, a field name or an expression.
- inline QString dataSource() const { return m_dataSource; }
+ inline TQString dataSource() const { return m_dataSource; }
//! Sets the name of the data source for this widget.
//! Data source usually means here a table or query or field name name.
- inline void setDataSource(const QString &ds) { m_dataSource = ds; }
+ inline void setDataSource(const TQString &ds) { m_dataSource = ds; }
/*! \return the mime type of the data source for this widget.
Data source mime type means here types like "kexi/table" or "kexi/query"
in.the data source is set to object (as within form or subform) or is empty
if the data source is set to table field or query column. */
- inline QCString dataSourceMimeType() const { return m_dataSourceMimeType; }
+ inline TQCString dataSourceMimeType() const { return m_dataSourceMimeType; }
/*! Sets the mime type of the data source for this widget.
Data source usually means here a "kexi/table" or "kexi/query".
@see dataSourceMimeType() */
- inline void setDataSourceMimeType(const QCString &ds) { m_dataSourceMimeType = ds; }
+ inline void setDataSourceMimeType(const TQCString &ds) { m_dataSourceMimeType = ds; }
/*! If \a displayDefaultValue is true, the value set by KexiDataItemInterface::setValue()
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
@@ -60,14 +60,14 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
You can reimplement this in the widget. Always call the superclass' implementation.
setDisplayDefaultValue(.., false) is called in KexiFormScrollView::valueChanged()
as a response on data change performed by user. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
/*! \return true if default value is displayed for this item. */
virtual bool hasDisplayedDefaultValue() const { return m_displayDefaultValue; }
- /*! Convenience function: casts this item to a QWidget.
- Can return 0 if the item is not a QWidget-derived object. */
- virtual QWidget* widget() { return dynamic_cast<QWidget*>(this); }
+ /*! Convenience function: casts this item to a TQWidget.
+ Can return 0 if the item is not a TQWidget-derived object. */
+ virtual TQWidget* widget() { return dynamic_cast<TQWidget*>(this); }
/*! Sets 'invalid' state, e.g. a text editor widget should display
text \a displayText and become read only to prevent entering data,
@@ -76,7 +76,7 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
Note: that even widgets that usualy do not display texts (e.g. pixmaps)
should display \a displayText too.
*/
- virtual void setInvalidState( const QString& displayText ) = 0;
+ virtual void setInvalidState( const TQString& displayText ) = 0;
/*! Changes 'read only' flag, for this widget.
Typically this flag can be passed to a widget itself,
@@ -118,7 +118,7 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
virtual void undoChanges();
/* Cancels editing of the widget's data. This method just looks for
- the (grand)parent KexiFormScrollView object and calls
+ the (grand)tqparent KexiFormScrollView object and calls
KexiFormScrollView::cancelEditor(). */
void cancelEditor();
@@ -129,11 +129,11 @@ class KEXIFORMUTILS_EXPORT KexiFormDataItemInterface : public KexiDataItemInterf
\return true if \a ke should be accepted by the widget item.
This method is used e.g. in KexiDBImageBox for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing". */
- virtual bool keyPressed(QKeyEvent *ke) { Q_UNUSED(ke); return false; };
+ virtual bool keyPressed(TQKeyEvent *ke) { Q_UNUSED(ke); return false; };
protected:
- QString m_dataSource;
- QCString m_dataSourceMimeType;
+ TQString m_dataSource;
+ TQCString m_dataSourceMimeType;
KexiDB::QueryColumnInfo* m_columnInfo;
KexiDisplayUtils::DisplayParameters *m_displayParametersForEnteredValue; //!< used in setDisplayDefaultValue()
KexiDisplayUtils::DisplayParameters *m_displayParametersForDefaultValue; //!< used in setDisplayDefaultValue()
diff --git a/kexi/plugins/forms/kexiformeventhandler.cpp b/kexi/plugins/forms/kexiformeventhandler.cpp
index 01bca2018..de2d85701 100644
--- a/kexi/plugins/forms/kexiformeventhandler.cpp
+++ b/kexi/plugins/forms/kexiformeventhandler.cpp
@@ -19,8 +19,8 @@
#include "kexiformeventhandler.h"
-#include <qwidget.h>
-#include <qobjectlist.h>
+#include <tqwidget.h>
+#include <tqobjectlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,19 +44,19 @@ bool KexiFormEventAction::ActionData::isEmpty() const
}
KexiPart::Info* KexiFormEventAction::ActionData::decodeString(
- QString& actionType, QString& actionArg, bool& ok) const
+ TQString& actionType, TQString& actionArg, bool& ok) const
{
- const int idx = string.find(':');
+ const int idx = string.tqfind(':');
ok = false;
if (idx==-1)
return 0;
- const QString _actionType = string.left(idx);
- const QString _actionArg = string.mid(idx+1);
+ const TQString _actionType = string.left(idx);
+ const TQString _actionArg = string.mid(idx+1);
if (_actionType.isEmpty() || _actionArg.isEmpty())
return 0;
KexiPart::Info *info = 0;
if (_actionType!="kaction" && _actionType!="currentForm") {
- info = Kexi::partManager().infoForMimeType( QString("kexi/%1").arg(_actionType) );
+ info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(_actionType) );
if (!info)
return 0;
}
@@ -68,9 +68,9 @@ KexiPart::Info* KexiFormEventAction::ActionData::decodeString(
//-------------------------------------
-KexiFormEventAction::KexiFormEventAction(KexiMainWindow *mainWin, QObject* parent,
- const QString& actionName, const QString& objectName, const QString& actionOption)
- : KAction(parent), m_mainWin(mainWin), m_actionName(actionName), m_objectName(objectName)
+KexiFormEventAction::KexiFormEventAction(KexiMainWindow *mainWin, TQObject* tqparent,
+ const TQString& actionName, const TQString& objectName, const TQString& actionOption)
+ : KAction(tqparent), m_mainWin(mainWin), m_actionName(actionName), m_objectName(objectName)
, m_actionOption(actionOption)
{
}
@@ -85,7 +85,7 @@ void KexiFormEventAction::activate()
if (!project)
return;
KexiPart::Part* part = Kexi::partManager().partForMimeType(
- QString("kexi/%1").arg(m_actionName) );
+ TQString("kexi/%1").tqarg(m_actionName) );
if (!part)
return;
KexiPart::Item* item = project->item( part->info(), m_objectName );
@@ -94,7 +94,7 @@ void KexiFormEventAction::activate()
bool actionCancelled = false;
if (m_actionOption.isEmpty()) { // backward compatibility (good defaults)
if (part->info()->isExecuteSupported())
- part->execute(item, parent());
+ part->execute(item, tqparent());
else
m_mainWin->openObject(item, Kexi::DataViewMode, actionCancelled);
}
@@ -103,7 +103,7 @@ void KexiFormEventAction::activate()
if (m_actionOption == "open")
m_mainWin->openObject(item, Kexi::DataViewMode, actionCancelled);
else if (m_actionOption == "execute")
- part->execute(item, parent());
+ part->execute(item, tqparent());
else if (m_actionOption == "print") {
if (part->info()->isPrintingSupported())
m_mainWin->printItem(item);
@@ -147,7 +147,7 @@ KexiFormEventHandler::~KexiFormEventHandler()
{
}
-void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin, QWidget* mainWidget)
+void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin, TQWidget* mainWidget)
{
m_mainWidget = mainWidget;
if (!m_mainWidget)
@@ -155,9 +155,9 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
//find widgets whose will work as data items
//! @todo look for other widgets too
- QObjectList *l = m_mainWidget->queryList( "KexiPushButton" );
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = m_mainWidget->queryList( "KexiPushButton" );
+ TQObjectListIt it( *l );
+ TQObject *obj;
for ( ; (obj = it.current()) != 0; ++it ) {
bool ok;
KexiFormEventAction::ActionData data;
@@ -166,7 +166,7 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
if (data.isEmpty())
continue;
- QString actionType, actionArg;
+ TQString actionType, actionArg;
KexiPart::Info* partInfo = data.decodeString(actionType, actionArg, ok);
if (!ok)
continue;
@@ -174,14 +174,14 @@ void KexiFormEventHandler::setMainWidgetForEventHandling(KexiMainWindow *mainWin
KAction *action = mainWin->actionCollection()->action( actionArg.latin1() );
if (!action)
continue;
- QObject::disconnect( obj, SIGNAL(clicked()), action, SLOT(activate()) ); //safety
- QObject::connect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
+ TQObject::disconnect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) ); //safety
+ TQObject::connect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
}
else if (partInfo) { //'open or execute' action
KexiFormEventAction* action = new KexiFormEventAction(mainWin, obj, actionType, actionArg,
data.option);
- QObject::disconnect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
- QObject::connect( obj, SIGNAL(clicked()), action, SLOT(activate()) );
+ TQObject::disconnect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
+ TQObject::connect( obj, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()) );
}
}
delete l;
diff --git a/kexi/plugins/forms/kexiformeventhandler.h b/kexi/plugins/forms/kexiformeventhandler.h
index e92e9ff9c..6e020e25f 100644
--- a/kexi/plugins/forms/kexiformeventhandler.h
+++ b/kexi/plugins/forms/kexiformeventhandler.h
@@ -20,7 +20,7 @@
#ifndef KEXIFORMEVENTHANDLER_H
#define KEXIFORMEVENTHANDLER_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
class KexiMainWindow;
@@ -47,10 +47,10 @@ class KEXIFORMUTILS_EXPORT KexiFormEventHandler
to appropriate actions.
For now, all of them must be KexiPushButton).
\a mainWin is used to get action list. */
- void setMainWidgetForEventHandling(KexiMainWindow *mainWin, QWidget* mainWidget);
+ void setMainWidgetForEventHandling(KexiMainWindow *mainWin, TQWidget* mainWidget);
protected:
- QWidget *m_mainWidget;
+ TQWidget *m_mainWidget;
};
//! @internal form-level action for handling "on click" actions
@@ -72,20 +72,20 @@ class KEXIFORMUTILS_EXPORT KexiFormEventAction : public KAction
\a ok is set to true on success and to false on failure. On failure no other
values are passed.
\return part info if action type is "table", "query", etc., or 0 for "kaction" type. */
- KexiPart::Info* decodeString(QString& actionType, QString& actionArg, bool& ok) const;
+ KexiPart::Info* decodeString(TQString& actionType, TQString& actionArg, bool& ok) const;
//! \return true if the action is empty
bool isEmpty() const;
- QString string; //!< action string with prefix, like "kaction:edit_copy" or "table:<tableName>"
+ TQString string; //!< action string with prefix, like "kaction:edit_copy" or "table:<tableName>"
- QString option; //!< option used when name is "table/query/etc.:\<objectName\>" is set;
+ TQString option; //!< option used when name is "table/query/etc.:\<objectName\>" is set;
//!< can be set to "open", "design", "editText", etc.
//!< @see ActionToExecuteListView::showActionsForMimeType()
};
- KexiFormEventAction(KexiMainWindow *mainWin, QObject* parent, const QString& actionName,
- const QString& objectName, const QString& actionOption);
+ KexiFormEventAction(KexiMainWindow *mainWin, TQObject* tqparent, const TQString& actionName,
+ const TQString& objectName, const TQString& actionOption);
virtual ~KexiFormEventAction();
public slots:
@@ -95,7 +95,7 @@ class KEXIFORMUTILS_EXPORT KexiFormEventAction : public KAction
private:
KexiMainWindow *m_mainWin;
- QString m_actionName, m_objectName, m_actionOption;
+ TQString m_actionName, m_objectName, m_actionOption;
};
#endif
diff --git a/kexi/plugins/forms/kexiformmanager.cpp b/kexi/plugins/forms/kexiformmanager.cpp
index 6134cfc8f..9f2884181 100644
--- a/kexi/plugins/forms/kexiformmanager.cpp
+++ b/kexi/plugins/forms/kexiformmanager.cpp
@@ -35,13 +35,13 @@
#include <koproperty/property.h>
#include <widget/kexicustompropertyfactory.h>
-KexiFormManager::KexiFormManager(KexiPart::Part *parent, const char* name)
- : KFormDesigner::FormManager(parent,
+KexiFormManager::KexiFormManager(KexiPart::Part *tqparent, const char* name)
+ : KFormDesigner::FormManager(tqparent,
KFormDesigner::FormManager::HideEventsInPopupMenu |
KFormDesigner::FormManager::SkipFileActions |
KFormDesigner::FormManager::HideSignalSlotConnections
, name)
- , m_part(parent)
+ , m_part(tqparent)
{
m_emitSelectionSignalsUpdatesPropertySet = true;
KexiCustomPropertyFactory::init();
@@ -56,8 +56,8 @@ KAction* KexiFormManager::action( const char* name )
KActionCollection *col = m_part->actionCollectionForMode(Kexi::DesignViewMode);
if (!col)
return 0;
- QCString n( translateName( name ).latin1() );
- KAction *a = col->action(n);
+ TQCString n( translateName( name ).latin1() );
+ KAction *a = col->action(n.data());
if (a)
return a;
KexiDBForm *dbform;
@@ -67,10 +67,10 @@ KAction* KexiFormManager::action( const char* name )
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
if (!formViewWidget)
return 0;
- return formViewWidget->parentDialog()->mainWin()->actionCollection()->action(n);
+ return formViewWidget->tqparentDialog()->mainWin()->actionCollection()->action(n.data());
}
KexiFormView* KexiFormManager::activeFormViewWidget() const
@@ -82,7 +82,7 @@ KexiFormView* KexiFormManager::activeFormViewWidget() const
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return 0;
- return dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ return dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
}
void KexiFormManager::enableAction( const char* name, bool enable )
@@ -90,12 +90,12 @@ void KexiFormManager::enableAction( const char* name, bool enable )
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget)
return;
-// if (QString(name)=="layout_menu")
+// if (TQString(name)=="tqlayout_menu")
// kdDebug() << "!!!!!!!!!!! " << enable << endl;
formViewWidget->setAvailable(translateName( name ).latin1(), enable);
}
-void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& name)
+void KexiFormManager::setFormDataSource(const TQCString& mime, const TQCString& name)
{
if (!activeForm())
return;
@@ -105,14 +105,14 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
// setPropertyValueInDesignMode(formWidget, "dataSource", name);
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", name);
propValues.insert("dataSourceMimeType", mime);
KFormDesigner::CommandGroup *group
- = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").arg(name), propertySet());
+ = new KFormDesigner::CommandGroup(i18n("Set Form's Data Source to \"%1\"").tqarg(name.data()), propertySet());
propertySet()->createPropertyCommandsInDesignMode(formWidget, propValues, group, true /*addToActiveForm*/);
}
@@ -120,17 +120,17 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
if (activeForm()->selectedWidget() == formWidget) {
//active form is selected: just use properties system
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(name);
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
(*set)["dataSourceMimeType"].setValue(mime);
return;
}
//active form isn't selected: change it's data source and mime type by hand
- QCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
- QCString oldDataSource( formWidget->dataSource().latin1() );
+ TQCString oldDataSourceMimeType( formWidget->dataSourceMimeType() );
+ TQCString oldDataSource( formWidget->dataSource().latin1() );
if (mime!=oldDataSourceMimeType || name!=oldDataSource) {
formWidget->setDataSourceMimeType(mime);
@@ -138,7 +138,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
emit dirty(activeForm(), true);
activeForm()->addCommand(
- new KFormDesigner::PropertyCommand(propertySet(), QString(formWidget->name()),
+ new KFormDesigner::PropertyCommand(propertySet(), TQString(formWidget->name()),
oldDataSource, name, "dataSource"),
false );
@@ -149,7 +149,7 @@ void KexiFormManager::setFormDataSource(const QCString& mime, const QCString& na
}*/
}
-void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, const QString& caption,
+void KexiFormManager::setDataSourceFieldOrExpression(const TQString& string, const TQString& caption,
KexiDB::Field::Type type)
{
if (!activeForm())
@@ -159,23 +159,23 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
// return;
KFormDesigner::WidgetPropertySet *set = propertySet();
- if (!set || !set->contains("dataSource"))
+ if (!set || !set->tqcontains("dataSource"))
return;
(*set)["dataSource"].setValue(string);
- if (set->contains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
- if (set->contains("fieldCaptionInternal"))
+ if (set->tqcontains("autoCaption") && (*set)["autoCaption"].value().toBool()) {
+ if (set->tqcontains("fieldCaptionInternal"))
(*set)["fieldCaptionInternal"].setValue(caption);
}
if (//type!=KexiDB::Field::InvalidType &&
- set->contains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
+ set->tqcontains("widgetType") && (*set)["widgetType"].value().toString()=="Auto")
{
- if (set->contains("fieldTypeInternal"))
+ if (set->tqcontains("fieldTypeInternal"))
(*set)["fieldTypeInternal"].setValue(type);
}
-/* QString oldDataSource( dataWidget->dataSource() );
+/* TQString oldDataSource( dataWidget->dataSource() );
if (string!=oldDataSource) {
dataWidget->setDataSource(string);
emit dirty(activeForm(), true);
@@ -184,8 +184,8 @@ void KexiFormManager::setDataSourceFieldOrExpression(const QString& string, cons
}*/
}
-void KexiFormManager::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields)
+void KexiFormManager::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields)
{
KexiFormView* formViewWidget = activeFormViewWidget();
if (!formViewWidget || !formViewWidget->form() || !formViewWidget->form()->activeContainer())
@@ -202,13 +202,13 @@ void KexiFormManager::slotHistoryCommandExecuted()
KexiDBForm* formWidget = dynamic_cast<KexiDBForm*>(activeForm()->widget());
if (!formWidget)
return;
- QPtrListIterator<KCommand> it(group->commands());
+ TQPtrListIterator<KCommand> it(group->commands());
const KFormDesigner::PropertyCommand* pc1 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
++it;
const KFormDesigner::PropertyCommand* pc2 = dynamic_cast<const KFormDesigner::PropertyCommand*>(it.current());
if (pc1 && pc2 && pc1->property()=="dataSource" && pc2->property()=="dataSourceMimeType") {
- const QMap<QCString, QVariant>::const_iterator it1( pc1->oldValues().constBegin() );
- const QMap<QCString, QVariant>::const_iterator it2( pc2->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it1( pc1->oldValues().constBegin() );
+ const TQMap<TQCString, TQVariant>::const_iterator it2( pc2->oldValues().constBegin() );
if (it1.key()==formWidget->name() && it2.key()==formWidget->name())
static_cast<KexiFormPart*>(m_part)->dataSourcePage()->setDataSource(
formWidget->dataSourceMimeType(), formWidget->dataSource().latin1());
@@ -218,15 +218,15 @@ void KexiFormManager::slotHistoryCommandExecuted()
}
/*
-bool KexiFormManager::loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf)
+bool KexiFormManager::loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
FormIO::loadFormFromDom(myform, container, domDoc, &customProperties);
}
-bool KexiFormManager::saveFormToStringInternal(Form *form, QString &dest, int indent)
+bool KexiFormManager::saveFormToStringInternal(Form *form, TQString &dest, int indent)
{
- QMap<QCString,QString> customProperties;
+ TQMap<TQCString,TQString> customProperties;
return KFormDesigner::FormIO::saveFormToString(form, dest, indent, &customProperties);
}
diff --git a/kexi/plugins/forms/kexiformmanager.h b/kexi/plugins/forms/kexiformmanager.h
index 1cc5f0c64..d25cf78e6 100644
--- a/kexi/plugins/forms/kexiformmanager.h
+++ b/kexi/plugins/forms/kexiformmanager.h
@@ -31,9 +31,10 @@ class KexiFormView;
class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFormManager(KexiPart::Part *parent, const char* name = 0);
+ KexiFormManager(KexiPart::Part *tqparent, const char* name = 0);
virtual ~KexiFormManager();
virtual KAction* action( const char* name );
@@ -41,7 +42,7 @@ class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
public slots:
//! Receives signal from KexiDataSourcePage about changed form's data source
- void setFormDataSource(const QCString& mime, const QCString& name);
+ void setFormDataSource(const TQCString& mime, const TQCString& name);
/*! Receives signal from KexiDataSourcePage about changed widget's data source.
This is because we couldn't pass objects like KexiDB::QueryColumnInfo.
@@ -49,34 +50,34 @@ class KEXIFORMUTILS_EXPORT KexiFormManager : public KFormDesigner::FormManager
Also sets following things in KexiDBAutoField:
- caption related to the data source
- data type related to the data source */
- void setDataSourceFieldOrExpression(const QString& string, const QString& caption,
+ void setDataSourceFieldOrExpression(const TQString& string, const TQString& caption,
KexiDB::Field::Type type);
/*! Receives signal from KexiDataSourcePage and inserts autofields onto the current form. */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields);
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields);
protected slots:
void slotHistoryCommandExecuted();
protected:
- inline QString translateName( const char* name ) const;
+ inline TQString translateName( const char* name ) const;
private:
//! Helper: return active form's view widget or 0 if there's no active form having such widget
KexiFormView* activeFormViewWidget() const;
-// virtual bool loadFormFromDomInternal(Form *form, QWidget *container, QDomDocument &inBuf);
-// virtual bool saveFormToStringInternal(Form *form, QString &dest, int indent = 0);
+// virtual bool loadFormFromDomInternal(Form *form, TQWidget *container, TQDomDocument &inBuf);
+// virtual bool saveFormToStringInternal(Form *form, TQString &dest, int indent = 0);
KexiPart::Part* m_part;
};
-QString KexiFormManager::translateName( const char* name ) const
+TQString KexiFormManager::translateName( const char* name ) const
{
- QString n( name );
+ TQString n( name );
//translate to our name space:
- if (n.startsWith("align_") || n.startsWith("adjust_") || n.startsWith("layout_")
+ if (n.startsWith("align_") || n.startsWith("adjust_") || n.startsWith("tqlayout_")
|| n=="format_raise" || n=="format_raise" || n=="taborder" | n=="break_layout")
{
n.prepend("formpart_");
diff --git a/kexi/plugins/forms/kexiformpart.cpp b/kexi/plugins/forms/kexiformpart.cpp
index 8693cb5bc..2486416e2 100644
--- a/kexi/plugins/forms/kexiformpart.cpp
+++ b/kexi/plugins/forms/kexiformpart.cpp
@@ -71,14 +71,14 @@ class KexiFormPart::Private
delete static_cast<KFormDesigner::ObjectTreeView*>(objectTreeView);
delete static_cast<KexiDataSourcePage*>(dataSourcePage);
}
-// QGuardedPtr<KFormDesigner::FormManager> manager;
- QGuardedPtr<KFormDesigner::ObjectTreeView> objectTreeView;
- QGuardedPtr<KexiDataSourcePage> dataSourcePage;
+// TQGuardedPtr<KFormDesigner::FormManager> manager;
+ TQGuardedPtr<KFormDesigner::ObjectTreeView> objectTreeView;
+ TQGuardedPtr<KexiDataSourcePage> dataSourcePage;
KexiDataSourceComboBox *dataSourceCombo;
};
-KexiFormPart::KexiFormPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiFormPart::KexiFormPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d(new Private())
{
// REGISTERED ID:
@@ -102,18 +102,18 @@ KexiFormPart::KexiFormPart(QObject *parent, const char *name, const QStringList
// Create and store a handle to forms' library. Reports will have their own library too.
/* @todo add configuration for supported factory groups */
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
supportedFactoryGroups += "kexi";
static_formsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
formManager, supportedFactoryGroups);
static_formsLibrary->setAdvancedPropertiesVisible(false);
- connect(static_formsLibrary, SIGNAL(widgetCreated(QWidget*)),
- this, SLOT(slotWidgetCreatedByFormsLibrary(QWidget*)));
+ connect(static_formsLibrary, TQT_SIGNAL(widgetCreated(TQWidget*)),
+ this, TQT_SLOT(slotWidgetCreatedByFormsLibrary(TQWidget*)));
- connect(KFormDesigner::FormManager::self()->propertySet(), SIGNAL(widgetPropertyChanged(QWidget *, const QCString &, const QVariant&)),
- this, SLOT(slotPropertyChanged(QWidget *, const QCString &, const QVariant&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(autoTabStopsSet(KFormDesigner::Form*,bool)),
- this, SLOT(slotAutoTabStopsSet(KFormDesigner::Form*,bool)));
+ connect(KFormDesigner::FormManager::self()->propertySet(), TQT_SIGNAL(widgetPropertyChanged(TQWidget *, const TQCString &, const TQVariant&)),
+ this, TQT_SLOT(slotPropertyChanged(TQWidget *, const TQCString &, const TQVariant&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(autoTabStopsSet(KFormDesigner::Form*,bool)),
+ this, TQT_SLOT(slotAutoTabStopsSet(KFormDesigner::Form*,bool)));
}
KexiFormPart::~KexiFormPart()
@@ -143,8 +143,8 @@ void KexiFormPart::initInstanceActions( int mode, KActionCollection *col )
{
if (mode==Kexi::DesignViewMode) {
KFormDesigner::FormManager::self()->createActions(col, 0);
- new KAction(i18n("Edit Tab Order..."), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(editTabOrder()), col, "taborder");
- new KAction(i18n("Adjust Size"), "viewmagfit", KShortcut(0), KFormDesigner::FormManager::self(), SLOT(ajustWidgetSize()), col, "adjust");
+ new KAction(i18n("Edit Tab Order..."), "tab_order", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()), col, "taborder");
+ new KAction(i18n("Adjust Size"), "viewmagfit", KShortcut(0), KFormDesigner::FormManager::self(), TQT_SLOT(ajustWidgetSize()), col, "adjust");
}
//TODO
}
@@ -152,7 +152,7 @@ void KexiFormPart::initInstanceActions( int mode, KActionCollection *col )
void KexiFormPart::initPartActions()
{
-// new KAction(i18n("Show Form UI Code"), "show_form_ui", CTRL+Key_U, m_manager, SLOT(showFormUICode()),
+// new KAction(i18n("Show Form UI Code"), "show_form_ui", CTRL+Key_U, m_manager, TQT_SLOT(showFormUICode()),
// guiClient()->actionCollection(), "show_form_ui");
}
@@ -162,7 +162,7 @@ void KexiFormPart::initInstanceActions()
kapp->config()->setGroup("General");
if (kapp->config()->readBoolEntry("showInternalDebugger", false)) {
new KAction(i18n("Show Form UI Code"), "compfile",
- CTRL+Key_U, KFormDesigner::FormManager::self(), SLOT(showFormUICode()),
+ CTRL+Key_U, KFormDesigner::FormManager::self(), TQT_SLOT(showFormUICode()),
actionCollectionForMode(Kexi::DesignViewMode), "show_form_ui");
}
#endif
@@ -171,7 +171,7 @@ void KexiFormPart::initInstanceActions()
KFormDesigner::FormManager::self()->createActions( library(), col, (KXMLGUIClient*)col->parentGUIClient() ); //guiClient() );
//connect actions provided by widget factories
- connect( col->action("widget_assign_action"), SIGNAL(activated()), this, SLOT(slotAssignAction()));
+ connect( col->action("widget_assign_action"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotAssignAction()));
createSharedAction(Kexi::DesignViewMode, i18n("Clear Widget Contents"), "editclear", 0, "formpart_clear_contents");
createSharedAction(Kexi::DesignViewMode, i18n("Edit Tab Order..."), "tab_order", 0, "formpart_taborder");
@@ -184,23 +184,23 @@ void KexiFormPart::initInstanceActions()
KActionMenu *menu = static_cast<KActionMenu*>(action);
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("&Horizontally"),
- QString::null, 0, "formpart_layout_hbox"));
+ TQString(), 0, "formpart_layout_hbox"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("&Vertically"),
- QString::null, 0, "formpart_layout_vbox"));
+ TQString(), 0, "formpart_layout_vbox"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("In &Grid"),
- QString::null, 0, "formpart_layout_grid"));
+ TQString(), 0, "formpart_layout_grid"));
#ifdef KEXI_SHOW_SPLITTER_WIDGET
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("Horizontally in &Splitter"),
- QString::null, 0, "formpart_layout_hsplitter"));
+ TQString(), 0, "formpart_layout_hsplitter"));
menu->insert( createSharedAction(Kexi::DesignViewMode, i18n("Verti&cally in Splitter"),
- QString::null, 0, "formpart_layout_vsplitter"));
+ TQString(), 0, "formpart_layout_vsplitter"));
#endif
- createSharedAction(Kexi::DesignViewMode, i18n("&Break Layout"), QString::null, 0, "formpart_break_layout");
+ createSharedAction(Kexi::DesignViewMode, i18n("&Break Layout"), TQString(), 0, "formpart_break_layout");
/*
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Horizontally"), QString::null, 0, "formpart_layout_hbox");
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Vertically"), QString::null, 0, "formpart_layout_vbox");
- createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets in &Grid"), QString::null, 0, "formpart_layout_grid");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Horizontally"), TQString(), 0, "formpart_layout_hbox");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets &Vertically"), TQString(), 0, "formpart_layout_vbox");
+ createSharedAction(Kexi::DesignViewMode, i18n("Lay Out Widgets in &Grid"), TQString(), 0, "formpart_layout_grid");
*/
createSharedAction(Kexi::DesignViewMode, i18n("Bring Widget to Front"), "raise", 0, "formpart_format_raise");
createSharedAction(Kexi::DesignViewMode, i18n("Send Widget to Back"), "lower", 0, "formpart_format_lower");
@@ -230,11 +230,11 @@ void KexiFormPart::initInstanceActions()
KexiDialogTempData*
KexiFormPart::createTempData(KexiDialogBase* dialog)
{
- return new KexiFormPart::TempData(dialog);
+ return new KexiFormPart::TempData(TQT_TQOBJECT(dialog));
}
-KexiViewBase* KexiFormPart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiFormPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
Q_UNUSED( viewMode );
@@ -243,60 +243,60 @@ KexiViewBase* KexiFormPart::createView(QWidget *parent, KexiDialogBase* dialog,
if (!win || !win->project() || !win->project()->dbConnection())
return 0;
- KexiFormView *view = new KexiFormView(win, parent, item.name().latin1(),
+ KexiFormView *view = new KexiFormView(win, tqparent, item.name().latin1(),
win->project()->dbConnection() );
return view;
}
void
-KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
+KexiFormPart::generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc)
{
//this form generates a .ui from FieldList list
//basically that is a Label and a LineEdit for each field
- domDoc = QDomDocument("UI");
- QDomElement uiElement = domDoc.createElement("UI");
+ domDoc = TQDomDocument("UI");
+ TQDomElement uiElement = domDoc.createElement("UI");
domDoc.appendChild(uiElement);
uiElement.setAttribute("version", "3.1");
uiElement.setAttribute("stdsetdef", 1);
- QDomElement baseClass = domDoc.createElement("class");
+ TQDomElement baseClass = domDoc.createElement("class");
uiElement.appendChild(baseClass);
- QDomText baseClassV = domDoc.createTextNode("QWidget");
+ TQDomText baseClassV = domDoc.createTextNode(TQWIDGET_OBJECT_NAME_STRING);
baseClass.appendChild(baseClassV);
- QDomElement baseWidget = domDoc.createElement("widget");
- baseWidget.setAttribute("class", "QWidget");
+ TQDomElement baseWidget = domDoc.createElement("widget");
+ baseWidget.setAttribute("class", TQWIDGET_OBJECT_NAME_STRING);
int y=0;
for(unsigned int i=0; i < list->fieldCount(); i++)
{
- QDomElement lclass = domDoc.createElement("widget");
+ TQDomElement lclass = domDoc.createElement("widget");
baseWidget.appendChild(lclass);
- lclass.setAttribute("class", "QLabel");
- QDomElement lNameProperty = domDoc.createElement("property");
+ lclass.setAttribute("class", TQLABEL_OBJECT_NAME_STRING);
+ TQDomElement lNameProperty = domDoc.createElement("property");
lNameProperty.setAttribute("name", "name");
- QDomElement lType = domDoc.createElement("cstring");
- QDomText lClassN = domDoc.createTextNode(QString("l%1").arg(list->field(i)->name()));
+ TQDomElement lType = domDoc.createElement("cstring");
+ TQDomText lClassN = domDoc.createTextNode(TQString("l%1").tqarg(list->field(i)->name()));
lType.appendChild(lClassN);
lNameProperty.appendChild(lType);
lclass.appendChild(lNameProperty);
- QDomElement gNameProperty = domDoc.createElement("property");
+ TQDomElement gNameProperty = domDoc.createElement("property");
gNameProperty.setAttribute("name", "geometry");
- QDomElement lGType = domDoc.createElement("rect");
+ TQDomElement lGType = domDoc.createElement("rect");
- QDomElement lx = domDoc.createElement("x");
- QDomText lxV = domDoc.createTextNode("10");
+ TQDomElement lx = domDoc.createElement("x");
+ TQDomText lxV = domDoc.createTextNode("10");
lx.appendChild(lxV);
- QDomElement ly = domDoc.createElement("y");
- QDomText lyV = domDoc.createTextNode(QString::number(y + 10));
+ TQDomElement ly = domDoc.createElement("y");
+ TQDomText lyV = domDoc.createTextNode(TQString::number(y + 10));
ly.appendChild(lyV);
- QDomElement lWidth = domDoc.createElement("width");
- QDomText lWidthV = domDoc.createTextNode("100");
+ TQDomElement lWidth = domDoc.createElement("width");
+ TQDomText lWidthV = domDoc.createTextNode("100");
lWidth.appendChild(lWidthV);
- QDomElement lHeight = domDoc.createElement("height");
- QDomText lHeightV = domDoc.createTextNode("20");
+ TQDomElement lHeight = domDoc.createElement("height");
+ TQDomText lHeightV = domDoc.createTextNode("20");
lHeight.appendChild(lHeightV);
lGType.appendChild(lx);
@@ -307,10 +307,10 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
gNameProperty.appendChild(lGType);
lclass.appendChild(gNameProperty);
- QDomElement tNameProperty = domDoc.createElement("property");
+ TQDomElement tNameProperty = domDoc.createElement("property");
tNameProperty.setAttribute("name", "text");
- QDomElement lTType = domDoc.createElement("string");
- QDomText lTextV = domDoc.createTextNode(list->field(i)->name());
+ TQDomElement lTType = domDoc.createElement("string");
+ TQDomText lTextV = domDoc.createTextNode(list->field(i)->name());
lTType.appendChild(lTextV);
tNameProperty.appendChild(lTType);
lclass.appendChild(tNameProperty);
@@ -319,32 +319,32 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
///line edit!
- QDomElement vclass = domDoc.createElement("widget");
+ TQDomElement vclass = domDoc.createElement("widget");
baseWidget.appendChild(vclass);
vclass.setAttribute("class", "KLineEdit");
- QDomElement vNameProperty = domDoc.createElement("property");
+ TQDomElement vNameProperty = domDoc.createElement("property");
vNameProperty.setAttribute("name", "name");
- QDomElement vType = domDoc.createElement("cstring");
- QDomText vClassN = domDoc.createTextNode(list->field(i)->name());
+ TQDomElement vType = domDoc.createElement("cstring");
+ TQDomText vClassN = domDoc.createTextNode(list->field(i)->name());
vType.appendChild(vClassN);
vNameProperty.appendChild(vType);
vclass.appendChild(vNameProperty);
- QDomElement vgNameProperty = domDoc.createElement("property");
+ TQDomElement vgNameProperty = domDoc.createElement("property");
vgNameProperty.setAttribute("name", "geometry");
- QDomElement vGType = domDoc.createElement("rect");
+ TQDomElement vGType = domDoc.createElement("rect");
- QDomElement vx = domDoc.createElement("x");
- QDomText vxV = domDoc.createTextNode("110");
+ TQDomElement vx = domDoc.createElement("x");
+ TQDomText vxV = domDoc.createTextNode("110");
vx.appendChild(vxV);
- QDomElement vy = domDoc.createElement("y");
- QDomText vyV = domDoc.createTextNode(QString::number(y + 10));
+ TQDomElement vy = domDoc.createElement("y");
+ TQDomText vyV = domDoc.createTextNode(TQString::number(y + 10));
vy.appendChild(vyV);
- QDomElement vWidth = domDoc.createElement("width");
- QDomText vWidthV = domDoc.createTextNode("200");
+ TQDomElement vWidth = domDoc.createElement("width");
+ TQDomText vWidthV = domDoc.createTextNode("200");
vWidth.appendChild(vWidthV);
- QDomElement vHeight = domDoc.createElement("height");
- QDomText vHeightV = domDoc.createTextNode("20");
+ TQDomElement vHeight = domDoc.createElement("height");
+ TQDomText vHeightV = domDoc.createTextNode("20");
vHeight.appendChild(vHeightV);
vGType.appendChild(vx);
@@ -358,29 +358,29 @@ KexiFormPart::generateForm(KexiDB::FieldList *list, QDomDocument &domDoc)
y += 20;
}
- QDomElement lNameProperty = domDoc.createElement("property");
+ TQDomElement lNameProperty = domDoc.createElement("property");
lNameProperty.setAttribute("name", "name");
- QDomElement lType = domDoc.createElement("cstring");
- QDomText lClassN = domDoc.createTextNode("DBForm");
+ TQDomElement lType = domDoc.createElement("cstring");
+ TQDomText lClassN = domDoc.createTextNode("DBForm");
lType.appendChild(lClassN);
lNameProperty.appendChild(lType);
baseWidget.appendChild(lNameProperty);
- QDomElement wNameProperty = domDoc.createElement("property");
+ TQDomElement wNameProperty = domDoc.createElement("property");
wNameProperty.setAttribute("name", "geometry");
- QDomElement wGType = domDoc.createElement("rect");
+ TQDomElement wGType = domDoc.createElement("rect");
- QDomElement wx = domDoc.createElement("x");
- QDomText wxV = domDoc.createTextNode("0");
+ TQDomElement wx = domDoc.createElement("x");
+ TQDomText wxV = domDoc.createTextNode("0");
wx.appendChild(wxV);
- QDomElement wy = domDoc.createElement("y");
- QDomText wyV = domDoc.createTextNode("0");
+ TQDomElement wy = domDoc.createElement("y");
+ TQDomText wyV = domDoc.createTextNode("0");
wy.appendChild(wyV);
- QDomElement wWidth = domDoc.createElement("width");
- QDomText wWidthV = domDoc.createTextNode("340");
+ TQDomElement wWidth = domDoc.createElement("width");
+ TQDomText wWidthV = domDoc.createTextNode("340");
wWidth.appendChild(wWidthV);
- QDomElement wHeight = domDoc.createElement("height");
- QDomText wHeightV = domDoc.createTextNode(QString::number(y + 30));
+ TQDomElement wHeight = domDoc.createElement("height");
+ TQDomText wHeightV = domDoc.createTextNode(TQString::number(y + 30));
wHeight.appendChild(wHeightV);
wGType.appendChild(wx);
@@ -400,7 +400,7 @@ void KexiFormPart::slotAutoTabStopsSet(KFormDesigner::Form *form, bool set)
KoProperty::Property &p = (*KFormDesigner::FormManager::self()->propertySet())["autoTabStops"];
if (!p.isNull())
- p.setValue(QVariant(set, 4));
+ p.setValue(TQVariant(set, 4));
}
void KexiFormPart::slotAssignAction()
@@ -424,15 +424,15 @@ void KexiFormPart::slotAssignAction()
KexiFormScrollView *scrollViewWidget = dynamic_cast<KexiFormScrollView*>(dbform->dataAwareObject());
if (!scrollViewWidget)
return;
- KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->parent());
+ KexiFormView* formViewWidget = dynamic_cast<KexiFormView*>(scrollViewWidget->tqparent());
if (!formViewWidget)
return;
- KexiMainWindow * mainWin = formViewWidget->parentDialog()->mainWin();
+ KexiMainWindow * mainWin = formViewWidget->tqparentDialog()->mainWin();
KexiActionSelectionDialog dlg(mainWin, dbform, data,
propSet->property("name").value().toCString());
- if(dlg.exec() == QDialog::Accepted) {
+ if(dlg.exec() == TQDialog::Accepted) {
data = dlg.currentAction();
//update property value
propSet->property("onClickAction").setValue(data.string);
@@ -440,8 +440,8 @@ void KexiFormPart::slotAssignAction()
}
}
-QString
-KexiFormPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiFormPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -453,21 +453,21 @@ KexiFormPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) c
}
void
-KexiFormPart::slotPropertyChanged(QWidget *w, const QCString &name, const QVariant &value)
+KexiFormPart::slotPropertyChanged(TQWidget *w, const TQCString &name, const TQVariant &value)
{
Q_UNUSED( w );
if (!KFormDesigner::FormManager::self()->activeForm())
return;
if (name == "autoTabStops") {
- //QWidget *w = KFormDesigner::FormManager::self()->activeForm()->selectedWidget();
+ //TQWidget *w = KFormDesigner::FormManager::self()->activeForm()->selectedWidget();
//update autoTabStops setting at KFD::Form level
KFormDesigner::FormManager::self()->activeForm()->setAutoTabStops( value.toBool() );
}
if (KFormDesigner::FormManager::self()->activeForm()->widget() && name == "geometry") {
//fall back to sizeInternal property....
- if (KFormDesigner::FormManager::self()->propertySet()->contains("sizeInternal"))
- KFormDesigner::FormManager::self()->propertySet()->property("sizeInternal").setValue(value.toRect().size());
+ if (KFormDesigner::FormManager::self()->propertySet()->tqcontains("sizeInternal"))
+ KFormDesigner::FormManager::self()->propertySet()->property("sizeInternal").setValue(TQSize(value.toRect().size()));
}
}
@@ -488,14 +488,14 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow*
d->objectTreeView = new KFormDesigner::ObjectTreeView(0, "KexiFormPart:ObjectTreeView");
KFormDesigner::FormManager::self()->setObjectTreeView(d->objectTreeView); //important: assign to manager
d->dataSourcePage = new KexiDataSourcePage(0, "dataSourcePage");
- connect(d->dataSourcePage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)),
- mainWin, SLOT(highlightObject(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)),
- KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)),
- KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type)));
- connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)),
- KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)),
+ mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type)));
+ connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));
}
KexiProject *prj = mainWin->project();
@@ -508,28 +508,28 @@ void KexiFormPart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow*
tab->setTabToolTip( d->objectTreeView, i18n("Widgets"));
}
-void KexiFormPart::slotWidgetCreatedByFormsLibrary(QWidget* widget)
+void KexiFormPart::slotWidgetCreatedByFormsLibrary(TQWidget* widget)
{
- QStrList signalNames(widget->metaObject()->signalNames());
+ TQStrList signalNames(widget->tqmetaObject()->signalNames());
if (!signalNames.isEmpty()) {
- const char *handleDragMoveEventSignal = "handleDragMoveEvent(QDragMoveEvent*)";
- const char *handleDropEventSignal = "handleDropEvent(QDropEvent*)";
+ const char *handleDragMoveEventSignal = "handleDragMoveEvent(TQDragMoveEvent*)";
+ const char *handleDropEventSignal = "handleDropEvent(TQDropEvent*)";
- for (QStrListIterator it(signalNames); it.current(); ++it) {
+ for (TQStrListIterator it(signalNames); it.current(); ++it) {
if (0==qstrcmp(it.current(), handleDragMoveEventSignal)) {
kdDebug() << it.current() << endl;
KexiFormView *formView = KexiUtils::findParent<KexiFormView>(widget, "KexiFormView");
if (formView) {
- connect(widget, SIGNAL(handleDragMoveEvent(QDragMoveEvent*)),
- formView, SLOT(slotHandleDragMoveEvent(QDragMoveEvent*)));
+ connect(widget, TQT_SIGNAL(handleDragMoveEvent(TQDragMoveEvent*)),
+ formView, TQT_SLOT(slotHandleDragMoveEvent(TQDragMoveEvent*)));
}
}
else if (0==qstrcmp(it.current(), handleDropEventSignal)) {
kdDebug() << it.current() << endl;
KexiFormView *formView = KexiUtils::findParent<KexiFormView>(widget, "KexiFormView");
if (formView) {
- connect(widget, SIGNAL(handleDropEvent(QDropEvent*)),
- formView, SLOT(slotHandleDropEvent(QDropEvent*)));
+ connect(widget, TQT_SIGNAL(handleDropEvent(TQDropEvent*)),
+ formView, TQT_SLOT(slotHandleDropEvent(TQDropEvent*)));
}
}
}
@@ -538,8 +538,8 @@ void KexiFormPart::slotWidgetCreatedByFormsLibrary(QWidget* widget)
//----------------
-KexiFormPart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiFormPart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
{
}
diff --git a/kexi/plugins/forms/kexiformpart.h b/kexi/plugins/forms/kexiformpart.h
index 1ddbab533..df5c6b534 100644
--- a/kexi/plugins/forms/kexiformpart.h
+++ b/kexi/plugins/forms/kexiformpart.h
@@ -22,8 +22,8 @@
#ifndef KEXIFORMPART_H
#define KEXIFORMPART_H
-#include <qdom.h>
-#include <qcstring.h>
+#include <tqdom.h>
+#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -49,9 +49,10 @@ class KexiDataSourcePage;
class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFormPart(QObject *parent, const char *name, const QStringList &);
+ KexiFormPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiFormPart();
//! \return a pointer to Forms Widget Library.
@@ -59,33 +60,33 @@ class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
KexiDataSourcePage* dataSourcePage() const;
- void generateForm(KexiDB::FieldList *list, QDomDocument &domDoc);
+ void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc);
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
~TempData();
- QGuardedPtr<KFormDesigner::Form> form;
- QGuardedPtr<KFormDesigner::Form> previewForm;
- QString tempForm;
- QPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
+ TQGuardedPtr<KFormDesigner::Form> form;
+ TQGuardedPtr<KFormDesigner::Form> previewForm;
+ TQString tempForm;
+ TQPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
int resizeMode; //!< form's window's resize mode -one of KexiFormView::ResizeMode items
//! Used in KexiFormView::setUnsavedLocalBLOBs()
- QMap<QWidget*, KexiBLOBBuffer::Id_t> unsavedLocalBLOBs;
+ TQMap<TQWidget*, KexiBLOBBuffer::Id_t> unsavedLocalBLOBs;
//! Used when loading a form from (temporary) XML in Data View
//! to get unsaved blobs collected at design mode.
- QMap<QCString, KexiBLOBBuffer::Id_t> unsavedLocalBLOBsByName;
+ TQMap<TQCString, KexiBLOBBuffer::Id_t> unsavedLocalBLOBsByName;
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();
@@ -96,8 +97,8 @@ class KEXIFORMUTILS_EXPORT KexiFormPart : public KexiPart::Part
protected slots:
void slotAutoTabStopsSet(KFormDesigner::Form *form, bool set);
void slotAssignAction();
- void slotPropertyChanged(QWidget *widget, const QCString &name, const QVariant &value);
- void slotWidgetCreatedByFormsLibrary(QWidget* widget);
+ void slotPropertyChanged(TQWidget *widget, const TQCString &name, const TQVariant &value);
+ void slotWidgetCreatedByFormsLibrary(TQWidget* widget);
private:
class Private;
diff --git a/kexi/plugins/forms/kexiformscrollview.cpp b/kexi/plugins/forms/kexiformscrollview.cpp
index 351a1e3ea..2ddcb123c 100644
--- a/kexi/plugins/forms/kexiformscrollview.cpp
+++ b/kexi/plugins/forms/kexiformscrollview.cpp
@@ -30,8 +30,8 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-KexiFormScrollView::KexiFormScrollView(QWidget *parent, bool preview)
- : KexiScrollView(parent, preview)
+KexiFormScrollView::KexiFormScrollView(TQWidget *tqparent, bool preview)
+ : KexiScrollView(tqparent, preview)
, KexiRecordNavigatorHandler()
, KexiSharedActionClient()
, KexiDataAwareObjectInterface()
@@ -49,7 +49,7 @@ KexiFormScrollView::KexiFormScrollView(QWidget *parent, bool preview)
// recordNavigator()->showEditingIndicator(true);
}
- connect(this, SIGNAL(resizingStarted()), this, SLOT(slotResizingStarted()));
+ connect(this, TQT_SIGNAL(resizingStarted()), this, TQT_SLOT(slotResizingStarted()));
m_popupMenu = new KPopupMenu(this, "contextMenu");
@@ -71,7 +71,7 @@ KexiFormScrollView::show()
#if 0 //moved to KexiFormView, OK?
//now get resize mode settings for entire form
if (m_preview) {
- KexiFormView* fv = dynamic_cast<KexiFormView*>(parent());
+ KexiFormView* fv = dynamic_cast<KexiFormView*>(tqparent());
int resizeMode = fv ? fv->resizeMode() : KexiFormView::ResizeAuto;
if (resizeMode == KexiFormView::ResizeAuto)
setResizePolicy(AutoOneFit);
@@ -150,14 +150,14 @@ void KexiFormScrollView::moveToFirstRecordRequested()
selectFirstRow();
}
-void KexiFormScrollView::clearColumnsInternal(bool repaint)
+void KexiFormScrollView::clearColumnsInternal(bool tqrepaint)
{
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int width)
+void KexiFormScrollView::addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int width)
{
Q_UNUSED( caption );
Q_UNUSED( description );
@@ -197,7 +197,7 @@ void KexiFormScrollView::updateGUIAfterSorting()
//! @todo
}
-void KexiFormScrollView::createEditor(int row, int col, const QString& addText,
+void KexiFormScrollView::createEditor(int row, int col, const TQString& addText,
bool removeOld)
{
Q_UNUSED( row );
@@ -238,7 +238,7 @@ void KexiFormScrollView::createEditor(int row, int col, const QString& addText,
updateWidgetContentsSize();
//refr. current and next row
// updateContents(columnPos(0), rowPos(row), viewport()->width(), d->rowHeight*2);
-//js: warning this breaks behaviour (cursor is skipping, etc.): qApp->processEvents(500);
+//js: warning this breaks behaviour (cursor is skipping, etc.): tqApp->processEvents(500);
// ensureVisible(columnPos(m_curCol), rowPos(row+1)+d->rowHeight-1, columnWidth(m_curCol), d->rowHeight);
// m_verticalHeader->setOffset(contentsY());
@@ -288,9 +288,9 @@ KexiDataItemInterface *KexiFormScrollView::editor( int col, bool ignoreMissingEd
return 0;
}
editor->hide();
- connect(editor,SIGNAL(editRequested()),this,SLOT(slotEditRequested()));
- connect(editor,SIGNAL(cancelRequested()),this,SLOT(cancelEditor()));
- connect(editor,SIGNAL(acceptRequested()),this,SLOT(acceptEditor()));
+ connect(editor,TQT_SIGNAL(editRequested()),this,TQT_SLOT(slotEditRequested()));
+ connect(editor,TQT_SIGNAL(cancelRequested()),this,TQT_SLOT(cancelEditor()));
+ connect(editor,TQT_SIGNAL(acceptRequested()),this,TQT_SLOT(acceptEditor()));
editor->resize(columnWidth(col)-1, rowHeight()-1);
editor->installEventFilter(this);
@@ -349,7 +349,7 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item)
}
/*void KexiFormScrollView::slotAboutToDeleteRow(KexiTableItem& item,
- KexiDB::ResultInfo* result, bool repaint)
+ KexiDB::ResultInfo* result, bool tqrepaint)
{
//! @todo
}*/
@@ -359,22 +359,22 @@ void KexiFormScrollView::slotRowRepaintRequested(KexiTableItem& item)
//! @todo
}*/
-void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool repaint)
+void KexiFormScrollView::slotRowInserted(KexiTableItem *item, bool tqrepaint)
{
Q_UNUSED( item );
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool repaint)
+void KexiFormScrollView::slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint)
{
Q_UNUSED( item );
Q_UNUSED( row );
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
//! @todo
}
-void KexiFormScrollView::slotRowsDeleted( const QValueList<int> & )
+void KexiFormScrollView::slotRowsDeleted( const TQValueList<int> & )
{
//! @todo
}
@@ -394,23 +394,23 @@ int KexiFormScrollView::columns() const
KexiFormDataItemInterface *item = dynamic_cast<KexiFormDataItemInterface*>(dbFormWidget()->orderedDataAwareWidgets()->at( col ));
if (!item)
return -1;
- KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+ KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
return it!=m_fieldNumbersForDataItems.constEnd() ? it.data() : -1;
}*/
bool KexiFormScrollView::columnEditable(int col)
{
kexipluginsdbg << "KexiFormScrollView::columnEditable(" << col << ")" << endl;
- foreach_list (QPtrListIterator<KexiFormDataItemInterface>, it, m_dataItems) {
- kexipluginsdbg << (dynamic_cast<QWidget*>(it.current()) ? dynamic_cast<QWidget*>(it.current())->name() : "" )
+ foreach_list (TQPtrListIterator<KexiFormDataItemInterface>, it, m_dataItems) {
+ kexipluginsdbg << (dynamic_cast<TQWidget*>(it.current()) ? dynamic_cast<TQWidget*>(it.current())->name() : "" )
<< " " << it.current()->dataSource() << endl;
}
kexipluginsdbg << "-- focus widgets --" << endl;
- foreach_list (QPtrListIterator<QWidget>, it, *dbFormWidget()->orderedFocusWidgets()) {
+ foreach_list (TQPtrListIterator<TQWidget>, it, *dbFormWidget()->orderedFocusWidgets()) {
kexipluginsdbg << it.current()->name() << endl;
}
kexipluginsdbg << "-- data-aware widgets --" << endl;
- foreach_list (QPtrListIterator<QWidget>, it, *dbFormWidget()->orderedDataAwareWidgets()) {
+ foreach_list (TQPtrListIterator<TQWidget>, it, *dbFormWidget()->orderedDataAwareWidgets()) {
kexipluginsdbg << it.current()->name() << endl;
}
@@ -421,7 +421,7 @@ bool KexiFormScrollView::columnEditable(int col)
if (!item || item->isReadOnly())
return false;
-// KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+// KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
// return KexiDataAwareObjectInterface::columnEditable( it!=m_fieldNumbersForDataItems.constEnd() ? it.data() : -1 );
return KexiDataAwareObjectInterface::columnEditable( col );
}
@@ -432,9 +432,9 @@ void KexiFormScrollView::valueChanged(KexiDataItemInterface* item)
return;
//only signal start editing when no row editing was started already
kexipluginsdbg << "** KexiFormScrollView::valueChanged(): editedItem="
- << (dbFormWidget()->editedItem ? dbFormWidget()->editedItem->value().toString() : QString::null)
+ << (dbFormWidget()->editedItem ? dbFormWidget()->editedItem->value().toString() : TQString())
<< ", "
- << (item ? item->value().toString() : QString::null)
+ << (item ? item->value().toString() : TQString())
<< endl;
if (dbFormWidget()->editedItem!=item) {
kexipluginsdbg << "**>>> dbFormWidget()->editedItem = dynamic_cast<KexiFormDataItemInterface*>(item)" << endl;
@@ -444,7 +444,7 @@ void KexiFormScrollView::valueChanged(KexiDataItemInterface* item)
fillDuplicatedDataItems(dynamic_cast<KexiFormDataItemInterface*>(item), item->value());
//value changed: clear 'default value' mode (e.g. a blue italic text)
- dynamic_cast<KexiFormDataItemInterface*>(item)->setDisplayDefaultValue(dynamic_cast<QWidget*>(item), false);
+ dynamic_cast<KexiFormDataItemInterface*>(item)->setDisplayDefaultValue(dynamic_cast<TQWidget*>(item), false);
}
bool KexiFormScrollView::cursorAtNewRow() const
@@ -497,7 +497,7 @@ bool KexiFormScrollView::cancelEditor()
const bool displayDefaultValue = shouldDisplayDefaultValueForItem(itemIface);
// now disable/enable "display default value" if needed (do it after setValue(), before setValue() turns it off)
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
fillDuplicatedDataItems(itemIface, m_editor->value());
@@ -507,17 +507,17 @@ bool KexiFormScrollView::cancelEditor()
void KexiFormScrollView::updateAfterCancelRowEdit()
{
- for (QPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
- if (dynamic_cast<QWidget*>(it.current())) {
+ for (TQPtrListIterator<KexiFormDataItemInterface> it(m_dataItems); it.current(); ++it) {
+ if (dynamic_cast<TQWidget*>(it.current())) {
kexipluginsdbg << "KexiFormScrollView::updateAfterCancelRowEdit(): "
- << dynamic_cast<QWidget*>(it.current())->className() << " "
- << dynamic_cast<QWidget*>(it.current())->name() << endl;
+ << dynamic_cast<TQWidget*>(it.current())->className() << " "
+ << dynamic_cast<TQWidget*>(it.current())->name() << endl;
}
KexiFormDataItemInterface *itemIface = it.current();
const bool displayDefaultValue = shouldDisplayDefaultValueForItem(itemIface);
itemIface->undoChanges();
if (itemIface->hasDisplayedDefaultValue() != displayDefaultValue)
- itemIface->setDisplayDefaultValue( dynamic_cast<QWidget*>(itemIface), displayDefaultValue );
+ itemIface->setDisplayDefaultValue( dynamic_cast<TQWidget*>(itemIface), displayDefaultValue );
}
recordNavigator()->showEditingIndicator(false);
dbFormWidget()->editedItem = 0;
@@ -549,15 +549,15 @@ void KexiFormScrollView::refreshContentsSize()
}
}
-void KexiFormScrollView::handleDataWidgetAction(const QString& actionName)
+void KexiFormScrollView::handleDataWidgetAction(const TQString& actionName)
{
- QWidget *w = focusWidget();
+ TQWidget *w = tqfocusWidget();
KexiFormDataItemInterface *item = 0;
while (w) {
item = dynamic_cast<KexiFormDataItemInterface*>(w);
if (item)
break;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
if (item)
item->handleAction(actionName);
diff --git a/kexi/plugins/forms/kexiformscrollview.h b/kexi/plugins/forms/kexiformscrollview.h
index 123157613..cf2731d13 100644
--- a/kexi/plugins/forms/kexiformscrollview.h
+++ b/kexi/plugins/forms/kexiformscrollview.h
@@ -47,10 +47,11 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
public KexiFormEventHandler
{
Q_OBJECT
+ TQ_OBJECT
KEXI_DATAAWAREOBJECTINTERFACE
public:
- KexiFormScrollView(QWidget *parent, bool preview);
+ KexiFormScrollView(TQWidget *tqparent, bool preview);
virtual ~KexiFormScrollView();
void setForm(KFormDesigner::Form *form) { m_form = form; }
@@ -78,7 +79,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
dbFormWidget()->orderedDataAwareWidgets()->at( col ));
if (!item)
return -1;
- KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.find( item ));
+ KexiFormDataItemInterfaceToIntMap::ConstIterator it(m_fieldNumbersForDataItems.tqfind( item ));
return it!=m_fieldNumbersForDataItems.constEnd() ? (int)it.data() : -1;
}
@@ -93,7 +94,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual int lastVisibleRow() const;
/*! \return vertical scrollbar. Implemented for KexiDataAwareObjectInterface. */
- virtual QScrollBar* verticalScrollBar() const { return KexiScrollView::verticalScrollBar(); }
+ virtual TQScrollBar* verticalScrollBar() const { return KexiScrollView::verticalScrollBar(); }
public slots:
/*! Reimplemented to update resize policy. */
@@ -141,7 +142,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
signals:
virtual void itemChanged(KexiTableItem *, int row, int col);
- virtual void itemChanged(KexiTableItem *, int row, int col, QVariant oldValue);
+ virtual void itemChanged(KexiTableItem *, int row, int col, TQVariant oldValue);
virtual void itemDeleteRequest(KexiTableItem *, int row, int col);
virtual void currentItemDeleteRequest();
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode(); //!< does nothing
@@ -161,19 +162,19 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual void slotRowRepaintRequested(KexiTableItem& item);
//! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
- virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
- { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); }
+ virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); }
- //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
+ //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed.
virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); }
- //! Handles KexiTableViewData::rowInserted() signal to repaint when needed.
- virtual void slotRowInserted(KexiTableItem *item, bool repaint);
+ //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed.
+ virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint);
//! Like above, not db-aware version
- virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint);
+ virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint);
- virtual void slotRowsDeleted( const QValueList<int> & );
+ virtual void slotRowsDeleted( const TQValueList<int> & );
virtual void slotDataDestroying() { KexiDataAwareObjectInterface::slotDataDestroying(); }
@@ -192,11 +193,11 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
protected:
//! Implementation for KexiDataAwareObjectInterface
- virtual void clearColumnsInternal(bool repaint);
+ virtual void clearColumnsInternal(bool tqrepaint);
//! Implementation for KexiDataAwareObjectInterface
- virtual void addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int width);
+ virtual void addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int width);
//! Implementation for KexiDataAwareObjectInterface
virtual int currentLocalSortingOrder() const;
@@ -214,7 +215,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
virtual void updateGUIAfterSorting();
//! Implementation for KexiDataAwareObjectInterface
- virtual void createEditor(int row, int col, const QString& addText = QString::null,
+ virtual void createEditor(int row, int col, const TQString& addText = TQString(),
bool removeOld = false);
//! Implementation for KexiDataAwareObjectInterface
@@ -240,12 +241,12 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
/*! Implementation for KexiDataAwareObjectInterface
Implementation for KexiDataAwareObjectInterface
- Updates widget's contents size e.g. using QScrollView::resizeContents(). */
+ Updates widget's contents size e.g. using TQScrollView::resizeContents(). */
virtual void updateWidgetContentsSize();
/*! Implementation for KexiDataAwareObjectInterface
Updates scrollbars of the widget.
- QScrollView::updateScrollbars() will be usually called here. */
+ TQScrollView::updateScrollbars() will be usually called here. */
virtual void updateWidgetScrollBars();
KexiDBForm* dbFormWidget() const;
@@ -281,7 +282,7 @@ class KEXIFORMUTILS_EXPORT KexiFormScrollView :
/*! @internal
Used to invoke copy/paste/cut etc. actions at the focused widget's level. */
- void handleDataWidgetAction(const QString& actionName);
+ void handleDataWidgetAction(const TQString& actionName);
/*! @internal */
bool shouldDisplayDefaultValueForItem(KexiFormDataItemInterface* itemIface) const;
diff --git a/kexi/plugins/forms/kexiformview.cpp b/kexi/plugins/forms/kexiformview.cpp
index 7e52e5b6e..9a14a0c92 100644
--- a/kexi/plugins/forms/kexiformview.cpp
+++ b/kexi/plugins/forms/kexiformview.cpp
@@ -20,8 +20,8 @@
#include "kexiformview.h"
-#include <qobjectlist.h>
-#include <qfileinfo.h>
+#include <tqobjectlist.h>
+#include <tqfileinfo.h>
#include <formeditor/form.h>
#include <formeditor/formIO.h>
@@ -60,9 +60,9 @@
//! @todo #define KEXI_SHOW_SPLITTER_WIDGET
-KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
+KexiFormView::KexiFormView(KexiMainWindow *mainWin, TQWidget *tqparent,
const char *name, bool /*dbAware*/)
- : KexiDataAwareView( mainWin, parent, name )
+ : KexiDataAwareView( mainWin, tqparent, name )
, m_propertySet(0)
, m_resizeMode(KexiFormView::ResizeDefault)
, m_query(0)
@@ -72,7 +72,7 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
{
m_delayedFormContentsResizeOnShow = 0;
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiFormScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -81,8 +81,8 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
// m_scrollView->show();
m_dbform = new KexiDBForm(m_scrollView->viewport(), m_scrollView, name/*, conn*/);
-// m_dbform->resize( m_scrollView->viewport()->size() - QSize(20, 20) );
-// m_dbform->resize(QSize(400, 300));
+// m_dbform->resize( m_scrollView->viewport()->size() - TQSize(20, 20) );
+// m_dbform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_dbform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -90,68 +90,68 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->recordNavigator()->setRecordHandler( m_scrollView );
- m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->palette().active().background());
-//moved to formmanager connect(formPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ m_scrollView->viewport()->setPaletteBackgroundColor(m_dbform->tqpalette().active().background());
+//moved to formmanager connect(formPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
}
else
{
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const QCString&)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const QCString&)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form *, bool)),
- this, SLOT(slotDirty(KFormDesigner::Form *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set*, bool, const TQCString&)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set*, bool, const TQCString&)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
- connect(m_dbform, SIGNAL(handleDragMoveEvent(QDragMoveEvent*)),
- this, SLOT(slotHandleDragMoveEvent(QDragMoveEvent*)));
- connect(m_dbform, SIGNAL(handleDropEvent(QDropEvent*)),
- this, SLOT(slotHandleDropEvent(QDropEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDragMoveEvent(TQDragMoveEvent*)),
+ this, TQT_SLOT(slotHandleDragMoveEvent(TQDragMoveEvent*)));
+ connect(m_dbform, TQT_SIGNAL(handleDropEvent(TQDropEvent*)),
+ this, TQT_SLOT(slotHandleDropEvent(TQDropEvent*)));
// action stuff
- plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), SLOT(editTabOrder()));
- plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()));
-//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), SLOT(editFormPixmapCollection()));
-//TODO plugSharedAction("formpart_connections", formPart()->manager(), SLOT(editConnections()));
-
- plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), SLOT(copyWidget()));
- plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), SLOT(cutWidget()));
- plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), SLOT(pasteWidget()));
- plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), SLOT(deleteWidget()));
- plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), SLOT(selectAll()));
- plugSharedAction("formpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
+ plugSharedAction("formpart_taborder", KFormDesigner::FormManager::self(), TQT_SLOT(editTabOrder()));
+ plugSharedAction("formpart_adjust_size", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()));
+//TODO plugSharedAction("formpart_pixmap_collection", formPart()->manager(), TQT_SLOT(editFormPixmapCollection()));
+//TODO plugSharedAction("formpart_connections", formPart()->manager(), TQT_SLOT(editConnections()));
+
+ plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()));
+ plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()));
+ plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()));
+ plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()));
+ plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()));
+ plugSharedAction("formpart_clear_contents", KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()));
+ plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), TQT_SLOT(redo()));
plugSharedAction("formpart_layout_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), SLOT(layoutHBox()) );
- plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), SLOT(layoutVBox()) );
- plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), SLOT(layoutGrid()) );
+ plugSharedAction("formpart_layout_hbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHBox()) );
+ plugSharedAction("formpart_layout_vbox", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVBox()) );
+ plugSharedAction("formpart_layout_grid", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutGrid()) );
#ifdef KEXI_SHOW_SPLITTER_WIDGET
- plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), SLOT(layoutHSplitter()) );
- plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), SLOT(layoutVSplitter()) );
+ plugSharedAction("formpart_layout_hsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutHSplitter()) );
+ plugSharedAction("formpart_layout_vsplitter", KFormDesigner::FormManager::self(), TQT_SLOT(tqlayoutVSplitter()) );
#endif
- plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), SLOT(breakLayout()) );
+ plugSharedAction("formpart_break_layout", KFormDesigner::FormManager::self(), TQT_SLOT(breakLayout()) );
- plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ plugSharedAction("formpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("formpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("other_widgets_menu", KFormDesigner::FormManager::self(), 0 );
setAvailable("other_widgets_menu", true);
plugSharedAction("formpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("formpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("formpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("formpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("formpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("formpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("formpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
-
- plugSharedAction("format_font", KFormDesigner::FormManager::self(), SLOT(changeFont()) );
+ plugSharedAction("formpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("formpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("formpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("formpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("formpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("formpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
+
+ plugSharedAction("format_font", KFormDesigner::FormManager::self(), TQT_SLOT(changeFont()) );
}
initForm();
@@ -159,15 +159,15 @@ KexiFormView::KexiFormView(KexiMainWindow *mainWin, QWidget *parent,
KexiDataAwareView::init( m_scrollView, m_scrollView, m_scrollView,
/* skip data-awarness if design mode */ viewMode()==Kexi::DesignViewMode );
- connect(this, SIGNAL(focus(bool)), this, SLOT(slotFocus(bool)));
+ connect(this, TQT_SIGNAL(focus(bool)), this, TQT_SLOT(slotFocus(bool)));
/// @todo skip this if ther're no borders
-// m_dbform->resize( m_dbform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_dbform->resize( m_dbform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiFormView::~KexiFormView()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -184,7 +184,7 @@ void
KexiFormView::deleteQuery()
{
if (m_cursor) {
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->deleteCursor(m_cursor);
m_cursor = 0;
}
@@ -225,17 +225,17 @@ KexiFormView::initForm()
if (viewMode()==Kexi::DesignViewMode) {
//we want to be informed about executed commands
- connect(form()->commandHistory(), SIGNAL(commandExecuted()),
- KFormDesigner::FormManager::self(), SLOT(slotHistoryCommandExecuted()));
+ connect(form()->commandHistory(), TQT_SIGNAL(commandExecuted()),
+ KFormDesigner::FormManager::self(), TQT_SLOT(slotHistoryCommandExecuted()));
}
- const bool newForm = parentDialog()->id() < 0;
+ const bool newForm = tqparentDialog()->id() < 0;
KexiDB::FieldList *fields = 0;
if (newForm) {
// Show the form wizard if this is a new Form
#ifndef NO_DSWIZARD
- KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (QWidget*)mainWin(), "datasource_wizard");
+ KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (TQWidget*)mainWin(), "datasource_wizard");
if(!w->exec())
fields = 0;
else
@@ -246,7 +246,7 @@ KexiFormView::initForm()
if(fields)
{
- QDomDocument dom;
+ TQDomDocument dom;
formPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_dbform, dom);
//! @todo handle errors
@@ -267,8 +267,8 @@ KexiFormView::initForm()
m_scrollView->setForm(form());
// m_dbform->updateTabStopsOrder(form());
-// QSize s = m_dbform->size();
-// QApplication::sendPostedEvents();
+// TQSize s = m_dbform->size();
+// TQApplication::sendPostedEvents();
// m_scrollView->resize( s );
// m_dbform->resize(s);
m_scrollView->refreshContentsSize();
@@ -294,9 +294,9 @@ void KexiFormView::updateAutoFieldsDataSource()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -323,9 +323,9 @@ void KexiFormView::updateValuesForSubproperties()
//-inherit captions
//-inherit data types
//(this data has not been stored in the form)
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(
conn, dataSourceString.latin1(), dataSourceMimeTypeString=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query())
@@ -339,22 +339,22 @@ void KexiFormView::updateValuesForSubproperties()
KFormDesigner::WidgetWithSubpropertiesInterface* subpropIface
= dynamic_cast<KFormDesigner::WidgetWithSubpropertiesInterface*>( it.current()->widget() );
if (subpropIface && subpropIface->subwidget() && it.current()->subproperties() ) {
- QWidget *subwidget = subpropIface->subwidget();
- QMap<QString, QVariant>* subprops = it.current()->subproperties();
- for (QMapConstIterator<QString, QVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
+ TQWidget *subwidget = subpropIface->subwidget();
+ TQMap<TQString, TQVariant>* subprops = it.current()->subproperties();
+ for (TQMapConstIterator<TQString, TQVariant> subpropIt = subprops->constBegin(); subpropIt!=subprops->constEnd(); ++subpropIt) {
kexipluginsdbg << "KexiFormView::loadForm(): delayed setting of the subproperty: widget="
<< it.current()->widget()->name() << " prop=" << subpropIt.key() << " val=" << subpropIt.data() << endl;
- const int count = subwidget->metaObject()->findProperty(subpropIt.key().latin1(), true);
- const QMetaProperty *meta = count!=-1 ? subwidget->metaObject()->property(count, true) : 0;
+ const int count = subwidget->tqmetaObject()->tqfindProperty(subpropIt.key().latin1(), true);
+ const TQMetaProperty *meta = count!=-1 ? subwidget->tqmetaObject()->property(count, true) : 0;
if (meta) {
// Special case: the property value of type enum (set) but is saved as a string list,
// not as int, so we need to translate it to int. It's been created as such
- // by FormIO::readPropertyValue(). Example: "alignment" property.
- if (meta->isSetType() && subpropIt.data().type()==QVariant::StringList) {
- QStrList keys;
- const QStringList list( subpropIt.data().toStringList() );
- for (QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ // by FormIO::readPropertyValue(). Example: "tqalignment" property.
+ if (meta->isSetType() && subpropIt.data().type()==TQVariant::StringList) {
+ TQStrList keys;
+ const TQStringList list( subpropIt.data().toStringList() );
+ for (TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
keys.append((*it).latin1());
subwidget->setProperty( subpropIt.key().latin1(), meta->keysToValue(keys) );
}
@@ -369,19 +369,19 @@ void KexiFormView::updateValuesForSubproperties()
//! Used in KexiFormView::loadForm()
static void setUnsavedBLOBIdsForDataViewMode(
- QWidget* widget, const QMap<QCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
+ TQWidget* widget, const TQMap<TQCString, KexiBLOBBuffer::Id_t>& unsavedLocalBLOBsByName)
{
- if (-1 != widget->metaObject()->findProperty("pixmapId")) {
+ if (-1 != widget->tqmetaObject()->tqfindProperty("pixmapId")) {
const KexiBLOBBuffer::Id_t blobID = unsavedLocalBLOBsByName[ widget->name() ];
if (blobID > 0)
- widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)blobID);
+ widget->setProperty("pixmapId", (uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)blobID);
}
- const QObjectList *list = widget->children();
- if (!list)
+ const TQObjectList list = widget->childrenListObject();
+ if (list.isEmpty())
return;
- for (QObjectListIterator it(*list); it.current(); ++it) {
- if (dynamic_cast<QWidget*>(it.current()))
- setUnsavedBLOBIdsForDataViewMode(dynamic_cast<QWidget*>(it.current()), unsavedLocalBLOBsByName);
+ for (TQObjectListIterator it(list); it.current(); ++it) {
+ if (dynamic_cast<TQWidget*>(it.current()))
+ setUnsavedBLOBIdsForDataViewMode(dynamic_cast<TQWidget*>(it.current()), unsavedLocalBLOBsByName);
}
}
@@ -390,7 +390,7 @@ KexiFormView::loadForm()
{
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiFormView::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiFormView::loadForm() Loading the form with id : " << tqparentDialog()->id() << endl;
// If we are previewing the Form, use the tempData instead of the form stored in the db
if(viewMode()==Kexi::DataViewMode && !tempData()->tempForm.isNull() )
{
@@ -402,7 +402,7 @@ KexiFormView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_dbform, data);
@@ -414,9 +414,9 @@ KexiFormView::loadForm()
}
void
-KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const QCString& propertyToSelect)
+KexiFormView::slotPropertySetSwitched(KoProperty::Set *set, bool forceReload, const TQCString& propertyToSelect)
{
-// if (set && parentDialog()!=parentDialog()->mainWin()->currentDialog())
+// if (set && tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog())
if (form() != KFormDesigner::FormManager::self()->activeForm())
return; //this is not the current form view
m_propertySet = set;
@@ -441,7 +441,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
else {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
}
@@ -454,7 +454,7 @@ KexiFormView::beforeSwitchTo(int mode, bool &dontStore)
//collect blobs from design mode by name for use in data view mode
temp->unsavedLocalBLOBsByName.clear();
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = temp->unsavedLocalBLOBs.constBegin();
it!=temp->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key())
@@ -470,8 +470,8 @@ tristate
KexiFormView::afterSwitchFrom(int mode)
{
if (mode == 0 || mode == Kexi::DesignViewMode) {
- if (parentDialog()->neverSaved()) {
- m_dbform->resize(QSize(400, 300));
+ if (tqparentDialog()->neverSaved()) {
+ m_dbform->resize(TQSize(400, 300));
m_scrollView->refreshContentsSizeLater(true,true);
//m_delayedFormContentsResizeOnShow = false;
}
@@ -521,16 +521,16 @@ KexiFormView::afterSwitchFrom(int mode)
initDataSource();
//handle events for this form
- m_scrollView->setMainWidgetForEventHandling(parentDialog()->mainWin(), m_dbform);
+ m_scrollView->setMainWidgetForEventHandling(tqparentDialog()->mainWin(), m_dbform);
//set focus on 1st focusable widget which has valid dataSource property set
if (!m_dbform->orderedFocusWidgets()->isEmpty()) {
-// QWidget *www = focusWidget();
- //if (Kexi::hasParent(this, qApp->focusWidget())) {
- KexiUtils::unsetFocusWithReason(qApp->focusWidget(), QFocusEvent::Tab);
+// TQWidget *www = tqfocusWidget();
+ //if (Kexi::hasParent(this, tqApp->tqfocusWidget())) {
+ KexiUtils::unsetFocusWithReason(tqApp->tqfocusWidget(), TQFocusEvent::Tab);
//}
- QPtrListIterator<QWidget> it(*m_dbform->orderedFocusWidgets());
+ TQPtrListIterator<TQWidget> it(*m_dbform->orderedFocusWidgets());
for (;it.current(); ++it) {
KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>(it.current());
if (iface)
@@ -545,7 +545,7 @@ KexiFormView::afterSwitchFrom(int mode)
it.toFirst();
it.current()->setFocus();
- KexiUtils::setFocusWithReason(it.current(), QFocusEvent::Tab);
+ KexiUtils::setFocusWithReason(it.current(), TQFocusEvent::Tab);
m_setFocusInternalOnce = it.current();
}
@@ -555,7 +555,7 @@ KexiFormView::afterSwitchFrom(int mode)
//dirty only if it's a new object
if (mode == 0)
- setDirty( parentDialog()->partItem()->neverSaved() );
+ setDirty( tqparentDialog()->partItem()->neverSaved() );
if (mode==Kexi::DataViewMode && viewMode()==Kexi::DesignViewMode) {
// slotPropertySetSwitched
@@ -568,8 +568,8 @@ KexiFormView::afterSwitchFrom(int mode)
void KexiFormView::initDataSource()
{
deleteQuery();
- QString dataSourceString( m_dbform->dataSource() );
- QCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
+ TQString dataSourceString( m_dbform->dataSource() );
+ TQCString dataSourceMimeTypeString( m_dbform->dataSourceMimeType() );
//! @todo also handle anonymous (not stored) queries provided as statements here
bool ok = !dataSourceString.isEmpty();
@@ -581,7 +581,7 @@ void KexiFormView::initDataSource()
KexiDB::TableSchema *tableSchema = 0;
KexiDB::Connection *conn = 0;
- QStringList sources;
+ TQStringList sources;
bool forceReadOnlyDataSource = false;
if (ok) {
@@ -590,7 +590,7 @@ void KexiFormView::initDataSource()
//collect all data-aware widgets and create query schema
m_scrollView->setMainDataSourceWidget(m_dbform);
sources = m_scrollView->usedDataSources();
- conn = parentDialog()->mainWin()->project()->dbConnection();
+ conn = tqparentDialog()->mainWin()->project()->dbConnection();
if (dataSourceMimeTypeString.isEmpty() /*table type is the default*/
|| dataSourceMimeTypeString=="kexi/table")
{
@@ -627,7 +627,7 @@ void KexiFormView::initDataSource()
}
}
- QDict<char> invalidSources(997);
+ TQDict<char> invalidSources(997);
if (ok) {
KexiDB::IndexSchema *pkey = tableSchema ? tableSchema->primaryKey() : 0;
if (pkey) {
@@ -639,10 +639,10 @@ void KexiFormView::initDataSource()
kexipluginsdbg << "KexiFormView::initDataSource(): sources=" << sources << endl;
uint index = 0;
- for (QStringList::ConstIterator it = sources.constBegin();
+ for (TQStringList::ConstIterator it = sources.constBegin();
it!=sources.constEnd(); ++it, index++) {
/*! @todo add expression support */
- QString fieldName( (*it).lower() );
+ TQString fieldName( (*it).lower() );
//remove "tablename." if it was prepended
if (tableSchema && fieldName.startsWith( tableSchema->name().lower()+"." ))
fieldName = fieldName.mid(tableSchema->name().length()+1);
@@ -673,7 +673,7 @@ void KexiFormView::initDataSource()
else {
KexiDB::debug( m_query->parameters() );
// like in KexiQueryView::executeQuery()
- QValueList<QVariant> params;
+ TQValueList<TQVariant> params;
{
KexiUtils::WaitCursorRemover remover;
params = KexiQueryParameters::getParameters(this, *conn->driver(), *m_query, ok);
@@ -681,7 +681,7 @@ void KexiFormView::initDataSource()
if (ok) //input cancelled
m_cursor = conn->executeQuery( *m_query, params );
}
- m_scrollView->invalidateDataSources( invalidSources, m_query );
+ m_scrollView->tqinvalidateDataSources( invalidSources, m_query );
ok = m_cursor!=0;
}
@@ -730,7 +730,7 @@ KexiFormView::storeNewData(const KexiDB::SchemaData& sdata, bool &cancel)
}
if (!storeData()) {
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( s->id() );
delete s;
return 0;
@@ -742,19 +742,19 @@ tristate
KexiFormView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk);
- kexipluginsdbg << "KexiDBForm::storeData(): " << parentDialog()->partItem()->name()
- << " [" << parentDialog()->id() << "]" << endl;
+ kexipluginsdbg << "KexiDBForm::storeData(): " << tqparentDialog()->partItem()->name()
+ << " [" << tqparentDialog()->id() << "]" << endl;
//-- first, store local BLOBs, so identifiers can be updated
//! @todo remove unused data stored previously
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableSchema *blobsTable = conn->tableSchema("kexi__blobs");
if (!blobsTable) { //compatibility check for older Kexi project versions
//! @todo show message about missing kexi__blobs?
return false;
}
// Not all engines accept passing NULL to PKEY o_id, so we're omitting it.
- QStringList blobsFieldNamesWithoutID(blobsTable->names());
+ TQStringList blobsFieldNamesWithoutID(blobsTable->names());
blobsFieldNamesWithoutID.pop_front();
KexiDB::FieldList *blobsFieldsWithoutID = blobsTable->subList(blobsFieldNamesWithoutID);
@@ -767,9 +767,9 @@ KexiFormView::storeData(bool dontAsk)
}
KexiBLOBBuffer *blobBuf = KexiBLOBBuffer::self();
KexiFormView *designFormView
- = dynamic_cast<KexiFormView*>( parentDialog()->viewForMode(Kexi::DesignViewMode) );
+ = dynamic_cast<KexiFormView*>( tqparentDialog()->viewForMode(Kexi::DesignViewMode) );
if (designFormView) {
- for (QMapConstIterator<QWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
+ for (TQMapConstIterator<TQWidget*, KexiBLOBBuffer::Id_t> it = tempData()->unsavedLocalBLOBs.constBegin();
it!=tempData()->unsavedLocalBLOBs.constEnd(); ++it)
{
if (!it.key()) {
@@ -781,12 +781,12 @@ KexiFormView::storeData(bool dontAsk)
if (!h)
continue; //no BLOB assigned
- QString originalFileName(h.originalFileName());
- QFileInfo fi(originalFileName);
- QString caption(fi.baseName().replace('_', " ").simplifyWhiteSpace());
+ TQString originalFileName(h.originalFileName());
+ TQFileInfo fi(originalFileName);
+ TQString caption(fi.baseName().tqreplace('_', " ").simplifyWhiteSpace());
if (st) {
- *st /* << NO, (pgsql doesn't support this):QVariant()*/ /*id*/
+ *st /* << NO, (pgsql doesn't support this):TQVariant()*/ /*id*/
<< h.data() << originalFileName << caption
<< h.mimeType() << (uint)/*! @todo unsafe */h.folderId();
if (!st->execute()) {
@@ -797,17 +797,17 @@ KexiFormView::storeData(bool dontAsk)
}
delete blobsFieldsWithoutID;
blobsFieldsWithoutID=0;
- const Q_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
- if ((Q_ULLONG)-1 == storedBLOBID) {
+ const TQ_ULLONG storedBLOBID = conn->lastInsertedAutoIncValue("o_id", "kexi__blobs");
+ if ((TQ_ULLONG)-1 == storedBLOBID) {
//! @todo show message?
return false;
}
kexipluginsdbg << " storedDataID=" << storedBLOBID << endl;
- h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in Qt4*/)storedBLOBID);
+ h.setStoredWidthID((KexiBLOBBuffer::Id_t /*unsafe - will be fixed in TQt4*/)storedBLOBID);
//set widget's internal property so it can be saved...
- const QVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
+ const TQVariant oldStoredPixmapId( it.key()->property("storedPixmapId") );
it.key()->setProperty("storedPixmapId",
- QVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by QVariant - will be fixed in Qt4*/)storedBLOBID));
+ TQVariant((uint /* KexiBLOBBuffer::Id_t is unsafe and unsupported by TQVariant - will be fixed in TQt4*/)storedBLOBID));
KFormDesigner::ObjectTreeItem *widgetItem = designFormView->form()->objectTree()->lookup(it.key()->name()); //form()->objectTree()->lookup(it.key()->name());
if (widgetItem)
widgetItem->addModifiedProperty( "storedPixmapId", oldStoredPixmapId );
@@ -817,7 +817,7 @@ KexiFormView::storeData(bool dontAsk)
}
//-- now, save form's XML
- QString data;
+ TQString data;
if (!KFormDesigner::FormIO::saveFormToString(tempData()->form, data))
return false;
if (!storeDataBlock(data))
@@ -826,7 +826,7 @@ KexiFormView::storeData(bool dontAsk)
//all blobs are now saved
tempData()->unsavedLocalBLOBs.clear();
- tempData()->tempForm = QString::null;
+ tempData()->tempForm = TQString();
return true;
}
@@ -860,7 +860,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
setAvailable("formpart_format_raise", true);
setAvailable("formpart_format_lower", true);
- // If the widgets selected is a container, we enable layout actions
+ // If the widgets selected is a container, we enable tqlayout actions
if(!multiple)
{
KFormDesigner::ObjectTreeItem *item = f->objectTree()->lookup( f->selectedWidgets()->first()->name() );
@@ -874,7 +874,7 @@ KexiFormView::slotWidgetSelected(KFormDesigner::Form *f, bool multiple)
KFormDesigner::Container *container = f->activeContainer();
setAvailable("formpart_break_layout", container ?
- (container->layoutType() != KFormDesigner::Container::NoLayout) : false );
+ (container->tqlayoutType() != KFormDesigner::Container::NoLayout) : false );
}
void
@@ -890,7 +890,7 @@ KexiFormView::slotFormWidgetSelected(KFormDesigner::Form *f)
setAvailable("formpart_layout_hbox", true);
setAvailable("formpart_layout_vbox", true);
setAvailable("formpart_layout_grid", true);
- setAvailable("formpart_break_layout", (f->toplevelContainer()->layoutType() != KFormDesigner::Container::NoLayout));
+ setAvailable("formpart_break_layout", (f->toplevelContainer()->tqlayoutType() != KFormDesigner::Container::NoLayout));
}
void
@@ -964,22 +964,22 @@ KexiFormView::setRedoEnabled(bool enabled)
}
#endif //0
-QSize
-KexiFormView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiFormView::preferredSizeHint(const TQSize& otherSize)
{
- if (parentDialog()->neverSaved()) {
+ if (tqparentDialog()->neverSaved()) {
//ignore otherSize if possible
-// return KexiViewBase::preferredSizeHint( (parentDialog() && parentDialog()->mdiParent()) ? QSize(10000,10000) : otherSize);
+// return KexiViewBase::preferredSizeHint( (tqparentDialog() && tqparentDialog()->mdiParent()) ? TQSize(10000,10000) : otherSize);
}
return (m_dbform->size()
- +QSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
+ +TQSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
m_scrollView->horizontalScrollBar()->isVisible() ? m_scrollView->horizontalScrollBar()->height()*3/2 : 10))
.expandedTo( KexiViewBase::preferredSizeHint(otherSize) );
}
void
-KexiFormView::resizeEvent( QResizeEvent *e )
+KexiFormView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -991,7 +991,7 @@ KexiFormView::resizeEvent( QResizeEvent *e )
m_scrollView->updateNavPanelGeometry();
if (m_delayedFormContentsResizeOnShow>0) { // && isVisible()) {
m_delayedFormContentsResizeOnShow--;
- m_dbform->resize( e->size() - QSize(30, 30) );
+ m_dbform->resize( e->size() - TQSize(30, 30) );
}
}
@@ -999,19 +999,19 @@ void
KexiFormView::setFocusInternal()
{
if (viewMode() == Kexi::DataViewMode) {
- if (m_dbform->focusWidget()) {
+ if (m_dbform->tqfocusWidget()) {
//better-looking focus
if (m_setFocusInternalOnce) {
- KexiUtils::setFocusWithReason(m_setFocusInternalOnce, QFocusEvent::Other);//Tab);
+ KexiUtils::setFocusWithReason(m_setFocusInternalOnce, TQFocusEvent::Other);//Tab);
m_setFocusInternalOnce = 0;
}
else {
- //ok? SET_FOCUS_USING_REASON(m_dbform->focusWidget(), QFocusEvent::Other);//Tab);
+ //ok? SET_FOCUS_USING_REASON(m_dbform->tqfocusWidget(), TQFocusEvent::Other);//Tab);
}
return;
}
}
- QWidget::setFocus();
+ TQWidget::setFocus();
}
void
@@ -1025,7 +1025,7 @@ KexiFormView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == KexiFormView::ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}
@@ -1042,11 +1042,11 @@ void
KexiFormView::updateDataSourcePage()
{
if (viewMode()==Kexi::DesignViewMode) {
- QCString dataSourceMimeType, dataSource;
+ TQCString dataSourceMimeType, dataSource;
KFormDesigner::WidgetPropertySet *set = KFormDesigner::FormManager::self()->propertySet();
- if (set->contains("dataSourceMimeType"))
+ if (set->tqcontains("dataSourceMimeType"))
dataSourceMimeType = (*set)["dataSourceMimeType"].value().toCString();
- if (set->contains("dataSource"))
+ if (set->tqcontains("dataSource"))
dataSource = (*set)["dataSource"].value().toCString();
formPart()->dataSourcePage()->setDataSource(dataSourceMimeType, dataSource);
@@ -1054,25 +1054,25 @@ KexiFormView::updateDataSourcePage()
}
void
-KexiFormView::slotHandleDragMoveEvent(QDragMoveEvent* e)
+KexiFormView::slotHandleDragMoveEvent(TQDragMoveEvent* e)
{
if (KexiFieldDrag::canDecodeMultiple( e )) {
e->accept(true);
- //dirty: drawRect(QRect( e->pos(), QSize(50, 20)), 2);
+ //dirty: drawRect(TQRect( e->pos(), TQSize(50, 20)), 2);
}
}
void
-KexiFormView::slotHandleDropEvent(QDropEvent* e)
+KexiFormView::slotHandleDropEvent(TQDropEvent* e)
{
- const QWidget *targetContainerWidget = dynamic_cast<const QWidget*>(sender());
+ const TQWidget *targetContainerWidget = dynamic_cast<const TQWidget*>(sender());
KFormDesigner::ObjectTreeItem *targetContainerWidgetItem = targetContainerWidget
? form()->objectTree()->lookup( targetContainerWidget->name() ) : 0;
if (targetContainerWidgetItem && targetContainerWidgetItem->container()
&& KexiFieldDrag::canDecodeMultiple( e ))
{
- QString sourceMimeType, sourceName;
- QStringList fields;
+ TQString sourceMimeType, sourceName;
+ TQStringList fields;
if (!KexiFieldDrag::decodeMultiple( e, sourceMimeType, sourceName, fields ))
return;
insertAutoFields(sourceMimeType, sourceName, fields,
@@ -1081,13 +1081,13 @@ KexiFormView::slotHandleDropEvent(QDropEvent* e)
}
void
-KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, KFormDesigner::Container* targetContainer, const QPoint& _pos)
+KexiFormView::insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, KFormDesigner::Container* targetContainer, const TQPoint& _pos)
{
if (fields.isEmpty())
return;
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
KexiDB::TableOrQuerySchema tableOrQuery(conn, sourceName.latin1(), sourceMimeType=="kexi/table");
if (!tableOrQuery.table() && !tableOrQuery.query()) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such table/query \""
@@ -1095,15 +1095,15 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
return;
}
- QPoint pos(_pos);
+ TQPoint pos(_pos);
//if pos is not specified, compute a new position:
- if (pos==QPoint(-1,-1)) {
+ if (pos==TQPoint(-1,-1)) {
if (m_widgetGeometryForRecentInsertAutoFields.isValid()) {
pos = m_widgetGeometryForRecentInsertAutoFields.bottomLeft()
- + QPoint(0,form()->gridSize());
+ + TQPoint(0,form()->gridSize());
}
else {
- pos = QPoint(40, 40); //start here
+ pos = TQPoint(40, 40); //start here
}
}
@@ -1115,11 +1115,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// KFormDesigner::WidgetList* prevSelection = form()->selectedWidgets();
KFormDesigner::WidgetList widgetsToSelect;
KFormDesigner::CommandGroup *group = new KFormDesigner::CommandGroup(
- fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").arg(fields.count()),
+ fields.count()==1 ? i18n("Insert AutoField widget") : i18n("Insert %1 AutoField widgets").tqarg(fields.count()),
KFormDesigner::FormManager::self()->propertySet()
);
- foreach( QStringList::ConstIterator, it, fields ) {
+ foreach( TQStringList::ConstIterator, it, fields ) {
KexiDB::QueryColumnInfo* column = tableOrQuery.columnInfo(*it);
if (!column) {
kexipluginswarn << "KexiFormView::insertAutoFields(): no such field \""
@@ -1128,11 +1128,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
//! todo add autolabel using field's caption or name
//KFormDesigner::Container *targetContainer;
-/* QWidget* targetContainerWidget = QApplication::widgetAt(pos, true);
+/* TQWidget* targetContainerWidget = TQApplication::widgetAt(pos, true);
while (targetContainerWidget
&& !dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
{
- targetContainerWidget = targetContainerWidget->parentWidget();
+ targetContainerWidget = targetContainerWidget->tqparentWidget();
}
if (dynamic_cast<KFormDesigner::Container*>(targetContainerWidget))
targetContainer = dynamic_cast<KFormDesigner::Container*>(targetContainerWidget);
@@ -1149,14 +1149,14 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(insertCmd, false/*don't exec twice*/);
KFormDesigner::ObjectTreeItem *newWidgetItem
- = form()->objectTree()->dict()->find(insertCmd->widgetName());
+ = form()->objectTree()->dict()->tqfind(insertCmd->widgetName());
KexiDBAutoField* newWidget
= newWidgetItem ? dynamic_cast<KexiDBAutoField*>(newWidgetItem->widget()) : 0;
widgetsToSelect.append(newWidget);
//#if 0
KFormDesigner::CommandGroup *subGroup
= new KFormDesigner::CommandGroup("", KFormDesigner::FormManager::self()->propertySet());
- QMap<QCString, QVariant> propValues;
+ TQMap<TQCString, TQVariant> propValues;
propValues.insert("dataSource", column->aliasOrName());
propValues.insert("fieldTypeInternal", (int)column->field->type());
propValues.insert("fieldCaptionInternal", column->captionOrAliasOrName());
@@ -1173,8 +1173,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
// newWidget->setDataSource(column->aliasOrName());
// newWidget->setFieldTypeInternal((int)column->field->type());
// newWidget->setFieldCaptionInternal(column->captionOrAliasOrName());
- //resize again because autofield's type changed what can lead to changed sizeHint()
-// newWidget->resize(newWidget->sizeHint());
+ //resize again because autofield's type changed what can lead to changed tqsizeHint()
+// newWidget->resize(newWidget->tqsizeHint());
KFormDesigner::WidgetList list;
list.append(newWidget);
KFormDesigner::AdjustSizeCommand *adjustCommand
@@ -1191,10 +1191,10 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
if (widgetsToSelect.last()) {
//resize form if needed
- QRect oldFormRect( m_dbform->geometry() );
- QRect newFormRect( oldFormRect );
- newFormRect.setWidth(QMAX(m_dbform->width(), widgetsToSelect.last()->geometry().right()+1));
- newFormRect.setHeight(QMAX(m_dbform->height(), widgetsToSelect.last()->geometry().bottom()+1));
+ TQRect oldFormRect( m_dbform->tqgeometry() );
+ TQRect newFormRect( oldFormRect );
+ newFormRect.setWidth(TQMAX(m_dbform->width(), widgetsToSelect.last()->tqgeometry().right()+1));
+ newFormRect.setHeight(TQMAX(m_dbform->height(), widgetsToSelect.last()->tqgeometry().bottom()+1));
if (newFormRect != oldFormRect) {
//1. resize by hand
m_dbform->setGeometry( newFormRect );
@@ -1205,8 +1205,8 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
group->addCommand(resizeFormCommand, true/*will be executed on CommandGroup::execute()*/);
}
- //remember geometry of the last inserted widget
- m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->geometry();
+ //remember tqgeometry of the last inserted widget
+ m_widgetGeometryForRecentInsertAutoFields = widgetsToSelect.last()->tqgeometry();
}
//eventually, add entire command group to active form
@@ -1217,11 +1217,11 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
//enable proper REDO usage
group->resetAllowExecuteFlags();
- m_scrollView->repaint();
- m_scrollView->viewport()->repaint();
- m_scrollView->repaintContents();
+ m_scrollView->tqrepaint();
+ m_scrollView->viewport()->tqrepaint();
+ m_scrollView->tqrepaintContents();
m_scrollView->updateContents();
- m_scrollView->clipper()->repaint();
+ m_scrollView->clipper()->tqrepaint();
m_scrollView->refreshContentsSize();
//select all inserted widgets, if multiple
@@ -1236,7 +1236,7 @@ KexiFormView::insertAutoFields(const QString& sourceMimeType, const QString& sou
}
void
-KexiFormView::setUnsavedLocalBLOB(QWidget *widget, KexiBLOBBuffer::Id_t id)
+KexiFormView::setUnsavedLocalBLOB(TQWidget *widget, KexiBLOBBuffer::Id_t id)
{
//! @todo if there already was data assigned, remember it should be dereferenced
if (id==0)
@@ -1264,12 +1264,12 @@ void KexiFormView::updateActions(bool activated)
}*/
/*
-void KexiFormView::parentDialogDetached()
+void KexiFormView::tqparentDialogDetached()
{
m_dbform->updateTabStopsOrder(form());
}
-void KexiFormView::parentDialogAttached(KMdiChildFrm *)
+void KexiFormView::tqparentDialogAttached(KMdiChildFrm *)
{
m_dbform->updateTabStopsOrder(form());
}*/
diff --git a/kexi/plugins/forms/kexiformview.h b/kexi/plugins/forms/kexiformview.h
index 0a7745564..e699afa12 100644
--- a/kexi/plugins/forms/kexiformview.h
+++ b/kexi/plugins/forms/kexiformview.h
@@ -21,7 +21,7 @@
#ifndef KEXIFORMVIEW_H
#define KEXIFORMVIEW_H
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kexiviewbase.h>
#include <widget/kexidataawareview.h>
@@ -55,6 +55,7 @@ namespace KFormDesigner
class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ResizeMode {
@@ -64,14 +65,14 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
NoResize = 2 /*! @todo */
};
-// KexiFormView(KexiMainWindow *win, QWidget *parent, const char *name, KexiDB::Connection *conn);
- KexiFormView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0,
+// KexiFormView(KexiMainWindow *win, TQWidget *tqparent, const char *name, KexiDB::Connection *conn);
+ KexiFormView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0,
bool dbAware = true);
virtual ~KexiFormView();
// KexiDB::Connection* connection() { return m_conn; }
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
int resizeMode() const { return m_resizeMode; }
@@ -89,7 +90,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
Local BLOBs are retrieved KexiBLOBBuffer::self() and stored in "kexi__blobs" 'system' table.
Note that db-aware BLOBs (non local) are not handled this way.
*/
- void setUnsavedLocalBLOB(QWidget *widget, KexiBLOBBuffer::Id_t id);
+ void setUnsavedLocalBLOB(TQWidget *widget, KexiBLOBBuffer::Id_t id);
public slots:
/*! Reimplemented to update resize policy. */
@@ -102,27 +103,27 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
so undo/redo is available for this operation.
If multiple fields are provided, they will be aligned vertically.
- If \a pos is QPoint(-1,-1) (the default), position is computed automatically
+ If \a pos is TQPoint(-1,-1) (the default), position is computed automatically
based on a position last inserted field using this method.
- If this method has not been called yet, position of QPoint(40, 40) will be set.
+ If this method has not been called yet, position of TQPoint(40, 40) will be set.
Called by:
- slotHandleDropEvent() when field(s) are dropped from the data source pane onto the form
- KexiFormManager is a used clicked "Insert fields" button on the data source pane. */
- void insertAutoFields(const QString& sourceMimeType, const QString& sourceName,
- const QStringList& fields, KFormDesigner::Container* targetContainerWidget,
- const QPoint& pos = QPoint(-1,-1));
+ void insertAutoFields(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQStringList& fields, KFormDesigner::Container* targetContainerWidget,
+ const TQPoint& pos = TQPoint(-1,-1));
protected slots:
void slotPropertySetSwitched(KoProperty::Set *b, bool forceReload = false,
- const QCString& propertyToSelect = QCString());
+ const TQCString& propertyToSelect = TQCString());
void slotDirty(KFormDesigner::Form *f, bool isDirty);
void slotFocus(bool in);
- void slotHandleDragMoveEvent(QDragMoveEvent* e);
+ void slotHandleDragMoveEvent(TQDragMoveEvent* e);
//! Handles field(s) dropping from the data source pane onto the form
//! @see insertAutoFields()
- void slotHandleDropEvent(QDropEvent* e);
+ void slotHandleDropEvent(TQDropEvent* e);
//moved to formmanager void slotWidgetSelected(KFormDesigner::Form *form, bool multiple);
//moved to formmanager void slotFormWidgetSelected(KFormDesigner::Form *form);
@@ -140,7 +141,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
virtual tristate storeData(bool dontAsk = false);
KexiFormPart::TempData* tempData() const {
- return dynamic_cast<KexiFormPart::TempData*>(parentDialog()->tempData()); }
+ return dynamic_cast<KexiFormPart::TempData*>(tqparentDialog()->tempData()); }
KexiFormPart* formPart() const { return dynamic_cast<KexiFormPart*>(part()); }
//moved to formmanager void disableWidgetActions();
@@ -158,7 +159,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
//! Used in loadForm()
void updateValuesForSubproperties();
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
void initDataSource();
@@ -195,7 +196,7 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
It is shared between subsequent Data view sessions (just reopened on switch),
but deleted and recreated from scratch when form's "dataSource" property changed
since last form viewing (m_previousDataSourceString is used for that). */
- QString m_previousDataSourceString;
+ TQString m_previousDataSourceString;
int m_resizeMode;
@@ -214,18 +215,18 @@ class KEXIFORMUTILS_EXPORT KexiFormView : public KexiDataAwareView
int m_delayedFormContentsResizeOnShow;
//! Used in setFocusInternal()
- QGuardedPtr<QWidget> m_setFocusInternalOnce;
+ TQGuardedPtr<TQWidget> m_setFocusInternalOnce;
- /*! Stores geometry of widget recently inserted using insertAutoFields() method.
+ /*! Stores tqgeometry of widget recently inserted using insertAutoFields() method.
having this information, we'r eable to compute position for a newly
inserted widget in insertAutoFields() is such position has not been specified.
(the position is specified when a widget is inserted with mouse drag & dropping
but not with clicking of 'Insert fields' button from Data Source pane) */
- QRect m_widgetGeometryForRecentInsertAutoFields;
+ TQRect m_widgetGeometryForRecentInsertAutoFields;
//! Used in setUnsavedLocalBLOBs()
-// QMap<QWidget*, KexiBLOBBuffer::Id_t> m_unsavedLocalBLOBs;
+// TQMap<TQWidget*, KexiBLOBBuffer::Id_t> m_unsavedLocalBLOBs;
};
#endif
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.cpp b/kexi/plugins/forms/widgets/kexidbautofield.cpp
index 36fbdb1a8..4926a3342 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.cpp
+++ b/kexi/plugins/forms/widgets/kexidbautofield.cpp
@@ -21,11 +21,11 @@
#include "kexidbautofield.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qmetaobject.h>
-#include <qapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqmetaobject.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <klocale.h>
@@ -57,13 +57,13 @@ class KexiDBAutoField::Private
//!< of widgetTypeForFieldType() if widgetTypeForFieldType is Auto
WidgetType widgetType_property; //!< provides widget type or Auto
LabelPosition lblPosition;
- QBoxLayout *layout;
- QLabel *label;
- QString caption;
+ TQBoxLayout *tqlayout;
+ TQLabel *label;
+ TQString caption;
KexiDB::Field::Type fieldTypeInternal;
- QString fieldCaptionInternal;
- QColor baseColor; //!< needed because for unbound mode editor==0
- QColor textColor; //!< needed because for unbound mode editor==0
+ TQString fieldCaptionInternal;
+ TQColor baseColor; //!< needed because for unbound mode editor==0
+ TQColor textColor; //!< needed because for unbound mode editor==0
bool autoCaption : 1;
bool focusPolicyChanged : 1;
bool designMode : 1;
@@ -71,9 +71,9 @@ class KexiDBAutoField::Private
//-------------------------------------
-KexiDBAutoField::KexiDBAutoField(const QString &text, WidgetType type, LabelPosition pos,
- QWidget *parent, const char *name, bool designMode)
- : QWidget(parent, name)
+KexiDBAutoField::KexiDBAutoField(const TQString &text, WidgetType type, LabelPosition pos,
+ TQWidget *tqparent, const char *name, bool designMode)
+ : TQWidget(tqparent, name)
, KexiFormDataItemInterface()
, KFormDesigner::DesignTimeDynamicChildWidgetHandler()
, d( new Private() )
@@ -82,14 +82,14 @@ KexiDBAutoField::KexiDBAutoField(const QString &text, WidgetType type, LabelPosi
init(text, type, pos);
}
-KexiDBAutoField::KexiDBAutoField(QWidget *parent, const char *name, bool designMode, LabelPosition pos)
- : QWidget(parent, name)
+KexiDBAutoField::KexiDBAutoField(TQWidget *tqparent, const char *name, bool designMode, LabelPosition pos)
+ : TQWidget(tqparent, name)
, KexiFormDataItemInterface()
, KFormDesigner::DesignTimeDynamicChildWidgetHandler()
, d( new Private() )
{
d->designMode = designMode;
- init(QString::null/*i18n("Auto Field")*/, Auto, pos);
+ init(TQString()/*i18n("Auto Field")*/, Auto, pos);
}
KexiDBAutoField::~KexiDBAutoField()
@@ -101,14 +101,14 @@ KexiDBAutoField::~KexiDBAutoField()
}
void
-KexiDBAutoField::init(const QString &text, WidgetType type, LabelPosition pos)
+KexiDBAutoField::init(const TQString &text, WidgetType type, LabelPosition pos)
{
d->fieldTypeInternal = KexiDB::Field::InvalidType;
- d->layout = 0;
+ d->tqlayout = 0;
m_subwidget = 0;
- d->label = new QLabel(text, this);
+ d->label = new TQLabel(text, this);
d->label->installEventFilter( this );
- //QFontMetrics fm( font() );
+ //TQFontMetrics fm( font() );
//d->label->setFixedWidth( fm.width("This is a test string length") );
d->autoCaption = true;
d->focusPolicyChanged = false;
@@ -116,8 +116,8 @@ KexiDBAutoField::init(const QString &text, WidgetType type, LabelPosition pos)
d->widgetType_property = (type==Auto ? Text : type); //to force "differ" to be true in setWidgetType()
setLabelPosition(pos);
setWidgetType(type);
- d->baseColor = palette().active().base();
- d->textColor = palette().active().text();
+ d->baseColor = tqpalette().active().base();
+ d->textColor = tqpalette().active().text();
}
void
@@ -142,10 +142,10 @@ void
KexiDBAutoField::createEditor()
{
if(m_subwidget) {
- delete (QWidget *)m_subwidget;
+ delete (TQWidget *)m_subwidget;
}
- QWidget *newSubwidget;
+ TQWidget *newSubwidget;
switch( d->widgetType ) {
case Text:
case Double: //! @todo setup validator
@@ -153,19 +153,19 @@ KexiDBAutoField::createEditor()
case Date:
case Time:
case DateTime:
- newSubwidget = new KexiDBLineEdit( this, QCString("KexiDBAutoField_KexiDBLineEdit:")+name() );
+ newSubwidget = new KexiDBLineEdit( this, TQCString("KexiDBAutoField_KexiDBLineEdit:")+name() );
break;
case MultiLineText:
- newSubwidget = new KexiDBTextEdit( this, QCString("KexiDBAutoField_KexiDBTextEdit:")+name() );
+ newSubwidget = new KexiDBTextEdit( this, TQCString("KexiDBAutoField_KexiDBTextEdit:")+name() );
break;
case Boolean:
- newSubwidget = new KexiDBCheckBox(dataSource(), this, QCString("KexiDBAutoField_KexiDBCheckBox:")+name());
+ newSubwidget = new KexiDBCheckBox(dataSource(), this, TQCString("KexiDBAutoField_KexiDBCheckBox:")+name());
break;
case Image:
- newSubwidget = new KexiDBImageBox(d->designMode, this, QCString("KexiDBAutoField_KexiDBImageBox:")+name());
+ newSubwidget = new KexiDBImageBox(d->designMode, this, TQCString("KexiDBAutoField_KexiDBImageBox:")+name());
break;
case ComboBox:
- newSubwidget = new KexiDBComboBox(this, QCString("KexiDBAutoField_KexiDBComboBox:")+name(), d->designMode);
+ newSubwidget = new KexiDBComboBox(this, TQCString("KexiDBAutoField_KexiDBComboBox:")+name(), d->designMode);
break;
default:
newSubwidget = 0;
@@ -176,7 +176,7 @@ KexiDBAutoField::createEditor()
setSubwidget( newSubwidget ); //this will also allow to declare subproperties, see KFormDesigner::WidgetWithSubpropertiesInterface
if(newSubwidget) {
- newSubwidget->setName( QCString("KexiDBAutoField_") + newSubwidget->className() );
+ newSubwidget->setName( TQCString("KexiDBAutoField_") + newSubwidget->className() );
dynamic_cast<KexiDataItemInterface*>(newSubwidget)->setParentDataItemInterface(this);
dynamic_cast<KexiFormDataItemInterface*>(newSubwidget)
->setColumnInfo(columnInfo()); //needed at least by KexiDBImageBox
@@ -190,11 +190,11 @@ KexiDBAutoField::createEditor()
newSubwidget->setFocusPolicy(focusPolicy());
}
else {//if focusPolicy is not changed at top level, inherit it from editor
- QWidget::setFocusPolicy(newSubwidget->focusPolicy());
+ TQWidget::setFocusPolicy(newSubwidget->focusPolicy());
}
setFocusProxy(newSubwidget); //ok?
- if (parentWidget())
- newSubwidget->setPalette( qApp->palette() );
+ if (tqparentWidget())
+ newSubwidget->setPalette( tqApp->palette() );
copyPropertiesToEditor();
// KFormDesigner::installRecursiveEventFilter(newSubwidget, this);
}
@@ -207,12 +207,12 @@ void KexiDBAutoField::copyPropertiesToEditor()
if (m_subwidget) {
// kdDebug() << "KexiDBAutoField::copyPropertiesToEditor(): base col: " << d->baseColor.name() <<
// "; text col: " << d->textColor.name() << endl;
- QPalette p( m_subwidget->palette() );
- p.setColor( QPalette::Active, QColorGroup::Base, d->baseColor );
+ TQPalette p( m_subwidget->palette() );
+ p.setColor( TQPalette::Active, TQColorGroup::Base, d->baseColor );
if(d->widgetType == Boolean)
- p.setColor( QPalette::Active, QColorGroup::Foreground, d->textColor );
+ p.setColor( TQPalette::Active, TQColorGroup::Foreground, d->textColor );
else
- p.setColor( QPalette::Active, QColorGroup::Text, d->textColor );
+ p.setColor( TQPalette::Active, TQColorGroup::Text, d->textColor );
m_subwidget->setPalette(p);
//m_subwidget->setPaletteBackgroundColor( d->baseColor );
}
@@ -222,30 +222,30 @@ void
KexiDBAutoField::setLabelPosition(LabelPosition position)
{
d->lblPosition = position;
- if(d->layout) {
- QBoxLayout *lyr = d->layout;
- d->layout = 0;
+ if(d->tqlayout) {
+ TQBoxLayout *lyr = d->tqlayout;
+ d->tqlayout = 0;
delete lyr;
}
if(m_subwidget)
m_subwidget->show();
- //! \todo support right-to-left layout where positions are inverted
+ //! \todo support right-to-left tqlayout where positions are inverted
if (position==Top || position==Left) {
- int align = d->label->alignment();
+ int align = d->label->tqalignment();
if(position == Top) {
- d->layout = (QBoxLayout*) new QVBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQVBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignTop;
}
else {
- d->layout = (QBoxLayout*) new QHBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
align |= AlignVertical_Mask;
align ^= AlignVertical_Mask;
align |= AlignVCenter;
}
- d->label->setAlignment(align);
+ d->label->tqsetAlignment(align);
if(d->widgetType == Boolean
|| (d->widgetType == Auto && fieldTypeInternal() == KexiDB::Field::InvalidType && !d->designMode))
{
@@ -254,55 +254,55 @@ KexiDBAutoField::setLabelPosition(LabelPosition position)
else {
d->label->show();
}
- d->layout->addWidget(d->label, 0, position == Top ? int(Qt::AlignLeft) : 0);
+ d->tqlayout->addWidget(d->label, 0, position == Top ? int(TQt::AlignLeft) : 0);
if(position == Left && d->widgetType != Boolean)
- d->layout->addSpacing(KexiDBAutoField_SPACING);
- d->layout->addWidget(m_subwidget, 1);
- KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((QWidget*)m_subwidget);
+ d->tqlayout->addSpacing(KexiDBAutoField_SPACING);
+ d->tqlayout->addWidget(m_subwidget, 1);
+ KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
if (subwidgetInterface) {
if (subwidgetInterface->appendStretchRequired(this))
- d->layout->addStretch(0);
+ d->tqlayout->addStretch(0);
if (subwidgetInterface->subwidgetStretchRequired(this)) {
- QSizePolicy sizePolicy( m_subwidget->sizePolicy() );
+ TQSizePolicy sizePolicy( m_subwidget->tqsizePolicy() );
if(position == Left) {
- sizePolicy.setHorData( QSizePolicy::Minimum );
- d->label->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ sizePolicy.setHorData( TQSizePolicy::Minimum );
+ d->label->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
}
else {
- sizePolicy.setVerData( QSizePolicy::Minimum );
- d->label->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ sizePolicy.setVerData( TQSizePolicy::Minimum );
+ d->label->tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
}
- m_subwidget->setSizePolicy(sizePolicy);
+ m_subwidget->tqsetSizePolicy(sizePolicy);
}
}
// if(m_subwidget)
- // m_subwidget->setSizePolicy(...);
+ // m_subwidget->tqsetSizePolicy(...);
}
else {
- d->layout = (QBoxLayout*) new QHBoxLayout(this);
+ d->tqlayout = (TQBoxLayout*) new TQHBoxLayout(this);
d->label->hide();
- d->layout->addWidget(m_subwidget);
+ d->tqlayout->addWidget(m_subwidget);
}
- //a hack to force layout to be refreshed (any better idea for this?)
- resize(size()+QSize(1,0));
- resize(size()-QSize(1,0));
- if (dynamic_cast<KexiDBAutoField*>((QWidget*)m_subwidget)) {
+ //a hack to force tqlayout to be refreshed (any better idea for this?)
+ resize(size()+TQSize(1,0));
+ resize(size()-TQSize(1,0));
+ if (dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)) {
//needed for KexiDBComboBox
- dynamic_cast<KexiDBAutoField*>((QWidget*)m_subwidget)->setLabelPosition(position);
+ dynamic_cast<KexiDBAutoField*>((TQWidget*)m_subwidget)->setLabelPosition(position);
}
}
void
-KexiDBAutoField::setInvalidState( const QString &text )
+KexiDBAutoField::setInvalidState( const TQString &text )
{
- // Widget with an invalid dataSource is just a QLabel
+ // Widget with an invalid dataSource is just a TQLabel
if (d->designMode)
return;
d->widgetType = Auto;
createEditor();
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
if (m_subwidget)
- m_subwidget->setFocusPolicy(QWidget::NoFocus);
+ m_subwidget->setFocusPolicy(TQ_NoFocus);
//! @todo or set this to editor's text?
d->label->setText( text );
}
@@ -310,7 +310,7 @@ KexiDBAutoField::setInvalidState( const QString &text )
bool
KexiDBAutoField::isReadOnly() const
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->isReadOnly();
else
@@ -320,33 +320,33 @@ KexiDBAutoField::isReadOnly() const
void
KexiDBAutoField::setReadOnly( bool readOnly )
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setReadOnly(readOnly);
}
void
-KexiDBAutoField::setValueInternal(const QVariant& add, bool removeOld)
+KexiDBAutoField::setValueInternal(const TQVariant& add, bool removeOld)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setValue(m_origValue, add, removeOld);
// iface->setValueInternal(add, removeOld);
}
-QVariant
+TQVariant
KexiDBAutoField::value()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->value();
- return QVariant();
+ return TQVariant();
}
bool
KexiDBAutoField::valueIsNull()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsNull();
return true;
@@ -355,7 +355,7 @@ KexiDBAutoField::valueIsNull()
bool
KexiDBAutoField::valueIsEmpty()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsEmpty();
return true;
@@ -364,7 +364,7 @@ KexiDBAutoField::valueIsEmpty()
bool
KexiDBAutoField::valueIsValid()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->valueIsValid();
return true;
@@ -373,7 +373,7 @@ KexiDBAutoField::valueIsValid()
bool
KexiDBAutoField::valueChanged()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
kexipluginsdbg << m_origValue << endl;
if(iface)
return iface->valueChanged();
@@ -384,7 +384,7 @@ void
KexiDBAutoField::installListener(KexiDataItemChangesListener* listener)
{
KexiFormDataItemInterface::installListener(listener);
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->installListener(listener);
}
@@ -399,7 +399,7 @@ KexiDBAutoField::LabelPosition KexiDBAutoField::labelPosition() const
return d->lblPosition;
}
-QString KexiDBAutoField::caption() const
+TQString KexiDBAutoField::caption() const
{
return d->caption;
}
@@ -409,12 +409,12 @@ bool KexiDBAutoField::hasAutoCaption() const
return d->autoCaption;
}
-QWidget* KexiDBAutoField::editor() const
+TQWidget* KexiDBAutoField::editor() const
{
return m_subwidget;
}
-QLabel* KexiDBAutoField::label() const
+TQLabel* KexiDBAutoField::label() const
{
return d->label;
}
@@ -424,7 +424,7 @@ int KexiDBAutoField::fieldTypeInternal() const
return d->fieldTypeInternal;
}
-QString KexiDBAutoField::fieldCaptionInternal() const
+TQString KexiDBAutoField::fieldCaptionInternal() const
{
return d->fieldCaptionInternal;
}
@@ -432,7 +432,7 @@ QString KexiDBAutoField::fieldCaptionInternal() const
bool
KexiDBAutoField::cursorAtStart()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->cursorAtStart();
return false;
@@ -441,7 +441,7 @@ KexiDBAutoField::cursorAtStart()
bool
KexiDBAutoField::cursorAtEnd()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
return iface->cursorAtEnd();
return false;
@@ -450,7 +450,7 @@ KexiDBAutoField::cursorAtEnd()
void
KexiDBAutoField::clear()
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->clear();
}
@@ -480,11 +480,11 @@ KexiDBAutoField::setFieldTypeInternal(int kexiDBFieldType)
}
void
-KexiDBAutoField::setFieldCaptionInternal(const QString& text)
+KexiDBAutoField::setFieldCaptionInternal(const TQString& text)
{
d->fieldCaptionInternal = text;
//change text only if autocaption is set and no columnInfo is available
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if((!iface || !iface->columnInfo()) && d->autoCaption) {
changeText(d->fieldCaptionInternal);
}
@@ -522,7 +522,7 @@ KexiDBAutoField::setColumnInfoInternal(KexiDB::QueryColumnInfo* cinfo, KexiDB::Q
// update label's text
changeText((cinfo && d->autoCaption) ? cinfo->captionOrAliasOrName() : d->caption);
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
iface->setColumnInfo(visibleColumnInfo);
}
@@ -564,15 +564,15 @@ KexiDBAutoField::widgetTypeForFieldType(KexiDB::Field::Type type)
}
void
-KexiDBAutoField::changeText(const QString &text, bool beautify)
+KexiDBAutoField::changeText(const TQString &text, bool beautify)
{
- QString realText;
+ TQString realText;
bool unbound = false;
if (d->autoCaption && (d->widgetType==Auto || dataSource().isEmpty())) {
if (d->designMode)
- realText = QString::fromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
+ realText = TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", "(unbound)");
else
- realText = QString::null;
+ realText = TQString();
unbound = true;
}
else {
@@ -584,7 +584,7 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
realText = text[0].upper() + text.mid(1);
if (d->widgetType!=Boolean) {
//! @todo ":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label
-//! @todo support right-to-left layout where position of ":" is inverted
+//! @todo support right-to-left tqlayout where position of ":" is inverted
realText += ": ";
}
}
@@ -594,12 +594,12 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
}
if (unbound)
- d->label->setAlignment( Qt::AlignCenter | Qt::WordBreak );
+ d->label->tqsetAlignment( TQt::AlignCenter | TQt::WordBreak );
else
- d->label->setAlignment( Qt::AlignCenter );
-// QWidget* widgetToAlterForegroundColor;
+ d->label->tqsetAlignment( TQt::AlignCenter );
+// TQWidget* widgetToAlterForegroundColor;
if(d->widgetType == Boolean) {
- static_cast<QCheckBox*>((QWidget*)m_subwidget)->setText(realText);
+ static_cast<TQCheckBox*>((TQWidget*)m_subwidget)->setText(realText);
// widgetToAlterForegroundColor = m_subwidget;
}
else {
@@ -617,7 +617,7 @@ KexiDBAutoField::changeText(const QString &text, bool beautify)
}
void
-KexiDBAutoField::setCaption(const QString &caption)
+KexiDBAutoField::setCaption(const TQString &caption)
{
d->caption = caption;
if(!d->autoCaption && !caption.isEmpty())
@@ -629,7 +629,7 @@ KexiDBAutoField::setAutoCaption(bool autoCaption)
{
d->autoCaption = autoCaption;
if(d->autoCaption) {
- //d->caption = QString::null;
+ //d->caption = TQString();
if(columnInfo()) {
changeText(columnInfo()->captionOrAliasOrName());
}
@@ -642,35 +642,35 @@ KexiDBAutoField::setAutoCaption(bool autoCaption)
}
void
-KexiDBAutoField::setDataSource( const QString &ds ) {
+KexiDBAutoField::setDataSource( const TQString &ds ) {
KexiFormDataItemInterface::setDataSource(ds);
if (ds.isEmpty()) {
setColumnInfo(0);
}
}
-QSize
-KexiDBAutoField::sizeHint() const
+TQSize
+KexiDBAutoField::tqsizeHint() const
{
if (d->lblPosition == NoLabel)
- return m_subwidget ? m_subwidget->sizeHint() : QWidget::sizeHint();
+ return m_subwidget ? m_subwidget->tqsizeHint() : TQWidget::tqsizeHint();
- QSize s1(0,0);
+ TQSize s1(0,0);
if (m_subwidget)
- s1 = m_subwidget->sizeHint();
- QSize s2(d->label->sizeHint());
+ s1 = m_subwidget->tqsizeHint();
+ TQSize s2(d->label->tqsizeHint());
if (d->lblPosition == Top)
- return QSize(QMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height());
+ return TQSize(TQMAX(s1.width(), s2.width()), s1.height()+KexiDBAutoField_SPACING+s2.height());
//left
- return QSize(s1.width()+KexiDBAutoField_SPACING+s2.width(), QMAX(s1.height(), s2.height()));
+ return TQSize(s1.width()+KexiDBAutoField_SPACING+s2.width(), TQMAX(s1.height(), s2.height()));
}
void
-KexiDBAutoField::setFocusPolicy( FocusPolicy policy )
+KexiDBAutoField::setFocusPolicy( TQ_FocusPolicy policy )
{
d->focusPolicyChanged = true;
- QWidget::setFocusPolicy(policy);
+ TQWidget::setFocusPolicy(policy);
d->label->setFocusPolicy(policy);
if (m_subwidget)
m_subwidget->setFocusPolicy(policy);
@@ -682,31 +682,31 @@ KexiDBAutoField::updateInformationAboutUnboundField()
if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty()))
|| (!d->autoCaption && d->caption.isEmpty()) )
{
- d->label->setText( QString::fromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
+ d->label->setText( TQString::tqfromLatin1(name())+" "+i18n("Unbound Auto Field", " (unbound)") );
}
// else
-// d->label->setText( QString::fromLatin1(name())+" "+i18n(" (unbound)") );
+// d->label->setText( TQString::tqfromLatin1(name())+" "+i18n(" (unbound)") );
}
/*void
-KexiDBAutoField::paintEvent( QPaintEvent* pe )
+KexiDBAutoField::paintEvent( TQPaintEvent* pe )
{
- QWidget::paintEvent( pe );
+ TQWidget::paintEvent( pe );
if ( (d->autoCaption && (dataSource().isEmpty() || dataSourceMimeType().isEmpty()))
|| (!d->autoCaption && d->caption.isEmpty()) )
{
- QPainter p(this);
+ TQPainter p(this);
p.setPen( d->label->paletteForegroundColor() );
p.setClipRect(pe->rect());
p.setFont(d->label->font());
- p.drawText(rect(), Qt::AlignLeft | Qt::WordBreak,
- QString::fromLatin1(name())+" "+i18n(" (unbound)"));
+ p.drawText(rect(), TQt::AlignLeft | TQt::WordBreak,
+ TQString::tqfromLatin1(name())+" "+i18n(" (unbound)"));
}
}*/
void
-KexiDBAutoField::paletteChange( const QPalette& oldPal )
+KexiDBAutoField::paletteChange( const TQPalette& oldPal )
{
Q_UNUSED(oldPal);
d->label->setPalette( palette() );
@@ -714,35 +714,35 @@ KexiDBAutoField::paletteChange( const QPalette& oldPal )
void KexiDBAutoField::unsetPalette()
{
- QWidget::unsetPalette();
+ TQWidget::unsetPalette();
}
// ===== methods below are just proxies for the internal editor or label =====
-const QColor & KexiDBAutoField::paletteForegroundColor() const
+const TQColor & KexiDBAutoField::paletteForegroundColor() const
{
return d->textColor;
}
-void KexiDBAutoField::setPaletteForegroundColor( const QColor & color )
+void KexiDBAutoField::setPaletteForegroundColor( const TQColor & color )
{
d->textColor = color;
copyPropertiesToEditor();
}
-const QColor & KexiDBAutoField::paletteBackgroundColor() const
+const TQColor & KexiDBAutoField::paletteBackgroundColor() const
{
return d->baseColor;
}
-void KexiDBAutoField::setPaletteBackgroundColor( const QColor & color )
+void KexiDBAutoField::setPaletteBackgroundColor( const TQColor & color )
{
d->baseColor = color;
copyPropertiesToEditor();
}
-const QColor & KexiDBAutoField::foregroundLabelColor() const
+const TQColor & KexiDBAutoField::foregroundLabelColor() const
{
if(d->widgetType == Boolean)
return paletteForegroundColor();
@@ -750,17 +750,17 @@ const QColor & KexiDBAutoField::foregroundLabelColor() const
return d->label->paletteForegroundColor();
}
-void KexiDBAutoField::setForegroundLabelColor( const QColor & color )
+void KexiDBAutoField::setForegroundLabelColor( const TQColor & color )
{
if(d->widgetType == Boolean)
setPaletteForegroundColor(color);
else {
d->label->setPaletteForegroundColor(color);
- QWidget::setPaletteForegroundColor(color);
+ TQWidget::setPaletteForegroundColor(color);
}
}
-const QColor & KexiDBAutoField::backgroundLabelColor() const
+const TQColor & KexiDBAutoField::backgroundLabelColor() const
{
if(d->widgetType == Boolean)
return paletteBackgroundColor();
@@ -768,76 +768,76 @@ const QColor & KexiDBAutoField::backgroundLabelColor() const
return d->label->paletteBackgroundColor();
}
-void KexiDBAutoField::setBackgroundLabelColor( const QColor & color )
+void KexiDBAutoField::setBackgroundLabelColor( const TQColor & color )
{
if(d->widgetType == Boolean)
setPaletteBackgroundColor(color);
else {
d->label->setPaletteBackgroundColor(color);
- QWidget::setPaletteBackgroundColor(color);
+ TQWidget::setPaletteBackgroundColor(color);
}
// if (m_subwidget)
-// m_subwidget->setPalette( qApp->palette() );
+// m_subwidget->setPalette( tqApp->palette() );
}
-QVariant KexiDBAutoField::property( const char * name ) const
+TQVariant KexiDBAutoField::property( const char * name ) const
{
bool ok;
- QVariant val = KFormDesigner::WidgetWithSubpropertiesInterface::subproperty(name, ok);
+ TQVariant val = KFormDesigner::WidgetWithSubpropertiesInterface::subproperty(name, ok);
if (ok)
return val;
- return QWidget::property(name);
+ return TQWidget::property(name);
}
-bool KexiDBAutoField::setProperty( const char * name, const QVariant & value )
+bool KexiDBAutoField::setProperty( const char * name, const TQVariant & value )
{
bool ok = KFormDesigner::WidgetWithSubpropertiesInterface::setSubproperty(name, value);
if (ok)
return true;
- return QWidget::setProperty(name, value);
+ return TQWidget::setProperty(name, value);
}
-bool KexiDBAutoField::eventFilter( QObject *o, QEvent *e )
+bool KexiDBAutoField::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==d->label && d->label->buddy() && e->type()==QEvent::MouseButtonRelease) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->label) && d->label->buddy() && e->type()==TQEvent::MouseButtonRelease) {
//focus label's buddy when user clicked the label
d->label->buddy()->setFocus();
}
- return QWidget::eventFilter(o, e);
+ return TQWidget::eventFilter(o, e);
}
-void KexiDBAutoField::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiDBAutoField::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
- if (dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget))
- dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget)->setDisplayDefaultValue(m_subwidget, displayDefaultValue);
+ if (dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget))
+ dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget)->setDisplayDefaultValue(m_subwidget, displayDefaultValue);
}
void KexiDBAutoField::moveCursorToEnd()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->moveCursorToEnd();
}
void KexiDBAutoField::moveCursorToStart()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->moveCursorToStart();
}
void KexiDBAutoField::selectAll()
{
- KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((QWidget*)m_subwidget);
+ KexiDataItemInterface *iface = dynamic_cast<KexiDataItemInterface*>((TQWidget*)m_subwidget);
if (iface)
iface->selectAll();
}
-bool KexiDBAutoField::keyPressed(QKeyEvent *ke)
+bool KexiDBAutoField::keyPressed(TQKeyEvent *ke)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if (iface && iface->keyPressed(ke))
return true;
return false;
diff --git a/kexi/plugins/forms/widgets/kexidbautofield.h b/kexi/plugins/forms/widgets/kexidbautofield.h
index 981a05194..f13e701e8 100644
--- a/kexi/plugins/forms/widgets/kexidbautofield.h
+++ b/kexi/plugins/forms/widgets/kexidbautofield.h
@@ -22,39 +22,40 @@
#ifndef KEXIDBAUTOFIELD_H
#define KEXIDBAUTOFIELD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <formeditor/container.h>
#include <formeditor/widgetwithsubpropertiesinterface.h>
#include "kexiformdataiteminterface.h"
-class QBoxLayout;
-class QLabel;
+class TQBoxLayout;
+class TQLabel;
//! Universal "Auto Field" widget for Kexi forms
/*! It acts as a container for most data-aware widgets. */
class KEXIFORMUTILS_EXPORT KexiDBAutoField :
- public QWidget,
+ public TQWidget,
public KexiFormDataItemInterface,
public KFormDesigner::DesignTimeDynamicChildWidgetHandler,
public KFormDesigner::WidgetWithSubpropertiesInterface
{
Q_OBJECT
-//'caption' is uncovered now Q_PROPERTY(QString labelCaption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QString caption READ caption WRITE setCaption DESIGNABLE true)
- Q_OVERRIDE(QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
- Q_OVERRIDE(QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(QColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
- Q_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
- Q_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
- Q_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
+ TQ_OBJECT
+//'caption' is uncovered now TQ_PROPERTY(TQString labelCaption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQString caption READ caption WRITE setCaption DESIGNABLE true)
+ TQ_OVERRIDE(TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_OVERRIDE(TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor foregroundLabelColor READ foregroundLabelColor WRITE setForegroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(TQColor backgroundLabelColor READ backgroundLabelColor WRITE setBackgroundLabelColor DESIGNABLE true RESET unsetPalette)
+ TQ_PROPERTY(bool autoCaption READ hasAutoCaption WRITE setAutoCaption DESIGNABLE true)
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+ TQ_PROPERTY(LabelPosition labelPosition READ labelPosition WRITE setLabelPosition DESIGNABLE true)
+ TQ_PROPERTY(WidgetType widgetType READ widgetType WRITE setWidgetType DESIGNABLE true)
/*internal, for design time only*/
- Q_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
- Q_PROPERTY(QString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(int fieldTypeInternal READ fieldTypeInternal WRITE setFieldTypeInternal DESIGNABLE true STORED false)
+ TQ_PROPERTY(TQString fieldCaptionInternal READ fieldCaptionInternal WRITE setFieldCaptionInternal DESIGNABLE true STORED false)
Q_ENUMS( WidgetType LabelPosition )
public:
@@ -62,24 +63,24 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
MultiLineText, ComboBox, Image };
enum LabelPosition { Left = 300, Top, NoLabel };
- KexiDBAutoField(const QString &text, WidgetType type, LabelPosition pos,
- QWidget *parent = 0, const char *name = 0, bool designMode = true);
- KexiDBAutoField(QWidget *parent = 0, const char *name = 0, bool designMode = true,
+ KexiDBAutoField(const TQString &text, WidgetType type, LabelPosition pos,
+ TQWidget *tqparent = 0, const char *name = 0, bool designMode = true);
+ KexiDBAutoField(TQWidget *tqparent = 0, const char *name = 0, bool designMode = true,
LabelPosition pos = Left);
virtual ~KexiDBAutoField();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual void setDataSource( const QString &ds );
- virtual void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual void setDataSource( const TQString &ds );
+ virtual void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void setInvalidState(const QString& text);
+ virtual void setInvalidState(const TQString& text);
virtual bool isReadOnly() const;
virtual void setReadOnly( bool readOnly );
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
@@ -95,8 +96,8 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
LabelPosition labelPosition() const;
virtual void setLabelPosition(LabelPosition position);
- QString caption() const;
- void setCaption(const QString &caption);
+ TQString caption() const;
+ void setCaption(const TQString &caption);
bool hasAutoCaption() const;
void setAutoCaption(bool autoCaption);
@@ -105,10 +106,10 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
- QWidget* editor() const;
- QLabel* label() const;
+ TQWidget* editor() const;
+ TQLabel* label() const;
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -123,56 +124,56 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
/*! On design time it is not possible to pass a reference to KexiDB::Field object
so we're just providing field caption. Only used when widget type is Auto.
@internal */
- void setFieldCaptionInternal(const QString& text);
+ void setFieldCaptionInternal(const TQString& text);
/*! @internal */
int fieldTypeInternal() const;
/*! @internal */
- QString fieldCaptionInternal() const;
+ TQString fieldCaptionInternal() const;
- virtual QSize sizeHint() const;
- virtual void setFocusPolicy ( FocusPolicy policy );
+ virtual TQSize tqsizeHint() const;
+ virtual void setFocusPolicy ( TQ_FocusPolicy policy );
//! Reimplemented to return internal editor's color.
- const QColor & paletteForegroundColor() const;
+ const TQColor & paletteForegroundColor() const;
//! Reimplemented to set internal editor's color.
- void setPaletteForegroundColor( const QColor & color );
+ void setPaletteForegroundColor( const TQColor & color );
//! Reimplemented to return internal editor's color.
- const QColor & paletteBackgroundColor() const;
+ const TQColor & paletteBackgroundColor() const;
//! Reimplemented to set internal editor's color.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return label's foreground color
- const QColor & foregroundLabelColor() const;
+ const TQColor & foregroundLabelColor() const;
//! Sets label's foreground color
- virtual void setForegroundLabelColor( const QColor & color );
+ virtual void setForegroundLabelColor( const TQColor & color );
//! \return label's background color
- const QColor & backgroundLabelColor() const;
+ const TQColor & backgroundLabelColor() const;
//! Sets label's background color
- virtual void setBackgroundLabelColor( const QColor & color );
+ virtual void setBackgroundLabelColor( const TQColor & color );
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual QVariant property( const char * name ) const;
+ virtual TQVariant property( const char * name ) const;
//! Reimplemented to accept subproperties. @see KFormDesigner::WidgetWithSubpropertiesInterface
- virtual bool setProperty( const char * name, const QVariant & value );
+ virtual bool setProperty( const char * name, const TQVariant & value );
/*! Called by the top-level form on key press event to consume widget-specific shortcuts. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
public slots:
virtual void unsetPalette();
protected slots:
// void slotValueChanged();
- virtual void paletteChange( const QPalette& oldPal );
+ virtual void paletteChange( const TQPalette& oldPal );
//! Implemented for KexiDataItemInterface
virtual void moveCursorToEnd();
@@ -184,17 +185,17 @@ class KEXIFORMUTILS_EXPORT KexiDBAutoField :
virtual void selectAll();
protected:
- virtual void setValueInternal(const QVariant&add, bool removeOld);
- void init(const QString &text, WidgetType type, LabelPosition pos);
+ virtual void setValueInternal(const TQVariant&add, bool removeOld);
+ void init(const TQString &text, WidgetType type, LabelPosition pos);
virtual void createEditor();
- void changeText(const QString &text, bool beautify = true);
-// virtual void paintEvent( QPaintEvent* pe );
+ void changeText(const TQString &text, bool beautify = true);
+// virtual void paintEvent( TQPaintEvent* pe );
void updateInformationAboutUnboundField();
//! internal editor can be created too late, so certain properties should be copied
void copyPropertiesToEditor();
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Used by @ref setLabelPositionInternal(LabelPosition)
void setLabelPositionInternal(LabelPosition position, bool noLabel);
diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
index 6b63851af..c704a985f 100644
--- a/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcheckbox.cpp
@@ -23,29 +23,29 @@
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
-KexiDBCheckBox::KexiDBCheckBox(const QString &text, QWidget *parent, const char *name)
- : QCheckBox(text, parent, name), KexiFormDataItemInterface()
+KexiDBCheckBox::KexiDBCheckBox(const TQString &text, TQWidget *tqparent, const char *name)
+ : TQCheckBox(text, tqparent, name), KexiFormDataItemInterface()
, m_invalidState(false)
, m_tristateChanged(false)
, m_tristate(TristateDefault)
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
updateTristate();
- connect(this, SIGNAL(stateChanged(int)), this, SLOT(slotStateChanged(int)));
+ connect(this, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(slotStateChanged(int)));
}
KexiDBCheckBox::~KexiDBCheckBox()
{
}
-void KexiDBCheckBox::setInvalidState( const QString& displayText )
+void KexiDBCheckBox::setInvalidState( const TQString& displayText )
{
setEnabled(false);
setState(NoChange);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
setText(displayText);
}
@@ -54,7 +54,7 @@ KexiDBCheckBox::setEnabled(bool enabled)
{
if(enabled && m_invalidState)
return;
- QCheckBox::setEnabled(enabled);
+ TQCheckBox::setEnabled(enabled);
}
void
@@ -63,7 +63,7 @@ KexiDBCheckBox::setReadOnly(bool readOnly)
setEnabled(!readOnly);
}
-void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBCheckBox::setValueInternal(const TQVariant &add, bool removeOld)
{
Q_UNUSED(add);
Q_UNUSED(removeOld);
@@ -73,12 +73,12 @@ void KexiDBCheckBox::setValueInternal(const QVariant &add, bool removeOld)
setState( m_origValue.toBool() ? On : Off );
}
-QVariant
+TQVariant
KexiDBCheckBox::value()
{
if (state()==NoChange)
- return QVariant();
- return QVariant(state()==On, 1);
+ return TQVariant();
+ return TQVariant(state()==On, 1);
}
void KexiDBCheckBox::slotStateChanged(int )
@@ -101,7 +101,7 @@ bool KexiDBCheckBox::isReadOnly() const
return !isEnabled();
}
-QWidget*
+TQWidget*
KexiDBCheckBox::widget()
{
return this;
@@ -146,29 +146,29 @@ void KexiDBCheckBox::updateTristate()
{
if (m_tristate == TristateDefault) {
//! @todo the data source may be defined as NOT NULL... thus disallowing NULL state
- QCheckBox::setTristate( !dataSource().isEmpty() );
+ TQCheckBox::setTristate( !dataSource().isEmpty() );
}
else {
- QCheckBox::setTristate( m_tristate == TristateOn );
+ TQCheckBox::setTristate( m_tristate == TristateOn );
}
}
-void KexiDBCheckBox::setDataSource(const QString &ds)
+void KexiDBCheckBox::setDataSource(const TQString &ds)
{
KexiFormDataItemInterface::setDataSource(ds);
updateTristate();
}
-void KexiDBCheckBox::setDisplayDefaultValue(QWidget *widget, bool displayDefaultValue)
+void KexiDBCheckBox::setDisplayDefaultValue(TQWidget *widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
// setFont(params->font);
- QPalette pal(palette());
-// pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
- pal.setColor(QPalette::Active, QColorGroup::Foreground, params->textColor);
+ TQPalette pal(palette());
+// pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
+ pal.setColor(TQPalette::Active, TQColorGroup::Foreground, params->textColor);
setPalette(pal);
}
diff --git a/kexi/plugins/forms/widgets/kexidbcheckbox.h b/kexi/plugins/forms/widgets/kexidbcheckbox.h
index d4a68bf39..8a65f33a0 100644
--- a/kexi/plugins/forms/widgets/kexidbcheckbox.h
+++ b/kexi/plugins/forms/widgets/kexidbcheckbox.h
@@ -22,25 +22,26 @@
#define KexiDBCheckBox_H
#include "kexiformdataiteminterface.h"
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
//! @short A db-aware check box
-class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public TQCheckBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_OVERRIDE( Tristate tristate READ isTristate WRITE setTristate )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OVERRIDE( Tristate tristate READ isTristate WRITE setTristate )
Q_ENUMS( Tristate )
public:
- KexiDBCheckBox(const QString &text, QWidget *parent, const char *name=0);
+ KexiDBCheckBox(const TQString &text, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBCheckBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDat
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -70,24 +71,24 @@ class KEXIFORMUTILS_EXPORT KexiDBCheckBox : public QCheckBox, public KexiFormDat
Tristate isTristate() const;
/*! Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
public slots:
- void setDataSource(const QString &ds);
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ void setDataSource(const TQString &ds);
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotStateChanged(int state);
//! This implementation just disables read only widget
virtual void setReadOnly( bool readOnly );
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
//! \return true in isTristate() == TristateDefault and the widget has bound data source
//! or if isTristate() == TristateOn, else false is returned.
bool isTristateInternal() const;
- //! Updates tristate in QCheckBox itself according to m_tristate.
+ //! Updates tristate in TQCheckBox itself according to m_tristate.
void updateTristate();
private:
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.cpp b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
index 19366a155..a908c2fdb 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.cpp
@@ -25,12 +25,12 @@
#include <kdebug.h>
#include <kapplication.h>
-#include <qmetaobject.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qdrawutil.h>
-#include <qptrdict.h>
-#include <qcursor.h>
+#include <tqmetaobject.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqdrawutil.h>
+#include <tqptrdict.h>
+#include <tqcursor.h>
#include <kexidb/queryschema.h>
#include <widget/tableview/kexicomboboxpopup.h>
@@ -58,11 +58,11 @@ class KexiDBComboBox::Private
}
KexiComboBoxPopup *popup;
- KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for QStyle (because styles use <static_cast>)
- QSize sizeHint; //!< A cache for KexiDBComboBox::sizeHint(),
+ KComboBox *paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle (because styles use <static_cast>)
+ TQSize tqsizeHint; //!< A cache for KexiDBComboBox::tqsizeHint(),
//!< rebuilt by KexiDBComboBox::fontChange() and KexiDBComboBox::styleChange()
KexiDB::QueryColumnInfo* visibleColumnInfo;
- QPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its children (if isEditable is false)
+ TQPtrDict<char> *subWidgetsWithDisabledEvents; //! used to collect subwidget and its tqchildren (if isEditable is false)
bool isEditable : 1; //!< true is the combo box is editable
bool buttonPressed : 1;
bool mouseOver : 1;
@@ -72,13 +72,13 @@ class KexiDBComboBox::Private
//-------------------------------------
-KexiDBComboBox::KexiDBComboBox(QWidget *parent, const char *name, bool designMode)
- : KexiDBAutoField(parent, name, designMode, NoLabel)
+KexiDBComboBox::KexiDBComboBox(TQWidget *tqparent, const char *name, bool designMode)
+ : KexiDBAutoField(tqparent, name, designMode, NoLabel)
, KexiComboBoxBase()
, d(new Private())
{
setMouseTracking(true);
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(TQ_WheelFocus);
installEventFilter(this);
d->designMode = designMode;
d->paintedCombo = new KComboBox(this);
@@ -121,58 +121,58 @@ bool KexiDBComboBox::isEditable() const
return d->isEditable;
}
-void KexiDBComboBox::paintEvent( QPaintEvent * )
+void KexiDBComboBox::paintEvent( TQPaintEvent * )
{
- QPainter p( this );
- QColorGroup cg( palette().active() );
+ TQPainter p( this );
+ TQColorGroup cg( tqpalette().active() );
// if ( hasFocus() )
-// cg.setColor(QColorGroup::Base, cg.highlight());
+// cg.setColor(TQColorGroup::Base, cg.highlight());
// else
- cg.setColor(QColorGroup::Base, paletteBackgroundColor()); //update base color using (reimplemented) bg color
+ cg.setColor(TQColorGroup::Base, paletteBackgroundColor()); //update base color using (reimplemented) bg color
p.setPen(cg.text());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if (d->mouseOver)
- flags |= QStyle::Style_MouseOver;
+ flags |= TQStyle::Style_MouseOver;
if ( width() < 5 || height() < 5 ) {
- qDrawShadePanel( &p, rect(), cg, FALSE, 2, &cg.brush( QColorGroup::Button ) );
+ qDrawShadePanel( &p, rect(), cg, FALSE, 2, &cg.brush( TQColorGroup::Button ) );
return;
}
-//! @todo support reverse layout
-//bool reverse = QApplication::reverseLayout();
- style().drawComplexControl( QStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
- flags, (uint)QStyle::SC_All,
- (d->buttonPressed ? QStyle::SC_ComboBoxArrow : QStyle::SC_None )
+//! @todo support reverse tqlayout
+//bool reverse = TQApplication::reverseLayout();
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, &p, d->paintedCombo /*this*/, rect(), cg,
+ flags, (uint)TQStyle::SC_All,
+ (d->buttonPressed ? TQStyle::SC_ComboBoxArrow : TQStyle::SC_None )
);
if (d->isEditable) {
//if editable, editor paints itself, nothing to do
}
else { //not editable: we need to paint the current item
- QRect editorGeometry( this->editorGeometry() );
+ TQRect editorGeometry( this->editorGeometry() );
if ( hasFocus() ) {
- if (0==qstrcmp(style().name(), "windows")) //a hack
- p.fillRect( editorGeometry, cg.brush( QColorGroup::Highlight ) );
- QRect r( QStyle::visualRect( style().subRect( QStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
- r = QRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget
- style().drawPrimitive( QStyle::PE_FocusRect, &p,
- r, cg, flags | QStyle::Style_FocusAtBorder, QStyleOption(cg.highlight()));
+ if (0==qstrcmp(tqstyle().name(), "windows")) //a hack
+ p.fillRect( editorGeometry, cg.brush( TQColorGroup::Highlight ) );
+ TQRect r( TQStyle::tqvisualRect( tqstyle().subRect( TQStyle::SR_ComboBoxFocusRect, d->paintedCombo ), this ) );
+ r = TQRect(r.left()-1, r.top()-1, r.width()+2, r.height()+2); //enlare by 1 pixel each side to avoid covering by the subwidget
+ tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p,
+ r, cg, flags | TQStyle::Style_FocusAtBorder, TQStyleOption(cg.highlight()));
}
//todo
}
}
-QRect KexiDBComboBox::editorGeometry() const
+TQRect KexiDBComboBox::editorGeometry() const
{
- QRect r( QStyle::visualRect(
- style().querySubControlMetrics(QStyle::CC_ComboBox, d->paintedCombo,
- QStyle::SC_ComboBoxEditField), d->paintedCombo ) );
+ TQRect r( TQStyle::tqvisualRect(
+ tqstyle().querySubControlMetrics(TQStyle::CC_ComboBox, d->paintedCombo,
+ TQStyle::SC_ComboBoxEditField), d->paintedCombo ) );
//if ((height()-r.bottom())<6)
// r.setBottom(height()-6);
@@ -185,20 +185,20 @@ void KexiDBComboBox::createEditor()
if (m_subwidget) {
m_subwidget->setGeometry( editorGeometry() );
if (!d->isEditable) {
- m_subwidget->setCursor(QCursor(Qt::ArrowCursor)); // widgets like listedit have IbeamCursor, we don't want that
-//! @todo Qt4: set transparent background, for now we're setting button color
- QPalette subwidgetPalette( m_subwidget->palette() );
- subwidgetPalette.setColor(QPalette::Active, QColorGroup::Base,
- subwidgetPalette.color(QPalette::Active, QColorGroup::Button));
+ m_subwidget->setCursor(TQCursor(TQt::ArrowCursor)); // widgets like listedit have IbeamCursor, we don't want that
+//! @todo TQt4: set transparent background, for now we're setting button color
+ TQPalette subwidgetPalette( m_subwidget->palette() );
+ subwidgetPalette.setColor(TQPalette::Active, TQColorGroup::Base,
+ subwidgetPalette.color(TQPalette::Active, TQColorGroup::Button));
m_subwidget->setPalette( subwidgetPalette );
if (d->subWidgetsWithDisabledEvents)
d->subWidgetsWithDisabledEvents->clear();
else
- d->subWidgetsWithDisabledEvents = new QPtrDict<char>();
+ d->subWidgetsWithDisabledEvents = new TQPtrDict<char>();
d->subWidgetsWithDisabledEvents->insert(m_subwidget, (char*)1);
m_subwidget->installEventFilter(this);
- QObjectList *l = m_subwidget->queryList( "QWidget" );
- for ( QObjectListIt it( *l ); it.current(); ++it ) {
+ TQObjectList *l = m_subwidget->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for ( TQObjectListIt it( *l ); it.current(); ++it ) {
d->subWidgetsWithDisabledEvents->insert(it.current(), (char*)1);
it.current()->installEventFilter(this);
}
@@ -211,34 +211,34 @@ void KexiDBComboBox::createEditor()
void KexiDBComboBox::setLabelPosition(LabelPosition position)
{
if(m_subwidget) {
- if (-1 != m_subwidget->metaObject()->findProperty("frameShape", true))
- m_subwidget->setProperty("frameShape", QVariant((int)QFrame::NoFrame));
+ if (-1 != m_subwidget->tqmetaObject()->tqfindProperty("frameShape", true))
+ m_subwidget->setProperty("frameShape", TQVariant((int)TQFrame::NoFrame));
m_subwidget->setGeometry( editorGeometry() );
}
-// KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((QWidget*)m_subwidget);
+// KexiSubwidgetInterface *subwidgetInterface = dynamic_cast<KexiSubwidgetInterface*>((TQWidget*)m_subwidget);
// update size policy
// if (subwidgetInterface && subwidgetInterface->subwidgetStretchRequired(this)) {
- QSizePolicy sizePolicy( this->sizePolicy() );
+ TQSizePolicy sizePolicy( this->tqsizePolicy() );
if(position == Left)
- sizePolicy.setHorData( QSizePolicy::Minimum );
+ sizePolicy.setHorData( TQSizePolicy::Minimum );
else
- sizePolicy.setVerData( QSizePolicy::Minimum );
- //m_subwidget->setSizePolicy(sizePolicy);
- setSizePolicy(sizePolicy);
+ sizePolicy.setVerData( TQSizePolicy::Minimum );
+ //m_subwidget->tqsetSizePolicy(sizePolicy);
+ tqsetSizePolicy(sizePolicy);
//}
// }
}
-QRect KexiDBComboBox::buttonGeometry() const
+TQRect KexiDBComboBox::buttonGeometry() const
{
- QRect arrowRect(
- style().querySubControlMetrics( QStyle::CC_ComboBox, d->paintedCombo, QStyle::SC_ComboBoxArrow) );
- arrowRect = QStyle::visualRect(arrowRect, d->paintedCombo);
- arrowRect.setHeight( QMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style
+ TQRect arrowRect(
+ tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox, d->paintedCombo, TQStyle::SC_ComboBoxArrow) );
+ arrowRect = TQStyle::tqvisualRect(arrowRect, d->paintedCombo);
+ arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); // a fix for Motif style
return arrowRect;
}
-bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
+bool KexiDBComboBox::handleMousePressEvent(TQMouseEvent *e)
{
if ( e->button() != Qt::LeftButton || d->designMode )
return true;
@@ -247,19 +247,19 @@ bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
return;
}*/
- if ( /*count() &&*/ ( !isEditable() || buttonGeometry().contains( e->pos() ) ) ) {
+ if ( /*count() &&*/ ( !isEditable() || buttonGeometry().tqcontains( e->pos() ) ) ) {
d->buttonPressed = false;
/* if ( d->usingListBox() ) {
listBox()->blockSignals( TRUE );
- qApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
+ tqApp->sendEvent( listBox(), e ); // trigger the listbox's autoscroll
listBox()->setCurrentItem(d->current);
listBox()->blockSignals( FALSE );
popup();
- if ( arrowRect.contains( e->pos() ) ) {
+ if ( arrowRect.tqcontains( e->pos() ) ) {
d->arrowPressed = TRUE;
d->arrowDown = TRUE;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
} else {*/
showPopup();
@@ -268,12 +268,12 @@ bool KexiDBComboBox::handleMousePressEvent(QMouseEvent *e)
return false;
}
-bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
+bool KexiDBComboBox::handleKeyPressEvent(TQKeyEvent *ke)
{
const int k = ke->key();
- const bool dropDown = (ke->state() == Qt::NoButton && ((k==Qt::Key_F2 && !d->isEditable) || k==Qt::Key_F4))
- || (ke->state() == Qt::AltButton && k==Qt::Key_Down);
- const bool escPressed = ke->state() == Qt::NoButton && k==Qt::Key_Escape;
+ const bool dropDown = (ke->state() == Qt::NoButton && ((k==TQt::Key_F2 && !d->isEditable) || k==TQt::Key_F4))
+ || (ke->state() == TQt::AltButton && k==TQt::Key_Down);
+ const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape;
const bool popupVisible = popup() && popup()->isVisible();
if ((dropDown || escPressed) && popupVisible) {
popup()->hide();
@@ -285,7 +285,7 @@ bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
return true;
}
else if (popupVisible) {
- const bool enterPressed = k==Qt::Key_Enter || k==Qt::Key_Return;
+ const bool enterPressed = k==TQt::Key_Enter || k==TQt::Key_Return;
if (enterPressed/* && m_internalEditorValueChanged*/) {
acceptPopupSelection();
return true;
@@ -296,91 +296,91 @@ bool KexiDBComboBox::handleKeyPressEvent(QKeyEvent *ke)
return false;
}
-bool KexiDBComboBox::keyPressed(QKeyEvent *ke)
+bool KexiDBComboBox::keyPressed(TQKeyEvent *ke)
{
if (KexiDBAutoField::keyPressed(ke))
return true;
const int k = ke->key();
const bool popupVisible = popup() && popup()->isVisible();
- const bool escPressed = ke->state() == Qt::NoButton && k==Qt::Key_Escape;
+ const bool escPressed = ke->state() == Qt::NoButton && k==TQt::Key_Escape;
if (escPressed && popupVisible) {
popup()->hide();
return true;
}
- if (ke->state() == Qt::NoButton && (k==Qt::Key_PageDown || k==Qt::Key_PageUp) && popupVisible)
+ if (ke->state() == Qt::NoButton && (k==TQt::Key_PageDown || k==TQt::Key_PageUp) && popupVisible)
return true;
return false;
}
-void KexiDBComboBox::mousePressEvent( QMouseEvent *e )
+void KexiDBComboBox::mousePressEvent( TQMouseEvent *e )
{
if (handleMousePressEvent(e))
return;
-// QTimer::singleShot( 200, this, SLOT(internalClickTimeout()));
+// TQTimer::singleShot( 200, this, TQT_SLOT(internalClickTimeout()));
// d->shortClick = TRUE;
// }
KexiDBAutoField::mousePressEvent( e );
}
-void KexiDBComboBox::mouseDoubleClickEvent( QMouseEvent *e )
+void KexiDBComboBox::mouseDoubleClickEvent( TQMouseEvent *e )
{
mousePressEvent( e );
}
-bool KexiDBComboBox::eventFilter( QObject *o, QEvent *e )
+bool KexiDBComboBox::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==this) {
- if (e->type()==QEvent::Resize) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(this)) {
+ if (e->type()==TQEvent::Resize) {
d->paintedCombo->resize(size());
if (m_subwidget)
m_subwidget->setGeometry( editorGeometry() );
}
- else if (e->type()==QEvent::Enter) {
+ else if (e->type()==TQEvent::Enter) {
if (!d->isEditable
- || /*over button if editable combo*/buttonGeometry().contains( static_cast<QMouseEvent*>(e)->pos() ))
+ || /*over button if editable combo*/buttonGeometry().tqcontains( TQT_TQMOUSEEVENT(e)->pos() ))
{
d->mouseOver = true;
update();
}
}
- else if (e->type()==QEvent::MouseMove) {
+ else if (e->type()==TQEvent::MouseMove) {
if (d->isEditable) {
- const bool overButton = buttonGeometry().contains( static_cast<QMouseEvent*>(e)->pos() );
+ const bool overButton = buttonGeometry().tqcontains( TQT_TQMOUSEEVENT(e)->pos() );
if (overButton != d->mouseOver) {
d->mouseOver = overButton;
update();
}
}
}
- else if (e->type()==QEvent::Leave) {
+ else if (e->type()==TQEvent::Leave) {
d->mouseOver = false;
update();
}
- else if (e->type()==QEvent::KeyPress) {
+ else if (e->type()==TQEvent::KeyPress) {
// handle F2/F4
- if (handleKeyPressEvent(static_cast<QKeyEvent*>(e)))
+ if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
return true;
}
- else if (e->type()==QEvent::FocusOut) {
+ else if (e->type()==TQEvent::FocusOut) {
if (popup() && popup()->isVisible()) {
popup()->hide();
undoChanges();
}
}
}
- else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->find(o)) {
- if (e->type()==QEvent::MouseButtonPress) {
+ else if (!d->isEditable && d->subWidgetsWithDisabledEvents && d->subWidgetsWithDisabledEvents->tqfind(o)) {
+ if (e->type()==TQEvent::MouseButtonPress) {
// clicking the subwidget should mean the same as clicking the combo box (i.e. show the popup)
- if (handleMousePressEvent(static_cast<QMouseEvent*>(e)))
+ if (handleMousePressEvent(TQT_TQMOUSEEVENT(e)))
return true;
}
- else if (e->type()==QEvent::KeyPress) {
- if (handleKeyPressEvent(static_cast<QKeyEvent*>(e)))
+ else if (e->type()==TQEvent::KeyPress) {
+ if (handleKeyPressEvent(TQT_TQKEYEVENT(e)))
return true;
}
- return e->type()!=QEvent::Paint;
+ return e->type()!=TQEvent::Paint;
}
return KexiDBAutoField::eventFilter( o, e );
}
@@ -391,15 +391,15 @@ bool KexiDBComboBox::subwidgetStretchRequired(KexiDBAutoField* autoField) const
return true;
}
-void KexiDBComboBox::setPaletteBackgroundColor( const QColor & color )
+void KexiDBComboBox::setPaletteBackgroundColor( const TQColor & color )
{
KexiDBAutoField::setPaletteBackgroundColor(color);
- QPalette pal(palette());
- QColorGroup cg(pal.active());
- pal.setColor(QColorGroup::Base, red);
- pal.setColor(QColorGroup::Background, red);
+ TQPalette pal(palette());
+ TQColorGroup cg(pal.active());
+ pal.setColor(TQColorGroup::Base, red);
+ pal.setColor(TQColorGroup::Background, red);
pal.setActive(cg);
- QWidget::setPalette(pal);
+ TQWidget::setPalette(pal);
update();
}
@@ -439,7 +439,7 @@ void KexiDBComboBox::selectAllInInternalEditor()
selectAll();
}
-void KexiDBComboBox::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBComboBox::setValueInternal(const TQVariant& add, bool removeOld)
{
//// use KexiDBAutoField instead of KexiComboBoxBase::setValueInternal
//// expects existing popup(), but we want to have delayed creation
@@ -448,38 +448,38 @@ void KexiDBComboBox::setValueInternal(const QVariant& add, bool removeOld)
KexiComboBoxBase::setValueInternal(add, removeOld);
}
-void KexiDBComboBox::setVisibleValueInternal(const QVariant& value)
+void KexiDBComboBox::setVisibleValueInternal(const TQVariant& value)
{
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
- iface->setValue(value, QVariant(), false /*!removeOld*/);
+ iface->setValue(value, TQVariant(), false /*!removeOld*/);
}
-QVariant KexiDBComboBox::visibleValue()
+TQVariant KexiDBComboBox::visibleValue()
{
return KexiComboBoxBase::visibleValue();
}
-void KexiDBComboBox::setValueInInternalEditor(const QVariant& value)
+void KexiDBComboBox::setValueInInternalEditor(const TQVariant& value)
{
if (!m_setValueInInternalEditor_enabled)
return;
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if(iface)
- iface->setValue(value, QVariant(), false/*!removeOld*/);
+ iface->setValue(value, TQVariant(), false/*!removeOld*/);
}
-QVariant KexiDBComboBox::valueFromInternalEditor()
+TQVariant KexiDBComboBox::valueFromInternalEditor()
{
return KexiDBAutoField::value();
}
-QPoint KexiDBComboBox::mapFromParentToGlobal(const QPoint& pos) const
+TQPoint KexiDBComboBox::mapFromParentToGlobal(const TQPoint& pos) const
{
// const KexiFormScrollView* view = KexiUtils::findParentConst<const KexiFormScrollView>(this, "KexiFormScrollView");
- if (!parentWidget())
- return QPoint(-1,-1);
- return parentWidget()->mapToGlobal(pos);
+ if (!tqparentWidget())
+ return TQPoint(-1,-1);
+ return tqparentWidget()->mapToGlobal(pos);
// return view->viewport()->mapToGlobal(pos);
}
@@ -488,31 +488,31 @@ int KexiDBComboBox::popupWidthHint() const
return width(); //popup() ? popup()->width() : 0;
}
-void KexiDBComboBox::fontChange( const QFont & oldFont )
+void KexiDBComboBox::fontChange( const TQFont & oldFont )
{
- d->sizeHint = QSize(); //force rebuild the cache
+ d->tqsizeHint = TQSize(); //force rebuild the cache
KexiDBAutoField::fontChange(oldFont);
}
-void KexiDBComboBox::styleChange( QStyle& oldStyle )
+void KexiDBComboBox::styleChange( TQStyle& oldStyle )
{
KexiDBAutoField::styleChange( oldStyle );
- d->sizeHint = QSize(); //force rebuild the cache
+ d->tqsizeHint = TQSize(); //force rebuild the cache
if (m_subwidget)
m_subwidget->setGeometry( editorGeometry() );
}
-QSize KexiDBComboBox::sizeHint() const
+TQSize KexiDBComboBox::tqsizeHint() const
{
- if ( isVisible() && d->sizeHint.isValid() )
- return d->sizeHint;
+ if ( isVisible() && d->tqsizeHint.isValid() )
+ return d->tqsizeHint;
- const int maxWidth = 7 * fontMetrics().width(QChar('x')) + 18;
- const int maxHeight = QMAX( fontMetrics().lineSpacing(), 14 ) + 2;
- d->sizeHint = (style().sizeFromContents(QStyle::CT_ComboBox, d->paintedCombo,
- QSize(maxWidth, maxHeight)).expandedTo(QApplication::globalStrut()));
+ const int maxWidth = 7 * fontMetrics().width(TQChar('x')) + 18;
+ const int maxHeight = TQMAX( fontMetrics().lineSpacing(), 14 ) + 2;
+ d->tqsizeHint = (tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, d->paintedCombo,
+ TQSize(maxWidth, maxHeight)).expandedTo(TQApplication::globalStrut()));
- return d->sizeHint;
+ return d->tqsizeHint;
}
void KexiDBComboBox::editRequested()
@@ -534,7 +534,7 @@ void KexiDBComboBox::slotRowAccepted(KexiTableItem *item, int row)
void KexiDBComboBox::beforeSignalValueChanged()
{
if (d->dataEnteredByHand) {
- KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((QWidget*)m_subwidget);
+ KexiFormDataItemInterface *iface = dynamic_cast<KexiFormDataItemInterface*>((TQWidget*)m_subwidget);
if (iface) {
slotInternalEditorValueChanged( iface->value() );
}
diff --git a/kexi/plugins/forms/widgets/kexidbcombobox.h b/kexi/plugins/forms/widgets/kexidbcombobox.h
index 5208d37d3..2639b1f96 100644
--- a/kexi/plugins/forms/widgets/kexidbcombobox.h
+++ b/kexi/plugins/forms/widgets/kexidbcombobox.h
@@ -35,15 +35,16 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
public KexiDBAutoField, public KexiComboBoxBase
{
Q_OBJECT
- Q_PROPERTY( bool editable READ isEditable WRITE setEditable )
+ TQ_OBJECT
+ TQ_PROPERTY( bool editable READ isEditable WRITE setEditable )
//properties from KexiDBAutoField that should not be visible:
- Q_OVERRIDE(QColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
- Q_OVERRIDE(QColor foregroundLabelColor DESIGNABLE false)
- Q_OVERRIDE(QColor backgroundLabelColor DESIGNABLE false)
- Q_OVERRIDE(bool autoCaption DESIGNABLE false)
+ TQ_OVERRIDE(TQColor paletteBackgroundColor READ paletteBackgroundColor WRITE setPaletteBackgroundColor DESIGNABLE true RESET unsetPalette)
+ TQ_OVERRIDE(TQColor foregroundLabelColor DESIGNABLE false)
+ TQ_OVERRIDE(TQColor backgroundLabelColor DESIGNABLE false)
+ TQ_OVERRIDE(bool autoCaption DESIGNABLE false)
public:
- KexiDBComboBox(QWidget *parent, const char *name=0, bool designMode = true);
+ KexiDBComboBox(TQWidget *tqparent, const char *name=0, bool designMode = true);
virtual ~KexiDBComboBox();
//! Implemented for KexiComboBoxBase: form has no 'related data' model (only the full database model)
@@ -53,21 +54,21 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
virtual KexiDB::Field *field() const { return KexiDBAutoField::field(); }
//! Implemented for KexiComboBoxBase
- virtual QVariant origValue() const { return m_origValue; }
+ virtual TQVariant origValue() const { return m_origValue; }
void setEditable(bool set);
bool isEditable() const;
virtual void setLabelPosition(LabelPosition position);
- virtual QVariant value() { return KexiComboBoxBase::value(); }
+ virtual TQVariant value() { return KexiComboBoxBase::value(); }
- virtual QVariant visibleValue();
+ virtual TQVariant visibleValue();
//! Reimpemented because to avoid taking value from the internal editor (index is taken from the popup instead)
virtual bool valueChanged();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
//! Reimplemented after KexiDBAutoField: jsut sets \a cinfo without initializing a subwidget.
//! Initialization is performed by \ref setVisibleColumnInfo().
@@ -81,10 +82,10 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
Reimplemented. */
virtual KexiDB::QueryColumnInfo* visibleColumnInfo() const;
- const QColor & paletteBackgroundColor() const { return KexiDBAutoField::paletteBackgroundColor(); }
+ const TQColor & paletteBackgroundColor() const { return KexiDBAutoField::paletteBackgroundColor(); }
//! Reimplemented to also set 'this' widget's background color, not only subwidget's.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
/*! Undoes changes made to this item - just resets the widget to original value.
Reimplemented after KexiFormDataItemInterface to also revert the visible value
@@ -96,37 +97,37 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
void slotItemSelected(KexiTableItem* item) { KexiComboBoxBase::slotItemSelected(item); }
protected slots:
- void slotInternalEditorValueChanged(const QVariant& v)
+ void slotInternalEditorValueChanged(const TQVariant& v)
{ KexiComboBoxBase::slotInternalEditorValueChanged(v); }
protected:
- QRect buttonGeometry() const;
+ TQRect buttonGeometry() const;
- virtual void paintEvent( QPaintEvent * );
+ virtual void paintEvent( TQPaintEvent * );
- virtual void mousePressEvent( QMouseEvent *e );
+ virtual void mousePressEvent( TQMouseEvent *e );
- void mouseDoubleClickEvent( QMouseEvent *e );
+ void mouseDoubleClickEvent( TQMouseEvent *e );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
- //! \return internal editor's geometry
- QRect editorGeometry() const;
+ //! \return internal editor's tqgeometry
+ TQRect editorGeometry() const;
//! Creates editor. Reimplemented, because if the combo box is not editable,
//! editor should not be created.
virtual void createEditor();
/*! Reimplemented */
- virtual void styleChange( QStyle& oldStyle );
+ virtual void styleChange( TQStyle& oldStyle );
/*! Reimplemented */
- virtual void fontChange( const QFont & oldFont );
+ virtual void fontChange( const TQFont & oldFont );
virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const;
//! Implemented for KexiComboBoxBase
- virtual QWidget *internalEditor() const { return /*WidgetWithSubpropertiesInterface*/m_subwidget; }
+ virtual TQWidget *internalEditor() const { return /*WidgetWithSubpropertiesInterface*/m_subwidget; }
//! Implemented for KexiComboBoxBase. Does nothing if the widget is not editable.
virtual void moveCursorToEndInInternalEditor();
@@ -135,10 +136,10 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
virtual void selectAllInInternalEditor();
//! Implemented for KexiComboBoxBase
- virtual void setValueInInternalEditor(const QVariant& value);
+ virtual void setValueInInternalEditor(const TQVariant& value);
//! Implemented for KexiComboBoxBase
- virtual QVariant valueFromInternalEditor();
+ virtual TQVariant valueFromInternalEditor();
//! Implemented for KexiComboBoxBase
virtual void editRequested();
@@ -146,21 +147,21 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
//! Implemented for KexiComboBoxBase
virtual void acceptRequested();
- //! Implement this to return a position \a pos mapped from parent (e.g. viewport)
- //! to global coordinates. QPoint(-1, -1) should be returned if this cannot be computed.
- virtual QPoint mapFromParentToGlobal(const QPoint& pos) const;
+ //! Implement this to return a position \a pos mapped from tqparent (e.g. viewport)
+ //! to global coordinates. TQPoint(-1, -1) should be returned if this cannot be computed.
+ virtual TQPoint mapFromParentToGlobal(const TQPoint& pos) const;
//! Implement this to return a hint for popup width.
virtual int popupWidthHint() const;
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
//! Implemented to handle visible value instead of index
- virtual void setVisibleValueInternal(const QVariant& value);
+ virtual void setVisibleValueInternal(const TQVariant& value);
- bool handleMousePressEvent(QMouseEvent *e);
+ bool handleMousePressEvent(TQMouseEvent *e);
- bool handleKeyPressEvent(QKeyEvent *ke);
+ bool handleKeyPressEvent(TQKeyEvent *ke);
//! Implemented for KexiDataItemInterface
virtual void beforeSignalValueChanged();
@@ -172,7 +173,7 @@ class KEXIFORMUTILS_EXPORT KexiDBComboBox :
Used for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing".
Also used for grabbing page down/up keys. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
class Private;
Private * const d;
diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.cpp b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
index 32584fceb..9638f93ab 100644
--- a/kexi/plugins/forms/widgets/kexidbdateedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdateedit.cpp
@@ -19,8 +19,8 @@
*/
#include "kexidbdateedit.h"
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
@@ -28,45 +28,45 @@
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
-KexiDBDateEdit::KexiDBDateEdit(const QDate &date, QWidget *parent, const char *name)
- : QWidget(parent, name), KexiFormDataItemInterface()
+KexiDBDateEdit::KexiDBDateEdit(const TQDate &date, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
m_cleared = false;
m_readOnly = false;
- m_edit = new QDateEdit(date, this);
+ m_edit = new TQDateEdit(date, this);
m_edit->setAutoAdvance(true);
- m_edit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
- connect( m_edit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged(const QDate&)) );
- connect( m_edit, SIGNAL(valueChanged(const QDate&)), this, SIGNAL(dateChanged(const QDate&)) );
+ m_edit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged(const TQDate&)) );
+ connect( m_edit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateChanged(const TQDate&)) );
- QToolButton* btn = new QToolButton(this);
+ TQToolButton* btn = new TQToolButton(this);
btn->setText("...");
- btn->setFixedWidth( QFontMetrics(btn->font()).width(" ... ") );
+ btn->setFixedWidth( TQFontMetrics(btn->font()).width(" ... ") );
btn->setPopupDelay(1); //1 ms
-#ifdef QDateTimeEditor_HACK
- m_dte_date = KexiUtils::findFirstChild<QDateTimeEditor>(m_edit, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_date = KexiUtils::findFirstChild<TQDateTimeEditor>(m_edit, "TQDateTimeEditor");
#else
m_dte_date = 0;
#endif
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
- connect(m_datePickerPopupMenu, SIGNAL(aboutToShow()), this, SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, QDate::currentDate(), 0);
+ connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
- connect(dt, SIGNAL(tableClicked()), this, SLOT(acceptDate()));
+ connect(dt, TQT_SIGNAL(tableClicked()), this, TQT_SLOT(acceptDate()));
m_datePicker->setCloseButton(true);
m_datePicker->installEventFilter(this);
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(m_edit, 1);
- layout->addWidget(btn, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(m_edit, 1);
+ tqlayout->addWidget(btn, 0);
setFocusProxy(m_edit);
}
@@ -75,14 +75,14 @@ KexiDBDateEdit::~KexiDBDateEdit()
{
}
-void KexiDBDateEdit::setInvalidState( const QString& )
+void KexiDBDateEdit::setInvalidState( const TQString& )
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -91,18 +91,18 @@ KexiDBDateEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QWidget::setEnabled(enabled);
+ TQWidget::setEnabled(enabled);
}
-void KexiDBDateEdit::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBDateEdit::setValueInternal(const TQVariant &add, bool removeOld)
{
int setNumberOnFocus = -1;
- QDate d;
- QString addString(add.toString());
+ TQDate d;
+ TQString addString(add.toString());
if (removeOld) {
if (!addString.isEmpty() && addString[0].latin1()>='0' && addString[0].latin1() <='9') {
setNumberOnFocus = addString[0].latin1()-'0';
- d = QDate(setNumberOnFocus*1000, 1, 1);
+ d = TQDate(setNumberOnFocus*1000, 1, 1);
}
}
else
@@ -111,10 +111,10 @@ void KexiDBDateEdit::setValueInternal(const QVariant &add, bool removeOld)
m_edit->setDate(d);
}
-QVariant
+TQVariant
KexiDBDateEdit::value()
{
- return QVariant(m_edit->date());
+ return TQVariant(m_edit->date());
}
bool KexiDBDateEdit::valueIsNull()
@@ -139,7 +139,7 @@ void KexiDBDateEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBDateEdit::widget()
{
return this;
@@ -147,7 +147,7 @@ KexiDBDateEdit::widget()
bool KexiDBDateEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus() && m_dte_date->focusSection()==0;
#else
return false;
@@ -156,7 +156,7 @@ bool KexiDBDateEdit::cursorAtStart()
bool KexiDBDateEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus()
&& m_dte_date->focusSection()==int(m_dte_date->sectionCount()-1);
#else
@@ -166,12 +166,12 @@ bool KexiDBDateEdit::cursorAtEnd()
void KexiDBDateEdit::clear()
{
- m_edit->setDate(QDate());
+ m_edit->setDate(TQDate());
m_cleared = true;
}
void
-KexiDBDateEdit::slotValueChanged(const QDate&)
+KexiDBDateEdit::slotValueChanged(const TQDate&)
{
m_cleared = false;
}
@@ -179,7 +179,7 @@ KexiDBDateEdit::slotValueChanged(const QDate&)
void
KexiDBDateEdit::slotShowDatePicker()
{
- QDate date = m_edit->date();
+ TQDate date = m_edit->date();
m_datePicker->setDate(date);
m_datePicker->setFocus();
@@ -195,24 +195,24 @@ KexiDBDateEdit::acceptDate()
}
bool
-KexiDBDateEdit::eventFilter(QObject *o, QEvent *e)
+KexiDBDateEdit::eventFilter(TQObject *o, TQEvent *e)
{
if (o != m_datePicker)
return false;
switch (e->type()) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_datePickerPopupMenu->hide();
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease: {
- QKeyEvent *ke = (QKeyEvent *)e;
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease: {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
//accepting picker
acceptDate();
return true;
}
- else if (ke->key()==Qt::Key_Escape) {
+ else if (ke->key()==TQt::Key_Escape) {
//canceling picker
m_datePickerPopupMenu->hide();
return true;
diff --git a/kexi/plugins/forms/widgets/kexidbdateedit.h b/kexi/plugins/forms/widgets/kexidbdateedit.h
index 2ad693a80..b611590e1 100644
--- a/kexi/plugins/forms/widgets/kexidbdateedit.h
+++ b/kexi/plugins/forms/widgets/kexidbdateedit.h
@@ -22,37 +22,38 @@
#define KexiDBDateEdit_H
#include "kexiformdataiteminterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
class KPopupMenu;
class KDatePicker;
-class QDateTimeEditor;
+class TQDateTimeEditor;
//! @short A db-aware date editor
-class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public TQWidget, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- // properties copied from QDateEdit
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ // properties copied from TQDateEdit
Q_ENUMS( Order )
- Q_PROPERTY( Order order READ order WRITE setOrder DESIGNABLE true)
- Q_PROPERTY( QDate date READ date WRITE setDate DESIGNABLE true)
- Q_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance DESIGNABLE true)
- Q_PROPERTY( QDate maxValue READ maxValue WRITE setMaxValue DESIGNABLE true)
- Q_PROPERTY( QDate minValue READ minValue WRITE setMinValue DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_PROPERTY( Order order READ order WRITE setOrder DESIGNABLE true)
+ TQ_PROPERTY( TQDate date READ date WRITE setDate DESIGNABLE true)
+ TQ_PROPERTY( bool autoAdvance READ autoAdvance WRITE setAutoAdvance DESIGNABLE true)
+ TQ_PROPERTY( TQDate maxValue READ maxValue WRITE setMaxValue DESIGNABLE true)
+ TQ_PROPERTY( TQDate minValue READ minValue WRITE setMinValue DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- enum Order { DMY = QDateEdit::DMY, MDY = QDateEdit::MDY, YMD = QDateEdit::YMD, YDM = QDateEdit::YDM };
+ enum Order { DMY = TQDateEdit::DMY, MDY = TQDateEdit::MDY, YMD = TQDateEdit::YMD, YDM = TQDateEdit::YDM };
- KexiDBDateEdit(const QDate &date, QWidget *parent, const char *name=0);
+ KexiDBDateEdit(const TQDate &date, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDateEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -68,7 +69,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataI
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -77,39 +78,39 @@ class KEXIFORMUTILS_EXPORT KexiDBDateEdit : public QWidget, public KexiFormDataI
virtual void setEnabled(bool enabled);
// property functions
- inline QDate date() const { return m_edit->date(); }
- inline void setOrder(Order order) { m_edit->setOrder( (QDateEdit::Order) order); }
+ inline TQDate date() const { return m_edit->date(); }
+ inline void setOrder(Order order) { m_edit->setOrder( (TQDateEdit::Order) order); }
inline Order order() const { return (Order)m_edit->order(); }
inline void setAutoAdvance( bool advance ) { m_edit->setAutoAdvance(advance); }
inline bool autoAdvance() const { return m_edit->autoAdvance(); }
- inline void setMinValue(const QDate& d) { m_edit->setMinValue(d); }
- inline QDate minValue() const { return m_edit->minValue(); }
- inline void setMaxValue(const QDate& d) { m_edit->setMaxValue(d); }
- inline QDate maxValue() const { return m_edit->maxValue(); }
+ inline void setMinValue(const TQDate& d) { m_edit->setMinValue(d); }
+ inline TQDate minValue() const { return m_edit->minValue(); }
+ inline void setMaxValue(const TQDate& d) { m_edit->setMaxValue(d); }
+ inline TQDate maxValue() const { return m_edit->maxValue(); }
signals:
- void dateChanged(const QDate &date);
+ void dateChanged(const TQDate &date);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- inline void setDate(const QDate& date) { m_edit->setDate(date); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDate(const TQDate& date) { m_edit->setDate(date); }
virtual void setReadOnly(bool set);
protected slots:
- void slotValueChanged(const QDate&);
+ void slotValueChanged(const TQDate&);
void slotShowDatePicker();
void acceptDate();
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
private:
KDatePicker *m_datePicker;
- QDateEdit *m_edit;
+ TQDateEdit *m_edit;
KPopupMenu *m_datePickerPopupMenu;
- QDateTimeEditor *m_dte_date;
+ TQDateTimeEditor *m_dte_date;
bool m_invalidState : 1;
bool m_cleared : 1;
bool m_readOnly : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
index faaeca662..e99e46518 100644
--- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.cpp
@@ -20,62 +20,62 @@
#include "kexidbdatetimeedit.h"
-#include <qtoolbutton.h>
-#include <qlayout.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
#include <kexiutils/utils.h>
-KexiDBDateTimeEdit::KexiDBDateTimeEdit(const QDateTime &datetime, QWidget *parent, const char *name)
- : QWidget(parent, name), KexiFormDataItemInterface()
+KexiDBDateTimeEdit::KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
m_cleared = false;
m_readOnly = false;
- m_dateEdit = new QDateEdit(datetime.date(), this);
+ m_dateEdit = new TQDateEdit(datetime.date(), this);
m_dateEdit->setAutoAdvance(true);
- m_dateEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
-// m_dateEdit->setFixedWidth( QFontMetrics(m_dateEdit->font()).width("8888-88-88___") );
- connect(m_dateEdit, SIGNAL(valueChanged(const QDate&)), this, SLOT(slotValueChanged()));
- connect(m_dateEdit, SIGNAL(valueChanged(const QDate&)), this, SIGNAL(dateTimeChanged()));
+ m_dateEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+// m_dateEdit->setFixedWidth( TQFontMetrics(m_dateEdit->font()).width("8888-88-88___") );
+ connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SLOT(slotValueChanged()));
+ connect(m_dateEdit, TQT_SIGNAL(valueChanged(const TQDate&)), this, TQT_SIGNAL(dateTimeChanged()));
- QToolButton* btn = new QToolButton(this);
+ TQToolButton* btn = new TQToolButton(this);
btn->setText("...");
- btn->setFixedWidth( QFontMetrics(btn->font()).width(" ... ") );
+ btn->setFixedWidth( TQFontMetrics(btn->font()).width(" ... ") );
btn->setPopupDelay(1); //1 ms
- m_timeEdit = new QTimeEdit(datetime.time(), this);;
+ m_timeEdit = new TQTimeEdit(datetime.time(), this);;
m_timeEdit->setAutoAdvance(true);
- m_timeEdit->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::MinimumExpanding);
- connect(m_timeEdit, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged()));
- connect(m_timeEdit, SIGNAL(valueChanged(const QTime&)), this, SIGNAL(dateTimeChanged()));
+ m_timeEdit->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding);
+ connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged()));
+ connect(m_timeEdit, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SIGNAL(dateTimeChanged()));
-#ifdef QDateTimeEditor_HACK
- m_dte_date = KexiUtils::findFirstChild<QDateTimeEditor>(m_dateEdit, "QDateTimeEditor");
- m_dte_time = KexiUtils::findFirstChild<QDateTimeEditor>(m_timeEdit, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_date = KexiUtils::findFirstChild<TQDateTimeEditor>(m_dateEdit, "TQDateTimeEditor");
+ m_dte_time = KexiUtils::findFirstChild<TQDateTimeEditor>(m_timeEdit, "TQDateTimeEditor");
#else
m_dte_date = 0;
#endif
m_datePickerPopupMenu = new KPopupMenu(0, "date_popup");
- connect(m_datePickerPopupMenu, SIGNAL(aboutToShow()), this, SLOT(slotShowDatePicker()));
- m_datePicker = new KDatePicker(m_datePickerPopupMenu, QDate::currentDate(), 0);
+ connect(m_datePickerPopupMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(slotShowDatePicker()));
+ m_datePicker = new KDatePicker(m_datePickerPopupMenu, TQDate::tqcurrentDate(), 0);
KDateTable *dt = KexiUtils::findFirstChild<KDateTable>(m_datePicker, "KDateTable");
if (dt)
- connect(dt, SIGNAL(tableClicked()), this, SLOT(acceptDate()));
+ connect(dt, TQT_SIGNAL(tableClicked()), this, TQT_SLOT(acceptDate()));
m_datePicker->setCloseButton(true);
m_datePicker->installEventFilter(this);
m_datePickerPopupMenu->insertItem(m_datePicker);
btn->setPopup(m_datePickerPopupMenu);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(m_dateEdit, 0);
- layout->addWidget(btn, 0);
- layout->addWidget(m_timeEdit, 0);
- //layout->addStretch(1);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(m_dateEdit, 0);
+ tqlayout->addWidget(btn, 0);
+ tqlayout->addWidget(m_timeEdit, 0);
+ //tqlayout->addStretch(1);
setFocusProxy(m_dateEdit);
}
@@ -84,14 +84,14 @@ KexiDBDateTimeEdit::~KexiDBDateTimeEdit()
{
}
-void KexiDBDateTimeEdit::setInvalidState(const QString & /*! @todo paint this text: text*/)
+void KexiDBDateTimeEdit::setInvalidState(const TQString & /*! @todo paint this text: text*/)
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -100,19 +100,19 @@ KexiDBDateTimeEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QWidget::setEnabled(enabled);
+ TQWidget::setEnabled(enabled);
}
-void KexiDBDateTimeEdit::setValueInternal(const QVariant &, bool )
+void KexiDBDateTimeEdit::setValueInternal(const TQVariant &, bool )
{
m_dateEdit->setDate(m_origValue.toDate());
m_timeEdit->setTime(m_origValue.toTime());
}
-QVariant
+TQVariant
KexiDBDateTimeEdit::value()
{
- return QDateTime(m_dateEdit->date(), m_timeEdit->time());
+ return TQDateTime(m_dateEdit->date(), m_timeEdit->time());
}
bool KexiDBDateTimeEdit::valueIsNull()
@@ -138,7 +138,7 @@ void KexiDBDateTimeEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBDateTimeEdit::widget()
{
return m_dateEdit;
@@ -146,7 +146,7 @@ KexiDBDateTimeEdit::widget()
bool KexiDBDateTimeEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_dateEdit->hasFocus() && m_dte_date->focusSection()==0;
#else
return false;
@@ -155,7 +155,7 @@ bool KexiDBDateTimeEdit::cursorAtStart()
bool KexiDBDateTimeEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && m_timeEdit->hasFocus()
&& m_dte_time->focusSection()==int(m_dte_time->sectionCount()-1);
#else
@@ -165,8 +165,8 @@ bool KexiDBDateTimeEdit::cursorAtEnd()
void KexiDBDateTimeEdit::clear()
{
- m_dateEdit->setDate(QDate());
- m_timeEdit->setTime(QTime());
+ m_dateEdit->setDate(TQDate());
+ m_timeEdit->setTime(TQTime());
m_cleared = true;
}
@@ -179,7 +179,7 @@ KexiDBDateTimeEdit::slotValueChanged()
void
KexiDBDateTimeEdit::slotShowDatePicker()
{
- QDate date = m_dateEdit->date();
+ TQDate date = m_dateEdit->date();
m_datePicker->setDate(date);
m_datePicker->setFocus();
@@ -195,24 +195,24 @@ KexiDBDateTimeEdit::acceptDate()
}
bool
-KexiDBDateTimeEdit::eventFilter(QObject *o, QEvent *e)
+KexiDBDateTimeEdit::eventFilter(TQObject *o, TQEvent *e)
{
if (o != m_datePicker)
return false;
switch (e->type()) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_datePickerPopupMenu->hide();
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease: {
- QKeyEvent *ke = (QKeyEvent *)e;
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease: {
+ TQKeyEvent *ke = (TQKeyEvent *)e;
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
//accepting picker
acceptDate();
return true;
}
- else if (ke->key()==Qt::Key_Escape) {
+ else if (ke->key()==TQt::Key_Escape) {
//canceling picker
m_datePickerPopupMenu->hide();
return true;
@@ -227,14 +227,14 @@ KexiDBDateTimeEdit::eventFilter(QObject *o, QEvent *e)
return false;
}
-QDateTime
+TQDateTime
KexiDBDateTimeEdit::dateTime() const
{
- return QDateTime(m_dateEdit->date(), m_timeEdit->time());
+ return TQDateTime(m_dateEdit->date(), m_timeEdit->time());
}
void
-KexiDBDateTimeEdit::setDateTime(const QDateTime &dt)
+KexiDBDateTimeEdit::setDateTime(const TQDateTime &dt)
{
m_dateEdit->setDate(dt.date());
m_timeEdit->setTime(dt.time());
diff --git a/kexi/plugins/forms/widgets/kexidbdatetimeedit.h b/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
index 1f185b164..b5bbaec01 100644
--- a/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
+++ b/kexi/plugins/forms/widgets/kexidbdatetimeedit.h
@@ -22,32 +22,33 @@
#define KexiDBDateTimeEdit_H
#include "kexiformdataiteminterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
class KDatePicker;
-class QDateTimeEditor;
+class TQDateTimeEditor;
class KPopupMenu;
//! @short A db-aware datetime editor
-class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public TQWidget, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- // properties copied from QDateTimeEdit
- Q_PROPERTY( QDateTime dateTime READ dateTime WRITE setDateTime )
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ // properties copied from TQDateTimeEdit
+ TQ_PROPERTY( TQDateTime dateTime READ dateTime WRITE setDateTime )
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
enum Order { DMY, MDY, YMD, YDM };
- KexiDBDateTimeEdit(const QDateTime &datetime, QWidget *parent, const char *name=0);
+ KexiDBDateTimeEdit(const TQDateTime &datetime, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDateTimeEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -63,7 +64,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -72,20 +73,20 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
virtual void setEnabled(bool enabled);
// property functions
- QDateTime dateTime() const;
+ TQDateTime dateTime() const;
signals:
void dateTimeChanged();
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- void setDateTime(const QDateTime &dt);
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ void setDateTime(const TQDateTime &dt);
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
protected slots:
void slotValueChanged();
@@ -94,9 +95,9 @@ class KEXIFORMUTILS_EXPORT KexiDBDateTimeEdit : public QWidget, public KexiFormD
private:
KDatePicker *m_datePicker;
- QDateEdit* m_dateEdit;
- QTimeEdit* m_timeEdit;
- QDateTimeEditor *m_dte_date, *m_dte_time;
+ TQDateEdit* m_dateEdit;
+ TQTimeEdit* m_timeEdit;
+ TQDateTimeEditor *m_dte_date, *m_dte_time;
KPopupMenu *m_datePickerPopupMenu;
bool m_invalidState : 1;
bool m_cleared : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp b/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
index 67a2c1a6d..c0eb17d33 100644
--- a/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbdoublespinbox.cpp
@@ -20,26 +20,26 @@
#include "kexidbdoublespinbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
-KexiDBDoubleSpinBox::KexiDBDoubleSpinBox(QWidget *parent, const char *name)
- : KDoubleSpinBox(parent, name) , KexiFormDataItemInterface()
+KexiDBDoubleSpinBox::KexiDBDoubleSpinBox(TQWidget *tqparent, const char *name)
+ : KDoubleSpinBox(tqparent, name) , KexiFormDataItemInterface()
{
- connect(this, SIGNAL(valueChanged(double)), this, SLOT(slotValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(slotValueChanged()));
}
KexiDBDoubleSpinBox::~KexiDBDoubleSpinBox()
{
}
-void KexiDBDoubleSpinBox::setInvalidState( const QString& displayText )
+void KexiDBDoubleSpinBox::setInvalidState( const TQString& displayText )
{
m_invalidState = true;
setEnabled(false);
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
setSpecialValueText(displayText);
KDoubleSpinBox::setValue(minValue());
}
@@ -53,12 +53,12 @@ KexiDBDoubleSpinBox::setEnabled(bool enabled)
KDoubleSpinBox::setEnabled(enabled);
}
-void KexiDBDoubleSpinBox::setValueInternal(const QVariant&, bool )
+void KexiDBDoubleSpinBox::setValueInternal(const TQVariant&, bool )
{
KDoubleSpinBox::setValue(m_origValue.toDouble());
}
-QVariant
+TQVariant
KexiDBDoubleSpinBox::value()
{
return KDoubleSpinBox::value();
@@ -89,7 +89,7 @@ void KexiDBDoubleSpinBox::setReadOnly(bool set)
editor()->setReadOnly(set);
}
-QWidget*
+TQWidget*
KexiDBDoubleSpinBox::widget()
{
return this;
diff --git a/kexi/plugins/forms/widgets/kexidbdoublespinbox.h b/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
index c6bc627d2..1445980c8 100644
--- a/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
+++ b/kexi/plugins/forms/widgets/kexidbdoublespinbox.h
@@ -22,25 +22,26 @@
#define KexiDBDoubleSpinBox_H
#include "kexiformdataiteminterface.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <knuminput.h>
//! @short A db-aware int spin box
class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBDoubleSpinBox(QWidget *parent, const char *name=0);
+ KexiDBDoubleSpinBox(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBDoubleSpinBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public K
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -64,13 +65,13 @@ class KEXIFORMUTILS_EXPORT KexiDBDoubleSpinBox : public KDoubleSpinBox, public K
public slots:
virtual void setEnabled(bool enabled);
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotValueChanged();
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
bool m_invalidState : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbform.cpp b/kexi/plugins/forms/widgets/kexidbform.cpp
index cff12c7cf..12210430a 100644
--- a/kexi/plugins/forms/widgets/kexidbform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbform.cpp
@@ -19,11 +19,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qcursor.h>
-#include <qapplication.h>
-#include <qfocusdata.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
+#include <tqapplication.h>
+#include <tqfocusdata.h>
#include <kdebug.h>
@@ -55,7 +55,7 @@ class KexiDBForm::Private
}
//! \return index of data-aware widget \a widget
- int indexOfDataAwareWidget(QWidget *widget) const
+ int indexOfDataAwareWidget(TQWidget *widget) const
{
if (!dynamic_cast<KexiDataItemInterface*>(widget))
return -1;
@@ -65,8 +65,8 @@ class KexiDBForm::Private
//! \return index of data item \a item, or -1 if not found
int indexOfDataItem( KexiDataItemInterface* item ) const
{
- QMapConstIterator<KexiDataItemInterface*, uint> indicesForDataAwareWidgetsIt(
- indicesForDataAwareWidgets.find(item));
+ TQMapConstIterator<KexiDataItemInterface*, uint> indicesForDataAwareWidgetsIt(
+ indicesForDataAwareWidgets.tqfind(item));
if (indicesForDataAwareWidgetsIt == indicesForDataAwareWidgets.constEnd())
return -1;
kexipluginsdbg << "KexiDBForm: column # for item: "
@@ -75,7 +75,7 @@ class KexiDBForm::Private
}
//! Sets orderedFocusWidgetsIterator member to a position pointing to \a widget
- void setOrderedFocusWidgetsIteratorTo( QWidget *widget )
+ void setOrderedFocusWidgetsIteratorTo( TQWidget *widget )
{
if (orderedFocusWidgetsIterator.current() == widget)
return;
@@ -86,23 +86,23 @@ class KexiDBForm::Private
KexiDataAwareObjectInterface* dataAwareObject;
//! ordered list of focusable widgets (can be both data-widgets or buttons, etc.)
- QPtrList<QWidget> orderedFocusWidgets;
+ TQPtrList<TQWidget> orderedFocusWidgets;
//! ordered list of data-aware widgets
- QPtrList<QWidget> orderedDataAwareWidgets;
- QMap<KexiDataItemInterface*, uint> indicesForDataAwareWidgets; //!< a subset of orderedFocusWidgets mapped to indices
- QPtrListIterator<QWidget> orderedFocusWidgetsIterator;
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
-// QGuardedPtr<QWidget> widgetFocusedBeforePopup;
+ TQPtrList<TQWidget> orderedDataAwareWidgets;
+ TQMap<KexiDataItemInterface*, uint> indicesForDataAwareWidgets; //!< a subset of orderedFocusWidgets mapped to indices
+ TQPtrListIterator<TQWidget> orderedFocusWidgetsIterator;
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
+// TQGuardedPtr<TQWidget> widgetFocusedBeforePopup;
bool autoTabStops : 1;
bool popupFocused : 1; //!< used in KexiDBForm::eventFilter()
};
//========================
-KexiDBForm::KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareObject,
+KexiDBForm::KexiDBForm(TQWidget *tqparent, KexiDataAwareObjectInterface* dataAwareObject,
const char *name/*, KexiDB::Connection *conn*/)
- : KexiDBFormBase(parent, name)
+ : KexiDBFormBase(tqparent, name)
, KexiFormDataItemInterface()
, d(new Private())
{
@@ -113,7 +113,7 @@ KexiDBForm::KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareO
m_hasFocusableWidget = false;
kexipluginsdbg << "KexiDBForm::KexiDBForm(): " << endl;
- setCursor(QCursor(Qt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
+ setCursor(TQCursor(TQt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
setAcceptDrops( true );
}
@@ -125,48 +125,48 @@ KexiDBForm::~KexiDBForm()
KexiDataAwareObjectInterface* KexiDBForm::dataAwareObject() const { return d->dataAwareObject; }
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ TQT_TQWIDGET(obj)->tqrepaint();
}
delete list;
}
void
-KexiDBForm::drawRect(const QRect& r, int type)
+KexiDBForm::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
void
-KexiDBForm::drawRects(const QValueList<QRect> &list, int type)
+KexiDBForm::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
- p.begin(this, true);
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (d->prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(d->prev_rect.x()-2, d->prev_rect.y()-2), d->buffer,
- QRect(d->prev_rect.x()-2, d->prev_rect.y()-2, d->prev_rect.width()+4, d->prev_rect.height()+4));
+ p.drawPixmap( TQPoint(d->prev_rect.x()-2, d->prev_rect.y()-2), d->buffer,
+ TQRect(d->prev_rect.x()-2, d->prev_rect.y()-2, d->prev_rect.width()+4, d->prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- d->prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ d->prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
if (d->prev_rect.isValid())
d->prev_rect = d->prev_rect.unite(*it);
@@ -182,59 +182,59 @@ KexiDBForm::drawRects(const QValueList<QRect> &list, int type)
void
KexiDBForm::initBuffer()
{
- repaintAll(this);
+ tqrepaintAll(this);
d->buffer.resize( width(), height() );
- d->buffer = QPixmap::grabWindow( winId() );
- d->prev_rect = QRect();
+ d->buffer = TQPixmap::grabWindow( winId() );
+ d->prev_rect = TQRect();
}
void
KexiDBForm::clearForm()
{
- QPainter p;
- p.begin(this, true);
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), d->buffer, QRect(0,0,d->buffer.width(), d->buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), d->buffer, TQRect(0,0,d->buffer.width(), d->buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+KexiDBForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
-
- QPainter p;
- p.begin(this, true);
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
+
+ TQPainter p;
+ p.tqbegin(TQT_TQPAINTDEVICE(this), true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (d->prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(d->prev_rect.x(), d->prev_rect.y()), d->buffer,
- QRect(d->prev_rect.x(), d->prev_rect.y(), d->prev_rect.width(), d->prev_rect.height()));
+ p.drawPixmap( TQPoint(d->prev_rect.x(), d->prev_rect.y()), d->buffer,
+ TQRect(d->prev_rect.x(), d->prev_rect.y(), d->prev_rect.width(), d->prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -251,7 +251,7 @@ KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- d->prev_rect = QRect(0, 0, d->buffer.width(), d->buffer.height());
+ d->prev_rect = TQRect(0, 0, d->buffer.width(), d->buffer.height());
else if(to)
{
d->prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -260,21 +260,21 @@ KexiDBForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
d->prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- d->prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ d->prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
}
-QSize
-KexiDBForm::sizeHint() const
+TQSize
+KexiDBForm::tqsizeHint() const
{
//todo: find better size (user configured?)
- return QSize(400,300);
+ return TQSize(400,300);
}
-void KexiDBForm::setInvalidState( const QString& displayText )
+void KexiDBForm::setInvalidState( const TQString& displayText )
{
Q_UNUSED( displayText );
@@ -291,40 +291,40 @@ void KexiDBForm::setAutoTabStops(bool set)
d->autoTabStops = set;
}
-QPtrList<QWidget>* KexiDBForm::orderedFocusWidgets() const
+TQPtrList<TQWidget>* KexiDBForm::orderedFocusWidgets() const
{
return &d->orderedFocusWidgets;
}
-QPtrList<QWidget>* KexiDBForm::orderedDataAwareWidgets() const
+TQPtrList<TQWidget>* KexiDBForm::orderedDataAwareWidgets() const
{
return &d->orderedDataAwareWidgets;
}
void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
{
- QWidget *fromWidget = 0;
- //QWidget *topLevelWidget = form->widget()->topLevelWidget();
+ TQWidget *fromWidget = 0;
+ //TQWidget *tqtopLevelWidget = form->widget()->tqtopLevelWidget();
//js form->updateTabStopsOrder(); //certain widgets can have now updated focusPolicy properties, fix this
uint numberOfDataAwareWidgets = 0;
// if (d->orderedFocusWidgets.isEmpty()) {
//generate a new list
for (KFormDesigner::ObjectTreeListIterator it(form->tabStopsIterator()); it.current(); ++it) {
- if (it.current()->widget()->focusPolicy() & QWidget::TabFocus) {
+ if (it.current()->widget()->focusPolicy() & TQ_TabFocus) {
//this widget has tab focus:
it.current()->widget()->installEventFilter(this);
- //also filter events for data-aware children of this widget (i.e. KexiDBAutoField's editors)
- QObjectList *children = it.current()->widget()->queryList("QWidget");
- for (QObjectListIt childrenIt(*children); childrenIt.current(); ++childrenIt) {
- // if (dynamic_cast<KexiFormDataItemInterface*>(childrenIt.current())) {
+ //also filter events for data-aware tqchildren of this widget (i.e. KexiDBAutoField's editors)
+ TQObjectList *tqchildren = it.current()->widget()->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ for (TQObjectListIt tqchildrenIt(*tqchildren); tqchildrenIt.current(); ++tqchildrenIt) {
+ // if (dynamic_cast<KexiFormDataItemInterface*>(tqchildrenIt.current())) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder(): also adding '"
- << childrenIt.current()->className() << " " << childrenIt.current()->name()
+ << tqchildrenIt.current()->className() << " " << tqchildrenIt.current()->name()
<< "' child to filtered widgets" << endl;
- //it.current()->widget()->installEventFilter(static_cast<QWidget*>(childrenIt.current()));
- childrenIt.current()->installEventFilter(this);
+ //it.current()->widget()->installEventFilter(TQT_TQWIDGET(tqchildrenIt.current()));
+ tqchildrenIt.current()->installEventFilter(this);
// }
}
- delete children;
+ delete tqchildren;
if (fromWidget) {
kexipluginsdbg << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name()
<< " -> " << it.current()->widget()->name() << endl;
@@ -342,7 +342,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
// /*! @todo d->indicesForDataAwareWidgets SHOULDNT BE UPDATED HERE BECAUSE
// THERE CAN BE ALSO NON-TABSTOP DATA WIDGETS!
// */
- d->indicesForDataAwareWidgets.replace(
+ d->indicesForDataAwareWidgets.tqreplace(
dataItem,
numberOfDataAwareWidgets );
numberOfDataAwareWidgets++;
@@ -353,7 +353,7 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
// }
/* else {
//restore ordering
- for (QPtrListIterator<QWidget> it(d->orderedFocusWidgets); it.current(); ++it) {
+ for (TQPtrListIterator<TQWidget> it(d->orderedFocusWidgets); it.current(); ++it) {
if (fromWidget) {
kdDebug() << "KexiDBForm::updateTabStopsOrder() tab order: " << fromWidget->name()
<< " -> " << it.current()->name() << endl;
@@ -361,14 +361,14 @@ void KexiDBForm::updateTabStopsOrder(KFormDesigner::Form* form)
}
fromWidget = it.current();
}
-// SET_FOCUS_USING_REASON(focusWidget(), QFocusEvent::Tab);
+// SET_FOCUS_USING_REASON(tqfocusWidget(), TQFocusEvent::Tab);
}*/
}
void KexiDBForm::updateTabStopsOrder()
{
- for (QPtrListIterator<QWidget> it( d->orderedFocusWidgets ); it.current();) {
- if (! (it.current()->focusPolicy() & QWidget::TabFocus))
+ for (TQPtrListIterator<TQWidget> it( d->orderedFocusWidgets ); it.current();) {
+ if (! (it.current()->focusPolicy() & TQ_TabFocus))
d->orderedFocusWidgets.remove( it.current() );
else
++it;
@@ -377,7 +377,7 @@ void KexiDBForm::updateTabStopsOrder()
void KexiDBForm::updateReadOnlyFlags()
{
- for (QPtrListIterator<QWidget> it(d->orderedDataAwareWidgets); it.current(); ++it) {
+ for (TQPtrListIterator<TQWidget> it(d->orderedDataAwareWidgets); it.current(); ++it) {
KexiFormDataItemInterface* dataItem = dynamic_cast<KexiFormDataItemInterface*>( it.current() );
if (dataItem && !dataItem->dataSource().isEmpty()) {
if (dataAwareObject()->isReadOnly()) {
@@ -387,27 +387,27 @@ void KexiDBForm::updateReadOnlyFlags()
}
}
-bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
+bool KexiDBForm::eventFilter( TQObject * watched, TQEvent * e )
{
//kexipluginsdbg << e->type() << endl;
- if (e->type()==QEvent::Resize && watched == this)
+ if (e->type()==TQEvent::Resize && TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(this))
kexipluginsdbg << "RESIZE" << endl;
- if (e->type()==QEvent::KeyPress) {
+ if (e->type()==TQEvent::KeyPress) {
if (preview()) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int key = ke->key();
- bool tab = ke->state() == Qt::NoButton && key == Qt::Key_Tab;
- bool backtab = ((ke->state() == Qt::NoButton || ke->state() == Qt::ShiftButton) && key == Qt::Key_Backtab)
- || (ke->state() == Qt::ShiftButton && key == Qt::Key_Tab);
- QObject *o = watched; //focusWidget();
- QWidget* realWidget = dynamic_cast<QWidget*>(o); //will beused below (for tab/backtab handling)
+ bool tab = ke->state() == Qt::NoButton && key == TQt::Key_Tab;
+ bool backtab = ((ke->state() == Qt::NoButton || ke->state() == TQt::ShiftButton) && key == TQt::Key_Backtab)
+ || (ke->state() == TQt::ShiftButton && key == TQt::Key_Tab);
+ TQObject *o = watched; //tqfocusWidget();
+ TQWidget* realWidget = dynamic_cast<TQWidget*>(o); //will beused below (for tab/backtab handling)
if (!tab && !backtab) {
//for buttons, left/up and right/down keys act like tab/backtab (see qbutton.cpp)
- if (realWidget->inherits("QButton")) {
- if (ke->state() == Qt::NoButton && (key == Qt::Key_Right || key == Qt::Key_Down))
+ if (realWidget->inherits(TQBUTTON_OBJECT_NAME_STRING)) {
+ if (ke->state() == Qt::NoButton && (key == TQt::Key_Right || key == TQt::Key_Down))
tab = true;
- else if (ke->state() == Qt::NoButton && (key == Qt::Key_Left || key == Qt::Key_Up))
+ else if (ke->state() == Qt::NoButton && (key == TQt::Key_Left || key == TQt::Key_Up))
backtab = true;
}
}
@@ -415,21 +415,21 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
if (!tab && !backtab) {
// allow the editor widget to grab the key press event
while (true) {
- if (!o || o == dynamic_cast<QObject*>(d->dataAwareObject))
+ if (!o || o == dynamic_cast<TQObject*>(d->dataAwareObject))
break;
if (dynamic_cast<KexiFormDataItemInterface*>(o)) {
- realWidget = dynamic_cast<QWidget*>(o); //will be used below
+ realWidget = dynamic_cast<TQWidget*>(o); //will be used below
if (realWidget == this) //we have encountered 'this' form surface, give up
return false;
KexiFormDataItemInterface* dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(o);
while (dataItemIface) {
if (dataItemIface->keyPressed(ke))
return false;
- dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(dataItemIface->parentInterface()); //try in parent, e.g. in combobox
+ dataItemIface = dynamic_cast<KexiFormDataItemInterface*>(dataItemIface->tqparentInterface()); //try in tqparent, e.g. in combobox
}
break;
}
- o = o->parent();
+ o = o->tqparent();
}
// try to handle global shortcuts at the KexiDataAwareObjectInterface
// level (e.g. for "next record" action)
@@ -437,15 +437,15 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
int curCol = d->dataAwareObject->currentColumn();
bool moveToFirstField; //if true, we'll move focus to the first field (in tab order)
bool moveToLastField; //if true, we'll move focus to the first field (in tab order)
- if (! (ke->state() == Qt::NoButton && (key == Qt::Key_Home
- || key == Qt::Key_End || key == Qt::Key_Down || key == Qt::Key_Up))
+ if (! (ke->state() == Qt::NoButton && (key == TQt::Key_Home
+ || key == TQt::Key_End || key == TQt::Key_Down || key == TQt::Key_Up))
/* ^^ home/end/down/up are already handled by widgets */
&& d->dataAwareObject->handleKeyPress(
ke, curRow, curCol, false/*!fullRowSelection*/, &moveToFirstField, &moveToLastField))
{
if (ke->isAccepted())
return true;
- QWidget* widgetToFocus;
+ TQWidget* widgetToFocus;
if (moveToFirstField) {
widgetToFocus = d->orderedFocusWidgets.first(); //?
curCol = d->indexOfDataAwareWidget( widgetToFocus );
@@ -467,14 +467,14 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
ke->accept();
return true;
}
- if (key == Qt::Key_Delete && ke->state()==Qt::ControlButton) {
+ if (key == TQt::Key_Delete && ke->state()==TQt::ControlButton) {
//! @todo remove hardcoded shortcuts: can be reconfigured...
d->dataAwareObject->deleteCurrentRow();
return true;
}
}
// handle Esc key
- if (ke->state() == Qt::NoButton && key == Qt::Key_Escape) {
+ if (ke->state() == Qt::NoButton && key == TQt::Key_Escape) {
//cancel field editing/row editing if possible
if (d->dataAwareObject->cancelEditor())
return true;
@@ -482,29 +482,29 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
return true;
return false; // canceling not needed - pass the event to the active widget
}
- // jstaniek: Fix for Qt bug (handling e.g. Alt+2, Ctrl+2 keys on every platform)
+ // jstaniek: Fix for TQt bug (handling e.g. Alt+2, Ctrl+2 keys on every platform)
// It's important because we're using alt+2 short cut by default
// Damn! I've reported this to Trolltech in November 2004 - still not fixed.
- if (ke->isAccepted() && (ke->state() & Qt::AltButton) && ke->text()>="0" && ke->text()<="9")
+ if (ke->isAccepted() && (ke->state() & TQt::AltButton) && ke->text()>="0" && ke->text()<="9")
return true;
if (tab || backtab) {
//the watched widget can be a subwidget of a real widget, e.g. a drop down button of image box: find it
while (!KexiFormPart::library()->widgetInfoForClassName(realWidget->className()))
- realWidget = realWidget->parentWidget();
+ realWidget = realWidget->tqparentWidget();
if (!realWidget)
return true; //ignore
//the watched widget can be a subwidget of a real widget, e.g. autofield: find it
- //QWidget* realWidget = static_cast<QWidget*>(watched);
- while (dynamic_cast<KexiDataItemInterface*>(realWidget) && dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface())
- realWidget = dynamic_cast<QWidget*>( dynamic_cast<KexiDataItemInterface*>(realWidget)->parentInterface() );
+ //TQWidget* realWidget = TQT_TQWIDGET(watched);
+ while (dynamic_cast<KexiDataItemInterface*>(realWidget) && dynamic_cast<KexiDataItemInterface*>(realWidget)->tqparentInterface())
+ realWidget = dynamic_cast<TQWidget*>( dynamic_cast<KexiDataItemInterface*>(realWidget)->tqparentInterface() );
d->setOrderedFocusWidgetsIteratorTo( realWidget );
kexipluginsdbg << realWidget->name() << endl;
// find next/prev widget to focus
- QWidget *widgetToUnfocus = realWidget;
- QWidget *widgetToFocus = 0;
+ TQWidget *widgetToUnfocus = realWidget;
+ TQWidget *widgetToFocus = 0;
bool wasAtFirstWidget = false; //used to protect against infinite loop
while (true) {
if (tab) {
@@ -533,11 +533,11 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
widgetToFocus = d->orderedFocusWidgetsIterator.current();
- QObject *pageFor_widgetToFocus = 0;
+ TQObject *pageFor_widgetToFocus = 0;
KFormDesigner::TabWidget *tabWidgetFor_widgetToFocus
= KFormDesigner::findParent<KFormDesigner::TabWidget>(
widgetToFocus, "KFormDesigner::TabWidget", pageFor_widgetToFocus);
- if (tabWidgetFor_widgetToFocus && tabWidgetFor_widgetToFocus->currentPage()!=pageFor_widgetToFocus) {
+ if (tabWidgetFor_widgetToFocus && TQT_BASE_OBJECT(tabWidgetFor_widgetToFocus->currentPage())!=TQT_BASE_OBJECT(pageFor_widgetToFocus)) {
realWidget = widgetToFocus;
continue; //the new widget to focus is placed on invisible tab page: move to next widget
}
@@ -545,21 +545,21 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
}//while
//set focus, but don't use just setFocus() because certain widgets
- //behaves differently (e.g. QLineEdit calls selectAll()) when
- //focus event's reason is QFocusEvent::Tab
+ //behaves differently (e.g. TQLineEdit calls selectAll()) when
+ //focus event's reason is TQFocusEvent::Tab
if (widgetToFocus->focusProxy())
- widgetToFocus = widgetToFocus->focusProxy();
+ widgetToFocus = TQT_TQWIDGET(widgetToFocus->focusProxy());
if (widgetToFocus && d->dataAwareObject->acceptEditor()) {
if (tab) {
//try to accept this will validate the current input (if any)
- KexiUtils::unsetFocusWithReason(widgetToUnfocus, QFocusEvent::Tab);
- KexiUtils::setFocusWithReason(widgetToFocus, QFocusEvent::Tab);
+ KexiUtils::unsetFocusWithReason(widgetToUnfocus, TQFocusEvent::Tab);
+ KexiUtils::setFocusWithReason(widgetToFocus, TQFocusEvent::Tab);
kexipluginsdbg << "focusing " << widgetToFocus->name() << endl;
}
else {//backtab
- KexiUtils::unsetFocusWithReason(widgetToUnfocus, QFocusEvent::Backtab);
+ KexiUtils::unsetFocusWithReason(widgetToUnfocus, TQFocusEvent::Backtab);
//set focus, see above note
- KexiUtils::setFocusWithReason(d->orderedFocusWidgetsIterator.current(), QFocusEvent::Backtab);
+ KexiUtils::setFocusWithReason(d->orderedFocusWidgetsIterator.current(), TQFocusEvent::Backtab);
kexipluginsdbg << "focusing " << d->orderedFocusWidgetsIterator.current()->name() << endl;
}
}
@@ -567,9 +567,9 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
}
}
}
- else if (e->type()==QEvent::FocusIn) {
+ else if (e->type()==TQEvent::FocusIn) {
bool focusDataWidget = preview();
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
kdDebug() << "->>> focus IN, popup" <<endl;
focusDataWidget = !d->popupFocused;
d->popupFocused = false;
@@ -582,10 +582,10 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
if (focusDataWidget) {
kexipluginsdbg << "KexiDBForm: FocusIn: " << watched->className() << " " << watched->name() << endl;
if (d->dataAwareObject) {
- QWidget *dataItem = dynamic_cast<QWidget*>(watched);
+ TQWidget *dataItem = dynamic_cast<TQWidget*>(watched);
while (dataItem) {
while (dataItem && !dynamic_cast<KexiDataItemInterface*>(dataItem))
- dataItem = dataItem->parentWidget();
+ dataItem = dataItem->tqparentWidget();
if (!dataItem)
break;
kexipluginsdbg << "KexiDBForm: FocusIn: FOUND " << dataItem->className() << " " << dataItem->name() << endl;
@@ -600,23 +600,23 @@ bool KexiDBForm::eventFilter( QObject * watched, QEvent * e )
break;
}
else
- dataItem = dataItem->parentWidget();
+ dataItem = dataItem->tqparentWidget();
dataItem->update();
}
}
}
}
- else if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()==QFocusEvent::Popup) {
- //d->widgetFocusedBeforePopup = (QWidget*)watched;
+ else if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()==TQFocusEvent::Popup) {
+ //d->widgetFocusedBeforePopup = (TQWidget*)watched;
d->popupFocused = true;
}
else
d->popupFocused = false;
// d->widgetFocusedBeforePopup = 0;
-// kdDebug() << "e->type()==QEvent::FocusOut " << watched->className() << " " <<watched->name() << endl;
-// UNSET_FOCUS_USING_REASON(watched, static_cast<QFocusEvent*>(e)->reason());
+// kdDebug() << "e->type()==TQEvent::FocusOut " << watched->className() << " " <<watched->name() << endl;
+// UNSET_FOCUS_USING_REASON(watched, TQT_TQFOCUSEVENT(e)->reason());
}
return KexiDBFormBase::eventFilter(watched, e);
}
@@ -645,7 +645,7 @@ void KexiDBForm::setReadOnly( bool readOnly )
d->dataAwareObject->setReadOnly( readOnly ); //???
}
-QWidget* KexiDBForm::widget()
+TQWidget* KexiDBForm::widget()
{
return this;
}
@@ -670,19 +670,19 @@ bool KexiDBForm::preview() const {
? dynamic_cast<KexiScrollView*>(d->dataAwareObject)->preview() : false;
}
-void KexiDBForm::dragMoveEvent( QDragMoveEvent *e )
+void KexiDBForm::dragMoveEvent( TQDragMoveEvent *e )
{
KexiDBFormBase::dragMoveEvent( e );
emit handleDragMoveEvent(e);
}
-void KexiDBForm::dropEvent( QDropEvent *e )
+void KexiDBForm::dropEvent( TQDropEvent *e )
{
KexiDBFormBase::dropEvent( e );
emit handleDropEvent(e);
}
-void KexiDBForm::setCursor( const QCursor & cursor )
+void KexiDBForm::setCursor( const TQCursor & cursor )
{
//js: empty, to avoid fscking problems with random cursors!
//! @todo?
@@ -691,11 +691,11 @@ void KexiDBForm::setCursor( const QCursor & cursor )
KexiDBFormBase::setCursor(cursor);
}
-//! @todo: Qt4? XORed resize rectangles instead of black widgets
+//! @todo: TQt4? XORed resize rectangles instead of black widgets
/*
-void KexiDBForm::paintEvent( QPaintEvent *e )
+void KexiDBForm::paintEvent( TQPaintEvent *e )
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
diff --git a/kexi/plugins/forms/widgets/kexidbform.h b/kexi/plugins/forms/widgets/kexidbform.h
index 81a71bba4..cbfdc8eed 100644
--- a/kexi/plugins/forms/widgets/kexidbform.h
+++ b/kexi/plugins/forms/widgets/kexidbform.h
@@ -21,7 +21,7 @@
#ifndef KEXIDBFORM_H
#define KEXIDBFORM_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <formeditor/form.h>
#include "../kexiformdataiteminterface.h"
@@ -30,7 +30,7 @@
#include <kexigradientwidget.h>
# define KexiDBFormBase KexiGradientWidget
#else
-# define KexiDBFormBase QWidget
+# define KexiDBFormBase TQWidget
#endif
class KexiDataAwareObjectInterface;
@@ -43,88 +43,89 @@ class KEXIFORMUTILS_EXPORT KexiDBForm :
public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY(bool autoTabStops READ autoTabStops WRITE setAutoTabStops DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY(bool autoTabStops READ autoTabStops WRITE setAutoTabStops DESIGNABLE true)
//original "size" property is not designable, so here's a custom (not storable) replacement
- Q_PROPERTY( QSize sizeInternal READ sizeInternal WRITE resizeInternal DESIGNABLE true STORED false )
+ TQ_PROPERTY( TQSize sizeInternal READ sizeInternal WRITE resizeInternal DESIGNABLE true STORED false )
public:
- KexiDBForm(QWidget *parent, KexiDataAwareObjectInterface* dataAwareObject, const char *name="kexi_dbform");
+ KexiDBForm(TQWidget *tqparent, KexiDataAwareObjectInterface* dataAwareObject, const char *name="kexi_dbform");
virtual ~KexiDBForm();
KexiDataAwareObjectInterface* dataAwareObject() const;
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
//! no effect
- QVariant value() { return QVariant(); }
+ TQVariant value() { return TQVariant(); }
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
- virtual void drawRect(const QRect& r, int type);
- virtual void drawRects(const QValueList<QRect> &list, int type);
+ virtual void drawRect(const TQRect& r, int type);
+ virtual void drawRects(const TQValueList<TQRect> &list, int type);
virtual void initBuffer();
virtual void clearForm();
- virtual void highlightWidgets(QWidget *from, QWidget *to/*, const QPoint &p*/);
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
bool autoTabStops() const;
- QPtrList<QWidget>* orderedFocusWidgets() const;
+ TQPtrList<TQWidget>* orderedFocusWidgets() const;
- QPtrList<QWidget>* orderedDataAwareWidgets() const;
+ TQPtrList<TQWidget>* orderedDataAwareWidgets() const;
void updateTabStopsOrder(KFormDesigner::Form* form);
void updateTabStopsOrder();
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool isReadOnly() const;
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
virtual void clear();
bool preview() const;
- virtual void setCursor( const QCursor & cursor );
+ virtual void setCursor( const TQCursor & cursor );
public slots:
void setAutoTabStops(bool set);
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
//! This implementation just disables read only widget
virtual void setReadOnly( bool readOnly );
//! @internal for sizeInternal property
- QSize sizeInternal() const { return KexiDBFormBase::size(); }
+ TQSize sizeInternal() const { return KexiDBFormBase::size(); }
//! @internal for sizeInternal property
- void resizeInternal(const QSize& s) { KexiDBFormBase::resize(s); }
+ void resizeInternal(const TQSize& s) { KexiDBFormBase::resize(s); }
signals:
- void handleDragMoveEvent(QDragMoveEvent *e);
- void handleDropEvent(QDropEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
+ void handleDropEvent(TQDropEvent *e);
protected:
//! no effect
- virtual void setValueInternal(const QVariant&, bool) {}
+ virtual void setValueInternal(const TQVariant&, bool) {}
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
//! called from KexiFormScrollView::initDataContents()
void updateReadOnlyFlags();
-// virtual void paintEvent( QPaintEvent * );
+// virtual void paintEvent( TQPaintEvent * );
//! Points to a currently edited data item.
//! It is cleared when the focus is moved to other
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.cpp b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
index 82e700869..5f2f20e3b 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.cpp
@@ -20,15 +20,15 @@
#include "kexidbimagebox.h"
-#include <qapplication.h>
-#include <qpixmap.h>
-#include <qstyle.h>
-#include <qclipboard.h>
-#include <qtooltip.h>
-#include <qimage.h>
-#include <qbuffer.h>
-#include <qfiledialog.h>
-#include <qpainter.h>
+#include <tqapplication.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
+#include <tqimage.h>
+#include <tqbuffer.h>
+#include <tqfiledialog.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kpopupmenu.h>
@@ -51,7 +51,7 @@
#include <kexidb/queryschema.h>
#include <formeditor/widgetlibrary.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#include <krecentdirs.h>
#endif
@@ -59,15 +59,15 @@
#include "kexidbutils.h"
#include "../kexiformpart.h"
-static KStaticDeleter<QPixmap> KexiDBImageBox_pmDeleter;
-static QPixmap* KexiDBImageBox_pm = 0;
-static KStaticDeleter<QPixmap> KexiDBImageBox_pmSmallDeleter;
-static QPixmap* KexiDBImageBox_pmSmall = 0;
+static KStaticDeleter<TQPixmap> KexiDBImageBox_pmDeleter;
+static TQPixmap* KexiDBImageBox_pm = 0;
+static KStaticDeleter<TQPixmap> KexiDBImageBox_pmSmallDeleter;
+static TQPixmap* KexiDBImageBox_pmSmall = 0;
-KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *name )
- : KexiFrame( parent, name, Qt::WNoAutoErase )
+KexiDBImageBox::KexiDBImageBox( bool designMode, TQWidget *tqparent, const char *name )
+ : KexiFrame( tqparent, name, TQt::WNoAutoErase )
, KexiFormDataItemInterface()
- , m_alignment(Qt::AlignAuto|Qt::AlignTop)
+ , m_tqalignment(TQt::AlignAuto|TQt::AlignTop)
, m_designMode(designMode)
, m_readOnly(false)
, m_scaledContents(false)
@@ -80,7 +80,7 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *na
, m_insideSetPalette(false)
{
installEventFilter(this);
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Preferred);
//setup popup menu
m_popupMenu = new KexiImageContextMenu(this);
@@ -91,47 +91,47 @@ KexiDBImageBox::KexiDBImageBox( bool designMode, QWidget *parent, const char *na
}
else {
m_chooser = new KexiDropDownButton(this);
- m_chooser->setFocusPolicy(StrongFocus);
+ m_chooser->setFocusPolicy(TQ_StrongFocus);
m_chooser->setPopup(m_popupMenu);
setFocusProxy(m_chooser);
m_chooser->installEventFilter(this);
-// m_chooser->setPalette(qApp->palette());
+// m_chooser->setPalette(tqApp->palette());
// hlyr->addWidget(m_chooser);
}
- setBackgroundMode(Qt::NoBackground);
- setFrameShape(QFrame::Box);
- setFrameShadow(QFrame::Plain);
- setFrameColor(Qt::black);
+ setBackgroundMode(TQt::NoBackground);
+ setFrameShape(TQFrame::Box);
+ setFrameShadow(TQFrame::Plain);
+ setFrameColor(TQt::black);
m_paletteBackgroundColorChanged = false; //set this here, not before
- connect(m_popupMenu, SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
- this, SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
- connect(m_popupMenu, SIGNAL(insertFromFileRequested(const KURL&)),
- this, SLOT(handleInsertFromFileAction(const KURL&)));
- connect(m_popupMenu, SIGNAL(saveAsRequested(const QString&)),
- this, SLOT(handleSaveAsAction(const QString&)));
- connect(m_popupMenu, SIGNAL(cutRequested()),
- this, SLOT(handleCutAction()));
- connect(m_popupMenu, SIGNAL(copyRequested()),
- this, SLOT(handleCopyAction()));
- connect(m_popupMenu, SIGNAL(pasteRequested()),
- this, SLOT(handlePasteAction()));
- connect(m_popupMenu, SIGNAL(clearRequested()),
- this, SLOT(clear()));
- connect(m_popupMenu, SIGNAL(showPropertiesRequested()),
- this, SLOT(handleShowPropertiesAction()));
-
-// connect(m_popupMenu, SIGNAL(aboutToHide()), this, SLOT(slotAboutToHidePopupMenu()));
+ connect(m_popupMenu, TQT_SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
+ this, TQT_SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
+ connect(m_popupMenu, TQT_SIGNAL(insertFromFileRequested(const KURL&)),
+ this, TQT_SLOT(handleInsertFromFileAction(const KURL&)));
+ connect(m_popupMenu, TQT_SIGNAL(saveAsRequested(const TQString&)),
+ this, TQT_SLOT(handleSaveAsAction(const TQString&)));
+ connect(m_popupMenu, TQT_SIGNAL(cutRequested()),
+ this, TQT_SLOT(handleCutAction()));
+ connect(m_popupMenu, TQT_SIGNAL(copyRequested()),
+ this, TQT_SLOT(handleCopyAction()));
+ connect(m_popupMenu, TQT_SIGNAL(pasteRequested()),
+ this, TQT_SLOT(handlePasteAction()));
+ connect(m_popupMenu, TQT_SIGNAL(clearRequested()),
+ this, TQT_SLOT(clear()));
+ connect(m_popupMenu, TQT_SIGNAL(showPropertiesRequested()),
+ this, TQT_SLOT(handleShowPropertiesAction()));
+
+// connect(m_popupMenu, TQT_SIGNAL(aboutToHide()), this, TQT_SLOT(slotAboutToHidePopupMenu()));
// if (m_chooser) {
//we couldn't use m_chooser->setPopup() because of drawing problems
-// connect(m_chooser, SIGNAL(pressed()), this, SLOT(slotChooserPressed()));
-// connect(m_chooser, SIGNAL(released()), this, SLOT(slotChooserReleased()));
-// connect(m_chooser, SIGNAL(toggled(bool)), this, SLOT(slotToggled(bool)));
+// connect(m_chooser, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooserPressed()));
+// connect(m_chooser, TQT_SIGNAL(released()), this, TQT_SLOT(slotChooserReleased()));
+// connect(m_chooser, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled(bool)));
// }
- setDataSource( QString::null ); //to initialize popup menu and actions availability
+ setDataSource( TQString() ); //to initialize popup menu and actions availability
}
KexiDBImageBox::~KexiDBImageBox()
@@ -143,29 +143,29 @@ KexiImageContextMenu* KexiDBImageBox::contextMenu() const
return m_popupMenu;
}
-QVariant KexiDBImageBox::value()
+TQVariant KexiDBImageBox::value()
{
if (dataSource().isEmpty()) {
//not db-aware
- return QVariant();
+ return TQVariant();
}
//db-aware mode
return m_value; //todo
- //return QVariant(); //todo
+ //return TQVariant(); //todo
}
-void KexiDBImageBox::setValueInternal( const QVariant& add, bool removeOld, bool loadPixmap )
+void KexiDBImageBox::setValueInternal( const TQVariant& add, bool removeOld, bool loadPixmap )
{
if (isReadOnly())
return;
m_popupMenu->hide();
if (removeOld)
m_value = add.toByteArray();
- else //do not add "m_origValue" to "add" as this is QByteArray
+ else //do not add "m_origValue" to "add" as this is TQByteArray
m_value = m_origValue.toByteArray();
bool ok = !m_value.isEmpty();
if (ok) {
- ///unused (m_valueMimeType is not available unless the px is inserted) QString type( KImageIO::typeForMime(m_valueMimeType) );
+ ///unused (m_valueMimeType is not available unless the px is inserted) TQString type( KImageIO::typeForMime(m_valueMimeType) );
///ok = KImageIO::canRead( type );
ok = loadPixmap ? m_pixmap.loadFromData(m_value) : true; //, type.latin1());
if (!ok) {
@@ -173,22 +173,22 @@ void KexiDBImageBox::setValueInternal( const QVariant& add, bool removeOld, bool
}
}
if (!ok) {
- m_valueMimeType = QString::null;
- m_pixmap = QPixmap();
+ m_valueMimeType = TQString();
+ m_pixmap = TQPixmap();
}
- repaint();
+ tqrepaint();
}
-void KexiDBImageBox::setInvalidState( const QString& displayText )
+void KexiDBImageBox::setInvalidState( const TQString& displayText )
{
Q_UNUSED( displayText );
-// m_pixmapLabel->setPixmap(QPixmap());
+// m_pixmapLabel->setPixmap(TQPixmap());
if (!dataSource().isEmpty()) {
- m_value = QByteArray();
+ m_value = TQByteArray();
}
-// m_pixmap = QPixmap();
-// m_originalFileName = QString::null;
+// m_pixmap = TQPixmap();
+// m_originalFileName = TQString();
//! @todo m_pixmapLabel->setText( displayText );
@@ -218,7 +218,7 @@ void KexiDBImageBox::setReadOnly(bool set)
m_readOnly = set;
}
-QPixmap KexiDBImageBox::pixmap() const
+TQPixmap KexiDBImageBox::pixmap() const
{
if (dataSource().isEmpty()) {
//not db-aware
@@ -242,7 +242,7 @@ void KexiDBImageBox::setPixmapId(uint id)
if (m_insideSetData) //avoid recursion
return;
setData(KexiBLOBBuffer::self()->objectForId( id, /*unstored*/false ));
- repaint();
+ tqrepaint();
}
uint KexiDBImageBox::storedPixmapId() const
@@ -257,7 +257,7 @@ uint KexiDBImageBox::storedPixmapId() const
void KexiDBImageBox::setStoredPixmapId(uint id)
{
setData(KexiBLOBBuffer::self()->objectForId( id, /*stored*/true ));
- repaint();
+ tqrepaint();
}
bool KexiDBImageBox::hasScaledContents() const
@@ -266,27 +266,27 @@ bool KexiDBImageBox::hasScaledContents() const
// return m_pixmapLabel->hasScaledContents();
}
-/*void KexiDBImageBox::setPixmap(const QByteArray& pixmap)
+/*void KexiDBImageBox::setPixmap(const TQByteArray& pixmap)
{
setValueInternal(pixmap, true);
-// setBackgroundMode(pixmap.isNull() ? Qt::NoBackground : Qt::PaletteBackground);
+// setBackgroundMode(pixmap.isNull() ? TQt::NoBackground : TQt::PaletteBackground);
}*/
void KexiDBImageBox::setScaledContents(bool set)
{
//todo m_pixmapLabel->setScaledContents(set);
m_scaledContents = set;
- repaint();
+ tqrepaint();
}
void KexiDBImageBox::setKeepAspectRatio(bool set)
{
m_keepAspectRatio = set;
if (m_scaledContents)
- repaint();
+ tqrepaint();
}
-QWidget* KexiDBImageBox::widget()
+TQWidget* KexiDBImageBox::widget()
{
//! @todo
// return m_pixmapLabel;
@@ -303,7 +303,7 @@ bool KexiDBImageBox::cursorAtEnd()
return true;
}
-QByteArray KexiDBImageBox::data() const
+TQByteArray KexiDBImageBox::data() const
{
if (dataSource().isEmpty()) {
//static mode
@@ -331,19 +331,19 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url)
if (!h)
return;
setData(h);
- repaint();
+ tqrepaint();
}
else {
//db-aware
- QString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
+ TQString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
//! @todo download the file if remote, then set fileName properly
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly)) {
//! @todo err msg
return;
}
- QByteArray ba = f.readAll();
+ TQByteArray ba = f.readAll();
if (f.status()!=IO_Ok) {
//! @todo err msg
f.close();
@@ -359,7 +359,7 @@ void KexiDBImageBox::handleInsertFromFileAction(const KURL& url)
}
}
-void KexiDBImageBox::handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty)
+void KexiDBImageBox::handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty)
{
if (data().isEmpty()) {
kdWarning() << "KexiDBImageBox::handleAboutToSaveAs(): no pixmap!" << endl;
@@ -369,15 +369,15 @@ void KexiDBImageBox::handleAboutToSaveAsAction(QString& origFilename, QString& f
if (dataSource().isEmpty()) { //for static images filename and mimetype can be available
origFilename = m_data.originalFileName();
if (!origFilename.isEmpty())
- origFilename = QString("/") + origFilename;
+ origFilename = TQString("/") + origFilename;
if (!m_data.mimeType().isEmpty())
fileExtension = KImageIO::typeForMime(m_data.mimeType()).lower();
}
}
-void KexiDBImageBox::handleSaveAsAction(const QString& fileName)
+void KexiDBImageBox::handleSaveAsAction(const TQString& fileName)
{
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_WriteOnly)) {
//! @todo err msg
return;
@@ -401,14 +401,14 @@ void KexiDBImageBox::handleCutAction()
void KexiDBImageBox::handleCopyAction()
{
- qApp->clipboard()->setPixmap(pixmap(), QClipboard::Clipboard);
+ tqApp->tqclipboard()->setPixmap(pixmap(), TQClipboard::Clipboard);
}
void KexiDBImageBox::handlePasteAction()
{
if (isReadOnly() || (!m_designMode && !hasFocus()))
return;
- QPixmap pm( qApp->clipboard()->pixmap(QClipboard::Clipboard) );
+ TQPixmap pm( tqApp->tqclipboard()->pixmap(TQClipboard::Clipboard) );
// if (!pm.isNull())
// setValueInternal(pm, true);
if (dataSource().isEmpty()) {
@@ -418,18 +418,18 @@ void KexiDBImageBox::handlePasteAction()
else {
//db-aware mode
m_pixmap = pm;
- QByteArray ba;
- QBuffer buffer( ba );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
if (m_pixmap.save( &buffer, "PNG" )) {// write pixmap into ba in PNG format
setValueInternal( ba, true, false/* !loadPixmap */ );
}
else {
- setValueInternal( QByteArray(), true );
+ setValueInternal( TQByteArray(), true );
}
}
- repaint();
+ tqrepaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();
signalValueChanged();
@@ -446,16 +446,16 @@ void KexiDBImageBox::clear()
if (isReadOnly())
return;
//db-aware mode
- setValueInternal(QByteArray(), true);
- //m_pixmap = QPixmap();
+ setValueInternal(TQByteArray(), true);
+ //m_pixmap = TQPixmap();
}
-// m_originalFileName = QString::null;
+// m_originalFileName = TQString();
//! @todo emit signal for setting "dirty" flag within the design
-// m_pixmap = QPixmap(); //will be loaded on demand
- repaint();
+// m_pixmap = TQPixmap(); //will be loaded on demand
+ tqrepaint();
if (!dataSource().isEmpty()) {
// emit pixmapChanged();//valueChanged(data());
signalValueChanged();
@@ -492,7 +492,7 @@ void KexiDBImageBox::slotAboutToHidePopupMenu()
}
}*/
-void KexiDBImageBox::contextMenuEvent( QContextMenuEvent * e )
+void KexiDBImageBox::contextMenuEvent( TQContextMenuEvent * e )
{
if (popupMenuAvailable())
m_popupMenu->exec( e->globalPos(), -1 );
@@ -519,20 +519,20 @@ void KexiDBImageBox::slotToggled(bool on)
return;
}
m_chooser->disableMousePress = false;
- QRect screen = qApp->desktop()->availableGeometry( m_chooser );
- QPoint p;
- if ( QApplication::reverseLayout() ) {
- if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
+ TQRect screen = tqApp->desktop()->availableGeometry( m_chooser );
+ TQPoint p;
+ if ( TQApplication::reverseLayout() ) {
+ if ( (mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomRight() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - QPoint( 0, m_popupMenu->sizeHint().height() ) );
- p.rx() -= m_popupMenu->sizeHint().width();
+ p = m_chooser->mapToGlobal( m_chooser->rect().topRight() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
+ p.rx() -= m_popupMenu->tqsizeHint().width();
}
else {
- if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->sizeHint().height()) <= screen.height() )
+ if ( (m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() ).y() + m_popupMenu->tqsizeHint().height()) <= screen.height() )
p = m_chooser->mapToGlobal( m_chooser->rect().bottomLeft() );
else
- p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - QPoint( 0, m_popupMenu->sizeHint().height() ) );
+ p = m_chooser->mapToGlobal( m_chooser->rect().topLeft() - TQPoint( 0, m_popupMenu->tqsizeHint().height() ) );
}
if (!m_popupMenu->isVisible() && on) {
m_popupMenu->exec( p, -1 );
@@ -546,7 +546,7 @@ void KexiDBImageBox::updateActionStrings()
if (!m_popupMenu)
return;
if (m_designMode) {
-/* QString titleString( i18n("Image Box") );
+/* TQString titleString( i18n("Image Box") );
if (!dataSource().isEmpty())
titleString.prepend(dataSource() + " : ");
m_popupMenu->changeTitle(m_popupMenu->idAt(0), m_popupMenu->titlePixmap(m_popupMenu->idAt(0)), titleString);*/
@@ -561,19 +561,19 @@ void KexiDBImageBox::updateActionStrings()
if (m_chooser) {
if (popupMenuAvailable() && dataSource().isEmpty()) { //this may work in the future (see @todo below)
- QToolTip::add(m_chooser, i18n("Click to show actions for this image box"));
+ TQToolTip::add(m_chooser, i18n("Click to show actions for this image box"));
} else {
- QString beautifiedImageBoxName;
+ TQString beautifiedImageBoxName;
if (m_designMode) {
beautifiedImageBoxName = dataSource();
}
else {
- beautifiedImageBoxName = columnInfo() ? columnInfo()->captionOrAliasOrName() : QString::null;
+ beautifiedImageBoxName = columnInfo() ? columnInfo()->captionOrAliasOrName() : TQString();
/*! @todo look at makeFirstCharacterUpperCaseInCaptions setting [bool]
(see doc/dev/settings.txt) */
beautifiedImageBoxName = beautifiedImageBoxName[0].upper() + beautifiedImageBoxName.mid(1);
}
- QToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").arg(beautifiedImageBoxName));
+ TQToolTip::add(m_chooser, i18n("Click to show actions for \"%1\" image box").tqarg(beautifiedImageBoxName));
}
}
}
@@ -586,7 +586,7 @@ bool KexiDBImageBox::popupMenuAvailable()
return !dataSource().isEmpty();
}
-void KexiDBImageBox::setDataSource( const QString &ds )
+void KexiDBImageBox::setDataSource( const TQString &ds )
{
KexiFormDataItemInterface::setDataSource( ds );
setData(KexiBLOBBuffer::Handle());
@@ -608,96 +608,96 @@ void KexiDBImageBox::setDataSource( const QString &ds )
if (!m_lineWidthChanged) {
KexiFrame::setLineWidth( ds.isEmpty() ? 0 : 1 );
}
- if (!m_paletteBackgroundColorChanged && parentWidget()) {
+ if (!m_paletteBackgroundColorChanged && tqparentWidget()) {
KexiFrame::setPaletteBackgroundColor(
- dataSource().isEmpty() ? parentWidget()->paletteBackgroundColor() : palette().active().base() );
+ dataSource().isEmpty() ? tqparentWidget()->paletteBackgroundColor() : tqpalette().active().base() );
}
}
-QSize KexiDBImageBox::sizeHint() const
+TQSize KexiDBImageBox::tqsizeHint() const
{
if (pixmap().isNull())
- return QSize(80, 80);
+ return TQSize(80, 80);
return pixmap().size();
}
int KexiDBImageBox::realLineWidth() const
{
- if (frameShape()==QFrame::Box && (frameShadow()==QFrame::Sunken || frameShadow()==QFrame::Raised))
+ if (frameShape()==TQFrame::Box && (frameShadow()==TQFrame::Sunken || frameShadow()==TQFrame::Raised))
return 2 * lineWidth();
else
return lineWidth();
}
-void KexiDBImageBox::paintEvent( QPaintEvent *pe )
+void KexiDBImageBox::paintEvent( TQPaintEvent *pe )
{
if (!m_paintEventEnabled)
return;
- QPainter p(this);
+ TQPainter p(this);
p.setClipRect(pe->rect());
const int m = realLineWidth() + margin();
- QColor bg(eraseColor());
+ TQColor bg(eraseColor());
if (m_designMode && pixmap().isNull()) {
- QPixmap pm(size()-QSize(m, m));
- QPainter p2;
- p2.begin(&pm, this);
+ TQPixmap pm(size()-TQSize(m, m));
+ TQPainter p2;
+ p2.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
p2.fillRect(0,0,width(),height(), bg);
updatePixmap();
- QPixmap *imagBoxPm;
+ TQPixmap *imagBoxPm;
const bool tooLarge = (height()-m-m) <= KexiDBImageBox_pm->height();
if (tooLarge || (width()-m-m) <= KexiDBImageBox_pm->width())
imagBoxPm = KexiDBImageBox_pmSmall;
else
imagBoxPm = KexiDBImageBox_pm;
- QImage img(imagBoxPm->convertToImage());
+ TQImage img(imagBoxPm->convertToImage());
img = KImageEffect::flatten(img, bg.dark(150),
- qGray( bg.rgb() ) <= 20 ? QColor(Qt::gray).dark(150) : bg.light(105));
+ tqGray( bg.rgb() ) <= 20 ? TQColor(TQt::gray).dark(150) : bg.light(105));
- QPixmap converted;
+ TQPixmap converted;
converted.convertFromImage(img);
// if (tooLarge)
// p2.drawPixmap(2, 2, converted);
// else
p2.drawPixmap(2, height()-m-m-imagBoxPm->height()-2, converted);
- QFont f(qApp->font());
+ TQFont f(tqApp->font());
p2.setFont(f);
p2.setPen( KexiUtils::contrastColor( bg ) );
- p2.drawText(pm.rect(), Qt::AlignCenter,
+ p2.drawText(pm.rect(), TQt::AlignCenter,
dataSource().isEmpty()
- ? QString::fromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
+ ? TQString::tqfromLatin1(name())+"\n"+i18n("Unbound Image Box", "(unbound)") //i18n("No Image")
: dataSource());
p2.end();
bitBlt(this, m, m, &pm);
}
else {
- QSize internalSize(size());
+ TQSize internalSize(size());
if (m_chooser && m_dropDownButtonVisible && !dataSource().isEmpty())
internalSize.setWidth( internalSize.width() - m_chooser->width() );
//clearing needed here because we may need to draw a pixmap with transparency
p.fillRect(0,0,width(),height(), bg);
- KexiUtils::drawPixmap( p, m, QRect(QPoint(0,0), internalSize), pixmap(), m_alignment,
+ KexiUtils::drawPixmap( p, m, TQRect(TQPoint(0,0), internalSize), pixmap(), m_tqalignment,
m_scaledContents, m_keepAspectRatio );
}
KexiFrame::drawFrame( &p );
// if the widget is focused, draw focus indicator rect _if_ there is no chooser button
if (!m_designMode && !dataSource().isEmpty() && hasFocus() && (!m_chooser || !m_chooser->isVisible())) {
- style().drawPrimitive(
- QStyle::PE_FocusRect, &p, style().subRect(QStyle::SR_PushButtonContents, this),
- palette().active() );
+ tqstyle().tqdrawPrimitive(
+ TQStyle::PE_FocusRect, &p, tqstyle().subRect(TQStyle::SR_PushButtonContents, this),
+ tqpalette().active() );
}
}
-/* virtual void KexiDBImageBox::paletteChange ( const QPalette & oldPalette )
+/* virtual void KexiDBImageBox::paletteChange ( const TQPalette & oldPalette )
{
- QFrame::paletteChange(oldPalette);
+ TQFrame::paletteChange(oldPalette);
if (oldPalette.active().background()!=palette().active().background()) {
delete KexiDBImageBox_pm;
KexiDBImageBox_pm = 0;
- repaint();
+ tqrepaint();
}
}*/
@@ -707,19 +707,19 @@ void KexiDBImageBox::updatePixmap()
return;
if (!KexiDBImageBox_pm) {
- QString fname( locate("data", QString("kexi/pics/imagebox.png")) );
- KexiDBImageBox_pmDeleter.setObject( KexiDBImageBox_pm, new QPixmap(fname, "PNG") );
- QImage img(KexiDBImageBox_pm->convertToImage());
+ TQString fname( locate("data", TQString("kexi/pics/imagebox.png")) );
+ KexiDBImageBox_pmDeleter.setObject( KexiDBImageBox_pm, new TQPixmap(fname, "PNG") );
+ TQImage img(KexiDBImageBox_pm->convertToImage());
KexiDBImageBox_pmSmallDeleter.setObject( KexiDBImageBox_pmSmall,
- new QPixmap( img.smoothScale(img.width()/2, img.height()/2, QImage::ScaleMin) ) );
+ new TQPixmap( img.smoothScale(img.width()/2, img.height()/2, TQ_ScaleMin) ) );
}
}
-void KexiDBImageBox::setAlignment(int alignment)
+void KexiDBImageBox::tqsetAlignment(int tqalignment)
{
- m_alignment = alignment;
+ m_tqalignment = tqalignment;
if (!m_scaledContents || m_keepAspectRatio)
- repaint();
+ tqrepaint();
}
void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle)
@@ -733,23 +733,23 @@ void KexiDBImageBox::setData(const KexiBLOBBuffer::Handle& handle)
update();
}
-void KexiDBImageBox::resizeEvent( QResizeEvent * e )
+void KexiDBImageBox::resizeEvent( TQResizeEvent * e )
{
KexiFrame::resizeEvent(e);
if (m_chooser) {
- QSize s( m_chooser->sizeHint() );
- QSize margin( realLineWidth(), realLineWidth() );
+ TQSize s( m_chooser->tqsizeHint() );
+ TQSize margin( realLineWidth(), realLineWidth() );
s.setHeight( height() - 2*margin.height() );
s = s.boundedTo( size()-2*margin );
m_chooser->resize( s );
- m_chooser->move( QRect(QPoint(0,0), e->size() - m_chooser->size() - margin + QSize(1,1)).bottomRight() );
+ m_chooser->move( TQRect(TQPoint(0,0), e->size() - m_chooser->size() - margin + TQSize(1,1)).bottomRight() );
}
}
/*
-bool KexiDBImageBox::setProperty( const char * name, const QVariant & value )
+bool KexiDBImageBox::setProperty( const char * name, const TQVariant & value )
{
- const bool ret = QLabel::setProperty(name, value);
+ const bool ret = TQLabel::setProperty(name, value);
if (p_shadowEnabled) {
if (0==qstrcmp("indent", name) || 0==qstrcmp("font", name) || 0==qstrcmp("margin", name)
|| 0==qstrcmp("frameShadow", name) || 0==qstrcmp("frameShape", name)
@@ -770,16 +770,16 @@ void KexiDBImageBox::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
updateActionStrings();
}
-bool KexiDBImageBox::keyPressed(QKeyEvent *ke)
+bool KexiDBImageBox::keyPressed(TQKeyEvent *ke)
{
// Esc key should close the popup
- if (ke->state() == Qt::NoButton && ke->key() == Qt::Key_Escape) {
+ if (ke->state() == Qt::NoButton && ke->key() == TQt::Key_Escape) {
if (m_popupMenu->isVisible()) {
m_setFocusOnButtonAfterClosingPopup = true;
return true;
}
}
-// else if (ke->state() == Qt::ControlButton && KStdAccel::shortcut(KStdAccel::Copy).keyCodeQt() == (ke->key()|Qt::CTRL)) {
+// else if (ke->state() == TQt::ControlButton && KStdAccel::shortcut(KStdAccel::Copy).keyCodeTQt() == (ke->key()|TQt::CTRL)) {
// }
return false;
}
@@ -790,7 +790,7 @@ void KexiDBImageBox::setLineWidth( int width )
KexiFrame::setLineWidth(width);
}
-void KexiDBImageBox::setPalette( const QPalette &pal )
+void KexiDBImageBox::setPalette( const TQPalette &pal )
{
KexiFrame::setPalette(pal);
if (m_insideSetPalette)
@@ -801,13 +801,13 @@ void KexiDBImageBox::setPalette( const QPalette &pal )
m_insideSetPalette = false;
}
-void KexiDBImageBox::setPaletteBackgroundColor( const QColor & color )
+void KexiDBImageBox::setPaletteBackgroundColor( const TQColor & color )
{
- kexipluginsdbg << "KexiDBImageBox::setPaletteBackgroundColor(): " << color.name() << endl;
+ kexipluginsdbg << "KexiDBImageBox::setPaletteBackgroundColor(): " << TQString(color.name()) << endl;
m_paletteBackgroundColorChanged = true;
KexiFrame::setPaletteBackgroundColor(color);
if (m_chooser)
- m_chooser->setPalette( qApp->palette() );
+ m_chooser->setPalette( tqApp->palette() );
}
bool KexiDBImageBox::dropDownButtonVisible() const
@@ -835,33 +835,33 @@ bool KexiDBImageBox::subwidgetStretchRequired(KexiDBAutoField* autoField) const
return true;
}
-bool KexiDBImageBox::eventFilter( QObject * watched, QEvent * e )
+bool KexiDBImageBox::eventFilter( TQObject * watched, TQEvent * e )
{
- if (watched==this || watched==m_chooser) { //we're watching chooser as well because it's a focus proxy even if invisible
- if (e->type()==QEvent::FocusIn || e->type()==QEvent::FocusOut || e->type()==QEvent::MouseButtonPress) {
- update(); //to repaint focus rect
+ if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_chooser)) { //we're watching chooser as well because it's a focus proxy even if invisible
+ if (e->type()==TQEvent::FocusIn || e->type()==TQEvent::FocusOut || e->type()==TQEvent::MouseButtonPress) {
+ update(); //to tqrepaint focus rect
}
}
// hide popup menu as soon as it loses focus
- if (watched==m_popupMenu && e->type()==QEvent::FocusOut) {
+ if (TQT_BASE_OBJECT(watched)==TQT_BASE_OBJECT(m_popupMenu) && e->type()==TQEvent::FocusOut) {
m_popupMenu->hide();
}
return KexiFrame::eventFilter(watched, e);
}
-QWidget::FocusPolicy KexiDBImageBox::focusPolicy() const
+TQ_FocusPolicy KexiDBImageBox::focusPolicy() const
{
if (dataSource().isEmpty())
- return NoFocus;
+ return TQ_NoFocus;
return m_focusPolicyInternal;
}
-QWidget::FocusPolicy KexiDBImageBox::focusPolicyInternal() const
+TQ_FocusPolicy KexiDBImageBox::focusPolicyInternal() const
{
return m_focusPolicyInternal;
}
-void KexiDBImageBox::setFocusPolicy( FocusPolicy policy )
+void KexiDBImageBox::setFocusPolicy( TQ_FocusPolicy policy )
{
m_focusPolicyInternal = policy;
KexiFrame::setFocusPolicy( focusPolicy() ); //set modified policy
diff --git a/kexi/plugins/forms/widgets/kexidbimagebox.h b/kexi/plugins/forms/widgets/kexidbimagebox.h
index 3ad2f710b..85b54cd58 100644
--- a/kexi/plugins/forms/widgets/kexidbimagebox.h
+++ b/kexi/plugins/forms/widgets/kexidbimagebox.h
@@ -38,46 +38,47 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
public KexiSubwidgetInterface
{
Q_OBJECT
- Q_PROPERTY( QString dataSource READ dataSource WRITE setDataSource )
- Q_PROPERTY( QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
-// Q_PROPERTY( QPixmap pixmap READ pixmap WRITE setPixmap )
-// Q_PROPERTY( QByteArray pixmapData READ pixmapData WRITE setPixmapData )
- Q_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
- Q_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
- Q_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
- Q_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
- Q_PROPERTY( Alignment alignment READ alignment WRITE setAlignment )
-// Q_PROPERTY( QString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
-// Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
- Q_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
- Q_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
- Q_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString dataSource READ dataSource WRITE setDataSource )
+ TQ_PROPERTY( TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType )
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly )
+// TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+// TQ_PROPERTY( TQByteArray pixmapData READ pixmapData WRITE setPixmapData )
+ TQ_PROPERTY( uint pixmapId READ pixmapId WRITE setPixmapId DESIGNABLE true STORED false )
+ TQ_PROPERTY( uint storedPixmapId READ storedPixmapId WRITE setStoredPixmapId DESIGNABLE false STORED true )
+ TQ_PROPERTY( bool scaledContents READ hasScaledContents WRITE setScaledContents )
+ TQ_PROPERTY( bool keepAspectRatio READ keepAspectRatio WRITE setKeepAspectRatio )
+ TQ_PROPERTY( int tqalignment READ tqalignment WRITE tqsetAlignment )
+// TQ_PROPERTY( TQString originalFileName READ originalFileName WRITE setOriginalFileName DESIGNABLE false )
+// TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy )
+ TQ_PROPERTY( bool dropDownButtonVisible READ dropDownButtonVisible WRITE setDropDownButtonVisible )
+ TQ_OVERRIDE( int lineWidth READ lineWidth WRITE setLineWidth )
+ TQ_OVERRIDE( FocusPolicy focusPolicy READ focusPolicyInternal WRITE setFocusPolicy )
public:
- KexiDBImageBox( bool designMode, QWidget *parent, const char *name = 0 );
+ KexiDBImageBox( bool designMode, TQWidget *tqparent, const char *name = 0 );
virtual ~KexiDBImageBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value(); // { return m_value.data(); }
+ virtual TQVariant value(); // { return m_value.data(); }
-// QByteArray pixmapData() const { return m_value.data(); }
+// TQByteArray pixmapData() const { return m_value.data(); }
- QPixmap pixmap() const;
+ TQPixmap pixmap() const;
uint pixmapId() const;
uint storedPixmapId() const;
//
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
virtual bool valueIsNull();
virtual bool valueIsEmpty();
- virtual QWidget* widget();
+ virtual TQWidget* widget();
//! always true
virtual bool cursorAtStart();
@@ -86,7 +87,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
virtual bool cursorAtEnd();
// //! used to catch setIndent(), etc.
-// virtual bool setProperty ( const char * name, const QVariant & value );
+// virtual bool setProperty ( const char * name, const TQVariant & value );
virtual bool isReadOnly() const;
@@ -94,28 +95,28 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
// bool designMode() const { return m_designMode; }
- int alignment() const { return m_alignment; }
+ int tqalignment() const { return m_tqalignment; }
bool keepAspectRatio() const { return m_keepAspectRatio; }
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiImageContextMenu *contextMenu() const;
/*! \return original file name of image loaded from a file.
This can be later reused for displaying the image within a collection (to be implemented)
or on saving the image data back to file. */
-//todo QString originalFileName() const { return m_value.originalFileName(); }
+//todo TQString originalFileName() const { return m_value.originalFileName(); }
//! Reimplemented to override behaviour of "lineWidth" property.
virtual void setLineWidth( int width );
//! Reimplemented to override behaviour of "paletteBackgroundColor"
//! and "paletteForegroundColor" properties.
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
//! Reimplemented to override behaviour of "paletteBackgroundColor" property.
- virtual void setPaletteBackgroundColor( const QColor & color );
+ virtual void setPaletteBackgroundColor( const TQColor & color );
//! \return true id drop down button should be visible (the default).
bool dropDownButtonVisible() const;
@@ -126,14 +127,14 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Overriden to change the policy behaviour a bit:
NoFocus is returned regardless the real focus flag
if the data source is empty (see dataSource()). */
- FocusPolicy focusPolicy() const;
+ TQ_FocusPolicy focusPolicy() const;
//! \return the internal focus policy value, i.e. the one unrelated to data source presence.
- FocusPolicy focusPolicyInternal() const;
+ TQ_FocusPolicy focusPolicyInternal() const;
/*! Sets the internal focus policy value.
"Internal" means that if there is no data source set, real policy becomes NoFocus. */
- virtual void setFocusPolicy( FocusPolicy policy );
+ virtual void setFocusPolicy( TQ_FocusPolicy policy );
public slots:
void setPixmapId(uint id);
@@ -141,23 +142,23 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void setStoredPixmapId(uint id);
//! Sets the datasource to \a ds
- virtual void setDataSource( const QString &ds );
+ virtual void setDataSource( const TQString &ds );
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly(bool set);
//! Sets \a pixmapData data for this widget. If the widget has data source set,
//! the pixmap will be also placed inside of the buffer and saved later.
-//todo void setPixmapData(const QByteArray& pixmapData) { m_value.setData(pixmapData); }
+//todo void setPixmapData(const TQByteArray& pixmapData) { m_value.setData(pixmapData); }
/*! Sets original file name of image loaded from a file.
@see originalFileName() */
-//todo void setOriginalFileName(const QString& name) { m_value.setOriginalFileName(name); }
+//todo void setOriginalFileName(const TQString& name) { m_value.setOriginalFileName(name); }
void setScaledContents(bool set);
- void setAlignment(int alignment);
+ void tqsetAlignment(int tqalignment);
void setKeepAspectRatio(bool set);
@@ -176,7 +177,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Used for db-aware mode. Emitted when value has been changed.
//! Actual value can be obtained using value().
// virtual void pixmapChanged();
-// virtual void valueChanged(const QByteArray& data);
+// virtual void valueChanged(const TQByteArray& data);
void idChanged(long id);
@@ -184,8 +185,8 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
void slotUpdateActionsAvailabilityRequested(bool& valueIsNull, bool& valueIsReadOnly);
void handleInsertFromFileAction(const KURL& url);
- void handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
- void handleSaveAsAction(const QString& fileName);
+ void handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty);
+ void handleSaveAsAction(const TQString& fileName);
void handleCutAction();
void handleCopyAction();
void handlePasteAction();
@@ -194,22 +195,22 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
protected:
//! \return data depending on the current mode (db-aware or static)
- QByteArray data() const;
+ TQByteArray data() const;
- virtual void contextMenuEvent ( QContextMenuEvent * e );
-// virtual void mousePressEvent( QMouseEvent *e );
+ virtual void contextMenuEvent ( TQContextMenuEvent * e );
+// virtual void mousePressEvent( TQMouseEvent *e );
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* e );
- virtual bool eventFilter( QObject * watched, QEvent * e );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* e );
+ virtual bool eventFilter( TQObject * watched, TQEvent * e );
//! Sets value \a value for a widget.
- virtual void setValueInternal( const QVariant& add, bool removeOld ) {
+ virtual void setValueInternal( const TQVariant& add, bool removeOld ) {
setValueInternal( add, removeOld, true /*loadPixmap*/ );
}
//! @internal, added \a loadPixmap option used by paste().
- void setValueInternal( const QVariant& add, bool removeOld, bool loadPixmap );
+ void setValueInternal( const TQVariant& add, bool removeOld, bool loadPixmap );
//! Updates i18n'd action strings after datasource change
void updateActionStrings();
@@ -223,7 +224,7 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
/*! Called by top-level form on key press event.
Used for Key_Escape to if the popup is visible,
so the key press won't be consumed to perform "cancel editing". */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
//! \return real line width, i.e. for Boxed sunken or Boxed raised
//! frames returns doubled width value.
@@ -232,33 +233,33 @@ class KEXIFORMUTILS_EXPORT KexiDBImageBox :
//! Implemented for KexiSubwidgetInterface
virtual bool subwidgetStretchRequired(KexiDBAutoField* autoField) const;
-// virtual void drawContents ( QPainter *p );
+// virtual void drawContents ( TQPainter *p );
-// virtual void fontChange( const QFont& font );
-// virtual void styleChange( QStyle& style );
+// virtual void fontChange( const TQFont& font );
+// virtual void styleChange( TQStyle& style );
// virtual void enabledChange( bool enabled );
-// virtual void paletteChange( const QPalette& pal );
+// virtual void paletteChange( const TQPalette& pal );
// virtual void frameChanged();
-// virtual void showEvent( QShowEvent* e );
+// virtual void showEvent( TQShowEvent* e );
// void updatePixmapLater();
// class ImageLabel;
// ImageLabel *m_pixmapLabel;
- QPixmap m_pixmap;
- QByteArray m_value; //!< for db-aware mode
- QString m_valueMimeType; //!< for db-aware mode
+ TQPixmap m_pixmap;
+ TQByteArray m_value; //!< for db-aware mode
+ TQString m_valueMimeType; //!< for db-aware mode
// PixmapData m_value;
KexiBLOBBuffer::Handle m_data;
-// QString m_originalFileName;
+// TQString m_originalFileName;
KexiDropDownButton *m_chooser;
KexiImageContextMenu *m_popupMenu;
//moved KActionCollection m_actionCollection;
//moved KAction *m_insertFromFileAction, *m_saveAsAction, *m_cutAction, *m_copyAction, *m_pasteAction,
// *m_deleteAction, *m_propertiesAction;
-// QTimer m_clickTimer;
- int m_alignment;
- FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
+// TQTimer m_clickTimer;
+ int m_tqalignment;
+ TQ_FocusPolicy m_focusPolicyInternal; //!< Used for focusPolicyInternal()
bool m_designMode : 1;
bool m_readOnly : 1;
bool m_scaledContents : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbintspinbox.cpp b/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
index ac9233474..7d5ae6ee3 100644
--- a/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
+++ b/kexi/plugins/forms/widgets/kexidbintspinbox.cpp
@@ -20,27 +20,27 @@
#include "kexidbintspinbox.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <knumvalidator.h>
-KexiDBIntSpinBox::KexiDBIntSpinBox(QWidget *parent, const char *name)
- : KIntSpinBox(parent, name) , KexiFormDataItemInterface()
+KexiDBIntSpinBox::KexiDBIntSpinBox(TQWidget *tqparent, const char *name)
+ : KIntSpinBox(tqparent, name) , KexiFormDataItemInterface()
{
- connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged()));
+ connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged()));
}
KexiDBIntSpinBox::~KexiDBIntSpinBox()
{
}
-void KexiDBIntSpinBox::setInvalidState( const QString& displayText )
+void KexiDBIntSpinBox::setInvalidState( const TQString& displayText )
{
m_invalidState = true;
setEnabled(false);
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
setSpecialValueText(displayText);
KIntSpinBox::setValue(minValue());
}
@@ -54,12 +54,12 @@ KexiDBIntSpinBox::setEnabled(bool enabled)
KIntSpinBox::setEnabled(enabled);
}
-void KexiDBIntSpinBox::setValueInternal(const QVariant&, bool)
+void KexiDBIntSpinBox::setValueInternal(const TQVariant&, bool)
{
KIntSpinBox::setValue(m_origValue.toInt());
}
-QVariant
+TQVariant
KexiDBIntSpinBox::value()
{
return KIntSpinBox::value();
@@ -90,7 +90,7 @@ void KexiDBIntSpinBox::setReadOnly(bool set)
editor()->setReadOnly(set);
}
-QWidget*
+TQWidget*
KexiDBIntSpinBox::widget()
{
return this;
diff --git a/kexi/plugins/forms/widgets/kexidbintspinbox.h b/kexi/plugins/forms/widgets/kexidbintspinbox.h
index cddc614e2..9827cd5fd 100644
--- a/kexi/plugins/forms/widgets/kexidbintspinbox.h
+++ b/kexi/plugins/forms/widgets/kexidbintspinbox.h
@@ -22,25 +22,26 @@
#define KexiDBIntSpinBox_H
#include "kexiformdataiteminterface.h"
-#include <qwidget.h>
+#include <tqwidget.h>
#include <knuminput.h>
//! @short A db-aware int spin box
class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBIntSpinBox(QWidget *parent, const char *name=0);
+ KexiDBIntSpinBox(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBIntSpinBox();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -56,7 +57,7 @@ class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFor
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -65,13 +66,13 @@ class KEXIFORMUTILS_EXPORT KexiDBIntSpinBox : public KIntSpinBox, public KexiFor
virtual void setEnabled(bool enabled);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
void slotValueChanged();
virtual void setReadOnly(bool set);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
bool m_invalidState : 1;
diff --git a/kexi/plugins/forms/widgets/kexidblabel.cpp b/kexi/plugins/forms/widgets/kexidblabel.cpp
index e30cc19e5..db946141d 100644
--- a/kexi/plugins/forms/widgets/kexidblabel.cpp
+++ b/kexi/plugins/forms/widgets/kexidblabel.cpp
@@ -20,11 +20,11 @@
#include "kexidblabel.h"
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
-#include <qapplication.h>
-#include <qtimer.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
+#include <tqapplication.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <kimageeffect.h>
@@ -41,7 +41,7 @@
#define SHADOW_THICKNESS 1
//! @internal
-class KexiDBInternalLabel : public QLabel {
+class KexiDBInternalLabel : public TQLabel {
friend class KexiDBLabel;
public:
KexiDBInternalLabel( KexiDBLabel* );
@@ -50,23 +50,23 @@ class KexiDBInternalLabel : public QLabel {
protected:
void updateFrame();
- QImage makeShadow( const QImage& textImage, const QColor &bgColor, const QRect& boundingRect );
- QRect getBounding( const QImage &image, const QRect& startRect );
-// double defaultDecay( QImage& source, int i, int j );
+ TQImage makeShadow( const TQImage& textImage, const TQColor &bgColor, const TQRect& boundingRect );
+ TQRect getBounding( const TQImage &image, const TQRect& startRect );
+// double defaultDecay( TQImage& source, int i, int j );
KPixmap getShadowPixmap();
- QRect m_shadowRect;
+ TQRect m_shadowRect;
KexiDBLabel *m_parentLabel;
};
-KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* parent )
- : QLabel( parent )
- , m_parentLabel(parent)
+KexiDBInternalLabel::KexiDBInternalLabel( KexiDBLabel* tqparent )
+ : TQLabel( tqparent )
+ , m_parentLabel(tqparent)
{
- int a = alignment() | Qt::WordBreak;
- a &= (0xffffff ^ Qt::AlignVertical_Mask);
- a |= Qt::AlignTop;
- setAlignment( a );
+ int a = tqalignment() | TQt::WordBreak;
+ a &= (0xffffff ^ TQt::AlignVertical_Mask);
+ a |= TQt::AlignTop;
+ tqsetAlignment( a );
updateFrame();
}
@@ -93,11 +93,11 @@ KexiDBInternalLabel::~KexiDBInternalLabel()
* --
* Christian Nitschkowski
*/
-QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
- const QColor &bgColor, const QRect& boundingRect )
+TQImage KexiDBInternalLabel::makeShadow( const TQImage& textImage,
+ const TQColor &bgColor, const TQRect& boundingRect )
{
- QImage result;
- QString origText( text() );
+ TQImage result;
+ TQString origText( text() );
// create a new image for for the shaddow
const int w = textImage.width();
@@ -119,7 +119,7 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
/*
* This is the source pixmap
*/
- QImage img = textImage.convertDepth( 32 );
+ TQImage img = textImage.convertDepth( 32 );
/*
* Resize the image if necessary
@@ -129,10 +129,10 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
}
// result.fill( 0 ); // all black
- double realOpacity = SHADOW_OPACITY + QMIN(50.0/double(256.0-qGray(bgColor.rgb())), 50.0);
+ double realOpacity = SHADOW_OPACITY + TQMIN(50.0/double(256.0-tqGray(bgColor.rgb())), 50.0);
//int _h, _s, _v;
//.getHsv( &_h, &_s, &_v );
- if (colorGroup().background()==Qt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
+ if (tqcolorGroup().background()==TQt::red)//_s>=250 && _v>=250) //for colors like cyan or red, make the result more white
realOpacity += 50.0;
result.fill( (int)realOpacity );
result.setAlphaBuffer( true );
@@ -148,26 +148,26 @@ QImage KexiDBInternalLabel::makeShadow( const QImage& textImage,
if ( ( i < 1 ) || ( j < 1 ) || ( i > img.width() - 2 ) || ( j > img.height() - 2 ) )
continue;
else
- alphaShadow = ( qGray( img.pixel( i - 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i - 1, j ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i - 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i , j - 1 ) ) * SHADOW_AXIS_FACTOR +
+ alphaShadow = ( tqGray( img.pixel( i - 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i - 1, j ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i - 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i , j - 1 ) ) * SHADOW_AXIS_FACTOR +
0 +
- qGray( img.pixel( i , j + 1 ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i + 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
- qGray( img.pixel( i + 1, j ) ) * SHADOW_AXIS_FACTOR +
- qGray( img.pixel( i + 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR ) / SHADOW_FACTOR;
+ tqGray( img.pixel( i , j + 1 ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i + 1, j - 1 ) ) * SHADOW_DIAGONAL_FACTOR +
+ tqGray( img.pixel( i + 1, j ) ) * SHADOW_AXIS_FACTOR +
+ tqGray( img.pixel( i + 1, j + 1 ) ) * SHADOW_DIAGONAL_FACTOR ) / SHADOW_FACTOR;
// update the shadow's i,j pixel.
if (alphaShadow > 0)
- result.setPixel( i, j, qRgba( bgRed, bgGreen , bgBlue,
+ result.setPixel( i, j, tqRgba( bgRed, bgGreen , bgBlue,
( int ) (( alphaShadow > realOpacity ) ? realOpacity : alphaShadow)
) );
}
/*caused too much redraw problems if (period && i % period) {
- qApp->processEvents();
+ tqApp->processEvents();
if (text() != origText) //text has been changed in the meantime: abort
- return QImage();
+ return TQImage();
}*/
}
return result;
@@ -177,25 +177,25 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
/*!
* Backup the default color used to draw text.
*/
- const QColor textColor = colorGroup().foreground();
+ const TQColor textColor = tqcolorGroup().foreground();
/*!
* Temporary storage for the generated shadow
*/
KPixmap finalPixmap, tempPixmap;
- QImage shadowImage, tempImage;
- QPainter painter;
+ TQImage shadowImage, tempImage;
+ TQPainter painter;
- m_shadowRect = QRect();
+ m_shadowRect = TQRect();
tempPixmap.resize( size() );
- tempPixmap.fill( Qt::black );
+ tempPixmap.fill( TQt::black );
tempPixmap.setMask( tempPixmap.createHeuristicMask( true ) );
/*!
* The textcolor has to be white for creating shadows!
*/
- setPaletteForegroundColor( Qt::white );
+ setPaletteForegroundColor( TQt::white );
/*!
Draw the label "as usual" in a pixmap
@@ -211,7 +211,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
* This will fit around the unmodified text.
*/
shadowImage = tempPixmap;
- tempPixmap.setMask( QBitmap() );
+ tempPixmap.setMask( TQBitmap() );
/*!
Get the first bounding rect.
@@ -225,14 +225,14 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
* The new rect has to fit in the pixmap.
* I have to admit this isn't really nice code...
*/
- m_shadowRect.setX( QMAX( m_shadowRect.x() - ( m_shadowRect.width() / 4 ), 0 ) );
- m_shadowRect.setY( QMAX( m_shadowRect.y() - ( m_shadowRect.height() / 4 ), 0 ) );
- m_shadowRect.setBottomRight( QPoint(
- QMIN( m_shadowRect.x() + ( m_shadowRect.width() * 3 / 2 ), shadowImage.width() ),
- QMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) );
+ m_shadowRect.setX( TQMAX( m_shadowRect.x() - ( m_shadowRect.width() / 4 ), 0 ) );
+ m_shadowRect.setY( TQMAX( m_shadowRect.y() - ( m_shadowRect.height() / 4 ), 0 ) );
+ m_shadowRect.setBottomRight( TQPoint(
+ TQMIN( m_shadowRect.x() + ( m_shadowRect.width() * 3 / 2 ), shadowImage.width() ),
+ TQMIN( m_shadowRect.y() + ( m_shadowRect.height() * 3 / 2 ), shadowImage.height() ) ) );
shadowImage = makeShadow( shadowImage,
- qGray( colorGroup().background().rgb() ) < 127 ? Qt::white : Qt::black,
+ tqGray( tqcolorGroup().background().rgb() ) < 127 ? TQt::white : TQt::black,
m_shadowRect );
if (shadowImage.isNull())
return KPixmap();
@@ -249,8 +249,8 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
painter.begin( &finalPixmap );
painter.fillRect( 0, 0, finalPixmap.width(), finalPixmap.height(),
palette().brush(
- isEnabled() ? QPalette::Active : QPalette::Disabled,
- QColorGroup::Background ) );
+ isEnabled() ? TQPalette::Active : TQPalette::Disabled,
+ TQColorGroup::Background ) );
painter.end();
/*!
@@ -276,7 +276,7 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
to a new image.
I tried to copy this to a pixmap directly,
but it didn't work correctly.
- Maybe a Qt bug?
+ Maybe a TQt bug?
*/
tempImage = shadowImage.copy( m_shadowRect );
tempPixmap.convertFromImage( tempImage );
@@ -296,30 +296,30 @@ KPixmap KexiDBInternalLabel::getShadowPixmap() {
return finalPixmap;
}
-QRect KexiDBInternalLabel::getBounding( const QImage &image, const QRect& startRect ) {
- QPoint topLeft;
- QPoint bottomRight;
+TQRect KexiDBInternalLabel::getBounding( const TQImage &image, const TQRect& startRect ) {
+ TQPoint topLeft;
+ TQPoint bottomRight;
const int startX = startRect.x();
const int startY = startRect.y();
/*!
* Ugly beast to get the correct width and height
*/
- const int width = QMIN( ( startRect.bottomRight().x() > 0
- ? startRect.bottomRight().x() : QCOORD_MAX ),
+ const int width = TQMIN( ( startRect.bottomRight().x() > 0
+ ? startRect.bottomRight().x() : TQCOORD_MAX ),
image.width() );
- const int height = QMIN( ( startRect.bottomRight().y() > 0
- ? startRect.bottomRight().y() : QCOORD_MAX ),
+ const int height = TQMIN( ( startRect.bottomRight().y() > 0
+ ? startRect.bottomRight().y() : TQCOORD_MAX ),
image.height() );
/*!
Assume the first pixel has the color of the
background that has to be cut away.
- Qt uses the four corner pixels to guess the
+ TQt uses the four corner pixels to guess the
correct color, but in this case the topleft
pixel should be enough.
*/
- QRgb trans = image.pixel( 0, 0 );
+ TQRgb trans = image.pixel( 0, 0 );
for ( int y = startY; y < height; y++ ) {
for ( int x = startX; x < width; x++ ) {
@@ -361,7 +361,7 @@ QRect KexiDBInternalLabel::getBounding( const QImage &image, const QRect& startR
}
}
- return QRect(
+ return TQRect(
topLeft.x(),
topLeft.y(),
bottomRight.x() - topLeft.x(),
@@ -384,10 +384,10 @@ class KexiDBLabel::Private
}
~Private() {}
KPixmap shadowPixmap;
- QPoint shadowPosition;
+ TQPoint shadowPosition;
KexiDBInternalLabel* internalLabel;
- QTimer* timer;
- QColor frameColor;
+ TQTimer* timer;
+ TQColor frameColor;
bool pixmapDirty : 1;
bool shadowEnabled : 1;
bool resizeEvent : 1;
@@ -395,8 +395,8 @@ class KexiDBLabel::Private
//=========================================================
-KexiDBLabel::KexiDBLabel( QWidget *parent, const char *name, WFlags f )
- : QLabel( parent, name, f )
+KexiDBLabel::KexiDBLabel( TQWidget *tqparent, const char *name, WFlags f )
+ : TQLabel( tqparent, name, f )
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
, d( new Private() )
@@ -404,8 +404,8 @@ KexiDBLabel::KexiDBLabel( QWidget *parent, const char *name, WFlags f )
init();
}
-KexiDBLabel::KexiDBLabel( const QString& text, QWidget *parent, const char *name, WFlags f )
- : QLabel( parent, name, f )
+KexiDBLabel::KexiDBLabel( const TQString& text, TQWidget *tqparent, const char *name, WFlags f )
+ : TQLabel( tqparent, name, f )
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
, d( new Private() )
@@ -424,16 +424,16 @@ void KexiDBLabel::init()
m_hasFocusableWidget = false;
d->internalLabel = new KexiDBInternalLabel( this );
d->internalLabel->hide();
- d->frameColor = palette().active().foreground();
+ d->frameColor = tqpalette().active().foreground();
- setAlignment( d->internalLabel->alignment() );
+ tqsetAlignment( d->internalLabel->tqalignment() );
}
void KexiDBLabel::updatePixmapLater() {
if (d->resizeEvent) {
if (!d->timer) {
- d->timer = new QTimer(this, "KexiDBLabelTimer");
- connect(d->timer, SIGNAL(timeout()), this, SLOT(updatePixmap()));
+ d->timer = new TQTimer(this, "KexiDBLabelTimer");
+ connect(d->timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updatePixmap()));
}
d->timer->start(100, true);
d->resizeEvent = false;
@@ -453,20 +453,20 @@ void KexiDBLabel::updatePixmap() {
d->internalLabel->setText( text() );
d->internalLabel->setFixedSize( size() );
d->internalLabel->setPalette( palette() );
- d->internalLabel->setAlignment( alignment() );
-// d->shadowPixmap = KPixmap(); //parallel repaints won't hurt us cause incomplete pixmap
+ d->internalLabel->tqsetAlignment( tqalignment() );
+// d->shadowPixmap = KPixmap(); //parallel tqrepaints won't hurt us cause incomplete pixmap
KPixmap shadowPixmap = d->internalLabel->getShadowPixmap();
if (shadowPixmap.isNull())
return;
d->shadowPixmap = shadowPixmap;
d->shadowPosition = d->internalLabel->m_shadowRect.topLeft();
d->pixmapDirty = false;
- repaint();
+ tqrepaint();
}
-void KexiDBLabel::paintEvent( QPaintEvent* e )
+void KexiDBLabel::paintEvent( TQPaintEvent* e )
{
- QPainter p( this );
+ TQPainter p( this );
if ( d->shadowEnabled ) {
/*!
If required, update the pixmap-cache.
@@ -482,31 +482,31 @@ void KexiDBLabel::paintEvent( QPaintEvent* e )
the shadow has to be drawn using an offset relative to
the widgets border.
*/
- if ( !d->pixmapDirty && e->rect().contains( d->shadowPosition ) && !d->shadowPixmap.isNull()) {
- QRect clipRect = QRect(
- QMAX( e->rect().x() - d->shadowPosition.x(), 0 ),
- QMAX( e->rect().y() - d->shadowPosition.y(), 0 ),
- QMIN( e->rect().width() + d->shadowPosition.x(), d->shadowPixmap.width() ),
- QMIN( e->rect().height() + d->shadowPosition.y(), d->shadowPixmap.height() ) );
+ if ( !d->pixmapDirty && e->rect().tqcontains( d->shadowPosition ) && !d->shadowPixmap.isNull()) {
+ TQRect clipRect = TQRect(
+ TQMAX( e->rect().x() - d->shadowPosition.x(), 0 ),
+ TQMAX( e->rect().y() - d->shadowPosition.y(), 0 ),
+ TQMIN( e->rect().width() + d->shadowPosition.x(), d->shadowPixmap.width() ),
+ TQMIN( e->rect().height() + d->shadowPosition.y(), d->shadowPixmap.height() ) );
p.drawPixmap( d->internalLabel->m_shadowRect.topLeft(), d->shadowPixmap, clipRect );
}
}
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), false );
- QLabel::paintEvent( e );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), false );
+ TQLabel::paintEvent( e );
}
-void KexiDBLabel::setValueInternal( const QVariant& add, bool removeOld ) {
+void KexiDBLabel::setValueInternal( const TQVariant& add, bool removeOld ) {
if (removeOld)
setText(add.toString());
else
setText( m_origValue.toString() + add.toString() );
}
-QVariant KexiDBLabel::value() {
+TQVariant KexiDBLabel::value() {
return text();
}
-void KexiDBLabel::setInvalidState( const QString& displayText )
+void KexiDBLabel::setInvalidState( const TQString& displayText )
{
setText( displayText );
}
@@ -531,7 +531,7 @@ void KexiDBLabel::setReadOnly( bool readOnly )
Q_UNUSED(readOnly);
}
-QWidget* KexiDBLabel::widget()
+TQWidget* KexiDBLabel::widget()
{
return this;
}
@@ -548,12 +548,12 @@ bool KexiDBLabel::cursorAtEnd()
void KexiDBLabel::clear()
{
- setText(QString::null);
+ setText(TQString());
}
-bool KexiDBLabel::setProperty( const char * name, const QVariant & value )
+bool KexiDBLabel::setProperty( const char * name, const TQVariant & value )
{
- const bool ret = QLabel::setProperty(name, value);
+ const bool ret = TQLabel::setProperty(name, value);
if (d->shadowEnabled) {
if (0==qstrcmp("indent", name) || 0==qstrcmp("font", name) || 0==qstrcmp("margin", name)
|| 0==qstrcmp("frameShadow", name) || 0==qstrcmp("frameShape", name)
@@ -577,45 +577,45 @@ void KexiDBLabel::setShadowEnabled( bool state ) {
d->pixmapDirty = true;
if (state)
d->internalLabel->updateFrame();
- repaint();
+ tqrepaint();
}
-void KexiDBLabel::resizeEvent( QResizeEvent* e ) {
+void KexiDBLabel::resizeEvent( TQResizeEvent* e ) {
if (isVisible())
d->resizeEvent = true;
d->pixmapDirty = true;
- QLabel::resizeEvent( e );
+ TQLabel::resizeEvent( e );
}
-void KexiDBLabel::fontChange( const QFont& font ) {
+void KexiDBLabel::fontChange( const TQFont& font ) {
d->pixmapDirty = true;
d->internalLabel->setFont( font );
- QLabel::fontChange( font );
+ TQLabel::fontChange( font );
}
-void KexiDBLabel::styleChange( QStyle& style ) {
+void KexiDBLabel::styleChange( TQStyle& style ) {
d->pixmapDirty = true;
- QLabel::styleChange( style );
+ TQLabel::styleChange( style );
}
void KexiDBLabel::enabledChange( bool enabled ) {
d->pixmapDirty = true;
d->internalLabel->setEnabled( enabled );
- QLabel::enabledChange( enabled );
+ TQLabel::enabledChange( enabled );
}
-void KexiDBLabel::paletteChange( const QPalette& oldPal ) {
+void KexiDBLabel::paletteChange( const TQPalette& oldPal ) {
Q_UNUSED(oldPal);
d->pixmapDirty = true;
d->internalLabel->setPalette( palette() );
}
-/*const QColor & KexiDBLabel::paletteForegroundColor () const
+/*const TQColor & KexiDBLabel::paletteForegroundColor () const
{
return d->foregroundColor;
}
-void KexiDBLabel::setPaletteForegroundColor ( const QColor& color )
+void KexiDBLabel::setPaletteForegroundColor ( const TQColor& color )
{
d->foregroundColor = color;
}*/
@@ -623,20 +623,20 @@ void KexiDBLabel::setPaletteForegroundColor ( const QColor& color )
void KexiDBLabel::frameChanged() {
d->pixmapDirty = true;
d->internalLabel->updateFrame();
- QFrame::frameChanged();
+ TQFrame::frameChanged();
}
-void KexiDBLabel::showEvent( QShowEvent* e ) {
+void KexiDBLabel::showEvent( TQShowEvent* e ) {
d->pixmapDirty = true;
- QLabel::showEvent( e );
+ TQLabel::showEvent( e );
}
-void KexiDBLabel::setText( const QString& text ) {
+void KexiDBLabel::setText( const TQString& text ) {
d->pixmapDirty = true;
- QLabel::setText( text );
+ TQLabel::setText( text );
//This is necessary for KexiFormDataItemInterface
valueChanged();
- repaint();
+ tqrepaint();
}
bool KexiDBLabel::shadowEnabled() const
@@ -645,6 +645,6 @@ bool KexiDBLabel::shadowEnabled() const
}
#define ClassName KexiDBLabel
-#define SuperClassName QLabel
+#define SuperClassName TQLabel
#include "kexiframeutils_p.cpp"
#include "kexidblabel.moc"
diff --git a/kexi/plugins/forms/widgets/kexidblabel.h b/kexi/plugins/forms/widgets/kexidblabel.h
index ec4e626a5..af396a127 100644
--- a/kexi/plugins/forms/widgets/kexidblabel.h
+++ b/kexi/plugins/forms/widgets/kexidblabel.h
@@ -21,8 +21,8 @@
#ifndef KEXIDBLABEL_H
#define KEXIDBLABEL_H
-#include <qimage.h>
-#include <qlabel.h>
+#include <tqimage.h>
+#include <tqlabel.h>
#include <kpixmap.h>
@@ -30,8 +30,8 @@
#include "../kexidbtextwidgetinterface.h"
#include <widget/utils/kexidisplayutils.h>
-class QPainter;
-class QTimer;
+class TQPainter;
+class TQTimer;
class KexiDBInternalLabel;
//! @short An extended, data-aware, read-only text label.
@@ -39,29 +39,30 @@ class KexiDBInternalLabel;
@author Christian Nitschkowski, Jaroslaw Staniek
*/
-class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidgetInterface, public KexiFormDataItemInterface {
+class KEXIFORMUTILS_EXPORT KexiDBLabel : public TQLabel, protected KexiDBTextWidgetInterface, public KexiFormDataItemInterface {
Q_OBJECT
- Q_PROPERTY( QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true )
- Q_PROPERTY( QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true )
- Q_PROPERTY( bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled DESIGNABLE true )
- Q_OVERRIDE( QPixmap pixmap DESIGNABLE false )
- Q_OVERRIDE( bool scaledContents DESIGNABLE false )
-// Q_OVERRIDE( QColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true )
- Q_PROPERTY( QColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true )
+ TQ_PROPERTY( TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true )
+ TQ_PROPERTY( bool shadowEnabled READ shadowEnabled WRITE setShadowEnabled DESIGNABLE true )
+ TQ_OVERRIDE( TQPixmap pixmap DESIGNABLE false )
+ TQ_OVERRIDE( bool scaledContents DESIGNABLE false )
+// TQ_OVERRIDE( TQColor paletteForegroundColor READ paletteForegroundColor WRITE setPaletteForegroundColor DESIGNABLE true )
+ TQ_PROPERTY( TQColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
public:
- KexiDBLabel( QWidget *parent, const char *name = 0, WFlags f = 0 );
- KexiDBLabel( const QString& text, QWidget *parent, const char *name = 0, WFlags f = 0 );
+ KexiDBLabel( TQWidget *tqparent, const char *name = 0, WFlags f = 0 );
+ KexiDBLabel( const TQString& text, TQWidget *tqparent, const char *name = 0, WFlags f = 0 );
virtual ~KexiDBLabel();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
+ virtual TQVariant value();
bool shadowEnabled() const;
- virtual void setInvalidState( const QString& displayText );
+ virtual void setInvalidState( const TQString& displayText );
virtual bool valueIsNull();
@@ -70,7 +71,7 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
//! always true
virtual bool isReadOnly() const;
- virtual QWidget* widget();
+ virtual TQWidget* widget();
//! always false
virtual bool cursorAtStart();
@@ -81,29 +82,29 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
virtual void clear();
//! used to catch setIndent(), etc.
- virtual bool setProperty ( const char * name, const QVariant & value );
+ virtual bool setProperty ( const char * name, const TQVariant & value );
- virtual const QColor& frameColor() const;
+ virtual const TQColor& frameColor() const;
-// const QColor & paletteForegroundColor() const;
+// const TQColor & paletteForegroundColor() const;
public slots:
//! Sets the datasource to \a ds
- inline void setDataSource( const QString &ds ) { KexiFormDataItemInterface::setDataSource( ds ); }
+ inline void setDataSource( const TQString &ds ) { KexiFormDataItemInterface::setDataSource( ds ); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
- virtual void setText( const QString& text );
+ virtual void setText( const TQString& text );
/*! Enable/Disable the shadow effect.
- KexiDBLabel acts just like a normal QLabel when shadow is disabled. */
+ KexiDBLabel acts just like a normal TQLabel when shadow is disabled. */
void setShadowEnabled( bool state );
- virtual void setPalette( const QPalette &pal );
+ virtual void setPalette( const TQPalette &pal );
- virtual void setFrameColor(const QColor& color);
+ virtual void setFrameColor(const TQColor& color);
-// void setPaletteForegroundColor( const QColor& color );
+// void setPaletteForegroundColor( const TQColor& color );
protected slots:
//! empty
@@ -113,23 +114,23 @@ class KEXIFORMUTILS_EXPORT KexiDBLabel : public QLabel, protected KexiDBTextWidg
protected:
void init();
virtual void setColumnInfo(KexiDB::QueryColumnInfo* cinfo);
- virtual void paintEvent( QPaintEvent* );
- virtual void resizeEvent( QResizeEvent* e );
+ virtual void paintEvent( TQPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* e );
//! Sets value \a value for a widget.
- virtual void setValueInternal( const QVariant& add, bool removeOld );
+ virtual void setValueInternal( const TQVariant& add, bool removeOld );
- virtual void fontChange( const QFont& font );
- virtual void styleChange( QStyle& style );
+ virtual void fontChange( const TQFont& font );
+ virtual void styleChange( TQStyle& style );
virtual void enabledChange( bool enabled );
- virtual void paletteChange( const QPalette& oldPal );
+ virtual void paletteChange( const TQPalette& oldPal );
virtual void frameChanged();
- virtual void showEvent( QShowEvent* e );
+ virtual void showEvent( TQShowEvent* e );
//! Reimplemented to paint using real frame color instead of froeground.
//! Also allows to paint more types of frame.
- virtual void drawFrame( QPainter * );
+ virtual void drawFrame( TQPainter * );
void updatePixmapLater();
diff --git a/kexi/plugins/forms/widgets/kexidblineedit.cpp b/kexi/plugins/forms/widgets/kexidblineedit.cpp
index 3897a8cbd..0b1709e11 100644
--- a/kexi/plugins/forms/widgets/kexidblineedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidblineedit.cpp
@@ -25,8 +25,8 @@
#include <knumvalidator.h>
#include <kdatetbl.h>
-#include <qpopupmenu.h>
-#include <qpainter.h>
+#include <tqpopupmenu.h>
+#include <tqpainter.h>
#include <kexiutils/utils.h>
#include <kexidb/queryschema.h>
@@ -37,37 +37,37 @@
//#define USE_KLineEdit_setReadOnly
//! @internal A validator used for read only flag to disable editing
-class KexiDBLineEdit_ReadOnlyValidator : public QValidator
+class KexiDBLineEdit_ReadOnlyValidator : public TQValidator
{
public:
- KexiDBLineEdit_ReadOnlyValidator( QObject * parent )
- : QValidator(parent)
+ KexiDBLineEdit_ReadOnlyValidator( TQObject * tqparent )
+ : TQValidator(tqparent)
{
}
~KexiDBLineEdit_ReadOnlyValidator() {}
- virtual State validate( QString &, int & ) const { return Invalid; }
+ virtual State validate( TQString &, int & ) const { return Invalid; }
};
//-----
-KexiDBLineEdit::KexiDBLineEdit(QWidget *parent, const char *name)
- : KLineEdit(parent, name)
+KexiDBLineEdit::KexiDBLineEdit(TQWidget *tqparent, const char *name)
+ : KLineEdit(tqparent, name)
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
//moved , m_dateFormatter(0)
//moved , m_timeFormatter(0)
- , m_menuExtender(this, this)
+ , m_menuExtender(TQT_TQOBJECT(this), this)
, m_internalReadOnly(false)
, m_slotTextChanged_enabled(true)
{
#ifdef USE_KLineEdit_setReadOnly
//! @todo reenable as an app aption
- QPalette p(widget->palette());
+ TQPalette p(widget->palette());
p.setColor( lighterGrayBackgroundColor(palette()) );
widget->setPalette(p);
#endif
- connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(slotTextChanged(const QString&)));
+ connect(this, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotTextChanged(const TQString&)));
}
KexiDBLineEdit::~KexiDBLineEdit()
@@ -76,19 +76,19 @@ KexiDBLineEdit::~KexiDBLineEdit()
//moved delete m_timeFormatter;
}
-void KexiDBLineEdit::setInvalidState( const QString& displayText )
+void KexiDBLineEdit::setInvalidState( const TQString& displayText )
{
KLineEdit::setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
setText(displayText);
}
-void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBLineEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
#if 0 //moved to KexiTextFormatter
- QVariant value;
+ TQVariant value;
if (removeOld)
value = add;
else {
@@ -106,15 +106,15 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
return;
}
else if (t == KexiDB::Field::Date) {
- setText( dateFormatter()->dateToString( value.toString().isEmpty() ? QDate() : value.toDate() ) );
+ setText( dateFormatter()->dateToString( value.toString().isEmpty() ? TQDate() : value.toDate() ) );
setCursorPosition(0); //ok?
return;
}
else if (t == KexiDB::Field::Time) {
setText(
timeFormatter()->timeToString(
- //hack to avoid converting null variant to valid QTime(0,0,0)
- value.toString().isEmpty() ? value.toTime() : QTime(99,0,0)
+ //hack to avoid converting null variant to valid TQTime(0,0,0)
+ value.toString().isEmpty() ? value.toTime() : TQTime(99,0,0)
)
);
setCursorPosition(0); //ok?
@@ -122,7 +122,7 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
}
else if (t == KexiDB::Field::DateTime) {
if (value.toString().isEmpty() ) {
- setText( QString::null );
+ setText( TQString() );
}
else {
setText(
@@ -136,18 +136,18 @@ void KexiDBLineEdit::setValueInternal(const QVariant& add, bool removeOld)
}
#endif
m_slotTextChanged_enabled = false;
- setText( m_textFormatter.valueToText(removeOld ? QVariant() : m_origValue, add.toString()) );
+ setText( m_textFormatter.valueToText(removeOld ? TQVariant() : m_origValue, add.toString()) );
// setText( value.toString() );
setCursorPosition(0); //ok?
m_slotTextChanged_enabled = true;
}
-QVariant KexiDBLineEdit::value()
+TQVariant KexiDBLineEdit::value()
{
return m_textFormatter.textToValue( text() );
#if 0 // moved to KexiTextFormatter
if (! m_columnInfo)
- return QVariant();
+ return TQVariant();
const KexiDB::Field::Type t = m_columnInfo->field->type();
switch (t) {
case KexiDB::Field::Text:
@@ -163,7 +163,7 @@ QVariant KexiDBLineEdit::value()
return text().toLongLong();
case KexiDB::Field::Boolean:
//! @todo temporary solution for booleans!
- return text() == "1" ? QVariant(true,1) : QVariant(false,0);
+ return text() == "1" ? TQVariant(true,1) : TQVariant(false,0);
case KexiDB::Field::Date:
return dateFormatter()->stringToVariant( text() );
case KexiDB::Field::Time:
@@ -175,14 +175,14 @@ QVariant KexiDBLineEdit::value()
case KexiDB::Field::Double:
return text().toDouble();
default:
- return QVariant();
+ return TQVariant();
}
//! @todo more data types!
return text();
#endif
}
-void KexiDBLineEdit::slotTextChanged(const QString&)
+void KexiDBLineEdit::slotTextChanged(const TQString&)
{
if (!m_slotTextChanged_enabled)
return;
@@ -254,7 +254,7 @@ void KexiDBLineEdit::setReadOnly( bool readOnly )
if (m_internalReadOnly) {
m_readWriteValidator = validator();
if (!m_readOnlyValidator)
- m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(this);
+ m_readOnlyValidator = new KexiDBLineEdit_ReadOnlyValidator(TQT_TQOBJECT(this));
setValidator( m_readOnlyValidator );
}
else {
@@ -265,15 +265,15 @@ void KexiDBLineEdit::setReadOnly( bool readOnly )
#endif
}
-QPopupMenu * KexiDBLineEdit::createPopupMenu()
+TQPopupMenu * KexiDBLineEdit::createPopupMenu()
{
- QPopupMenu *contextMenu = KLineEdit::createPopupMenu();
+ TQPopupMenu *contextMenu = KLineEdit::createPopupMenu();
m_menuExtender.createTitle(contextMenu);
return contextMenu;
}
-QWidget* KexiDBLineEdit::widget()
+TQWidget* KexiDBLineEdit::widget()
{
return this;
}
@@ -303,7 +303,7 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
if (!cinfo)
return;
-//! @todo handle input mask (via QLineEdit::setInputMask()) using a special KexiDB::FieldInputMask class
+//! @todo handle input tqmask (via TQLineEdit::setInputMask()) using a special KexiDB::FieldInputMask class
setValidator( new KexiDB::FieldValidator(*cinfo->field, this) );
#if 0 // moved to KexiTextFormatter
@@ -321,7 +321,7 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
dateTimeInputMask( *dateFormatter(), *timeFormatter() ) );
}
#endif
- const QString inputMask( m_textFormatter.inputMask() );
+ const TQString inputMask( m_textFormatter.inputMask() );
if (!inputMask.isEmpty())
setInputMask( inputMask );
@@ -329,26 +329,26 @@ void KexiDBLineEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
}
/*todo
-void KexiDBLineEdit::paint( QPainter *p )
+void KexiDBLineEdit::paint( TQPainter *p )
{
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}*/
-void KexiDBLineEdit::paintEvent ( QPaintEvent *pe )
+void KexiDBLineEdit::paintEvent ( TQPaintEvent *pe )
{
KLineEdit::paintEvent( pe );
- QPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ TQPainter p(this);
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}
-bool KexiDBLineEdit::event( QEvent * e )
+bool KexiDBLineEdit::event( TQEvent * e )
{
const bool ret = KLineEdit::event( e );
KexiDBTextWidgetInterface::event(e, this, text().isEmpty());
- if (e->type()==QEvent::FocusOut) {
- QFocusEvent *fe = static_cast<QFocusEvent *>(e);
-// if (fe->reason()!=QFocusEvent::ActiveWindow && fe->reason()!=QFocusEvent::Popup) {
- if (fe->reason()==QFocusEvent::Tab || fe->reason()==QFocusEvent::Backtab) {
+ if (e->type()==TQEvent::FocusOut) {
+ TQFocusEvent *fe = TQT_TQFOCUSEVENT(e);
+// if (fe->reason()!=TQFocusEvent::ActiveWindow && fe->reason()!=TQFocusEvent::Popup) {
+ if (fe->reason()==TQFocusEvent::Tab || fe->reason()==TQFocusEvent::Backtab) {
//display aligned to left after loosing the focus (only if this is tab/backtab event)
//! @todo add option to set cursor at the beginning
setCursorPosition(0); //ok?
@@ -362,7 +362,7 @@ bool KexiDBLineEdit::appendStretchRequired(KexiDBAutoField* autoField) const
return KexiDBAutoField::Top == autoField->labelPosition();
}
-void KexiDBLineEdit::handleAction(const QString& actionName)
+void KexiDBLineEdit::handleAction(const TQString& actionName)
{
if (actionName=="edit_copy") {
copy();
@@ -376,15 +376,15 @@ void KexiDBLineEdit::handleAction(const QString& actionName)
//! @todo ?
}
-void KexiDBLineEdit::setDisplayDefaultValue(QWidget *widget, bool displayDefaultValue)
+void KexiDBLineEdit::setDisplayDefaultValue(TQWidget *widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
setFont(params->font);
- QPalette pal(palette());
- pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
+ TQPalette pal(palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
setPalette(pal);
}
@@ -408,7 +408,7 @@ void KexiDBLineEdit::selectAll()
KLineEdit::selectAll();
}
-bool KexiDBLineEdit::keyPressed(QKeyEvent *ke)
+bool KexiDBLineEdit::keyPressed(TQKeyEvent *ke)
{
Q_UNUSED(ke);
return false;
diff --git a/kexi/plugins/forms/widgets/kexidblineedit.h b/kexi/plugins/forms/widgets/kexidblineedit.h
index 5f0262b2d..4457a8d0d 100644
--- a/kexi/plugins/forms/widgets/kexidblineedit.h
+++ b/kexi/plugins/forms/widgets/kexidblineedit.h
@@ -22,7 +22,7 @@
#define KexiDBLineEdit_H
#include <klineedit.h>
-#include <qvalidator.h>
+#include <tqvalidator.h>
#include "kexiformdataiteminterface.h"
#include "kexidbtextwidgetinterface.h"
@@ -34,11 +34,11 @@ class KexiDBWidgetContextMenuExtender;
/*! @internal Utility: alter background color to be a blended color
of the background and base (usually lighter gray). Used for read-only mode. */
-void setLighterGrayBackgroundColor(QWidget* widget);
+void setLighterGrayBackgroundColor(TQWidget* widget);
//! @short Line edit widget for Kexi forms
/*! Handles many data types. User input is validated by using validators
- and/or input masks.
+ and/or input tqmasks.
*/
class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
public KLineEdit,
@@ -47,18 +47,19 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
public KexiSubwidgetInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_OVERRIDE(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OVERRIDE(bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true)
public:
- KexiDBLineEdit(QWidget *parent, const char *name=0);
+ KexiDBLineEdit(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBLineEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -80,10 +81,10 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -94,14 +95,14 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
/*! Handles action having standard name \a actionName.
Action could be: "edit_copy", "edit_paste", etc.
Reimplemented after KexiDataItemChangesListener. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Called by top-level form on key press event to consume widget-specific shortcuts. */
- virtual bool keyPressed(QKeyEvent *ke);
+ virtual bool keyPressed(TQKeyEvent *ke);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly( bool readOnly );
//! Reimplemented, so "undo" means the same as "cancelEditor" action
@@ -117,12 +118,12 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
virtual void selectAll();
protected slots:
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
protected:
- virtual void paintEvent ( QPaintEvent * );
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- virtual bool event ( QEvent * );
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ virtual bool event ( TQEvent * );
#if 0
//moved to KexiTextFormatter
@@ -135,7 +136,7 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
}
#endif
- virtual QPopupMenu * createPopupMenu();
+ virtual TQPopupMenu * createPopupMenu();
//! Implemented for KexiSubwidgetInterface
virtual bool appendStretchRequired(KexiDBAutoField* autoField) const;
@@ -151,10 +152,10 @@ class KEXIFORMUTILS_EXPORT KexiDBLineEdit :
KexiTextFormatter m_textFormatter;
//! Used for read only flag to disable editing
- QGuardedPtr<const QValidator> m_readOnlyValidator;
+ TQGuardedPtr<const TQValidator> m_readOnlyValidator;
//! Used to remember the previous validator used forf r/w mode, after setting the read only flag
- QGuardedPtr<const QValidator> m_readWriteValidator;
+ TQGuardedPtr<const TQValidator> m_readWriteValidator;
//! Used for extending context menu
KexiDBWidgetContextMenuExtender m_menuExtender;
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.cpp b/kexi/plugins/forms/widgets/kexidbsubform.cpp
index 8d1971a97..8cb4f7959 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.cpp
+++ b/kexi/plugins/forms/widgets/kexidbsubform.cpp
@@ -29,38 +29,38 @@
#include <formeditor/container.h>
#include <formeditor/formmanager.h>
-KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *parentForm, QWidget *parent, const char *name)
-: QScrollView(parent, name), m_parentForm(parentForm), m_form(0), m_widget(0)
+KexiDBSubForm::KexiDBSubForm(KFormDesigner::Form *tqparentForm, TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_parentForm(tqparentForm), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
}
/*
void
-KexiDBSubForm::paintEvent(QPaintEvent *ev)
+KexiDBSubForm::paintEvent(TQPaintEvent *ev)
{
- QScrollView::paintEvent(ev);
- QPainter p;
+ TQScrollView::paintEvent(ev);
+ TQPainter p;
setWFlags(WPaintUnclipped);
- QString txt("Subform");
- QFont f = font();
+ TQString txt("Subform");
+ TQFont f = font();
f.setPointSize(f.pointSize() * 3);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
const int txtw = fm.width(txt), txth = fm.height();
p.begin(this, true);
p.setPen(black);
p.setFont(f);
- p.drawText(width()/2, height()/2, txt, Qt::AlignCenter|Qt::AlignVCenter);
+ p.drawText(width()/2, height()/2, txt, TQt::AlignCenter|TQt::AlignVCenter);
p.end();
clearWFlags( WPaintUnclipped );
}
*/
void
-KexiDBSubForm::setFormName(const QString &name)
+KexiDBSubForm::setFormName(const TQString &name)
{
if(m_formName==name)
return;
@@ -74,12 +74,12 @@ KexiDBSubForm::setFormName(const QString &name)
return;
}
- QWidget *pw = parentWidget();
+ TQWidget *pw = tqparentWidget();
KexiFormView *view = 0;
- QStringList list;
+ TQStringList list;
while(pw) {
if(pw->isA("KexiDBSubForm")) {
- if(list.contains(pw->name())) {
+ if(list.tqcontains(pw->name())) {
//! @todo error message
return; // Be sure to don't run into a endless-loop cause of recursive subforms.
}
@@ -87,18 +87,18 @@ KexiDBSubForm::setFormName(const QString &name)
}
else if(! view && pw->isA("KexiFormView"))
view = static_cast<KexiFormView*>(pw); // we need a KexiFormView*
- pw = pw->parentWidget();
+ pw = pw->tqparentWidget();
}
- if (!view || !view->parentDialog() || !view->parentDialog()->mainWin()
- || !view->parentDialog()->mainWin()->project()->dbConnection())
+ if (!view || !view->tqparentDialog() || !view->tqparentDialog()->mainWin()
+ || !view->tqparentDialog()->mainWin()->project()->dbConnection())
return;
- KexiDB::Connection *conn = view->parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = view->tqparentDialog()->mainWin()->project()->dbConnection();
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*conn, name, KexiPart::FormObjectType);
- if((id == 0) || (id == view->parentDialog()->id())) // == our form
+ if((id == 0) || (id == view->tqparentDialog()->id())) // == our form
return; // because of recursion when loading
// we create the container widget
@@ -110,22 +110,22 @@ KexiDBSubForm::setFormName(const QString &name)
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = conn->loadDataBlock(id, data, QString::null);
+ TQString data;
+ tristate res = conn->loadDataBlock(id, data, TQString());
if (res == true)
res = KFormDesigner::FormIO::loadFormFromString(m_form, m_widget, data);
if(res != true) {
delete m_widget;
m_widget = 0;
updateScrollBars();
- m_formName = QString::null;
+ m_formName = TQString();
return;
}
m_form->setDesignMode(false);
// Install event filters on the whole newly created form
- KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(QObject::name());
- KFormDesigner::installRecursiveEventFilter(this, tree->eventEater());
+ KFormDesigner::ObjectTreeItem *tree = m_parentForm->objectTree()->lookup(TQT_TQOBJECT(this)->name());
+ KFormDesigner::installRecursiveEventFilter(TQT_TQOBJECT(this), tree->eventEater());
}
#include "kexidbsubform.moc"
diff --git a/kexi/plugins/forms/widgets/kexidbsubform.h b/kexi/plugins/forms/widgets/kexidbsubform.h
index 5b73f8602..ea2bdbd3f 100644
--- a/kexi/plugins/forms/widgets/kexidbsubform.h
+++ b/kexi/plugins/forms/widgets/kexidbsubform.h
@@ -21,32 +21,33 @@
#ifndef KexiDBSubForm_H
#define KexiDBSubForm_H
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <formeditor/form.h>
//! @short A form embedded as a widget inside other form
-class KEXIFORMUTILS_EXPORT KexiDBSubForm : public QScrollView
+class KEXIFORMUTILS_EXPORT KexiDBSubForm : public TQScrollView
{
Q_OBJECT
- Q_PROPERTY(QString formName READ formName WRITE setFormName DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString formName READ formName WRITE setFormName DESIGNABLE true)
public:
- KexiDBSubForm(KFormDesigner::Form *parentForm, QWidget *parent, const char *name);
+ KexiDBSubForm(KFormDesigner::Form *tqparentForm, TQWidget *tqparent, const char *name);
~KexiDBSubForm() {}
//! \return the name of the subform to display inside this widget
- QString formName() const { return m_formName; }
+ TQString formName() const { return m_formName; }
//! Sets the name of the subform to display inside this widget
- void setFormName(const QString &name);
+ void setFormName(const TQString &name);
- //void paintEvent(QPaintEvent *ev);
+ //void paintEvent(TQPaintEvent *ev);
private:
KFormDesigner::Form *m_parentForm;
KFormDesigner::Form *m_form;
- QWidget *m_widget;
- QString m_formName;
+ TQWidget *m_widget;
+ TQString m_formName;
};
#endif
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.cpp b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
index 8541fc01e..6f6aa89da 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.cpp
@@ -26,16 +26,16 @@
#include <kstdaccel.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
-KexiDBTextEdit::KexiDBTextEdit(QWidget *parent, const char *name)
- : KTextEdit(parent, name)
+KexiDBTextEdit::KexiDBTextEdit(TQWidget *tqparent, const char *name)
+ : KTextEdit(tqparent, name)
, KexiDBTextWidgetInterface()
, KexiFormDataItemInterface()
- , m_menuExtender(this, this)
+ , m_menuExtender(TQT_TQOBJECT(this), this)
, m_slotTextChanged_enabled(true)
{
- connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
installEventFilter(this);
}
@@ -43,16 +43,16 @@ KexiDBTextEdit::~KexiDBTextEdit()
{
}
-void KexiDBTextEdit::setInvalidState( const QString& displayText )
+void KexiDBTextEdit::setInvalidState( const TQString& displayText )
{
setReadOnly(true);
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
- if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ if (focusPolicy() & TQ_TabFocus)
+ setFocusPolicy(TQ_ClickFocus);
KTextEdit::setText(displayText);
}
-void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiDBTextEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
if (m_columnInfo && m_columnInfo->field->type()==KexiDB::Field::Boolean) {
//! @todo temporary solution for booleans!
@@ -66,7 +66,7 @@ void KexiDBTextEdit::setValueInternal(const QVariant& add, bool removeOld)
}
}
-QVariant KexiDBTextEdit::value()
+TQVariant KexiDBTextEdit::value()
{
return text();
}
@@ -96,20 +96,20 @@ bool KexiDBTextEdit::isReadOnly() const
void KexiDBTextEdit::setReadOnly( bool readOnly )
{
KTextEdit::setReadOnly( readOnly );
- QPalette p = palette();
- QColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(QPalette::Normal, QColorGroup::Base));
+ TQPalette p = palette();
+ TQColor c(readOnly ? lighterGrayBackgroundColor(kapp->palette()) : p.color(TQPalette::Normal, TQColorGroup::Base));
setPaper( c );
- p.setColor(QColorGroup::Base, c);
- p.setColor(QColorGroup::Background, c);
+ p.setColor(TQColorGroup::Base, c);
+ p.setColor(TQColorGroup::Background, c);
setPalette( p );
}
-void KexiDBTextEdit::setText( const QString & text, const QString & context )
+void KexiDBTextEdit::setText( const TQString & text, const TQString & context )
{
KTextEdit::setText(text, context);
}
-QWidget* KexiDBTextEdit::widget()
+TQWidget* KexiDBTextEdit::widget()
{
return this;
}
@@ -130,7 +130,7 @@ bool KexiDBTextEdit::cursorAtEnd()
void KexiDBTextEdit::clear()
{
- setText(QString::null, QString::null);
+ setText(TQString(), TQString());
}
void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
@@ -141,16 +141,16 @@ void KexiDBTextEdit::setColumnInfo(KexiDB::QueryColumnInfo* cinfo)
KexiDBTextWidgetInterface::setColumnInfo(m_columnInfo, this);
}
-void KexiDBTextEdit::paintEvent ( QPaintEvent *pe )
+void KexiDBTextEdit::paintEvent ( TQPaintEvent *pe )
{
KTextEdit::paintEvent( pe );
- QPainter p(this);
- KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), alignment(), hasFocus() );
+ TQPainter p(this);
+ KexiDBTextWidgetInterface::paint( this, &p, text().isEmpty(), tqalignment(), hasFocus() );
}
-QPopupMenu * KexiDBTextEdit::createPopupMenu(const QPoint & pos)
+TQPopupMenu * KexiDBTextEdit::createPopupMenu(const TQPoint & pos)
{
- QPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
+ TQPopupMenu *contextMenu = KTextEdit::createPopupMenu(pos);
m_menuExtender.createTitle(contextMenu);
return contextMenu;
}
@@ -160,21 +160,21 @@ void KexiDBTextEdit::undo()
cancelEditor();
}
-void KexiDBTextEdit::setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue)
+void KexiDBTextEdit::setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue)
{
KexiFormDataItemInterface::setDisplayDefaultValue(widget, displayDefaultValue);
// initialize display parameters for default / entered value
KexiDisplayUtils::DisplayParameters * const params
= displayDefaultValue ? m_displayParametersForDefaultValue : m_displayParametersForEnteredValue;
- QPalette pal(palette());
- pal.setColor(QPalette::Active, QColorGroup::Text, params->textColor);
+ TQPalette pal(palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, params->textColor);
setPalette(pal);
setFont(params->font);
//! @todo support rich text...
/* m_slotTextChanged_enabled = false;
//for rich text...
- const QString origText( text() );
- KTextEdit::setText(QString::null);
+ const TQString origText( text() );
+ KTextEdit::setText(TQString());
setCurrentFont(params->font);
setColor(params->textColor);
KTextEdit::setText(origText);
@@ -196,7 +196,7 @@ void KexiDBTextEdit::selectAll()
KTextEdit::selectAll();
}
-void KexiDBTextEdit::keyPressEvent( QKeyEvent *ke )
+void KexiDBTextEdit::keyPressEvent( TQKeyEvent *ke )
{
// for instance, Windows uses Ctrl+Tab for moving between tabs, so do not steal this shortcut
if (KStdAccel::tabNext().contains( KKey(ke) ) || KStdAccel::tabPrev().contains( KKey(ke) )) {
diff --git a/kexi/plugins/forms/widgets/kexidbtextedit.h b/kexi/plugins/forms/widgets/kexidbtextedit.h
index a380b070a..c6f64136e 100644
--- a/kexi/plugins/forms/widgets/kexidbtextedit.h
+++ b/kexi/plugins/forms/widgets/kexidbtextedit.h
@@ -33,17 +33,18 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
public:
- KexiDBTextEdit(QWidget *parent, const char *name=0);
+ KexiDBTextEdit(TQWidget *tqparent, const char *name=0);
virtual ~KexiDBTextEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -59,7 +60,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -71,16 +72,16 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
is displayed in a special way. Used by KexiFormDataProvider::fillDataItems().
\a widget is equal to 'this'.
Reimplemented after KexiFormDataItemInterface. */
- virtual void setDisplayDefaultValue(QWidget* widget, bool displayDefaultValue);
+ virtual void setDisplayDefaultValue(TQWidget* widget, bool displayDefaultValue);
//! Windows uses Ctrl+Tab for moving between tabs, so do not steal this shortcut
- virtual void keyPressEvent( QKeyEvent *ke );
+ virtual void keyPressEvent( TQKeyEvent *ke );
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly( bool readOnly );
- virtual void setText( const QString & text, const QString & context );
+ virtual void setText( const TQString & text, const TQString & context );
//! Reimplemented, so "undo" means the same as "cancelEditor" action
//! @todo enable "real" undo internally so user can use ctrl+z while editing
@@ -99,9 +100,9 @@ class KEXIFORMUTILS_EXPORT KexiDBTextEdit :
void slotTextChanged();
protected:
- virtual void paintEvent ( QPaintEvent * );
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- QPopupMenu * createPopupMenu(const QPoint & pos);
+ virtual void paintEvent ( TQPaintEvent * );
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ TQPopupMenu * createPopupMenu(const TQPoint & pos);
//! Used for extending context menu
KexiDBWidgetContextMenuExtender m_menuExtender;
diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
index 82e61b83b..f2546a440 100644
--- a/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
+++ b/kexi/plugins/forms/widgets/kexidbtimeedit.cpp
@@ -20,43 +20,43 @@
#include "kexidbtimeedit.h"
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qpainter.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
#include <kpopupmenu.h>
#include <kdatepicker.h>
#include <kdatetbl.h>
#include <kexiutils/utils.h>
-KexiDBTimeEdit::KexiDBTimeEdit(const QTime &time, QWidget *parent, const char *name)
- : QTimeEdit(time, parent, name), KexiFormDataItemInterface()
+KexiDBTimeEdit::KexiDBTimeEdit(const TQTime &time, TQWidget *tqparent, const char *name)
+ : TQTimeEdit(time, tqparent, name), KexiFormDataItemInterface()
{
m_invalidState = false;
setAutoAdvance(true);
m_cleared = false;
-#ifdef QDateTimeEditor_HACK
- m_dte_time = KexiUtils::findFirstChild<QDateTimeEditor>(this, "QDateTimeEditor");
+#ifdef TQDateTimeEditor_HACK
+ m_dte_time = KexiUtils::findFirstChild<TQDateTimeEditor>(this, "TQDateTimeEditor");
#else
m_dte_time = 0;
#endif
- connect(this, SIGNAL(valueChanged(const QTime&)), this, SLOT(slotValueChanged(const QTime&)));
+ connect(this, TQT_SIGNAL(valueChanged(const TQTime&)), this, TQT_SLOT(slotValueChanged(const TQTime&)));
}
KexiDBTimeEdit::~KexiDBTimeEdit()
{
}
-void KexiDBTimeEdit::setInvalidState( const QString&)
+void KexiDBTimeEdit::setInvalidState( const TQString&)
{
setEnabled(false);
setReadOnly(true);
m_invalidState = true;
//! @todo move this to KexiDataItemInterface::setInvalidStateInternal() ?
if (focusPolicy() & TabFocus)
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
}
void
@@ -65,20 +65,20 @@ KexiDBTimeEdit::setEnabled(bool enabled)
// prevent the user from reenabling the widget when it is in invalid state
if(enabled && m_invalidState)
return;
- QTimeEdit::setEnabled(enabled);
+ TQTimeEdit::setEnabled(enabled);
}
-void KexiDBTimeEdit::setValueInternal(const QVariant &add, bool removeOld)
+void KexiDBTimeEdit::setValueInternal(const TQVariant &add, bool removeOld)
{
m_cleared = !m_origValue.isValid();
int setNumberOnFocus = -1;
- QTime t;
- QString addString(add.toString());
+ TQTime t;
+ TQString addString(add.toString());
if (removeOld) {
if (!addString.isEmpty() && addString[0].latin1()>='0' && addString[0].latin1() <='9') {
setNumberOnFocus = addString[0].latin1()-'0';
- t = QTime(setNumberOnFocus, 0, 0);
+ t = TQTime(setNumberOnFocus, 0, 0);
}
}
else
@@ -87,11 +87,11 @@ void KexiDBTimeEdit::setValueInternal(const QVariant &add, bool removeOld)
setTime(t);
}
-QVariant
+TQVariant
KexiDBTimeEdit::value()
{
- //QDateTime - a hack needed because QVariant(QTime) has broken isNull()
- return QVariant(QDateTime( m_cleared ? QDate() : QDate(0,1,2)/*nevermind*/, time()));
+ //TQDateTime - a hack needed because TQVariant(TQTime) has broken isNull()
+ return TQVariant(TQDateTime( m_cleared ? TQDate() : TQDate(0,1,2)/*nevermind*/, time()));
}
bool KexiDBTimeEdit::valueIsNull()
@@ -116,7 +116,7 @@ void KexiDBTimeEdit::setReadOnly(bool set)
m_readOnly = set;
}
-QWidget*
+TQWidget*
KexiDBTimeEdit::widget()
{
return this;
@@ -124,7 +124,7 @@ KexiDBTimeEdit::widget()
bool KexiDBTimeEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && hasFocus() && m_dte_time->focusSection()==0;
#else
return false;
@@ -133,7 +133,7 @@ bool KexiDBTimeEdit::cursorAtStart()
bool KexiDBTimeEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_time && hasFocus()
&& m_dte_time->focusSection()==int(m_dte_time->sectionCount()-1);
#else
@@ -143,12 +143,12 @@ bool KexiDBTimeEdit::cursorAtEnd()
void KexiDBTimeEdit::clear()
{
- setTime(QTime());
+ setTime(TQTime());
m_cleared = true;
}
void
-KexiDBTimeEdit::slotValueChanged(const QTime&)
+KexiDBTimeEdit::slotValueChanged(const TQTime&)
{
m_cleared = false;
}
diff --git a/kexi/plugins/forms/widgets/kexidbtimeedit.h b/kexi/plugins/forms/widgets/kexidbtimeedit.h
index 9665b1f9e..6b29a7acb 100644
--- a/kexi/plugins/forms/widgets/kexidbtimeedit.h
+++ b/kexi/plugins/forms/widgets/kexidbtimeedit.h
@@ -23,26 +23,27 @@
#include "kexiformdataiteminterface.h"
#include "kexidbtextwidgetinterface.h"
-#include <qdatetimeedit.h>
+#include <tqdatetimeedit.h>
-class QDateTimeEditor;
+class TQDateTimeEditor;
//! @short A db-aware time editor
-class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDataItemInterface
+class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public TQTimeEdit, public KexiFormDataItemInterface
{
Q_OBJECT
- Q_PROPERTY(QString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
- Q_PROPERTY(QCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
- Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY(TQString dataSource READ dataSource WRITE setDataSource DESIGNABLE true)
+ TQ_PROPERTY(TQCString dataSourceMimeType READ dataSourceMimeType WRITE setDataSourceMimeType DESIGNABLE true)
+ TQ_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly DESIGNABLE true )
public:
- KexiDBTimeEdit(const QTime &time, QWidget *parent, const char *name=0);
+ KexiDBTimeEdit(const TQTime &time, TQWidget *tqparent, const char *name=0);
virtual ~KexiDBTimeEdit();
- inline QString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
- inline QCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
- virtual QVariant value();
- virtual void setInvalidState( const QString& displayText );
+ inline TQString dataSource() const { return KexiFormDataItemInterface::dataSource(); }
+ inline TQCString dataSourceMimeType() const { return KexiFormDataItemInterface::dataSourceMimeType(); }
+ virtual TQVariant value();
+ virtual void setInvalidState( const TQString& displayText );
//! \return true if editor's value is null (not empty)
//! Used for checking if a given constraint within table of form is met.
@@ -58,7 +59,7 @@ class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDat
virtual bool isReadOnly() const;
/*! \return the view widget of this item, e.g. line edit widget. */
- virtual QWidget* widget();
+ virtual TQWidget* widget();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -67,18 +68,18 @@ class KEXIFORMUTILS_EXPORT KexiDBTimeEdit : public QTimeEdit, public KexiFormDat
virtual void setEnabled(bool enabled);
public slots:
- inline void setDataSource(const QString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
- inline void setDataSourceMimeType(const QCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
+ inline void setDataSource(const TQString &ds) { KexiFormDataItemInterface::setDataSource(ds); }
+ inline void setDataSourceMimeType(const TQCString &ds) { KexiFormDataItemInterface::setDataSourceMimeType(ds); }
virtual void setReadOnly(bool set);
protected slots:
- void slotValueChanged(const QTime&);
+ void slotValueChanged(const TQTime&);
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
private:
- QDateTimeEditor* m_dte_time;
+ TQDateTimeEditor* m_dte_time;
bool m_invalidState : 1;
bool m_cleared : 1;
bool m_readOnly : 1;
diff --git a/kexi/plugins/forms/widgets/kexidbutils.cpp b/kexi/plugins/forms/widgets/kexidbutils.cpp
index 0c08d64c8..ba9f2aec0 100644
--- a/kexi/plugins/forms/widgets/kexidbutils.cpp
+++ b/kexi/plugins/forms/widgets/kexidbutils.cpp
@@ -30,15 +30,15 @@
#include <widget/utils/kexicontextmenuutils.h>
-QColor lighterGrayBackgroundColor(const QPalette& palette)
+TQColor lighterGrayBackgroundColor(const TQPalette& palette)
{
return KexiUtils::blendedColors(palette.active().background(), palette.active().base(), 1, 2);
}
//-------
-KexiDBWidgetContextMenuExtender::KexiDBWidgetContextMenuExtender( QObject* parent, KexiDataItemInterface* iface )
- : QObject(parent)
+KexiDBWidgetContextMenuExtender::KexiDBWidgetContextMenuExtender( TQObject* tqparent, KexiDataItemInterface* iface )
+ : TQObject(tqparent)
, m_iface(iface)
, m_contextMenuHasTitle(false)
{
@@ -48,7 +48,7 @@ KexiDBWidgetContextMenuExtender::~KexiDBWidgetContextMenuExtender()
{
}
-void KexiDBWidgetContextMenuExtender::createTitle(QPopupMenu *menu)
+void KexiDBWidgetContextMenuExtender::createTitle(TQPopupMenu *menu)
{
if (!menu)
return;
@@ -56,9 +56,9 @@ void KexiDBWidgetContextMenuExtender::createTitle(QPopupMenu *menu)
KPopupTitle *titleItem = new KPopupTitle();
const int id = m_contextMenu->insertItem(titleItem, -1, 0);
m_contextMenu->setItemEnabled(id, false);
- QString icon;
- if (dynamic_cast<QWidget*>(m_iface))
- icon = KexiFormPart::library()->iconName(dynamic_cast<QWidget*>(m_iface)->className());
+ TQString icon;
+ if (dynamic_cast<TQWidget*>(m_iface))
+ icon = KexiFormPart::library()->iconName(dynamic_cast<TQWidget*>(m_iface)->className());
m_contextMenuHasTitle = m_iface->columnInfo() ?
KexiContextMenuUtils::updateTitle(m_contextMenu,
diff --git a/kexi/plugins/forms/widgets/kexidbutils.h b/kexi/plugins/forms/widgets/kexidbutils.h
index 386f1ee5b..06f49406b 100644
--- a/kexi/plugins/forms/widgets/kexidbutils.h
+++ b/kexi/plugins/forms/widgets/kexidbutils.h
@@ -20,36 +20,36 @@
#ifndef KDBWIDGETS_UTILS_H
#define KDBWIDGETS_UTILS_H
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kexidataiteminterface.h>
-QColor lighterGrayBackgroundColor(const QPalette& palette);
+TQColor lighterGrayBackgroundColor(const TQPalette& palette);
//! @short Used for extending editor widgets' context menu.
/*! @internal This is performed by adding a title and disabling editing
actions when "read only" flag is true. */
-class KexiDBWidgetContextMenuExtender : public QObject
+class KexiDBWidgetContextMenuExtender : public TQObject
{
public:
- KexiDBWidgetContextMenuExtender( QObject* parent, KexiDataItemInterface* iface );
+ KexiDBWidgetContextMenuExtender( TQObject* tqparent, KexiDataItemInterface* iface );
~KexiDBWidgetContextMenuExtender();
//! Creates title for context menu \a menu
- void createTitle(QPopupMenu *menu);
+ void createTitle(TQPopupMenu *menu);
//! Enables or disables context menu actions that can modify the value.
//! The menu has to be previously provided by createTitle().
void updatePopupMenuActions();
/*! Updates title for context menu based on data item \a iface caption or name
- Used in createTitle(QPopupMenu *menu) and KexiDBImageBox.
+ Used in createTitle(TQPopupMenu *menu) and KexiDBImageBox.
\return true is the title has been added. */
- static bool updateContextMenuTitleForDataItem(QPopupMenu *menu, KexiDataItemInterface* iface,
- const QString& icon = QString::null);
+ static bool updateContextMenuTitleForDataItem(TQPopupMenu *menu, KexiDataItemInterface* iface,
+ const TQString& icon = TQString());
protected:
KexiDataItemInterface* m_iface;
- QGuardedPtr<QPopupMenu> m_contextMenu;
+ TQGuardedPtr<TQPopupMenu> m_contextMenu;
bool m_contextMenuHasTitle; //!< true if KPopupTitle has been added to the context menu.
};
diff --git a/kexi/plugins/forms/widgets/kexiframe.cpp b/kexi/plugins/forms/widgets/kexiframe.cpp
index b49386dab..b33581d7e 100644
--- a/kexi/plugins/forms/widgets/kexiframe.cpp
+++ b/kexi/plugins/forms/widgets/kexiframe.cpp
@@ -19,8 +19,8 @@
#include "kexiframe.h"
-#include <qpainter.h>
-#include <qdrawutil.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
#include <kexiutils/utils.h>
//! @internal
@@ -33,7 +33,7 @@ class KexiFrame::Private
~Private()
{
}
- QColor frameColor;
+ TQColor frameColor;
#if 0
//todo
KexiFrame::Shape frameShape;
@@ -43,15 +43,15 @@ class KexiFrame::Private
//=========================================================
-KexiFrame::KexiFrame( QWidget * parent, const char * name, WFlags f )
- : QFrame(parent, name, f)
+KexiFrame::KexiFrame( TQWidget * tqparent, const char * name, WFlags f )
+ : TQFrame(tqparent, name, f)
, d( new Private() )
{
//defaults
- d->frameColor = palette().active().foreground();
+ d->frameColor = tqpalette().active().foreground();
//! @todo obtain these defaults from current template's style...
setLineWidth(2);
- setFrameStyle(QFrame::StyledPanel|QFrame::Raised);
+ setFrameStyle(TQFrame::StyledPanel|TQFrame::Raised);
}
KexiFrame::~KexiFrame()
@@ -59,19 +59,19 @@ KexiFrame::~KexiFrame()
delete d;
}
-void KexiFrame::dragMoveEvent( QDragMoveEvent *e )
+void KexiFrame::dragMoveEvent( TQDragMoveEvent *e )
{
- QFrame::dragMoveEvent(e);
+ TQFrame::dragMoveEvent(e);
emit handleDragMoveEvent(e);
}
-void KexiFrame::dropEvent( QDropEvent *e )
+void KexiFrame::dropEvent( TQDropEvent *e )
{
- QFrame::dropEvent(e);
+ TQFrame::dropEvent(e);
emit handleDropEvent(e);
}
#define ClassName KexiFrame
-#define SuperClassName QFrame
+#define SuperClassName TQFrame
#include "kexiframeutils_p.cpp"
#include "kexiframe.moc"
diff --git a/kexi/plugins/forms/widgets/kexiframe.h b/kexi/plugins/forms/widgets/kexiframe.h
index 8d60d5979..d960cefdf 100644
--- a/kexi/plugins/forms/widgets/kexiframe.h
+++ b/kexi/plugins/forms/widgets/kexiframe.h
@@ -20,62 +20,63 @@
#ifndef KexiFrame_H
#define KexiFrame_H
-#include <qframe.h>
+#include <tqframe.h>
//! @short Frame widget for Kexi forms
-class KEXIFORMUTILS_EXPORT KexiFrame : public QFrame
+class KEXIFORMUTILS_EXPORT KexiFrame : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
//todo Q_ENUMS( Shape Shadow )
- Q_PROPERTY( QColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
-//todo Q_OVERRIDE( Shape frameShape READ frameShape WRITE setFrameShape )
-//todo Q_OVERRIDE( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
+ TQ_PROPERTY( TQColor frameColor READ frameColor WRITE setFrameColor DESIGNABLE true )
+//todo TQ_OVERRIDE( Shape frameShape READ frameShape WRITE setFrameShape )
+//todo TQ_OVERRIDE( Shadow frameShadow READ frameShadow WRITE setFrameShadow )
public:
- KexiFrame( QWidget * parent, const char * name = 0, WFlags f = 0 );
+ KexiFrame( TQWidget * tqparent, const char * name = 0, WFlags f = 0 );
virtual ~KexiFrame();
- virtual const QColor& frameColor() const;
+ virtual const TQColor& frameColor() const;
#if 0
//! @todo more options
enum Shadow {
- NoShadow = QFrame::Plain,
- Raised = QFrame::Raised,
- Sunken = QFrame::Sunken
+ NoShadow = TQFrame::Plain,
+ Raised = TQFrame::Raised,
+ Sunken = TQFrame::Sunken
};
//! @todo more options
- enum Shape { NoFrame = QFrame::NoFrame, //!< no frame
- Box = QFrame::Box, //!< rectangular box
- Panel = QFrame::Panel, //!< rectangular panel
- StyledPanel = QFrame::StyledPanel, //!< rectangular panel depending on the GUI style
- GroupBoxPanel = QFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style
+ enum Shape { NoFrame = TQFrame::NoFrame, //!< no frame
+ Box = TQFrame::Box, //!< rectangular box
+ Panel = TQFrame::Panel, //!< rectangular panel
+ StyledPanel = TQFrame::StyledPanel, //!< rectangular panel depending on the GUI style
+ GroupBoxPanel = TQFrame::GroupBoxPanel //!< rectangular group-box-like panel depending on the GUI style
};
Shape frameShape() const;
- void setFrameShape( KexiFrame::Shape shape );
+ void setFrameShape( KexiFrame::Shape tqshape );
Shadow frameShadow() const;
void setFrameShadow( KexiFrame::Shadow shadow );
#endif
//! Used to emit handleDragMoveEvent() signal needed to control dragging over the container's surface
- virtual void dragMoveEvent( QDragMoveEvent *e );
+ virtual void dragMoveEvent( TQDragMoveEvent *e );
//! Used to emit handleDropEvent() signal needed to control dropping on the container's surface
- virtual void dropEvent( QDropEvent *e );
+ virtual void dropEvent( TQDropEvent *e );
public slots:
- virtual void setPalette( const QPalette &pal );
- virtual void setFrameColor(const QColor& color);
+ virtual void setPalette( const TQPalette &pal );
+ virtual void setFrameColor(const TQColor& color);
signals:
//! Needed to control dragging over the container's surface
- void handleDragMoveEvent(QDragMoveEvent *e);
+ void handleDragMoveEvent(TQDragMoveEvent *e);
//! Needed to control dropping on the container's surface
- void handleDropEvent(QDropEvent *e);
+ void handleDropEvent(TQDropEvent *e);
protected:
- virtual void drawFrame( QPainter * );
+ virtual void drawFrame( TQPainter * );
class Private;
Private *d;
diff --git a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
index 11b8650a4..331909eed 100644
--- a/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
+++ b/kexi/plugins/forms/widgets/kexiframeutils_p.cpp
@@ -20,13 +20,13 @@
/* This file is included by KexiDBLabel and KexiFrame */
//! @todo add more frame types
-void ClassName::drawFrame( QPainter *p )
+void ClassName::drawFrame( TQPainter *p )
{
- if (frameShape() == QFrame::Box) {
+ if (frameShape() == TQFrame::Box) {
if ( frameShadow() == Plain )
qDrawPlainRect( p, frameRect(), d->frameColor, lineWidth() );
else
- qDrawShadeRect( p, frameRect(), colorGroup(), frameShadow() == QFrame::Sunken,
+ qDrawShadeRect( p, frameRect(), tqcolorGroup(), frameShadow() == TQFrame::Sunken,
lineWidth(), midLineWidth() );
}
else {
@@ -34,28 +34,28 @@ void ClassName::drawFrame( QPainter *p )
}
}
-void ClassName::setPalette( const QPalette &pal )
+void ClassName::setPalette( const TQPalette &pal )
{
- QPalette pal2(pal);
- QColorGroup cg( pal2.active() );
- cg.setColor(QColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 ));
- cg.setColor(QColorGroup::Mid, d->frameColor);
- cg.setColor(QColorGroup::Dark, d->frameColor.dark(150));
+ TQPalette pal2(pal);
+ TQColorGroup cg( pal2.active() );
+ cg.setColor(TQColorGroup::Light, KexiUtils::bleachedColor( d->frameColor, 150 ));
+ cg.setColor(TQColorGroup::Mid, d->frameColor);
+ cg.setColor(TQColorGroup::Dark, d->frameColor.dark(150));
pal2.setActive(cg);
- QColorGroup cg2( pal2.inactive() );
- cg2.setColor(QColorGroup::Light, cg.light() );
- cg2.setColor(QColorGroup::Mid, cg.mid());
- cg2.setColor(QColorGroup::Dark, cg.dark());
+ TQColorGroup cg2( pal2.inactive() );
+ cg2.setColor(TQColorGroup::Light, cg.light() );
+ cg2.setColor(TQColorGroup::Mid, cg.mid());
+ cg2.setColor(TQColorGroup::Dark, cg.dark());
pal2.setInactive(cg2);
SuperClassName::setPalette(pal2);
}
-const QColor& ClassName::frameColor() const
+const TQColor& ClassName::frameColor() const
{
return d->frameColor;
}
-void ClassName::setFrameColor(const QColor& color)
+void ClassName::setFrameColor(const TQColor& color)
{
d->frameColor = color;
//update light and dark colors
@@ -69,9 +69,9 @@ ClassName::Shape ClassName::frameShape() const
return d->frameShape;
}
-void ClassName::setFrameShape( ClassName::Shape shape )
+void ClassName::setFrameShape( ClassName::Shape tqshape )
{
- d->frameShape = shape;
+ d->frameShape = tqshape;
update();
}
@@ -88,33 +88,33 @@ void ClassName::setFrameShadow( ClassName::Shadow shadow )
#endif
#if 0
-void QFrame::drawFrame( QPainter *p )
+void TQFrame::drawFrame( TQPainter *p )
{
- QPoint p1, p2;
- QRect r = frameRect();
+ TQPoint p1, p2;
+ TQRect r = frameRect();
int type = fstyle & MShape;
int cstyle = fstyle & MShadow;
-#ifdef QT_NO_DRAWUTIL
+#ifdef TQT_NO_DRAWUTIL
p->setPen( black ); // ####
p->drawRect( r ); //### a bit too simple
#else
- const QColorGroup & g = colorGroup();
+ const TQColorGroup & g = tqcolorGroup();
-#ifndef QT_NO_STYLE
- QStyleOption opt(lineWidth(),midLineWidth());
+#ifndef TQT_NO_STYLE
+ TQStyleOption opt(lineWidth(),midLineWidth());
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (cstyle == Sunken)
- flags |= QStyle::Style_Sunken;
+ flags |= TQStyle::Style_Sunken;
else if (cstyle == Raised)
- flags |= QStyle::Style_Raised;
+ flags |= TQStyle::Style_Raised;
if (hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if (hasMouse())
- flags |= QStyle::Style_MouseOver;
-#endif // QT_NO_STYLE
+ flags |= TQStyle::Style_MouseOver;
+#endif // TQT_NO_STYLE
switch ( type ) {
@@ -127,60 +127,60 @@ void QFrame::drawFrame( QPainter *p )
break;
case LineEditPanel:
- style().drawPrimitive( QStyle::PE_PanelLineEdit, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelLineEdit, p, r, g, flags, opt );
break;
case GroupBoxPanel:
- style().drawPrimitive( QStyle::PE_PanelGroupBox, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelGroupBox, p, r, g, flags, opt );
break;
case TabWidgetPanel:
- style().drawPrimitive( QStyle::PE_PanelTabWidget, p, r, g, flags, opt );
+ style().drawPrimitive( TQStyle::PE_PanelTabWidget, p, r, g, flags, opt );
break;
case MenuBarPanel:
-#ifndef QT_NO_STYLE
- style().drawPrimitive(QStyle::PE_PanelMenuBar, p, r, g, flags, opt);
+#ifndef TQT_NO_STYLE
+ style().drawPrimitive(TQStyle::PE_PanelMenuBar, p, r, g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case ToolBarPanel:
-#ifndef QT_NO_STYLE
- style().drawPrimitive( QStyle::PE_PanelDockWindow, p, rect(), g, flags, opt);
+#ifndef TQT_NO_STYLE
+ style().drawPrimitive( TQStyle::PE_PanelDockWindow, p, rect(), g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case StyledPanel:
-#ifndef QT_NO_STYLE
+#ifndef TQT_NO_STYLE
if ( cstyle == Plain )
qDrawPlainRect( p, r, g.foreground(), lwidth );
else
- style().drawPrimitive(QStyle::PE_Panel, p, r, g, flags, opt);
+ style().drawPrimitive(TQStyle::PE_Panel, p, r, g, flags, opt);
break;
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case PopupPanel:
-#ifndef QT_NO_STYLE
+#ifndef TQT_NO_STYLE
{
- int vextra = style().pixelMetric(QStyle::PM_PopupMenuFrameVerticalExtra, this),
- hextra = style().pixelMetric(QStyle::PM_PopupMenuFrameHorizontalExtra, this);
+ int vextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameVerticalExtra, this),
+ hextra = style().tqpixelMetric(TQStyle::PM_PopupMenuFrameHorizontalExtra, this);
if(vextra > 0 || hextra > 0) {
- QRect fr = frameRect();
+ TQRect fr = frameRect();
int fw = frameWidth();
if(vextra > 0) {
- style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this,
- QRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ TQRect(fr.x() + fw, fr.y() + fw, fr.width() - (fw*2), vextra),
g, flags, opt);
- style().drawControl(QStyle::CE_PopupMenuVerticalExtra, p, this,
- QRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuVerticalExtra, p, this,
+ TQRect(fr.x() + fw, fr.bottom() - fw - vextra, fr.width() - (fw*2), vextra),
g, flags, opt);
}
if(hextra > 0) {
- style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this,
- QRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ TQRect(fr.x() + fw, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
- style().drawControl(QStyle::CE_PopupMenuHorizontalExtra, p, this,
- QRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
+ style().tqdrawControl(TQStyle::CE_PopupMenuHorizontalExtra, p, this,
+ TQRect(fr.right() - fw - hextra, fr.y() + fw + vextra, hextra, fr.height() - (fw*2) - vextra),
g, flags, opt);
}
}
@@ -188,10 +188,10 @@ void QFrame::drawFrame( QPainter *p )
if ( cstyle == Plain )
qDrawPlainRect( p, r, g.foreground(), lwidth );
else
- style().drawPrimitive(QStyle::PE_PanelPopup, p, r, g, flags, opt);
+ style().drawPrimitive(TQStyle::PE_PanelPopup, p, r, g, flags, opt);
break;
}
-#endif // fall through to Panel if QT_NO_STYLE
+#endif // fall through to Panel if TQT_NO_STYLE
case Panel:
if ( cstyle == Plain )
@@ -209,16 +209,16 @@ void QFrame::drawFrame( QPainter *p )
case HLine:
case VLine:
if ( type == HLine ) {
- p1 = QPoint( r.x(), r.height()/2 );
- p2 = QPoint( r.x()+r.width(), p1.y() );
+ p1 = TQPoint( r.x(), r.height()/2 );
+ p2 = TQPoint( r.x()+r.width(), p1.y() );
}
else {
- p1 = QPoint( r.x()+r.width()/2, 0 );
- p2 = QPoint( p1.x(), r.height() );
+ p1 = TQPoint( r.x()+r.width()/2, 0 );
+ p2 = TQPoint( p1.x(), r.height() );
}
if ( cstyle == Plain ) {
- QPen oldPen = p->pen();
- p->setPen( QPen(g.foreground(),lwidth) );
+ TQPen oldPen = p->pen();
+ p->setPen( TQPen(g.foreground(),lwidth) );
p->drawLine( p1, p2 );
p->setPen( oldPen );
}
@@ -227,6 +227,6 @@ void QFrame::drawFrame( QPainter *p )
lwidth, midLineWidth() );
break;
}
-#endif // QT_NO_DRAWUTIL
+#endif // TQT_NO_DRAWUTIL
#endif
diff --git a/kexi/plugins/forms/widgets/kexipushbutton.cpp b/kexi/plugins/forms/widgets/kexipushbutton.cpp
index acfda0a4e..95d0b92ec 100644
--- a/kexi/plugins/forms/widgets/kexipushbutton.cpp
+++ b/kexi/plugins/forms/widgets/kexipushbutton.cpp
@@ -20,8 +20,8 @@
#include "kexipushbutton.h"
-KexiPushButton::KexiPushButton( const QString & text, QWidget * parent, const char * name )
-: KPushButton(text, parent, name)
+KexiPushButton::KexiPushButton( const TQString & text, TQWidget * tqparent, const char * name )
+: KPushButton(text, tqparent, name)
{
}
diff --git a/kexi/plugins/forms/widgets/kexipushbutton.h b/kexi/plugins/forms/widgets/kexipushbutton.h
index 12c016316..3dd8f0a9d 100644
--- a/kexi/plugins/forms/widgets/kexipushbutton.h
+++ b/kexi/plugins/forms/widgets/kexipushbutton.h
@@ -28,25 +28,26 @@
class KEXIFORMUTILS_EXPORT KexiPushButton : public KPushButton
{
Q_OBJECT
- Q_PROPERTY(QString onClickAction READ onClickAction WRITE setOnClickAction DESIGNABLE true)
- Q_PROPERTY(QString onClickActionOption READ onClickActionOption WRITE setOnClickActionOption DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(TQString onClickAction READ onClickAction WRITE setOnClickAction DESIGNABLE true)
+ TQ_PROPERTY(TQString onClickActionOption READ onClickActionOption WRITE setOnClickActionOption DESIGNABLE true)
public:
- KexiPushButton( const QString & text, QWidget * parent, const char * name = 0 );
+ KexiPushButton( const TQString & text, TQWidget * tqparent, const char * name = 0 );
~KexiPushButton();
public slots:
//! action string for "on click" event
//! @see KexiFormPart::slotAssignAction()
//! @see KexiFormEventAction::ActionData
- QString onClickAction() const { return m_onClickActionData.string; }
- void setOnClickAction(const QString& actionString) { m_onClickActionData.string = actionString; }
+ TQString onClickAction() const { return m_onClickActionData.string; }
+ void setOnClickAction(const TQString& actionString) { m_onClickActionData.string = actionString; }
//! action option allowing to select whether the object should be opened in data view mode or printed, etc.
//! @see KexiFormPart::slotAssignAction()
//! @see KexiFormEventAction::ActionData
- QString onClickActionOption() const { return m_onClickActionData.option; }
- void setOnClickActionOption(const QString& option) { m_onClickActionData.option = option; }
+ TQString onClickActionOption() const { return m_onClickActionData.option; }
+ void setOnClickActionOption(const TQString& option) { m_onClickActionData.option = option; }
protected:
KexiFormEventAction::ActionData m_onClickActionData;
diff --git a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
index caa8640d5..4112bf528 100644
--- a/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
+++ b/kexi/plugins/importexport/csv/kexicsv_importexportpart.cpp
@@ -26,8 +26,8 @@
#include <kgenericfactory.h>
-KexiCSVImportExportPart::KexiCSVImportExportPart(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiCSVImportExportPart::KexiCSVImportExportPart(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
}
@@ -35,13 +35,13 @@ KexiCSVImportExportPart::~KexiCSVImportExportPart()
{
}
-QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args )
+TQWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args )
{
if (0==qstrcmp(widgetClass, "KexiCSVImportDialog")) {
KexiCSVImportDialog::Mode mode = (args && (*args)["sourceType"]=="file")
? KexiCSVImportDialog::File : KexiCSVImportDialog::Clipboard;
- KexiCSVImportDialog *dlg = new KexiCSVImportDialog( mode, mainWin, parent, objName );
+ KexiCSVImportDialog *dlg = new KexiCSVImportDialog( mode, mainWin, tqparent, objName );
m_cancelled = dlg->cancelled();
if (m_cancelled) {
delete dlg;
@@ -55,7 +55,7 @@ QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMain
KexiCSVExport::Options options;
if (!options.assign( *args ))
return 0;
- KexiCSVExportWizard *dlg = new KexiCSVExportWizard( options, mainWin, parent, objName);
+ KexiCSVExportWizard *dlg = new KexiCSVExportWizard( options, mainWin, tqparent, objName);
m_cancelled = dlg->cancelled();
if (m_cancelled) {
delete dlg;
@@ -67,7 +67,7 @@ QWidget *KexiCSVImportExportPart::createWidget(const char* widgetClass, KexiMain
}
bool KexiCSVImportExportPart::executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args)
+ TQMap<TQString,TQString>* args)
{
if (0==qstrcmp(commandName, "KexiCSVExport")) {
KexiCSVExport::Options options;
@@ -75,9 +75,9 @@ bool KexiCSVImportExportPart::executeCommand(KexiMainWindow* mainWin, const char
return false;
KexiDB::TableOrQuerySchema tableOrQuery(
mainWin->project()->dbConnection(), options.itemId);
- QTextStream *stream = 0;
- if (args->contains("textStream"))
- stream = KexiUtils::stringToPtr<QTextStream>( (*args)["textStream"] );
+ TQTextStream *stream = 0;
+ if (args->tqcontains("textStream"))
+ stream = KexiUtils::stringToPtr<TQTextStream>( (*args)["textStream"] );
return KexiCSVExport::exportData(tableOrQuery, options, -1, stream);
}
return false;
diff --git a/kexi/plugins/importexport/csv/kexicsv_importexportpart.h b/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
index 8ee8e8cd0..c4a666e31 100644
--- a/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
+++ b/kexi/plugins/importexport/csv/kexicsv_importexportpart.h
@@ -27,16 +27,16 @@
class KexiCSVImportExportPart : public KexiInternalPart
{
public:
- KexiCSVImportExportPart(QObject *parent, const char *name, const QStringList &args);
+ KexiCSVImportExportPart(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiCSVImportExportPart();
/*! Reimplemented to return wizard object. */
- virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
/*! Reimplemented to execute a command \a commandName (nonvisual). The result are put into the \a args. */
virtual bool executeCommand(KexiMainWindow* mainWin, const char* commandName,
- QMap<QString,QString>* args = 0);
+ TQMap<TQString,TQString>* args = 0);
protected:
};
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.cpp b/kexi/plugins/importexport/csv/kexicsvexport.cpp
index b83f85a7f..5af3d8edb 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexport.cpp
@@ -30,9 +30,9 @@
#include <kexiutils/utils.h>
#include <widget/kexicharencodingcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qclipboard.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -50,28 +50,28 @@ Options::Options()
{
}
-bool Options::assign( QMap<QString,QString>& args )
+bool Options::assign( TQMap<TQString,TQString>& args )
{
mode = (args["destinationType"]=="file")
? KexiCSVExport::File : KexiCSVExport::Clipboard;
- if (args.contains("delimiter"))
+ if (args.tqcontains("delimiter"))
delimiter = args["delimiter"];
else
delimiter = (mode==File) ? KEXICSV_DEFAULT_FILE_DELIMITER : KEXICSV_DEFAULT_CLIPBOARD_DELIMITER;
- if (args.contains("textQuote"))
+ if (args.tqcontains("textQuote"))
textQuote = args["textQuote"];
else
- textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_QUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
+ textQuote = (mode==File) ? KEXICSV_DEFAULT_FILE_TEXT_TQUOTE : KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
bool ok;
itemId = args["itemId"].toInt(&ok);
if (!ok || itemId<=0)
return false;
- if (args.contains("forceDelimiter"))
+ if (args.tqcontains("forceDelimiter"))
forceDelimiter = args["forceDelimiter"];
- if (args.contains("addColumnNames"))
+ if (args.tqcontains("addColumnNames"))
addColumnNames = (args["addColumnNames"]=="1");
return true;
}
@@ -79,7 +79,7 @@ bool Options::assign( QMap<QString,QString>& args )
//------------------------------------
bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
- const Options& options, int rowCount, QTextStream *predefinedTextStream)
+ const Options& options, int rowCount, TQTextStream *predefinedTextStream)
{
KexiDB::Connection* conn = tableOrQuery.connection();
if (!conn)
@@ -95,7 +95,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
//! @todo look at rowCount whether the data is really large;
//! if so: avoid copying to clipboard (or ask user) because of system memory
-//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNIQUE*/)
+//! @todo OPTIMIZATION: use fieldsExpanded(true /*UNITQUE*/)
//! @todo OPTIMIZATION? (avoid multiple data retrieving) look for already fetched data within KexiProject..
KexiDB::QuerySchema* query = tableOrQuery.query();
@@ -103,15 +103,15 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
query = tableOrQuery.table()->query();
KexiDB::QueryColumnInfo::Vector fields( query->fieldsExpanded( KexiDB::QuerySchema::WithInternalFields ) );
- QString buffer;
+ TQString buffer;
KSaveFile *kSaveFile = 0;
- QTextStream *stream = 0;
+ TQTextStream *stream = 0;
const bool copyToClipboard = options.mode==Clipboard;
if (copyToClipboard) {
//! @todo (during exporting): enlarge bufSize by factor of 2 when it became too small
- uint bufSize = QMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
+ uint bufSize = TQMIN((rowCount<0 ? 10 : rowCount) * fields.count() * 20, 128000);
buffer.reserve( bufSize );
if (buffer.capacity() < bufSize) {
kdWarning() << "KexiCSVExportWizard::exportData() cannot allocate memory for " << bufSize
@@ -154,10 +154,10 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
// 0. Cache information
const uint fieldsCount = query->fieldsExpanded().count(); //real fields count without internals
- const QCString delimiter( options.delimiter.left(1).latin1() );
+ const TQCString delimiter( options.delimiter.left(1).latin1() );
const bool hasTextQuote = !options.textQuote.isEmpty();
- const QString textQuote( options.textQuote.left(1) );
- const QCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
+ const TQString textQuote( options.textQuote.left(1) );
+ const TQCString escapedTextQuote( (textQuote + textQuote).latin1() ); //ok?
//cache for faster checks
bool *isText = new bool[fieldsCount];
bool *isDateTime = new bool[fieldsCount];
@@ -193,7 +193,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
if (i>0)
APPEND( delimiter );
if (hasTextQuote){
- APPEND( textQuote + fields[i]->captionOrAliasOrName().replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + fields[i]->captionOrAliasOrName().tqreplace(textQuote, escapedTextQuote) + textQuote );
}
else {
APPEND( fields[i]->captionOrAliasOrName() );
@@ -209,7 +209,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
_ERR;
}
for (cursor->moveFirst(); !cursor->eof() && !cursor->error(); cursor->moveNext()) {
- const uint realFieldCount = QMIN(cursor->fieldCount(), fieldsCount);
+ const uint realFieldCount = TQMIN(cursor->fieldCount(), fieldsCount);
for (uint i=0; i<realFieldCount; i++) {
const uint real_i = visibleFieldIndex[i];
if (i>0)
@@ -218,7 +218,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
continue;
if (isText[real_i]) {
if (hasTextQuote)
- APPEND( textQuote + QString(cursor->value(real_i).toString()).replace(textQuote, escapedTextQuote) + textQuote );
+ APPEND( textQuote + TQString(cursor->value(real_i).toString()).tqreplace(textQuote, escapedTextQuote) + textQuote );
else
APPEND( cursor->value(real_i).toString() );
}
@@ -252,7 +252,7 @@ bool KexiCSVExport::exportData(KexiDB::TableOrQuerySchema& tableOrQuery,
}
if (copyToClipboard)
- kapp->clipboard()->setText(buffer, QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(buffer, TQClipboard::Clipboard);
delete [] isText;
delete [] isDateTime;
diff --git a/kexi/plugins/importexport/csv/kexicsvexport.h b/kexi/plugins/importexport/csv/kexicsvexport.h
index 7c8138feb..393da17a0 100644
--- a/kexi/plugins/importexport/csv/kexicsvexport.h
+++ b/kexi/plugins/importexport/csv/kexicsvexport.h
@@ -34,14 +34,14 @@ class Options {
Options();
//! Assigns \a args. \return false on failure.
- bool assign( QMap<QString,QString>& args );
+ bool assign( TQMap<TQString,TQString>& args );
Mode mode;
int itemId; //!< Table or query ID
- QString fileName;
- QString delimiter;
- QString forceDelimiter; //!< Used for "clipboard" mode
- QString textQuote;
+ TQString fileName;
+ TQString delimiter;
+ TQString forceDelimiter; //!< Used for "clipboard" mode
+ TQString textQuote;
bool addColumnNames : 1;
};
@@ -51,7 +51,7 @@ class Options {
@param predefinedTextStream text stream that should be used instead of writing to a file
*/
bool exportData(KexiDB::TableOrQuerySchema& tableOrQuery, const Options& options, int rowCount = -1,
- QTextStream *predefinedTextStream = 0);
+ TQTextStream *predefinedTextStream = 0);
}
diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
index 11c0cff01..931eab730 100644
--- a/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.cpp
@@ -30,9 +30,9 @@
#include <kexiutils/utils.h>
#include <widget/kexicharencodingcombobox.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qclipboard.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqclipboard.h>
#include <kapplication.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -44,8 +44,8 @@
KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
- KexiMainWindow* mainWin, QWidget * parent, const char * name )
- : KWizard(parent, name)
+ KexiMainWindow* mainWin, TQWidget * tqparent, const char * name )
+ : KWizard(tqparent, name)
, m_options(options)
// , m_mode(mode)
// , m_itemId(itemId)
@@ -65,7 +65,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
}
helpButton()->hide();
- QString infoLblFromText;
+ TQString infoLblFromText;
KexiGUIMessageHandler msgh(this);
m_tableOrQuery = new KexiDB::TableOrQuerySchema(
m_mainWin->project()->dbConnection(), m_options.itemId);
@@ -109,13 +109,13 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
m_fileSavePage->setAdditionalFilters( csvMimeTypes() );
m_fileSavePage->setDefaultExtension("csv");
m_fileSavePage->setLocationText( KexiUtils::stringToFileName(m_tableOrQuery->captionOrName()) );
- connect(m_fileSavePage, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(m_fileSavePage, TQT_SIGNAL(rejected()), this, TQT_SLOT(reject()));
addPage(m_fileSavePage, i18n("Enter Name of File You Want to Save Data To"));
}
// 2. Export options
- m_exportOptionsPage = new QWidget(this, "m_exportOptionsPage");
- QGridLayout *exportOptionsLyr = new QGridLayout( m_exportOptionsPage, 6, 3,
+ m_exportOptionsPage = new TQWidget(this, "m_exportOptionsPage");
+ TQGridLayout *exportOptionsLyr = new TQGridLayout( m_exportOptionsPage, 6, 3,
KDialogBase::marginHint(), KDialogBase::spacingHint(), "exportOptionsLyr");
m_infoLblFrom = new KexiCSVInfoLabel( infoLblFromText, m_exportOptionsPage );
KexiPart::Info *partInfo = Kexi::partManager().infoForMimeType(
@@ -135,18 +135,18 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
m_showOptionsButton = new KPushButton(KGuiItem(i18n("Show Options >>"), "configure"),
m_exportOptionsPage);
- connect(m_showOptionsButton, SIGNAL(clicked()), this, SLOT(slotShowOptionsButtonClicked()));
+ connect(m_showOptionsButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotShowOptionsButtonClicked()));
exportOptionsLyr->addMultiCellWidget(m_showOptionsButton, 2, 2, 0, 0);
- m_showOptionsButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_showOptionsButton->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
// -<options section>
- m_exportOptionsSection = new QGroupBox(1, Vertical, i18n("Options"), m_exportOptionsPage,
+ m_exportOptionsSection = new TQGroupBox(1,Qt::Vertical, i18n("Options"), m_exportOptionsPage,
"m_exportOptionsSection");
- m_exportOptionsSection->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_exportOptionsSection->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
exportOptionsLyr->addMultiCellWidget(m_exportOptionsSection, 3, 3, 0, 1);
- QWidget *exportOptionsSectionWidget
- = new QWidget(m_exportOptionsSection, "exportOptionsSectionWidget");
- QGridLayout *exportOptionsSectionLyr = new QGridLayout( exportOptionsSectionWidget, 5, 2,
+ TQWidget *exportOptionsSectionWidget
+ = new TQWidget(m_exportOptionsSection, "exportOptionsSectionWidget");
+ TQGridLayout *exportOptionsSectionLyr = new TQGridLayout( exportOptionsSectionWidget, 5, 2,
0, KDialogBase::spacingHint(), "exportOptionsLyr");
// -delimiter
@@ -154,35 +154,35 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
exportOptionsSectionWidget);
m_delimiterWidget->setDelimiter(defaultDelimiter());
exportOptionsSectionLyr->addWidget( m_delimiterWidget, 0, 1 );
- QLabel *delimiterLabel = new QLabel(m_delimiterWidget, i18n("Delimiter:"), exportOptionsSectionWidget);
+ TQLabel *delimiterLabel = new TQLabel(m_delimiterWidget, i18n("Delimiter:"), exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( delimiterLabel, 0, 0 );
// -text quote
- QWidget *textQuoteWidget = new QWidget(exportOptionsSectionWidget);
- QHBoxLayout *textQuoteLyr = new QHBoxLayout(textQuoteWidget);
+ TQWidget *textQuoteWidget = new TQWidget(exportOptionsSectionWidget);
+ TQHBoxLayout *textQuoteLyr = new TQHBoxLayout(textQuoteWidget);
exportOptionsSectionLyr->addWidget(textQuoteWidget, 1, 1);
m_textQuote = new KexiCSVTextQuoteComboBox( textQuoteWidget );
m_textQuote->setTextQuote(defaultTextQuote());
textQuoteLyr->addWidget( m_textQuote );
textQuoteLyr->addStretch(0);
- QLabel *textQuoteLabel = new QLabel(m_textQuote, i18n("Text quote:"), exportOptionsSectionWidget);
+ TQLabel *textQuoteLabel = new TQLabel(m_textQuote, i18n("Text quote:"), exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( textQuoteLabel, 1, 0 );
// - character encoding
m_characterEncodingCombo = new KexiCharacterEncodingComboBox( exportOptionsSectionWidget );
- m_characterEncodingCombo->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
+ m_characterEncodingCombo->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
exportOptionsSectionLyr->addWidget( m_characterEncodingCombo, 2, 1 );
- QLabel *characterEncodingLabel = new QLabel(m_characterEncodingCombo, i18n("Text encoding:"),
+ TQLabel *characterEncodingLabel = new TQLabel(m_characterEncodingCombo, i18n("Text encoding:"),
exportOptionsSectionWidget);
exportOptionsSectionLyr->addWidget( characterEncodingLabel, 2, 0 );
// - checkboxes
- m_addColumnNamesCheckBox = new QCheckBox(i18n("Add column names as the first row"),
+ m_addColumnNamesCheckBox = new TQCheckBox(i18n("Add column names as the first row"),
exportOptionsSectionWidget);
m_addColumnNamesCheckBox->setChecked(true);
exportOptionsSectionLyr->addWidget( m_addColumnNamesCheckBox, 3, 1 );
//! @todo 1.1: for copying use "Always use above options for copying" string
- m_alwaysUseCheckBox = new QCheckBox(i18n("Always use above options for exporting"),
+ m_alwaysUseCheckBox = new TQCheckBox(i18n("Always use above options for exporting"),
m_exportOptionsPage);
exportOptionsLyr->addMultiCellWidget(m_alwaysUseCheckBox, 4, 4, 0, 1);
// exportOptionsSectionLyr->addWidget( m_alwaysUseCheckBox, 4, 1 );
@@ -192,7 +192,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
// exportOptionsLyr->setColStretch(3, 1);
exportOptionsLyr->addMultiCell(
- new QSpacerItem( 0, 0, QSizePolicy::Preferred, QSizePolicy::MinimumExpanding), 5, 5, 0, 1 );
+ new TQSpacerItem( 0, 0, TQSizePolicy::Preferred, TQSizePolicy::MinimumExpanding), 5, 5, 0, 1 );
// addPage(m_exportOptionsPage, i18n("Set Export Options"));
addPage(m_exportOptionsPage, m_options.mode==KexiCSVExport::Clipboard ? i18n("Copying") : i18n("Exporting"));
@@ -207,7 +207,7 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
if (readBoolEntry("StoreOptionsForCSVExportDialog", false)) {
// load defaults:
m_alwaysUseCheckBox->setChecked(true);
- QString s = readEntry("DefaultDelimiterForExportingCSVFiles", defaultDelimiter());
+ TQString s = readEntry("DefaultDelimiterForExportingCSVFiles", defaultDelimiter());
if (!s.isEmpty())
m_delimiterWidget->setDelimiter(s);
s = readEntry("DefaultTextQuoteForExportingCSVFiles", defaultTextQuote());
@@ -222,8 +222,8 @@ KexiCSVExportWizard::KexiCSVExportWizard( const KexiCSVExport::Options& options,
updateGeometry();
// -keep widths equal on page #2:
- int width = QMAX( m_infoLblFrom->leftLabel()->sizeHint().width(),
- m_infoLblTo->leftLabel()->sizeHint().width());
+ int width = TQMAX( m_infoLblFrom->leftLabel()->tqsizeHint().width(),
+ m_infoLblTo->leftLabel()->tqsizeHint().width());
m_infoLblFrom->leftLabel()->setFixedWidth(width);
m_infoLblTo->leftLabel()->setFixedWidth(width);
}
@@ -238,7 +238,7 @@ bool KexiCSVExportWizard::cancelled() const
return m_cancelled;
}
-void KexiCSVExportWizard::showPage ( QWidget * page )
+void KexiCSVExportWizard::showPage ( TQWidget * page )
{
if (page == m_fileSavePage) {
m_fileSavePage->setFocus();
@@ -246,7 +246,7 @@ void KexiCSVExportWizard::showPage ( QWidget * page )
else if (page==m_exportOptionsPage) {
if (m_options.mode==KexiCSVExport::File)
m_infoLblTo->setFileName( m_fileSavePage->currentFileName() );
- QString text = m_tableOrQuery->captionOrName();
+ TQString text = m_tableOrQuery->captionOrName();
if (!m_rowCountDetermined) {
//do this costly operation only once
m_rowCount = KexiDB::rowCount(*m_tableOrQuery);
@@ -255,11 +255,11 @@ void KexiCSVExportWizard::showPage ( QWidget * page )
int columns = KexiDB::fieldCount(*m_tableOrQuery);
text += "\n";
if (m_rowCount>0)
- text += i18n("(rows: %1, columns: %2)").arg(m_rowCount).arg(columns);
+ text += i18n("(rows: %1, columns: %2)").tqarg(m_rowCount).tqarg(columns);
else
- text += i18n("(columns: %1)").arg(columns);
+ text += i18n("(columns: %1)").tqarg(columns);
m_infoLblFrom->setLabelText(text);
- QFontMetrics fm(m_infoLblFrom->fileNameLabel()->font());
+ TQFontMetrics fm(m_infoLblFrom->fileNameLabel()->font());
m_infoLblFrom->fileNameLabel()->setFixedHeight( fm.height() * 2 + fm.lineSpacing() );
if (m_defaultsBtn)
m_defaultsBtn->show();
@@ -287,7 +287,7 @@ void KexiCSVExportWizard::next()
void KexiCSVExportWizard::done(int result)
{
- if (QDialog::Accepted == result) {
+ if (TQDialog::Accepted == result) {
if (m_fileSavePage)
m_options.fileName = m_fileSavePage->currentFileName();
m_options.delimiter = m_delimiterWidget->delimiter();
@@ -296,7 +296,7 @@ void KexiCSVExportWizard::done(int result)
if (!KexiCSVExport::exportData(*m_tableOrQuery, m_options))
return;
}
- else if (QDialog::Rejected == result) {
+ else if (TQDialog::Rejected == result) {
//nothing to do
}
@@ -346,23 +346,23 @@ void KexiCSVExportWizard::slotShowOptionsButtonClicked()
}
}
-void KexiCSVExportWizard::layOutButtonRow( QHBoxLayout * layout )
+void KexiCSVExportWizard::layOutButtonRow( TQHBoxLayout * tqlayout )
{
- QWizard::layOutButtonRow( layout );
+ TQWizard::layOutButtonRow( tqlayout );
- //find the last sublayout
- QLayout *l = 0;
- for (QLayoutIterator lit( layout->iterator() ); lit.current(); ++lit)
- l = lit.current()->layout();
- if (dynamic_cast<QBoxLayout*>(l)) {
+ //find the last subtqlayout
+ TQLayout *l = 0;
+ for (TQLayoutIterator lit( tqlayout->iterator() ); lit.current(); ++lit)
+ l = lit.current()->tqlayout();
+ if (dynamic_cast<TQBoxLayout*>(l)) {
if (!m_defaultsBtn) {
m_defaultsBtn = new KPushButton(i18n("Defaults"), this);
- QWidget::setTabOrder(backButton(), m_defaultsBtn);
- connect(m_defaultsBtn, SIGNAL(clicked()), this, SLOT(slotDefaultsButtonClicked()));
+ TQWidget::setTabOrder(backButton(), m_defaultsBtn);
+ connect(m_defaultsBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefaultsButtonClicked()));
}
if (!m_exportOptionsSection->isVisible())
m_defaultsBtn->hide();
- dynamic_cast<QBoxLayout*>(l)->insertWidget(0, m_defaultsBtn);
+ dynamic_cast<TQBoxLayout*>(l)->insertWidget(0, m_defaultsBtn);
}
}
@@ -374,13 +374,13 @@ void KexiCSVExportWizard::slotDefaultsButtonClicked()
m_characterEncodingCombo->selectDefaultEncoding();
}
-static QString convertKey(const char *key, KexiCSVExport::Mode mode)
+static TQString convertKey(const char *key, KexiCSVExport::Mode mode)
{
- QString _key(QString::fromLatin1(key));
+ TQString _key(TQString::tqfromLatin1(key));
if (mode == KexiCSVExport::Clipboard) {
- _key.replace("Exporting", "Copying");
- _key.replace("Export", "Copy");
- _key.replace("CSVFiles", "CSVToClipboard");
+ _key.tqreplace("Exporting", "Copying");
+ _key.tqreplace("Export", "Copy");
+ _key.tqreplace("CSVFiles", "CSVToClipboard");
}
return _key;
}
@@ -390,12 +390,12 @@ bool KexiCSVExportWizard::readBoolEntry(const char *key, bool defaultValue)
return kapp->config()->readBoolEntry(convertKey(key, m_options.mode), defaultValue);
}
-QString KexiCSVExportWizard::readEntry(const char *key, const QString& defaultValue)
+TQString KexiCSVExportWizard::readEntry(const char *key, const TQString& defaultValue)
{
return kapp->config()->readEntry(convertKey(key, m_options.mode), defaultValue);
}
-void KexiCSVExportWizard::writeEntry(const char *key, const QString& value)
+void KexiCSVExportWizard::writeEntry(const char *key, const TQString& value)
{
kapp->config()->writeEntry(convertKey(key, m_options.mode), value);
}
@@ -410,7 +410,7 @@ void KexiCSVExportWizard::deleteEntry(const char *key)
kapp->config()->deleteEntry(convertKey(key, m_options.mode));
}
-QString KexiCSVExportWizard::defaultDelimiter() const
+TQString KexiCSVExportWizard::defaultDelimiter() const
{
if (m_options.mode==KexiCSVExport::Clipboard) {
if (!m_options.forceDelimiter.isEmpty())
@@ -421,11 +421,11 @@ QString KexiCSVExportWizard::defaultDelimiter() const
return KEXICSV_DEFAULT_FILE_DELIMITER;
}
-QString KexiCSVExportWizard::defaultTextQuote() const
+TQString KexiCSVExportWizard::defaultTextQuote() const
{
if (m_options.mode==KexiCSVExport::Clipboard)
- return KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE;
- return KEXICSV_DEFAULT_FILE_TEXT_QUOTE;
+ return KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE;
+ return KEXICSV_DEFAULT_FILE_TEXT_TQUOTE;
}
#include "kexicsvexportwizard.moc"
diff --git a/kexi/plugins/importexport/csv/kexicsvexportwizard.h b/kexi/plugins/importexport/csv/kexicsvexportwizard.h
index 8fdaecd0c..ef2bd17bc 100644
--- a/kexi/plugins/importexport/csv/kexicsvexportwizard.h
+++ b/kexi/plugins/importexport/csv/kexicsvexportwizard.h
@@ -24,8 +24,8 @@
#include "kexicsvexport.h"
-class QCheckBox;
-class QGroupBox;
+class TQCheckBox;
+class TQGroupBox;
class KPushButton;
class KexiMainWindow;
class KexiStartupFileDialog;
@@ -42,16 +42,17 @@ namespace KexiDB {
class KexiCSVExportWizard : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiCSVExportWizard( const KexiCSVExport::Options& options, KexiMainWindow* mainWin,
- QWidget * parent = 0, const char * name = 0 );
+ TQWidget * tqparent = 0, const char * name = 0 );
virtual ~KexiCSVExportWizard();
bool cancelled() const;
- virtual void showPage ( QWidget * page );
+ virtual void showPage ( TQWidget * page );
protected slots:
virtual void next();
@@ -61,13 +62,13 @@ class KexiCSVExportWizard : public KWizard
protected:
//! reimplemented to add "Defaults" button on the left hand
- virtual void layOutButtonRow( QHBoxLayout * layout );
+ virtual void layOutButtonRow( TQHBoxLayout * tqlayout );
//! \return default delimiter depending on mode.
- QString defaultDelimiter() const;
+ TQString defaultDelimiter() const;
//! \return default text quote depending on mode.
- QString defaultTextQuote() const;
+ TQString defaultTextQuote() const;
//! Helper, works like kapp->config()->readBoolEntry(const char*, bool) but if mode is Clipboard,
//! "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy"
@@ -75,8 +76,8 @@ class KexiCSVExportWizard : public KWizard
//! in \a key, to keep the setting separate.
bool readBoolEntry(const char *key, bool defaultValue);
- //! Helper like \ref readBoolEntry(const char *, bool), but for QString values.
- QString readEntry(const char *key, const QString& defaultValue = QString::null);
+ //! Helper like \ref readBoolEntry(const char *, bool), but for TQString values.
+ TQString readEntry(const char *key, const TQString& defaultValue = TQString());
//! Helper, works like kapp->config()->writeEntry(const char*,bool) but if mode is Clipboard,
//! "Exporting" is replaced with "Copying" and "Export" is replaced with "Copy"
@@ -84,8 +85,8 @@ class KexiCSVExportWizard : public KWizard
//! in \a key, to keep the setting separate.
void writeEntry(const char *key, bool value);
- //! Helper like \ref writeEntry(const char *, bool), but for QString values.
- void writeEntry(const char *key, const QString& value);
+ //! Helper like \ref writeEntry(const char *, bool), but for TQString values.
+ void writeEntry(const char *key, const TQString& value);
//! Helper like \ref writeEntry(const char *, bool), but for deleting config entry.
void deleteEntry(const char *key);
@@ -95,15 +96,15 @@ class KexiCSVExportWizard : public KWizard
// int m_itemId;
KexiMainWindow* m_mainWin;
KexiStartupFileDialog* m_fileSavePage;
- QWidget* m_exportOptionsPage;
+ TQWidget* m_exportOptionsPage;
KPushButton *m_showOptionsButton;
KPushButton *m_defaultsBtn;
- QGroupBox* m_exportOptionsSection;
+ TQGroupBox* m_exportOptionsSection;
KexiCSVInfoLabel *m_infoLblFrom, *m_infoLblTo;
KexiCSVDelimiterWidget* m_delimiterWidget;
KexiCSVTextQuoteComboBox* m_textQuote;
KexiCharacterEncodingComboBox *m_characterEncodingCombo;
- QCheckBox* m_addColumnNamesCheckBox, *m_alwaysUseCheckBox;
+ TQCheckBox* m_addColumnNamesCheckBox, *m_alwaysUseCheckBox;
KexiDB::TableOrQuerySchema* m_tableOrQuery;
int m_rowCount; //!< Cached row count for a table/query.
bool m_rowCountDetermined : 1;
diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
index 16a9d416b..b7bcb80e8 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.cpp
@@ -25,22 +25,22 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmime.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qlayout.h>
-#include <qfiledialog.h>
-#include <qpainter.h>
-#include <qtextcodec.h>
-#include <qtimer.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmime.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtable.h>
+#include <tqlayout.h>
+#include <tqfiledialog.h>
+#include <tqpainter.h>
+#include <tqtextcodec.h>
+#include <tqtimer.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -71,7 +71,7 @@
#include "kexicsvimportdialog.h"
#include "kexicsvwidgets.h"
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <krecentdirs.h>
#include <windows.h>
#endif
@@ -99,43 +99,45 @@
#define MAX_BYTES_TO_PREVIEW 10240 //max 10KB is reasonable
#define MAX_CHARS_TO_SCAN_WHILE_DETECTING_DELIMITER 4096
-class KexiCSVImportDialogTable : public QTable
+class KexiCSVImportDialogTable : public TQTable
{
public:
- KexiCSVImportDialogTable( QWidget * parent = 0, const char * name = 0 )
- : QTable(parent, name) {
+ KexiCSVImportDialogTable( TQWidget * tqparent = 0, const char * name = 0 )
+ : TQTable(tqparent, name) {
f = font();
f.setBold(true);
}
- virtual void paintCell( QPainter * p, int row, int col, const QRect & cr, bool selected, const QColorGroup & cg ) {
+ virtual void paintCell( TQPainter * p, int row, int col, const TQRect & cr, bool selected, const TQColorGroup & cg ) {
if (row==0)
p->setFont(f);
else
p->setFont(font());
- QTable::paintCell(p, row, col, cr, selected, cg);
+ TQTable::paintCell(p, row, col, cr, selected, cg);
}
virtual void setColumnWidth( int col, int w ) {
//make columns a bit wider
- QTable::setColumnWidth( col, w + 16 );
+ TQTable::setColumnWidth( col, w + 16 );
}
- QFont f;
+ TQFont f;
};
//! Helper used to temporary disable keyboard and mouse events
-void installRecursiveEventFilter(QObject *filter, QObject *object)
+void installRecursiveEventFilter(TQObject *filter, TQObject *object)
{
object->installEventFilter(filter);
- if (!object->children())
+ TQObjectList clo = object->childrenListObject();
+
+ if (clo.isEmpty())
return;
- QObjectList list = *object->children();
- for(QObject *obj = list.first(); obj; obj = list.next())
+ TQObjectList list = clo;
+ for(TQObject *obj = list.first(); obj; obj = list.next())
installRecursiveEventFilter(filter, obj);
}
KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
- QWidget * parent, const char * name
+ TQWidget * tqparent, const char * name
)
: KDialogBase(
KDialogBase::Plain,
@@ -144,7 +146,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
,
(mode==File ? User1 : (ButtonCode)0) |Ok|Cancel,
Ok,
- parent,
+ tqparent,
name ? name : "KexiCSVImportDialog",
true,
false,
@@ -154,7 +156,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_cancelled( false ),
m_adjustRows( true ),
m_startline( 0 ),
- m_textquote( QString(KEXICSV_DEFAULT_FILE_TEXT_QUOTE)[0] ),
+ m_textquote( TQString(KEXICSV_DEFAULT_FILE_TEXT_TQUOTE)[0] ),
m_mode(mode),
m_prevSelectedCol(-1),
m_columnsAdjusted(false),
@@ -168,7 +170,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_allRowsLoadedInPreview(false),
m_stoppedAt_MAX_BYTES_TO_PREVIEW(false)
{
- setWFlags(getWFlags() | Qt::WStyle_Maximize | Qt::WStyle_SysMenu);
+ setWFlags(getWFlags() | TQt::WStyle_Maximize | TQt::WStyle_SysMenu);
hide();
setButtonOK(KGuiItem( i18n("&Import..."), _IMPORT_ICON));
@@ -190,12 +192,12 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
setIcon(DesktopIcon(_IMPORT_ICON));
setSizeGripEnabled( TRUE );
-// m_encoding = QString::fromLatin1(KGlobal::locale()->encoding());
+// m_encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
// m_stripWhiteSpaceInTextValuesChecked = true;
m_file = 0;
m_inputStream = 0;
- QVBoxLayout *lyr = new QVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
+ TQVBoxLayout *lyr = new TQVBoxLayout(plainPage(), 0, KDialogBase::spacingHint(), "lyr");
m_infoLbl = new KexiCSVInfoLabel(
m_mode==File ? i18n("Preview of data from file:")
@@ -204,8 +206,8 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
);
lyr->addWidget( m_infoLbl );
- QWidget* page = new QFrame( plainPage(), "page" );
- QGridLayout *glyr= new QGridLayout( page, 4, 5, 0, KDialogBase::spacingHint(), "glyr");
+ TQWidget* page = new TQFrame( plainPage(), "page" );
+ TQGridLayout *glyr= new TQGridLayout( page, 4, 5, 0, KDialogBase::spacingHint(), "glyr");
lyr->addWidget( page );
// Delimiter: comma, semicolon, tab, space, other
@@ -213,8 +215,8 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_detectDelimiter = true;
glyr->addMultiCellWidget( m_delimiterWidget, 1, 2, 0, 0 );
- QLabel *delimiterLabel = new QLabel(m_delimiterWidget, i18n("Delimiter:"), page);
- delimiterLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ TQLabel *delimiterLabel = new TQLabel(m_delimiterWidget, i18n("Delimiter:"), page);
+ delimiterLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addMultiCellWidget( delimiterLabel, 0, 0, 0, 0 );
// Format: number, text, currency,
@@ -227,49 +229,49 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
m_formatCombo->insertItem(i18n("Date/Time"));
glyr->addMultiCellWidget( m_formatCombo, 1, 1, 1, 1 );
- m_formatLabel = new QLabel(m_formatCombo, "", page);
- m_formatLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ m_formatLabel = new TQLabel(m_formatCombo, "", page);
+ m_formatLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( m_formatLabel, 0, 1 );
- m_primaryKeyField = new QCheckBox( i18n( "Primary key" ), page, "m_primaryKeyField" );
+ m_primaryKeyField = new TQCheckBox( i18n( "Primary key" ), page, "m_primaryKeyField" );
glyr->addWidget( m_primaryKeyField, 2, 1 );
- connect(m_primaryKeyField, SIGNAL(toggled(bool)), this, SLOT(slotPrimaryKeyFieldToggled(bool)));
+ connect(m_primaryKeyField, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPrimaryKeyFieldToggled(bool)));
m_comboQuote = new KexiCSVTextQuoteComboBox( page );
glyr->addWidget( m_comboQuote, 1, 2 );
- TextLabel2 = new QLabel( m_comboQuote, i18n( "Text quote:" ), page, "TextLabel2" );
- TextLabel2->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- TextLabel2->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ TextLabel2 = new TQLabel( m_comboQuote, i18n( "Text quote:" ), page, "TextLabel2" );
+ TextLabel2->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred );
+ TextLabel2->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( TextLabel2, 0, 2 );
m_startAtLineSpinBox = new KIntSpinBox( page, "m_startAtLineSpinBox" );
m_startAtLineSpinBox->setMinValue(1);
- m_startAtLineSpinBox->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
- m_startAtLineSpinBox->setMinimumWidth(QFontMetrics(m_startAtLineSpinBox->font()).width("8888888"));
+ m_startAtLineSpinBox->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
+ m_startAtLineSpinBox->setMinimumWidth(TQFontMetrics(m_startAtLineSpinBox->font()).width("8888888"));
glyr->addWidget( m_startAtLineSpinBox, 1, 3 );
- m_startAtLineLabel = new QLabel( m_startAtLineSpinBox, "",
+ m_startAtLineLabel = new TQLabel( m_startAtLineSpinBox, "",
page, "TextLabel3" );
- m_startAtLineLabel->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Preferred );
- m_startAtLineLabel->setAlignment(Qt::AlignAuto | Qt::AlignBottom);
+ m_startAtLineLabel->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Preferred );
+ m_startAtLineLabel->tqsetAlignment(TQt::AlignAuto | TQt::AlignBottom);
glyr->addWidget( m_startAtLineLabel, 0, 3 );
- QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Preferred );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
glyr->addItem( spacer_2, 0, 4 );
- m_ignoreDuplicates = new QCheckBox( page, "m_ignoreDuplicates" );
+ m_ignoreDuplicates = new TQCheckBox( page, "m_ignoreDuplicates" );
m_ignoreDuplicates->setText( i18n( "Ignore duplicated delimiters" ) );
glyr->addMultiCellWidget( m_ignoreDuplicates, 2, 2, 2, 4 );
- m_1stRowForFieldNames = new QCheckBox( page, "m_1stRowForFieldNames" );
+ m_1stRowForFieldNames = new TQCheckBox( page, "m_1stRowForFieldNames" );
m_1stRowForFieldNames->setText( i18n( "First row contains column names" ) );
glyr->addMultiCellWidget( m_1stRowForFieldNames, 3, 3, 2, 4 );
m_table = new KexiCSVImportDialogTable( plainPage(), "m_table" );
lyr->addWidget( m_table );
- m_table->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 1, 1) );
+ m_table->tqsetSizePolicy( TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding, 1, 1) );
m_table->setNumRows( 0 );
m_table->setNumCols( 0 );
@@ -278,7 +280,7 @@ KexiCSVImportDialog::KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin,
if ( m_mode == Clipboard )
{
setCaption( i18n( "Inserting From Clipboard" ) );
- QMimeSource * mime = QApplication::clipboard()->data();
+ TQMimeSource * mime = TQApplication::tqclipboard()->data();
if ( !mime )
{
KMessageBox::information( this, i18n("There is no data in the clipboard.") );
@@ -292,22 +294,22 @@ if ( m_mode == Clipboard )
m_cancelled = true;
return;
}
- m_fileArray = QByteArray(mime->encodedData( "text/plain" ) );
+ m_fileArray = TQByteArray(mime->tqencodedData( "text/plain" ) );
}
else if ( mode == File )
{*/
- m_dateRegExp = QRegExp("(\\d{1,4})([/\\-\\.])(\\d{1,2})([/\\-\\.])(\\d{1,4})");
- m_timeRegExp1 = QRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})");
- m_timeRegExp2 = QRegExp("(\\d{1,2}):(\\d{1,2})");
- m_fpNumberRegExp = QRegExp("[\\-]{0,1}\\d*[,\\.]\\d+");
- QString caption( i18n("Open CSV Data File") );
+ m_dateRegExp = TQRegExp("(\\d{1,4})([/\\-\\.])(\\d{1,2})([/\\-\\.])(\\d{1,4})");
+ m_timeRegExp1 = TQRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})");
+ m_timeRegExp2 = TQRegExp("(\\d{1,2}):(\\d{1,2})");
+ m_fpNumberRegExp = TQRegExp("[\\-]{0,1}\\d*[,\\.]\\d+");
+ TQString caption( i18n("Open CSV Data File") );
if (m_mode == File) {
- QStringList mimetypes( csvMimeTypes() );
-#ifdef Q_WS_WIN
+ TQStringList mimetypes( csvMimeTypes() );
+#ifdef TQ_WS_WIN
//! @todo remove
- QString recentDir = KGlobalSettings::documentPath();
- m_fname = QFileDialog::getOpenFileName(
+ TQString recentDir = KGlobalSettings::documentPath();
+ m_fname = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":CSVImportExport", recentDir).path(),
KexiUtils::fileDialogFilterStrings(mimetypes, false),
page, "KexiCSVImportDialog", caption);
@@ -327,18 +329,18 @@ if ( m_mode == Clipboard )
{
actionButton( Ok )->setEnabled( false );
m_cancelled = true;
- if (parentWidget())
- parentWidget()->raise();
+ if (tqparentWidget())
+ tqparentWidget()->raise();
return;
}
}
else if (m_mode == Clipboard) {
- QCString subtype("plain");
- m_clipboardData = QApplication::clipboard()->text(subtype, QClipboard::Clipboard);
+ TQCString subtype("plain");
+ m_clipboardData = TQApplication::tqclipboard()->text(subtype, TQClipboard::Clipboard);
/* debug
- for (int i=0;QApplication::clipboard()->data(QClipboard::Clipboard)->format(i);i++)
+ for (int i=0;TQApplication::tqclipboard()->data(TQClipboard::Clipboard)->format(i);i++)
kdDebug() << i << ": "
- << QApplication::clipboard()->data(QClipboard::Clipboard)->format(i) << endl;
+ << TQApplication::tqclipboard()->data(TQClipboard::Clipboard)->format(i) << endl;
*/
}
else {
@@ -350,7 +352,7 @@ if ( m_mode == Clipboard )
if (m_mode == File) {
m_loadingProgressDlg = new KProgressDialog(
this, "m_loadingProgressDlg", i18n("Loading CSV Data"), i18n("Loading CSV Data from \"%1\"...")
- .arg(QDir::convertSeparators(m_fname)), true);
+ .tqarg(TQDir::convertSeparators(m_fname)), true);
m_loadingProgressDlg->progressBar()->setTotalSteps( m_maximumRowsForPreview+1 );
m_loadingProgressDlg->show();
}
@@ -360,28 +362,28 @@ if ( m_mode == Clipboard )
}
//updateRowCountInfo();
- m_table->setSelectionMode(QTable::NoSelection);
-
- connect(m_formatCombo, SIGNAL(activated(int)),
- this, SLOT(formatChanged(int)));
- connect(m_delimiterWidget, SIGNAL(delimiterChanged(const QString&)),
- this, SLOT(delimiterChanged(const QString&)));
- connect(m_startAtLineSpinBox, SIGNAL(valueChanged ( int )),
- this, SLOT(startlineSelected(int)));
- connect(m_comboQuote, SIGNAL(activated(int)),
- this, SLOT(textquoteSelected(int)));
- connect(m_table, SIGNAL(currentChanged(int, int)),
- this, SLOT(currentCellChanged(int, int)));
- connect(m_table, SIGNAL(valueChanged(int,int)),
- this, SLOT(cellValueChanged(int,int)));
- connect(m_ignoreDuplicates, SIGNAL(stateChanged(int)),
- this, SLOT(ignoreDuplicatesChanged(int)));
- connect(m_1stRowForFieldNames, SIGNAL(stateChanged(int)),
- this, SLOT(slot1stRowForFieldNamesChanged(int)));
-
- connect(this, SIGNAL(user1Clicked()), this, SLOT(optionsButtonClicked()));
-
- installRecursiveEventFilter(this, this);
+ m_table->setSelectionMode(TQTable::NoSelection);
+
+ connect(m_formatCombo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(formatChanged(int)));
+ connect(m_delimiterWidget, TQT_SIGNAL(delimiterChanged(const TQString&)),
+ this, TQT_SLOT(delimiterChanged(const TQString&)));
+ connect(m_startAtLineSpinBox, TQT_SIGNAL(valueChanged ( int )),
+ this, TQT_SLOT(startlineSelected(int)));
+ connect(m_comboQuote, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(textquoteSelected(int)));
+ connect(m_table, TQT_SIGNAL(currentChanged(int, int)),
+ this, TQT_SLOT(currentCellChanged(int, int)));
+ connect(m_table, TQT_SIGNAL(valueChanged(int,int)),
+ this, TQT_SLOT(cellValueChanged(int,int)));
+ connect(m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)),
+ this, TQT_SLOT(ignoreDuplicatesChanged(int)));
+ connect(m_1stRowForFieldNames, TQT_SIGNAL(stateChanged(int)),
+ this, TQT_SLOT(slot1stRowForFieldNamesChanged(int)));
+
+ connect(this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(optionsButtonClicked()));
+
+ installRecursiveEventFilter(TQT_TQOBJECT(this), TQT_TQOBJECT(this));
initLater();
}
@@ -404,7 +406,7 @@ void KexiCSVImportDialog::initLater()
if (m_dialogCancelled) {
// m_loadingProgressDlg->hide();
// m_loadingProgressDlg->close();
- QTimer::singleShot(0, this, SLOT(reject()));
+ TQTimer::singleShot(0, this, TQT_SLOT(reject()));
return;
}
@@ -431,18 +433,18 @@ bool KexiCSVImportDialog::openData()
m_file->close();
delete m_file;
}
- m_file = new QFile(m_fname);
+ m_file = new TQFile(m_fname);
if (!m_file->open(IO_ReadOnly))
{
m_file->close();
delete m_file;
m_file = 0;
KMessageBox::sorry( this, i18n("Cannot open input file <nobr>\"%1\"</nobr>.")
- .arg(QDir::convertSeparators(m_fname)) );
+ .tqarg(TQDir::convertSeparators(m_fname)) );
actionButton( Ok )->setEnabled( false );
m_cancelled = true;
- if (parentWidget())
- parentWidget()->raise();
+ if (tqparentWidget())
+ tqparentWidget()->raise();
return false;
}
return true;
@@ -456,9 +458,9 @@ bool KexiCSVImportDialog::cancelled() const
void KexiCSVImportDialog::fillTable()
{
KexiUtils::WaitCursor wc(true);
- repaint();
+ tqrepaint();
m_blockUserEvents = true;
- QPushButton *pb = actionButton(KDialogBase::Cancel);
+ TQPushButton *pb = actionButton(KDialogBase::Cancel);
if (pb)
pb->setEnabled(true); //allow to cancel
KexiUtils::WaitCursor wait;
@@ -467,7 +469,7 @@ void KexiCSVImportDialog::fillTable()
m_table->setCurrentCell(0,0);
int row, column, maxColumn;
- QString field = QString::null;
+ TQString field = TQString();
for (row = 0; row < m_table->numRows(); ++row)
for (column = 0; column < m_table->numCols(); ++column)
@@ -489,17 +491,17 @@ void KexiCSVImportDialog::fillTable()
{
setText(row - m_startline, column, field, true);
++row;
- field = QString::null;
+ field = TQString();
}
adjustRows( row - m_startline - (m_1stRowForFieldNames->isChecked()?1:0) );
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
m_table->setNumCols(maxColumn);
for (column = 0; column < m_table->numCols(); ++column)
{
-// QString header = m_table->horizontalHeader()->label(column);
+// TQString header = m_table->horizontalHeader()->label(column);
// if (header != i18n("Text") && header != i18n("Number") &&
// header != i18n("Date") && header != i18n("Currency"))
// const int detectedType = m_detectedTypes[column+1];
@@ -522,44 +524,44 @@ void KexiCSVImportDialog::fillTable()
if (m_primaryKeyColumn != -1)
m_table->setPixmap(0, m_primaryKeyColumn, m_pkIcon);
- const int count = QMAX(0, m_table->numRows()-1+m_startline);
+ const int count = TQMAX(0, m_table->numRows()-1+m_startline);
m_allRowsLoadedInPreview = count < m_maximumRowsForPreview && !m_stoppedAt_MAX_BYTES_TO_PREVIEW;
if (m_allRowsLoadedInPreview) {
m_startAtLineSpinBox->setMaxValue(count);
m_startAtLineSpinBox->setValue(m_startline+1);
}
- m_startAtLineLabel->setText(i18n( "Start at line%1:").arg(
- m_allRowsLoadedInPreview ? QString(" (1-%1)").arg(count)
- : QString::null //we do not know what's real count
+ m_startAtLineLabel->setText(i18n( "Start at line%1:").tqarg(
+ m_allRowsLoadedInPreview ? TQString(" (1-%1)").tqarg(count)
+ : TQString() //we do not know what's real count
));
updateRowCountInfo();
m_blockUserEvents = false;
- repaint();
- m_table->verticalScrollBar()->repaint();//avoid missing repaint
- m_table->horizontalScrollBar()->repaint();//avoid missing repaint
+ tqrepaint();
+ m_table->verticalScrollBar()->tqrepaint();//avoid missing tqrepaint
+ m_table->horizontalScrollBar()->tqrepaint();//avoid missing tqrepaint
}
-QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStream& inputStream)
+TQString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream)
{
m_file->at(0);
// try to detect delimiter
// \t has priority, then ; then ,
- const QIODevice::Offset origOffset = inputStream.device()->at();
- QChar c, prevChar=0;
+ const TQIODevice::Offset origOffset = inputStream.tqdevice()->at();
+ TQChar c, prevChar=0;
int detectedDelimiter = 0;
bool insideQuote = false;
//characters by priority
- const int CH_TAB_AFTER_QUOTE = 500;
- const int CH_SEMICOLON_AFTER_QUOTE = 499;
- const int CH_COMMA_AFTER_QUOTE = 498;
+ const int CH_TAB_AFTER_TQUOTE = 500;
+ const int CH_SEMICOLON_AFTER_TQUOTE = 499;
+ const int CH_COMMA_AFTER_TQUOTE = 498;
const int CH_TAB = 200; // \t
const int CH_SEMICOLON = 199; // ;
const int CH_COMMA = 198; // ,
- QValueList<int> tabsPerLine, semicolonsPerLine, commasPerLine;
+ TQValueList<int> tabsPerLine, semicolonsPerLine, commasPerLine;
int tabs = 0, semicolons = 0, commas = 0;
int line = 0;
for (uint i=0; !inputStream.atEnd() && i < MAX_CHARS_TO_SCAN_WHILE_DETECTING_DELIMITER; i++) {
@@ -586,24 +588,24 @@ QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStr
}
else if (c=='\t') {
tabs++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_TAB_AFTER_QUOTE : CH_TAB, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_TAB_AFTER_TQUOTE : CH_TAB, detectedDelimiter );
}
else if (c==';') {
semicolons++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_QUOTE : CH_SEMICOLON, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_SEMICOLON_AFTER_TQUOTE : CH_SEMICOLON, detectedDelimiter );
}
else if (c==',') {
commas++;
- detectedDelimiter = QMAX( prevChar=='"' ? CH_COMMA_AFTER_QUOTE : CH_COMMA, detectedDelimiter );
+ detectedDelimiter = TQMAX( prevChar=='"' ? CH_COMMA_AFTER_TQUOTE : CH_COMMA, detectedDelimiter );
}
prevChar = c;
}
- inputStream.device()->at(origOffset); //restore orig. offset
+ inputStream.tqdevice()->at(origOffset); //restore orig. offset
//now, try to find a delimiter character that exists the same number of times in all the checked lines
//this detection method has priority over others
- QValueList<int>::ConstIterator it;
+ TQValueList<int>::ConstIterator it;
if (tabsPerLine.count()>1) {
tabs = tabsPerLine.isEmpty() ? 0 : tabsPerLine.first();
for (it=tabsPerLine.constBegin(); it!=tabsPerLine.constEnd(); ++it) {
@@ -632,54 +634,54 @@ QString KexiCSVImportDialog::detectDelimiterByLookingAtFirstBytesOfFile(QTextStr
return ",";
}
//now return the winning character by looking at CH_* symbol
- if (detectedDelimiter == CH_TAB_AFTER_QUOTE || detectedDelimiter == CH_TAB)
+ if (detectedDelimiter == CH_TAB_AFTER_TQUOTE || detectedDelimiter == CH_TAB)
return "\t";
- if (detectedDelimiter == CH_SEMICOLON_AFTER_QUOTE || detectedDelimiter == CH_SEMICOLON)
+ if (detectedDelimiter == CH_SEMICOLON_AFTER_TQUOTE || detectedDelimiter == CH_SEMICOLON)
return ";";
- if (detectedDelimiter == CH_COMMA_AFTER_QUOTE || detectedDelimiter == CH_COMMA)
+ if (detectedDelimiter == CH_COMMA_AFTER_TQUOTE || detectedDelimiter == CH_COMMA)
return ",";
return KEXICSV_DEFAULT_FILE_DELIMITER; //<-- default
}
-tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, int &maxColumn,
+tristate KexiCSVImportDialog::loadRows(TQString &field, int &row, int &column, int &maxColumn,
bool inGUI)
{
- enum { S_START, S_QUOTED_FIELD, S_MAYBE_END_OF_QUOTED_FIELD, S_END_OF_QUOTED_FIELD,
+ enum { S_START, S_TQUOTED_FIELD, S_MAYBE_END_OF_TQUOTED_FIELD, S_END_OF_TQUOTED_FIELD,
S_MAYBE_NORMAL_FIELD, S_NORMAL_FIELD } state = S_START;
- field = QString::null;
+ field = TQString();
const bool ignoreDups = m_ignoreDuplicates->isChecked();
bool lastCharDelimiter = false;
bool nextRow = false;
row = column = 1;
maxColumn = 0;
- QChar x;
+ TQChar x;
const bool hadInputStream = m_inputStream!=0;
delete m_inputStream;
if ( m_mode == Clipboard ) {
- m_inputStream = new QTextStream(m_clipboardData, IO_ReadOnly);
+ m_inputStream = new TQTextStream(m_clipboardData, IO_ReadOnly);
if (!hadInputStream)
m_delimiterWidget->setDelimiter(KEXICSV_DEFAULT_CLIPBOARD_DELIMITER);
}
else {
m_file->at(0); //always seek at 0 because loadRows() is called many times
- m_inputStream = new QTextStream(m_file);
+ m_inputStream = new TQTextStream(m_file);
if (m_options.defaultEncodingExplicitySet) {
- QTextCodec *codec = KGlobal::charsets()->codecForName(m_options.encoding);
+ TQTextCodec *codec = KGlobal::charsets()->codecForName(m_options.encoding);
if (codec)
- m_inputStream->setCodec(codec); //QTextCodec::codecForName("CP1250"));
+ m_inputStream->setCodec(codec); //TQTextCodec::codecForName("CP1250"));
}
if (m_detectDelimiter) {
- const QString delimiter( detectDelimiterByLookingAtFirstBytesOfFile(*m_inputStream) );
+ const TQString delimiter( detectDelimiterByLookingAtFirstBytesOfFile(*m_inputStream) );
if (m_delimiterWidget->delimiter() != delimiter)
m_delimiterWidget->setDelimiter( delimiter );
}
}
- const QChar delimiter(m_delimiterWidget->delimiter()[0]);
+ const TQChar delimiter(m_delimiterWidget->delimiter()[0]);
m_stoppedAt_MAX_BYTES_TO_PREVIEW = false;
int progressStep = 0;
if (m_importingProgressDlg)
- progressStep = QMAX( 1, m_importingProgressDlg->progressBar()->totalSteps()/200 );
+ progressStep = TQMAX( 1, m_importingProgressDlg->progressBar()->totalSteps()/200 );
int offset = 0;
for (;!m_inputStream->atEnd(); offset++)
{
@@ -690,7 +692,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (m_importingProgressDlg && ((offset % progressStep) < 5)) {
//update progr. bar dlg on final exporting
m_importingProgressDlg->progressBar()->setValue(offset);
- qApp->processEvents();
+ tqApp->processEvents();
if (m_importingProgressDlg->wasCancelled()) {
delete m_importingProgressDlg;
m_importingProgressDlg = 0;
@@ -703,10 +705,10 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (x == '\r') {
continue; // eat '\r', to handle RFC-compliant files
}
- if (offset==0 && x.unicode()==0xfeff) {
+ if (offset==0 && x.tqunicode()==0xfeff) {
// Ignore BOM, the "Byte Order Mark"
- // (http://en.wikipedia.org/wiki/Byte_Order_Mark, // http://www.unicode.org/charts/PDF/UFFF0.pdf)
- // Probably fixed in Qt4.
+ // (http://en.wikipedia.org/wiki/Byte_Order_Mark, // http://www.tqunicode.org/charts/PDF/UFFF0.pdf)
+ // Probably fixed in TQt4.
continue;
}
@@ -715,12 +717,12 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
case S_START :
if (x == m_textquote)
{
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == delimiter)
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if ((ignoreDups == false) || (lastCharDelimiter == false))
++column;
lastCharDelimiter = true;
@@ -730,11 +732,11 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (!inGUI) {
//fill remaining empty fields (database wants them explicitly)
for (int additionalColumn = column; additionalColumn <= maxColumn; additionalColumn++) {
- setText(row - m_startline, additionalColumn, QString::null, inGUI);
+ setText(row - m_startline, additionalColumn, TQString(), inGUI);
}
}
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -743,10 +745,10 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
state = S_MAYBE_NORMAL_FIELD;
}
break;
- case S_QUOTED_FIELD :
+ case S_TQUOTED_FIELD :
if (x == m_textquote)
{
- state = S_MAYBE_END_OF_QUOTED_FIELD;
+ state = S_MAYBE_END_OF_TQUOTED_FIELD;
}
/*allow \n inside quoted fields
else if (x == '\n')
@@ -756,7 +758,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -772,20 +774,20 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
field += x;
}
break;
- case S_MAYBE_END_OF_QUOTED_FIELD :
+ case S_MAYBE_END_OF_TQUOTED_FIELD :
if (x == m_textquote)
{
field += x; //no, this was just escaped quote character
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -798,18 +800,18 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
else
{
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
- case S_END_OF_QUOTED_FIELD :
+ case S_END_OF_TQUOTED_FIELD :
if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -822,25 +824,25 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
else
{
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
case S_MAYBE_NORMAL_FIELD :
if (x == m_textquote)
{
- field = QString::null;
- state = S_QUOTED_FIELD;
+ field = TQString();
+ state = S_TQUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :
if (x == delimiter || x == '\n')
{
setText(row - m_startline, column, field, inGUI);
- field = QString::null;
+ field = TQString();
if (x == '\n')
{
nextRow = true;
- maxColumn = QMAX( maxColumn, column );
+ maxColumn = TQMAX( maxColumn, column );
column = 1;
}
else
@@ -880,12 +882,12 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
m_1stRowForFieldNames->setChecked(true); //this will reload table
//slot1stRowForFieldNamesChanged(1);
m_blockUserEvents = false;
- repaint();
+ tqrepaint();
return false;
}
if (!m_importingProgressDlg && row % 20 == 0) {
- qApp->processEvents();
+ tqApp->processEvents();
//only for GUI mode:
if (!m_firstFillTableCall && m_loadingProgressDlg && m_loadingProgressDlg->wasCancelled()) {
delete m_loadingProgressDlg;
@@ -897,7 +899,7 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
}
if (!m_firstFillTableCall && m_loadingProgressDlg) {
- m_loadingProgressDlg->progressBar()->setValue(QMIN(m_maximumRowsForPreview, row));
+ m_loadingProgressDlg->progressBar()->setValue(TQMIN(m_maximumRowsForPreview, row));
}
if ( inGUI && row > (m_maximumRowsForPreview + (m_1stRowForFieldNamesDetected?1:0)) ) {
@@ -920,11 +922,11 @@ tristate KexiCSVImportDialog::loadRows(QString &field, int &row, int &column, in
void KexiCSVImportDialog::updateColumnText(int col)
{
- QString colName;
+ TQString colName;
if (col<(int)m_columnNames.count() && (m_1stRowForFieldNames->isChecked() || m_changedColumnNames[col]))
colName = m_columnNames[ col ];
if (colName.isEmpty()) {
- colName = i18n("Column %1").arg(col+1); //will be changed to a valid identifier on import
+ colName = i18n("Column %1").tqarg(col+1); //will be changed to a valid identifier on import
m_changedColumnNames[ col ] = false;
}
int detectedType = m_detectedTypes[col];
@@ -935,15 +937,15 @@ void KexiCSVImportDialog::updateColumnText(int col)
detectedType=_TEXT_TYPE;
}
m_table->horizontalHeader()->setLabel(col,
- i18n("Column %1").arg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") ");
+ i18n("Column %1").tqarg(col+1) + " \n(" + m_typeNames[ detectedType ] + ") ");
m_table->setText(0, col, colName);
m_table->horizontalHeader()->adjustHeaderSize();
//check uniqueness
- QValueList<int> *list = m_uniquenessTest[col];
+ TQValueList<int> *list = m_uniquenessTest[col];
if (m_primaryKeyColumn==-1 && list && !list->isEmpty()) {
qHeapSort(*list);
- QValueList<int>::ConstIterator it=list->constBegin();
+ TQValueList<int>::ConstIterator it=list->constBegin();
int prevValue = *it;
++it;
for(; it!=list->constEnd() && prevValue!=(*it); ++it)
@@ -963,7 +965,7 @@ void KexiCSVImportDialog::updateColumnText(int col)
list->clear();
}
-void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QString& text)
+void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const TQString& text)
{
int intValue;
const int type = m_detectedTypes[col];
@@ -1015,14 +1017,14 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
if (row==1 || type==_NO_TYPE_YET) {
bool detected = text.isEmpty();
if (!detected) {
- const QStringList dateTimeList( QStringList::split(" ", text) );
+ const TQStringList dateTimeList( TQStringList::split(" ", text) );
bool ok = dateTimeList.count()>=2;
//! @todo also support ISODateTime's "T" separator?
//! @todo also support timezones?
if (ok) {
//try all combinations
- QString datePart( dateTimeList[0].stripWhiteSpace() );
- QString timePart( dateTimeList[1].stripWhiteSpace() );
+ TQString datePart( dateTimeList[0].stripWhiteSpace() );
+ TQString timePart( dateTimeList[1].stripWhiteSpace() );
ok = m_dateRegExp.exactMatch(datePart)
&& (m_timeRegExp1.exactMatch(timePart) || m_timeRegExp2.exactMatch(timePart));
}
@@ -1042,10 +1044,10 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
//default: text type (already set)
}
//check uniqueness for this value
- QValueList<int> *list = m_uniquenessTest[col];
+ TQValueList<int> *list = m_uniquenessTest[col];
if (row==1 && (!list || !list->isEmpty()) && !text.isEmpty() && _NUMBER_TYPE == m_detectedTypes[col]) {
if (!list) {
- list = new QValueList<int>();
+ list = new TQValueList<int>();
m_uniquenessTest.insert(col, list);
}
list->append( intValue );
@@ -1057,7 +1059,7 @@ void KexiCSVImportDialog::detectTypeAndUniqueness(int row, int col, const QStrin
}
}
-bool KexiCSVImportDialog::parseDate(const QString& text, QDate& date)
+bool KexiCSVImportDialog::parseDate(const TQString& text, TQDate& date)
{
if (!m_dateRegExp.exactMatch(text))
return false;
@@ -1065,77 +1067,77 @@ bool KexiCSVImportDialog::parseDate(const QString& text, QDate& date)
//1 2 3 4 5 <- pos
const int d1 = m_dateRegExp.cap(1).toInt(), d3 = m_dateRegExp.cap(3).toInt(), d5 = m_dateRegExp.cap(5).toInt();
if (m_dateRegExp.cap(2)=="/") //probably separator for american format mm/dd/yyyy
- date = QDate(d5, d1, d3);
+ date = TQDate(d5, d1, d3);
else {
if (d5 > 31) //d5 == year
- date = QDate(d5, d3, d1);
+ date = TQDate(d5, d3, d1);
else //d1 == year
- date = QDate(d1, d3, d5);
+ date = TQDate(d1, d3, d5);
}
return date.isValid();
}
-bool KexiCSVImportDialog::parseTime(const QString& text, QTime& time)
+bool KexiCSVImportDialog::parseTime(const TQString& text, TQTime& time)
{
- time = QTime::fromString(text, Qt::ISODate); //same as m_timeRegExp1
+ time = TQTime::fromString(text, Qt::ISODate); //same as m_timeRegExp1
if (time.isValid())
return true;
if (m_timeRegExp2.exactMatch(text)) { //hh:mm:ss
- time = QTime(m_timeRegExp2.cap(1).toInt(), m_timeRegExp2.cap(3).toInt(), m_timeRegExp2.cap(5).toInt());
+ time = TQTime(m_timeRegExp2.cap(1).toInt(), m_timeRegExp2.cap(3).toInt(), m_timeRegExp2.cap(5).toInt());
return true;
}
return false;
}
-void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool inGUI)
+void KexiCSVImportDialog::setText(int row, int col, const TQString& text, bool inGUI)
{
if (!inGUI) {
//save text directly to database buffer
if (col==1) { //1st col
m_importingStatement->clearArguments();
if (m_implicitPrimaryKeyAdded)
- *m_importingStatement << QVariant(); //id will be autogenerated here
+ *m_importingStatement << TQVariant(); //id will be autogenerated here
}
const int detectedType = m_detectedTypes[col-1];
if (detectedType==_NUMBER_TYPE) {
- *m_importingStatement << ( text.isEmpty() ? QVariant() : text.toInt() );
+ *m_importingStatement << ( text.isEmpty() ? TQVariant() : text.toInt() );
//! @todo what about time and float/double types and different integer subtypes?
}
else if (detectedType==_FP_NUMBER_TYPE) {
- //replace ',' with '.'
- QCString t(text.latin1());
+ //tqreplace ',' with '.'
+ TQCString t(text.latin1());
const int textLen = t.length();
for (int i=0; i<textLen; i++) {
- if (t.at(i)==',') {
- t.at(i) = '.';
+ if (t.tqat(i)==',') {
+ t.tqat(i) = '.';
break;
}
}
- *m_importingStatement << ( t.isEmpty() ? QVariant() : t.toDouble() );
+ *m_importingStatement << ( t.isEmpty() ? TQVariant() : t.toDouble() );
}
else if (detectedType==_DATE_TYPE) {
- QDate date;
+ TQDate date;
if (parseDate(text, date))
*m_importingStatement << date;
}
else if (detectedType==_TIME_TYPE) {
- QTime time;
+ TQTime time;
if (parseTime(text, time))
*m_importingStatement << time;
}
else if (detectedType==_DATETIME_TYPE) {
- QStringList dateTimeList( QStringList::split(" ", text) );
+ TQStringList dateTimeList( TQStringList::split(" ", text) );
if (dateTimeList.count()<2)
- dateTimeList = QStringList::split("T", text); //also support ISODateTime's "T" separator
+ dateTimeList = TQStringList::split("T", text); //also support ISODateTime's "T" separator
//! @todo also support timezones?
if (dateTimeList.count()>=2) {
- QString datePart( dateTimeList[0].stripWhiteSpace() );
- QDate date;
+ TQString datePart( dateTimeList[0].stripWhiteSpace() );
+ TQDate date;
if (parseDate(datePart, date)) {
- QString timePart( dateTimeList[1].stripWhiteSpace() );
- QTime time;
+ TQString timePart( dateTimeList[1].stripWhiteSpace() );
+ TQTime time;
if (parseTime(timePart, time))
- *m_importingStatement << QDateTime(date, time);
+ *m_importingStatement << TQDateTime(date, time);
}
}
}
@@ -1154,10 +1156,10 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
if (m_1stRowForFieldNames->isChecked()) {
if ((row+m_startline)==1) {//this is for column name
- if ((col-1) < (int)m_changedColumnNames.size() && false==m_changedColumnNames[col-1]) {
+ if ((col-1) < (int)m_changedColumnNames.size() && (int)false==(int)m_changedColumnNames[col-1]) {
//this column has no custom name entered by a user
//-get the name from the data cell
- QString colName(text.simplifyWhiteSpace());
+ TQString colName(text.simplifyWhiteSpace());
if (!colName.isEmpty()) {
if (colName.left(1)>="0" && colName.left(1)<="9")
colName.prepend(i18n("Column")+" ");
@@ -1170,7 +1172,7 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
else {
if ((row+m_startline)==1) {//this row is for column name
if (m_1stRowForFieldNamesDetected && !m_1stRowForFieldNames->isChecked()) {
- QString f( text.simplifyWhiteSpace() );
+ TQString f( text.simplifyWhiteSpace() );
if (f.isEmpty() || !f[0].isLetter())
m_1stRowForFieldNamesDetected = false; //this couldn't be a column name
}
@@ -1191,7 +1193,7 @@ void KexiCSVImportDialog::setText(int row, int col, const QString& text, bool in
}
m_table->setText(row - 1, col - 1, (m_options.stripWhiteSpaceInTextValuesChecked ? text.stripWhiteSpace() : text));
- m_table->verticalHeader()->setLabel(row-1, QString::number(row-1));
+ m_table->verticalHeader()->setLabel(row-1, TQString::number(row-1));
detectTypeAndUniqueness(row-1, col-1, text);
}
@@ -1225,7 +1227,7 @@ void KexiCSVImportDialog::formatChanged(int id)
{
if (id==_PK_FLAG) {
if (m_primaryKeyColumn>=0 && m_primaryKeyColumn<m_table->numCols()) {
- m_table->setPixmap(0, m_primaryKeyColumn, QPixmap());
+ m_table->setPixmap(0, m_primaryKeyColumn, TQPixmap());
}
if (m_primaryKeyField->isChecked()) {
m_primaryKeyColumn = m_table->currentColumn();
@@ -1243,18 +1245,18 @@ void KexiCSVImportDialog::formatChanged(int id)
updateColumnText(m_table->currentColumn());
}
-void KexiCSVImportDialog::delimiterChanged(const QString& delimiter)
+void KexiCSVImportDialog::delimiterChanged(const TQString& delimiter)
{
Q_UNUSED(delimiter);
m_columnsAdjusted = false;
m_detectDelimiter = false; //selected by hand: do not detect in the future
- //delayed, otherwise combobox won't be repainted
+ //delayed, otherwise combobox won't be tqrepainted
fillTableLater();
}
void KexiCSVImportDialog::textquoteSelected(int)
{
- const QString tq(m_comboQuote->textQuote());
+ const TQString tq(m_comboQuote->textQuote());
if (tq.isEmpty())
m_textquote = 0;
else
@@ -1262,14 +1264,14 @@ void KexiCSVImportDialog::textquoteSelected(int)
kexipluginsdbg << "KexiCSVImportDialog::textquoteSelected(): " << m_textquote << endl;
- //delayed, otherwise combobox won't be repainted
+ //delayed, otherwise combobox won't be tqrepainted
fillTableLater();
}
void KexiCSVImportDialog::fillTableLater()
{
m_table->setNumRows( 0 );
- QTimer::singleShot(10, this, SLOT(fillTable()));
+ TQTimer::singleShot(10, this, TQT_SLOT(fillTable()));
}
void KexiCSVImportDialog::startlineSelected(int startline)
@@ -1293,7 +1295,7 @@ void KexiCSVImportDialog::currentCellChanged(int, int col)
type=_NUMBER_TYPE; //we're simplifying that for now
m_formatCombo->setCurrentItem( type );
- m_formatLabel->setText( m_formatComboText.arg(col+1) );
+ m_formatLabel->setText( m_formatComboText.tqarg(col+1) );
m_primaryKeyField->setEnabled( _NUMBER_TYPE == m_detectedTypes[col]);
m_primaryKeyField->blockSignals(true); //block to disable executing slotPrimaryKeyFieldToggled()
m_primaryKeyField->setChecked( m_primaryKeyColumn == col );
@@ -1341,12 +1343,12 @@ void KexiCSVImportDialog::accept()
}
//get suggested name based on the file name
- QString suggestedName;
+ TQString suggestedName;
if (m_mode==File) {
suggestedName = KURL::fromPathOrURL(m_fname).fileName();
//remove extension
if (!suggestedName.isEmpty()) {
- const int idx = suggestedName.findRev(".");
+ const int idx = suggestedName.tqfindRev(".");
if (idx!=-1)
suggestedName = suggestedName.mid(0, idx ).simplifyWhiteSpace();
}
@@ -1395,7 +1397,7 @@ void KexiCSVImportDialog::accept()
i18n("No Primary Key (autonumber) has been defined.\n"
"Should it be automatically defined on import (recommended)?\n\n"
"Note: An imported table without a Primary Key may not be editable (depending on database type)."),
- QString::null, KGuiItem(i18n("Add Database Primary Key to a Table", "Add Primary Key"), "key"),
+ TQString(), KGuiItem(i18n("Add Database Primary Key to a Table", "Add Primary Key"), "key"),
KGuiItem(i18n("Do Not Add Database Primary Key to a Table", "Do Not Add")))))
{
if (msgboxResult == KMessageBox::Cancel)
@@ -1405,19 +1407,19 @@ void KexiCSVImportDialog::accept()
//! @todo make this field hidden (what about e.g. pgsql?)
m_implicitPrimaryKeyAdded = true;
- QString fieldName("id");
- QString fieldCaption("Id");
+ TQString fieldName("id");
+ TQString fieldCaption("Id");
- QStringList colnames;
+ TQStringList colnames;
for (uint col = 0; col < numCols; col++)
colnames.append( m_table->text(0, col).lower().simplifyWhiteSpace() );
- if (colnames.find(fieldName)!=colnames.end()) {
+ if (colnames.tqfind(fieldName)!=colnames.end()) {
int num = 1;
- while (colnames.find(fieldName+QString::number(num))!=colnames.end())
+ while (colnames.tqfind(fieldName+TQString::number(num))!=colnames.end())
num++;
- fieldName += QString::number(num);
- fieldCaption += QString::number(num);
+ fieldName += TQString::number(num);
+ fieldCaption += TQString::number(num);
}
KexiDB::Field *field = new KexiDB::Field(
fieldName,
@@ -1425,7 +1427,7 @@ void KexiCSVImportDialog::accept()
KexiDB::Field::NoConstraints,
KexiDB::Field::NoOptions,
0,0, //uint length=0, uint precision=0,
- QVariant(), //QVariant defaultValue=QVariant(),
+ TQVariant(), //TQVariant defaultValue=TQVariant(),
fieldCaption
); //no description and width for now
field->setPrimaryKey(true);
@@ -1434,19 +1436,19 @@ void KexiCSVImportDialog::accept()
}
for (uint col = 0; col < numCols; col++) {
- QString fieldCaption( m_table->text(0, col).simplifyWhiteSpace() );
- QString fieldName( KexiUtils::string2Identifier( fieldCaption ) );
+ TQString fieldCaption( m_table->text(0, col).simplifyWhiteSpace() );
+ TQString fieldName( KexiUtils::string2Identifier( fieldCaption ) );
if (m_destinationTableSchema->field(fieldName)) {
- QString fixedFieldName;
+ TQString fixedFieldName;
uint i = 2; //"apple 2, apple 3, etc. if there're many "apple" names
do {
- fixedFieldName = fieldName + "_" + QString::number(i);
+ fixedFieldName = fieldName + "_" + TQString::number(i);
if (!m_destinationTableSchema->field(fixedFieldName))
break;
i++;
} while (true);
fieldName = fixedFieldName;
- fieldCaption += (" " + QString::number(i));
+ fieldCaption += (" " + TQString::number(i));
}
const int detectedType = m_detectedTypes[col];
KexiDB::Field::Type fieldType;
@@ -1471,7 +1473,7 @@ void KexiCSVImportDialog::accept()
KexiDB::Field::NoConstraints,
KexiDB::Field::NoOptions,
0,0, //uint length=0, uint precision=0,
- QVariant(), //QVariant defaultValue=QVariant(),
+ TQVariant(), //TQVariant defaultValue=TQVariant(),
fieldCaption
); //no description and width for now
@@ -1516,17 +1518,17 @@ void KexiCSVImportDialog::accept()
if (m_file) {
if (!m_importingProgressDlg) {
m_importingProgressDlg = new KProgressDialog( this, "m_importingProgressDlg",
- i18n("Importing CSV Data"), QString::null, true );
+ i18n("Importing CSV Data"), TQString(), true );
}
m_importingProgressDlg->setLabel(
i18n("Importing CSV Data from <nobr>\"%1\"</nobr> into \"%2\" table...")
- .arg(QDir::convertSeparators(m_fname)).arg(m_destinationTableSchema->name()) );
- m_importingProgressDlg->progressBar()->setTotalSteps( QFileInfo(*m_file).size() );
+ .tqarg(TQDir::convertSeparators(m_fname)).tqarg(m_destinationTableSchema->name()) );
+ m_importingProgressDlg->progressBar()->setTotalSteps( TQFileInfo(*m_file).size() );
m_importingProgressDlg->show();
}
int row, column, maxColumn;
- QString field = QString::null;
+ TQString field = TQString();
// main job
res = loadRows(field, row, column, maxColumn, false /*!gui*/ );
@@ -1546,14 +1548,14 @@ void KexiCSVImportDialog::accept()
setText(row - m_startline, column, field, false /*!gui*/);
//fill remaining empty fields (database wants them explicitly)
for (int additionalColumn = column; additionalColumn <= maxColumn; additionalColumn++) {
- setText(row - m_startline, additionalColumn, QString::null, false /*!gui*/);
+ setText(row - m_startline, additionalColumn, TQString(), false /*!gui*/);
}
if (!saveRow(false /*!gui*/)) {
msg.showErrorMessage(m_conn);
_DROP_DEST_TABLE_AND_RETURN;
}
++row;
- field = QString::null;
+ field = TQString();
}
if (!tg.commit()) {
@@ -1565,16 +1567,16 @@ void KexiCSVImportDialog::accept()
partItemForSavedTable->setIdentifier( m_destinationTableSchema->id() );
project->addStoredItem( part->info(), partItemForSavedTable );
- QDialog::accept();
+ TQDialog::accept();
KMessageBox::information(this, i18n("Data has been successfully imported to table \"%1\".")
- .arg(m_destinationTableSchema->name()));
- parentWidget()->raise();
+ .tqarg(m_destinationTableSchema->name()));
+ tqparentWidget()->raise();
m_conn = 0;
}
int KexiCSVImportDialog::getHeader(int col)
{
- QString header = m_table->horizontalHeader()->label(col);
+ TQString header = m_table->horizontalHeader()->label(col);
if (header == i18n("Text type for column", "Text"))
return TEXT;
@@ -1586,7 +1588,7 @@ int KexiCSVImportDialog::getHeader(int col)
return DATE;
}
-QString KexiCSVImportDialog::getText(int row, int col)
+TQString KexiCSVImportDialog::getText(int row, int col)
{
return m_table->text(row, col);
}
@@ -1607,7 +1609,7 @@ void KexiCSVImportDialog::slot1stRowForFieldNamesChanged(int)
void KexiCSVImportDialog::optionsButtonClicked()
{
KexiCSVImportOptionsDialog dlg(m_options, this);
- if (QDialog::Accepted != dlg.exec())
+ if (TQDialog::Accepted != dlg.exec())
return;
KexiCSVImportOptions newOptions( dlg.options() );
@@ -1619,23 +1621,23 @@ void KexiCSVImportDialog::optionsButtonClicked()
}
}
-bool KexiCSVImportDialog::eventFilter ( QObject * watched, QEvent * e )
+bool KexiCSVImportDialog::eventFilter ( TQObject * watched, TQEvent * e )
{
- QEvent::Type t = e->type();
+ TQEvent::Type t = e->type();
// temporary disable keyboard and mouse events for time-consuming tasks
- if (m_blockUserEvents && (t==QEvent::KeyPress || t==QEvent::KeyRelease
- || t==QEvent::MouseButtonPress || t==QEvent::MouseButtonDblClick
- || t==QEvent::Paint ))
+ if (m_blockUserEvents && (t==TQEvent::KeyPress || t==TQEvent::KeyRelease
+ || t==TQEvent::MouseButtonPress || t==TQEvent::MouseButtonDblClick
+ || t==TQEvent::Paint ))
return true;
- if (watched == m_startAtLineSpinBox && t==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+ if (TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(m_startAtLineSpinBox) && t==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
m_table->setFocus();
return true;
}
}
- return QDialog::eventFilter( watched, e );
+ return TQDialog::eventFilter( watched, e );
}
void KexiCSVImportDialog::slotPrimaryKeyFieldToggled(bool on)
@@ -1649,13 +1651,13 @@ void KexiCSVImportDialog::updateRowCountInfo()
m_infoLbl->setFileName( m_fname );
if (m_allRowsLoadedInPreview) {
m_infoLbl->setCommentText(
- i18n("row count", "(rows: %1)").arg( m_table->numRows()-1+m_startline ) );
- QToolTip::remove( m_infoLbl );
+ i18n("row count", "(rows: %1)").tqarg( m_table->numRows()-1+m_startline ) );
+ TQToolTip::remove( m_infoLbl );
}
else {
m_infoLbl->setCommentText(
- i18n("row count", "(rows: more than %1)").arg( m_table->numRows()-1+m_startline ) );
- QToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") );
+ i18n("row count", "(rows: more than %1)").tqarg( m_table->numRows()-1+m_startline ) );
+ TQToolTip::add( m_infoLbl->commentLabel(), i18n("Not all rows are visible on this preview") );
}
}
diff --git a/kexi/plugins/importexport/csv/kexicsvimportdialog.h b/kexi/plugins/importexport/csv/kexicsvimportdialog.h
index 1f7b159e2..dd8a51df8 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportdialog.h
+++ b/kexi/plugins/importexport/csv/kexicsvimportdialog.h
@@ -28,11 +28,11 @@
#ifndef KEXI_CSVDIALOG_H
#define KEXI_CSVDIALOG_H
-#include <qvaluevector.h>
-#include <qvaluelist.h>
-#include <qptrvector.h>
-#include <qregexp.h>
-#include <qbitarray.h>
+#include <tqvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqptrvector.h>
+#include <tqregexp.h>
+#include <tqbitarray.h>
#include <kdialogbase.h>
@@ -41,17 +41,17 @@
#include "kexicsvimportoptionsdlg.h"
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QButtonGroup;
-class QCheckBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QRadioButton;
-class QTable;
-class QFile;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQButtonGroup;
+class TQCheckBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQRadioButton;
+class TQTable;
+class TQFile;
class KComboBox;
class KIntSpinBox;
class KProgressDialog;
@@ -78,69 +78,70 @@ class KexiCSVInfoLabel;
class KexiCSVImportDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { Clipboard, File /*, Column*/ };
enum Header { TEXT, NUMBER, DATE, CURRENCY };
//! @todo what about making it kexidb-independent?
- KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, QWidget * parent,
- const char * name = 0/*, QRect const & rect*/);
+ KexiCSVImportDialog( Mode mode, KexiMainWindow* mainWin, TQWidget * tqparent,
+ const char * name = 0/*, TQRect const & rect*/);
virtual ~KexiCSVImportDialog();
bool cancelled() const;
- virtual bool eventFilter ( QObject * watched, QEvent * e );
+ virtual bool eventFilter ( TQObject * watched, TQEvent * e );
protected:
bool openData();
virtual void accept();
private:
- QGridLayout* MyDialogLayout;
- QHBoxLayout* Layout1;
- QTable* m_table;
+ TQGridLayout* MyDialogLayout;
+ TQHBoxLayout* Layout1;
+ TQTable* m_table;
KexiCSVDelimiterWidget* m_delimiterWidget;
bool m_detectDelimiter; //!< true if delimiter should be detected
//!< (true by default, set to false if user sets delimiter)
- QString m_formatComboText;
- QLabel* m_formatLabel;
+ TQString m_formatComboText;
+ TQLabel* m_formatLabel;
KComboBox* m_formatCombo;
KIntSpinBox *m_startAtLineSpinBox;
KexiCSVTextQuoteComboBox* m_comboQuote;
- QLabel* m_startAtLineLabel;
- QLabel* TextLabel2;
- QCheckBox* m_ignoreDuplicates;
- QCheckBox* m_1stRowForFieldNames;
- QCheckBox* m_primaryKeyField;
+ TQLabel* m_startAtLineLabel;
+ TQLabel* TextLabel2;
+ TQCheckBox* m_ignoreDuplicates;
+ TQCheckBox* m_1stRowForFieldNames;
+ TQCheckBox* m_primaryKeyField;
KexiMainWindow* m_mainWin;
- void detectTypeAndUniqueness(int row, int col, const QString& text);
- void setText(int row, int col, const QString& text, bool inGUI);
+ void detectTypeAndUniqueness(int row, int col, const TQString& text);
+ void setText(int row, int col, const TQString& text, bool inGUI);
/*! Parses date from \a text and stores into \a date.
m_dateRegExp is used for clever detection;
if '/' separated is found, it's assumed the format is american mm/dd/yyyy.
This function supports omitted zeros, so 1/2/2006 is parsed properly too.
\return true on success. */
- bool parseDate(const QString& text, QDate& date);
+ bool parseDate(const TQString& text, TQDate& date);
/*! Parses time from \a text and stores into \a date.
m_timeRegExp1 and m_timeRegExp2 are used for clever detection;
both hh:mm:ss and hh:mm are supported.
This function supports omitted zeros, so 1:2:3 is parsed properly too.
\return true on success. */
- bool parseTime(const QString& text, QTime& time);
+ bool parseTime(const TQString& text, TQTime& time);
/*! Called after the first fillTable() when number of rows is unknown. */
void adjustRows(int iRows);
int getHeader(int col);
- QString getText(int row, int col);
+ TQString getText(int row, int col);
void updateColumnText(int col);
void updateRowCountInfo();
- tristate loadRows(QString &field, int &row, int &columnm, int &maxColumn, bool inGUI);
+ tristate loadRows(TQString &field, int &row, int &columnm, int &maxColumn, bool inGUI);
/*! Detects delimiter by looking at first 4K bytes of the data. Used by loadRows().
The used algorithm:
@@ -154,8 +155,8 @@ class KexiCSVImportDialog : public KDialogBase
(escaped) quotes.
2. While scanning the data, for every row following number of tabs, semicolons and commas
(only these outside of the quotes) are computed. On every line the values are appended
- to a separate list (QValueList<int>).
- 3. After scanning, all the values are checked on the QValueList<int> of tabs.
+ to a separate list (TQValueList<int>).
+ 3. After scanning, all the values are checked on the TQValueList<int> of tabs.
If the list has more one element (so there was more than one row) and all the values
(numbers of tabs) are equal, it's very probable the tab is a delimiter.
So, this character is returned as a delimiter.
@@ -163,7 +164,7 @@ class KexiCSVImportDialog : public KDialogBase
3b. The same algorithm as in 3. is performed for comma character.
4. If the step 3. did not return a delimiter, a character found in step 1. with
the highest priority is retured as delimiter. */
- QString detectDelimiterByLookingAtFirstBytesOfFile(QTextStream& inputStream);
+ TQString detectDelimiterByLookingAtFirstBytesOfFile(TQTextStream& inputStream);
/*! Callback, called whenever row is loaded in loadRows(). When inGUI is true,
nothing is performed, else database buffer is written back to the database. */
@@ -172,23 +173,23 @@ class KexiCSVImportDialog : public KDialogBase
bool m_cancelled;
bool m_adjustRows;
int m_startline;
- QChar m_textquote;
- QString m_clipboardData;
- QByteArray m_fileArray;
+ TQChar m_textquote;
+ TQString m_clipboardData;
+ TQByteArray m_fileArray;
Mode m_mode;
int m_prevSelectedCol;
//! vector of detected types, 0==text (the default), 1==number, 2==date
//! @todo more types
- QValueVector<int> m_detectedTypes;
+ TQValueVector<int> m_detectedTypes;
//! m_detectedUniqueColumns[i]==true means that i-th column has unique values
//! (only for numeric type)
- QPtrVector< QValueList<int> > m_uniquenessTest;
+ TQPtrVector< TQValueList<int> > m_uniquenessTest;
- QRegExp m_dateRegExp, m_timeRegExp1, m_timeRegExp2, m_fpNumberRegExp;
- QValueVector<QString> m_typeNames, m_columnNames;
- QBitArray m_changedColumnNames;
+ TQRegExp m_dateRegExp, m_timeRegExp1, m_timeRegExp2, m_fpNumberRegExp;
+ TQValueVector<TQString> m_typeNames, m_columnNames;
+ TQBitArray m_changedColumnNames;
bool m_columnsAdjusted : 1; //!< to call adjustColumn() only once
bool m_1stRowForFieldNamesDetected : 1; //!< used to force rerun fillTable() after 1st row
bool m_firstFillTableCall : 1; //!< used to know whether it's 1st fillTable() call
@@ -196,10 +197,10 @@ class KexiCSVImportDialog : public KDialogBase
int m_primaryKeyColumn; //!< index of column with PK assigned (-1 if none)
int m_maximumRowsForPreview;
int m_maximumBytesForPreview;
- QPixmap m_pkIcon;
- QString m_fname;
- QFile* m_file;
- QTextStream *m_inputStream; //!< used in loadData()
+ TQPixmap m_pkIcon;
+ TQString m_fname;
+ TQFile* m_file;
+ TQTextStream *m_inputStream; //!< used in loadData()
KexiCSVImportOptions m_options;
KProgressDialog *m_loadingProgressDlg, *m_importingProgressDlg;
bool m_dialogCancelled;
@@ -207,7 +208,7 @@ class KexiCSVImportDialog : public KDialogBase
KexiDB::Connection *m_conn; //!< (temp) database connection used for importing
KexiDB::TableSchema *m_destinationTableSchema; //!< (temp) dest. table schema used for importing
KexiDB::PreparedStatement::Ptr m_importingStatement;
- QValueList<QVariant> m_dbRowBuffer; //!< (temp) used for importing
+ TQValueList<TQVariant> m_dbRowBuffer; //!< (temp) used for importing
bool m_implicitPrimaryKeyAdded; //!< (temp) used for importing
bool m_allRowsLoadedInPreview; //!< we need to know whether all rows were loaded or it's just a partial data preview
bool m_stoppedAt_MAX_BYTES_TO_PREVIEW; //!< used to compute m_allRowsLoadedInPreview
@@ -217,7 +218,7 @@ class KexiCSVImportDialog : public KDialogBase
void fillTableLater();
void initLater();
void formatChanged(int id);
- void delimiterChanged(const QString& delimiter);
+ void delimiterChanged(const TQString& delimiter);
void startlineSelected(int line);
void textquoteSelected(int);
void currentCellChanged(int, int col);
diff --git a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
index b381dde3f..23fee674a 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.cpp
@@ -20,10 +20,10 @@
#include "kexicsvimportoptionsdlg.h"
#include <widget/kexicharencodingcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextcodec.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextcodec.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -37,7 +37,7 @@ KexiCSVImportOptions::KexiCSVImportOptions()
kapp->config()->setGroup("ImportExport");
encoding = kapp->config()->readEntry("DefaultEncodingForImportingCSVFiles");
if (encoding.isEmpty()) {
- encoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ encoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
defaultEncodingExplicitySet = false;
}
else
@@ -66,38 +66,38 @@ bool KexiCSVImportOptions::operator!= ( const KexiCSVImportOptions & opt ) const
//----------------------------------
KexiCSVImportOptionsDialog::KexiCSVImportOptionsDialog(
- const KexiCSVImportOptions& options, QWidget* parent )
+ const KexiCSVImportOptions& options, TQWidget* tqparent )
: KDialogBase(
KDialogBase::Plain,
i18n( "CSV Import Options" ),
Ok|Cancel,
Ok,
- parent,
+ tqparent,
"KexiCSVImportOptionsDialog",
true,
false
)
{
- QGridLayout *lyr = new QGridLayout( plainPage(), 5, 3,
+ TQGridLayout *lyr = new TQGridLayout( plainPage(), 5, 3,
KDialogBase::marginHint(), KDialogBase::spacingHint());
m_encodingComboBox = new KexiCharacterEncodingComboBox(plainPage(), options.encoding);
lyr->addWidget( m_encodingComboBox, 0, 1 );
- QLabel* lbl = new QLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
+ TQLabel* lbl = new TQLabel( m_encodingComboBox, i18n("Text encoding:"), plainPage());
lyr->addWidget( lbl, 0, 0 );
- lyr->addItem( new QSpacerItem( 20, KDialogBase::spacingHint(), QSizePolicy::Fixed, QSizePolicy::Fixed ), 2, 1 );
- lyr->addItem( new QSpacerItem( 121, KDialogBase::spacingHint(), QSizePolicy::Expanding, QSizePolicy::Minimum ), 0, 2 );
+ lyr->addItem( new TQSpacerItem( 20, KDialogBase::spacingHint(), TQSizePolicy::Fixed, TQSizePolicy::Fixed ), 2, 1 );
+ lyr->addItem( new TQSpacerItem( 121, KDialogBase::spacingHint(), TQSizePolicy::Expanding, TQSizePolicy::Minimum ), 0, 2 );
- m_chkAlwaysUseThisEncoding = new QCheckBox(
+ m_chkAlwaysUseThisEncoding = new TQCheckBox(
i18n("Always use this encoding when importing CSV data files"), plainPage());
lyr->addWidget( m_chkAlwaysUseThisEncoding, 1, 1 );
- m_chkStripWhiteSpaceInTextValues = new QCheckBox(
+ m_chkStripWhiteSpaceInTextValues = new TQCheckBox(
i18n("Strip leading and trailing blanks off of text values"), plainPage());
lyr->addWidget( m_chkStripWhiteSpaceInTextValues, 3, 1 );
- lyr->addItem( new QSpacerItem( 20, KDialogBase::spacingHint(), QSizePolicy::Minimum, QSizePolicy::Expanding ), 4, 1 );
+ lyr->addItem( new TQSpacerItem( 20, KDialogBase::spacingHint(), TQSizePolicy::Minimum, TQSizePolicy::Expanding ), 4, 1 );
//update widgets
if (options.defaultEncodingExplicitySet) {
diff --git a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
index e0567c9cf..51319bbfb 100644
--- a/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
+++ b/kexi/plugins/importexport/csv/kexicsvimportoptionsdlg.h
@@ -21,7 +21,7 @@
#define KEXICSVOPTIONSDIALOG_H
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
class KexiCharacterEncodingComboBox;
@@ -35,7 +35,7 @@ class KexiCSVImportOptions
bool operator== ( const KexiCSVImportOptions & opt ) const;
bool operator!= ( const KexiCSVImportOptions & opt ) const;
- QString encoding;
+ TQString encoding;
bool defaultEncodingExplicitySet;
bool stripWhiteSpaceInTextValuesChecked;
};
@@ -44,8 +44,9 @@ class KexiCSVImportOptions
class KexiCSVImportOptionsDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiCSVImportOptionsDialog( const KexiCSVImportOptions& options, QWidget* parent = 0 );
+ KexiCSVImportOptionsDialog( const KexiCSVImportOptions& options, TQWidget* tqparent = 0 );
virtual ~KexiCSVImportOptionsDialog();
KexiCSVImportOptions options() const;
@@ -55,8 +56,8 @@ class KexiCSVImportOptionsDialog : public KDialogBase
protected:
KexiCharacterEncodingComboBox *m_encodingComboBox;
- QCheckBox *m_chkAlwaysUseThisEncoding;
- QCheckBox *m_chkStripWhiteSpaceInTextValues;
+ TQCheckBox *m_chkAlwaysUseThisEncoding;
+ TQCheckBox *m_chkStripWhiteSpaceInTextValues;
};
#endif
diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
index 8e3cf4c2c..f490795b6 100644
--- a/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
+++ b/kexi/plugins/importexport/csv/kexicsvwidgets.cpp
@@ -19,9 +19,9 @@
#include "kexicsvwidgets.h"
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <klineedit.h>
@@ -32,15 +32,15 @@
#define KEXICSV_OTHER_DELIMITER_INDEX 4
-KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget * parent )
- : QWidget(parent, "KexiCSVDelimiterWidget")
+KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, TQWidget * tqparent )
+ : TQWidget(tqparent, "KexiCSVDelimiterWidget")
, m_availableDelimiters(KEXICSV_OTHER_DELIMITER_INDEX)
{
- QBoxLayout *lyr =
+ TQBoxLayout *lyr =
lineEditOnBottom ?
- (QBoxLayout *)new QVBoxLayout( this, 0, KDialogBase::spacingHint() )
- : (QBoxLayout *)new QHBoxLayout( this, 0, KDialogBase::spacingHint() );
+ (TQBoxLayout *)new TQVBoxLayout( this, 0, KDialogBase::spacingHint() )
+ : (TQBoxLayout *)new TQHBoxLayout( this, 0, KDialogBase::spacingHint() );
m_availableDelimiters[0]=KEXICSV_DEFAULT_FILE_DELIMITER;
m_availableDelimiters[1]=";";
@@ -57,20 +57,20 @@ KexiCSVDelimiterWidget::KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget *
setFocusProxy(m_combo);
m_delimiterEdit = new KLineEdit( this, "m_delimiterEdit" );
-// m_delimiterEdit->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) );
- m_delimiterEdit->setMaximumSize( QSize( 30, 32767 ) );
+// m_delimiterEdit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) );
+ m_delimiterEdit->setMaximumSize( TQSize( 30, 32767 ) );
m_delimiterEdit->setMaxLength(1);
lyr->addWidget( m_delimiterEdit );
if (!lineEditOnBottom)
lyr->addStretch(2);
slotDelimiterChangedInternal(KEXICSV_DEFAULT_FILE_DELIMITER_INDEX); //this will init m_delimiter
- connect(m_combo, SIGNAL(activated(int)),
- this, SLOT(slotDelimiterChanged(int)));
- connect(m_delimiterEdit, SIGNAL(returnPressed()),
- this, SLOT(slotDelimiterLineEditReturnPressed()));
- connect(m_delimiterEdit, SIGNAL(textChanged( const QString & )),
- this, SLOT(slotDelimiterLineEditTextChanged( const QString & ) ));
+ connect(m_combo, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotDelimiterChanged(int)));
+ connect(m_delimiterEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(slotDelimiterLineEditReturnPressed()));
+ connect(m_delimiterEdit, TQT_SIGNAL(textChanged( const TQString & )),
+ this, TQT_SLOT(slotDelimiterLineEditTextChanged( const TQString & ) ));
}
void KexiCSVDelimiterWidget::slotDelimiterChanged(int index)
@@ -105,14 +105,14 @@ void KexiCSVDelimiterWidget::slotDelimiterLineEditReturnPressed()
slotDelimiterChangedInternal(KEXICSV_OTHER_DELIMITER_INDEX);
}
-void KexiCSVDelimiterWidget::slotDelimiterLineEditTextChanged( const QString & )
+void KexiCSVDelimiterWidget::slotDelimiterLineEditTextChanged( const TQString & )
{
slotDelimiterChangedInternal(KEXICSV_OTHER_DELIMITER_INDEX);
}
-void KexiCSVDelimiterWidget::setDelimiter(const QString& delimiter)
+void KexiCSVDelimiterWidget::setDelimiter(const TQString& delimiter)
{
- QValueVector<QString>::ConstIterator it = m_availableDelimiters.constBegin();
+ TQValueVector<TQString>::ConstIterator it = m_availableDelimiters.constBegin();
int index = 0;
for (; it != m_availableDelimiters.constEnd(); ++it, index++) {
if (*it == delimiter) {
@@ -129,22 +129,22 @@ void KexiCSVDelimiterWidget::setDelimiter(const QString& delimiter)
//----------------------------------------------------
-KexiCSVTextQuoteComboBox::KexiCSVTextQuoteComboBox( QWidget * parent )
- : KComboBox(parent, "KexiCSVTextQuoteComboBox")
+KexiCSVTextQuoteComboBox::KexiCSVTextQuoteComboBox( TQWidget * tqparent )
+ : KComboBox(tqparent, "KexiCSVTextQuoteComboBox")
{
insertItem( "\"" );
insertItem( "'" );
insertItem( i18n( "None" ) );
}
-QString KexiCSVTextQuoteComboBox::textQuote() const
+TQString KexiCSVTextQuoteComboBox::textQuote() const
{
if (currentItem()==2)
- return QString::null;
+ return TQString();
return currentText();
}
-void KexiCSVTextQuoteComboBox::setTextQuote(const QString& textQuote)
+void KexiCSVTextQuoteComboBox::setTextQuote(const TQString& textQuote)
{
if (textQuote=="\"" || textQuote=="'")
setCurrentText(textQuote);
@@ -154,78 +154,78 @@ void KexiCSVTextQuoteComboBox::setTextQuote(const QString& textQuote)
//----------------------------------------------------
-KexiCSVInfoLabel::KexiCSVInfoLabel( const QString& labelText, QWidget* parent )
- : QWidget(parent, "KexiCSVInfoLabel")
+KexiCSVInfoLabel::KexiCSVInfoLabel( const TQString& labelText, TQWidget* tqparent )
+ : TQWidget(tqparent, "KexiCSVInfoLabel")
{
- QVBoxLayout *vbox = new QVBoxLayout( this, 0, KDialogBase::spacingHint() );
- QHBoxLayout *hbox = new QHBoxLayout( this );
+ TQVBoxLayout *vbox = new TQVBoxLayout( this, 0, KDialogBase::spacingHint() );
+ TQHBoxLayout *hbox = new TQHBoxLayout( this );
vbox->addLayout(hbox);
- m_leftLabel = new QLabel(labelText, this);
+ m_leftLabel = new TQLabel(labelText, this);
m_leftLabel->setMinimumWidth(130);
- m_leftLabel->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- m_leftLabel->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ m_leftLabel->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ m_leftLabel->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addWidget(m_leftLabel);
- m_iconLbl = new QLabel(this);
- m_iconLbl->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- m_iconLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
+ m_iconLbl = new TQLabel(this);
+ m_iconLbl->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ m_iconLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft);
m_fnameLbl = new KActiveLabel(this);
- m_fnameLbl->setFocusPolicy(NoFocus);
- m_fnameLbl->setTextFormat(Qt::PlainText);
- m_fnameLbl->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding,1,0));
+ m_fnameLbl->setFocusPolicy(TQ_NoFocus);
+ m_fnameLbl->setTextFormat(TQt::PlainText);
+ m_fnameLbl->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding,1,0));
m_fnameLbl->setLineWidth(1);
- m_fnameLbl->setFrameStyle(QFrame::Box);
- m_fnameLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ m_fnameLbl->setFrameStyle(TQFrame::Box);
+ m_fnameLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addSpacing(5);
hbox->addWidget(m_iconLbl);
- hbox->addWidget(m_fnameLbl, 1, Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
+ hbox->addWidget(m_fnameLbl, 1, TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
hbox->addSpacing(10);
m_commentLbl = new KActiveLabel(this);
- m_commentLbl->setFocusPolicy(NoFocus);
- m_commentLbl->setTextFormat(Qt::PlainText);
- m_commentLbl->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
+ m_commentLbl->setFocusPolicy(TQ_NoFocus);
+ m_commentLbl->setTextFormat(TQt::PlainText);
+ m_commentLbl->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding);
m_commentLbl->setLineWidth(1);
- m_commentLbl->setFrameStyle(QFrame::Box);
- m_commentLbl->setAlignment(Qt::AlignVCenter | Qt::AlignLeft | Qt::WordBreak);
- hbox->addWidget(m_commentLbl, 0, Qt::AlignVCenter | Qt::AlignRight | Qt::WordBreak);
+ m_commentLbl->setFrameStyle(TQFrame::Box);
+ m_commentLbl->tqsetAlignment(TQt::AlignVCenter | TQt::AlignLeft | TQt::WordBreak);
+ hbox->addWidget(m_commentLbl, 0, TQt::AlignVCenter | TQt::AlignRight | TQt::WordBreak);
- m_separator = new QFrame(this);
- m_separator->setFrameShape(QFrame::HLine);
- m_separator->setFrameShadow(QFrame::Sunken);
+ m_separator = new TQFrame(this);
+ m_separator->setFrameShape(TQFrame::HLine);
+ m_separator->setFrameShadow(TQFrame::Sunken);
vbox->addWidget(m_separator);
}
-void KexiCSVInfoLabel::setFileName( const QString& fileName )
+void KexiCSVInfoLabel::setFileName( const TQString& fileName )
{
- m_fnameLbl->setText( QDir::convertSeparators(fileName) );
+ m_fnameLbl->setText( TQDir::convertSeparators(fileName) );
if (!fileName.isEmpty()) {
m_iconLbl->setPixmap(
KMimeType::pixmapForURL(KURL::fromPathOrURL(fileName), 0, KIcon::Desktop) );
}
}
-void KexiCSVInfoLabel::setLabelText( const QString& text )
+void KexiCSVInfoLabel::setLabelText( const TQString& text )
{
m_fnameLbl->setText( text );
// int lines = m_fnameLbl->lines();
// m_fnameLbl->setFixedHeight(
-// QFontMetrics(m_fnameLbl->currentFont()).height() * lines );
+// TQFontMetrics(m_fnameLbl->currentFont()).height() * lines );
}
-void KexiCSVInfoLabel::setIcon(const QString& iconName)
+void KexiCSVInfoLabel::setIcon(const TQString& iconName)
{
m_iconLbl->setPixmap( DesktopIcon(iconName) );
}
-void KexiCSVInfoLabel::setCommentText( const QString& text )
+void KexiCSVInfoLabel::setCommentText( const TQString& text )
{
m_commentLbl->setText(text);
}
//----------------------------------------------------
-QStringList csvMimeTypes()
+TQStringList csvMimeTypes()
{
- QStringList mimetypes;
+ TQStringList mimetypes;
mimetypes << "text/x-csv" << "text/plain" << "all/allfiles";
return mimetypes;
}
diff --git a/kexi/plugins/importexport/csv/kexicsvwidgets.h b/kexi/plugins/importexport/csv/kexicsvwidgets.h
index f128b658f..7a163ee0d 100644
--- a/kexi/plugins/importexport/csv/kexicsvwidgets.h
+++ b/kexi/plugins/importexport/csv/kexicsvwidgets.h
@@ -20,82 +20,83 @@
#ifndef KEXI_CSVWIDGETS_H
#define KEXI_CSVWIDGETS_H
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <kcombobox.h>
class KLineEdit;
class KActiveLabel;
-class QLabel;
+class TQLabel;
-#define KEXICSV_DEFAULT_FILE_TEXT_QUOTE "\""
-#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_QUOTE ""
+#define KEXICSV_DEFAULT_FILE_TEXT_TQUOTE "\""
+#define KEXICSV_DEFAULT_CLIPBOARD_TEXT_TQUOTE ""
#define KEXICSV_DEFAULT_FILE_DELIMITER ","
#define KEXICSV_DEFAULT_CLIPBOARD_DELIMITER "\t"
#define KEXICSV_DEFAULT_FILE_DELIMITER_INDEX 0
//! \return a list of mimetypes usable for handling CSV format handling
-QStringList csvMimeTypes();
+TQStringList csvMimeTypes();
/*! @short A helper widget showing a short text information with an icon.
See ctor for details.
Used by CSV import and export dialogs. */
-class KexiCSVInfoLabel : public QWidget
+class KexiCSVInfoLabel : public TQWidget
{
public:
/* Sets up a new info label \a labelText label with text like "Preview of data from file:".
setFileName() can be used to display filename and setCommentAfterFileName() to display
additional comment.
- The widget's layout can look like this:
+ The widget's tqlayout can look like this:
\pre [icon] [labeltext] [filename] [comment]
*/
- KexiCSVInfoLabel( const QString& labelText, QWidget* parent );
+ KexiCSVInfoLabel( const TQString& labelText, TQWidget* tqparent );
- void setFileName( const QString& fileName );
- void setLabelText( const QString& text );
- void setCommentText( const QString& text );
+ void setFileName( const TQString& fileName );
+ void setLabelText( const TQString& text );
+ void setCommentText( const TQString& text );
// void setIconForFileName();
//! sets icon pixmap to \a iconName. Used wher setIconForFilename was false in ctor.
- void setIcon(const QString& iconName);
+ void setIcon(const TQString& iconName);
- QLabel* leftLabel() const { return m_leftLabel; }
+ TQLabel* leftLabel() const { return m_leftLabel; }
KActiveLabel* fileNameLabel() const { return m_fnameLbl; }
KActiveLabel* commentLabel() const { return m_commentLbl; }
- QFrame* separator() const { return m_separator; }
+ TQFrame* separator() const { return m_separator; }
protected:
- QLabel *m_leftLabel, *m_iconLbl;
+ TQLabel *m_leftLabel, *m_iconLbl;
KActiveLabel *m_fnameLbl, *m_commentLbl;
- QFrame* m_separator;
+ TQFrame* m_separator;
};
//! @short A combo box widget providing a list of possible delimiters
//! Used by CSV import and export dialogs
-class KexiCSVDelimiterWidget : public QWidget
+class KexiCSVDelimiterWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiCSVDelimiterWidget( bool lineEditOnBottom, QWidget * parent = 0 );
+ KexiCSVDelimiterWidget( bool lineEditOnBottom, TQWidget * tqparent = 0 );
- QString delimiter() const { return m_delimiter; }
- void setDelimiter(const QString& delimiter);
+ TQString delimiter() const { return m_delimiter; }
+ void setDelimiter(const TQString& delimiter);
signals:
- void delimiterChanged(const QString& delimiter);
+ void delimiterChanged(const TQString& delimiter);
protected slots:
//! only called when a delimiter was set by user directly
void slotDelimiterChanged(int idx);
void slotDelimiterChangedInternal(int idx);
- void slotDelimiterLineEditTextChanged( const QString & );
+ void slotDelimiterLineEditTextChanged( const TQString & );
void slotDelimiterLineEditReturnPressed();
protected:
- QString m_delimiter;
- QValueVector<QString> m_availableDelimiters;
+ TQString m_delimiter;
+ TQValueVector<TQString> m_availableDelimiters;
KComboBox* m_combo;
KLineEdit* m_delimiterEdit;
};
@@ -105,12 +106,12 @@ class KexiCSVDelimiterWidget : public QWidget
class KexiCSVTextQuoteComboBox : public KComboBox
{
public:
- KexiCSVTextQuoteComboBox( QWidget * parent = 0 );
+ KexiCSVTextQuoteComboBox( TQWidget * tqparent = 0 );
- QString textQuote() const;
+ TQString textQuote() const;
//! Sets text quote. Only available are: ", ', and empty string.
- void setTextQuote(const QString& textQuote);
+ void setTextQuote(const TQString& textQuote);
};
#endif
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.cpp b/kexi/plugins/macros/kexiactions/datatableaction.cpp
index 90b13e4f4..fff0eaf5b 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.cpp
+++ b/kexi/plugins/macros/kexiactions/datatableaction.cpp
@@ -33,9 +33,9 @@ using namespace KexiMacro;
namespace KexiMacro {
- //static const QString OBJECT = "method";
- //static const QString OBJECT = "type";
- //static const QString OBJECT = "partitem";
+ //static const TQString OBJECT = "method";
+ //static const TQString OBJECT = "type";
+ //static const TQString OBJECT = "partitem";
template<class ACTIONIMPL>
class MethodVariable : public KexiVariable<ACTIONIMPL>
@@ -44,7 +44,7 @@ namespace KexiMacro {
MethodVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "method", i18n("Method"))
{
- QStringList list;
+ TQStringList list;
list << "import" << "export";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -59,7 +59,7 @@ namespace KexiMacro {
TypeVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "type", i18n("Type"))
{
- QStringList list;
+ TQStringList list;
list << "file" << "clipboard";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -71,10 +71,10 @@ namespace KexiMacro {
class PartItemVariable : public KexiVariable<ACTIONIMPL>
{
public:
- PartItemVariable(ACTIONIMPL* actionimpl, const QString& partitem = QString::null)
+ PartItemVariable(ACTIONIMPL* actionimpl, const TQString& partitem = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "partitem", i18n("Item"))
{
- QStringList namelist;
+ TQStringList namelist;
if(actionimpl->mainWin()->project()) {
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
for(KexiPart::PartInfoListIterator it(*parts); it.current(); ++it) {
@@ -86,14 +86,14 @@ namespace KexiMacro {
for(KexiPart::ItemDictIterator item_it = *items; item_it.current(); ++item_it)
namelist << info->objectName() + "." + item_it.current()->name();
}
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- //const QString name = info->objectName(); //info->groupName();
+ //const TQString name = info->objectName(); //info->groupName();
//this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
- const QString n =
- namelist.contains(partitem)
+ const TQString n =
+ namelist.tqcontains(partitem)
? partitem
: namelist.count() > 0 ? namelist[0] : "";
this->setVariant(n);
@@ -115,7 +115,7 @@ DataTableAction::~DataTableAction()
{
}
-bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool DataTableAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"DataTableAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
/*
@@ -141,27 +141,27 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString method = context->variable("method")->variant().toString();
- const QString type = context->variable("type")->variant().toString();
+ const TQString method = context->variable("method")->variant().toString();
+ const TQString type = context->variable("type")->variant().toString();
- const QString partitem = context->variable("partitem")->variant().toString();
- QString identifier;
+ const TQString partitem = context->variable("partitem")->variant().toString();
+ TQString identifier;
if(! partitem.isEmpty()) {
- QStringList parts = QStringList::split(".", partitem);
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(parts[0]) );
+ TQStringList parts = TQStringList::split(".", partitem);
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(parts[0]) );
KexiPart::Item* item = part ? mainWin()->project()->item(part->info(), parts[1]) : 0;
if(! item)
- throw KoMacro::Exception(i18n("No such item \"%1\"").arg(partitem));
- identifier = QString::number(item->identifier());
+ throw KoMacro::Exception(i18n("No such item \"%1\"").tqarg(partitem));
+ identifier = TQString::number(item->identifier());
}
- QMap<QString,QString> args;
+ TQMap<TQString,TQString> args;
if(! identifier.isNull())
args.insert("itemId", identifier);
if(method == "import") {
args.insert("sourceType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVImportDialog", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -170,7 +170,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
}
else if(method == "export") {
args.insert("destinationType", type);
- QDialog *dlg = KexiInternalPart::createModalDialogInstance(
+ TQDialog *dlg = KexiInternalPart::createModalDialogInstance(
"csv_importexport", "KexiCSVExportWizard", 0, mainWin(), 0, &args);
if (!dlg)
return; //error msg has been shown by KexiInternalPart
@@ -178,7 +178,7 @@ void DataTableAction::activate(KSharedPtr<KoMacro::Context> context)
delete dlg;
}
else {
- throw KoMacro::Exception(i18n("No such method \"%1\"").arg(method));
+ throw KoMacro::Exception(i18n("No such method \"%1\"").tqarg(method));
}
}
diff --git a/kexi/plugins/macros/kexiactions/datatableaction.h b/kexi/plugins/macros/kexiactions/datatableaction.h
index 3b5b32c0c..b713b2c7a 100644
--- a/kexi/plugins/macros/kexiactions/datatableaction.h
+++ b/kexi/plugins/macros/kexiactions/datatableaction.h
@@ -37,6 +37,7 @@ namespace KexiMacro {
class DataTableAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -60,7 +61,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/executeaction.cpp b/kexi/plugins/macros/kexiactions/executeaction.cpp
index 1e7f24a25..ccad645c8 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.cpp
+++ b/kexi/plugins/macros/kexiactions/executeaction.cpp
@@ -32,8 +32,8 @@
using namespace KexiMacro;
namespace KexiMacro {
- static const QString OBJECT = "object";
- static const QString NAME = "name";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
}
ExecuteAction::ExecuteAction()
@@ -50,7 +50,7 @@ ExecuteAction::~ExecuteAction()
{
}
-bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"ExecuteAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -61,8 +61,8 @@ bool ExecuteAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, cons
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "macro" or "script"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "macro1" or "macro2" if objectvalue above is "macro"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<ExecuteAction>(this, objectvalue, objectname)) );
}
@@ -77,17 +77,17 @@ void ExecuteAction::activate(KSharedPtr<KoMacro::Context> context)
return;
}
- const QString mimetype = QString("kexi/%1").arg( context->variable("object")->variant().toString() );
- const QString name = context->variable("name")->variant().toString();
+ const TQString mimetype = TQString("kexi/%1").tqarg( context->variable("object")->variant().toString() );
+ const TQString name = context->variable("name")->variant().toString();
KexiPart::Part* part = Kexi::partManager().partForMimeType(mimetype);
if(! part) {
- throw KoMacro::Exception(i18n("No such mimetype \"%1\"").arg(mimetype));
+ throw KoMacro::Exception(i18n("No such mimetype \"%1\"").tqarg(mimetype));
}
KexiPart::Item* item = mainWin()->project()->item(part->info(), name);
if(! item) {
- throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").arg(name).arg(mimetype));
+ throw KoMacro::Exception(i18n("Failed to open part \"%1\" for mimetype \"%2\"").tqarg(name).tqarg(mimetype));
}
part->execute(item);
diff --git a/kexi/plugins/macros/kexiactions/executeaction.h b/kexi/plugins/macros/kexiactions/executeaction.h
index 17a8ca883..b2cfaaeaa 100644
--- a/kexi/plugins/macros/kexiactions/executeaction.h
+++ b/kexi/plugins/macros/kexiactions/executeaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class ExecuteAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.cpp b/kexi/plugins/macros/kexiactions/kexiaction.cpp
index 521f8cfcf..aeb3b7646 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.cpp
+++ b/kexi/plugins/macros/kexiactions/kexiaction.cpp
@@ -25,7 +25,7 @@
using namespace KexiMacro;
-KexiAction::KexiAction(const QString& name, const QString& text)
+KexiAction::KexiAction(const TQString& name, const TQString& text)
: KoMacro::Action(name)
{
m_mainwin = dynamic_cast< KexiMainWindow* >( KoMacro::Manager::self()->guiClient() );
diff --git a/kexi/plugins/macros/kexiactions/kexiaction.h b/kexi/plugins/macros/kexiactions/kexiaction.h
index a61e2bc1d..7474a2698 100644
--- a/kexi/plugins/macros/kexiactions/kexiaction.h
+++ b/kexi/plugins/macros/kexiactions/kexiaction.h
@@ -51,7 +51,7 @@ namespace KexiMacro {
* name will be used to identify the action.
* @param text The i18n-caption text used for display purposes.
*/
- KexiAction(const QString& name, const QString& text);
+ KexiAction(const TQString& name, const TQString& text);
/**
* Destructor.
diff --git a/kexi/plugins/macros/kexiactions/kexivariable.h b/kexi/plugins/macros/kexiactions/kexivariable.h
index 27dcc0efb..da3f47e24 100644
--- a/kexi/plugins/macros/kexiactions/kexivariable.h
+++ b/kexi/plugins/macros/kexiactions/kexivariable.h
@@ -48,7 +48,7 @@ namespace KexiMacro {
/**
* Constructor.
*/
- KexiVariable(ACTIONIMPL* actionimpl, const QString& name, const QString& caption)
+ KexiVariable(ACTIONIMPL* actionimpl, const TQString& name, const TQString& caption)
: KoMacro::Variable()
, m_actionimpl(actionimpl)
{
@@ -68,7 +68,7 @@ namespace KexiMacro {
}
private:
- /// The parent @a KexiAction implementation.
+ /// The tqparent @a KexiAction implementation.
ACTIONIMPL* m_actionimpl;
};
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.cpp b/kexi/plugins/macros/kexiactions/messageaction.cpp
index 1a4605cb1..a36d05266 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.cpp
+++ b/kexi/plugins/macros/kexiactions/messageaction.cpp
@@ -31,8 +31,8 @@ using namespace KexiMacro;
MessageAction::MessageAction()
: KexiAction("message", i18n("Message"))
{
- setVariable("caption", i18n("Caption"), QString(""));
- setVariable("message", i18n("Message"), QString(""));
+ setVariable("caption", i18n("Caption"), TQString(""));
+ setVariable("message", i18n("Message"), TQString(""));
}
MessageAction::~MessageAction()
@@ -42,8 +42,8 @@ MessageAction::~MessageAction()
void MessageAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "MessageAction::activate(KSharedPtr<Context>)" << endl;
- const QString caption = context->variable("caption")->variant().toString();
- const QString message = context->variable("message")->variant().toString();
+ const TQString caption = context->variable("caption")->variant().toString();
+ const TQString message = context->variable("message")->variant().toString();
KMessageBox::information(mainWin(), message, caption);
}
diff --git a/kexi/plugins/macros/kexiactions/messageaction.h b/kexi/plugins/macros/kexiactions/messageaction.h
index 543674bdf..5ccac9b79 100644
--- a/kexi/plugins/macros/kexiactions/messageaction.h
+++ b/kexi/plugins/macros/kexiactions/messageaction.h
@@ -40,6 +40,7 @@ namespace KexiMacro {
class MessageAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.cpp b/kexi/plugins/macros/kexiactions/navigateaction.cpp
index d3fe551ce..bc573d100 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.cpp
+++ b/kexi/plugins/macros/kexiactions/navigateaction.cpp
@@ -45,7 +45,7 @@ namespace KexiMacro {
NavigateVariable(ACTIONIMPL* actionimpl)
: KexiVariable<ACTIONIMPL>(actionimpl, "record", i18n("Record"))
{
- QStringList list;
+ TQStringList list;
list << "first" << "previous" << "next" << "last" << "goto";
this->appendChild( KSharedPtr<KoMacro::Variable>( new KoMacro::Variable(list, "@list") ) );
@@ -79,7 +79,7 @@ NavigateAction::~NavigateAction()
{
}
-bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool NavigateAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"NavigateAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -111,16 +111,16 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
KexiViewBase* view = dialog->selectedView();
if(! view) {
- throw KoMacro::Exception(i18n("No view selected for \"%1\".").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("No view selected for \"%1\".").tqarg(dialog->caption()));
}
KexiDataAwareView* dbview = dynamic_cast<KexiDataAwareView*>( view );
KexiDataAwareObjectInterface* dbobj = dbview ? dbview->dataAwareObject() : 0;
if(! dbview) {
- throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("The view for \"%1\" could not handle data.").tqarg(dialog->caption()));
}
- const QString record = context->variable("record")->variant().toString();
+ const TQString record = context->variable("record")->variant().toString();
if(record == "previous") {
dbobj->selectPrevRow();
}
@@ -151,7 +151,7 @@ void NavigateAction::activate(KSharedPtr<KoMacro::Context> context)
void sortAscending();
void sortDescending();
*/
- throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").arg(record).arg(dialog->caption()));
+ throw KoMacro::Exception(i18n("Unknown record \"%1\" in view for \"%2\".").tqarg(record).tqarg(dialog->caption()));
}
}
diff --git a/kexi/plugins/macros/kexiactions/navigateaction.h b/kexi/plugins/macros/kexiactions/navigateaction.h
index f7f74f86f..c5dc61ef3 100644
--- a/kexi/plugins/macros/kexiactions/navigateaction.h
+++ b/kexi/plugins/macros/kexiactions/navigateaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class NavigateAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexiactions/objectnamevariable.h b/kexi/plugins/macros/kexiactions/objectnamevariable.h
index eeaabe041..e9ffa9497 100644
--- a/kexi/plugins/macros/kexiactions/objectnamevariable.h
+++ b/kexi/plugins/macros/kexiactions/objectnamevariable.h
@@ -42,14 +42,14 @@ namespace KexiMacro {
class ObjectNameVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ObjectNameVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& name = QString::null)
+ ObjectNameVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& name = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "name", i18n("Name"))
{
if(! actionimpl->mainWin()->project())
return;
- QStringList namelist;
- KexiPart::Info* info = Kexi::partManager().infoForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Info* info = Kexi::partManager().infoForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(info) {
KexiPart::ItemDict* items = actionimpl->mainWin()->project()->items(info);
if(items)
@@ -60,12 +60,12 @@ namespace KexiMacro {
if(namelist.count() <= 0)
namelist << "";
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
- this->setVariant( (name.isNull() || ! namelist.contains(name)) ? namelist[0] : name );
+ this->setVariant( (name.isNull() || ! namelist.tqcontains(name)) ? namelist[0] : name );
- kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" children="<<namelist<<endl;
+ kdDebug()<<"##################### KexiActions::ObjectNameVariable() objectname="<<objectname<<" name="<<name<<" value="<<this->variant()<<" tqchildren="<<namelist<<endl;
}
virtual ~ObjectNameVariable() {}
diff --git a/kexi/plugins/macros/kexiactions/objectvariable.h b/kexi/plugins/macros/kexiactions/objectvariable.h
index b61f24e38..83a7a471c 100644
--- a/kexi/plugins/macros/kexiactions/objectvariable.h
+++ b/kexi/plugins/macros/kexiactions/objectvariable.h
@@ -52,7 +52,7 @@ namespace KexiMacro {
DataExport = 4
};
- ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const QString& objectname = QString::null)
+ ObjectVariable(ACTIONIMPL* actionimpl, int conditions = VisibleInNav, const TQString& objectname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, "object", i18n("Object"))
{
KexiPart::PartInfoList* parts = Kexi::partManager().partInfoList();
@@ -66,16 +66,16 @@ namespace KexiMacro {
if(conditions & DataExport && ! info->isDataExportSupported())
continue;
- const QString name = info->objectName(); //info->groupName();
+ const TQString name = info->objectName(); //info->groupName();
this->appendChild( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(name)) );
}
if(! objectname.isNull())
this->setVariant( objectname );
- else if(this->children().count() > 0)
- this->setVariant( this->children()[0]->variant() );
+ else if(this->tqchildren().count() > 0)
+ this->setVariant( this->tqchildren()[0]->variant() );
else
- this->setVariant( QString::null );
+ this->setVariant( TQString() );
kdDebug()<<"##################### KexiActions::ObjectVariable() variant="<<this->variant()<<endl;
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.cpp b/kexi/plugins/macros/kexiactions/openaction.cpp
index b67041bb3..2e43116f3 100644
--- a/kexi/plugins/macros/kexiactions/openaction.cpp
+++ b/kexi/plugins/macros/kexiactions/openaction.cpp
@@ -33,13 +33,13 @@ using namespace KexiMacro;
namespace KexiMacro {
- static const QString DATAVIEW = "data";
- static const QString DESIGNVIEW = "design";
- static const QString TEXTVIEW = "text";
+ static const TQString DATAVIEW = "data";
+ static const TQString DESIGNVIEW = "design";
+ static const TQString TEXTVIEW = "text";
- static const QString OBJECT = "object";
- static const QString NAME = "name";
- static const QString VIEW = "view";
+ static const TQString OBJECT = "object";
+ static const TQString NAME = "name";
+ static const TQString VIEW = "view";
/**
* The ViewVariable class provide a list of viewmodes supported
@@ -49,11 +49,11 @@ namespace KexiMacro {
class ViewVariable : public KexiVariable<ACTIONIMPL>
{
public:
- ViewVariable(ACTIONIMPL* actionimpl, const QString& objectname = QString::null, const QString& viewname = QString::null)
+ ViewVariable(ACTIONIMPL* actionimpl, const TQString& objectname = TQString(), const TQString& viewname = TQString())
: KexiVariable<ACTIONIMPL>(actionimpl, VIEW, i18n("View"))
{
- QStringList namelist;
- KexiPart::Part* part = Kexi::partManager().partForMimeType( QString("kexi/%1").arg(objectname) );
+ TQStringList namelist;
+ KexiPart::Part* part = Kexi::partManager().partForMimeType( TQString("kexi/%1").tqarg(objectname) );
if(part) {
int viewmodes = part->supportedViewModes();
if(viewmodes & Kexi::DataViewMode)
@@ -62,11 +62,11 @@ namespace KexiMacro {
namelist << DESIGNVIEW;
if(viewmodes & Kexi::TextViewMode)
namelist << TEXTVIEW;
- for(QStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
- this->children().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
+ for(TQStringList::Iterator it = namelist.begin(); it != namelist.end(); ++it)
+ this->tqchildren().append( KSharedPtr<KoMacro::Variable>(new KoMacro::Variable(*it)) );
}
- const QString n =
- namelist.contains(viewname)
+ const TQString n =
+ namelist.tqcontains(viewname)
? viewname
: namelist.count() > 0 ? namelist[0] : "";
@@ -92,7 +92,7 @@ OpenAction::~OpenAction()
{
}
-bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
kdDebug()<<"OpenAction::notifyUpdated() name="<<name<<" macroitem.action="<<(macroitem->action() ? macroitem->action()->name() : "NOACTION")<<endl;
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(name, false);
@@ -103,9 +103,9 @@ bool OpenAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
variable->clearChildren();
if(name == OBJECT) {
- const QString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
- const QString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
- const QString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
+ const TQString objectvalue = macroitem->variant(OBJECT, true).toString(); // e.g. "table" or "query"
+ const TQString objectname = macroitem->variant(NAME, true).toString(); // e.g. "table1" or "table2" if objectvalue above is "table"
+ const TQString viewname = macroitem->variant(VIEW, true).toString(); // "data", "design" or "text"
macroitem->variable(NAME, true)->setChildren(
KoMacro::Variable::List() << KSharedPtr<KoMacro::Variable>(new ObjectNameVariable<OpenAction>(this, objectvalue, objectname)) );
@@ -122,15 +122,15 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
throw KoMacro::Exception(i18n("No project loaded."));
}
- const QString objectname = context->variable(OBJECT)->variant().toString();
- const QString name = context->variable(NAME)->variant().toString();
- KexiPart::Item* item = mainWin()->project()->itemForMimeType( QString("kexi/%1").arg(objectname).latin1(), name );
+ const TQString objectname = context->variable(OBJECT)->variant().toString();
+ const TQString name = context->variable(NAME)->variant().toString();
+ KexiPart::Item* item = mainWin()->project()->itemForMimeType( TQString("kexi/%1").tqarg(objectname).latin1(), name );
if(! item) {
- throw KoMacro::Exception(i18n("No such object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
// Determinate the viewmode.
- const QString view = context->variable(VIEW)->variant().toString();
+ const TQString view = context->variable(VIEW)->variant().toString();
int viewmode;
if(view == DATAVIEW)
viewmode = Kexi::DataViewMode;
@@ -139,14 +139,14 @@ void OpenAction::activate(KSharedPtr<KoMacro::Context> context)
else if(view == TEXTVIEW)
viewmode = Kexi::TextViewMode;
else {
- throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").arg(view).arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("No such viewmode \"%1\" in object \"%2.%3\".").tqarg(view).tqarg(objectname).tqarg(name));
}
// Try to open the object now.
bool openingCancelled;
if(! mainWin()->openObject(item, viewmode, openingCancelled)) {
if(! openingCancelled) {
- throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").arg(objectname).arg(name));
+ throw KoMacro::Exception(i18n("Failed to open object \"%1.%2\".").tqarg(objectname).tqarg(name));
}
}
}
diff --git a/kexi/plugins/macros/kexiactions/openaction.h b/kexi/plugins/macros/kexiactions/openaction.h
index b49f12382..a30903fbf 100644
--- a/kexi/plugins/macros/kexiactions/openaction.h
+++ b/kexi/plugins/macros/kexiactions/openaction.h
@@ -39,6 +39,7 @@ namespace KexiMacro {
class OpenAction : public KexiAction
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -63,7 +64,7 @@ namespace KexiMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
index 030be0cb4..4d480365a 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.cpp
@@ -18,8 +18,8 @@
#include "keximacrodesignview.h"
#include "keximacroproperty.h"
-#include <qtimer.h>
-#include <qdom.h>
+#include <tqtimer.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -107,8 +107,8 @@ class KexiMacroDesignView::Private
};
-KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroDesignView")
+KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroDesignView")
, d( new Private() )
{
// The table's data-model.
@@ -123,19 +123,19 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Action"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
);
d->tabledata->addColumn(actioncol);
- QValueVector<QString> items;
+ TQValueVector<TQString> items;
items.append(""); // empty means no action
// Append the list of actions provided by Kexi.
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
- QStringList::ConstIterator it, end( actionnames.constEnd() );
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList::ConstIterator it, end( actionnames.constEnd() );
for( it = actionnames.constBegin(); it != end; ++it) {
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(*it);
items.append( action->text() );
@@ -151,16 +151,16 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
KexiDB::Field::NoOptions, // options
0, // length
0, // precision
- QVariant(), // default value
+ TQVariant(), // default value
i18n("Comment"), // caption
- QString::null, // description
+ TQString(), // description
0 // width
) );
// Create the tableview.
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->datatable = new KexiDataTable(mainWin(), this, "Macro KexiDataTable", false /*not db aware*/);
- layout->addWidget(d->datatable);
+ tqlayout->addWidget(d->datatable);
d->tableview = d->datatable->tableView();
d->tableview->setSpreadSheetMode();
d->tableview->setColumnStretchEnabled( true, COLUMN_ID_COMMENT ); //last column occupies the rest of the area
@@ -173,14 +173,14 @@ KexiMacroDesignView::KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *paren
d->propertyset = new KexiDataAwarePropertySet(this, d->tableview);
// Connect signals the KexiDataTable provides to local slots.
- connect(d->tabledata, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(beforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->tabledata, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(rowUpdated(KexiTableItem*)));
- connect(d->tabledata, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(rowInserted(KexiTableItem*,uint,bool)));
- connect(d->tabledata, SIGNAL(rowDeleted()),
- this, SLOT(rowDeleted()));
+ connect(d->tabledata, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(beforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->tabledata, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ this, TQT_SLOT(rowUpdated(KexiTableItem*)));
+ connect(d->tabledata, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(rowInserted(KexiTableItem*,uint,bool)));
+ connect(d->tabledata, TQT_SIGNAL(rowDeleted()),
+ this, TQT_SLOT(rowDeleted()));
// Everything is ready. So, update the data now.
updateData();
@@ -207,7 +207,7 @@ void KexiMacroDesignView::updateData()
}
// Set the MacroItem's
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
KoMacro::MacroItem::List macroitems = macro()->items();
KoMacro::MacroItem::List::ConstIterator it(macroitems.constBegin()), end(macroitems.constEnd());
for(uint idx = 0; it != end; ++it, idx++) {
@@ -259,12 +259,12 @@ KoProperty::Set* KexiMacroDesignView::propertySet()
return d->propertyset->currentPropertySet();
}
-void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVariant& newvalue, KexiDB::ResultInfo* result)
+void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, TQVariant& newvalue, KexiDB::ResultInfo* result)
{
Q_UNUSED(result);
kdDebug() << "KexiMacroDesignView::beforeCellChanged() colnum=" << colnum << " newvalue=" << newvalue.toString() << endl;
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
if(rowindex < 0) {
kdWarning() << "KexiMacroDesignView::beforeCellChanged() No such item" << endl;
return;
@@ -286,11 +286,11 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
// Handle the column that should be changed
switch(colnum) {
case COLUMN_ID_ACTION: { // The "Action" column
- QString actionname;
+ TQString actionname;
bool ok;
int selectedindex = newvalue.toInt(&ok);
if(ok && selectedindex > 0) {
- QStringList actionnames = KoMacro::Manager::self()->actionNames();
+ TQStringList actionnames = KoMacro::Manager::self()->actionNames();
actionname = actionnames[ selectedindex - 1 ]; // first item is empty
}
KSharedPtr<KoMacro::Action> action = KoMacro::Manager::self()->action(actionname);
@@ -311,7 +311,7 @@ void KexiMacroDesignView::beforeCellChanged(KexiTableItem* item, int colnum, QVa
void KexiMacroDesignView::rowUpdated(KexiTableItem* item)
{
- int rowindex = d->tabledata->findRef(item);
+ int rowindex = d->tabledata->tqfindRef(item);
kdDebug() << "KexiMacroDesignView::rowUpdated() rowindex=" << rowindex << endl;
//propertySetSwitched();
//propertySetReloaded(true);
@@ -347,7 +347,7 @@ void KexiMacroDesignView::rowDeleted()
macroitems.remove( macroitems.at(rowindex) );
}
-bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& variablename)
+bool KexiMacroDesignView::updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& variablename)
{
kdDebug() << "KexiMacroDesignView::updateSet() variablename=" << variablename << endl;
KoProperty::Property* property = KexiMacroProperty::createProperty(macroitem, variablename);
@@ -382,8 +382,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
// if there exists no such propertyset yet, create one.
set = new KoProperty::Set(d->propertyset, action->name());
d->propertyset->insert(row, set, true);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(propertyChanged(KoProperty::Set&, KoProperty::Property&)));
}
// The caption.
@@ -392,8 +392,8 @@ void KexiMacroDesignView::updateProperties(int row, KoProperty::Set* set, KShare
set->addProperty(prop);
// Display the list of variables.
- QStringList varnames = action->variableNames();
- for(QStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
+ TQStringList varnames = action->variableNames();
+ for(TQStringList::Iterator it = varnames.begin(); it != varnames.end(); ++it) {
if(updateSet(set, macroitem, *it)) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it, true);
kdDebug()<<"KexiMacroDesignView::updateProperties() name=" << *it << " variable=" << variable->variant().toString() << endl;
@@ -418,7 +418,7 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
d->reloadsProperties = true;
const int row = d->propertyset->currentRow();
- const QCString name = property.name();
+ const TQCString name = property.name();
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " row=" << row << endl;
//TODO reload is only needed if something changed!
@@ -433,26 +433,26 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
updateProperties(row, &set, macroitem);
}
// It's needed to call the reload delayed cause in KoProperty::Editor
- // QTimer::singleShot(10, this, SLOT(selectItemLater())); may lead
+ // TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); may lead
// to crashes if we are to fast.
- QTimer::singleShot(50, this, SLOT(reloadPropertyLater()));
+ TQTimer::singleShot(50, this, TQT_SLOT(reloadPropertyLater()));
}
d->reloadsProperties = false;
*/
/*
- QStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
+ TQStringList dirtyvarnames = macroitem->setVariable(name, KSharedPtr<KoMacro::Variable>(pv));
bool dirty = false;
bool reload = false;
- for(QStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
+ for(TQStringList::Iterator it = dirtyvarnames.begin(); it != dirtyvarnames.end(); ++it) {
KSharedPtr<KoMacro::Variable> variable = macroitem->variable(*it);
if(! variable.data()) {
kdDebug() << "KexiMacroDesignView::propertyChanged() name=" << name << " it=" << *it << " skipped cause such a variable is not known." << endl;
continue;
}
- if(! set.contains( (*it).latin1() )) {
+ if(! set.tqcontains( (*it).latin1() )) {
// If there exist no such property yet, we need to add it.
if(updateSet(&set, macroitem, *it))
reload = true; // we like to reload the whole set
@@ -461,12 +461,12 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
kdDebug() << "KexiMacroDesignView::propertyChanged() set existing property=" << *it << endl;
KoProperty::Property& p = set.property((*it).latin1());
- KoMacro::Variable::List children = variable->children();
- if(children.count() > 0) {
- QStringList keys, names;
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ KoMacro::Variable::List tqchildren = variable->tqchildren();
+ if(tqchildren.count() > 0) {
+ TQStringList keys, names;
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString s = (*childit)->variant().toString();
+ const TQString s = (*childit)->variant().toString();
keys << s;
names << s;
}
@@ -480,8 +480,8 @@ void KexiMacroDesignView::propertyChanged(KoProperty::Set& set, KoProperty::Prop
// need to reload the whole set.
for(KoProperty::Set::Iterator setit = set; setit.current(); ++setit) {
if(setit.currentKey() == name) continue; // don't remove ourself
- if(setit.currentKey().left(5) == QCString("this:")) continue; // don't remove internal properties
- if(setit.currentKey() == QCString("newrow")) continue; // also an internal used property
+ if(setit.currentKey().left(5) == TQCString("this:")) continue; // don't remove internal properties
+ if(setit.currentKey() == TQCString("newrow")) continue; // also an internal used property
if(action.data() && action->hasVariable(setit.currentKey())) continue; // the property is still valid
reload = true; // we like to reload the whole set
}
diff --git a/kexi/plugins/macros/kexipart/keximacrodesignview.h b/kexi/plugins/macros/kexipart/keximacrodesignview.h
index c3eca2d2b..e982f1bd3 100644
--- a/kexi/plugins/macros/kexipart/keximacrodesignview.h
+++ b/kexi/plugins/macros/kexipart/keximacrodesignview.h
@@ -41,6 +41,7 @@ class KexiTableItem;
class KexiMacroDesignView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -48,10 +49,10 @@ class KexiMacroDesignView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroDesignView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroDesignView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
@@ -75,7 +76,7 @@ class KexiMacroDesignView : public KexiMacroView
* Called before a cell changed in the internaly used
* \a KexiTableView .
*/
- void beforeCellChanged(KexiTableItem*, int, QVariant&, KexiDB::ResultInfo*);
+ void beforeCellChanged(KexiTableItem*, int, TQVariant&, KexiDB::ResultInfo*);
/**
* Called if the passed \p item got updated.
@@ -90,7 +91,7 @@ class KexiMacroDesignView : public KexiMacroView
/**
* Called if a row got inserted.
*/
- void rowInserted(KexiTableItem* item, uint row, bool repaint);
+ void rowInserted(KexiTableItem* item, uint row, bool tqrepaint);
/**
* Called if a property in the \a KoProperty got changed.
@@ -117,7 +118,7 @@ class KexiMacroDesignView : public KexiMacroView
* Update the \a KoProperty::Set set with the passed \a KoMacro::MacroItem
* \p item and the variablename \p variablename .
*/
- bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const QString& variablename);
+ bool updateSet(KoProperty::Set* set, KSharedPtr<KoMacro::MacroItem> item, const TQString& variablename);
/**
* Update the properties of the \a KoProperty::Set \p set at
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.cpp b/kexi/plugins/macros/kexipart/keximacroerror.cpp
index 15f4df3f0..f6422be9b 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroerror.cpp
@@ -24,7 +24,7 @@
#include <core/kexiproject.h>
#include <core/keximainwindow.h>
-#include <qtimer.h>
+#include <tqtimer.h>
/**
* \internal d-pointer class to be more flexible on future extension of the
@@ -44,7 +44,7 @@ class KexiMacroError::Private
};
KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context)
- : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ Qt::WDestructiveClose)
+ : KexiMacroErrorBase(mainwin, "KexiMacroError" , /*WFlags*/ TQt::WDestructiveClose)
, d(new Private(mainwin, context))
{
//setText(i18n("Execution failed")); //caption
@@ -53,14 +53,14 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
KoMacro::Exception* exception = context->exception();
iconlbl->setPixmap(KGlobal::instance()->iconLoader()->loadIcon("messagebox_critical", KIcon::Small, 32));
- errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").arg( context->macro()->name() ).arg( exception->errorMessage() ));
+ errorlbl->setText(i18n("<qt>Failed to execute the macro \"%1\".<br>%2</qt>").tqarg( context->macro()->name() ).tqarg( exception->errorMessage() ));
int i = 1;
KoMacro::MacroItem::List items = context->macro()->items();
for (KoMacro::MacroItem::List::ConstIterator mit = items.begin(); mit != items.end(); mit++)
{
KListViewItem* listviewitem = new KListViewItem(errorlist);
- listviewitem->setText(0,QString("%1").arg(i++));
+ listviewitem->setText(0,TQString("%1").tqarg(i++));
listviewitem->setText(1,i18n("Action"));
KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
@@ -86,8 +86,8 @@ KexiMacroError::KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Cont
}
}
- connect(designerbtn, SIGNAL(clicked()), this, SLOT(designbtnClicked()));
- connect(continuebtn, SIGNAL(clicked()), this, SLOT(continuebtnClicked()));
+ connect(designerbtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(designbtnClicked()));
+ connect(continuebtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(continuebtnClicked()));
}
KexiMacroError::~KexiMacroError()
@@ -98,16 +98,16 @@ KexiMacroError::~KexiMacroError()
void KexiMacroError::designbtnClicked()
{
if(! d->mainwin->project()) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No project open.") << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No project open.") << endl;
return;
}
// We need to determinate the KexiPart::Item which should be opened.
KSharedPtr<KoMacro::Macro> macro = d->context->macro();
- const QString name = macro->name();
+ const TQString name = macro->name();
KexiPart::Item* item = d->mainwin->project()->itemForMimeType("kexi/macro", name);
if(! item) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): No such macro \"%1\"").tqarg(name) << endl;
return;
}
@@ -115,7 +115,7 @@ void KexiMacroError::designbtnClicked()
bool openingCancelled;
if(! d->mainwin->openObject(item, Kexi::DesignViewMode, openingCancelled)) {
if(! openingCancelled) {
- kdWarning() << QString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").arg(name) << endl;
+ kdWarning() << TQString("KexiMacroError::designbtnClicked(): Open macro \"%1\" in designview failed.").tqarg(name) << endl;
return;
}
}
@@ -125,6 +125,6 @@ void KexiMacroError::designbtnClicked()
void KexiMacroError::continuebtnClicked()
{
- QTimer::singleShot(200, d->context, SLOT(activateNext()));
+ TQTimer::singleShot(200, d->context, TQT_SLOT(activateNext()));
close();
}
diff --git a/kexi/plugins/macros/kexipart/keximacroerror.h b/kexi/plugins/macros/kexipart/keximacroerror.h
index 641859b7b..d902d6a45 100644
--- a/kexi/plugins/macros/kexipart/keximacroerror.h
+++ b/kexi/plugins/macros/kexipart/keximacroerror.h
@@ -22,9 +22,9 @@
#ifndef KEXIMACROERROR_H
#define KEXIMACROERROR_H
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klistview.h>
#include <klocale.h>
@@ -50,13 +50,14 @@ class KexiMainWindow;
class KexiMacroError : public KexiMacroErrorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * @param mainwin The parent @a KexiMainWindow instance.
+ * @param mainwin The tqparent @a KexiMainWindow instance.
* @param context The @a KoMacro::Context where the error happened.
*/
KexiMacroError(KexiMainWindow* mainwin, KSharedPtr<KoMacro::Context> context);
diff --git a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
index 74e47cfc4..cc3b6754e 100644
--- a/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
+++ b/kexi/plugins/macros/kexipart/keximacroerrorbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiMacroErrorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KexiMacroErrorBase</cstring>
</property>
@@ -25,23 +25,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconlbl</cstring>
</property>
@@ -53,7 +53,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
@@ -65,11 +65,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>errorlbl</cstring>
</property>
@@ -87,7 +87,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -152,15 +152,15 @@
<number>1</number>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>designerbtn</cstring>
</property>
@@ -174,7 +174,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>continuebtn</cstring>
</property>
@@ -182,7 +182,7 @@
<string>Continue</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>cancelbtn</cstring>
</property>
@@ -206,7 +206,7 @@
<slot>close()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kexi/plugins/macros/kexipart/keximacropart.cpp b/kexi/plugins/macros/kexipart/keximacropart.cpp
index c4f020e44..1fddbd78f 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.cpp
+++ b/kexi/plugins/macros/kexipart/keximacropart.cpp
@@ -25,8 +25,8 @@
//#include "keximainwindow.h"
//#include "kexiproject.h"
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kgenericfactory.h>
#include <kexipartitem.h>
//#include <kxmlguiclient.h>
@@ -54,8 +54,8 @@ class KexiMacroPart::Private
public:
};
-KexiMacroPart::KexiMacroPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiMacroPart::KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d( new Private() )
{
//kdDebug() << "KexiMacroPart::KexiMacroPart() Ctor" << endl;
@@ -83,7 +83,7 @@ KexiMacroPart::~KexiMacroPart()
delete d;
}
-bool KexiMacroPart::execute(KexiPart::Item* item, QObject* sender)
+bool KexiMacroPart::execute(KexiPart::Item* item, TQObject* sender)
{
KexiDialogBase* dialog = new KexiDialogBase(m_mainWin);
dialog->setId( item->identifier() );
@@ -123,9 +123,9 @@ void KexiMacroPart::initInstanceActions()
//createSharedAction(Kexi::DesignViewMode, i18n("Execute Macro"), "exec", 0, "data_execute");
}
-KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiMacroPart::createView(TQWidget* tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*)
{
- const QString itemname = item.name();
+ const TQString itemname = item.name();
//kdDebug() << "KexiMacroPart::createView() itemname=" << itemname << endl;
if(! itemname.isNull()) {
@@ -140,14 +140,14 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
KexiMainWindow *win = dialog->mainWin();
if(win && win->project() && win->project()->dbConnection()) {
if(viewMode == Kexi::DesignViewMode) {
- return new KexiMacroDesignView(win, parent, macro);
+ return new KexiMacroDesignView(win, tqparent, macro);
}
if(viewMode == Kexi::TextViewMode) {
- return new KexiMacroTextView(win, parent, macro);
+ return new KexiMacroTextView(win, tqparent, macro);
}
if(viewMode == Kexi::DataViewMode) {
// Called if the macro should be executed.
- return new KexiMacroView(win, parent, macro);
+ return new KexiMacroView(win, tqparent, macro);
}
}
}
@@ -156,7 +156,7 @@ KexiViewBase* KexiMacroPart::createView(QWidget* parent, KexiDialogBase* dialog,
return 0;
}
-QString KexiMacroPart::i18nMessage(const QCString& englishMessage) const
+TQString KexiMacroPart::i18nMessage(const TQCString& englishMessage) const
{
if(englishMessage=="Design of object \"%1\" has been modified.") {
return i18n("Design of macro \"%1\" has been modified.");
diff --git a/kexi/plugins/macros/kexipart/keximacropart.h b/kexi/plugins/macros/kexipart/keximacropart.h
index 8d2d7af25..0ea70c068 100644
--- a/kexi/plugins/macros/kexipart/keximacropart.h
+++ b/kexi/plugins/macros/kexipart/keximacropart.h
@@ -18,7 +18,7 @@
#ifndef KEXIMACROPART_H
#define KEXIMACROPART_H
-//#include <qcstring.h>
+//#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -30,17 +30,18 @@
class KexiMacroPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * \param parent The parent QObject this part is child of.
+ * \param tqparent The tqparent TQObject this part is child of.
* \param name The name this part has.
* \param args Optional list of arguments passed to this part.
*/
- KexiMacroPart(QObject *parent, const char *name, const QStringList& args);
+ KexiMacroPart(TQObject *tqparent, const char *name, const TQStringList& args);
/**
* Destructor.
@@ -51,28 +52,28 @@ class KexiMacroPart : public KexiPart::Part
* Implementation of the KexiPart::Part::action method used to
* provide scripts as KAction's to the outside world.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0);
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0);
/**
* \return the i18n message for the passed \p englishMessage string.
*/
- virtual QString i18nMessage(const QCString& englishMessage) const;
+ virtual TQString i18nMessage(const TQCString& englishMessage) const;
protected:
/**
* Create a new view.
*
- * \param parent The parent QWidget the new view is displayed in.
+ * \param tqparent The tqparent TQWidget the new view is displayed in.
* \param dialog The \a KexiDialogBase the view is child of.
* \param item The \a KexiPart::Item this view is for.
* \param viewMode The viewmode we like to have a view for.
*/
- virtual KexiViewBase* createView(QWidget *parent,
+ virtual KexiViewBase* createView(TQWidget *tqparent,
KexiDialogBase* dialog,
KexiPart::Item& item,
int viewMode = Kexi::DesignViewMode,
- QMap<QString,QString>* staticObjectArgs = 0);
+ TQMap<TQString,TQString>* staticObjectArgs = 0);
/**
* Initialize the part's actions.
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.cpp b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
index 2fdafd283..578ba69bd 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.cpp
@@ -17,10 +17,10 @@
#include "keximacroproperty.h"
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpainter.h>
#include <kcombobox.h>
#include <kpushbutton.h>
@@ -50,11 +50,11 @@ class KexiMacroProperty::Private
KSharedPtr<KoMacro::MacroItem> macroitem;
/** The name the variable @a KoMacro::Variable is known
as in the @a KoMacro::MacroItem defined above. */
- QString name;
+ TQString name;
};
-KexiMacroProperty::KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
- : KoProperty::CustomProperty(parent)
+KexiMacroProperty::KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
+ : KoProperty::CustomProperty(tqparent)
, d( new Private() )
{
d->macroitem = macroitem;
@@ -86,7 +86,7 @@ void KexiMacroProperty::init()
}
//TESTCASE!!!!!!!!!!!!!!!!!!!!!!
- //if(! variable->isEnabled()) qFatal( QString("############## VARIABLE=%1").arg(variable->name()).latin1() );
+ //if(! variable->isEnabled()) qFatal( TQString("############## VARIABLE=%1").tqarg(variable->name()).latin1() );
Q_ASSERT(! d->name.isNull());
m_property->setName( d->name.latin1() );
@@ -96,12 +96,12 @@ void KexiMacroProperty::init()
m_property->setType( KEXIMACRO_PROPERTYEDITORTYPE ); // use our own propertytype
}
-KoProperty::Property* KexiMacroProperty::parentProperty() const
+KoProperty::Property* KexiMacroProperty::tqparentProperty() const
{
return m_property;
}
-void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
+void KexiMacroProperty::setValue(const TQVariant &value, bool rememberOldValue)
{
Q_UNUSED(rememberOldValue);
kdDebug()<<"KexiMacroProperty::setValue name="<<d->name<<" value="<<value<<" rememberOldValue="<<rememberOldValue<<endl;
@@ -119,11 +119,11 @@ void KexiMacroProperty::setValue(const QVariant &value, bool rememberOldValue)
emit valueChanged();
}
-QVariant KexiMacroProperty::value() const
+TQVariant KexiMacroProperty::value() const
{
KSharedPtr<KoMacro::Variable> variable = d->macroitem->variable(d->name, true);
Q_ASSERT( variable.data() != 0 );
- return variable.data() ? variable->variant() : QVariant();
+ return variable.data() ? variable->variant() : TQVariant();
}
bool KexiMacroProperty::handleValue() const
@@ -136,7 +136,7 @@ KSharedPtr<KoMacro::MacroItem> KexiMacroProperty::macroItem() const
return d->macroitem;
}
-QString KexiMacroProperty::name() const
+TQString KexiMacroProperty::name() const
{
return d->name;
}
@@ -146,7 +146,7 @@ KSharedPtr<KoMacro::Variable> KexiMacroProperty::variable() const
return d->macroitem->variable(d->name, true/*checkaction*/);
}
-KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
KoProperty::Property* property = new KoProperty::Property();
KexiMacroProperty* customproperty = new KexiMacroProperty(property, macroitem, name);
@@ -164,8 +164,8 @@ KoProperty::Property* KexiMacroProperty::createProperty(KSharedPtr<KoMacro::Macr
* KexiMacroPropertyFactory
*/
-KexiMacroPropertyFactory::KexiMacroPropertyFactory(QObject* parent)
- : KoProperty::CustomPropertyFactory(parent)
+KexiMacroPropertyFactory::KexiMacroPropertyFactory(TQObject* tqparent)
+ : KoProperty::CustomPropertyFactory(tqparent)
{
}
@@ -173,23 +173,23 @@ KexiMacroPropertyFactory::~KexiMacroPropertyFactory()
{
}
-KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* parent)
+KoProperty::CustomProperty* KexiMacroPropertyFactory::createCustomProperty(KoProperty::Property* tqparent)
{
- kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty parent="<<parent->name()<<endl;
+ kdDebug()<<"KexiMacroPropertyFactory::createCustomProperty tqparent="<<tqparent->name()<<endl;
- KoProperty::CustomProperty* customproperty = parent->customProperty();
- KexiMacroProperty* parentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
- if(! parentcustomproperty) {
- kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() parent=" << parent->name() << " has an invalid customproperty." << endl;
+ KoProperty::CustomProperty* customproperty = tqparent->customProperty();
+ KexiMacroProperty* tqparentcustomproperty = dynamic_cast<KexiMacroProperty*>(customproperty);
+ if(! tqparentcustomproperty) {
+ kdWarning() << "KexiMacroPropertyFactory::createCustomProperty() tqparent=" << tqparent->name() << " has an invalid customproperty." << endl;
return 0;
}
- KSharedPtr<KoMacro::MacroItem> macroitem = parentcustomproperty->macroItem();
+ KSharedPtr<KoMacro::MacroItem> macroitem = tqparentcustomproperty->macroItem();
Q_ASSERT( macroitem.data() != 0 );
- const QString name = parentcustomproperty->name();
+ const TQString name = tqparentcustomproperty->name();
Q_ASSERT(! name.isEmpty());
- KexiMacroProperty* macroproperty = new KexiMacroProperty(parent, macroitem, name);
+ KexiMacroProperty* macroproperty = new KexiMacroProperty(tqparent, macroitem, name);
if(! macroproperty->variable().data()) {
delete macroproperty; macroproperty = 0;
return 0;
@@ -218,26 +218,26 @@ void KexiMacroPropertyFactory::initFactory()
*/
/**
-* @internal implementation of a QListBoxItem to display the items of the
+* @internal implementation of a TQListBoxItem to display the items of the
* combobox used within @a KexiMacroPropertyWidget to handle variables
* within a @a ListBox instance.
*/
-class ListBoxItem : public QListBoxText
+class ListBoxItem : public TQListBoxText
{
public:
- ListBoxItem(QListBox* listbox)
- : QListBoxText(listbox), m_enabled(true) {}
- ListBoxItem(QListBox* listbox, const QString& text, QListBoxItem* after)
- : QListBoxText(listbox, text, after), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox)
+ : TQListBoxText(listbox), m_enabled(true) {}
+ ListBoxItem(TQListBox* listbox, const TQString& text, TQListBoxItem* after)
+ : TQListBoxText(listbox, text, after), m_enabled(true) {}
virtual ~ListBoxItem() {}
void setEnabled(bool enabled) { m_enabled = enabled; }
- virtual int width(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return static_cast<KComboBox*>( lb->parent() )->lineEdit()->width() + 2;
+ virtual int width(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return static_cast<KComboBox*>( lb->tqparent() )->lineEdit()->width() + 2;
}
- virtual int height(const QListBox* lb) const {
- Q_ASSERT( dynamic_cast<KComboBox*>( lb->parent() ) );
- return m_enabled ? static_cast<KComboBox*>( lb->parent() )->height() + 2 : 0;
+ virtual int height(const TQListBox* lb) const {
+ Q_ASSERT( dynamic_cast<KComboBox*>( lb->tqparent() ) );
+ return m_enabled ? static_cast<KComboBox*>( lb->tqparent() )->height() + 2 : 0;
}
private:
bool m_enabled;
@@ -245,13 +245,13 @@ class ListBoxItem : public QListBoxText
/**
* @internal implementation of a @a ListBoxItem to provide an editable
-* @a KoProperty::Widget as QListBoxItem in a @a ListBox instance.
+* @a KoProperty::Widget as TQListBoxItem in a @a ListBox instance.
*/
class EditListBoxItem : public ListBoxItem
{
public:
- EditListBoxItem(QListBox* listbox, KexiMacroProperty* macroproperty)
+ EditListBoxItem(TQListBox* listbox, KexiMacroProperty* macroproperty)
: ListBoxItem(listbox)
, m_macroproperty(macroproperty)
, m_prop(0)
@@ -265,11 +265,11 @@ class EditListBoxItem : public ListBoxItem
delete m_prop;
}
- virtual QString text() const {
+ virtual TQString text() const {
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
Q_ASSERT( variable.data() );
//kdDebug()<<"EditListBoxItem::text() text="<<variable->toString()<<endl;
- Q_ASSERT( variable->toString() != QString::null );
+ Q_ASSERT( variable->toString() != TQString() );
return variable->toString();
}
@@ -279,13 +279,13 @@ class EditListBoxItem : public ListBoxItem
KSharedPtr<KoMacro::Action> action() const { return m_macroproperty->macroItem()->action(); }
protected:
- virtual void paint(QPainter* p) {
+ virtual void paint(TQPainter* p) {
if(! m_widget) return;
- Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->parent() ) );
+ Q_ASSERT( dynamic_cast<KComboBox*>( listBox()->tqparent() ) );
const int w = width(listBox());
const int h = height(listBox());
m_widget->setFixedSize(w - 2, h - 2);
- p->drawPixmap(0, 0, QPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
+ p->drawPixmap(0, 0, TQPixmap::grabWidget(m_widget), 1, 1, w - 1, h - 1);
}
private:
@@ -297,22 +297,22 @@ class EditListBoxItem : public ListBoxItem
kdWarning() << "EditListBoxItem::EditListBoxItem() Skipped cause there exists no action for macroproperty=" << m_macroproperty->name() << endl;
return;
}
- KoProperty::Property* parentproperty = m_macroproperty->parentProperty();
- if(! parentproperty) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No parentproperty defined" << endl;
+ KoProperty::Property* tqparentproperty = m_macroproperty->tqparentProperty();
+ if(! tqparentproperty) {
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No tqparentproperty defined" << endl;
return;
}
KSharedPtr<KoMacro::Variable> variable = m_macroproperty->variable();
if(! variable.data()) {
- kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << parentproperty->name() << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() No variable defined for property=" << tqparentproperty->name() << endl;
return;
}
- QVariant variant = variable->variant();
+ TQVariant variant = variable->variant();
KSharedPtr<KoMacro::Variable> actionvariable = action->variable(m_macroproperty->name());
if(actionvariable.data()) {
- QVariant actionvariant = actionvariable->variant();
+ TQVariant actionvariant = actionvariable->variant();
Q_ASSERT( ! actionvariant.isNull() );
Q_ASSERT( variant.canCast(actionvariant.type()) );
variant.cast( actionvariant.type() ); //preserve type.
@@ -320,38 +320,38 @@ class EditListBoxItem : public ListBoxItem
int type = KoProperty::Auto;
switch(variant.type()) {
- case QVariant::UInt:
- case QVariant::Int: {
+ case TQVariant::UInt:
+ case TQVariant::Int: {
type = KoProperty::Integer;
} break;
- case QVariant::CString:
- case QVariant::String: {
+ case TQVariant::CString:
+ case TQVariant::String: {
type = KoProperty::String;
} break;
default: {
- kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << QVariant::typeToName(variant.type()) << endl;
+ kdWarning() << "EditListBoxItem::EditListBoxItem() name=" << variable->name() << " type=" << TQVariant::typeToName(variant.type()) << endl;
} break;
}
- QString name = variable->name();
+ TQString name = variable->name();
Q_ASSERT(! name.isNull());
//if(name.isNull()) name = "aaaaaaaaaaaaaaaaa";//TESTCASE
m_prop = new KoProperty::Property(
name.latin1(), // name
variant, // value
variable->text(), // caption
- QString::null, // description
+ TQString(), // description
type, // type
- 0 //parentproperty // parent
+ 0 //tqparentproperty // tqparent
);
m_widget = KoProperty::FactoryManager::self()->createWidgetForProperty(m_prop);
Q_ASSERT( m_widget != 0 );
- //m_widget->reparent(listBox()->viewport(), 0, QPoint(0,0));
- m_widget->reparent(listBox(), 0, QPoint(1,1));
- //layout->addWidget(m_widget, 1);
+ //m_widget->reparent(listBox()->viewport(), 0, TQPoint(0,0));
+ m_widget->reparent(listBox(), 0, TQPoint(1,1));
+ //tqlayout->addWidget(m_widget, 1);
m_widget->setMinimumHeight(5);
- m_widget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_widget->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
private:
@@ -361,14 +361,14 @@ class EditListBoxItem : public ListBoxItem
};
/**
-* @internal implementation of a @a QListBox for the combobox used within
+* @internal implementation of a @a TQListBox for the combobox used within
* @a KexiMacroPropertyWidget to handle different variable-states.
*/
-class ListBox : public QListBox
+class ListBox : public TQListBox
{
public:
- ListBox(KComboBox* parent, KexiMacroProperty* macroproperty)
- : QListBox(parent)
+ ListBox(KComboBox* tqparent, KexiMacroProperty* macroproperty)
+ : TQListBox(tqparent)
, m_macroproperty(macroproperty)
, m_edititem(0)
{
@@ -388,74 +388,74 @@ class ListBox : public QListBox
m_edititem = new EditListBoxItem(this, m_macroproperty);
Q_ASSERT( m_edititem->widget() != 0 );
- const QString name = m_macroproperty->name();
- KoMacro::Variable::List children;
+ const TQString name = m_macroproperty->name();
+ KoMacro::Variable::List tqchildren;
{
- KoMacro::Variable::List actionchildren;
+ KoMacro::Variable::List actiontqchildren;
KSharedPtr<KoMacro::Variable> itemvar = m_macroproperty->macroItem()->variable(name,false);
//kdDebug() << "KexiMacroProperty::ListBox::update() itemvar="<<(itemvar.data() ? "name:"+itemvar->name()+" value:"+itemvar->toString() : "NULL")<<endl;
if(itemvar.data())
- actionchildren = itemvar->children();
+ actiontqchildren = itemvar->tqchildren();
KSharedPtr<KoMacro::Action> action = m_edititem->action();
KSharedPtr<KoMacro::Variable> actionvar = action.data() ? action->variable(name) : KSharedPtr<KoMacro::Variable>();
//kdDebug() << "KexiMacroProperty::ListBox::update() actionvar="<<(actionvar.data() ? "name:"+actionvar->name()+" value:"+actionvar->toString() : "NULL")<<endl;
if(actionvar.data())
- actionchildren += actionvar->children();
+ actiontqchildren += actionvar->tqchildren();
- KoMacro::Variable::List::ConstIterator it(actionchildren.constBegin()), end(actionchildren.constEnd());
+ KoMacro::Variable::List::ConstIterator it(actiontqchildren.constBegin()), end(actiontqchildren.constEnd());
for(; it != end; ++it) {
if(name == (*it)->name()) {
- KoMacro::Variable::List list = (*it)->children();
+ KoMacro::Variable::List list = (*it)->tqchildren();
KoMacro::Variable::List::ConstIterator listit(list.constBegin()), listend(list.constEnd());
for(; listit != listend; ++listit)
- children.append( *listit );
+ tqchildren.append( *listit );
}
}
- if(children.count() <= 0)
- children = actionchildren;
+ if(tqchildren.count() <= 0)
+ tqchildren = actiontqchildren;
}
/*
- kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<children.count()<<endl;
- KoMacro::Variable::List::ConstIterator listit(children.constBegin()), listend(children.constEnd());
+ kdDebug() << "KexiMacroProperty::ListBox::update() name="<<name<<" childcount="<<tqchildren.count()<<endl;
+ KoMacro::Variable::List::ConstIterator listit(tqchildren.constBegin()), listend(tqchildren.constEnd());
for(; listit != listend; ++listit) {
- kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->children().count()<<endl;
+ kdDebug()<<" child name="<<(*listit)->name()<<" value="<<(*listit)->toString()<<" childcount="<<(*listit)->tqchildren().count()<<endl;
}
*/
- if(children.count() > 0) {
- KoMacro::Variable::List::Iterator childit(children.begin()), childend(children.end());
+ if(tqchildren.count() > 0) {
+ KoMacro::Variable::List::Iterator childit(tqchildren.begin()), childend(tqchildren.end());
for(; childit != childend; ++childit) {
- const QString n = (*childit)->name();
+ const TQString n = (*childit)->name();
//if(! n.startsWith("@")) continue;
- const QVariant v = (*childit)->variant();
+ const TQVariant v = (*childit)->variant();
//kdDebug() << " child name=" << n << " value=" << v << endl;
switch( v.type() ) {
- /* case QVariant::Map: {
- const QMap<QString,QVariant> map = v.toMap();
- for(QMap<QString,QVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
+ /* case TQVariant::Map: {
+ const TQMap<TQString,TQVariant> map = v.toMap();
+ for(TQMap<TQString,TQVariant>::ConstIterator it = map.constBegin(); it != map.constEnd(); ++it)
m_items.append(it.key());
} break; */
- case QVariant::List: {
- const QValueList<QVariant> list = v.toList();
- for(QValueList<QVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
- const QString s = (*it).toString().stripWhiteSpace();
+ case TQVariant::List: {
+ const TQValueList<TQVariant> list = v.toList();
+ for(TQValueList<TQVariant>::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it) {
+ const TQString s = (*it).toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
}
} break;
- case QVariant::StringList: {
- const QStringList list = v.toStringList();
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
+ case TQVariant::StringList: {
+ const TQStringList list = v.toStringList();
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it)
if(! (*it).isEmpty())
m_items.append(*it);
} break;
default: {
- const QString s = v.toString().stripWhiteSpace();
+ const TQString s = v.toString().stripWhiteSpace();
if(! s.isEmpty())
m_items.append(s);
} break;
@@ -463,30 +463,30 @@ class ListBox : public QListBox
}
}
- QListBoxItem* item = m_edititem;
+ TQListBoxItem* item = m_edititem;
const uint count = m_items.count();
for(uint i = 0; i < count; i++)
item = new ListBoxItem(this, m_items[i], item);
}
EditListBoxItem* editItem() const { return m_edititem; }
- QStringList items() const { return m_items; }
+ TQStringList items() const { return m_items; }
virtual void hide () {
- QListBox::hide();
+ TQListBox::hide();
for(uint i = 0; i < count(); i++)
static_cast<ListBoxItem*>( item(i) )->setEnabled(false);
}
virtual void show() {
update();
adjustSize();
- QListBox::show();
+ TQListBox::show();
}
private:
KexiMacroProperty* m_macroproperty;
EditListBoxItem* m_edititem;
- QStringList m_items;
+ TQStringList m_items;
};
/**
@@ -501,13 +501,13 @@ class KexiMacroPropertyWidget::Private
ListBox* listbox;
};
-KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent)
- : KoProperty::Widget(property, parent)
+KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent)
+ : KoProperty::Widget(property, tqparent)
, d( new Private() )
{
kdDebug() << "KexiMacroPropertyWidget::KexiMacroPropertyWidget() Ctor" << endl;
- QHBoxLayout* layout = new QHBoxLayout(this, 0, 0);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this, 0, 0);
d->macroproperty = dynamic_cast<KexiMacroProperty*>( property->customProperty() );
if(! d->macroproperty) {
@@ -516,18 +516,18 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
}
d->combobox = new KComboBox(this);
- layout->addWidget(d->combobox);
+ tqlayout->addWidget(d->combobox);
d->listbox = new ListBox(d->combobox, d->macroproperty);
d->combobox->setEditable(true);
d->combobox->setListBox(d->listbox);
- d->combobox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ d->combobox->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
d->combobox->setMinimumHeight(5);
- d->combobox->setInsertionPolicy(QComboBox::NoInsertion);
+ d->combobox->setInsertionPolicy(TQComboBox::NoInsertion);
d->combobox->setMinimumSize(10, 0); // to allow the combo to be resized to a small size
d->combobox->setAutoCompletion(false);
d->combobox->setContextMenuEnabled(false);
- QVariant value = d->macroproperty->value();
+ TQVariant value = d->macroproperty->value();
int index = d->listbox->items().findIndex( value.toString() );
if(index >= 0) {
d->combobox->setCurrentItem(index + 1);
@@ -543,14 +543,14 @@ KexiMacroPropertyWidget::KexiMacroPropertyWidget(KoProperty::Property* property,
d->combobox->setFocusProxy( d->listbox->editItem()->widget() );
setFocusWidget( d->combobox->lineEdit() );
- connect(d->combobox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotComboBoxChanged()));
- connect(d->combobox, SIGNAL(activated(int)),
- this, SLOT(slotComboBoxActivated()));
- connect(d->listbox->editItem()->widget(), SIGNAL(valueChanged(Widget*)),
- this, SLOT(slotWidgetValueChanged()));
- connect(d->macroproperty, SIGNAL(valueChanged()),
- this, SLOT(slotPropertyValueChanged()));
+ connect(d->combobox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotComboBoxChanged()));
+ connect(d->combobox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotComboBoxActivated()));
+ connect(d->listbox->editItem()->widget(), TQT_SIGNAL(valueChanged(Widget*)),
+ this, TQT_SLOT(slotWidgetValueChanged()));
+ connect(d->macroproperty, TQT_SIGNAL(valueChanged()),
+ this, TQT_SLOT(slotPropertyValueChanged()));
}
KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
@@ -559,23 +559,23 @@ KexiMacroPropertyWidget::~KexiMacroPropertyWidget()
delete d;
}
-QVariant KexiMacroPropertyWidget::value() const
+TQVariant KexiMacroPropertyWidget::value() const
{
kdDebug()<<"KexiMacroPropertyWidget::value() value="<<d->macroproperty->value()<<endl;
return d->macroproperty->value();
- /* QVariant value = d->combobox->currentText();
+ /* TQVariant value = d->combobox->currentText();
value.cast( d->macroproperty->value().type() );
return value; */
}
-void KexiMacroPropertyWidget::setValue(const QVariant& value, bool emitChange)
+void KexiMacroPropertyWidget::setValue(const TQVariant& value, bool emitChange)
{
kdDebug()<<"KexiMacroPropertyWidget::setValue() value="<<value<<" emitChange="<<emitChange<<endl;
if(! emitChange)
d->combobox->blockSignals(true);
- const QString s = value.toString();
+ const TQString s = value.toString();
d->combobox->setCurrentText( s.isNull() ? "" : s );
if(emitChange)
@@ -593,7 +593,7 @@ void KexiMacroPropertyWidget::setReadOnlyInternal(bool readOnly)
void KexiMacroPropertyWidget::slotComboBoxChanged()
{
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxChanged()"<<endl;
- const QVariant v = d->combobox->currentText();
+ const TQVariant v = d->combobox->currentText();
d->macroproperty->setValue(v, true);
//emit valueChanged(this);
}
@@ -602,7 +602,7 @@ void KexiMacroPropertyWidget::slotComboBoxActivated()
{
Q_ASSERT( d->listbox->editItem()->widget() );
const int index = d->combobox->currentItem();
- QString text = (index == 0)
+ TQString text = (index == 0)
? d->listbox->editItem()->widget()->value().toString()
: d->combobox->text(index);
kdDebug()<<"KexiMacroPropertyWidget::slotComboBoxActivated() index="<<index<<" text="<<text<<endl;
@@ -618,7 +618,7 @@ void KexiMacroPropertyWidget::slotWidgetValueChanged()
void KexiMacroPropertyWidget::slotPropertyValueChanged()
{
Q_ASSERT( d->listbox->editItem()->widget() );
- const QVariant v = d->macroproperty->value();
+ const TQVariant v = d->macroproperty->value();
kdDebug()<<"KexiMacroPropertyWidget::slotPropertyValueChanged() value="<<v<<endl;
d->listbox->editItem()->widget()->setValue(v, true);
}
diff --git a/kexi/plugins/macros/kexipart/keximacroproperty.h b/kexi/plugins/macros/kexipart/keximacroproperty.h
index 19f7b7ac1..b1c256e9e 100644
--- a/kexi/plugins/macros/kexipart/keximacroproperty.h
+++ b/kexi/plugins/macros/kexipart/keximacroproperty.h
@@ -36,35 +36,36 @@ class KexiMacroPropertyWidget;
* more control about the handling of our macro-properties.
*/
class KexiMacroProperty
- : public QObject
+ : public TQObject
, public KoProperty::CustomProperty
{
Q_OBJECT
+ TQ_OBJECT
friend class KexiMacroPropertyWidget;
public:
/** Constructor. */
- explicit KexiMacroProperty(KoProperty::Property* parent, KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ explicit KexiMacroProperty(KoProperty::Property* tqparent, KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
/** Destructor. */
virtual ~KexiMacroProperty();
- /** @return the parent @a KoProperty::Property instance. */
- KoProperty::Property* parentProperty() const;
+ /** @return the tqparent @a KoProperty::Property instance. */
+ KoProperty::Property* tqparentProperty() const;
/** This function is called by @ref KoProperty::Property::setValue()
when a custom property is set.
You don't have to modify the property value, it is done by Property class.
- You just have to update child or parent properties value (m_property->parent()->setValue()).
+ You just have to update child or tqparent properties value (m_property->tqparent()->setValue()).
Note that, when calling Property::setValue, you <b>need</b> to set
useCustomProperty (3rd parameter) to false, or there will be infinite recursion. */
- virtual void setValue(const QVariant &value, bool rememberOldValue);
+ virtual void setValue(const TQVariant &value, bool rememberOldValue);
/** This function is called by @ref KoProperty::Property::value()
when a custom property is set and @ref handleValue() is true.
- You should return property's value, taken from parent's value.*/
- virtual QVariant value() const;
+ You should return property's value, taken from tqparent's value.*/
+ virtual TQVariant value() const;
/** Tells whether CustomProperty should be used to get the property's value.
You should return true for child properties, and false for others. */
@@ -75,8 +76,8 @@ class KexiMacroProperty
KSharedPtr<KoMacro::MacroItem> macroItem() const;
/** \return the name the property has in the \a KoMacro::MacroItem
- above. Is QString::null if there was no item provided. */
- QString name() const;
+ above. Is TQString() if there was no item provided. */
+ TQString name() const;
/** \return the \a KoMacro::Variable which has the name @a name()
in the item @a macroItem() . If such a variable doesn't exists NULL
@@ -85,7 +86,7 @@ class KexiMacroProperty
/** Factory function to create a new @a KoProperty::Property instance
that will use a @a KexiMacroProperty as container. */
- static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ static KoProperty::Property* createProperty(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
signals:
@@ -110,18 +111,18 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
{
public:
/** Constructor. */
- explicit KexiMacroPropertyFactory(QObject* parent);
+ explicit KexiMacroPropertyFactory(TQObject* tqparent);
/** Destructor. */
virtual ~KexiMacroPropertyFactory();
- /** @return a new instance of custom property for @p parent.
+ /** @return a new instance of custom property for @p tqparent.
Implement this for property types you want to support.
- Use parent->type() to get type of the property. */
- virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* parent);
+ Use tqparent->type() to get type of the property. */
+ virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property* tqparent);
/** @return a new instance of custom property for @p property.
Implement this for property editor types you want to support.
- Use parent->type() to get type of the property. */
+ Use tqparent->type() to get type of the property. */
virtual KoProperty::Widget* createCustomWidget(KoProperty::Property* property);
/** Initializes this factory. The factory may register itself at
@@ -139,21 +140,22 @@ class KexiMacroPropertyFactory : public KoProperty::CustomPropertyFactory
class KexiMacroPropertyWidget : public KoProperty::Widget
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Constructor. */
- explicit KexiMacroPropertyWidget(KoProperty::Property* property, QWidget* parent = 0);
+ explicit KexiMacroPropertyWidget(KoProperty::Property* property, TQWidget* tqparent = 0);
/** Destructor. */
virtual ~KexiMacroPropertyWidget();
/** @return the value this widget has. */
- virtual QVariant value() const;
+ virtual TQVariant value() const;
/** Set the value @p value this widget has. If @p emitChange is true,
the @p KoProperty::Widget::valueChanged signal will be emitted. */
- virtual void setValue(const QVariant& value, bool emitChange=true);
+ virtual void setValue(const TQVariant& value, bool emitChange=true);
- //virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r, const QVariant &value);
+ //virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value);
protected:
@@ -165,7 +167,7 @@ class KexiMacroPropertyWidget : public KoProperty::Widget
/** Called if the text in the KComboBox changed. */
void slotComboBoxChanged();
- /** Called if an item in the QListBox of the KComboBox got activated. */
+ /** Called if an item in the TQListBox of the KComboBox got activated. */
void slotComboBoxActivated();
/** Called if the @a KoProperty::Widget of the EditListBoxItem got changed. */
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.cpp b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
index 95c94a479..deec96331 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.cpp
@@ -41,17 +41,17 @@ class KexiMacroTextView::Private
};
-KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro)
- : KexiMacroView(mainwin, parent, macro, "KexiMacroTextView")
+KexiMacroTextView::KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro)
+ : KexiMacroView(mainwin, tqparent, macro, "KexiMacroTextView")
, d( new Private() )
{
- QHBoxLayout* layout = new QHBoxLayout(this);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
d->editor = new KTextEdit(this);
- d->editor->setTextFormat(Qt::PlainText);
- d->editor->setWordWrap(QTextEdit::NoWrap);
- layout->addWidget(d->editor);
+ d->editor->setTextFormat(TQt::PlainText);
+ d->editor->setWordWrap(TQTextEdit::NoWrap);
+ tqlayout->addWidget(d->editor);
- connect(d->editor, SIGNAL(textChanged()), this, SLOT(editorChanged()));
+ connect(d->editor, TQT_SIGNAL(textChanged()), this, TQT_SLOT(editorChanged()));
}
KexiMacroTextView::~KexiMacroTextView()
@@ -66,13 +66,13 @@ void KexiMacroTextView::editorChanged()
bool KexiMacroTextView::loadData()
{
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiMacroTextView::loadData(): no DataBlock" << endl;
return false;
}
- kdDebug() << QString("KexiMacroTextView::loadData()\n%1").arg(data) << endl;
+ kdDebug() << TQString("KexiMacroTextView::loadData()\n%1").tqarg(data) << endl;
//d->editor->blockSignals(true);
d->editor->setText(data);
//d->editor->blockSignals(false);
@@ -82,7 +82,7 @@ bool KexiMacroTextView::loadData()
tristate KexiMacroTextView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << QString("KexiMacroTextView::storeData() %1 [%2]\n%3").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id()).arg(d->editor->text()) << endl;
+ kexipluginsdbg << TQString("KexiMacroTextView::storeData() %1 [%2]\n%3").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id()).tqarg(d->editor->text()) << endl;
return storeDataBlock( d->editor->text() );
}
diff --git a/kexi/plugins/macros/kexipart/keximacrotextview.h b/kexi/plugins/macros/kexipart/keximacrotextview.h
index 66a2229c5..5101c30b0 100644
--- a/kexi/plugins/macros/kexipart/keximacrotextview.h
+++ b/kexi/plugins/macros/kexipart/keximacrotextview.h
@@ -32,6 +32,7 @@ namespace KoMacro {
class KexiMacroTextView : public KexiMacroView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -39,10 +40,10 @@ class KexiMacroTextView : public KexiMacroView
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroTextView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro);
+ KexiMacroTextView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro);
/**
* Destructor.
diff --git a/kexi/plugins/macros/kexipart/keximacroview.cpp b/kexi/plugins/macros/kexipart/keximacroview.cpp
index 352008297..507764a77 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.cpp
+++ b/kexi/plugins/macros/kexipart/keximacroview.cpp
@@ -17,7 +17,7 @@
#include "keximacroview.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kexidialogbase.h>
@@ -62,12 +62,12 @@ class KexiMacroView::Private
};
-KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, KoMacro::Macro* const macro, const char* name)
- : KexiViewBase(mainwin, parent, (name ? name : "KexiMacroView"))
+KexiMacroView::KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, KoMacro::Macro* const macro, const char* name)
+ : KexiViewBase(mainwin, tqparent, (name ? name : "KexiMacroView"))
, d( new Private(macro) )
{
//kdDebug() << "KexiMacroView::KexiMacroView() Ctor" << endl;
- plugSharedAction( "data_execute", this, SLOT(execute()) );
+ plugSharedAction( "data_execute", this, TQT_SLOT(execute()) );
}
KexiMacroView::~KexiMacroView()
@@ -98,16 +98,16 @@ bool KexiMacroView::loadData()
{
d->macro->clearItems();
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiMacroView::loadData(): no DataBlock" << endl;
return false;
}
- QString errmsg;
+ TQString errmsg;
int errline, errcol;
- QDomDocument domdoc;
+ TQDomDocument domdoc;
bool parsed = domdoc.setContent(data, false, &errmsg, &errline, &errcol);
if(! parsed) {
@@ -115,8 +115,8 @@ bool KexiMacroView::loadData()
return false;
}
- kexipluginsdbg << QString("KexiMacroView::loadData()\n%1").arg(domdoc.toString()) << endl;
- QDomElement macroelem = domdoc.namedItem("macro").toElement();
+ kexipluginsdbg << TQString("KexiMacroView::loadData()\n%1").tqarg(domdoc.toString()) << endl;
+ TQDomElement macroelem = domdoc.namedItem("macro").toElement();
if(macroelem.isNull()) {
kexipluginsdbg << "KexiMacroView::loadData() Macro domelement is null" << endl;
return false;
@@ -139,7 +139,7 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata,
if(! storeData()) {
kexipluginsdbg << "KexiMacroView::storeNewData() Failed to store the data." << endl;
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( schema->id() );
delete schema;
return 0;
@@ -150,21 +150,21 @@ KexiDB::SchemaData* KexiMacroView::storeNewData(const KexiDB::SchemaData& sdata,
tristate KexiMacroView::storeData(bool /*dontAsk*/)
{
- QDomDocument domdoc("macros");
- QDomElement macroelem = d->macro->toXML();
+ TQDomDocument domdoc("macros");
+ TQDomElement macroelem = d->macro->toXML();
domdoc.appendChild(macroelem);
- const QString xml = domdoc.toString(2);
- const QString name = QString("%1 [%2]").arg(parentDialog()->partItem()->name()).arg(parentDialog()->id());
- kexipluginsdbg << QString("KexiMacroView::storeData %1\n%2").arg(name).arg(xml) << endl;
+ const TQString xml = domdoc.toString(2);
+ const TQString name = TQString("%1 [%2]").tqarg(tqparentDialog()->partItem()->name()).tqarg(tqparentDialog()->id());
+ kexipluginsdbg << TQString("KexiMacroView::storeData %1\n%2").tqarg(name).tqarg(xml) << endl;
return storeDataBlock(xml);
}
-void KexiMacroView::execute(QObject* sender)
+void KexiMacroView::execute(TQObject* sender)
{
KSharedPtr<KoMacro::Context> context = d->macro->execute(sender);
if(context->hadException()) {
KexiMacroError* error = new KexiMacroError(
- mainWin(), // The parent KexiMainWindow
+ mainWin(), // The tqparent KexiMainWindow
context // The KoMacro::Context where the error occured.
);
error->exec();
diff --git a/kexi/plugins/macros/kexipart/keximacroview.h b/kexi/plugins/macros/kexipart/keximacroview.h
index beed842ec..0c44419b2 100644
--- a/kexi/plugins/macros/kexipart/keximacroview.h
+++ b/kexi/plugins/macros/kexipart/keximacroview.h
@@ -42,6 +42,7 @@ class KexiTableItem;
class KexiMacroView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -49,10 +50,10 @@ class KexiMacroView : public KexiViewBase
*
* \param mainwin The \a KexiMainWindow instance this \a KexiViewBase
* belongs to.
- * \param parent The parent widget this widget should be displayed in.
+ * \param tqparent The tqparent widget this widget should be displayed in.
* \param macro The \a KoMacro::Macro instance this view is for.
*/
- KexiMacroView(KexiMainWindow *mainwin, QWidget *parent, ::KoMacro::Macro* const macro, const char* name = 0);
+ KexiMacroView(KexiMainWindow *mainwin, TQWidget *tqparent, ::KoMacro::Macro* const macro, const char* name = 0);
/**
* Destructor.
@@ -94,7 +95,7 @@ class KexiMacroView : public KexiViewBase
* This slot will be invoked if Kexi's menuitem Data=>Execute
* got activated and will execute the Macro.
*/
- void execute(QObject* sender = 0);
+ void execute(TQObject* sender = 0);
protected:
diff --git a/kexi/plugins/macros/lib/action.cpp b/kexi/plugins/macros/lib/action.cpp
index e2dc0b64a..db5596b42 100644
--- a/kexi/plugins/macros/lib/action.cpp
+++ b/kexi/plugins/macros/lib/action.cpp
@@ -37,21 +37,21 @@ namespace KoMacro {
/**
* The name this @a Action has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption text this @a Action has.
*/
- QString text;
+ TQString text;
/**
* The comment the user is able to define for each action.
*/
- QString comment;
+ TQString comment;
/**
* A map of @a Variable instances this @a Action
- * provides accessible by there QString name.
+ * provides accessible by there TQString name.
*/
Variable::Map varmap;
@@ -60,14 +60,14 @@ namespace KoMacro {
* sorted order for the @a Variable instances
* defined in the map above.
*/
- QStringList varnames;
+ TQStringList varnames;
};
}
-Action::Action(const QString& name, const QString& text)
- : QObject()
+Action::Action(const TQString& name, const TQString& text)
+ : TQObject()
, KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -81,55 +81,55 @@ Action::Action(const QString& name, const QString& text)
Action::~Action()
{
- //kdDebug() << QString("Action::~Action() name=\"%1\"").arg(name()) << endl;
+ //kdDebug() << TQString("Action::~Action() name=\"%1\"").tqarg(name()) << endl;
// destroy the private d-pointer instance.
delete d;
}
-const QString Action::toString() const
+const TQString Action::toString() const
{
- return QString("Action:%1").arg(name());
+ return TQString("Action:%1").tqarg(name());
}
-const QString Action::name() const
+const TQString Action::name() const
{
return d->name;
}
-void Action::setName(const QString& name)
+void Action::setName(const TQString& name)
{
d->name = name;
}
-const QString Action::text() const
+const TQString Action::text() const
{
return d->text;
}
-void Action::setText(const QString& text)
+void Action::setText(const TQString& text)
{
d->text = text;
}
-const QString Action::comment() const
+const TQString Action::comment() const
{
return d->comment;
}
-void Action::setComment(const QString& comment)
+void Action::setComment(const TQString& comment)
{
d->comment = comment;
}
-bool Action::hasVariable(const QString& name) const
+bool Action::hasVariable(const TQString& name) const
{
- return d->varmap.contains(name);
+ return d->varmap.tqcontains(name);
}
-KSharedPtr<Variable> Action::variable(const QString& name) const
+KSharedPtr<Variable> Action::variable(const TQString& name) const
{
- return d->varmap.contains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
+ return d->varmap.tqcontains(name) ? d->varmap[name] : KSharedPtr<Variable>(0);
}
Variable::Map Action::variables() const
@@ -137,21 +137,21 @@ Variable::Map Action::variables() const
return d->varmap;
}
-QStringList Action::variableNames() const
+TQStringList Action::variableNames() const
{
return d->varnames;
}
void Action::setVariable(KSharedPtr<Variable> variable)
{
- const QString name = variable->name();
- if(! d->varmap.contains(name)) {
+ const TQString name = variable->name();
+ if(! d->varmap.tqcontains(name)) {
d->varnames.append(name);
}
- d->varmap.replace(name, variable);
+ d->varmap.tqreplace(name, variable);
}
-void Action::setVariable(const QString& name, const QString& text, const QVariant& variant)
+void Action::setVariable(const TQString& name, const TQString& text, const TQVariant& variant)
{
Variable* variable = new Variable(variant);
variable->setName(name);
@@ -159,9 +159,9 @@ void Action::setVariable(const QString& name, const QString& text, const QVarian
setVariable( KSharedPtr<Variable>(variable) );
}
-void Action::removeVariable(const QString& name)
+void Action::removeVariable(const TQString& name)
{
- if(d->varmap.contains(name)) {
+ if(d->varmap.tqcontains(name)) {
d->varmap.remove(name);
d->varnames.remove(name);
}
diff --git a/kexi/plugins/macros/lib/action.h b/kexi/plugins/macros/lib/action.h
index 5200c1a49..51e97869b 100644
--- a/kexi/plugins/macros/lib/action.h
+++ b/kexi/plugins/macros/lib/action.h
@@ -25,9 +25,9 @@
#include "context.h"
#include "variable.h"
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
namespace KoMacro {
@@ -36,26 +36,27 @@ namespace KoMacro {
* functionality KAction doesn't provide.
*/
class KOMACRO_EXPORT Action
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
{
Q_OBJECT
+ TQ_OBJECT
/// Property to get/set the name.
- Q_PROPERTY(QString name READ name WRITE setName)
+ TQ_PROPERTY(TQString name READ name WRITE setName)
/// Property to get/set the text.
- Q_PROPERTY(QString text READ text WRITE setText)
+ TQ_PROPERTY(TQString text READ text WRITE setText)
/// Property to get/set the comment.
- Q_PROPERTY(QString comment READ comment WRITE setComment)
+ TQ_PROPERTY(TQString comment READ comment WRITE setComment)
public:
/**
* Shared pointer to implement reference-counting.
*/
- typedef QMap<QString, KSharedPtr<Action> > Map;
+ typedef TQMap<TQString, KSharedPtr<Action> > Map;
/**
* Constructor.
@@ -63,7 +64,7 @@ namespace KoMacro {
* @param name The unique name this @a Action has.
* @param text The i18n-caption text this @a Action has.
*/
- explicit Action(const QString& name, const QString& text = QString::null);
+ explicit Action(const TQString& name, const TQString& text = TQString());
/**
* Destructor.
@@ -74,50 +75,50 @@ namespace KoMacro {
* @return a string representation of the functionality
* this action provides.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* The name this @a Action has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the name of the @a Action to @p name .
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the i18n-caption text this @a Action has.
*/
- const QString text() const;
+ const TQString text() const;
/**
* Set the i18n-caption text this @a Action has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
* @return the comment associated with this action.
*/
- const QString comment() const;
+ const TQString comment() const;
/**
* Set the @p comment associated with this action.
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return true if there exists a variable with the
* name @p name else false is returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the variable @a Variable defined for the
* name @p name . If there exists no @a Variable with
* such a name, NULL is returned.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return the map of variables this @a Action provides.
@@ -127,7 +128,7 @@ namespace KoMacro {
/**
* @return a list of variablenames this @a Action provides.s
*/
- QStringList variableNames() const;
+ TQStringList variableNames() const;
/**
* Append the @a Variable @p variable to list of variables
@@ -140,15 +141,15 @@ namespace KoMacro {
*
* @param name The name the variable should have.
* @param text The i18n-caption used for display.
- * @param variant The QVariant value.
+ * @param variant The TQVariant value.
*/
- void setVariable(const QString& name, const QString& text, const QVariant& variant);
+ void setVariable(const TQString& name, const TQString& text, const TQVariant& variant);
/**
* Remove the variable defined with @p name . If there exists
* no such variable, nothing is done.
*/
- void removeVariable(const QString& name);
+ void removeVariable(const TQString& name);
/**
* This function is called, when the @a KoMacro::Variable
@@ -161,7 +162,7 @@ namespace KoMacro {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const QString& name) {
+ virtual bool notifyUpdated(const KSharedPtr<MacroItem> &macroitem, const TQString& name) {
Q_UNUSED(macroitem);
Q_UNUSED(name);
return true; // The default implementation does nothing.
diff --git a/kexi/plugins/macros/lib/context.cpp b/kexi/plugins/macros/lib/context.cpp
index 135c10c9a..6e2fb2e48 100644
--- a/kexi/plugins/macros/lib/context.cpp
+++ b/kexi/plugins/macros/lib/context.cpp
@@ -23,7 +23,7 @@
#include "macroitem.h"
#include "exception.h"
-//#include <qtimer.h>
+//#include <tqtimer.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -44,10 +44,10 @@ namespace KoMacro {
KSharedPtr<Macro> macro;
/**
- * List of @a Action instances that are children of the
+ * List of @a Action instances that are tqchildren of the
* macro.
*/
- QValueList<KSharedPtr<MacroItem > > items;
+ TQValueList<KSharedPtr<MacroItem > > items;
/**
* The currently selected @a MacroItem or NULL if there
@@ -59,7 +59,7 @@ namespace KoMacro {
* Map of all @a Variable instance that are defined within
* this context.
*/
- QMap<QString, KSharedPtr<Variable > > variables;
+ TQMap<TQString, KSharedPtr<Variable > > variables;
/**
* The @a Exception instance thrown at the last @a activate()
@@ -70,7 +70,7 @@ namespace KoMacro {
/// Constructor.
explicit Private(KSharedPtr<Macro> m)
: macro(m) // remember the macro
- , items(m->items()) // set d-pointer children to macro children
+ , items(m->items()) // set d-pointer tqchildren to macro tqchildren
, exception(0) // no exception yet.
{
}
@@ -85,7 +85,7 @@ namespace KoMacro {
}
//Constructor with initialization of our Private.object (d-pointer)
Context::Context(KSharedPtr<Macro> macro)
- : QObject()
+ : TQObject()
, d( new Private(macro) ) // create the private d-pointer instance.
{
}
@@ -97,17 +97,17 @@ Context::~Context()
}
//return if we have (d-pointer) variables
-bool Context::hasVariable(const QString& name) const
+bool Context::hasVariable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists
- return d->variables.contains(name);
+ //Use TQMap?s contains to check if a variable with name exists
+ return d->variables.tqcontains(name);
}
//return variable with name or throw an exception if none is found in variables
-KSharedPtr<Variable> Context::variable(const QString& name) const
+KSharedPtr<Variable> Context::variable(const TQString& name) const
{
- //Use QMap?s contains to check if a variable with name exists in context
- if (d->variables.contains(name)) {
+ //Use TQMap?s contains to check if a variable with name exists in context
+ if (d->variables.tqcontains(name)) {
//return it
return d->variables[name];
}
@@ -119,7 +119,7 @@ KSharedPtr<Variable> Context::variable(const QString& name) const
}
}
//none found throw exception
- throw Exception(QString("Variable name='%1' does not exist.").arg(name));
+ throw Exception(TQString("Variable name='%1' does not exist.").tqarg(name));
}
//return a map of our (d-pointer) variables
@@ -129,12 +129,12 @@ Variable::Map Context::variables() const
}
//set a variable
-void Context::setVariable(const QString& name, KSharedPtr<Variable> variable)
+void Context::setVariable(const TQString& name, KSharedPtr<Variable> variable)
{
//debuging infos
- kdDebug() << QString("KoMacro::Context::setVariable name='%1' variable='%2'").arg(name).arg(variable->toString()) << endl;
- //Use QMap?s replace to set/replace the variable named name
- d->variables.replace(name, variable);
+ kdDebug() << TQString("KoMacro::Context::setVariable name='%1' variable='%2'").tqarg(name).tqarg(variable->toString()) << endl;
+ //Use TQMap?s replace to set/replace the variable named name
+ d->variables.tqreplace(name, variable);
}
//return the associated Macro
@@ -162,14 +162,14 @@ Exception* Context::exception() const
}
//try to activate all action?s in this context
-void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
+void Context::activate(TQValueList<KSharedPtr<MacroItem > >::ConstIterator it)
{
//debuging infos
kdDebug() << "Context::activate()" << endl;
- //Q_ASSIGN(d->macro);
+ //TQ_ASSIGN(d->macro);
//set end to constEnd
- QValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator end(d->items.constEnd());
//loop through actions
for(;it != end; ++it) {
// fetch the MacroItem we are currently pointing to.
@@ -198,14 +198,14 @@ void Context::activate(QValueList<KSharedPtr<MacroItem > >::ConstIterator it)
d->exception = new Exception(e);
//add new tracemessages
//the macro name
- d->exception->addTraceMessage( QString("macro=%1").arg(d->macro->name()) );
+ d->exception->addTraceMessage( TQString("macro=%1").tqarg(d->macro->name()) );
//the action name
- d->exception->addTraceMessage( QString("action=%1").arg(action->name()) );
+ d->exception->addTraceMessage( TQString("action=%1").tqarg(action->name()) );
//and all variables wich belong to the action/macro
- QStringList variables = action->variableNames();
- for(QStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
+ TQStringList variables = action->variableNames();
+ for(TQStringList::Iterator vit = variables.begin(); vit != variables.end(); ++vit) {
KSharedPtr<Variable> v = d->macroitem->variable(*vit, true);
- d->exception->addTraceMessage( QString("%1=%2").arg(*vit).arg(v->toString()) );
+ d->exception->addTraceMessage( TQString("%1=%2").tqarg(*vit).tqarg(v->toString()) );
}
return; // abort execution
}
@@ -252,7 +252,7 @@ void Context::activateNext()
}
//find the macroitem from which to continue
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.find(d->macroitem);
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it = d->items.tqfind(d->macroitem);
if (it != d->items.constEnd()) {
activate(++it); // try to continue the execution.
}
diff --git a/kexi/plugins/macros/lib/context.h b/kexi/plugins/macros/lib/context.h
index dd467dad4..558ff0aab 100644
--- a/kexi/plugins/macros/lib/context.h
+++ b/kexi/plugins/macros/lib/context.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_CONTEXT_H
#define KOMACRO_CONTEXT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "variable.h"
@@ -35,14 +35,15 @@ namespace KoMacro {
/**
* The context of an execution. If a @a Macro got executed it creates
- * an instance of this class and passes it around all it's children
+ * an instance of this class and passes it around all it's tqchildren
* as local execution context.
*/
class KOMACRO_EXPORT Context
- : public QObject
+ : public TQObject
, public KShared
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -61,13 +62,13 @@ namespace KoMacro {
* @return true if there exists a variable with name @p name
* else false got returned.
*/
- bool hasVariable(const QString& name) const;
+ bool hasVariable(const TQString& name) const;
/**
* @return the @a Variable defined with name @p name or
* NULL if there exists no such variable.
*/
- KSharedPtr<Variable> variable(const QString& name) const;
+ KSharedPtr<Variable> variable(const TQString& name) const;
/**
* @return a map of all @a Variable instance that are defined
@@ -79,7 +80,7 @@ namespace KoMacro {
* Set the variable @p variable defined with name @p name . If
* there exists already a variable with that name replace it.
*/
- void setVariable(const QString& name, KSharedPtr<Variable> variable);
+ void setVariable(const TQString& name, KSharedPtr<Variable> variable);
/**
* @return the associated macro
@@ -113,14 +114,14 @@ namespace KoMacro {
* remembers what @a Action should be executed next and
* calling this slot just activates those @a Action .
*/
- virtual void activate(QValueList<KSharedPtr <MacroItem> >::ConstIterator it);
+ virtual void activate(TQValueList<KSharedPtr <MacroItem> >::ConstIterator it);
public slots:
/**
* This slot extends the slot above with the passed
* @a Context @p context which will be used as
- * parent context for this context.
+ * tqparent context for this context.
*/
virtual void activate(KSharedPtr<Context> context);
diff --git a/kexi/plugins/macros/lib/exception.cpp b/kexi/plugins/macros/lib/exception.cpp
index 7cfc7d717..91cfa03c8 100644
--- a/kexi/plugins/macros/lib/exception.cpp
+++ b/kexi/plugins/macros/lib/exception.cpp
@@ -34,15 +34,15 @@ namespace KoMacro {
public:
/// A describing errormessage.
- const QString errormessage;
+ const TQString errormessage;
/// A more detailed list of tracemessages.
- QString tracemessages;
+ TQString tracemessages;
/**
* Constructor.
*/
- Private(const QString& errormessage)
+ Private(const TQString& errormessage)
: errormessage(errormessage)
{
}
@@ -52,11 +52,11 @@ namespace KoMacro {
}
//constructor
-Exception::Exception(const QString& errormessage)
+Exception::Exception(const TQString& errormessage)
: d( new Private(errormessage) ) // create the private d-pointer instance.
{
//debuging infos
- kdDebug() << QString("Exception errormessage=\"%1\"").arg(errormessage) << endl;
+ kdDebug() << TQString("Exception errormessage=\"%1\"").tqarg(errormessage) << endl;
}
//copy constructor
@@ -73,19 +73,19 @@ Exception::~Exception()
}
//get d-pointer errormessage
-const QString Exception::errorMessage() const
+const TQString Exception::errorMessage() const
{
return d->errormessage;
}
//get d-pointer tracemessages
-const QString Exception::traceMessages() const
+const TQString Exception::traceMessages() const
{
return d->tracemessages;
}
//add a Qstring to d-pointer tracemessages
-void Exception::addTraceMessage(const QString& tracemessage)
+void Exception::addTraceMessage(const TQString& tracemessage)
{
//no tracemessages till now
if(d->tracemessages.isEmpty())
diff --git a/kexi/plugins/macros/lib/exception.h b/kexi/plugins/macros/lib/exception.h
index 73504de04..bcf4abff3 100644
--- a/kexi/plugins/macros/lib/exception.h
+++ b/kexi/plugins/macros/lib/exception.h
@@ -20,8 +20,8 @@
#ifndef KOMACRO_EXCEPTION_H
#define KOMACRO_EXCEPTION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "komacro_export.h"
@@ -41,7 +41,7 @@ namespace KoMacro {
* @param errormessage A describing errormessage why the
* exception got thrown.
*/
- explicit Exception(const QString& errormessage);
+ explicit Exception(const TQString& errormessage);
/**
* Copy-constructor.
@@ -56,7 +56,7 @@ namespace KoMacro {
/**
* @return a describing errormessage.
*/
- const QString errorMessage() const;
+ const TQString errorMessage() const;
/**
* @return a stringlist of traces. This are normaly just
@@ -65,12 +65,12 @@ namespace KoMacro {
* we finally catched the error to display it to the
* user.
*/
- const QString traceMessages() const;
+ const TQString traceMessages() const;
/**
* Add the message @p tracemessage to the list of traces.
*/
- void addTraceMessage(const QString& tracemessage);
+ void addTraceMessage(const TQString& tracemessage);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macro.cpp b/kexi/plugins/macros/lib/macro.cpp
index 688cc7b07..6bcdc21d2 100644
--- a/kexi/plugins/macros/lib/macro.cpp
+++ b/kexi/plugins/macros/lib/macro.cpp
@@ -23,7 +23,7 @@
#include "context.h"
#include "variable.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -41,20 +41,20 @@ namespace KoMacro {
/**
* A list of @a MacroItem instances.
*/
- QValueList<KSharedPtr<MacroItem > > itemlist;
+ TQValueList<KSharedPtr<MacroItem > > itemlist;
/**
* The name the @a Macro has.
*/
- QString name;
+ TQString name;
};
}
//constructor, initalize internal (d-pointer) name
-Macro::Macro(const QString& name)
- : QObject()
+Macro::Macro(const TQString& name)
+ : TQObject()
, KShared()
, XMLHandler(this)
, d( new Private() ) // create the private d-pointer instance.
@@ -70,25 +70,25 @@ Macro::~Macro()
}
//get internal (d-pointer) name
-const QString Macro::name() const
+const TQString Macro::name() const
{
return d->name;
}
//set internal (d-pointer) name
-void Macro::setName(const QString& name)
+void Macro::setName(const TQString& name)
{
d->name = name;
}
//get an "extended" name
-const QString Macro::toString() const
+const TQString Macro::toString() const
{
- return QString("Macro:%1").arg(name());
+ return TQString("Macro:%1").tqarg(name());
}
//get (d-pointer) itemlist
-QValueList<KSharedPtr<MacroItem > >& Macro::items() const
+TQValueList<KSharedPtr<MacroItem > >& Macro::items() const
{
return d->itemlist;
}
@@ -105,17 +105,17 @@ void Macro::clearItems()
}
//run our macro
-KSharedPtr<Context> Macro::execute(QObject* sender)
+KSharedPtr<Context> Macro::execute(TQObject* sender)
{
kdDebug() << "Macro::execute(KSharedPtr<Context>)" << endl;
//create context in which macro can/should run
KSharedPtr<Context> c = KSharedPtr<Context>( new Context(this) );
if(sender) {
- // set the sender-variable if we got a sender QObject.
+ // set the sender-variable if we got a sender TQObject.
c->setVariable("[sender]", KSharedPtr<Variable>( new Variable(sender) ));
}
- //connect(context, SIGNAL(activated()), this, SIGNAL(activated()));
+ //connect(context, TQT_SIGNAL(activated()), this, TQT_SIGNAL(activated()));
//call activate in the context of the macro
c->activate( c );
diff --git a/kexi/plugins/macros/lib/macro.h b/kexi/plugins/macros/lib/macro.h
index da38e05bc..86e0122ae 100644
--- a/kexi/plugins/macros/lib/macro.h
+++ b/kexi/plugins/macros/lib/macro.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_MACRO_H
#define KOMACRO_MACRO_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "action.h"
@@ -39,20 +39,21 @@ namespace KoMacro {
* of them points to an @a Action instance.
*/
class KOMACRO_EXPORT Macro
- : public QObject // Qt functionality like signals and slots
+ : public TQObject // TQt functionality like signals and slots
, public KShared // shared reference-counting
, public XMLHandler // to (un-)serialize from/to XML
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
- * A QMap of @a Macro instances accessible by there unique name. Each
- * class should use this typemap rather then the QMap direct. That
+ * A TQMap of @a Macro instances accessible by there unique name. Each
+ * class should use this typemap rather then the TQMap direct. That
* way we are more flexible on future changes.
*/
- typedef QMap<QString, KSharedPtr<Macro > > Map;
+ typedef TQMap<TQString, KSharedPtr<Macro > > Map;
/**
* Constructor.
@@ -60,7 +61,7 @@ namespace KoMacro {
* @param name The internal name this @a Macro has. This
* name will be used as unique identifier.
*/
- explicit Macro(const QString& name);
+ explicit Macro(const TQString& name);
/**
* Destructor.
@@ -70,23 +71,23 @@ namespace KoMacro {
/**
* @return the name this @a Macro instance has.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the @p name this @a Macro instance has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return a string-representation of the macro.
*/
- virtual const QString toString() const;
+ virtual const TQString toString() const;
/**
* @return a list of @a MacroItem instances which
- * are children of this @a Macro .
+ * are tqchildren of this @a Macro .
*/
- QValueList< KSharedPtr<MacroItem> >& items() const;
+ TQValueList< KSharedPtr<MacroItem> >& items() const;
/**
* Add the @a MacroItem @p item to the list of items
@@ -100,13 +101,13 @@ namespace KoMacro {
void clearItems();
/**
- * Connect the Qt signal @p signal of the QObject @p sender
+ * Connect the TQt signal @p signal of the TQObject @p sender
* with this @a Macro . If the signal got emitted this
* @a Macro instance will be activated and the in the
* signal passed arguments are transfered into the
* activation @a Context .
*/
- //void connectSignal(const QObject* sender, const char* signal);
+ //void connectSignal(const TQObject* sender, const char* signal);
public slots:
@@ -116,7 +117,7 @@ namespace KoMacro {
* @param context The @a Context this @a Macro should
* be executed in.
*/
- virtual KSharedPtr<Context> execute(QObject* sender);
+ virtual KSharedPtr<Context> execute(TQObject* sender);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/macroitem.cpp b/kexi/plugins/macros/lib/macroitem.cpp
index 4027f2ccc..471f9660c 100644
--- a/kexi/plugins/macros/lib/macroitem.cpp
+++ b/kexi/plugins/macros/lib/macroitem.cpp
@@ -40,62 +40,62 @@ namespace KoMacro {
/**
* The comment this @a MacroItem has.
*/
- QString comment;
+ TQString comment;
/**
- * The @a QMap of @a Variable this @a MacroItem has.
+ * The @a TQMap of @a Variable this @a MacroItem has.
*/
Variable::Map variables;
/**
- * define a @a QVariant -cast as inline for better performance
- * @return the casted @a QVariant by passing a @param variant and its
- * expected QVariant::Type @param type.
+ * define a @a TQVariant -cast as inline for better performance
+ * @return the casted @a TQVariant by passing a @param variant and its
+ * expected TQVariant::Type @param type.
*/
- inline const QVariant cast(const QVariant& variant, QVariant::Type type) const
+ inline const TQVariant cast(const TQVariant& variant, TQVariant::Type type) const
{
- // If ok is true the QVariant v holds our new and to the correct type
+ // If ok is true the TQVariant v holds our new and to the correct type
// casted variant value. If ok is false the as argument passed variant
- // QVariant contains the (maybe uncasted string to prevent data-loosing
+ // TQVariant contains the (maybe uncasted string to prevent data-loosing
// what would happen if we e.g. would expect an integer and cast it to
// an incompatible non-int string) value.
bool ok = false;
- QVariant v;
+ TQVariant v;
// Try to cast the passed variant to the expected variant-type.
switch(type) {
- case QVariant::Bool: {
- const QString s = variant.toString();
+ case TQVariant::Bool: {
+ const TQString s = variant.toString();
ok = (s == "true" || s == "false" || s == "0" || s == "1" || s == "-1");
- v = QVariant( variant.toBool(), 0 );
+ v = TQVariant( variant.toBool(), 0 );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
v = variant.toInt(&ok);
// Check if the cast is correct.
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::UInt: {
+ case TQVariant::UInt: {
v = variant.toUInt(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::LongLong: {
+ case TQVariant::LongLong: {
v = variant.toLongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::ULongLong: {
+ case TQVariant::ULongLong: {
v = variant.toULongLong(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
v = variant.toDouble(&ok);
Q_ASSERT(!ok || v.toString() == variant.toString());
} break;
- case QVariant::String: {
+ case TQVariant::String: {
ok = true; // cast will always be successfully
v = variant.toString();
} break;
default: {
- // If we got another type we try to let Qt handle it...
+ // If we got another type we try to let TQt handle it...
ok = v.cast(type);
kdWarning()<<"MacroItem::Private::cast() Unhandled ok="<<ok<<" type="<<type<<" value="<<v<<endl;
} break;
@@ -119,12 +119,12 @@ MacroItem::~MacroItem()
delete d;
}
-QString MacroItem::comment() const
+TQString MacroItem::comment() const
{
return d->comment;
}
-void MacroItem::setComment(const QString& comment)
+void MacroItem::setComment(const TQString& comment)
{
d->comment = comment;
}
@@ -139,15 +139,15 @@ void MacroItem::setAction(KSharedPtr<Action> action)
d->action = action;
}
-QVariant MacroItem::variant(const QString& name, bool checkaction) const
+TQVariant MacroItem::variant(const TQString& name, bool checkaction) const
{
KSharedPtr<Variable> v = variable(name, checkaction);
- return v.data() ? v->variant() : QVariant();
+ return v.data() ? v->variant() : TQVariant();
}
-KSharedPtr<Variable> MacroItem::variable(const QString& name, bool checkaction) const
+KSharedPtr<Variable> MacroItem::variable(const TQString& name, bool checkaction) const
{
- if(d->variables.contains(name))
+ if(d->variables.tqcontains(name))
return d->variables[name];
if(checkaction && d->action.data())
return d->action->variable(name);
@@ -159,7 +159,7 @@ Variable::Map MacroItem::variables() const
return d->variables;
}
-bool MacroItem::setVariant(const QString& name, const QVariant& variant)
+bool MacroItem::setVariant(const TQString& name, const TQVariant& variant)
{
// Let's look if there is an action defined for the variable. If that's
// the case, we try to use that action to preserve the type of the variant.
@@ -167,7 +167,7 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
// If we know the expected type, we try to cast the variant to the expected
// type else the variant stays untouched (so, it will stay a string).
- const QVariant v = actionvariable.data()
+ const TQVariant v = actionvariable.data()
? d->cast(variant, actionvariable->variant().type()) // try to cast the variant
: variant; // don't cast anything, just leave the string-type...
@@ -179,11 +179,11 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
}
// Remember the previous value for the case we like to restore it.
- const QVariant oldvar = variable->variant();
+ const TQVariant oldvar = variable->variant();
// Set the variable.
variable->setVariant(v);
@@ -201,15 +201,15 @@ bool MacroItem::setVariant(const QString& name, const QVariant& variant)
return true;
}
-KSharedPtr<Variable> MacroItem::addVariable(const QString& name, const QVariant& variant)
+KSharedPtr<Variable> MacroItem::addVariable(const TQString& name, const TQVariant& variant)
{
- Q_ASSERT(! d->variables.contains(name) );
+ Q_ASSERT(! d->variables.tqcontains(name) );
// Create a new Variable.
KSharedPtr<Variable> variable = KSharedPtr<Variable>( new Variable() );
variable->setName(name);
// Put it into the Variable-map.
- d->variables.replace(name, variable);
+ d->variables.tqreplace(name, variable);
// Set the variant of the Variable.
this->setVariant(name, variant);
diff --git a/kexi/plugins/macros/lib/macroitem.h b/kexi/plugins/macros/lib/macroitem.h
index 8f3e15022..6b996e709 100644
--- a/kexi/plugins/macros/lib/macroitem.h
+++ b/kexi/plugins/macros/lib/macroitem.h
@@ -20,12 +20,12 @@
#ifndef KOMACRO_MACROITEM_H
#define KOMACRO_MACROITEM_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
// Forward declarations.
-class QDomElement;
+class TQDomElement;
#include "action.h"
#include "context.h"
@@ -51,7 +51,7 @@ namespace KoMacro {
/**
* A list of \a MacroItem instances.
*/
- typedef QValueList<KSharedPtr<MacroItem > > List;
+ typedef TQValueList<KSharedPtr<MacroItem > > List;
/**
* Constructor.
@@ -67,13 +67,13 @@ namespace KoMacro {
* @return the comment defined by the user for
* this @a MacroItem .
*/
- QString comment() const;
+ TQString comment() const;
/**
* Set the comment @param comment defined by the user for this
* @a MacroItem .
*/
- void setComment(const QString& comment);
+ void setComment(const TQString& comment);
/**
* @return the @a Action this @a MacroItem points
@@ -98,7 +98,7 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- QVariant variant(const QString& name, bool checkaction = false) const;
+ TQVariant variant(const TQString& name, bool checkaction = false) const;
/**
* @return the @a Variable instance identified with
@@ -110,25 +110,25 @@ namespace KoMacro {
* such a @param name in the case this @a MacroItem
* doesn't have such a name.
*/
- KSharedPtr<Variable> variable(const QString& name, bool checkaction = false) const;
+ KSharedPtr<Variable> variable(const TQString& name, bool checkaction = false) const;
/**
* @return a map of @a Variable instances.
*/
- QMap<QString, KSharedPtr<Variable> > variables() const;
+ TQMap<TQString, KSharedPtr<Variable> > variables() const;
/**
- * Set the @a QVariant @param variant as variable with the variablename
+ * Set the @a TQVariant @param variant as variable with the variablename
* @param name .
* @return a bool for successfull setting.
*/
- bool setVariant(const QString& name, const QVariant& variant);
+ bool setVariant(const TQString& name, const TQVariant& variant);
/**
* Add a new variable with the vaiablename @param name and the given
- * @a QVariant @param variant to our @a MacroItem instance.
+ * @a TQVariant @param variant to our @a MacroItem instance.
*/
- KSharedPtr<Variable> addVariable(const QString& name, const QVariant& variant);
+ KSharedPtr<Variable> addVariable(const TQString& name, const TQVariant& variant);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/manager.cpp b/kexi/plugins/macros/lib/manager.cpp
index 77ad98b16..0a0d59e0a 100644
--- a/kexi/plugins/macros/lib/manager.cpp
+++ b/kexi/plugins/macros/lib/manager.cpp
@@ -23,9 +23,9 @@
#include "macro.h"
#include "exception.h"
-#include <qobject.h>
-#include <qwidget.h>
-#include <qdom.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqdom.h>
#include <kxmlguibuilder.h>
#include <kdebug.h>
@@ -41,12 +41,12 @@ namespace KoMacro {
{
public:
KXMLGUIClient* const xmlguiclient;
- QMap<QString, KSharedPtr<Macro > > macros;
+ TQMap<TQString, KSharedPtr<Macro > > macros;
- QStringList actionnames;
- QMap<QString, KSharedPtr<Action> > actions;
+ TQStringList actionnames;
+ TQMap<TQString, KSharedPtr<Action> > actions;
- QMap<QString, QGuardedPtr<QObject> > objects;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects;
Private(KXMLGUIClient* const xmlguiclient)
: xmlguiclient(xmlguiclient)
@@ -83,13 +83,13 @@ Manager::Manager(KXMLGUIClient* const xmlguiclient)
: d( new Private(xmlguiclient) ) // create the private d-pointer instance.
{
kdDebug() << "Manager::Manager() Ctor" << endl;
- QObject* obj = dynamic_cast<QObject*>(xmlguiclient);
+ TQObject* obj = dynamic_cast<TQObject*>(xmlguiclient);
if(obj) {
- d->objects.replace(obj->name(), obj);
+ d->objects.tqreplace(obj->name(), obj);
}
//TESTCASE
- d->objects.replace("TestCase", new QWidget());
+ d->objects.tqreplace("TestCase", new TQWidget());
}
Manager::~Manager()
@@ -103,33 +103,33 @@ KXMLGUIClient* Manager::guiClient() const
return d->xmlguiclient;
}
-bool Manager::hasMacro(const QString& macroname)
+bool Manager::hasMacro(const TQString& macroname)
{
- return d->macros.contains(macroname);
+ return d->macros.tqcontains(macroname);
}
-KSharedPtr<Macro> Manager::getMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::getMacro(const TQString& macroname)
{
return d->macros[macroname];
}
-void Manager::addMacro(const QString& macroname, KSharedPtr<Macro> macro)
+void Manager::addMacro(const TQString& macroname, KSharedPtr<Macro> macro)
{
- d->macros.replace(macroname, macro);
+ d->macros.tqreplace(macroname, macro);
}
-void Manager::removeMacro(const QString& macroname)
+void Manager::removeMacro(const TQString& macroname)
{
d->macros.remove(macroname);
}
-KSharedPtr<Macro> Manager::createMacro(const QString& macroname)
+KSharedPtr<Macro> Manager::createMacro(const TQString& macroname)
{
KSharedPtr<Macro> macro = KSharedPtr<Macro>( new Macro(macroname) );
return macro;
}
-KSharedPtr<Action> Manager::action(const QString& name) const
+KSharedPtr<Action> Manager::action(const TQString& name) const
{
return d->actions[name];
}
@@ -139,32 +139,32 @@ Action::Map Manager::actions() const
return d->actions;
}
-QStringList Manager::actionNames() const
+TQStringList Manager::actionNames() const
{
return d->actionnames;
}
void Manager::publishAction(KSharedPtr<Action> action)
{
- const QString name = action->name();
- if(! d->actions.contains(name)) {
+ const TQString name = action->name();
+ if(! d->actions.tqcontains(name)) {
d->actionnames.append(name);
}
- d->actions.replace(name, action);
+ d->actions.tqreplace(name, action);
}
-void Manager::publishObject(const QString& name, QObject* object)
+void Manager::publishObject(const TQString& name, TQObject* object)
{
- Q_ASSERT(! d->objects.contains(name));
- d->objects.replace(name, object);
+ Q_ASSERT(! d->objects.tqcontains(name));
+ d->objects.tqreplace(name, object);
}
-QGuardedPtr<QObject> Manager::object(const QString& name) const
+TQGuardedPtr<TQObject> Manager::object(const TQString& name) const
{
return d->objects[name];
}
-QMap<QString, QGuardedPtr<QObject> > Manager::objects() const
+TQMap<TQString, TQGuardedPtr<TQObject> > Manager::objects() const
{
return d->objects;
}
diff --git a/kexi/plugins/macros/lib/manager.h b/kexi/plugins/macros/lib/manager.h
index 964f9d7c9..fb332f666 100644
--- a/kexi/plugins/macros/lib/manager.h
+++ b/kexi/plugins/macros/lib/manager.h
@@ -20,16 +20,16 @@
#ifndef KOMACRO_MANAGER_H
#define KOMACRO_MANAGER_H
-#include <qmap.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqguardedptr.h>
#include <ksharedptr.h>
#include <kxmlguiclient.h>
#include <kstaticdeleter.h>
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -42,11 +42,11 @@ namespace KoMacro {
*
* Example how KoMacro could be used.
* @code
- * // We have a class that inheritates from QObject and
+ * // We have a class that inheritates from TQObject and
* // implements some public signals and slots that will
* // be accessible by Macros once a class-instance
* // got published.
- * class PublishedObject : public QObject {};
+ * class PublishedObject : public TQObject {};
*
* // Somewhere we have our KMainWindow.
* KMainWindow* mainwindow = new KMainWindow();
@@ -55,7 +55,7 @@ namespace KoMacro {
* // Macro-framework.
* KoMacro::Manager* manager = new KoMacro::Manager( mainwindow );
*
- * // Now we like to publish a QObject
+ * // Now we like to publish a TQObject
* PublishedObject* publishedobject = new PublishedObject();
* manager->publishObject(publishedobject);
*
@@ -64,7 +64,7 @@ namespace KoMacro {
*
* // Finally free the publishedobject instance we created. We
* // need to free it manualy cause PublishedObject doesn't
- * // got a QObject parent as argument.
+ * // got a TQObject tqparent as argument.
* delete publishedobject;
*
* // Finally free the manager-instance. It's always needed
@@ -116,32 +116,32 @@ namespace KoMacro {
* \return true if we carry a \a Macro with the
* defined \p macroname .
*/
- bool hasMacro(const QString& macroname);
+ bool hasMacro(const TQString& macroname);
/**
* \return the \a Macro defined with \p macroname
* or NULL if we don't have such a \a Macro.
*/
- KSharedPtr<Macro> getMacro(const QString& macroname);
+ KSharedPtr<Macro> getMacro(const TQString& macroname);
/**
* Add a new \a Macro to the list of known macros. If
* there exists already a \a Macro instance with the
* defined \p macroname then the already existing one
- * will be replace.
+ * will be tqreplace.
*
* \param macroname The name the \a Macro will be
* accessible as.
* \param macro The \a Macro instance.
*/
- void addMacro(const QString& macroname, KSharedPtr<Macro> macro);
+ void addMacro(const TQString& macroname, KSharedPtr<Macro> macro);
/**
* Remove the \a Macro defined with \p macroname . If
* we don't know about a \a Macro with that \p macroname
* nothing happens.
*/
- void removeMacro(const QString& macroname);
+ void removeMacro(const TQString& macroname);
/**
* Factory function to create a new \a Macro instances.
@@ -150,21 +150,21 @@ namespace KoMacro {
* like to attach the returned new \a Macro to this
* \a Manager instance.
*/
- KSharedPtr<Macro> createMacro(const QString& macroname);
+ KSharedPtr<Macro> createMacro(const TQString& macroname);
#if 0
/**
* Factory method to create @a Action instances from the
* defined @p element .
*
- * @param element The serialized QDomElement that should
+ * @param element The serialized TQDomElement that should
* be used to create the @a Action instance.
* @return A new @a Action instance or NULL if the
* defined @p element is not valid.
*
* @deprecated Moved to common XMLReader/XMLWriter classes. Use Macro::xmlHandler() !
*/
- KSharedPtr<Action> createAction(const QDomElement& element);
+ KSharedPtr<Action> createAction(const TQDomElement& element);
#endif
/**
@@ -172,17 +172,17 @@ namespace KoMacro {
* name @p name or returns an empty @a KSharedPtr<Action> object
* if there was no such @a Action published.
*/
- KSharedPtr<Action> action(const QString& name) const;
+ KSharedPtr<Action> action(const TQString& name) const;
/**
* @return a map of all published actions.
*/
- QMap<QString, KSharedPtr<Action> > actions() const;
+ TQMap<TQString, KSharedPtr<Action> > actions() const;
/**
* @return a list of all published actions.
*/
- QStringList actionNames() const;
+ TQStringList actionNames() const;
/**
* Publish the @a Action @p action . The published @a Action
@@ -191,21 +191,21 @@ namespace KoMacro {
void publishAction(KSharedPtr<Action> action);
/**
- * Publish the passed QObject @p object. Those object will
+ * Publish the passed TQObject @p object. Those object will
* provide it's slots as callable functions.
*/
- void publishObject(const QString& name, QObject* object);
+ void publishObject(const TQString& name, TQObject* object);
/**
- * @return the publish QObject defined with name @p name
+ * @return the publish TQObject defined with name @p name
* or NULL if there exists no such object.
*/
- QGuardedPtr<QObject> object(const QString& name) const;
+ TQGuardedPtr<TQObject> object(const TQString& name) const;
/**
- * @return a map of the published QObject instances.
+ * @return a map of the published TQObject instances.
*/
- QMap<QString, QGuardedPtr<QObject> > objects() const;
+ TQMap<TQString, TQGuardedPtr<TQObject> > objects() const;
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metamethod.cpp b/kexi/plugins/macros/lib/metamethod.cpp
index 8aa4dc54c..979202e84 100644
--- a/kexi/plugins/macros/lib/metamethod.cpp
+++ b/kexi/plugins/macros/lib/metamethod.cpp
@@ -23,12 +23,12 @@
#include "variable.h"
#include "exception.h"
-#include <qobject.h>
-#include <qmetaobject.h>
+#include <tqobject.h>
+#include <tqmetaobject.h>
-// to access the Qt3 QUObject API.
-#include <private/qucom_p.h>
-#include <private/qucomextra_p.h>
+// to access the TQt3 TQUObject API.
+#include <private/tqucom_p.h>
+#include <private/tqucomextra_p.h>
#include <kdebug.h>
@@ -47,17 +47,17 @@ namespace KoMacro {
/**
* The signature this @a MetaMethod has.
*/
- QString signature;
+ TQString signature;
/**
* The signature tagname this @a MetaMethod has.
*/
- QString signaturetag;
+ TQString signaturetag;
/**
* The signature arguments this @a MetaMethod has.
*/
- QString signaturearguments;
+ TQString signaturearguments;
/**
* Cached signature arguments parsed into a list
@@ -81,7 +81,7 @@ namespace KoMacro {
}
-MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObject> object)
+MetaMethod::MetaMethod(const TQString& signature, Type type, KSharedPtr<MetaObject> object)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -89,39 +89,39 @@ MetaMethod::MetaMethod(const QString& signature, Type type, KSharedPtr<MetaObjec
d->object = object;
d->type = type;
- int startpos = d->signature.find("(");
- int endpos = d->signature.findRev(")");
+ int startpos = d->signature.tqfind("(");
+ int endpos = d->signature.tqfindRev(")");
if(startpos < 0 || startpos > endpos) {
- throw Exception(QString("Invalid signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid signature \"%1\"").tqarg(d->signature));
}
d->signaturetag = d->signature.left(startpos).stripWhiteSpace();
if(d->signaturetag.isEmpty()) {
- throw Exception(QString("Invalid tagname in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("Invalid tagname in signature \"%1\"").tqarg(d->signature));
}
d->signaturearguments = d->signature.mid(startpos + 1, endpos - startpos - 1).stripWhiteSpace();
do {
- int commapos = d->signaturearguments.find(",");
- int starttemplatepos = d->signaturearguments.find("<");
+ int commapos = d->signaturearguments.tqfind(",");
+ int starttemplatepos = d->signaturearguments.tqfind("<");
if(starttemplatepos >= 0 && (commapos < 0 || starttemplatepos < commapos)) {
- int endtemplatepos = d->signaturearguments.find(">", starttemplatepos);
+ int endtemplatepos = d->signaturearguments.tqfind(">", starttemplatepos);
if(endtemplatepos <= 0) {
- throw Exception(QString("No closing template-definiton in signature \"%1\"").arg(d->signature));
+ throw Exception(TQString("No closing template-definiton in signature \"%1\"").tqarg(d->signature));
}
- commapos = d->signaturearguments.find(",", endtemplatepos);
+ commapos = d->signaturearguments.tqfind(",", endtemplatepos);
}
if(commapos > 0) {
- QString s = d->signaturearguments.left(commapos).stripWhiteSpace();
+ TQString s = d->signaturearguments.left(commapos).stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
d->signaturearguments = d->signaturearguments.right(d->signaturearguments.length() - commapos - 1);
}
else {
- QString s = d->signaturearguments.stripWhiteSpace();
+ TQString s = d->signaturearguments.stripWhiteSpace();
if(! s.isEmpty()) {
d->arguments.append( new MetaParameter(s) );
}
@@ -140,17 +140,17 @@ KSharedPtr<MetaObject> const MetaMethod::object() const
return d->object;
}
-const QString MetaMethod::signature() const
+const TQString MetaMethod::signature() const
{
return d->signature;
}
-const QString MetaMethod::signatureTag() const
+const TQString MetaMethod::signatureTag() const
{
return d->signaturetag;
}
-const QString MetaMethod::signatureArguments() const
+const TQString MetaMethod::signatureArguments() const
{
return d->signaturearguments;
}
@@ -165,71 +165,71 @@ MetaParameter::List MetaMethod::arguments() const
return d->arguments;
}
-QUObject* MetaMethod::toQUObject(Variable::List arguments)
+TQUObject* MetaMethod::toTQUObject(Variable::List arguments)
{
uint argsize = d->arguments.size();
if(arguments.size() <= argsize) {
- throw Exception(QString("To less arguments for slot with siganture \"%1\"").arg(d->signature));
+ throw Exception(TQString("To less arguments for slot with siganture \"%1\"").tqarg(d->signature));
}
- // The first item in the QUObject-array is for the returnvalue
+ // The first item in the TQUObject-array is for the returnvalue
// while everything >=1 are the passed parameters.
- QUObject* uo = new QUObject[ argsize + 1 ];
+ TQUObject* uo = new TQUObject[ argsize + 1 ];
- uo[0] = QUObject(); // empty placeholder for the returnvalue.
+ uo[0] = TQUObject(); // empty placeholder for the returnvalue.
for(uint i = 0; i < argsize; i++) {
KSharedPtr<MetaParameter> metaargument = d->arguments[i];
KSharedPtr<Variable> variable = arguments[i + 1];
if ( !variable ) {
- throw Exception(QString("Variable is undefined !"));
+ throw Exception(TQString("Variable is undefined !"));
}
if(metaargument->type() != variable->type()) {
- throw Exception(QString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").arg(d->signature).arg(metaargument->type()).arg(variable->type()));
+ throw Exception(TQString("Wrong variable type in method \"%1\". Expected \"%2\" but got \"%3\"").tqarg(d->signature).tqarg(metaargument->type()).tqarg(variable->type()));
}
switch(metaargument->type()) {
case Variable::TypeNone: {
kdDebug() << "Variable::TypeNone" << endl;
- uo[i + 1] = QUObject();
+ uo[i + 1] = TQUObject();
} break;
case Variable::TypeVariant: {
kdDebug() << "Variable::TypeVariant" << endl;
- const QVariant variant = variable->variant();
+ const TQVariant variant = variable->variant();
switch(metaargument->variantType()) {
- case QVariant::String: {
- const QString s = variant.toString();
- static_QUType_QString.set( &(uo[i + 1]), s );
+ case TQVariant::String: {
+ const TQString s = variant.toString();
+ static_TQUType_TQString.set( &(uo[i + 1]), s );
} break;
- case QVariant::Int: {
+ case TQVariant::Int: {
const int j = variant.toInt();
- static_QUType_int.set( &(uo[i + 1]), j );
+ static_TQUType_int.set( &(uo[i + 1]), j );
} break;
- case QVariant::Bool: {
+ case TQVariant::Bool: {
const bool b = variant.toBool();
- static_QUType_bool.set( &(uo[i + 1]), b );
+ static_TQUType_bool.set( &(uo[i + 1]), b );
} break;
- case QVariant::Double: {
+ case TQVariant::Double: {
const double d = variant.toDouble();
- static_QUType_double.set( &(uo[i + 1]), d );
+ static_TQUType_double.set( &(uo[i + 1]), d );
} break;
- case QVariant::Invalid: {
- static_QUType_QVariant.set( &(uo[i + 1]), variant );
+ case TQVariant::Invalid: {
+ static_TQUType_TQVariant.set( &(uo[i + 1]), variant );
}
/*FIXME
- static_QUType_charstar
- static_QUType_ptr.get(uo); QObject *qobj = (QObject *)(ptr);
+ static_TQUType_charstar
+ static_TQUType_ptr.get(uo); TQObject *qobj = (TQObject *)(ptr);
*/
default: {
- throw Exception(QString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
+ throw Exception(TQString("Invalid parameter !!!!!!!!!!!!!!!!!!!!!!!"));
} break;
}
} break;
@@ -237,15 +237,15 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
case Variable::TypeObject: {
kdDebug() << "Variable::TypeObject" << endl;
- const QObject* obj = arguments[i + 1]->object();
+ const TQObject* obj = arguments[i + 1]->object();
if(! obj) { //FIXME: move check to MetaParameter?!
- throw Exception(QString("No QObject !"));
+ throw Exception(TQString("No TQObject !"));
}
- static_QUType_ptr.set( &(uo[i + 1]), obj );
+ static_TQUType_ptr.set( &(uo[i + 1]), obj );
} break;
default: {
- throw Exception(QString("Invalid variable type"));
+ throw Exception(TQString("Invalid variable type"));
} break;
}
@@ -254,43 +254,43 @@ QUObject* MetaMethod::toQUObject(Variable::List arguments)
return uo;
}
-KSharedPtr<Variable> MetaMethod::toVariable(QUObject* uo)
+KSharedPtr<Variable> MetaMethod::toVariable(TQUObject* uo)
{
- const QString desc( uo->type->desc() );
+ const TQString desc( uo->type->desc() );
if(desc == "null") {
return new Variable();
}
- if(desc == "QString") {
- const QString s = static_QUType_QString.get(uo);
+ if(desc == TQSTRING_OBJECT_NAME_STRING) {
+ const TQString s = static_TQUType_TQString.get(uo);
return new Variable(s);
}
if(desc == "int") {
- const int j = static_QUType_int.get(uo);
+ const int j = static_TQUType_int.get(uo);
return new Variable(j);
}
if(desc == "bool") {
- const bool b = static_QUType_bool.get(uo);
+ const bool b = static_TQUType_bool.get(uo);
return new Variable(b);
}
if(desc == "double") {
- const double d = static_QUType_double.get(uo);
+ const double d = static_TQUType_double.get(uo);
return new Variable(d);
}
- if(desc == "QVariant") {
- QVariant v = static_QUType_QVariant.get(uo);
+ if(desc == "TQVariant") {
+ TQVariant v = static_TQUType_TQVariant.get(uo);
return new Variable(v);
}
- throw Exception(QString("Invalid parameter '%1'").arg(desc));
+ throw Exception(TQString("Invalid parameter '%1'").tqarg(desc));
}
-Variable::List MetaMethod::toVariableList(QUObject* uo)
+Variable::List MetaMethod::toVariableList(TQUObject* uo)
{
Variable::List list;
@@ -311,12 +311,12 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
throw Exception("MetaObject is undefined.");
}
- QObject* obj = d->object->object();
+ TQObject* obj = d->object->object();
KSharedPtr<Variable> returnvalue;
- QUObject* qu = 0;
+ TQUObject* qu = 0;
try {
- qu = toQUObject(arguments);
+ qu = toTQUObject(arguments);
switch( d->type ) {
case Signal: {
@@ -334,7 +334,7 @@ KSharedPtr<Variable> MetaMethod::invoke(Variable::List arguments)
returnvalue = toVariable( &qu[0] );
}
catch(Exception& e) {
- delete [] qu; // free the QUObject array and
+ delete [] qu; // free the TQUObject array and
kdDebug() << "EXCEPTION in KoMacro::MetaMethod::invoke(Variable::List)" << endl;
throw Exception(e); // re-throw exception
}
diff --git a/kexi/plugins/macros/lib/metamethod.h b/kexi/plugins/macros/lib/metamethod.h
index df53ac60c..daf7dfcb6 100644
--- a/kexi/plugins/macros/lib/metamethod.h
+++ b/kexi/plugins/macros/lib/metamethod.h
@@ -20,13 +20,13 @@
#ifndef KOMACRO_METAMETHOD_H
#define KOMACRO_METAMETHOD_H
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <ksharedptr.h>
#include "komacro_export.h"
-struct QUObject;
+struct TQUObject;
namespace KoMacro {
@@ -38,10 +38,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaMethod : public KShared
{
@@ -52,8 +52,8 @@ namespace KoMacro {
* access to.
*/
enum Type {
- Signal, /// The @a MetaMethod points to a Qt signal.
- Slot, /// The @a MetaMethod points to a Qt slot.
+ Signal, /// The @a MetaMethod points to a TQt signal.
+ Slot, /// The @a MetaMethod points to a TQt slot.
Unknown /// The @a MetaMethod is not known.
};
@@ -62,14 +62,14 @@ namespace KoMacro {
*
* @param signature The signature this @a MetaMethod has. This
* includes the tagname and the arguments and could look like
- * "myslot(const QString&, int)".
+ * "myslot(const TQString&, int)".
* @param type The @a MetaMethod::Type the @a MethodMethod
* has.
* @param object The @a MetaObject this @a MethodMethod
* belongs to. Each @a MethodMethod is associated with
* exactly one @a MetaObject .
*/
- explicit MetaMethod(const QString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
+ explicit MetaMethod(const TQString& signature, Type type = Unknown, KSharedPtr<MetaObject> object = 0);
/**
* Destructor.
@@ -84,23 +84,23 @@ namespace KoMacro {
/**
* @return the signature this @a MetaMethod has. It could
- * be something like "mySlot(const QString&,int)".
+ * be something like "mySlot(const TQString&,int)".
*/
- const QString signature() const;
+ const TQString signature() const;
/**
* @return the signatures tagname this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
+ * At the signature "mySlot(const TQString&,int)" the
* tagname would be "mySlot".
*/
- const QString signatureTag() const;
+ const TQString signatureTag() const;
/**
* @return the signatures arguments this @a MetaMethod has.
- * At the signature "mySlot(const QString&,int)" the
- * arguments are "const QString&,int".
+ * At the signature "mySlot(const TQString&,int)" the
+ * arguments are "const TQString&,int".
*/
- const QString signatureArguments() const;
+ const TQString signatureArguments() const;
/**
* @return the @a Type of method this @a MetaMethod provides
@@ -112,31 +112,31 @@ namespace KoMacro {
* @return the signature arguments as parsed list of
* @a MetaParameter instances.
*/
- QValueList< KSharedPtr<MetaParameter> > arguments() const;
+ TQValueList< KSharedPtr<MetaParameter> > arguments() const;
/**
* Translate the passed @p arguments list of @a Variable instances
- * into a Qt3 QUObject* array.
+ * into a TQt3 TQUObject* array.
*/
- QUObject* toQUObject(QValueList< KSharedPtr<Variable> > arguments);
+ TQUObject* toTQUObject(TQValueList< KSharedPtr<Variable> > arguments);
/**
- * Translate the passed @p uo QUObject reference into an internal used
+ * Translate the passed @p uo TQUObject reference into an internal used
* @a Variable instances.
*/
- KSharedPtr<Variable> toVariable(QUObject* uo);
+ KSharedPtr<Variable> toVariable(TQUObject* uo);
/**
- * Translate the passed @p uo QUObject array into an internal used
+ * Translate the passed @p uo TQUObject array into an internal used
* list of @a Variable instances.
*/
- QValueList< KSharedPtr<Variable> > toVariableList(QUObject* uo);
+ TQValueList< KSharedPtr<Variable> > toVariableList(TQUObject* uo);
/**
* Invoke the @a MetaMethod with the optional arguments
* @p arguments and return a variable.
*/
- KSharedPtr<Variable> invoke(QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invoke(TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp
index 000f4181a..e9e56b448 100644
--- a/kexi/plugins/macros/lib/metaobject.cpp
+++ b/kexi/plugins/macros/lib/metaobject.cpp
@@ -22,8 +22,8 @@
#include "variable.h"
#include "exception.h"
-#include <qguardedptr.h>
-#include <qmetaobject.h>
+#include <tqguardedptr.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
@@ -40,14 +40,14 @@ namespace KoMacro {
public:
/**
- * The QObject instance this @a MetaObject belongs to.
+ * The TQObject instance this @a MetaObject belongs to.
*/
- QGuardedPtr<QObject> const object;
+ TQGuardedPtr<TQObject> const object;
/**
* Constructor.
*/
- Private(QObject* const object)
+ Private(TQObject* const object)
: object(object)
{
}
@@ -55,7 +55,7 @@ namespace KoMacro {
}
-MetaObject::MetaObject(QObject* const object)
+MetaObject::MetaObject(TQObject* const object)
: KShared()
, d( new Private(object) ) // create the private d-pointer instance.
{
@@ -66,66 +66,66 @@ MetaObject::~MetaObject()
delete d;
}
-QObject* const MetaObject::object() const
+TQObject* const MetaObject::object() const
{
if(! d->object) {
- throw Exception(QString("Object is undefined."));
+ throw Exception(TQString("Object is undefined."));
}
return d->object;
}
/*
-QStrList MetaObject::signalNames() const
+TQStrList MetaObject::signalNames() const
{
- return object()->metaObject()->signalNames();
+ return object()->tqmetaObject()->signalNames();
}
-QStrList MetaObject::slotNames() const
+TQStrList MetaObject::slotNames() const
{
- return object()->metaObject()->slotNames();
+ return object()->tqmetaObject()->slotNames();
}
*/
int MetaObject::indexOfSignal(const char* signal) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int signalid = metaobject->findSignal(signal, false);
if(signalid < 0) {
- throw Exception(QString("Invalid signal \"%1\"").arg(signal));
+ throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal));
}
return signalid;
}
int MetaObject::indexOfSlot(const char* slot) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int slotid = metaobject->findSlot(slot, false);
if(slotid < 0) {
- throw Exception(QString("Invalid slot \"%1\"").arg(slot));
+ throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot));
}
return slotid;
}
KSharedPtr<MetaMethod> MetaObject::method(int index)
{
- QObject* obj = object();
+ TQObject* obj = object();
MetaMethod::Type type = MetaMethod::Slot;
- QMetaObject* metaobject = obj->metaObject();
+ TQMetaObject* metaobject = obj->tqmetaObject();
- const QMetaData* metadata = metaobject->slot(index, true);
+ const TQMetaData* metadata = metaobject->slot(index, true);
if(! metadata) {
// Try to get a signal with that index iff we failed to determinate
// a matching slot.
metadata = metaobject->signal(index, true);
if(! metadata) {
- throw Exception(QString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name()));
+ throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name()));
}
type = MetaMethod::Signal;
}
- if(metadata->access != QMetaData::Public) {
- throw Exception(QString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name()));
+ if(metadata->access != TQMetaData::Public) {
+ throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name()));
}
return new MetaMethod(metadata->name, type, this);
diff --git a/kexi/plugins/macros/lib/metaobject.h b/kexi/plugins/macros/lib/metaobject.h
index 8b6115742..a1a52562c 100644
--- a/kexi/plugins/macros/lib/metaobject.h
+++ b/kexi/plugins/macros/lib/metaobject.h
@@ -20,7 +20,7 @@
#ifndef KOMACRO_METAOBJECT_H
#define KOMACRO_METAOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -32,11 +32,11 @@ namespace KoMacro {
class MetaMethod;
/**
- * Class to provide abstract access to extended QObject functionality
- * like the undocumented QUObject-API in Qt3.
+ * Class to provide abstract access to extended TQObject functionality
+ * like the undocumented TQUObject-API in TQt3.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaObject : public KShared
{
@@ -45,10 +45,10 @@ namespace KoMacro {
/**
* Constructor.
*
- * @param object The QObject instance this @a MetaObject provides
+ * @param object The TQObject instance this @a MetaObject provides
* abstract access to.
*/
- explicit MetaObject(QObject* const object);
+ explicit MetaObject(TQObject* const object);
/**
* Destructor.
@@ -56,13 +56,13 @@ namespace KoMacro {
~MetaObject();
/**
- * @return the QObject this @a MetaObject provides abstract
+ * @return the TQObject this @a MetaObject provides abstract
* access to.
*/
- QObject* const object() const;
+ TQObject* const object() const;
- //QStrList signalNames() const;
- //QStrList slotNames() const;
+ //TQStrList signalNames() const;
+ //TQStrList slotNames() const;
/**
* @return the index of the signal @p signal .
@@ -91,7 +91,7 @@ namespace KoMacro {
KSharedPtr<MetaMethod> slot(const char* slot);
//KSharedPtr<MetaMethod> addSlot(const char* slot);
-//void connectSignal(QObject* obj, const char* signal);
+//void connectSignal(TQObject* obj, const char* signal);
/**
* Invoke the @a MetaMethod that has the index @p index .
@@ -104,7 +104,7 @@ namespace KoMacro {
* @return The returnvalue the method provides and that got
* returned if the execution is done.
*/
- KSharedPtr<Variable> invokeMethod(int index, QValueList< KSharedPtr<Variable> > arguments);
+ KSharedPtr<Variable> invokeMethod(int index, TQValueList< KSharedPtr<Variable> > arguments);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/metaparameter.cpp b/kexi/plugins/macros/lib/metaparameter.cpp
index 7f072b2bc..ed921cfe7 100644
--- a/kexi/plugins/macros/lib/metaparameter.cpp
+++ b/kexi/plugins/macros/lib/metaparameter.cpp
@@ -37,10 +37,10 @@ namespace KoMacro {
/**
* The signatures argument that represents this MetaParameter.
- * This could be something like "const QString&", "int" or
- * "QMap &lt; QString, QVariant &gt; ".
+ * This could be something like "const TQString&", "int" or
+ * "TQMap &lt; TQString, TQVariant &gt; ".
*/
- QString signatureargument;
+ TQString signatureargument;
/**
* The type of the @a Variable .
@@ -48,16 +48,16 @@ namespace KoMacro {
MetaParameter::Type type;
/**
- * If the @a MetaParameter::Type is a Variant this QVariant::Type
+ * If the @a MetaParameter::Type is a Variant this TQVariant::Type
* is used to defined what kind of Variant it is.
*/
- QVariant::Type varianttype;
+ TQVariant::Type varianttype;
};
}
-MetaParameter::MetaParameter(const QString& signatureargument)
+MetaParameter::MetaParameter(const TQString& signatureargument)
: KShared()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -78,7 +78,7 @@ MetaParameter::Type MetaParameter::type() const
return d->type;
}
-const QString MetaParameter::typeName() const
+const TQString MetaParameter::typeName() const
{
switch( d->type ) {
case TypeNone:
@@ -88,31 +88,31 @@ const QString MetaParameter::typeName() const
case TypeObject:
return "Object";
}
- return QString::null;
+ return TQString();
}
void MetaParameter::setType(MetaParameter::Type type)
{
d->type = type;
- d->varianttype = QVariant::Invalid;
+ d->varianttype = TQVariant::Invalid;
}
-QVariant::Type MetaParameter::variantType() const
+TQVariant::Type MetaParameter::variantType() const
{
return d->varianttype;
}
-void MetaParameter::setVariantType(QVariant::Type varianttype)
+void MetaParameter::setVariantType(TQVariant::Type varianttype)
{
d->type = TypeVariant;
d->varianttype = varianttype;
}
-void MetaParameter::setSignatureArgument(const QString& signatureargument)
+void MetaParameter::setSignatureArgument(const TQString& signatureargument)
{
d->signatureargument = signatureargument;
- QString argument = signatureargument;
+ TQString argument = signatureargument;
if(argument.startsWith("const")) {
argument = argument.mid(5).stripWhiteSpace();
}
@@ -122,14 +122,14 @@ void MetaParameter::setSignatureArgument(const QString& signatureargument)
}
if(argument.isEmpty()) {
- throw Exception(QString("Empty signature argument passed."));
+ throw Exception(TQString("Empty signature argument passed."));
}
- if(argument == "QVariant") {
- setVariantType( QVariant::Invalid );
+ if(argument == "TQVariant") {
+ setVariantType( TQVariant::Invalid );
}
- QVariant::Type type = argument.isNull() ? QVariant::Invalid : QVariant::nameToType(argument.latin1());
- if (type != QVariant::Invalid) {
+ TQVariant::Type type = argument.isNull() ? TQVariant::Invalid : TQVariant::nameToType(argument.latin1());
+ if (type != TQVariant::Invalid) {
setVariantType( type );
}
else {
diff --git a/kexi/plugins/macros/lib/metaparameter.h b/kexi/plugins/macros/lib/metaparameter.h
index ab2a4004e..fa9df5528 100644
--- a/kexi/plugins/macros/lib/metaparameter.h
+++ b/kexi/plugins/macros/lib/metaparameter.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_METAPARAMETER_H
#define KOMACRO_METAPARAMETER_H
-#include <qstring.h>
-#include <qvariant.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqvariant.h>
+#include <tqobject.h>
#include <ksharedptr.h>
#include "komacro_export.h"
@@ -34,10 +34,10 @@ namespace KoMacro {
/**
* Class to provide abstract methods for the undocumented
- * Qt3 QUObject-API functionality.
+ * TQt3 TQUObject-API functionality.
*
- * The design tried to limit future porting to Qt4 by providing a
- * somewhat similar API to the Qt4 QMeta* stuff.
+ * The design tried to limit future porting to TQt4 by providing a
+ * somewhat similar API to the TQt4 TQMeta* stuff.
*/
class KOMACRO_EXPORT MetaParameter : public KShared
{
@@ -45,29 +45,29 @@ namespace KoMacro {
/**
* Property to get the type of the variable.
*/
- Q_PROPERTY(Type type READ type)
+ TQ_PROPERTY(Type type READ type)
/**
* Property to get the type of the variable as string.
*/
- Q_PROPERTY(QString typeName READ typeName)
+ TQ_PROPERTY(TQString typeName READ typeName)
public:
/**
* List of @a MetaParameter instances.
*/
- typedef QValueList<KSharedPtr <MetaParameter > > List;
+ typedef TQValueList<KSharedPtr <MetaParameter > > List;
/**
* Constructor.
*
* @param signatureargument The signatures argument
* that will be used to determinate the arguments
- * type. This could be something like "const QString&",
- * "int" or "QMap &lt; QString, QVariant &gt; ".
+ * type. This could be something like "const TQString&",
+ * "int" or "TQMap &lt; TQString, TQVariant &gt; ".
*/
- explicit MetaParameter(const QString& signatureargument = QString::null);
+ explicit MetaParameter(const TQString& signatureargument = TQString());
/**
* Destructor.
@@ -79,8 +79,8 @@ namespace KoMacro {
*/
enum Type {
TypeNone = 0, /// None type, the @a MetaParameter is empty.
- TypeVariant, /// The @a MetaParameter is a QVariant.
- TypeObject /// The @a MetaParameter is a QObject.
+ TypeVariant, /// The @a MetaParameter is a TQVariant.
+ TypeObject /// The @a MetaParameter is a TQObject.
};
/**
@@ -92,7 +92,7 @@ namespace KoMacro {
* @return the @a MetaParameter::Type as string. The typename
* could be "None", "Variant" or "Object".
*/
- const QString typeName() const;
+ const TQString typeName() const;
/**
* Set the @a MetaParameter::Type this variable is.
@@ -102,12 +102,12 @@ namespace KoMacro {
/**
* @return the @a MetaParameter::Type this variable is.
*/
- QVariant::Type variantType() const;
+ TQVariant::Type variantType() const;
/**
* Set the @a MetaParameter::Type this variable is.
*/
- void setVariantType(QVariant::Type varianttype);
+ void setVariantType(TQVariant::Type varianttype);
/**
* @return true if the passed @a Variable @p variable is
@@ -122,7 +122,7 @@ namespace KoMacro {
* @internal used method to set the signature argument. Those
* argument will be used to determinate the arguments type.
*/
- void setSignatureArgument(const QString& signatureargument);
+ void setSignatureArgument(const TQString& signatureargument);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/lib/variable.cpp b/kexi/plugins/macros/lib/variable.cpp
index 598b8b46f..f64613b0c 100644
--- a/kexi/plugins/macros/lib/variable.cpp
+++ b/kexi/plugins/macros/lib/variable.cpp
@@ -37,31 +37,31 @@ namespace KoMacro {
/**
* The name this @a Variable has.
*/
- QString name;
+ TQString name;
/**
* The i18n-caption used for display purposes only
* this @a Variable has.
*/
- QString text;
+ TQString text;
/**
- * If @a Variable::Type is @a Variable::TypeVariant this QVariant
+ * If @a Variable::Type is @a Variable::TypeVariant this TQVariant
* holds the value else it's invalid.
*/
- QVariant variant;
+ TQVariant variant;
/**
- * If @a Variable::Type is @a Variable::TypeObject this QObject is
+ * If @a Variable::Type is @a Variable::TypeObject this TQObject is
* the value else it's NULL.
*/
- const QObject* object;
+ const TQObject* object;
/**
- * Optional list of children this @a Variable has.
+ * Optional list of tqchildren this @a Variable has.
*/
// TODO Dow we use this or is it for the future??
- Variable::List children;
+ Variable::List tqchildren;
/**
* Defines if the variable is enabled or disabled.
@@ -84,7 +84,7 @@ Variable::Variable()
d->object = 0;
}
-Variable::Variable(const QVariant& variant, const QString& name, const QString& text)
+Variable::Variable(const TQVariant& variant, const TQString& name, const TQString& text)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -95,7 +95,7 @@ Variable::Variable(const QVariant& variant, const QString& name, const QString&
d->text = text;
}
-Variable::Variable(const QObject* object)
+Variable::Variable(const TQObject* object)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
@@ -103,28 +103,28 @@ Variable::Variable(const QObject* object)
d->object = object;
}
-Variable::Variable(const QDomElement& element)
+Variable::Variable(const TQDomElement& element)
: MetaParameter()
, d( new Private() ) // create the private d-pointer instance.
{
- QString typesignature = element.attribute("type", "const QString&");
- QString value = element.text();
+ TQString typesignature = element.attribute("type", "const TQString&");
+ TQString value = element.text();
setSignatureArgument( typesignature );
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeVariant") << endl;
// Set the variant without overwritting the previously detected varianttype.
- setVariant( QVariant(value), false );
+ setVariant( TQVariant(value), false );
} break;
case KoMacro::MetaParameter::TypeObject: {
- //kdDebug() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeObject") << endl;
+ //kdDebug() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeObject") << endl;
//TODO setObject();
} break;
default: {
- kdWarning() << QString("KoMacro::Variable(QDomElement) KoMacro::MetaParameter::TypeNone") << endl;
+ kdWarning() << TQString("KoMacro::Variable(TQDomElement) KoMacro::MetaParameter::TypeNone") << endl;
} break;
}
}
@@ -134,35 +134,35 @@ Variable::~Variable()
delete d;
}
-QString Variable::name() const
+TQString Variable::name() const
{
return d->name;
}
-void Variable::setName(const QString& name)
+void Variable::setName(const TQString& name)
{
d->name = name;
}
-QString Variable::text() const
+TQString Variable::text() const
{
return d->text;
}
-void Variable::setText(const QString& text)
+void Variable::setText(const TQString& text)
{
d->text = text;
}
-const QVariant Variable::variant() const
+const TQVariant Variable::variant() const
{
//Q_ASSERT( type() == MetaParameter::TypeVariant );
- //Q_ASSERT( variantType() != QVariant::Invalid );
- //if(variantType() == QVariant::Invalid) return QVariant();
+ //Q_ASSERT( variantType() != TQVariant::Invalid );
+ //if(variantType() == TQVariant::Invalid) return TQVariant();
return d->variant;
}
-void Variable::setVariant(const QVariant& variant, bool detecttype)
+void Variable::setVariant(const TQVariant& variant, bool detecttype)
{
if(detecttype) {
setVariantType( variant.type() );
@@ -170,42 +170,42 @@ void Variable::setVariant(const QVariant& variant, bool detecttype)
d->variant = variant;
}
-const QObject* Variable::object() const
+const TQObject* Variable::object() const
{
Q_ASSERT( ! d->object );
return d->object;
}
-void Variable::setObject(const QObject* object)
+void Variable::setObject(const TQObject* object)
{
setType(TypeObject);
d->object = object;
}
-Variable::operator QVariant () const
+Variable::operator TQVariant () const
{
return variant();
}
-Variable::operator const QObject* () const
+Variable::operator const TQObject* () const
{
return object();
}
-const QString Variable::toString() const
+const TQString Variable::toString() const
{
switch( type() ) {
case KoMacro::MetaParameter::TypeVariant: {
return variant().toString();
} break;
case KoMacro::MetaParameter::TypeObject: {
- return QString("[%1]").arg( object()->name() );
+ return TQString("[%1]").tqarg( object()->name() );
} break;
default: {
throw Exception("Type is undefined.");
} break;
}
- return QString::null;
+ return TQString();
}
int Variable::toInt() const
@@ -213,24 +213,24 @@ int Variable::toInt() const
return variant().toInt();
}
-Variable::List Variable::children() const
+Variable::List Variable::tqchildren() const
{
- return d->children;
+ return d->tqchildren;
}
void Variable::appendChild(KSharedPtr<Variable> variable)
{
- d->children.append(variable);
+ d->tqchildren.append(variable);
}
void Variable::clearChildren()
{
- d->children.clear();
+ d->tqchildren.clear();
}
-void Variable::setChildren(const Variable::List& children)
+void Variable::setChildren(const Variable::List& tqchildren)
{
- d->children = children;
+ d->tqchildren = tqchildren;
}
/*
diff --git a/kexi/plugins/macros/lib/variable.h b/kexi/plugins/macros/lib/variable.h
index 26e9619ee..108a6005e 100644
--- a/kexi/plugins/macros/lib/variable.h
+++ b/kexi/plugins/macros/lib/variable.h
@@ -20,9 +20,9 @@
#ifndef KOMACRO_VARIABLE_H
#define KOMACRO_VARIABLE_H
-#include <qobject.h>
-#include <qdom.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqdom.h>
+#include <tqvariant.h>
#include <ksharedptr.h>
#include "metaparameter.h"
@@ -31,7 +31,7 @@ namespace KoMacro {
/**
* A variable value used to provide abstract access to variables. The
- * class handles QVariant and QObject and provides access to them.
+ * class handles TQVariant and TQObject and provides access to them.
* Variable inherits KShared and implements reference couting. So, it's
* not needed to take care of memory-managment.
*/
@@ -39,31 +39,31 @@ namespace KoMacro {
{
/**
- * Property to get and set a QVariant as variable.
+ * Property to get and set a TQVariant as variable.
*/
- Q_PROPERTY(QVariant variant READ variant WRITE setVariant)
+ TQ_PROPERTY(TQVariant variant READ variant WRITE setVariant)
/**
- * Property to get and set a QObject as variable.
+ * Property to get and set a TQObject as variable.
*/
- Q_PROPERTY(QObject* object READ object WRITE setObject)
+ TQ_PROPERTY(TQObject* object READ object WRITE setObject)
/**
* Property to get a string-representation of the variable.
*/
- Q_PROPERTY(QString string READ toString)
+ TQ_PROPERTY(TQString string READ toString)
public:
/**
* A list of variables.
*/
- typedef QValueList<KSharedPtr<Variable > > List;
+ typedef TQValueList<KSharedPtr<Variable > > List;
/**
* A map of variables.
*/
- typedef QMap<QString, KSharedPtr<Variable > > Map;
+ typedef TQMap<TQString, KSharedPtr<Variable > > Map;
/**
* Default constructor.
@@ -71,28 +71,28 @@ namespace KoMacro {
explicit Variable();
/**
- * Constructor from the QVariant @p variant .
+ * Constructor from the TQVariant @p variant .
*
* @param variant The value this variable has.
* @param name The unique @a name() this variable has.
* @param text The describing @a text() this variable has.
*/
- Variable(const QVariant& variant, const QString& name = QString::null, const QString& text = QString::null);
+ Variable(const TQVariant& variant, const TQString& name = TQString(), const TQString& text = TQString());
/**
- * Constructor from the QObject @p object .
+ * Constructor from the TQObject @p object .
*
* @param object The value this variable has.
*/
- Variable(const QObject* object);
+ Variable(const TQObject* object);
/**
- * Constructor from the QDomElement @p element .
+ * Constructor from the TQDomElement @p element .
* @deprecated replaced with methods of @a XMLHandler.
- * @param element The QDomElement that may optional contains the
+ * @param element The TQDomElement that may optional contains the
* variable content or other additional informations.
*/
- Variable(const QDomElement& element);
+ Variable(const TQDomElement& element);
/**
* Destructor.
@@ -102,69 +102,69 @@ namespace KoMacro {
/**
* @return the name this @a Variable has.
*/
- QString name() const;
+ TQString name() const;
/**
* Set the name @param name this @a Variable has.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* @return the caption this @a Variable has.
*/
- QString text() const;
+ TQString text() const;
/**
* Set the caption @param text this @a Variable has.
*/
- void setText(const QString& text);
+ void setText(const TQString& text);
/**
- * Set the QObject @param object this variable has. A
+ * Set the TQObject @param object this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeObject .
*/
- void setObject(const QObject* object);
+ void setObject(const TQObject* object);
/**
- * @return the QVariant this variable has. If this
- * variable isn't a @a TypeVariant an invalid QVariant
+ * @return the TQVariant this variable has. If this
+ * variable isn't a @a TypeVariant an invalid TQVariant
* got returned.
*/
- const QVariant variant() const;
+ const TQVariant variant() const;
/**
- * Set the QVariant @param variant this variable has. A
+ * Set the TQVariant @param variant this variable has. A
* previously remembered value will be overwritten and
* the new type is a @a TypeVariant . If @param detecttype is
* true the method tries to set the @a variantType according
- * to the passed QVariant. If false the variantType won't
+ * to the passed TQVariant. If false the variantType won't
* be changed.
*/
- void setVariant(const QVariant& variant, bool detecttype = true);
+ void setVariant(const TQVariant& variant, bool detecttype = true);
/**
- * @return the QObject this variable has. If this
+ * @return the TQObject this variable has. If this
* variable isn't a @a TypeObject NULL got returned.
*/
- const QObject* object() const;
+ const TQObject* object() const;
/**
- * Implicit conversion to QVariant operator. This method
+ * Implicit conversion to TQVariant operator. This method
* calls @a variant() internaly.
*/
- operator QVariant () const;
+ operator TQVariant () const;
/**
- * Implicit conversion to QObject operator. This method
+ * Implicit conversion to TQObject operator. This method
* calls @a object() internaly.
*/
- operator const QObject* () const;
+ operator const TQObject* () const;
/**
* @return a string-represenation of the variable.
*/
- const QString toString() const;
+ const TQString toString() const;
/**
* @return a integer-represenation of the variable.
@@ -173,29 +173,29 @@ namespace KoMacro {
/**
* @return the optional list of @a Variable instances
- * that are children of this @a Variable .
+ * that are tqchildren of this @a Variable .
*
* @note that the list is returned call-by-reference. The
* list is accessed as getter/setter (read/write). So,
* don't set this method to const!
*/
- List children() const;
+ List tqchildren() const;
/**
- * Append a @a Variable to the list of children this
+ * Append a @a Variable to the list of tqchildren this
* @a Variable has.
*/
void appendChild(KSharedPtr<Variable> variable);
/**
- * Clear the list of children this @a Variable has.
+ * Clear the list of tqchildren this @a Variable has.
*/
void clearChildren();
/**
- * Set the children this @a Variable has.
+ * Set the tqchildren this @a Variable has.
*/
- void setChildren(const List& children);
+ void setChildren(const List& tqchildren);
#if 0
/**
diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp
index b35759e1d..4894c6190 100644
--- a/kexi/plugins/macros/lib/xmlhandler.cpp
+++ b/kexi/plugins/macros/lib/xmlhandler.cpp
@@ -22,7 +22,7 @@
#include "macroitem.h"
#include "action.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -67,7 +67,7 @@ XMLHandler::~XMLHandler()
delete d;
}
-bool XMLHandler::parseXML(const QDomElement& element)
+bool XMLHandler::parseXML(const TQDomElement& element)
{
// Remove old items. We should clear first.
d->macro->clearItems();
@@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const QDomElement& element)
// We expect a <macro> element. Do we really need to be such strict or
// would it be more wise to trust the application in that case?
if(element.tagName() != "macro") {
- kdDebug() << QString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl;
return false;
}
@@ -83,20 +83,20 @@ bool XMLHandler::parseXML(const QDomElement& element)
// If there is more than one version, parsing should update old macro-data, so that it
// could write out in the newer version in toXML().
if( element.attribute("xmlversion") != "1"){
- kdDebug() << QString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl;
return false;
}
// Do we need to load the macro's name?
// d->macro->setName(element.attribute("name"));
- // Iterate through the child nodes the passed QDomElement has and
+ // Iterate through the child nodes the passed TQDomElement has and
// build the MacroItem elements.
- for(QDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
+ for(TQDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
// The tagname should be "item"
if(itemnode.nodeName() == "item") {
// The node is an element.
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
// Create a new MacroItem
KSharedPtr<MacroItem> item = new MacroItem();
@@ -115,18 +115,18 @@ bool XMLHandler::parseXML(const QDomElement& element)
// Set the comment
item->setComment( itemelem.attribute("comment") );
- // Iterate through the children this item has and try
+ // Iterate through the tqchildren this item has and try
// to fill the list of variables our new MacroItem has.
- for(QDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
+ for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
// The tagname should be "variable"
if(childnode.nodeName() == "variable") {
// The node is an element.
- const QDomElement childelem = childnode.toElement();
+ const TQDomElement childelem = childnode.toElement();
// The name the variable has.
- const QString name = childelem.attribute("name");
+ const TQString name = childelem.attribute("name");
// The value the variable has.
- const QString value = childelem.text();
+ const TQString value = childelem.text();
// Store the new variable in our macroitem.
item->addVariable(name, value);
@@ -139,13 +139,13 @@ bool XMLHandler::parseXML(const QDomElement& element)
return true;
}
-QDomElement XMLHandler::toXML()
+TQDomElement XMLHandler::toXML()
{
- // The QDomDocument provides us the functionality to create new QDomElement instances.
- QDomDocument document;
+ // The TQDomDocument provides us the functionality to create new TQDomElement instances.
+ TQDomDocument document;
- // Create the Macro-QDomElement. This element will be returned.
- QDomElement macroelem = document.createElement("macro");
+ // Create the Macro-TQDomElement. This element will be returned.
+ TQDomElement macroelem = document.createElement("macro");
// Set the Macro-XML-Version, it should be the newest Version.
macroelem.setAttribute("xmlversion","1");
@@ -156,12 +156,12 @@ QDomElement XMLHandler::toXML()
// redundancy at this point.
//macroelem.setAttribute("name",d->macro->name());
- // The list of MacroItem-children a Macro provides.
- QValueList<KSharedPtr<MacroItem > > items = d->macro->items();
+ // The list of MacroItem-tqchildren a Macro provides.
+ TQValueList<KSharedPtr<MacroItem > > items = d->macro->items();
// Create an iterator...
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
- // ...and iterate over the list of children the Macro provides.
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
+ // ...and iterate over the list of tqchildren the Macro provides.
for(;it != end; ++it) {
// We are iterating over MacroItem instances.
KSharedPtr<MacroItem> item = *it;
@@ -171,7 +171,7 @@ QDomElement XMLHandler::toXML()
bool append = false;
// Each MacroItem will have an own node.
- QDomElement itemelem = document.createElement("item");
+ TQDomElement itemelem = document.createElement("item");
// Each MacroItem could point to an Action provided by the Manager.
const KSharedPtr<Action> action = item->action();
@@ -184,9 +184,9 @@ QDomElement XMLHandler::toXML()
// Each MacroItem could have a list of variables. We
// iterate through that list and build a element
// for each single variable.
- QMap<QString, KSharedPtr<Variable > > varmap = item->variables();
+ TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables();
- for(QMap<QString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
+ for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
const KSharedPtr<Variable> v = vit.data();
if(! v.data()) {
// skip if the variable is NULL.
@@ -194,7 +194,7 @@ QDomElement XMLHandler::toXML()
}
// Create an own element for the variable. The tagname will be
// the name of the variable.
- QDomElement varelement = document.createElement("variable");
+ TQDomElement varelement = document.createElement("variable");
// Remember the name the value has.
varelement.setAttribute("name", vit.key());
@@ -208,7 +208,7 @@ QDomElement XMLHandler::toXML()
}
// Each MacroItem could have an optional comment.
- const QString comment = item->comment();
+ const TQString comment = item->comment();
if(! comment.isEmpty()) {
append = true;
itemelem.setAttribute("comment", item->comment());
diff --git a/kexi/plugins/macros/lib/xmlhandler.h b/kexi/plugins/macros/lib/xmlhandler.h
index b6978d0fd..c6ee0c266 100644
--- a/kexi/plugins/macros/lib/xmlhandler.h
+++ b/kexi/plugins/macros/lib/xmlhandler.h
@@ -22,8 +22,8 @@
#include "komacro_export.h"
-class QObject;
-class QDomElement;
+class TQObject;
+class TQDomElement;
namespace KoMacro {
@@ -51,20 +51,20 @@ namespace KoMacro {
~XMLHandler();
/**
- * Reads a given @a QDomElement, extracts given
+ * Reads a given @a TQDomElement, extracts given
* Actions into the managed Macro-Instance.
- * @param element The @a QDomElement within
+ * @param element The @a TQDomElement within
* the @a Macro.
* @return Return true when parsing is successfull.
*/
- bool parseXML(const QDomElement& element);
+ bool parseXML(const TQDomElement& element);
/**
- * Converts the macro to a @a QDomElement.
- * @return The resulten @a QDomElement from
+ * Converts the macro to a @a TQDomElement.
+ * @return The resulten @a TQDomElement from
* the @a Macro.
*/
- QDomElement toXML();
+ TQDomElement toXML();
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp
index 0150ecfd7..65bebe663 100644
--- a/kexi/plugins/macros/tests/actiontests.cpp
+++ b/kexi/plugins/macros/tests/actiontests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,16 +66,16 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
- QValueList< KSharedPtr<KoMacro::MacroItem> > items;
+ TQValueList< KSharedPtr<KoMacro::MacroItem> > items;
KSharedPtr<KoMacro::Action> actionptr;
@@ -90,7 +90,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
ActionTests::ActionTests()
@@ -117,9 +117,9 @@ void ActionTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -147,7 +147,7 @@ void ActionTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- //QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( d->items.count(), sizetype(0) );
@@ -169,14 +169,14 @@ void ActionTests::testText()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
- const QString leetSpeech = "']['3 $']['";
+ const TQString leetSpeech = "']['3 $']['";
//check i18n text
- KOMACROTEST_ASSERT(d->actionptr->text(),QString("Test"));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString("Test"));
//change it
d->actionptr->setText(leetSpeech);
//retest it
- KOMACROTEST_ASSERT(d->actionptr->text(),QString(leetSpeech));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString(leetSpeech));
}
@@ -187,11 +187,11 @@ void ActionTests::testName()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check name
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("testaction"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction"));
//change it
d->actionptr->setName("ActionJackson");
//retest it
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("ActionJackson"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("ActionJackson"));
}
void ActionTests::testComment()
@@ -201,11 +201,11 @@ void ActionTests::testComment()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check comment
- KOMACROTEST_XASSERT(d->actionptr->comment(),QString("No Comment!"));
+ KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!"));
//set comment
d->actionptr->setComment("Stringtest");
//check comment again
- KOMACROTEST_ASSERT(d->actionptr->comment(),QString("Stringtest"));
+ KOMACROTEST_ASSERT(d->actionptr->comment(),TQString("Stringtest"));
}
#include "actiontests.moc"
diff --git a/kexi/plugins/macros/tests/actiontests.h b/kexi/plugins/macros/tests/actiontests.h
index 48b5a2525..07cf89580 100644
--- a/kexi/plugins/macros/tests/actiontests.h
+++ b/kexi/plugins/macros/tests/actiontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class ActionTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index 84c596aa6..1086a340b 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -36,8 +36,8 @@
#include <ostream>
#include <climits>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -71,14 +71,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
/**
* Constructor.
@@ -94,7 +94,7 @@ namespace KoMacroTest {
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
CommonTests::CommonTests()
: KUnitTest::SlotTester()
@@ -119,9 +119,9 @@ void CommonTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
@@ -146,14 +146,14 @@ void CommonTests::testManager()
//check if manager-guiClient equals xmlguiclient
KOMACROTEST_ASSERT( ::KoMacro::Manager::self()->guiClient(), d->xmlguiclient );
//check if manger-object equals testobject
- KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (QObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
+ KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (TQObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
}
/*
void CommonTests::testAction()
{
- const QString testString = "teststring";
- const QString testInt = "testint";
- const QString testBool = "testbool";
+ const TQString testString = "teststring";
+ const TQString testInt = "testint";
+ const TQString testBool = "testbool";
//TODO: CLEANUP!!!!!!
//TODO: test manipulation of action and macroitem and context.
@@ -162,7 +162,7 @@ void CommonTests::testAction()
//Publish TestAction for the first time.
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
@@ -173,7 +173,7 @@ void CommonTests::testAction()
macro->execute(this);
//create list of KSharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
@@ -188,7 +188,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
//fetch the "testint"-variable
variableptr = actionptr->variable("testint");
@@ -209,7 +209,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
actionptr->setVariable("testint","INTTEST",INT_MAX);
variableptr = actionptr->variable("testint");
@@ -234,7 +234,7 @@ void CommonTests::testAction()
macroitem->setVariable("teststring", "TeStString");
variableptr = macroitem->variable("teststring");
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
macroitem->setVariable("testint",INT_MIN);
variableptr = macroitem->variable("testint");
@@ -249,8 +249,8 @@ void CommonTests::testAction()
//commontests.cpp: In member function 'void KoMacroTest::CommonTests::testAction()':
//commontests.cpp:249: error: call of overloaded 'setVariable(const char [8], int)' is ambiguous
- //../lib/macroitem.h:131: note: candidates are: QStringList KoMacro::MacroItem::setVariable(const QString&, KSharedPtr<KoMacro::Variable>)
- //../lib/macroitem.h:137: note: QStringList KoMacro::MacroItem::setVariable(const QString&, const QVariant&)
+ //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>)
+ //../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&)
macroitem->setVariable("testint",(int) 0);
variableptr = macroitem->variable("testint");
@@ -286,14 +286,14 @@ void CommonTests::testXmlhandler()
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomElement domelement;
+ TQDomElement domelement;
// Save old doomdocument
- QString xmlOld = d->doomdocument->toString();
+ TQString xmlOld = d->doomdocument->toString();
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- QString xml = QString("<!DOCTYPE macros>"
+ TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -310,7 +310,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// Test-XML-document with bad root element.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -324,7 +324,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),false);
// Test-XML-document with wrong macro-xmlversion.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -339,7 +339,7 @@ void CommonTests::testXmlhandler()
// TODO Test-XML-document if it has a wrong structure like wrong parathesis
// or missing end tag (is this critical??).
- /*xml = QString("<!DOCTYPE macros>"
+ /*xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -353,7 +353,7 @@ void CommonTests::testXmlhandler()
// Test-XML-document with wrong item- and variable-tags.
// TODO Could this happen??
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<iem action=\"testaction\" >"
"<vle name=\"teststring\" >testString</variable>"
@@ -367,7 +367,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true); //should be false?
// TODO Test-XML-document with maximum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -381,7 +381,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// TODO Test-XML-document with minimum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -410,21 +410,21 @@ void CommonTests::testFunction()
/*
kdDebug()<<"===================== testFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create some data
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver = "TestObject";
- QString const argument1 = "Some string";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver = "TestObject";
+ TQString const argument1 = "Some string";
int const argument2 = 12345;
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>" + argument1 + "</argument>"
- "<argument>" + QString("%1").arg(argument2) + "</argument>"
+ "<argument>" + TQString("%1").tqarg(argument2) + "</argument>"
"</function>"
));
@@ -438,7 +438,7 @@ void CommonTests::testFunction()
//check domElement
KOMACROTEST_ASSERT( func->domElement(), domdocument.documentElement() );
//check name
- KOMACROTEST_ASSERT( QString(func->name()), name );
+ KOMACROTEST_ASSERT( TQString(func->name()), name );
//check text
KOMACROTEST_ASSERT( func->text(), text );
//check comment
@@ -446,7 +446,7 @@ void CommonTests::testFunction()
//check receiver
KOMACROTEST_ASSERT( func->receiver(), receiver );
//check slot (arguments)
- KOMACROTEST_ASSERT( QString(func->slot()), QString("myslot(const QString&,int)") );
+ KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") );
//create KoMacro-MetaObject from receiverObject
KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
@@ -466,14 +466,14 @@ void CommonTests::testFunction()
for( it = funcvariables.constBegin(); it != end; ++it) {
kdDebug() << "VARIABLE => " << (*it ? (*it)->toString() : "<NULL>") << endl;
//hardcoded test:
- // firstrun we have a QString, secondrun we have an int
+ // firstrun we have a TQString, secondrun we have an int
switch(i) {
case 0: { // returnvalue
KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL));
} break;
case 1: { // first parameter
//check first variable of func is the same as argument1
- //QString const argument1 = "Some string";
+ //TQString const argument1 = "Some string";
KOMACROTEST_ASSERT((*it)->toString(), argument1);
} break;
case 2: { // second parameter
@@ -497,10 +497,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
//check that it is not null
KOMACROTEST_XASSERT((int) stringvar.data(),0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( stringvar->type(), KoMacro::MetaParameter::TypeVariant );
//check via metaparameter that variant is from type string
- KOMACROTEST_ASSERT( stringvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( stringvar->variantType(), TQVariant::String );
//chech that stringvar equals argument1
KOMACROTEST_ASSERT( stringvar->toString(), argument1 );
@@ -508,10 +508,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> intvar = funcvariables[2];
//check that it is not null
KOMACROTEST_XASSERT((int) intvar.data(), 0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( intvar->type(), KoMacro::MetaParameter::TypeVariant );
//check that intvar is An String -> we create an string from int because of xml
- KOMACROTEST_ASSERT( intvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( intvar->variantType(), TQVariant::String );
//check that intvar equals argument2
KOMACROTEST_ASSERT( intvar->toInt(), argument2 );
@@ -522,7 +522,7 @@ void CommonTests::testFunction()
//check returnvalue
//func->setReturnValue(new KoMacro::Variable("54321"));
- //KOMACROTEST_ASSERT( func->returnValue()->toString(), QString("54321") );
+ //KOMACROTEST_ASSERT( func->returnValue()->toString(), TQString("54321") );
*/
}
@@ -532,12 +532,12 @@ void CommonTests::testIntFunction()
/*
kdDebug()<<"===================== testIntFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -552,7 +552,7 @@ void CommonTests::testIntFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12345"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12345"));
*/
}
@@ -562,12 +562,12 @@ void CommonTests::testDoubleFunction()
/*
kdDebug()<<"===================== testDoubleFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , double)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , double)\">"
"<argument>Some string</argument>"
"<argument>12.56</argument>"
"</function>"
@@ -582,22 +582,22 @@ void CommonTests::testDoubleFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12.56"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12.56"));
*/
}
-void CommonTests::testQStringFunction()
+void CommonTests::testTQStringFunction()
{
//TODO: CLEANUP!!!!!!
/*
- kdDebug()<<"===================== testQStringFunction() ======================" << endl;
+ kdDebug()<<"===================== testTQStringFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
"<argument>Some string</argument>"
"</function>"
));
@@ -610,7 +610,7 @@ void CommonTests::testQStringFunction()
KOMACROTEST_XASSERT((int) func, 0);
//execute the function func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("Some string"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("Some string"));
*/
}
@@ -619,20 +619,20 @@ void CommonTests::testMacro()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
-// //create a QDomDocument
-// QDomDocument domdocument = QDomDocument();
+// //create a TQDomDocument
+// TQDomDocument domdocument = TQDomDocument();
//
// //Fully fleged content this time with macro,function and action
-// domdocument.setContent(QString(
+// domdocument.setContent(TQString(
// "<macro name=\"mymacro\" icon=\"myicon\" text=\"My Macro\" comment=\"Some comment to describe the Macro.\">"
// "<action name=\"myaction\" text=\"My Action\" comment=\"Just some comment\" />"
-// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
// "<argument>The myfunc argument string</argument>"
// "</function>"
// "</macro>"
@@ -647,21 +647,21 @@ void CommonTests::testMacro()
//check that domeElement given to manager is the sam as in the macro
// KOMACROTEST_ASSERT( macro->toXML(), d->doomdocument->documentElement() );
//check the name
- KOMACROTEST_ASSERT( QString(macro->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro->name()), TQString("testMacro") );
/**
@deprecated values no longer exist
//check the text
- KOMACROTEST_ASSERT( macro->text(), QString("My Macro") );
+ KOMACROTEST_ASSERT( macro->text(), TQString("My Macro") );
//check iconname
- KOMACROTEST_ASSERT( QString(macro->icon()), QString("myicon") );
+ KOMACROTEST_ASSERT( TQString(macro->icon()), TQString("myicon") );
//check comment
- KOMACROTEST_ASSERT( macro->comment(), QString("Some comment to describe the Macro.") );
+ KOMACROTEST_ASSERT( macro->comment(), TQString("Some comment to describe the Macro.") );
*/
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
@@ -670,14 +670,14 @@ void CommonTests::testMacro()
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//check that it has the right comment
-// KOMACROTEST_ASSERT( actionptr->comment(), QString("") );
+// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -685,16 +685,16 @@ void CommonTests::testMacro()
KOMACROTEST_XASSERT((int) myfunc, 0);
//check it?s name
- KOMACROTEST_ASSERT( QString(myfunc->name()), QString("myfunc"));
+ KOMACROTEST_ASSERT( TQString(myfunc->name()), TQString("myfunc"));
//check it?s text
- KOMACROTEST_ASSERT( myfunc->text(), QString("My Function") );
+ KOMACROTEST_ASSERT( myfunc->text(), TQString("My Function") );
//check it?s comment
- KOMACROTEST_ASSERT( myfunc->comment(), QString("Describe what the function does") );
+ KOMACROTEST_ASSERT( myfunc->comment(), TQString("Describe what the function does") );
//check it?s receiver object
- KOMACROTEST_ASSERT( myfunc->receiver(), QString("TestObject") );
+ KOMACROTEST_ASSERT( myfunc->receiver(), TQString("TestObject") );
//check it?s slot
- KOMACROTEST_ASSERT( myfunc->slot(), QString("myslot(const QString&)") );
+ KOMACROTEST_ASSERT( myfunc->slot(), TQString("myslot(const TQString&)") );
//exceute it
myfunc->activate();
@@ -712,8 +712,8 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0);
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
- //create a list of the children from yanMacro
- //QValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //create a list of the tqchildren from yanMacro
+ //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -722,9 +722,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr2);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -735,9 +735,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr3);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -752,18 +752,18 @@ void CommonTests::testDom() {
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testDom() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data for various documents
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver1 = "TestObject";
- QString const receiver2 = "GibtsNich";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver1 = "TestObject";
+ TQString const receiver2 = "GibtsNich";
//create wrong Argument tag
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<Arg0ment>Some string</Arg0ment>"
"<Arg0ment>12345</Arg0ment>"
"</function>"
@@ -774,8 +774,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong receiver
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -786,8 +786,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create "wrong" number of parameters
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -799,8 +799,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong function tag
- domdocument.setContent(QString(
- "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -810,7 +810,7 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ));
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function name=\"\" text=\"\" comment=\"\" receiver=\"\" slot=\"\">"
"<argument> </argument>"
"<argument> </argument>"
@@ -824,7 +824,7 @@ void CommonTests::testDom() {
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function>"
"</function>"
));
@@ -840,12 +840,12 @@ void CommonTests::testVariables()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testVariables() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<macro name=\"mymacro123\" text=\"My Macro 123\">"
- "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\" >"
+ "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\" >"
"<argument>$MyArgumentVariable</argument>"
"<return>$MyReturnVariable</return>"
"</function>"
@@ -859,12 +859,12 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
- //create a list of its children
- QValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
- //Check that there are two children. The first child is always the returnvalue.
- KOMACROTEST_ASSERT( children.count(), uint(2) );
- //fetch the children
- KSharedPtr<KoMacro::Action> func1ptr = children[1];
+ //create a list of its tqchildren
+ TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren();
+ //Check that there are two tqchildren. The first child is always the returnvalue.
+ KOMACROTEST_ASSERT( tqchildren.count(), uint(2) );
+ //fetch the tqchildren
+ KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1];
//create new context
KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
@@ -877,7 +877,7 @@ void CommonTests::testVariables()
}
{
- //set variable to be a QString
+ //set variable to be a TQString
context->setVariable("$MyArgumentVariable", new KoMacro::Variable("Some string"));
//execute function
func1ptr->activate(context);
@@ -886,7 +886,7 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is "Some String"
- KOMACROTEST_ASSERT(returnvariable->toString(),QString("Some string"));
+ KOMACROTEST_ASSERT(returnvariable->toString(),TQString("Some string"));
}
{
diff --git a/kexi/plugins/macros/tests/commontests.h b/kexi/plugins/macros/tests/commontests.h
index a3199ce29..0480c0221 100644
--- a/kexi/plugins/macros/tests/commontests.h
+++ b/kexi/plugins/macros/tests/commontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class CommonTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -88,9 +89,9 @@ namespace KoMacroTest {
void testDoubleFunction();
/**
- * Test the @a KoMacro::Function functionality with a QString.
+ * Test the @a KoMacro::Function functionality with a TQString.
*/
- void testQStringFunction();
+ void testTQStringFunction();
/**
* Test the @a KoMacro::Macro functionality.
diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h
index d423e0864..e301730df 100644
--- a/kexi/plugins/macros/tests/komacrotestbase.h
+++ b/kexi/plugins/macros/tests/komacrotestbase.h
@@ -27,11 +27,11 @@
*/
#define KOMACROTEST_ASSERT(actual, expected) \
{ \
- std::cout << QString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, expected, false ); \
if(actual != expected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -44,11 +44,11 @@
*/
#define KOMACROTEST_XASSERT(actual, notexpected) \
{ \
- std::cout << QString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \
if(actual == notexpected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -70,11 +70,11 @@
setExceptionRaised(true); \
} \
if(exceptionRaised()) { \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #expression); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #expression); \
setExceptionRaised(false); \
} \
else { \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw an exception on: ") + #expression); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw an exception on: ") + #expression); \
return; \
} \
}
@@ -84,7 +84,7 @@
//Used more tha once at various places
//names of variables from testaction
namespace KoMacroTest {
- static const QString TESTSTRING = "teststring";
- static const QString TESTINT = "testint";
- static const QString TESTBOOL = "testbool";
+ static const TQString TESTSTRING = "teststring";
+ static const TQString TESTINT = "testint";
+ static const TQString TESTBOOL = "testbool";
}
diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp
index 366318e17..47b93b0fc 100644
--- a/kexi/plugins/macros/tests/macroitemtests.cpp
+++ b/kexi/plugins/macros/tests/macroitemtests.cpp
@@ -32,8 +32,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,12 +64,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroitemTests::MacroitemTests()
: KUnitTest::SlotTester()
@@ -108,9 +108,9 @@ void MacroitemTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -136,7 +136,7 @@ void MacroitemTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -148,7 +148,7 @@ void MacroitemTests::testMacroItemString()
kdDebug()<<"===================== testMacroItemString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
@@ -167,7 +167,7 @@ void MacroitemTests::testMacroItemString()
macroitem->setVariable(TESTSTRING, "TeStString");
variableptr = macroitem->variable(TESTSTRING);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
//secondway for appending an macroitem
@@ -185,7 +185,7 @@ void MacroitemTests::testMacroItemInt()
kdDebug()<<"===================== testMacroItemInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
@@ -204,7 +204,7 @@ void MacroitemTests::testMacroItemInt()
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(-1));
- macroitem->setVariable(TESTINT,QVariant(0));
+ macroitem->setVariable(TESTINT,TQVariant(0));
variableptr = macroitem->variable(TESTINT);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(0));
@@ -226,7 +226,7 @@ void MacroitemTests::testMacroItemBool()
kdDebug()<<"===================== testMacroItemBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
diff --git a/kexi/plugins/macros/tests/macroitemtests.h b/kexi/plugins/macros/tests/macroitemtests.h
index 3e44eebda..7ec3625c9 100644
--- a/kexi/plugins/macros/tests/macroitemtests.h
+++ b/kexi/plugins/macros/tests/macroitemtests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroitemTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp
index ed222df2e..45f77efd6 100644
--- a/kexi/plugins/macros/tests/macrotests.cpp
+++ b/kexi/plugins/macros/tests/macrotests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,14 +64,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
Private()
: xmlguiclient(0)
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroTests::MacroTests()
@@ -112,9 +112,9 @@ void MacroTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -134,7 +134,7 @@ void MacroTests::testMacro()
{
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
@@ -150,8 +150,8 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT(macro1->name(), macro2->name() );
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
//check that there is one
KOMACROTEST_XASSERT( items1.count(), sizetype(0) );
@@ -161,16 +161,16 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT( items1.count(), items2.count() );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("testMacro") );
{
- const QString tmp1 = QString("test");
+ const TQString tmp1 = TQString("test");
macro1->setName(tmp1);
//check the name changed
- KOMACROTEST_XASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_XASSERT( TQString(macro1->name()), TQString("testMacro") );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("test") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("test") );
}
//fetch the first one
@@ -178,9 +178,9 @@ void MacroTests::testMacro()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//try to clear items
macro1->clearItems();
diff --git a/kexi/plugins/macros/tests/macrotests.h b/kexi/plugins/macros/tests/macrotests.h
index ed8d0f218..4a7c20431 100644
--- a/kexi/plugins/macros/tests/macrotests.h
+++ b/kexi/plugins/macros/tests/macrotests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp
index 4063aa1bb..845acd5ff 100644
--- a/kexi/plugins/macros/tests/testaction.cpp
+++ b/kexi/plugins/macros/tests/testaction.cpp
@@ -33,17 +33,17 @@ using namespace KoMacroTest;
TestAction::TestAction()
: KoMacro::Action("testaction", "Test")
{
- setVariable("teststring", "Stringtest", QString("testString"));
+ setVariable("teststring", "Stringtest", TQString("testString"));
setVariable("testint", "Inttest", int(0));
setVariable("testdouble", "Doubletest", double(0.5));
- setVariable("testbool", "Booltest", QVariant(true,0));
+ setVariable("testbool", "Booltest", TQVariant(true,0));
}
TestAction::~TestAction()
{
}
-bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
Q_UNUSED(macroitem);
Q_UNUSED(name);
@@ -53,7 +53,7 @@ bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
void TestAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl;
- const QString teststring = context->variable("teststring")->variant().toString();
+ const TQString teststring = context->variable("teststring")->variant().toString();
const int testint = context->variable("testint")->variant().toInt();
const bool testbool = context->variable("testbool")->variant().toBool();
}
diff --git a/kexi/plugins/macros/tests/testaction.h b/kexi/plugins/macros/tests/testaction.h
index 9eebff3c8..9c045e3d9 100644
--- a/kexi/plugins/macros/tests/testaction.h
+++ b/kexi/plugins/macros/tests/testaction.h
@@ -39,6 +39,7 @@ namespace KoMacroTest {
class TestAction : public KoMacro::Action
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KoMacroTest {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp
index 39cadb7ac..e0db481e6 100644
--- a/kexi/plugins/macros/tests/testobject.cpp
+++ b/kexi/plugins/macros/tests/testobject.cpp
@@ -25,8 +25,8 @@
//#include "../lib/macro.h"
//#include "../lib/metaobject.h"
-//#include <qstringlist.h>
-//#include <qdom.h>
+//#include <tqstringlist.h>
+//#include <tqdom.h>
#include <kdebug.h>
//#include <kxmlguiclient.h>
@@ -57,7 +57,7 @@ namespace KoMacroTest {
}
TestObject::TestObject(KUnitTest::Tester* const tester)
- : QObject()
+ : TQObject()
, d( new Private(tester) ) // create the private d-pointer instance.
{
setName("TestObject");
@@ -71,18 +71,18 @@ TestObject::~TestObject()
//testObject without arguments
void TestObject::myslot()
{
- QString s = "CALLED => TestObject::myslot()";
+ TQString s = "CALLED => TestObject::myslot()";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults see tester.h
d->tester->results()->addDebugInfo(s);
}
-//testobject with QString and int argument
+//testobject with TQString and int argument
//int is returnvalue
-int TestObject::myslot(const QString&, int i)
+int TestObject::myslot(const TQString&, int i)
{
- QString s = "CALLED => TestObject::myslot(const QString&, int)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, int)";
//be loud
kdDebug() << s << endl;
//add some extra debuginfos to TestResults
@@ -90,11 +90,11 @@ int TestObject::myslot(const QString&, int i)
return i;
}
-//testobject with QString argument
-//QString is returnvalue
-QString TestObject::myslot(const QString& s)
+//testobject with TQString argument
+//TQString is returnvalue
+TQString TestObject::myslot(const TQString& s)
{
- QString t = QString("CALLED => TestObject::myslot(const QString& s) s=%1").arg(s);
+ TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s);
//be loud
kdDebug() << t << endl;
//add some extra Debuginfos to TestResults
@@ -102,11 +102,11 @@ QString TestObject::myslot(const QString& s)
return s;
}
-//testobject with QString and double argument
+//testobject with TQString and double argument
//double is returnvalue
-double TestObject::myslot(const QString&, double d)
+double TestObject::myslot(const TQString&, double d)
{
- QString s = "CALLED => TestObject::myslot(const QString&, double)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, double)";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults
diff --git a/kexi/plugins/macros/tests/testobject.h b/kexi/plugins/macros/tests/testobject.h
index da5e8ae2f..87bed8370 100644
--- a/kexi/plugins/macros/tests/testobject.h
+++ b/kexi/plugins/macros/tests/testobject.h
@@ -20,18 +20,19 @@
#ifndef KOMACROTEST_TESTOBJECT_H
#define KOMACROTEST_TESTOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kunittest/tester.h>
namespace KoMacroTest {
/**
* The TestObject class is used to test handling and communication
- * of external from QObject inheritated classes.
+ * of external from TQObject inheritated classes.
*/
- class TestObject : public QObject
+ class TestObject : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -59,20 +60,20 @@ namespace KoMacroTest {
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- int myslot(const QString&, int);
+ int myslot(const TQString&, int);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- QString myslot(const QString&);
+ TQString myslot(const TQString&);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
* @return is @param d
*/
- double myslot(const QString&, double d);
+ double myslot(const TQString&, double d);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp
index 8bc8d9c75..5035f9294 100644
--- a/kexi/plugins/macros/tests/variabletests.cpp
+++ b/kexi/plugins/macros/tests/variabletests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,12 +66,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -85,7 +85,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
/******************************************************************************
* This is an xtra big TODO:
@@ -117,9 +117,9 @@ void VariableTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -144,7 +144,7 @@ void VariableTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -152,7 +152,7 @@ void VariableTests::testMacro()
void VariableTests::testVariableString() {
kdDebug()<<"===================== testVariableString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "teststring"-variable
@@ -173,19 +173,19 @@ void VariableTests::testVariableString() {
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is "testString"
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
actionptr->setVariable("teststring", "STRINGTEST", "TestString");
variableptr = actionptr->variable("teststring");
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
}
void VariableTests::testVariableInt() {
kdDebug()<<"===================== testVariableInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testint"-variable
@@ -218,7 +218,7 @@ void VariableTests::testVariableInt() {
void VariableTests::testVariableBool() {
kdDebug()<<"===================== testVariableBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testbool"-variable
diff --git a/kexi/plugins/macros/tests/variabletests.h b/kexi/plugins/macros/tests/variabletests.h
index 5bc7f1443..a3cd7f60d 100644
--- a/kexi/plugins/macros/tests/variabletests.h
+++ b/kexi/plugins/macros/tests/variabletests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class VariableTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 9a0ebcb1d..a08ff33d5 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -58,7 +58,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -144,11 +144,11 @@ void XMLHandlerTests::testCorrectDomElement()
{
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -159,12 +159,12 @@ void XMLHandlerTests::testCorrectDomElement()
"</macro>");
// Set the XML-document with the above string.
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Is our XML parseable by calling parseXML()?
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
// Is the parsen content in the Macro correct ?
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -172,12 +172,12 @@ void XMLHandlerTests::testCorrectDomElement()
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
// Transform back by calling toXML().
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
// Test the Compare-method when a Variable will change, it must fail.
macro->items().first()->variable("teststring")->setVariant("bla");
- isvariableok.replace("teststring",false);
+ isvariableok.tqreplace("teststring",false);
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
}
@@ -185,9 +185,9 @@ void XMLHandlerTests::testCorrectDomElement()
void XMLHandlerTests::testBadRoot()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -197,23 +197,23 @@ void XMLHandlerTests::testBadRoot()
"</item>"
"</maro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 3.Test - XML-document with a missing Variable.
void XMLHandlerTests::testMissingVariable()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -222,16 +222,16 @@ void XMLHandlerTests::testMissingVariable()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -239,9 +239,9 @@ void XMLHandlerTests::testMissingVariable()
void XMLHandlerTests::testMoreVariables()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -252,10 +252,10 @@ void XMLHandlerTests::testMoreVariables()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -263,7 +263,7 @@ void XMLHandlerTests::testMoreVariables()
isvariableok["testbla"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -271,9 +271,9 @@ void XMLHandlerTests::testMoreVariables()
void XMLHandlerTests::testWrongVersion()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -283,14 +283,14 @@ void XMLHandlerTests::testWrongVersion()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 6.Test - XML-document if it has a wrong structure like wrong parathesis
@@ -298,9 +298,9 @@ void XMLHandlerTests::testWrongVersion()
void XMLHandlerTests::testWrongXMLStruct()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"macro xmlversion=\"1\">>"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -308,23 +308,23 @@ void XMLHandlerTests::testWrongXMLStruct()
"</item>"
"</macro>");
KOMACROTEST_XASSERT(doomdocument.setContent(xml),true);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 7.Test-XML-document with maximum field-size.
void XMLHandlerTests::testMaxNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -332,19 +332,19 @@ void XMLHandlerTests::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- QDomElement elem2 = macro->toXML();
+ TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -352,9 +352,9 @@ void XMLHandlerTests::testMaxNum()
void XMLHandlerTests::testMaxNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -362,19 +362,19 @@ void XMLHandlerTests::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -382,9 +382,9 @@ void XMLHandlerTests::testMaxNum2()
void XMLHandlerTests::testMinNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -392,19 +392,19 @@ void XMLHandlerTests::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -412,9 +412,9 @@ void XMLHandlerTests::testMinNum()
void XMLHandlerTests::testMinNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -422,19 +422,19 @@ void XMLHandlerTests::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -442,9 +442,9 @@ void XMLHandlerTests::testMinNum2()
void XMLHandlerTests::testBigNumber()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -452,19 +452,19 @@ void XMLHandlerTests::testBigNumber()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %1 </variable>"
"</item>"
- "</macro>").arg(DBL_MAX+1);
+ "</macro>").tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -472,9 +472,9 @@ void XMLHandlerTests::testBigNumber()
void XMLHandlerTests::testTwoMacroItems()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -492,17 +492,17 @@ void XMLHandlerTests::testTwoMacroItems()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
/***************************************************************************
@@ -512,20 +512,20 @@ void XMLHandlerTests::testTwoMacroItems()
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
-* @p elem The given @a QDomElement which is parsen.
+* @p elem The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
-* @p isvariableok QMap of Bools for comparing each @a Variable .
+* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok)
+ const TQMap<TQString, bool> isvariableok)
{
// Make an Iterator over the MacroItems of the Macro.
- const QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
+ const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
mit(macroitems.constBegin()), end(macroitems.constEnd());
//1.comparison - Is the MacroItem-list empty?
@@ -541,12 +541,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Got to the first item-elements of the elem (there is only one in the tests).
- QDomNode itemnode = elem.firstChild();
+ TQDomNode itemnode = elem.firstChild();
// Iterate over the MacroItems and item-elements.
while(mit != end && ! itemnode.isNull()) {
const KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
//2.comparison - Is the Action-name equal?
{
@@ -563,25 +563,25 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Go down to MacroItem->Variable and item->variable and compare them.
- QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
- QDomNode varnode = itemelem.firstChild();
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
+ TQDomNode varnode = itemelem.firstChild();
while ( ! varnode.isNull()) {
- const QDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
+ const TQDomElement varelem = varnode.toElement();
+ const KSharedPtr<KoMacro::Variable> varitem = mvariables.tqfind(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
{
- const bool var = *isvariableok.find(varelem.attribute("name"));
+ const bool var = *isvariableok.tqfind(varelem.attribute("name"));
if( ! var ) {
- KOMACROTEST_XASSERT(varitem->variant() == QVariant(varelem.text()), !var);
+ KOMACROTEST_XASSERT(varitem->variant() == TQVariant(varelem.text()), !var);
kdDebug() << "The content of the Variable: " << varitem->name()
<< " is not equal." << varitem->variant()
<< "!=" << varelem.text() << endl;
}
else {
- KOMACROTEST_ASSERT(varitem->variant() == QVariant(varelem.text()), var);
+ KOMACROTEST_ASSERT(varitem->variant() == TQVariant(varelem.text()), var);
}
}
@@ -604,11 +604,11 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
}
-// Prints a QMap of Variables to kdDebug().
-void XMLHandlerTests::printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s)
+// Prints a TQMap of Variables to kdDebug().
+void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s)
{
- //QValueList<QString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
- QMap<QString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
+ //TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
while(mvit != end){
const KoMacro::Variable * v = *mvit;
kdDebug() << s << ": " << v->name() << endl;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.h b/kexi/plugins/macros/tests/xmlhandlertests.h
index c78a8c79d..3e67742fb 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -71,23 +72,23 @@ namespace KoMacroTest {
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index 2234eaae1..ac176f890 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -65,7 +65,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -76,11 +76,11 @@ namespace KoMacroTest {
KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
/**
- * Represents a @a QValuList of @a MacroItem which are parsen in the
+ * Represents a @a TQValuList of @a MacroItem which are parsen in the
* correspondig @a Macro .
*/
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
/**
* @a MacroItem instances which ist fillen manually from the given XML
@@ -186,7 +186,7 @@ void XMLHandlerTests2::testCorrectDomElement()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -196,9 +196,9 @@ void XMLHandlerTests2::testCorrectDomElement()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -207,10 +207,10 @@ void XMLHandlerTests2::testCorrectDomElement()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -241,8 +241,8 @@ void XMLHandlerTests2::testCorrectDomElement()
varint->setVariant(117);
d->macroitem2->variable("testint")->setVariant(117);
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -279,7 +279,7 @@ void XMLHandlerTests2::testBadRoot()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -289,9 +289,9 @@ void XMLHandlerTests2::testBadRoot()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -300,10 +300,10 @@ void XMLHandlerTests2::testBadRoot()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -319,7 +319,7 @@ void XMLHandlerTests2::testMissingVariable()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -328,9 +328,9 @@ void XMLHandlerTests2::testMissingVariable()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -339,9 +339,9 @@ void XMLHandlerTests2::testMissingVariable()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -367,8 +367,8 @@ void XMLHandlerTests2::testMissingVariable()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -403,7 +403,7 @@ void XMLHandlerTests2::testMoreVariables()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -414,9 +414,9 @@ void XMLHandlerTests2::testMoreVariables()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -425,10 +425,10 @@ void XMLHandlerTests2::testMoreVariables()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -457,8 +457,8 @@ void XMLHandlerTests2::testMoreVariables()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -496,7 +496,7 @@ void XMLHandlerTests2::testWrongVersion()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -506,9 +506,9 @@ void XMLHandlerTests2::testWrongVersion()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -517,10 +517,10 @@ void XMLHandlerTests2::testWrongVersion()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -538,7 +538,7 @@ void XMLHandlerTests2::testWrongXMLStruct()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -548,9 +548,9 @@ void XMLHandlerTests2::testWrongXMLStruct()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -559,10 +559,10 @@ void XMLHandlerTests2::testWrongXMLStruct()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -578,7 +578,7 @@ void XMLHandlerTests2::testMaxNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -586,11 +586,11 @@ void XMLHandlerTests2::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -599,10 +599,10 @@ void XMLHandlerTests2::testMaxNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -629,8 +629,8 @@ void XMLHandlerTests2::testMaxNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -666,7 +666,7 @@ void XMLHandlerTests2::testMaxNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -674,11 +674,11 @@ void XMLHandlerTests2::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -687,10 +687,10 @@ void XMLHandlerTests2::testMaxNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX+1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX+1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -717,8 +717,8 @@ void XMLHandlerTests2::testMaxNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -754,7 +754,7 @@ void XMLHandlerTests2::testMinNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -762,11 +762,11 @@ void XMLHandlerTests2::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -775,10 +775,10 @@ void XMLHandlerTests2::testMinNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -805,8 +805,8 @@ void XMLHandlerTests2::testMinNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -842,7 +842,7 @@ void XMLHandlerTests2::testMinNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -850,11 +850,11 @@ void XMLHandlerTests2::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -863,10 +863,10 @@ void XMLHandlerTests2::testMinNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN-1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN-1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -893,8 +893,8 @@ void XMLHandlerTests2::testMinNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -930,7 +930,7 @@ void XMLHandlerTests2::testBigNumber()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -940,9 +940,9 @@ void XMLHandlerTests2::testBigNumber()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -951,10 +951,10 @@ void XMLHandlerTests2::testBigNumber()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0123456789012345678901234567890123456789));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -981,8 +981,8 @@ void XMLHandlerTests2::testBigNumber()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1018,7 +1018,7 @@ void XMLHandlerTests2::testTwoMacroItems()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -1036,9 +1036,9 @@ void XMLHandlerTests2::testTwoMacroItems()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -1050,17 +1050,17 @@ void XMLHandlerTests2::testTwoMacroItems()
d->macroitem_2->setAction(d->testaction_2);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Push the Variables into the macroitem4.
- KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",QVariant("testString2"));
- KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",QVariant(4));
- KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",QVariant(false));
- KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",QVariant(0.7));
+ KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2"));
+ KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4));
+ KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false));
+ KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7));
KSharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
// 2a.comparison - Test if the Action is correct?
d->macroitem2 = *mit2;
mit2++;
@@ -1101,8 +1101,8 @@ void XMLHandlerTests2::testTwoMacroItems()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
// 2b.comparison - Test if the Action is correct?
d->macroitem3 = *mit3;
mit3++;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h
index 0a3fee3a7..d8f92aafd 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests2 : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -68,29 +69,29 @@ namespace KoMacroTest {
/// @internal d-pointer instance.
Private* const d;
- typedef QMap<QString,KoMacro::Variable>::size_type sizetypemap;
- typedef QValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
+ typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap;
+ typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
*/
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/migration/keximigrationpart.cpp b/kexi/plugins/migration/keximigrationpart.cpp
index 0f6c408ba..5d4830eff 100644
--- a/kexi/plugins/migration/keximigrationpart.cpp
+++ b/kexi/plugins/migration/keximigrationpart.cpp
@@ -23,8 +23,8 @@
#include <kgenericfactory.h>
-KexiMigrationPart::KexiMigrationPart(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiMigrationPart::KexiMigrationPart(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
}
@@ -32,12 +32,12 @@ KexiMigrationPart::~KexiMigrationPart()
{
}
-QWidget *KexiMigrationPart::createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName, QMap<QString,QString>* args )
+TQWidget *KexiMigrationPart::createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName, TQMap<TQString,TQString>* args )
{
Q_UNUSED( mainWin );
- KexiMigration::ImportWizard *w = new KexiMigration::ImportWizard(parent, args);
+ KexiMigration::ImportWizard *w = new KexiMigration::ImportWizard(tqparent, args);
w->setName(objName);
return w;
}
diff --git a/kexi/plugins/migration/keximigrationpart.h b/kexi/plugins/migration/keximigrationpart.h
index 528aac823..b41656a67 100644
--- a/kexi/plugins/migration/keximigrationpart.h
+++ b/kexi/plugins/migration/keximigrationpart.h
@@ -26,13 +26,13 @@
class KexiMigrationPart : public KexiInternalPart
{
public:
- KexiMigrationPart(QObject *parent, const char *name, const QStringList &args);
+ KexiMigrationPart(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiMigrationPart();
/*! Reimplement this if your internal part has to return widgets
- or QDialog objects. */
- virtual QWidget *createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
- QWidget *parent, const char *objName = 0, QMap<QString,QString>* args = 0);
+ or TQDialog objects. */
+ virtual TQWidget *createWidget(const char* /*widgetClass*/, KexiMainWindow* mainWin,
+ TQWidget *tqparent, const char *objName = 0, TQMap<TQString,TQString>* args = 0);
};
#endif
diff --git a/kexi/plugins/queries/kexiaddparamdialog.cpp b/kexi/plugins/queries/kexiaddparamdialog.cpp
index fb40f9a28..4b1141be0 100644
--- a/kexi/plugins/queries/kexiaddparamdialog.cpp
+++ b/kexi/plugins/queries/kexiaddparamdialog.cpp
@@ -20,14 +20,14 @@
#include <klocale.h>
#include <kcombobox.h>
#include <klineedit.h>
-#include <qvbox.h>
+#include <tqvbox.h>
#include <kexidataprovider.h>
#include "kexiaddparamdialog.h"
#include "kexiaddparamdialog.moc"
#include "kexiaddparamwidget.h"
-KexiAddParamDialog::KexiAddParamDialog(QWidget *parent)
- : KDialogBase(parent, "kexiaddparamdialog", true, i18n("Add Parameter"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
+KexiAddParamDialog::KexiAddParamDialog(TQWidget *tqparent)
+ : KDialogBase(tqparent, "kexiaddparamdialog", true, i18n("Add Parameter"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true)
{
m_wid=new KexiAddParamWidget(makeVBoxMainWidget());
for (int i=1;i<=KexiDataProvider::Parameter::maxType;i++)
@@ -38,7 +38,7 @@ KexiAddParamDialog::~KexiAddParamDialog()
{
}
-QString KexiAddParamDialog::parameterName() {
+TQString KexiAddParamDialog::parameterName() {
return m_wid->paramname->text();
}
diff --git a/kexi/plugins/queries/kexiaddparamdialog.h b/kexi/plugins/queries/kexiaddparamdialog.h
index 79558a7cd..2aa27bf7f 100644
--- a/kexi/plugins/queries/kexiaddparamdialog.h
+++ b/kexi/plugins/queries/kexiaddparamdialog.h
@@ -27,11 +27,12 @@ class KexiAddParamWidget;
class KexiAddParamDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiAddParamDialog(QWidget *parent);
+ KexiAddParamDialog(TQWidget *tqparent);
virtual ~KexiAddParamDialog();
- QString parameterName();
+ TQString parameterName();
int parameterType();
private:
KexiAddParamWidget *m_wid;
diff --git a/kexi/plugins/queries/kexiaddparamwidget.ui b/kexi/plugins/queries/kexiaddparamwidget.ui
index 43ec25f1f..cddfa20e6 100644
--- a/kexi/plugins/queries/kexiaddparamwidget.ui
+++ b/kexi/plugins/queries/kexiaddparamwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiAddParamWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiAddParamWidget</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -35,22 +35,22 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
<property name="text">
<string>kexi_</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -73,22 +73,22 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -96,22 +96,22 @@
<string>Message:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>message</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -119,7 +119,7 @@
<string>Type:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>typecombo</cstring>
</property>
@@ -128,7 +128,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
</includehints>
diff --git a/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp b/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
index 4a77f37c8..938d407fc 100644
--- a/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
+++ b/kexi/plugins/queries/kexidynamicqueryparameterdialog.cpp
@@ -21,24 +21,24 @@
#include "kexidynamicqueryparameterdialog.h"
#include "kexidynamicqueryparameterdialog.moc"
-#include <qvbox.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kdebug.h>
-#include <qlineedit.h>
-#include <qobjectlist.h>
+#include <tqlineedit.h>
+#include <tqobjectlist.h>
-KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(QWidget *parent,
+KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(TQWidget *tqparent,
KexiDataProvider::Parameters *values, const KexiDataProvider::ParameterList &list):
- KDialogBase(parent, "paramddialog", true, i18n("Query Parameters"),
+ KDialogBase(tqparent, "paramddialog", true, i18n("Query Parameters"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
m_values=values;
int y;
- m_mainView=new QVBox(this);
+ m_mainView=new TQVBox(this);
for (KexiDataProvider::ParameterList::const_iterator it=list.begin();
it!=list.end();++it) {
- QLineEdit *le=new QLineEdit(m_mainView,(*it).name.utf8());
+ TQLineEdit *le=new TQLineEdit(m_mainView,(*it).name.utf8());
le->setText((*values)[(*it).name]);
}
@@ -48,14 +48,14 @@ KexiDynamicQueryParameterDialog::KexiDynamicQueryParameterDialog(QWidget *parent
KexiDynamicQueryParameterDialog::~KexiDynamicQueryParameterDialog() {}
void KexiDynamicQueryParameterDialog::slotOk() {
- QObjectList *l=queryList(0,"kexi_.*",true,true);
- QObjectListIt it(*l);
- QObject *obj;
+ TQObjectList *l=queryList(0,"kexi_.*",true,true);
+ TQObjectListIt it(*l);
+ TQObject *obj;
kdDebug()<<"KexiDynamicQueryParameterDialog::slotOk()"<<endl;
while ((obj=it.current())!=0) {
kdDebug()<<"KexiDynamicQueryParameterDialog::slotOk()::loop"<<endl;
- (*m_values)[QString().fromUtf8(obj->name())]=
- (dynamic_cast<QLineEdit*>(obj))->text();
+ (*m_values)[TQString().fromUtf8(obj->name())]=
+ (dynamic_cast<TQLineEdit*>(obj))->text();
++it;
}
delete l;
diff --git a/kexi/plugins/queries/kexidynamicqueryparameterdialog.h b/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
index b315e4f9a..60137c1f5 100644
--- a/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
+++ b/kexi/plugins/queries/kexidynamicqueryparameterdialog.h
@@ -17,27 +17,28 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
-#define _KEXI_DYNAMIC_QUERY_PARAMETER_DIALOG_H_
+#ifndef _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
+#define _KEXI_DYNAMIC_TQUERY_PARAMETER_DIALOG_H_
#include <kdialogbase.h>
#include <kexidataprovider.h>
-class QVBox;
+class TQVBox;
class KexiDynamicQueryParameterDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDynamicQueryParameterDialog(QWidget *parent,KexiDataProvider::Parameters *, const KexiDataProvider::ParameterList &);
+ KexiDynamicQueryParameterDialog(TQWidget *tqparent,KexiDataProvider::Parameters *, const KexiDataProvider::ParameterList &);
virtual ~KexiDynamicQueryParameterDialog();
protected:
virtual void slotOk();
private:
//temporary only. Later a different widget will be used
- QVBox *m_mainView;
+ TQVBox *m_mainView;
KexiDataProvider::Parameters *m_values;
};
diff --git a/kexi/plugins/queries/kexiparameterlisteditor.ui b/kexi/plugins/queries/kexiparameterlisteditor.ui
index ac4a3230c..dd5a00d80 100644
--- a/kexi/plugins/queries/kexiparameterlisteditor.ui
+++ b/kexi/plugins/queries/kexiparameterlisteditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KexiParameterListEditor</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiParameterListEditor</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -51,9 +51,9 @@
<cstring>list</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
@@ -79,7 +79,7 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
index d67573e8a..a6205222a 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.cpp
@@ -20,10 +20,10 @@
#include "kexiquerydesignerguieditor.h"
-#include <qlayout.h>
-#include <qpainter.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqlayout.h>
+#include <tqpainter.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -56,14 +56,14 @@
#include "kexiquerypart.h"
-//! @todo remove KEXI_NO_QUERY_TOTALS later
-#define KEXI_NO_QUERY_TOTALS
+//! @todo remove KEXI_NO_TQUERY_TOTALS later
+#define KEXI_NO_TQUERY_TOTALS
//! indices for table columns
#define COLUMN_ID_COLUMN 0
#define COLUMN_ID_TABLE 1
#define COLUMN_ID_VISIBLE 2
-#ifdef KEXI_NO_QUERY_TOTALS
+#ifdef KEXI_NO_TQUERY_TOTALS
# define COLUMN_ID_SORTING 3
# define COLUMN_ID_CRITERIA 4
#else
@@ -84,7 +84,7 @@ public:
}
bool changeSingleCellValue(KexiTableItem &item, int columnNumber,
- const QVariant& value, KexiDB::ResultInfo* result)
+ const TQVariant& value, KexiDB::ResultInfo* result)
{
data->clearRowEditBuffer();
if (!data->updateRowEditBuffer(&item, columnNumber, value)
@@ -99,11 +99,11 @@ public:
KexiTableViewData *data;
KexiDataTable *dataTable;
- QGuardedPtr<KexiDB::Connection> conn;
+ TQGuardedPtr<KexiDB::Connection> conn;
KexiRelationWidget *relations;
KexiSectionHeader *head;
- QSplitter *spl;
+ TQSplitter *spl;
/*! Used to remember in slotDroppedAtRow() what data was dropped,
so we can create appropriate prop. set in slotRowInserted()
@@ -116,46 +116,46 @@ public:
This information is cached and entirely refreshed on updateColumnsData().
The dict is filled with (char*)1 values (doesn't matter what it is);
*/
- QDict<char> fieldColumnIdentifiers;
+ TQDict<char> fieldColumnIdentifiers;
KexiDataAwarePropertySet* sets;
KexiTableItem *droppedNewItem;
- QString droppedNewTable, droppedNewField;
+ TQString droppedNewTable, droppedNewField;
bool slotTableAdded_enabled : 1;
};
-static bool isAsterisk(const QString& tableName, const QString& fieldName)
+static bool isAsterisk(const TQString& tableName, const TQString& fieldName)
{
return tableName=="*" || fieldName.endsWith("*");
}
//! @internal \return true if sorting is allowed for \a fieldName and \a tableName
-static bool sortingAllowed(const QString& fieldName, const QString& tableName) {
+static bool sortingAllowed(const TQString& fieldName, const TQString& tableName) {
return ! (fieldName=="*" || (fieldName.isEmpty() && tableName=="*"));
}
//=========================================================
KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(
- KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+ KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, d( new Private() )
{
d->conn = mainWin->project()->dbConnection();
- d->spl = new QSplitter(Vertical, this);
+ d->spl = new TQSplitter(Qt::Vertical, this);
d->spl->setChildrenCollapsible(false);
d->relations = new KexiRelationWidget(mainWin, d->spl, "relations");
- connect(d->relations, SIGNAL(tableAdded(KexiDB::TableSchema&)),
- this, SLOT(slotTableAdded(KexiDB::TableSchema&)));
- connect(d->relations, SIGNAL(tableHidden(KexiDB::TableSchema&)),
- this, SLOT(slotTableHidden(KexiDB::TableSchema&)));
- connect(d->relations, SIGNAL(tableFieldDoubleClicked(KexiDB::TableSchema*,const QString&)),
- this, SLOT(slotTableFieldDoubleClicked(KexiDB::TableSchema*,const QString&)));
-
- d->head = new KexiSectionHeader(i18n("Query Columns"), Vertical, d->spl);
+ connect(d->relations, TQT_SIGNAL(tableAdded(KexiDB::TableSchema&)),
+ this, TQT_SLOT(slotTableAdded(KexiDB::TableSchema&)));
+ connect(d->relations, TQT_SIGNAL(tableHidden(KexiDB::TableSchema&)),
+ this, TQT_SLOT(slotTableHidden(KexiDB::TableSchema&)));
+ connect(d->relations, TQT_SIGNAL(tableFieldDoubleClicked(KexiDB::TableSchema*,const TQString&)),
+ this, TQT_SLOT(slotTableFieldDoubleClicked(KexiDB::TableSchema*,const TQString&)));
+
+ d->head = new KexiSectionHeader(i18n("Query Columns"),Qt::Vertical, d->spl);
d->dataTable = new KexiDataTable(mainWin, d->head, "guieditor_dataTable", false);
d->dataTable->dataAwareObject()->setSpreadSheetMode();
@@ -164,39 +164,39 @@ KexiQueryDesignerGuiEditor::KexiQueryDesignerGuiEditor(
initTableColumns();
initTableRows();
- QValueList<int> c;
+ TQValueList<int> c;
c << COLUMN_ID_COLUMN << COLUMN_ID_TABLE << COLUMN_ID_CRITERIA;
if (d->dataTable->tableView()/*sanity*/) {
d->dataTable->tableView()->adjustColumnWidthToContents(COLUMN_ID_VISIBLE);
d->dataTable->tableView()->adjustColumnWidthToContents(COLUMN_ID_SORTING);
d->dataTable->tableView()->maximizeColumnsWidth( c );
d->dataTable->tableView()->setDropsAtRowEnabled(true);
- connect(d->dataTable->tableView(), SIGNAL(dragOverRow(KexiTableItem*,int,QDragMoveEvent*)),
- this, SLOT(slotDragOverTableRow(KexiTableItem*,int,QDragMoveEvent*)));
- connect(d->dataTable->tableView(), SIGNAL(droppedAtRow(KexiTableItem*,int,QDropEvent*,KexiTableItem*&)),
- this, SLOT(slotDroppedAtRow(KexiTableItem*,int,QDropEvent*,KexiTableItem*&)));
- connect(d->dataTable->tableView(), SIGNAL(newItemAppendedForAfterDeletingInSpreadSheetMode()),
- this, SLOT(slotNewItemAppendedForAfterDeletingInSpreadSheetMode()));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(dragOverRow(KexiTableItem*,int,TQDragMoveEvent*)),
+ this, TQT_SLOT(slotDragOverTableRow(KexiTableItem*,int,TQDragMoveEvent*)));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(droppedAtRow(KexiTableItem*,int,TQDropEvent*,KexiTableItem*&)),
+ this, TQT_SLOT(slotDroppedAtRow(KexiTableItem*,int,TQDropEvent*,KexiTableItem*&)));
+ connect(d->dataTable->tableView(), TQT_SIGNAL(newItemAppendedForAfterDeletingInSpreadSheetMode()),
+ this, TQT_SLOT(slotNewItemAppendedForAfterDeletingInSpreadSheetMode()));
}
- connect(d->data, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(slotBeforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->data, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
- connect(d->relations, SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
- this, SLOT(slotTablePositionChanged(KexiRelationViewTableContainer*)));
- connect(d->relations, SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
- this, SLOT(slotAboutConnectionRemove(KexiRelationViewConnection*)));
-
- QVBoxLayout *l = new QVBoxLayout(this);
+ connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ this, TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->data, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
+ connect(d->relations, TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
+ this, TQT_SLOT(slotTablePositionChanged(KexiRelationViewTableContainer*)));
+ connect(d->relations, TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
+ this, TQT_SLOT(slotAboutConnectionRemove(KexiRelationViewConnection*)));
+
+ TQVBoxLayout *l = new TQVBoxLayout(this);
l->addWidget(d->spl);
addChildView(d->relations);
addChildView(d->dataTable);
setViewWidget(d->dataTable, true);
- d->relations->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
- d->head->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
+ d->relations->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
+ d->head->tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
updateGeometry();
- d->spl->setSizes(QValueList<int>()<< 800<<400);
+ d->spl->setSizes(TQValueList<int>()<< 800<<400);
}
KexiQueryDesignerGuiEditor::~KexiQueryDesignerGuiEditor()
@@ -222,14 +222,14 @@ KexiQueryDesignerGuiEditor::initTableColumns()
KexiTableViewColumn *col3 = new KexiTableViewColumn("visible", KexiDB::Field::Boolean, i18n("Visible"),
i18n("Describes visibility for a given field or expression."));
- col3->field()->setDefaultValue( QVariant(false, 0) );
+ col3->field()->setDefaultValue( TQVariant(false, 0) );
col3->field()->setNotNull( true );
d->data->addColumn(col3);
-#ifndef KEXI_NO_QUERY_TOTALS
+#ifndef KEXI_NO_TQUERY_TOTALS
KexiTableViewColumn *col4 = new KexiTableViewColumn("totals", KexiDB::Field::Enum, i18n("Totals"),
i18n("Describes a way of computing totals for a given field or expression."));
- QValueVector<QString> totalsTypes;
+ TQValueVector<TQString> totalsTypes;
totalsTypes.append( i18n("Group by") );
totalsTypes.append( i18n("Sum") );
totalsTypes.append( i18n("Average") );
@@ -242,7 +242,7 @@ KexiQueryDesignerGuiEditor::initTableColumns()
KexiTableViewColumn *col5 = new KexiTableViewColumn("sort", KexiDB::Field::Enum, i18n("Sorting"),
i18n("Describes a way of sorting for a given field."));
- QValueVector<QString> sortTypes;
+ TQValueVector<TQString> sortTypes;
sortTypes.append( "" );
sortTypes.append( i18n("Ascending") );
sortTypes.append( i18n("Descending") );
@@ -264,7 +264,7 @@ void KexiQueryDesignerGuiEditor::initTableRows()
for (int i=0; i<(int)d->sets->size(); i++) {
KexiTableItem* item;
d->data->append(item = d->data->createItem());
- item->at(COLUMN_ID_VISIBLE) = QVariant(false, 0);
+ item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0);
}
d->dataTable->dataAwareObject()->setData(d->data);
@@ -275,22 +275,22 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
{
d->dataTable->dataAwareObject()->acceptRowEdit();
- QStringList sortedTableNames;
+ TQStringList sortedTableNames;
for (TablesDictIterator it(*d->relations->tables());it.current();++it)
sortedTableNames += it.current()->schema()->name();
qHeapSort( sortedTableNames );
//several tables can be hidden now, so remove rows for these tables
- QValueList<int> rowsToDelete;
+ TQValueList<int> rowsToDelete;
for (int r = 0; r<(int)d->sets->size(); r++) {
KoProperty::Set *set = d->sets->at(r);
if (set) {
- QString tableName = (*set)["table"].value().toString();
- QString fieldName = (*set)["field"].value().toString();
+ TQString tableName = (*set)["table"].value().toString();
+ TQString fieldName = (*set)["field"].value().toString();
const bool allTablesAsterisk = tableName=="*" && d->relations->tables()->isEmpty();
const bool fieldNotFound = tableName!="*"
&& !(*set)["isExpression"].value().toBool()
- && sortedTableNames.end() == qFind( sortedTableNames.begin(), sortedTableNames.end(), tableName );
+ && sortedTableNames.end() == tqFind( sortedTableNames.begin(), sortedTableNames.end(), tableName );
if (allTablesAsterisk || fieldNotFound) {
//table not found: mark this line for later removal
@@ -313,12 +313,12 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
// tempData()->clearQuery();
tempData()->unregisterForTablesSchemaChanges();
- for (QStringList::const_iterator it = sortedTableNames.constBegin();
+ for (TQStringList::const_iterator it = sortedTableNames.constBegin();
it!=sortedTableNames.constEnd(); ++it)
{
//table
/*! @todo what about query? */
- KexiDB::TableSchema *table = d->relations->tables()->find(*it)->schema()->table();
+ KexiDB::TableSchema *table = d->relations->tables()->tqfind(*it)->schema()->table();
d->conn->registerForTableSchemaChanges(*tempData(), *table); //this table will be used
item = d->tablesColumnData->createItem(); //new KexiTableItem(2);
(*item)[COLUMN_ID_COLUMN]=table->name();
@@ -333,7 +333,7 @@ void KexiQueryDesignerGuiEditor::updateColumnsData()
for (KexiDB::Field::ListIterator t_it = table->fieldsIterator();t_it.current();++t_it) {
item = d->fieldColumnData->createItem(); // new KexiTableItem(2);
(*item)[COLUMN_ID_COLUMN]=table->name()+"."+t_it.current()->name();
- (*item)[COLUMN_ID_TABLE]=QString(" ") + t_it.current()->name();
+ (*item)[COLUMN_ID_TABLE]=TQString(" ") + t_it.current()->name();
d->fieldColumnData->append( item );
d->fieldColumnIdentifiers.insert((*item)[COLUMN_ID_COLUMN].toString(), (char*)1); //cache
}
@@ -349,16 +349,16 @@ KexiRelationWidget *KexiQueryDesignerGuiEditor::relationView() const
KexiQueryPart::TempData *
KexiQueryDesignerGuiEditor::tempData() const
{
- return static_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
}
-static QString msgCannotSwitch_EmptyDesign() {
+static TQString msgCannotSwitch_EmptyDesign() {
return i18n("Cannot switch to data view, because query design is empty.\n"
"First, please create your design.");
}
bool
-KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
+KexiQueryDesignerGuiEditor::buildSchema(TQString *errMsg)
{
//build query schema
KexiQueryPart::TempData * temp = tempData();
@@ -378,7 +378,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
// -WHERE expression
// -ORDER BY list
KexiDB::BaseExpr *whereExpr = 0;
- const uint count = QMIN(d->data->count(), d->sets->size());
+ const uint count = TQMIN(d->data->count(), d->sets->size());
bool fieldsFound = false;
KexiTableViewData::Iterator it(d->data->iterator());
for (uint i=0; i<count && it.current(); ++it, i++) {
@@ -388,29 +388,29 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
d->dataTable->dataAwareObject()->setCursorPosition(i,0);
if (errMsg)
*errMsg = i18n("Select column for table \"%1\"")
- .arg(it.current()->at(COLUMN_ID_TABLE).toString());
+ .tqarg(it.current()->at(COLUMN_ID_TABLE).toString());
return false;
}
KoProperty::Set *set = d->sets->at(i);
if (set) {
- QString tableName = (*set)["table"].value().toString().stripWhiteSpace();
- QString fieldName = (*set)["field"].value().toString();
- QString fieldAndTableName = fieldName;
+ TQString tableName = (*set)["table"].value().toString().stripWhiteSpace();
+ TQString fieldName = (*set)["field"].value().toString();
+ TQString fieldAndTableName = fieldName;
KexiDB::Field *currentField = 0; // will be set if this column is a single field
KexiDB::QueryColumnInfo* currentColumn = 0;
if (!tableName.isEmpty())
fieldAndTableName.prepend(tableName+".");
const bool fieldVisible = (*set)["visible"].value().toBool();
- QString criteriaStr = (*set)["criteria"].value().toString();
- QCString alias = (*set)["alias"].value().toCString();
+ TQString criteriaStr = (*set)["criteria"].value().toString();
+ TQCString alias = (*set)["alias"].value().toCString();
if (!criteriaStr.isEmpty()) {
int token;
KexiDB::BaseExpr *criteriaExpr = parseExpressionString(criteriaStr, token,
true/*allowRelationalOperator*/);
if (!criteriaExpr) {//for sanity
if (errMsg)
- *errMsg = i18n("Invalid criteria \"%1\"").arg(criteriaStr);
+ *errMsg = i18n("Invalid criteria \"%1\"").tqarg(criteriaStr);
delete whereExpr;
return false;
}
@@ -431,7 +431,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
false/*!allowRelationalOperator*/);
if (!columnExpr) {
if (errMsg)
- *errMsg = i18n("Invalid expression \"%1\"").arg(fieldName);
+ *errMsg = i18n("Invalid expression \"%1\"").tqarg(fieldName);
return false;
}
temp->query()->addExpression(columnExpr, fieldVisible);
@@ -523,7 +523,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
fieldNumber++;
KexiDB::Field *currentField = 0;
KexiDB::QueryColumnInfo *currentColumn = 0;
- QString sortingString( (*set)["sorting"].value().toString() );
+ TQString sortingString( (*set)["sorting"].value().toString() );
if (sortingString!="ascending" && sortingString!="descending")
continue;
if (!(*set)["visible"].value().toBool()) {
@@ -547,7 +547,7 @@ KexiQueryDesignerGuiEditor::buildSchema(QString *errMsg)
//! @todo support expressions here
continue;
//! @todo ok, but not for expressions
- QString aliasString( (*set)["alias"].value().toString() );
+ TQString aliasString( (*set)["alias"].value().toString() );
currentColumn = temp->query()->columnInfo(
(*set)["table"].value().toString() + "."
+ (aliasString.isEmpty() ? currentField->name() : aliasString) );
@@ -581,14 +581,14 @@ KexiQueryDesignerGuiEditor::beforeSwitchTo(int mode, bool &dontStore)
// if (!d->dataTable->dataAwareObject()->acceptRowEdit())
// return cancelled;
- if (!dirty() && parentDialog()->neverSaved()) {
+ if (!dirty() && tqparentDialog()->neverSaved()) {
KMessageBox::information(this, msgCannotSwitch_EmptyDesign());
return cancelled;
}
if (dirty() || !tempData()->query()) {
//remember current design in a temporary structure
dontStore=true;
- QString errMsg;
+ TQString errMsg;
//build schema; problems are not allowed
if (!buildSchema(&errMsg)) {
KMessageBox::sorry(this, errMsg);
@@ -618,13 +618,13 @@ tristate
KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
{
const bool was_dirty = dirty();
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
if (mode==Kexi::NoViewMode || (mode==Kexi::DataViewMode && !tempData()->query())) {
//this is not a SWITCH but a fresh opening in this view mode
if (!m_dialog->neverSaved()) {
if (!loadLayout()) {
//err msg
- parentDialog()->setStatus(conn,
+ tqparentDialog()->settqStatus(conn,
i18n("Query definition loading failed."),
i18n("Query design may be corrupted so it could not be opened even in text view.\n"
"You can delete the query and create it again."));
@@ -633,13 +633,13 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
// Invalid queries case:
// KexiDialogBase::switchToViewMode() first opens DesignViewMode,
// and then KexiQueryPart::loadSchemaData() doesn't allocate QuerySchema object
- // do we're carefully looking at parentDialog()->schemaData()
- KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ // do we're carefully looking at tqparentDialog()->schemaData()
+ KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
if (q) {
KexiDB::ResultInfo result;
showFieldsForQuery( q, result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
tempData()->proposeOpeningInTextViewModeBecauseOfProblems = true;
return false;
}
@@ -662,7 +662,7 @@ KexiQueryDesignerGuiEditor::afterSwitchFrom(int mode)
KexiDB::ResultInfo result;
showFieldsAndRelationsForQuery( tempData()->query(), result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
@@ -698,7 +698,7 @@ KexiQueryDesignerGuiEditor::storeNewData(const KexiDB::SchemaData& sdata, bool &
cancel = true;
return 0;
}
- QString errMsg;
+ TQString errMsg;
KexiQueryPart::TempData * temp = tempData();
if (!temp->query() || !(viewMode()==Kexi::DesignViewMode && !temp->queryChangedInPreviousView)) {
//only rebuild schema if it has not been rebuilt previously
@@ -809,11 +809,11 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//2. Collect information about criterias
// --this must be top level chain of AND's
// --this will also show joins as: [table1.]field1 = [table2.]field2
- QDict<KexiDB::BaseExpr> criterias(101, false);
+ TQDict<KexiDB::BaseExpr> criterias(101, false);
KexiDB::BaseExpr* e = query->whereExpression();
KexiDB::BaseExpr* eItem = 0;
while (e) {
- //eat parentheses because the expression can be (....) AND (... AND ... )
+ //eat tqparentheses because the expression can be (....) AND (... AND ... )
while (e && e->toUnary() && e->token()=='(')
e = e->toUnary()->arg();
@@ -826,7 +826,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
e = 0;
}
- //eat parentheses
+ //eat tqparentheses
while (eItem && eItem->toUnary() && eItem->token()=='(')
eItem = eItem->toUnary()->arg();
@@ -877,14 +877,14 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//3. show fields (including * and table.*)
uint row_num = 0;
KexiDB::Field *field;
- QPtrDict<char> usedCriterias(101); // <-- used criterias will be saved here
+ TQPtrDict<char> usedCriterias(101); // <-- used criterias will be saved here
// so in step 4. we will be able to add
// remaining invisible columns with criterias
for (KexiDB::Field::ListIterator it(*query->fields());
(field = it.current()); ++it, row_num++)
{
//append a new row
- QString tableName, fieldName, columnAlias, criteriaString;
+ TQString tableName, fieldName, columnAlias, criteriaString;
KexiDB::BinaryExpr *criteriaExpr = 0;
KexiDB::BaseExpr *criteriaArgument = 0;
if (field->isQueryAsterisk()) {
@@ -901,7 +901,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
columnAlias = query->columnAlias(row_num);
if (field->isExpression()) {
// if (columnAlias.isEmpty()) {
-// columnAlias = i18n("expression", "expr%1").arg(row_num); //TODO
+// columnAlias = i18n("expression", "expr%1").tqarg(row_num); //TODO
// }
// if (columnAlias.isEmpty())
//TODO: ok? perhaps do not allow to omit aliases?
@@ -916,8 +916,8 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (!criteriaArgument) {//try table.field
criteriaArgument = criterias[tableName+"."+fieldName];
}
- if (criteriaArgument) {//criteria expression is just a parent of argument
- criteriaExpr = criteriaArgument->parent()->toBinary();
+ if (criteriaArgument) {//criteria expression is just a tqparent of argument
+ criteriaExpr = criteriaArgument->tqparent()->toBinary();
usedCriterias.insert(criteriaArgument, (char*)1); //save info. about used criteria
}
}
@@ -942,7 +942,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (field->isExpression()) {
// (*newItem)[COLUMN_ID_COLUMN] = ;
if (!d->changeSingleCellValue(*newItem, COLUMN_ID_COLUMN,
- QVariant(columnAlias + ": " + field->expression()->toString()), &result))
+ TQVariant(columnAlias + ": " + field->expression()->toString()), &result))
return; //problems with setting column expression
}
}
@@ -950,7 +950,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//4. show ORDER BY information
d->data->clearRowEditBuffer();
KexiDB::OrderByColumnList &orderByColumns = query->orderByColumnList();
- QMap<KexiDB::QueryColumnInfo*,int> columnsOrder(
+ TQMap<KexiDB::QueryColumnInfo*,int> columnsOrder(
query->columnsOrder(KexiDB::QuerySchema::UnexpandedListWithoutAsterisks) );
for (KexiDB::OrderByColumn::ListConstIterator orderByColumnsIt( orderByColumns.constBegin() );
orderByColumnsIt!=orderByColumns.constEnd(); ++orderByColumnsIt)
@@ -961,7 +961,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
if (column) {
//sorting for visible column
if (column->visible) {
- if (columnsOrder.contains(column)) {
+ if (columnsOrder.tqcontains(column)) {
const int columnPosition = columnsOrder[ column ];
rowItem = d->data->at( columnPosition );
rowPropertySet = d->sets->at( columnPosition );
@@ -974,7 +974,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
else if ((*orderByColumnsIt).field()) {
//this will be presented as invisible field: create new row
field = (*orderByColumnsIt).field();
- QString tableName( field->table() ? field->table()->name() : QString::null );
+ TQString tableName( field->table() ? field->table()->name() : TQString() );
rowItem = createNewRow( tableName, field->name(), false /* !visible*/);
d->dataTable->dataAwareObject()->insertItem(rowItem, row_num);
rowPropertySet = createPropertySet( row_num, tableName, field->name(), true /*newOne*/ );
@@ -992,17 +992,17 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
d->data->saveRowChanges(*rowItem, true);
(*rowPropertySet)["sorting"].clearModifiedFlag(); // this property should look "fresh"
if (!rowItem->at(COLUMN_ID_VISIBLE).toBool()) //update
- (*rowPropertySet)["visible"].setValue(QVariant(false,0), false/*rememberOldValue*/);
+ (*rowPropertySet)["visible"].setValue(TQVariant(false,0), false/*rememberOldValue*/);
}
}
//5. Show fields for unused criterias (with "Visible" column set to false)
KexiDB::BaseExpr *criteriaArgument; // <-- contains field or table.field
- for (QDictIterator<KexiDB::BaseExpr> it(criterias); (criteriaArgument = it.current()); ++it) {
+ for (TQDictIterator<KexiDB::BaseExpr> it(criterias); (criteriaArgument = it.current()); ++it) {
if (usedCriterias[it.current()])
continue;
//unused: append a new row
- KexiDB::BinaryExpr *criteriaExpr = criteriaArgument->parent()->toBinary();
+ KexiDB::BinaryExpr *criteriaExpr = criteriaArgument->tqparent()->toBinary();
if (!criteriaExpr) {
kexipluginswarn << "KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(): "
"criteriaExpr is not a binary expr" << endl;
@@ -1018,7 +1018,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
}
}
KexiDB::Field* field = 0;
- if (-1 == columnNameArgument->name.find('.') && query->tables()->count()==1) {
+ if (-1 == columnNameArgument->name.tqfind('.') && query->tables()->count()==1) {
//extreme case: only field name provided for one-table query:
field = query->tables()->first()->field(columnNameArgument->name);
}
@@ -1031,7 +1031,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
"no columnInfo found in the query for name \"" << columnNameArgument->name << endl;
continue;
}
- QString tableName, fieldName, columnAlias, criteriaString;
+ TQString tableName, fieldName, columnAlias, criteriaString;
//! @todo what about ALIAS?
tableName = field->table()->name();
fieldName = field->name();
@@ -1052,7 +1052,7 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
//! @todo set["alias"].setValue(columnAlias, false);
//// if (!criteriaString.isEmpty())
set["criteria"].setValue( criteriaString, false );
- set["visible"].setValue( QVariant(false,1), false );
+ set["visible"].setValue( TQVariant(false,1), false );
}
//current property set has most probably changed
@@ -1067,32 +1067,32 @@ void KexiQueryDesignerGuiEditor::showFieldsOrRelationsForQueryInternal(
bool KexiQueryDesignerGuiEditor::loadLayout()
{
- QString xml;
+ TQString xml;
// if (!loadDataBlock( xml, "query_layout" )) {
loadDataBlock( xml, "query_layout" );
//TODO errmsg
// return false;
// }
if (xml.isEmpty()) {
- //in a case when query layout was not saved, build layout by hand
+ //in a case when query tqlayout was not saved, build tqlayout by hand
// -- dynamic cast because of a need for handling invalid queries
// (as in KexiQueryDesignerGuiEditor::afterSwitchFrom()):
- KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ KexiDB::QuerySchema * q = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
if (q) {
showTablesForQuery( q );
KexiDB::ResultInfo result;
showRelationsForQuery( q, result );
if (!result.success) {
- parentDialog()->setStatus(&result, i18n("Query definition loading failed."));
+ tqparentDialog()->settqStatus(&result, i18n("Query definition loading failed."));
return false;
}
}
return true;
}
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xml);
- QDomElement doc_el = doc.documentElement(), el;
+ TQDomElement doc_el = doc.documentElement(), el;
if (doc_el.tagName()!="query_layout") {
//TODO errmsg
return false;
@@ -1108,9 +1108,9 @@ bool KexiQueryDesignerGuiEditor::loadLayout()
int y = el.attribute("y","-1").toInt();
int width = el.attribute("width","-1").toInt();
int height = el.attribute("height","-1").toInt();
- QRect rect;
+ TQRect rect;
if (x!=-1 || y!=-1 || width!=-1 || height!=-1)
- rect = QRect(x,y,width,height);
+ rect = TQRect(x,y,width,height);
d->relations->addTable( t, rect );
}
else if (el.tagName()=="conn") {
@@ -1140,30 +1140,30 @@ bool KexiQueryDesignerGuiEditor::storeLayout()
KexiDB::Connection::SelectStatementOptions options;
options.identifierEscaping = KexiDB::Driver::EscapeKexi|KexiDB::Driver::EscapeAsNecessary;
options.addVisibleLookupColumns = false;
- QString sqlText = dbConn->selectStatement( *temp->query(), options );
+ TQString sqlText = dbConn->selectStatement( *temp->query(), options );
if (!storeDataBlock( sqlText, "sql" )) {
return false;
}
//serialize detailed XML query definition
- QString xml = "<query_layout>", tmp;
+ TQString xml = "<query_layout>", tmp;
for (TablesDictIterator it(*d->relations->tables()); it.current(); ++it) {
KexiRelationViewTableContainer *table_cont = it.current();
/*! @todo what about query? */
- tmp = QString("<table name=\"")+QString(table_cont->schema()->name())+"\" x=\""
- +QString::number(table_cont->x())
- +"\" y=\""+QString::number(table_cont->y())
- +"\" width=\""+QString::number(table_cont->width())
- +"\" height=\""+QString::number(table_cont->height())
+ tmp = TQString("<table name=\"")+TQString(table_cont->schema()->name())+"\" x=\""
+ +TQString::number(table_cont->x())
+ +"\" y=\""+TQString::number(table_cont->y())
+ +"\" width=\""+TQString::number(table_cont->width())
+ +"\" height=\""+TQString::number(table_cont->height())
+"\"/>";
xml += tmp;
}
KexiRelationViewConnection *con;
for (ConnectionListIterator it(*d->relations->connections()); (con = it.current()); ++it) {
- tmp = QString("<conn mtable=\"") + QString(con->masterTable()->schema()->name())
+ tmp = TQString("<conn mtable=\"") + TQString(con->masterTable()->schema()->name())
+ "\" mfield=\"" + con->masterField() + "\" dtable=\""
- + QString(con->detailsTable()->schema()->name())
+ + TQString(con->detailsTable()->schema()->name())
+ "\" dfield=\"" + con->detailsField() + "\"/>";
xml += tmp;
}
@@ -1177,19 +1177,19 @@ bool KexiQueryDesignerGuiEditor::storeLayout()
return true;
}
-QSize KexiQueryDesignerGuiEditor::sizeHint() const
+TQSize KexiQueryDesignerGuiEditor::tqsizeHint() const
{
- QSize s1 = d->relations->sizeHint();
- QSize s2 = d->head->sizeHint();
- return QSize(QMAX(s1.width(),s2.width()), s1.height()+s2.height());
+ TQSize s1 = d->relations->tqsizeHint();
+ TQSize s2 = d->head->tqsizeHint();
+ return TQSize(TQMAX(s1.width(),s2.width()), s1.height()+s2.height());
}
KexiTableItem*
-KexiQueryDesignerGuiEditor::createNewRow(const QString& tableName, const QString& fieldName,
+KexiQueryDesignerGuiEditor::createNewRow(const TQString& tableName, const TQString& fieldName,
bool visible) const
{
KexiTableItem *newItem = d->data->createItem();
- QString key;
+ TQString key;
if (tableName=="*")
key="*";
else {
@@ -1199,15 +1199,15 @@ KexiQueryDesignerGuiEditor::createNewRow(const QString& tableName, const QString
}
(*newItem)[COLUMN_ID_COLUMN]=key;
(*newItem)[COLUMN_ID_TABLE]=tableName;
- (*newItem)[COLUMN_ID_VISIBLE]=QVariant(visible, 1);
-#ifndef KEXI_NO_QUERY_TOTALS
- (*newItem)[COLUMN_ID_TOTALS]=QVariant(0);
+ (*newItem)[COLUMN_ID_VISIBLE]=TQVariant(visible, 1);
+#ifndef KEXI_NO_TQUERY_TOTALS
+ (*newItem)[COLUMN_ID_TOTALS]=TQVariant(0);
#endif
return newItem;
}
void KexiQueryDesignerGuiEditor::slotDragOverTableRow(
- KexiTableItem * /*item*/, int /*row*/, QDragMoveEvent* e)
+ KexiTableItem * /*item*/, int /*row*/, TQDragMoveEvent* e)
{
if (e->provides("kexi/field")) {
e->acceptAction(true);
@@ -1216,11 +1216,11 @@ void KexiQueryDesignerGuiEditor::slotDragOverTableRow(
void
KexiQueryDesignerGuiEditor::slotDroppedAtRow(KexiTableItem * /*item*/, int /*row*/,
- QDropEvent *ev, KexiTableItem*& newItem)
+ TQDropEvent *ev, KexiTableItem*& newItem)
{
- QString sourceMimeType;
- QString srcTable;
- QString srcField;
+ TQString sourceMimeType;
+ TQString srcTable;
+ TQString srcField;
if (!KexiFieldDrag::decodeSingle(ev,sourceMimeType,srcTable,srcField))
return;
@@ -1236,10 +1236,10 @@ void KexiQueryDesignerGuiEditor::slotNewItemAppendedForAfterDeletingInSpreadShee
{
KexiTableItem *item = d->data->last();
if (item)
- item->at(COLUMN_ID_VISIBLE) = QVariant(false, 0); //the same init as in initTableRows()
+ item->at(COLUMN_ID_VISIBLE) = TQVariant(false, 0); //the same init as in initTableRows()
}
-void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*repaint*/)
+void KexiQueryDesignerGuiEditor::slotRowInserted(KexiTableItem* item, uint row, bool /*tqrepaint*/)
{
if (d->droppedNewItem && d->droppedNewItem==item) {
createPropertySet( row, d->droppedNewTable, d->droppedNewField, true );
@@ -1264,35 +1264,35 @@ void KexiQueryDesignerGuiEditor::slotTableHidden(KexiDB::TableSchema & /*t*/)
}
/*! @internal generates smallest unique alias */
-QCString KexiQueryDesignerGuiEditor::generateUniqueAlias() const
+TQCString KexiQueryDesignerGuiEditor::generateUniqueAlias() const
{
//TODO: add option for using non-i18n'd "expr" prefix?
- const QCString expStr
+ const TQCString expStr
= i18n("short for 'expression' word (only latin letters, please)", "expr").latin1();
//TODO: optimization: cache it?
- QAsciiDict<char> aliases(101);
+ TQAsciiDict<char> aliases(101);
for (int r = 0; r<(int)d->sets->size(); r++) {
KoProperty::Set *set = d->sets->at(r);
if (set) {
- const QCString a = (*set)["alias"].value().toCString().lower();
+ const TQCString a = (*set)["alias"].value().toCString().lower();
if (!a.isEmpty())
aliases.insert(a,(char*)1);
}
}
int aliasNr=1;
for (;;aliasNr++) {
- if (!aliases[expStr+QString::number(aliasNr).latin1()])
+ if (!aliases[expStr+TQString::number(aliasNr).latin1()])
break;
}
- return expStr+QString::number(aliasNr).latin1();
+ return expStr+TQString::number(aliasNr).latin1();
}
//! @todo this is primitive, temporary: reuse SQL parser
KexiDB::BaseExpr*
-KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int& token,
+KexiQueryDesignerGuiEditor::parseExpressionString(const TQString& fullString, int& token,
bool allowRelationalOperator)
{
- QString str = fullString.stripWhiteSpace();
+ TQString str = fullString.stripWhiteSpace();
int len = 0;
//KexiDB::BaseExpr *expr = 0;
//1. get token
@@ -1333,7 +1333,7 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
return 0;
KexiDB::BaseExpr *valueExpr = 0;
- QRegExp re;
+ TQRegExp re;
if (str.length()>=2 &&
(
(str.startsWith("\"") && str.endsWith("\""))
@@ -1345,38 +1345,38 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
else if (str.startsWith("[") && str.endsWith("]")) {
valueExpr = new KexiDB::QueryParameterExpr(str.mid(1,str.length()-2));
}
- else if ((re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})")).exactMatch( str ))
{
- valueExpr = new KexiDB::ConstExpr(DATE_CONST, QDate::fromString(
+ valueExpr = new KexiDB::ConstExpr(DATE_CONST, TQDate::fromString(
re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+"-"+re.cap(3).rightJustify(2, '0'), Qt::ISODate));
}
- else if ((re = QRegExp("(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
- || (re = QRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
+ || (re = TQRegExp("(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
{
- QString res = re.cap(1).rightJustify(2, '0')+":"+re.cap(2).rightJustify(2, '0')
+ TQString res = re.cap(1).rightJustify(2, '0')+":"+re.cap(2).rightJustify(2, '0')
+":"+re.cap(3).rightJustify(2, '0');
// kexipluginsdbg << res << endl;
- valueExpr = new KexiDB::ConstExpr(TIME_CONST, QTime::fromString(res, Qt::ISODate));
+ valueExpr = new KexiDB::ConstExpr(TIME_CONST, TQTime::fromString(res, Qt::ISODate));
}
- else if ((re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
- || (re = QRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
+ else if ((re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2})")).exactMatch( str )
+ || (re = TQRegExp("(\\d{1,4})-(\\d{1,2})-(\\d{1,2})\\s+(\\d{1,2}):(\\d{1,2}):(\\d{1,2})")).exactMatch( str ))
{
- QString res = re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+ TQString res = re.cap(1).rightJustify(4, '0')+"-"+re.cap(2).rightJustify(2, '0')
+"-"+re.cap(3).rightJustify(2, '0')
+"T"+re.cap(4).rightJustify(2, '0')+":"+re.cap(5).rightJustify(2, '0')
+":"+re.cap(6).rightJustify(2, '0');
// kexipluginsdbg << res << endl;
valueExpr = new KexiDB::ConstExpr(DATETIME_CONST,
- QDateTime::fromString(res, Qt::ISODate));
+ TQDateTime::fromString(res, Qt::ISODate));
}
else if (str[0]>='0' && str[0]<='9' || str[0]=='-' || str[0]=='+') {
//number
- QString decimalSym = KGlobal::locale()->decimalSymbol();
+ TQString decimalSym = KGlobal::locale()->decimalSymbol();
bool ok;
- int pos = str.find('.');
+ int pos = str.tqfind('.');
if (pos==-1) {//second chance: local decimal symbol
- pos = str.find(decimalSym);
+ pos = str.tqfind(decimalSym);
}
if (pos>=0) {//real const number
const int left = str.left(pos).toInt(&ok);
@@ -1385,18 +1385,18 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
const int right = str.mid(pos+1).toInt(&ok);
if (!ok)
return 0;
- valueExpr = new KexiDB::ConstExpr(REAL_CONST, QPoint(left,right)); //decoded to QPoint
+ valueExpr = new KexiDB::ConstExpr(REAL_CONST, TQPoint(left,right)); //decoded to TQPoint
}
else {
//integer const
- const Q_LLONG val = str.toLongLong(&ok);
+ const TQ_LLONG val = str.toLongLong(&ok);
if (!ok)
return 0;
valueExpr = new KexiDB::ConstExpr(INTEGER_CONST, val);
}
}
else if (str.lower()=="null") {
- valueExpr = new KexiDB::ConstExpr(SQL_NULL, QVariant());
+ valueExpr = new KexiDB::ConstExpr(SQL_NULL, TQVariant());
}
else {//identfier
if (!KexiUtils::isIdentifier(str))
@@ -1415,33 +1415,33 @@ KexiQueryDesignerGuiEditor::parseExpressionString(const QString& fullString, int
}
void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result)
+ TQVariant& newValue, KexiDB::ResultInfo* result)
{
if (colnum == COLUMN_ID_COLUMN) {
if (newValue.isNull()) {
- d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, QVariant(), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(false,1));//invisible
- d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, QVariant());
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant());//remove totals
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
+ d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
#endif
- d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, QVariant());//remove crit.
+ d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
d->sets->removeCurrentPropertySet();
}
else {
//auto fill 'table' column
- QString fieldId( newValue.toString().stripWhiteSpace() ); //tmp, can look like "table.field"
- QString fieldName; //"field" part of "table.field" or expression string
- QString tableName; //empty for expressions
- QCString alias;
- QString columnValueForExpr; //for setting pretty printed "alias: expr" in 1st column
+ TQString fieldId( newValue.toString().stripWhiteSpace() ); //tmp, can look like "table.field"
+ TQString fieldName; //"field" part of "table.field" or expression string
+ TQString tableName; //empty for expressions
+ TQCString alias;
+ TQString columnValueForExpr; //for setting pretty printed "alias: expr" in 1st column
const bool isExpression = !d->fieldColumnIdentifiers[fieldId];
if (isExpression) {
//this value is entered by hand and doesn't match
//any value in the combo box -- we're assuming this is an expression
//-table remains null
- //-find "alias" in something like "alias : expr"
- const int id = fieldId.find(':');
+ //-tqfind "alias" in something like "alias : expr"
+ const int id = fieldId.tqfind(':');
if (id>0) {
alias = fieldId.left(id).stripWhiteSpace().latin1();
if (!KexiUtils::isIdentifier(alias)) {
@@ -1449,7 +1449,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->allowToDiscardChanges = true;
result->column = colnum;
result->msg = i18n("Entered column alias \"%1\" is not a valid identifier.")
- .arg(alias);
+ .tqarg(alias.data());
result->desc = i18n("Identifiers should start with a letter or '_' character");
return;
}
@@ -1468,7 +1468,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
- result->msg = i18n("Invalid expression \"%1\"").arg(fieldName);
+ result->msg = i18n("Invalid expression \"%1\"").tqarg(fieldName);
return;
}
}
@@ -1490,7 +1490,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
KoProperty::Set *set = d->sets->findPropertySetForItem(*item); //*propertyBuffer();
if (!set) {
saveOldValue = false; // no old val.
- const int row = d->data->findRef(item);
+ const int row = d->data->tqfindRef(item);
if (row<0) {
result->success = false;
return;
@@ -1498,15 +1498,15 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
set = createPropertySet( row, tableName, fieldName, true );
propertySetSwitched();
}
- d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, QVariant(tableName), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(true,1));
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant(0));
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TABLE, TQVariant(tableName), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(true,1));
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));
#endif
if (!sortingAllowed(fieldName, tableName)) {
// sorting is not available for "*" or "table.*" rows
//! @todo what about expressions?
- d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, QVariant());
+ d->data->updateRowEditBuffer(item, COLUMN_ID_SORTING, TQVariant());
}
//update properties
(*set)["field"].setValue(fieldName, saveOldValue);
@@ -1517,13 +1517,13 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
if (alias.isEmpty()) //-generate smallest unique alias
alias = generateUniqueAlias();
}
- (*set)["isExpression"].setValue(QVariant(isExpression,1), saveOldValue);
+ (*set)["isExpression"].setValue(TQVariant(isExpression,1), saveOldValue);
if (!alias.isEmpty()) {
(*set)["alias"].setValue(alias, saveOldValue);
//pretty printed "alias: expr"
- newValue = QString(alias) + ": " + fieldName;
+ newValue = TQString(alias) + ": " + fieldName;
}
- (*set)["caption"].setValue(QString::null, saveOldValue);
+ (*set)["caption"].setValue(TQString(), saveOldValue);
(*set)["table"].setValue(tableName, saveOldValue);
updatePropertiesVisibility(*set);
}
@@ -1531,12 +1531,12 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
else if (colnum==COLUMN_ID_TABLE) {
if (newValue.isNull()) {
if (!item->at(COLUMN_ID_COLUMN).toString().isEmpty())
- d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, QVariant(), false/*!allowSignals*/);
- d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, QVariant(false,1));//invisible
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant());//remove totals
+ d->data->updateRowEditBuffer(item, COLUMN_ID_COLUMN, TQVariant(), false/*!allowSignals*/);
+ d->data->updateRowEditBuffer(item, COLUMN_ID_VISIBLE, TQVariant(false,1));//invisible
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant());//remove totals
#endif
- d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, QVariant());//remove crit.
+ d->data->updateRowEditBuffer(item, COLUMN_ID_CRITERIA, TQVariant());//remove crit.
d->sets->removeCurrentPropertySet();
}
//update property
@@ -1544,11 +1544,11 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
if (set) {
if ((*set)["isExpression"].value().toBool()==false) {
(*set)["table"] = newValue;
- (*set)["caption"] = QString::null;
+ (*set)["caption"] = TQString();
}
else {
//do not set table for expr. columns
- newValue = QVariant();
+ newValue = TQVariant();
}
// KoProperty::Set &set = *propertyBuffer();
updatePropertiesVisibility(*set);
@@ -1560,15 +1560,15 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
saveOldValue = false;
createPropertySet( d->dataTable->dataAwareObject()->currentRow(),
item->at(COLUMN_ID_TABLE).toString(), item->at(COLUMN_ID_COLUMN).toString(), true );
-#ifndef KEXI_NO_QUERY_TOTALS
- d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, QVariant(0));//totals
+#ifndef KEXI_NO_TQUERY_TOTALS
+ d->data->updateRowEditBuffer(item, COLUMN_ID_TOTALS, TQVariant(0));//totals
#endif
propertySetSwitched();
}
KoProperty::Set &set = *propertySet();
set["visible"].setValue(newValue, saveOldValue);
}
-#ifndef KEXI_NO_QUERY_TOTALS
+#ifndef KEXI_NO_TQUERY_TOTALS
else if (colnum==COLUMN_ID_TOTALS) {
//TODO:
//unused yet
@@ -1577,11 +1577,11 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
#endif
else if (colnum==COLUMN_ID_SORTING) {
KoProperty::Set *set = d->sets->findPropertySetForItem(*item);
- QString table( set->property("table").value().toString() );
- QString field( set->property("field").value().toString() );
+ TQString table( set->property("table").value().toString() );
+ TQString field( set->property("field").value().toString() );
if (newValue.toInt()==0 || sortingAllowed(field, table)) {
KoProperty::Property &property = set->property("sorting");
- QString key( property.listData()->keysAsStringList()[ newValue.toInt() ] );
+ TQString key( property.listData()->keysAsStringList()[ newValue.toInt() ] );
kexipluginsdbg << "new key=" << key << endl;
property.setValue(key, true);
}
@@ -1590,29 +1590,29 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->allowToDiscardChanges = true;
result->column = colnum;
result->msg = i18n("Could not set sorting for multiple columns (%1)")
- .arg(table=="*" ? table : (table+".*"));
+ .tqarg(table=="*" ? table : (table+".*"));
}
}
else if (colnum==COLUMN_ID_CRITERIA) {
//! @todo this is primitive, temporary: reuse SQL parser
- QString operatorStr, argStr;
+ TQString operatorStr, argStr;
KexiDB::BaseExpr* e = 0;
- const QString str = newValue.toString().stripWhiteSpace();
+ const TQString str = newValue.toString().stripWhiteSpace();
int token;
- QString field, table;
+ TQString field, table;
KoProperty::Set *set = d->sets->findPropertySetForItem(*item);
if (set) {
field = (*set)["field"].value().toString();
table = (*set)["table"].value().toString();
}
- if (!str.isEmpty() && (!set || table=="*" || field.find("*")!=-1)) {
+ if (!str.isEmpty() && (!set || table=="*" || field.tqfind("*")!=-1)) {
//asterisk found! criteria not allowed
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
if (propertySet())
result->msg = i18n("Could not set criteria for \"%1\"")
- .arg(table=="*" ? table : field);
+ .tqarg(table=="*" ? table : field);
else
result->msg = i18n("Could not set criteria for empty row");
//moved to result->allowToDiscardChanges handler //d->dataTable->dataAwareObject()->cancelEditor(); //prevents further editing of this cell
@@ -1620,7 +1620,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
else if (str.isEmpty() || (e = parseExpressionString(str, token, true/*allowRelationalOperator*/)))
{
if (e) {
- QString tokenStr;
+ TQString tokenStr;
if (token!='=') {
KexiDB::BinaryExpr be(KexiDBExpr_Relational, 0, token, 0);
tokenStr = be.tokenToString() + " ";
@@ -1630,7 +1630,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
delete e;
}
else if (str.isEmpty()) {
- (*set)["criteria"] = QVariant(); //clear it
+ (*set)["criteria"] = TQVariant(); //clear it
}
setDirty(true);
}
@@ -1638,7 +1638,7 @@ void KexiQueryDesignerGuiEditor::slotBeforeCellChanged(KexiTableItem *item, int
result->success = false;
result->allowToDiscardChanges = true;
result->column = colnum;
- result->msg = i18n("Invalid criteria \"%1\"").arg(newValue.toString());
+ result->msg = i18n("Invalid criteria \"%1\"").tqarg(newValue.toString());
}
}
}
@@ -1654,7 +1654,7 @@ void KexiQueryDesignerGuiEditor::slotAboutConnectionRemove(KexiRelationViewConne
}
void KexiQueryDesignerGuiEditor::slotTableFieldDoubleClicked(
- KexiDB::TableSchema* table, const QString& fieldName )
+ KexiDB::TableSchema* table, const TQString& fieldName )
{
if (!table || (!table->field(fieldName) && fieldName!="*"))
return;
@@ -1695,10 +1695,10 @@ void KexiQueryDesignerGuiEditor::updatePropertiesVisibility(KoProperty::Set& set
KoProperty::Set*
KexiQueryDesignerGuiEditor::createPropertySet( int row,
- const QString& tableName, const QString& fieldName, bool newOne )
+ const TQString& tableName, const TQString& fieldName, bool newOne )
{
//const bool asterisk = isAsterisk(tableName, fieldName);
- QString typeName = "KexiQueryDesignerGuiEditor::Column";
+ TQString typeName = "KexiQueryDesignerGuiEditor::Column";
KoProperty::Set *set = new KoProperty::Set(d->sets, typeName);
KoProperty::Property *prop;
@@ -1708,42 +1708,42 @@ KexiQueryDesignerGuiEditor::createPropertySet( int row,
//! \todo add table_field icon (add buff->addProperty(prop = new KexiProperty("this:iconName", "table_field") );
// prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("table", QVariant(tableName)) );
+ set->addProperty(prop = new KoProperty::Property("table", TQVariant(tableName)) );
prop->setVisible(false);//always hidden
- set->addProperty(prop = new KoProperty::Property("field", QVariant(fieldName)) );
+ set->addProperty(prop = new KoProperty::Property("field", TQVariant(fieldName)) );
prop->setVisible(false);//always hidden
- set->addProperty(prop = new KoProperty::Property("caption", QVariant(QString::null), i18n("Caption") ) );
+ set->addProperty(prop = new KoProperty::Property("caption", TQVariant(TQString()), i18n("Caption") ) );
#ifdef KEXI_NO_UNFINISHED
prop->setVisible(false);
#endif
- set->addProperty(prop = new KoProperty::Property("alias", QVariant(QString::null), i18n("Alias")) );
+ set->addProperty(prop = new KoProperty::Property("alias", TQVariant(TQString()), i18n("Alias")) );
- set->addProperty(prop = new KoProperty::Property("visible", QVariant(true, 4)) );
+ set->addProperty(prop = new KoProperty::Property("visible", TQVariant(true, 4)) );
prop->setVisible(false);
/*TODO:
- set->addProperty(prop = new KexiProperty("totals", QVariant(QString::null)) );
+ set->addProperty(prop = new KexiProperty("totals", TQVariant(TQString())) );
prop->setVisible(false);*/
//sorting
- QStringList slist, nlist;
+ TQStringList slist, nlist;
slist << "nosorting" << "ascending" << "descending";
nlist << i18n("None") << i18n("Ascending") << i18n("Descending");
set->addProperty(prop = new KoProperty::Property("sorting",
slist, nlist, *slist.at(0), i18n("Sorting")));
prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("criteria", QVariant(QString::null)) );
+ set->addProperty(prop = new KoProperty::Property("criteria", TQVariant(TQString())) );
prop->setVisible(false);
- set->addProperty(prop = new KoProperty::Property("isExpression", QVariant(false, 1)) );
+ set->addProperty(prop = new KoProperty::Property("isExpression", TQVariant(false, 1)) );
prop->setVisible(false);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ this, TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
d->sets->insert(row, set, newOne);
@@ -1758,12 +1758,12 @@ void KexiQueryDesignerGuiEditor::setFocus()
void KexiQueryDesignerGuiEditor::slotPropertyChanged(KoProperty::Set& set, KoProperty::Property& property)
{
- const QCString& pname = property.name();
+ const TQCString& pname = property.name();
/*
- * TODO (js) use KexiProperty::setValidator(QString) when implemented as described in TODO #60
+ * TODO (js) use KexiProperty::setValidator(TQString) when implemented as described in TODO #60
*/
if (pname=="alias" || pname=="name") {
- const QVariant& v = property.value();
+ const TQVariant& v = property.value();
if (!v.toString().stripWhiteSpace().isEmpty() && !KexiUtils::isIdentifier( v.toString() )) {
KMessageBox::sorry(this,
KexiUtils::identifierExpectedMessage(property.caption(), v.toString()));
@@ -1776,7 +1776,7 @@ void KexiQueryDesignerGuiEditor::slotPropertyChanged(KoProperty::Set& set, KoPro
// d->dataTable->dataAwareObject()->setCursorPosition(d->dataTable->dataAwareObject()->currentRow(),0);
//d->dataTable->dataAwareObject()->startEditCurrentCell();
d->data->updateRowEditBuffer(d->dataTable->dataAwareObject()->selectedItem(),
- 0, QVariant(set["alias"].value().toString() + ": " + set["field"].value().toString()));
+ 0, TQVariant(set["alias"].value().toString() + ": " + set["field"].value().toString()));
d->data->saveRowChanges(*d->dataTable->dataAwareObject()->selectedItem(), true);
// d->dataTable->dataAwareObject()->acceptRowEdit();
}
@@ -1794,7 +1794,7 @@ void KexiQueryDesignerGuiEditor::slotItemRemoved(const KexiPart::Item& item)
d->relations->objectDeleted(item.mimeType(), item.name().latin1());
}
-void KexiQueryDesignerGuiEditor::slotItemRenamed(const KexiPart::Item& item, const QCString& oldName)
+void KexiQueryDesignerGuiEditor::slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName)
{
d->relations->objectRenamed(item.mimeType(), oldName, item.name().latin1());
}
diff --git a/kexi/plugins/queries/kexiquerydesignerguieditor.h b/kexi/plugins/queries/kexiquerydesignerguieditor.h
index 03acb7f66..587e60a63 100644
--- a/kexi/plugins/queries/kexiquerydesignerguieditor.h
+++ b/kexi/plugins/queries/kexiquerydesignerguieditor.h
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERGUIEDITOR_H
-#define KEXIQUERYDESIGNERGUIEDITOR_H
+#ifndef KEXITQUERYDESIGNERGUIEDITOR_H
+#define KEXITQUERYDESIGNERGUIEDITOR_H
-#include <qguardedptr.h>
-#include <qsplitter.h>
+#include <tqguardedptr.h>
+#include <tqsplitter.h>
#include <kexiviewbase.h>
#include "kexiquerypart.h"
@@ -59,16 +59,17 @@ namespace KexiDB
class KexiQueryDesignerGuiEditor : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerGuiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiQueryDesignerGuiEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiQueryDesignerGuiEditor();
// KexiDB::QuerySchema *schema();
KexiRelationWidget *relationView() const;
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
virtual void setFocus();
@@ -76,7 +77,7 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
protected:
void initTableColumns(); //!< Called just once.
void initTableRows(); //!< Called to have all rows empty.
-//unused void addRow(const QString &tbl, const QString &field);
+//unused void addRow(const TQString &tbl, const TQString &field);
// void restore();
virtual tristate beforeSwitchTo(int mode, bool &dontStore);
virtual tristate afterSwitchFrom(int mode);
@@ -93,32 +94,32 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
virtual KoProperty::Set *propertySet();
KoProperty::Set* createPropertySet( int row,
- const QString& tableName, const QString& fieldName, bool newOne = false );
+ const TQString& tableName, const TQString& fieldName, bool newOne = false );
/*! Builds query schema out of information provided by gui.
The schema is stored in temp->query member.
\a errMsg is optional error message returned.
\return true on proper schema creation. */
- bool buildSchema(QString *errMsg = 0);
+ bool buildSchema(TQString *errMsg = 0);
KexiQueryPart::TempData * tempData() const;
/*! Helper: allocates and initializes new table view's row. Doesn't insert it, just returns.
\a tableName and \a fieldName shoudl be provided.
\a visible flag sets value for "Visible" column. */
- KexiTableItem* createNewRow(const QString& tableName, const QString& fieldName,
+ KexiTableItem* createNewRow(const TQString& tableName, const TQString& fieldName,
bool visible) const;
- KexiDB::BaseExpr* parseExpressionString(const QString& fullString, int& token,
+ KexiDB::BaseExpr* parseExpressionString(const TQString& fullString, int& token,
bool allowRelationalOperator);
- QCString generateUniqueAlias() const;
+ TQCString generateUniqueAlias() const;
void updatePropertiesVisibility(KoProperty::Set& buf);
protected slots:
- void slotDragOverTableRow(KexiTableItem *item, int row, QDragMoveEvent* e);
+ void slotDragOverTableRow(KexiTableItem *item, int row, TQDragMoveEvent* e);
void slotDroppedAtRow(KexiTableItem *item, int row,
- QDropEvent *ev, KexiTableItem*& newItem);
+ TQDropEvent *ev, KexiTableItem*& newItem);
//! Reaction on appending a new item after deleting one
void slotNewItemAppendedForAfterDeletingInSpreadSheetMode();
void slotTableAdded(KexiDB::TableSchema &t);
@@ -126,17 +127,17 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
//! Called before cell change in tableview.
void slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result);
+ TQVariant& newValue, KexiDB::ResultInfo* result);
- void slotRowInserted(KexiTableItem* item, uint row, bool repaint);
+ void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint);
void slotTablePositionChanged(KexiRelationViewTableContainer*);
void slotAboutConnectionRemove(KexiRelationViewConnection*);
- void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const QString& fieldName );
+ void slotTableFieldDoubleClicked( KexiDB::TableSchema* table, const TQString& fieldName );
- /*! Loads layout of relation GUI diagram. */
+ /*! Loads tqlayout of relation GUI diagram. */
bool loadLayout();
- /*! Stores layout of relation GUI diagram. */
+ /*! Stores tqlayout of relation GUI diagram. */
bool storeLayout();
void showTablesForQuery(KexiDB::QuerySchema *query);
@@ -154,10 +155,10 @@ class KexiQueryDesignerGuiEditor : public KexiViewBase
void slotPropertyChanged(KoProperty::Set& list, KoProperty::Property& property);
-// void slotObjectCreated(const QCString &mime, const QCString& name);
+// void slotObjectCreated(const TQCString &mime, const TQCString& name);
void slotNewItemStored(KexiPart::Item&);
void slotItemRemoved(const KexiPart::Item& item);
- void slotItemRenamed(const KexiPart::Item& item, const QCString& oldName);
+ void slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName);
private:
class Private;
diff --git a/kexi/plugins/queries/kexiquerydesignersql.cpp b/kexi/plugins/queries/kexiquerydesignersql.cpp
index 469d551c5..36455837f 100644
--- a/kexi/plugins/queries/kexiquerydesignersql.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersql.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qsplitter.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtimer.h>
+#include <tqsplitter.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -45,7 +45,7 @@
#include "kexisectionheader.h"
-static bool compareSQL(const QString& sql1, const QString& sql2)
+static bool compareSQL(const TQString& sql1, const TQString& sql2)
{
//TODO: use reformatting functions here
return sql1.stripWhiteSpace()==sql2.stripWhiteSpace();
@@ -73,18 +73,18 @@ class KexiQueryDesignerSQLView::Private
}
KexiQueryDesignerSQLEditor *editor;
KexiQueryDesignerSQLHistory *history;
- QLabel *pixmapStatus, *lblStatus;
- QHBox *status_hbox;
- QVBox *history_section;
+ TQLabel *pixmaptqStatus, *lbltqStatus;
+ TQHBox *status_hbox;
+ TQVBox *history_section;
KexiSectionHeader *head, *historyHead;
- QPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo;
- QSplitter *splitter;
+ TQPixmap statusPixmapOk, statusPixmapErr, statusPixmapInfo;
+ TQSplitter *splitter;
KToggleAction *action_toggle_history;
//! For internal use, this pointer is usually copied to TempData structure,
//! when switching out of this view (then it's cleared).
KexiDB::QuerySchema *parsedQuery;
//! For internal use, statement passed in switching to this view
- QString origStatement;
+ TQString origStatement;
//! needed to remember height for both modes, between switching
int heightForStatusMode, heightForHistoryMode;
//! helper for slotUpdateMode()
@@ -99,58 +99,58 @@ class KexiQueryDesignerSQLView::Private
//===================
-KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiQueryDesignerSQLView::KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, d( new Private() )
{
- d->splitter = new QSplitter(this);
- d->splitter->setOrientation(Vertical);
- d->head = new KexiSectionHeader(i18n("SQL Query Text"), Vertical, d->splitter);
+ d->splitter = new TQSplitter(this);
+ d->splitter->setOrientation(Qt::Vertical);
+ d->head = new KexiSectionHeader(i18n("SQL Query Text"),Qt::Vertical, d->splitter);
d->editor = new KexiQueryDesignerSQLEditor(mainWin, d->head, "sqle");
// d->editor->installEventFilter(this);//for keys
- connect(d->editor, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(d->editor, TQT_SIGNAL(textChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotTextChanged()));
addChildView(d->editor);
setViewWidget(d->editor);
d->splitter->setFocusProxy(d->editor);
setFocusProxy(d->editor);
- d->history_section = new QVBox(d->splitter);
+ d->history_section = new TQVBox(d->splitter);
- d->status_hbox = new QHBox(d->history_section);
+ d->status_hbox = new TQHBox(d->history_section);
d->status_hbox->installEventFilter(this);
- d->splitter->setResizeMode(d->history_section, QSplitter::KeepSize);
+ d->splitter->setResizeMode(d->history_section, TQSplitter::KeepSize);
d->status_hbox->setSpacing(0);
- d->pixmapStatus = new QLabel(d->status_hbox);
- d->pixmapStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
- d->pixmapStatus->setAlignment(AlignHCenter | AlignTop);
- d->pixmapStatus->setMargin(d->statusPixmapOk.width()/4);
- d->pixmapStatus->setPaletteBackgroundColor( palette().active().color(QColorGroup::Base) );
-
- d->lblStatus = new QLabel(d->status_hbox);
- d->lblStatus->setAlignment(AlignLeft | AlignTop | WordBreak);
- d->lblStatus->setMargin(d->statusPixmapOk.width()/4);
- d->lblStatus->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding );
- d->lblStatus->resize(d->lblStatus->width(),d->statusPixmapOk.width()*3);
- d->lblStatus->setPaletteBackgroundColor( palette().active().color(QColorGroup::Base) );
-
- QHBoxLayout *b = new QHBoxLayout(this);
+ d->pixmaptqStatus = new TQLabel(d->status_hbox);
+ d->pixmaptqStatus->setFixedWidth(d->statusPixmapOk.width()*3/2);
+ d->pixmaptqStatus->tqsetAlignment(AlignHCenter | AlignTop);
+ d->pixmaptqStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->pixmaptqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+
+ d->lbltqStatus = new TQLabel(d->status_hbox);
+ d->lbltqStatus->tqsetAlignment(AlignLeft | AlignTop | WordBreak);
+ d->lbltqStatus->setMargin(d->statusPixmapOk.width()/4);
+ d->lbltqStatus->tqsetSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
+ d->lbltqStatus->resize(d->lbltqStatus->width(),d->statusPixmapOk.width()*3);
+ d->lbltqStatus->setPaletteBackgroundColor( tqpalette().active().color(TQColorGroup::Base) );
+
+ TQHBoxLayout *b = new TQHBoxLayout(this);
b->addWidget(d->splitter);
- plugSharedAction("querypart_check_query", this, SLOT(slotCheckQuery()));
- plugSharedAction("querypart_view_toggle_history", this, SLOT(slotUpdateMode()));
+ plugSharedAction("querypart_check_query", TQT_TQOBJECT(this), TQT_SLOT(slotCheckQuery()));
+ plugSharedAction("querypart_view_toggle_history", TQT_TQOBJECT(this), TQT_SLOT(slotUpdateMode()));
d->action_toggle_history = static_cast<KToggleAction*>( sharedAction( "querypart_view_toggle_history" ) );
- d->historyHead = new KexiSectionHeader(i18n("SQL Query History"), Vertical, d->history_section);
+ d->historyHead = new KexiSectionHeader(i18n("SQL Query History"),Qt::Vertical, d->history_section);
d->historyHead->installEventFilter(this);
d->history = new KexiQueryDesignerSQLHistory(d->historyHead, "sql_history");
- static const QString msg_back = i18n("Back to Selected Query");
- static const QString msg_clear = i18n("Clear History");
- d->historyHead->addButton("select_item", msg_back, this, SLOT(slotSelectQuery()));
- d->historyHead->addButton("editclear", msg_clear, d->history, SLOT(clear()));
- d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, this, SLOT(slotSelectQuery()));
- d->history->popupMenu()->insertItem(SmallIcon("editclear"), msg_clear, d->history, SLOT(clear()));
- connect(d->history, SIGNAL(currentItemDoubleClicked()), this, SLOT(slotSelectQuery()));
+ static const TQString msg_back = i18n("Back to Selected Query");
+ static const TQString msg_clear = i18n("Clear History");
+ d->historyHead->addButton("select_item", msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
+ d->historyHead->addButton("editclear", msg_clear, TQT_TQOBJECT(d->history), TQT_SLOT(clear()));
+ d->history->popupMenu()->insertItem(SmallIcon("select_item"), msg_back, TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
+ d->history->popupMenu()->insertItem(SmallIcon("editclear"), msg_clear, d->history, TQT_SLOT(clear()));
+ connect(d->history, TQT_SIGNAL(currentItemDoubleClicked()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectQuery()));
d->heightForHistoryMode = -1; //height() / 2;
//d->historyHead->hide();
@@ -171,36 +171,36 @@ KexiQueryDesignerSQLEditor *KexiQueryDesignerSQLView::editor() const
void KexiQueryDesignerSQLView::setStatusOk()
{
- d->pixmapStatus->setPixmap(d->statusPixmapOk);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapOk);
setStatusText("<h2>"+i18n("The query is correct")+"</h2>");
- d->history->addEvent(d->editor->text().stripWhiteSpace(), true, QString::null);
+ d->history->addEvent(d->editor->text().stripWhiteSpace(), true, TQString());
}
-void KexiQueryDesignerSQLView::setStatusError(const QString& msg)
+void KexiQueryDesignerSQLView::setStatusError(const TQString& msg)
{
- d->pixmapStatus->setPixmap(d->statusPixmapErr);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapErr);
setStatusText("<h2>"+i18n("The query is incorrect")+"</h2><p>"+msg+"</p>");
d->history->addEvent(d->editor->text().stripWhiteSpace(), false, msg);
}
void KexiQueryDesignerSQLView::setStatusEmpty()
{
- d->pixmapStatus->setPixmap(d->statusPixmapInfo);
+ d->pixmaptqStatus->setPixmap(d->statusPixmapInfo);
setStatusText(i18n("Please enter your query and execute \"Check query\" function to verify it."));
}
-void KexiQueryDesignerSQLView::setStatusText(const QString& text)
+void KexiQueryDesignerSQLView::setStatusText(const TQString& text)
{
if (!d->action_toggle_history->isChecked()) {
- QSimpleRichText rt(text, d->lblStatus->font());
- rt.setWidth(d->lblStatus->width());
- QValueList<int> sz = d->splitter->sizes();
- const int newHeight = rt.height()+d->lblStatus->margin()*2;
+ TQSimpleRichText rt(text, d->lbltqStatus->font());
+ rt.setWidth(d->lbltqStatus->width());
+ TQValueList<int> sz = d->splitter->sizes();
+ const int newHeight = rt.height()+d->lbltqStatus->margin()*2;
if (sz[1]<newHeight) {
sz[1] = newHeight;
d->splitter->setSizes(sz);
}
- d->lblStatus->setText(text);
+ d->lbltqStatus->setText(text);
}
}
@@ -210,7 +210,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
//TODO
dontStore = true;
if (mode==Kexi::DesignViewMode || mode==Kexi::DataViewMode) {
- QString sqlText = d->editor->text().stripWhiteSpace();
+ TQString sqlText = d->editor->text().stripWhiteSpace();
KexiQueryPart::TempData * temp = tempData();
if (sqlText.isEmpty()) {
//special case: empty SQL text
@@ -222,7 +222,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
}
}
else {
- const bool designViewWasVisible = parentDialog()->viewForMode(mode)!=0;
+ const bool designViewWasVisible = tqparentDialog()->viewForMode(mode)!=0;
//should we check SQL text?
if (designViewWasVisible
&& !d->justSwitchedFromNoViewMode //unchanged, but we should check SQL text
@@ -274,7 +274,7 @@ KexiQueryDesignerSQLView::beforeSwitchTo(int mode, bool &dontStore)
}
setDirty(true);*/
-// if (parentDialog()->hasFocus())
+// if (tqparentDialog()->hasFocus())
d->editor->setFocus();
return true;
}
@@ -287,13 +287,13 @@ KexiQueryDesignerSQLView::afterSwitchFrom(int mode)
if (mode==Kexi::NoViewMode) {
//User opened text view _directly_.
//This flag is set to indicate for beforeSwitchTo() that even if text has not been changed,
- //SQL text should be invalidated.
+ //SQL text should be tqinvalidated.
d->justSwitchedFromNoViewMode = true;
}
KexiQueryPart::TempData * temp = tempData();
KexiDB::QuerySchema *query = temp->query();
if (!query) {//try to just get saved schema, instead of temporary one
- query = dynamic_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ query = dynamic_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
}
if (mode!=0/*failure only if it is switching from prev. view*/ && !query) {
@@ -320,11 +320,11 @@ KexiQueryDesignerSQLView::afterSwitchFrom(int mode)
d->slotTextChangedEnabled = false;
d->editor->setText( d->origStatement );
d->slotTextChangedEnabled = true;
- QTimer::singleShot(100, d->editor, SLOT(setFocus()));
+ TQTimer::singleShot(100, d->editor, TQT_SLOT(setFocus()));
return true;
}
-QString
+TQString
KexiQueryDesignerSQLView::sqlText() const
{
return d->editor->text();
@@ -332,7 +332,7 @@ KexiQueryDesignerSQLView::sqlText() const
bool KexiQueryDesignerSQLView::slotCheckQuery()
{
- QString sqlText( d->editor->text().stripWhiteSpace() );
+ TQString sqlText( d->editor->text().stripWhiteSpace() );
if (sqlText.isEmpty()) {
delete d->parsedQuery;
d->parsedQuery = 0;
@@ -366,7 +366,7 @@ void KexiQueryDesignerSQLView::slotUpdateMode()
d->eventFilterForSplitterEnabled = false;
- QValueList<int> sz = d->splitter->sizes();
+ TQValueList<int> sz = d->splitter->sizes();
d->action_toggle_history_was_checked = d->action_toggle_history->isChecked();
int heightToSet = -1;
if (d->action_toggle_history->isChecked()) {
@@ -407,13 +407,13 @@ void KexiQueryDesignerSQLView::slotTextChanged()
setStatusEmpty();
}
-bool KexiQueryDesignerSQLView::eventFilter( QObject *o, QEvent *e )
+bool KexiQueryDesignerSQLView::eventFilter( TQObject *o, TQEvent *e )
{
if (d->eventFilterForSplitterEnabled) {
- if (e->type()==QEvent::Resize && o && o==d->historyHead && d->historyHead->isVisible()) {
+ if (e->type()==TQEvent::Resize && o && TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->historyHead) && d->historyHead->isVisible()) {
d->heightForHistoryMode = d->historyHead->height();
}
- else if (e->type()==QEvent::Resize && o && o==d->status_hbox && d->status_hbox->isVisible()) {
+ else if (e->type()==TQEvent::Resize && o && TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->status_hbox) && d->status_hbox->isVisible()) {
d->heightForStatusMode = d->status_hbox->height();
}
}
@@ -432,7 +432,7 @@ void KexiQueryDesignerSQLView::updateActions(bool activated)
void KexiQueryDesignerSQLView::slotSelectQuery()
{
- QString sql = d->history->selectedStatement();
+ TQString sql = d->history->selectedStatement();
if (!sql.isEmpty()) {
d->editor->setText( sql );
}
@@ -441,7 +441,7 @@ void KexiQueryDesignerSQLView::slotSelectQuery()
KexiQueryPart::TempData *
KexiQueryDesignerSQLView::tempData() const
{
- return dynamic_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ return dynamic_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
}
KexiDB::SchemaData*
@@ -449,7 +449,7 @@ KexiQueryDesignerSQLView::storeNewData(const KexiDB::SchemaData& sdata, bool &ca
{
Q_UNUSED( cancel );
- //here: we won't store query layout: it will be recreated 'by hand' in GUI Query Editor
+ //here: we won't store query tqlayout: it will be recreated 'by hand' in GUI Query Editor
bool queryOK = slotCheckQuery();
bool ok = true;
KexiDB::SchemaData* query = 0;
@@ -519,7 +519,7 @@ tristate KexiQueryDesignerSQLView::storeData(bool dontAsk)
#endif
}
if (res == true) {
- QString empty_xml;
+ TQString empty_xml;
res = storeDataBlock( empty_xml, "query_layout" ); //clear
}
if (!res)
@@ -528,7 +528,7 @@ tristate KexiQueryDesignerSQLView::storeData(bool dontAsk)
}
-/*void KexiQueryDesignerSQLView::slotHistoryHeaderButtonClicked(const QString& buttonIdentifier)
+/*void KexiQueryDesignerSQLView::slotHistoryHeaderButtonClicked(const TQString& buttonIdentifier)
{
if (buttonIdentifier=="select_query") {
slotSelectQuery();
diff --git a/kexi/plugins/queries/kexiquerydesignersql.h b/kexi/plugins/queries/kexiquerydesignersql.h
index f31c838f6..ae07d4571 100644
--- a/kexi/plugins/queries/kexiquerydesignersql.h
+++ b/kexi/plugins/queries/kexiquerydesignersql.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERSQL_H
-#define KEXIQUERYDESIGNERSQL_H
+#ifndef KEXITQUERYDESIGNERSQL_H
+#define KEXITQUERYDESIGNERSQL_H
#include <kexiviewbase.h>
#include "kexiquerypart.h"
@@ -35,15 +35,16 @@ class KexiQueryDesignerSQLViewPrivate;
class KexiQueryDesignerSQLView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerSQLView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiQueryDesignerSQLView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiQueryDesignerSQLView();
- QString sqlText() const;
+ TQString sqlText() const;
KexiQueryDesignerSQLEditor *editor() const;
- virtual bool eventFilter ( QObject *o, QEvent *e );
+ virtual bool eventFilter ( TQObject *o, TQEvent *e );
protected:
KexiQueryPart::TempData * tempData() const;
@@ -54,9 +55,9 @@ class KexiQueryDesignerSQLView : public KexiViewBase
virtual tristate storeData(bool dontAsk = false);
void setStatusOk();
- void setStatusError(const QString& msg);
+ void setStatusError(const TQString& msg);
void setStatusEmpty();
- void setStatusText(const QString& text);
+ void setStatusText(const TQString& text);
virtual void updateActions(bool activated);
@@ -66,7 +67,7 @@ class KexiQueryDesignerSQLView : public KexiViewBase
bool slotCheckQuery();
void slotUpdateMode();
void slotTextChanged();
-// void slotHistoryHeaderButtonClicked(const QString& buttonIdentifier);
+// void slotHistoryHeaderButtonClicked(const TQString& buttonIdentifier);
void slotSelectQuery();
signals:
diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
index d86caf83c..19c0e06aa 100644
--- a/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
+++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.cpp
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qclipboard.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqclipboard.h>
+#include <tqregexp.h>
#include <kpopupmenu.h>
#include <klocale.h>
@@ -31,8 +31,8 @@
#include "kexiquerydesignersqlhistory.h"
-KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(QWidget *parent, const char *name)
- : QScrollView(parent, name)
+KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(TQWidget *tqparent, const char *name)
+ : TQScrollView(tqparent, name)
{
viewport()->setPaletteBackgroundColor(white);
@@ -41,7 +41,7 @@ KexiQueryDesignerSQLHistory::KexiQueryDesignerSQLHistory(QWidget *parent, const
m_history->setAutoDelete(true);
m_popup = new KPopupMenu(this);
- m_popup->insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, SLOT(slotToClipboard()));
+ m_popup->insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, TQT_SLOT(slotToClipboard()));
}
KexiQueryDesignerSQLHistory::~KexiQueryDesignerSQLHistory()
@@ -49,65 +49,65 @@ KexiQueryDesignerSQLHistory::~KexiQueryDesignerSQLHistory()
}
void
-KexiQueryDesignerSQLHistory::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
+KexiQueryDesignerSQLHistory::drawContents(TQPainter *p, int cx, int cy, int cw, int ch)
{
- QRect clipping(cx, cy, cw, ch);
+ TQRect clipping(cx, cy, cw, ch);
int y = 0;
for(HistoryEntry *it = m_history->first(); it; it = m_history->next())
{
// it->drawItem(p, visibleWidth());
- if(clipping.intersects(it->geometry(y, visibleWidth(), fontMetrics())))
+ if(clipping.intersects(it->tqgeometry(y, visibleWidth(), fontMetrics())))
{
p->saveWorldMatrix();
p->translate(0, y);
- it->drawItem(p, visibleWidth(), colorGroup());
+ it->drawItem(p, visibleWidth(), tqcolorGroup());
p->restoreWorldMatrix();
}
- y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
}
void
-KexiQueryDesignerSQLHistory::contentsMousePressEvent(QMouseEvent * e)
+KexiQueryDesignerSQLHistory::contentsMousePressEvent(TQMouseEvent * e)
{
int y = 0;
HistoryEntry *popupHistory = 0;
int pos;
- for(QPtrListIterator<HistoryEntry> it(*m_history); it.current(); ++it)
+ for(TQPtrListIterator<HistoryEntry> it(*m_history); it.current(); ++it)
{
if(it.current()->isSelected())
{
//clear
- it.current()->setSelected(false, colorGroup());
- updateContents(it.current()->geometry(y, visibleWidth(), fontMetrics()));
+ it.current()->setSelected(false, tqcolorGroup());
+ updateContents(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()));
}
- if(it.current()->geometry(y, visibleWidth(), fontMetrics()).contains(e->pos()))
+ if(it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).tqcontains(e->pos()))
{
popupHistory = it.current();
pos = y;
}
- y += it.current()->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it.current()->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
//now do update
if (popupHistory) {
if (m_selected && m_selected != popupHistory) {
- m_selected->setSelected(false, colorGroup());
- updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics()));
+ m_selected->setSelected(false, tqcolorGroup());
+ updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
}
m_selected = popupHistory;
- m_selected->setSelected(true, colorGroup());
- updateContents(m_selected->geometry(pos, visibleWidth(), fontMetrics()));
- if(e->button() == RightButton) {
+ m_selected->setSelected(true, tqcolorGroup());
+ updateContents(m_selected->tqgeometry(pos, visibleWidth(), fontMetrics()));
+ if(e->button() == Qt::RightButton) {
m_popup->exec(e->globalPos());
}
}
}
void
-KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(QMouseEvent * e)
+KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(TQMouseEvent * e)
{
contentsMousePressEvent(e);
if (m_selected)
@@ -115,17 +115,17 @@ KexiQueryDesignerSQLHistory::contentsMouseDoubleClickEvent(QMouseEvent * e)
}
void
-KexiQueryDesignerSQLHistory::addEvent(const QString& q, bool s, const QString &error)
+KexiQueryDesignerSQLHistory::addEvent(const TQString& q, bool s, const TQString &error)
{
HistoryEntry *he=m_history->last();
if (he) {
if (he->statement()==q) {
- he->updateTime(QTime::currentTime());
- repaint();
+ he->updateTime(TQTime::currentTime());
+ tqrepaint();
return;
}
}
- addEntry(new HistoryEntry(s, QTime::currentTime(), q, error));
+ addEntry(new HistoryEntry(s, TQTime::currentTime(), q, error));
}
void
@@ -137,37 +137,37 @@ KexiQueryDesignerSQLHistory::addEntry(HistoryEntry *e)
int y = 0;
for(HistoryEntry *it = m_history->first(); it; it = m_history->next())
{
- y += it->geometry(y, visibleWidth(), fontMetrics()).height() + 5;
+ y += it->tqgeometry(y, visibleWidth(), fontMetrics()).height() + 5;
}
resizeContents(visibleWidth() - 1, y);
if (m_selected) {
- m_selected->setSelected(false, colorGroup());
+ m_selected->setSelected(false, tqcolorGroup());
}
m_selected = e;
- m_selected->setSelected(true, colorGroup());
+ m_selected->setSelected(true, tqcolorGroup());
ensureVisible(0,y+5);
updateContents();
/* ensureVisible(0, 0);
if (m_selected) {
- m_selected->setSelected(false, colorGroup());
+ m_selected->setSelected(false, tqcolorGroup());
}
m_selected = e;
- m_selected->setSelected(true, colorGroup());
+ m_selected->setSelected(true, tqcolorGroup());
// updateContents();
- updateContents(m_selected->geometry(0, visibleWidth(), fontMetrics()));*/
+ updateContents(m_selected->tqgeometry(0, visibleWidth(), fontMetrics()));*/
}
/*void
-KexiQueryDesignerSQLHistory::contextMenu(const QPoint &pos, HistoryEntry *)
+KexiQueryDesignerSQLHistory::contextMenu(const TQPoint &pos, HistoryEntry *)
{
KPopupMenu p(this);
- p.insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, SLOT(slotToClipboard()));
+ p.insertItem(SmallIcon("editcopy"), i18n("Copy to Clipboard"), this, TQT_SLOT(slotToClipboard()));
#ifndef KEXI_NO_UNFINISHED
p.insertSeparator();
- p.insertItem(SmallIcon("edit"), i18n("Edit"), this, SLOT(slotEdit()));
+ p.insertItem(SmallIcon("edit"), i18n("Edit"), this, TQT_SLOT(slotEdit()));
p.insertItem(SmallIcon("reload"), i18n("Requery"));
#endif
@@ -180,7 +180,7 @@ KexiQueryDesignerSQLHistory::slotToClipboard()
if(!m_selected)
return;
- QApplication::clipboard()->setText(m_selected->statement(), QClipboard::Clipboard);
+ TQApplication::tqclipboard()->setText(m_selected->statement(), TQClipboard::Clipboard);
}
void
@@ -189,10 +189,10 @@ KexiQueryDesignerSQLHistory::slotEdit()
emit editRequested(m_selected->statement());
}
-QString
+TQString
KexiQueryDesignerSQLHistory::selectedStatement() const
{
- return m_selected ? m_selected->statement() : QString::null;
+ return m_selected ? m_selected->statement() : TQString();
}
void
@@ -216,37 +216,37 @@ KPopupMenu* KexiQueryDesignerSQLHistory::popupMenu() const
//==================================
-HistoryEntry::HistoryEntry(bool succeed, const QTime &execTime, const QString &statement, /*int ,*/ const QString &err)
+HistoryEntry::HistoryEntry(bool succeed, const TQTime &execTime, const TQString &statement, /*int ,*/ const TQString &err)
{
m_succeed = succeed;
m_execTime = execTime;
m_statement = statement;
m_error = err;
m_selected = false;
- highlight(QColorGroup());
+ highlight(TQColorGroup());
}
void
-HistoryEntry::drawItem(QPainter *p, int width, const QColorGroup &cg)
+HistoryEntry::drawItem(TQPainter *p, int width, const TQColorGroup &cg)
{
- p->setPen(QColor(200, 200, 200));
- p->setBrush(QColor(200, 200, 200));
+ p->setPen(TQColor(200, 200, 200));
+ p->setBrush(TQColor(200, 200, 200));
p->drawRect(2, 2, 200, 20);
- p->setPen(QColor(0, 0, 0));
+ p->setPen(TQColor(0, 0, 0));
if(m_succeed)
p->drawPixmap(4, 4, SmallIcon("button_ok"));
else
p->drawPixmap(4, 4, SmallIcon("button_cancel"));
- p->drawText(22, 2, 180, 20, Qt::AlignLeft | Qt::AlignVCenter, m_execTime.toString());
- p->setPen(QColor(200, 200, 200));
- p->setBrush(QColor(255, 255, 255));
+ p->drawText(22, 2, 180, 20, TQt::AlignLeft | TQt::AlignVCenter, m_execTime.toString());
+ p->setPen(TQColor(200, 200, 200));
+ p->setBrush(TQColor(255, 255, 255));
m_formated->setWidth(width - 2);
- QRect content(2, 21, width - 2, m_formated->height());
-// QRect content = p->fontMetrics().boundingRect(2, 21, width - 2, 0, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement);
-// QRect content(2, 21, width - 2, p->fontMetrics().height() + 4);
-// content = QRect(2, 21, width - 2, m_for.height());
+ TQRect content(2, 21, width - 2, m_formated->height());
+// TQRect content = p->fontMetrics().boundingRect(2, 21, width - 2, 0, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement);
+// TQRect content(2, 21, width - 2, p->fontMetrics().height() + 4);
+// content = TQRect(2, 21, width - 2, m_for.height());
if(m_selected)
p->setBrush(cg.highlight());
@@ -260,36 +260,36 @@ HistoryEntry::drawItem(QPainter *p, int width, const QColorGroup &cg)
content.setX(content.x() + 2);
content.setWidth(content.width() - 2);
-// p->drawText(content, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement);
+// p->drawText(content, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement);
m_formated->draw(p, content.x(), content.y(), content, cg);
}
void
-HistoryEntry::highlight(const QColorGroup &cg)
+HistoryEntry::highlight(const TQColorGroup &cg)
{
- QString statement;
- QString text;
+ TQString statement;
+ TQString text;
bool quote = false;
bool dblquote = false;
statement = m_statement;
- statement.replace("<", "&lt;");
- statement.replace(">", "&gt;");
- statement.replace("\r\n", "<br>"); //(js) first win32 specific pair
- statement.replace("\n", "<br>"); // now single \n
- statement.replace(" ", "&nbsp;");
- statement.replace("\t", "&nbsp;&nbsp;&nbsp;");
+ statement.tqreplace("<", "&lt;");
+ statement.tqreplace(">", "&gt;");
+ statement.tqreplace("\r\n", "<br>"); //(js) first win32 specific pair
+ statement.tqreplace("\n", "<br>"); // now single \n
+ statement.tqreplace(" ", "&nbsp;");
+ statement.tqreplace("\t", "&nbsp;&nbsp;&nbsp;");
// getting quoting...
if(!m_selected)
{
for(int i=0; i < (int)statement.length(); i++)
{
- QString beginTag;
- QString endTag;
- QChar curr = QChar(statement[i]);
+ TQString beginTag;
+ TQString endTag;
+ TQChar curr = TQChar(statement[i]);
- if(curr == "'" && !dblquote && QChar(statement[i-1]) != "\\")
+ if(TQString(curr) == "'" && !dblquote && TQString(TQChar(statement[i-1])) != "\\")
{
if(!quote)
{
@@ -302,7 +302,7 @@ HistoryEntry::highlight(const QColorGroup &cg)
endTag += "</font>";
}
}
- if(curr == "\"" && !quote && QChar(statement[i-1]) != "\\")
+ if(TQString(curr) == "\"" && !quote && TQString(TQChar(statement[i-1])) != "\\")
{
if(!dblquote)
{
@@ -315,7 +315,7 @@ HistoryEntry::highlight(const QColorGroup &cg)
endTag += "</font>";
}
}
- if(QRegExp("[0-9]").exactMatch(QString(curr)) && !quote && !dblquote)
+ if(TQRegExp("[0-9]").exactMatch(TQString(curr)) && !quote && !dblquote)
{
beginTag += "<font color=\"#0000ff\">";
endTag += "</font>";
@@ -326,43 +326,43 @@ HistoryEntry::highlight(const QColorGroup &cg)
}
else
{
- text = QString("<font color=\"%1\">%2").arg(cg.highlightedText().name()).arg(statement);
+ text = TQString("<font color=\"%1\">%2").tqarg(cg.highlightedText().name()).tqarg(statement);
}
- QRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b");
+ TQRegExp keywords("\\b(SELECT|UPDATE|INSERT|DELETE|DROP|FROM|WHERE|AND|OR|NOT|NULL|JOIN|LEFT|RIGHT|ON|INTO|TABLE)\\b");
keywords.setCaseSensitive(false);
- text = text.replace(keywords, "<b>\\1</b>");
+ text = text.tqreplace(keywords, "<b>\\1</b>");
if(!m_error.isEmpty())
-// text += ("<br>"+i18n("Error: %1").arg(m_error));
-// text += QString("<br><font face=\"") + KGlobalSettings::generalFont().family() + QString("\" size=\"-1\">") + i18n("Error: %1").arg(m_error) + "</font>";
- text += QString("<br><font face=\"") + KGlobalSettings::generalFont().family() + QString("\">") + i18n("Error: %1").arg(m_error) + "</font>";
+// text += ("<br>"+i18n("Error: %1").tqarg(m_error));
+// text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\" size=\"-1\">") + i18n("Error: %1").tqarg(m_error) + "</font>";
+ text += TQString("<br><font face=\"") + KGlobalSettings::generalFont().family() + TQString("\">") + i18n("Error: %1").tqarg(m_error) + "</font>";
kdDebug() << "HistoryEntry::highlight() text:" << text << endl;
-// m_formated = new QSimpleRichText(text, QFont("courier", 8));
- m_formated = new QSimpleRichText(text, KGlobalSettings::fixedFont());
+// m_formated = new TQSimpleRichText(text, TQFont("courier", 8));
+ m_formated = new TQSimpleRichText(text, KGlobalSettings::fixedFont());
}
void
-HistoryEntry::setSelected(bool selected, const QColorGroup &cg)
+HistoryEntry::setSelected(bool selected, const TQColorGroup &cg)
{
m_selected = selected;
highlight(cg);
}
-QRect
-HistoryEntry::geometry(int y, int width, QFontMetrics f)
+TQRect
+HistoryEntry::tqgeometry(int y, int width, TQFontMetrics f)
{
Q_UNUSED( f );
-// int h = 21 + f.boundingRect(2, 21, width - 2, 0, Qt::WordBreak | Qt::AlignLeft | Qt::AlignVCenter, m_statement).height();
-// return QRect(0, y, width, h);
+// int h = 21 + f.boundingRect(2, 21, width - 2, 0, TQt::WordBreak | TQt::AlignLeft | TQt::AlignVCenter, m_statement).height();
+// return TQRect(0, y, width, h);
m_formated->setWidth(width - 2);
- return QRect(0, y, width, m_formated->height() + 21);
+ return TQRect(0, y, width, m_formated->height() + 21);
}
-void HistoryEntry::updateTime(const QTime &execTime) {
+void HistoryEntry::updateTime(const TQTime &execTime) {
m_execTime=execTime;
}
diff --git a/kexi/plugins/queries/kexiquerydesignersqlhistory.h b/kexi/plugins/queries/kexiquerydesignersqlhistory.h
index a8d0c2e08..6709a22fd 100644
--- a/kexi/plugins/queries/kexiquerydesignersqlhistory.h
+++ b/kexi/plugins/queries/kexiquerydesignersqlhistory.h
@@ -18,65 +18,66 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERSQLHISTORY_H
-#define KEXIQUERYDESIGNERSQLHISTORY_H
+#ifndef KEXITQUERYDESIGNERSQLHISTORY_H
+#define KEXITQUERYDESIGNERSQLHISTORY_H
-#include <qscrollview.h>
-#include <qdatetime.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qsimplerichtext.h>
+#include <tqscrollview.h>
+#include <tqdatetime.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqsimplerichtext.h>
-class QSimpleRichText;
+class TQSimpleRichText;
class KPopupMenu;
class HistoryEntry
{
public:
- HistoryEntry(bool success, const QTime &time, const QString &statement, /*int y,*/ const QString &error = QString::null);
+ HistoryEntry(bool success, const TQTime &time, const TQString &statement, /*int y,*/ const TQString &error = TQString());
~HistoryEntry();
- QRect geometry(int y, int width, QFontMetrics f);
- void drawItem(QPainter *p, int width, const QColorGroup &cg);
+ TQRect tqgeometry(int y, int width, TQFontMetrics f);
+ void drawItem(TQPainter *p, int width, const TQColorGroup &cg);
- void setSelected(bool selected, const QColorGroup &cg);
+ void setSelected(bool selected, const TQColorGroup &cg);
bool isSelected() const { return m_selected; }
- void highlight(const QColorGroup &selected);
+ void highlight(const TQColorGroup &selected);
- QString statement() { return m_statement; }
- void updateTime(const QTime &execTime);
+ TQString statement() { return m_statement; }
+ void updateTime(const TQTime &execTime);
private:
bool m_succeed;
- QTime m_execTime;
- QString m_statement;
- QString m_error;
- QSimpleRichText *m_formated;
+ TQTime m_execTime;
+ TQString m_statement;
+ TQString m_error;
+ TQSimpleRichText *m_formated;
int m_y;
bool m_selected;
};
-typedef QPtrList<HistoryEntry> History;
+typedef TQPtrList<HistoryEntry> History;
-class KexiQueryDesignerSQLHistory : public QScrollView
+class KexiQueryDesignerSQLHistory : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerSQLHistory(QWidget *parent, const char *name=0);
+ KexiQueryDesignerSQLHistory(TQWidget *tqparent, const char *name=0);
virtual ~KexiQueryDesignerSQLHistory();
KPopupMenu* popupMenu() const;
-// void contextMenu(const QPoint &pos, HistoryEntry *e);
+// void contextMenu(const TQPoint &pos, HistoryEntry *e);
void setHistory(History *h);
- QString selectedStatement() const;
+ TQString selectedStatement() const;
public slots:
- void addEvent(const QString& q, bool s, const QString &error);
+ void addEvent(const TQString& q, bool s, const TQString &error);
void slotToClipboard();
void slotEdit();
@@ -87,12 +88,12 @@ class KexiQueryDesignerSQLHistory : public QScrollView
protected:
void addEntry(HistoryEntry *e);
- virtual void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
- virtual void contentsMousePressEvent(QMouseEvent * e);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent * e);
+ virtual void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
+ virtual void contentsMousePressEvent(TQMouseEvent * e);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent * e);
signals:
- void editRequested(const QString &text);
+ void editRequested(const TQString &text);
void currentItemDoubleClicked();
private:
diff --git a/kexi/plugins/queries/kexiquerypart.cpp b/kexi/plugins/queries/kexiquerypart.cpp
index 6cecfcf1f..c9ce57556 100644
--- a/kexi/plugins/queries/kexiquerypart.cpp
+++ b/kexi/plugins/queries/kexiquerypart.cpp
@@ -37,8 +37,8 @@
//------------------------------------------------
-KexiQueryPart::KexiQueryPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiQueryPart::KexiQueryPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
{
// REGISTERED ID:
m_registeredPartID = (int)KexiPart::QueryObjectType;
@@ -65,33 +65,33 @@ KexiQueryPart::createTempData(KexiDialogBase* dialog)
}
KexiViewBase*
-KexiQueryPart::createView(QWidget *parent, KexiDialogBase* dialog, KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiQueryPart::createView(TQWidget *tqparent, KexiDialogBase* dialog, KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
Q_UNUSED( item );
kdDebug() << "KexiQueryPart::createView()" << endl;
if (viewMode == Kexi::DataViewMode) {
- return new KexiQueryView(dialog->mainWin(), parent, "dataview");
+ return new KexiQueryView(dialog->mainWin(), tqparent, "dataview");
}
else if (viewMode == Kexi::DesignViewMode) {
KexiQueryDesignerGuiEditor* view = new KexiQueryDesignerGuiEditor(
- dialog->mainWin(), parent, "guieditor");
+ dialog->mainWin(), tqparent, "guieditor");
//needed for updating tables combo box:
KexiProject *prj = dialog->mainWin()->project();
- connect(prj, SIGNAL(newItemStored(KexiPart::Item&)),
- view, SLOT(slotNewItemStored(KexiPart::Item&)));
- connect(prj, SIGNAL(itemRemoved(const KexiPart::Item&)),
- view, SLOT(slotItemRemoved(const KexiPart::Item&)));
- connect(prj, SIGNAL(itemRenamed(const KexiPart::Item&, const QCString&)),
- view, SLOT(slotItemRenamed(const KexiPart::Item&, const QCString&)));
-
-// connect(dialog->mainWin()->project(), SIGNAL(tableCreated(KexiDB::TableSchema&)),
-// view, SLOT(slotTableCreated(KexiDB::TableSchema&)));
+ connect(prj, TQT_SIGNAL(newItemStored(KexiPart::Item&)),
+ view, TQT_SLOT(slotNewItemStored(KexiPart::Item&)));
+ connect(prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)),
+ view, TQT_SLOT(slotItemRemoved(const KexiPart::Item&)));
+ connect(prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)),
+ view, TQT_SLOT(slotItemRenamed(const KexiPart::Item&, const TQCString&)));
+
+// connect(dialog->mainWin()->project(), TQT_SIGNAL(tableCreated(KexiDB::TableSchema&)),
+// view, TQT_SLOT(slotTableCreated(KexiDB::TableSchema&)));
return view;
}
else if (viewMode == Kexi::TextViewMode) {
- return new KexiQueryDesignerSQLView(dialog->mainWin(), parent, "sqldesigner");
+ return new KexiQueryDesignerSQLView(dialog->mainWin(), tqparent, "sqldesigner");
}
return 0;
@@ -128,9 +128,9 @@ void KexiQueryPart::initInstanceActions( int mode, KActionCollection *col )
else if (mode==Kexi::DesignViewMode) {
}
else if (mode==Kexi::TextViewMode) {
-// new KAction(i18n("Check Query"), "test_it", 0, this, SLOT(slotCheckQuery()), col, "querypart_check_query");
+// new KAction(i18n("Check Query"), "test_it", 0, this, TQT_SLOT(slotCheckQuery()), col, "querypart_check_query");
-//TODO new KAction(i18n("Execute Query"), "?????", 0, this, SLOT(checkQuery()), col, "querypart_execute_query");
+//TODO new KAction(i18n("Execute Query"), "?????", 0, this, TQT_SLOT(checkQuery()), col, "querypart_execute_query");
}
}
#endif
@@ -141,7 +141,7 @@ void KexiQueryPart::initPartActions()
void KexiQueryPart::initInstanceActions()
{
-// new KAction(i18n("Check Query"), "test_it", 0, this, SLOT(slotCheckQuery()),
+// new KAction(i18n("Check Query"), "test_it", 0, this, TQT_SLOT(slotCheckQuery()),
// m_instanceGuiClients[Kexi::DesignViewMode]->actionCollection(), "querypart_check_query");
KAction *a = createSharedAction(Kexi::TextViewMode, i18n("Check Query"), "test_it",
@@ -161,7 +161,7 @@ KexiDB::SchemaData*
KexiQueryPart::loadSchemaData(KexiDialogBase *dlg, const KexiDB::SchemaData& sdata, int viewMode)
{
KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(dlg->tempData());
- QString sqlText;
+ TQString sqlText;
if (!loadDataBlock( dlg, sqlText, "sql" )) {
return 0;
}
@@ -191,7 +191,7 @@ KexiQueryPart::loadSchemaData(KexiDialogBase *dlg, const KexiDB::SchemaData& sda
return query;
}
-QString KexiQueryPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString KexiQueryPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -202,7 +202,7 @@ QString KexiQueryPart::i18nMessage(const QCString& englishMessage, KexiDialogBas
return englishMessage;
}
-tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const QString& newName)
+tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const TQString& newName)
{
Q_UNUSED(newName);
if (!win->project()->dbConnection())
@@ -213,8 +213,8 @@ tristate KexiQueryPart::rename(KexiMainWindow *win, KexiPart::Item &item, const
//----------------
-KexiQueryPart::TempData::TempData(KexiDialogBase* parent, KexiDB::Connection *conn)
- : KexiDialogTempData(parent)
+KexiQueryPart::TempData::TempData(KexiDialogBase* tqparent, KexiDB::Connection *conn)
+ : KexiDialogTempData(TQT_TQOBJECT(tqparent))
, KexiDB::Connection::TableSchemaChangeListenerInterface()
, queryChangedInPreviousView(false)
, m_query(0)
@@ -253,7 +253,7 @@ void KexiQueryPart::TempData::registerTableSchemaChanges(KexiDB::QuerySchema *q)
tristate KexiQueryPart::TempData::closeListener()
{
- KexiDialogBase* dlg = static_cast<KexiDialogBase*>(parent());
+ KexiDialogBase* dlg = static_cast<KexiDialogBase*>(TQT_TQWIDGET(tqparent()));
return dlg->mainWin()->closeDialog(dlg);
}
@@ -270,7 +270,7 @@ void KexiQueryPart::TempData::setQuery(KexiDB::QuerySchema *query)
return;
if (m_query
/* query not owned by dialog */
- && (static_cast<KexiDialogBase*>(parent())->schemaData() != static_cast<KexiDB::SchemaData*>( m_query )))
+ && (static_cast<KexiDialogBase*>(TQT_TQWIDGET(tqparent()))->schemaData() != static_cast<KexiDB::SchemaData*>( m_query )))
{
delete m_query;
}
diff --git a/kexi/plugins/queries/kexiquerypart.h b/kexi/plugins/queries/kexiquerypart.h
index 6b16f28d5..aee905e61 100644
--- a/kexi/plugins/queries/kexiquerypart.h
+++ b/kexi/plugins/queries/kexiquerypart.h
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYPART_H
-#define KEXIQUERYPART_H
+#ifndef KEXITQUERYPART_H
+#define KEXITQUERYPART_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kexidialogbase.h>
#include <kexipart.h>
@@ -44,9 +44,10 @@ class KexiProject;
class KexiQueryPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryPart(QObject *parent, const char *name, const QStringList &);
+ KexiQueryPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiQueryPart();
virtual bool remove(KexiMainWindow *win, KexiPart::Item &item);
@@ -56,7 +57,7 @@ class KexiQueryPart : public KexiPart::Part
public KexiDB::Connection::TableSchemaChangeListenerInterface
{
public:
- TempData(KexiDialogBase* parent, KexiDB::Connection *conn);
+ TempData(KexiDialogBase* tqparent, KexiDB::Connection *conn);
virtual ~TempData();
virtual tristate closeListener();
void clearQuery();
@@ -65,7 +66,7 @@ class KexiQueryPart : public KexiPart::Part
/*! Assigns query \a query for this data.
Existing query (available using query()) is deleted but only
- if it is not owned by parent dialog (i.e. != KexiDialogBase::schemaData()).
+ if it is not owned by tqparent dialog (i.e. != KexiDialogBase::schemaData()).
\a query can be 0.
If \a query is equal to existing query, nothing is performed.
*/
@@ -91,18 +92,18 @@ class KexiQueryPart : public KexiPart::Part
KexiDB::QuerySchema *m_query;
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
/*! Renames stored data pointed by \a item to \a newName.
Reimplemented to mark the query obsolete by using KexiDB::Connection::setQuerySchemaObsolete(). */
- virtual tristate rename(KexiMainWindow * win, KexiPart::Item & item, const QString& newName);
+ virtual tristate rename(KexiMainWindow * win, KexiPart::Item & item, const TQString& newName);
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
// virtual void initPartActions( KActionCollection *col );
// virtual void initInstanceActions( int mode, KActionCollection *col );
diff --git a/kexi/plugins/queries/kexiqueryview.cpp b/kexi/plugins/queries/kexiqueryview.cpp
index cf3fee967..cf5400dc1 100644
--- a/kexi/plugins/queries/kexiqueryview.cpp
+++ b/kexi/plugins/queries/kexiqueryview.cpp
@@ -50,8 +50,8 @@ class KexiQueryView::Private
//---------------------------------------------------------------------------------
-KexiQueryView::KexiQueryView(KexiMainWindow *win, QWidget *parent, const char *name)
- : KexiDataTable(win, parent, name)
+KexiQueryView::KexiQueryView(KexiMainWindow *win, TQWidget *tqparent, const char *name)
+ : KexiDataTable(win, tqparent, name)
, d( new Private() )
{
tableView()->setInsertingEnabled(false); //default
@@ -72,7 +72,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
KexiDB::Cursor *oldCursor = d->cursor;
KexiDB::debug( query->parameters() );
bool ok;
- QValueList<QVariant> params;
+ TQValueList<TQVariant> params;
{
KexiUtils::WaitCursorRemover remover;
params = KexiQueryParameters::getParameters(this,
@@ -83,7 +83,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
}
d->cursor = mainWin()->project()->dbConnection()->executeQuery(*query, params);
if (!d->cursor) {
- parentDialog()->setStatus(parentDialog()->mainWin()->project()->dbConnection(),
+ tqparentDialog()->settqStatus(tqparentDialog()->mainWin()->project()->dbConnection(),
i18n("Query executing failed."));
//todo: also provide server result and sql statement
return false;
@@ -100,7 +100,7 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
tableView()->setReadOnly( true );
//! @todo maybe allow writing and inserting for single-table relations?
//set data model itself read-only too
- tableView()->data()->setReadOnly( true );
+ tableView()->KexiDataAwareObjectInterface::data()->setReadOnly( true );
tableView()->setInsertingEnabled( false );
return true;
}
@@ -108,13 +108,13 @@ tristate KexiQueryView::executeQuery(KexiDB::QuerySchema *query)
tristate KexiQueryView::afterSwitchFrom(int mode)
{
if (mode==Kexi::NoViewMode) {
- KexiDB::QuerySchema *querySchema = static_cast<KexiDB::QuerySchema *>(parentDialog()->schemaData());
+ KexiDB::QuerySchema *querySchema = static_cast<KexiDB::QuerySchema *>(tqparentDialog()->schemaData());
const tristate result = executeQuery(querySchema);
if (true != result)
return result;
}
else if (mode==Kexi::DesignViewMode || Kexi::TextViewMode) {
- KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(parentDialog()->tempData());
+ KexiQueryPart::TempData * temp = static_cast<KexiQueryPart::TempData*>(tqparentDialog()->tempData());
//remember what view we should use to store data changes, if needed
// if (temp->queryChangedInPreviousView)
@@ -131,7 +131,7 @@ tristate KexiQueryView::afterSwitchFrom(int mode)
KexiDB::SchemaData* KexiQueryView::storeNewData(const KexiDB::SchemaData& sdata, bool &cancel)
{
- KexiViewBase * view = parentDialog()->viewThatRecentlySetDirtyFlag();
+ KexiViewBase * view = tqparentDialog()->viewThatRecentlySetDirtyFlag();
if (dynamic_cast<KexiQueryDesignerGuiEditor*>(view))
return dynamic_cast<KexiQueryDesignerGuiEditor*>(view)->storeNewData(sdata, cancel);
if (dynamic_cast<KexiQueryDesignerSQLView*>(view))
@@ -141,7 +141,7 @@ KexiDB::SchemaData* KexiQueryView::storeNewData(const KexiDB::SchemaData& sdata,
tristate KexiQueryView::storeData(bool dontAsk)
{
- KexiViewBase * view = parentDialog()->viewThatRecentlySetDirtyFlag();
+ KexiViewBase * view = tqparentDialog()->viewThatRecentlySetDirtyFlag();
if (dynamic_cast<KexiQueryDesignerGuiEditor*>(view))
return dynamic_cast<KexiQueryDesignerGuiEditor*>(view)->storeData(dontAsk);
if (dynamic_cast<KexiQueryDesignerSQLView*>(view))
diff --git a/kexi/plugins/queries/kexiqueryview.h b/kexi/plugins/queries/kexiqueryview.h
index f0083738f..b1f183ad2 100644
--- a/kexi/plugins/queries/kexiqueryview.h
+++ b/kexi/plugins/queries/kexiqueryview.h
@@ -18,8 +18,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYVIEW_H
-#define KEXIQUERYVIEW_H
+#ifndef KEXITQUERYVIEW_H
+#define KEXITQUERYVIEW_H
#include <kexidatatable.h>
@@ -32,9 +32,10 @@ class KexiMainWindow;
class KexiQueryView : public KexiDataTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryView(KexiMainWindow *win, QWidget *parent, const char *name=0);
+ KexiQueryView(KexiMainWindow *win, TQWidget *tqparent, const char *name=0);
~KexiQueryView();
protected:
diff --git a/kexi/plugins/relations/kexirelationmaindlg.cpp b/kexi/plugins/relations/kexirelationmaindlg.cpp
index 6b14fffab..ded97e1cf 100644
--- a/kexi/plugins/relations/kexirelationmaindlg.cpp
+++ b/kexi/plugins/relations/kexirelationmaindlg.cpp
@@ -23,7 +23,7 @@
#include <kdebug.h>
#include <kiconloader.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kexidb/connection.h>
@@ -32,8 +32,8 @@
#include "kexirelationwidget.h"
#include "kexirelationview.h"
-KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
{
kdDebug() << "KexiRelationMainDlg()" << endl;
// setIcon(SmallIcon("relation"));
@@ -46,13 +46,13 @@ KexiRelationMainDlg::KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *paren
addActionProxyChild( m_rel );
// addActionProxyChild( m_view->relationView() );
- QVBoxLayout *g = new QVBoxLayout(this);
+ TQVBoxLayout *g = new TQVBoxLayout(this);
g->addWidget(m_rel);
//show all tables
KexiDB::Connection *conn = mainWin->project()->dbConnection();
- QStringList tables = conn->tableNames();
- for (QStringList::ConstIterator it = tables.constBegin(); it!=tables.constEnd(); ++it) {
+ TQStringList tables = conn->tableNames();
+ for (TQStringList::ConstIterator it = tables.constBegin(); it!=tables.constEnd(); ++it) {
m_rel->addTable( *it );
}
}
@@ -61,18 +61,18 @@ KexiRelationMainDlg::~KexiRelationMainDlg()
{
}
-QSize KexiRelationMainDlg::sizeHint() const
+TQSize KexiRelationMainDlg::tqsizeHint() const
{
- return QSize(600,300);
+ return TQSize(600,300);
}
-QWidget*
+TQWidget*
KexiRelationMainDlg::mainWidget()
{
return m_rel;
}
-QString KexiRelationMainDlg::itemIcon()
+TQString KexiRelationMainDlg::itemIcon()
{
return "relation";
}
diff --git a/kexi/plugins/relations/kexirelationmaindlg.h b/kexi/plugins/relations/kexirelationmaindlg.h
index 791d6544c..4dbc76983 100644
--- a/kexi/plugins/relations/kexirelationmaindlg.h
+++ b/kexi/plugins/relations/kexirelationmaindlg.h
@@ -28,16 +28,17 @@ class KexiRelationWidget;
class KexiRelationMainDlg : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationMainDlg(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiRelationMainDlg(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
~KexiRelationMainDlg();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
- virtual QWidget* mainWidget();
+ virtual TQWidget* mainWidget();
- virtual QString itemIcon();
+ virtual TQString itemIcon();
private:
KexiRelationWidget *m_rel;
diff --git a/kexi/plugins/relations/kexirelationpartimpl.cpp b/kexi/plugins/relations/kexirelationpartimpl.cpp
index a2a7c2138..9d08527bf 100644
--- a/kexi/plugins/relations/kexirelationpartimpl.cpp
+++ b/kexi/plugins/relations/kexirelationpartimpl.cpp
@@ -28,8 +28,8 @@
#include <kiconloader.h>
#include <kdebug.h>
-KexiRelationPartImpl::KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args)
- : KexiInternalPart(parent, name, args)
+KexiRelationPartImpl::KexiRelationPartImpl(TQObject *tqparent, const char *name, const TQStringList &args)
+ : KexiInternalPart(tqparent, name, args)
{
kdDebug() << "KexiRelationPartImpl()" << endl;
}
@@ -38,11 +38,11 @@ KexiRelationPartImpl::~KexiRelationPartImpl()
{
}
-/*QWidget *
+/*TQWidget *
KexiRelationPartImpl::createWidget(const char* , KexiMainWindow* mainWin,
- QWidget *parent, const char *objName)
+ TQWidget *tqparent, const char *objName)
{
- return new KexiRelationWidget(mainWin, parent, objName);
+ return new KexiRelationWidget(mainWin, tqparent, objName);
}*/
/*KexiDialogBase *
@@ -62,14 +62,14 @@ KexiRelationPartImpl::createDialog(KexiMainWindow* mainWin, const char *)
}*/
KexiViewBase *
-KexiRelationPartImpl::createView(KexiMainWindow* mainWin, QWidget *parent, const char *)
+KexiRelationPartImpl::createView(KexiMainWindow* mainWin, TQWidget *tqparent, const char *)
{
// kdDebug() << "KexiRelationPartImpl::createDialog()" << endl;
// KexiDialogBase * dlg = new KexiDialogBase(mainWin, i18n("Relations"));
// dlg->setIcon(SmallIcon("relation"));
// dlg->setDocID( mainWin->generatePrivateDocID() );
- KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, parent, "relations");
+ KexiRelationMainDlg *view = new KexiRelationMainDlg(mainWin, tqparent, "relations");
// dlg->addView(view);
// dlg->show();
// dlg->registerDialog();
diff --git a/kexi/plugins/relations/kexirelationpartimpl.h b/kexi/plugins/relations/kexirelationpartimpl.h
index b5b5438e7..58ee5674d 100644
--- a/kexi/plugins/relations/kexirelationpartimpl.h
+++ b/kexi/plugins/relations/kexirelationpartimpl.h
@@ -25,20 +25,21 @@
class KexiRelationPartImpl : public KexiInternalPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationPartImpl(QObject *parent, const char *name, const QStringList &args);
+ KexiRelationPartImpl(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiRelationPartImpl();
protected:
-// virtual QWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
-// QWidget *parent, const char *objName=0);
+// virtual TQWidget *createWidget(const char* widgetClass, KexiMainWindow* mainWin,
+// TQWidget *tqparent, const char *objName=0);
- virtual KexiViewBase *createView(KexiMainWindow* mainWin, QWidget *parent,
+ virtual KexiViewBase *createView(KexiMainWindow* mainWin, TQWidget *tqparent,
const char *objName=0);
- //virtual KexiDialogBase *createWindow(KexiMainWindow *parent);
- //virtual QWidget *createWidget(QWidget *parent, KexiMainWindow *win);
+ //virtual KexiDialogBase *createWindow(KexiMainWindow *tqparent);
+ //virtual TQWidget *createWidget(TQWidget *tqparent, KexiMainWindow *win);
};
#endif
diff --git a/kexi/plugins/reports/kexireportfactory.cpp b/kexi/plugins/reports/kexireportfactory.cpp
index 0ac782c45..d863bc9f5 100644
--- a/kexi/plugins/reports/kexireportfactory.cpp
+++ b/kexi/plugins/reports/kexireportfactory.cpp
@@ -16,8 +16,8 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qpopupmenu.h>
-#include <qvaluevector.h>
+#include <tqpopupmenu.h>
+#include <tqvaluevector.h>
#include <kgenericfactory.h>
#include <klocale.h>
@@ -33,8 +33,8 @@
#include "reportwidgets.h"
#include "kexireportfactory.h"
-KexiReportFactory::KexiReportFactory(QObject *parent, const char *name, const QStringList &)
- : KFormDesigner::WidgetFactory(parent, name)
+KexiReportFactory::KexiReportFactory(TQObject *tqparent, const char *name, const TQStringList &)
+ : KFormDesigner::WidgetFactory(tqparent, name)
{
KFormDesigner::WidgetInfo *wView = new KFormDesigner::WidgetInfo(this);
wView->setPixmap("report");
@@ -86,20 +86,20 @@ KexiReportFactory::~KexiReportFactory()
{
}
-QString
+TQString
KexiReportFactory::name()
{
return "kexireportwidgets";
}
-QWidget*
-KexiReportFactory::createWidget(const QCString &c, QWidget *p, const char *n,
+TQWidget*
+KexiReportFactory::createWidget(const TQCString &c, TQWidget *p, const char *n,
KFormDesigner::Container *container, int options)
{
Q_UNUSED(options);
kexipluginsdbg << "KexiReportFactory::create() " << this << endl;
- QString text( container->form()->library()->textForWidgetName(n, c) );
+ TQString text( container->form()->library()->textForWidgetName(n, c) );
if(c == "Label")
return new Label(text, p, n);
@@ -114,56 +114,56 @@ KexiReportFactory::createWidget(const QCString &c, QWidget *p, const char *n,
}
bool
-KexiReportFactory::createMenuActions(const QCString &classname, QWidget *w,
- QPopupMenu *menu, KFormDesigner::Container *container)
+KexiReportFactory::createMenuActions(const TQCString &classname, TQWidget *w,
+ TQPopupMenu *menu, KFormDesigner::Container *container)
{
Q_UNUSED(w);
Q_UNUSED(container);
if(classname == "Label") {
/*! @todo use KAction */
- menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, SLOT(editText()));
+ menu->insertItem(SmallIconSet("edit"), i18n("Edit Rich Text"), this, TQT_SLOT(editText()));
return true;
}
return false;
}
bool
-KexiReportFactory::startEditing(const QCString &c, QWidget *w, KFormDesigner::Container *container)
+KexiReportFactory::startEditing(const TQCString &c, TQWidget *w, KFormDesigner::Container *container)
{
m_container = container;
if(c == "Label") {
- QLabel *label = static_cast<QLabel*>(w);
+ TQLabel *label = static_cast<TQLabel*>(w);
if(label->textFormat() == RichText) {
m_widget = w;
editText();
}
else
- createEditor(c, label->text(), label, container, label->geometry(), label->alignment());
+ createEditor(c, label->text(), label, container, label->tqgeometry(), label->tqalignment());
return true;
}
return false;
}
bool
-KexiReportFactory::isPropertyVisibleInternal(const QCString &classname, QWidget *w, const QCString &property, bool isTopLevel)
+KexiReportFactory::isPropertyVisibleInternal(const TQCString &classname, TQWidget *w, const TQCString &property, bool isTopLevel)
{
if(classname == "Label") {
if(property == "pixmap")
return false;
}
else if(classname == "PicLabel") {
- if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "alignment"))
+ if((property == "text") || (property == "indent") || (property == "textFormat") || (property == "font") || (property == "tqalignment"))
return false;
}
return WidgetFactory::isPropertyVisibleInternal(classname, w, property, isTopLevel);
}
-QValueList<QCString>
-KexiReportFactory::autoSaveProperties(const QCString &classname)
+TQValueList<TQCString>
+KexiReportFactory::autoSaveProperties(const TQCString &classname)
{
- QValueList<QCString> l;
+ TQValueList<TQCString> l;
if(classname == "Label")
l << "text";
@@ -175,23 +175,23 @@ KexiReportFactory::autoSaveProperties(const QCString &classname)
/*
void
-KexiReportFactory::changeText(const QString &text)
+KexiReportFactory::changeText(const TQString &text)
{
- QWidget *w = WidgetFactory::m_widget;
+ TQWidget *w = WidgetFactory::m_widget;
changeProperty("text", text, m_container);
- int width = w->sizeHint().width();
+ int width = w->tqsizeHint().width();
if(w->width() < width)
w->resize(width, w->height() );
}
void
-KexiReportFactory::resizeEditor(QWidget *widget, const QCString &)
+KexiReportFactory::resizeEditor(TQWidget *widget, const TQCString &)
{
- QSize s = widget->size();
- QPoint p = widget->pos();
- QRect r;
+ TQSize s = widget->size();
+ TQPoint p = widget->pos();
+ TQRect r;
m_editor->resize(s);
m_editor->move(p);
@@ -200,11 +200,11 @@ KexiReportFactory::resizeEditor(QWidget *widget, const QCString &)
void
KexiReportFactory::editText()
{
- QCString classname = m_widget->className();
- QString text;
+ TQCString classname = m_widget->className();
+ TQString text;
if(classname == "Label")
- text = ((QLabel*)m_widget)->text();
+ text = ((TQLabel*)m_widget)->text();
if(editRichText(m_widget, text)) {
changeProperty("textFormat", "RichText", m_container->form());
@@ -212,11 +212,11 @@ KexiReportFactory::editText()
}
if(classname == "Label")
- m_widget->resize(m_widget->sizeHint());
+ m_widget->resize(m_widget->tqsizeHint());
}
bool
-KexiReportFactory::previewWidget(const QCString &, QWidget *, KFormDesigner::Container *)
+KexiReportFactory::previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *)
{
return false;
}
diff --git a/kexi/plugins/reports/kexireportfactory.h b/kexi/plugins/reports/kexireportfactory.h
index c6b917029..ab2ce7a18 100644
--- a/kexi/plugins/reports/kexireportfactory.h
+++ b/kexi/plugins/reports/kexireportfactory.h
@@ -26,35 +26,36 @@
class KexiReportFactory : public KFormDesigner::WidgetFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportFactory(QObject *parent, const char *name, const QStringList &args);
+ KexiReportFactory(TQObject *tqparent, const char *name, const TQStringList &args);
virtual ~KexiReportFactory();
- virtual QString name();
- virtual QWidget *createWidget(const QCString &classname, QWidget *parent, const char *name, KFormDesigner::Container *container,
+ virtual TQString name();
+ virtual TQWidget *createWidget(const TQCString &classname, TQWidget *tqparent, const char *name, KFormDesigner::Container *container,
int options = DefaultOptions);
- virtual bool createMenuActions(const QCString &classname, QWidget *w, QPopupMenu *menu,
+ virtual bool createMenuActions(const TQCString &classname, TQWidget *w, TQPopupMenu *menu,
KFormDesigner::Container *container);
- virtual bool startEditing(const QCString &classname, QWidget *w, KFormDesigner::Container *container);
- virtual bool previewWidget(const QCString &, QWidget *, KFormDesigner::Container *);
+ virtual bool startEditing(const TQCString &classname, TQWidget *w, KFormDesigner::Container *container);
+ virtual bool previewWidget(const TQCString &, TQWidget *, KFormDesigner::Container *);
- //virtual void saveSpecialProperty(const QString &classname, const QString &name, const QVariant &value, QWidget *w,
- //QDomElement &parentNode, QDomDocument &parent) {}
- //virtual void readSpecialProperty(const QCString &classname, QDomElement &node, QWidget *w, KFormDesigner::ObjectTreeItem *item) {}
- virtual QValueList<QCString> autoSaveProperties(const QCString &classname);
+ //virtual void saveSpecialProperty(const TQString &classname, const TQString &name, const TQVariant &value, TQWidget *w,
+ //TQDomElement &tqparentNode, TQDomDocument &tqparent) {}
+ //virtual void readSpecialProperty(const TQCString &classname, TQDomElement &node, TQWidget *w, KFormDesigner::ObjectTreeItem *item) {}
+ virtual TQValueList<TQCString> autoSaveProperties(const TQCString &classname);
public slots:
void editText();
protected:
- virtual bool isPropertyVisibleInternal(const QCString &, QWidget *, const QCString &, bool isTopLevel);
-// virtual void changeText(const QString &newText);
-// virtual void resizeEditor(QWidget *widget, const QCString &classname);
+ virtual bool isPropertyVisibleInternal(const TQCString &, TQWidget *, const TQCString &, bool isTopLevel);
+// virtual void changeText(const TQString &newText);
+// virtual void resizeEditor(TQWidget *widget, const TQCString &classname);
private:
- QWidget *m_widget;
+ TQWidget *m_widget;
KFormDesigner::Container *m_container;
};
diff --git a/kexi/plugins/reports/kexireportform.cpp b/kexi/plugins/reports/kexireportform.cpp
index d5dd6f55b..f77b41a55 100644
--- a/kexi/plugins/reports/kexireportform.cpp
+++ b/kexi/plugins/reports/kexireportform.cpp
@@ -18,20 +18,20 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qcursor.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqcursor.h>
#include <kdebug.h>
#include "kexireportform.h"
-KexiReportForm::KexiReportForm(QWidget *parent, const char *name/*, KexiDB::Connection *conn*/)
- : QWidget(parent, name)
+KexiReportForm::KexiReportForm(TQWidget *tqparent, const char *name/*, KexiDB::Connection *conn*/)
+ : TQWidget(tqparent, name)
{
//m_conn = conn;
kexipluginsdbg << "KexiReportForm::KexiReportForm(): " << endl;
- setCursor(QCursor(Qt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
+ setCursor(TQCursor(TQt::ArrowCursor)); //to avoid keeping Size cursor when moving from form's boundaries
setBackgroundColor(white);
}
@@ -40,47 +40,47 @@ KexiReportForm::~KexiReportForm()
kexipluginsdbg << "KexiReportForm::~KexiReportForm(): close" << endl;
}
-//repaint all children widgets
-static void repaintAll(QWidget *w)
+//tqrepaint all tqchildren widgets
+static void tqrepaintAll(TQWidget *w)
{
- QObjectList *list = w->queryList("QWidget");
- QObjectListIt it(*list);
- for (QObject *obj; (obj=it.current()); ++it ) {
- static_cast<QWidget*>(obj)->repaint();
+ TQObjectList *list = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectListIt it(*list);
+ for (TQObject *obj; (obj=it.current()); ++it ) {
+ static_cast<TQWidget*>(obj)->tqrepaint();
}
delete list;
}
void
-KexiReportForm::drawRect(const QRect& r, int type)
+KexiReportForm::drawRect(const TQRect& r, int type)
{
- QValueList<QRect> l;
+ TQValueList<TQRect> l;
l.append(r);
drawRects(l, type);
}
void
-KexiReportForm::drawRects(const QValueList<QRect> &list, int type)
+KexiReportForm::drawRects(const TQValueList<TQRect> &list, int type)
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, QRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
+ p.drawPixmap( TQPoint(prev_rect.x()-2, prev_rect.y()-2), buffer, TQRect(prev_rect.x()-2, prev_rect.y()-2, prev_rect.width()+4, prev_rect.height()+4));
}
- p.setBrush(QBrush::NoBrush);
+ p.setBrush(TQBrush::NoBrush);
if(type == 1) // selection rect
- p.setPen(QPen(white, 1, Qt::DotLine));
+ p.setPen(TQPen(white, 1, TQt::DotLine));
else if(type == 2) // insert rect
- p.setPen(QPen(white, 2));
+ p.setPen(TQPen(white, 2));
p.setRasterOp(XorROP);
- prev_rect = QRect();
- QValueList<QRect>::ConstIterator endIt = list.constEnd();
- for(QValueList<QRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
+ prev_rect = TQRect();
+ TQValueList<TQRect>::ConstIterator endIt = list.constEnd();
+ for(TQValueList<TQRect>::ConstIterator it = list.constBegin(); it != endIt; ++it) {
p.drawRect(*it);
prev_rect = prev_rect.unite(*it);
}
@@ -93,58 +93,58 @@ KexiReportForm::drawRects(const QValueList<QRect> &list, int type)
void
KexiReportForm::initBuffer()
{
- repaintAll(this);
+ tqrepaintAll(this);
buffer.resize( width(), height() );
- buffer = QPixmap::grabWindow( winId() );
- prev_rect = QRect();
+ buffer = TQPixmap::grabWindow( winId() );
+ prev_rect = TQRect();
}
void
KexiReportForm::clearForm()
{
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
//redraw entire form surface
- p.drawPixmap( QPoint(0,0), buffer, QRect(0,0,buffer.width(), buffer.height()) );
+ p.drawPixmap( TQPoint(0,0), buffer, TQRect(0,0,buffer.width(), buffer.height()) );
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
- repaintAll(this);
+ tqrepaintAll(this);
}
void
-KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &point)
+KexiReportForm::highlightWidgets(TQWidget *from, TQWidget *to)//, const TQPoint &point)
{
- QPoint fromPoint, toPoint;
- if(from && from->parentWidget() && (from != this))
- fromPoint = from->parentWidget()->mapTo(this, from->pos());
- if(to && to->parentWidget() && (to != this))
- toPoint = to->parentWidget()->mapTo(this, to->pos());
+ TQPoint fromPoint, toPoint;
+ if(from && from->tqparentWidget() && (from != this))
+ fromPoint = from->tqparentWidget()->mapTo(this, from->pos());
+ if(to && to->tqparentWidget() && (to != this))
+ toPoint = to->tqparentWidget()->mapTo(this, to->pos());
- QPainter p;
+ TQPainter p;
p.begin(this, true);
bool unclipped = testWFlags( WPaintUnclipped );
setWFlags( WPaintUnclipped );
if (prev_rect.isValid()) {
//redraw prev. selection's rectangle
- p.drawPixmap( QPoint(prev_rect.x(), prev_rect.y()), buffer, QRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
+ p.drawPixmap( TQPoint(prev_rect.x(), prev_rect.y()), buffer, TQRect(prev_rect.x(), prev_rect.y(), prev_rect.width(), prev_rect.height()));
}
- p.setPen( QPen(Qt::red, 2) );
+ p.setPen( TQPen(TQt::red, 2) );
if(to)
{
- QPixmap pix1 = QPixmap::grabWidget(from);
- QPixmap pix2 = QPixmap::grabWidget(to);
+ TQPixmap pix1 = TQPixmap::grabWidget(from);
+ TQPixmap pix2 = TQPixmap::grabWidget(to);
if((from != this) && (to != this))
- p.drawLine( from->parentWidget()->mapTo(this, from->geometry().center()), to->parentWidget()->mapTo(this, to->geometry().center()) );
+ p.drawLine( from->tqparentWidget()->mapTo(this, from->tqgeometry().center()), to->tqparentWidget()->mapTo(this, to->tqgeometry().center()) );
p.drawPixmap(fromPoint.x(), fromPoint.y(), pix1);
p.drawPixmap(toPoint.x(), toPoint.y(), pix2);
@@ -161,7 +161,7 @@ KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
p.drawRoundRect(fromPoint.x(), fromPoint.y(), from->width(), from->height(), 5, 5);
if((to == this) || (from == this))
- prev_rect = QRect(0, 0, buffer.width(), buffer.height());
+ prev_rect = TQRect(0, 0, buffer.width(), buffer.height());
else if(to)
{
prev_rect.setX( (fromPoint.x() < toPoint.x()) ? (fromPoint.x() - 5) : (toPoint.x() - 5) );
@@ -170,18 +170,18 @@ KexiReportForm::highlightWidgets(QWidget *from, QWidget *to)//, const QPoint &po
prev_rect.setBottom( (fromPoint.y() < toPoint.y()) ? (toPoint.y() + to->height() + 10) : (fromPoint.y() + from->height() + 10) ) ;
}
else
- prev_rect = QRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
+ prev_rect = TQRect(fromPoint.x()- 5, fromPoint.y() -5, from->width() + 10, from->height() + 10);
if (!unclipped)
clearWFlags( WPaintUnclipped );
p.end();
}
-QSize
-KexiReportForm::sizeHint() const
+TQSize
+KexiReportForm::tqsizeHint() const
{
//todo: find better size (user configured?)
- return QSize(400,300);
+ return TQSize(400,300);
}
#include "kexireportform.moc"
diff --git a/kexi/plugins/reports/kexireportform.h b/kexi/plugins/reports/kexireportform.h
index 8b03c2ecf..9f13fbc91 100644
--- a/kexi/plugins/reports/kexireportform.h
+++ b/kexi/plugins/reports/kexireportform.h
@@ -21,40 +21,41 @@
#ifndef KEXIREPORTFORM_H
#define KEXIREPORTFORM_H
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
#include <formeditor/form.h>
//! The report top widget
-class KEXIREPORTUTILS_EXPORT KexiReportForm : public QWidget, public KFormDesigner::FormWidget
+class KEXIREPORTUTILS_EXPORT KexiReportForm : public TQWidget, public KFormDesigner::FormWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportForm(QWidget *parent, const char *name="kexi_dbform");
+ KexiReportForm(TQWidget *tqparent, const char *name="kexi_dbform");
virtual ~KexiReportForm();
- /*QString datasource() const { return m_ds; }
+ /*TQString datasource() const { return m_ds; }
bool navigatorShown() const { return m_nav; }
- void setDatasource(const QString &s) { m_ds = s; }
+ void setDatasource(const TQString &s) { m_ds = s; }
void showRecordNavigator(bool s) { m_nav = s; }*/
- virtual void drawRect(const QRect& r, int type);
- virtual void drawRects(const QValueList<QRect> &list, int type);
+ virtual void drawRect(const TQRect& r, int type);
+ virtual void drawRects(const TQValueList<TQRect> &list, int type);
virtual void initBuffer();
virtual void clearForm();
- virtual void highlightWidgets(QWidget *from, QWidget *to/*, const QPoint &p*/);
+ virtual void highlightWidgets(TQWidget *from, TQWidget *to/*, const TQPoint &p*/);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
private:
- /*QString m_ds;
+ /*TQString m_ds;
bool m_nav;
KexiDB::Connection *m_conn;*/
- QPixmap buffer; //!< stores grabbed entire form's area for redraw
- QRect prev_rect; //!< previously selected rectangle
+ TQPixmap buffer; //!< stores grabbed entire form's area for redraw
+ TQRect prev_rect; //!< previously selected rectangle
};
#endif
diff --git a/kexi/plugins/reports/kexireportpart.cpp b/kexi/plugins/reports/kexireportpart.cpp
index ad83cbf45..6b9c6bc32 100644
--- a/kexi/plugins/reports/kexireportpart.cpp
+++ b/kexi/plugins/reports/kexireportpart.cpp
@@ -43,8 +43,8 @@
KFormDesigner::WidgetLibrary* KexiReportPart::static_reportsLibrary = 0L;
-KexiReportPart::KexiReportPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiReportPart::KexiReportPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
{
// REGISTERED ID:
m_registeredPartID = (int)KexiPart::ReportObjectType;
@@ -66,7 +66,7 @@ KexiReportPart::KexiReportPart(QObject *parent, const char *name, const QStringL
// Create and store a handle to report' library. Forms will have their own library too.
/* @todo add configuration for supported factory groups */
- QStringList supportedFactoryGroups;
+ TQStringList supportedFactoryGroups;
supportedFactoryGroups += "kexi-report";
static_reportsLibrary = KFormDesigner::FormManager::createWidgetLibrary(
formManager, supportedFactoryGroups);
@@ -101,22 +101,22 @@ KexiReportPart::createTempData(KexiDialogBase* dialog)
}
KexiViewBase*
-KexiReportPart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int, QMap<QString,QString>*)
+KexiReportPart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int, TQMap<TQString,TQString>*)
{
kexipluginsdbg << "KexiReportPart::createView()" << endl;
KexiMainWindow *win = dialog->mainWin();
if (!win || !win->project() || !win->project()->dbConnection())
return 0;
- KexiReportView *view = new KexiReportView(win, parent, item.name().latin1(),
+ KexiReportView *view = new KexiReportView(win, tqparent, item.name().latin1(),
win->project()->dbConnection() );
return view;
}
-QString
-KexiReportPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiReportPart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
Q_UNUSED(dlg);
if (englishMessage=="Design of object \"%1\" has been modified.")
@@ -128,8 +128,8 @@ KexiReportPart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg)
//---------------
-KexiReportPart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiReportPart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
{
}
diff --git a/kexi/plugins/reports/kexireportpart.h b/kexi/plugins/reports/kexireportpart.h
index 19731e574..ee93580fc 100644
--- a/kexi/plugins/reports/kexireportpart.h
+++ b/kexi/plugins/reports/kexireportpart.h
@@ -42,9 +42,10 @@ namespace KexiDB
class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportPart(QObject *parent, const char *name, const QStringList &);
+ KexiReportPart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiReportPart();
//! \return a pointer to Reports Widget Library.
@@ -52,28 +53,28 @@ class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
// KFormDesigner::FormManager *manager() { return m_manager; }
- void generateForm(KexiDB::FieldList *list, QDomDocument &domDoc);
+ void generateForm(KexiDB::FieldList *list, TQDomDocument &domDoc);
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
~TempData();
- QGuardedPtr<KFormDesigner::Form> form;
- QGuardedPtr<KFormDesigner::Form> previewForm;
- QString tempForm;
- QPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
+ TQGuardedPtr<KFormDesigner::Form> form;
+ TQGuardedPtr<KFormDesigner::Form> previewForm;
+ TQString tempForm;
+ TQPoint scrollViewContentsPos; //!< to preserve contents pos after switching to other view
int resizeMode; //!< form's window's resize mode -one of KexiFormView::ResizeMode items
};
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();
@@ -81,7 +82,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportPart : public KexiPart::Part
static KFormDesigner::WidgetLibrary* static_reportsLibrary;
private:
-// QGuardedPtr<KFormDesigner::FormManager> m_manager;
+// TQGuardedPtr<KFormDesigner::FormManager> m_manager;
};
#endif
diff --git a/kexi/plugins/reports/kexireportview.cpp b/kexi/plugins/reports/kexireportview.cpp
index 6b7f46b59..913a493ea 100644
--- a/kexi/plugins/reports/kexireportview.cpp
+++ b/kexi/plugins/reports/kexireportview.cpp
@@ -39,15 +39,15 @@
#define NO_DSWIZARD
-KexiReportScrollView::KexiReportScrollView(QWidget *parent, bool preview)
- : KexiScrollView(parent, preview)
+KexiReportScrollView::KexiReportScrollView(TQWidget *tqparent, bool preview)
+ : KexiScrollView(tqparent, preview)
{
if(preview) {
setRecordNavigatorVisible(true);
recordNavigator()->setLabelText(i18n("Page:"));
recordNavigator()->setInsertingButtonVisible(false);
}
- connect(this, SIGNAL(resizingStarted()), this, SLOT(slotResizingStarted()));
+ connect(this, TQT_SIGNAL(resizingStarted()), this, TQT_SLOT(slotResizingStarted()));
}
KexiReportScrollView::~KexiReportScrollView()
@@ -61,7 +61,7 @@ KexiReportScrollView::show()
//now get resize mode settings for entire form
if (m_preview) {
- KexiReportView* fv = dynamic_cast<KexiReportView*>(parent());
+ KexiReportView* fv = dynamic_cast<KexiReportView*>(tqparent());
int resizeMode = fv ? fv->resizeMode() : KexiReportView::ResizeAuto;
if (resizeMode == KexiReportView::ResizeAuto)
setResizePolicy(AutoOneFit);
@@ -80,12 +80,12 @@ KexiReportScrollView::slotResizingStarted()
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
-KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char *name,
+KexiReportView::KexiReportView(KexiMainWindow *win, TQWidget *tqparent, const char *name,
KexiDB::Connection *conn)
- : KexiViewBase(win, parent, name), m_propertySet(0), m_conn(conn)
+ : KexiViewBase(win, tqparent, name), m_propertySet(0), m_conn(conn)
, m_resizeMode(KexiReportView::ResizeDefault)
{
- QHBoxLayout *l = new QHBoxLayout(this);
+ TQHBoxLayout *l = new TQHBoxLayout(this);
l->setAutoAdd(true);
m_scrollView = new KexiReportScrollView(this, viewMode()==Kexi::DataViewMode);
@@ -93,7 +93,7 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
// m_scrollView->show();
m_reportform = new KexiReportForm(m_scrollView->viewport(), name/*, conn*/);
-// m_reportform->resize(QSize(400, 300));
+// m_reportform->resize(TQSize(400, 300));
m_scrollView->setWidget(m_reportform);
m_scrollView->setResizingEnabled(viewMode()!=Kexi::DataViewMode);
@@ -102,54 +102,54 @@ KexiReportView::KexiReportView(KexiMainWindow *win, QWidget *parent, const char
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->viewport()->setPaletteBackgroundColor(m_reportform->palette().active().background());
#if 0
- connect(reportPart()->manager(), SIGNAL(noFormSelected()), SLOT(slotNoFormSelected()));
+ connect(reportPart()->manager(), TQT_SIGNAL(noFormSelected()), TQT_SLOT(slotNoFormSelected()));
#endif
}
else {
- connect(KFormDesigner::FormManager::self(), SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
- this, SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
- connect(KFormDesigner::FormManager::self(), SIGNAL(dirty(KFormDesigner::Form *, bool)),
- this, SLOT(slotDirty(KFormDesigner::Form *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(propertySetSwitched(KoProperty::Set *, bool)),
+ this, TQT_SLOT(slotPropertySetSwitched(KoProperty::Set *, bool)));
+ connect(KFormDesigner::FormManager::self(), TQT_SIGNAL(dirty(KFormDesigner::Form *, bool)),
+ this, TQT_SLOT(slotDirty(KFormDesigner::Form *, bool)));
// action stuff
- /*connect(reportPart()->manager(), SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
- connect(reportPart()->manager(), SIGNAL(formWidgetSelected(KFormDesigner::Form*)), SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
- connect(reportPart()->manager(), SIGNAL(undoEnabled(bool, const QString&)), this, SLOT(setUndoEnabled(bool)));
- connect(reportPart()->manager(), SIGNAL(redoEnabled(bool, const QString&)), this, SLOT(setRedoEnabled(bool)));*/
-
- plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), SLOT(copyWidget()));
- plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), SLOT(cutWidget()));
- plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), SLOT(pasteWidget()));
- plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), SLOT(deleteWidget()));
- plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), SLOT(selectAll()));
- plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), SLOT(clearWidgetContent()));
- plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), SLOT(undo()));
- plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), SLOT(redo()));
-
- plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), SLOT(bringWidgetToFront()) );
- plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), SLOT(sendWidgetToBack()) );
+ /*connect(reportPart()->manager(), TQT_SIGNAL(widgetSelected(KFormDesigner::Form*, bool)), TQT_SLOT(slotWidgetSelected(KFormDesigner::Form*, bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(formWidgetSelected(KFormDesigner::Form*)), TQT_SLOT(slotFormWidgetSelected(KFormDesigner::Form*)));
+ connect(reportPart()->manager(), TQT_SIGNAL(undoEnabled(bool, const TQString&)), this, TQT_SLOT(setUndoEnabled(bool)));
+ connect(reportPart()->manager(), TQT_SIGNAL(redoEnabled(bool, const TQString&)), this, TQT_SLOT(setRedoEnabled(bool)));*/
+
+ plugSharedAction("edit_copy", KFormDesigner::FormManager::self(), TQT_SLOT(copyWidget()));
+ plugSharedAction("edit_cut", KFormDesigner::FormManager::self(), TQT_SLOT(cutWidget()));
+ plugSharedAction("edit_paste", KFormDesigner::FormManager::self(), TQT_SLOT(pasteWidget()));
+ plugSharedAction("edit_delete", KFormDesigner::FormManager::self(), TQT_SLOT(deleteWidget()));
+ plugSharedAction("edit_select_all", KFormDesigner::FormManager::self(), TQT_SLOT(selectAll()));
+ plugSharedAction("reportpart_clear_contents", KFormDesigner::FormManager::self(), TQT_SLOT(clearWidgetContent()));
+ plugSharedAction("edit_undo", KFormDesigner::FormManager::self(), TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", KFormDesigner::FormManager::self(), TQT_SLOT(redo()));
+
+ plugSharedAction("reportpart_format_raise", KFormDesigner::FormManager::self(), TQT_SLOT(bringWidgetToFront()) );
+ plugSharedAction("reportpart_format_lower", KFormDesigner::FormManager::self(), TQT_SLOT(sendWidgetToBack()) );
plugSharedAction("reportpart_align_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),SLOT(alignWidgetsToLeft()) );
- plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToRight()) );
- plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToTop()) );
- plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToBottom()) );
- plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), SLOT(alignWidgetsToGrid()) );
+ plugSharedAction("reportpart_align_to_left", KFormDesigner::FormManager::self(),TQT_SLOT(alignWidgetsToLeft()) );
+ plugSharedAction("reportpart_align_to_right", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToRight()) );
+ plugSharedAction("reportpart_align_to_top", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToTop()) );
+ plugSharedAction("reportpart_align_to_bottom", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToBottom()) );
+ plugSharedAction("reportpart_align_to_grid", KFormDesigner::FormManager::self(), TQT_SLOT(alignWidgetsToGrid()) );
plugSharedAction("reportpart_adjust_size_menu", KFormDesigner::FormManager::self(), 0 );
- plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), SLOT(adjustWidgetSize()) );
- plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), SLOT(adjustSizeToGrid()) );
- plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), SLOT(adjustHeightToSmall()) );
- plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), SLOT(adjustHeightToBig()) );
- plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), SLOT(adjustWidthToSmall()) );
- plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), SLOT(adjustWidthToBig()) );
+ plugSharedAction("reportpart_adjust_to_fit", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidgetSize()) );
+ plugSharedAction("reportpart_adjust_size_grid", KFormDesigner::FormManager::self(), TQT_SLOT(adjustSizeToGrid()) );
+ plugSharedAction("reportpart_adjust_height_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToSmall()) );
+ plugSharedAction("reportpart_adjust_height_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustHeightToBig()) );
+ plugSharedAction("reportpart_adjust_width_small", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToSmall()) );
+ plugSharedAction("reportpart_adjust_width_big", KFormDesigner::FormManager::self(), TQT_SLOT(adjustWidthToBig()) );
}
initForm();
- connect(this, SIGNAL(focus(bool)), this, SLOT(slotFocus(bool)));
+ connect(this, TQT_SIGNAL(focus(bool)), this, TQT_SLOT(slotFocus(bool)));
/// @todo skip this if ther're no borders
-// m_reportform->resize( m_reportform->size()+QSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
+// m_reportform->resize( m_reportform->size()+TQSize(m_scrollView->verticalScrollBar()->width(), m_scrollView->horizontalScrollBar()->height()) );
}
KexiReportView::~KexiReportView()
@@ -187,10 +187,10 @@ KexiReportView::initForm()
// Show the form wizard if this is a new Form
// KexiDB::FieldList *fields = 0;
- if(parentDialog()->id() < 0)
+ if(tqparentDialog()->id() < 0)
{
#ifndef NO_DSWIZARD
- KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (QWidget*)mainWin(), "datasource_wizard");
+ KexiDataSourceWizard *w = new KexiDataSourceWizard(mainWin(), (TQWidget*)mainWin(), "datasource_wizard");
if(!w->exec())
fields = 0;
else
@@ -202,7 +202,7 @@ KexiReportView::initForm()
/* if(fields)
{
@todo generate a report from a table or a query
- QDomDocument dom;
+ TQDomDocument dom;
reportPart()->generateForm(fields, dom);
KFormDesigner::FormIO::loadFormFromDom(form(), m_reportform, dom);
}
@@ -220,7 +220,7 @@ KexiReportView::loadForm()
//@todo also load m_resizeMode !
- kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << parentDialog()->id() << endl;
+ kexipluginsdbg << "KexiReportForm::loadForm() Loading the form with id : " << tqparentDialog()->id() << endl;
// If we are previewing the Form, use the tempData instead of the form stored in the db
if(viewMode()==Kexi::DataViewMode && !tempData()->tempForm.isNull() ) {
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, tempData()->tempForm);
@@ -228,7 +228,7 @@ KexiReportView::loadForm()
}
// normal load
- QString data;
+ TQString data;
loadDataBlock(data);
KFormDesigner::FormIO::loadFormFromString(form(), m_reportform, data);
}
@@ -249,7 +249,7 @@ KexiReportView::beforeSwitchTo(int mode, bool &dontStore)
if (mode!=viewMode() && viewMode()!=Kexi::DataViewMode) {
//remember our pos
tempData()->scrollViewContentsPos
- = QPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
+ = TQPoint(m_scrollView->contentsX(), m_scrollView->contentsY());
}
// we don't store on db, but in our TempData
@@ -322,12 +322,12 @@ tristate
KexiReportView::storeData(bool dontAsk)
{
Q_UNUSED(dontAsk)
- kexipluginsdbg << "KexiReportForm::storeData(): " << parentDialog()->partItem()->name() << " [" << parentDialog()->id() << "]" << endl;
- QString data;
+ kexipluginsdbg << "KexiReportForm::storeData(): " << tqparentDialog()->partItem()->name() << " [" << tqparentDialog()->id() << "]" << endl;
+ TQString data;
KFormDesigner::FormIO::saveFormToString(tempData()->form, data);
if (!storeDataBlock(data))
return false;
- tempData()->tempForm = QString();
+ tempData()->tempForm = TQString();
return true;
}
@@ -428,17 +428,17 @@ KexiReportView::setRedoEnabled(bool enabled)
}
#endif
-QSize
-KexiReportView::preferredSizeHint(const QSize& otherSize)
+TQSize
+KexiReportView::preferredSizeHint(const TQSize& otherSize)
{
return (m_reportform->size()
- +QSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
+ +TQSize(m_scrollView->verticalScrollBar()->isVisible() ? m_scrollView->verticalScrollBar()->width()*3/2 : 10,
m_scrollView->horizontalScrollBar()->isVisible() ? m_scrollView->horizontalScrollBar()->height()*3/2 : 10))
.expandedTo( KexiViewBase::preferredSizeHint(otherSize) );
}
void
-KexiReportView::resizeEvent( QResizeEvent *e )
+KexiReportView::resizeEvent( TQResizeEvent *e )
{
if (viewMode()==Kexi::DataViewMode) {
m_scrollView->refreshContentsSizeLater(
@@ -461,7 +461,7 @@ KexiReportView::show()
// if (resizeMode() == KexiFormView::ResizeAuto)
if (viewMode()==Kexi::DataViewMode) {
if (resizeMode() == ResizeAuto)
- m_scrollView->setResizePolicy(QScrollView::AutoOneFit);
+ m_scrollView->setResizePolicy(TQScrollView::AutoOneFit);
}
}
diff --git a/kexi/plugins/reports/kexireportview.h b/kexi/plugins/reports/kexireportview.h
index b600c06d9..02b4b48a8 100644
--- a/kexi/plugins/reports/kexireportview.h
+++ b/kexi/plugins/reports/kexireportview.h
@@ -21,8 +21,8 @@
#ifndef KEXIREPORTVIEW_H
#define KEXIREPORTVIEW_H
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
#include <kexiviewbase.h>
@@ -34,9 +34,10 @@ class KexiReportForm;
class KEXIREPORTUTILS_EXPORT KexiReportScrollView : public KexiScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiReportScrollView(QWidget *parent, bool preview);
+ KexiReportScrollView(TQWidget *tqparent, bool preview);
virtual ~KexiReportScrollView();
void setForm(KFormDesigner::Form *form) { m_form = form; }
@@ -62,6 +63,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportScrollView : public KexiScrollView
class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum ResizeMode {
@@ -71,12 +73,12 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
NoResize = 2 /*! @todo */
};
- KexiReportView(KexiMainWindow *win, QWidget *parent, const char *name, KexiDB::Connection *conn);
+ KexiReportView(KexiMainWindow *win, TQWidget *tqparent, const char *name, KexiDB::Connection *conn);
virtual ~KexiReportView();
KexiDB::Connection* connection() { return m_conn; }
- virtual QSize preferredSizeHint(const QSize& otherSize);
+ virtual TQSize preferredSizeHint(const TQSize& otherSize);
int resizeMode() const { return m_resizeMode; }
@@ -105,7 +107,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
virtual tristate storeData(bool dontAsk = false);
KexiReportPart::TempData* tempData() const {
- return static_cast<KexiReportPart::TempData*>(parentDialog()->tempData()); }
+ return static_cast<KexiReportPart::TempData*>(tqparentDialog()->tempData()); }
KexiReportPart* reportPart() const { return static_cast<KexiReportPart*>(part()); }
void disableWidgetActions();
@@ -117,7 +119,7 @@ class KEXIREPORTUTILS_EXPORT KexiReportView : public KexiViewBase
void initForm();
void loadForm();
- virtual void resizeEvent ( QResizeEvent * );
+ virtual void resizeEvent ( TQResizeEvent * );
private:
KexiReportForm *m_reportform;
diff --git a/kexi/plugins/reports/reportwidgets.cpp b/kexi/plugins/reports/reportwidgets.cpp
index 5437325a2..393beaad4 100644
--- a/kexi/plugins/reports/reportwidgets.cpp
+++ b/kexi/plugins/reports/reportwidgets.cpp
@@ -16,7 +16,7 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include <form.h>
#include <formIO.h>
@@ -28,20 +28,20 @@
#include "kexireportview.h"
#include "reportwidgets.h"
-Label::Label(const QString &text, QWidget *parent, const char *name)
-: QLabel(text, parent, name)
+Label::Label(const TQString &text, TQWidget *tqparent, const char *name)
+: TQLabel(text, tqparent, name)
{
setPaletteBackgroundColor(white);
}
////////////////////////////////////////////////////////////////////
-ReportLine::ReportLine(QWidget *parent, const char *name)
-: QWidget(parent, name)
+ReportLine::ReportLine(TQWidget *tqparent, const char *name)
+: TQWidget(tqparent, name)
{
- m_lineStyle = (ReportLineStyle)Qt::SolidLine;
+ m_lineStyle = (ReportLineStyle)TQt::SolidLine;
m_lineWidth = 1;
- m_capStyle = (CapStyle)Qt::FlatCap;
+ m_capStyle = (CapStyle)TQt::FlatCap;
m_color = paletteForegroundColor();
setPaletteBackgroundColor(white);
}
@@ -72,14 +72,14 @@ ReportLine::setLineWidth(int width)
update();
}
-QColor
+TQColor
ReportLine::color() const
{
return m_color;
}
void
-ReportLine::setColor(const QColor &color)
+ReportLine::setColor(const TQColor &color)
{
m_color = color;
update();
@@ -99,13 +99,13 @@ ReportLine::setCapStyle(CapStyle capStyle)
}
void
-ReportLine::paintEvent (QPaintEvent *ev)
+ReportLine::paintEvent (TQPaintEvent *ev)
{
- QPainter p(this);
+ TQPainter p(this);
if(!ev->erased())
p.eraseRect(0, 0, width(), height());
- QPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
- pen.setCapStyle((Qt::PenCapStyle)m_capStyle);
+ TQPen pen(m_color, m_lineWidth, (Qt::PenStyle)m_lineStyle);
+ pen.setCapStyle((TQt::PenCapStyle)m_capStyle);
p.setPen(pen);
p.drawLine(0, 0, width() -1, height() - 1);
}
@@ -113,8 +113,8 @@ ReportLine::paintEvent (QPaintEvent *ev)
////////////////////////////////////////////////////////////////////
-PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
- : QLabel(parent, name)
+PicLabel::PicLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name)
+ : TQLabel(tqparent, name)
{
setPixmap(pix);
setScaledContents(false);
@@ -122,52 +122,52 @@ PicLabel::PicLabel(const QPixmap &pix, QWidget *parent, const char *name)
}
bool
-PicLabel::setProperty(const char *name, const QVariant &value)
+PicLabel::setProperty(const char *name, const TQVariant &value)
{
- if(QString(name) == "pixmap")
+ if(TQString(name) == "pixmap")
resize(value.toPixmap().height(), value.toPixmap().width());
- return QLabel::setProperty(name, value);
+ return TQLabel::setProperty(name, value);
}
////////////////////////////////////////////////////////////////////
-KexiSubReport::KexiSubReport(QWidget *parent, const char *name)
-: QScrollView(parent, name), m_form(0), m_widget(0)
+KexiSubReport::KexiSubReport(TQWidget *tqparent, const char *name)
+: TQScrollView(tqparent, name), m_form(0), m_widget(0)
{
- setFrameStyle(QFrame::Plain | QFrame::Box);
+ setFrameStyle(TQFrame::Plain | TQFrame::Box);
viewport()->setPaletteBackgroundColor(white);
}
void
-KexiSubReport::setReportName(const QString &name)
+KexiSubReport::setReportName(const TQString &name)
{
if(name.isEmpty())
return;
// we need a KexiReportView*
- QWidget *w = parentWidget();
+ TQWidget *w = tqparentWidget();
while(w && !w->isA("KexiReportView"))
- w = w->parentWidget();
+ w = w->tqparentWidget();
KexiReportView *view = (KexiReportView*)w;
if(!view)
return;
// we check if there is a form with this name
int id = KexiDB::idForObjectName(*(view->connection()), name, KexiPart::ReportObjectType);
- if((id == 0) || (id == view->parentDialog()->id())) // == our form
+ if((id == 0) || (id == view->tqparentDialog()->id())) // == our form
return; // because of recursion when loading
// we create the container widget
delete m_widget;
- m_widget = new QWidget(viewport(), "kexisubreport_widget");
+ m_widget = new TQWidget(viewport(), "kexisubreport_widget");
m_widget->show();
addChild(m_widget);
m_form = new Form(KexiReportPart::library(), this->name());
m_form->createToplevel(m_widget);
// and load the sub form
- QString data;
- tristate res = view->connection()->loadDataBlock(id, data , QString::null);
+ TQString data;
+ tristate res = view->connection()->loadDataBlock(id, data , TQString());
if(res != true)
return;
diff --git a/kexi/plugins/reports/reportwidgets.h b/kexi/plugins/reports/reportwidgets.h
index f8140b0c0..9e5875560 100644
--- a/kexi/plugins/reports/reportwidgets.h
+++ b/kexi/plugins/reports/reportwidgets.h
@@ -20,8 +20,8 @@
#ifndef KEXIREPORTWIDGETS_H
#define KEXIREPORTWIDGETS_H
-#include <qlabel.h>
-#include <qscrollview.h>
+#include <tqlabel.h>
+#include <tqscrollview.h>
namespace KFormDesigner {
class Form;
@@ -31,63 +31,67 @@ namespace KFormDesigner {
using KFormDesigner::Form;
//! A form embedded as a widget inside other form
-class KexiSubReport : public QScrollView
+class KexiSubReport : public TQScrollView
{
Q_OBJECT
- Q_PROPERTY(QString reportName READ reportName WRITE setReportName DESIGNABLE true);
+ TQ_OBJECT
+ TQ_PROPERTY(TQString reportName READ reportName WRITE setReportName DESIGNABLE true);
public:
- KexiSubReport(QWidget *parent, const char *name);
+ KexiSubReport(TQWidget *tqparent, const char *name);
~KexiSubReport() {}
//! \return the name of the subreport inside the db
- QString reportName() const { return m_reportName; }
- void setReportName(const QString &name);
+ TQString reportName() const { return m_reportName; }
+ void setReportName(const TQString &name);
private:
// KFormDesigner::FormManager *m_manager;
Form *m_form;
- QWidget *m_widget;
- QString m_reportName;
+ TQWidget *m_widget;
+ TQString m_reportName;
};
//! A simple label inside a report
-class Label : public QLabel
+class Label : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- Label(const QString &text, QWidget *parent, const char *name);
+ Label(const TQString &text, TQWidget *tqparent, const char *name);
~Label() {}
};
//! A simple picture label inside a report
-class PicLabel : public QLabel
+class PicLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- PicLabel(const QPixmap &pix, QWidget *parent, const char *name);
+ PicLabel(const TQPixmap &pix, TQWidget *tqparent, const char *name);
~PicLabel() {}
- virtual bool setProperty(const char *name, const QVariant &value);
+ virtual bool setProperty(const char *name, const TQVariant &value);
};
//! A line
-class ReportLine : public QWidget
+class ReportLine : public TQWidget
{
Q_OBJECT
- Q_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
- Q_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
- Q_PROPERTY(QColor color READ color WRITE setColor)
- Q_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
+ TQ_OBJECT
+ TQ_PROPERTY(ReportLineStyle lineStyle READ lineStyle WRITE setLineStyle)
+ TQ_PROPERTY(int lineWidth READ lineWidth WRITE setLineWidth)
+ TQ_PROPERTY(TQColor color READ color WRITE setColor)
+ TQ_PROPERTY(CapStyle capStyle READ capStyle WRITE setCapStyle)
public:
- enum ReportLineStyle { NoLine = Qt::NoPen, Solid = Qt::SolidLine, Dash = Qt::DashLine, Dot = Qt::DotLine,
- DashDot = Qt::DashDotLine, DashDotDot = Qt::DashDotDotLine };
- enum CapStyle { Flat = Qt::FlatCap, Square = Qt::SquareCap, Round = Qt::RoundCap };
+ enum ReportLineStyle { NoLine = TQt::NoPen, Solid = TQt::SolidLine, Dash = TQt::DashLine, Dot = TQt::DotLine,
+ DashDot = TQt::DashDotLine, DashDotDot = TQt::DashDotDotLine };
+ enum CapStyle { Flat = TQt::FlatCap, Square = TQt::SquareCap, Round = TQt::RoundCap };
- ReportLine(QWidget *parent, const char *name);
+ ReportLine(TQWidget *tqparent, const char *name);
~ReportLine(){;}
ReportLineStyle lineStyle() const;
@@ -96,20 +100,20 @@ class ReportLine : public QWidget
int lineWidth() const;
void setLineWidth(int width);
- QColor color() const;
- void setColor(const QColor &color);
+ TQColor color() const;
+ void setColor(const TQColor &color);
CapStyle capStyle() const;
void setCapStyle(CapStyle capStyle);
protected:
- virtual void paintEvent (QPaintEvent *ev);
+ virtual void paintEvent (TQPaintEvent *ev);
private:
ReportLineStyle m_lineStyle;
int m_lineWidth;
CapStyle m_capStyle;
- QColor m_color;
+ TQColor m_color;
};
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
index 4d82bc5de..5ee81a434 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
+++ b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.cpp
@@ -67,7 +67,7 @@ KexiAppMainWindow::~KexiAppMainWindow()
delete d;
}
-const QString KexiAppMainWindow::getClassName() const
+const TQString KexiAppMainWindow::getClassName() const
{
return "Kross::KexiApp::KexiAppMainWindow";
}
@@ -88,7 +88,7 @@ Kross::Api::Object::Ptr KexiAppMainWindow::getConnection()
return module->get("KexiDBConnection", connection);
}
-Kross::Api::List* KexiAppMainWindow::getPartItems(const QString& mimetype)
+Kross::Api::List* KexiAppMainWindow::getPartItems(const TQString& mimetype)
{
if(mimetype.isNull()) return 0; // just to be sure...
KexiPart::ItemDict* items = d->project()->itemsForMimeType( mimetype.latin1() );
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
index fd02c193c..7eecd2136 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
+++ b/kexi/plugins/scripting/kexiapp/kexiappmainwindow.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPMAINWINDOW_H
#define KROSS_KEXIAPP_KEXIAPPMAINWINDOW_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/object.h>
#include <api/variant.h>
@@ -58,7 +58,7 @@ namespace Kross { namespace KexiApp {
virtual ~KexiAppMainWindow();
/// \see Kross::Api::Object::getClassName
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
/** \return true if Kexi is connected with a project else
false is returned. */
@@ -74,7 +74,7 @@ namespace Kross { namespace KexiApp {
/** \return a list of \a KexiAppPartItem objects for the defined
\p mimetype string. */
- Kross::Api::List* getPartItems(const QString& mimetype);
+ Kross::Api::List* getPartItems(const TQString& mimetype);
/** Try to open the defined \a KexiAppPartItem and \return true
on success else false. */
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp b/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
index cb6644963..9a1c73d7e 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
+++ b/kexi/plugins/scripting/kexiapp/kexiappmodule.cpp
@@ -90,7 +90,7 @@ KexiAppModule::~KexiAppModule()
}
-const QString KexiAppModule::getClassName() const
+const TQString KexiAppModule::getClassName() const
{
return "Kross::KexiApp::KexiAppModule";
}
diff --git a/kexi/plugins/scripting/kexiapp/kexiappmodule.h b/kexi/plugins/scripting/kexiapp/kexiappmodule.h
index 08ed71f0e..2b87cca59 100644
--- a/kexi/plugins/scripting/kexiapp/kexiappmodule.h
+++ b/kexi/plugins/scripting/kexiapp/kexiappmodule.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPMODULE_H
#define KROSS_KEXIAPP_KEXIAPPMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/module.h>
@@ -63,7 +63,7 @@ namespace KexiApp {
virtual ~KexiAppModule();
/// \see Kross::Api::Object::getClassName
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/// Private d-pointer class.
diff --git a/kexi/plugins/scripting/kexiapp/kexiapppart.h b/kexi/plugins/scripting/kexiapp/kexiapppart.h
index 5f55d6bf1..bf399641f 100644
--- a/kexi/plugins/scripting/kexiapp/kexiapppart.h
+++ b/kexi/plugins/scripting/kexiapp/kexiapppart.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIAPP_KEXIAPPPART_H
#define KROSS_KEXIAPP_KEXIAPPPART_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/object.h>
#include <api/variant.h>
@@ -43,7 +43,7 @@ namespace Kross { namespace KexiApp {
public:
KexiAppPartItem(KexiPart::Item*);
virtual ~KexiAppPartItem() {}
- virtual const QString getClassName() const { return "Kross::KexiApp::KexiAppPartItem"; }
+ virtual const TQString getClassName() const { return "Kross::KexiApp::KexiAppPartItem"; }
KexiPart::Item* item() { return m_item; }
private:
diff --git a/kexi/plugins/scripting/kexidb.doxyfile b/kexi/plugins/scripting/kexidb.doxyfile
index e40a378e4..3e21f7f14 100644
--- a/kexi/plugins/scripting/kexidb.doxyfile
+++ b/kexi/plugins/scripting/kexidb.doxyfile
@@ -16,7 +16,7 @@ ABBREVIATE_BRIEF = "The $name class" \
is \
provides \
specifies \
- contains \
+ tqcontains \
represents \
a \
an \
@@ -111,7 +111,7 @@ RECURSIVE = YES
EXCLUDE =
EXCLUDE_SYMLINKS = YES
-EXCLUDE_PATTERNS = config.h *.moc.cpp
+EXCLUDE_PATTERNS = config.h *.tqmoc.cpp
EXAMPLE_PATH =
EXAMPLE_PATTERNS = *
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
index d3b7cc76f..f64a089f8 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbconnection.cpp
@@ -94,20 +94,20 @@ KexiDBConnection::KexiDBConnection(::KexiDB::Connection* connection, KexiDBDrive
KexiDBConnection::~KexiDBConnection() {
}
-const QString KexiDBConnection::getClassName() const {
+const TQString KexiDBConnection::getClassName() const {
return "Kross::KexiDB::KexiDBConnection";
}
::KexiDB::Connection* KexiDBConnection::connection() const {
if(! m_connection)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection is NULL.")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection is NULL.")) );
//if(m_connection->error())
- // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Connection error: %1").arg(m_connection->errorMsg())) );
+ // throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Connection error: %1").tqarg(m_connection->errorMsg())) );
return m_connection;
}
bool KexiDBConnection::hadError() const { return connection()->error(); }
-const QString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
+const TQString KexiDBConnection::lastError() const { return connection()->errorMsg(); }
KexiDBConnectionData* KexiDBConnection::data() { return m_connectiondata.data(); }
KexiDBDriver* KexiDBConnection::driver() { return m_driver.data(); }
@@ -118,31 +118,31 @@ bool KexiDBConnection::disconnect() { return connection()->disconnect(); }
bool KexiDBConnection::isReadOnly() const { return connection()->isReadOnly(); }
-bool KexiDBConnection::databaseExists(const QString& dbname) { return connection()->databaseExists(dbname); }
-const QString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
-const QStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
+bool KexiDBConnection::databaseExists(const TQString& dbname) { return connection()->databaseExists(dbname); }
+const TQString KexiDBConnection::currentDatabase() const { return connection()->currentDatabase(); }
+const TQStringList KexiDBConnection::databaseNames() const { return connection()->databaseNames(); }
bool KexiDBConnection::isDatabaseUsed() const { return connection()->isDatabaseUsed(); }
-bool KexiDBConnection::useDatabase(const QString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
+bool KexiDBConnection::useDatabase(const TQString& dbname) { return connection()->databaseExists(dbname) && m_connection->useDatabase(dbname); }
bool KexiDBConnection::closeDatabase() { return connection()->closeDatabase(); }
-const QStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
-const QStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
+const TQStringList KexiDBConnection::allTableNames() const { return connection()->tableNames(true); }
+const TQStringList KexiDBConnection::tableNames() const { return connection()->tableNames(false); }
-const QStringList KexiDBConnection::queryNames() const {
+const TQStringList KexiDBConnection::queryNames() const {
bool ok = true;
- QStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
- if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to determinate querynames.")) );
+ TQStringList queries = connection()->objectNames(::KexiDB::QueryObjectType, &ok);
+ if(! ok) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to determinate querynames.")) );
return queries;
}
-KexiDBCursor* KexiDBConnection::executeQueryString(const QString& sqlquery) {
+KexiDBCursor* KexiDBConnection::executeQueryString(const TQString& sqlquery) {
// The ::KexiDB::Connection::executeQuery() method does not check if we pass a valid SELECT-statement
// or e.g. a DROP TABLE operation. So, let's check for such dangerous operations right now.
::KexiDB::Parser parser( connection() );
if(! parser.parse(sqlquery))
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Failed to parse query: %1 %2").arg(parser.error().type()).arg(parser.error().error())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to parse query: %1 %2").tqarg(parser.error().type()).tqarg(parser.error().error())) );
if( parser.query() == 0 || parser.operation() != ::KexiDB::Parser::OP_Select )
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid query operation \"%1\"").arg(parser.operationString()) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid query operation \"%1\"").tqarg(parser.operationString()) ) );
::KexiDB::Cursor* cursor = connection()->executeQuery(sqlquery);
return cursor ? new KexiDBCursor(cursor) : 0;
}
@@ -153,39 +153,39 @@ KexiDBCursor* KexiDBConnection::executeQuerySchema(KexiDBQuerySchema* queryschem
}
/*TODO
-bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoFieldlist(KexiDBFieldList* fieldlist, TQValueList<TQVariant> values) {
return connection()->insertRecord(*fieldlist->fieldlist(), values);
}
-bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, QValueList<QVariant> values) {
+bool KexiDBConnection::insertRecordIntoTable(KexiDBTableSchema* tableschema, TQValueList<TQVariant> values) {
return connection()->insertRecord(*tableschema->tableschema(), values);
}
*/
Kross::Api::Object::Ptr KexiDBConnection::insertRecord(Kross::Api::List::Ptr args) {
- QValueList<QVariant> values = Kross::Api::Variant::toList(args->item(1));
+ TQValueList<TQVariant> values = Kross::Api::Variant::toList(args->item(1));
Kross::Api::Object::Ptr obj = args->item(0);
if(obj->getClassName() == "Kross::KexiDB::KexiDBFieldList")
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBFieldList>(obj)->fieldlist(),
values
), 0));
return new Kross::Api::Variant(
- QVariant(connection()->insertRecord(
+ TQVariant(connection()->insertRecord(
*Kross::Api::Object::fromObject<KexiDBTableSchema>(obj)->tableschema(),
values
), 0));
}
-bool KexiDBConnection::createDatabase(const QString& dbname) { return connection()->createDatabase(dbname); }
-bool KexiDBConnection::dropDatabase(const QString& dbname) { return connection()->dropDatabase(dbname); }
+bool KexiDBConnection::createDatabase(const TQString& dbname) { return connection()->createDatabase(dbname); }
+bool KexiDBConnection::dropDatabase(const TQString& dbname) { return connection()->dropDatabase(dbname); }
bool KexiDBConnection::createTable(KexiDBTableSchema* tableschema) { return connection()->createTable(tableschema->tableschema(), false); }
-bool KexiDBConnection::dropTable(const QString& tablename) { return true == connection()->dropTable(tablename); }
+bool KexiDBConnection::dropTable(const TQString& tablename) { return true == connection()->dropTable(tablename); }
bool KexiDBConnection::alterTable(KexiDBTableSchema* fromschema, KexiDBTableSchema* toschema) { return true == connection()->alterTable(*fromschema->tableschema(), *toschema->tableschema()); }
-bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const QString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
+bool KexiDBConnection::alterTableName(KexiDBTableSchema* tableschema, const TQString& newtablename) { return connection()->alterTableName(*tableschema->tableschema(), newtablename); }
-KexiDBTableSchema* KexiDBConnection::tableSchema(const QString& tablename) const {
+KexiDBTableSchema* KexiDBConnection::tableSchema(const TQString& tablename) const {
::KexiDB::TableSchema* tableschema = connection()->tableSchema(tablename);
return tableschema ? new KexiDBTableSchema(tableschema) : 0;
}
@@ -196,7 +196,7 @@ bool KexiDBConnection::isEmptyTable(KexiDBTableSchema* tableschema) const {
return (! (success && notempty));
}
-KexiDBQuerySchema* KexiDBConnection::querySchema(const QString& queryname) const {
+KexiDBQuerySchema* KexiDBConnection::querySchema(const TQString& queryname) const {
::KexiDB::QuerySchema* queryschema = connection()->querySchema(queryname);
return queryschema ? new KexiDBQuerySchema(queryschema) : 0;
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnection.h b/kexi/plugins/scripting/kexidb/kexidbconnection.h
index 7e1a7d3a6..925a6e8e9 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnection.h
+++ b/kexi/plugins/scripting/kexidb/kexidbconnection.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCONNECTION_H
#define KROSS_KEXIDB_KEXIDBCONNECTION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <ksharedptr.h>
#include <api/object.h>
@@ -70,14 +70,14 @@ namespace Kross { namespace KexiDB {
public:
KexiDBConnection(::KexiDB::Connection* connection, KexiDBDriver* driver = 0, KexiDBConnectionData* connectiondata = 0);
virtual ~KexiDBConnection();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Return true if there was an error during last operation on the database. */
bool hadError() const;
/** Return the last errormessage. */
- const QString lastError() const;
+ const TQString lastError() const;
/** Return the KexiDBConnectionData object used to create this connection. */
KexiDBConnectionData* data();
@@ -95,31 +95,31 @@ namespace Kross { namespace KexiDB {
bool isReadOnly() const;
/** Return true if the as argument passed databasename exists. */
- bool databaseExists(const QString& dbname);
+ bool databaseExists(const TQString& dbname);
/** Return the name of currently used database for this connection or empty
string if there is no used database. */
- const QString currentDatabase() const;
+ const TQString currentDatabase() const;
/** Return list of database names for opened connection. */
- const QStringList databaseNames() const;
+ const TQStringList databaseNames() const;
/** Return true if connection is properly established. */
bool isDatabaseUsed() const;
/** Opens an existing database specified by the as argument passed databasename
and returns true if the database is used now. */
- bool useDatabase(const QString& dbname);
+ bool useDatabase(const TQString& dbname);
/** Closes currently used database for this connection. */
bool closeDatabase();
/** Return names of all table schemas stored in currently used database include the
internal KexiDB system table names (kexi__*) */
- const QStringList allTableNames() const;
+ const TQStringList allTableNames() const;
/** Return names of all table schemas without the internal KexiDB system table names (kexi__*) */
- const QStringList tableNames() const;
+ const TQStringList tableNames() const;
/** Return names of all query schemas stored in currently used database. */
- const QStringList queryNames() const;
+ const TQStringList queryNames() const;
/** Executes query described by the as argument passed sqlstatement-string. Returns the
opened cursor created for results of this query. */
- KexiDBCursor* executeQueryString(const QString& sqlquery);
+ KexiDBCursor* executeQueryString(const TQString& sqlquery);
/** Executes query described by the as argument passed KexiDBQuerySchema object. Returns
the opened cursor created for results of this query. */
KexiDBCursor* executeQuerySchema(KexiDBQuerySchema* queryschema);
@@ -129,28 +129,28 @@ namespace Kross { namespace KexiDB {
Kross::Api::Object::Ptr insertRecord(Kross::Api::List::Ptr);
/** Creates new database with the as argument passed databasename. */
- bool createDatabase(const QString& dbname);
+ bool createDatabase(const TQString& dbname);
/** Drops the as argument passed databasename. */
- bool dropDatabase(const QString& dbname);
+ bool dropDatabase(const TQString& dbname);
/** Creates table defined by the as argument passed KexiTableSchema object. */
bool createTable(KexiDBTableSchema* tableschema);
/** Drops table defined by the as argument passed KexiDBTableSchema object. */
- bool dropTable(const QString& tablename);
+ bool dropTable(const TQString& tablename);
/** Alters the as first argument passed KexiDBTableSchema object using the as
second argument passed KexiDBTableSchema. */
bool alterTable(KexiDBTableSchema* fromschema, KexiDBTableSchema* toschema);
/** Alters the tablename of the as first argument passed KexiDBTableSchema into
the as second argument passed new tablename. */
- bool alterTableName(KexiDBTableSchema* tableschema, const QString& newtablename);
+ bool alterTableName(KexiDBTableSchema* tableschema, const TQString& newtablename);
/** Returns the KexiDBTableSchema object of the table matching to the as argument
passed tablename. */
- KexiDBTableSchema* tableSchema(const QString& tablename) const;
+ KexiDBTableSchema* tableSchema(const TQString& tablename) const;
/** Returns true if there is at least one valid record in the as argument passed tablename. */
bool isEmptyTable(KexiDBTableSchema* tableschema) const;
/** Returns the KexiDBQuerySchema object of the query matching to the as argument passed queryname. */
- KexiDBQuerySchema* querySchema(const QString& queryname) const;
+ KexiDBQuerySchema* querySchema(const TQString& queryname) const;
/** Return true if the \"auto commit\" option is on. */
bool autoCommit() const;
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
index 61b81d3e2..bcfe47021 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.cpp
@@ -19,7 +19,7 @@
#include "kexidbconnectiondata.h"
-#include <qvariant.h>
+#include <tqvariant.h>
using namespace Kross::KexiDB;
@@ -70,43 +70,43 @@ KexiDBConnectionData::~KexiDBConnectionData()
//delete m_data;
}
-const QString KexiDBConnectionData::getClassName() const
+const TQString KexiDBConnectionData::getClassName() const
{
return "Kross::KexiDB::KexiDBConnectionData";
}
-const QString KexiDBConnectionData::caption() const { return m_data->caption; }
-void KexiDBConnectionData::setCaption(const QString& name) { m_data->caption = name; }
+const TQString KexiDBConnectionData::caption() const { return m_data->caption; }
+void KexiDBConnectionData::setCaption(const TQString& name) { m_data->caption = name; }
-const QString KexiDBConnectionData::description() const { return m_data->description; }
-void KexiDBConnectionData::setDescription(const QString& desc) { m_data->description = desc; }
+const TQString KexiDBConnectionData::description() const { return m_data->description; }
+void KexiDBConnectionData::setDescription(const TQString& desc) { m_data->description = desc; }
-const QString KexiDBConnectionData::driverName() const { return m_data->driverName; }
-void KexiDBConnectionData::setDriverName(const QString& driver) { m_data->driverName = driver; }
+const TQString KexiDBConnectionData::driverName() const { return m_data->driverName; }
+void KexiDBConnectionData::setDriverName(const TQString& driver) { m_data->driverName = driver; }
bool KexiDBConnectionData::localSocketFileUsed() const { return m_data->useLocalSocketFile; }
void KexiDBConnectionData::setLocalSocketFileUsed(bool used) { m_data->useLocalSocketFile = used; }
-const QString KexiDBConnectionData::localSocketFileName() const { return m_data->localSocketFileName; }
-void KexiDBConnectionData::setLocalSocketFileName(const QString& socketfilename) { m_data->localSocketFileName = socketfilename; }
+const TQString KexiDBConnectionData::localSocketFileName() const { return m_data->localSocketFileName; }
+void KexiDBConnectionData::setLocalSocketFileName(const TQString& socketfilename) { m_data->localSocketFileName = socketfilename; }
-const QString KexiDBConnectionData::databaseName() const { return m_dbname; }
-void KexiDBConnectionData::setDatabaseName(const QString& dbname) { m_dbname = dbname; }
+const TQString KexiDBConnectionData::databaseName() const { return m_dbname; }
+void KexiDBConnectionData::setDatabaseName(const TQString& dbname) { m_dbname = dbname; }
-const QString KexiDBConnectionData::hostName() const { return m_data->hostName; }
-void KexiDBConnectionData::setHostName(const QString& hostname) { m_data->hostName = hostname; }
+const TQString KexiDBConnectionData::hostName() const { return m_data->hostName; }
+void KexiDBConnectionData::setHostName(const TQString& hostname) { m_data->hostName = hostname; }
int KexiDBConnectionData::port() const { return m_data->port; }
void KexiDBConnectionData::setPort(int p) { m_data->port = p; }
-const QString KexiDBConnectionData::password() const { return m_data->password; }
-void KexiDBConnectionData::setPassword(const QString& passwd) { m_data->password = passwd; }
+const TQString KexiDBConnectionData::password() const { return m_data->password; }
+void KexiDBConnectionData::setPassword(const TQString& passwd) { m_data->password = passwd; }
-const QString KexiDBConnectionData::userName() const { return m_data->userName; }
-void KexiDBConnectionData::setUserName(const QString& username) { m_data->userName = username; }
+const TQString KexiDBConnectionData::userName() const { return m_data->userName; }
+void KexiDBConnectionData::setUserName(const TQString& username) { m_data->userName = username; }
-const QString KexiDBConnectionData::fileName() const { return m_data->fileName(); }
-void KexiDBConnectionData::setFileName(const QString& filename) { m_data->setFileName(filename); }
+const TQString KexiDBConnectionData::fileName() const { return m_data->fileName(); }
+void KexiDBConnectionData::setFileName(const TQString& filename) { m_data->setFileName(filename); }
-const QString KexiDBConnectionData::dbPath() const { return m_data->dbPath(); }
-const QString KexiDBConnectionData::dbFileName() const { return m_data->dbFileName(); }
-const QString KexiDBConnectionData::serverInfoString() const { return m_data->serverInfoString(true); }
+const TQString KexiDBConnectionData::dbPath() const { return m_data->dbPath(); }
+const TQString KexiDBConnectionData::dbFileName() const { return m_data->dbFileName(); }
+const TQString KexiDBConnectionData::serverInfoString() const { return m_data->serverInfoString(true); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
index aaddffbd8..b82c7b6e1 100644
--- a/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
+++ b/kexi/plugins/scripting/kexidb/kexidbconnectiondata.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
#define KROSS_KEXIDB_KEXIDBCONNECTIONDATA_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -44,46 +44,46 @@ namespace Kross { namespace KexiDB {
virtual ~KexiDBConnectionData();
operator ::KexiDB::ConnectionData& () { return *m_data; }
operator ::KexiDB::ConnectionData* () { return m_data; }
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::ConnectionData* data() { return m_data; }
private:
/** Return the connection name. */
- const QString caption() const;
+ const TQString caption() const;
/** Set the connection name. */
- void setCaption(const QString& name);
+ void setCaption(const TQString& name);
/** Return the description. */
- const QString description() const;
+ const TQString description() const;
/** Set the description. */
- void setDescription(const QString& desc);
+ void setDescription(const TQString& desc);
/** Return drivername. */
- const QString driverName() const;
+ const TQString driverName() const;
/** Set the drivername. */
- void setDriverName(const QString& driver);
+ void setDriverName(const TQString& driver);
/** Return true if a local socket file is used else false. */
bool localSocketFileUsed() const;
/** Set if the local socket file should be used. */
void setLocalSocketFileUsed(bool used);
/** Return the local socket filename. */
- const QString localSocketFileName() const;
+ const TQString localSocketFileName() const;
/** Set the local socket filename. */
- void setLocalSocketFileName(const QString& socketfilename);
+ void setLocalSocketFileName(const TQString& socketfilename);
// For serverbased drivers
/** Return the database name. */
- const QString databaseName() const;
+ const TQString databaseName() const;
/** Set the database name. */
- void setDatabaseName(const QString& dbname);
+ void setDatabaseName(const TQString& dbname);
/** Return the hostname. */
- const QString hostName() const;
+ const TQString hostName() const;
/** Set the hostname. */
- void setHostName(const QString& hostname);
+ void setHostName(const TQString& hostname);
/** Return the port number. */
int port() const;
@@ -91,33 +91,33 @@ namespace Kross { namespace KexiDB {
void setPort(int p);
/** Return the password. */
- const QString password() const;
+ const TQString password() const;
/** Set the password. */
- void setPassword(const QString& passwd);
+ void setPassword(const TQString& passwd);
/** Return the username. */
- const QString userName() const;
+ const TQString userName() const;
/** Set the username. */
- void setUserName(const QString& username);
+ void setUserName(const TQString& username);
// For filebased drivers
/** Return the filename. */
- const QString fileName() const;
+ const TQString fileName() const;
/** Set the filename. */
- void setFileName(const QString& filename);
+ void setFileName(const TQString& filename);
/** Return the database path. */
- const QString dbPath() const;
+ const TQString dbPath() const;
/** Return the database filename. */
- const QString dbFileName() const;
+ const TQString dbFileName() const;
/** Return a user-friendly string representation. */
- const QString serverInfoString() const;
+ const TQString serverInfoString() const;
private:
::KexiDB::ConnectionData* m_data;
- QString m_dbname;
+ TQString m_dbname;
};
}}
diff --git a/kexi/plugins/scripting/kexidb/kexidbcursor.cpp b/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
index 3bc1763d3..bb9f53df5 100644
--- a/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbcursor.cpp
@@ -58,14 +58,14 @@ KexiDBCursor::~KexiDBCursor()
void KexiDBCursor::clearBuffers()
{
- QMap<Q_LLONG, Record*>::ConstIterator
+ TQMap<TQ_LLONG, Record*>::ConstIterator
it( m_modifiedrecords.constBegin() ), end( m_modifiedrecords.constEnd() );
for( ; it != end; ++it)
delete it.data();
m_modifiedrecords.clear();
}
-const QString KexiDBCursor::getClassName() const
+const TQString KexiDBCursor::getClassName() const
{
return "Kross::KexiDB::KexiDBCursor";
}
@@ -83,15 +83,15 @@ bool KexiDBCursor::moveNext() { return m_cursor->moveNext(); }
bool KexiDBCursor::bof() { return m_cursor->bof(); }
bool KexiDBCursor::eof() { return m_cursor->eof(); }
-Q_LLONG KexiDBCursor::at() { return m_cursor->at(); }
+TQ_LLONG KexiDBCursor::at() { return m_cursor->at(); }
uint KexiDBCursor::fieldCount() { return m_cursor->fieldCount(); }
-QVariant KexiDBCursor::value(uint index)
+TQVariant KexiDBCursor::value(uint index)
{
return m_cursor->value(index);
}
-bool KexiDBCursor::setValue(uint index, QVariant value)
+bool KexiDBCursor::setValue(uint index, TQVariant value)
{
::KexiDB::QuerySchema* query = m_cursor->query();
if(! query) {
@@ -105,9 +105,9 @@ bool KexiDBCursor::setValue(uint index, QVariant value)
return false;
}
- const Q_LLONG position = m_cursor->at();
- if(! m_modifiedrecords.contains(position))
- m_modifiedrecords.replace(position, new Record(m_cursor));
+ const TQ_LLONG position = m_cursor->at();
+ if(! m_modifiedrecords.tqcontains(position))
+ m_modifiedrecords.tqreplace(position, new Record(m_cursor));
m_modifiedrecords[position]->buffer->insert(*column, value);
return true;
}
@@ -124,7 +124,7 @@ bool KexiDBCursor::save()
m_cursor->close();
bool ok = true;
- QMap<Q_LLONG, Record*>::ConstIterator
+ TQMap<TQ_LLONG, Record*>::ConstIterator
it( m_modifiedrecords.constBegin() ), end( m_modifiedrecords.constEnd() );
for( ; it != end; ++it) {
bool b = m_cursor->updateRow(it.data()->rowdata, * it.data()->buffer, m_cursor->isBuffered());
diff --git a/kexi/plugins/scripting/kexidb/kexidbcursor.h b/kexi/plugins/scripting/kexidb/kexidbcursor.h
index 6e92a38ec..6ff094ae7 100644
--- a/kexi/plugins/scripting/kexidb/kexidbcursor.h
+++ b/kexi/plugins/scripting/kexidb/kexidbcursor.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBCURSOR_H
#define KROSS_KEXIDB_KEXIDBCURSOR_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -87,7 +87,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBCursor(::KexiDB::Cursor* cursor);
virtual ~KexiDBCursor();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
@@ -117,14 +117,14 @@ namespace Kross { namespace KexiDB {
/** Returns current internal position of the cursor's query. Records
are numbered from 0; the value -1 means that the cursor does not
point to a valid record. */
- Q_LLONG at();
+ TQ_LLONG at();
/** Returns the number of fields available for this cursor. */
uint fieldCount();
/** Returns the value stored in the passed column number (counting from 0). */
- QVariant value(uint index);
+ TQVariant value(uint index);
/** Set the value for the field defined with index. The new value is buffered
and does not got written as long as save() is not called. */
- bool setValue(uint index, QVariant value);
+ bool setValue(uint index, TQVariant value);
/** Save any changes done with setValue(). You should call this only once at
the end of all value/setValue iterations cause the cursor is closed once
@@ -148,7 +148,7 @@ namespace Kross { namespace KexiDB {
delete buffer;
}
};
- QMap<Q_LLONG, Record*> m_modifiedrecords;
+ TQMap<TQ_LLONG, Record*> m_modifiedrecords;
void clearBuffers();
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbdriver.cpp b/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
index f019b237f..0429c9f35 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbdriver.cpp
@@ -20,8 +20,8 @@
#include "kexidbdriver.h"
#include "kexidbdrivermanager.h"
-#include <qvaluelist.h>
-#include <qptrlist.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
#include <kdebug.h>
#include <kexidb/connection.h>
@@ -51,7 +51,7 @@ KexiDBDriver::~KexiDBDriver()
{
}
-const QString KexiDBDriver::getClassName() const
+const TQString KexiDBDriver::getClassName() const
{
return "Kross::KexiDB::KexiDBDriver";
}
@@ -59,12 +59,12 @@ const QString KexiDBDriver::getClassName() const
bool KexiDBDriver::isValid() { return m_driver->isValid(); }
int KexiDBDriver::versionMajor() { return m_driver->version().major; }
int KexiDBDriver::versionMinor() { return m_driver->version().minor; }
-QString KexiDBDriver::escapeString(const QString& s) { return m_driver->escapeString(s); }
+TQString KexiDBDriver::escapeString(const TQString& s) { return m_driver->escapeString(s); }
bool KexiDBDriver::isFileDriver() { return m_driver->isFileDriver(); }
-QString KexiDBDriver::fileDBDriverMimeType() { return m_driver->fileDBDriverMimeType(); }
-bool KexiDBDriver::isSystemObjectName(const QString& name) { return m_driver->isSystemObjectName(name); }
-bool KexiDBDriver::isSystemDatabaseName(const QString& name) { return m_driver->isSystemDatabaseName(name); }
-bool KexiDBDriver::isSystemFieldName(const QString& name) { return m_driver->isSystemFieldName(name); }
-QString KexiDBDriver::valueToSQL(const QString& fieldtype, const QVariant& value) { return m_driver->valueToSQL(fieldtype, value); }
+TQString KexiDBDriver::fileDBDriverMimeType() { return m_driver->fileDBDriverMimeType(); }
+bool KexiDBDriver::isSystemObjectName(const TQString& name) { return m_driver->isSystemObjectName(name); }
+bool KexiDBDriver::isSystemDatabaseName(const TQString& name) { return m_driver->isSystemDatabaseName(name); }
+bool KexiDBDriver::isSystemFieldName(const TQString& name) { return m_driver->isSystemFieldName(name); }
+TQString KexiDBDriver::valueToSQL(const TQString& fieldtype, const TQVariant& value) { return m_driver->valueToSQL(fieldtype, value); }
KexiDBConnection* KexiDBDriver::createConnection(KexiDBConnectionData* data) { return new KexiDBConnection( m_driver->createConnection(*data) ); }
-QPtrList< ::KexiDB::Connection > KexiDBDriver::connectionsList() { return m_driver->connectionsList(); }
+TQPtrList< ::KexiDB::Connection > KexiDBDriver::connectionsList() { return m_driver->connectionsList(); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbdriver.h b/kexi/plugins/scripting/kexidb/kexidbdriver.h
index edf7283c7..786cbb1ae 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdriver.h
+++ b/kexi/plugins/scripting/kexidb/kexidbdriver.h
@@ -20,9 +20,9 @@
#ifndef KROSS_KEXIDB_KEXIDBDRIVER_H
#define KROSS_KEXIDB_KEXIDBDRIVER_H
-#include <qstring.h>
-#include <qvaluelist.h>
-//#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+//#include <tqguardedptr.h>
#include <api/object.h>
#include <api/variant.h>
@@ -67,7 +67,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBDriver(::KexiDB::Driver* driver);
virtual ~KexiDBDriver();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
@@ -79,30 +79,30 @@ namespace Kross { namespace KexiDB {
int versionMinor();
/** Driver-specific SQL string escaping. For example the " or ' char may
need to be escaped for values used within SQL-statements. */
- QString escapeString(const QString& s);
+ TQString escapeString(const TQString& s);
/** Returns true if this driver is file-based. */
bool isFileDriver();
/** Return a name of MIME type of files handled by this driver if it is a
file-based database's driver otherwise returns null string. */
- QString fileDBDriverMimeType();
+ TQString fileDBDriverMimeType();
/** Returns true if the passed string is a system object's name, eg. name
of build-in system table that cannot be used or created by a user. */
- bool isSystemObjectName(const QString& name);
+ bool isSystemObjectName(const TQString& name);
/** Returns true if the passed string is a system database's name, eg. name
of build-in, system database that cannot be used or created by a user. */
- bool isSystemDatabaseName(const QString& name);
+ bool isSystemDatabaseName(const TQString& name);
/** Returns true if the passed string is a system field's name, build-in
system field that cannot be used or created by a user. */
- bool isSystemFieldName(const QString& name);
+ bool isSystemFieldName(const TQString& name);
/** The as second argument passed string got escaped to be usable within
a SQL-statement and those escaped string got returned by the method.
The first argument defines the fieldtype to what we should escape the
second argument to. */
- QString valueToSQL(const QString& fieldtype, const QVariant& value);
+ TQString valueToSQL(const TQString& fieldtype, const TQVariant& value);
/** Create a new KexiDBConnection object and return it. */
KexiDBConnection* createConnection(KexiDBConnectionData* data);
/** Return a list of KexiDBConnection objects. */
- QPtrList< ::KexiDB::Connection > connectionsList();
+ TQPtrList< ::KexiDB::Connection > connectionsList();
private:
::KexiDB::Driver* m_driver;
diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
index 66a0df268..c24752768 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.cpp
@@ -25,7 +25,7 @@
#include <api/exception.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kdebug.h>
#include <kmimetype.h>
@@ -40,7 +40,7 @@ using namespace Kross::KexiDB;
KexiDBDriverManager::KexiDBDriverManager()
: Kross::Api::Class<KexiDBDriverManager>("DriverManager")
{
- //krossdebug( QString("Kross::KexiDB::KexiDBDriverManager::KexiDBDriverManager()") );
+ //krossdebug( TQString("Kross::KexiDB::KexiDBDriverManager::KexiDBDriverManager()") );
this->addFunction0< Kross::Api::Variant >("driverNames", this, &KexiDBDriverManager::driverNames);
@@ -56,37 +56,37 @@ KexiDBDriverManager::KexiDBDriverManager()
}
KexiDBDriverManager::~KexiDBDriverManager() {
- //krossdebug( QString("Kross::KexiDB::KexiDBDriverManager::~KexiDBDriverManager()") );
+ //krossdebug( TQString("Kross::KexiDB::KexiDBDriverManager::~KexiDBDriverManager()") );
}
-const QString KexiDBDriverManager::getClassName() const {
+const TQString KexiDBDriverManager::getClassName() const {
return "Kross::KexiDB::KexiDBDriverManager";
}
KexiDB::DriverManager& KexiDBDriverManager::driverManager()
{
if(m_drivermanager.error())
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::DriverManager error: %1").arg(m_drivermanager.errorMsg())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::DriverManager error: %1").tqarg(m_drivermanager.errorMsg())) );
return m_drivermanager;
}
-const QStringList KexiDBDriverManager::driverNames() {
+const TQStringList KexiDBDriverManager::driverNames() {
return driverManager().driverNames();
}
-KexiDBDriver* KexiDBDriverManager::driver(const QString& drivername) {
- QGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager
+KexiDBDriver* KexiDBDriverManager::driver(const TQString& drivername) {
+ TQGuardedPtr< ::KexiDB::Driver > driver = driverManager().driver(drivername); // caching is done by the DriverManager
if(! driver) return 0;
- if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("KexiDB::Driver error for drivername '%1': %2").arg(drivername).arg(driver->errorMsg())) );
+ if(driver->error()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("KexiDB::Driver error for drivername '%1': %2").tqarg(drivername).tqarg(driver->errorMsg())) );
return new KexiDBDriver(driver);
}
-const QString KexiDBDriverManager::lookupByMime(const QString& mimetype) {
+const TQString KexiDBDriverManager::lookupByMime(const TQString& mimetype) {
return driverManager().lookupByMime(mimetype);
}
-const QString KexiDBDriverManager::mimeForFile(const QString& filename) {
- QString mimename = KMimeType::findByFileContent( filename )->name();
+const TQString KexiDBDriverManager::mimeForFile(const TQString& filename) {
+ TQString mimename = KMimeType::findByFileContent( filename )->name();
if(mimename.isEmpty() || mimename=="application/octet-stream" || mimename=="text/plain")
mimename = KMimeType::findByURL(filename)->name();
return mimename;
@@ -96,18 +96,18 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionData() {
return new KexiDBConnectionData( new ::KexiDB::ConnectionData() );
}
-KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QString& filename) {
+KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const TQString& filename) {
//! @todo reuse the original code!
- QString mimename = KMimeType::findByFileContent(filename)->name();
+ TQString mimename = KMimeType::findByFileContent(filename)->name();
if(mimename.isEmpty() || mimename=="application/octet-stream" || mimename=="text/plain")
mimename = KMimeType::findByURL(filename)->name();
if(mimename == "application/x-kexiproject-shortcut" || mimename == "application/x-kexi-connectiondata") {
KConfig config(filename, true, false);
- QString groupkey;
- QStringList groups(config.groupList());
- QStringList::ConstIterator it, end( groups.constEnd() );
+ TQString groupkey;
+ TQStringList groups(config.groupList());
+ TQStringList::ConstIterator it, end( groups.constEnd() );
for( it = groups.constBegin(); it != end; ++it) {
if((*it).lower()!="file information") {
groupkey = *it;
@@ -120,15 +120,15 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
}
config.setGroup(groupkey);
- //QString type( config.readEntry("type", "database").lower() );
+ //TQString type( config.readEntry("type", "database").lower() );
//bool isDatabaseShortcut = (type == "database");
::KexiDB::ConnectionData* data = new ::KexiDB::ConnectionData();
int version = config.readNumEntry("version", 2); //KexiDBShortcutFile_version
- data->setFileName(QString::null);
+ data->setFileName(TQString());
data->caption = config.readEntry("caption");
data->description = config.readEntry("comment");
- QString dbname = config.readEntry("name");
+ TQString dbname = config.readEntry("name");
data->driverName = config.readEntry("engine");
data->hostName = config.readEntry("server");
data->port = config.readNumEntry("port", 0);
@@ -139,7 +139,7 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
data->password = config.readEntry("encryptedPassword");
uint len = data->password.length();
for (uint i=0; i<len; i++)
- data->password[i] = QChar( data->password[i].unicode() - 47 - i );
+ data->password[i] = TQChar( data->password[i].tqunicode() - 47 - i );
}
if(data->password.isEmpty())
data->password = config.readEntry("password");
@@ -152,7 +152,7 @@ KexiDBConnectionData* KexiDBDriverManager::createConnectionDataByFile(const QStr
return c;
}
- QString const drivername = driverManager().lookupByMime(mimename);
+ TQString const drivername = driverManager().lookupByMime(mimename);
if(! drivername) {
kdDebug() << "No driver in KexiDBDriverManager::createConnectionDataByFile filename=" << filename << " mimename=" << mimename << endl;
return 0;
@@ -168,7 +168,7 @@ KexiDBField* KexiDBDriverManager::field() {
return new KexiDBField( new ::KexiDB::Field() );
}
-KexiDBTableSchema* KexiDBDriverManager::tableSchema(const QString& tablename) {
+KexiDBTableSchema* KexiDBDriverManager::tableSchema(const TQString& tablename) {
return new KexiDBTableSchema( new ::KexiDB::TableSchema(tablename) );
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
index b6e311083..51b202719 100644
--- a/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
+++ b/kexi/plugins/scripting/kexidb/kexidbdrivermanager.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
#define KROSS_KEXIDB_KEXIDBDRIVERMANAGER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/variant.h>
@@ -61,21 +61,21 @@ namespace Kross { namespace KexiDB {
public:
KexiDBDriverManager();
virtual ~KexiDBDriverManager();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Returns a list with avaible drivernames. */
- const QStringList driverNames();
+ const TQStringList driverNames();
/** Return the to the defined drivername matching KexiDBDriver object. */
- KexiDBDriver* driver(const QString& drivername);
+ KexiDBDriver* driver(const TQString& drivername);
/** Return the to the defined mimetype-string matching drivername. */
- const QString lookupByMime(const QString& mimetype);
+ const TQString lookupByMime(const TQString& mimetype);
/** Return the matching mimetype for the defined file. */
- const QString mimeForFile(const QString& filename);
+ const TQString mimeForFile(const TQString& filename);
/** Return a new KexiDBConnectionData object. */
KexiDBConnectionData* createConnectionData();
@@ -83,13 +83,13 @@ namespace Kross { namespace KexiDB {
/** Create and return a KexiDBConnectionData object. Fill the content of the
KexiDBConnectionData object with the defined file as. The file could be e.g.
a *.kexi file or a *.kexis file. */
- KexiDBConnectionData* createConnectionDataByFile(const QString& filename);
+ KexiDBConnectionData* createConnectionDataByFile(const TQString& filename);
/** Return a new KexiDBField object. */
KexiDBField* field();
/** Return a new KexiDBTableSchema object. */
- KexiDBTableSchema* tableSchema(const QString& tablename);
+ KexiDBTableSchema* tableSchema(const TQString& tablename);
/** Return a new KexiDBQuerySchema object. */
KexiDBQuerySchema* querySchema();
diff --git a/kexi/plugins/scripting/kexidb/kexidbfield.cpp b/kexi/plugins/scripting/kexidb/kexidbfield.cpp
index 949b5e1a6..1f5a51de6 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfield.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbfield.cpp
@@ -87,19 +87,19 @@ KexiDBField::~KexiDBField()
{
}
-const QString KexiDBField::getClassName() const
+const TQString KexiDBField::getClassName() const
{
return "Kross::KexiDB::KexiDBField";
}
-const QString KexiDBField::type() { return m_field->typeString(); }
-void KexiDBField::setType(const QString type) { m_field->setType( ::KexiDB::Field::typeForString(type) ); }
+const TQString KexiDBField::type() { return m_field->typeString(); }
+void KexiDBField::setType(const TQString type) { m_field->setType( ::KexiDB::Field::typeForString(type) ); }
-const QString KexiDBField::subType() { return m_field->subType(); }
-void KexiDBField::setSubType(const QString& subtype) { m_field->setSubType(subtype); }
+const TQString KexiDBField::subType() { return m_field->subType(); }
+void KexiDBField::setSubType(const TQString& subtype) { m_field->setSubType(subtype); }
-const QString KexiDBField::variantType() { return QVariant::typeToName( m_field->variantType() ); }
-const QString KexiDBField::typeGroup() { return m_field->typeGroupString(); }
+const TQString KexiDBField::variantType() { return TQVariant::typeToName( m_field->variantType() ); }
+const TQString KexiDBField::typeGroup() { return m_field->typeGroupString(); }
bool KexiDBField::isAutoInc() { return m_field->isAutoIncrement(); }
void KexiDBField::setAutoInc(bool autoinc) { m_field->setAutoIncrement(autoinc); }
@@ -125,14 +125,14 @@ void KexiDBField::setIndexed(bool indexed) { m_field->setIndexed(indexed); }
bool KexiDBField::isUnsigned() { return m_field->isUnsigned(); }
void KexiDBField::setUnsigned(bool isunsigned) { m_field->setUnsigned(isunsigned); }
-const QString KexiDBField::name() { return m_field->name(); }
-void KexiDBField::setName(const QString& name) { m_field->setName(name); }
+const TQString KexiDBField::name() { return m_field->name(); }
+void KexiDBField::setName(const TQString& name) { m_field->setName(name); }
-const QString KexiDBField::caption() { return m_field->caption(); }
-void KexiDBField::setCaption(const QString& caption) { m_field->setCaption(caption); }
+const TQString KexiDBField::caption() { return m_field->caption(); }
+void KexiDBField::setCaption(const TQString& caption) { m_field->setCaption(caption); }
-const QString KexiDBField::description() { return m_field->description(); }
-void KexiDBField::setDescription(const QString& desc) { m_field->setDescription(desc); }
+const TQString KexiDBField::description() { return m_field->description(); }
+void KexiDBField::setDescription(const TQString& desc) { m_field->setDescription(desc); }
uint KexiDBField::length() { return m_field->length(); }
void KexiDBField::setLength(uint length) { m_field->setLength(length); }
@@ -143,5 +143,5 @@ void KexiDBField::setPrecision(uint precision) { m_field->setPrecision(precision
uint KexiDBField::width() { return m_field->width(); }
void KexiDBField::setWidth(uint width) { m_field->setWidth(width); }
-QVariant KexiDBField::defaultValue() { return m_field->defaultValue(); }
-void KexiDBField::setDefaultValue(const QVariant& defaultvalue) { m_field->setDefaultValue(defaultvalue); }
+TQVariant KexiDBField::defaultValue() { return m_field->defaultValue(); }
+void KexiDBField::setDefaultValue(const TQVariant& defaultvalue) { m_field->setDefaultValue(defaultvalue); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbfield.h b/kexi/plugins/scripting/kexidb/kexidbfield.h
index a4c2ef238..4cc85f38c 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfield.h
+++ b/kexi/plugins/scripting/kexidb/kexidbfield.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBFIELD_H
#define KROSS_KEXIDB_KEXIDBFIELD_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -39,27 +39,27 @@ namespace Kross { namespace KexiDB {
public:
KexiDBField(::KexiDB::Field* field);
virtual ~KexiDBField();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::Field* field() { return m_field; }
private:
/** Returns the type string for this field, e.g. "Integer" for Integer type. */
- const QString type();
+ const TQString type();
/** Sets the type string for this field, e.g. "Integer" for Integer type. */
- void setType(const QString type);
+ void setType(const TQString type);
/** Returns the optional subtype for this field. Subtype is a string providing
additional hint for field's type. E.g. for BLOB type, it can be a MIME type or
- certain QVariant type name, for example: "QPixmap", "QColor" or "QFont". */
- const QString subType();
+ certain TQVariant type name, for example: TQPIXMAP_OBJECT_NAME_STRING, "TQColor" or "TQFont". */
+ const TQString subType();
/** Sets the optional subtype for this field. */
- void setSubType(const QString& subtype);
+ void setSubType(const TQString& subtype);
- /** Returns the QVariant::typeName which is equivalent to the type this field has. */
- const QString variantType();
+ /** Returns the TQVariant::typeName which is equivalent to the type this field has. */
+ const TQString variantType();
/** Returns type group string for this field, e.g. "IntegerGroup" for IntegerGroup type. */
- const QString typeGroup();
+ const TQString typeGroup();
/** Returns true if the field is autoincrement (e.g. integer/numeric). */
bool isAutoInc();
@@ -102,19 +102,19 @@ namespace Kross { namespace KexiDB {
void setUnsigned(bool isunsigned);
/** Returns the name of this field. */
- const QString name();
+ const TQString name();
/** Sets the name of this field. */
- void setName(const QString& name);
+ void setName(const TQString& name);
/** Returns the caption of this field. */
- const QString caption();
+ const TQString caption();
/** Sets the caption of this field. */
- void setCaption(const QString& caption);
+ void setCaption(const TQString& caption);
/** Returns the descriptive text for this field. */
- const QString description();
+ const TQString description();
/** Set the description for this field. */
- void setDescription(const QString& desc);
+ void setDescription(const TQString& desc);
/** Returns the length of text if the field type is text. */
uint length();
@@ -134,9 +134,9 @@ namespace Kross { namespace KexiDB {
void setWidth(uint width);
/** Returns the default value this field has. */
- QVariant defaultValue();
+ TQVariant defaultValue();
/** Sets the default value this field has. */
- void setDefaultValue(const QVariant& defaultvalue);
+ void setDefaultValue(const TQVariant& defaultvalue);
private:
::KexiDB::Field* m_field;
diff --git a/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp b/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
index f36bf0b05..4e07e1668 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbfieldlist.cpp
@@ -53,7 +53,7 @@ KexiDBFieldList::~KexiDBFieldList()
{
}
-const QString KexiDBFieldList::getClassName() const
+const TQString KexiDBFieldList::getClassName() const
{
return "Kross::KexiDB::KexiDBFieldList";
}
@@ -67,7 +67,7 @@ KexiDBField* KexiDBFieldList::field(uint index) {
return field ? new KexiDBField(field) : 0;
}
-KexiDBField* KexiDBFieldList::fieldByName(const QString& name) {
+KexiDBField* KexiDBFieldList::fieldByName(const TQString& name) {
::KexiDB::Field* field = m_fieldlist->field(name);
return field ? new KexiDBField(field) : 0;
}
@@ -77,7 +77,7 @@ Kross::Api::List* KexiDBFieldList::fields() {
}
bool KexiDBFieldList::hasField(KexiDBField* field) { return m_fieldlist->hasField( field->field() ); }
-const QStringList KexiDBFieldList::names() const { return m_fieldlist->names(); }
+const TQStringList KexiDBFieldList::names() const { return m_fieldlist->names(); }
void KexiDBFieldList::addField(KexiDBField* field) { m_fieldlist->addField( field->field() ); }
void KexiDBFieldList::insertField(uint index, KexiDBField* field) { m_fieldlist->insertField(index, field->field()); }
void KexiDBFieldList::removeField(KexiDBField* field) { m_fieldlist->removeField( field->field() ); }
@@ -90,9 +90,9 @@ void KexiDBFieldList::setFields(KexiDBFieldList* fieldlist) {
m_fieldlist->addField( it.current() );
}
-KexiDBFieldList* KexiDBFieldList::subList(QValueList<QVariant> list) {
- QValueList<QVariant>::ConstIterator it( list.constBegin() ), end( list.constEnd() );
- QStringList sl;
+KexiDBFieldList* KexiDBFieldList::subList(TQValueList<TQVariant> list) {
+ TQValueList<TQVariant>::ConstIterator it( list.constBegin() ), end( list.constEnd() );
+ TQStringList sl;
for(; it != end; ++it) sl.append( (*it).toString() );
::KexiDB::FieldList* fl = m_fieldlist->subList(sl);
return fl ? new Kross::KexiDB::KexiDBFieldList(fl) : 0;
diff --git a/kexi/plugins/scripting/kexidb/kexidbfieldlist.h b/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
index ee990eb32..1d7b7665a 100644
--- a/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
+++ b/kexi/plugins/scripting/kexidb/kexidbfieldlist.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBFIELDLIST_H
#define KROSS_KEXIDB_KEXIDBFIELDLIST_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -61,7 +61,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBFieldList(::KexiDB::FieldList* fieldlist);
virtual ~KexiDBFieldList();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::FieldList* fieldlist() { return m_fieldlist; }
private:
@@ -71,14 +71,14 @@ namespace Kross { namespace KexiDB {
/** Return the field specified by the index-number passed as an argument. */
KexiDBField* field(uint index);
/** Return the field specified by the as an argument passed fieldname. */
- KexiDBField* fieldByName(const QString& name);
+ KexiDBField* fieldByName(const TQString& name);
/** Returns a list of all fields. */
Kross::Api::List* fields();
/** Returns true if the KexiDBField object passed as an argument is in the field list. */
bool hasField(KexiDBField* field);
/** Return a list of field names. */
- const QStringList names() const;
+ const TQStringList names() const;
/** Adds the KexiDBField object passed as an argument to the field list. */
void addField(KexiDBField* field);
@@ -92,7 +92,7 @@ namespace Kross { namespace KexiDB {
/** Set the fieldlist to the as argument passed list of fields. */
void setFields(KexiDBFieldList* fieldlist);
/** Creates and returns list that contain fields selected by name. */
- KexiDBFieldList* subList(QValueList<QVariant> list);
+ KexiDBFieldList* subList(TQValueList<TQVariant> list);
private:
::KexiDB::FieldList* m_fieldlist;
diff --git a/kexi/plugins/scripting/kexidb/kexidbmodule.cpp b/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
index 36f7b71f0..91472a1fa 100644
--- a/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbmodule.cpp
@@ -58,12 +58,12 @@ KexiDBModule::~KexiDBModule()
//kdDebug() << "Kross::KexiDB::KexiDBModule Dtor" << endl;
}
-const QString KexiDBModule::getClassName() const
+const TQString KexiDBModule::getClassName() const
{
return "Kross::KexiDB::KexiDBModule";
}
-Kross::Api::Object::Ptr KexiDBModule::get(const QString& name, void* p)
+Kross::Api::Object::Ptr KexiDBModule::get(const TQString& name, void* p)
{
if(name == "KexiDBConnection") {
::KexiDB::Connection* connection = (::KexiDB::Connection*)p;
diff --git a/kexi/plugins/scripting/kexidb/kexidbmodule.h b/kexi/plugins/scripting/kexidb/kexidbmodule.h
index b91b60479..eb7c9c222 100644
--- a/kexi/plugins/scripting/kexidb/kexidbmodule.h
+++ b/kexi/plugins/scripting/kexidb/kexidbmodule.h
@@ -20,8 +20,8 @@
#ifndef KROSS_KEXIDB_KEXIDBMODULE_H
#define KROSS_KEXIDB_KEXIDBMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#include <api/module.h>
@@ -45,7 +45,7 @@ namespace KexiDB {
public:
KexiDBModule(Kross::Api::Manager* manager);
virtual ~KexiDBModule();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
/**
* \internal
@@ -59,7 +59,7 @@ namespace KexiDB {
* the module and the name what this pointer is.
* \return a \a Kross::Api::Object or NULL.
*/
- virtual Kross::Api::Object::Ptr get(const QString& name, void* p = 0);
+ virtual Kross::Api::Object::Ptr get(const TQString& name, void* p = 0);
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbparser.cpp b/kexi/plugins/scripting/kexidb/kexidbparser.cpp
index b022570d3..63aecda90 100644
--- a/kexi/plugins/scripting/kexidb/kexidbparser.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbparser.cpp
@@ -50,14 +50,14 @@ KexiDBParser::~KexiDBParser()
{
}
-const QString KexiDBParser::getClassName() const
+const TQString KexiDBParser::getClassName() const
{
return "Kross::KexiDB::KexiDBParser";
}
-bool KexiDBParser::parse(const QString& sql) { return m_parser->parse(sql); }
+bool KexiDBParser::parse(const TQString& sql) { return m_parser->parse(sql); }
void KexiDBParser::clear() { m_parser->clear(); }
-const QString KexiDBParser::operation() { return m_parser->operationString(); }
+const TQString KexiDBParser::operation() { return m_parser->operationString(); }
KexiDBTableSchema* KexiDBParser::table() {
::KexiDB::TableSchema* t = m_parser->table();
@@ -70,8 +70,8 @@ KexiDBQuerySchema* KexiDBParser::query() {
}
KexiDBConnection* KexiDBParser::connection() { return m_connection; }
-const QString KexiDBParser::statement() { return m_parser->statement(); }
+const TQString KexiDBParser::statement() { return m_parser->statement(); }
-const QString KexiDBParser::errorType() { return m_parser->error().type(); }
-const QString KexiDBParser::errorMsg() { return m_parser->error().error(); }
+const TQString KexiDBParser::errorType() { return m_parser->error().type(); }
+const TQString KexiDBParser::errorMsg() { return m_parser->error().error(); }
int KexiDBParser::errorAt() { return m_parser->error().at(); }
diff --git a/kexi/plugins/scripting/kexidb/kexidbparser.h b/kexi/plugins/scripting/kexidb/kexidbparser.h
index 09ac22daa..e09df0680 100644
--- a/kexi/plugins/scripting/kexidb/kexidbparser.h
+++ b/kexi/plugins/scripting/kexidb/kexidbparser.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBPARSER_H
#define KROSS_KEXIDB_KEXIDBPARSER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/list.h>
@@ -57,16 +57,16 @@ namespace Kross { namespace KexiDB {
public:
KexiDBParser(KexiDBConnection* connection, ::KexiDB::Parser* parser);
virtual ~KexiDBParser();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/** Clears previous results and runs the parser on the SQL statement passed as an argument. */
- bool parse(const QString& sql);
+ bool parse(const TQString& sql);
/** Clears parsing results. */
void clear();
/** Returns the resulting operation. */
- const QString operation();
+ const TQString operation();
/** Returns the KexiDBTableSchema object on a CREATE TABLE operation. */
KexiDBTableSchema* table();
@@ -75,12 +75,12 @@ namespace Kross { namespace KexiDB {
/** Returns the KexiDBConnection object pointing to the used database connection. */
KexiDBConnection* connection();
/** Returns the SQL query statement. */
- const QString statement();
+ const TQString statement();
/** Returns the type string of the last error. */
- const QString errorType();
+ const TQString errorType();
/** Returns the message of the last error. */
- const QString errorMsg();
+ const TQString errorMsg();
/** Returns the position where the last error occurred. */
int errorAt();
diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.cpp b/kexi/plugins/scripting/kexidb/kexidbschema.cpp
index e07917f3c..aebcbd7e8 100644
--- a/kexi/plugins/scripting/kexidb/kexidbschema.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbschema.cpp
@@ -21,7 +21,7 @@
#include "kexidbschema.h"
#include "kexidbfieldlist.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <api/variant.h>
@@ -33,7 +33,7 @@ using namespace Kross::KexiDB;
*/
template<class T>
-KexiDBSchema<T>::KexiDBSchema(const QString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist)
+KexiDBSchema<T>::KexiDBSchema(const TQString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist)
: Kross::Api::Class<T>(name)
, m_schema(schema)
, m_fieldlist(fieldlist)
@@ -55,32 +55,32 @@ KexiDBSchema<T>::~KexiDBSchema<T>() {
}
template<class T>
-const QString KexiDBSchema<T>::name() const {
+const TQString KexiDBSchema<T>::name() const {
return m_schema->name();
}
template<class T>
-void KexiDBSchema<T>::setName(const QString& name) {
+void KexiDBSchema<T>::setName(const TQString& name) {
m_schema->setName(name);
}
template<class T>
-const QString KexiDBSchema<T>::caption() const {
+const TQString KexiDBSchema<T>::caption() const {
return m_schema->caption();
}
template<class T>
-void KexiDBSchema<T>::setCaption(const QString& caption) {
+void KexiDBSchema<T>::setCaption(const TQString& caption) {
m_schema->setCaption(caption);
}
template<class T>
-const QString KexiDBSchema<T>::description() const {
+const TQString KexiDBSchema<T>::description() const {
return m_schema->description();
}
template<class T>
-void KexiDBSchema<T>::setDescription(const QString& description) {
+void KexiDBSchema<T>::setDescription(const TQString& description) {
m_schema->setDescription(description);
}
@@ -102,7 +102,7 @@ KexiDBTableSchema::KexiDBTableSchema(::KexiDB::TableSchema* tableschema)
KexiDBTableSchema::~KexiDBTableSchema() {
}
-const QString KexiDBTableSchema::getClassName() const {
+const TQString KexiDBTableSchema::getClassName() const {
return "Kross::KexiDB::KexiDBTableSchema";
}
@@ -129,7 +129,7 @@ KexiDBQuerySchema::KexiDBQuerySchema(::KexiDB::QuerySchema* queryschema)
KexiDBQuerySchema::~KexiDBQuerySchema() {
}
-const QString KexiDBQuerySchema::getClassName() const {
+const TQString KexiDBQuerySchema::getClassName() const {
return "Kross::KexiDB::KexiDBQuerySchema";
}
@@ -137,53 +137,53 @@ const QString KexiDBQuerySchema::getClassName() const {
return static_cast< ::KexiDB::QuerySchema* >(m_schema);
}
-const QString KexiDBQuerySchema::statement() const {
+const TQString KexiDBQuerySchema::statement() const {
return static_cast< ::KexiDB::QuerySchema* >(m_schema)->statement();
}
-void KexiDBQuerySchema::setStatement(const QString& statement) {
+void KexiDBQuerySchema::setStatement(const TQString& statement) {
static_cast< ::KexiDB::QuerySchema* >(m_schema)->setStatement(statement);
}
-bool KexiDBQuerySchema::setWhereExpression(const QString& whereexpression) {
+bool KexiDBQuerySchema::setWhereExpression(const TQString& whereexpression) {
::KexiDB::BaseExpr* oldexpr = static_cast< ::KexiDB::QuerySchema* >(m_schema)->whereExpression();
///@todo use ::KexiDB::Parser for such kind of parser-functionality.
- QString s = whereexpression;
+ TQString s = whereexpression;
try {
- QRegExp re("[\"',]{1,1}");
+ TQRegExp re("[\"',]{1,1}");
while(true) {
- s.remove(QRegExp("^[\\s,]+"));
- int pos = s.find('=');
+ s.remove(TQRegExp("^[\\s,]+"));
+ int pos = s.tqfind('=');
if(pos < 0) break;
- QString key = s.left(pos).stripWhiteSpace();
+ TQString key = s.left(pos).stripWhiteSpace();
s = s.mid(pos + 1).stripWhiteSpace();
- QString value;
- int sp = s.find(re);
+ TQString value;
+ int sp = s.tqfind(re);
if(sp >= 0) {
if(re.cap(0) == ",") {
value = s.left(sp).stripWhiteSpace();
s = s.mid(sp+1).stripWhiteSpace();
}
else {
- int ep = s.find(re.cap(0),sp+1);
+ int ep = s.tqfind(re.cap(0),sp+1);
value = s.mid(sp+1,ep-1);
s = s.mid(ep + 1);
}
}
else {
value = s;
- s = QString::null;
+ s = TQString();
}
::KexiDB::Field* field = static_cast< ::KexiDB::QuerySchema* >(m_schema)->field(key);
if(! field)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").arg(key).arg(m_schema->name())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: Field \"%1\" does not exists in tableschema \"%2\".").tqarg(key).tqarg(m_schema->name())) );
- QVariant v(value);
+ TQVariant v(value);
if(! v.cast(field->variantType()))
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(QString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").arg(key).arg(v.typeName()).arg(field->variantType())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid WHERE-expression: The for Field \"%1\" defined value is of type \"%2\" rather then the expected type \"%3\"").tqarg(key).tqarg(v.typeName()).tqarg(field->variantType())) );
static_cast< ::KexiDB::QuerySchema* >(m_schema)->addToWhereExpression(field,v);
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbschema.h b/kexi/plugins/scripting/kexidb/kexidbschema.h
index 61b6bc885..c2243035e 100644
--- a/kexi/plugins/scripting/kexidb/kexidbschema.h
+++ b/kexi/plugins/scripting/kexidb/kexidbschema.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBSCHEMA_H
#define KROSS_KEXIDB_KEXIDBSCHEMA_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/object.h>
#include <api/class.h>
@@ -59,25 +59,25 @@ namespace Kross { namespace KexiDB {
class KexiDBSchema : public Kross::Api::Class<T>
{
public:
- KexiDBSchema(const QString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist);
+ KexiDBSchema(const TQString& name, ::KexiDB::SchemaData* schema, ::KexiDB::FieldList* fieldlist);
virtual ~KexiDBSchema();
private:
/** Returns the name of the schema. */
- const QString name() const;
+ const TQString name() const;
/** Set the name of the schema. */
- void setName(const QString& name);
+ void setName(const TQString& name);
/** Returns the caption of the schema. */
- const QString caption() const;
+ const TQString caption() const;
/** Set the caption of the schema. */
- void setCaption(const QString& caption);
+ void setCaption(const TQString& caption);
/** Returns a description of the schema. */
- const QString description() const;
+ const TQString description() const;
/** Set a description of the schema. */
- void setDescription(const QString& description);
+ void setDescription(const TQString& description);
/** Returns the KexiDBFieldList object this schema has. */
KexiDBFieldList* fieldlist() const;
@@ -95,7 +95,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBTableSchema(::KexiDB::TableSchema* tableschema);
virtual ~KexiDBTableSchema();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::TableSchema* tableschema();
private:
@@ -114,17 +114,17 @@ namespace Kross { namespace KexiDB {
public:
KexiDBQuerySchema(::KexiDB::QuerySchema* queryschema);
virtual ~KexiDBQuerySchema();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::QuerySchema* queryschema();
private:
/** Returns the SQL-statement of this query schema. */
- const QString statement() const;
+ const TQString statement() const;
/** Set the SQL-statement of this query schema. */
- void setStatement(const QString& statement);
+ void setStatement(const TQString& statement);
/** Set the where-expression. */
- bool setWhereExpression(const QString& whereexpression);
+ bool setWhereExpression(const TQString& whereexpression);
};
diff --git a/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp b/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
index d4cdff242..73f4bf282 100644
--- a/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
+++ b/kexi/plugins/scripting/kexidb/kexidbtransaction.cpp
@@ -38,7 +38,7 @@ KexiDBTransaction::~KexiDBTransaction()
{
}
-const QString KexiDBTransaction::getClassName() const
+const TQString KexiDBTransaction::getClassName() const
{
return "Kross::KexiDB::KexiDBTransaction";
}
diff --git a/kexi/plugins/scripting/kexidb/kexidbtransaction.h b/kexi/plugins/scripting/kexidb/kexidbtransaction.h
index 6a6b5785b..d02e44d64 100644
--- a/kexi/plugins/scripting/kexidb/kexidbtransaction.h
+++ b/kexi/plugins/scripting/kexidb/kexidbtransaction.h
@@ -20,7 +20,7 @@
#ifndef KROSS_KEXIDB_KEXIDBTRANSACTION_H
#define KROSS_KEXIDB_KEXIDBTRANSACTION_H
-#include <qstring.h>
+#include <tqstring.h>
#include <api/class.h>
@@ -41,7 +41,7 @@ namespace Kross { namespace KexiDB {
public:
KexiDBTransaction(::KexiDB::Transaction& transaction);
virtual ~KexiDBTransaction();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
::KexiDB::Transaction& transaction();
private:
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
index ff2f93d03..0c95cb0ea 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.cpp
@@ -28,12 +28,12 @@
#include <kross/main/scriptaction.h>
#include <kross/api/interpreter.h>
-#include <qlayout.h>
-#include <qsplitter.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qstylesheet.h>
+#include <tqlayout.h>
+#include <tqsplitter.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqstylesheet.h>
#include <ktextbrowser.h>
#include <kdebug.h>
@@ -64,17 +64,17 @@ class KexiScriptDesignViewPrivate
KTextBrowser* statusbrowser;
};
-KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *parent, Kross::Api::ScriptAction* scriptaction)
- : KexiViewBase(mainWin, parent, "KexiScriptDesignView")
+KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, TQWidget *tqparent, Kross::Api::ScriptAction* scriptaction)
+ : KexiViewBase(mainWin, tqparent, "KexiScriptDesignView")
, d( new KexiScriptDesignViewPrivate() )
{
d->scriptaction = scriptaction;
d->updatesProperties = false;
- QSplitter* splitter = new QSplitter(this);
- splitter->setOrientation(Vertical);
- QHBoxLayout* layout = new QHBoxLayout(this);
- layout->addWidget(splitter);
+ TQSplitter* splitter = new TQSplitter(this);
+ splitter->setOrientation(Qt::Vertical);
+ TQHBoxLayout* tqlayout = new TQHBoxLayout(this);
+ tqlayout->addWidget(splitter);
d->editor = new KexiScriptEditor(mainWin, splitter, "ScriptEditor");
splitter->setFocusProxy(d->editor);
@@ -83,23 +83,23 @@ KexiScriptDesignView::KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *par
d->statusbrowser = new KTextBrowser(splitter, "ScriptStatusBrowser");
d->statusbrowser->setReadOnly(true);
- d->statusbrowser->setTextFormat(QTextBrowser::RichText);
- //d->browser->setWordWrap(QTextEdit::WidgetWidth);
+ d->statusbrowser->setTextFormat(TQTextBrowser::RichText);
+ //d->browser->setWordWrap(TQTextEdit::WidgetWidth);
d->statusbrowser->installEventFilter(this);
- splitter->setResizeMode(d->statusbrowser, QSplitter::KeepSize);
+ splitter->setResizeMode(d->statusbrowser, TQSplitter::KeepSize);
- plugSharedAction( "data_execute", this, SLOT(execute()) );
+ plugSharedAction( "data_execute", TQT_TQOBJECT(this), TQT_SLOT(execute()) );
if(KexiEditor::isAdvancedEditor()) // the configeditor is only in advanced mode avaiable.
- plugSharedAction( "script_config_editor", d->editor, SLOT(slotConfigureEditor()) );
+ plugSharedAction( "script_config_editor", TQT_TQOBJECT(d->editor), TQT_SLOT(slotConfigureEditor()) );
loadData();
- d->properties = new KoProperty::Set(this, "KexiScripting");
- connect(d->properties, SIGNAL( propertyChanged(KoProperty::Set&, KoProperty::Property&) ),
- this, SLOT( slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) ));
+ d->properties = new KoProperty::Set(TQT_TQOBJECT(this), "KexiScripting");
+ connect(d->properties, TQT_SIGNAL( propertyChanged(KoProperty::Set&, KoProperty::Property&) ),
+ this, TQT_SLOT( slotPropertyChanged(KoProperty::Set&, KoProperty::Property&) ));
// To schedule the initialize fixes a crasher in Kate.
- QTimer::singleShot(50, this, SLOT( initialize() ));
+ TQTimer::singleShot(50, this, TQT_SLOT( initialize() ));
}
KexiScriptDesignView::~KexiScriptDesignView()
@@ -127,14 +127,14 @@ void KexiScriptDesignView::updateProperties()
Kross::Api::Manager* manager = Kross::Api::Manager::scriptManager();
- QString interpretername = d->scriptaction->getInterpreterName();
+ TQString interpretername = d->scriptaction->getInterpreterName();
Kross::Api::InterpreterInfo* info = interpretername.isEmpty() ? 0 : manager->getInterpreterInfo(interpretername);
{
// if interpreter isn't defined or invalid, try to fallback.
- QStringList list;
+ TQStringList list;
list << "python" << "ruby";
- QStringList::ConstIterator it( list.constBegin() ), end( list.constEnd() );
+ TQStringList::ConstIterator it( list.constBegin() ), end( list.constEnd() );
while( (! info) && (it != end) ) {
interpretername = (*it);
info = manager->getInterpreterInfo(interpretername);
@@ -147,7 +147,7 @@ void KexiScriptDesignView::updateProperties()
if(info) {
d->properties->clear();
- QStringList interpreters = manager->getInterpreters();
+ TQStringList interpreters = manager->getInterpreters();
KoProperty::Property::ListData* proplist = new KoProperty::Property::ListData(interpreters, interpreters);
KoProperty::Property* prop = new KoProperty::Property(
"language", // name
@@ -190,8 +190,8 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
return;
if(property.name() == "language") {
- QString language = property.value().toString();
- kdDebug() << QString("KexiScriptDesignView::slotPropertyChanged() language=%1").arg(language) << endl;
+ TQString language = property.value().toString();
+ kdDebug() << TQString("KexiScriptDesignView::slotPropertyChanged() language=%1").tqarg(language) << endl;
d->scriptaction->setInterpreterName( language );
// We assume Kross and the HighlightingInterface are using same
// names for the support languages...
@@ -201,7 +201,7 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
else {
bool ok = d->scriptaction->setOption( property.name(), property.value() );
if(! ok) {
- kdWarning() << QString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").arg(property.name()) << endl;
+ kdWarning() << TQString("KexiScriptDesignView::slotPropertyChanged() unknown property '%1'.").tqarg(TQString(property.name())) << endl;
return;
}
}
@@ -212,40 +212,40 @@ void KexiScriptDesignView::slotPropertyChanged(KoProperty::Set& /*set*/, KoPrope
void KexiScriptDesignView::execute()
{
d->statusbrowser->clear();
- QTime time;
+ TQTime time;
time.start();
- d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").arg(d->scriptaction->name()) );
+ d->statusbrowser->append( i18n("Execution of the script \"%1\" started.").tqarg(d->scriptaction->name()) );
d->scriptaction->activate();
if( d->scriptaction->hadException() ) {
- QString errormessage = d->scriptaction->getException()->getError();
- d->statusbrowser->append(QString("<b>%2</b><br>").arg(QStyleSheet::escape(errormessage)) );
+ TQString errormessage = d->scriptaction->getException()->getError();
+ d->statusbrowser->append(TQString("<b>%2</b><br>").tqarg(TQStyleSheet::escape(errormessage)) );
- QString tracedetails = d->scriptaction->getException()->getTrace();
- d->statusbrowser->append( QStyleSheet::escape(tracedetails) );
+ TQString tracedetails = d->scriptaction->getException()->getTrace();
+ d->statusbrowser->append( TQStyleSheet::escape(tracedetails) );
long lineno = d->scriptaction->getException()->getLineNo();
if(lineno >= 0)
d->editor->setLineNo(lineno);
}
else {
- d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").arg(time.elapsed()) );
+ d->statusbrowser->append( i18n("Successfully executed. Time elapsed: %1ms").tqarg(time.elapsed()) );
}
}
bool KexiScriptDesignView::loadData()
{
- QString data;
+ TQString data;
if(! loadDataBlock(data)) {
kexipluginsdbg << "KexiScriptDesignView::loadData(): no DataBlock" << endl;
return false;
}
- QString errMsg;
+ TQString errMsg;
int errLine;
int errCol;
- QDomDocument domdoc;
+ TQDomDocument domdoc;
bool parsed = domdoc.setContent(data, false, &errMsg, &errLine, &errCol);
if(! parsed) {
@@ -253,13 +253,13 @@ bool KexiScriptDesignView::loadData()
return false;
}
- QDomElement scriptelem = domdoc.namedItem("script").toElement();
+ TQDomElement scriptelem = domdoc.namedItem("script").toElement();
if(scriptelem.isNull()) {
kexipluginsdbg << "KexiScriptDesignView::loadData(): script domelement is null" << endl;
return false;
}
- QString interpretername = scriptelem.attribute("language");
+ TQString interpretername = scriptelem.attribute("language");
Kross::Api::Manager* manager = Kross::Api::Manager::scriptManager();
Kross::Api::InterpreterInfo* info = interpretername.isEmpty() ? 0 : manager->getInterpreterInfo(interpretername);
if(info) {
@@ -268,10 +268,10 @@ bool KexiScriptDesignView::loadData()
Kross::Api::InterpreterInfo::Option::Map options = info->getOptions();
Kross::Api::InterpreterInfo::Option::Map::ConstIterator it, end = options.constEnd();
for( it = options.constBegin(); it != end; ++it) {
- QString value = scriptelem.attribute( it.data()->name );
+ TQString value = scriptelem.attribute( it.data()->name );
if(! value.isNull()) {
- QVariant v(value);
- if( v.cast( it.data()->value.type() ) ) // preserve the QVariant's type
+ TQVariant v(value);
+ if( v.cast( it.data()->value.type() ) ) // preserve the TQVariant's type
d->scriptaction->setOption(it.data()->name, v);
}
}
@@ -295,7 +295,7 @@ KexiDB::SchemaData* KexiScriptDesignView::storeNewData(const KexiDB::SchemaData&
if(! storeData()) {
kdWarning() << "KexiScriptDesignView::storeNewData Failed to store the data." << endl;
//failure: remove object's schema data to avoid garbage
- KexiDB::Connection *conn = parentDialog()->mainWin()->project()->dbConnection();
+ KexiDB::Connection *conn = tqparentDialog()->mainWin()->project()->dbConnection();
conn->removeObject( s->id() );
delete s;
return 0;
@@ -306,28 +306,28 @@ KexiDB::SchemaData* KexiScriptDesignView::storeNewData(const KexiDB::SchemaData&
tristate KexiScriptDesignView::storeData(bool /*dontAsk*/)
{
- kexipluginsdbg << "KexiScriptDesignView::storeData(): " << parentDialog()->partItem()->name() << " [" << parentDialog()->id() << "]" << endl;
+ kexipluginsdbg << "KexiScriptDesignView::storeData(): " << tqparentDialog()->partItem()->name() << " [" << tqparentDialog()->id() << "]" << endl;
- QDomDocument domdoc("script");
- QDomElement scriptelem = domdoc.createElement("script");
+ TQDomDocument domdoc("script");
+ TQDomElement scriptelem = domdoc.createElement("script");
domdoc.appendChild(scriptelem);
- QString language = d->scriptaction->getInterpreterName();
+ TQString language = d->scriptaction->getInterpreterName();
scriptelem.setAttribute("language", language);
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo(language);
if(info) {
Kross::Api::InterpreterInfo::Option::Map defoptions = info->getOptions();
- QMap<QString, QVariant>& options = d->scriptaction->getOptions();
- QMap<QString, QVariant>::ConstIterator it, end( options.constEnd() );
+ TQMap<TQString, TQVariant>& options = d->scriptaction->getOptions();
+ TQMap<TQString, TQVariant>::ConstIterator it, end( options.constEnd() );
for( it = options.constBegin(); it != end; ++it) {
- if( defoptions.contains(it.key()) ) { // only remember options which the InterpreterInfo knows about...
+ if( defoptions.tqcontains(it.key()) ) { // only remember options which the InterpreterInfo knows about...
scriptelem.setAttribute(it.key(), it.data().toString());
}
}
}
- QDomText scriptcode = domdoc.createTextNode(d->scriptaction->getCode());
+ TQDomText scriptcode = domdoc.createTextNode(d->scriptaction->getCode());
scriptelem.appendChild(scriptcode);
return storeDataBlock( domdoc.toString() );
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
index cee1ed763..ac5240ed2 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptdesignview.h
@@ -46,13 +46,14 @@ namespace Kross { namespace Api {
class KexiScriptDesignView : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- KexiScriptDesignView(KexiMainWindow *mainWin, QWidget *parent, Kross::Api::ScriptAction* scriptaction);
+ KexiScriptDesignView(KexiMainWindow *mainWin, TQWidget *tqparent, Kross::Api::ScriptAction* scriptaction);
/**
* Destructor.
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
index a638af36b..a6f2dfc15 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.cpp
@@ -41,8 +41,8 @@ class KexiScriptEditor::Private
Private() : scriptaction(0) {}
};
-KexiScriptEditor::KexiScriptEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiEditor(mainWin, parent, name)
+KexiScriptEditor::KexiScriptEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiEditor(mainWin, tqparent, name)
, d( new Private() )
{
}
@@ -62,13 +62,13 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
d->scriptaction = scriptaction;
Q_ASSERT(d->scriptaction);
- disconnect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ disconnect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
- QString code = d->scriptaction->getCode();
+ TQString code = d->scriptaction->getCode();
if(code.isNull()) {
// If there is no code we just add some information.
///@todo remove after release
- code = "# " + QStringList::split("\n", i18n(
+ code = "# " + TQStringList::split("\n", i18n(
"This note will appear for a user in the script's source code "
"as a comment. Keep every row not longer than 60 characters and use '\n.'",
@@ -76,7 +76,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
"support in Kexi. The scripting API may change in details\n"
"in the next Kexi version.\n"
"For more information and documentation see\n%1"
- ).arg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n";
+ ).tqarg("http://www.kexi-project.org/scripting/"), true).join("\n# ") + "\n";
}
KexiEditor::setText(code);
// We assume Kross and the HighlightingInterface are using same
@@ -85,7 +85,7 @@ void KexiScriptEditor::initialize(Kross::Api::ScriptAction* scriptaction)
clearUndoRedo();
KexiEditor::setDirty(false);
- connect(this, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
+ connect(this, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotTextChanged()));
}
void KexiScriptEditor::slotTextChanged()
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
index 1ef02ff92..22415a7b1 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscripteditor.h
@@ -36,13 +36,14 @@ namespace Kross { namespace Api {
class KexiScriptEditor : public KexiEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*/
- KexiScriptEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiScriptEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
/**
* Destructor.
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
index d650e9583..b778bc75c 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.cpp
@@ -44,8 +44,8 @@ class KexiScriptPart::Private
Kross::Api::ScriptGUIClient* scriptguiclient;
};
-KexiScriptPart::KexiScriptPart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiScriptPart::KexiScriptPart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d( new Private() )
{
d->scriptguiclient = 0;
@@ -68,7 +68,7 @@ KexiScriptPart::~KexiScriptPart()
delete d;
}
-bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender)
+bool KexiScriptPart::execute(KexiPart::Item* item, TQObject* sender)
{
Q_UNUSED(sender);
@@ -88,21 +88,21 @@ bool KexiScriptPart::execute(KexiPart::Item* item, QObject* sender)
Kross::Api::ScriptAction* scriptaction = view->scriptAction();
if(scriptaction) {
- const QString dontAskAgainName = "askExecuteScript";
+ const TQString dontAskAgainName = "askExecuteScript";
KConfig* config = KGlobal::config();
- QString dontask = config->readEntry(dontAskAgainName).lower();
+ TQString dontask = config->readEntry(dontAskAgainName).lower();
bool exec = (dontask == "yes");
if( !exec && dontask != "no" ) {
exec = KMessageBox::warningContinueCancel(0,
- i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").arg(scriptaction->text()),
+ i18n("Do you want to execute the script \"%1\"?\n\nScripts obtained from unknown sources can contain dangerous code.").tqarg(scriptaction->text()),
i18n("Execute Script?"), KGuiItem(i18n("Execute"), "exec"),
dontAskAgainName, KMessageBox::Notify | KMessageBox::Dangerous
) == KMessageBox::Continue;
}
if(exec) {
- //QTimer::singleShot(10, scriptaction, SLOT(activate()));
+ //TQTimer::singleShot(10, scriptaction, TQT_SLOT(activate()));
d->scriptguiclient->executeScriptAction( scriptaction );
}
}
@@ -124,12 +124,12 @@ void KexiScriptPart::initPartActions()
// scripting-plugin depends on this instance and loading the plugin will
// fail if it's not avaiable.
if(! Kross::Api::Manager::scriptManager()->hasChild("KexiMainWindow")) {
- Kross::Api::Manager::scriptManager()->addQObject(m_mainWin, "KexiMainWindow");
+ Kross::Api::Manager::scriptManager()->addTQObject(TQT_TQOBJECT(m_mainWin), "KexiMainWindow");
// Add the KAction's provided by the ScriptGUIClient to the
// KexiMainWindow.
//FIXME: fix+use createSharedPartAction() whyever it doesn't work as expected right now...
- QPopupMenu* popup = m_mainWin->findPopupMenu("tools");
+ TQPopupMenu* popup = m_mainWin->findPopupMenu("tools");
if(popup) {
KAction* execscriptaction = d->scriptguiclient->action("executescriptfile");
if(execscriptaction)
@@ -159,9 +159,9 @@ void KexiScriptPart::initInstanceActions()
createSharedAction(Kexi::DesignViewMode, i18n("Configure Editor..."), "configure", 0, "script_config_editor");
}
-KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiScriptPart::createView(TQWidget *tqparent, KexiDialogBase* dialog, KexiPart::Item& item, int viewMode, TQMap<TQString,TQString>*)
{
- QString partname = item.name();
+ TQString partname = item.name();
if( ! partname.isNull() ) {
KexiMainWindow *win = dialog->mainWin();
if(!win || !win->project() || !win->project()->dbConnection())
@@ -181,13 +181,13 @@ KexiViewBase* KexiScriptPart::createView(QWidget *parent, KexiDialogBase* dialog
}
if(viewMode == Kexi::DesignViewMode) {
- return new KexiScriptDesignView(win, parent, scriptaction);
+ return new KexiScriptDesignView(win, tqparent, scriptaction);
}
}
return 0;
}
-QString KexiScriptPart::i18nMessage(const QCString& englishMessage) const
+TQString KexiScriptPart::i18nMessage(const TQCString& englishMessage) const
{
if (englishMessage=="Design of object \"%1\" has been modified.")
return i18n("Design of script \"%1\" has been modified.");
diff --git a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
index ddba0d723..eca7a0015 100644
--- a/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
+++ b/kexi/plugins/scripting/kexiscripting/kexiscriptpart.h
@@ -22,8 +22,8 @@
#ifndef KEXISCRIPTPART_H
#define KEXISCRIPTPART_H
-#include <qdom.h>
-#include <qcstring.h>
+#include <tqdom.h>
+#include <tqcstring.h>
#include <kexi.h>
#include <kexipart.h>
@@ -35,17 +35,18 @@
class KexiScriptPart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor.
*
- * \param parent The parent QObject this part is child of.
+ * \param tqparent The tqparent TQObject this part is child of.
* \param name The name this part has.
* \param args Optional list of arguments passed to this part.
*/
- KexiScriptPart(QObject *parent, const char *name, const QStringList& args);
+ KexiScriptPart(TQObject *tqparent, const char *name, const TQStringList& args);
/**
* Destructor.
@@ -56,28 +57,28 @@ class KexiScriptPart : public KexiPart::Part
* Implementation of the \a KexiPart::Part::execute method used to
* execute the passed \p item instance.
*/
- virtual bool execute(KexiPart::Item* item, QObject* sender = 0);
+ virtual bool execute(KexiPart::Item* item, TQObject* sender = 0);
/**
* \return the i18n message for the passed \p englishMessage string.
*/
- virtual QString i18nMessage(const QCString& englishMessage) const;
+ virtual TQString i18nMessage(const TQCString& englishMessage) const;
protected:
/**
* Create a new view.
*
- * \param parent The parent QWidget the new view is displayed in.
+ * \param tqparent The tqparent TQWidget the new view is displayed in.
* \param dialog The \a KexiDialogBase the view is child of.
* \param item The \a KexiPart::Item this view is for.
* \param viewMode The viewmode we like to have a view for.
*/
- virtual KexiViewBase* createView(QWidget *parent,
+ virtual KexiViewBase* createView(TQWidget *tqparent,
KexiDialogBase* dialog,
KexiPart::Item& item,
int viewMode = Kexi::DesignViewMode,
- QMap<QString,QString>* staticObjectArgs = 0);
+ TQMap<TQString,TQString>* staticObjectArgs = 0);
/**
* Initialize the part's actions.
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
index 3718512fe..3a2734aa7 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenter.py
@@ -89,14 +89,14 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class ListViewDialog(qt.QDialog):
- def __init__(self, parent, caption):
- qt.QDialog.__init__(self, parent, "ProgressDialog", 1)
- self.parent = parent
+ def __init__(self, tqparent, caption):
+ qt.QDialog.__init__(self, tqparent, "ProgressDialog", 1)
+ self.tqparent = tqparent
self.setCaption(caption)
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(2)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.listview = qt.QListView(box)
self.listview.setAllColumnsShowFocus(True)
self.listview.header().setStretchEnabled(True,0)
@@ -124,9 +124,9 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class CopyJobWidget(qt.QVBox):
- def __init__(self,dialog,parent):
+ def __init__(self,dialog,tqparent):
self.dialog = dialog
- qt.QVBox.__init__(self,parent)
+ qt.QVBox.__init__(self,tqparent)
self.setSpacing(6)
typebox = qt.QHBox(self)
typebox.setSpacing(6)
@@ -165,7 +165,7 @@ def runGuiApp(copycenter, name):
def doubleClicked(self, **args):
print "CopyJobWidget.doubleClicked"
item = self.listview.selectedItem()
- if item and item.parent(): item.startRename(1)
+ if item and item.tqparent(): item.startRename(1)
def readOptions(self,domnode,plugininst):
print "CopyJobWidget.readOptions plugintype=\"%s\"" % plugininst.plugintype
@@ -210,13 +210,13 @@ def runGuiApp(copycenter, name):
if filename != "": self.jobfilecombobox.setCurrentText(filename)
def escape(self,s):
- return s.replace("&", "&amp;").replace("'", "&apos;").replace("<", "&lt;").replace(">", "&gt;").replace('"', "&quot;")
+ return s.tqreplace("&", "&amp;").tqreplace("'", "&apos;").tqreplace("<", "&lt;").tqreplace(">", "&gt;").tqreplace('"', "&quot;")
def writeOptions(self,writer,pluginname,plugininst):
print "CopyJobWidget.writeOptions"
writer.write("<%s plugin=\"%s\">\n" % (plugininst.plugintype, pluginname))
for optionname in plugininst.options:
- value = self.escape( unicode(plugininst.options[optionname]).encode("utf-8") )
+ value = self.escape( tqunicode(plugininst.options[optionname]).encode("utf-8") )
writer.write("\t<%s value=\"%s\" />\n" % (optionname,value))
writer.write("</%s>\n" % plugininst.plugintype)
@@ -238,19 +238,19 @@ def runGuiApp(copycenter, name):
f.close()
print "File \%s\" successfully written." % filename
- def addItem(self, pluginimpl, afteritem = None, parentitem = None):
+ def addItem(self, pluginimpl, afteritem = None, tqparentitem = None):
#print "CopyJobWidget.addItem"
class ListViewItem(qt.QListViewItem):
- def __init__(self, pluginimpl, listview, parentitem = None, afteritem = None):
+ def __init__(self, pluginimpl, listview, tqparentitem = None, afteritem = None):
self.pluginimpl = pluginimpl
- if parentitem == None:
+ if tqparentitem == None:
qt.QListViewItem.__init__(self,listview)
self.setOpen(True)
else:
if afteritem == None:
- qt.QListViewItem.__init__(self,parentitem)
+ qt.QListViewItem.__init__(self,tqparentitem)
else:
- qt.QListViewItem.__init__(self,parentitem,afteritem)
+ qt.QListViewItem.__init__(self,tqparentitem,afteritem)
self.setRenameEnabled(1,True)
def startRename(self, columnindex):
qt.QListViewItem.startRename(self,columnindex)
@@ -271,10 +271,10 @@ def runGuiApp(copycenter, name):
def text(self, columnindex):
if columnindex == 1:
- if qt.QListViewItem.text(self,0).contains("password"):
+ if qt.QListViewItem.text(self,0).tqcontains("password"):
return "*" * len(str(qt.QListViewItem.text(self,1)))
return qt.QListViewItem.text(self,columnindex)
- return ListViewItem(pluginimpl, self.listview, parentitem, afteritem)
+ return ListViewItem(pluginimpl, self.listview, tqparentitem, afteritem)
def updateItem(self,pluginname,pluginimpl):
#print "CopyJobWidget.updateItem"
@@ -309,31 +309,31 @@ def runGuiApp(copycenter, name):
self.starttime = None
qt.QDialog.__init__(self, dialog, "ProgressDialog", 1)
self.setCaption("Copying...")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setSpacing(6)
box.setMargin(6)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.textbrowser = qt.QTextBrowser(box)
self.textbrowser.setWordWrap(qt.QTextEdit.WidgetWidth)
self.textbrowser.setTextFormat(qt.Qt.RichText)
statusbox = qt.QFrame(box)
- layout = qt.QGridLayout(statusbox,4,2,0,2)
- layout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0)
+ tqlayout = qt.QGridLayout(statusbox,4,2,0,2)
+ tqlayout.addWidget(qt.QLabel("Number of records done:",statusbox),0,0)
self.donecounter = 0
self.donelabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.donelabel,0,1)
- layout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0)
+ tqlayout.addWidget(self.donelabel,0,1)
+ tqlayout.addWidget(qt.QLabel("Successfully copied records:",statusbox),1,0)
self.successcounter = 0
self.successlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.successlabel,1,1)
- layout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0)
+ tqlayout.addWidget(self.successlabel,1,1)
+ tqlayout.addWidget(qt.QLabel("Failed to copy records:",statusbox),2,0)
self.failedcounter = 0
self.failedlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.failedlabel,2,1)
- layout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0)
+ tqlayout.addWidget(self.failedlabel,2,1)
+ tqlayout.addWidget(qt.QLabel("Elapsed time in seconds:",statusbox),3,0)
self.elapsedlabel = qt.QLabel("-",statusbox)
- layout.addWidget(self.elapsedlabel,3,1)
+ tqlayout.addWidget(self.elapsedlabel,3,1)
btnbox = qt.QHBox(box)
btnbox.setSpacing(6)
self.donebtn = qt.QPushButton(btnbox)
@@ -359,11 +359,11 @@ def runGuiApp(copycenter, name):
def writeSuccess(self, record, rowcount):
self.donecounter += rowcount
self.successcounter += rowcount
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def writeFailed(self, record):
self.donecounter += 1
self.failedcounter += 1
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def startCopy(self):
try:
@@ -397,7 +397,7 @@ def runGuiApp(copycenter, name):
self.starttime.start()
self.updatetimer.start(500)
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
# Copy the records
self.textbrowser.append("<hr><i>Copy the records...</i>")
@@ -428,7 +428,7 @@ def runGuiApp(copycenter, name):
def show(self):
qt.QDialog.show(self)
qt.QTimer.singleShot(10,self.startCopy)
- qt.qApp.processEvents()
+ qt.tqApp.processEvents()
def closeEvent(self, closeevent):
if not self.dialog.getSourcePluginImpl().isFinished():
@@ -442,13 +442,13 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class DataSelector(qt.QVGroupBox):
- def __init__(self, plugintype, title, caption, parent, dialog, items):
+ def __init__(self, plugintype, title, caption, tqparent, dialog, items):
self.plugintype = plugintype
self.pluginimpl = None
self.dialog = dialog
self.mainbox = None
- qt.QVGroupBox.__init__(self,title,parent)
+ qt.QVGroupBox.__init__(self,title,tqparent)
self.setInsideMargin(6)
self.setInsideSpacing(0)
@@ -520,7 +520,7 @@ def runGuiApp(copycenter, name):
#--------------------------------------------------------------------
class Dialog(qt.QDialog):
- def __init__(self, copycenter, parent):
+ def __init__(self, copycenter, tqparent):
self.copycenter = copycenter
import qt
@@ -528,13 +528,13 @@ def runGuiApp(copycenter, name):
import sys
self.ListViewDialog = ListViewDialog
- qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, tqparent, "Dialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Copy Center")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(6)
box.setSpacing(6)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.tab = qt.QTabWidget(box)
self.tab.setMargin(6)
box.setStretchFactor(self.tab,1)
@@ -629,7 +629,7 @@ def runGuiApp(copycenter, name):
if name == "__main__":
qtapp = qt.QApplication(sys.argv)
else:
- qtapp = qt.qApp
+ qtapp = qt.tqApp
dialog = Dialog(copycenter, qtapp.mainWidget())
dialog.exec_loop()
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
index e82414050..85023ee42 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginKexiDB.py
@@ -53,9 +53,9 @@ class CopyCenterPlugin:
def finish(self):
""" Called if reading is finished."""
self.connection.finish()
- def createWidget(self, dialog, parent):
+ def createWidget(self, dialog, tqparent):
""" Create and return a widget to modify the plugin settings. """
- return self.copycenterplugin.createWidget(dialog, self, parent)
+ return self.copycenterplugin.createWidget(dialog, self, tqparent)
class Source(Plugin):
""" Specialization of the Plugin class to implement the
@@ -196,7 +196,7 @@ class CopyCenterPlugin:
self.drivermanager = krosskexidb.DriverManager()
self.copycenter = copycenter
- def createWidget(self, dialog, plugin, parent):
+ def createWidget(self, dialog, plugin, tqparent):
""" Each plugin may provide a qt.QWidget back to the
CopyCenter.py. The widget will be used to configure our
plugin settings. """
@@ -208,12 +208,12 @@ class CopyCenterPlugin:
self.dialog = dialog
self.mainbox = None
class ProjectBox(qt.QHBox):
- def __init__(self,main,copycenterplugin,plugin,parent):
+ def __init__(self,main,copycenterplugin,plugin,tqparent):
self.main = main
self.copycenterplugin = copycenterplugin
self.plugin = plugin
- qt.QHBox.__init__(self,parent)
+ qt.QHBox.__init__(self,tqparent)
prjlabel = qt.QLabel("Project File:",self)
self.prjcombo = qt.QComboBox(self)
self.prjcombo.setEditable(True)
@@ -244,8 +244,8 @@ class CopyCenterPlugin:
if str(filename) != "": self.prjcombo.setCurrentText(str(filename))
class DriverBox(qt.QVBox):
- def __init__(self,main,parent):
- qt.QVBox.__init__(self,parent)
+ def __init__(self,main,tqparent):
+ qt.QVBox.__init__(self,tqparent)
self.main = main
self.copycenterplugin = main.copycenterplugin
self.plugin = main.plugin
@@ -364,8 +364,8 @@ class CopyCenterPlugin:
if str(filename) != "": self.sockfileedit.setText(str(filename))
class TableBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
tablelabel = qt.QLabel("Table:",self)
@@ -405,8 +405,8 @@ class CopyCenterPlugin:
dialog.show()
class FieldBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
self.tablename = ""
@@ -462,15 +462,15 @@ class CopyCenterPlugin:
self.fieldsbtn.setEnabled(False)
class MainBox(qt.QHBox):
- def __init__(self,copycenterplugin,plugin,parent):
- qt.QHBox.__init__(self,parent)
+ def __init__(self,copycenterplugin,plugin,tqparent):
+ qt.QHBox.__init__(self,tqparent)
self.copycenterplugin = copycenterplugin
self.plugin = plugin
- self.prjbox = ProjectBox(self,copycenterplugin,plugin,parent)
- self.driverbox = DriverBox(self,parent)
+ self.prjbox = ProjectBox(self,copycenterplugin,plugin,tqparent)
+ self.driverbox = DriverBox(self,tqparent)
- statusbar = qt.QHBox(parent)
+ statusbar = qt.QHBox(tqparent)
statusbar.setSpacing(2)
#self.statuslabel = qt.QLabel("Disconnected",statusbar)
#statusbar.setStretchFactor(self.statuslabel,1)
@@ -482,9 +482,9 @@ class CopyCenterPlugin:
self.disconnectbtn.setEnabled(False)
qt.QObject.connect(self.disconnectbtn, qt.SIGNAL("clicked()"),self.disconnectClicked)
- #self.connectionbox = ConnectionBox(copycenterplugin,plugin,parent)
- self.tablebox = TableBox(copycenterplugin,plugin,parent)
- self.fieldbox = FieldBox(copycenterplugin,plugin,parent)
+ #self.connectionbox = ConnectionBox(copycenterplugin,plugin,tqparent)
+ self.tablebox = TableBox(copycenterplugin,plugin,tqparent)
+ self.fieldbox = FieldBox(copycenterplugin,plugin,tqparent)
qt.QObject.connect(self.tablebox.tableedit, qt.SIGNAL("textChanged(const QString&)"), self.fieldbox.tableChanged)
if self.plugin.options['project'] != '':
@@ -499,7 +499,7 @@ class CopyCenterPlugin:
pass
if self.plugin.plugintype == "Destination":
- #typebox = qt.QHBox(parent)
+ #typebox = qt.QHBox(tqparent)
#label = qt.QLabel("Operation:",typebox)
#combobox = qt.QComboBox(typebox)
#combobox.insertItem("Append")
@@ -511,15 +511,15 @@ class CopyCenterPlugin:
#typebox.setStretchFactor(combobox,1)
pass
elif self.plugin.plugintype == "Source":
- wherebox = qt.QHBox(parent)
+ wherebox = qt.QHBox(tqparent)
wherelabel = qt.QLabel("Where:",wherebox)
self.whereedit = qt.QLineEdit(self.plugin.options['where'],wherebox)
- #orderbox = qt.QHBox(parent)
+ #orderbox = qt.QHBox(tqparent)
#orderlabel = qt.QLabel("Order By:",orderbox)
#orderedit = qt.QLineEdit("",orderbox)
- #errbox = qt.QHBox(parent)
+ #errbox = qt.QHBox(tqparent)
#errlabel = qt.QLabel("On Error:",errbox)
#errcombo = qt.QComboBox(errbox)
#errcombo.insertItem("Ask")
@@ -640,7 +640,7 @@ class CopyCenterPlugin:
pass
return ""
- mainbox = MainBox(self,plugin,parent)
+ mainbox = MainBox(self,plugin,tqparent)
plugin.widget = mainbox
return mainbox
diff --git a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
index 985d757d8..de553b920 100644
--- a/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
+++ b/kexi/plugins/scripting/scripts/copycenter/CopyCenterPluginQtSQL.py
@@ -39,8 +39,8 @@ class CopyCenterPlugin:
def finish(self):
self.isfinished = True
self.widget.disconnectClicked()
- def createWidget(self,dialog,parent):
- return self.copycenterplugin.widget(dialog, self, parent)
+ def createWidget(self,dialog,tqparent):
+ return self.copycenterplugin.widget(dialog, self, tqparent)
class Source(Plugin):
plugintype = "Source"
@@ -84,7 +84,7 @@ class CopyCenterPlugin:
return None
record = []
for fieldname in self.fieldlist:
- record.append( unicode(self.cursor.value(fieldname).toString()).encode("latin-1") )
+ record.append( tqunicode(self.cursor.value(fieldname).toString()).encode("latin-1") )
#print "read record: %s" % record
return record
@@ -145,8 +145,8 @@ class CopyCenterPlugin:
cursorrecord.setValue(self.fieldlist[i], v)
rowcount = self.cursor.insert()
if rowcount < 1:
- drv = unicode(self.cursor.lastError().driverText()).encode("latin-1")
- db = unicode(self.cursor.lastError().databaseText()).encode("latin-1")
+ drv = tqunicode(self.cursor.lastError().driverText()).encode("latin-1")
+ db = tqunicode(self.cursor.lastError().databaseText()).encode("latin-1")
print "failed: %s %s" % (drv,db)
self.copierer.writeFailed(record)
else:
@@ -209,7 +209,7 @@ class CopyCenterPlugin:
""" Constructor. """
pass
- def widget(self,dialog,plugin,parent):
+ def widget(self,dialog,plugin,tqparent):
""" Each plugin may provide a qt.QWidget back to the
CopyCenter.py. The widget will be used to configure our
plugin settings. """
@@ -246,7 +246,7 @@ class CopyCenterPlugin:
class FieldsDialog(ListViewDialog):
def __init__(self, mainwidget):
- ListViewDialog.__init__(self,parent,"Fields")
+ ListViewDialog.__init__(self,tqparent,"Fields")
self.mainwidget = mainwidget
self.listview.setSelectionMode(qt.QListView.Multi)
self.listview.setSorting(-1)
@@ -280,14 +280,14 @@ class CopyCenterPlugin:
class MainWidget(qt.QHBox):
- def __init__(self,plugin,dialog,parent):
+ def __init__(self,plugin,dialog,tqparent):
import qt
import qtsql
- qt.QHBox.__init__(self,parent)
+ qt.QHBox.__init__(self,tqparent)
self.dialog = dialog
self.plugin = plugin
- self.connectionbox = qt.QVBox(parent)
+ self.connectionbox = qt.QVBox(tqparent)
self.connectionbox.setSpacing(2)
driverbox = qt.QHBox(self.connectionbox)
@@ -331,7 +331,7 @@ class CopyCenterPlugin:
dblabel.setBuddy(self.dbedit)
dbbox.setStretchFactor(self.dbedit,1)
- statusbar = qt.QHBox(parent)
+ statusbar = qt.QHBox(tqparent)
statusbar.setSpacing(2)
statusbar.setStretchFactor(qt.QWidget(statusbar),1)
self.connectbtn = qt.QPushButton("Connect",statusbar)
@@ -340,7 +340,7 @@ class CopyCenterPlugin:
self.disconnectbtn.setEnabled(False)
qt.QObject.connect(self.disconnectbtn, qt.SIGNAL("clicked()"),self.disconnectClicked)
- tablebox = qt.QHBox(parent)
+ tablebox = qt.QHBox(tqparent)
tablelabel = qt.QLabel("Table:",tablebox)
self.tableedit = qt.QLineEdit(self.plugin.options['table'],tablebox)
qt.QObject.connect(self.tableedit, qt.SIGNAL("textChanged(const QString&)"), self.tableEditChanged)
@@ -350,7 +350,7 @@ class CopyCenterPlugin:
tablelabel.setBuddy(self.tableedit)
tablebox.setStretchFactor(self.tableedit,1)
- fieldbox = qt.QHBox(parent)
+ fieldbox = qt.QHBox(tqparent)
fieldlabel = qt.QLabel("Fields:",fieldbox)
self.fieldedit = qt.QLineEdit(self.plugin.options['fields'],fieldbox)
self.fieldbtn = qt.QPushButton("...",fieldbox)
@@ -360,7 +360,7 @@ class CopyCenterPlugin:
fieldbox.setStretchFactor(self.fieldedit,1)
if self.plugin.plugintype == "Source":
- box = qt.QHBox(parent)
+ box = qt.QHBox(tqparent)
wherelabel = qt.QLabel("Where:",box)
self.whereedit = qt.QLineEdit(self.plugin.options['where'],box)
wherelabel.setBuddy(self.whereedit)
@@ -368,9 +368,9 @@ class CopyCenterPlugin:
elif self.plugin.plugintype == "Destination":
class OperationBox(qt.QVBox):
- def __init__(self, mainwidget, parent):
+ def __init__(self, mainwidget, tqparent):
self.mainwidget = mainwidget
- qt.QVBox.__init__(self, parent)
+ qt.QVBox.__init__(self, tqparent)
opbox = qt.QHBox(self)
operationlabel = qt.QLabel("Operation:",opbox)
self.mainwidget.operationedit = qt.QComboBox(opbox)
@@ -401,7 +401,7 @@ class CopyCenterPlugin:
1: showUpdate,
}[ self.mainwidget.operationedit.currentItem() ](self)
if self.box != None: self.box.show()
- OperationBox(self,parent)
+ OperationBox(self,tqparent)
def tableEditChanged(self,text):
if self.plugin.database != None and self.plugin.database.isOpen():
@@ -491,5 +491,5 @@ class CopyCenterPlugin:
print "database is closed now!"
self.updateConnectState()
- plugin.widget = MainWidget(plugin,self.dialog,parent)
+ plugin.widget = MainWidget(plugin,self.dialog,tqparent)
return plugin.widget
diff --git a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
index cace0340c..9febfcdd7 100644
--- a/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
+++ b/kexi/plugins/scripting/scripts/exportxhtml/ExportXHTML.py
@@ -83,7 +83,7 @@ class HtmlExporter:
def htmlescape(self, text):
import string
- return string.replace(string.replace(string.replace(str(text),'&','&amp;'),'<','&lt;'),'>','&gt;')
+ return string.tqreplace(string.tqreplace(string.tqreplace(str(text),'&','&amp;'),'<','&lt;'),'>','&gt;')
def write(self, output, style):
name = self.datasource.name()
@@ -131,7 +131,7 @@ class HtmlExporter:
if items == None: break
output.write("<tr>")
for item in items:
- u = unicode(str(self.htmlescape(item)),"latin-1")
+ u = tqunicode(str(self.htmlescape(item)),"latin-1")
output.write("<td>%s</td>" % u.encode("utf-8"))
output.write("</tr>\n")
output.write("</table>\n")
diff --git a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
index 200b3dee6..6ca94f9a6 100755
--- a/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
+++ b/kexi/plugins/scripting/scripts/importxhtml/ImportXHTML.py
@@ -124,9 +124,9 @@ class SaxInput:
was parsed. """
if self.field != None:
- # the xml-data is unicode and we need to encode it
+ # the xml-data is tqunicode and we need to encode it
# to latin-1 cause KexiDB deals only with latin-1.
- u = unicode(chars[offset:offset+length])
+ u = tqunicode(chars[offset:offset+length])
self.field.append(u.encode("latin-1"))
# start the job
diff --git a/kexi/plugins/tables/kexilookupcolumnpage.cpp b/kexi/plugins/tables/kexilookupcolumnpage.cpp
index 9df927945..33e12d646 100644
--- a/kexi/plugins/tables/kexilookupcolumnpage.cpp
+++ b/kexi/plugins/tables/kexilookupcolumnpage.cpp
@@ -19,10 +19,10 @@
#include "kexilookupcolumnpage.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -41,7 +41,7 @@
#include <koproperty/property.h>
#include <koproperty/utils.h>
-QString mimeTypeToType(const QString& mimeType)
+TQString mimeTypeToType(const TQString& mimeType)
{
if (mimeType=="kexi/table")
return "table";
@@ -51,7 +51,7 @@ QString mimeTypeToType(const QString& mimeType)
return mimeType;
}
-QString typeToMimeType(const QString& type)
+TQString typeToMimeType(const TQString& type)
{
if (type=="table")
return "kexi/table";
@@ -85,18 +85,18 @@ class KexiLookupColumnPage::Private
propertySet = aPropertySet;
}
- QVariant propertyValue(const QCString& propertyName) const {
- return propertySet ? propertySet->property(propertyName).value() : QVariant();
+ TQVariant propertyValue(const TQCString& propertyName) const {
+ return propertySet ? propertySet->property(propertyName).value() : TQVariant();
}
- void changeProperty(const QCString &property, const QVariant &value)
+ void changeProperty(const TQCString &property, const TQVariant &value)
{
if (!propertySetEnabled)
return;
propertySet->changeProperty(property, value);
}
- void updateInfoLabelForPropertySet(const QString& textToDisplayForNullSet) {
+ void updateInfoLabelForPropertySet(const TQString& textToDisplayForNullSet) {
KexiPropertyEditorView::updateInfoLabelForPropertySet(
objectInfoLabel, propertySet, textToDisplayForNullSet);
}
@@ -104,8 +104,8 @@ class KexiLookupColumnPage::Private
KexiDataSourceComboBox *rowSourceCombo;
KexiFieldComboBox *boundColumnCombo, *visibleColumnCombo;
KexiObjectInfoLabel *objectInfoLabel;
- QLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel;
- QToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton,
+ TQLabel *rowSourceLabel, *boundColumnLabel, *visibleColumnLabel;
+ TQToolButton *clearRowSourceButton, *gotoRowSourceButton, *clearBoundColumnButton,
*clearVisibleColumnButton;
//! Used only in assignPropertySet() to check whether we already have the set assigned
int currentFieldUid;
@@ -117,18 +117,18 @@ class KexiLookupColumnPage::Private
private:
//! A property set that is displayed on the page.
//! The set is also updated after any change in this page's data.
- QGuardedPtr<KoProperty::Set> propertySet;
+ TQGuardedPtr<KoProperty::Set> propertySet;
};
//----------------------------------------------
-KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
- : QWidget(parent)
+KexiLookupColumnPage::KexiLookupColumnPage(TQWidget *tqparent)
+ : TQWidget(tqparent)
, d(new Private())
{
setName("KexiLookupColumnPage");
- QVBoxLayout *vlyr = new QVBoxLayout(this);
+ TQVBoxLayout *vlyr = new TQVBoxLayout(this);
d->objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
vlyr->addWidget(d->objectInfoLabel);
@@ -136,30 +136,30 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
//todo d->noDataSourceAvailableMultiText = i18n("No data source could be assigned for multiple widgets.");
//-Row Source
- QWidget *contents = new QWidget(this);
+ TQWidget *contents = new TQWidget(this);
vlyr->addWidget(contents);
- QVBoxLayout *contentsVlyr = new QVBoxLayout(contents);
+ TQVBoxLayout *contentsVlyr = new TQVBoxLayout(contents);
- QHBoxLayout *hlyr = new QHBoxLayout(contentsVlyr);
- d->rowSourceLabel = new QLabel(i18n("Row source:"), contents);
- d->rowSourceLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(contentsVlyr);
+ d->rowSourceLabel = new TQLabel(i18n("Row source:"), contents);
+ d->rowSourceLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->rowSourceLabel->setMargin(2);
d->rowSourceLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->rowSourceLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->rowSourceLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->rowSourceLabel);
- d->gotoRowSourceButton = new KexiSmallToolButton(contents, QString::null, "goto", "gotoRowSourceButton");
+ d->gotoRowSourceButton = new KexiSmallToolButton(contents, TQString(), "goto", "gotoRowSourceButton");
d->gotoRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight());
- QToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source"));
+ TQToolTip::add(d->gotoRowSourceButton, i18n("Go to selected row source"));
hlyr->addWidget(d->gotoRowSourceButton);
- connect(d->gotoRowSourceButton, SIGNAL(clicked()), this, SLOT(slotGotoSelectedRowSource()));
+ connect(d->gotoRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotGotoSelectedRowSource()));
- d->clearRowSourceButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearRowSourceButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearRowSourceButton");
d->clearRowSourceButton->setMinimumHeight(d->rowSourceLabel->minimumHeight());
- QToolTip::add(d->clearRowSourceButton, i18n("Clear row source"));
+ TQToolTip::add(d->clearRowSourceButton, i18n("Clear row source"));
hlyr->addWidget(d->clearRowSourceButton);
- connect(d->clearRowSourceButton, SIGNAL(clicked()), this, SLOT(clearRowSourceSelection()));
+ connect(d->clearRowSourceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearRowSourceSelection()));
d->rowSourceCombo = new KexiDataSourceComboBox(contents, "rowSourceCombo");
d->rowSourceLabel->setBuddy(d->rowSourceCombo);
@@ -168,20 +168,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
contentsVlyr->addSpacing(8);
//- Bound Column
- hlyr = new QHBoxLayout(contentsVlyr);
- d->boundColumnLabel = new QLabel(i18n("Bound column:"), contents);
- d->boundColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ d->boundColumnLabel = new TQLabel(i18n("Bound column:"), contents);
+ d->boundColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->boundColumnLabel->setMargin(2);
d->boundColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->boundColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->boundColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->boundColumnLabel);
- d->clearBoundColumnButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearBoundColumnButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearBoundColumnButton");
d->clearBoundColumnButton->setMinimumHeight(d->boundColumnLabel->minimumHeight());
- QToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column"));
+ TQToolTip::add(d->clearBoundColumnButton, i18n("Clear bound column"));
hlyr->addWidget(d->clearBoundColumnButton);
- connect(d->clearBoundColumnButton, SIGNAL(clicked()), this, SLOT(clearBoundColumnSelection()));
+ connect(d->clearBoundColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearBoundColumnSelection()));
d->boundColumnCombo = new KexiFieldComboBox(contents, "boundColumnCombo");
d->boundColumnLabel->setBuddy(d->boundColumnCombo);
@@ -190,20 +190,20 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
contentsVlyr->addSpacing(8);
//- Visible Column
- hlyr = new QHBoxLayout(contentsVlyr);
- d->visibleColumnLabel = new QLabel(i18n("Visible column:"), contents);
- d->visibleColumnLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed);
+ hlyr = new TQHBoxLayout(contentsVlyr);
+ d->visibleColumnLabel = new TQLabel(i18n("Visible column:"), contents);
+ d->visibleColumnLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed);
d->visibleColumnLabel->setMargin(2);
d->visibleColumnLabel->setMinimumHeight(IconSize(KIcon::Small)+4);
- d->visibleColumnLabel->setAlignment(Qt::AlignLeft|Qt::AlignBottom);
+ d->visibleColumnLabel->tqsetAlignment(TQt::AlignLeft|TQt::AlignBottom);
hlyr->addWidget(d->visibleColumnLabel);
- d->clearVisibleColumnButton = new KexiSmallToolButton(contents, QString::null,
+ d->clearVisibleColumnButton = new KexiSmallToolButton(contents, TQString(),
"clear_left", "clearVisibleColumnButton");
d->clearVisibleColumnButton->setMinimumHeight(d->visibleColumnLabel->minimumHeight());
- QToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column"));
+ TQToolTip::add(d->clearVisibleColumnButton, i18n("Clear visible column"));
hlyr->addWidget(d->clearVisibleColumnButton);
- connect(d->clearVisibleColumnButton, SIGNAL(clicked()), this, SLOT(clearVisibleColumnSelection()));
+ connect(d->clearVisibleColumnButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(clearVisibleColumnSelection()));
d->visibleColumnCombo = new KexiFieldComboBox(contents, "visibleColumnCombo");
d->visibleColumnLabel->setBuddy(d->visibleColumnCombo);
@@ -211,11 +211,11 @@ KexiLookupColumnPage::KexiLookupColumnPage(QWidget *parent)
vlyr->addStretch(1);
- connect(d->rowSourceCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(slotRowSourceTextChanged(const QString &)));
- connect(d->rowSourceCombo, SIGNAL(dataSourceChanged()), this, SLOT(slotRowSourceChanged()));
- connect(d->boundColumnCombo, SIGNAL(selected()), this, SLOT(slotBoundColumnSelected()));
- connect(d->visibleColumnCombo, SIGNAL(selected()), this, SLOT(slotVisibleColumnSelected()));
+ connect(d->rowSourceCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(slotRowSourceTextChanged(const TQString &)));
+ connect(d->rowSourceCombo, TQT_SIGNAL(dataSourceChanged()), this, TQT_SLOT(slotRowSourceChanged()));
+ connect(d->boundColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotBoundColumnSelected()));
+ connect(d->visibleColumnCombo, TQT_SIGNAL(selected()), this, TQT_SLOT(slotVisibleColumnSelected()));
clearBoundColumnSelection();
clearVisibleColumnSelection();
@@ -249,7 +249,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet)
const bool hasRowSource = d->hasPropertySet() && !d->propertyValue("rowSourceType").isNull()
&& !d->propertyValue("rowSource").isNull();
- QString rowSource, rowSourceType;
+ TQString rowSource, rowSourceType;
if (hasRowSource) {
rowSourceType = typeToMimeType( d->propertyValue("rowSourceType").toString() );
rowSource = d->propertyValue("rowSource").toString();
@@ -274,7 +274,7 @@ void KexiLookupColumnPage::assignPropertySet(KoProperty::Set* propertySet)
void KexiLookupColumnPage::clearBoundColumnSelection()
{
d->boundColumnCombo->setCurrentText("");
- d->boundColumnCombo->setFieldOrExpression(QString::null);
+ d->boundColumnCombo->setFieldOrExpression(TQString());
slotBoundColumnSelected();
d->clearBoundColumnButton->setEnabled(false);
}
@@ -307,7 +307,7 @@ void KexiLookupColumnPage::slotBoundColumnSelected()
void KexiLookupColumnPage::clearVisibleColumnSelection()
{
d->visibleColumnCombo->setCurrentText("");
- d->visibleColumnCombo->setFieldOrExpression(QString::null);
+ d->visibleColumnCombo->setFieldOrExpression(TQString());
slotVisibleColumnSelected();
d->clearVisibleColumnButton->setEnabled(false);
}
@@ -329,9 +329,9 @@ void KexiLookupColumnPage::slotRowSourceChanged()
{
if (!d->rowSourceCombo->project())
return;
- QString mime = d->rowSourceCombo->selectedMimeType();
+ TQString mime = d->rowSourceCombo->selectedMimeType();
bool rowSourceFound = false;
- QString name = d->rowSourceCombo->selectedName();
+ TQString name = d->rowSourceCombo->selectedName();
if ((mime=="kexi/table" || mime=="kexi/query") && d->rowSourceCombo->isSelectionValid()) {
KexiDB::TableOrQuerySchema *tableOrQuery = new KexiDB::TableOrQuerySchema(
d->rowSourceCombo->project()->dbConnection(), name.latin1(), mime=="kexi/table");
@@ -372,7 +372,7 @@ void KexiLookupColumnPage::slotRowSourceChanged()
//! @todo update d->propertySet ^^
}
-void KexiLookupColumnPage::slotRowSourceTextChanged(const QString & string)
+void KexiLookupColumnPage::slotRowSourceTextChanged(const TQString & string)
{
Q_UNUSED(string);
const bool enable = d->rowSourceCombo->isSelectionValid();
@@ -398,7 +398,7 @@ void KexiLookupColumnPage::clearRowSourceSelection(bool alsoClearComboBox)
void KexiLookupColumnPage::slotGotoSelectedRowSource()
{
- QString mime = d->rowSourceCombo->selectedMimeType();
+ TQString mime = d->rowSourceCombo->selectedMimeType();
if (mime=="kexi/table" || mime=="kexi/query") {
if (d->rowSourceCombo->isSelectionValid())
emit jumpToObjectRequested(mime.latin1(), d->rowSourceCombo->selectedName().latin1());
diff --git a/kexi/plugins/tables/kexilookupcolumnpage.h b/kexi/plugins/tables/kexilookupcolumnpage.h
index 457b2e3d1..f7b79bb2e 100644
--- a/kexi/plugins/tables/kexilookupcolumnpage.h
+++ b/kexi/plugins/tables/kexilookupcolumnpage.h
@@ -19,7 +19,7 @@
#ifndef KEXILOOKUPCOLUMNPAGE_H
#define KEXILOOKUPCOLUMNPAGE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
#include <kexidb/utils.h>
#include <koproperty/set.h>
@@ -31,9 +31,9 @@ class KexiFieldComboBox;
class KexiFieldListView;
class KexiProject;
class KexiSmallToolButton;
-class QToolButton;
-class QLabel;
-class QFrame;
+class TQToolButton;
+class TQLabel;
+class TQFrame;
//! @short A page within table designer's property pane, providing lookup column editor.
/*! It's data model is basically KexiDB::LookupFieldSchema class, but the page does
@@ -42,12 +42,13 @@ class QFrame;
@todo not all features of KexiDB::LookupFieldSchema class are displayed on this page yet
*/
-class KexiLookupColumnPage : public QWidget
+class KexiLookupColumnPage : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiLookupColumnPage(QWidget *parent);
+ KexiLookupColumnPage(TQWidget *tqparent);
virtual ~KexiLookupColumnPage();
public slots:
@@ -61,14 +62,14 @@ class KexiLookupColumnPage : public QWidget
signals:
//! Signal emitted when helper button 'Go to selected row sourcesource' is clicked.
- void jumpToObjectRequested(const QCString& mime, const QCString& name);
+ void jumpToObjectRequested(const TQCString& mime, const TQCString& name);
// /*! Signal emitted when current bound column has been changed. */
-// void boundColumnChanged(const QString& string, const QString& caption,
+// void boundColumnChanged(const TQString& string, const TQString& caption,
// KexiDB::Field::Type type);
protected slots:
- void slotRowSourceTextChanged(const QString & string);
+ void slotRowSourceTextChanged(const TQString & string);
void slotRowSourceChanged();
void slotGotoSelectedRowSource();
void slotBoundColumnSelected();
@@ -78,7 +79,7 @@ class KexiLookupColumnPage : public QWidget
void updateBoundColumnWidgetsAvailability();
//! Used instead of m_propertySet->changeProperty() to honor m_propertySetEnabled
- void changeProperty(const QCString &property, const QVariant &value);
+ void changeProperty(const TQCString &property, const TQVariant &value);
private:
class Private;
diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.cpp b/kexi/plugins/tables/kexitabledesigner_dataview.cpp
index bea2d9f51..2b0b36089 100644
--- a/kexi/plugins/tables/kexitabledesigner_dataview.cpp
+++ b/kexi/plugins/tables/kexitabledesigner_dataview.cpp
@@ -26,8 +26,8 @@
#include "kexidatatableview.h"
#include "keximainwindow.h"
-KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent)
- : KexiDataTable(win, parent, "KexiTableDesigner_DataView", true/*db-aware*/)
+KexiTableDesigner_DataView::KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent)
+ : KexiDataTable(win, tqparent, "KexiTableDesigner_DataView", true/*db-aware*/)
{
}
@@ -73,7 +73,7 @@ tristate KexiTableDesigner_DataView::afterSwitchFrom(int mode)
KexiTablePart::TempData* KexiTableDesigner_DataView::tempData() const
{
- return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData());
}
#include "kexitabledesigner_dataview.moc"
diff --git a/kexi/plugins/tables/kexitabledesigner_dataview.h b/kexi/plugins/tables/kexitabledesigner_dataview.h
index 59e84ab1d..1a974fd8c 100644
--- a/kexi/plugins/tables/kexitabledesigner_dataview.h
+++ b/kexi/plugins/tables/kexitabledesigner_dataview.h
@@ -26,9 +26,10 @@
class KexiTableDesigner_DataView : public KexiDataTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTableDesigner_DataView(KexiMainWindow *win, QWidget *parent);
+ KexiTableDesigner_DataView(KexiMainWindow *win, TQWidget *tqparent);
virtual ~KexiTableDesigner_DataView();
diff --git a/kexi/plugins/tables/kexitabledesignercommands.cpp b/kexi/plugins/tables/kexitabledesignercommands.cpp
index ccbb181ad..298363c49 100644
--- a/kexi/plugins/tables/kexitabledesignercommands.cpp
+++ b/kexi/plugins/tables/kexitabledesignercommands.cpp
@@ -16,12 +16,12 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qmetaobject.h>
+#include <tqdom.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
#include <klocale.h>
@@ -49,7 +49,7 @@ Command::~Command()
//--------------------------------------------------------
ChangeFieldPropertyCommand::ChangeFieldPropertyCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName, const QVariant& oldValue, const QVariant& newValue,
+ const KoProperty::Set& set, const TQCString& propertyName, const TQVariant& oldValue, const TQVariant& newValue,
KoProperty::Property::ListData* const oldListData, KoProperty::Property::ListData* const newListData)
: Command(view)
, m_alterTableAction(
@@ -69,27 +69,27 @@ ChangeFieldPropertyCommand::~ChangeFieldPropertyCommand()
delete m_listData;
}
-QString ChangeFieldPropertyCommand::name() const
+TQString ChangeFieldPropertyCommand::name() const
{
return i18n("Change \"%1\" property for table field from \"%2\" to \"%3\"")
- .arg(m_alterTableAction.propertyName()).arg(m_oldValue.toString())
- .arg(m_alterTableAction.newValue().toString());
+ .tqarg(m_alterTableAction.propertyName()).tqarg(m_oldValue.toString())
+ .tqarg(m_alterTableAction.newValue().toString());
}
-QString ChangeFieldPropertyCommand::debugString()
+TQString ChangeFieldPropertyCommand::debugString()
{
- QString s( name() );
+ TQString s( name() );
if (m_oldListData || m_listData)
- s += QString("\nAnd list data from [%1]\n to [%2]")
- .arg( m_oldListData ?
- QString("%1 -> %2")
- .arg(m_oldListData->keysAsStringList().join(",")).arg(m_oldListData->names.join(","))
- : QString("<NONE>"))
- .arg( m_listData ?
- QString("%1 -> %2")
- .arg(m_listData->keysAsStringList().join(",")).arg(m_listData->names.join(","))
- : QString("<NONE>"));
- return s + QString(" (UID=%1)").arg(m_alterTableAction.uid());
+ s += TQString("\nAnd list data from [%1]\n to [%2]")
+ .tqarg( m_oldListData ?
+ TQString("%1 -> %2")
+ .tqarg(m_oldListData->keysAsStringList().join(",")).tqarg(m_oldListData->names.join(","))
+ : TQString("<NONE>"))
+ .tqarg( m_listData ?
+ TQString("%1 -> %2")
+ .tqarg(m_listData->keysAsStringList().join(",")).tqarg(m_listData->names.join(","))
+ : TQString("<NONE>"));
+ return s + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
void ChangeFieldPropertyCommand::execute()
@@ -121,7 +121,7 @@ KexiDB::AlterTableHandler::ActionBase* ChangeFieldPropertyCommand::createAction(
RemoveFieldCommand::RemoveFieldCommand( KexiTableDesignerView* view, int fieldIndex,
const KoProperty::Set* set)
: Command(view)
- , m_alterTableAction( set ? (*set)["name"].value().toString() : QString::null,
+ , m_alterTableAction( set ? (*set)["name"].value().toString() : TQString(),
set ? (*set)["uid"].value().toInt() : -1 )
, m_set( set ? new KoProperty::Set(*set /*deep copy*/) : 0 )
, m_fieldIndex(fieldIndex)
@@ -133,12 +133,12 @@ RemoveFieldCommand::~RemoveFieldCommand()
delete m_set;
}
-QString RemoveFieldCommand::name() const
+TQString RemoveFieldCommand::name() const
{
if (m_set)
- return i18n("Remove table field \"%1\"").arg(m_alterTableAction.fieldName());
+ return i18n("Remove table field \"%1\"").tqarg(m_alterTableAction.fieldName());
- return QString("Remove empty row at position %1").arg(m_fieldIndex);
+ return TQString("Remove empty row at position %1").tqarg(m_fieldIndex);
}
void RemoveFieldCommand::execute()
@@ -154,14 +154,14 @@ void RemoveFieldCommand::unexecute()
m_view->insertField( m_fieldIndex, *m_set );
}
-QString RemoveFieldCommand::debugString()
+TQString RemoveFieldCommand::debugString()
{
if (!m_set)
return name();
- return name() + "\nAT ROW " + QString::number(m_fieldIndex)
+ return name() + "\nAT ROW " + TQString::number(m_fieldIndex)
+ ", FIELD: " + (*m_set)["caption"].value().toString()
- + QString(" (UID=%1)").arg(m_alterTableAction.uid());
+ + TQString(" (UID=%1)").tqarg(m_alterTableAction.uid());
}
KexiDB::AlterTableHandler::ActionBase* RemoveFieldCommand::createAction()
@@ -190,9 +190,9 @@ InsertFieldCommand::~InsertFieldCommand()
delete m_alterTableAction;
}
-QString InsertFieldCommand::name() const
+TQString InsertFieldCommand::name() const
{
- return i18n("Insert table field \"%1\"").arg(m_set["caption"].value().toString());
+ return i18n("Insert table field \"%1\"").tqarg(m_set["caption"].value().toString());
}
void InsertFieldCommand::execute()
@@ -213,7 +213,7 @@ KexiDB::AlterTableHandler::ActionBase* InsertFieldCommand::createAction()
//--------------------------------------------------------
ChangePropertyVisibilityCommand::ChangePropertyVisibilityCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName, bool visible)
+ const KoProperty::Set& set, const TQCString& propertyName, bool visible)
: Command(view)
, m_alterTableAction(set.property("name").value().toString(), propertyName, visible, set["uid"].value().toInt())
// , m_fieldUID(set["uid"].value().toInt())
@@ -226,12 +226,12 @@ ChangePropertyVisibilityCommand::~ChangePropertyVisibilityCommand()
{
}
-QString ChangePropertyVisibilityCommand::name() const
+TQString ChangePropertyVisibilityCommand::name() const
{
- return QString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"")
- .arg(m_alterTableAction.propertyName())
- .arg(m_oldVisibility ? "true" : "false")
- .arg(m_alterTableAction.newValue().toBool() ? "true" : "false");
+ return TQString("[internal] Change \"%1\" visibility from \"%2\" to \"%3\"")
+ .tqarg(m_alterTableAction.propertyName())
+ .tqarg(m_oldVisibility ? "true" : "false")
+ .tqarg(m_alterTableAction.newValue().toBool() ? "true" : "false");
}
void ChangePropertyVisibilityCommand::execute()
@@ -263,9 +263,9 @@ InsertEmptyRowCommand::~InsertEmptyRowCommand()
{
}
-QString InsertEmptyRowCommand::name() const
+TQString InsertEmptyRowCommand::name() const
{
- return QString("Insert empty row at position %1").arg(m_row);
+ return TQString("Insert empty row at position %1").tqarg(m_row);
}
void InsertEmptyRowCommand::execute()
diff --git a/kexi/plugins/tables/kexitabledesignercommands.h b/kexi/plugins/tables/kexitabledesignercommands.h
index 355aabe21..1e6225e31 100644
--- a/kexi/plugins/tables/kexitabledesignercommands.h
+++ b/kexi/plugins/tables/kexitabledesignercommands.h
@@ -20,12 +20,12 @@
#ifndef KEXITABLEDESIGNER_COMMANDS_H
#define KEXITABLEDESIGNER_COMMANDS_H
-#include <qmap.h>
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
-#include <qvariant.h>
-#include <qguardedptr.h>
+#include <tqmap.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
+#include <tqvariant.h>
+#include <tqguardedptr.h>
#include <kcommand.h>
#include <kexidb/alter.h>
@@ -33,11 +33,11 @@
#include "kexitabledesignerview.h"
-class QWidget;
-class QRect;
-class QPoint;
-class QStringList;
-class QCString;
+class TQWidget;
+class TQRect;
+class TQPoint;
+class TQStringList;
+class TQCString;
namespace KexiTableDesignerCommands {
@@ -52,10 +52,10 @@ class Command : public KCommand
//! Can return 0 if the action should not be passed to AlterTableHandler
virtual KexiDB::AlterTableHandler::ActionBase* createAction() { return 0; }
- virtual QString debugString() { return name(); }
+ virtual TQString debugString() { return name(); }
protected:
- QGuardedPtr<KexiTableDesignerView> m_view;
+ TQGuardedPtr<KexiTableDesignerView> m_view;
};
//! @short Undo/redo command used for when changing a property for a table field
@@ -70,21 +70,21 @@ class ChangeFieldPropertyCommand : public Command
on execute() and unexecute().
*/
ChangeFieldPropertyCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& oldValue, const QVariant& newValue,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& oldValue, const TQVariant& newValue,
KoProperty::Property::ListData* const oldListData = 0, KoProperty::Property::ListData* const newListData = 0);
virtual ~ChangeFieldPropertyCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString();
+ virtual TQString debugString();
protected:
KexiDB::AlterTableHandler::ChangeFieldPropertyAction m_alterTableAction;
- QVariant m_oldValue;
+ TQVariant m_oldValue;
// int m_fieldUID;
KoProperty::Property::ListData* m_oldListData, *m_listData;
};
@@ -100,12 +100,12 @@ class RemoveFieldCommand : public Command
virtual ~RemoveFieldCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString();
+ virtual TQString debugString();
protected:
KexiDB::AlterTableHandler::RemoveFieldAction m_alterTableAction;
@@ -121,13 +121,13 @@ class InsertFieldCommand : public Command
int fieldIndex/*, const KexiDB::Field& field*/, const KoProperty::Set& set );
virtual ~InsertFieldCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
virtual KexiDB::AlterTableHandler::ActionBase* createAction();
- virtual QString debugString() {
- return name() + "\nAT ROW " + QString::number(m_alterTableAction->index()) //m_alterTableAction.index())
+ virtual TQString debugString() {
+ return name() + "\nAT ROW " + TQString::number(m_alterTableAction->index()) //m_alterTableAction.index())
+ ", FIELD: " + m_set["caption"].value().toString(); //m_alterTableAction.field().debugString();
}
@@ -150,12 +150,12 @@ class ChangePropertyVisibilityCommand : public Command
(it's invalid but allowed in design time).
*/
ChangePropertyVisibilityCommand( KexiTableDesignerView* view,
- const KoProperty::Set& set, const QCString& propertyName,
+ const KoProperty::Set& set, const TQCString& propertyName,
bool visible);
virtual ~ChangePropertyVisibilityCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
@@ -174,7 +174,7 @@ class InsertEmptyRowCommand : public Command
InsertEmptyRowCommand( KexiTableDesignerView* view, int row );
virtual ~InsertEmptyRowCommand();
- virtual QString name() const;
+ virtual TQString name() const;
virtual void execute();
virtual void unexecute();
diff --git a/kexi/plugins/tables/kexitabledesignerview.cpp b/kexi/plugins/tables/kexitabledesignerview.cpp
index 7e3478ed4..a612453a8 100644
--- a/kexi/plugins/tables/kexitabledesignerview.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview.cpp
@@ -22,9 +22,9 @@
#include "kexilookupcolumnpage.h"
#include "kexitabledesignercommands.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -65,47 +65,47 @@
using namespace KexiTableDesignerCommands;
-//! @internal Used in tryCastQVariant() anf canCastQVariant()
-static bool isIntegerQVariant(QVariant::Type t)
+//! @internal Used in tryCastTQVariant() anf canCastTQVariant()
+static bool isIntegerTQVariant(TQVariant::Type t)
{
- return t==QVariant::LongLong
- || t==QVariant::ULongLong
- || t==QVariant::Int
- || t==QVariant::UInt;
+ return t==TQVariant::LongLong
+ || t==TQVariant::ULongLong
+ || t==TQVariant::Int
+ || t==TQVariant::UInt;
}
-//! @internal Used in tryCastQVariant()
-static bool canCastQVariant(QVariant::Type fromType, QVariant::Type toType)
+//! @internal Used in tryCastTQVariant()
+static bool canCastTQVariant(TQVariant::Type fromType, TQVariant::Type toType)
{
- return (fromType==QVariant::Int && toType==QVariant::UInt)
- || (fromType==QVariant::CString && toType==QVariant::String)
- || (fromType==QVariant::LongLong && toType==QVariant::ULongLong)
- || ((fromType==QVariant::String || fromType==QVariant::CString)
- && (isIntegerQVariant(toType) || toType==QVariant::Double));
+ return (fromType==TQVariant::Int && toType==TQVariant::UInt)
+ || (fromType==TQVariant::CString && toType==TQVariant::String)
+ || (fromType==TQVariant::LongLong && toType==TQVariant::ULongLong)
+ || ((fromType==TQVariant::String || fromType==TQVariant::CString)
+ && (isIntegerTQVariant(toType) || toType==TQVariant::Double));
}
/*! @internal
\return a variant value converted from \a fromVal to \a toType type.
- Null QVariant is returned if \a fromVal's type and \a toType type
+ Null TQVariant is returned if \a fromVal's type and \a toType type
are incompatible. */
-static QVariant tryCastQVariant( const QVariant& fromVal, QVariant::Type toType )
+static TQVariant tryCastTQVariant( const TQVariant& fromVal, TQVariant::Type toType )
{
- const QVariant::Type fromType = fromVal.type();
+ const TQVariant::Type fromType = fromVal.type();
if (fromType == toType)
return fromVal;
- if (canCastQVariant(fromType, toType) || canCastQVariant(toType, fromType)
- || (isIntegerQVariant(fromType) && toType==QVariant::Double))
+ if (canCastTQVariant(fromType, toType) || canCastTQVariant(toType, fromType)
+ || (isIntegerTQVariant(fromType) && toType==TQVariant::Double))
{
- QVariant res( fromVal );
+ TQVariant res( fromVal );
if (res.cast(toType))
return res;
}
- return QVariant();
+ return TQVariant();
}
-KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *parent)
- : KexiDataTable(win, parent, "KexiTableDesignerView", false/*not db-aware*/)
+KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent)
+ : KexiDataTable(win, tqparent, "KexiTableDesignerView", false/*not db-aware*/)
, KexiTableDesignerInterface()
, d( new KexiTableDesignerViewPrivate(this) )
{
@@ -120,7 +120,7 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
d->data->setReadOnly(true);
d->data->setInsertingEnabled( false );
- KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, QString::null,
+ KexiTableViewColumn *col = new KexiTableViewColumn("pk", KexiDB::Field::Text, TQString(),
i18n("Additional information about the field"));
col->setIcon( KexiUtils::colorizeIconToTextColor( SmallIcon("info"), d->view->palette() ) );
col->setHeaderTextVisible(false);
@@ -142,15 +142,15 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
#ifdef KEXI_NO_BLOB_FIELDS
//! @todo remove this later
- QValueVector<QString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB)
+ TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup-1); //don't show last type (BLOB)
#else
- QValueVector<QString> types(KexiDB::Field::LastTypeGroup);
+ TQValueVector<TQString> types(KexiDB::Field::LastTypeGroup);
#endif
d->maxTypeNameTextWidth = 0;
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
for (uint i=1; i<=types.count(); i++) {
types[i-1] = KexiDB::Field::typeGroupName(i);
- d->maxTypeNameTextWidth = QMAX(d->maxTypeNameTextWidth, fm.width(types[i-1]));
+ d->maxTypeNameTextWidth = TQMAX(d->maxTypeNameTextWidth, fm.width(types[i-1]));
}
col->field()->setEnumHints(types);
@@ -159,46 +159,46 @@ KexiTableDesignerView::KexiTableDesignerView(KexiMainWindow *win, QWidget *paren
d->view->setSpreadSheetMode();
- connect(d->data, SIGNAL(aboutToChangeCell(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)),
- this, SLOT(slotBeforeCellChanged(KexiTableItem*,int,QVariant&,KexiDB::ResultInfo*)));
- connect(d->data, SIGNAL(rowUpdated(KexiTableItem*)),
- this, SLOT(slotRowUpdated(KexiTableItem*)));
- //connect(d->data, SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)),
- // this, SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)));
- connect(d->data, SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
- this, SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
+ connect(d->data, TQT_SIGNAL(aboutToChangeCell(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotBeforeCellChanged(KexiTableItem*,int,TQVariant&,KexiDB::ResultInfo*)));
+ connect(d->data, TQT_SIGNAL(rowUpdated(KexiTableItem*)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotRowUpdated(KexiTableItem*)));
+ //connect(d->data, TQT_SIGNAL(aboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)),
+ // TQT_TQOBJECT(this), TQT_SLOT(slotAboutToInsertRow(KexiTableItem*,KexiDB::ResultInfo*,bool)));
+ connect(d->data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
- setMinimumSize(d->view->minimumSizeHint().width(), d->view->minimumSizeHint().height());
+ setMinimumSize(d->view->tqminimumSizeHint().width(), d->view->tqminimumSizeHint().height());
d->view->setFocus();
d->sets = new KexiDataAwarePropertySet( this, d->view );
- connect(d->sets, SIGNAL(rowDeleted()), this, SLOT(updateActions()));
- connect(d->sets, SIGNAL(rowInserted()), this, SLOT(slotRowInserted()));
+ connect(d->sets, TQT_SIGNAL(rowDeleted()), TQT_TQOBJECT(this), TQT_SLOT(updateActions()));
+ connect(d->sets, TQT_SIGNAL(rowInserted()), TQT_TQOBJECT(this), TQT_SLOT(slotRowInserted()));
d->contextMenuTitle = new KPopupTitle(d->view->contextMenu());
d->view->contextMenu()->insertItem(d->contextMenuTitle, -1, 0);
- connect(d->view->contextMenu(), SIGNAL(aboutToShow()), this, SLOT(slotAboutToShowContextMenu()));
+ connect(d->view->contextMenu(), TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotAboutToShowContextMenu()));
- plugSharedAction("tablepart_toggle_pkey", this, SLOT(slotTogglePrimaryKey()));
+ plugSharedAction("tablepart_toggle_pkey", TQT_TQOBJECT(this), TQT_SLOT(slotTogglePrimaryKey()));
d->action_toggle_pkey = static_cast<KToggleAction*>( sharedAction("tablepart_toggle_pkey") );
d->action_toggle_pkey->plug(d->view->contextMenu(), 1); //add at the beginning
d->view->contextMenu()->insertSeparator(2);
setAvailable("tablepart_toggle_pkey", !conn->isReadOnly());
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
- plugSharedAction("edit_undo", this, SLOT(slotUndo()));
- plugSharedAction("edit_redo", this, SLOT(slotRedo()));
+ plugSharedAction("edit_undo", TQT_TQOBJECT(this), TQT_SLOT(slotUndo()));
+ plugSharedAction("edit_redo", TQT_TQOBJECT(this), TQT_SLOT(slotRedo()));
setAvailable("edit_undo", false);
setAvailable("edit_redo", false);
- connect(d->history, SIGNAL(commandExecuted(KCommand*)), this, SLOT(slotCommandExecuted(KCommand*)));
+ connect(d->history, TQT_SIGNAL(commandExecuted(KCommand*)), TQT_TQOBJECT(this), TQT_SLOT(slotCommandExecuted(KCommand*)));
#endif
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString::null); //to create the tab
+ KexiUtils::addAlterTableActionDebug(TQString()); //to create the tab
KexiUtils::connectPushButtonActionForDebugWindow(
- "simulateAlterTableExecution", this, SLOT(slotSimulateAlterTableExecution()));
+ "simulateAlterTableExecution", TQT_TQOBJECT(this), TQT_SLOT(slotSimulateAlterTableExecution()));
KexiUtils::connectPushButtonActionForDebugWindow(
- "executeRealAlterTable", this, SLOT(executeRealAlterTable()));
+ "executeRealAlterTable", TQT_TQOBJECT(this), TQT_SLOT(executeRealAlterTable()));
#endif
}
@@ -284,7 +284,7 @@ void KexiTableDesignerView::initData()
//! Gets subtype strings and names for type \a fieldType
void
KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup,
- QStringList& stringsList, QStringList& namesList)
+ TQStringList& stringsList, TQStringList& namesList)
{
/* disabled - "mime" is moved from subType to "objectType" custom property
if (fieldTypeGroup==KexiDB::Field::BLOBGroup) {
@@ -304,12 +304,12 @@ KexiTableDesignerView::getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGrou
KoProperty::Set *
KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, bool newOne )
{
- QString typeName = "KexiDB::Field::" + field.typeGroupString();
+ TQString typeName = "KexiDB::Field::" + field.typeGroupString();
KoProperty::Set *set = new KoProperty::Set(d->sets, typeName);
if (mainWin()->project()->dbConnection()->isReadOnly())
set->setReadOnly( true );
-// connect(buff,SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)),
-// this, SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&)));
+// connect(buff,TQT_SIGNAL(propertyChanged(KexiPropertyBuffer&,KexiProperty&)),
+// TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KexiPropertyBuffer&,KexiProperty&)));
KoProperty::Property *prop;
@@ -325,58 +325,58 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
));
prop->setVisible(false);
set->addProperty(prop = new KoProperty::Property("this:useCaptionAsObjectName",
- QVariant(true, 1), QString::null)); //we want "caption" to be displayed in the header, not name
+ TQVariant(true, 1), TQString())); //we want "caption" to be displayed in the header, not name
prop->setVisible(false);
//name
set->addProperty(prop
- = new KoProperty::Property("name", QVariant(field.name()), i18n("Name"),
- QString::null, KexiCustomPropertyFactory::Identifier) );
+ = new KoProperty::Property("name", TQVariant(field.name()), i18n("Name"),
+ TQString(), KexiCustomPropertyFactory::Identifier) );
//type
set->addProperty( prop
- = new KoProperty::Property("type", QVariant(field.type()), i18n("Type")) );
+ = new KoProperty::Property("type", TQVariant(field.type()), i18n("Type")) );
#ifndef KexiTableDesignerView_DEBUG
prop->setVisible(false);//always hidden
#endif
//subtype
- QStringList typeStringList, typeNameList;
+ TQStringList typeStringList, typeNameList;
getSubTypeListData(field.typeGroup(), typeStringList, typeNameList);
/* disabled - "mime" is moved from subType to "objectType" custom property
- QString subTypeValue;
+ TQString subTypeValue;
if (field.typeGroup()==KexiDB::Field::BLOBGroup) {
// special case: BLOB type uses "mime-based" subtypes
//! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes
subTypeValue = slist.first();
}
else {*/
- QString subTypeValue = field.typeString();
+ TQString subTypeValue = field.typeString();
//}
set->addProperty(prop = new KoProperty::Property("subType",
typeStringList, typeNameList, subTypeValue, i18n("Subtype")));
// objectType
- QStringList objectTypeStringList, objectTypeNameList;
+ TQStringList objectTypeStringList, objectTypeNameList;
//! @todo this should be retrieved from KexiDB::Field when BLOB supports many different mimetypes
objectTypeStringList << "image";
objectTypeNameList << i18n("Image object type", "Image");
- QString objectTypeValue( field.customProperty("objectType").toString() );
+ TQString objectTypeValue( field.customProperty("objectType").toString() );
if (objectTypeValue.isEmpty())
objectTypeValue = DEFAULT_OBJECT_TYPE_VALUE;
set->addProperty(prop = new KoProperty::Property("objectType",
objectTypeStringList, objectTypeNameList, objectTypeValue, i18n("Subtype")/*todo other i18n string?*/));
set->addProperty( prop
- = new KoProperty::Property("caption", QVariant(field.caption()), i18n("Caption") ) );
+ = new KoProperty::Property("caption", TQVariant(field.caption()), i18n("Caption") ) );
prop->setVisible(false);//always hidden
set->addProperty( prop
- = new KoProperty::Property("description", QVariant(field.description())) );
+ = new KoProperty::Property("description", TQVariant(field.description())) );
prop->setVisible(false);//always hidden
set->addProperty(prop
- = new KoProperty::Property("unsigned", QVariant(field.isUnsigned(), 4), i18n("Unsigned Number")));
+ = new KoProperty::Property("unsigned", TQVariant(field.isUnsigned(), 4), i18n("Unsigned Number")));
set->addProperty( prop
= new KoProperty::Property("length", (int)field.length()/*200?*/, i18n("Length")));
@@ -400,40 +400,40 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
set->addProperty( prop
= new KoProperty::Property("defaultValue", field.defaultValue(), i18n("Default Value"),
- QString::null,
+ TQString(),
//! @todo use "Variant" type here when supported by KoProperty
(KoProperty::PropertyType)field.variantType()) );
prop->setOption("3rdState", i18n("None"));
// prop->setVisible(false);
set->addProperty( prop
- = new KoProperty::Property("primaryKey", QVariant(field.isPrimaryKey(), 4), i18n("Primary Key")));
+ = new KoProperty::Property("primaryKey", TQVariant(field.isPrimaryKey(), 4), i18n("Primary Key")));
prop->setIcon("key");
set->addProperty( prop
- = new KoProperty::Property("unique", QVariant(field.isUniqueKey(), 4), i18n("Unique")));
+ = new KoProperty::Property("unique", TQVariant(field.isUniqueKey(), 4), i18n("Unique")));
set->addProperty( prop
- = new KoProperty::Property("notNull", QVariant(field.isNotNull(), 4), i18n("Required")));
+ = new KoProperty::Property("notNull", TQVariant(field.isNotNull(), 4), i18n("Required")));
set->addProperty( prop
- = new KoProperty::Property("allowEmpty", QVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize")));
+ = new KoProperty::Property("allowEmpty", TQVariant(!field.isNotEmpty(), 4), i18n("Allow Zero\nSize")));
set->addProperty( prop
- = new KoProperty::Property("autoIncrement", QVariant(field.isAutoIncrement(), 4), i18n("Autonumber")));
+ = new KoProperty::Property("autoIncrement", TQVariant(field.isAutoIncrement(), 4), i18n("Autonumber")));
prop->setIcon("autonumber");
set->addProperty( prop
- = new KoProperty::Property("indexed", QVariant(field.isIndexed(), 4), i18n("Indexed")));
+ = new KoProperty::Property("indexed", TQVariant(field.isIndexed(), 4), i18n("Indexed")));
//- properties related to lookup columns (used and set by the "lookup column" tab in the property pane)
KexiDB::LookupFieldSchema *lookupFieldSchema = field.table() ? field.table()->lookupFieldSchema(field) : 0;
set->addProperty( prop = new KoProperty::Property("rowSource",
- lookupFieldSchema ? lookupFieldSchema->rowSource().name() : QString::null, i18n("Row Source")));
+ lookupFieldSchema ? lookupFieldSchema->rowSource().name() : TQString(), i18n("Row Source")));
prop->setVisible(false);
set->addProperty( prop = new KoProperty::Property("rowSourceType",
- lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : QString::null, i18n("Row Source\nType")));
+ lookupFieldSchema ? lookupFieldSchema->rowSource().typeName() : TQString(), i18n("Row Source\nType")));
prop->setVisible(false);
set->addProperty( prop
@@ -456,8 +456,8 @@ KexiTableDesignerView::createPropertySet( int row, const KexiDB::Field& field, b
//----
d->updatePropertiesVisibility(field.type(), *set);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
- this, SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotPropertyChanged(KoProperty::Set&, KoProperty::Property&)));
d->sets->insert(row, set, newOne);
return set;
@@ -491,15 +491,15 @@ void KexiTableDesignerView::slotTogglePrimaryKey()
return;
KoProperty::Set &set = *propertySet();
bool isSet = !set["primaryKey"].value().toBool();
- set.changeProperty("primaryKey", QVariant(isSet,1)); //this will update all related properties as well
+ set.changeProperty("primaryKey", TQVariant(isSet,1)); //this will update all related properties as well
/* CommandGroup *setPrimaryKeyCommand;
if (isSet) {
setPrimaryKeyCommand = new CommandGroup(i18n("Set primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
}
else {
setPrimaryKeyCommand = new CommandGroup(i18n("Unset primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
}
switchPrimaryKey(set, isSet, false, setPrimaryKeyCommand);*/
//addHistoryCommand( setPrimaryKeyCommand, false /* !execute */ );
@@ -510,17 +510,17 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet,
bool set, bool aWasPKey, CommandGroup* commandGroup)
{
const bool was_pkey = aWasPKey || propertySet["primaryKey"].value().toBool();
-// propertySet["primaryKey"] = QVariant(set, 1);
- d->setPropertyValueIfNeeded( propertySet, "primaryKey", QVariant(set,1), commandGroup );
+// propertySet["primaryKey"] = TQVariant(set, 1);
+ d->setPropertyValueIfNeeded( propertySet, "primaryKey", TQVariant(set,1), commandGroup );
if (&propertySet==this->propertySet()) {
//update action and icon @ column 0 (only if we're changing current property set)
d->action_toggle_pkey->setChecked(set);
if (d->view->selectedItem()) {
//show key in the table
- d->view->data()->clearRowEditBuffer();
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON,
- QVariant(set ? "key" : ""));
- d->view->data()->saveRowChanges(*d->view->selectedItem(), true);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_ICON,
+ TQVariant(set ? "key" : ""));
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true);
}
if (was_pkey || set) //change flag only if we're setting pk or really clearing it
d->primaryKeyExists = set;
@@ -537,31 +537,31 @@ void KexiTableDesignerView::switchPrimaryKey(KoProperty::Set &propertySet,
break;
}
if (i<count) {//remove
- //(*s)["autoIncrement"] = QVariant(false, 0);
- d->setPropertyValueIfNeeded( *s, "autoIncrement", QVariant(false,0), commandGroup );
- //(*s)["primaryKey"] = QVariant(false, 0);
- d->setPropertyValueIfNeeded( *s, "primaryKey", QVariant(false,0), commandGroup );
+ //(*s)["autoIncrement"] = TQVariant(false, 0);
+ d->setPropertyValueIfNeeded( *s, "autoIncrement", TQVariant(false,0), commandGroup );
+ //(*s)["primaryKey"] = TQVariant(false, 0);
+ d->setPropertyValueIfNeeded( *s, "primaryKey", TQVariant(false,0), commandGroup );
//remove key from table
- d->view->data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
KexiTableItem *item = d->view->itemAt(i);
if (item) {
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->saveRowChanges(*item, true);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true);
}
}
//set unsigned big-integer type
-// d->view->data()->saveRowChanges(*d->view->selectedItem());
+// d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem());
d->slotBeforeCellChanged_enabled = false;
- d->view->data()->clearRowEditBuffer();
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
- QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
-// QVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup)));
- d->view->data()->saveRowChanges(*d->view->selectedItem(), true);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
+ TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
+// TQVariant(KexiDB::Field::typeGroupName(KexiDB::Field::IntegerGroup)));
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true);
//propertySet["subType"] = KexiDB::Field::typeString(KexiDB::Field::BigInteger);
d->setPropertyValueIfNeeded( propertySet, "subType", KexiDB::Field::typeString(KexiDB::Field::BigInteger),
commandGroup );
- //propertySet["unsigned"] = QVariant(true,4);
- d->setPropertyValueIfNeeded( propertySet, "unsigned", QVariant(true,4), commandGroup );
+ //propertySet["unsigned"] = TQVariant(true,4);
+ d->setPropertyValueIfNeeded( propertySet, "unsigned", TQVariant(true,4), commandGroup );
/*todo*/
d->slotBeforeCellChanged_enabled = true;
}
@@ -588,13 +588,13 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore)
else */
tristate res = true;
if (mode==Kexi::DataViewMode) {
- if (!dirty() && parentDialog()->neverSaved()) {
+ if (!dirty() && tqparentDialog()->neverSaved()) {
KMessageBox::sorry(this, i18n("Cannot switch to data view, because table design is empty.\n"
"First, please create your design.") );
return cancelled;
}
//<temporary>
- else if (dirty() && !parentDialog()->neverSaved()) {
+ else if (dirty() && !tqparentDialog()->neverSaved()) {
// cancelled = (KMessageBox::No == KMessageBox::questionYesNo(this, i18n("Saving changes for existing table design is not yet supported.\nDo you want to discard your changes now?")));
// KexiDB::Connection *conn = mainWin()->project()->dbConnection();
@@ -602,8 +602,8 @@ tristate KexiTableDesignerView::beforeSwitchTo(int mode, bool &dontStore)
int r = KMessageBox::warningYesNoCancel(this,
i18n("Saving changes for existing table design is now required.")
+ "\n" + d->messageForSavingChanges(emptyTable, /* skip warning? */!isPhysicalAlteringNeeded()),
- QString::null,
- KStdGuiItem::save(), KStdGuiItem::discard(), QString::null,
+ TQString(),
+ KStdGuiItem::save(), KStdGuiItem::discard(), TQString(),
KMessageBox::Notify|KMessageBox::Dangerous);
if (r == KMessageBox::Cancel)
res = cancelled;
@@ -655,7 +655,7 @@ void KexiTableDesignerView::removeCurrentPropertySet()
*/
void KexiTableDesignerView::slotBeforeCellChanged(
- KexiTableItem *item, int colnum, QVariant& newValue, KexiDB::ResultInfo* /*result*/)
+ KexiTableItem *item, int colnum, TQVariant& newValue, KexiDB::ResultInfo* /*result*/)
{
if (!d->slotBeforeCellChanged_enabled)
return;
@@ -666,14 +666,14 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//if 'type' is not filled yet
if (item->at(COLUMN_ID_TYPE).isNull()) {
//auto select 1st row of 'type' column
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant((int)0));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant((int)0));
}
KoProperty::Set *propertySetForItem = d->sets->findPropertySetForItem(*item);
if (propertySetForItem) {
d->addHistoryCommand_in_slotPropertyChanged_enabled = false; //because we'll add the two changes as one KMacroCommand
- QString oldName( propertySetForItem->property("name").value().toString() );
- QString oldCaption( propertySetForItem->property("caption").value().toString() );
+ TQString oldName( propertySetForItem->property("name").value().toString() );
+ TQString oldCaption( propertySetForItem->property("caption").value().toString() );
//we need to create the action now as set["name"] will be changed soon..
ChangeFieldPropertyCommand *changeCaptionCommand
@@ -687,8 +687,8 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//remember this action containing 2 subactions
CommandGroup *changeCaptionAndNameCommand = new CommandGroup(
i18n("Change \"%1\" field's name to \"%2\" and caption from \"%3\" to \"%4\"")
- .arg(oldName).arg(propertySetForItem->property("name").value().toString())
- .arg(oldCaption).arg(newValue.toString() ));
+ .tqarg(oldName).tqarg(propertySetForItem->property("name").value().toString())
+ .tqarg(oldCaption).tqarg(newValue.toString() ));
changeCaptionAndNameCommand->addCommand( changeCaptionCommand );
// new ChangeFieldPropertyCommand( this, *propertySetForItem,
// "caption", oldCaption, newValue)
@@ -706,9 +706,9 @@ void KexiTableDesignerView::slotBeforeCellChanged(
if (newValue.isNull()) {
//'type' col will be cleared: clear all other columns as well
d->slotBeforeCellChanged_enabled = false;
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, QVariant(QString::null));
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, QVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, TQVariant(TQString()));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, TQVariant());
d->slotBeforeCellChanged_enabled = true;
return;
}
@@ -741,10 +741,10 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// set["subType"] = KexiDB::Field::typeName(fieldType);
//-get subtypes for this type: keys (slist) and names (nlist)
- QStringList slist, nlist;
+ TQStringList slist, nlist;
getSubTypeListData(fieldTypeGroup, slist, nlist);
- QString subTypeValue;
+ TQString subTypeValue;
/* disabled - "mime" is moved from subType to "objectType" custom property
if (fieldType==KexiDB::Field::BLOB) {
// special case: BLOB type uses "mime-based" subtypes
@@ -759,7 +759,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// *** this action contains subactions ***
CommandGroup *changeDataTypeCommand = new CommandGroup(
i18n("Change data type for field \"%1\" to \"%2\"")
- .arg(set["name"].value().toString()).arg( KexiDB::Field::typeName( fieldType ) ) );
+ .tqarg(set["name"].value().toString()).tqarg( KexiDB::Field::typeName( fieldType ) ) );
//kexipluginsdbg << "++++++++++" << slist << nlist << endl;
@@ -780,9 +780,9 @@ void KexiTableDesignerView::slotBeforeCellChanged(
// notNull and defaultValue=false is reasonable for boolean type
if (fieldType == KexiDB::Field::Boolean) {
//! @todo maybe this is good for other data types as well?
- d->setPropertyValueIfNeeded( set, "notNull", QVariant(true, 1), changeDataTypeCommand,
+ d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true, 1), changeDataTypeCommand,
false /*!forceAddCommand*/, false /*!rememberOldValue*/);
- d->setPropertyValueIfNeeded( set, "defaultValue", QVariant(false, 1), changeDataTypeCommand,
+ d->setPropertyValueIfNeeded( set, "defaultValue", TQVariant(false, 1), changeDataTypeCommand,
false /*!forceAddCommand*/, false /*!rememberOldValue*/);
}
@@ -797,10 +797,10 @@ void KexiTableDesignerView::slotBeforeCellChanged(
//primary keys require big int, so if selected type is not integer- remove PK
if (fieldTypeGroup != KexiDB::Field::IntegerGroup) {
/*not needed, line below will do the work
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_ICON, QVariant());
- d->view->data()->saveRowChanges(*item); */
- //set["primaryKey"] = QVariant(false, 1);
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false, 1), changeDataTypeCommand );
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_ICON, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item); */
+ //set["primaryKey"] = TQVariant(false, 1);
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false, 1), changeDataTypeCommand );
//! @todo should we display (passive?) dialog informing about cleared pkey?
}
}
@@ -822,7 +822,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
if (!propertySetForItem)
return;
//update field desc.
- QVariant oldValue((*propertySetForItem)["description"].value());
+ TQVariant oldValue((*propertySetForItem)["description"].value());
kexipluginsdbg << oldValue << endl;
propertySetForItem->changeProperty("description", newValue);
/*moved addHistoryCommand(
@@ -833,7 +833,7 @@ void KexiTableDesignerView::slotBeforeCellChanged(
void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
{
- const int row = d->view->data()->findRef(item);
+ const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(item);
if (row < 0)
return;
@@ -841,7 +841,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
//-check if the row was empty before updating
//if yes: we want to add a property set for this new row (field)
- QString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() );
+ TQString fieldCaption( item->at(COLUMN_ID_CAPTION).toString() );
const bool prop_set_allowed = !item->at(COLUMN_ID_TYPE).isNull();
if (!prop_set_allowed && d->sets->at(row)/*propertySet()*/) {
@@ -849,10 +849,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
d->sets->remove( row ); //d->sets->removeCurrentPropertySet();
//clear 'type' column:
- d->view->data()->clearRowEditBuffer();
-// d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, QVariant());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant());
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+// d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant());
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
} else if (prop_set_allowed && !d->sets->at(row)/*propertySet()*/) {
//-- create a new field:
@@ -862,10 +862,10 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
if (intFieldType==0)
return;
- QString description( item->at(COLUMN_ID_DESC).toString() );
+ TQString description( item->at(COLUMN_ID_DESC).toString() );
//todo: check uniqueness:
- QString fieldName( KexiUtils::string2Identifier(fieldCaption) );
+ TQString fieldName( KexiUtils::string2Identifier(fieldCaption) );
KexiDB::Field::Type fieldType = KexiDB::intToFieldType( intFieldType );
KexiDB::Field field( //tmp
@@ -875,7 +875,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
KexiDB::Field::NoOptions,
/*length*/0,
/*precision*/0,
- /*defaultValue*/QVariant(),
+ /*defaultValue*/TQVariant(),
fieldCaption,
description,
/*width*/0);
@@ -884,7 +884,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
// reasonable case for boolean type: set notNull flag and "false" as default value
if (fieldType == KexiDB::Field::Boolean) {
field.setNotNull( true );
- field.setDefaultValue( QVariant(false, 0) );
+ field.setDefaultValue( TQVariant(false, 0) );
}
kexipluginsdbg << "KexiTableDesignerView::slotRowUpdated(): " << field.debugString() << endl;
@@ -894,7 +894,7 @@ void KexiTableDesignerView::slotRowUpdated(KexiTableItem *item)
//moved
//add a special property indicating that this is brand new buffer,
//not just changed
-// KoProperty::Property* prop = new KoProperty::Property("newrow", QVariant());
+// KoProperty::Property* prop = new KoProperty::Property("newrow", TQVariant());
// prop->setVisible(false);
// newbuff->addProperty( prop );
@@ -922,7 +922,7 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
{
// if (!d->slotPropertyChanged_enabled)
// return;
- const QCString pname = property.name();
+ const TQCString pname = property.name();
kexipluginsdbg << "KexiTableDesignerView::slotPropertyChanged(): " << pname << " = " << property.value()
<< " (oldvalue = " << property.oldValue() << ")" << endl;
@@ -951,11 +951,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
CommandGroup *toplevelCommand = 0;
if (pname=="autoIncrement" && property.value().toBool()==true) {
if (set["primaryKey"].value().toBool()==false) {//we need PKEY here!
- QString msg = QString("<p>")
+ TQString msg = TQString("<p>")
+i18n("Setting autonumber requires primary key to be set for current field.")+"</p>";
if (d->primaryKeyExists)
- msg += (QString("<p>")+ i18n("Previous primary key will be removed.")+"</p>");
- msg += (QString("<p>")
+ msg += (TQString("<p>")+ i18n("Previous primary key will be removed.")+"</p>");
+ msg += (TQString("<p>")
+i18n("Do you want to create primary key for current field? "
"Click \"Cancel\" to cancel setting autonumber.")+"</p>");
@@ -968,17 +968,17 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//switchPrimaryKey(set, true);
// this will be toplevel command
setAutonumberCommand = new CommandGroup(
- i18n("Assign autonumber for field \"%1\"").arg(set["name"].value().toString()) );
+ i18n("Assign autonumber for field \"%1\"").tqarg(set["name"].value().toString()) );
toplevelCommand = setAutonumberCommand;
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setAutonumberCommand );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setAutonumberCommand );
}
else {
setAutonumberCommand = new CommandGroup(
- i18n("Remove autonumber from field \"%1\"").arg(set["name"].value().toString()) );
+ i18n("Remove autonumber from field \"%1\"").tqarg(set["name"].value().toString()) );
//d->slotPropertyChanged_enabled = false;
-// set["autoIncrement"].setValue( QVariant(false,1), false/*don't save old*/);
+// set["autoIncrement"].setValue( TQVariant(false,1), false/*don't save old*/);
// d->slotPropertyChanged_enabled = true;
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setAutonumberCommand,
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setAutonumberCommand,
true /*forceAddCommand*/, false/*rememberOldValue*/ );
addHistoryCommand( setAutonumberCommand, false /* !execute */ );
return;
@@ -995,12 +995,12 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
setPrimaryKey = false;
// this will be toplevel command
CommandGroup *unsetIndexedOrUniquOrNotNullCommand = new CommandGroup(
- i18n("Set \"%1\" property for field \"%2\"").arg(property.caption()).arg(set["name"].value().toString()) );
+ i18n("Set \"%1\" property for field \"%2\"").tqarg(property.caption()).tqarg(set["name"].value().toString()) );
toplevelCommand = unsetIndexedOrUniquOrNotNullCommand;
- d->setPropertyValueIfNeeded( set, pname, QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
+ d->setPropertyValueIfNeeded( set, pname, TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
if (pname=="notNull") {
-//? d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), unsetIndexedOrUniquOrNotNullCommand );
- d->setPropertyValueIfNeeded( set, "unique", QVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
+//? d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), unsetIndexedOrUniquOrNotNullCommand );
+ d->setPropertyValueIfNeeded( set, "unique", TQVariant(false,1), unsetIndexedOrUniquOrNotNullCommand );
}
}
@@ -1021,11 +1021,11 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
}
KexiDB::Field::Type type = KexiDB::intToFieldType( set["type"].value().toInt() );
- QString typeName;
+ TQString typeName;
/* disabled - "mime" is moved from subType to "objectType" custom property
if (type==KexiDB::Field::BLOB) { //special case
//find i18n'd text
- QStringList stringsList, namesList;
+ TQStringList stringsList, namesList;
getSubTypeListData(KexiDB::Field::BLOBGroup, stringsList, namesList);
const int stringIndex = stringsList.findIndex( property.value().toString() );
if (-1 == stringIndex || stringIndex>=(int)namesList.count())
@@ -1040,8 +1040,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
// kdDebug() << set["type"].value() << endl;
// if (KexiDB::Field::typeGroup( set["type"].value().toInt() ) == (int)KexiDB::Field::TextGroup) {
CommandGroup* changeFieldTypeCommand = new CommandGroup(
- i18n("Change type for field \"%1\" to \"%2\"").arg(set["name"].value().toString())
- .arg(typeName) );
+ i18n("Change type for field \"%1\" to \"%2\"").tqarg(set["name"].value().toString())
+ .tqarg(typeName) );
d->setPropertyValueIfNeeded( set, "subType", property.value(), property.oldValue(),
changeFieldTypeCommand );
@@ -1050,8 +1050,8 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
set["type"].setValue( newType );
// cast "defaultValue" property value to a new type
- QVariant oldDefVal( set["defaultValue"].value() );
- QVariant newDefVal( tryCastQVariant(oldDefVal, KexiDB::Field::variantType(type)) );
+ TQVariant oldDefVal( set["defaultValue"].value() );
+ TQVariant newDefVal( tryCastTQVariant(oldDefVal, KexiDB::Field::variantType(type)) );
if (oldDefVal.type()!=newDefVal.type())
set["defaultValue"].setType( newDefVal.type() );
d->setPropertyValueIfNeeded( set, "defaultValue", newDefVal, newDefVal,
@@ -1085,25 +1085,25 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//this action contains subactions
CommandGroup *setPrimaryKeyCommand = new CommandGroup(
i18n("Set primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
if (toplevelCommand)
toplevelCommand->addCommand( setPrimaryKeyCommand );
else
toplevelCommand = setPrimaryKeyCommand;
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
- d->setPropertyValueIfNeeded( set, "unique", QVariant(true,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "notNull", QVariant(true,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "allowEmpty", QVariant(false,1), setPrimaryKeyCommand );
- d->setPropertyValueIfNeeded( set, "indexed", QVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(true,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
+ d->setPropertyValueIfNeeded( set, "unique", TQVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "notNull", TQVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "allowEmpty", TQVariant(false,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "indexed", TQVariant(true,1), setPrimaryKeyCommand );
//! \todo: add setting for this: "Integer PKeys have autonumber set by default"
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(true,1), setPrimaryKeyCommand );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(true,1), setPrimaryKeyCommand );
-/* set["unique"] = QVariant(true,1);
- set["notNull"] = QVariant(true,1);
- set["allowEmpty"] = QVariant(false,1);
- set["indexed"] = QVariant(true,1);
- set["autoIncrement"] = QVariant(true,1);*/
+/* set["unique"] = TQVariant(true,1);
+ set["notNull"] = TQVariant(true,1);
+ set["allowEmpty"] = TQVariant(false,1);
+ set["indexed"] = TQVariant(true,1);
+ set["autoIncrement"] = TQVariant(true,1);*/
// d->addHistoryCommand_in_slotPropertyChanged_enabled = prev_addHistoryCommand_in_slotPropertyChanged_enabled;
//down addHistoryCommand( toplevelCommand, false /* !execute */ );
}
@@ -1111,15 +1111,15 @@ void KexiTableDesignerView::slotPropertyChanged(KoProperty::Set& set, KoProperty
//remember this action containing 2 subactions
CommandGroup *setPrimaryKeyCommand = new CommandGroup(
i18n("Unset primary key for field \"%1\"")
- .arg(set["name"].value().toString()) );
+ .tqarg(set["name"].value().toString()) );
if (toplevelCommand)
toplevelCommand->addCommand( setPrimaryKeyCommand );
else
toplevelCommand = setPrimaryKeyCommand;
- d->setPropertyValueIfNeeded( set, "primaryKey", QVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
- d->setPropertyValueIfNeeded( set, "autoIncrement", QVariant(false,1), setPrimaryKeyCommand );
-// set["autoIncrement"] = QVariant(false,1);
+ d->setPropertyValueIfNeeded( set, "primaryKey", TQVariant(false,1), setPrimaryKeyCommand, true /*forceAddCommand*/ );
+ d->setPropertyValueIfNeeded( set, "autoIncrement", TQVariant(false,1), setPrimaryKeyCommand );
+// set["autoIncrement"] = TQVariant(false,1);
//down addHistoryCommand( toplevelCommand, false /* !execute */ );
}
@@ -1147,15 +1147,15 @@ void KexiTableDesignerView::slotRowInserted()
}
void KexiTableDesignerView::slotAboutToDeleteRow(
- KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
+ KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
{
Q_UNUSED(result)
- Q_UNUSED(repaint)
+ Q_UNUSED(tqrepaint)
if (item[COLUMN_ID_ICON].toString()=="key")
d->primaryKeyExists = false;
if (d->addHistoryCommand_in_slotAboutToDeleteRow_enabled) {
- const int row = d->view->data()->findRef(&item);
+ const int row = d->view->KexiDataAwareObjectInterface::data()->tqfindRef(&item);
KoProperty::Set *set = row >=0 ? d->sets->at(row) : 0;
//set can be 0 here, what means "removing empty row"
addHistoryCommand(
@@ -1169,17 +1169,17 @@ KexiDB::Field * KexiTableDesignerView::buildField( const KoProperty::Set &set )
{
//create a map of property values
kexipluginsdbg << set["type"].value() << endl;
- QMap<QCString, QVariant> values = KoProperty::propertyValues(set);
+ TQMap<TQCString, TQVariant> values = KoProperty::propertyValues(set);
//remove internal values, to avoid creating custom field's properties
- QMap<QCString, QVariant>::Iterator it = values.begin();
+ TQMap<TQCString, TQVariant>::Iterator it = values.begin();
KexiDB::Field *field = new KexiDB::Field();
while (it!=values.end()) {
- const QString propName( it.key() );
- if (d->internalPropertyNames.find(propName.latin1()) || propName.startsWith("this:")
+ const TQString propName( it.key() );
+ if (d->internalPropertyNames.tqfind(propName.latin1()) || propName.startsWith("this:")
|| (/*sanity*/propName=="objectType" && KexiDB::Field::BLOB != KexiDB::intToFieldType( set["type"].value().toInt() )))
{
- QMap<QCString, QVariant>::Iterator it_tmp = it;
+ TQMap<TQCString, TQVariant>::Iterator it_tmp = it;
++it;
values.remove(it_tmp);
}
@@ -1213,8 +1213,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
"for creating relations between database tables. "
"Do you want to add primary key automatically now?</p>"
"<p>If you want to add a primary key by hand, press \"Cancel\" "
- "to cancel saving table design.</p>").arg(schema.name()),
- QString::null, KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(),
+ "to cancel saving table design.</p>").tqarg(schema.name()),
+ TQString(), KGuiItem(i18n("&Add Primary Key"), "key"), KStdGuiItem::no(),
"autogeneratePrimaryKeysOnTableDesignSaving");
if (questionRes==KMessageBox::Cancel) {
return cancelled;
@@ -1223,15 +1223,15 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
//-find unique name, starting with, "id", "id2", ....
int i=0;
int idIndex = 1; //means "id"
- QString pkFieldName("id%1");
- QString pkFieldCaption(i18n("Identifier%1", "Id%1"));
+ TQString pkFieldName("id%1");
+ TQString pkFieldCaption(i18n("Identifier%1", "Id%1"));
while (i<(int)d->sets->size()) {
KoProperty::Set *set = d->sets->at(i);
if (set) {
if ((*set)["name"].value().toString()
- == pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex))
+ == pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex))
|| (*set)["caption"].value().toString()
- == pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex)))
+ == pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex)))
{
//try next id index
i = 0;
@@ -1241,16 +1241,16 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
}
i++;
}
- pkFieldName = pkFieldName.arg(idIndex==1?QString::null : QString::number(idIndex));
- pkFieldCaption = pkFieldCaption.arg(idIndex==1?QString::null : QString::number(idIndex));
+ pkFieldName = pkFieldName.tqarg(idIndex==1?TQString() : TQString::number(idIndex));
+ pkFieldCaption = pkFieldCaption.tqarg(idIndex==1?TQString() : TQString::number(idIndex));
//ok, add PK with such unique name
d->view->insertEmptyRow(0);
d->view->setCursorPosition(0, COLUMN_ID_CAPTION);
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION,
- QVariant(pkFieldCaption));
- d->view->data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
- QVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
- if (!d->view->data()->saveRowChanges(*d->view->selectedItem(), true)) {
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_CAPTION,
+ TQVariant(pkFieldCaption));
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(d->view->selectedItem(), COLUMN_ID_TYPE,
+ TQVariant(KexiDB::Field::IntegerGroup-1/*counting from 0*/));
+ if (!d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*d->view->selectedItem(), true)) {
return cancelled;
}
slotTogglePrimaryKey();
@@ -1262,18 +1262,18 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
KoProperty::Set *b = 0;
bool no_fields = true;
int i;
- QDict<char> names(101, false);
+ TQDict<char> names(101, false);
char dummy;
for (i=0;i<(int)d->sets->size();i++) {
b = d->sets->at(i);
if (b) {
no_fields = false;
- const QString name = (*b)["name"].value().toString();
+ const TQString name = (*b)["name"].value().toString();
if (name.isEmpty()) {
if (beSilent) {
kexipluginswarn <<
- QString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...")
- .arg(i+1) << endl;
+ TQString("KexiTableDesignerView::buildSchema(): no field caption entered at row %1...")
+ .tqarg(i+1) << endl;
}
else {
d->view->setCursorPosition(i, COLUMN_ID_CAPTION);
@@ -1303,8 +1303,8 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
if (res == true && b && i<(int)d->sets->size()) {//found a duplicate
if (beSilent) {
kexipluginswarn <<
- QString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'")
- .arg((*b)["name"].value().toString()) << endl;
+ TQString("KexiTableDesignerView::buildSchema(): duplicated field name '%1'")
+ .tqarg((*b)["name"].value().toString()) << endl;
}
else {
d->view->setCursorPosition(i, COLUMN_ID_CAPTION);
@@ -1313,7 +1313,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
KMessageBox::sorry(this,
i18n("You have added \"%1\" field name twice.\nField names cannot be repeated. "
"Correct name of the field.")
- .arg((*b)["name"].value().toString()) );
+ .tqarg((*b)["name"].value().toString()) );
}
res = cancelled;
}
@@ -1336,7 +1336,7 @@ tristate KexiTableDesignerView::buildSchema(KexiDB::TableSchema &schema, bool be
//! @todo this is backward-compatible code for "single visible column" implementation
//! for multiple columns, only the first is displayed, so there is a data loss is GUI is used
//! -- special koproperty editor needed
- QValueList<uint> visibleColumns;
+ TQValueList<uint> visibleColumns;
const int visibleColumn = (*s)["visibleColumn"].value().toInt();
if (visibleColumn >= 0)
visibleColumns.append( (uint)visibleColumn );
@@ -1360,7 +1360,7 @@ static void copyAlterTableActions(KCommand* command, KexiDB::AlterTableHandler::
{
CommandGroup* cmdGroup = dynamic_cast<CommandGroup*>( command );
if (cmdGroup) {//command group: flatten it
- for (QPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it)
+ for (TQPtrListIterator<KCommand> it(cmdGroup->commands()); it.current(); ++it)
copyAlterTableActions(it.current(), actions);
return;
}
@@ -1380,7 +1380,7 @@ tristate KexiTableDesignerView::buildAlterTableActions(KexiDB::AlterTableHandler
actions.clear();
kexipluginsdbg << "KexiTableDesignerView::buildAlterTableActions(): " << d->history->commands().count()
<< " top-level command(s) to process..." << endl;
- for (QPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) {
+ for (TQPtrListIterator<KCommand> it(d->history->commands()); it.current(); ++it) {
copyAlterTableActions(it.current(), actions);
}
return true;
@@ -1406,7 +1406,7 @@ KexiDB::SchemaData* KexiTableDesignerView::storeNewData(const KexiDB::SchemaData
KexiDB::Connection *conn = mainWin()->project()->dbConnection();
res = conn->createTable(tempData()->table);
if (res!=true)
- parentDialog()->setStatus(conn, "");
+ tqparentDialog()->settqStatus(conn, "");
}
if (res == true) {
@@ -1457,7 +1457,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
this, *conn, *tempData()->table,
i18n("You are about to change the design of table \"%1\" "
"but following objects using this table are opened:")
- .arg(tempData()->table->name()));
+ .tqarg(tempData()->table->name()));
}
if (res == true) {
@@ -1468,7 +1468,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
// - inform about removing the current table and ask for confirmation
if (!d->dontAskOnStoreData && !dontAsk) {
bool emptyTable;
- const QString msg = d->messageForSavingChanges(emptyTable);
+ const TQString msg = d->messageForSavingChanges(emptyTable);
if (!emptyTable) {
if (KMessageBox::No == KMessageBox::questionYesNo(this, msg))
res = cancelled;
@@ -1489,7 +1489,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
res = conn->alterTable(*tempData()->table, *newTable);
if (res != true)
- parentDialog()->setStatus(conn, "");
+ tqparentDialog()->settqStatus(conn, "");
}
else {
KexiDB::AlterTableHandler::ExecutionArguments args;
@@ -1499,7 +1499,7 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
<< res.toString() << endl;
if (true != res) {
alterTableHandler->debugError();
- parentDialog()->setStatus(alterTableHandler, "");
+ tqparentDialog()->settqStatus(alterTableHandler, "");
}
}
}
@@ -1517,11 +1517,11 @@ tristate KexiTableDesignerView::storeData(bool dontAsk)
return res;
}
-tristate KexiTableDesignerView::simulateAlterTableExecution(QString *debugTarget)
+tristate KexiTableDesignerView::simulateAlterTableExecution(TQString *debugTarget)
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- if (mainWin()->activeWindow() != parentDialog()) //to avoid executing for multiple alter table views
+ if (mainWin()->activeWindow() != tqparentDialog()) //to avoid executing for multiple alter table views
return false;
if (!tempData()->table || !m_dialog->schemaData())
return false;
@@ -1555,8 +1555,8 @@ void KexiTableDesignerView::slotSimulateAlterTableExecution()
tristate KexiTableDesignerView::executeRealAlterTable()
{
- QSignal signal;
- signal.connect( mainWin(), SLOT(slotProjectSave()) );
+ TQSignal signal;
+ signal.connect( mainWin(), TQT_SLOT(slotProjectSave()) );
d->tempStoreDataUsingRealAlterTable = true;
d->recentResultOfStoreData = false;
signal.activate(); //will call KexiMainWindowImpl::slotProjectSaveAs() and thus storeData()
@@ -1566,7 +1566,7 @@ tristate KexiTableDesignerView::executeRealAlterTable()
KexiTablePart::TempData* KexiTableDesignerView::tempData() const
{
- return static_cast<KexiTablePart::TempData*>(parentDialog()->tempData());
+ return static_cast<KexiTablePart::TempData*>(tqparentDialog()->tempData());
}
/*void KexiTableDesignerView::slotAboutToUpdateRow(
@@ -1575,8 +1575,8 @@ KexiTablePart::TempData* KexiTableDesignerView::tempData() const
KexiDB::RowEditBuffer::SimpleMap map = buffer->simpleBuffer();
buffer->debug();
- QVariant old_type = item->at(1);
- QVariant *buf_type = buffer->at( d->view->field(1)->name() );
+ TQVariant old_type = item->at(1);
+ TQVariant *buf_type = buffer->at( d->view->field(1)->name() );
//check if there is a type specified
// if ((old_type.isNull() && !buf_type) || (buf_type && buf_type->isNull())) {
@@ -1595,7 +1595,7 @@ void KexiTableDesignerView::debugCommand( KCommand* command, int nestingLevel )
KexiUtils::addAlterTableActionDebug(command->name(), nestingLevel);
//show subcommands
if (dynamic_cast<CommandGroup*>(command)) {
- for (QPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) {
+ for (TQPtrListIterator<KCommand> it(dynamic_cast<CommandGroup*>(command)->commands()); it.current(); ++it) {
debugCommand(it.current(), nestingLevel + 1);
}
}
@@ -1625,7 +1625,7 @@ void KexiTableDesignerView::slotUndo()
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("UNDO:"));
+ KexiUtils::addAlterTableActionDebug(TQString("UNDO:"));
# endif
d->history->undo();
updateUndoRedoActions();
@@ -1636,7 +1636,7 @@ void KexiTableDesignerView::slotRedo()
{
#ifndef KEXI_NO_UNDOREDO_ALTERTABLE
# ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("REDO:"));
+ KexiUtils::addAlterTableActionDebug(TQString("REDO:"));
# endif
d->history->redo();
updateUndoRedoActions();
@@ -1655,25 +1655,25 @@ void KexiTableDesignerView::slotAboutToShowContextMenu()
//update title
if (propertySet()) {
const KoProperty::Set &set = *propertySet();
- QString captionOrName(set["caption"].value().toString());
+ TQString captionOrName(set["caption"].value().toString());
if (captionOrName.isEmpty())
captionOrName = set["name"].value().toString();
//! @todo show "field" icon
- d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").arg(captionOrName) );
+ d->contextMenuTitle->setTitle( i18n("Table field \"%1\"").tqarg(captionOrName) );
}
else {
d->contextMenuTitle->setTitle( i18n("Empty table row", "Empty Row") );
}
}
-QString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result)
+TQString KexiTableDesignerView::debugStringForCurrentTableSchema(tristate& result)
{
KexiDB::TableSchema tempTable;
//copy schema data
static_cast<KexiDB::SchemaData&>(tempTable) = static_cast<KexiDB::SchemaData&>(*tempData()->table);
result = buildSchema(tempTable, true /*beSilent*/);
if (true!=result)
- return QString::null;
+ return TQString();
return tempTable.debugString(false /*without name*/);
}
@@ -1689,35 +1689,35 @@ void KexiTableDesignerView::clearRow(int row, bool addCommand)
//remove from prop. set
d->sets->remove( row );
//clear row in table view (just clear value in COLUMN_ID_TYPE column)
-// for (int i=0; i < (int)d->view->data()->columnsCount(); i++) {
+// for (int i=0; i < (int)d->view->KexiDataAwareObjectInterface::data()->columnsCount(); i++) {
if (!addCommand) {
d->addHistoryCommand_in_slotRowUpdated_enabled = false;
d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, QVariant());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE, TQVariant());
if (!addCommand) {
d->addHistoryCommand_in_slotRowUpdated_enabled = true;
d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
d->slotBeforeCellChanged_enabled = true;
}
- d->view->data()->saveRowChanges(*item, true);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item, true);
}
-void KexiTableDesignerView::insertField(int row, const QString& caption, bool addCommand)
+void KexiTableDesignerView::insertField(int row, const TQString& caption, bool addCommand)
{
insertFieldInternal(row, 0, caption, addCommand);
}
void KexiTableDesignerView::insertField(int row, KoProperty::Set& set, bool addCommand)
{
- insertFieldInternal(row, &set, QString::null, addCommand);
+ insertFieldInternal(row, &set, TQString(), addCommand);
}
void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, //const KexiDB::Field& field,
- const QString& caption, bool addCommand)
+ const TQString& caption, bool addCommand)
{
- if (set && (!set->contains("type") || !set->contains("caption"))) {
+ if (set && (!set->tqcontains("type") || !set->tqcontains("caption"))) {
kexipluginswarn << "KexiTableDesignerView::insertField(): no 'type' or 'caption' property in set!" << endl;
return;
}
@@ -1731,19 +1731,19 @@ void KexiTableDesignerView::insertFieldInternal(int row, KoProperty::Set* set, /
d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION,
- set ? (*set)["caption"].value() : QVariant(caption));//field.caption());
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION,
+ set ? (*set)["caption"].value() : TQVariant(caption));//field.caption());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
set ? (int)KexiDB::Field::typeGroup( (*set)["type"].value().toInt() )-1/*counting from 0*/
: (((int)KexiDB::Field::TextGroup)-1)/*default type, counting from 0*/
);
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC,
- set ? (*set)["description"].value() : QVariant());//field.description());
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC,
+ set ? (*set)["description"].value() : TQVariant());//field.description());
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
//this will create a new property set:
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
if (set) {
KoProperty::Set *newSet = d->sets->at(row);
if (newSet) {
@@ -1775,7 +1775,7 @@ void KexiTableDesignerView::insertEmptyRow( int row, bool addCommand )
/*void KexiTableDesignerView::deleteRow( int row )
{
d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = false;
- d->view->deleteItem( d->view->data()->at(row) );
+ d->view->deleteItem( d->view->KexiDataAwareObjectInterface::data()->at(row) );
d->addHistoryCommand_in_slotAboutToDeleteRow_enabled = true;
}*/
@@ -1796,18 +1796,18 @@ void KexiTableDesignerView::deleteRow( int row, bool addCommand )
}
void KexiTableDesignerView::changeFieldPropertyForRow( int row,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand )
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** changeFieldProperty: \"")
- + QString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/);
+ KexiUtils::addAlterTableActionDebug(TQString("** changeFieldProperty: \"")
+ + TQString(propertyName) + "\" to \"" + newValue.toString() + "\"", 2/*nestingLevel*/);
#endif
if (!d->view->acceptRowEdit())
return;
KoProperty::Set* set = d->sets->at( row );
- if (!set || !set->contains(propertyName))
+ if (!set || !set->tqcontains(propertyName))
return;
KoProperty::Property &property = set->property(propertyName);
if (listData) {
@@ -1825,9 +1825,9 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
// d->addHistoryCommand_in_slotRowUpdated_enabled = false;
// d->addHistoryCommand_in_slotPropertyChanged_enabled = false;
d->slotPropertyChanged_subType_enabled = false;
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_TYPE,
int( KexiDB::Field::typeGroup( newValue.toInt() ) )-1);
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
d->addHistoryCommand_in_slotRowUpdated_enabled = true;
// d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
// d->slotPropertyChanged_subType_enabled = true;
@@ -1844,8 +1844,8 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
if (!addCommand) {
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue);
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_CAPTION, newValue);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
@@ -1854,11 +1854,11 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
if (!addCommand) {
d->slotBeforeCellChanged_enabled = false;
}
- d->view->data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue);
+ d->view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(item, COLUMN_ID_DESC, newValue);
if (!addCommand) {
d->slotBeforeCellChanged_enabled = true;
}
- d->view->data()->saveRowChanges(*item);
+ d->view->KexiDataAwareObjectInterface::data()->saveRowChanges(*item);
}
if (!addCommand) {
d->addHistoryCommand_in_slotPropertyChanged_enabled = true;
@@ -1869,7 +1869,7 @@ void KexiTableDesignerView::changeFieldPropertyForRow( int row,
}
void KexiTableDesignerView::changeFieldProperty( int fieldUID,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand )
{
//find a property by UID
@@ -1882,11 +1882,11 @@ void KexiTableDesignerView::changeFieldProperty( int fieldUID,
}
void KexiTableDesignerView::changePropertyVisibility(
- int fieldUID, const QCString& propertyName, bool visible )
+ int fieldUID, const TQCString& propertyName, bool visible )
{
#ifdef KEXI_DEBUG_GUI
- KexiUtils::addAlterTableActionDebug(QString("** changePropertyVisibility: \"")
- + QString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/);
+ KexiUtils::addAlterTableActionDebug(TQString("** changePropertyVisibility: \"")
+ + TQString(propertyName) + "\" to \"" + (visible ? "true" : "false") + "\"", 2/*nestingLevel*/);
#endif
if (!d->view->acceptRowEdit())
return;
@@ -1896,7 +1896,7 @@ void KexiTableDesignerView::changePropertyVisibility(
if (row<0)
return;
KoProperty::Set* set = d->sets->at( row );
- if (!set || !set->contains(propertyName))
+ if (!set || !set->tqcontains(propertyName))
return;
KoProperty::Property &property = set->property(propertyName);
@@ -1910,10 +1910,10 @@ void KexiTableDesignerView::propertySetSwitched()
{
KexiDataTable::propertySetSwitched();
- //if (parentDialog()!=parentDialog()->mainWin()->currentDialog())
+ //if (tqparentDialog()!=tqparentDialog()->mainWin()->currentDialog())
// return; //this is not the current dialog's view
- static_cast<KexiTablePart*>(parentDialog()->part())->lookupColumnPage()
+ static_cast<KexiTablePart*>(tqparentDialog()->part())->lookupColumnPage()
->assignPropertySet(propertySet());
}
diff --git a/kexi/plugins/tables/kexitabledesignerview.h b/kexi/plugins/tables/kexitabledesignerview.h
index 773163b61..b7ff7a234 100644
--- a/kexi/plugins/tables/kexitabledesignerview.h
+++ b/kexi/plugins/tables/kexitabledesignerview.h
@@ -56,10 +56,11 @@ namespace KoProperty {
class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates a new alter table dialog. */
- KexiTableDesignerView(KexiMainWindow *win, QWidget *parent);
+ KexiTableDesignerView(KexiMainWindow *win, TQWidget *tqparent);
virtual ~KexiTableDesignerView();
@@ -72,7 +73,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
/*! Inserts a new field with \a caption for \a row.
Property set is also created. */
- virtual void insertField(int row, const QString& caption, bool addCommand = false);
+ virtual void insertField(int row, const TQString& caption, bool addCommand = false);
/*! Inserts a new \a field for \a row.
Property set is also created. \a set will be deeply-copied into the new set.
@@ -97,29 +98,29 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
If \a listData is not NULL and not empty, a deep copy of it is passed to Property::setListData().
If \a listData \a nlist if not NULL but empty, Property::setListData(0) is called. */
virtual void changeFieldPropertyForRow( int row,
- const QCString& propertyName, const QVariant& newValue,
+ const TQCString& propertyName, const TQVariant& newValue,
KoProperty::Property::ListData* const listData, bool addCommand );
/*! Changes property \a propertyName to \a newValue.
Works exactly like changeFieldPropertyForRow() except the field is pointed by \a fieldUID.
Used by ChangeFieldPropertyCommand to change field's property. */
- void changeFieldProperty( int fieldUID, const QCString& propertyName,
- const QVariant& newValue, KoProperty::Property::ListData* const listData = 0,
+ void changeFieldProperty( int fieldUID, const TQCString& propertyName,
+ const TQVariant& newValue, KoProperty::Property::ListData* const listData = 0,
bool addCommand = false );
/*! Changes visibility of property \a propertyName to \a visible for a field pointed by \a fieldUID.
Used by ChangePropertyVisibilityCommand. */
- void changePropertyVisibility( int fieldUID, const QCString& propertyName, bool visible );
+ void changePropertyVisibility( int fieldUID, const TQCString& propertyName, bool visible );
/*! Builds table field's schema by looking at the \a set. */
KexiDB::Field * buildField( const KoProperty::Set &set ) const;
/*! Creates temporary table for the current design and returns debug string for it. */
- virtual QString debugStringForCurrentTableSchema(tristate& result);
+ virtual TQString debugStringForCurrentTableSchema(tristate& result);
/*! Simulates execution of alter table, and puts debug into \a debugTarget.
A case when debugTarget is not 0 is true for the alter table test suite. */
- virtual tristate simulateAlterTableExecution(QString *debugTarget);
+ virtual tristate simulateAlterTableExecution(TQString *debugTarget);
public slots:
/*! Real execution of the Alter Table. For debugging of the real alter table.
@@ -138,17 +139,17 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
//! Called before cell change in tableview.
void slotBeforeCellChanged(KexiTableItem *item, int colnum,
- QVariant& newValue, KexiDB::ResultInfo* result);
+ TQVariant& newValue, KexiDB::ResultInfo* result);
//! Called on row change in a tableview.
void slotRowUpdated(KexiTableItem *item);
//! Called before row inserting in tableview.
void slotRowInserted();
-// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool repaint);
+// void slotAboutToInsertRow(KexiTableItem* item, KexiDB::ResultInfo* result, bool tqrepaint);
//! Called before row deleting in tableview.
- void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint);
+ void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint);
/*! Called after any property has been changed in the current property set,
to perform some actions (like updating other dependent properties) */
@@ -218,13 +219,13 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
Assigns primary key icon and value for property set \a propertySet,
and deselects it from previous pkey's row.
\a aWasPKey is internal.
- If \a commandGroup is not 0, it is used as parent group for storing actions' history. */
+ If \a commandGroup is not 0, it is used as tqparent group for storing actions' history. */
void switchPrimaryKey(KoProperty::Set &propertySet, bool set, bool aWasPKey = false,
CommandGroup* commandGroup = 0);
//! Gets subtype strings and names for type \a fieldType.
void getSubTypeListData(KexiDB::Field::TypeGroup fieldTypeGroup,
- QStringList& stringsList, QStringList& namesList);
+ TQStringList& stringsList, TQStringList& namesList);
/*! Adds history command \a command to the undo/redo buffer.
If \a execute is true, the command is executed afterwards. */
@@ -240,7 +241,7 @@ class KexiTableDesignerView : public KexiDataTable, public KexiTableDesignerInte
/*! Inserts a new \a field for \a row.
Property set is also created. If \a set is not 0 (the default),
it will be copied into the new set. Used by insertField(). */
- void insertFieldInternal(int row, KoProperty::Set* set, const QString& caption, bool addCommand);
+ void insertFieldInternal(int row, KoProperty::Set* set, const TQString& caption, bool addCommand);
//! Reimplemented to pass the information also to the "Lookup" tab
virtual void propertySetSwitched();
diff --git a/kexi/plugins/tables/kexitabledesignerview_p.cpp b/kexi/plugins/tables/kexitabledesignerview_p.cpp
index 56ef997d4..cf98b6837 100644
--- a/kexi/plugins/tables/kexitabledesignerview_p.cpp
+++ b/kexi/plugins/tables/kexitabledesignerview_p.cpp
@@ -20,9 +20,9 @@
#include "kexitabledesignerview_p.h"
#include "kexitabledesignerview.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qsplitter.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
#include <kiconloader.h>
#include <kdebug.h>
@@ -109,7 +109,7 @@ KexiTableDesignerViewPrivate::KexiTableDesignerViewPrivate(KexiTableDesignerView
, slotBeforeCellChanged_enabled(true)
, tempStoreDataUsingRealAlterTable(false)
{
- historyActionCollection = new KActionCollection((QWidget*)0,"");
+ historyActionCollection = new KActionCollection((TQWidget*)0,"");
history = new CommandHistory(historyActionCollection, true);
internalPropertyNames.insert("subType",(char*)1);
@@ -133,10 +133,10 @@ int KexiTableDesignerViewPrivate::generateUniqueId()
}
void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup,
bool forceAddCommand, bool rememberOldValue,
- QStringList* const slist, QStringList* const nlist)
+ TQStringList* const slist, TQStringList* const nlist)
{
KoProperty::Property& property = set[propertyName];
@@ -173,13 +173,13 @@ void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
}
void KexiTableDesignerViewPrivate::setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, CommandGroup* commandGroup,
bool forceAddCommand, bool rememberOldValue,
- QStringList* const slist, QStringList* const nlist)
+ TQStringList* const slist, TQStringList* const nlist)
{
KoProperty::Property& property = set[propertyName];
- QVariant oldValue( property.value() );
+ TQVariant oldValue( property.value() );
setPropertyValueIfNeeded( set, propertyName, newValue, property.value(),
commandGroup, forceAddCommand, rememberOldValue, slist, nlist);
}
@@ -269,26 +269,26 @@ bool KexiTableDesignerViewPrivate::updatePropertiesVisibility(KexiDB::Field::Typ
return changed;
}
-QString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning)
+TQString KexiTableDesignerViewPrivate::messageForSavingChanges(bool &emptyTable, bool skipWarning)
{
KexiDB::Connection *conn = designerView->mainWin()->project()->dbConnection();
bool ok;
emptyTable = conn->isEmpty( *designerView->tempData()->table, ok ) && ok;
return i18n("Do you want to save the design now?")
- + ( (emptyTable || skipWarning) ? QString::null :
- (QString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design",
- designerView->parentDialog())) );
+ + ( (emptyTable || skipWarning) ? TQString() :
+ (TQString("\n\n") + designerView->part()->i18nMessage(":additional message before saving design",
+ designerView->tqparentDialog())) );
}
void KexiTableDesignerViewPrivate::updateIconForItem(KexiTableItem &item, KoProperty::Set& set)
{
- QVariant icon;
+ TQVariant icon;
if (!set["rowSource"].value().toString().isEmpty() && !set["rowSourceType"].value().toString().isEmpty())
icon = "combo";
//show/hide icon in the table
- view->data()->clearRowEditBuffer();
- view->data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon);
- view->data()->saveRowChanges(item, true);
+ view->KexiDataAwareObjectInterface::data()->clearRowEditBuffer();
+ view->KexiDataAwareObjectInterface::data()->updateRowEditBuffer(&item, COLUMN_ID_ICON, icon);
+ view->KexiDataAwareObjectInterface::data()->saveRowChanges(item, true);
}
#include "kexitabledesignerview_p.moc"
diff --git a/kexi/plugins/tables/kexitabledesignerview_p.h b/kexi/plugins/tables/kexitabledesignerview_p.h
index f5650e74c..8f647548e 100644
--- a/kexi/plugins/tables/kexitabledesignerview_p.h
+++ b/kexi/plugins/tables/kexitabledesignerview_p.h
@@ -37,11 +37,11 @@ class KexiDataAwarePropertySet;
class CommandGroup : public KMacroCommand
{
public:
- CommandGroup( const QString & name )
+ CommandGroup( const TQString & name )
: KMacroCommand(name)
{}
virtual ~CommandGroup() {}
- const QPtrList<KCommand>& commands() const { return m_commands; }
+ const TQPtrList<KCommand>& commands() const { return m_commands; }
};
/*! @internal
@@ -50,10 +50,11 @@ class CommandGroup : public KMacroCommand
class CommandHistory : public KCommandHistory
{
Q_OBJECT
+ TQ_OBJECT
public:
CommandHistory(KActionCollection *actionCollection, bool withMenus = true);
- const QPtrList<KCommand>& commands() const { return m_commandsToUndo; }
+ const TQPtrList<KCommand>& commands() const { return m_commandsToUndo; }
void addCommand(KCommand *command, bool execute = true);
@@ -64,7 +65,7 @@ class CommandHistory : public KCommandHistory
virtual void redo();
protected:
- QPtrList<KCommand> m_commandsToUndo, m_commandsToRedo;
+ TQPtrList<KCommand> m_commandsToUndo, m_commandsToRedo;
};
//----------------------------------------------
@@ -96,17 +97,17 @@ class KexiTableDesignerViewPrivate
addHistoryCommand_in_slotPropertyChanged_enabled is then set back to the original state.
*/
- void setPropertyValueIfNeeded( const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, CommandGroup* commandGroup,
+ void setPropertyValueIfNeeded( const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, CommandGroup* commandGroup,
bool forceAddCommand = false, bool rememberOldValue = true,
- QStringList* const slist = 0, QStringList* const nlist = 0);
+ TQStringList* const slist = 0, TQStringList* const nlist = 0);
/*! Like above but allows to specify \a oldValue. */
void setPropertyValueIfNeeded(
- const KoProperty::Set& set, const QCString& propertyName,
- const QVariant& newValue, const QVariant& oldValue, CommandGroup* commandGroup,
+ const KoProperty::Set& set, const TQCString& propertyName,
+ const TQVariant& newValue, const TQVariant& oldValue, CommandGroup* commandGroup,
bool forceAddCommand = false, bool rememberOldValue = true,
- QStringList* const slist = 0, QStringList* const nlist = 0);
+ TQStringList* const slist = 0, TQStringList* const nlist = 0);
/*! @internal
Used in updatePropertiesVisibility().
@@ -123,7 +124,7 @@ class KexiTableDesignerViewPrivate
\a emptyTable is set to true if the table designed contains no rows.
If \a skipWarning is true, no warning about data loss is appended (useful when
only non-physical altering actions will be performed). */
- QString messageForSavingChanges(bool &emptyTable, bool skipWarning = false);
+ TQString messageForSavingChanges(bool &emptyTable, bool skipWarning = false);
/*! Updates icon in the first column, depending on property set \a set.
For example, when "rowSource" and "rowSourceType" propertiesa are not empty,
@@ -185,7 +186,7 @@ class KexiTableDesignerViewPrivate
//! A cache used in KexiTableDesignerView::buildField() to quickly identify
//! properties internal to the designer
- QAsciiDict<char> internalPropertyNames;
+ TQAsciiDict<char> internalPropertyNames;
};
#endif
diff --git a/kexi/plugins/tables/kexitablepart.cpp b/kexi/plugins/tables/kexitablepart.cpp
index 3d09a81ed..1ee3d0492 100644
--- a/kexi/plugins/tables/kexitablepart.cpp
+++ b/kexi/plugins/tables/kexitablepart.cpp
@@ -51,11 +51,11 @@ class KexiTablePart::Private
{
delete static_cast<KexiLookupColumnPage*>(lookupColumnPage);
}
- QGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
+ TQGuardedPtr<KexiLookupColumnPage> lookupColumnPage;
};
-KexiTablePart::KexiTablePart(QObject *parent, const char *name, const QStringList &l)
- : KexiPart::Part(parent, name, l)
+KexiTablePart::KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &l)
+ : KexiPart::Part(tqparent, name, l)
, d(new Private())
{
// REGISTERED ID:
@@ -93,11 +93,11 @@ void KexiTablePart::initInstanceActions()
KexiDialogTempData* KexiTablePart::createTempData(KexiDialogBase* dialog)
{
- return new KexiTablePart::TempData(dialog);
+ return new KexiTablePart::TempData(TQT_TQOBJECT(dialog));
}
-KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode, QMap<QString,QString>*)
+KexiViewBase* KexiTablePart::createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode, TQMap<TQString,TQString>*)
{
KexiMainWindow *win = dialog->mainWin();
if (!win || !win->project() || !win->project()->dbConnection())
@@ -111,7 +111,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
}
if (viewMode == Kexi::DesignViewMode) {
- KexiTableDesignerView *t = new KexiTableDesignerView(win, parent);
+ KexiTableDesignerView *t = new KexiTableDesignerView(win, tqparent);
return t;
}
else if (viewMode == Kexi::DataViewMode) {
@@ -119,7 +119,7 @@ KexiViewBase* KexiTablePart::createView(QWidget *parent, KexiDialogBase* dialog,
return 0; //todo: message
//we're not setting table schema here -it will be forced to set
// in KexiTableDesigner_DataView::afterSwitchFrom()
- KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, parent);
+ KexiTableDesigner_DataView *t = new KexiTableDesigner_DataView(win, tqparent);
return t;
}
return 0;
@@ -137,7 +137,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
tristate res = KexiTablePart::askForClosingObjectsUsingTableSchema(
win, *conn, *sch,
i18n("You are about to remove table \"%1\" but following objects using this table are opened:")
- .arg(sch->name()));
+ .tqarg(sch->name()));
return true == conn->dropTable( sch );
}
//last chance: just remove item
@@ -145,7 +145,7 @@ bool KexiTablePart::remove(KexiMainWindow *win, KexiPart::Item &item)
}
tristate KexiTablePart::rename(KexiMainWindow *win, KexiPart::Item & item,
- const QString& newName)
+ const TQString& newName)
{
//TODO: what about objects (queries/forms) that use old name?
KexiDB::Connection *conn = win->project()->dbConnection();
@@ -171,24 +171,24 @@ KexiTablePart::dataSource()
}
#endif
-tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, KexiDB::Connection& conn,
- KexiDB::TableSchema& table, const QString& msg)
+tristate KexiTablePart::askForClosingObjectsUsingTableSchema(TQWidget *tqparent, KexiDB::Connection& conn,
+ KexiDB::TableSchema& table, const TQString& msg)
{
- QPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
+ TQPtrList<KexiDB::Connection::TableSchemaChangeListenerInterface>* listeners
= conn.tableSchemaChangeListeners(table);
if (!listeners || listeners->isEmpty())
return true;
- QString openedObjectsStr = "<ul>";
- for (QPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
+ TQString openedObjectsStr = "<ul>";
+ for (TQPtrListIterator<KexiDB::Connection::TableSchemaChangeListenerInterface> it(*listeners);
it.current(); ++it) {
- openedObjectsStr += QString("<li>%1</li>").arg(it.current()->listenerInfoString);
+ openedObjectsStr += TQString("<li>%1</li>").tqarg(it.current()->listenerInfoString);
}
openedObjectsStr += "</ul>";
- int r = KMessageBox::questionYesNo(parent,
+ int r = KMessageBox::questionYesNo(tqparent,
"<p>"+msg+"</p><p>"+openedObjectsStr+"</p><p>"
+i18n("Do you want to close all windows for these objects?"),
- QString::null, KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
+ TQString(), KGuiItem(i18n("Close windows"),"fileclose"), KStdGuiItem::cancel());
tristate res;
if (r == KMessageBox::Yes) {
//try to close every window
@@ -202,8 +202,8 @@ tristate KexiTablePart::askForClosingObjectsUsingTableSchema(QWidget *parent, Ke
return res;
}
-QString
-KexiTablePart::i18nMessage(const QCString& englishMessage, KexiDialogBase* dlg) const
+TQString
+KexiTablePart::i18nMessage(const TQCString& englishMessage, KexiDialogBase* dlg) const
{
if (englishMessage=="Design of object \"%1\" has been modified.")
return i18n("Design of table \"%1\" has been modified.");
@@ -222,18 +222,18 @@ void KexiTablePart::setupCustomPropertyPanelTabs(KTabWidget *tab, KexiMainWindow
{
if (!d->lookupColumnPage) {
d->lookupColumnPage = new KexiLookupColumnPage(0);
- connect(d->lookupColumnPage, SIGNAL(jumpToObjectRequested(const QCString&, const QCString&)),
- mainWin, SLOT(highlightObject(const QCString&, const QCString&)));
+ connect(d->lookupColumnPage, TQT_SIGNAL(jumpToObjectRequested(const TQCString&, const TQCString&)),
+ mainWin, TQT_SLOT(highlightObject(const TQCString&, const TQCString&)));
//! @todo add "Table" tab
/*
- connect(d->dataSourcePage, SIGNAL(formDataSourceChanged(const QCString&, const QCString&)),
- KFormDesigner::FormManager::self(), SLOT(setFormDataSource(const QCString&, const QCString&)));
- connect(d->dataSourcePage, SIGNAL(dataSourceFieldOrExpressionChanged(const QString&, const QString&, KexiDB::Field::Type)),
- KFormDesigner::FormManager::self(), SLOT(setDataSourceFieldOrExpression(const QString&, const QString&, KexiDB::Field::Type)));
- connect(d->dataSourcePage, SIGNAL(insertAutoFields(const QString&, const QString&, const QStringList&)),
- KFormDesigner::FormManager::self(), SLOT(insertAutoFields(const QString&, const QString&, const QStringList&)));*/
+ connect(d->dataSourcePage, TQT_SIGNAL(formDataSourceChanged(const TQCString&, const TQCString&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setFormDataSource(const TQCString&, const TQCString&)));
+ connect(d->dataSourcePage, TQT_SIGNAL(dataSourceFieldOrExpressionChanged(const TQString&, const TQString&, KexiDB::Field::Type)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(setDataSourceFieldOrExpression(const TQString&, const TQString&, KexiDB::Field::Type)));
+ connect(d->dataSourcePage, TQT_SIGNAL(insertAutoFields(const TQString&, const TQString&, const TQStringList&)),
+ KFormDesigner::FormManager::self(), TQT_SLOT(insertAutoFields(const TQString&, const TQString&, const TQStringList&)));*/
}
KexiProject *prj = mainWin->project();
@@ -278,8 +278,8 @@ KexiTableDataSource::cursor(KexiProject * /*project*/,
//----------------
-KexiTablePart::TempData::TempData(QObject* parent)
- : KexiDialogTempData(parent)
+KexiTablePart::TempData::TempData(TQObject* tqparent)
+ : KexiDialogTempData(tqparent)
, table(0)
, tableSchemaChangedInPreviousView(true /*to force reloading on startup*/ )
{
diff --git a/kexi/plugins/tables/kexitablepart.h b/kexi/plugins/tables/kexitablepart.h
index e4b060ad1..688251380 100644
--- a/kexi/plugins/tables/kexitablepart.h
+++ b/kexi/plugins/tables/kexitablepart.h
@@ -35,22 +35,23 @@ class KexiLookupColumnPage;
class KexiTablePart : public KexiPart::Part
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTablePart(QObject *parent, const char *name, const QStringList &);
+ KexiTablePart(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~KexiTablePart();
virtual bool remove(KexiMainWindow *win, KexiPart::Item &item);
virtual tristate rename(KexiMainWindow *win, KexiPart::Item &item,
- const QString& newName);
+ const TQString& newName);
// virtual KexiPart::DataSource *dataSource();
class TempData : public KexiDialogTempData
{
public:
- TempData(QObject* parent);
+ TempData(TQObject* tqparent);
KexiDB::TableSchema *table;
/*! true, if \a table member has changed in previous view. Used on view switching.
We're checking this flag to see if we should refresh data for DataViewMode. */
@@ -58,10 +59,10 @@ class KexiTablePart : public KexiPart::Part
};
static tristate askForClosingObjectsUsingTableSchema(
- QWidget *parent, KexiDB::Connection& conn,
- KexiDB::TableSchema& table, const QString& msg);
+ TQWidget *tqparent, KexiDB::Connection& conn,
+ KexiDB::TableSchema& table, const TQString& msg);
- virtual QString i18nMessage(const QCString& englishMessage,
+ virtual TQString i18nMessage(const TQCString& englishMessage,
KexiDialogBase* dlg) const;
KexiLookupColumnPage* lookupColumnPage() const;
@@ -69,8 +70,8 @@ class KexiTablePart : public KexiPart::Part
protected:
virtual KexiDialogTempData* createTempData(KexiDialogBase* dialog);
- virtual KexiViewBase* createView(QWidget *parent, KexiDialogBase* dialog,
- KexiPart::Item &item, int viewMode = Kexi::DataViewMode, QMap<QString,QString>* staticObjectArgs = 0);
+ virtual KexiViewBase* createView(TQWidget *tqparent, KexiDialogBase* dialog,
+ KexiPart::Item &item, int viewMode = Kexi::DataViewMode, TQMap<TQString,TQString>* staticObjectArgs = 0);
virtual void initPartActions();
virtual void initInstanceActions();
diff --git a/kexi/tests/altertable/1.kexi b/kexi/tests/altertable/1.kexi
index 1165d90ec..057301a3d 100644
--- a/kexi/tests/altertable/1.kexi
+++ b/kexi/tests/altertable/1.kexi
Binary files differ
diff --git a/kexi/tests/altertable/altertable.cpp b/kexi/tests/altertable/altertable.cpp
index bf14bc009..1c5589c45 100644
--- a/kexi/tests/altertable/altertable.cpp
+++ b/kexi/tests/altertable/altertable.cpp
@@ -21,11 +21,11 @@
#include <unistd.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qregexp.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqregexp.h>
+#include <tqclipboard.h>
#include <kdebug.h>
@@ -41,22 +41,22 @@
#include <kexidb/connection.h>
#include <kexidb/utils.h>
-QString testFilename;
-QFile testFile;
-QTextStream testFileStream;
-QStringList testFileLine;
+TQString testFilename;
+TQFile testFile;
+TQTextStream testFileStream;
+TQStringList testFileLine;
uint testLineNumber = 0;
-QString origDbFilename, dbFilename;
+TQString origDbFilename, dbFilename;
int variableI = 1; // simple variable 'i' support
int newArgc;
char** newArgv;
KexiMainWindowImpl* win = 0;
KexiProject* prj = 0;
-void showError(const QString& msg)
+void showError(const TQString& msg)
{
- QString msg_(msg);
- msg_.prepend(QString("Error at line %1: ").arg(testLineNumber));
+ TQString msg_(msg);
+ msg_.prepend(TQString("Error at line %1: ").tqarg(testLineNumber));
kdDebug() << msg_ << endl;
}
@@ -64,9 +64,9 @@ void showError(const QString& msg)
text in quotes is extracted, e.g. \"ab c\" is treat as one item "ab c"
Returns flas on failure (e.g. end of file).
Empty lines and lines or parts of lines with # (comments) are omitted. */
-tristate readLineFromTestFile(const QString& expectedCommandName = QString::null)
+tristate readLineFromTestFile(const TQString& expectedCommandName = TQString())
{
- QString s;
+ TQString s;
bool blockComment = false;
while (true) {
if (testFileStream.atEnd())
@@ -88,12 +88,12 @@ tristate readLineFromTestFile(const QString& expectedCommandName = QString::null
break;
}
s.append(" "); //sentinel
- QString item;
+ TQString item;
testFileLine.clear();
const int len = s.length();
bool skipWhiteSpace = true, quoted = false;
for (int i=0; i<len; i++) {
- const QChar ch( s.ref(i) );
+ const TQChar ch( s.ref(i) );
if (skipWhiteSpace) {
if (ch=='#')
break; //eoln
@@ -111,15 +111,15 @@ tristate readLineFromTestFile(const QString& expectedCommandName = QString::null
skipWhiteSpace = true;
quoted = false;
testFileLine.append( item );
- item = QString::null;
+ item = TQString();
continue;
}
item.append(ch);
}
}
if (!expectedCommandName.isEmpty() && testFileLine[0]!=expectedCommandName) {
- showError( QString("Invalid command '%1', expected '%2'")
- .arg(testFileLine[0]).arg(expectedCommandName));
+ showError( TQString("Invalid command '%1', expected '%2'")
+ .tqarg(testFileLine[0]).tqarg(expectedCommandName));
return false;
}
if (quoted) {
@@ -135,54 +135,54 @@ bool checkItemsNumber(int expectedNumberOfItems, int optionalNumberOfItems = -1)
if (optionalNumberOfItems>0)
ok = ok || optionalNumberOfItems==(int)testFileLine.count();
if (!ok) {
- QString msg = QString("Invalid number of args (%1) for command '%2', expected: %3")
- .arg(testFileLine.count()).arg(testFileLine[0]).arg(expectedNumberOfItems);
+ TQString msg = TQString("Invalid number of args (%1) for command '%2', expected: %3")
+ .tqarg(testFileLine.count()).tqarg(testFileLine[0]).tqarg(expectedNumberOfItems);
if (optionalNumberOfItems>0)
- msg.append( QString(" or %1").arg(optionalNumberOfItems) );
+ msg.append( TQString(" or %1").tqarg(optionalNumberOfItems) );
showError( msg );
return false;
}
return true;
}
-QVariant::Type typeNameToQVariantType(const QCString& name_)
+TQVariant::Type typeNameToTQVariantType(const TQCString& name_)
{
- QCString name( name_.lower() );
+ TQCString name( name_.lower() );
if (name=="string")
- return QVariant::String;
+ return TQVariant::String;
if (name=="int")
- return QVariant::Int;
+ return TQVariant::Int;
if (name=="bool" || name=="boolean")
- return QVariant::Bool;
+ return TQVariant::Bool;
if (name=="double" || name=="float")
- return QVariant::Double;
+ return TQVariant::Double;
if (name=="date")
- return QVariant::Date;
+ return TQVariant::Date;
if (name=="datetime")
- return QVariant::DateTime;
+ return TQVariant::DateTime;
if (name=="time")
- return QVariant::Time;
+ return TQVariant::Time;
if (name=="bytearray")
- return QVariant::ByteArray;
+ return TQVariant::ByteArray;
if (name=="longlong")
- return QVariant::LongLong;
+ return TQVariant::LongLong;
//todo more types
- showError(QString("Invalid type '%1'").arg(name_));
- return QVariant::Invalid;
+ showError(TQString("Invalid type '%1'").tqarg(name_));
+ return TQVariant::Invalid;
}
-// casts string to QVariant
-bool castStringToQVariant( const QString& string, const QCString& type, QVariant& result )
+// casts string to TQVariant
+bool castStringToTQVariant( const TQString& string, const TQCString& type, TQVariant& result )
{
if (string.lower()=="<null>") {
- result = QVariant();
+ result = TQVariant();
return true;
}
if (string=="\"\"") {
- result = QString("");
+ result = TQString("");
return true;
}
- const QVariant::Type vtype = typeNameToQVariantType( type );
+ const TQVariant::Type vtype = typeNameToTQVariantType( type );
bool ok;
result = KexiDB::stringToVariant( string, vtype, ok );
return ok;
@@ -190,7 +190,7 @@ bool castStringToQVariant( const QString& string, const QCString& type, QVariant
// returns a number parsed from argument; if argument is i or i++, variableI is used
// 'ok' is set to false on failure
-static int getNumber(const QString& argument, bool& ok)
+static int getNumber(const TQString& argument, bool& ok)
{
int result;
ok = true;
@@ -202,7 +202,7 @@ static int getNumber(const QString& argument, bool& ok)
else {
result = argument.toInt(&ok);
if (!ok) {
- showError(QString("Invalid value '%1'").arg(argument));
+ showError(TQString("Invalid value '%1'").tqarg(argument));
return -1;
}
}
@@ -212,26 +212,26 @@ static int getNumber(const QString& argument, bool& ok)
//---------------------------------------
AlterTableTester::AlterTableTester()
- : QObject()
+ : TQObject()
, m_finishedCopying(false)
{
//copy the db file to a temp file
qInitNetworkProtocols();
- QPtrList<QNetworkOperation> list = m_copyOperator.copy(
- "file://" + QDir::current().path() + "/" + origDbFilename,
- "file://" + QDir::current().path() + "/" + dbFilename, false, false );
- connect(&m_copyOperator, SIGNAL(finished(QNetworkOperation*)),
- this, SLOT(slotFinishedCopying(QNetworkOperation*)));
+ TQPtrList<TQNetworkOperation> list = m_copyOperator.copy(
+ "file://" + TQDir::current().path() + "/" + origDbFilename,
+ "file://" + TQDir::current().path() + "/" + dbFilename, false, false );
+ connect(&m_copyOperator, TQT_SIGNAL(finished(TQNetworkOperation*)),
+ this, TQT_SLOT(slotFinishedCopying(TQNetworkOperation*)));
}
AlterTableTester::~AlterTableTester()
{
- QFile(dbFilename).remove();
+ TQFile(dbFilename).remove();
}
-void AlterTableTester::slotFinishedCopying(QNetworkOperation* oper)
+void AlterTableTester::slotFinishedCopying(TQNetworkOperation* oper)
{
- if (oper->operation()==QNetworkProtocol::OpPut)
+ if (oper->operation()==TQNetworkProtocol::OpPut)
m_finishedCopying = true;
}
@@ -239,16 +239,16 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI
{
if (!checkItemsNumber(5))
return false;
- QVariant newValue;
- QCString propertyName( testFileLine[2].latin1() );
- QCString propertyType( testFileLine[3].latin1() );
- QString propertyValueString(testFileLine[4]);
+ TQVariant newValue;
+ TQCString propertyName( testFileLine[2].latin1() );
+ TQCString propertyType( testFileLine[3].latin1() );
+ TQString propertyValueString(testFileLine[4]);
if (propertyName=="type")
newValue = (int)KexiDB::Field::typeForString(testFileLine[4]);
else {
- if (!castStringToQVariant(propertyValueString, propertyType, newValue)) {
- showError( QString("Could not set property '%1' value '%2' of type '%3'")
- .arg(propertyName).arg(propertyValueString).arg(propertyType) );
+ if (!castStringToTQVariant(propertyValueString, propertyType, newValue)) {
+ showError( TQString("Could not set property '%1' value '%2' of type '%3'")
+ .tqarg(propertyName).tqarg(propertyValueString).tqarg(propertyType) );
return false;
}
}
@@ -259,7 +259,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI
designerIface->changeFieldPropertyForRow( row, propertyName, newValue, 0, true );
if (propertyName=="type") {
//clean subtype name, e.g. from "longText" to "LongText", because dropdown list is case-sensitive
- QString realSubTypeName;
+ TQString realSubTypeName;
if (KexiDB::Field::BLOB == KexiDB::Field::typeForString(testFileLine[4]))
//! @todo hardcoded!
realSubTypeName = "image";
@@ -271,7 +271,7 @@ bool AlterTableTester::changeFieldProperty(KexiTableDesignerInterface* designerI
}
//helper
-bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugString)
+bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugString)
{
KexiTableDesignerInterface* designerIface
= dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() );
@@ -282,34 +282,34 @@ bool AlterTableTester::getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugSt
tristate result;
schemaDebugString = designerIface->debugStringForCurrentTableSchema(result);
if (true!=result) {
- showError( QString("Loading modified schema failed. Result: %1")
- .arg(~result ? "cancelled" : "false") );
+ showError( TQString("Loading modified schema failed. Result: %1")
+ .tqarg(~result ? "cancelled" : "false") );
return false;
}
- schemaDebugString.remove(QRegExp(",$")); //no need to have "," at the end of lines
+ schemaDebugString.remove(TQRegExp(",$")); //no need to have "," at the end of lines
return true;
}
bool AlterTableTester::showSchema(KexiDialogBase* dlg, bool copyToClipboard)
{
- QString schemaDebugString;
+ TQString schemaDebugString;
if (!getSchemaDump(dlg, schemaDebugString))
return false;
if (copyToClipboard)
- QApplication::clipboard()->setText( schemaDebugString );
+ TQApplication::tqclipboard()->setText( schemaDebugString );
else
- kdDebug() << QString("Schema for '%1' table:\n").arg(dlg->partItem()->name())
+ kdDebug() << TQString("Schema for '%1' table:\n").tqarg(dlg->partItem()->name())
+ schemaDebugString + "\nendSchema" << endl;
return true;
}
bool AlterTableTester::checkInternal(KexiDialogBase* dlg,
- QString& debugString, const QString& endCommand, bool skipColonsAndStripWhiteSpace)
+ TQString& debugString, const TQString& endCommand, bool skipColonsAndStripWhiteSpace)
{
Q_UNUSED(dlg);
- QTextStream resultStream(&debugString, IO_ReadOnly);
+ TQTextStream resultStream(&debugString, IO_ReadOnly);
// Load expected result, compare
- QString expectedLine, resultLine;
+ TQString expectedLine, resultLine;
while (true) {
const bool testFileStreamAtEnd = testFileStream.atEnd();
if (!testFileStreamAtEnd) {
@@ -317,7 +317,7 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg,
expectedLine = testFileStream.readLine();
if (skipColonsAndStripWhiteSpace) {
expectedLine = expectedLine.stripWhiteSpace();
- expectedLine.remove(QRegExp(",$")); //no need to have "," at the end of lines
+ expectedLine.remove(TQRegExp(",$")); //no need to have "," at the end of lines
}
}
if (testFileStreamAtEnd || endCommand==expectedLine.stripWhiteSpace()) {
@@ -329,18 +329,18 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg,
}
//test line loaded, load result
if (resultStream.atEnd()) {
- showError( QString("Result ends unexpectedly. There is at least one additinal test line: '")
+ showError( TQString("Result ends unexpectedly. There is at least one additinal test line: '")
+ expectedLine +"'" );
return false;
}
resultLine = resultStream.readLine();
if (skipColonsAndStripWhiteSpace) {
resultLine = resultLine.stripWhiteSpace();
- resultLine.remove(QRegExp(",$")); //no need to have "," at the end of lines
+ resultLine.remove(TQRegExp(",$")); //no need to have "," at the end of lines
}
if (resultLine!=expectedLine) {
showError(
- QString("Result differs from the expected:\nExpected: ")
+ TQString("Result differs from the expected:\nExpected: ")
+expectedLine+"\n????????: "+resultLine+"\n");
return false;
}
@@ -350,16 +350,16 @@ bool AlterTableTester::checkInternal(KexiDialogBase* dlg,
bool AlterTableTester::checkSchema(KexiDialogBase* dlg)
{
- QString schemaDebugString;
+ TQString schemaDebugString;
if (!getSchemaDump(dlg, schemaDebugString))
return false;
bool result = checkInternal(dlg, schemaDebugString, "endSchema", true /*skipColonsAndStripWhiteSpace*/);
- kdDebug() << QString("Schema check for table '%1': %2").arg(dlg->partItem()->name())
- .arg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Schema check for table '%1': %2").tqarg(dlg->partItem()->name())
+ .tqarg(result ? "OK" : "Failed") << endl;
return result;
}
-bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebugString)
+bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, TQString& actionsDebugString)
{
KexiTableDesignerInterface* designerIface
= dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() );
@@ -367,7 +367,7 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebug
return false;
tristate result = designerIface->simulateAlterTableExecution(&actionsDebugString);
if (true!=result) {
- showError( QString("Computing simplified actions for table '%1' failed.").arg(dlg->partItem()->name()) );
+ showError( TQString("Computing simplified actions for table '%1' failed.").tqarg(dlg->partItem()->name()) );
return false;
}
return true;
@@ -375,25 +375,25 @@ bool AlterTableTester::getActionsDump(KexiDialogBase* dlg, QString& actionsDebug
bool AlterTableTester::showActions(KexiDialogBase* dlg, bool copyToClipboard)
{
- QString actionsDebugString;
+ TQString actionsDebugString;
if (!getActionsDump(dlg, actionsDebugString))
return false;
if (copyToClipboard)
- QApplication::clipboard()->setText( actionsDebugString );
+ TQApplication::tqclipboard()->setText( actionsDebugString );
else
- kdDebug() << QString("Simplified actions for altering table '%1':\n").arg(dlg->partItem()->name())
+ kdDebug() << TQString("Simplified actions for altering table '%1':\n").tqarg(dlg->partItem()->name())
+ actionsDebugString+"\n" << endl;
return true;
}
bool AlterTableTester::checkActions(KexiDialogBase* dlg)
{
- QString actionsDebugString;
+ TQString actionsDebugString;
if (!getActionsDump(dlg, actionsDebugString))
return false;
bool result = checkInternal(dlg, actionsDebugString, "endActions", true /*skipColonsAndStripWhiteSpace*/);
- kdDebug() << QString("Actions check for table '%1': %2").arg(dlg->partItem()->name())
- .arg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Actions check for table '%1': %2").tqarg(dlg->partItem()->name())
+ .tqarg(result ? "OK" : "Failed") << endl;
return result;
}
@@ -405,26 +405,26 @@ bool AlterTableTester::saveTableDesign(KexiDialogBase* dlg)
return false;
tristate result = designerIface->executeRealAlterTable();
if (true!=result) {
- showError( QString("Saving design of table '%1' failed.").arg(dlg->partItem()->name()) );
+ showError( TQString("Saving design of table '%1' failed.").tqarg(dlg->partItem()->name()) );
return false;
}
return true;
}
-bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, QString& dataString)
+bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, TQString& dataString)
{
KexiTableDesignerInterface* designerIface
= dynamic_cast<KexiTableDesignerInterface*>( dlg->selectedView() );
if (!designerIface)
return false;
- QMap<QString,QString> args;
- QTextStream ts( &dataString, IO_WriteOnly );
- args["textStream"] = KexiUtils::ptrToString<QTextStream>( &ts );
+ TQMap<TQString,TQString> args;
+ TQTextStream ts( &dataString, IO_WriteOnly );
+ args["textStream"] = KexiUtils::ptrToString<TQTextStream>( &ts );
args["destinationType"]="file";
args["delimiter"]="\t";
args["textQuote"]="\"";
- args["itemId"] = QString::number(
+ args["itemId"] = TQString::number(
prj->dbConnection()->tableSchema( dlg->partItem()->name() )->id() );
if (!KexiInternalPart::executeCommand("csv_importexport", win, "KexiCSVExport", &args)) {
showError( "Error exporting table contents." );
@@ -435,24 +435,24 @@ bool AlterTableTester::getTableDataDump(KexiDialogBase* dlg, QString& dataString
bool AlterTableTester::showTableData(KexiDialogBase* dlg, bool copyToClipboard)
{
- QString dataString;
+ TQString dataString;
if (!getTableDataDump(dlg, dataString))
return false;
if (copyToClipboard)
- QApplication::clipboard()->setText( dataString );
+ TQApplication::tqclipboard()->setText( dataString );
else
- kdDebug() << QString("Contents of table '%1':\n").arg(dlg->partItem()->name())+dataString+"\n" << endl;
+ kdDebug() << TQString("Contents of table '%1':\n").tqarg(dlg->partItem()->name())+dataString+"\n" << endl;
return true;
}
bool AlterTableTester::checkTableData(KexiDialogBase* dlg)
{
- QString dataString;
+ TQString dataString;
if (!getTableDataDump(dlg, dataString))
return false;
bool result = checkInternal(dlg, dataString, "endTableData", false /*!skipColonsAndStripWhiteSpace*/);
- kdDebug() << QString("Table '%1' contents: %2").arg(dlg->partItem()->name())
- .arg(result ? "OK" : "Failed") << endl;
+ kdDebug() << TQString("Table '%1' contents: %2").tqarg(dlg->partItem()->name())
+ .tqarg(result ? "OK" : "Failed") << endl;
return result;
}
@@ -460,10 +460,10 @@ bool AlterTableTester::closeWindow(KexiDialogBase* dlg)
{
if (!dlg)
return true;
- QString name = dlg->partItem()->name();
- tristate result = true == win->closeDialog(dlg, true/*layoutTaskBar*/, true/*doNotSaveChanges*/);
- kdDebug() << QString("Closing window for table '%1': %2").arg(name)
- .arg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl;
+ TQString name = dlg->partItem()->name();
+ tristate result = true == win->closeDialog(dlg, true/*tqlayoutTaskBar*/, true/*doNotSaveChanges*/);
+ kdDebug() << TQString("Closing window for table '%1': %2").tqarg(name)
+ .tqarg(result==true ? "OK" : (result==false ? "Failed" : "Cancelled")) << endl;
return result == true;
}
@@ -472,7 +472,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
{
closeAppRequested = false;
while (!m_finishedCopying)
- qApp->processEvents(300);
+ tqApp->processEvents(300);
kdDebug() << "Database copied to temporary: " << dbFilename << endl;
@@ -489,16 +489,16 @@ tristate AlterTableTester::run(bool &closeAppRequested)
if (true != res)
return ~res;
- QString tableName(testFileLine[1]);
+ TQString tableName(testFileLine[1]);
KexiPart::Item *item = prj->itemForMimeType("kexi/table", tableName);
if (!item) {
- showError(QString("No such table '%1'").arg(tableName));
+ showError(TQString("No such table '%1'").tqarg(tableName));
return false;
}
bool openingCancelled;
KexiDialogBase* dlg = win->openObject(item, Kexi::DesignViewMode, openingCancelled);
if (!dlg) {
- showError(QString("Could not open table '%1'").arg(item->name()));
+ showError(TQString("Could not open table '%1'").tqarg(item->name()));
return false;
}
KexiTableDesignerInterface* designerIface
@@ -507,8 +507,8 @@ tristate AlterTableTester::run(bool &closeAppRequested)
return false;
//dramatic speedup: temporary hide the window and propeditor
- QWidget * propeditor
- = KexiUtils::findFirstChild<QWidget>(qApp->mainWidget(), "KexiPropertyEditorView");
+ TQWidget * propeditor
+ = KexiUtils::findFirstChild<TQWidget>(tqApp->mainWidget(), "KexiPropertyEditorView");
if (propeditor)
propeditor->hide();
dlg->hide();
@@ -518,7 +518,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
res = readLineFromTestFile();
if (true != res)
return ~res;
- QString command( testFileLine[0] );
+ TQString command( testFileLine[0] );
if (designTable) {
//subcommands available within "designTable" commands
if (command=="endDesign") {
@@ -570,7 +570,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
bool ok;
variableI = command.mid(2).toInt(&ok);
if (!ok) {
- showError(QString("Invalid variable initialization '%1'").arg(command));
+ showError(TQString("Invalid variable initialization '%1'").tqarg(command));
return false;
}
continue;
@@ -622,7 +622,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
if (command=="stop") {
if (!checkItemsNumber(1))
return false;
- kdDebug() << QString("Test STOPPED at line %1.").arg(testLineNumber) << endl;
+ kdDebug() << TQString("Test STOPPED at line %1.").tqarg(testLineNumber) << endl;
break;
}
else if (command=="closeWindow") {
@@ -636,11 +636,11 @@ tristate AlterTableTester::run(bool &closeAppRequested)
if (!checkItemsNumber(1) || !closeWindow(dlg))
return false;
closeAppRequested = true;
- kdDebug() << QString("Quitting the application...") << endl;
+ kdDebug() << TQString("Quitting the application...") << endl;
break;
}
else {
- showError( QString("No such command '%1'").arg(command) );
+ showError( TQString("No such command '%1'").tqarg(command) );
return false;
}
}
@@ -652,7 +652,7 @@ tristate AlterTableTester::run(bool &closeAppRequested)
int quit(int result)
{
testFile.close();
- delete qApp;
+ delete tqApp;
if (newArgv)
delete [] newArgv;
return result;
@@ -674,7 +674,7 @@ int main(int argc, char *argv[])
testFilename = argv[argc-1];
testFile.setName(testFilename);
if (!testFile.open(IO_ReadOnly)) {
- kdWarning() << QString("Opening test file %1 failed.").arg(testFilename) << endl;
+ kdWarning() << TQString("Opening test file %1 failed.").tqarg(testFilename) << endl;
return quit(1);
}
//load db name
@@ -693,22 +693,22 @@ int main(int argc, char *argv[])
KAboutData* aboutdata = Kexi::createAboutData();
aboutdata->setProgramName( "Kexi Alter Table Test" );
int result = KexiMainWindowImpl::create(newArgc, newArgv, aboutdata);
- if (!qApp)
+ if (!tqApp)
return quit(result);
win = KexiMainWindowImpl::self();
AlterTableTester tester;
- //QObject::connect(win, SIGNAL(projectOpened()), &tester, SLOT(run()));
+ //TQObject::connect(win, TQT_SIGNAL(projectOpened()), &tester, TQT_SLOT(run()));
bool closeAppRequested;
res = tester.run(closeAppRequested);
if (true != res) {
if (false == res)
- kdWarning() << QString("Running test for file '%1' failed.").arg(testFilename) << endl;
+ kdWarning() << TQString("Running test for file '%1' failed.").tqarg(testFilename) << endl;
return quit(res==false ? 1 : 0);
}
- kdDebug() << QString("Tests from file '%1': OK").arg(testFilename) << endl;
- result = (closeOnFinish || closeAppRequested) ? 0 : qApp->exec();
+ kdDebug() << TQString("Tests from file '%1': OK").tqarg(testFilename) << endl;
+ result = (closeOnFinish || closeAppRequested) ? 0 : tqApp->exec();
quit(result);
return result;
}
diff --git a/kexi/tests/altertable/altertable.h b/kexi/tests/altertable/altertable.h
index 455c2bf5c..9a2cdd14f 100644
--- a/kexi/tests/altertable/altertable.h
+++ b/kexi/tests/altertable/altertable.h
@@ -20,17 +20,18 @@
#ifndef AlterTableTester_H
#define AlterTableTester_H
-#include <qurloperator.h>
-#include <qnetwork.h>
-#include <qnetworkprotocol.h>
+#include <tqurloperator.h>
+#include <tqnetwork.h>
+#include <tqnetworkprotocol.h>
#include <kexiutils/tristate.h>
class KexiTableDesignerInterface;
class KexiDialogBase;
-class AlterTableTester : public QObject
+class AlterTableTester : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
AlterTableTester();
~AlterTableTester();
@@ -38,25 +39,25 @@ class AlterTableTester : public QObject
tristate run(bool &closeAppRequested);
protected slots:
- void slotFinishedCopying(QNetworkOperation*);
+ void slotFinishedCopying(TQNetworkOperation*);
private:
bool changeFieldProperty(KexiTableDesignerInterface* designerIface);
- bool getSchemaDump(KexiDialogBase* dlg, QString& schemaDebugString);
+ bool getSchemaDump(KexiDialogBase* dlg, TQString& schemaDebugString);
bool showSchema(KexiDialogBase* dlg, bool copyToClipboard);
bool checkSchema(KexiDialogBase* dlg);
- bool getActionsDump(KexiDialogBase* dlg, QString& actionsDebugString);
+ bool getActionsDump(KexiDialogBase* dlg, TQString& actionsDebugString);
bool showActions(KexiDialogBase* dlg, bool copyToClipboard);
bool checkActions(KexiDialogBase* dlg);
- bool checkInternal(KexiDialogBase* dlg, QString& debugString,
- const QString& endCommand, bool skipColons);
+ bool checkInternal(KexiDialogBase* dlg, TQString& debugString,
+ const TQString& endCommand, bool skipColons);
bool saveTableDesign(KexiDialogBase* dlg);
- bool getTableDataDump(KexiDialogBase* dlg, QString& dataString);
+ bool getTableDataDump(KexiDialogBase* dlg, TQString& dataString);
bool showTableData(KexiDialogBase* dlg, bool copyToClipboard);
bool checkTableData(KexiDialogBase* dlg);
bool closeWindow(KexiDialogBase* dlg);
- QUrlOperator m_copyOperator;
+ TQUrlOperator m_copyOperator;
bool m_finishedCopying;
};
diff --git a/kexi/tests/gui/finddialog/finddialog.pro b/kexi/tests/gui/finddialog/finddialog.pro
index f76b53725..dfbdd7eb5 100644
--- a/kexi/tests/gui/finddialog/finddialog.pro
+++ b/kexi/tests/gui/finddialog/finddialog.pro
@@ -5,12 +5,12 @@ include( $(KEXI)/common.pro )
CONFIG += qt warn_on release
DEPENDPATH = ../../include
-system( bash kmoc )
+system( bash ktqmoc )
TARGET = finddialogtest
DESTDIR=.
-system( bash kmoc )
+system( bash ktqmoc )
system( bash kdcopidl )
SOURCES = kexifinddialog.cpp main.cpp
diff --git a/kexi/tests/gui/finddialog/kexifinddialog.cpp b/kexi/tests/gui/finddialog/kexifinddialog.cpp
index 64f54d51c..5c3a7e4d8 100644
--- a/kexi/tests/gui/finddialog/kexifinddialog.cpp
+++ b/kexi/tests/gui/finddialog/kexifinddialog.cpp
@@ -24,14 +24,14 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
-KexiFindDialog::KexiFindDialog( bool replaceMode, QWidget* parent, const char* name, bool modal )
- : KexiFindDialogBase(parent, name, modal)
+KexiFindDialog::KexiFindDialog( bool replaceMode, TQWidget* tqparent, const char* name, bool modal )
+ : KexiFindDialogBase(tqparent, name, modal)
, m_replaceMode(true)
{
- m_btnFind->setIconSet(KStdGuiItem::find().iconSet());
+ m_btnFind->setIconSet(KStdGuiItem::tqfind().iconSet());
m_btnClose->setIconSet(KStdGuiItem::close().iconSet());
setReplaceMode(replaceMode);
m_lookIn->insertItem(i18n("(All columns)"));
diff --git a/kexi/tests/gui/finddialog/kexifinddialog.h b/kexi/tests/gui/finddialog/kexifinddialog.h
index 9025d1523..a6cdc47cc 100644
--- a/kexi/tests/gui/finddialog/kexifinddialog.h
+++ b/kexi/tests/gui/finddialog/kexifinddialog.h
@@ -24,38 +24,39 @@
/*! @brief A Kexi-specific "Find text" dialog.
- Also used for replace.
+ Also used for tqreplace.
*/
class KexiFindDialog : public KexiFindDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFindDialog( bool replaceMode, QWidget* parent = 0, const char* name = 0, bool modal = FALSE );
+ KexiFindDialog( bool replaceMode, TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE );
virtual ~KexiFindDialog();
#if 0
TODO TODO TODO TODO TODO TODO
/*! Sets \a columnNames list for 'look in column' combo box.
"(All columns)" item is also prepended. */
- void setLookInColumnList(const QStringList& columnNames);
+ void setLookInColumnList(const TQStringList& columnNames);
/*! \return a list for 'look in column' combo box.
"(All columns)" item is also prepended. */
- QStringList* lookInColumnList() const;
+ TQStringList* lookInColumnList() const;
/*! \return column name selected in 'look in column' combo box.
If "(All columns)" item is selected, "*" is returned. */
- QString lookInColumn() const;
+ TQString lookInColumn() const;
/*! Selects \a columnName to be selected 'look in column'.
By default "(All columns)" item is selected. To select this item, pass "*". */
- void setLookInColumn(const QString& columnName);
+ void setLookInColumn(const TQString& columnName);
#endif
public slots:
/*! Sets or clears replace mode.
- For replace mode 'prompt or replace' option is visible.
+ For replace mode 'prompt or tqreplace' option is visible.
*/
void setReplaceMode(bool set);
diff --git a/kexi/tests/gui/finddialog/kexifinddialogbase.ui b/kexi/tests/gui/finddialog/kexifinddialogbase.ui
index f4684bffa..41e4294b7 100644
--- a/kexi/tests/gui/finddialog/kexifinddialogbase.ui
+++ b/kexi/tests/gui/finddialog/kexifinddialogbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiFindDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KexiFindDialogBase</cstring>
</property>
@@ -33,7 +33,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="2">
+ <widget class="TQCheckBox" row="4" column="2">
<property name="name">
<cstring>m_caseSensitive</cstring>
</property>
@@ -81,7 +81,7 @@
<enum>NoInsertion</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -92,7 +92,7 @@
<cstring>m_textToFind</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>m_replaceLbl</cstring>
</property>
@@ -103,7 +103,7 @@
<cstring>m_textToReplace</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -114,7 +114,7 @@
<cstring>m_search</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel2_2_3</cstring>
</property>
@@ -159,7 +159,7 @@
<enum>NoInsertion</enum>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -180,14 +180,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="5" column="2">
+ <widget class="TQCheckBox" row="5" column="2">
<property name="name">
<cstring>m_wholeWords</cstring>
</property>
@@ -198,7 +198,7 @@
<string>&amp;Whole words only</string>
</property>
</widget>
- <widget class="QCheckBox" row="6" column="2">
+ <widget class="TQCheckBox" row="6" column="2">
<property name="name">
<cstring>m_promptOnReplace</cstring>
</property>
@@ -206,7 +206,7 @@
<enum>WheelFocus</enum>
</property>
<property name="text">
- <string>Prompt on replace</string>
+ <string>Prompt on tqreplace</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -222,16 +222,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="4" rowspan="8" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="4" rowspan="8" colspan="1">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<vbox>
<property name="name">
@@ -279,7 +279,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -309,7 +309,7 @@
<tabstop>m_caseSensitive</tabstop>
<tabstop>m_wholeWords</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcombobox.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kexi/tests/newapi/dr_prop_test.h b/kexi/tests/newapi/dr_prop_test.h
index 71e882e3e..d7bfd5b30 100644
--- a/kexi/tests/newapi/dr_prop_test.h
+++ b/kexi/tests/newapi/dr_prop_test.h
@@ -22,17 +22,17 @@
int drPropTest()
{
- QValueList<QCString> names = driver->propertyNames();
- kdDebug() << QString("%1 properties found:").arg(names.count()) << endl;
- for (QValueList<QCString>::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) {
+ TQValueList<TQCString> names = driver->propertyNames();
+ kdDebug() << TQString("%1 properties found:").tqarg(names.count()) << endl;
+ for (TQValueList<TQCString>::ConstIterator it = names.constBegin(); it!=names.constEnd(); ++it) {
kdDebug() << " - " << (*it) << ":"
<< " caption=\"" << driver->propertyCaption(*it) << "\""
<< " type=" << driver->propertyValue(*it).typeName()
<< " value=\""<<driver->propertyValue(*it).toString()<<"\"" << endl;
}
-// QVariant propertyValue( const QCString& propName ) const;
+// TQVariant propertyValue( const TQCString& propName ) const;
-// QVariant propertyCaption( const QCString& propName ) const;
+// TQVariant propertyCaption( const TQCString& propName ) const;
return 0;
}
diff --git a/kexi/tests/newapi/main.cpp b/kexi/tests/newapi/main.cpp
index 514538f3a..ba232d5fa 100644
--- a/kexi/tests/newapi/main.cpp
+++ b/kexi/tests/newapi/main.cpp
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qfileinfo.h>
-#include <qguardedptr.h>
+#include <tqfileinfo.h>
+#include <tqguardedptr.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
@@ -41,16 +41,16 @@
using namespace std;
-QCString prgname;
-QCString db_name;
-QCString drv_name;
-QCString test_name;
+TQCString prgname;
+TQCString db_name;
+TQCString drv_name;
+TQCString test_name;
int cursor_options = 0;
bool db_name_required = true;
KexiDB::ConnectionData conn_data;
-QGuardedPtr<KexiDB::Connection> conn;
-QGuardedPtr<KexiDB::Driver> driver;
+TQGuardedPtr<KexiDB::Connection> conn;
+TQGuardedPtr<KexiDB::Driver> driver;
KApplication *app = 0;
KInstance *instance = 0;
@@ -75,7 +75,7 @@ static KCmdLineOptions options[] =
" to be buffered", 0},
{ "query-params <params>", "Query parameters separated\n"
"by '|' character that will be passed to query\n"
- "statement to replace [...] placeholders.", 0 },
+ "statement to tqreplace [...] placeholders.", 0 },
{ "", " Notes:\n"
"1. 'dr_prop' requires <db_name> argument.\n"
"2. 'parser' test requires <db_name>,\n"
@@ -112,7 +112,7 @@ int main(int argc, char** argv)
usage();
RETURN(0);
}*/
- QFileInfo info=QFileInfo(argv[0]);
+ TQFileInfo info=TQFileInfo(argv[0]);
prgname = info.baseName().latin1();
KCmdLineArgs::init(argc, argv,
@@ -136,8 +136,8 @@ int main(int argc, char** argv)
RETURN(1);
}
test_name = args->getOption("test");
- if (!tests.contains(test_name)) {
- kdDebug() << QString("No such test \"%1\". Use --help.").arg(test_name) << endl;
+ if (!tests.tqcontains(test_name)) {
+ kdDebug() << TQString("No such test \"%1\". Use --help.").tqarg(test_name.data()) << endl;
RETURN(1);
}
@@ -152,7 +152,7 @@ int main(int argc, char** argv)
db_name_required = false;
}
if ((int)args->count()<minargs) {
- kdDebug() << QString("Not enough args (%1 required). Use --help.").arg(minargs) << endl;
+ kdDebug() << TQString("Not enough args (%1 required). Use --help.").tqarg(minargs) << endl;
RETURN(1);
}
@@ -168,9 +168,9 @@ int main(int argc, char** argv)
drv_name = args->arg(0);
KexiDB::DriverManager manager;
- QStringList names = manager.driverNames();
+ TQStringList names = manager.driverNames();
kdDebug() << "DRIVERS: " << endl;
- for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
+ for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
kdDebug() << *it << endl;
if (manager.error() || names.isEmpty()) {
manager.debugError();
@@ -223,9 +223,9 @@ int main(int argc, char** argv)
else if (test_name == "tableview")
r=tableViewTest();
else if (test_name == "parser") {
- QStringList params;
+ TQStringList params;
if (args->isSet("query-params"))
- params = QStringList::split("|", args->getOption("query-params"));
+ params = TQStringList::split("|", args->getOption("query-params"));
r=parserTest(args->arg(2), params);
}
else if (test_name == "dr_prop")
diff --git a/kexi/tests/newapi/mysqlcursor.cpp b/kexi/tests/newapi/mysqlcursor.cpp
index 7f0e92231..091cc8a1b 100644
--- a/kexi/tests/newapi/mysqlcursor.cpp
+++ b/kexi/tests/newapi/mysqlcursor.cpp
@@ -11,9 +11,9 @@ int main(int argc, char * argv[])
{
KInstance instance("newapi");
KexiDB::DriverManager manager;
- QStringList names = manager.driverNames();
+ TQStringList names = manager.driverNames();
kdDebug() << "DRIVERS: " << endl;
- for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
+ for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
kdDebug() << *it << endl;
if (manager.error()) {
kdDebug() << manager.errorMsg() << endl;
@@ -58,10 +58,10 @@ int main(int argc, char * argv[])
KexiDB::Cursor *c2=conn->executeQuery("select * from Applications");
if (!c2) kdDebug()<<conn->errorMsg()<<endl;
- QStringList l=conn->databaseNames();
+ TQStringList l=conn->databaseNames();
if (l.isEmpty()) kdDebug()<<conn->errorMsg()<<endl;
kdDebug()<<"Databases:"<<endl;
- for (QStringList::ConstIterator it = l.constBegin(); it != l.constEnd() ; ++it)
+ for (TQStringList::ConstIterator it = l.constBegin(); it != l.constEnd() ; ++it)
kdDebug() << *it << endl;
if (c) {
diff --git a/kexi/tests/newapi/parser_test.h b/kexi/tests/newapi/parser_test.h
index 144099614..90c25d7c4 100644
--- a/kexi/tests/newapi/parser_test.h
+++ b/kexi/tests/newapi/parser_test.h
@@ -20,7 +20,7 @@
#ifndef PARSER_TEST_H
#define PARSER_TEST_H
-int parserTest(const char *st, const QStringList& params)
+int parserTest(const char *st, const TQStringList& params)
{
int r = 0;
@@ -31,10 +31,10 @@ int parserTest(const char *st, const QStringList& params)
KexiDB::Parser parser(conn);
- const bool ok = parser.parse(QString::fromLocal8Bit( st ));
+ const bool ok = parser.parse(TQString::fromLocal8Bit( st ));
KexiDB::QuerySchema *q = parser.query();
- QValueList<QVariant> variantParams;
- foreach( QStringList::ConstIterator, it, params )
+ TQValueList<TQVariant> variantParams;
+ foreach( TQStringList::ConstIterator, it, params )
variantParams.append(*it);
if (ok && q) {
cout << q->debugString().latin1() << '\n';
@@ -42,8 +42,8 @@ int parserTest(const char *st, const QStringList& params)
}
else {
KexiDB::ParserError err = parser.error();
- kdDebug() << QString("Error = %1\ntype = %2\nat = %3").arg(err.error())
- .arg(err.type()).arg(err.at()) << endl;
+ kdDebug() << TQString("Error = %1\ntype = %2\nat = %3").tqarg(err.error())
+ .tqarg(err.type()).tqarg(err.at()) << endl;
r = 1;
}
delete q;
diff --git a/kexi/tests/newapi/statements.txt b/kexi/tests/newapi/statements.txt
index 3d108ce76..c0cc8e7c4 100644
--- a/kexi/tests/newapi/statements.txt
+++ b/kexi/tests/newapi/statements.txt
@@ -47,7 +47,7 @@ select 2+3*4 from cars;
select (2+3)*4 from cars;
-- OK202: support for aliases for complex-expression columns
select (2+3)*4 from cars;
--- ER203: column names are invalidated inside a complex expressions
+-- ER203: column names are tqinvalidated inside a complex expressions
select one*two from persons;
-- ER204: like ER106, but ambiguous column is inside a complex expression
select id*2 from persons p, cars p;
diff --git a/kexi/tests/newapi/tables_test.h b/kexi/tests/newapi/tables_test.h
index 67516db04..9ad0f4ee8 100644
--- a/kexi/tests/newapi/tables_test.h
+++ b/kexi/tests/newapi/tables_test.h
@@ -56,10 +56,10 @@ int tablesTest()
kdDebug() << "-- PERSONS created --" << endl;
t_persons->debug();
- if (!conn->insertRecord(*t_persons, QVariant(1), QVariant(27), QVariant("Jaroslaw"), QVariant("Staniek"))
- ||!conn->insertRecord(*t_persons, QVariant(2), QVariant(60), QVariant("Lech"), QVariant("Walesa"))
- ||!conn->insertRecord(*t_persons, QVariant(3), QVariant(45), QVariant("Bill"), QVariant("Gates"))
- ||!conn->insertRecord(*t_persons, QVariant(4), QVariant(35), QVariant("John"), QVariant("Smith"))
+ if (!conn->insertRecord(*t_persons, TQVariant(1), TQVariant(27), TQVariant("Jaroslaw"), TQVariant("Staniek"))
+ ||!conn->insertRecord(*t_persons, TQVariant(2), TQVariant(60), TQVariant("Lech"), TQVariant("Walesa"))
+ ||!conn->insertRecord(*t_persons, TQVariant(3), TQVariant(45), TQVariant("Bill"), TQVariant("Gates"))
+ ||!conn->insertRecord(*t_persons, TQVariant(4), TQVariant(35), TQVariant("John"), TQVariant("Smith"))
)
{
kdDebug() << "-- PERSONS data err. --" << endl;
@@ -81,11 +81,11 @@ int tablesTest()
return 1;
}
kdDebug() << "-- CARS created --" << endl;
- if (!conn->insertRecord(*t_cars, QVariant(1), QVariant(1), QVariant("Fiat"))
- ||!conn->insertRecord(*t_cars, QVariant(2), QVariant(2), QVariant("Syrena"))
- ||!conn->insertRecord(*t_cars, QVariant(3), QVariant(3), QVariant("Chrysler"))
- ||!conn->insertRecord(*t_cars, QVariant(4), QVariant(3), QVariant("BMW"))
- ||!conn->insertRecord(*t_cars, QVariant(5), QVariant(4), QVariant("Volvo"))
+ if (!conn->insertRecord(*t_cars, TQVariant(1), TQVariant(1), TQVariant("Fiat"))
+ ||!conn->insertRecord(*t_cars, TQVariant(2), TQVariant(2), TQVariant("Syrena"))
+ ||!conn->insertRecord(*t_cars, TQVariant(3), TQVariant(3), TQVariant("Chrysler"))
+ ||!conn->insertRecord(*t_cars, TQVariant(4), TQVariant(3), TQVariant("BMW"))
+ ||!conn->insertRecord(*t_cars, TQVariant(5), TQVariant(4), TQVariant("Volvo"))
)
{
kdDebug() << "-- CARS data err. --" << endl;
@@ -99,8 +99,8 @@ int tablesTest()
}
kdDebug() << "NOW, TABLE LIST: " << endl;
- QStringList tnames = conn->tableNames();
- for (QStringList::iterator it = tnames.begin(); it!=tnames.end(); ++it) {
+ TQStringList tnames = conn->tableNames();
+ for (TQStringList::iterator it = tnames.begin(); it!=tnames.end(); ++it) {
kdDebug() << " - " << (*it) << endl;
}
diff --git a/kexi/tests/newapi/tableview_test.h b/kexi/tests/newapi/tableview_test.h
index 2b5ef6c8e..aad6314da 100644
--- a/kexi/tests/newapi/tableview_test.h
+++ b/kexi/tests/newapi/tableview_test.h
@@ -49,7 +49,7 @@ int tableViewTest()
KexiDataTableView *tv = new KexiDataTableView(0, "tv", cursor);
app->setMainWidget(tv);
- tv->move((qApp->desktop()->width() - tv->width())/2, (qApp->desktop()->height() - tv->height())/2);
+ tv->move((tqApp->desktop()->width() - tv->width())/2, (tqApp->desktop()->height() - tv->height())/2);
tv->show();
tv->setFocus();
diff --git a/kexi/tests/parser/main.cpp b/kexi/tests/parser/main.cpp
index f6ee57421..803e0193d 100644
--- a/kexi/tests/parser/main.cpp
+++ b/kexi/tests/parser/main.cpp
@@ -1,7 +1,7 @@
#include <iostream>
#include <string>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kinstance.h>
@@ -13,24 +13,24 @@
#include <kexidb/parser/parser.h>
using namespace std;
-QCString prgname;
+TQCString prgname;
int main(int argc, char **argv)
{
kdDebug() << "main()" << endl;
- QFileInfo info=QFileInfo(argv[0]);
+ TQFileInfo info=TQFileInfo(argv[0]);
prgname = info.baseName().latin1();
KInstance instance( prgname );
if (argc<2) {
return 1;
}
- QCString drv_name(argv[1]);
- QCString db_name = QString(argv[2]).lower().latin1();
+ TQCString drv_name(argv[1]);
+ TQCString db_name = TQString(argv[2]).lower().latin1();
KexiDB::DriverManager manager; // = KexiDB::DriverManager::self();
- QStringList names = manager.driverNames();
+ TQStringList names = manager.driverNames();
kdDebug() << "DRIVERS: " << endl;
- for (QStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
+ for (TQStringList::ConstIterator it = names.constBegin(); it != names.constEnd() ; ++it)
kdDebug() << *it << endl;
if (manager.error()) {
kdDebug() << manager.errorMsg() << endl;
diff --git a/kexi/tests/startup/main.cpp b/kexi/tests/startup/main.cpp
index dd2e86ce0..3d97ac326 100644
--- a/kexi/tests/startup/main.cpp
+++ b/kexi/tests/startup/main.cpp
@@ -43,9 +43,9 @@ int main(int argc, char* argv[])
KexiTableViewData data;
KexiTableViewColumn col;
- col.type = QVariant::Int; col.caption = "Id"; data.addColumn( col );
- col.type = QVariant::String; col.caption = "Name"; data.addColumn( col );
- col.type = QVariant::Int; col.caption = "Age"; data.addColumn( col );
+ col.type = TQVariant::Int; col.caption = "Id"; data.addColumn( col );
+ col.type = TQVariant::String; col.caption = "Name"; data.addColumn( col );
+ col.type = TQVariant::Int; col.caption = "Age"; data.addColumn( col );
tv.setData(&data, false);
tv.show();*/
@@ -76,9 +76,9 @@ int main(int argc, char* argv[])
KexiStartupDialog startup(KexiStartupDialog::Everything, 0, connset, prj_set, 0, "dlg");
int e=startup.exec();
- kdDebug() << (e==QDialog::Accepted ? "Accepted" : "Rejected") << endl;
+ kdDebug() << (e==TQDialog::Accepted ? "Accepted" : "Rejected") << endl;
- if (e==QDialog::Accepted) {
+ if (e==TQDialog::Accepted) {
int r = startup.result();
if (r==KexiStartupDialog::TemplateResult) {
kdDebug() << "Template key == " << startup.selectedTemplateKey() << endl;
@@ -86,8 +86,8 @@ int main(int argc, char* argv[])
#if 0
KexiConnSelectorDialog sel(connset, 0,"sel");
e = sel.exec();
- kdDebug() << (e==QDialog::Accepted ? "Accepted" : "Rejected") << endl;
- if (e==QDialog::Accepted) {
+ kdDebug() << (e==TQDialog::Accepted ? "Accepted" : "Rejected") << endl;
+ if (e==TQDialog::Accepted) {
kdDebug() << "Selected conn. type: " << (sel.selectedConnectionType()==KexiConnSelectorWidget::FileBased ? "File based" : "Server based") << endl;
if (sel.selectedConnectionType()==KexiConnSelectorWidget::ServerBased) {
kdDebug() << "SERVER: " << sel.selectedConnectionData()->serverInfoString() << endl;
@@ -98,7 +98,7 @@ int main(int argc, char* argv[])
}
else if (r==KexiStartupDialog::OpenExistingResult) {
kdDebug() << "Existing project --------" << endl;
- QString selFile = startup.selectedExistingFile();
+ TQString selFile = startup.selectedExistingFile();
if (!selFile.isEmpty())
kdDebug() << "Project File: " << selFile << endl;
else if (startup.selectedExistingConnection()) {
diff --git a/kexi/tests/widgets/kexidbdrivercombotest.cpp b/kexi/tests/widgets/kexidbdrivercombotest.cpp
index 8feb56fa3..1ada79b17 100644
--- a/kexi/tests/widgets/kexidbdrivercombotest.cpp
+++ b/kexi/tests/widgets/kexidbdrivercombotest.cpp
@@ -22,8 +22,8 @@
* OTHER DEALINGS IN THE SOFTWARE. *
***************************************************************************/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
@@ -53,21 +53,21 @@ int main(int argc, char** argv)
KexiDB::Driver::InfoMap drvs = manager.driversInfo();
// Set up a combo box and a quit widget in a new container
- QWidget* vbox = new QWidget();
- QVBoxLayout* vbLayout = new QVBoxLayout(vbox);
+ TQWidget* vbox = new TQWidget();
+ TQVBoxLayout* vbLayout = new TQVBoxLayout(vbox);
KexiDBDriverComboBox* all = new KexiDBDriverComboBox(vbox, drvs);
KexiDBDriverComboBox* srvOnly = new KexiDBDriverComboBox(vbox, drvs,
KexiDBDriverComboBox::ShowServerDrivers);
- QPushButton* quit = new QPushButton("Quit", vbox);
+ TQPushButton* quit = new TQPushButton("Quit", vbox);
vbLayout->addWidget(all); // Combobox listing all drivers
vbLayout->addWidget(srvOnly); // Combobox only drivers for DB servers
vbLayout->addWidget(quit);
// Show the whole lot
- QObject::connect(quit, SIGNAL(clicked()), app, SLOT(quit()));
+ TQObject::connect(quit, TQT_SIGNAL(clicked()), app, TQT_SLOT(quit()));
vbox->show();
app->exec();
diff --git a/kexi/tools/delete_column/kexi_delete_column b/kexi/tools/delete_column/kexi_delete_column
index 22566c618..2f4d8d40f 100755
--- a/kexi/tools/delete_column/kexi_delete_column
+++ b/kexi/tools/delete_column/kexi_delete_column
@@ -127,7 +127,7 @@ for fname in `$ksqlite "$temp_db" \
column_order=`expr $column_order + 1`
done
-# 3. Copy the original database file to .old file and replace
+# 3. Copy the original database file to .old file and tqreplace
# the original with the new one
cp "$database_name" "$database_name.old" || exit_with_error
mv "$temp_db" "$database_name" || exit_with_error
diff --git a/kexi/widget/kexibrowser.cpp b/kexi/widget/kexibrowser.cpp
index ca637cd2c..a4ec402f9 100644
--- a/kexi/widget/kexibrowser.cpp
+++ b/kexi/widget/kexibrowser.cpp
@@ -22,12 +22,12 @@
#include "kexibrowser_p.h"
#include "kexibrowseritem.h"
-#include <qheader.h>
-#include <qpoint.h>
-#include <qpixmapcache.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqheader.h>
+#include <tqpoint.h>
+#include <tqpixmapcache.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -53,23 +53,23 @@
#include <kexidb/utils.h>
/*
-class KexiBrowserView : public QWidget
+class KexiBrowserView : public TQWidget
{
KexiBrowserView*(
};
KexiBrowserView::KexiBrowserView(KexiMainWindow *mainWin)
- : QWidget(mainWin, "KexiBrowserView")
+ : TQWidget(mainWin, "KexiBrowserView")
{
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
KexiFlowLayout *buttons_flyr = new KexiFlowLayout(lyr);
m_browser = KexiBrowser(this, mainWin);
lyr->addWidget(m_browser);
setFocusProxy(m_browser);
}*/
-KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
- : QWidget(parent, "KexiBrowser")
+KexiBrowser::KexiBrowser(TQWidget* tqparent, KexiMainWindow *mainWin, int features)
+ : TQWidget(tqparent, "KexiBrowser")
, m_mainWin(mainWin)
, m_features(features)
, m_actions( new KActionCollection(this) )
@@ -84,14 +84,14 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
setCaption(i18n("Project Navigator"));
setIcon(*m_mainWin->icon());
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
KexiFlowLayout *buttons_flyr = new KexiFlowLayout(lyr);
m_list = new KexiBrowserListView(this);
lyr->addWidget(m_list);
m_list->installEventFilter(this);
m_list->renameLineEdit()->installEventFilter(this);
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(0);
m_list->header()->hide();
@@ -101,30 +101,30 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
m_list->sort();
m_list->setAllColumnsShowFocus(true);
m_list->setTooltipColumn(0);
- m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(this) );
- m_list->setResizeMode(QListView::LastColumn);
- connect(m_list, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem *, const QPoint&)));
- connect(m_list, SIGNAL(selectionChanged(QListViewItem*)), this,
- SLOT(slotSelectionChanged(QListViewItem*)));
+ m_list->renameLineEdit()->setValidator( new KexiUtils::IdentifierValidator(TQT_TQOBJECT(this)) );
+ m_list->setResizeMode(TQListView::LastColumn);
+ connect(m_list, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotContextMenu(KListView*, TQListViewItem *, const TQPoint&)));
+ connect(m_list, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this,
+ TQT_SLOT(slotSelectionChanged(TQListViewItem*)));
KConfig *config = kapp->config();
config->setGroup("MainWindow");
if ((m_features & SingleClickOpensItemOptionEnabled)
&& config->readBoolEntry("SingleClickOpensItem", false))
{
- connect(m_list, SIGNAL(executed(QListViewItem*)), this,
- SLOT(slotExecuteItem(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(executed(TQListViewItem*)), this,
+ TQT_SLOT(slotExecuteItem(TQListViewItem*)));
}
else {
- connect(m_list, SIGNAL(doubleClicked(QListViewItem*)), this,
- SLOT(slotExecuteItem(QListViewItem*)));
+ connect(m_list, TQT_SIGNAL(doubleClicked(TQListViewItem*)), this,
+ TQT_SLOT(slotExecuteItem(TQListViewItem*)));
m_list->enableExecuteArea = false;
}
// actions
- m_openAction = new KAction(i18n("&Open"), "fileopen", 0/*Qt::Key_Enter conflict!*/, this,
- SLOT(slotOpenObject()), this, "open_object");
+ m_openAction = new KAction(i18n("&Open"), "fileopen", 0/*TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this),
+ TQT_SLOT(slotOpenObject()), TQT_TQOBJECT(this), "open_object");
m_openAction->setToolTip(i18n("Open object"));
m_openAction->setWhatsThis(i18n("Opens object selected in the list"));
@@ -145,21 +145,21 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
m_newObjectPopup = 0;
}
else {
- m_deleteAction = new KAction(i18n("&Delete"), "editdelete", 0/*Qt::Key_Delete*/,
- this, SLOT(slotRemove()), m_actions, "edit_delete");
+ m_deleteAction = new KAction(i18n("&Delete"), "editdelete", 0/*TQt::Key_Delete*/,
+ TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), m_actions, "edit_delete");
//! @todo 1.1: just add "Delete" tooltip and what's this
- m_deleteAction->setToolTip(i18n("&Delete").replace("&",""));
+ m_deleteAction->setToolTip(i18n("&Delete").tqreplace("&",""));
m_renameAction = new KAction(i18n("&Rename"), "", 0,
- this, SLOT(slotRename()), m_actions, "edit_rename");
+ TQT_TQOBJECT(this), TQT_SLOT(slotRename()), m_actions, "edit_rename");
#ifdef KEXI_SHOW_UNIMPLEMENTED
- //todo plugSharedAction("edit_cut",SLOT(slotCut()));
- //todo plugSharedAction("edit_copy",SLOT(slotCopy()));
- //todo plugSharedAction("edit_paste",SLOT(slotPaste()));
+ //todo plugSharedAction("edit_cut",TQT_SLOT(slotCut()));
+ //todo plugSharedAction("edit_copy",TQT_SLOT(slotCopy()));
+ //todo plugSharedAction("edit_paste",TQT_SLOT(slotPaste()));
#endif
- m_designAction = new KAction(i18n("&Design"), "edit", 0/*Qt::CTRL + Qt::Key_Enter conflict!*/, this,
- SLOT(slotDesignObject()), this, "design_object");
+ m_designAction = new KAction(i18n("&Design"), "edit", 0/*TQt::CTRL + TQt::Key_Enter conflict!*/, TQT_TQOBJECT(this),
+ TQT_SLOT(slotDesignObject()), TQT_TQOBJECT(this), "design_object");
m_designAction->setToolTip(i18n("Design object"));
m_designAction->setWhatsThis(i18n("Starts designing of the object selected in the list"));
if (m_features & Toolbar) {
@@ -167,21 +167,21 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
buttons_flyr->add(btn);
}
- m_editTextAction = new KAction(i18n("Open in &Text View"), "", 0, this,
- SLOT(slotEditTextObject()), this, "editText_object");
+ m_editTextAction = new KAction(i18n("Open in &Text View"), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotEditTextObject()), TQT_TQOBJECT(this), "editText_object");
m_editTextAction->setToolTip(i18n("Open object in text view"));
m_editTextAction->setWhatsThis(i18n("Opens selected object in the list in text view"));
- m_newObjectAction = new KAction("", "filenew", 0, this, SLOT(slotNewObject()), this, "new_object");
+ m_newObjectAction = new KAction("", "filenew", 0, TQT_TQOBJECT(this), TQT_SLOT(slotNewObject()), TQT_TQOBJECT(this), "new_object");
if (m_features & Toolbar) {
- m_newObjectToolButton = new KexiSmallToolButton(this, "", QIconSet(), "new_object");
+ m_newObjectToolButton = new KexiSmallToolButton(this, "", TQIconSet(), "new_object");
m_newObjectPopup = new KPopupMenu(this, "newObjectPopup");
- connect(m_newObjectPopup, SIGNAL(aboutToShow()), this, SLOT(slotNewObjectPopupAboutToShow()));
+ connect(m_newObjectPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObjectPopupAboutToShow()));
// KexiPart::Part* part = Kexi::partManager().part("kexi/table");
// m_newObjectPopup->insertItem( SmallIconSet(part->info()->createItemIcon()), part->instanceName() );
m_newObjectToolButton->setPopup(m_newObjectPopup);
- m_newObjectToolButton->setPopupDelay(QApplication::startDragTime());
- connect(m_newObjectToolButton, SIGNAL(clicked()), this, SLOT(slotNewObject()));
+ m_newObjectToolButton->setPopupDelay(TQApplication::startDragTime());
+ connect(m_newObjectToolButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotNewObject()));
buttons_flyr->add(m_newObjectToolButton);
m_deleteObjectToolButton = new KexiSmallToolButton(this, m_deleteAction);
@@ -190,22 +190,22 @@ KexiBrowser::KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features)
}
}
- m_executeAction = new KAction(i18n("Execute"), "player_play", 0, this,
- SLOT(slotExecuteObject()), this, "data_execute");
+ m_executeAction = new KAction(i18n("Execute"), "player_play", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotExecuteObject()), TQT_TQOBJECT(this), "data_execute");
m_exportActionMenu = new KActionMenu(i18n("Export"));
m_dataExportAction = new KAction(i18n("Export->To File as Data &Table... ", "To &File as Data Table..."),
- "table", 0, this, SLOT(slotExportAsDataTable()), this, "exportAsDataTable");
+ "table", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportAsDataTable()), TQT_TQOBJECT(this), "exportAsDataTable");
m_dataExportAction->setWhatsThis(
i18n("Exports data from the currently selected table or query data to a file."));
m_exportActionMenu->insert( m_dataExportAction );
- m_printAction = new KAction(i18n("&Print..."), "fileprint", 0, this,
- SLOT(slotPrintItem()), this, "printItem");
+ m_printAction = new KAction(i18n("&Print..."), "fileprint", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotPrintItem()), TQT_TQOBJECT(this), "printItem");
m_printAction->setWhatsThis(
i18n("Prints data from the currently selected table or query."));
- m_pageSetupAction = new KAction(i18n("Page Setup..."), "", 0, this,
- SLOT(slotPageSetupForItem()), this, "pageSetupForItem");
+ m_pageSetupAction = new KAction(i18n("Page Setup..."), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT(slotPageSetupForItem()), TQT_TQOBJECT(this), "pageSetupForItem");
m_pageSetupAction->setWhatsThis(
i18n("Shows page setup for printing the active table or query."));
@@ -288,8 +288,8 @@ KexiBrowser::~KexiBrowser()
{
}
-void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
- QString* partManagerErrorMessages)
+void KexiBrowser::setProject(KexiProject* prj, const TQString& itemsMimeType,
+ TQString* partManagerErrorMessages)
{
clear();
m_itemsMimeType = itemsMimeType;
@@ -333,16 +333,16 @@ void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
}
else {
//add this error to the list that will be displayed later
- QString msg, details;
+ TQString msg, details;
KexiDB::getHTMLErrorMesage(&Kexi::partManager(), msg, details);
if (!msg.isEmpty() && partManagerErrorMessages) {
if (partManagerErrorMessages->isEmpty()) {
- *partManagerErrorMessages = QString("<qt><p>")
+ *partManagerErrorMessages = TQString("<qt><p>")
+i18n("Errors encountered during loading plugins:")+"<ul>";
}
- partManagerErrorMessages->append( QString("<li>") + msg );
+ partManagerErrorMessages->append( TQString("<li>") + msg );
if (!details.isEmpty())
- partManagerErrorMessages->append(QString("<br>")+details);
+ partManagerErrorMessages->append(TQString("<br>")+details);
partManagerErrorMessages->append("</li>");
}
}
@@ -351,7 +351,7 @@ void KexiBrowser::setProject(KexiProject* prj, const QString& itemsMimeType,
partManagerErrorMessages->append("</ul></p>");
}
-QString KexiBrowser::itemsMimeType() const
+TQString KexiBrowser::itemsMimeType() const
{
return m_itemsMimeType;
}
@@ -370,18 +370,18 @@ KexiBrowserItem *KexiBrowser::addGroup(KexiPart::Info& info)
KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item)
{
//part object for this item
- KexiBrowserItem *parent = item.mimeType().isEmpty() ? 0 : m_baseItems.find(item.mimeType().lower());
- return addItem(item, parent, parent->info());
+ KexiBrowserItem *tqparent = item.mimeType().isEmpty() ? 0 : m_baseItems.tqfind(item.mimeType().lower());
+ return addItem(item, tqparent, tqparent->info());
}
-KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item, KexiBrowserItem *parent, KexiPart::Info* info)
+KexiBrowserItem* KexiBrowser::addItem(KexiPart::Item& item, KexiBrowserItem *tqparent, KexiPart::Info* info)
{
-// if (!parent) //TODO: add "Other" part group for that
+// if (!tqparent) //TODO: add "Other" part group for that
// return 0;
-// kdDebug() << "KexiBrowser::addItem() found parent:" << parent << endl;
+// kdDebug() << "KexiBrowser::addItem() found tqparent:" << tqparent << endl;
KexiBrowserItem *bitem;
- if (parent)
- bitem = new KexiBrowserItem(parent, info, &item);
+ if (tqparent)
+ bitem = new KexiBrowserItem(tqparent, info, &item);
else
bitem = new KexiBrowserItem(m_list, info, &item);
m_normalItems.insert(item.identifier(), bitem);
@@ -397,10 +397,10 @@ KexiBrowser::slotRemoveItem(const KexiPart::Item &item)
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(m_list->selectedItem());
- QListViewItem *new_item_to_select = 0;
+ TQListViewItem *new_item_to_select = 0;
if (it==to_remove) {//compute item to select if current one will be removed
new_item_to_select = it->itemBelow();//nearest item to select
- if (!new_item_to_select || new_item_to_select->parent()!=it->parent()) {
+ if (!new_item_to_select || new_item_to_select->tqparent()!=it->tqparent()) {
new_item_to_select = it->itemAbove();
}
}
@@ -411,7 +411,7 @@ KexiBrowser::slotRemoveItem(const KexiPart::Item &item)
}
void
-KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPoint &pos)
+KexiBrowser::slotContextMenu(KListView* /*list*/, TQListViewItem *item, const TQPoint &pos)
{
if(!item || !(m_features & ContextMenus))
return;
@@ -420,8 +420,8 @@ KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPo
if (bit->item()) {
pm = m_itemPopup;
//update popup title
- QString title_text = bit->text(0).stripWhiteSpace();
- KexiBrowserItem *par_it = static_cast<KexiBrowserItem*>(bit->parent());
+ TQString title_text = bit->text(0).stripWhiteSpace();
+ KexiBrowserItem *par_it = static_cast<KexiBrowserItem*>(bit->tqparent());
KexiPart::Part* par_part = 0;
if (par_it && par_it->info() && ((par_part = Kexi::partManager().part(par_it->info()))) && !par_part->instanceCaption().isEmpty()) {
//add part type name
@@ -431,23 +431,23 @@ KexiBrowser::slotContextMenu(KListView* /*list*/, QListViewItem *item, const QPo
}
else if (m_partPopup) {
pm = m_partPopup;
- QString title_text = bit->text(0).stripWhiteSpace();
+ TQString title_text = bit->text(0).stripWhiteSpace();
pm->changeTitle(m_partPopupTitle_id, *bit->pixmap(0), title_text);
/* KexiPart::Part* part = Kexi::partManager().part(bit->info());
if (part)
- m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceName() ));
+ m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceName() ));
else
m_newObjectAction->setText(i18n("&Create Object..."));
m_newObjectAction->setIconSet( SmallIconSet(bit->info()->itemIcon()) );*/
m_list->setCurrentItem(item);
- m_list->repaintItem(item);
+ m_list->tqrepaintItem(item);
}
if (pm)
pm->exec(pos);
}
void
-KexiBrowser::slotExecuteItem(QListViewItem *vitem)
+KexiBrowser::slotExecuteItem(TQListViewItem *vitem)
{
// kdDebug() << "KexiBrowser::slotExecuteItem()" << endl;
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(vitem);
@@ -464,14 +464,14 @@ KexiBrowser::slotExecuteItem(QListViewItem *vitem)
}
void
-KexiBrowser::slotSelectionChanged(QListViewItem* i)
+KexiBrowser::slotSelectionChanged(TQListViewItem* i)
{
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(i);
if (!it)
return;
KexiPart::Part* part = Kexi::partManager().part(it->info());
if (!part) {
- it = static_cast<KexiBrowserItem*>(it->parent());
+ it = static_cast<KexiBrowserItem*>(it->tqparent());
if (it) {
part = Kexi::partManager().part(it->info());
}
@@ -523,14 +523,14 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
m_prevSelectedPart = part;
if (part) {
if (m_newObjectAction) {
- m_newObjectAction->setText(i18n("&Create Object: %1...").arg( part->instanceCaption() ));
+ m_newObjectAction->setText(i18n("&Create Object: %1...").tqarg( part->instanceCaption() ));
m_newObjectAction->setIcon( part->info()->createItemIcon() );
if (m_features & Toolbar) {
m_newObjectToolButton->setIconSet( part->info()->createItemIcon() );
- QToolTip::add(m_newObjectToolButton,
- i18n("Create object: %1").arg( part->instanceCaption().lower() ));
- QWhatsThis::add(m_newObjectToolButton,
- i18n("Creates a new object: %1").arg( part->instanceCaption().lower() ));
+ TQToolTip::add(m_newObjectToolButton,
+ i18n("Create object: %1").tqarg( part->instanceCaption().lower() ));
+ TQWhatsThis::add(m_newObjectToolButton,
+ i18n("Creates a new object: %1").tqarg( part->instanceCaption().lower() ));
}
}
} else {
@@ -540,8 +540,8 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
// m_newObjectToolbarAction->setText(m_newObjectAction->text());
if (m_features & Toolbar) {
m_newObjectToolButton->setIconSet( "filenew" );
- QToolTip::add(m_newObjectToolButton, i18n("Create object"));
- QWhatsThis::add(m_newObjectToolButton, i18n("Creates a new object"));
+ TQToolTip::add(m_newObjectToolButton, i18n("Create object"));
+ TQWhatsThis::add(m_newObjectToolButton, i18n("Creates a new object"));
}
}
}
@@ -549,56 +549,56 @@ KexiBrowser::slotSelectionChanged(QListViewItem* i)
emit selectionChanged(it ? it->item() : 0);
}
-void KexiBrowser::installEventFilter ( const QObject * filterObj )
+void KexiBrowser::installEventFilter ( const TQObject * filterObj )
{
if (!filterObj)
return;
- m_list->installEventFilter ( filterObj );
- QWidget::installEventFilter ( filterObj );
+ m_list->installEventFilter ( const_cast<TQObject*>(filterObj) );
+ TQWidget::installEventFilter ( const_cast<TQObject*>(filterObj) );
}
-bool KexiBrowser::eventFilter ( QObject *o, QEvent * e )
+bool KexiBrowser::eventFilter ( TQObject *o, TQEvent * e )
{
- if (o==m_list && e->type()==QEvent::Resize) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list) && e->type()==TQEvent::Resize) {
kdDebug() << "resize!" << endl;
}
- if (o==m_list->renameLineEdit()) {
- if (e->type()==QEvent::Hide)
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_list->renameLineEdit())) {
+ if (e->type()==TQEvent::Hide)
itemRenameDone();
}
- else if (e->type()==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
- if (0==(ke->state() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton))) {
- QListViewItem *it = m_list->selectedItem();
+ else if (e->type()==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
+ if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
+ if (0==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) {
+ TQListViewItem *it = m_list->selectedItem();
if (it)
slotExecuteItem(it);
}
- else if (Qt::ControlButton==(ke->state() & (Qt::ShiftButton|Qt::ControlButton|Qt::AltButton))) {
+ else if (TQt::ControlButton==(ke->state() & (TQt::ShiftButton|TQt::ControlButton|TQt::AltButton))) {
slotDesignObject();
}
}
}
- else if (e->type()==QEvent::AccelOverride) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ else if (e->type()==TQEvent::AccelOverride) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
//override delete action
- if (ke->key()==Qt::Key_Delete && ke->state()==Qt::NoButton) {
+ if (ke->key()==TQt::Key_Delete && ke->state()==Qt::NoButton) {
slotRemove();
ke->accept();
return true;
}
//override rename action
- if (ke->key()==Qt::Key_F2 && ke->state()==Qt::NoButton) {
+ if (ke->key()==TQt::Key_F2 && ke->state()==Qt::NoButton) {
slotRename();
ke->accept();
return true;
}
-/* else if (ke->key()==Qt::Key_Enter || ke->key()==Qt::Key_Return) {
+/* else if (ke->key()==TQt::Key_Enter || ke->key()==TQt::Key_Return) {
if (ke->state()==ControlButton) {
slotDesignObject();
}
else if (ke->state()==0 && !m_list->renameLineEdit()->isVisible()) {
- QListViewItem *it = m_list->selectedItem();
+ TQListViewItem *it = m_list->selectedItem();
if (it)
slotExecuteItem(it);
}
@@ -695,7 +695,7 @@ void KexiBrowser::itemRenameDone()
KexiBrowserItem *it = static_cast<KexiBrowserItem*>(m_list->selectedItem());
if (!it)
return;
- QString txt = it->text(0).stripWhiteSpace();
+ TQString txt = it->text(0).stripWhiteSpace();
bool ok = it->item()->name().lower()!=txt.lower(); //the new name must be different
if (ok) {
/* TODO */
@@ -710,7 +710,7 @@ void KexiBrowser::itemRenameDone()
m_list->nameEndsWithAsterisk = false;
}
it->setText(0, txt);
- it->parent()->sort();
+ it->tqparent()->sort();
setFocus();
}
@@ -749,7 +749,7 @@ void KexiBrowser::selectItem(KexiPart::Item& item)
void KexiBrowser::clearSelection()
{
m_list->clearSelection();
- QListViewItem *item = m_list->firstChild();
+ TQListViewItem *item = m_list->firstChild();
if (item) {
m_list->ensureItemVisible(item);
}
@@ -763,7 +763,7 @@ void KexiBrowser::slotNewObjectPopupAboutToShow()
for (KexiPart::PartInfoListIterator it(*list); it.current(); ++it) {
//add an item to "New object" toolbar popup
KAction *action = m_mainWin->actionCollection()->action(
- KexiPart::nameForCreateAction(*it.current()) );
+ TQString(KexiPart::nameForCreateAction(*it.current())) );
if (action) {
action->plug(m_newObjectPopup);
}
@@ -798,7 +798,7 @@ KexiPart::Item* KexiBrowser::selectedPartItem() const
return it ? it->item() : 0;
}
-bool KexiBrowser::actionEnabled(const QCString& actionName) const
+bool KexiBrowser::actionEnabled(const TQCString& actionName) const
{
if (actionName=="project_export_data_table" && (m_features & ContextMenus))
return m_itemPopup->isItemVisible(m_exportActionMenu_id);
@@ -852,8 +852,8 @@ void KexiBrowser::clear()
}
//--------------------------------------------
-KexiBrowserListView::KexiBrowserListView(QWidget *parent)
- : KListView(parent, "KexiBrowserListView")
+KexiBrowserListView::KexiBrowserListView(TQWidget *tqparent)
+ : KListView(tqparent, "KexiBrowserListView")
, nameEndsWithAsterisk(false)
, enableExecuteArea(true)
{
@@ -863,7 +863,7 @@ KexiBrowserListView::~KexiBrowserListView()
{
}
-void KexiBrowserListView::rename(QListViewItem *item, int c)
+void KexiBrowserListView::rename(TQListViewItem *item, int c)
{
if (renameLineEdit()->isVisible())
return;
@@ -881,7 +881,7 @@ void KexiBrowserListView::rename(QListViewItem *item, int c)
}
}
-bool KexiBrowserListView::isExecuteArea( const QPoint& point )
+bool KexiBrowserListView::isExecuteArea( const TQPoint& point )
{
return enableExecuteArea && KListView::isExecuteArea(point);
}
diff --git a/kexi/widget/kexibrowser.h b/kexi/widget/kexibrowser.h
index 1bdc5d25f..df51197a3 100644
--- a/kexi/widget/kexibrowser.h
+++ b/kexi/widget/kexibrowser.h
@@ -22,10 +22,10 @@
#define KEXIBROWSER_H
#include <klistview.h>
-#include <qasciidict.h>
-#include <qintdict.h>
+#include <tqasciidict.h>
+#include <tqintdict.h>
-class QListViewItem;
+class TQListViewItem;
class KIconLoader;
class KPopupMenu;
class KAction;
@@ -48,9 +48,10 @@ namespace KexiPart
class KexiProject;
//! @short The Main Kexi navigator widget
-class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
+class KEXIEXTWIDGETS_EXPORT KexiBrowser : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Features {
@@ -62,29 +63,29 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
| SingleClickOpensItemOptionEnabled //!< the default
};
- KexiBrowser(QWidget* parent, KexiMainWindow *mainWin, int features = DefaultFeatures);
+ KexiBrowser(TQWidget* tqparent, KexiMainWindow *mainWin, int features = DefaultFeatures);
virtual ~KexiBrowser();
/*! Sets project \a prj for this browser. If \a partManagerErrorMessages is not NULL
it will be set to error message if there's a problem with loading any KexiPart.
If \a itemsMimeType is empty (the default), items of all mime types are displayed,
- items for only one mime type are displayed. In the latter case, no group (parent)
+ items for only one mime type are displayed. In the latter case, no group (tqparent)
items are displayed.
Previous items are removed. */
- void setProject(KexiProject* prj, const QString& itemsMimeType = QString::null,
- QString* partManagerErrorMessages = 0);
+ void setProject(KexiProject* prj, const TQString& itemsMimeType = TQString(),
+ TQString* partManagerErrorMessages = 0);
/*! \return items' mime type previously set by setProject. Returns empty string
if setProject() was not executed yet or itemsMimeType argument of setProject() was
empty (i.e. all mime types are displayed). */
- QString itemsMimeType() const;
+ TQString itemsMimeType() const;
KexiPart::Item* selectedPartItem() const;
- void installEventFilter ( const QObject * filterObj );
- virtual bool eventFilter ( QObject *o, QEvent * e );
+ void installEventFilter ( const TQObject * filterObj );
+ virtual bool eventFilter ( TQObject *o, TQEvent * e );
- bool actionEnabled(const QCString& actionName) const;
+ bool actionEnabled(const TQCString& actionName) const;
public slots:
KexiBrowserItem* addGroup(KexiPart::Info& info);
@@ -115,7 +116,7 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
void removeItem( KexiPart::Item* );
- void renameItem( KexiPart::Item *item, const QString& _newName, bool &succes );
+ void renameItem( KexiPart::Item *item, const TQString& _newName, bool &succes );
void selectionChanged( KexiPart::Item* item );
@@ -128,9 +129,9 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
void pageSetupForItem( KexiPart::Item* );
protected slots:
- void slotContextMenu(KListView*, QListViewItem *i, const QPoint &point);
- void slotExecuteItem(QListViewItem *item);
- void slotSelectionChanged(QListViewItem* i);
+ void slotContextMenu(KListView*, TQListViewItem *i, const TQPoint &point);
+ void slotExecuteItem(TQListViewItem *item);
+ void slotSelectionChanged(TQListViewItem* i);
void slotSettingsChanged(int);
void slotNewObjectPopupAboutToShow();
@@ -150,14 +151,14 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
protected:
void itemRenameDone();
- KexiBrowserItem* addItem(KexiPart::Item& item, KexiBrowserItem *parent, KexiPart::Info* info);
+ KexiBrowserItem* addItem(KexiPart::Item& item, KexiBrowserItem *tqparent, KexiPart::Info* info);
KexiMainWindow *m_mainWin;
int m_features;
KexiBrowserListView *m_list;
KActionCollection *m_actions;
- QAsciiDict<KexiBrowserItem> m_baseItems;
- QIntDict<KexiBrowserItem> m_normalItems;
+ TQAsciiDict<KexiBrowserItem> m_baseItems;
+ TQIntDict<KexiBrowserItem> m_normalItems;
KPopupMenu *m_itemPopup, *m_partPopup;
KAction *m_deleteAction, *m_renameAction,
*m_newObjectAction, // *m_newObjectToolbarAction,
@@ -175,7 +176,7 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowser : public QWidget
KexiPart::Part *m_prevSelectedPart;
KToolBar *m_toolbar;
KexiSmallToolButton *m_newObjectToolButton, *m_deleteObjectToolButton;
- QString m_itemsMimeType;
+ TQString m_itemsMimeType;
bool m_singleClick : 1;
bool m_readOnly : 1;
};
diff --git a/kexi/widget/kexibrowser_p.h b/kexi/widget/kexibrowser_p.h
index b5610d24c..4459daab2 100644
--- a/kexi/widget/kexibrowser_p.h
+++ b/kexi/widget/kexibrowser_p.h
@@ -27,16 +27,17 @@
class KexiBrowserListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiBrowserListView(QWidget *parent);
+ KexiBrowserListView(TQWidget *tqparent);
~KexiBrowserListView();
- virtual bool isExecuteArea( const QPoint& point );
+ virtual bool isExecuteArea( const TQPoint& point );
bool nameEndsWithAsterisk : 1;
bool enableExecuteArea : 1; //!< used in isExecuteArea()
public slots:
- virtual void rename(QListViewItem *item, int c);
+ virtual void rename(TQListViewItem *item, int c);
protected:
};
diff --git a/kexi/widget/kexibrowseritem.cpp b/kexi/widget/kexibrowseritem.cpp
index 087039f06..24f1d46c6 100644
--- a/kexi/widget/kexibrowseritem.cpp
+++ b/kexi/widget/kexibrowseritem.cpp
@@ -24,8 +24,8 @@
#include <kiconloader.h>
#include <core/kexipartinfo.h>
-KexiBrowserItem::KexiBrowserItem(KListView *parent, KexiPart::Info *i)
- : KListViewItem(parent, i->groupName())
+KexiBrowserItem::KexiBrowserItem(KListView *tqparent, KexiPart::Info *i)
+ : KListViewItem(tqparent, i->groupName())
, m_info(i)
, m_item(0)
{
@@ -36,8 +36,8 @@ KexiBrowserItem::KexiBrowserItem(KListView *parent, KexiPart::Info *i)
m_fifoSorting = 1; //because this is top level item
}
-KexiBrowserItem::KexiBrowserItem(KListViewItem *parent, KexiPart::Info *i, KexiPart::Item *item)
- : KListViewItem(parent, item->name())
+KexiBrowserItem::KexiBrowserItem(KListViewItem *tqparent, KexiPart::Info *i, KexiPart::Item *item)
+ : KListViewItem(tqparent, item->name())
, m_info(i)
, m_item(item)
{
@@ -45,8 +45,8 @@ KexiBrowserItem::KexiBrowserItem(KListViewItem *parent, KexiPart::Info *i, KexiP
initItem();
}
-KexiBrowserItem::KexiBrowserItem(KListView *parent, KexiPart::Info *i, KexiPart::Item *item)
- : KListViewItem(parent, item->name())
+KexiBrowserItem::KexiBrowserItem(KListView *tqparent, KexiPart::Info *i, KexiPart::Item *item)
+ : KListViewItem(tqparent, item->name())
, m_info(i)
, m_item(item)
{
@@ -63,8 +63,8 @@ void KexiBrowserItem::initItem()
m_fifoSorting = 0;
int sortKey = 0;
// set sorting key with FIFO order
- if (parent()) {
- sortKey = parent()->childCount();
+ if (tqparent()) {
+ sortKey = tqparent()->childCount();
} else if (listView()) {
sortKey = listView()->childCount();
}
@@ -83,7 +83,7 @@ KexiBrowserItem::clearChildren()
}
}
-QString KexiBrowserItem::key( int column, bool ascending ) const
+TQString KexiBrowserItem::key( int column, bool ascending ) const
{
// kdDebug() << "KexiBrowserItem::key() : " << (m_fifoSorting ? m_sortKey : KListViewItem::key(column,ascending)) << endl;
return m_fifoSorting ? m_sortKey : KListViewItem::key(column,ascending);
diff --git a/kexi/widget/kexibrowseritem.h b/kexi/widget/kexibrowseritem.h
index 12c2fef64..a46f5a8df 100644
--- a/kexi/widget/kexibrowseritem.h
+++ b/kexi/widget/kexibrowseritem.h
@@ -22,7 +22,7 @@
#define KEXIBROWSERITEM_H
#include <klistview.h>
-#include <qstring.h>
+#include <tqstring.h>
#include <core/kexipartitem.h>
@@ -37,14 +37,14 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowserItem : public KListViewItem
{
public:
//! Creates group item for part \a i
- KexiBrowserItem(KListView *parent, KexiPart::Info *i);
+ KexiBrowserItem(KListView *tqparent, KexiPart::Info *i);
- //! Creates item for object \a item defined by part \a i for \a parent
- KexiBrowserItem(KListViewItem *parent, KexiPart::Info *i, KexiPart::Item *item);
+ //! Creates item for object \a item defined by part \a i for \a tqparent
+ KexiBrowserItem(KListViewItem *tqparent, KexiPart::Info *i, KexiPart::Item *item);
- //! Creates item for object \a item defined by part \a i, without parent
+ //! Creates item for object \a item defined by part \a i, without tqparent
//! (used in a case when KexiBrowser::itemsMimeType() is not empty)
- KexiBrowserItem(KListView *parent, KexiPart::Info *i, KexiPart::Item *item);
+ KexiBrowserItem(KListView *tqparent, KexiPart::Info *i, KexiPart::Item *item);
virtual ~KexiBrowserItem();
@@ -53,17 +53,17 @@ class KEXIEXTWIDGETS_EXPORT KexiBrowserItem : public KListViewItem
//! \return part info; should not be null.
KexiPart::Info *info() const { return m_info; }
- //! \return part item. Can be null if the browser item is a "folder", i.e. a parent node.
+ //! \return part item. Can be null if the browser item is a "folder", i.e. a tqparent node.
KexiPart::Item* item() const { return m_item; }
protected:
void initItem();
- virtual QString key( int column, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
KexiPart::Info *m_info;
KexiPart::Item *m_item;
- QString m_sortKey;
+ TQString m_sortKey;
bool m_fifoSorting : 1;
};
diff --git a/kexi/widget/kexicharencodingcombobox.cpp b/kexi/widget/kexicharencodingcombobox.cpp
index c1f505429..1b66f6a87 100644
--- a/kexi/widget/kexicharencodingcombobox.cpp
+++ b/kexi/widget/kexicharencodingcombobox.cpp
@@ -19,7 +19,7 @@
#include "kexicharencodingcombobox.h"
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <klocale.h>
@@ -27,25 +27,25 @@
#include <kcharsets.h>
KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox(
- QWidget* parent, const QString& selectedEncoding )
- : KComboBox( parent, "KexiCharacterEncodingComboBox" )
+ TQWidget* tqparent, const TQString& selectedEncoding )
+ : KComboBox( tqparent, "KexiCharacterEncodingComboBox" )
, m_defaultEncodingAdded(false)
{
- QString defaultEncoding(QString::fromLatin1(KGlobal::locale()->encoding()));
- QString defaultEncodingDescriptiveName;
+ TQString defaultEncoding(TQString::tqfromLatin1(KGlobal::locale()->encoding()));
+ TQString defaultEncodingDescriptiveName;
- QString _selectedEncoding = selectedEncoding;
+ TQString _selectedEncoding = selectedEncoding;
if (_selectedEncoding.isEmpty())
- _selectedEncoding = QString::fromLatin1(KGlobal::locale()->encoding());
+ _selectedEncoding = TQString::tqfromLatin1(KGlobal::locale()->encoding());
- QStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames());
- QStringList::ConstIterator it = descEncodings.constBegin();
+ TQStringList descEncodings(KGlobal::charsets()->descriptiveEncodingNames());
+ TQStringList::ConstIterator it = descEncodings.constBegin();
for (uint id = 0; it!=descEncodings.constEnd(); ++it)
{
bool found = false;
- QString name( KGlobal::charsets()->encodingForName( *it ) );
- QTextCodec *codecForEnc = KGlobal::charsets()->codecForName(name, found);
+ TQString name( KGlobal::charsets()->encodingForName( *it ) );
+ TQTextCodec *codecForEnc = KGlobal::charsets()->codecForName(name, found);
if (found) {
insertItem(*it);
if (codecForEnc->name() == defaultEncoding || name == defaultEncoding) {
@@ -65,8 +65,8 @@ KexiCharacterEncodingComboBox::KexiCharacterEncodingComboBox(
//prepend default encoding, if present
if (!defaultEncodingDescriptiveName.isEmpty()) {
m_defaultEncodingAdded = true;
- QString desc = i18n("Text encoding: Default", "Default: %1")
- .arg(defaultEncodingDescriptiveName);
+ TQString desc = i18n("Text encoding: Default", "Default: %1")
+ .tqarg(defaultEncodingDescriptiveName);
insertItem( desc, 0 );
if (_selectedEncoding==defaultEncoding) {
setCurrentItem(0);
@@ -81,19 +81,19 @@ KexiCharacterEncodingComboBox::~KexiCharacterEncodingComboBox()
{
}
-QString KexiCharacterEncodingComboBox::selectedEncoding() const
+TQString KexiCharacterEncodingComboBox::selectedEncoding() const
{
if (defaultEncodingSelected()) {
- return QString::fromLatin1(KGlobal::locale()->encoding());
+ return TQString::tqfromLatin1(KGlobal::locale()->encoding());
}
else {
return KGlobal::charsets()->encodingForName( currentText() );
}
}
-void KexiCharacterEncodingComboBox::setSelectedEncoding(const QString& encodingName)
+void KexiCharacterEncodingComboBox::setSelectedEncoding(const TQString& encodingName)
{
- QString desc = m_encodingDescriptionForName[encodingName];
+ TQString desc = m_encodingDescriptionForName[encodingName];
if (desc.isEmpty()) {
kdWarning() << "KexiCharacterEncodingComboBox::setSelectedEncoding(): "
"no such encoding \"" << encodingName << "\"" << endl;
diff --git a/kexi/widget/kexicharencodingcombobox.h b/kexi/widget/kexicharencodingcombobox.h
index 9af5a69f5..fd147cece 100644
--- a/kexi/widget/kexicharencodingcombobox.h
+++ b/kexi/widget/kexicharencodingcombobox.h
@@ -20,7 +20,7 @@
#ifndef KEXICHARENCODINGCOMBO_H
#define KEXICHARENCODINGCOMBO_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kcombobox.h>
/*! @short Combobox widget providing a list of possible character encodings.
@@ -30,18 +30,18 @@ class KEXIEXTWIDGETS_EXPORT KexiCharacterEncodingComboBox : public KComboBox
public:
//! Constructs a new combobox. \a selectedEncoding can be provided to preselect encoding.
//! If it is not provided, default encoding is selected for current system settings.
- KexiCharacterEncodingComboBox( QWidget* parent = 0,
- const QString& selectedEncoding = QString::null );
+ KexiCharacterEncodingComboBox( TQWidget* tqparent = 0,
+ const TQString& selectedEncoding = TQString() );
~KexiCharacterEncodingComboBox();
- QString selectedEncoding() const;
- void setSelectedEncoding(const QString& encodingName);
+ TQString selectedEncoding() const;
+ void setSelectedEncoding(const TQString& encodingName);
//! Selects default encoding, if present
void selectDefaultEncoding();
bool defaultEncodingSelected() const;
protected:
- QMap<QString,QString> m_encodingDescriptionForName;
+ TQMap<TQString,TQString> m_encodingDescriptionForName;
bool m_defaultEncodingAdded : 1;
};
diff --git a/kexi/widget/kexicustompropertyfactory.cpp b/kexi/widget/kexicustompropertyfactory.cpp
index 3df9e2339..e89727d06 100644
--- a/kexi/widget/kexicustompropertyfactory.cpp
+++ b/kexi/widget/kexicustompropertyfactory.cpp
@@ -29,15 +29,15 @@ using namespace KoProperty;
class PixmapIdCustomProperty : public CustomProperty
{
public:
- PixmapIdCustomProperty(Property *parent)
- : CustomProperty(parent) {
+ PixmapIdCustomProperty(Property *tqparent)
+ : CustomProperty(tqparent) {
}
virtual ~PixmapIdCustomProperty() {};
- virtual void setValue(const QVariant &value, bool rememberOldValue) {
+ virtual void setValue(const TQVariant &value, bool rememberOldValue) {
Q_UNUSED( value );
Q_UNUSED( rememberOldValue);
}
- virtual QVariant value() const { return m_property->value(); }
+ virtual TQVariant value() const { return m_property->value(); }
virtual bool handleValue() const {
return false; //m_property->type()==KexiCustomPropertyFactory::PixmapData;
}
@@ -47,27 +47,27 @@ class PixmapIdCustomProperty : public CustomProperty
class IdentifierCustomProperty : public CustomProperty
{
public:
- IdentifierCustomProperty(Property *parent)
- : CustomProperty(parent) {
+ IdentifierCustomProperty(Property *tqparent)
+ : CustomProperty(tqparent) {
}
virtual ~IdentifierCustomProperty() {};
- virtual void setValue(const QVariant &value, bool rememberOldValue)
+ virtual void setValue(const TQVariant &value, bool rememberOldValue)
{
Q_UNUSED(rememberOldValue);
if (!value.toString().isEmpty())
m_value = KexiUtils::string2Identifier(value.toString()).lower();
}
- virtual QVariant value() const { return m_value; }
+ virtual TQVariant value() const { return m_value; }
virtual bool handleValue() const {
return true;
}
- QString m_value;
+ TQString m_value;
};
//---------------
-KexiCustomPropertyFactory::KexiCustomPropertyFactory(QObject* parent)
-: CustomPropertyFactory(parent)
+KexiCustomPropertyFactory::KexiCustomPropertyFactory(TQObject* tqparent)
+: CustomPropertyFactory(tqparent)
{
}
@@ -75,13 +75,13 @@ KexiCustomPropertyFactory::~KexiCustomPropertyFactory()
{
}
-CustomProperty* KexiCustomPropertyFactory::createCustomProperty(Property *parent)
+CustomProperty* KexiCustomPropertyFactory::createCustomProperty(Property *tqparent)
{
- const int type = parent->type();
+ const int type = tqparent->type();
if (type==(int)KexiCustomPropertyFactory::PixmapId)
- return new PixmapIdCustomProperty(parent);
+ return new PixmapIdCustomProperty(tqparent);
else if (type==(int)KexiCustomPropertyFactory::Identifier)
- return new IdentifierCustomProperty(parent);
+ return new IdentifierCustomProperty(tqparent);
return 0;
}
@@ -103,7 +103,7 @@ void KexiCustomPropertyFactory::init()
// register custom editors and properties
KexiCustomPropertyFactory *factory = new KexiCustomPropertyFactory(KoProperty::FactoryManager::self());
- QValueList<int> types;
+ TQValueList<int> types;
types << KexiCustomPropertyFactory::PixmapId << KexiCustomPropertyFactory::Identifier;
KoProperty::FactoryManager::self()->registerFactoryForProperties(types, factory);
KoProperty::FactoryManager::self()->registerFactoryForEditors(types, factory);
diff --git a/kexi/widget/kexicustompropertyfactory.h b/kexi/widget/kexicustompropertyfactory.h
index c6e6e9732..d1550947e 100644
--- a/kexi/widget/kexicustompropertyfactory.h
+++ b/kexi/widget/kexicustompropertyfactory.h
@@ -35,10 +35,10 @@ class KEXIEXTWIDGETS_EXPORT KexiCustomPropertyFactory : public KoProperty::Custo
//! Called once to register all propert and editor types provided by this factory.
static void init();
- KexiCustomPropertyFactory(QObject* parent);
+ KexiCustomPropertyFactory(TQObject* tqparent);
virtual ~KexiCustomPropertyFactory();
- virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property *parent);
+ virtual KoProperty::CustomProperty* createCustomProperty(KoProperty::Property *tqparent);
virtual KoProperty::Widget* createCustomWidget(KoProperty::Property *prop);
};
diff --git a/kexi/widget/kexicustompropertyfactory_p.cpp b/kexi/widget/kexicustompropertyfactory_p.cpp
index 0e0a054d7..f5fbb90a8 100644
--- a/kexi/widget/kexicustompropertyfactory_p.cpp
+++ b/kexi/widget/kexicustompropertyfactory_p.cpp
@@ -19,7 +19,7 @@
#include "kexicustompropertyfactory_p.h"
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kdebug.h>
#include <koproperty/property.h>
#include <kexiutils/identifier.h>
@@ -27,8 +27,8 @@
using namespace KoProperty;
KexiImagePropertyEdit::KexiImagePropertyEdit(
- Property *property, QWidget *parent, const char *name)
- : PixmapEdit(property, parent, name)
+ Property *property, TQWidget *tqparent, const char *name)
+ : PixmapEdit(property, tqparent, name)
, m_id(0)
{
}
@@ -39,7 +39,7 @@ KexiImagePropertyEdit::~KexiImagePropertyEdit()
void KexiImagePropertyEdit::selectPixmap()
{
- QString fileName( PixmapEdit::selectPixmapFileName() );
+ TQString fileName( PixmapEdit::selectPixmapFileName() );
if (fileName.isEmpty())
return;
KexiBLOBBuffer::Handle h(KexiBLOBBuffer::self()->insertPixmap( KURL(fileName) ));
@@ -49,28 +49,28 @@ void KexiImagePropertyEdit::selectPixmap()
return;
ObjectTreeItem *item = m_manager->activeForm()->objectTree()->lookup(m_manager->activeForm()->selectedWidget()->name());
- QString name = item ? item->pixmapName(property()->name()) : "";
- PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, topLevelWidget() );
- if(dialog.exec() == QDialog::Accepted) {
+ TQString name = item ? item->pixmapName(property()->name()) : "";
+ PixmapCollectionChooser dialog( m_manager->activeForm()->pixmapCollection(), name, tqtopLevelWidget() );
+ if(dialog.exec() == TQDialog::Accepted) {
setValue(dialog.pixmap(), true);
item->setPixmapName(property()->name(), dialog.pixmapName());
}
#endif
}
-QVariant KexiImagePropertyEdit::value() const
+TQVariant KexiImagePropertyEdit::value() const
{
return (uint)/*! @todo unsafe*/m_id;
}
-void KexiImagePropertyEdit::setValue(const QVariant &value, bool emitChange)
+void KexiImagePropertyEdit::setValue(const TQVariant &value, bool emitChange)
{
m_id = value.toInt();
PixmapEdit::setValue(KexiBLOBBuffer::self()->objectForId(m_id).pixmap(), emitChange);
}
-void KexiImagePropertyEdit::drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r,
- const QVariant &value)
+void KexiImagePropertyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r,
+ const TQVariant &value)
{
KexiBLOBBuffer::Handle h( KexiBLOBBuffer::self()->objectForId(value.toInt()) );
PixmapEdit::drawViewer(p, cg, r, h.pixmap());
@@ -79,29 +79,29 @@ void KexiImagePropertyEdit::drawViewer(QPainter *p, const QColorGroup &cg, const
//----------------------------------------------------------------
KexiIdentifierPropertyEdit::KexiIdentifierPropertyEdit(
- Property *property, QWidget *parent, const char *name)
- : StringEdit(property, parent, name)
+ Property *property, TQWidget *tqparent, const char *name)
+ : StringEdit(property, tqparent, name)
{
m_edit->setValidator(
- new KexiUtils::IdentifierValidator(m_edit, "KexiIdentifierPropertyEdit Validator") );
+ new KexiUtils::IdentifierValidator(TQT_TQOBJECT(m_edit), "KexiIdentifierPropertyEdit Validator") );
}
KexiIdentifierPropertyEdit::~KexiIdentifierPropertyEdit()
{
}
-void KexiIdentifierPropertyEdit::setValue(const QVariant &value, bool emitChange)
+void KexiIdentifierPropertyEdit::setValue(const TQVariant &value, bool emitChange)
{
- QString string(value.toString());
+ TQString string(value.toString());
if (string.isEmpty()) {
kdWarning() << "KexiIdentifierPropertyEdit::setValue(): "
"Value cannot be empty. This call has no effect." << endl;
return;
}
- QString identifier( KexiUtils::string2Identifier(string) );
+ TQString identifier( KexiUtils::string2Identifier(string) );
if (identifier!=string)
- kdDebug() << QString("KexiIdentifierPropertyEdit::setValue(): "
- "String \"%1\" converted to identifier \"%2\".").arg(string).arg(identifier) << endl;
+ kdDebug() << TQString("KexiIdentifierPropertyEdit::setValue(): "
+ "String \"%1\" converted to identifier \"%2\".").tqarg(string).tqarg(identifier) << endl;
StringEdit::setValue( identifier, emitChange );
}
diff --git a/kexi/widget/kexicustompropertyfactory_p.h b/kexi/widget/kexicustompropertyfactory_p.h
index f1ec4b0f2..49a4066be 100644
--- a/kexi/widget/kexicustompropertyfactory_p.h
+++ b/kexi/widget/kexicustompropertyfactory_p.h
@@ -28,16 +28,17 @@
class KexiImagePropertyEdit : public KoProperty::PixmapEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiImagePropertyEdit(KoProperty::Property *property,
- QWidget *parent=0, const char *name=0);
+ TQWidget *tqparent=0, const char *name=0);
virtual ~KexiImagePropertyEdit();
- virtual QVariant value() const;
- virtual void setValue(const QVariant &value, bool emitChange=true);
- virtual void drawViewer(QPainter *p, const QColorGroup &cg, const QRect &r,
- const QVariant &value);
+ virtual TQVariant value() const;
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
+ virtual void drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r,
+ const TQVariant &value);
public slots:
virtual void selectPixmap();
@@ -56,16 +57,17 @@ class KexiImagePropertyEdit : public KoProperty::PixmapEdit
class KexiIdentifierPropertyEdit : public KoProperty::StringEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiIdentifierPropertyEdit(KoProperty::Property *property,
- QWidget *parent=0, const char *name=0);
+ TQWidget *tqparent=0, const char *name=0);
virtual ~KexiIdentifierPropertyEdit();
/*! Reimplemented: sets \a value but it is converted to identifier
using KexiUtils::string2Identifier().
If \a value is null or empty string, this method has no effect. */
- virtual void setValue(const QVariant &value, bool emitChange=true);
+ virtual void setValue(const TQVariant &value, bool emitChange=true);
};
#endif
diff --git a/kexi/widget/kexidataawareview.cpp b/kexi/widget/kexidataawareview.cpp
index 418f0aa14..c22c0dbbf 100644
--- a/kexi/widget/kexidataawareview.cpp
+++ b/kexi/widget/kexidataawareview.cpp
@@ -23,12 +23,12 @@
#include <utils/kexisharedactionclient.h>
#include <core/keximainwindow.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kpopupmenu.h>
-KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, KexiSearchAndReplaceViewInterface()
, m_internalView(0)
, m_actionClient(0)
@@ -36,7 +36,7 @@ KexiDataAwareView::KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, c
{
}
-void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actionClient,
+void KexiDataAwareView::init( TQWidget* viewWidget, KexiSharedActionClient* actionClient,
KexiDataAwareObjectInterface* dataAwareObject, bool noDataAware )
{
m_internalView = viewWidget;
@@ -45,23 +45,23 @@ void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actio
setViewWidget(m_internalView, true);
if (!noDataAware) {
- m_dataAwareObject->connectCellSelectedSignal(this, SLOT(slotCellSelected(int,int)));
+ m_dataAwareObject->connectCellSelectedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotCellSelected(int,int)));
//! before closing - we'are accepting editing
- connect(this, SIGNAL(closing(bool&)), this, SLOT(slotClosing(bool&)));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(closing(bool&)), TQT_TQOBJECT(this), TQT_SLOT(slotClosing(bool&)));
//! updating actions on start/stop editing
- m_dataAwareObject->connectRowEditStartedSignal(this, SLOT(slotUpdateRowActions(int)));
- m_dataAwareObject->connectRowEditTerminatedSignal(this, SLOT(slotUpdateRowActions(int)));
- m_dataAwareObject->connectReloadActionsSignal(this, SLOT(reloadActions()));
+ m_dataAwareObject->connectRowEditStartedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int)));
+ m_dataAwareObject->connectRowEditTerminatedSignal(TQT_TQOBJECT(this), TQT_SLOT(slotUpdateRowActions(int)));
+ m_dataAwareObject->connectReloadActionsSignal(TQT_TQOBJECT(this), TQT_SLOT(reloadActions()));
}
- QVBoxLayout *box = new QVBoxLayout(this);
+ TQVBoxLayout *box = new TQVBoxLayout(this);
box->addWidget(m_internalView);
- setMinimumSize(m_internalView->minimumSizeHint().width(),
- m_internalView->minimumSizeHint().height());
- resize( preferredSizeHint( m_internalView->sizeHint() ) );
+ setMinimumSize(m_internalView->tqminimumSizeHint().width(),
+ m_internalView->tqminimumSizeHint().height());
+ resize( preferredSizeHint( m_internalView->tqsizeHint() ) );
setFocusProxy(m_internalView);
if (!noDataAware) {
@@ -72,37 +72,37 @@ void KexiDataAwareView::init( QWidget* viewWidget, KexiSharedActionClient* actio
void KexiDataAwareView::initActions()
{
- plugSharedAction("edit_delete_row", this, SLOT(deleteCurrentRow()));
+ plugSharedAction("edit_delete_row", TQT_TQOBJECT(this), TQT_SLOT(deleteCurrentRow()));
m_actionClient->plugSharedAction(sharedAction("edit_delete_row")); //for proper shortcut
- plugSharedAction("edit_delete", this, SLOT(deleteAndStartEditCurrentCell()));
+ plugSharedAction("edit_delete", TQT_TQOBJECT(this), TQT_SLOT(deleteAndStartEditCurrentCell()));
m_actionClient->plugSharedAction(sharedAction("edit_delete")); //for proper shortcut
- plugSharedAction("edit_edititem", this, SLOT(startEditOrToggleValue()));
+ plugSharedAction("edit_edititem", TQT_TQOBJECT(this), TQT_SLOT(startEditOrToggleValue()));
m_actionClient->plugSharedAction(sharedAction("edit_edititem")); //for proper shortcut
- plugSharedAction("data_save_row", this, SLOT(acceptRowEdit()));
+ plugSharedAction("data_save_row", TQT_TQOBJECT(this), TQT_SLOT(acceptRowEdit()));
m_actionClient->plugSharedAction(sharedAction("data_save_row")); //for proper shortcut
- plugSharedAction("data_cancel_row_changes", this, SLOT(cancelRowEdit()));
+ plugSharedAction("data_cancel_row_changes", TQT_TQOBJECT(this), TQT_SLOT(cancelRowEdit()));
m_actionClient->plugSharedAction(sharedAction("data_cancel_row_changes")); //for proper shortcut
if (m_dataAwareObject->isSortingEnabled()) {
- plugSharedAction("data_sort_az", this, SLOT(sortAscending()));
- plugSharedAction("data_sort_za", this, SLOT(sortDescending()));
+ plugSharedAction("data_sort_az", TQT_TQOBJECT(this), TQT_SLOT(sortAscending()));
+ plugSharedAction("data_sort_za", TQT_TQOBJECT(this), TQT_SLOT(sortDescending()));
}
m_actionClient->plugSharedAction(sharedAction("edit_insert_empty_row")); //for proper shortcut
setAvailable("data_sort_az", m_dataAwareObject->isSortingEnabled());
setAvailable("data_sort_za", m_dataAwareObject->isSortingEnabled());
-//! \todo plugSharedAction("data_filter", this, SLOT(???()));
+//! \todo plugSharedAction("data_filter", TQT_TQOBJECT(this), TQT_SLOT(???()));
- plugSharedAction("data_go_to_first_record", this, SLOT(slotGoToFirstRow()));
- plugSharedAction("data_go_to_previous_record", this, SLOT(slotGoToPreviusRow()));
- plugSharedAction("data_go_to_next_record", this, SLOT(slotGoToNextRow()));
- plugSharedAction("data_go_to_last_record", this, SLOT(slotGoToLastRow()));
- plugSharedAction("data_go_to_new_record", this, SLOT(slotGoToNewRow()));
+ plugSharedAction("data_go_to_first_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToFirstRow()));
+ plugSharedAction("data_go_to_previous_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToPreviusRow()));
+ plugSharedAction("data_go_to_next_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNextRow()));
+ plugSharedAction("data_go_to_last_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToLastRow()));
+ plugSharedAction("data_go_to_new_record", TQT_TQOBJECT(this), TQT_SLOT(slotGoToNewRow()));
//! \todo update availability
setAvailable("data_go_to_first_record", true);
@@ -111,31 +111,31 @@ void KexiDataAwareView::initActions()
setAvailable("data_go_to_last_record", true);
setAvailable("data_go_to_new_record", true);
- plugSharedAction("edit_copy", this, SLOT(copySelection()));
+ plugSharedAction("edit_copy", TQT_TQOBJECT(this), TQT_SLOT(copySelection()));
m_actionClient->plugSharedAction(sharedAction("edit_copy")); //for proper shortcut
- plugSharedAction("edit_cut", this, SLOT(cutSelection()));
+ plugSharedAction("edit_cut", TQT_TQOBJECT(this), TQT_SLOT(cutSelection()));
m_actionClient->plugSharedAction(sharedAction("edit_cut")); //for proper shortcut
- plugSharedAction("edit_paste", this, SLOT(paste()));
+ plugSharedAction("edit_paste", TQT_TQOBJECT(this), TQT_SLOT(paste()));
m_actionClient->plugSharedAction(sharedAction("edit_paste")); //for proper shortcut
-// plugSharedAction("edit_find", this, SLOT(editFind()));
-// m_actionClient->plugSharedAction(sharedAction("edit_find")); //for proper shortcut
+// plugSharedAction("edit_tqfind", TQT_TQOBJECT(this), TQT_SLOT(editFind()));
+// m_actionClient->plugSharedAction(sharedAction("edit_tqfind")); //for proper shortcut
-// plugSharedAction("edit_findnext", this, SLOT(editFindNext()));
+// plugSharedAction("edit_findnext", TQT_TQOBJECT(this), TQT_SLOT(editFindNext()));
// m_actionClient->plugSharedAction(sharedAction("edit_findnext")); //for proper shortcut
-// plugSharedAction("edit_findprevious", this, SLOT(editFindPrevious()));
+// plugSharedAction("edit_findprevious", TQT_TQOBJECT(this), TQT_SLOT(editFindPrevious()));
// m_actionClient->plugSharedAction(sharedAction("edit_findprev")); //for proper shortcut
-//! @todo plugSharedAction("edit_replace", this, SLOT(editReplace()));
-//! @todo m_actionClient->plugSharedAction(sharedAction("edit_replace")); //for proper shortcut
+//! @todo plugSharedAction("edit_tqreplace", TQT_TQOBJECT(this), TQT_SLOT(editReplace()));
+//! @todo m_actionClient->plugSharedAction(sharedAction("edit_tqreplace")); //for proper shortcut
-// setAvailable("edit_find", true);
+// setAvailable("edit_tqfind", true);
// setAvailable("edit_findnext", true);
// setAvailable("edit_findprevious", true);
-//! @todo setAvailable("edit_replace", true);
+//! @todo setAvailable("edit_tqreplace", true);
}
void KexiDataAwareView::slotUpdateRowActions(int row)
@@ -160,19 +160,19 @@ void KexiDataAwareView::slotUpdateRowActions(int row)
setAvailable("data_sort_za", sorting);
}
-QWidget* KexiDataAwareView::mainWidget()
+TQWidget* KexiDataAwareView::mainWidget()
{
return m_internalView;
}
-QSize KexiDataAwareView::minimumSizeHint() const
+TQSize KexiDataAwareView::tqminimumSizeHint() const
{
- return m_internalView ? m_internalView->minimumSizeHint() : QSize(0,0);//KexiViewBase::minimumSizeHint();
+ return m_internalView ? m_internalView->tqminimumSizeHint() : TQSize(0,0);//KexiViewBase::tqminimumSizeHint();
}
-QSize KexiDataAwareView::sizeHint() const
+TQSize KexiDataAwareView::tqsizeHint() const
{
- return m_internalView ? m_internalView->sizeHint() : QSize(0,0);//KexiViewBase::sizeHint();
+ return m_internalView ? m_internalView->tqsizeHint() : TQSize(0,0);//KexiViewBase::tqsizeHint();
}
void KexiDataAwareView::updateActions(bool activated)
@@ -188,7 +188,7 @@ void KexiDataAwareView::reloadActions()
//warning FIXME Move this to the table part
/*
kdDebug()<<"INIT ACTIONS***********************************************************************"<<endl;
- new KAction(i18n("Filter"), "filter", 0, this, SLOT(filter()), actionCollection(), "tablepart_filter");
+ new KAction(i18n("Filter"), "filter", 0, TQT_TQOBJECT(this), TQT_SLOT(filter()), actionCollection(), "tablepart_filter");
setXMLFile("kexidatatableui.rc");
*/
m_dataAwareObject->contextMenu()->clear();
@@ -200,11 +200,11 @@ void KexiDataAwareView::reloadActions()
bool separatorNeeded = true;
unplugSharedAction("edit_clear_table");
- plugSharedAction("edit_clear_table", this, SLOT(deleteAllRows()));
+ plugSharedAction("edit_clear_table", TQT_TQOBJECT(this), TQT_SLOT(deleteAllRows()));
if (m_dataAwareObject->isEmptyRowInsertingEnabled()) {
unplugSharedAction("edit_insert_empty_row");
- plugSharedAction("edit_insert_empty_row", m_internalView, SLOT(insertEmptyRow()));
+ plugSharedAction("edit_insert_empty_row", TQT_TQOBJECT(m_internalView), TQT_SLOT(insertEmptyRow()));
if (separatorNeeded)
m_dataAwareObject->contextMenu()->insertSeparator();
plugSharedAction("edit_insert_empty_row", m_dataAwareObject->contextMenu());
@@ -241,7 +241,7 @@ void KexiDataAwareView::slotCellSelected(int /*col*/, int row)
void KexiDataAwareView::deleteAllRows()
{
- m_dataAwareObject->deleteAllRows(true/*ask*/, true/*repaint*/);
+ m_dataAwareObject->deleteAllRows(true/*ask*/, true/*tqrepaint*/);
}
void KexiDataAwareView::deleteCurrentRow()
@@ -306,8 +306,8 @@ void KexiDataAwareView::slotGoToNextRow() { m_dataAwareObject->selectNextRow();
void KexiDataAwareView::slotGoToLastRow() { m_dataAwareObject->selectLastRow(); }
void KexiDataAwareView::slotGoToNewRow() { m_dataAwareObject->addNewRecordRequested(); }
-bool KexiDataAwareView::setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
- QString& currentColumnName)
+bool KexiDataAwareView::setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
+ TQString& currentColumnName)
{
if (!dataAwareObject() || !dataAwareObject()->data())
return false;
@@ -329,7 +329,7 @@ bool KexiDataAwareView::setupFindAndReplace(QStringList& columnNames, QStringLis
return true;
}
-tristate KexiDataAwareView::find(const QVariant& valueToFind,
+tristate KexiDataAwareView::tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next)
{
if (!dataAwareObject() || !dataAwareObject()->data())
@@ -337,8 +337,8 @@ tristate KexiDataAwareView::find(const QVariant& valueToFind,
// const KexiDataAwareObjectInterface::FindAndReplaceOptions options(dlg->options());
/* if (res == KexiFindDialog::Find) {*/
-// QVariant valueToFind(dlg->valueToFind());
- return dataAwareObject()->find( valueToFind, options, next );
+// TQVariant valueToFind(dlg->valueToFind());
+ return dataAwareObject()->tqfind( valueToFind, options, next );
/*
//! @todo result...
@@ -352,8 +352,8 @@ tristate KexiDataAwareView::find(const QVariant& valueToFind,
*/
}
-tristate KexiDataAwareView::findNextAndReplace(const QVariant& valueToFind,
- const QVariant& replacement,
+tristate KexiDataAwareView::findNextAndReplace(const TQVariant& valueToFind,
+ const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll)
{
if (!dataAwareObject() || !dataAwareObject()->data())
diff --git a/kexi/widget/kexidataawareview.h b/kexi/widget/kexidataawareview.h
index 8f1d369f7..31a43445a 100644
--- a/kexi/widget/kexidataawareview.h
+++ b/kexi/widget/kexidataawareview.h
@@ -42,32 +42,33 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase,
public KexiSearchAndReplaceViewInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDataAwareView(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiDataAwareView(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
- QWidget* mainWidget();
+ TQWidget* mainWidget();
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
KexiDataAwareObjectInterface* dataAwareObject() const { return m_dataAwareObject; }
- /*! Sets up data for find/replace dialog, based on view's data model.
+ /*! Sets up data for tqfind/replace dialog, based on view's data model.
Implemented for KexiSearchAndReplaceViewInterface. */
- virtual bool setupFindAndReplace(QStringList& columnNames, QStringList& columnCaptions,
- QString& currentColumnName);
+ virtual bool setupFindAndReplace(TQStringList& columnNames, TQStringList& columnCaptions,
+ TQString& currentColumnName);
/*! Finds \a valueToFind within the view.
Implemented for KexiSearchAndReplaceViewInterface. */
- virtual tristate find(const QVariant& valueToFind,
+ virtual tristate tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next);
/*! Finds \a valueToFind within the view and replaces with \a replacement.
Implemented for KexiSearchAndReplaceViewInterface. */
- virtual tristate findNextAndReplace(const QVariant& valueToFind,
- const QVariant& replacement,
+ virtual tristate findNextAndReplace(const TQVariant& valueToFind,
+ const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll);
public slots:
@@ -94,14 +95,14 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase,
void editReplace();*/
protected slots:
-// void slotCellSelected(const QVariant& v); //!< @internal
+// void slotCellSelected(const TQVariant& v); //!< @internal
void slotCellSelected(int col, int row);
void reloadActions();
void slotUpdateRowActions(int row);
void slotClosing(bool& cancel);
protected:
- void init( QWidget* viewWidget, KexiSharedActionClient* actionClient,
+ void init( TQWidget* viewWidget, KexiSharedActionClient* actionClient,
KexiDataAwareObjectInterface* dataAwareObject,
// temporary, for KexiFormView in design mode
bool noDataAware = false
@@ -109,7 +110,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDataAwareView : public KexiViewBase,
void initActions();
virtual void updateActions(bool activated);
- QWidget* m_internalView;
+ TQWidget* m_internalView;
KexiSharedActionClient* m_actionClient;
KexiDataAwareObjectInterface* m_dataAwareObject;
};
diff --git a/kexi/widget/kexidatasourcecombobox.cpp b/kexi/widget/kexidatasourcecombobox.cpp
index 77dc771fc..77895e246 100644
--- a/kexi/widget/kexidatasourcecombobox.cpp
+++ b/kexi/widget/kexidatasourcecombobox.cpp
@@ -34,7 +34,7 @@
#include <kexidb/connection.h>
#ifdef KEXI_SHOW_UNIMPLEMENTED
-#define ADD_DEFINEQUERY_ROW
+#define ADD_DEFINETQUERY_ROW
#endif
//! @internal
@@ -50,7 +50,7 @@ class KexiDataSourceComboBox::Private
}
int firstTableIndex() const {
int index = 1; //skip empty row
-#ifdef ADD_DEFINEQUERY_ROW
+#ifdef ADD_DEFINETQUERY_ROW
index++; /*skip 'define query' row*/
#endif
return index;
@@ -59,8 +59,8 @@ class KexiDataSourceComboBox::Private
return firstTableIndex() + tablesCount;
}
- QGuardedPtr<KexiProject> prj;
- QPixmap tableIcon, queryIcon;
+ TQGuardedPtr<KexiProject> prj;
+ TQPixmap tableIcon, queryIcon;
int tablesCount;
int prevIndex; //!< Used in slotActivated()
bool showTables : 1;
@@ -69,15 +69,15 @@ class KexiDataSourceComboBox::Private
//------------------------
-KexiDataSourceComboBox::KexiDataSourceComboBox(QWidget *parent, const char *name)
- : KComboBox(true/*rw*/, parent, name)
+KexiDataSourceComboBox::KexiDataSourceComboBox(TQWidget *tqparent, const char *name)
+ : KComboBox(true/*rw*/, tqparent, name)
, d(new Private())
{
setInsertionPolicy(NoInsertion);
setCompletionMode(KGlobalSettings::CompletionPopupAuto);
setSizeLimit( 16 );
- connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
- connect(this, SIGNAL(returnPressed(const QString &)), this, SLOT(slotReturnPressed(const QString &)));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
+ connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &)));
d->tableIcon = SmallIcon("table");
d->queryIcon = SmallIcon("query");
@@ -110,12 +110,12 @@ void KexiDataSourceComboBox::setProject(KexiProject *prj, bool showTables, bool
return;
//needed for updating contents of the combo box
- connect(d->prj, SIGNAL(newItemStored(KexiPart::Item&)),
- this, SLOT(slotNewItemStored(KexiPart::Item&)));
- connect(d->prj, SIGNAL(itemRemoved(const KexiPart::Item&)),
- this, SLOT(slotItemRemoved(const KexiPart::Item&)));
- connect(d->prj, SIGNAL(itemRenamed(const KexiPart::Item&, const QCString&)),
- this, SLOT(slotItemRenamed(const KexiPart::Item&, const QCString&)));
+ connect(d->prj, TQT_SIGNAL(newItemStored(KexiPart::Item&)),
+ this, TQT_SLOT(slotNewItemStored(KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRemoved(const KexiPart::Item&)),
+ this, TQT_SLOT(slotItemRemoved(const KexiPart::Item&)));
+ connect(d->prj, TQT_SIGNAL(itemRenamed(const KexiPart::Item&, const TQCString&)),
+ this, TQT_SLOT(slotItemRenamed(const KexiPart::Item&, const TQCString&)));
KexiDB::Connection *conn = d->prj->dbConnection();
if (!conn)
@@ -123,7 +123,7 @@ void KexiDataSourceComboBox::setProject(KexiProject *prj, bool showTables, bool
//special item: empty
insertItem("");
-#ifdef ADD_DEFINEQUERY_ROW
+#ifdef ADD_DEFINETQUERY_ROW
//special item: define query
insertItem(i18n("Define Query..."));
#endif
@@ -162,7 +162,7 @@ void KexiDataSourceComboBox::setProject(KexiProject *prj, bool showTables, bool
setCurrentItem(0);
}
-void KexiDataSourceComboBox::setDataSource(const QString& mimeType, const QString& name)
+void KexiDataSourceComboBox::setDataSource(const TQString& mimeType, const TQString& name)
{
if (name.isEmpty()) {
clearEdit();
@@ -172,7 +172,7 @@ void KexiDataSourceComboBox::setDataSource(const QString& mimeType, const QStrin
return;
}
- QString mt(mimeType);
+ TQString mt(mimeType);
if (mimeType.isEmpty())
mt="kexi/table";
int i = findItem(mt, name);
@@ -190,11 +190,11 @@ void KexiDataSourceComboBox::setDataSource(const QString& mimeType, const QStrin
void KexiDataSourceComboBox::slotNewItemStored(KexiPart::Item& item)
{
- QString name(item.name());
+ TQString name(item.name());
//insert a new item, maintaining sort order and splitting to tables and queries
if (item.mimeType()=="kexi/table") {
int i = 1; /*skip empty row*/
-#ifdef ADD_DEFINEQUERY_ROW
+#ifdef ADD_DEFINETQUERY_ROW
i++; /*skip 'define query' row*/
#endif
for (; i < d->firstQueryIndex() && name>=text(i); i++)
@@ -212,12 +212,12 @@ void KexiDataSourceComboBox::slotNewItemStored(KexiPart::Item& item)
}
}
-int KexiDataSourceComboBox::findItem(const QString& mimeType, const QString& name)
+int KexiDataSourceComboBox::findItem(const TQString& mimeType, const TQString& name)
{
int i, end;
if (mimeType=="kexi/table") {
i = 0;
-#ifdef ADD_DEFINEQUERY_ROW
+#ifdef ADD_DEFINETQUERY_ROW
i++; //skip 'define query'
#endif
end = d->firstQueryIndex();
@@ -229,7 +229,7 @@ int KexiDataSourceComboBox::findItem(const QString& mimeType, const QString& nam
else
return -1;
- QString nameString(name);
+ TQString nameString(name);
for (; i<end; i++)
if (text(i)==nameString)
@@ -257,13 +257,13 @@ void KexiDataSourceComboBox::slotItemRemoved(const KexiPart::Item& item)
#endif
}
-void KexiDataSourceComboBox::slotItemRenamed(const KexiPart::Item& item, const QCString& oldName)
+void KexiDataSourceComboBox::slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName)
{
- const int i = findItem(item.mimeType(), QString(oldName));
+ const int i = findItem(item.mimeType(), TQString(oldName));
if (i==-1)
return;
changeItem(item.name(), i);
- completionObject()->removeItem(QString(oldName));
+ completionObject()->removeItem(TQString(oldName));
completionObject()->addItem(item.name());
setCurrentText(oldName); //still keep old name
}
@@ -276,7 +276,7 @@ void KexiDataSourceComboBox::slotActivated( int index )
}
}
-QString KexiDataSourceComboBox::selectedMimeType() const
+TQString KexiDataSourceComboBox::selectedMimeType() const
{
if (selectedName().isEmpty())
return "";
@@ -288,7 +288,7 @@ QString KexiDataSourceComboBox::selectedMimeType() const
return "";
}
-QString KexiDataSourceComboBox::selectedName() const
+TQString KexiDataSourceComboBox::selectedName() const
{
if (isSelectionValid())
return text(currentItem());
@@ -301,7 +301,7 @@ bool KexiDataSourceComboBox::isSelectionValid() const
return index >= d->firstTableIndex() && index < count() && text(index)==currentText();
}
-void KexiDataSourceComboBox::slotReturnPressed(const QString & text)
+void KexiDataSourceComboBox::slotReturnPressed(const TQString & text)
{
//text is available: select item for this text:
bool changed = false;
@@ -310,7 +310,7 @@ void KexiDataSourceComboBox::slotReturnPressed(const QString & text)
changed = true;
}
else {
- QListBoxItem *item = listBox()->findItem( text, Qt::ExactMatch );
+ TQListBoxItem *item = listBox()->tqfindItem( text, TQt::ExactMatch );
if (item) {
int index = listBox()->index( item );
//if (index < d->firstTableIndex())
@@ -324,7 +324,7 @@ void KexiDataSourceComboBox::slotReturnPressed(const QString & text)
emit dataSourceChanged();
}
-void KexiDataSourceComboBox::focusOutEvent( QFocusEvent *e )
+void KexiDataSourceComboBox::focusOutEvent( TQFocusEvent *e )
{
KComboBox::focusOutEvent( e );
slotReturnPressed(currentText());
diff --git a/kexi/widget/kexidatasourcecombobox.h b/kexi/widget/kexidatasourcecombobox.h
index 01a02d039..6f9f58ed4 100644
--- a/kexi/widget/kexidatasourcecombobox.h
+++ b/kexi/widget/kexidatasourcecombobox.h
@@ -34,9 +34,10 @@ namespace KexiPart {
class KEXIEXTWIDGETS_EXPORT KexiDataSourceComboBox : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDataSourceComboBox(QWidget *parent, const char *name=0);
+ KexiDataSourceComboBox(TQWidget *tqparent, const char *name=0);
~KexiDataSourceComboBox();
//! \return global project that is used to retrieve schema informationm for this combo box.
@@ -44,18 +45,18 @@ class KEXIEXTWIDGETS_EXPORT KexiDataSourceComboBox : public KComboBox
//! \return name of selected table or query. Can return null string.
//! You should use isSelectionValid() to check validity of the input.
- QString selectedMimeType() const;
+ TQString selectedMimeType() const;
//! \return name of selected table or query. Can return null string or nonexisting name,
//! so you should use isSelectionValid() to check validity of the input.
- QString selectedName() const;
+ TQString selectedName() const;
//! \return true if current selection is valid
bool isSelectionValid() const;
/*! \return index of item of mime type \a mimeType and name \a name.
Returs -1 of no such item exists. */
- int findItem(const QString& mimeType, const QString& name);
+ int findItem(const TQString& mimeType, const TQString& name);
public slots:
//! Sets global project that is used to retrieve schema informationm for this combo box.
@@ -64,7 +65,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDataSourceComboBox : public KComboBox
/*! Sets item for data source described by \a mimeType and \a name.
If \a mimeType is empty, either "kexi/table" and "kexi/query" are tried. */
- void setDataSource(const QString& mimeType, const QString& name);
+ void setDataSource(const TQString& mimeType, const TQString& name);
signals:
//! Emitted whenever data source changes.
@@ -74,12 +75,12 @@ class KEXIEXTWIDGETS_EXPORT KexiDataSourceComboBox : public KComboBox
protected slots:
void slotNewItemStored(KexiPart::Item& item);
void slotItemRemoved(const KexiPart::Item& item);
- void slotItemRenamed(const KexiPart::Item& item, const QCString& oldName);
+ void slotItemRenamed(const KexiPart::Item& item, const TQCString& oldName);
void slotActivated( int index );
- void slotReturnPressed(const QString & text);
+ void slotReturnPressed(const TQString & text);
protected:
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
class Private;
Private *d;
diff --git a/kexi/widget/kexidatatable.cpp b/kexi/widget/kexidatatable.cpp
index b9a0aeb2d..e0f2dd1b3 100644
--- a/kexi/widget/kexidatatable.cpp
+++ b/kexi/widget/kexidatatable.cpp
@@ -20,8 +20,8 @@
*/
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -34,25 +34,25 @@
#include "kexidatatable.h"
#include "kexidialogbase.h"
-KexiDataTable::KexiDataTable(KexiMainWindow *mainWin, QWidget *parent,
+KexiDataTable::KexiDataTable(KexiMainWindow *mainWin, TQWidget *tqparent,
const char *name, bool dbAware)
-// : KexiViewBase(mainWin, parent, name)
- : KexiDataAwareView( mainWin, parent, name )
+// : KexiViewBase(mainWin, tqparent, name)
+ : KexiDataAwareView( mainWin, tqparent, name )
{
KexiTableView *view;
if (dbAware)
view = new KexiDataTableView(this,
- QString("%1_datatableview").arg(name ? name : "KexiDataTableView").latin1());
+ TQString("%1_datatableview").tqarg(name ? name : "KexiDataTableView").latin1());
else
view = new KexiTableView(0, this,
- QString("%1_tableview").arg(name ? name : "KexiTableView").latin1());
+ TQString("%1_tableview").tqarg(name ? name : "KexiTableView").latin1());
KexiDataAwareView::init( view, view, view );
}
-KexiDataTable::KexiDataTable(KexiMainWindow *mainWin, QWidget *parent,
+KexiDataTable::KexiDataTable(KexiMainWindow *mainWin, TQWidget *tqparent,
KexiDB::Cursor *cursor, const char *name)
- : KexiDataAwareView( mainWin, parent, name )
+ : KexiDataAwareView( mainWin, tqparent, name )
{
KexiTableView *view = new KexiDataTableView(this, "view", cursor);
KexiDataAwareView::init( view, view, view );
diff --git a/kexi/widget/kexidatatable.h b/kexi/widget/kexidatatable.h
index 9fb73225e..ccc5c6c30 100644
--- a/kexi/widget/kexidatatable.h
+++ b/kexi/widget/kexidatatable.h
@@ -44,6 +44,7 @@ namespace KexiDB
class KEXIEXTWIDGETS_EXPORT KexiDataTable : public KexiDataAwareView
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! CTOR1: Creates, empty table view that can be initialized later
@@ -53,12 +54,12 @@ class KEXIEXTWIDGETS_EXPORT KexiDataTable : public KexiDataAwareView
Otherwise, table will be not-db-aware,
and KexiTableView is used internally. In the latter case,
data can be set by calling tableView()->setData(KexiTableViewData* data). */
- KexiDataTable(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0,
+ KexiDataTable(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0,
bool dbAware = true);
/*! CTOR2: Creates db-aware, table view initialized with \a cursor.
KexiDataTableView is used internally. */
- KexiDataTable(KexiMainWindow *mainWin, QWidget *parent,
+ KexiDataTable(KexiMainWindow *mainWin, TQWidget *tqparent,
KexiDB::Cursor *cursor, const char *name = 0);
virtual ~KexiDataTable();
diff --git a/kexi/widget/kexidbconnectionwidget.cpp b/kexi/widget/kexidbconnectionwidget.cpp
index 5b1b45384..a048e9292 100644
--- a/kexi/widget/kexidbconnectionwidget.cpp
+++ b/kexi/widget/kexidbconnectionwidget.cpp
@@ -35,16 +35,16 @@
#include <ktextedit.h>
#include <kprogress.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qwidgetstack.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qthread.h>
-#include <qradiobutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqwidgetstack.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqthread.h>
+#include <tqradiobutton.h>
//! Templorary hides db list
//! @todo reenable this when implemented
@@ -65,13 +65,13 @@ class KexiDBConnectionWidget::Private
//---------
-KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* name )
- : KexiDBConnectionWidgetBase( parent, name )
+KexiDBConnectionWidget::KexiDBConnectionWidget( TQWidget* tqparent, const char* name )
+ : KexiDBConnectionWidgetBase( tqparent, name )
, d(new Private())
{
iconLabel->setPixmap(DesktopIcon("network"));
- QVBoxLayout *driversComboLyr = new QVBoxLayout(frmEngine);
+ TQVBoxLayout *driversComboLyr = new TQVBoxLayout(frmEngine);
m_driversCombo = new KexiDBDriverComboBox(frmEngine, Kexi::driverManager().driversInfo(),
KexiDBDriverComboBox::ShowServerDrivers);
lblEngine->setBuddy( m_driversCombo );
@@ -82,11 +82,11 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* na
btnLoadDBList->hide();
#endif
btnLoadDBList->setIconSet(SmallIconSet("reload"));
- QToolTip::add(btnLoadDBList, i18n("Load database list from the server"));
- QWhatsThis::add(btnLoadDBList,
+ TQToolTip::add(btnLoadDBList, i18n("Load database list from the server"));
+ TQWhatsThis::add(btnLoadDBList,
i18n("Loads database list from the server, so you can select one using the \"Name\" combo box."));
- QHBoxLayout *hbox = new QHBoxLayout(frmBottom);
+ TQHBoxLayout *hbox = new TQHBoxLayout(frmBottom);
hbox->addStretch(2);
d->btnSaveChanges = new KPushButton(KGuiItem(i18n("Save Changes"), "filesave",
i18n("Save all changes made to this connection information"),
@@ -94,21 +94,21 @@ KexiDBConnectionWidget::KexiDBConnectionWidget( QWidget* parent, const char* na
frmBottom, "savechanges");
hbox->addWidget( d->btnSaveChanges );
hbox->addSpacing( KDialogBase::spacingHint() );
- QWidget::setTabOrder(titleEdit, d->btnSaveChanges);
- d->btnSaveChanges->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQWidget::setTabOrder(titleEdit, d->btnSaveChanges);
+ d->btnSaveChanges->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
d->btnTestConnection = new KPushButton(KGuiItem(i18n("&Test Connection"), "",
i18n("Test database connection"),
i18n("Tests database connection. You can ensure that valid connection information is provided.")),
frmBottom, "testConnection");
hbox->addWidget( d->btnTestConnection );
- QWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection);
- d->btnTestConnection->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Fixed );
+ TQWidget::setTabOrder(d->btnSaveChanges, d->btnTestConnection);
+ d->btnTestConnection->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed );
- connect( locationBGrp, SIGNAL(clicked(int)), this, SLOT(slotLocationBGrpClicked(int)) );
- connect( chkPortDefault, SIGNAL(toggled(bool)), this , SLOT(slotCBToggled(bool)) );
- connect( btnLoadDBList, SIGNAL(clicked()), this, SIGNAL(loadDBList()) );
- connect( d->btnSaveChanges, SIGNAL(clicked()), this, SIGNAL(saveChanges()) );
+ connect( locationBGrp, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotLocationBGrpClicked(int)) );
+ connect( chkPortDefault, TQT_SIGNAL(toggled(bool)), this , TQT_SLOT(slotCBToggled(bool)) );
+ connect( btnLoadDBList, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(loadDBList()) );
+ connect( d->btnSaveChanges, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(saveChanges()) );
}
KexiDBConnectionWidget::~KexiDBConnectionWidget()
@@ -120,7 +120,7 @@ bool KexiDBConnectionWidget::connectionOnly() const
{ return d->connectionOnly; }
void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool connectionOnly,
- const QString& shortcutFileName)
+ const TQString& shortcutFileName)
{
m_data = data;
d->connectionOnly = connectionOnly;
@@ -166,7 +166,7 @@ void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool c
// chkSavePassword->hide();
}
else {
- if (!QFileInfo(shortcutFileName).isWritable()) {
+ if (!TQFileInfo(shortcutFileName).isWritable()) {
d->btnSaveChanges->setEnabled(false);
}
}
@@ -175,12 +175,12 @@ void KexiDBConnectionWidget::setDataInternal(const KexiProjectData& data, bool c
adjustSize();
}
-void KexiDBConnectionWidget::setData(const KexiProjectData& data, const QString& shortcutFileName)
+void KexiDBConnectionWidget::setData(const KexiProjectData& data, const TQString& shortcutFileName)
{
setDataInternal(data, false /*!connectionOnly*/, shortcutFileName);
}
-void KexiDBConnectionWidget::setData(const KexiDB::ConnectionData& data, const QString& shortcutFileName)
+void KexiDBConnectionWidget::setData(const KexiDB::ConnectionData& data, const TQString& shortcutFileName)
{
KexiProjectData pdata(data);
setDataInternal(pdata, true /*connectionOnly*/, shortcutFileName);
@@ -221,30 +221,30 @@ void KexiDBConnectionWidget::slotCBToggled(bool on)
//-----------
-KexiDBConnectionTabWidget::KexiDBConnectionTabWidget( QWidget* parent, const char* name )
- : KTabWidget( parent, name )
+KexiDBConnectionTabWidget::KexiDBConnectionTabWidget( TQWidget* tqparent, const char* name )
+ : KTabWidget( tqparent, name )
{
mainWidget = new KexiDBConnectionWidget( this, "mainWidget" );
- mainWidget->layout()->setMargin(KDialog::marginHint());
+ mainWidget->tqlayout()->setMargin(KDialog::marginHint());
addTab( mainWidget, i18n("Parameters") );
-// QVBox *page2 = new QVBox(this);
+// TQVBox *page2 = new TQVBox(this);
// page2->setMargin(KDialog::marginHint());
// page2->setSpacing(KDialog::spacingHint());
-// QLabel *lbl = new QLabel(i18n("&Description:"), page2);
+// TQLabel *lbl = new TQLabel(i18n("&Description:"), page2);
// m_descriptionEdit = new KTextEdit(page2);
// lbl->setBuddy(m_descriptionEdit);
detailsWidget = new KexiDBConnectionWidgetDetailsBase(this, "detailsWidget");
addTab( detailsWidget, i18n("Details") );
- connect( mainWidget->testConnectionButton(), SIGNAL(clicked()), this, SLOT(slotTestConnection()) );
+ connect( mainWidget->testConnectionButton(), TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTestConnection()) );
}
KexiDBConnectionTabWidget::~KexiDBConnectionTabWidget()
{
}
-void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const QString& shortcutFileName)
+void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const TQString& shortcutFileName)
{
mainWidget->setData( data, shortcutFileName );
detailsWidget->chkUseSocket->setChecked( data.constConnectionData()->useLocalSocketFile );
@@ -256,7 +256,7 @@ void KexiDBConnectionTabWidget::setData(const KexiProjectData& data, const QStri
}
void KexiDBConnectionTabWidget::setData(const KexiDB::ConnectionData& data,
- const QString& shortcutFileName)
+ const TQString& shortcutFileName)
{
mainWidget->setData( data, shortcutFileName );
detailsWidget->chkUseSocket->setChecked( data.useLocalSocketFile );
@@ -277,23 +277,23 @@ KexiProjectData KexiDBConnectionTabWidget::currentProjectData()
// if (d->isDatabaseShortcut) {
if (mainWidget->connectionOnly()) {
data.connectionData()->caption = mainWidget->titleEdit->text();
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->description = detailsWidget->descriptionEdit->text();
- data.setDatabaseName( QString::null );
+ data.setDatabaseName( TQString() );
}
else {
- data.connectionData()->caption = QString::null; /* connection name is not specified... */
+ data.connectionData()->caption = TQString(); /* connection name is not specified... */
data.setCaption( mainWidget->titleEdit->text() );
data.setDescription( detailsWidget->descriptionEdit->text() );
data.setDatabaseName( mainWidget->nameCombo->currentText() );
}
// }
/* else {
- data.setCaption( QString::null );
+ data.setCaption( TQString() );
data.connectionData()->connName = config.readEntry("caption");
- data.setDescription( QString::null );
+ data.setDescription( TQString() );
data.connectionData()->description = config.readEntry("comment");
- data.setDatabaseName( QString::null );
+ data.setDatabaseName( TQString() );
}*/
data.connectionData()->driverName = mainWidget->driversCombo()->selectedDriverName();
@@ -303,11 +303,11 @@ KexiProjectData KexiDBConnectionTabWidget::currentProjectData()
}*/
data.connectionData()->hostName =
(mainWidget->remotehostRBtn->isChecked()/*remote*/) ? mainWidget->hostEdit->text()
- : QString::null;
+ : TQString();
data.connectionData()->port = mainWidget->chkPortDefault->isChecked()
? 0 : mainWidget->customPortEdit->value();
data.connectionData()->localSocketFileName = detailsWidget->chkSocketDefault->isChecked()
- ? QString::null : detailsWidget->customSocketEdit->url();
+ ? TQString() : detailsWidget->customSocketEdit->url();
data.connectionData()->useLocalSocketFile = detailsWidget->chkUseSocket->isChecked();
//UNSAFE!!!!
data.connectionData()->userName = mainWidget->userEdit->text();
@@ -337,7 +337,7 @@ void KexiDBConnectionTabWidget::slotTestConnection()
//! @todo set proper help ctxt ID
KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiProjectData& data,
- const QString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
+ const TQString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
: KDialogBase(0, "dlg", true, i18n("Open Database"),
KDialogBase::User1|KDialogBase::Cancel|KDialogBase::Help,
KDialogBase::User1, false,
@@ -352,7 +352,7 @@ KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiProjectData& data,
}
KexiDBConnectionDialog::KexiDBConnectionDialog(const KexiDB::ConnectionData& data,
- const QString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
+ const TQString& shortcutFileName, const KGuiItem& acceptButtonGuiItem)
: KDialogBase(0, "dlg", true, i18n("Connect to a Database Server"),
KDialogBase::User1|KDialogBase::Cancel|KDialogBase::Help,
KDialogBase::User1, false,
@@ -372,10 +372,10 @@ KexiDBConnectionDialog::~KexiDBConnectionDialog()
void KexiDBConnectionDialog::init()
{
- connect( this, SIGNAL(user1Clicked()), this, SLOT(accept()));
+ connect( this, TQT_SIGNAL(user1Clicked()), this, TQT_SLOT(accept()));
setMainWidget(tabWidget);
- connect(tabWidget->mainWidget, SIGNAL(saveChanges()), this, SIGNAL(saveChanges()));
- connect(tabWidget, SIGNAL(testConnection()), this, SIGNAL(testConnection()));
+ connect(tabWidget->mainWidget, TQT_SIGNAL(saveChanges()), this, TQT_SIGNAL(saveChanges()));
+ connect(tabWidget, TQT_SIGNAL(testConnection()), this, TQT_SIGNAL(testConnection()));
adjustSize();
resize(width(), tabWidget->height());
diff --git a/kexi/widget/kexidbconnectionwidget.h b/kexi/widget/kexidbconnectionwidget.h
index dd8559e5a..72c49c894 100644
--- a/kexi/widget/kexidbconnectionwidget.h
+++ b/kexi/widget/kexidbconnectionwidget.h
@@ -36,20 +36,21 @@ class KexiDBConnectionTabWidget;
class KEXIEXTWIDGETS_EXPORT KexiDBConnectionWidget : public KexiDBConnectionWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBConnectionWidget( QWidget* parent = 0, const char* name = 0 );
+ KexiDBConnectionWidget( TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KexiDBConnectionWidget();
/*! Sets project data \a data.
\a shortcutFileName is only used to check if the file is writable
(if no, "save changes" button will be disabled). */
- void setData(const KexiProjectData& data, const QString& shortcutFileName = QString::null);
+ void setData(const KexiProjectData& data, const TQString& shortcutFileName = TQString());
/*! Sets connection data \a data.
\a shortcutFileName is only used to check if the file is writable
(if no, "save changes" button will be disabled). */
- void setData(const KexiDB::ConnectionData& data, const QString& shortcutFileName = QString::null);
+ void setData(const KexiDB::ConnectionData& data, const TQString& shortcutFileName = TQString());
KexiProjectData data();
@@ -77,7 +78,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDBConnectionWidget : public KexiDBConnectionWidg
protected:
void setDataInternal(const KexiProjectData& data, bool connectionOnly,
- const QString& shortcutFileName);
+ const TQString& shortcutFileName);
KexiProjectData m_data;
KexiDBDriverComboBox *m_driversCombo;
@@ -91,16 +92,17 @@ class KEXIEXTWIDGETS_EXPORT KexiDBConnectionWidget : public KexiDBConnectionWidg
class KEXIEXTWIDGETS_EXPORT KexiDBConnectionTabWidget : public KTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDBConnectionTabWidget( QWidget* parent = 0, const char* name = 0 );
+ KexiDBConnectionTabWidget( TQWidget* tqparent = 0, const char* name = 0 );
virtual ~KexiDBConnectionTabWidget();
/*! Sets connection data \a data.
\a shortcutFileName is only used to check if the file is writable
(if no, "save changes" button will be disabled). */
- void setData(const KexiProjectData& data, const QString& shortcutFileName = QString::null);
- void setData(const KexiDB::ConnectionData& data, const QString& shortcutFileName = QString::null);
+ void setData(const KexiProjectData& data, const TQString& shortcutFileName = TQString());
+ void setData(const KexiDB::ConnectionData& data, const TQString& shortcutFileName = TQString());
KexiProjectData currentProjectData();
//! \return true if 'save password' option is selected
@@ -123,6 +125,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDBConnectionTabWidget : public KTabWidget
class KEXIEXTWIDGETS_EXPORT KexiDBConnectionDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! Creates a new connection dialog for project data \a data.
@@ -134,7 +137,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDBConnectionDialog : public KDialogBase
If \a shortcutFileName is empty, the button will be hidden.
\a acceptButtonGuiItem allows to override default "Open" button's appearance. */
KexiDBConnectionDialog(const KexiProjectData& data,
- const QString& shortcutFileName = QString::null,
+ const TQString& shortcutFileName = TQString(),
const KGuiItem& acceptButtonGuiItem = KGuiItem(""));
/*! Creates a new connection dialog for connection data \a data.
@@ -144,7 +147,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDBConnectionDialog : public KDialogBase
The shortcut file is in .KEXIC format.
See above constructor for more details. */
KexiDBConnectionDialog(const KexiDB::ConnectionData& data,
- const QString& shortcutFileName = QString::null,
+ const TQString& shortcutFileName = TQString(),
const KGuiItem& acceptButtonGuiItem = KGuiItem(""));
~KexiDBConnectionDialog();
diff --git a/kexi/widget/kexidbconnectionwidgetbase.ui b/kexi/widget/kexidbconnectionwidgetbase.ui
index 70fcddcac..fc4888528 100644
--- a/kexi/widget/kexidbconnectionwidgetbase.ui
+++ b/kexi/widget/kexidbconnectionwidgetbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiDBConnectionWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiDBConnectionWidgetBase</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
+ <widget class="TQLayoutWidget" row="0" column="0" rowspan="3" colspan="1">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconLabel</cstring>
</property>
@@ -39,7 +39,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
@@ -56,7 +56,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>331</height>
@@ -75,14 +75,14 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>4</height>
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="0" column="1">
+ <widget class="TQButtonGroup" row="0" column="1">
<property name="name">
<cstring>locationBGrp</cstring>
</property>
@@ -111,7 +111,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
@@ -126,7 +126,7 @@
<number>0</number>
</property>
</widget>
- <widget class="QLabel" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>portLbl</cstring>
</property>
@@ -139,7 +139,7 @@
<cstring>hostEdit</cstring>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>localhostRBtn</cstring>
</property>
@@ -163,14 +163,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>90</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>hostLbl</cstring>
</property>
@@ -181,7 +181,7 @@
<cstring>hostEdit</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="2" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="3" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>chkPortDefault</cstring>
</property>
@@ -193,7 +193,7 @@
<number>2</number>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="3" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="1" column="3" rowspan="1" colspan="2">
<property name="name">
<cstring>remotehostRBtn</cstring>
</property>
@@ -204,7 +204,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>lblEngine</cstring>
</property>
@@ -218,7 +218,7 @@
<cstring></cstring>
</property>
</widget>
- <widget class="QFrame" row="0" column="1" rowspan="1" colspan="6">
+ <widget class="TQFrame" row="0" column="1" rowspan="1" colspan="6">
<property name="name">
<cstring>frmEngine</cstring>
</property>
@@ -231,7 +231,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>authenticationGBox</cstring>
</property>
@@ -250,7 +250,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>userLbl</cstring>
</property>
@@ -266,7 +266,7 @@
<cstring>userEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>passwordLbl</cstring>
</property>
@@ -285,7 +285,7 @@
<enum>Password</enum>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>chkSavePassword</cstring>
</property>
@@ -295,7 +295,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="1">
+ <widget class="TQGroupBox" row="2" column="1">
<property name="name">
<cstring>dbGroupBox</cstring>
</property>
@@ -314,7 +314,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>nameLabel</cstring>
</property>
@@ -330,14 +330,14 @@
<cstring>titleEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>titleLabel</cstring>
</property>
<property name="text">
<string>&amp;Title (optional):</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
<property name="buddy" stdset="0">
@@ -356,7 +356,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32</width>
<height>32767</height>
@@ -393,9 +393,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
@@ -411,14 +411,14 @@
<property name="sizeType">
<enum>Minimum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>80</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>frmBottom</cstring>
</property>
@@ -449,7 +449,7 @@
<tabstop>titleEdit</tabstop>
<tabstop>frmEngine</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui
index b729c9bc7..6c173b421 100644
--- a/kexi/widget/kexidbconnectionwidgetdetailsbase.ui
+++ b/kexi/widget/kexidbconnectionwidgetdetailsbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KexiDBConnectionWidgetDetailsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiDBConnectionWidgetDetailsBase</cstring>
</property>
@@ -16,9 +16,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<grid>
<property name="name">
@@ -30,7 +30,7 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>chkUseSocket</cstring>
</property>
@@ -38,9 +38,9 @@
<string>Use socket &amp;file instead of TCP/IP port:</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
@@ -62,14 +62,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>chkSocketDefault</cstring>
</property>
@@ -114,7 +114,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>129</width>
<height>20</height>
@@ -123,9 +123,9 @@
</spacer>
</grid>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<grid>
<property name="name">
@@ -142,7 +142,7 @@
<cstring>descriptionEdit</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -182,10 +182,10 @@
<includes>
<include location="local" impldecl="in implementation">kexidbconnectionwidgetdetailsbase.ui.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot access="protected">slotCBToggled( bool on )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kexi/widget/kexidbdrivercombobox.cpp b/kexi/widget/kexidbdrivercombobox.cpp
index e3431531e..8026106d2 100644
--- a/kexi/widget/kexidbdrivercombobox.cpp
+++ b/kexi/widget/kexidbdrivercombobox.cpp
@@ -19,17 +19,17 @@
#include "kexidbdrivercombobox.h"
-#include <qlistbox.h>
+#include <tqlistbox.h>
#include <kiconloader.h>
-KexiDBDriverComboBox::KexiDBDriverComboBox(QWidget* parent, const KexiDB::Driver::InfoMap& driversInfo,
+KexiDBDriverComboBox::KexiDBDriverComboBox(TQWidget* tqparent, const KexiDB::Driver::InfoMap& driversInfo,
Options options)
- : KComboBox(parent, "KexiDBDriverComboBox")
+ : KComboBox(tqparent, "KexiDBDriverComboBox")
{
//retrieve list of drivers and sort it: file-based first, then server-based
- QStringList captionsForFileBasedDrivers, captionsForServerBasedDrivers;
- QMap<QString,QString> fileBasedDriversDict, serverBasedDriversDict; //a map from caption to name
+ TQStringList captionsForFileBasedDrivers, captionsForServerBasedDrivers;
+ TQMap<TQString,TQString> fileBasedDriversDict, serverBasedDriversDict; //a map from caption to name
foreach(KexiDB::Driver::InfoMap::ConstIterator, it, driversInfo) {
if (it.data().fileBased) {
captionsForFileBasedDrivers += it.data().caption;
@@ -44,7 +44,7 @@ KexiDBDriverComboBox::KexiDBDriverComboBox(QWidget* parent, const KexiDB::Driver
captionsForServerBasedDrivers.sort();
//insert file-based
if (options & ShowFileDrivers) {
- foreach(QStringList::ConstIterator, it, captionsForFileBasedDrivers) {
+ foreach(TQStringList::ConstIterator, it, captionsForFileBasedDrivers) {
const KexiDB::Driver::Info& info = driversInfo[ fileBasedDriversDict[ *it ] ];
//! @todo change this if better icon is available
insertItem( SmallIcon("gear"), info.caption );
@@ -53,7 +53,7 @@ KexiDBDriverComboBox::KexiDBDriverComboBox(QWidget* parent, const KexiDB::Driver
}
//insert server-based
if (options & ShowServerDrivers) {
- foreach(QStringList::ConstIterator, it, captionsForServerBasedDrivers) {
+ foreach(TQStringList::ConstIterator, it, captionsForServerBasedDrivers) {
const KexiDB::Driver::Info& info = driversInfo[ serverBasedDriversDict[ *it ] ];
//! @todo change this if better icon is available
insertItem( SmallIcon("gear"), info.caption );
@@ -72,17 +72,17 @@ KexiDBDriverComboBox::~KexiDBDriverComboBox()
{
}
-QString KexiDBDriverComboBox::selectedDriverName() const
+TQString KexiDBDriverComboBox::selectedDriverName() const
{
- QMapConstIterator<QString,QString> it( m_driversMap.find( text( currentItem() ) ) );
+ TQMapConstIterator<TQString,TQString> it( m_driversMap.tqfind( text( currentItem() ) ) );
if (it==m_driversMap.constEnd())
- return QString::null;
+ return TQString();
return it.data();
}
-void KexiDBDriverComboBox::setDriverName(const QString& driverName)
+void KexiDBDriverComboBox::setDriverName(const TQString& driverName)
{
- int index = m_driverNames.findIndex( driverName.lower() );
+ int index = m_driverNames.tqfindIndex( driverName.lower() );
if (index==-1) {
return;
}
diff --git a/kexi/widget/kexidbdrivercombobox.h b/kexi/widget/kexidbdrivercombobox.h
index 981b67c35..cdd18f769 100644
--- a/kexi/widget/kexidbdrivercombobox.h
+++ b/kexi/widget/kexidbdrivercombobox.h
@@ -20,8 +20,8 @@
#ifndef KEXIDBDRIVERCOMBOBOX_H
#define KEXIDBDRIVERCOMBOBOX_H
-#include <qwidget.h>
-#include <qmap.h>
+#include <tqwidget.h>
+#include <tqmap.h>
#include <kcombobox.h>
@@ -47,6 +47,7 @@ A more complete example can be found in
class KEXIEXTWIDGETS_EXPORT KexiDBDriverComboBox : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Options {
@@ -64,7 +65,7 @@ class KEXIEXTWIDGETS_EXPORT KexiDBDriverComboBox : public KComboBox
If \a includeFileBasedDrivers is set to false, then only those drivers
that are for database servers (those which have X-Kexi-DriverType=Network
in their .desktop file) are shown. */
- KexiDBDriverComboBox(QWidget* parent, const KexiDB::Driver::InfoMap& driversInfo,
+ KexiDBDriverComboBox(TQWidget* tqparent, const KexiDB::Driver::InfoMap& driversInfo,
Options options = ShowAll );
~KexiDBDriverComboBox();
@@ -76,13 +77,13 @@ class KEXIEXTWIDGETS_EXPORT KexiDBDriverComboBox : public KComboBox
was false, this won't include the file based drivers either.
\return a list of names of drivers that were found */
- QStringList driverNames() const { return m_driverNames; }
+ TQStringList driverNames() const { return m_driverNames; }
/*! Get the name of the currrently selected driver. If the combobox is empty,
- QString::null will be returned.
+ TQString() will be returned.
\return the name of the currently selected driver */
- QString selectedDriverName() const;
+ TQString selectedDriverName() const;
/*! Set the currrently selected driver.
@@ -91,11 +92,11 @@ class KEXIEXTWIDGETS_EXPORT KexiDBDriverComboBox : public KComboBox
is case insensitive.
*/
- void setDriverName(const QString& driverName);
+ void setDriverName(const TQString& driverName);
protected:
- QMap<QString,QString> m_driversMap;
- QStringList m_driverNames;
+ TQMap<TQString,TQString> m_driversMap;
+ TQStringList m_driverNames;
};
#endif
diff --git a/kexi/widget/kexidswelcome.cpp b/kexi/widget/kexidswelcome.cpp
index 957132a18..ca2480f61 100644
--- a/kexi/widget/kexidswelcome.cpp
+++ b/kexi/widget/kexidswelcome.cpp
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -30,22 +30,22 @@
#include "kexidatasourcewizard.h"
#include "kexidswelcome.h"
-KexiDSWelcome::KexiDSWelcome(KexiDataSourceWizard *parent)
- : QWidget(parent)
+KexiDSWelcome::KexiDSWelcome(KexiDataSourceWizard *tqparent)
+ : TQWidget(tqparent)
{
- m_wiz = parent;
+ m_wiz = tqparent;
KexiDSPixmap *pic = new KexiDSPixmap(this);
- QLabel *lText = new QLabel(i18n("Kexi can help you with creation of %2 using data sources in almost no time with the \"%1 Wizard\""), this);
- lText->setAlignment(AlignTop | AlignLeft | WordBreak);
- QCheckBox *useWizard = new QCheckBox(i18n("Create %1 using the \"%1 Wizard\""), this);
- connect(useWizard, SIGNAL(toggled(bool)), this, SLOT(setUseWizard(bool)));
+ TQLabel *lText = new TQLabel(i18n("Kexi can help you with creation of %2 using data sources in almost no time with the \"%1 Wizard\""), this);
+ lText->tqsetAlignment(AlignTop | AlignLeft | WordBreak);
+ TQCheckBox *useWizard = new TQCheckBox(i18n("Create %1 using the \"%1 Wizard\""), this);
+ connect(useWizard, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setUseWizard(bool)));
useWizard->setChecked(true);
- QSpacerItem *spacer = new QSpacerItem(320, 220);
- QCheckBox *dontShow = new QCheckBox(i18n("Do not show this wizard again"), this);
+ TQSpacerItem *spacer = new TQSpacerItem(320, 220);
+ TQCheckBox *dontShow = new TQCheckBox(i18n("Do not show this wizard again"), this);
- QGridLayout *g = new QGridLayout(this);
+ TQGridLayout *g = new TQGridLayout(this);
g->addMultiCellWidget(pic, 0, 4, 0, 0);
g->addWidget(lText, 0, 1);
@@ -57,7 +57,7 @@ KexiDSWelcome::KexiDSWelcome(KexiDataSourceWizard *parent)
void
KexiDSWelcome::setUseWizard(bool use)
{
-#if KDE_IS_VERSION(3,1,9) && !defined(Q_WS_WIN)
+#if KDE_IS_VERSION(3,1,9) && !defined(TQ_WS_WIN)
bool useIcons = KGlobalSettings::showIconsOnPushButtons();
#else
bool useIcons = true;
diff --git a/kexi/widget/kexidswelcome.h b/kexi/widget/kexidswelcome.h
index 23cb64feb..dc7cbd14d 100644
--- a/kexi/widget/kexidswelcome.h
+++ b/kexi/widget/kexidswelcome.h
@@ -20,7 +20,7 @@
#ifndef KEXIDSWELCOME_H
#define KEXIDSWELCOME_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KexiDataSourceWizard;
@@ -29,12 +29,13 @@ class KexiDataSourceWizard;
* it is the greeting page per default, where people
* can choose whether they want to use the wizard or not.
*/
-class KEXIEXTWIDGETS_EXPORT KexiDSWelcome : public QWidget
+class KEXIEXTWIDGETS_EXPORT KexiDSWelcome : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDSWelcome(KexiDataSourceWizard *parent);
+ KexiDSWelcome(KexiDataSourceWizard *tqparent);
~KexiDSWelcome();
protected slots:
diff --git a/kexi/widget/kexieditor.cpp b/kexi/widget/kexieditor.cpp
index f482584e2..82af06a39 100644
--- a/kexi/widget/kexieditor.cpp
+++ b/kexi/widget/kexieditor.cpp
@@ -23,8 +23,8 @@
#include <keximainwindow.h>
-#include <qlayout.h>
-#include <qframe.h>
+#include <tqlayout.h>
+#include <tqframe.h>
#include <klocale.h>
#include <kdebug.h>
@@ -50,19 +50,19 @@ copy and paste to the editor. */
class KexiEditorSharedActionConnector : public KexiSharedActionConnector
{
public:
- KexiEditorSharedActionConnector( KexiActionProxy* proxy, QObject* obj )
+ KexiEditorSharedActionConnector( KexiActionProxy* proxy, TQObject* obj )
: KexiSharedActionConnector( proxy, obj )
{
#ifdef KTEXTEDIT_BASED_SQL_EDITOR
- plugSharedAction("edit_cut", SLOT(cut()));
- plugSharedAction("edit_copy", SLOT(copy()));
- plugSharedAction("edit_paste", SLOT(paste()));
- plugSharedAction("edit_clear", SLOT(clear()));
- plugSharedAction("edit_undo", SLOT(undo()));
- plugSharedAction("edit_redo", SLOT(redo()));
- plugSharedAction("edit_select_all", SLOT(selectAll()));
+ plugSharedAction("edit_cut", TQT_SLOT(cut()));
+ plugSharedAction("edit_copy", TQT_SLOT(copy()));
+ plugSharedAction("edit_paste", TQT_SLOT(paste()));
+ plugSharedAction("edit_clear", TQT_SLOT(clear()));
+ plugSharedAction("edit_undo", TQT_SLOT(undo()));
+ plugSharedAction("edit_redo", TQT_SLOT(redo()));
+ plugSharedAction("edit_select_all", TQT_SLOT(selectAll()));
#else
- QValueList<QCString> actions;
+ TQValueList<TQCString> actions;
actions << "edit_cut" << "edit_copy" << "edit_paste" << "edit_clear"
<< "edit_undo" << "edit_redo" << "edit_select_all";
plugSharedActionsToExternalGUI(actions, dynamic_cast<KXMLGUIClient*>(obj));
@@ -81,47 +81,47 @@ class KexiEditorPrivate {
#endif
};
-KexiEditor::KexiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiViewBase(mainWin, parent, name)
+KexiEditor::KexiEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiViewBase(mainWin, tqparent, name)
, d(new KexiEditorPrivate())
{
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
#ifdef KTEXTEDIT_BASED_SQL_EDITOR
- d->view = new KTextEdit( "", QString::null, this, "kexi_editor" );
+ d->view = new KTextEdit( "", TQString(), this, "kexi_editor" );
//adjust font
- connect(d->view, SIGNAL(textChanged()), this, SIGNAL(textChanged()));
- QFont f("Courier");
- f.setStyleStrategy(QFont::PreferAntialias);
+ connect(d->view, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(textChanged()));
+ TQFont f("Courier");
+ f.setStyleStrategy(TQFont::PreferAntialias);
f.setPointSize(d->view->font().pointSize());
d->view->setFont( f );
d->view->setCheckSpellingEnabled(false);
#else
- QFrame *fr = new QFrame(this);
- fr->setFrameStyle(QFrame::Sunken|QFrame::WinPanel);
- layout->addWidget(fr);
- layout = new QVBoxLayout(fr);
- layout->setMargin( 2 );
+ TQFrame *fr = new TQFrame(this);
+ fr->setFrameStyle(TQFrame::Sunken|TQFrame::WinPanel);
+ tqlayout->addWidget(fr);
+ tqlayout = new TQVBoxLayout(fr);
+ tqlayout->setMargin( 2 );
- d->doc = KTextEditor::EditorChooser::createDocument(fr);
+ d->doc = KTextEditor::EditorChooser::createDocument(TQT_TQOBJECT(fr));
if (!d->doc)
return;
d->view = d->doc->createView(fr, 0L);
KTextEditor::PopupMenuInterface *popupInt = dynamic_cast<KTextEditor::PopupMenuInterface*>( d->view );
if(popupInt) {
- QPopupMenu *pop = (QPopupMenu*) mainWin->factory()->container("edit", mainWin);
+ TQPopupMenu *pop = (TQPopupMenu*) mainWin->factory()->container("edit", mainWin);
if(pop) {
//plugSharedAction("edit_undo", pop);
popupInt->installPopup(pop);
}
}
- connect(d->doc, SIGNAL(textChanged()), this, SIGNAL(textChanged()));
+ connect(d->doc, TQT_SIGNAL(textChanged()), this, TQT_SIGNAL(textChanged()));
#endif
- KexiEditorSharedActionConnector c(this, d->view);
+ KexiEditorSharedActionConnector c(this, TQT_TQOBJECT(d->view));
d->view->installEventFilter(this);
- layout->addWidget(d->view);
+ tqlayout->addWidget(d->view);
setViewWidget(d->view, true/*focus*/);
d->view->show();
}
@@ -145,19 +145,19 @@ bool KexiEditor::isAdvancedEditor()
#endif
}
-QString KexiEditor::text()
+TQString KexiEditor::text()
{
#ifdef KTEXTEDIT_BASED_SQL_EDITOR
return d->view->text();
#else
if (!d->doc)
- return QString::null;
+ return TQString();
KTextEditor::EditInterface *eIface = KTextEditor::editInterface(d->doc);
return eIface->text();
#endif
}
-void KexiEditor::setText(const QString &text)
+void KexiEditor::setText(const TQString &text)
{
#ifdef KTEXTEDIT_BASED_SQL_EDITOR
const bool was_dirty = m_parentView ? m_parentView->dirty() : dirty();
@@ -176,14 +176,14 @@ void KexiEditor::setText(const QString &text)
#endif
}
-void KexiEditor::setHighlightMode(const QString& highlightmodename)
+void KexiEditor::setHighlightMode(const TQString& highlightmodename)
{
#ifdef KTEXTEDIT_BASED_SQL_EDITOR
#else
KTextEditor::HighlightingInterface *hl = KTextEditor::highlightingInterface( d->doc );
for(uint i = 0; i < hl->hlModeCount(); i++) {
//kdDebug() << "hlmode("<<i<<"): " << hl->hlModeName(i) << endl;
- if (hl->hlModeName(i).contains(highlightmodename, false)) {
+ if (hl->hlModeName(i).tqcontains(highlightmodename, false)) {
hl->setHlMode(i);
return;
}
diff --git a/kexi/widget/kexieditor.h b/kexi/widget/kexieditor.h
index fce5f45b1..022b0dd96 100644
--- a/kexi/widget/kexieditor.h
+++ b/kexi/widget/kexieditor.h
@@ -22,7 +22,7 @@
#ifndef KEXIEDITOR_H
#define KEXIEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kexiviewbase.h"
class KTextEdit;
@@ -39,6 +39,7 @@ namespace KTextEditor
class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -47,12 +48,12 @@ class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
*
* \param mainWin The \a KexiMainWindow instance this KexiEditor
* belongs too.
- * \param parent The parent \a QWidget this KexiEditor is child
- * of. You don't need to free the KexiEditor cause Qt
+ * \param tqparent The tqparent \a TQWidget this KexiEditor is child
+ * of. You don't need to free the KexiEditor cause TQt
* will handle that for us.
* \param name The name this KexiEditor has. Used only for debugging.
*/
- KexiEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
/**
* Destructor.
@@ -68,7 +69,7 @@ class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
/**
* \return the text displayed in the editor-widget.
*/
- QString text();
+ TQString text();
/**
* Set the highlight-mode to \p highlightmodename . If
@@ -78,7 +79,7 @@ class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
* of string like e.g. "python", "kjs" or "sql"
* KTextEditor supports.
*/
- void setHighlightMode(const QString& highlightmodename);
+ void setHighlightMode(const TQString& highlightmodename);
/**
* Find row and column for this \p character and jump to the
@@ -100,7 +101,7 @@ class KEXIEXTWIDGETS_EXPORT KexiEditor : public KexiViewBase
public slots:
/*! Sets editor's text to \a text. 'Dirty' flag remains unchanged.
Undo/redo buffer is cleared.*/
- void setText(const QString &text);
+ void setText(const TQString &text);
/*! Display the configuration-dialog. Only avaiable if isAdvancedEditor() returns true. */
void slotConfigureEditor();
diff --git a/kexi/widget/kexifieldcombobox.cpp b/kexi/widget/kexifieldcombobox.cpp
index c0355e9c2..fcf810363 100644
--- a/kexi/widget/kexifieldcombobox.cpp
+++ b/kexi/widget/kexifieldcombobox.cpp
@@ -19,16 +19,16 @@
#include "kexifieldcombobox.h"
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qstyle.h>
-#include <qlistbox.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqstyle.h>
+#include <tqlistbox.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -59,26 +59,26 @@ class KexiFieldComboBox::Private
{
// delete schema;
}
- QGuardedPtr<KexiProject> prj;
+ TQGuardedPtr<KexiProject> prj;
// KexiDB::TableOrQuerySchema* schema;
- QPixmap keyIcon, noIcon;
- QString tableOrQueryName;
- QString fieldOrExpression;
- QMap<QString, QString> captions;
+ TQPixmap keyIcon, noIcon;
+ TQString tableOrQueryName;
+ TQString fieldOrExpression;
+ TQMap<TQString, TQString> captions;
bool table : 1;
};
//------------------------
-KexiFieldComboBox::KexiFieldComboBox(QWidget *parent, const char *name)
- : KComboBox(true/*rw*/, parent, name)
+KexiFieldComboBox::KexiFieldComboBox(TQWidget *tqparent, const char *name)
+ : KComboBox(true/*rw*/, tqparent, name)
, d(new Private())
{
setInsertionPolicy(NoInsertion);
setCompletionMode(KGlobalSettings::CompletionPopupAuto);
setSizeLimit( 16 );
- connect(this, SIGNAL(activated(int)), this, SLOT(slotActivated(int)));
- connect(this, SIGNAL(returnPressed(const QString &)), this, SLOT(slotReturnPressed(const QString &)));
+ connect(this, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotActivated(int)));
+ connect(this, TQT_SIGNAL(returnPressed(const TQString &)), this, TQT_SLOT(slotReturnPressed(const TQString &)));
// setAcceptDrops(true);
// viewport()->setAcceptDrops(true);
@@ -102,7 +102,7 @@ KexiProject* KexiFieldComboBox::project() const
return d->prj;
}
-void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table)
+void KexiFieldComboBox::setTableOrQuery(const TQString& name, bool table)
{
d->tableOrQueryName = name;
d->table = table;
@@ -127,7 +127,7 @@ void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table)
(colinfo && (colinfo->field->isPrimaryKey() || colinfo->field->isUniqueKey()))
? d->keyIcon
: d->noIcon
- , colinfo->aliasOrName());
+ , TQString(colinfo->aliasOrName()));
completionObject()->addItem(colinfo->aliasOrName());
//store user-friendly caption (used by fieldOrExpressionCaption())
d->captions.insert( colinfo->aliasOrName(), colinfo->captionOrAliasOrName() );
@@ -137,7 +137,7 @@ void KexiFieldComboBox::setTableOrQuery(const QString& name, bool table)
setFieldOrExpression(d->fieldOrExpression);
}
-QString KexiFieldComboBox::tableOrQueryName() const
+TQString KexiFieldComboBox::tableOrQueryName() const
{
return d->tableOrQueryName;
}
@@ -147,15 +147,15 @@ bool KexiFieldComboBox::isTableAssigned() const
return d->table;
}
-void KexiFieldComboBox::setFieldOrExpression(const QString& string)
+void KexiFieldComboBox::setFieldOrExpression(const TQString& string)
{
- const QString name(string); //string.stripWhiteSpace().lower());
- const int pos = name.find('.');
+ const TQString name(string); //string.stripWhiteSpace().lower());
+ const int pos = name.tqfind('.');
if (pos==-1) {
d->fieldOrExpression = name;
}
else {
- QString objectName = name.left(pos);
+ TQString objectName = name.left(pos);
if (d->tableOrQueryName!=objectName) {
d->fieldOrExpression = name;
setCurrentItem(0);
@@ -167,7 +167,7 @@ void KexiFieldComboBox::setFieldOrExpression(const QString& string)
d->fieldOrExpression = name.mid(pos+1);
}
- QListBoxItem *item = listBox()->findItem(d->fieldOrExpression);
+ TQListBoxItem *item = listBox()->tqfindItem(d->fieldOrExpression);
if (!item) {
setCurrentItem(0);
setCurrentText(d->fieldOrExpression);
@@ -181,13 +181,13 @@ void KexiFieldComboBox::setFieldOrExpression(int index)
{
index++; //skip 1st empty item
if (index>=count()) {
- kexiwarn << QString("KexiFieldComboBox::setFieldOrExpression(int index): index %1 "
- "out of range (0..%2)").arg(index).arg(count()-1) << endl;
+ kexiwarn << TQString("KexiFieldComboBox::setFieldOrExpression(int index): index %1 "
+ "out of range (0..%2)").tqarg(index).tqarg(count()-1) << endl;
index = -1;
}
if (index<=0) {
setCurrentItem(0);
- d->fieldOrExpression = QString::null;
+ d->fieldOrExpression = TQString();
}
else {
setCurrentItem(index);
@@ -195,7 +195,7 @@ void KexiFieldComboBox::setFieldOrExpression(int index)
}
}
-QString KexiFieldComboBox::fieldOrExpression() const
+TQString KexiFieldComboBox::fieldOrExpression() const
{
return d->fieldOrExpression;
}
@@ -209,7 +209,7 @@ int KexiFieldComboBox::indexOfField() const
return currentItem()>0 ? (currentItem()-1) : -1;
}
-QString KexiFieldComboBox::fieldOrExpressionCaption() const
+TQString KexiFieldComboBox::fieldOrExpressionCaption() const
{
return d->captions[ d->fieldOrExpression ];
}
@@ -220,7 +220,7 @@ void KexiFieldComboBox::slotActivated(int i)
emit selected();
}
-void KexiFieldComboBox::slotReturnPressed(const QString & text)
+void KexiFieldComboBox::slotReturnPressed(const TQString & text)
{
//text is available: select item for this text:
int index;
@@ -228,7 +228,7 @@ void KexiFieldComboBox::slotReturnPressed(const QString & text)
index = 0;
}
else {
- QListBoxItem *item = listBox()->findItem( text, Qt::ExactMatch );
+ TQListBoxItem *item = listBox()->tqfindItem( text, TQt::ExactMatch );
if (!item)
return;
index = listBox()->index( item );
@@ -239,11 +239,11 @@ void KexiFieldComboBox::slotReturnPressed(const QString & text)
slotActivated( index );
}
-void KexiFieldComboBox::focusOutEvent( QFocusEvent *e )
+void KexiFieldComboBox::focusOutEvent( TQFocusEvent *e )
{
KComboBox::focusOutEvent( e );
// accept changes if the focus is moved
- if (!KexiUtils::hasParent(this, focusWidget())) //(a check needed because drop-down listbox also causes a focusout)
+ if (!KexiUtils::hasParent(TQT_TQOBJECT(this), TQT_TQOBJECT(tqfocusWidget()))) //(a check needed because drop-down listbox also causes a focusout)
slotReturnPressed(currentText());
}
diff --git a/kexi/widget/kexifieldcombobox.h b/kexi/widget/kexifieldcombobox.h
index 238168d21..9619f4073 100644
--- a/kexi/widget/kexifieldcombobox.h
+++ b/kexi/widget/kexifieldcombobox.h
@@ -20,7 +20,7 @@
#ifndef KEXIFIELDCOMBOBOX_H
#define KEXIFIELDCOMBOBOX_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kcombobox.h>
namespace KexiDB {
@@ -34,9 +34,10 @@ class KexiProject;
class KEXIEXTWIDGETS_EXPORT KexiFieldComboBox : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFieldComboBox(QWidget *parent, const char *name = 0);
+ KexiFieldComboBox(TQWidget *tqparent, const char *name = 0);
virtual ~KexiFieldComboBox();
// /*! Sets table or query schema \a schema.
@@ -52,13 +53,13 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldComboBox : public KComboBox
//! Sets global project that is used to retrieve schema informationm for this combo box.
void setProject(KexiProject *prj);
- void setTableOrQuery(const QString& name, bool table);
- QString tableOrQueryName() const;
+ void setTableOrQuery(const TQString& name, bool table);
+ TQString tableOrQueryName() const;
bool isTableAssigned() const;
- void setFieldOrExpression(const QString& string);
+ void setFieldOrExpression(const TQString& string);
void setFieldOrExpression(int index);
- QString fieldOrExpression() const;
- QString fieldOrExpressionCaption() const;
+ TQString fieldOrExpression() const;
+ TQString fieldOrExpressionCaption() const;
/*! \return index of selected table or query field.
-1 is returned if there is nothing selected or expression is selected
@@ -70,10 +71,10 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldComboBox : public KComboBox
protected slots:
void slotActivated(int);
- void slotReturnPressed(const QString & text);
+ void slotReturnPressed(const TQString & text);
protected:
- virtual void focusOutEvent( QFocusEvent *e );
+ virtual void focusOutEvent( TQFocusEvent *e );
class Private;
Private *d;
diff --git a/kexi/widget/kexifieldlistview.cpp b/kexi/widget/kexifieldlistview.cpp
index 84b577a65..e9796abf1 100644
--- a/kexi/widget/kexifieldlistview.cpp
+++ b/kexi/widget/kexifieldlistview.cpp
@@ -19,15 +19,15 @@
#include "kexifieldlistview.h"
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qstyle.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -42,8 +42,8 @@
#include <kexidragobjects.h>
#include <kexiutils/utils.h>
-KexiFieldListView::KexiFieldListView(QWidget *parent, const char *name, int options)
- : KListView(parent, name)
+KexiFieldListView::KexiFieldListView(TQWidget *tqparent, const char *name, int options)
+ : KListView(tqparent, name)
, m_schema(0)
, m_keyIcon(SmallIcon("key"))
, m_noIcon(KexiUtils::emptyIcon(KIcon::Small))
@@ -59,14 +59,14 @@ KexiFieldListView::KexiFieldListView(QWidget *parent, const char *name, int opti
if (m_options & ShowDataTypes)
addColumn(i18n("Data Type"));
if (m_options & AllowMultiSelection)
- setSelectionMode(QListView::Extended);
- setResizeMode(QListView::LastColumn);
+ setSelectionMode(TQListView::Extended);
+ setResizeMode(TQListView::LastColumn);
// header()->hide();
setSorting(-1, true); // disable sorting
setDragEnabled(true);
- connect(this, SIGNAL(doubleClicked(QListViewItem*, const QPoint &, int)),
- this, SLOT(slotDoubleClicked(QListViewItem*)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(slotDoubleClicked(TQListViewItem*)));
}
KexiFieldListView::~KexiFieldListView()
@@ -117,16 +117,16 @@ void KexiFieldListView::setSchema(KexiDB::TableOrQuerySchema* schema)
}
#if 0
-QSize KexiFieldListView::sizeHint()
+TQSize KexiFieldListView::tqsizeHint()
{
- QFontMetrics fm(font());
+ TQFontMetrics fm(font());
kdDebug() << m_table->name() << " cw=" << columnWidth(1) + fm.width("i") << ", " << fm.width(m_table->name()+" ") << endl;
- QSize s(
- QMAX( columnWidth(1) + fm.width("i"), fm.width(m_table->name()+" ")),
+ TQSize s(
+ TQMAX( columnWidth(1) + fm.width("i"), fm.width(m_table->name()+" ")),
childCount()*firstChild()->totalHeight() + 4 );
-// QSize s( columnWidth(1), childCount()*firstChild()->totalHeight() + 3*firstChild()->totalHeight()/10);
+// TQSize s( columnWidth(1), childCount()*firstChild()->totalHeight() + 3*firstChild()->totalHeight()/10);
return s;
}
@@ -137,11 +137,11 @@ void KexiFieldListView::setReadOnly(bool b)
}
#endif
-QDragObject* KexiFieldListView::dragObject()
+TQDragObject* KexiFieldListView::dragObject()
{
if (!schema())
return 0;
- const QStringList selectedFields( selectedFieldNames() );
+ const TQStringList selectedFields( selectedFieldNames() );
return new KexiFieldDrag(m_schema->table() ? "kexi/table" : "kexi/query",
m_schema->name(), selectedFields, this, "KexiFieldDrag");
/* if (selectedItem()) {
@@ -151,12 +151,12 @@ QDragObject* KexiFieldListView::dragObject()
}*/
}
-QStringList KexiFieldListView::selectedFieldNames() const
+TQStringList KexiFieldListView::selectedFieldNames() const
{
if (!schema())
- return QStringList();
- QStringList selectedFields;
- for (QListViewItem *item = firstChild(); item; item = item->nextSibling()) {
+ return TQStringList();
+ TQStringList selectedFields;
+ for (TQListViewItem *item = firstChild(); item; item = item->nextSibling()) {
if (item->isSelected()) {
//! @todo what about query fields/aliases? it.current()->text(0) can be not enough
if (item == m_allColumnsItem && m_allColumnsItem)
@@ -168,7 +168,7 @@ QStringList KexiFieldListView::selectedFieldNames() const
return selectedFields;
}
-void KexiFieldListView::slotDoubleClicked(QListViewItem* item)
+void KexiFieldListView::slotDoubleClicked(TQListViewItem* item)
{
if (schema() && item) {
//! @todo what about query fields/aliases? it.current()->text(0) can be not enough
diff --git a/kexi/widget/kexifieldlistview.h b/kexi/widget/kexifieldlistview.h
index fcbe1c5f1..e133aeae1 100644
--- a/kexi/widget/kexifieldlistview.h
+++ b/kexi/widget/kexifieldlistview.h
@@ -20,8 +20,8 @@
#ifndef KEXIFIELDLISTVIEW_H
#define KEXIFIELDLISTVIEW_H
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <klistview.h>
class KListViewItem;
@@ -35,6 +35,7 @@ namespace KexiDB {
class KEXIEXTWIDGETS_EXPORT KexiFieldListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
//! Flags used to alter list's behaviour and appearance
@@ -44,7 +45,7 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldListView : public KListView
AllowMultiSelection = 4 //!< if set, multiple selection is allowed
};
- KexiFieldListView(QWidget *parent, const char *name = 0,
+ KexiFieldListView(TQWidget *tqparent, const char *name = 0,
int options = ShowDataTypes | AllowMultiSelection );
virtual ~KexiFieldListView();
@@ -56,25 +57,25 @@ class KEXIEXTWIDGETS_EXPORT KexiFieldListView : public KListView
KexiDB::TableOrQuerySchema* schema() const { return m_schema; }
/*! \return list of selected field names. */
- QStringList selectedFieldNames() const;
+ TQStringList selectedFieldNames() const;
// void setReadOnly(bool);
-// virtual QSize sizeHint();
+// virtual TQSize tqsizeHint();
signals:
/*! Emitted when a field is double clicked */
- void fieldDoubleClicked(const QString& sourceMimeType, const QString& sourceName,
- const QString& fieldName);
+ void fieldDoubleClicked(const TQString& sourceMimeType, const TQString& sourceName,
+ const TQString& fieldName);
protected slots:
- void slotDoubleClicked(QListViewItem* item);
+ void slotDoubleClicked(TQListViewItem* item);
protected:
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
KexiDB::TableOrQuerySchema* m_schema;
- QPixmap m_keyIcon; //!< a small "primary key" icon for 0-th column
- QPixmap m_noIcon; //!< blank icon of the same size as m_keyIcon
+ TQPixmap m_keyIcon; //!< a small "primary key" icon for 0-th column
+ TQPixmap m_noIcon; //!< blank icon of the same size as m_keyIcon
int m_options;
KListViewItem *m_allColumnsItem;
};
diff --git a/kexi/widget/kexifilterdlg.cpp b/kexi/widget/kexifilterdlg.cpp
index 6f847e61f..aec34dc42 100644
--- a/kexi/widget/kexifilterdlg.cpp
+++ b/kexi/widget/kexifilterdlg.cpp
@@ -17,11 +17,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qheader.h>
-#include <qstringlist.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqheader.h>
+#include <tqstringlist.h>
#include "kexiproject.h"
#include "kexiprojecthandler.h"
@@ -30,52 +30,52 @@
#include "kexifilterdlg.h"
#include "kexiquerydesignersqleditor.h"
-KexiFilterDlg::KexiFilterDlg(KexiProject *project, QWidget *parent, const char *name)
- : QDialog(parent, name)
+KexiFilterDlg::KexiFilterDlg(KexiProject *project, TQWidget *tqparent, const char *name)
+ : TQDialog(tqparent, name)
{
m_project = project;
- QHBoxLayout *lbraces = new QHBoxLayout(0, 0, 4);
+ TQHBoxLayout *lbraces = new TQHBoxLayout(0, 0, 4);
- QPushButton *bsBO = createMiniButton("[");
- QPushButton *bBO = createMiniButton("(");
- QPushButton *bBC = createMiniButton(")");
- QPushButton *bsBC = createMiniButton("]");
+ TQPushButton *bsBO = createMiniButton("[");
+ TQPushButton *bBO = createMiniButton("(");
+ TQPushButton *bBC = createMiniButton(")");
+ TQPushButton *bsBC = createMiniButton("]");
lbraces->addWidget(bsBO);
lbraces->addWidget(bBO);
lbraces->addWidget(bBC);
lbraces->addWidget(bsBC);
- QHBoxLayout *lcond = new QHBoxLayout(0, 0, 4);
- QPushButton *blt = createMiniButton("<");
- QPushButton *beq = createMiniButton("=");
- QPushButton *bgt = createMiniButton(">");
- QPushButton *bp = createMiniButton("%");
+ TQHBoxLayout *lcond = new TQHBoxLayout(0, 0, 4);
+ TQPushButton *blt = createMiniButton("<");
+ TQPushButton *beq = createMiniButton("=");
+ TQPushButton *bgt = createMiniButton(">");
+ TQPushButton *bp = createMiniButton("%");
lcond->addWidget(blt);
lcond->addWidget(beq);
lcond->addWidget(bgt);
lcond->addWidget(bp);
- QHBoxLayout *lbool = new QHBoxLayout(0, 0, 4);
- QPushButton *bAnd = new QPushButton("AND", this);
+ TQHBoxLayout *lbool = new TQHBoxLayout(0, 0, 4);
+ TQPushButton *bAnd = new TQPushButton("AND", this);
bAnd->setFlat(true);
- QPushButton *bOr = new QPushButton("OR", this);
+ TQPushButton *bOr = new TQPushButton("OR", this);
bOr->setFlat(true);
- QPushButton *bLike = new QPushButton("LIKE", this);
+ TQPushButton *bLike = new TQPushButton("LIKE", this);
bLike->setFlat(true);
lbool->addWidget(bLike);
lbool->addWidget(bAnd);
lbool->addWidget(bOr);
- m_catalog = new QListView(this);
+ m_catalog = new TQListView(this);
m_catalog->addColumn("a");
m_catalog->header()->hide();
KexiQueryDesignerSQLEditor *e = new KexiQueryDesignerSQLEditor(this);
- setupCatalog(QString("kexi/table"));
+ setupCatalog(TQString("kexi/table"));
- QGridLayout *g = new QGridLayout(this);
+ TQGridLayout *g = new TQGridLayout(this);
g->setSpacing(6);
g->addMultiCellWidget(e, 0, 0, 0, 2);
g->addItem(lbraces, 1, 0);
@@ -84,44 +84,44 @@ KexiFilterDlg::KexiFilterDlg(KexiProject *project, QWidget *parent, const char *
g->addMultiCellWidget(m_catalog, 2, 2, 0, 2);
}
-QPushButton*
-KexiFilterDlg::createMiniButton(const QString &text)
+TQPushButton*
+KexiFilterDlg::createMiniButton(const TQString &text)
{
- QPushButton *p = new QPushButton(text, this);
+ TQPushButton *p = new TQPushButton(text, this);
p->setFlat(true);
- p->setMaximumSize(QSize(20, 300));
+ p->setMaximumSize(TQSize(20, 300));
return p;
}
void
-KexiFilterDlg::setupCatalog(const QStringList &mimes)
+KexiFilterDlg::setupCatalog(const TQStringList &mimes)
{
m_catalog->clear();
m_catalog->setRootIsDecorated(true);
- QStringList::ConstIterator it, end( mimes.constEnd() );
+ TQStringList::ConstIterator it, end( mimes.constEnd() );
for( it = mimes.constBegin(); it != end; ++it)
{
KexiProjectHandler *h = m_project->handlerForMime(*it);
if(h)
{
- QListViewItem *base = new QListViewItem(m_catalog, h->name());
+ TQListViewItem *base = new TQListViewItem(m_catalog, h->name());
base->setPixmap(0, h->groupPixmap());
- QDictIterator<KexiProjectHandlerItem> iit(*h->items()); // See QDictIterator
+ TQDictIterator<KexiProjectHandlerItem> iit(*h->items()); // See TQDictIterator
for(; iit.current(); ++iit )
{
- QListViewItem *bi = new QListViewItem(base, iit.current()->name());
+ TQListViewItem *bi = new TQListViewItem(base, iit.current()->name());
bi->setPixmap(0, h->itemPixmap());
KexiDataProvider *prov=KEXIDATAPROVIDER(h);
if(prov)
{
- QStringList fields = prov->fields(0, iit.current()->identifier());
- QStringList::ConstIterator fit, end( fields.constEnd() );
+ TQStringList fields = prov->fields(0, iit.current()->identifier());
+ TQStringList::ConstIterator fit, end( fields.constEnd() );
for( fit = fields.constBegin(); fit != end; ++fit)
{
- QListViewItem *bif = new QListViewItem(bi, (*fit));
+ TQListViewItem *bif = new TQListViewItem(bi, (*fit));
}
}
}
@@ -130,15 +130,15 @@ KexiFilterDlg::setupCatalog(const QStringList &mimes)
}
void
-KexiFilterDlg::setupCatalog(const QString &mime)
+KexiFilterDlg::setupCatalog(const TQString &mime)
{
- QStringList l;
+ TQStringList l;
l.append(mime);
setupCatalog(l);
}
void
-KexiFilterDlg::insert(QListViewItem *)
+KexiFilterDlg::insert(TQListViewItem *)
{
}
diff --git a/kexi/widget/kexifilterdlg.h b/kexi/widget/kexifilterdlg.h
index e5544888e..4a3d7e79d 100644
--- a/kexi/widget/kexifilterdlg.h
+++ b/kexi/widget/kexifilterdlg.h
@@ -20,30 +20,31 @@
#ifndef KEXIFILTERDLG_H
#define KEXIFILTERDLG_H
-#include <qdialog.h>
+#include <tqdialog.h>
-class QPushButton;
-class QListView;
-class QListViewItem;
+class TQPushButton;
+class TQListView;
+class TQListViewItem;
class KexiProject;
-class KEXIEXTWIDGETS_EXPORT KexiFilterDlg : public QDialog
+class KEXIEXTWIDGETS_EXPORT KexiFilterDlg : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiFilterDlg(KexiProject *p, QWidget *parent=0, const char *name=0);
+ KexiFilterDlg(KexiProject *p, TQWidget *tqparent=0, const char *name=0);
~KexiFilterDlg();
- QPushButton *createMiniButton(const QString &text);
- void setupCatalog(const QStringList &mimes);
- void setupCatalog(const QString &mime);
+ TQPushButton *createMiniButton(const TQString &text);
+ void setupCatalog(const TQStringList &mimes);
+ void setupCatalog(const TQString &mime);
protected slots:
- void insert(QListViewItem *);
+ void insert(TQListViewItem *);
protected:
- QListView *m_catalog;
+ TQListView *m_catalog;
KexiProject *m_project;
};
diff --git a/kexi/widget/kexiprjtypeselector.cpp b/kexi/widget/kexiprjtypeselector.cpp
index 71dafc6c1..94a62e0a8 100644
--- a/kexi/widget/kexiprjtypeselector.cpp
+++ b/kexi/widget/kexiprjtypeselector.cpp
@@ -18,15 +18,15 @@
*/
#include "kexiprjtypeselector.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kiconloader.h>
#include <kmimetype.h>
#include <kexidb/driver.h>
-KexiPrjTypeSelector::KexiPrjTypeSelector( QWidget* parent )
- : KexiPrjTypeSelectorBase( parent, "KexiPrjTypeSelector" )
+KexiPrjTypeSelector::KexiPrjTypeSelector( TQWidget* tqparent )
+ : KexiPrjTypeSelectorBase( tqparent, "KexiPrjTypeSelector" )
{
- QString none;
+ TQString none;
icon_file->setPixmap(
KGlobal::iconLoader()->loadIcon( KMimeType::mimeType(
KexiDB::Driver::defaultFileBasedDriverMimeType() )->icon(none,0), KIcon::Desktop, 48
diff --git a/kexi/widget/kexiprjtypeselector.h b/kexi/widget/kexiprjtypeselector.h
index efb8a294c..13e464842 100644
--- a/kexi/widget/kexiprjtypeselector.h
+++ b/kexi/widget/kexiprjtypeselector.h
@@ -26,9 +26,10 @@
class KEXIEXTWIDGETS_EXPORT KexiPrjTypeSelector : public KexiPrjTypeSelectorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiPrjTypeSelector( QWidget* parent = 0 );
+ KexiPrjTypeSelector( TQWidget* tqparent = 0 );
~KexiPrjTypeSelector();
protected slots:
diff --git a/kexi/widget/kexiprjtypeselectorbase.ui b/kexi/widget/kexiprjtypeselectorbase.ui
index a8031909c..069a89b0c 100644
--- a/kexi/widget/kexiprjtypeselectorbase.ui
+++ b/kexi/widget/kexiprjtypeselectorbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KexiPrjTypeSelectorBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KexiPrjTypeSelectorBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>option_server</cstring>
</property>
@@ -56,7 +56,7 @@
<number>2</number>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>option_file</cstring>
</property>
@@ -70,7 +70,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>icon_file</cstring>
</property>
@@ -88,11 +88,11 @@
<property name="scaledContents">
<bool>true</bool>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>icon_server</cstring>
</property>
@@ -110,11 +110,11 @@
<property name="scaledContents">
<bool>true</bool>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignLeft</set>
</property>
</widget>
- <widget class="QFrame" row="2" column="1">
+ <widget class="TQFrame" row="2" column="1">
<property name="name">
<cstring>frame_server</cstring>
</property>
@@ -152,11 +152,11 @@
<includes>
<include location="local" impldecl="in implementation">kexiprjtypeselectorbase.ui.h</include>
</includes>
-<slots>
+<Q_SLOTS>
<slot access="protected" specifier="non virtual">slotSelectionChanged( int id )</slot>
-</slots>
+</Q_SLOTS>
<functions>
<function access="private" specifier="non virtual">init()</function>
</functions>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kexi/widget/kexiprjtypeselectorbase.ui.h b/kexi/widget/kexiprjtypeselectorbase.ui.h
index 03f1301fd..f63529ae8 100644
--- a/kexi/widget/kexiprjtypeselectorbase.ui.h
+++ b/kexi/widget/kexiprjtypeselectorbase.ui.h
@@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation.
**
** If you want to add, delete, or rename functions or slots, use
-** Qt Designer to update this file, preserving your code.
+** TQt Designer to update this file, preserving your code.
**
** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy().
diff --git a/kexi/widget/kexipropertyeditorview.cpp b/kexi/widget/kexipropertyeditorview.cpp
index 5225a7afd..801f17b25 100644
--- a/kexi/widget/kexipropertyeditorview.cpp
+++ b/kexi/widget/kexipropertyeditorview.cpp
@@ -27,20 +27,20 @@
#include <klocale.h>
#include <kiconloader.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
-KexiObjectInfoLabel::KexiObjectInfoLabel(QWidget* parent, const char* name)
- : QWidget(parent, name)
+KexiObjectInfoLabel::KexiObjectInfoLabel(TQWidget* tqparent, const char* name)
+ : TQWidget(tqparent, name)
{
- QHBoxLayout *hlyr = new QHBoxLayout(this);
- m_objectIconLabel = new QLabel(this);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(this);
+ m_objectIconLabel = new TQLabel(this);
m_objectIconLabel->setMargin(2);
setFixedHeight( IconSize(KIcon::Small) + 2 + 2 );
hlyr->addWidget(m_objectIconLabel);
- m_objectNameLabel = new QLabel(this);
+ m_objectNameLabel = new TQLabel(this);
m_objectNameLabel->setMargin(2);
- m_objectNameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+ m_objectNameLabel->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred);
hlyr->addWidget(m_objectNameLabel);
}
@@ -48,7 +48,7 @@ KexiObjectInfoLabel::~KexiObjectInfoLabel()
{
}
-void KexiObjectInfoLabel::setObjectClassIcon(const QString& name)
+void KexiObjectInfoLabel::setObjectClassIcon(const TQString& name)
{
m_classIcon = name;
if (m_classIcon.isEmpty())
@@ -58,13 +58,13 @@ void KexiObjectInfoLabel::setObjectClassIcon(const QString& name)
m_objectIconLabel->setPixmap( SmallIcon(name) );
}
-void KexiObjectInfoLabel::setObjectClassName(const QString& name)
+void KexiObjectInfoLabel::setObjectClassName(const TQString& name)
{
m_className = name;
updateName();
}
-void KexiObjectInfoLabel::setObjectName(const QString& name)
+void KexiObjectInfoLabel::setObjectName(const TQString& name)
{
m_objectName = name;
updateName();
@@ -72,15 +72,15 @@ void KexiObjectInfoLabel::setObjectName(const QString& name)
void KexiObjectInfoLabel::updateName()
{
- QString txt( m_className );
+ TQString txt( m_className );
if (txt.isEmpty())
txt = m_objectName;
else if (!m_objectName.isEmpty())
- txt += QString(" \"%1\"").arg(m_objectName);
+ txt += TQString(" \"%1\"").tqarg(m_objectName);
m_objectNameLabel->setText(txt);
}
-void KexiObjectInfoLabel::setBuddy( QWidget * buddy )
+void KexiObjectInfoLabel::setBuddy( TQWidget * buddy )
{
m_objectNameLabel->setBuddy(buddy);
}
@@ -95,47 +95,47 @@ class KexiPropertyEditorView::Private
{
}
KoProperty::Editor *editor;
-// QLabel *objectIcon;
-// QString iconName;
-// QLabel *objectClassName;
+// TQLabel *objectIcon;
+// TQString iconName;
+// TQLabel *objectClassName;
KexiObjectInfoLabel *objectInfoLabel;
};
//------------------------------
-KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, QWidget* parent)
- : QWidget(parent, "KexiPropertyEditorView")
+KexiPropertyEditorView::KexiPropertyEditorView(KexiMainWindow *mainWin, TQWidget* tqparent)
+ : TQWidget(tqparent, "KexiPropertyEditorView")
, d(new Private())
{
setCaption(i18n("Properties"));
//TODO: set a nice icon
setIcon(*mainWin->icon());
- QVBoxLayout *lyr = new QVBoxLayout(this);
+ TQVBoxLayout *lyr = new TQVBoxLayout(this);
//add object class info
d->objectInfoLabel = new KexiObjectInfoLabel(this, "KexiObjectInfoLabel");
lyr->addWidget(d->objectInfoLabel);
/*
- QHBoxLayout *vlyr = new QHBoxLayout(lyr);
- d->objectIcon = new QLabel(this);
+ TQHBoxLayout *vlyr = new TQHBoxLayout(lyr);
+ d->objectIcon = new TQLabel(this);
d->objectIcon->setMargin(2);
d->objectIcon->setFixedHeight( IconSize(KIcon::Small) + 2 + 2 );
vlyr->addWidget(d->objectIcon);
- d->objectClassName = new QLabel(this);
+ d->objectClassName = new TQLabel(this);
d->objectClassName->setMargin(2);
- d->objectClassName->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
+ d->objectClassName->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred);
vlyr->addWidget(d->objectClassName);*/
d->editor = new KoProperty::Editor(this, true /*AutoSync*/, "propeditor");
lyr->addWidget(d->editor);
setFocusProxy(d->editor);
d->objectInfoLabel->setBuddy(d->editor);
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(TQ_WheelFocus);
- connect(d->editor, SIGNAL(propertySetChanged(KoProperty::Set*)),
- this, SLOT(slotPropertySetChanged(KoProperty::Set*)));
+ connect(d->editor, TQT_SIGNAL(propertySetChanged(KoProperty::Set*)),
+ this, TQT_SLOT(slotPropertySetChanged(KoProperty::Set*)));
// d->iconName = "dummy";
slotPropertySetChanged(0);
@@ -146,24 +146,24 @@ KexiPropertyEditorView::~KexiPropertyEditorView()
delete d;
}
-QSize KexiPropertyEditorView::sizeHint() const
+TQSize KexiPropertyEditorView::tqsizeHint() const
{
- return QSize(200,200);//m_editor->sizeHint();
+ return TQSize(200,200);//m_editor->tqsizeHint();
}
-QSize KexiPropertyEditorView::minimumSizeHint() const
+TQSize KexiPropertyEditorView::tqminimumSizeHint() const
{
- return QSize(200,200);//m_editor->sizeHint();
+ return TQSize(200,200);//m_editor->tqsizeHint();
}
-/*void KexiPropertyEditorView::setGeometry ( const QRect &r )
+/*void KexiPropertyEditorView::setGeometry ( const TQRect &r )
{
- QWidget::setGeometry(r);
+ TQWidget::setGeometry(r);
}
void KexiPropertyEditorView::resize ( int w, int h )
{
- QWidget::resize( w, h );
+ TQWidget::resize( w, h );
}*/
KoProperty::Editor *KexiPropertyEditorView::editor() const
@@ -179,23 +179,23 @@ KoProperty::Editor *KexiPropertyEditorView::editor() const
hidden.
*/
void KexiPropertyEditorView::updateInfoLabelForPropertySet(KexiObjectInfoLabel *infoLabel,
- KoProperty::Set* set, const QString& textToDisplayForNullSet)
+ KoProperty::Set* set, const TQString& textToDisplayForNullSet)
{
- QString className, iconName, objectName;
+ TQString className, iconName, objectName;
if (set) {
- if (set->contains("this:classString"))
+ if (set->tqcontains("this:classString"))
className = (*set)["this:classString"].value().toString();
- if (set->contains("this:iconName"))
+ if (set->tqcontains("this:iconName"))
iconName = (*set)["this:iconName"].value().toString();
- const bool useCaptionAsObjectName = set->contains("this:useCaptionAsObjectName")
+ const bool useCaptionAsObjectName = set->tqcontains("this:useCaptionAsObjectName")
&& (*set)["this:useCaptionAsObjectName"].value().toBool();
- if (set->contains(useCaptionAsObjectName ? "caption" : "name"))
+ if (set->tqcontains(useCaptionAsObjectName ? "caption" : "name"))
objectName = (*set)[useCaptionAsObjectName ? "caption" : "name"].value().toString();
}
if (!set || objectName.isEmpty()) {
objectName = textToDisplayForNullSet;
- className = QString::null;
- iconName = QString::null;
+ className = TQString();
+ iconName = TQString();
}
if (className.isEmpty() && objectName.isEmpty())
diff --git a/kexi/widget/kexipropertyeditorview.h b/kexi/widget/kexipropertyeditorview.h
index 77dab6c80..79adb9e05 100644
--- a/kexi/widget/kexipropertyeditorview.h
+++ b/kexi/widget/kexipropertyeditorview.h
@@ -22,9 +22,9 @@
#define KEXIPROPERTYEDITORVIEW_H
//#include "kexiviewbase.h"
-#include <qwidget.h>
+#include <tqwidget.h>
-class QLabel;
+class TQLabel;
class KexiMainWindow;
namespace KoProperty {
@@ -44,25 +44,25 @@ namespace KoProperty {
- [button_icon] Button "quit"
- [label_icon] Label "welcome"
*/
-class KEXIEXTWIDGETS_EXPORT KexiObjectInfoLabel : public QWidget
+class KEXIEXTWIDGETS_EXPORT KexiObjectInfoLabel : public TQWidget
{
public:
- KexiObjectInfoLabel(QWidget* parent, const char* name = 0);
+ KexiObjectInfoLabel(TQWidget* tqparent, const char* name = 0);
~KexiObjectInfoLabel();
- void setObjectClassIcon(const QString& name);
- QString objectClassIcon() const { return m_classIcon; }
- void setObjectClassName(const QString& name);
- QString objectClassName() const { return m_className; }
- void setObjectName(const QString& name);
- QString objectName() const { return m_objectName; }
- void setBuddy( QWidget * buddy );
+ void setObjectClassIcon(const TQString& name);
+ TQString objectClassIcon() const { return m_classIcon; }
+ void setObjectClassName(const TQString& name);
+ TQString objectClassName() const { return m_className; }
+ void setObjectName(const TQString& name);
+ TQString objectName() const { return m_objectName; }
+ void setBuddy( TQWidget * buddy );
protected:
void updateName();
- QString m_className;
- QString m_classIcon, m_objectName;
- QLabel *m_objectIconLabel, *m_objectNameLabel;
+ TQString m_className;
+ TQString m_classIcon, m_objectName;
+ TQLabel *m_objectIconLabel, *m_objectNameLabel;
};
//! @short The container (acts as a dock window) for KexiPropertyEditor.
@@ -79,12 +79,13 @@ class KEXIEXTWIDGETS_EXPORT KexiObjectInfoLabel : public QWidget
property instead of "name" - this can be usable when we know that "caption" properties
are available for a given type of objects (this is the case for Table Designer fields)
*/
-class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public QWidget
+class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiPropertyEditorView(KexiMainWindow *mainWin, QWidget* parent);
+ KexiPropertyEditorView(KexiMainWindow *mainWin, TQWidget* tqparent);
virtual ~KexiPropertyEditorView();
/*! Helper function. Updates \a infoLabel widget by reusing properties provided
@@ -96,14 +97,14 @@ class KEXIEXTWIDGETS_EXPORT KexiPropertyEditorView : public QWidget
hidden. */
static void updateInfoLabelForPropertySet(
KexiObjectInfoLabel *infoLabel, KoProperty::Set* set,
- const QString& textToDisplayForNullSet = QString::null);
+ const TQString& textToDisplayForNullSet = TQString());
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
KoProperty::Editor *editor() const;
// public slots:
-// virtual void setGeometry( const QRect &r );
+// virtual void setGeometry( const TQRect &r );
// virtual void resize( int w, int h );
protected slots:
diff --git a/kexi/widget/kexiquerydesignersqleditor.cpp b/kexi/widget/kexiquerydesignersqleditor.cpp
index 3ff579894..1c68138fa 100644
--- a/kexi/widget/kexiquerydesignersqleditor.cpp
+++ b/kexi/widget/kexiquerydesignersqleditor.cpp
@@ -22,8 +22,8 @@
#include "kexiquerydesignersqleditor.h"
KexiQueryDesignerSQLEditor::KexiQueryDesignerSQLEditor(
- KexiMainWindow *mainWin, QWidget *parent, const char *name)
- : KexiEditor(mainWin, parent, name)
+ KexiMainWindow *mainWin, TQWidget *tqparent, const char *name)
+ : KexiEditor(mainWin, tqparent, name)
{
setHighlightMode("sql");
}
diff --git a/kexi/widget/kexiquerydesignersqleditor.h b/kexi/widget/kexiquerydesignersqleditor.h
index a34dbc7a9..9b1f9f9b7 100644
--- a/kexi/widget/kexiquerydesignersqleditor.h
+++ b/kexi/widget/kexiquerydesignersqleditor.h
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYDESIGNERSQLEDITOR_H
-#define KEXIQUERYDESIGNERSQLEDITOR_H
+#ifndef KEXITQUERYDESIGNERSQLEDITOR_H
+#define KEXITQUERYDESIGNERSQLEDITOR_H
#include "kexieditor.h"
@@ -30,9 +30,10 @@
class KEXIEXTWIDGETS_EXPORT KexiQueryDesignerSQLEditor : public KexiEditor
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiQueryDesignerSQLEditor(KexiMainWindow *mainWin, QWidget *parent, const char *name = 0);
+ KexiQueryDesignerSQLEditor(KexiMainWindow *mainWin, TQWidget *tqparent, const char *name = 0);
virtual ~KexiQueryDesignerSQLEditor();
};
diff --git a/kexi/widget/kexiqueryparameters.cpp b/kexi/widget/kexiqueryparameters.cpp
index 449c265c5..bcef819f1 100644
--- a/kexi/widget/kexiqueryparameters.cpp
+++ b/kexi/widget/kexiqueryparameters.cpp
@@ -29,14 +29,14 @@
#include "utils/kexidatetimeformatter.h"
//static
-QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
+TQValueList<TQVariant> KexiQueryParameters::getParameters(TQWidget *tqparent,
const KexiDB::Driver &driver, KexiDB::QuerySchema& querySchema, bool &ok)
{
Q_UNUSED(driver);
ok = false;
const KexiDB::QuerySchemaParameterList params( querySchema.parameters() );
- QValueList<QVariant> values;
- const QString caption( i18n("Enter Query Parameter Value", "Enter Parameter Value") );
+ TQValueList<TQVariant> values;
+ const TQString caption( i18n("Enter Query Parameter Value", "Enter Parameter Value") );
foreach(KexiDB::QuerySchemaParameterListConstIterator, it, params) {
switch ((*it).type) {
case KexiDB::Field::Byte:
@@ -48,53 +48,53 @@ QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
//! @todo add support for unsigned parameter here
KexiDB::getLimitsForType((*it).type, minValue, maxValue);
const int result = KInputDialog::getInteger(
- caption, (*it).message, 0, minValue, maxValue, 1/*step*/, 10/*base*/, &ok, parent);
+ caption, (*it).message, 0, minValue, maxValue, 1/*step*/, 10/*base*/, &ok, tqparent);
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append(result);
break;
}
case KexiDB::Field::Boolean: {
- QStringList list;
+ TQStringList list;
list << i18n("Boolean True - Yes", "Yes") << i18n("Boolean False - No", "No");
- const QString result = KInputDialog::getItem(
- caption, (*it).message, list, 0/*current*/, false /*!editable*/, &ok, parent);
+ const TQString result = KInputDialog::getItem(
+ caption, (*it).message, list, 0/*current*/, false /*!editable*/, &ok, tqparent);
if (!ok || result.isEmpty())
- return QValueList<QVariant>(); //cancelled
- values.append( QVariant( result==list.first(), 1 ) );
+ return TQValueList<TQVariant>(); //cancelled
+ values.append( TQVariant( result==list.first(), 1 ) );
break;
}
case KexiDB::Field::Date: {
KexiDateFormatter df;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, df.inputMask() );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( df.stringToDate(result) );
break;
}
case KexiDB::Field::DateTime: {
KexiDateFormatter df;
KexiTimeFormatter tf;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, dateTimeInputMask(df, tf) );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( stringToDateTime(df, tf, result) );
break;
}
case KexiDB::Field::Time: {
KexiTimeFormatter tf;
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent, 0/*name*/,
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent, 0/*name*/,
//! @todo add validator
0/*validator*/, tf.inputMask() );
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( tf.stringToTime(result) );
break;
}
@@ -102,35 +102,35 @@ QValueList<QVariant> KexiQueryParameters::getParameters(QWidget *parent,
case KexiDB::Field::Double: {
// KInputDialog::getDouble() does not work well, use getText and double validator
KDoubleValidator validator(0);
- const QString textResult = KInputDialog::getText( caption, (*it).message, QString::null, &ok,
- parent, 0, &validator);
+ const TQString textResult = KInputDialog::getText( caption, (*it).message, TQString(), &ok,
+ tqparent, 0, &validator);
if (!ok || textResult.isEmpty())
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
//! @todo this value will be still rounded: consider storing them as a decimal type
-//! (e.g. using a special Q_LLONG+decimalplace class)
+//! (e.g. using a special TQ_LLONG+decimalplace class)
const double result = textResult.toDouble(&ok); //this is also good for float (to avoid rounding)
if (!ok)
- return QValueList<QVariant>();
+ return TQValueList<TQVariant>();
values.append( result );
break;
}
case KexiDB::Field::Text:
case KexiDB::Field::LongText: {
- const QString result = KInputDialog::getText(
- caption, (*it).message, QString::null, &ok, parent);
+ const TQString result = KInputDialog::getText(
+ caption, (*it).message, TQString(), &ok, tqparent);
if (!ok)
- return QValueList<QVariant>(); //cancelled
+ return TQValueList<TQVariant>(); //cancelled
values.append( result );
break;
}
case KexiDB::Field::BLOB: {
//! @todo BLOB input unsupported
- values.append( QByteArray() );
+ values.append( TQByteArray() );
}
default:
kexiwarn << "KexiQueryParameters::getParameters() unsupported type " << KexiDB::Field::typeName((*it).type)
<< " for parameter \"" << (*it).message << "\" - aborting query execution!" << endl;
- return QValueList<QVariant>();
+ return TQValueList<TQVariant>();
}
}
ok = true;
diff --git a/kexi/widget/kexiqueryparameters.h b/kexi/widget/kexiqueryparameters.h
index 40251b715..b80a37adb 100644
--- a/kexi/widget/kexiqueryparameters.h
+++ b/kexi/widget/kexiqueryparameters.h
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef KEXIQUERYPARAMETERS_H
-#define KEXIQUERYPARAMETERS_H
+#ifndef KEXITQUERYPARAMETERS_H
+#define KEXITQUERYPARAMETERS_H
#include <kexidb/queryschema.h>
@@ -37,7 +37,7 @@ class KEXIEXTWIDGETS_EXPORT KexiQueryParameters
//! @todo support defaults
//! @todo support validation rules, e.g. min/max value, unsigned
//! @todo support Enum type (list of strings, need support for keys and user-visible strings)
- static QValueList<QVariant> getParameters(QWidget *parent, const KexiDB::Driver &driver,
+ static TQValueList<TQVariant> getParameters(TQWidget *tqparent, const KexiDB::Driver &driver,
KexiDB::QuerySchema& querySchema, bool &ok);
};
diff --git a/kexi/widget/kexiscrollview.cpp b/kexi/widget/kexiscrollview.cpp
index 1cf473781..569d61f81 100644
--- a/kexi/widget/kexiscrollview.cpp
+++ b/kexi/widget/kexiscrollview.cpp
@@ -19,10 +19,10 @@
*/
#include "kexiscrollview.h"
-#include <qcursor.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqcursor.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -36,31 +36,31 @@
class KexiScrollViewData
{
public:
- QPixmap horizontalOuterAreaPixmapBuffer;
- QPixmap verticalOuterAreaPixmapBuffer;
+ TQPixmap horizontalOuterAreaPixmapBuffer;
+ TQPixmap verticalOuterAreaPixmapBuffer;
};
// @todo warning: not reentrant!
static KStaticDeleter<KexiScrollViewData> KexiScrollView_data_deleter;
KexiScrollViewData* KexiScrollView_data = 0;
-KexiScrollView::KexiScrollView(QWidget *parent, bool preview)
- : QScrollView(parent, "kexiscrollview", WStaticContents)
+KexiScrollView::KexiScrollView(TQWidget *tqparent, bool preview)
+ : TQScrollView(tqparent, "kexiscrollview", WStaticContents)
, m_widget(0)
, m_helpFont(font())
, m_preview(preview)
, m_scrollViewNavPanel(0)
{
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
- QColor fc = palette().active().foreground(),
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
+ TQColor fc = tqpalette().active().foreground(),
bc = viewport()->paletteBackgroundColor();
m_helpColor = KexiUtils::blendedColors(fc, bc, 1, 2);
-// m_helpColor = QColor((fc.red()+bc.red()*2)/3, (fc.green()+bc.green()*2)/3,
+// m_helpColor = TQColor((fc.red()+bc.red()*2)/3, (fc.green()+bc.green()*2)/3,
// (fc.blue()+bc.blue()*2)/3);
m_helpFont.setPointSize( m_helpFont.pointSize() * 3 );
- setFocusPolicy(WheelFocus);
+ setFocusPolicy(TQ_WheelFocus);
//initial resize mode is always manual;
//will be changed on show(), if needed
@@ -73,14 +73,14 @@ KexiScrollView::KexiScrollView(QWidget *parent, bool preview)
m_gridSize = 0;
m_outerAreaVisible = true;
- connect(&m_delayedResize, SIGNAL(timeout()), this, SLOT(refreshContentsSize()));
+ connect(&m_delayedResize, TQT_SIGNAL(timeout()), this, TQT_SLOT(refreshContentsSize()));
m_smodeSet = false;
if (m_preview) {
refreshContentsSizeLater(true, true);
//! @todo allow to hide navigator
updateScrollBars();
m_scrollViewNavPanel = new KexiRecordNavigator(this, leftMargin(), "nav");
- m_scrollViewNavPanel->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred);
+ m_scrollViewNavPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred);
}
}
@@ -89,7 +89,7 @@ KexiScrollView::~KexiScrollView()
}
void
-KexiScrollView::setWidget(QWidget *w)
+KexiScrollView::setWidget(TQWidget *w)
{
addChild(w);
m_widget = w;
@@ -127,9 +127,9 @@ KexiScrollView::refreshContentsSizeLater(bool horizontal, bool vertical)
m_hsmode = hScrollBarMode();
}
// if (vertical)
- setVScrollBarMode(QScrollView::AlwaysOff);
+ setVScrollBarMode(TQScrollView::AlwaysOff);
//if (horizontal)
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
updateScrollBars();
m_delayedResize.start( 100, true );
}
@@ -152,9 +152,9 @@ KexiScrollView::refreshContentsSize()
// Ensure there is always space to resize Form
int w = contentsWidth(), h = contentsHeight();
bool change = false;
- const int delta_x = QMAX( (KexiScrollView_data ?
+ const int delta_x = TQMAX( (KexiScrollView_data ?
KexiScrollView_data->verticalOuterAreaPixmapBuffer.width() : 0), 300);
- const int delta_y = QMAX( (KexiScrollView_data ?
+ const int delta_y = TQMAX( (KexiScrollView_data ?
KexiScrollView_data->horizontalOuterAreaPixmapBuffer.height() : 0), 300);
if((m_widget->width() + delta_x * 2 / 3) > w) {
w = m_widget->width() + delta_x;
@@ -173,11 +173,11 @@ KexiScrollView::refreshContentsSize()
change = true;
}
if (change) {
- repaint();
- viewport()->repaint();
- repaintContents();
+ tqrepaint();
+ viewport()->tqrepaint();
+ tqrepaintContents();
updateContents(0, 0, 2000,2000);
- clipper()->repaint();
+ clipper()->tqrepaint();
resizeContents(w, h);
}
@@ -199,22 +199,22 @@ KexiScrollView::updateNavPanelGeometry()
}
void
-KexiScrollView::contentsMousePressEvent(QMouseEvent *ev)
+KexiScrollView::contentsMousePressEvent(TQMouseEvent *ev)
{
if(!m_widget)
return;
- QRect r3(0, 0, m_widget->width() + 4, m_widget->height() + 4);
- if(!r3.contains(ev->pos())) // clicked outside form
+ TQRect r3(0, 0, m_widget->width() + 4, m_widget->height() + 4);
+ if(!r3.tqcontains(ev->pos())) // clicked outside form
//m_form->resetSelection();
emit outerAreaClicked();
if(!m_enableResizing)
return;
- QRect r(m_widget->width(), 0, 4, m_widget->height() + 4); // right limit
- QRect r2(0, m_widget->height(), m_widget->width() + 4, 4); // bottom limit
- if(r.contains(ev->pos()) || r2.contains(ev->pos()))
+ TQRect r(m_widget->width(), 0, 4, m_widget->height() + 4); // right limit
+ TQRect r2(0, m_widget->height(), m_widget->width() + 4, 4); // bottom limit
+ if(r.tqcontains(ev->pos()) || r2.tqcontains(ev->pos()))
{
m_resizing = true;
emit resizingStarted();
@@ -222,7 +222,7 @@ KexiScrollView::contentsMousePressEvent(QMouseEvent *ev)
}
void
-KexiScrollView::contentsMouseReleaseEvent(QMouseEvent *)
+KexiScrollView::contentsMouseReleaseEvent(TQMouseEvent *)
{
if(m_resizing) {
m_resizing = false;
@@ -233,7 +233,7 @@ KexiScrollView::contentsMouseReleaseEvent(QMouseEvent *)
}
void
-KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
+KexiScrollView::contentsMouseMoveEvent(TQMouseEvent *ev)
{
if(!m_widget || !m_enableResizing)
return;
@@ -253,17 +253,17 @@ KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
tmpy = contentsY();
// we look for the max widget right() (or bottom()), which would be the limit for form resizing (not to hide widgets)
- QObjectList *list = m_widget->queryList("QWidget", 0, true, false /* not recursive*/);
- for(QObject *o = list->first(); o; o = list->next())
+ TQObjectList *list = m_widget->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, true, false /* not recursive*/);
+ for(TQObject *o = list->first(); o; o = list->next())
{
- QWidget *w = (QWidget*)o;
- tmpx = QMAX(tmpx, (w->geometry().right() + 10));
- tmpy = QMAX(tmpy, (w->geometry().bottom() + 10));
+ TQWidget *w = (TQWidget*)o;
+ tmpx = TQMAX(tmpx, (w->tqgeometry().right() + 10));
+ tmpy = TQMAX(tmpy, (w->tqgeometry().bottom() + 10));
}
delete list;
int neww = -1, newh;
- if(cursor().shape() == QCursor::SizeHorCursor)
+ if(cursor().shape() == TQCursor::SizeHorCursor)
{
if(m_snapToGrid)
neww = int( float(tmpx) / float(m_gridSize) + 0.5 ) * m_gridSize;
@@ -271,7 +271,7 @@ KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
neww = tmpx;
newh = m_widget->height();
}
- else if(cursor().shape() == QCursor::SizeVerCursor)
+ else if(cursor().shape() == TQCursor::SizeVerCursor)
{
neww = m_widget->width();
if(m_snapToGrid)
@@ -279,7 +279,7 @@ KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
else
newh = tmpy;
}
- else if(cursor().shape() == QCursor::SizeFDiagCursor)
+ else if(cursor().shape() == TQCursor::SizeFDiagCursor)
{
if(m_snapToGrid) {
neww = int( float(tmpx) / float(m_gridSize) + 0.5 ) * m_gridSize;
@@ -290,7 +290,7 @@ KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
}
}
//needs update?
- if (neww!=-1 && m_widget->size() != QSize(neww, newh)) {
+ if (neww!=-1 && m_widget->size() != TQSize(neww, newh)) {
m_widget->resize( neww, newh );
refreshContentsSize();
updateContents();
@@ -298,46 +298,46 @@ KexiScrollView::contentsMouseMoveEvent(QMouseEvent *ev)
}
else // update mouse cursor
{
- QPoint p = ev->pos();
- QRect r(m_widget->width(), 0, 4, m_widget->height()); // right
- QRect r2(0, m_widget->height(), m_widget->width(), 4); // bottom
- QRect r3(m_widget->width(), m_widget->height(), 4, 4); // bottom-right corner
-
- if(r.contains(p))
- setCursor(QCursor::SizeHorCursor);
- else if(r2.contains(p))
- setCursor(QCursor::SizeVerCursor);
- else if(r3.contains(p))
- setCursor(QCursor::SizeFDiagCursor);
+ TQPoint p = ev->pos();
+ TQRect r(m_widget->width(), 0, 4, m_widget->height()); // right
+ TQRect r2(0, m_widget->height(), m_widget->width(), 4); // bottom
+ TQRect r3(m_widget->width(), m_widget->height(), 4, 4); // bottom-right corner
+
+ if(r.tqcontains(p))
+ setCursor(TQCursor::SizeHorCursor);
+ else if(r2.tqcontains(p))
+ setCursor(TQCursor::SizeVerCursor);
+ else if(r3.tqcontains(p))
+ setCursor(TQCursor::SizeFDiagCursor);
else
unsetCursor();
}
}
void
-KexiScrollView::setupPixmapBuffer(QPixmap& pixmap, const QString& text, int lines)
+KexiScrollView::setupPixmapBuffer(TQPixmap& pixmap, const TQString& text, int lines)
{
Q_UNUSED( lines );
- QFontMetrics fm(m_helpFont);
- const int flags = Qt::AlignCenter|Qt::AlignTop;
- QRect rect(fm.boundingRect(0,0,1000,1000,flags,text));
+ TQFontMetrics fm(m_helpFont);
+ const int flags = TQt::AlignCenter|TQt::AlignTop;
+ TQRect rect(fm.boundingRect(0,0,1000,1000,flags,text));
const int txtw = rect.width(), txth = rect.height();//fm.width(text), txth = fm.height()*lines;
- pixmap = QPixmap(txtw, txth);
+ pixmap = TQPixmap(txtw, txth);
if (!pixmap.isNull()) {
//create pixmap once
pixmap.fill( viewport()->paletteBackgroundColor() );
- QPainter pb(&pixmap, this);
+ TQPainter pb(&pixmap, this);
pb.setPen(m_helpColor);
pb.setFont(m_helpFont);
- pb.drawText(0, 0, txtw, txth, Qt::AlignCenter|Qt::AlignTop, text);
+ pb.drawText(0, 0, txtw, txth, TQt::AlignCenter|TQt::AlignTop, text);
}
}
void
-KexiScrollView::drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph )
+KexiScrollView::drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph )
{
- QScrollView::drawContents(p, clipx, clipy, clipw, cliph);
+ TQScrollView::drawContents(p, clipx, clipy, clipw, cliph);
if (m_widget) {
if(m_preview || !m_outerAreaVisible)
return;
@@ -345,7 +345,7 @@ KexiScrollView::drawContents( QPainter * p, int clipx, int clipy, int clipw, int
//draw right and bottom borders
const int wx = childX(m_widget);
const int wy = childY(m_widget);
- p->setPen(palette().active().foreground());
+ p->setPen(tqpalette().active().foreground());
p->drawLine(wx+m_widget->width(), wy, wx+m_widget->width(), wy+m_widget->height());
p->drawLine(wx, wy+m_widget->height(), wx+m_widget->width(), wy+m_widget->height());
//kdDebug() << "KexiScrollView::drawContents() " << wy+m_widget->height() << endl;
@@ -363,14 +363,14 @@ KexiScrollView::drawContents( QPainter * p, int clipx, int clipy, int clipw, int
{
if (m_widget->height()>(KexiScrollView_data->verticalOuterAreaPixmapBuffer.height()+20)) {
p->drawPixmap(
- QMAX( m_widget->width(), KexiScrollView_data->verticalOuterAreaPixmapBuffer.width() + 20 ) + 20,
- QMAX( (m_widget->height() - KexiScrollView_data->verticalOuterAreaPixmapBuffer.height())/2, 20 ),
+ TQMAX( m_widget->width(), KexiScrollView_data->verticalOuterAreaPixmapBuffer.width() + 20 ) + 20,
+ TQMAX( (m_widget->height() - KexiScrollView_data->verticalOuterAreaPixmapBuffer.height())/2, 20 ),
KexiScrollView_data->verticalOuterAreaPixmapBuffer
);
}
p->drawPixmap(
- QMAX( (m_widget->width() - KexiScrollView_data->horizontalOuterAreaPixmapBuffer.width())/2, 20 ),
- QMAX( m_widget->height(), KexiScrollView_data->horizontalOuterAreaPixmapBuffer.height() + 20 ) + 20,
+ TQMAX( (m_widget->width() - KexiScrollView_data->horizontalOuterAreaPixmapBuffer.width())/2, 20 ),
+ TQMAX( m_widget->height(), KexiScrollView_data->horizontalOuterAreaPixmapBuffer.height() + 20 ) + 20,
KexiScrollView_data->horizontalOuterAreaPixmapBuffer
);
}
@@ -378,14 +378,14 @@ KexiScrollView::drawContents( QPainter * p, int clipx, int clipy, int clipw, int
}
void
-KexiScrollView::leaveEvent( QEvent *e )
+KexiScrollView::leaveEvent( TQEvent *e )
{
- QWidget::leaveEvent(e);
+ TQWidget::leaveEvent(e);
m_widget->update(); //update form elements on too fast mouse move
}
void
-KexiScrollView::setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h )
+KexiScrollView::setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h )
{
/*todo*/
// kdDebug(44021)<<"KexiScrollView::setHBarGeometry"<<endl;
diff --git a/kexi/widget/kexiscrollview.h b/kexi/widget/kexiscrollview.h
index c313f2d7a..92615cf34 100644
--- a/kexi/widget/kexiscrollview.h
+++ b/kexi/widget/kexiscrollview.h
@@ -21,25 +21,26 @@
#ifndef KEXISCROLLVIEW_H
#define KEXISCROLLVIEW_H
-#include <qscrollview.h>
-#include <qtimer.h>
+#include <tqscrollview.h>
+#include <tqtimer.h>
-class QColor;
-class QFont;
+class TQColor;
+class TQFont;
class KexiRecordNavigator;
//! The scrollview which includes KexiDBForm
/*! It allows to resize its m_widget, following snapToGrid setting.
Its contents is resized so the widget can always be resized. */
-class KEXIEXTWIDGETS_EXPORT KexiScrollView : public QScrollView
+class KEXIEXTWIDGETS_EXPORT KexiScrollView : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiScrollView(QWidget *parent, bool preview);
+ KexiScrollView(TQWidget *tqparent, bool preview);
virtual ~KexiScrollView();
- void setWidget(QWidget *w);
+ void setWidget(TQWidget *w);
void setSnapToGrid(bool enable, int gridSize=10);
void setResizingEnabled(bool enabled) { m_enableResizing = enabled; }
@@ -64,24 +65,24 @@ class KEXIEXTWIDGETS_EXPORT KexiScrollView : public QScrollView
void resizingEnded();
protected:
- virtual void contentsMousePressEvent(QMouseEvent * ev);
- virtual void contentsMouseReleaseEvent(QMouseEvent * ev);
- virtual void contentsMouseMoveEvent(QMouseEvent * ev);
- virtual void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph );
- virtual void leaveEvent( QEvent *e );
- virtual void setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h );
- void setupPixmapBuffer(QPixmap& pixmap, const QString& text, int lines);
+ virtual void contentsMousePressEvent(TQMouseEvent * ev);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent * ev);
+ virtual void contentsMouseMoveEvent(TQMouseEvent * ev);
+ virtual void drawContents( TQPainter * p, int clipx, int clipy, int clipw, int cliph );
+ virtual void leaveEvent( TQEvent *e );
+ virtual void setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h );
+ void setupPixmapBuffer(TQPixmap& pixmap, const TQString& text, int lines);
bool m_resizing;
bool m_enableResizing;
- QWidget *m_widget;
+ TQWidget *m_widget;
int m_gridSize;
- QFont m_helpFont;
- QColor m_helpColor;
- QTimer m_delayedResize;
+ TQFont m_helpFont;
+ TQColor m_helpColor;
+ TQTimer m_delayedResize;
//! for refreshContentsSizeLater()
- QScrollView::ScrollBarMode m_vsmode, m_hsmode;
+ TQScrollView::ScrollBarMode m_vsmode, m_hsmode;
bool m_snapToGrid : 1;
bool m_preview : 1;
bool m_smodeSet : 1;
diff --git a/kexi/widget/kexisectionheader.cpp b/kexi/widget/kexisectionheader.cpp
index 42c5031e9..7bc3fe5f8 100644
--- a/kexi/widget/kexisectionheader.cpp
+++ b/kexi/widget/kexisectionheader.cpp
@@ -21,21 +21,21 @@
#include "kexiviewbase.h"
#include <kexiutils/utils.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <kpushbutton.h>
-class KexiSectionHeader::BoxLayout : public QBoxLayout
+class KexiSectionHeader::BoxLayout : public TQBoxLayout
{
public:
- BoxLayout( KexiSectionHeader* parent, Direction d, int margin = 0,
+ BoxLayout( KexiSectionHeader* tqparent, Direction d, int margin = 0,
int spacing = -1, const char * name = 0 );
- virtual void addItem( QLayoutItem * item );
- QGuardedPtr<KexiViewBase> view;
+ virtual void addItem( TQLayoutItem * item );
+ TQGuardedPtr<KexiViewBase> view;
};
//==========================
@@ -49,24 +49,24 @@ class KexiSectionHeaderPrivate
}
Qt::Orientation orientation;
- QLabel *lbl;
+ TQLabel *lbl;
KexiSectionHeader::BoxLayout *lyr;
- QHBox *lbl_b;
+ TQHBox *lbl_b;
};
//==========================
-KexiSectionHeader::KexiSectionHeader(const QString &caption, Orientation o, QWidget* parent )
- : QWidget(parent, "KexiSectionHeader")
+KexiSectionHeader::KexiSectionHeader(const TQString &caption, Qt::Orientation o, TQWidget* tqparent )
+ : TQWidget(tqparent, "KexiSectionHeader")
, d( new KexiSectionHeaderPrivate() )
{
d->orientation = o;
- d->lyr = new BoxLayout( this, d->orientation==Vertical ? QBoxLayout::TopToBottom : QBoxLayout::LeftToRight );
+ d->lyr = new BoxLayout( this, d->orientation==Qt::Vertical ? TQBoxLayout::TopToBottom : TQBoxLayout::LeftToRight );
d->lyr->setAutoAdd(true);
- d->lbl_b = new QHBox(this);
- d->lbl = new QLabel(QString(" ")+caption, d->lbl_b);
- d->lbl->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);
- d->lbl->setFocusPolicy(StrongFocus);
+ d->lbl_b = new TQHBox(this);
+ d->lbl = new TQLabel(TQString(" ")+caption, d->lbl_b);
+ d->lbl->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Preferred);
+ d->lbl->setFocusPolicy(TQ_StrongFocus);
d->lbl->installEventFilter(this);
installEventFilter(this);
setCaption(caption);
@@ -77,55 +77,55 @@ KexiSectionHeader::~KexiSectionHeader()
delete d;
}
-void KexiSectionHeader::addButton(const QString& icon, const QString& toolTip,
- const QObject * receiver, const char * member)
+void KexiSectionHeader::addButton(const TQString& icon, const TQString& toolTip,
+ const TQObject * receiver, const char * member)
{
KPushButton *btn = new KPushButton(d->lbl_b);
btn->setFlat(true);
- btn->setFocusPolicy(NoFocus);
- btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
+ btn->setFocusPolicy(TQ_NoFocus);
+ btn->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
if (receiver && member) {
- connect(btn, SIGNAL(clicked()), receiver, member);
+ connect(btn, TQT_SIGNAL(clicked()), receiver, member);
}
if (!icon.isEmpty()) {
- QIconSet iset = SmallIconSet(icon);
+ TQIconSet iset = SmallIconSet(icon);
btn->setIconSet( iset );
- QFontMetrics fm(d->lbl->font());
- btn->setMaximumHeight( QMAX(fm.height(), 16) );
+ TQFontMetrics fm(d->lbl->font());
+ btn->setMaximumHeight( TQMAX(fm.height(), 16) );
}
if (!toolTip.isEmpty()) {
- QToolTip::add(btn, toolTip);
+ TQToolTip::add(btn, toolTip);
}
}
-bool KexiSectionHeader::eventFilter( QObject *o, QEvent *e )
+bool KexiSectionHeader::eventFilter( TQObject *o, TQEvent *e )
{
- if (o == d->lbl && e->type()==QEvent::MouseButtonRelease) {//|| e->type()==QEvent::FocusOut) {// && o->inherits("QWidget")) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->lbl) && e->type()==TQEvent::MouseButtonRelease) {//|| e->type()==TQEvent::FocusOut) {// && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) {
if (d->lyr->view)
d->lyr->view->setFocus();
-// if (KexiUtils::hasParent( this, static_cast<QWidget*>(o))) {
-// d->lbl->setPaletteBackgroundColor( e->type()==QEvent::FocusIn ? red : blue);
+// if (KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) {
+// d->lbl->setPaletteBackgroundColor( e->type()==TQEvent::FocusIn ? red : blue);
// }
}
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
void KexiSectionHeader::slotFocus(bool in)
{
- in = in || focusWidget()==this;
+ in = in || tqfocusWidget()==this;
d->lbl->setPaletteBackgroundColor(
- in ? palette().active().color(QColorGroup::Highlight) : palette().active().color(QColorGroup::Background) );
+ in ? tqpalette().active().color(TQColorGroup::Highlight) : tqpalette().active().color(TQColorGroup::Background) );
d->lbl->setPaletteForegroundColor(
- in ? palette().active().color(QColorGroup::HighlightedText) : palette().active().color(QColorGroup::Foreground) );
+ in ? tqpalette().active().color(TQColorGroup::HighlightedText) : tqpalette().active().color(TQColorGroup::Foreground) );
}
-QSize KexiSectionHeader::sizeHint() const
+TQSize KexiSectionHeader::tqsizeHint() const
{
if (!d->lyr->view)
- return QWidget::sizeHint();
- QSize s = d->lyr->view->sizeHint();
- return QSize(s.width(), d->lbl->sizeHint().height() + s.height());
+ return TQWidget::tqsizeHint();
+ TQSize s = d->lyr->view->tqsizeHint();
+ return TQSize(s.width(), d->lbl->tqsizeHint().height() + s.height());
}
/*void KexiSectionHeader::setFocus()
@@ -133,25 +133,25 @@ QSize KexiSectionHeader::sizeHint() const
if (d->lyr->view)
d->lyr->view->setFocus();
else
- QWidget::setFocus();
+ TQWidget::setFocus();
}*/
//======================
-KexiSectionHeader::BoxLayout::BoxLayout( KexiSectionHeader* parent, Direction d, int margin, int spacing, const char * name )
- : QBoxLayout(parent, d, margin, spacing, name )
+KexiSectionHeader::BoxLayout::BoxLayout( KexiSectionHeader* tqparent, Direction d, int margin, int spacing, const char * name )
+ : TQBoxLayout(tqparent, d, margin, spacing, name )
{
}
-void KexiSectionHeader::BoxLayout::addItem( QLayoutItem * item )
+void KexiSectionHeader::BoxLayout::addItem( TQLayoutItem * item )
{
- QBoxLayout::addItem( item );
+ TQBoxLayout::addItem( item );
if (item->widget()) {
item->widget()->installEventFilter( mainWidget() );
if (item->widget()->inherits("KexiViewBase")) {
view = static_cast<KexiViewBase*>(item->widget());
KexiSectionHeader *sh = static_cast<KexiSectionHeader*>(mainWidget());
- connect(view,SIGNAL(focus(bool)),sh,SLOT(slotFocus(bool)));
+ connect(view,TQT_SIGNAL(focus(bool)),sh,TQT_SLOT(slotFocus(bool)));
sh->d->lbl->setBuddy(item->widget());
}
}
diff --git a/kexi/widget/kexisectionheader.h b/kexi/widget/kexisectionheader.h
index b842f6ffa..9e8d12155 100644
--- a/kexi/widget/kexisectionheader.h
+++ b/kexi/widget/kexisectionheader.h
@@ -20,27 +20,28 @@
#ifndef KEXISECTIONHEADER_H
#define KEXISECTIONHEADER_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KexiSectionHeaderPrivate;
-class KEXIEXTWIDGETS_EXPORT KexiSectionHeader : public QWidget
+class KEXIEXTWIDGETS_EXPORT KexiSectionHeader : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
class BoxLayout;
- KexiSectionHeader(const QString &caption, Orientation o,
- QWidget* parent = 0 );
+ KexiSectionHeader(const TQString &caption, Qt::Orientation o,
+ TQWidget* tqparent = 0 );
virtual ~KexiSectionHeader();
- void addButton(const QString& icon, const QString& toolTip,
- const QObject * receiver, const char * member);
+ void addButton(const TQString& icon, const TQString& toolTip,
+ const TQObject * receiver, const char * member);
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
void slotFocus(bool in);
diff --git a/kexi/widget/kexismalltoolbutton.cpp b/kexi/widget/kexismalltoolbutton.cpp
index 085d48470..94a088a05 100644
--- a/kexi/widget/kexismalltoolbutton.cpp
+++ b/kexi/widget/kexismalltoolbutton.cpp
@@ -19,38 +19,38 @@
#include "kexismalltoolbutton.h"
-#include <qtooltip.h>
-#include <qwhatsthis.h>
-#include <qstyle.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
+#include <tqstyle.h>
#include <kiconloader.h>
#include <kglobalsettings.h>
#include <core/kexi.h>
-KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, const QString& text,
- const QString& icon, const char* name)
- : QToolButton(parent, name)
+KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, const TQString& text,
+ const TQString& icon, const char* name)
+ : TQToolButton(tqparent, name)
{
init();
update(text, SmallIconSet(icon));
}
-KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, const QString& text,
- const QIconSet& iconSet, const char* name)
- : QToolButton(parent, name)
+KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, const TQString& text,
+ const TQIconSet& iconSet, const char* name)
+ : TQToolButton(tqparent, name)
{
init();
update(text, iconSet);
}
-KexiSmallToolButton::KexiSmallToolButton(QWidget* parent, KAction* action)
- : QToolButton(parent, action->name())
+KexiSmallToolButton::KexiSmallToolButton(TQWidget* tqparent, KAction* action)
+ : TQToolButton(tqparent, action->name())
, m_action(action)
{
init();
- connect(this, SIGNAL(clicked()), action, SLOT(activate()));
- connect(action, SIGNAL(enabled(bool)), this, SLOT(setEnabled(bool)));
+ connect(this, TQT_SIGNAL(clicked()), action, TQT_SLOT(activate()));
+ connect(action, TQT_SIGNAL(enabled(bool)), this, TQT_SLOT(setEnabled(bool)));
updateAction();
}
@@ -64,21 +64,21 @@ void KexiSmallToolButton::updateAction()
return;
update(m_action->text(), m_action->iconSet(KIcon::Small));
setAccel(m_action->shortcut());
- QToolTip::add(this, m_action->toolTip());
- QWhatsThis::add(this, m_action->whatsThis());
+ TQToolTip::add(this, m_action->toolTip());
+ TQWhatsThis::add(this, m_action->whatsThis());
}
void KexiSmallToolButton::init()
{
- setPaletteBackgroundColor(palette().active().background());
- setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred);
- QFont f(KGlobalSettings::toolBarFont());
+ setPaletteBackgroundColor(tqpalette().active().background());
+ tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Preferred);
+ TQFont f(KGlobalSettings::toolBarFont());
f.setPixelSize(Kexi::smallFont().pixelSize());
setFont(f);
setAutoRaise(true);
}
-void KexiSmallToolButton::update(const QString& text, const QIconSet& iconSet, bool tipToo)
+void KexiSmallToolButton::update(const TQString& text, const TQIconSet& iconSet, bool tipToo)
{
int width = 0;
if (text.isEmpty()) {
@@ -86,47 +86,47 @@ void KexiSmallToolButton::update(const QString& text, const QIconSet& iconSet, b
setUsesTextLabel(false);
}
else {
- width += QFontMetrics(font()).width(text+" ");
+ width += TQFontMetrics(font()).width(text+" ");
setUsesTextLabel(true);
- setTextPosition(QToolButton::Right);
- QToolButton::setTextLabel(text, tipToo);
+ setTextPosition(TQToolButton::Right);
+ TQToolButton::setTextLabel(text, tipToo);
}
if (!iconSet.isNull()) {
width += IconSize(KIcon::Small);
- QToolButton::setIconSet(iconSet);
+ TQToolButton::setIconSet(iconSet);
}
setFixedWidth( width );
}
-void KexiSmallToolButton::setIconSet( const QIconSet& iconSet )
+void KexiSmallToolButton::setIconSet( const TQIconSet& iconSet )
{
update(textLabel(), iconSet);
}
-void KexiSmallToolButton::setIconSet( const QString& icon )
+void KexiSmallToolButton::setIconSet( const TQString& icon )
{
setIconSet( SmallIconSet(icon) );
}
-void KexiSmallToolButton::setTextLabel( const QString & newLabel, bool tipToo )
+void KexiSmallToolButton::setTextLabel( const TQString & newLabel, bool tipToo )
{
Q_UNUSED( tipToo );
update(newLabel, iconSet());
}
-void KexiSmallToolButton::drawButton( QPainter *_painter )
+void KexiSmallToolButton::drawButton( TQPainter *_painter )
{
- QToolButton::drawButton(_painter);
- if (QToolButton::popup()) {
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ TQToolButton::drawButton(_painter);
+ if (TQToolButton::popup()) {
+ TQStyle::SFlags arrowFlags = TQStyle::Style_Default;
if (isDown())
- arrowFlags |= QStyle::Style_Down;
+ arrowFlags |= TQStyle::Style_Down;
if (isEnabled())
- arrowFlags |= QStyle::Style_Enabled;
- style().drawPrimitive(QStyle::PE_ArrowDown, _painter,
- QRect(width()-7, height()-7, 5, 5), colorGroup(),
- arrowFlags, QStyleOption() );
+ arrowFlags |= TQStyle::Style_Enabled;
+ tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, _painter,
+ TQRect(width()-7, height()-7, 5, 5), tqcolorGroup(),
+ arrowFlags, TQStyleOption() );
}
}
diff --git a/kexi/widget/kexismalltoolbutton.h b/kexi/widget/kexismalltoolbutton.h
index 59af7cfa3..90ba7e5e0 100644
--- a/kexi/widget/kexismalltoolbutton.h
+++ b/kexi/widget/kexismalltoolbutton.h
@@ -20,40 +20,41 @@
#ifndef KEXISMALLTOOLBUTTON_H
#define KEXISMALLTOOLBUTTON_H
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kaction.h>
-class QIconSet;
+class TQIconSet;
//! A small tool button with icon and optional text
-class KEXIEXTWIDGETS_EXPORT KexiSmallToolButton : public QToolButton
+class KEXIEXTWIDGETS_EXPORT KexiSmallToolButton : public TQToolButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiSmallToolButton(QWidget* parent, const QString& text,
- const QString& icon = QString::null, const char* name = 0);
+ KexiSmallToolButton(TQWidget* tqparent, const TQString& text,
+ const TQString& icon = TQString(), const char* name = 0);
- KexiSmallToolButton(QWidget* parent, const QString& text,
- const QIconSet& iconSet, const char* name = 0);
+ KexiSmallToolButton(TQWidget* tqparent, const TQString& text,
+ const TQIconSet& iconSet, const char* name = 0);
- KexiSmallToolButton(QWidget* parent, KAction *action);
+ KexiSmallToolButton(TQWidget* tqparent, KAction *action);
virtual ~KexiSmallToolButton();
void updateAction();
- virtual void setIconSet( const QIconSet& iconSet );
- virtual void setIconSet( const QString& icon );
- virtual void setTextLabel( const QString & newLabel, bool tipToo );
- virtual void setTextLabel( const QString & newLabel ) { setTextLabel(newLabel, false); }
+ virtual void setIconSet( const TQIconSet& iconSet );
+ virtual void setIconSet( const TQString& icon );
+ virtual void setTextLabel( const TQString & newLabel, bool tipToo );
+ virtual void setTextLabel( const TQString & newLabel ) { setTextLabel(newLabel, false); }
protected:
- void update(const QString& text, const QIconSet& iconSet, bool tipToo = false);
+ void update(const TQString& text, const TQIconSet& iconSet, bool tipToo = false);
void init();
- virtual void drawButton( QPainter *_painter );
+ virtual void drawButton( TQPainter *_painter );
- QGuardedPtr<KAction> m_action;
+ TQGuardedPtr<KAction> m_action;
};
#endif
diff --git a/kexi/widget/pixmapcollection.cpp b/kexi/widget/pixmapcollection.cpp
index 7f9718d6b..fbcf91de9 100644
--- a/kexi/widget/pixmapcollection.cpp
+++ b/kexi/widget/pixmapcollection.cpp
@@ -17,12 +17,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpixmap.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qtoolbutton.h>
-#include <qdom.h>
+#include <tqpixmap.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqtoolbutton.h>
+#include <tqdom.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -40,61 +40,61 @@
#include "pixmapcollection.h"
/// Pixmap Collection
-PixmapCollection::PixmapCollection(const QString &collectionName, QObject *parent, const char *name)
- : QObject(parent, name)
+PixmapCollection::PixmapCollection(const TQString &collectionName, TQObject *tqparent, const char *name)
+ : TQObject(tqparent, name)
{
m_name = collectionName;
}
-QString
+TQString
PixmapCollection::addPixmapPath(const KURL &url)
{
- QString name = url.filename();
- while(m_pixmaps.contains(name))
+ TQString name = url.filename();
+ while(m_pixmaps.tqcontains(name))
{
bool ok;
int num = name.right(1).toInt(&ok, 10);
if(ok)
- name = name.left(name.length()-1) + QString::number(num+1);
+ name = name.left(name.length()-1) + TQString::number(num+1);
else
name += "2";
}
- m_pixmaps.insert(name, qMakePair(url.path(), 0));
+ m_pixmaps.insert(name, tqMakePair(url.path(), 0));
return name;
}
-QString
-PixmapCollection::addPixmapName(const QString &icon, int size)
+TQString
+PixmapCollection::addPixmapName(const TQString &icon, int size)
{
- QString name = icon;
- while(m_pixmaps.contains(name))
+ TQString name = icon;
+ while(m_pixmaps.tqcontains(name))
{
bool ok;
int num = name.right(1).toInt(&ok, 10);
if(ok)
- name = name.left(name.length()-1) + QString::number(num+1);
+ name = name.left(name.length()-1) + TQString::number(num+1);
else
name += "2";
}
- m_pixmaps.insert(name, qMakePair(icon, size));
+ m_pixmaps.insert(name, tqMakePair(icon, size));
return name;
}
void
-PixmapCollection::removePixmap(const QString &name)
+PixmapCollection::removePixmap(const TQString &name)
{
m_pixmaps.remove(name);
}
-QPixmap
-PixmapCollection::getPixmap(const QString &name)
+TQPixmap
+PixmapCollection::getPixmap(const TQString &name)
{
- if(!m_pixmaps.contains(name))
+ if(!m_pixmaps.tqcontains(name))
{
kdDebug() << " The icon " << name << " you requested is not in the collection" << endl;
- return QPixmap();
+ return TQPixmap();
}
if(m_pixmaps[name].second != 0)
@@ -102,81 +102,81 @@ PixmapCollection::getPixmap(const QString &name)
return kapp->iconLoader()->loadIcon(m_pixmaps[name].first, KIcon::NoGroup, m_pixmaps[name].second);
}
else
- return QPixmap(m_pixmaps[name].first);
+ return TQPixmap(m_pixmaps[name].first);
}
bool
-PixmapCollection::contains(const QString &name)
+PixmapCollection::tqcontains(const TQString &name)
{
- return m_pixmaps.contains(name);
+ return m_pixmaps.tqcontains(name);
}
void
-PixmapCollection::save(QDomNode parentNode)
+PixmapCollection::save(TQDomNode tqparentNode)
{
if(m_pixmaps.isEmpty())
return;
- QDomDocument domDoc = parentNode.ownerDocument();
- QDomElement collection = domDoc.createElement("collection");
- parentNode.appendChild(collection);
+ TQDomDocument domDoc = tqparentNode.ownerDocument();
+ TQDomElement collection = domDoc.createElement("collection");
+ tqparentNode.appendChild(collection);
PixmapMap::ConstIterator it;
PixmapMap::ConstIterator endIt = m_pixmaps.constEnd();
for(it = m_pixmaps.constBegin(); it != endIt; ++it)
{
- QDomElement item = domDoc.createElement("pixmap");
+ TQDomElement item = domDoc.createElement("pixmap");
collection.appendChild(item);
item.setAttribute("name", it.key());
if(it.data().second != 0)
- item.setAttribute("size", QString::number(it.data().second));
+ item.setAttribute("size", TQString::number(it.data().second));
- QString text = it.data().first;
- QDomText textNode = domDoc.createTextNode(text);
+ TQString text = it.data().first;
+ TQDomText textNode = domDoc.createTextNode(text);
item.appendChild(textNode);
}
}
void
-PixmapCollection::load(QDomNode node)
+PixmapCollection::load(TQDomNode node)
{
- QDomDocument domDoc = node.ownerDocument();
- for(QDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
+ TQDomDocument domDoc = node.ownerDocument();
+ for(TQDomNode n = node.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement el = n.toElement();
- QPair<QString, int> pair = qMakePair(el.text(), el.attribute("size").toInt());
+ TQDomElement el = n.toElement();
+ TQPair<TQString, int> pair = tqMakePair(el.text(), el.attribute("size").toInt());
m_pixmaps[el.attribute("name")] = pair;
}
}
//// A dialog to load a KDE icon by its name
-LoadIconDialog::LoadIconDialog(QWidget *parent)
-: KDialogBase(parent, "loadicon_dialog", true, i18n("Load KDE Icon by Name"), Ok|Cancel, Ok, false)
+LoadIconDialog::LoadIconDialog(TQWidget *tqparent)
+: KDialogBase(tqparent, "loadicon_dialog", true, i18n("Load KDE Icon by Name"), Ok|Cancel, Ok, false)
{
- QFrame *frame = makeMainWidget();
- QGridLayout *l = new QGridLayout(frame, 2, 3, 0, 6);
+ TQFrame *frame = makeMainWidget();
+ TQGridLayout *l = new TQGridLayout(frame, 2, 3, 0, 6);
// Name input
- QLabel *name = new QLabel(i18n("&Name:"), frame);
+ TQLabel *name = new TQLabel(i18n("&Name:"), frame);
l->addWidget(name, 0, 0);
- name->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+ name->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter);
m_nameInput = new KLineEdit("kexi", frame);
l->addWidget(m_nameInput, 0, 1);
name->setBuddy(m_nameInput);
// Choose size
- QLabel *size = new QLabel(i18n("&Size:"), frame);
+ TQLabel *size = new TQLabel(i18n("&Size:"), frame);
l->addWidget(size, 1, 0);
- size->setAlignment(Qt::AlignRight|Qt::AlignVCenter);
+ size->tqsetAlignment(TQt::AlignRight|TQt::AlignVCenter);
KComboBox *combo = new KComboBox(frame);
l->addWidget(combo, 1, 1);
size->setBuddy(combo);
- QStringList list;
+ TQStringList list;
list << i18n("Small") << i18n("Medium") << i18n("Large") << i18n("Huge");
combo->insertStringList(list);
combo->setCurrentItem(2);
- connect(combo, SIGNAL(activated(int)), this, SLOT(changeIconSize(int)));
+ connect(combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changeIconSize(int)));
// Icon chooser button
@@ -184,18 +184,18 @@ LoadIconDialog::LoadIconDialog(QWidget *parent)
m_button->setIcon("kexi");
m_button->setIconSize(KIcon::SizeMedium);
l->addMultiCellWidget(m_button, 0, 1, 2, 2);
- connect(m_button, SIGNAL(iconChanged(QString)), this, SLOT(updateIconName(QString)));
- connect(m_nameInput, SIGNAL(textChanged(const QString &)), this, SLOT(setIcon(const QString &)));
+ connect(m_button, TQT_SIGNAL(iconChanged(TQString)), this, TQT_SLOT(updateIconName(TQString)));
+ connect(m_nameInput, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(setIcon(const TQString &)));
}
void
-LoadIconDialog::updateIconName(QString icon)
+LoadIconDialog::updateIconName(TQString icon)
{
m_nameInput->setText(icon);
}
void
-LoadIconDialog::setIcon(const QString &icon)
+LoadIconDialog::setIcon(const TQString &icon)
{
m_button->setIcon(icon);
}
@@ -210,7 +210,7 @@ LoadIconDialog::changeIconSize(int index)
//case 1: size = KIcon::SizeSmallMedium; break;
case 1: size = KIcon::SizeMedium; break;
case 2: size = KIcon::SizeLarge; break;
-#if !defined(Q_WS_WIN) && KDE_IS_VERSION(3,1,9)
+#if !defined(TQ_WS_WIN) && KDE_IS_VERSION(3,1,9)
case 3: size = KIcon::SizeHuge; break;
#endif
default:;
@@ -224,54 +224,54 @@ int LoadIconDialog::iconSize()
return m_button->iconSize();
}
-QString LoadIconDialog::iconName()
+TQString LoadIconDialog::iconName()
{
return m_button->icon();
}
/// Pixmap Collection Editor Dialog
-PixmapCollectionEditor::PixmapCollectionEditor(PixmapCollection *collection, QWidget *parent)
-: KDialogBase(parent, "pixcollection_dialog", true,
- i18n("Edit Pixmap Collection: %1").arg(collection->collectionName()), Close, Close, false)
+PixmapCollectionEditor::PixmapCollectionEditor(PixmapCollection *collection, TQWidget *tqparent)
+: KDialogBase(tqparent, "pixcollection_dialog", true,
+ i18n("Edit Pixmap Collection: %1").tqarg(collection->collectionName()), Close, Close, false)
{
m_collection = collection;
- QFrame *frame = makeMainWidget();
- QHBoxLayout *l = new QHBoxLayout(frame, 0, 6);
- setInitialSize(QSize(400, 200), true);
+ TQFrame *frame = makeMainWidget();
+ TQHBoxLayout *l = new TQHBoxLayout(frame, 0, 6);
+ setInitialSize(TQSize(400, 200), true);
//// Setup the icon toolbar /////////////////
- QVBoxLayout *vlayout = new QVBoxLayout(l, 3);
- QToolButton *newItemPath = new QToolButton(frame);
+ TQVBoxLayout *vtqlayout = new TQVBoxLayout(l, 3);
+ TQToolButton *newItemPath = new TQToolButton(frame);
newItemPath->setIconSet(BarIconSet("fileopen"));
newItemPath->setTextLabel(i18n("&Add File"), true);
- vlayout->addWidget(newItemPath);
+ vtqlayout->addWidget(newItemPath);
m_buttons.insert(BNewItemPath, newItemPath);
- connect(newItemPath, SIGNAL(clicked()), this, SLOT(newItemByPath()));
+ connect(newItemPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(newItemByPath()));
- QToolButton *newItemName = new QToolButton(frame);
+ TQToolButton *newItemName = new TQToolButton(frame);
newItemName->setIconSet(BarIconSet("icons"));
newItemName->setTextLabel(i18n("&Add an Icon"), true);
- vlayout->addWidget(newItemName);
+ vtqlayout->addWidget(newItemName);
m_buttons.insert(BNewItemName, newItemName);
- connect(newItemName, SIGNAL(clicked()), this, SLOT(newItemByName()));
+ connect(newItemName, TQT_SIGNAL(clicked()), this, TQT_SLOT(newItemByName()));
- QToolButton *delItem = new QToolButton(frame);
+ TQToolButton *delItem = new TQToolButton(frame);
delItem->setIconSet(BarIconSet("edit_remove"));
delItem->setTextLabel(i18n("&Remove Selected Item"), true);
- vlayout->addWidget(delItem);
+ vtqlayout->addWidget(delItem);
m_buttons.insert(BDelItem, delItem);
- connect(delItem, SIGNAL(clicked()), this, SLOT(removeItem()));
- vlayout->addStretch();
+ connect(delItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeItem()));
+ vtqlayout->addStretch();
// Setup the iconView
m_iconView = new KIconView(frame, "pixcollection_iconView");
m_iconView->resize(100,100);
- m_iconView->setArrangement(QIconView::LeftToRight);
+ m_iconView->setArrangement(TQIconView::LeftToRight);
m_iconView->setAutoArrange(true);
m_iconView->setMode(KIconView::Select);
l->addWidget(m_iconView);
- connect(m_iconView, SIGNAL(contextMenuRequested(QIconViewItem*, const QPoint&)), this, SLOT(displayMenu(QIconViewItem*, const QPoint&)));
- connect(m_iconView, SIGNAL(itemRenamed(QIconViewItem*, const QString &)), this, SLOT(renameCollectionItem(QIconViewItem*, const QString&)));
+ connect(m_iconView, TQT_SIGNAL(contextMenuRequested(TQIconViewItem*, const TQPoint&)), this, TQT_SLOT(displayMenu(TQIconViewItem*, const TQPoint&)));
+ connect(m_iconView, TQT_SIGNAL(itemRenamed(TQIconViewItem*, const TQString &)), this, TQT_SLOT(renameCollectionItem(TQIconViewItem*, const TQString&)));
PixmapMap::ConstIterator it;
PixmapMap::ConstIterator endIt = collection->m_pixmaps.end();
@@ -282,13 +282,13 @@ PixmapCollectionEditor::PixmapCollectionEditor(PixmapCollection *collection, QWi
void
PixmapCollectionEditor::newItemByName()
{
- LoadIconDialog d(parentWidget());
- if(d.exec()== QDialog::Accepted)
+ LoadIconDialog d(tqparentWidget());
+ if(d.exec()== TQDialog::Accepted)
{
if(d.iconName().isEmpty())
return;
- QString name = m_collection->addPixmapName(d.iconName(), d.iconSize());
+ TQString name = m_collection->addPixmapName(d.iconName(), d.iconSize());
createIconViewItem(name);
}
}
@@ -296,23 +296,23 @@ PixmapCollectionEditor::newItemByName()
void
PixmapCollectionEditor::newItemByPath()
{
- KURL url = KFileDialog::getImageOpenURL("::kexi", parentWidget());
+ KURL url = KFileDialog::getImageOpenURL("::kexi", tqparentWidget());
if(url.isEmpty())
return;
- QString name = m_collection->addPixmapPath(url);
+ TQString name = m_collection->addPixmapPath(url);
createIconViewItem(name);
}
void
PixmapCollectionEditor::removeItem()
{
- QIconViewItem *item = m_iconView->currentItem();
+ TQIconViewItem *item = m_iconView->currentItem();
if( !item )
return;
- int confirm = KMessageBox::questionYesNo(parentWidget(), QString("<qt>")+
+ int confirm = KMessageBox::questionYesNo(tqparentWidget(), TQString("<qt>")+
i18n("Do you want to remove item \"%1\" from collection \"%2\"?")
- .arg(item->text()).arg(m_collection->collectionName()) + "</qt>");
+ .tqarg(item->text()).tqarg(m_collection->collectionName()) + "</qt>");
if(confirm == KMessageBox::No)
return;
@@ -328,60 +328,60 @@ PixmapCollectionEditor::renameItem()
}
void
-PixmapCollectionEditor::createIconViewItem(const QString &name)
+PixmapCollectionEditor::createIconViewItem(const TQString &name)
{
PixmapIconViewItem *item = new PixmapIconViewItem(m_iconView, name, getPixmap(name));
item->setRenameEnabled(true);
}
-QPixmap
-PixmapCollectionEditor::getPixmap(const QString &name)
+TQPixmap
+PixmapCollectionEditor::getPixmap(const TQString &name)
{
- QPixmap pixmap = m_collection->getPixmap(name);
+ TQPixmap pixmap = m_collection->getPixmap(name);
if((pixmap.width() <= 48) && (pixmap.height() <= 48))
return pixmap;
KPixmapIO io;
- QImage image = io.convertToImage(pixmap);
- pixmap = io.convertToPixmap(image.scale(48, 48, QImage::ScaleMin));
+ TQImage image = io.convertToImage(pixmap);
+ pixmap = io.convertToPixmap(image.scale(48, 48, TQ_ScaleMin));
return pixmap;
}
void
-PixmapCollectionEditor::renameCollectionItem(QIconViewItem *it, const QString &name)
+PixmapCollectionEditor::renameCollectionItem(TQIconViewItem *it, const TQString &name)
{
PixmapIconViewItem *item = static_cast<PixmapIconViewItem*>(it);
- if(!m_collection->m_pixmaps.contains(item->name()))
+ if(!m_collection->m_pixmaps.tqcontains(item->name()))
return;
// We just rename the collection item
- QPair<QString, int> pair = m_collection->m_pixmaps[item->name()];
+ TQPair<TQString, int> pair = m_collection->m_pixmaps[item->name()];
m_collection->m_pixmaps.remove(item->name());
m_collection->m_pixmaps[name] = pair;
item->setName(name);
}
void
-PixmapCollectionEditor::displayMenu(QIconViewItem *it, const QPoint &p)
+PixmapCollectionEditor::displayMenu(TQIconViewItem *it, const TQPoint &p)
{
if(!it) return;
KPopupMenu *menu = new KPopupMenu();
- menu->insertItem(SmallIconSet("edit"), i18n("Rename Item"), this, SLOT(renameItem()));
- menu->insertItem(SmallIconSet("remove"), i18n("Remove Item"), this, SLOT(removeItem()));
+ menu->insertItem(SmallIconSet("edit"), i18n("Rename Item"), this, TQT_SLOT(renameItem()));
+ menu->insertItem(SmallIconSet("remove"), i18n("Remove Item"), this, TQT_SLOT(removeItem()));
menu->exec(p);
}
//// A Dialog to choose a pixmap from the PixmapCollection
-PixmapCollectionChooser::PixmapCollectionChooser(PixmapCollection *collection, const QString &selectedItem, QWidget *parent)
-: KDialogBase(parent, "pixchoose_dialog", true, i18n("Select Pixmap From %1").arg(collection->collectionName()),
+PixmapCollectionChooser::PixmapCollectionChooser(PixmapCollection *collection, const TQString &selectedItem, TQWidget *tqparent)
+: KDialogBase(tqparent, "pixchoose_dialog", true, i18n("Select Pixmap From %1").tqarg(collection->collectionName()),
User1|Ok|Cancel, Ok, false, KGuiItem(i18n("Edit Collection...")))
{
m_collection = collection;
- setInitialSize(QSize(400, 200), true);
+ setInitialSize(TQSize(400, 200), true);
m_iconView = new KIconView(this, "pixchooser_iconView");
setMainWidget(m_iconView);
- m_iconView->setArrangement(QIconView::LeftToRight);
+ m_iconView->setArrangement(TQIconView::LeftToRight);
m_iconView->setAutoArrange(true);
m_iconView->setMode(KIconView::Select);
@@ -390,44 +390,44 @@ PixmapCollectionChooser::PixmapCollectionChooser(PixmapCollection *collection, c
for(it = collection->m_pixmaps.constBegin(); it != endIt; ++it)
new PixmapIconViewItem(m_iconView, it.key(), getPixmap(it.key()));
- QIconViewItem *item = m_iconView->findItem(selectedItem, Qt::ExactMatch);
+ TQIconViewItem *item = m_iconView->tqfindItem(selectedItem, TQt::ExactMatch);
if(item && !selectedItem.isEmpty())
m_iconView->setCurrentItem(item);
}
-QPixmap
+TQPixmap
PixmapCollectionChooser::pixmap()
{
if(! m_iconView->currentItem())
- return QPixmap();
- QString name = m_iconView->currentItem()->text();
+ return TQPixmap();
+ TQString name = m_iconView->currentItem()->text();
return m_collection->getPixmap(name);
}
-QString
+TQString
PixmapCollectionChooser::pixmapName()
{
- return m_iconView->currentItem() ? m_iconView->currentItem()->text() : QString("");
+ return m_iconView->currentItem() ? m_iconView->currentItem()->text() : TQString("");
}
-QPixmap
-PixmapCollectionChooser::getPixmap(const QString &name)
+TQPixmap
+PixmapCollectionChooser::getPixmap(const TQString &name)
{
- QPixmap pixmap = m_collection->getPixmap(name);
+ TQPixmap pixmap = m_collection->getPixmap(name);
if((pixmap.width() <= 48) && (pixmap.height() <= 48))
return pixmap;
// We scale the pixmap down to 48x48 to fit in the iconView
KPixmapIO io;
- QImage image = io.convertToImage(pixmap);
- pixmap = io.convertToPixmap(image.scale(48, 48, QImage::ScaleMin));
+ TQImage image = io.convertToImage(pixmap);
+ pixmap = io.convertToPixmap(image.scale(48, 48, TQ_ScaleMin));
return pixmap;
}
void
PixmapCollectionChooser::slotUser1()
{
- PixmapCollectionEditor dialog(m_collection, parentWidget());
+ PixmapCollectionEditor dialog(m_collection, tqparentWidget());
dialog.exec();
m_iconView->clear();
diff --git a/kexi/widget/pixmapcollection.h b/kexi/widget/pixmapcollection.h
index a46a20438..53637e285 100644
--- a/kexi/widget/pixmapcollection.h
+++ b/kexi/widget/pixmapcollection.h
@@ -20,52 +20,53 @@
#ifndef KFORMDESIGNERPIXMAPCOLLECTION_H
#define KFORMDESIGNERPIXMAPCOLLECTION_H
-#include <qobject.h>
-#include <qmap.h>
-#include <qpair.h>
-#include <qintdict.h>
-#include <qtoolbutton.h>
+#include <tqobject.h>
+#include <tqmap.h>
+#include <tqpair.h>
+#include <tqintdict.h>
+#include <tqtoolbutton.h>
#include <kicontheme.h>
#include <kdialogbase.h>
#include <kiconview.h>
#include <kurl.h>
-class QPixmap;
+class TQPixmap;
class KIconView;
class KIconButton;
class KLineEdit;
-class QDomNode;
+class TQDomNode;
-typedef QMap<QString, QPair<QString, int> > PixmapMap;
+typedef TQMap<TQString, TQPair<TQString, int> > PixmapMap;
//! A class that store pixmaps (by path or by name for KDE icons)
-class KEXIEXTWIDGETS_EXPORT PixmapCollection : public QObject
+class KEXIEXTWIDGETS_EXPORT PixmapCollection : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapCollection(const QString &collectionName, QObject *parent = 0, const char *name = 0);
+ PixmapCollection(const TQString &collectionName, TQObject *tqparent = 0, const char *name = 0);
~PixmapCollection() {;}
- QString addPixmapPath(const KURL &url);
- QString addPixmapName(const QString &name, int size = KIcon::SizeMedium);
- void removePixmap(const QString &name);
+ TQString addPixmapPath(const KURL &url);
+ TQString addPixmapName(const TQString &name, int size = KIcon::SizeMedium);
+ void removePixmap(const TQString &name);
- bool contains(const QString &name);
- QPixmap getPixmap(const QString &name);
+ bool tqcontains(const TQString &name);
+ TQPixmap getPixmap(const TQString &name);
- void save(QDomNode parentNode);
- void load(QDomNode node);
+ void save(TQDomNode tqparentNode);
+ void load(TQDomNode node);
- QString collectionName() {return m_name; }
+ TQString collectionName() {return m_name; }
signals:
- void itemRenamed(const QString &oldName, const QString &newName);
- void itemRemoved(const QString &name);
+ void itemRenamed(const TQString &oldName, const TQString &newName);
+ void itemRemoved(const TQString &name);
protected:
- QString m_name;
+ TQString m_name;
PixmapMap m_pixmaps;
friend class PixmapCollectionEditor;
@@ -76,27 +77,28 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollection : public QObject
class KEXIEXTWIDGETS_EXPORT PixmapCollectionEditor : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapCollectionEditor(PixmapCollection *collection, QWidget *parent = 0);
+ PixmapCollectionEditor(PixmapCollection *collection, TQWidget *tqparent = 0);
~PixmapCollectionEditor() {;}
protected:
- QPixmap getPixmap(const QString &name);
- void createIconViewItem(const QString &name);
+ TQPixmap getPixmap(const TQString &name);
+ void createIconViewItem(const TQString &name);
protected slots:
void newItemByPath();
void newItemByName();
void removeItem();
void renameItem();
- void renameCollectionItem(QIconViewItem *item, const QString &name);
- void displayMenu(QIconViewItem *item, const QPoint &p);
+ void renameCollectionItem(TQIconViewItem *item, const TQString &name);
+ void displayMenu(TQIconViewItem *item, const TQPoint &p);
private:
enum { BNewItemPath = 101, BNewItemName, BDelItem};
KIconView *m_iconView;
- QIntDict<QToolButton> m_buttons;
+ TQIntDict<TQToolButton> m_buttons;
PixmapCollection *m_collection;
};
@@ -104,16 +106,17 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollectionEditor : public KDialogBase
class KEXIEXTWIDGETS_EXPORT PixmapCollectionChooser : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapCollectionChooser(PixmapCollection *collection, const QString &selectedItem, QWidget *parent = 0);
+ PixmapCollectionChooser(PixmapCollection *collection, const TQString &selectedItem, TQWidget *tqparent = 0);
~PixmapCollectionChooser() {;}
- QPixmap pixmap();
- QString pixmapName();
+ TQPixmap pixmap();
+ TQString pixmapName();
protected:
- QPixmap getPixmap(const QString &name);
+ TQPixmap getPixmap(const TQString &name);
protected slots:
virtual void slotUser1();
@@ -126,18 +129,19 @@ class KEXIEXTWIDGETS_EXPORT PixmapCollectionChooser : public KDialogBase
class KEXIEXTWIDGETS_EXPORT LoadIconDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- LoadIconDialog(QWidget *parent = 0);
+ LoadIconDialog(TQWidget *tqparent = 0);
~LoadIconDialog() {;}
int iconSize();
- QString iconName();
+ TQString iconName();
protected slots:
void changeIconSize(int);
- void updateIconName(QString);
- void setIcon(const QString &);
+ void updateIconName(TQString);
+ void setIcon(const TQString &);
private:
KLineEdit *m_nameInput;
@@ -148,15 +152,15 @@ class KEXIEXTWIDGETS_EXPORT LoadIconDialog : public KDialogBase
class KEXIEXTWIDGETS_EXPORT PixmapIconViewItem : public KIconViewItem
{
public:
- PixmapIconViewItem(KIconView *parent, const QString &text, const QPixmap &icon)
- : KIconViewItem(parent, text, icon) { m_name = text; }
+ PixmapIconViewItem(KIconView *tqparent, const TQString &text, const TQPixmap &icon)
+ : KIconViewItem(tqparent, text, icon) { m_name = text; }
~PixmapIconViewItem() {;}
- void setName(const QString &name) { m_name = name; }
- QString name() { return m_name;}
+ void setName(const TQString &name) { m_name = name; }
+ TQString name() { return m_name;}
private:
- QString m_name;
+ TQString m_name;
};
#endif
diff --git a/kexi/widget/relations/kexirelationview.cpp b/kexi/widget/relations/kexirelationview.cpp
index 9d68a7558..ae35334bf 100644
--- a/kexi/widget/relations/kexirelationview.cpp
+++ b/kexi/widget/relations/kexirelationview.cpp
@@ -20,15 +20,15 @@
#include <kdebug.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qheader.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqheader.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kaction.h>
@@ -45,20 +45,20 @@
#include "kexirelationviewconnection.h"
#include <kexi.h>
-KexiRelationView::KexiRelationView(QWidget *parent, const char *name)
- : QScrollView(parent, name, WStaticContents)
+KexiRelationView::KexiRelationView(TQWidget *tqparent, const char *name)
+ : TQScrollView(tqparent, name, WStaticContents)
{
// m_relation=relation;
// m_relation->incUsageCount();
m_selectedConnection = 0;
m_readOnly=false;
m_focusedTableView = 0;
- setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
-// connect(relation, SIGNAL(relationListUpdated(QObject *)), this, SLOT(slotListUpdate(QObject *)));
+// connect(relation, TQT_SIGNAL(relationListUpdated(TQObject *)), this, TQT_SLOT(slotListUpdate(TQObject *)));
- viewport()->setPaletteBackgroundColor(colorGroup().mid());
- setFocusPolicy(WheelFocus);
+ viewport()->setPaletteBackgroundColor(tqcolorGroup().mid());
+ setFocusPolicy(TQ_WheelFocus);
setResizePolicy(Manual);
/*MOVED TO KexiRelationDialog
//actions
@@ -70,18 +70,18 @@ KexiRelationView::KexiRelationView(QWidget *parent, const char *name)
plugSharedAction("edit_delete", i18n("Hide Table"), m_tableQueryPopup);
plugSharedAction("edit_delete",m_connectionPopup);
- plugSharedAction("edit_delete",this, SLOT(removeSelectedObject()));
+ plugSharedAction("edit_delete",this, TQT_SLOT(removeSelectedObject()));
*/
#if 0
m_removeSelectedTableQueryAction = new KAction(i18n("&Hide Selected Table/Query"), "editdelete", "",
- this, SLOT(removeSelectedTableQuery()), parent->actionCollection(), "relationsview_removeSelectedTableQuery");
+ this, TQT_SLOT(removeSelectedTableQuery()), tqparent->actionCollection(), "relationsview_removeSelectedTableQuery");
m_removeSelectedConnectionAction = new KAction(i18n("&Remove Selected Relationship"), "button_cancel", "",
- this, SLOT(removeSelectedConnection()), parent->actionCollection(), "relationsview_removeSelectedConnection");
+ this, TQT_SLOT(removeSelectedConnection()), tqparent->actionCollection(), "relationsview_removeSelectedConnection");
m_openSelectedTableQueryAction = new KAction(i18n("&Open Selected Table/Query"), "", "",
- this, SLOT(openSelectedTableQuery()), 0/*parent->actionCollection()*/, "relationsview_openSelectedTableQuery");
+ this, TQT_SLOT(openSelectedTableQuery()), 0/*tqparent->actionCollection()*/, "relationsview_openSelectedTableQuery");
#endif
-// invalidateActions();
+// tqinvalidateActions();
#if 0
@@ -91,10 +91,10 @@ KexiRelationView::KexiRelationView(QWidget *parent, const char *name)
m_removeSelectedTableQueryAction->plug( m_popup );
m_removeSelectedConnectionAction->plug( m_popup );
- invalidateActions();
+ tqinvalidateActions();
#endif
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding, true);
+ tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding, true);
}
KexiRelationView::~KexiRelationView()
@@ -116,11 +116,11 @@ KexiRelationView::containerForTable(KexiDB::TableSchema* tableSchema)
KexiRelationViewTableContainer *
KexiRelationView::tableContainer(KexiDB::TableSchema *t) const
{
- return t ? m_tables.find(t->name()) : 0;
+ return t ? m_tables.tqfind(t->name()) : 0;
}
KexiRelationViewTableContainer*
-KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const QRect &rect)
+KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const TQRect &rect)
{
if(!t)
return 0;
@@ -137,22 +137,22 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const QRect &rect)
/*! @todo what about query? */
new KexiDB::TableOrQuerySchema(t)
);
- connect(c, SIGNAL(endDrag()), this, SLOT(slotTableViewEndDrag()));
- connect(c, SIGNAL(gotFocus()), this, SLOT(slotTableViewGotFocus()));
-// connect(c, SIGNAL(headerContextMenuRequest(const QPoint&)),
-// this, SLOT(tableHeaderContextMenuRequest(const QPoint&)));
- connect(c, SIGNAL(contextMenuRequest(const QPoint&)),
- this, SIGNAL(tableContextMenuRequest(const QPoint&)));
+ connect(c, TQT_SIGNAL(endDrag()), this, TQT_SLOT(slotTableViewEndDrag()));
+ connect(c, TQT_SIGNAL(gotFocus()), this, TQT_SLOT(slotTableViewGotFocus()));
+// connect(c, TQT_SIGNAL(headerContextMenuRequest(const TQPoint&)),
+// this, TQT_SLOT(tableHeaderContextMenuRequest(const TQPoint&)));
+ connect(c, TQT_SIGNAL(contextMenuRequest(const TQPoint&)),
+ this, TQT_SIGNAL(tableContextMenuRequest(const TQPoint&)));
addChild(c, 100,100);
if (rect.isValid()) {//predefined size
- QSize finalSize = c->size().expandedTo( c->sizeHint() );
- QRect r = rect;
- r.setSize( finalSize + QSize(0,10) );
+ TQSize finalSize = c->size().expandedTo( c->tqsizeHint() );
+ TQRect r = rect;
+ r.setSize( finalSize + TQSize(0,10) );
moveChild( c, rect.left(), rect.top() );
//we're doing this instead of setGeometry(rect)
//because the geomenty might be saved on other system with bigger fonts :)
- c->resize(c->sizeHint());
+ c->resize(c->tqsizeHint());
// c->setGeometry(r);
//TODO
@@ -164,14 +164,14 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const QRect &rect)
updateGeometry();
if (!rect.isValid()) {
c->updateGeometry();
- c->resize(c->sizeHint());
+ c->resize(c->tqsizeHint());
}
int x, y;
if(m_tables.count() > 0)
{
int place = -10;
- QDictIterator<KexiRelationViewTableContainer> it(m_tables);
+ TQDictIterator<KexiRelationViewTableContainer> it(m_tables);
for(; it.current(); ++it)
{
int right = (*it)->x() + (*it)->width();
@@ -187,7 +187,7 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const QRect &rect)
}
y = 5;
- QPoint p = viewportToContents(QPoint(x, y));
+ TQPoint p = viewportToContents(TQPoint(x, y));
recalculateSize(p.x() + c->width(), p.y() + c->height());
if (!rect.isValid()) {
moveChild(c, x, y);
@@ -195,8 +195,8 @@ KexiRelationView::addTableContainer(KexiDB::TableSchema *t, const QRect &rect)
m_tables.insert(t->name(), c);
- connect(c, SIGNAL(moved(KexiRelationViewTableContainer *)), this,
- SLOT(containerMoved(KexiRelationViewTableContainer *)));
+ connect(c, TQT_SIGNAL(moved(KexiRelationViewTableContainer *)), this,
+ TQT_SLOT(containerMoved(KexiRelationViewTableContainer *)));
if (hasFocus()) //ok?
c->setFocus();
@@ -240,10 +240,10 @@ KexiRelationView::addConnection(const SourceConnection& _conn)
KexiRelationViewTableContainer *tmp = master;
master = details;
details = tmp;
- QString tmp_masterTable = conn.masterTable;
+ TQString tmp_masterTable = conn.masterTable;
conn.masterTable = conn.detailsTable;
conn.detailsTable = tmp_masterTable;
- QString tmp_masterField = conn.masterField;
+ TQString tmp_masterField = conn.masterField;
conn.masterField = conn.detailsField;
conn.detailsField = tmp_masterField;
}
@@ -275,12 +275,12 @@ KexiRelationView::addConnection(const SourceConnection& _conn)
}
void
-KexiRelationView::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
+KexiRelationView::drawContents(TQPainter *p, int cx, int cy, int cw, int ch)
{
KexiRelationViewConnection *cview;
// p->translate(0, (double)contentsY());
- QRect clipping(cx, cy, cw, ch);
+ TQRect clipping(cx, cy, cw, ch);
for(cview = m_connectionViews.first(); cview; cview = m_connectionViews.next())
{
if(clipping.intersects(cview->oldRect() | cview->connectionRect()))
@@ -289,7 +289,7 @@ KexiRelationView::drawContents(QPainter *p, int cx, int cy, int cw, int ch)
}
void
-KexiRelationView::slotTableScrolling(const QString& table)
+KexiRelationView::slotTableScrolling(const TQString& table)
{
KexiRelationViewTableContainer *c = m_tables[table];
@@ -301,7 +301,7 @@ void
KexiRelationView::containerMoved(KexiRelationViewTableContainer *c)
{
KexiRelationViewConnection *cview;
- QRect r;
+ TQRect r;
for (ConnectionListIterator it(m_connectionViews); ((cview=it.current())); ++it) {
//! @todo optimize
if(cview->masterTable() == c || cview->detailsTable() == c
@@ -320,10 +320,10 @@ KexiRelationView::containerMoved(KexiRelationViewTableContainer *c)
//didn't work well: updateContents(r);
updateContents();
-// QRect w(c->x() - 5, c->y() - 5, c->width() + 5, c->height() + 5);
+// TQRect w(c->x() - 5, c->y() - 5, c->width() + 5, c->height() + 5);
// updateContents(w);
- QPoint p = viewportToContents(QPoint(c->x(), c->y()));
+ TQPoint p = viewportToContents(TQPoint(c->x(), c->y()));
recalculateSize(p.x() + c->width(), p.y() + c->height());
emit tablePositionChanged(c);
@@ -334,19 +334,19 @@ KexiRelationView::setReadOnly(bool b)
{
m_readOnly=b;
//TODO
-// invalidateActions();
+// tqinvalidateActions();
/* TableList::Iterator it, end( m_tables.end() );
for ( it=m_tables.begin(); it != end; ++it)
{
// (*it)->setReadOnly(b);
-#ifndef Q_WS_WIN
+#ifndef TQ_WS_WIN
#warning readonly needed
#endif
}*/
}
void
-KexiRelationView::slotListUpdate(QObject *)
+KexiRelationView::slotListUpdate(TQObject *)
{
#if 0
if(s != this)
@@ -368,7 +368,7 @@ KexiRelationView::slotListUpdate(QObject *)
}
void
-KexiRelationView::contentsMousePressEvent(QMouseEvent *ev)
+KexiRelationView::contentsMousePressEvent(TQMouseEvent *ev)
{
KexiRelationViewConnection *cview;
for(cview = m_connectionViews.first(); cview; cview = m_connectionViews.next())
@@ -381,11 +381,11 @@ KexiRelationView::contentsMousePressEvent(QMouseEvent *ev)
updateContents(cview->connectionRect());
m_selectedConnection = cview;
emit connectionViewGotFocus();
-// invalidateActions();
+// tqinvalidateActions();
- if(ev->button() == RightButton) {//show popup
+ if(ev->button() == Qt::RightButton) {//show popup
kdDebug() << "KexiRelationView::contentsMousePressEvent(): context" << endl;
-// QPopupMenu m;
+// TQPopupMenu m;
// m_removeSelectedTableQueryAction->plug( &m );
// m_removeSelectedConnectionAction->plug( &m );
emit connectionContextMenuRequest( ev->globalPos() );
@@ -395,9 +395,9 @@ KexiRelationView::contentsMousePressEvent(QMouseEvent *ev)
}
//connection not found
clearSelection();
-// invalidateActions();
- if(ev->button() == RightButton) {//show popup on view background area
-// QPopupMenu m;
+// tqinvalidateActions();
+ if(ev->button() == Qt::RightButton) {//show popup on view background area
+// TQPopupMenu m;
// m_removeSelectedConnectionAction->plug( &m );
emit emptyAreaContextMenuRequest( ev->globalPos() );
// executePopup(ev->globalPos());
@@ -406,7 +406,7 @@ KexiRelationView::contentsMousePressEvent(QMouseEvent *ev)
emit emptyAreaGotFocus();
}
setFocus();
-// QScrollView::contentsMousePressEvent(ev);
+// TQScrollView::contentsMousePressEvent(ev);
}
void KexiRelationView::clearSelection()
@@ -415,18 +415,18 @@ void KexiRelationView::clearSelection()
m_focusedTableView->unsetFocus();
m_focusedTableView = 0;
// setFocus();
-// invalidateActions();
+// tqinvalidateActions();
}
if (m_selectedConnection) {
m_selectedConnection->setSelected(false);
updateContents(m_selectedConnection->connectionRect());
m_selectedConnection = 0;
-// invalidateActions();
+// tqinvalidateActions();
}
}
void
-KexiRelationView::keyPressEvent(QKeyEvent *ev)
+KexiRelationView::keyPressEvent(TQKeyEvent *ev)
{
kdDebug() << "KexiRelationView::keyPressEvent()" << endl;
@@ -467,14 +467,14 @@ void
KexiRelationView::stretchExpandSize()
{
int max_x=-1, max_y=-1;
- QDictIterator<KexiRelationViewTableContainer> it(m_tables);
+ TQDictIterator<KexiRelationViewTableContainer> it(m_tables);
for (;it.current(); ++it) {
if (it.current()->right()>max_x)
max_x = it.current()->right();
if (it.current()->bottom()>max_y)
max_y = it.current()->bottom();
}
- QPoint p = viewportToContents(QPoint(max_x, max_y) + QPoint(3,3)); //3 pixels margin
+ TQPoint p = viewportToContents(TQPoint(max_x, max_y) + TQPoint(3,3)); //3 pixels margin
resizeContents(p.x(), p.y());
}
@@ -516,7 +516,7 @@ KexiRelationView::removeSelectedObject()
#endif
delete m_selectedConnection;
m_selectedConnection = 0;
-// invalidateActions();
+// tqinvalidateActions();
}
else if (m_focusedTableView) {
KexiRelationViewTableContainer *tmp = m_focusedTableView;
@@ -531,7 +531,7 @@ KexiRelationView::hideTable(KexiRelationViewTableContainer* tableView)
/*! @todo what about query? */
KexiDB::TableSchema *ts = tableView->schema()->table();
//for all connections: find and remove all connected with this table
- QPtrListIterator<KexiRelationViewConnection> it(m_connectionViews);
+ TQPtrListIterator<KexiRelationViewConnection> it(m_connectionViews);
for (;it.current();) {
if (it.current()->masterTable() == tableView
|| it.current()->detailsTable() == tableView)
@@ -554,7 +554,7 @@ KexiRelationView::hideAllTablesExcept( KexiDB::TableSchema::List* tables )
//! @todo what about queries?
for (TablesDictIterator it(m_tables); it.current();) {
KexiDB::TableSchema *table = it.current()->schema()->table();
- if (!table || tables->findRef( table )!=-1) {
+ if (!table || tables->tqfindRef( table )!=-1) {
++it;
continue;
}
@@ -580,13 +580,13 @@ void KexiRelationView::slotTableViewGotFocus()
// if (m_focusedTableView)
// m_focusedTableView->unsetFocus();
m_focusedTableView = (KexiRelationViewTableContainer*)sender();
-// invalidateActions();
+// tqinvalidateActions();
emit tableViewGotFocus();
}
-QSize KexiRelationView::sizeHint() const
+TQSize KexiRelationView::tqsizeHint() const
{
- return QSize(QScrollView::sizeHint());//.width(), 600);
+ return TQSize(TQScrollView::tqsizeHint());//.width(), 600);
}
void KexiRelationView::clear()
@@ -609,24 +609,24 @@ void KexiRelationView::removeAllConnections()
/*
-void KexiRelationView::tableHeaderContextMenuRequest(const QPoint& pos)
+void KexiRelationView::tableHeaderContextMenuRequest(const TQPoint& pos)
{
if (m_focusedTableView != sender())
return;
kdDebug() << "HEADER CTXT MENU!" <<endl;
- invalidateActions();
+ tqinvalidateActions();
m_tableQueryPopup->exec(pos);
}
//! Invalidates all actions availability
-void KexiRelationView::invalidateActions()
+void KexiRelationView::tqinvalidateActions()
{
setAvailable("edit_delete", m_selectedConnection || m_focusedTableView);
}
-void KexiRelationView::executePopup( QPoint pos )
+void KexiRelationView::executePopup( TQPoint pos )
{
- if (pos==QPoint(-1,-1)) {
+ if (pos==TQPoint(-1,-1)) {
pos = mapToGlobal( m_focusedTableView ? m_focusedTableView->pos() + m_focusedTableView->rect().center() : rect().center() );
}
if (m_focusedTableView)
diff --git a/kexi/widget/relations/kexirelationview.h b/kexi/widget/relations/kexirelationview.h
index 2de6620d5..b5d1785df 100644
--- a/kexi/widget/relations/kexirelationview.h
+++ b/kexi/widget/relations/kexirelationview.h
@@ -21,16 +21,16 @@
#ifndef KEXIRELATIONVIEW_H
#define KEXIRELATIONVIEW_H
-#include <qguardedptr.h>
-#include <qscrollview.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqguardedptr.h>
+#include <tqscrollview.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
#include <kexidb/tableschema.h>
#include "kexirelationviewconnection.h"
-class QFrame;
+class TQFrame;
class KexiRelationViewTable;
class KexiRelationViewTableContainer;
@@ -43,17 +43,17 @@ namespace KexiDB
class Connection;
}
-typedef QDict<KexiRelationViewTableContainer> TablesDict;
-typedef QDictIterator<KexiRelationViewTableContainer> TablesDictIterator;
-typedef QPtrList<KexiRelationViewConnection> ConnectionList;
-typedef QPtrListIterator<KexiRelationViewConnection> ConnectionListIterator;
+typedef TQDict<KexiRelationViewTableContainer> TablesDict;
+typedef TQDictIterator<KexiRelationViewTableContainer> TablesDictIterator;
+typedef TQPtrList<KexiRelationViewConnection> ConnectionList;
+typedef TQPtrListIterator<KexiRelationViewConnection> ConnectionListIterator;
struct SourceConnection
{
- QString masterTable;
- QString detailsTable;
- QString masterField;
- QString detailsField;
+ TQString masterTable;
+ TQString detailsTable;
+ TQString masterField;
+ TQString detailsField;
};
/*! @short provides a view for displaying relations between database tables.
@@ -65,23 +65,24 @@ struct SourceConnection
The class is for displaying only - retrieving data and updating data on the backend side is implemented
in KexiRelationWidget, and more specifically in: Kexi Relation Part and Kexi Query Part.
*/
-class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
+class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationView(QWidget *parent, const char *name=0);
+ KexiRelationView(TQWidget *tqparent, const char *name=0);
virtual ~KexiRelationView();
//! \return a dictionary of added tables
TablesDict* tables() { return &m_tables; }
/*! Adds a table \a t to the area. This changes only visual representation.
- If \a rect is valid, table widget geometry will be initialized.
+ If \a rect is valid, table widget tqgeometry will be initialized.
\return added table container or 0 on failure.
*/
KexiRelationViewTableContainer* addTableContainer(KexiDB::TableSchema *t,
- const QRect &rect = QRect());
+ const TQRect &rect = TQRect());
/*! \return table container for table \a t. */
KexiRelationViewTableContainer * tableContainer(KexiDB::TableSchema *t) const;
@@ -95,16 +96,16 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
inline KexiRelationViewTableContainer* focusedTableView() const { return m_focusedTableView; }
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
const ConnectionList* connections() const { return &m_connectionViews; }
// KexiRelationViewTableContainer* containerForTable(KexiDB::TableSchema* tableSchema);
signals:
- void tableContextMenuRequest( const QPoint& pos );
- void connectionContextMenuRequest( const QPoint& pos );
- void emptyAreaContextMenuRequest( const QPoint& pos );
+ void tableContextMenuRequest( const TQPoint& pos );
+ void connectionContextMenuRequest( const TQPoint& pos );
+ void emptyAreaContextMenuRequest( const TQPoint& pos );
void tableViewGotFocus();
void connectionViewGotFocus();
void emptyAreaGotFocus();
@@ -126,7 +127,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
/*! Hides all tables except \a tables. */
void hideAllTablesExcept( KexiDB::TableSchema::List* tables );
- void slotTableScrolling(const QString&);
+ void slotTableScrolling(const TQString&);
//! removes selected table or connection
void removeSelectedObject();
@@ -134,7 +135,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
protected slots:
void containerMoved(KexiRelationViewTableContainer *c);
- void slotListUpdate(QObject *s);
+ void slotListUpdate(TQObject *s);
void slotTableViewEndDrag();
void slotTableViewGotFocus();
@@ -142,15 +143,15 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
// /*! executes popup menu at \a pos, or,
// if \a pos not specified: at center of selected table view (if any selected),
// or at center point of the relations view. */
-// void executePopup( QPoint pos = QPoint(-1,-1) );
+// void executePopup( TQPoint pos = TQPoint(-1,-1) );
- void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
- void contentsMousePressEvent(QMouseEvent *ev);
- virtual void keyPressEvent(QKeyEvent *ev);
+ void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
+ void contentsMousePressEvent(TQMouseEvent *ev);
+ virtual void keyPressEvent(TQKeyEvent *ev);
void recalculateSize(int width, int height);
void stretchExpandSize();
-// void invalidateActions();
+// void tqinvalidateActions();
// void clearTableSelection();
// void clearConnSelection();
@@ -161,7 +162,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationView : public QScrollView
bool m_readOnly;
ConnectionList m_connectionViews;
KexiRelationViewConnection* m_selectedConnection;
- QGuardedPtr<KexiRelationViewTableContainer> m_focusedTableView;
+ TQGuardedPtr<KexiRelationViewTableContainer> m_focusedTableView;
};
#endif
diff --git a/kexi/widget/relations/kexirelationviewconnection.cpp b/kexi/widget/relations/kexirelationviewconnection.cpp
index 2c27de87b..7c8132986 100644
--- a/kexi/widget/relations/kexirelationviewconnection.cpp
+++ b/kexi/widget/relations/kexirelationviewconnection.cpp
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qcolor.h>
-#include <qapplication.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqcolor.h>
+#include <tqapplication.h>
+#include <tqpointarray.h>
#include <kdebug.h>
@@ -40,9 +40,9 @@
KexiRelationViewConnection::KexiRelationViewConnection(
KexiRelationViewTableContainer *masterTbl, KexiRelationViewTableContainer *detailsTbl,
- SourceConnection &c, KexiRelationView *parent)
+ SourceConnection &c, KexiRelationView *tqparent)
{
- m_parent = parent;
+ m_parent = tqparent;
// kdDebug() << "KexiRelationViewConnection::KexiRelationViewConnection()" << endl;
m_masterTable = masterTbl;
@@ -65,22 +65,22 @@ KexiRelationViewConnection::~KexiRelationViewConnection()
}
void
-KexiRelationViewConnection::drawConnection(QPainter *p)
+KexiRelationViewConnection::drawConnection(TQPainter *p)
{
- p->setPen(m_parent->palette().active().foreground());
+ p->setPen(m_parent->tqpalette().active().foreground());
int sx = m_masterTable->x() + m_masterTable->width() + m_parent->contentsX();
int sy = m_masterTable->globalY(m_masterField);
int rx = m_detailsTable->x() + m_parent->contentsX();
int ry = m_detailsTable->globalY(m_detailsField);
- QFont f( Kexi::smallFont( m_parent ) );
- QFontMetrics fm(f);
+ TQFont f( Kexi::smallFont( m_parent ) );
+ TQFontMetrics fm(f);
int side1x=0, side1y=sy - fm.height(),
sideNx=0, sideNy=ry - fm.height();
//! @todo details char can be also just a '1' for some cases
- QChar sideNChar(0x221E); //infinity char
+ TQChar sideNChar(0x221E); //infinity char
uint sideNCharWidth = 2+2+ fm.width( sideNChar );
- QChar side1Char('1');
+ TQChar side1Char('1');
uint side1CharWidth = 2+2+ fm.width( side1Char );
p->setBrush(p->pen().color());
@@ -88,11 +88,11 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
{
//det. side
p->drawLine(rx - sideNCharWidth, ry, rx, ry);
- QPointArray pa(3);
+ TQPointArray pa(3);
pa.setPoint(0, rx - 4, ry - 3);
pa.setPoint(1, rx - 4, ry + 3);
pa.setPoint(2, rx - 1, ry);
- p->drawPolygon(pa, true);
+ p->tqdrawPolygon(pa, true);
//master side
p->drawLine(sx, sy - 1, sx + side1CharWidth -1, sy - 1);
@@ -105,10 +105,10 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
sideNx = rx - sideNCharWidth - 1;
// sideNy = ry - 6;
- QPen pen(p->pen());
+ TQPen pen(p->pen());
if(m_selected)
{
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(2);
p->setPen(pen);
}
@@ -117,7 +117,7 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
if(m_selected)
{
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(1);
p->setPen(pen);
}
@@ -130,11 +130,11 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
//det. side
p->drawLine(lx, ry, lx + sideNCharWidth, ry);
- QPointArray pa(3);
+ TQPointArray pa(3);
pa.setPoint(0, lx + 3, ry - 3);
pa.setPoint(1, lx + 3, ry + 3);
pa.setPoint(2, lx, ry);
- p->drawPolygon(pa, true);
+ p->tqdrawPolygon(pa, true);
// p->drawLine(lx, ry, lx + 8, ry);
// p->drawPoint(lx + 1, ry - 1);
@@ -154,7 +154,7 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
if(m_selected)
{
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(2);
p->setPen(pen);
}
@@ -163,20 +163,20 @@ KexiRelationViewConnection::drawConnection(QPainter *p)
if(m_selected)
{
- QPen pen(p->pen());
+ TQPen pen(p->pen());
pen.setWidth(1);
p->setPen(pen);
}
}
- p->drawText(side1x, side1y, side1CharWidth, fm.height(), Qt::AlignCenter, side1Char);
- p->drawText(sideNx, sideNy, sideNCharWidth, fm.height(), Qt::AlignCenter, sideNChar);
- //p->drawRect(QRect(connectionRect().topLeft(), QSize(50,50)));
-// p->drawPixmap(side1, QPixmap(r1_xpm));
-// p->drawPixmap(sideN, QPixmap(rn_xpm));
+ p->drawText(side1x, side1y, side1CharWidth, fm.height(), TQt::AlignCenter, side1Char);
+ p->drawText(sideNx, sideNy, sideNCharWidth, fm.height(), TQt::AlignCenter, sideNChar);
+ //p->drawRect(TQRect(connectionRect().topLeft(), TQSize(50,50)));
+// p->drawPixmap(side1, TQPixmap(r1_xpm));
+// p->drawPixmap(sideN, TQPixmap(rn_xpm));
}
-const QRect
+const TQRect
KexiRelationViewConnection::connectionRect()
{
int sx = m_masterTable->x() + m_parent->contentsX();
@@ -200,15 +200,15 @@ KexiRelationViewConnection::connectionRect()
}
- int dx = QABS((leftX + width) - rightX);
- int dy = QABS(sy - ry) + 2;
+ int dx = TQABS((leftX + width) - rightX);
+ int dy = TQABS(sy - ry) + 2;
- int top = QMIN(sy, ry);
+ int top = TQMIN(sy, ry);
int left = leftX + width;
-// return QRect(sx - 1, sy - 1, (rx + m_detailsTable->width()) - sx + 1, ry - sy + 1);
- QRect rect(left - 150, top - 150, dx + 150, dy + 150);
+// return TQRect(sx - 1, sy - 1, (rx + m_detailsTable->width()) - sx + 1, ry - sy + 1);
+ TQRect rect(left - 150, top - 150, dx + 150, dy + 150);
// kdDebug() << "KexiRelationViewConnection::connectionRect():" << m_oldRect << "," << rect << endl;
m_oldRect = rect;
@@ -217,11 +217,11 @@ KexiRelationViewConnection::connectionRect()
}
bool
-KexiRelationViewConnection::matchesPoint(const QPoint &p, int tolerance)
+KexiRelationViewConnection::matchesPoint(const TQPoint &p, int tolerance)
{
- QRect we = connectionRect();
+ TQRect we = connectionRect();
- if(!we.contains(p))
+ if(!we.tqcontains(p))
return false;
/** get our coordinats
@@ -282,17 +282,17 @@ KexiRelationViewConnection::matchesPoint(const QPoint &p, int tolerance)
return false;
}
-QString
+TQString
KexiRelationViewConnection::toString() const
{
- QString str;
+ TQString str;
/*! @todo what about query? */
if (m_masterTable && m_masterTable->schema()->table()) {
- str += (QString(m_masterTable->schema()->name()) + "." + m_masterField);
+ str += (TQString(m_masterTable->schema()->name()) + "." + m_masterField);
}
if (m_detailsTable && m_detailsTable->schema()->table()) {
str += " - ";
- str += (QString(m_detailsTable->schema()->name()) + "." + m_detailsField);
+ str += (TQString(m_detailsTable->schema()->name()) + "." + m_detailsField);
}
return str;
}
diff --git a/kexi/widget/relations/kexirelationviewconnection.h b/kexi/widget/relations/kexirelationviewconnection.h
index 699fdf4fe..7b5962101 100644
--- a/kexi/widget/relations/kexirelationviewconnection.h
+++ b/kexi/widget/relations/kexirelationviewconnection.h
@@ -21,10 +21,10 @@
#ifndef KEXIRELATIONVIEWCONNECTION_H
#define KEXIRELATIONVIEWCONNECTION_H
-#include <qstring.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqguardedptr.h>
-class QPainter;
+class TQPainter;
class KexiRelationViewTableContainer;
class KexiRelationView;
@@ -33,7 +33,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewConnection
public:
KexiRelationViewConnection(KexiRelationViewTableContainer *masterTbl,
- KexiRelationViewTableContainer *detailsTbl, struct SourceConnection &s, KexiRelationView *parent);
+ KexiRelationViewTableContainer *detailsTbl, struct SourceConnection &s, KexiRelationView *tqparent);
~KexiRelationViewConnection();
@@ -43,33 +43,33 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewConnection
http://www.c-plusplus.de ;)
*/
- void drawConnection(QPainter *p);
+ void drawConnection(TQPainter *p);
bool selected() { return m_selected; }
void setSelected(bool s) { m_selected = s; }
- const QRect connectionRect();
- const QRect oldRect() const { return m_oldRect; }
+ const TQRect connectionRect();
+ const TQRect oldRect() const { return m_oldRect; }
KexiRelationViewTableContainer *masterTable() { return m_masterTable; }
KexiRelationViewTableContainer *detailsTable() { return m_detailsTable; }
- QString masterField() const { return m_masterField; }
- QString detailsField() const { return m_detailsField; }
+ TQString masterField() const { return m_masterField; }
+ TQString detailsField() const { return m_detailsField; }
- bool matchesPoint(const QPoint &p, int tolerance=3);
+ bool matchesPoint(const TQPoint &p, int tolerance=3);
// SourceConnection connection() { return m_conn; }
- QString toString() const;
+ TQString toString() const;
private:
- QGuardedPtr<KexiRelationViewTableContainer> m_masterTable;
- QGuardedPtr<KexiRelationViewTableContainer> m_detailsTable;
- QString m_masterField;
- QString m_detailsField;
- QRect m_oldRect;
+ TQGuardedPtr<KexiRelationViewTableContainer> m_masterTable;
+ TQGuardedPtr<KexiRelationViewTableContainer> m_detailsTable;
+ TQString m_masterField;
+ TQString m_detailsField;
+ TQRect m_oldRect;
bool m_selected;
- QGuardedPtr<KexiRelationView> m_parent;
+ TQGuardedPtr<KexiRelationView> m_parent;
};
#endif
diff --git a/kexi/widget/relations/kexirelationviewtable.cpp b/kexi/widget/relations/kexirelationviewtable.cpp
index 97beaa874..c850d7221 100644
--- a/kexi/widget/relations/kexirelationviewtable.cpp
+++ b/kexi/widget/relations/kexirelationviewtable.cpp
@@ -20,15 +20,15 @@
#include <stdlib.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qstyle.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqstyle.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -43,10 +43,10 @@
#include "kexirelationview.h"
KexiRelationViewTableContainer::KexiRelationViewTableContainer(
- KexiRelationView *parent, KexiDB::TableOrQuerySchema *schema)
- : QFrame(parent,"KexiRelationViewTableContainer" )
+ KexiRelationView *tqparent, KexiDB::TableOrQuerySchema *schema)
+ : TQFrame(tqparent,"KexiRelationViewTableContainer" )
// , m_table(t)
- , m_parent(parent)
+ , m_parent(tqparent)
// , m_mousePressed(false)
{
@@ -54,29 +54,29 @@ KexiRelationViewTableContainer::KexiRelationViewTableContainer(
//js: resize(100, 150);
//setMouseTracking(true);
- setFrameStyle( QFrame::WinPanel | QFrame::Raised );
+ setFrameStyle( TQFrame::WinPanel | TQFrame::Raised );
- QVBoxLayout *lyr = new QVBoxLayout(this,4,1); //js: using Q*BoxLayout is a good idea
+ TQVBoxLayout *lyr = new TQVBoxLayout(this,4,1); //js: using Q*BoxLayout is a good idea
m_tableHeader = new KexiRelationViewTableContainerHeader(schema->name(), this);
m_tableHeader->unsetFocus();
- m_tableHeader->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed));
+ m_tableHeader->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Fixed));
lyr->addWidget(m_tableHeader);
- connect(m_tableHeader,SIGNAL(moved()),this,SLOT(moved()));
- connect(m_tableHeader, SIGNAL(endDrag()), this, SIGNAL(endDrag()));
+ connect(m_tableHeader,TQT_SIGNAL(moved()),this,TQT_SLOT(moved()));
+ connect(m_tableHeader, TQT_SIGNAL(endDrag()), this, TQT_SIGNAL(endDrag()));
- m_tableView = new KexiRelationViewTable(schema, parent, this, "KexiRelationViewTable");
+ m_tableView = new KexiRelationViewTable(schema, tqparent, this, "KexiRelationViewTable");
//m_tableHeader->setFocusProxy( m_tableView );
- m_tableView->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+ m_tableView->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum));
- m_tableView->setMaximumSize( m_tableView->sizeHint() );
+ m_tableView->setMaximumSize( m_tableView->tqsizeHint() );
-// m_tableView->resize( m_tableView->sizeHint() );
+// m_tableView->resize( m_tableView->tqsizeHint() );
lyr->addWidget(m_tableView, 0);
- connect(m_tableView, SIGNAL(tableScrolling()), this, SLOT(moved()));
- connect(m_tableView, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)));
+ connect(m_tableView, TQT_SIGNAL(tableScrolling()), this, TQT_SLOT(moved()));
+ connect(m_tableView, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
KexiRelationViewTableContainer::~KexiRelationViewTableContainer()
@@ -88,7 +88,7 @@ KexiDB::TableOrQuerySchema* KexiRelationViewTableContainer::schema() const
return m_tableView->schema();
}
-void KexiRelationViewTableContainer::slotContextMenu(KListView *, QListViewItem *, const QPoint &p)
+void KexiRelationViewTableContainer::slotContextMenu(KListView *, TQListViewItem *, const TQPoint &p)
{
// m_parent->executePopup(p);
emit contextMenuRequest( p );
@@ -99,24 +99,24 @@ void KexiRelationViewTableContainer::moved() {
emit moved(this);
}
-int KexiRelationViewTableContainer::globalY(const QString &field)
+int KexiRelationViewTableContainer::globalY(const TQString &field)
{
// kdDebug() << "KexiRelationViewTableContainer::globalY()" << endl;
-// QPoint o = mapFromGlobal(QPoint(0, (m_tableView->globalY(field))/*+m_parent->contentsY()*/));
+// TQPoint o = mapFromGlobal(TQPoint(0, (m_tableView->globalY(field))/*+m_parent->contentsY()*/));
- QPoint o(0, (m_tableView->globalY(field)) + m_parent->contentsY());
+ TQPoint o(0, (m_tableView->globalY(field)) + m_parent->contentsY());
// kdDebug() << "KexiRelationViewTableContainer::globalY() db2" << endl;
return m_parent->viewport()->mapFromGlobal(o).y();
}
#if 0//js
-QSize KexiRelationViewTableContainer::sizeHint()
+TQSize KexiRelationViewTableContainer::tqsizeHint()
{
-#ifdef Q_WS_WIN
- QSize s = m_tableView->sizeHint()
- + QSize( 2 * 5 , m_tableHeader->height() + 2 * 5 );
+#ifdef TQ_WS_WIN
+ TQSize s = m_tableView->tqsizeHint()
+ + TQSize( 2 * 5 , m_tableHeader->height() + 2 * 5 );
#else
- QSize s = m_tableView->sizeHint();
+ TQSize s = m_tableView->tqsizeHint();
s.setWidth(s.width() + 4);
s.setHeight(m_tableHeader->height() + s.height());
#endif
@@ -134,13 +134,13 @@ void KexiRelationViewTableContainer::setFocus()
}
m_tableHeader->setFocus();
m_tableView->setFocus();
-/* QPalette p = qApp->palette();
- p.setColor( QPalette::Active, QColorGroup::Highlight, KGlobalSettings::highlightColor() );
- p.setColor( QPalette::Active, QColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() );
+/* TQPalette p = tqApp->palette();
+ p.setColor( TQPalette::Active, TQColorGroup::Highlight, KGlobalSettings::highlightColor() );
+ p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() );
m_tableView->setPalette(p);*/
raise();
- repaint();
+ tqrepaint();
emit gotFocus();
}
@@ -155,18 +155,18 @@ void KexiRelationViewTableContainer::unsetFocus()
m_tableView->clearSelection();
// m_tableView->unsetPalette();
-/* QPalette p = m_tableView->palette();
-// p.setColor( QPalette::Active, QColorGroup::Highlight, KGlobalSettings::highlightColor() );
-// p.setColor( QPalette::Active, QColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() );
- p.setColor( QPalette::Active, QColorGroup::Highlight, p.color(QPalette::Active, QColorGroup::Background ) );
-// p.setColor( QPalette::Active, QColorGroup::Highlight, gray );
- p.setColor( QPalette::Active, QColorGroup::HighlightedText, p.color(QPalette::Active, QColorGroup::Foreground ) );
-// p.setColor( QPalette::Active, QColorGroup::Highlight, green );
-// p.setColor( QPalette::Active, QColorGroup::HighlightedText, blue );
+/* TQPalette p = m_tableView->palette();
+// p.setColor( TQPalette::Active, TQColorGroup::Highlight, KGlobalSettings::highlightColor() );
+// p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, KGlobalSettings::highlightedTextColor() );
+ p.setColor( TQPalette::Active, TQColorGroup::Highlight, p.color(TQPalette::Active, TQColorGroup::Background ) );
+// p.setColor( TQPalette::Active, TQColorGroup::Highlight, gray );
+ p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, p.color(TQPalette::Active, TQColorGroup::Foreground ) );
+// p.setColor( TQPalette::Active, TQColorGroup::Highlight, green );
+// p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, blue );
m_tableView->setPalette(p);*/
clearFocus();
- repaint();
+ tqrepaint();
}
@@ -176,8 +176,8 @@ void KexiRelationViewTableContainer::unsetFocus()
//BEGIN KexiRelatoinViewTableContainerHeader
KexiRelationViewTableContainerHeader::KexiRelationViewTableContainerHeader(
- const QString& text,QWidget *parent)
- :QLabel(text,parent),m_dragging(false)
+ const TQString& text,TQWidget *tqparent)
+ :TQLabel(text,tqparent),m_dragging(false)
{
setMargin(1);
m_activeBG = KGlobalSettings::activeTitleColor();
@@ -204,17 +204,17 @@ void KexiRelationViewTableContainerHeader::unsetFocus()
setPaletteForegroundColor(m_inactiveFG);
}
-bool KexiRelationViewTableContainerHeader::eventFilter(QObject *, QEvent *ev)
+bool KexiRelationViewTableContainerHeader::eventFilter(TQObject *, TQEvent *ev)
{
- if (ev->type()==QEvent::MouseMove)
+ if (ev->type()==TQEvent::MouseMove)
{
- if (m_dragging && static_cast<QMouseEvent*>(ev)->state()==Qt::LeftButton) {
+ if (m_dragging && TQT_TQMOUSEEVENT(ev)->state()==Qt::LeftButton) {
int diffX,diffY;
- diffX=static_cast<QMouseEvent*>(ev)->globalPos().x()-m_grabX;
- diffY=static_cast<QMouseEvent*>(ev)->globalPos().y()-m_grabY;
+ diffX=TQT_TQMOUSEEVENT(ev)->globalPos().x()-m_grabX;
+ diffY=TQT_TQMOUSEEVENT(ev)->globalPos().y()-m_grabY;
if ((abs(diffX)>2) || (abs(diffY)>2))
{
- QPoint newPos=parentWidget()->pos()+QPoint(diffX,diffY);
+ TQPoint newPos=tqparentWidget()->pos()+TQPoint(diffX,diffY);
//correct the x position
if (newPos.x()<0) {
m_offsetX+=newPos.x();
@@ -244,9 +244,9 @@ bool KexiRelationViewTableContainerHeader::eventFilter(QObject *, QEvent *ev)
}
//move and update helpers
- parentWidget()->move(newPos);
- m_grabX=static_cast<QMouseEvent*>(ev)->globalPos().x();
- m_grabY=static_cast<QMouseEvent*>(ev)->globalPos().y();
+ tqparentWidget()->move(newPos);
+ m_grabX=TQT_TQMOUSEEVENT(ev)->globalPos().x();
+ m_grabY=TQT_TQMOUSEEVENT(ev)->globalPos().y();
// kdDebug()<<"HEADER:emitting moved"<<endl;
emit moved();
}
@@ -256,9 +256,9 @@ bool KexiRelationViewTableContainerHeader::eventFilter(QObject *, QEvent *ev)
return false;
}
-void KexiRelationViewTableContainerHeader::mousePressEvent(QMouseEvent *ev) {
+void KexiRelationViewTableContainerHeader::mousePressEvent(TQMouseEvent *ev) {
kdDebug()<<"KexiRelationViewTableContainerHeader::Mouse Press Event"<<endl;
- parentWidget()->setFocus();
+ tqparentWidget()->setFocus();
ev->accept();
if (ev->button()==Qt::LeftButton) {
m_dragging=true;
@@ -266,20 +266,20 @@ void KexiRelationViewTableContainerHeader::mousePressEvent(QMouseEvent *ev) {
m_grabY=ev->globalPos().y();
m_offsetX=0;
m_offsetY=0;
- setCursor(Qt::SizeAllCursor);
+ setCursor(TQt::SizeAllCursor);
return;
}
if (ev->button()==Qt::RightButton) {
- emit static_cast<KexiRelationViewTableContainer*>(parentWidget())
+ emit static_cast<KexiRelationViewTableContainer*>(tqparentWidget())
->contextMenuRequest(ev->globalPos());
}
-// QLabel::mousePressEvent(ev);
+// TQLabel::mousePressEvent(ev);
}
-void KexiRelationViewTableContainerHeader::mouseReleaseEvent(QMouseEvent *ev) {
+void KexiRelationViewTableContainerHeader::mouseReleaseEvent(TQMouseEvent *ev) {
kdDebug()<<"KexiRelationViewTableContainerHeader::Mouse Release Event"<<endl;
if (m_dragging && ev->button() & Qt::LeftButton) {
- setCursor(Qt::ArrowCursor);
+ setCursor(TQt::ArrowCursor);
m_dragging=false;
emit endDrag();
}
@@ -292,37 +292,37 @@ void KexiRelationViewTableContainerHeader::mouseReleaseEvent(QMouseEvent *ev) {
//=====================================================================================
KexiRelationViewTable::KexiRelationViewTable(KexiDB::TableOrQuerySchema* tableOrQuerySchema,
- KexiRelationView *view, QWidget *parent, const char *name)
- : KexiFieldListView(parent, name, KexiFieldListView::ShowAsterisk)
+ KexiRelationView *view, TQWidget *tqparent, const char *name)
+ : KexiFieldListView(tqparent, name, KexiFieldListView::ShowAsterisk)
, m_view(view)
{
setSchema(tableOrQuerySchema);
header()->hide();
- connect(this, SIGNAL(dropped(QDropEvent *, QListViewItem *)), this, SLOT(slotDropped(QDropEvent *)));
- connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotContentsMoving(int,int)));
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent *, TQListViewItem *)), this, TQT_SLOT(slotDropped(TQDropEvent *)));
+ connect(this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotContentsMoving(int,int)));
}
KexiRelationViewTable::~KexiRelationViewTable()
{
}
-QSize KexiRelationViewTable::sizeHint() const
+TQSize KexiRelationViewTable::tqsizeHint() const
{
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
// kdDebug() << schema()->name() << " cw=" << columnWidth(0) + fm.width("i")
// << ", " << fm.width(schema()->name()+" ") << endl;
int maxWidth = -1;
const int iconWidth = IconSize(KIcon::Small) + fm.width("i")+20;
- for (QListViewItem *item = firstChild(); item; item = item->nextSibling())
- maxWidth = QMAX(maxWidth, iconWidth + fm.width(item->text(0)));
+ for (TQListViewItem *item = firstChild(); item; item = item->nextSibling())
+ maxWidth = TQMAX(maxWidth, iconWidth + fm.width(item->text(0)));
- const uint rowCount = QMIN( 8, childCount() );
+ const uint rowCount = TQMIN( 8, childCount() );
- QSize s(
- QMAX( maxWidth, fm.width(schema()->name()+" ")),
+ TQSize s(
+ TQMAX( maxWidth, fm.width(schema()->name()+" ")),
rowCount*firstChild()->totalHeight() + 4 );
return s;
}
@@ -336,58 +336,58 @@ void KexiRelationViewTable::setReadOnly(bool b)
#endif
int
-KexiRelationViewTable::globalY(const QString &item)
+KexiRelationViewTable::globalY(const TQString &item)
{
- QListViewItem *i = findItem(item, 0);
+ TQListViewItem *i = tqfindItem(item, 0);
if (!i)
return -1;
- int y = itemRect(i).y() + (itemRect(i).height() / 2);
+ int y = tqitemRect(i).y() + (tqitemRect(i).height() / 2);
if (contentsY() > itemPos(i))
y = 0;
else if (y == 0)
y = height();
- return mapToGlobal(QPoint(0, y)).y();
+ return mapToGlobal(TQPoint(0, y)).y();
}
bool
-KexiRelationViewTable::acceptDrag(QDropEvent *ev) const
+KexiRelationViewTable::acceptDrag(TQDropEvent *ev) const
{
// kdDebug() << "KexiRelationViewTable::acceptDrag()" << endl;
- QListViewItem *receiver = itemAt(ev->pos() - QPoint(0,contentsY()));
+ TQListViewItem *receiver = itemAt(ev->pos() - TQPoint(0,contentsY()));
if (!receiver || !KexiFieldDrag::canDecodeSingle(ev))
return false;
- QString sourceMimeType;
- QString srcTable;
- QString srcField;
+ TQString sourceMimeType;
+ TQString srcTable;
+ TQString srcField;
if (!KexiFieldDrag::decodeSingle(ev,sourceMimeType,srcTable,srcField))
return false;
if (sourceMimeType!="kexi/table" && sourceMimeType=="kexi/query")
return false;
- QString f = receiver->text(0).stripWhiteSpace();
- if (!srcField.stripWhiteSpace().startsWith("*") && !f.startsWith("*") && ev->source() != (QWidget*)this)
+ TQString f = receiver->text(0).stripWhiteSpace();
+ if (!srcField.stripWhiteSpace().startsWith("*") && !f.startsWith("*") && ev->source() != (TQWidget*)this)
return true;
return false;
}
void
-KexiRelationViewTable::slotDropped(QDropEvent *ev)
+KexiRelationViewTable::slotDropped(TQDropEvent *ev)
{
- QListViewItem *recever = itemAt(ev->pos() - QPoint(0,contentsY()));
+ TQListViewItem *recever = itemAt(ev->pos() - TQPoint(0,contentsY()));
if (!recever || !KexiFieldDrag::canDecodeSingle(ev)) {
ev->ignore();
return;
}
- QString sourceMimeType;
- QString srcTable;
- QString srcField;
+ TQString sourceMimeType;
+ TQString srcTable;
+ TQString srcField;
if (!KexiFieldDrag::decodeSingle(ev,sourceMimeType,srcTable,srcField))
return;
if (sourceMimeType!="kexi/table" && sourceMimeType=="kexi/query")
return;
// kdDebug() << "KexiRelationViewTable::slotDropped() srcfield: " << srcField << endl;
- QString rcvField = recever->text(0);
+ TQString rcvField = recever->text(0);
SourceConnection s;
s.masterTable = srcTable;
@@ -408,22 +408,22 @@ KexiRelationViewTable::slotContentsMoving(int,int)
emit tableScrolling();
}
-void KexiRelationViewTable::contentsMousePressEvent(QMouseEvent *ev)
+void KexiRelationViewTable::contentsMousePressEvent(TQMouseEvent *ev)
{
- parentWidget()->setFocus();
+ tqparentWidget()->setFocus();
setFocus();
KListView::contentsMousePressEvent(ev);
// if (ev->button()==Qt::RightButton)
-// static_cast<KexiRelationView*>(parentWidget())->executePopup(ev->pos());
+// static_cast<KexiRelationView*>(tqparentWidget())->executePopup(ev->pos());
}
-QRect KexiRelationViewTable::drawItemHighlighter(QPainter *painter, QListViewItem *item)
+TQRect KexiRelationViewTable::drawItemHighlighter(TQPainter *painter, TQListViewItem *item)
{
if (painter) {
- style().drawPrimitive(QStyle::PE_FocusRect, painter, itemRect(item), colorGroup(),
- QStyle::Style_FocusAtBorder);
+ tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, painter, tqitemRect(item), tqcolorGroup(),
+ TQStyle::Style_FocusAtBorder);
}
- return itemRect(item);
+ return tqitemRect(item);
}
#include "kexirelationviewtable.moc"
diff --git a/kexi/widget/relations/kexirelationviewtable.h b/kexi/widget/relations/kexirelationviewtable.h
index cc90e16d7..deabc2e01 100644
--- a/kexi/widget/relations/kexirelationviewtable.h
+++ b/kexi/widget/relations/kexirelationviewtable.h
@@ -21,9 +21,9 @@
#ifndef KEXIRELATIONVIEWTABLE_H
#define KEXIRELATIONVIEWTABLE_H
-#include <qframe.h>
-#include <qstringlist.h>
-#include <qlabel.h>
+#include <tqframe.h>
+#include <tqstringlist.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <widget/kexifieldlistview.h>
@@ -37,18 +37,19 @@ namespace KexiDB
class TableOrQuerySchema;
}
-class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainer : public QFrame
+class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainer : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
-// KexiRelationViewTableContainer(KexiRelationView *parent, KexiDB::TableSchema *t);
+// KexiRelationViewTableContainer(KexiRelationView *tqparent, KexiDB::TableSchema *t);
KexiRelationViewTableContainer(
- KexiRelationView *parent, KexiDB::TableOrQuerySchema *schema);
+ KexiRelationView *tqparent, KexiDB::TableOrQuerySchema *schema);
virtual ~KexiRelationViewTableContainer();
- int globalY(const QString &field);
+ int globalY(const TQString &field);
// KexiDB::TableSchema *table();
KexiRelationViewTable* tableView() const { return m_tableView; }
@@ -61,7 +62,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainer : public QFrame
void moved(KexiRelationViewTableContainer *);
void endDrag();
void gotFocus();
- void contextMenuRequest(const QPoint& pos);
+ void contextMenuRequest(const TQPoint& pos);
public slots:
virtual void setFocus();
@@ -69,7 +70,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainer : public QFrame
protected slots:
void moved();
- void slotContextMenu(KListView *lv, QListViewItem *i, const QPoint& p);
+ void slotContextMenu(KListView *lv, TQListViewItem *i, const TQPoint& p);
protected:
// KexiDB::TableSchema *m_table;
@@ -84,53 +85,55 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainer : public QFrame
class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableItem : public KListViewItem
{
public:
- KexiRelationViewTableItem(QListView *parent, QListViewItem *after,
- QString key, QString field);
- virtual void paintFocus ( QPainter * p, const QColorGroup & cg, const QRect & r );
+ KexiRelationViewTableItem(TQListView *tqparent, TQListViewItem *after,
+ TQString key, TQString field);
+ virtual void paintFocus ( TQPainter * p, const TQColorGroup & cg, const TQRect & r );
};*/
class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTable : public KexiFieldListView
{
Q_OBJECT
+ TQ_OBJECT
public:
KexiRelationViewTable(KexiDB::TableOrQuerySchema* tableOrQuerySchema,
- KexiRelationView *view, QWidget *parent, const char *name = 0);
-// KexiRelationViewTable(QWidget *parent, KexiRelationView *view, KexiDB::TableSchema *t, const char *name=0);
+ KexiRelationView *view, TQWidget *tqparent, const char *name = 0);
+// KexiRelationViewTable(TQWidget *tqparent, KexiRelationView *view, KexiDB::TableSchema *t, const char *name=0);
virtual ~KexiRelationViewTable();
// KexiDB::TableSchema *table() const { return m_table; };
- int globalY(const QString &item);
+ int globalY(const TQString &item);
// void setReadOnly(bool);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
signals:
void tableScrolling();
protected slots:
- void slotDropped(QDropEvent *e);
+ void slotDropped(TQDropEvent *e);
void slotContentsMoving(int, int);
-// void slotItemDoubleClicked( QListViewItem *i, const QPoint &, int );
+// void slotItemDoubleClicked( TQListViewItem *i, const TQPoint &, int );
protected:
- virtual void contentsMousePressEvent( QMouseEvent * e );
- virtual bool acceptDrag(QDropEvent *e) const;
-//moved virtual QDragObject *dragObject();
- virtual QRect drawItemHighlighter(QPainter *painter, QListViewItem *item);
+ virtual void contentsMousePressEvent( TQMouseEvent * e );
+ virtual bool acceptDrag(TQDropEvent *e) const;
+//moved virtual TQDragObject *dragObject();
+ virtual TQRect drawItemHighlighter(TQPainter *painter, TQListViewItem *item);
private:
-// QStringList m_fieldList;
+// TQStringList m_fieldList;
// KexiDB::TableSchema *m_table;
KexiRelationView *m_view;
-// QPixmap m_keyIcon, m_noIcon;
+// TQPixmap m_keyIcon, m_noIcon;
};
-class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainerHeader : public QLabel
+class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainerHeader : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationViewTableContainerHeader(const QString& text,QWidget *parent);
+ KexiRelationViewTableContainerHeader(const TQString& text,TQWidget *tqparent);
virtual ~KexiRelationViewTableContainerHeader();
virtual void setFocus();
@@ -141,9 +144,9 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainerHeader : public QLa
void endDrag();
protected:
- bool eventFilter(QObject *obj, QEvent *ev);
- void mousePressEvent(QMouseEvent *ev);
- void mouseReleaseEvent(QMouseEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
+ void mousePressEvent(TQMouseEvent *ev);
+ void mouseReleaseEvent(TQMouseEvent *ev);
bool m_dragging;
int m_grabX;
@@ -151,7 +154,7 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationViewTableContainerHeader : public QLa
int m_offsetX;
int m_offsetY;
- QColor m_activeBG, m_activeFG, m_inactiveBG, m_inactiveFG;
+ TQColor m_activeBG, m_activeFG, m_inactiveBG, m_inactiveFG;
};
#endif
diff --git a/kexi/widget/relations/kexirelationwidget.cpp b/kexi/widget/relations/kexirelationwidget.cpp
index 14ec4ce05..7ef5a9617 100644
--- a/kexi/widget/relations/kexirelationwidget.cpp
+++ b/kexi/widget/relations/kexirelationwidget.cpp
@@ -21,10 +21,10 @@
#include "kexirelationwidget.h"
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqtimer.h>
#include <kcombobox.h>
#include <klocale.h>
@@ -41,31 +41,31 @@
#include "kexirelationviewtable.h"
#include "kexirelationviewconnection.h"
-KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, QWidget *parent,
+KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, TQWidget *tqparent,
const char *name)
- : KexiViewBase(win, parent, name)
+ : KexiViewBase(win, tqparent, name)
, m_win(win)
{
m_conn = m_win->project()->dbConnection();
- QHBoxLayout *hlyr = new QHBoxLayout(0);
- QGridLayout *g = new QGridLayout(this);
+ TQHBoxLayout *hlyr = new TQHBoxLayout(0);
+ TQGridLayout *g = new TQGridLayout(this);
g->addLayout( hlyr, 0, 0 );
m_tableCombo = new KComboBox(this, "tables_combo");
- m_tableCombo->setMinimumWidth(QFontMetrics(font()).width("w")*20);
- QLabel *lbl = new QLabel(m_tableCombo, i18n("Table")+": ", this);
+ m_tableCombo->setMinimumWidth(TQFontMetrics(font()).width("w")*20);
+ TQLabel *lbl = new TQLabel(m_tableCombo, i18n("Table")+": ", this);
lbl->setIndent(3);
- m_tableCombo->setInsertionPolicy(QComboBox::NoInsertion);
+ m_tableCombo->setInsertionPolicy(TQComboBox::NoInsertion);
hlyr->addWidget(lbl);
hlyr->addWidget(m_tableCombo);
- m_tableCombo->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Preferred));
+ m_tableCombo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Preferred));
fillTablesCombo();
m_btnAdd = new KPushButton(i18n("&Add"), this);
hlyr->addWidget(m_btnAdd);
hlyr->addStretch(1);
- connect(m_btnAdd, SIGNAL(clicked()), this, SLOT(slotAddTable()));
+ connect(m_btnAdd, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(slotAddTable()));
m_relationView = new KexiRelationView(this, "relation_view");
setViewWidget(m_relationView);
@@ -75,50 +75,50 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, QWidget *parent,
//actions
m_tableQueryPopup = new KPopupMenu(this, "m_popup");
m_tableQueryPopupTitleID = m_tableQueryPopup->insertTitle(SmallIcon("table"), "");
- connect(m_tableQueryPopup, SIGNAL(aboutToShow()), this, SLOT(aboutToShowPopupMenu()));
+ connect(m_tableQueryPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowPopupMenu()));
m_connectionPopup = new KPopupMenu(this, "m_connectionPopup");
m_connectionPopupTitleID = m_connectionPopup->insertTitle("");
- connect(m_connectionPopup, SIGNAL(aboutToShow()), this, SLOT(aboutToShowPopupMenu()));
+ connect(m_connectionPopup, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(aboutToShowPopupMenu()));
m_areaPopup = new KPopupMenu(this, "m_areaPopup");
m_openSelectedTableAction = new KAction(i18n("&Open Table"), SmallIcon("fileopen"), KShortcut(),
- this, SLOT(openSelectedTable()), this, "relationsview_openTable");
+ TQT_TQOBJECT(this), TQT_SLOT(openSelectedTable()), TQT_TQOBJECT(this), "relationsview_openTable");
m_openSelectedTableAction->plug( m_tableQueryPopup );
m_designSelectedTableAction = new KAction(i18n("&Design Table"), SmallIcon("edit"), KShortcut(),
- this, SLOT(designSelectedTable()), this, "relationsview_designTable");
+ TQT_TQOBJECT(this), TQT_SLOT(designSelectedTable()), TQT_TQOBJECT(this), "relationsview_designTable");
m_designSelectedTableAction->plug( m_tableQueryPopup );
m_tableQueryPopup->insertSeparator();
KAction* hide_action = plugSharedAction("edit_delete", i18n("&Hide Table"), m_tableQueryPopup);
- hide_action->setIconSet(QIconSet());
+ hide_action->setIconSet(TQIconSet());
plugSharedAction("edit_delete",m_connectionPopup);
- plugSharedAction("edit_delete",this, SLOT(removeSelectedObject()));
-
- connect(m_relationView, SIGNAL(tableViewGotFocus()),
- this, SLOT(tableViewGotFocus()));
- connect(m_relationView, SIGNAL(connectionViewGotFocus()),
- this, SLOT(connectionViewGotFocus()));
- connect(m_relationView, SIGNAL(emptyAreaGotFocus()),
- this, SLOT(emptyAreaGotFocus()));
- connect(m_relationView, SIGNAL(tableContextMenuRequest( const QPoint& )),
- this, SLOT(tableContextMenuRequest( const QPoint& )));
- connect(m_relationView, SIGNAL(connectionContextMenuRequest( const QPoint& )),
- this, SLOT(connectionContextMenuRequest( const QPoint& )));
- connect(m_relationView, SIGNAL(tableHidden(KexiDB::TableSchema&)),
- this, SLOT(slotTableHidden(KexiDB::TableSchema&)));
- connect(m_relationView, SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
- this, SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)));
- connect(m_relationView, SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
- this, SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)));
+ plugSharedAction("edit_delete",TQT_TQOBJECT(this), TQT_SLOT(removeSelectedObject()));
+
+ connect(m_relationView, TQT_SIGNAL(tableViewGotFocus()),
+ TQT_TQOBJECT(this), TQT_SLOT(tableViewGotFocus()));
+ connect(m_relationView, TQT_SIGNAL(connectionViewGotFocus()),
+ TQT_TQOBJECT(this), TQT_SLOT(connectionViewGotFocus()));
+ connect(m_relationView, TQT_SIGNAL(emptyAreaGotFocus()),
+ TQT_TQOBJECT(this), TQT_SLOT(emptyAreaGotFocus()));
+ connect(m_relationView, TQT_SIGNAL(tableContextMenuRequest( const TQPoint& )),
+ TQT_TQOBJECT(this), TQT_SLOT(tableContextMenuRequest( const TQPoint& )));
+ connect(m_relationView, TQT_SIGNAL(connectionContextMenuRequest( const TQPoint& )),
+ TQT_TQOBJECT(this), TQT_SLOT(connectionContextMenuRequest( const TQPoint& )));
+ connect(m_relationView, TQT_SIGNAL(tableHidden(KexiDB::TableSchema&)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotTableHidden(KexiDB::TableSchema&)));
+ connect(m_relationView, TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)),
+ TQT_TQOBJECT(this), TQT_SIGNAL(tablePositionChanged(KexiRelationViewTableContainer*)));
+ connect(m_relationView, TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)),
+ TQT_TQOBJECT(this), TQT_SIGNAL(aboutConnectionRemove(KexiRelationViewConnection*)));
#if 0
if(!embedd)
{
/*todo setContextHelp(i18n("Relations"), i18n("To create a relationship simply drag the source field onto the target field. "
- "An arrowhead is used to show which table is the parent (master) and which table is the child (slave) in the relationship."));*/
+ "An arrowhead is used to show which table is the tqparent (master) and which table is the child (slave) in the relationship."));*/
}
#endif
// else
@@ -126,10 +126,10 @@ KexiRelationWidget::KexiRelationWidget(KexiMainWindow *win, QWidget *parent,
#ifdef TESTING_KexiRelationWidget
for (int i=0;i<(int)m_db->tableNames().count();i++)
- QTimer::singleShot(100,this,SLOT(slotAddTable()));
+ TQTimer::singleShot(100,this,TQT_SLOT(slotAddTable()));
#endif
- invalidateActions();
+ tqinvalidateActions();
}
KexiRelationWidget::~KexiRelationWidget()
@@ -141,9 +141,9 @@ TablesDict* KexiRelationWidget::tables() const
return m_relationView->tables();
}
-KexiRelationViewTableContainer* KexiRelationWidget::table(const QString& name) const
+KexiRelationViewTableContainer* KexiRelationWidget::table(const TQString& name) const
{
- return m_relationView->tables()->find( name );
+ return m_relationView->tables()->tqfind( name );
}
const ConnectionList* KexiRelationWidget::connections() const
@@ -156,13 +156,13 @@ KexiRelationWidget::slotAddTable()
{
if (m_tableCombo->currentItem()==-1)
return;
- QString tname = m_tableCombo->text(m_tableCombo->currentItem());
+ TQString tname = m_tableCombo->text(m_tableCombo->currentItem());
KexiDB::TableSchema *t = m_conn->tableSchema(tname);
addTable(t);
}
void
-KexiRelationWidget::addTable(KexiDB::TableSchema *t, const QRect &rect)
+KexiRelationWidget::addTable(KexiDB::TableSchema *t, const TQRect &rect)
{
if (!t)
return;
@@ -171,11 +171,11 @@ KexiRelationWidget::addTable(KexiDB::TableSchema *t, const QRect &rect)
kdDebug() << "KexiRelationWidget::slotAddTable(): adding table " << t->name() << endl;
if (!c)
return;
- connect(c->tableView(), SIGNAL(doubleClicked(QListViewItem*,const QPoint&,int)),
- this, SLOT(slotTableFieldDoubleClicked(QListViewItem*,const QPoint&,int)));
+ connect(c->tableView(), TQT_SIGNAL(doubleClicked(TQListViewItem*,const TQPoint&,int)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotTableFieldDoubleClicked(TQListViewItem*,const TQPoint&,int)));
}
- const QString tname = t->name().lower();
+ const TQString tname = t->name().lower();
const int count = m_tableCombo->count();
int i = 0;
for (; i < count; i++ ) {
@@ -207,7 +207,7 @@ KexiRelationWidget::addConnection(const SourceConnection& conn)
}
void
-KexiRelationWidget::addTable(const QString& t)
+KexiRelationWidget::addTable(const TQString& t)
{
for(int i=0; i < m_tableCombo->count(); i++)
{
@@ -221,53 +221,53 @@ KexiRelationWidget::addTable(const QString& t)
void KexiRelationWidget::tableViewGotFocus()
{
-// if (m_relationView->focusedTableView == sender())
+// if (m_relationView->focusedTableView == TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender())))
// return;
// kdDebug() << "GOT FOCUS!" <<endl;
// clearSelection();
// if (m_focusedTableView)
// m_focusedTableView->unsetFocus();
-// m_focusedTableView = (KexiRelationViewTableContainer*)sender();
- invalidateActions();
+// m_focusedTableView = (KexiRelationViewTableContainer*)TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()));
+ tqinvalidateActions();
}
void KexiRelationWidget::connectionViewGotFocus()
{
- invalidateActions();
+ tqinvalidateActions();
}
void KexiRelationWidget::emptyAreaGotFocus()
{
- invalidateActions();
+ tqinvalidateActions();
}
-void KexiRelationWidget::tableContextMenuRequest(const QPoint& pos)
+void KexiRelationWidget::tableContextMenuRequest(const TQPoint& pos)
{
- invalidateActions();
+ tqinvalidateActions();
executePopup( pos );
}
-void KexiRelationWidget::connectionContextMenuRequest(const QPoint& pos)
+void KexiRelationWidget::connectionContextMenuRequest(const TQPoint& pos)
{
- invalidateActions();
+ tqinvalidateActions();
executePopup( pos );
// m_connectionPopup->exec(pos);
}
-void KexiRelationWidget::emptyAreaContextMenuRequest( const QPoint& /*pos*/ )
+void KexiRelationWidget::emptyAreaContextMenuRequest( const TQPoint& /*pos*/ )
{
- invalidateActions();
+ tqinvalidateActions();
//TODO
}
-void KexiRelationWidget::invalidateActions()
+void KexiRelationWidget::tqinvalidateActions()
{
setAvailable("edit_delete", m_relationView->selectedConnection() || m_relationView->focusedTableView());
}
-void KexiRelationWidget::executePopup( QPoint pos )
+void KexiRelationWidget::executePopup( TQPoint pos )
{
- if (pos==QPoint(-1,-1)) {
+ if (pos==TQPoint(-1,-1)) {
pos = mapToGlobal(
m_relationView->focusedTableView() ? m_relationView->focusedTableView()->pos() + m_relationView->focusedTableView()->rect().center() : rect().center() );
}
@@ -302,14 +302,14 @@ void KexiRelationWidget::designSelectedTable()
Kexi::DesignViewMode, openingCancelled);
}
-QSize KexiRelationWidget::sizeHint() const
+TQSize KexiRelationWidget::tqsizeHint() const
{
- return m_relationView->sizeHint();
+ return m_relationView->tqsizeHint();
}
void KexiRelationWidget::slotTableHidden(KexiDB::TableSchema &table)
{
- const QString &t = table.name().lower();
+ const TQString &t = table.name().lower();
int i;
for (i=0; i<m_tableCombo->count() && t > m_tableCombo->text(i).lower(); i++)
;
@@ -328,7 +328,7 @@ void KexiRelationWidget::aboutToShowPopupMenu()
/*! @todo what about query? */
if (m_relationView->focusedTableView() && m_relationView->focusedTableView()->schema()->table()) {
m_tableQueryPopup->changeTitle(m_tableQueryPopupTitleID, SmallIcon("table"),
- QString(m_relationView->focusedTableView()->schema()->name()) + " : " + i18n("Table"));
+ TQString(m_relationView->focusedTableView()->schema()->name()) + " : " + i18n("Table"));
}
else if (m_relationView->selectedConnection()) {
m_connectionPopup->changeTitle( m_connectionPopupTitleID,
@@ -337,12 +337,12 @@ void KexiRelationWidget::aboutToShowPopupMenu()
}
void
-KexiRelationWidget::slotTableFieldDoubleClicked(QListViewItem *i,const QPoint&,int)
+KexiRelationWidget::slotTableFieldDoubleClicked(TQListViewItem *i,const TQPoint&,int)
{
- if (!sender()->isA("KexiRelationViewTable"))
+ if (!TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->isA("KexiRelationViewTable"))
return;
- const KexiRelationViewTable* t = static_cast<const KexiRelationViewTable*>(sender());
- const QStringList selectedFieldNames( t->selectedFieldNames() );
+ const KexiRelationViewTable* t = static_cast<const KexiRelationViewTable*>(TQT_TQWIDGET(const_cast<TQT_BASE_OBJECT_NAME*>(sender())));
+ const TQStringList selectedFieldNames( t->selectedFieldNames() );
if (selectedFieldNames.count()==1)
emit tableFieldDoubleClicked( t->schema()->table(), selectedFieldNames.first() );
}
@@ -364,26 +364,26 @@ void
KexiRelationWidget::fillTablesCombo()
{
m_tableCombo->clear();
- QStringList tmp = m_conn->tableNames();
+ TQStringList tmp = m_conn->tableNames();
tmp.sort();
m_tableCombo->insertStringList(tmp);
}
void
-KexiRelationWidget::objectCreated(const QCString &mime, const QCString& name)
+KexiRelationWidget::objectCreated(const TQCString &mime, const TQCString& name)
{
if (mime=="kexi/table" || mime=="kexi/query") {
//! @todo query?
- m_tableCombo->insertItem(QString(name));
+ m_tableCombo->insertItem(TQString(name));
m_tableCombo->listBox()->sort();
}
}
void
-KexiRelationWidget::objectDeleted(const QCString &mime, const QCString& name)
+KexiRelationWidget::objectDeleted(const TQCString &mime, const TQCString& name)
{
if (mime=="kexi/table" || mime=="kexi/query") {
- QString strName(name);
+ TQString strName(name);
for (int i=0; i<m_tableCombo->count(); i++) {
//! @todo query?
if (m_tableCombo->text(i)==strName) {
@@ -401,14 +401,14 @@ KexiRelationWidget::objectDeleted(const QCString &mime, const QCString& name)
}
void
-KexiRelationWidget::objectRenamed(const QCString &mime, const QCString& name, const QCString& newName)
+KexiRelationWidget::objectRenamed(const TQCString &mime, const TQCString& name, const TQCString& newName)
{
if (mime=="kexi/table" || mime=="kexi/query") {
- QString strName(name);
+ TQString strName(name);
for (int i=0; i<m_tableCombo->count(); i++) {
//! @todo query?
if (m_tableCombo->text(i)==strName) {
- m_tableCombo->changeItem(QString(newName), i);
+ m_tableCombo->changeItem(TQString(newName), i);
m_tableCombo->listBox()->sort();
break;
}
diff --git a/kexi/widget/relations/kexirelationwidget.h b/kexi/widget/relations/kexirelationwidget.h
index 3beb0b349..869dbf112 100644
--- a/kexi/widget/relations/kexirelationwidget.h
+++ b/kexi/widget/relations/kexirelationwidget.h
@@ -21,7 +21,7 @@
#ifndef KEXIRELATIONWIDGET_H
#define KEXIRELATIONWIDGET_H
-//#include <qwidget.h>
+//#include <tqwidget.h>
//#include "kexiactionproxy.h"
#include "kexiviewbase.h"
#include "kexirelationview.h"
@@ -30,7 +30,7 @@ class KComboBox;
class KPushButton;
class KPopupMenu;
class KAction;
-class QListViewItem;
+class TQListViewItem;
class KexiMainWindow;
@@ -44,40 +44,41 @@ namespace KexiDB
class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget : public KexiViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRelationWidget(KexiMainWindow *win, QWidget *parent, const char *name=0);
+ KexiRelationWidget(KexiMainWindow *win, TQWidget *tqparent, const char *name=0);
virtual ~KexiRelationWidget();
//! \return a dictionary of added tables
TablesDict* tables() const;
- KexiRelationViewTableContainer* table(const QString& name) const;
+ KexiRelationViewTableContainer* table(const TQString& name) const;
const ConnectionList* connections() const;
// KexiRelationView *relationView() const { return m_relationView; }
- void addTable(const QString& t);
+ void addTable(const TQString& t);
// void openTable(KexiDB::TableSchema* table, bool designMode);
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
/*! Used to add newly created object information to the combo box. */
- void objectCreated(const QCString &mime, const QCString& name);
- void objectDeleted(const QCString &mime, const QCString& name);
- void objectRenamed(const QCString &mime, const QCString& name, const QCString& newName);
+ void objectCreated(const TQCString &mime, const TQCString& name);
+ void objectDeleted(const TQCString &mime, const TQCString& name);
+ void objectRenamed(const TQCString &mime, const TQCString& name, const TQCString& newName);
signals:
void tableAdded(KexiDB::TableSchema& t);
void tableHidden(KexiDB::TableSchema& t);
void tablePositionChanged(KexiRelationViewTableContainer*);
void aboutConnectionRemove(KexiRelationViewConnection*);
- void tableFieldDoubleClicked( KexiDB::TableSchema* table, const QString& fieldName );
+ void tableFieldDoubleClicked( KexiDB::TableSchema* table, const TQString& fieldName );
public slots:
/*! Adds a table \a t to the area. This changes only visual representation.
- If \a rect is valid, table widget rgeometry will be initialized.
+ If \a rect is valid, table widget rtqgeometry will be initialized.
*/
- void addTable(KexiDB::TableSchema *t, const QRect &rect = QRect());
+ void addTable(KexiDB::TableSchema *t, const TQRect &rect = TQRect());
//! Adds a connection \a con to the area. This changes only visual representation.
void addConnection(const SourceConnection& conn);
@@ -98,23 +99,23 @@ class KEXIRELATIONSVIEW_EXPORT KexiRelationWidget : public KexiViewBase
void tableViewGotFocus();
void connectionViewGotFocus();
void emptyAreaGotFocus();
- void tableContextMenuRequest(const QPoint& pos);
- void connectionContextMenuRequest(const QPoint& pos);
- void emptyAreaContextMenuRequest( const QPoint& pos );
+ void tableContextMenuRequest(const TQPoint& pos);
+ void connectionContextMenuRequest(const TQPoint& pos);
+ void emptyAreaContextMenuRequest( const TQPoint& pos );
void openSelectedTable();
void designSelectedTable();
void slotTableHidden(KexiDB::TableSchema &table);
void aboutToShowPopupMenu();
- void slotTableFieldDoubleClicked(QListViewItem *i,const QPoint&,int);
+ void slotTableFieldDoubleClicked(TQListViewItem *i,const TQPoint&,int);
protected:
/*! executes popup menu at \a pos, or,
if \a pos not specified: at center of selected table view (if any selected),
or at center point of the relations view. */
- void executePopup( QPoint pos = QPoint(-1,-1) );
+ void executePopup( TQPoint pos = TQPoint(-1,-1) );
//! Invalidates all actions availability.
- void invalidateActions();
+ void tqinvalidateActions();
//! Fills table's combo box with all available table names.
void fillTablesCombo();
diff --git a/kexi/widget/tableview/kexiblobtableedit.cpp b/kexi/widget/tableview/kexiblobtableedit.cpp
index db0799a4e..0d19981a1 100644
--- a/kexi/widget/tableview/kexiblobtableedit.cpp
+++ b/kexi/widget/tableview/kexiblobtableedit.cpp
@@ -22,20 +22,20 @@
#include <stdlib.h>
-#include <qdatastream.h>
-#include <qfile.h>
-#include <qpopupmenu.h>
-#include <qtextedit.h>
-#include <qlayout.h>
-#include <qstatusbar.h>
-#include <qlabel.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qbuffer.h>
+#include <tqdatastream.h>
+#include <tqfile.h>
+#include <tqpopupmenu.h>
+#include <tqtextedit.h>
+#include <tqlayout.h>
+#include <tqstatusbar.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -70,9 +70,9 @@ public:
{
}
- QByteArray value;
+ TQByteArray value;
KexiDropDownButton *button;
- QSize totalSize;
+ TQSize totalSize;
KexiImageContextMenu *popup;
bool readOnly : 1; //!< cached for slotUpdateActionsAvailabilityRequested()
bool setValueInternalEnabled : 1; //!< used to disable KexiBlobTableEdit::setValueInternal()
@@ -80,17 +80,17 @@ public:
//======================================================
-KexiBlobTableEdit::KexiBlobTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiTableEdit(column, parent)
+KexiBlobTableEdit::KexiBlobTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiTableEdit(column, tqparent)
, d ( new Private() )
{
setName("KexiBlobTableEdit");
// m_proc = 0;
// m_content = 0;
m_hasFocusableWidget = false;
- d->button = new KexiDropDownButton( parentWidget() /*usually a viewport*/ );
+ d->button = new KexiDropDownButton( tqparentWidget() /*usually a viewport*/ );
d->button->hide();
- QToolTip::add(d->button, i18n("Click to show available actions for this cell"));
+ TQToolTip::add(d->button, i18n("Click to show available actions for this cell"));
d->popup = new KexiImageContextMenu(this);
d->popup->installEventFilter(this);
@@ -101,25 +101,25 @@ KexiBlobTableEdit::KexiBlobTableEdit(KexiTableViewColumn &column, QWidget *paren
d->button->setPopup( d->popup );
//force edit requested to start editing... (this will call slotUpdateActionsAvailabilityRequested())
- //connect(d->popup, SIGNAL(aboutToShow()), this, SIGNAL(editRequested()));
-
- connect(d->popup, SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
- this, SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
-
- connect(d->popup, SIGNAL(insertFromFileRequested(const KURL&)),
- this, SLOT(handleInsertFromFileAction(const KURL&)));
- connect(d->popup, SIGNAL(saveAsRequested(const QString&)),
- this, SLOT(handleSaveAsAction(const QString&)));
- connect(d->popup, SIGNAL(cutRequested()),
- this, SLOT(handleCutAction()));
- connect(d->popup, SIGNAL(copyRequested()),
- this, SLOT(handleCopyAction()));
- connect(d->popup, SIGNAL(pasteRequested()),
- this, SLOT(handlePasteAction()));
- connect(d->popup, SIGNAL(clearRequested()),
- this, SLOT(clear()));
- connect(d->popup, SIGNAL(showPropertiesRequested()),
- this, SLOT(handleShowPropertiesAction()));
+ //connect(d->popup, TQT_SIGNAL(aboutToShow()), this, TQT_SIGNAL(editRequested()));
+
+ connect(d->popup, TQT_SIGNAL(updateActionsAvailabilityRequested(bool&, bool&)),
+ this, TQT_SLOT(slotUpdateActionsAvailabilityRequested(bool&, bool&)));
+
+ connect(d->popup, TQT_SIGNAL(insertFromFileRequested(const KURL&)),
+ this, TQT_SLOT(handleInsertFromFileAction(const KURL&)));
+ connect(d->popup, TQT_SIGNAL(saveAsRequested(const TQString&)),
+ this, TQT_SLOT(handleSaveAsAction(const TQString&)));
+ connect(d->popup, TQT_SIGNAL(cutRequested()),
+ this, TQT_SLOT(handleCutAction()));
+ connect(d->popup, TQT_SIGNAL(copyRequested()),
+ this, TQT_SLOT(handleCopyAction()));
+ connect(d->popup, TQT_SIGNAL(pasteRequested()),
+ this, TQT_SLOT(handlePasteAction()));
+ connect(d->popup, TQT_SIGNAL(clearRequested()),
+ this, TQT_SLOT(clear()));
+ connect(d->popup, TQT_SIGNAL(showPropertiesRequested()),
+ this, TQT_SLOT(handleShowPropertiesAction()));
}
KexiBlobTableEdit::~KexiBlobTableEdit()
@@ -138,17 +138,17 @@ KexiBlobTableEdit::~KexiBlobTableEdit()
}
//! initializes this editor with \a add value
-void KexiBlobTableEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiBlobTableEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
if (!d->setValueInternalEnabled)
return;
if (removeOld)
d->value = add.toByteArray();
- else //do not add "m_origValue" to "add" as this is QByteArray
+ else //do not add "m_origValue" to "add" as this is TQByteArray
d->value = m_origValue.toByteArray();
#if 0 //todo?
- QByteArray val = m_origValue.toByteArray();
+ TQByteArray val = m_origValue.toByteArray();
kdDebug() << "KexiBlobTableEdit: Size of BLOB: " << val.size() << endl;
m_tempFile = new KTempFile();
m_tempFile->setAutoDelete(true);
@@ -161,7 +161,7 @@ void KexiBlobTableEdit::setValueInternal(const QVariant& add, bool removeOld)
KMimeMagicResult* mmr = KMimeMagic::self()->findFileType(m_tempFile->name());
kdDebug() << "KexiBlobTableEdit: Mimetype = " << mmr->mimeType() << endl;
- setViewWidget( new QWidget(this) );
+ setViewWidget( new TQWidget(this) );
#endif
}
@@ -178,7 +178,7 @@ bool KexiBlobTableEdit::valueIsEmpty()
return d->value.isEmpty();
}
-QVariant
+TQVariant
KexiBlobTableEdit::value()
{
return d->value;
@@ -188,23 +188,23 @@ KexiBlobTableEdit::value()
if(m_content && m_content->isModified())
{
- return QVariant(m_content->text());
+ return TQVariant(m_content->text());
}
- QByteArray value;
- QFile f( m_tempFile->name() );
+ TQByteArray value;
+ TQFile f( m_tempFile->name() );
f.open(IO_ReadOnly);
- QDataStream stream(&f);
+ TQDataStream stream(&f);
char* data = (char*) malloc(f.size());
value.resize(f.size());
stream.readRawBytes(data, f.size());
value.duplicate(data, f.size());
free(data);
kdDebug() << "KexiBlobTableEdit: Size of BLOB: " << value.size() << endl;
- return QVariant(value);
+ return TQVariant(value);
#endif
}
-void KexiBlobTableEdit::paintFocusBorders( QPainter *p, QVariant &, int x, int y, int w, int h )
+void KexiBlobTableEdit::paintFocusBorders( TQPainter *p, TQVariant &, int x, int y, int w, int h )
{
// d->currentEditorWidth = w;
if (!d->readOnly && w > d->button->width())
@@ -213,21 +213,21 @@ void KexiBlobTableEdit::paintFocusBorders( QPainter *p, QVariant &, int x, int y
}
void
-KexiBlobTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+KexiBlobTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
Q_UNUSED(focused);
Q_UNUSED(txt);
Q_UNUSED(align);
//! @todo optimize: load to m_pixmap, downsize
- QPixmap pixmap;
+ TQPixmap pixmap;
x = 0;
w -= 1; //a place for border
h -= 1; //a place for border
- if (p && val.canCast(QVariant::ByteArray) && pixmap.loadFromData(val.toByteArray())) {
- KexiUtils::drawPixmap( *p, 0/*lineWidth*/, QRect(x, y_offset, w, h),
- pixmap, Qt::AlignCenter, true/*scaledContents*/, true/*keepAspectRatio*/);
+ if (p && val.canCast(TQVariant::ByteArray) && pixmap.loadFromData(val.toByteArray())) {
+ KexiUtils::drawPixmap( *p, 0/*lineWidth*/, TQRect(x, y_offset, w, h),
+ pixmap, TQt::AlignCenter, true/*scaledContents*/, true/*keepAspectRatio*/);
}
}
@@ -246,15 +246,15 @@ void KexiBlobTableEdit::handleInsertFromFileAction(const KURL& url)
if (isReadOnly())
return;
- QString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
+ TQString fileName( url.isLocalFile() ? url.path() : url.prettyURL() );
//! @todo download the file if remote, then set fileName properly
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_ReadOnly)) {
//! @todo err msg
return;
}
- QByteArray ba = f.readAll();
+ TQByteArray ba = f.readAll();
if (f.status()!=IO_Ok) {
//! @todo err msg
f.close();
@@ -267,7 +267,7 @@ void KexiBlobTableEdit::handleInsertFromFileAction(const KURL& url)
//emit acceptRequested();
}
-void KexiBlobTableEdit::handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty)
+void KexiBlobTableEdit::handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty)
{
Q_UNUSED(origFilename);
Q_UNUSED(fileExtension);
@@ -275,9 +275,9 @@ void KexiBlobTableEdit::handleAboutToSaveAsAction(QString& origFilename, QString
//! @todo no fname stored for now
}
-void KexiBlobTableEdit::handleSaveAsAction(const QString& fileName)
+void KexiBlobTableEdit::handleSaveAsAction(const TQString& fileName)
{
- QFile f(fileName);
+ TQFile f(fileName);
if (!f.open(IO_WriteOnly)) {
//! @todo err msg
return;
@@ -304,39 +304,39 @@ void KexiBlobTableEdit::handleCopyAction()
executeCopyAction(d->value);
}
-void KexiBlobTableEdit::executeCopyAction(const QByteArray& data)
+void KexiBlobTableEdit::executeCopyAction(const TQByteArray& data)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!pixmap.loadFromData(data))
return;
- qApp->clipboard()->setPixmap(pixmap, QClipboard::Clipboard);
+ tqApp->tqclipboard()->setPixmap(pixmap, TQClipboard::Clipboard);
}
void KexiBlobTableEdit::handlePasteAction()
{
if (isReadOnly())
return;
- QPixmap pm( qApp->clipboard()->pixmap(QClipboard::Clipboard) );
- QByteArray ba;
- QBuffer buffer( ba );
+ TQPixmap pm( tqApp->tqclipboard()->pixmap(TQClipboard::Clipboard) );
+ TQByteArray ba;
+ TQBuffer buffer( ba );
buffer.open( IO_WriteOnly );
if (pm.save( &buffer, "PNG" )) {// write pixmap into ba in PNG format
setValueInternal( ba, true );
}
else {
- setValueInternal( QByteArray(), true );
+ setValueInternal( TQByteArray(), true );
}
signalEditRequested();
//emit acceptRequested();
- repaintRelatedCell();
+ tqrepaintRelatedCell();
}
void KexiBlobTableEdit::clear()
{
- setValueInternal( QByteArray(), true );
+ setValueInternal( TQByteArray(), true );
signalEditRequested();
//emit acceptRequested();
- repaintRelatedCell();
+ tqrepaintRelatedCell();
}
void KexiBlobTableEdit::handleShowPropertiesAction()
@@ -344,7 +344,7 @@ void KexiBlobTableEdit::handleShowPropertiesAction()
//! @todo
}
-void KexiBlobTableEdit::showFocus( const QRect& r, bool readOnly )
+void KexiBlobTableEdit::showFocus( const TQRect& r, bool readOnly )
{
d->readOnly = readOnly; //cache for slotUpdateActionsAvailabilityRequested()
// d->button->move( pos().x()+ width(), pos().y() );
@@ -358,13 +358,13 @@ void KexiBlobTableEdit::showFocus( const QRect& r, bool readOnly )
void KexiBlobTableEdit::resize(int w, int h)
{
- d->totalSize = QSize(w,h);
+ d->totalSize = TQSize(w,h);
const int addWidth = d->readOnly ? 0 : d->button->width();
- QWidget::resize(w - addWidth, h);
+ TQWidget::resize(w - addWidth, h);
if (!d->readOnly)
d->button->resize( h, h );
m_rightMarginWhenFocused = m_rightMargin + addWidth;
- QRect r( pos().x(), pos().y(), w+1, h+1 );
+ TQRect r( pos().x(), pos().y(), w+1, h+1 );
r.moveBy(m_scrollView->contentsX(),m_scrollView->contentsY());
updateFocus( r );
//todo if (d->popup) {
@@ -372,7 +372,7 @@ void KexiBlobTableEdit::resize(int w, int h)
//todo }
}
-void KexiBlobTableEdit::updateFocus( const QRect& r )
+void KexiBlobTableEdit::updateFocus( const TQRect& r )
{
if (!d->readOnly) {
if (d->button->width() > r.width())
@@ -387,7 +387,7 @@ void KexiBlobTableEdit::hideFocus()
d->button->hide();
}
-QSize KexiBlobTableEdit::totalSize() const
+TQSize KexiBlobTableEdit::totalSize() const
{
return d->totalSize;
}
@@ -406,20 +406,20 @@ void KexiBlobTableEdit::signalEditRequested()
d->setValueInternalEnabled = true;
}
-bool KexiBlobTableEdit::handleKeyPress( QKeyEvent* ke, bool editorActive )
+bool KexiBlobTableEdit::handleKeyPress( TQKeyEvent* ke, bool editorActive )
{
Q_UNUSED(editorActive);
const int k = ke->key();
KKey kkey(ke);
if (!d->readOnly) {
- if ((ke->state()==Qt::NoButton && k==Qt::Key_F4)
- || (ke->state()==Qt::AltButton && k==Qt::Key_Down)) {
+ if ((ke->state()==Qt::NoButton && k==TQt::Key_F4)
+ || (ke->state()==TQt::AltButton && k==TQt::Key_Down)) {
d->button->animateClick();
- QMouseEvent me( QEvent::MouseButtonPress, QPoint(2,2), Qt::LeftButton, Qt::NoButton );
- QApplication::sendEvent( d->button, &me );
+ TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), Qt::LeftButton, Qt::NoButton );
+ TQApplication::sendEvent( d->button, &me );
}
- else if ((ke->state()==NoButton && (k==Qt::Key_F2 || k==Qt::Key_Space || k==Qt::Key_Enter || k==Qt::Key_Return))) {
+ else if ((ke->state()==Qt::NoButton && (k==TQt::Key_F2 || k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return))) {
d->popup->insertFromFile();
}
else
@@ -436,13 +436,13 @@ bool KexiBlobTableEdit::handleDoubleClick()
return true;
}
-void KexiBlobTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiBlobTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
executeCopyAction(value.toByteArray());
}
-void KexiBlobTableEdit::handleAction(const QString& actionName)
+void KexiBlobTableEdit::handleAction(const TQString& actionName)
{
if (actionName=="edit_paste") {
d->popup->paste();
@@ -453,18 +453,18 @@ void KexiBlobTableEdit::handleAction(const QString& actionName)
}
}
-bool KexiBlobTableEdit::eventFilter( QObject *o, QEvent *e )
+bool KexiBlobTableEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if (o == d->popup && e->type()==QEvent::KeyPress) {
- QKeyEvent* ke = static_cast<QKeyEvent*>(e);
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(d->popup) && e->type()==TQEvent::KeyPress) {
+ TQKeyEvent* ke = TQT_TQKEYEVENT(e);
const int state = ke->state();
const int k = ke->key();
- if ( (state==Qt::NoButton && (k==Qt::Key_Tab || k==Qt::Key_Left || k==Qt::Key_Right))
- || (state==Qt::ShiftButton && k==Qt::Key_Backtab)
+ if ( (state==Qt::NoButton && (k==TQt::Key_Tab || k==TQt::Key_Left || k==TQt::Key_Right))
+ || (state==TQt::ShiftButton && k==TQt::Key_Backtab)
)
{
d->popup->hide();
- QApplication::sendEvent( this, ke ); //re-send to move cursor
+ TQApplication::sendEvent( this, ke ); //re-send to move cursor
return true;
}
}
@@ -485,13 +485,13 @@ public:
{
}
//! We've no editor widget that would store current value, so we do this here
- QVariant currentValue;
+ TQVariant currentValue;
- QCache<QPixmap> pixmapCache;
+ TQCache<TQPixmap> pixmapCache;
};
-KexiKIconTableEdit::KexiKIconTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiTableEdit(column, parent)
+KexiKIconTableEdit::KexiKIconTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiTableEdit(column, tqparent)
, d( new Private() )
{
setName("KexiKIconTableEdit");
@@ -509,7 +509,7 @@ void KexiKIconTableEdit::init()
d->pixmapCache.setAutoDelete(true);
}
-void KexiKIconTableEdit::setValueInternal(const QVariant& /*add*/, bool /*removeOld*/)
+void KexiKIconTableEdit::setValueInternal(const TQVariant& /*add*/, bool /*removeOld*/)
{
d->currentValue = m_origValue;
}
@@ -524,14 +524,14 @@ bool KexiKIconTableEdit::valueIsEmpty()
return d->currentValue.isNull();
}
-QVariant KexiKIconTableEdit::value()
+TQVariant KexiKIconTableEdit::value()
{
return d->currentValue;
}
void KexiKIconTableEdit::clear()
{
- d->currentValue = QVariant();
+ d->currentValue = TQVariant();
}
bool KexiKIconTableEdit::cursorAtStart()
@@ -544,22 +544,22 @@ bool KexiKIconTableEdit::cursorAtEnd()
return true;
}
-void KexiKIconTableEdit::setupContents( QPainter *p, bool /*focused*/, const QVariant& val,
- QString &/*txt*/, int &/*align*/, int &/*x*/, int &y_offset, int &w, int &h )
+void KexiKIconTableEdit::setupContents( TQPainter *p, bool /*focused*/, const TQVariant& val,
+ TQString &/*txt*/, int &/*align*/, int &/*x*/, int &y_offset, int &w, int &h )
{
Q_UNUSED( y_offset );
#if 0
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
y_offset = -1;
#else
y_offset = 0;
#endif
- int s = QMAX(h - 5, 12);
- s = QMIN( h-3, s );
- s = QMIN( w-3, s );//avoid too large box
- QRect r( QMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s);
- p->setPen(QPen(colorGroup().text(), 1));
+ int s = TQMAX(h - 5, 12);
+ s = TQMIN( h-3, s );
+ s = TQMIN( w-3, s );//avoid too large box
+ TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s);
+ p->setPen(TQPen(tqcolorGroup().text(), 1));
p->drawRect(r);
if (val.asBool()) {
p->drawLine(r.x(), r.y(), r.right(), r.bottom());
@@ -567,14 +567,14 @@ void KexiKIconTableEdit::setupContents( QPainter *p, bool /*focused*/, const QVa
}
#endif
- QString key = val.toString();
- QPixmap *pix = 0;
+ TQString key = val.toString();
+ TQPixmap *pix = 0;
if (!key.isEmpty() && !(pix = d->pixmapCache[ key ])) {
//cache pixmap
- QPixmap pm = KGlobal::iconLoader()->loadIcon( key, KIcon::Small,
+ TQPixmap pm = KGlobal::iconLoader()->loadIcon( key, KIcon::Small,
0, KIcon::DefaultState, 0L, true/*canReturnNull*/ );
if (!pm.isNull()) {
- pix = new QPixmap(pm);
+ pix = new TQPixmap(pm);
d->pixmapCache.insert(key, pix);
}
}
@@ -584,7 +584,7 @@ void KexiKIconTableEdit::setupContents( QPainter *p, bool /*focused*/, const QVa
}
}
-void KexiKIconTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiKIconTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(value);
Q_UNUSED(visibleValue);
diff --git a/kexi/widget/tableview/kexiblobtableedit.h b/kexi/widget/tableview/kexiblobtableedit.h
index a44559be5..fb64c21d0 100644
--- a/kexi/widget/tableview/kexiblobtableedit.h
+++ b/kexi/widget/tableview/kexiblobtableedit.h
@@ -21,8 +21,8 @@
#ifndef _KEXIBLOBTABLEEDIT_H_
#define _KEXIBLOBTABLEEDIT_H_
-#include <qcstring.h>
-#include <qcache.h>
+#include <tqcstring.h>
+#include <tqcache.h>
#include <kurl.h>
@@ -31,19 +31,20 @@
class KTempFile;
class KProcess;
-class QTextEdit;
+class TQTextEdit;
class KexiBlobTableEdit : public KexiTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiBlobTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiBlobTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiBlobTableEdit();
bool valueIsNull();
bool valueIsEmpty();
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
@@ -51,17 +52,17 @@ class KexiBlobTableEdit : public KexiTableEdit
/*! Reimplemented: resizes a view(). */
virtual void resize(int w, int h);
- virtual void showFocus( const QRect& r, bool readOnly );
+ virtual void showFocus( const TQRect& r, bool readOnly );
virtual void hideFocus();
/*! \return total size of this editor, including popup button. */
- virtual QSize totalSize() const;
+ virtual TQSize totalSize() const;
- virtual void paintFocusBorders( QPainter *p, QVariant &, int x, int y, int w, int h );
+ virtual void paintFocusBorders( TQPainter *p, TQVariant &, int x, int y, int w, int h );
/*! Reimplemented to handle the key events. */
- virtual bool handleKeyPress( QKeyEvent* ke, bool editorActive );
+ virtual bool handleKeyPress( TQKeyEvent* ke, bool editorActive );
/*! Handles double click request coming from the table view.
\return true if it has been consumed.
@@ -70,22 +71,22 @@ class KexiBlobTableEdit : public KexiTableEdit
/*! Handles action having standard name \a actionName.
Action could be: "edit_cut", "edit_paste", etc. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Handles copy action for value. The \a value is copied to clipboard in format appropriate
for the editor's impementation, e.g. for image cell it can be a pixmap.
\a visibleValue is unused here. Reimplemented after KexiTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
protected slots:
void slotUpdateActionsAvailabilityRequested(bool& valueIsNull, bool& valueIsReadOnly);
void handleInsertFromFileAction(const KURL& url);
- void handleAboutToSaveAsAction(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
- void handleSaveAsAction(const QString& fileName);
+ void handleAboutToSaveAsAction(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty);
+ void handleSaveAsAction(const TQString& fileName);
void handleCutAction();
void handleCopyAction();
void handlePasteAction();
@@ -94,26 +95,26 @@ class KexiBlobTableEdit : public KexiTableEdit
protected:
//! initializes this editor with \a add value
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
- //todo QString openWithDlg(const QString& file);
- //todo void execute(const QString& app, const QString& file);
+ //todo TQString openWithDlg(const TQString& file);
+ //todo void execute(const TQString& app, const TQString& file);
//! @internal
- void updateFocus( const QRect& r );
+ void updateFocus( const TQRect& r );
void signalEditRequested();
//! @internal
- void executeCopyAction(const QByteArray& data);
+ void executeCopyAction(const TQByteArray& data);
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
class Private;
Private *d;
//todo KTempFile* m_tempFile;
//todo KProcess* m_proc;
-//todo QTextEdit *m_content;
+//todo TQTextEdit *m_content;
};
KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiBlobEditorFactoryItem)
@@ -128,7 +129,7 @@ KEXI_DECLARE_CELLEDITOR_FACTORY_ITEM(KexiBlobEditorFactoryItem)
class KexiKIconTableEdit : public KexiTableEdit
{
public:
- KexiKIconTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiKIconTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiKIconTableEdit();
@@ -140,23 +141,23 @@ class KexiKIconTableEdit : public KexiTableEdit
//! (check this with KexiDB::Field::hasEmptyProperty()),
virtual bool valueIsEmpty();
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
virtual void clear();
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
/*! Handles copy action for value. Does nothing.
\a visibleValue is unused here. Reimplemented after KexiTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
protected:
//! initializes this editor with \a add value
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
void showHintButton();
void init();
diff --git a/kexi/widget/tableview/kexibooltableedit.cpp b/kexi/widget/tableview/kexibooltableedit.cpp
index 7b7bc0aca..e85d0c73e 100644
--- a/kexi/widget/tableview/kexibooltableedit.cpp
+++ b/kexi/widget/tableview/kexibooltableedit.cpp
@@ -21,9 +21,9 @@
#include <kexidb/field.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include <kglobal.h>
#include <klocale.h>
@@ -31,8 +31,8 @@
#include <kglobalsettings.h>
-KexiBoolTableEdit::KexiBoolTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiTableEdit(column, parent)
+KexiBoolTableEdit::KexiBoolTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiTableEdit(column, tqparent)
{
setName("KexiBoolTableEdit");
kdDebug() << "KexiBoolTableEdit: m_origValue.typeName()==" << m_origValue.typeName() << endl;
@@ -46,7 +46,7 @@ KexiBoolTableEdit::~KexiBoolTableEdit()
{
}
-void KexiBoolTableEdit::setValueInternal(const QVariant& /*add*/, bool /*removeOld*/)
+void KexiBoolTableEdit::setValueInternal(const TQVariant& /*add*/, bool /*removeOld*/)
{
m_currentValue = m_origValue;
//nothing to do more...
@@ -62,7 +62,7 @@ bool KexiBoolTableEdit::valueIsEmpty()
return m_currentValue.isNull();
}
-QVariant KexiBoolTableEdit::value()
+TQVariant KexiBoolTableEdit::value()
{
// ok = true;
return m_currentValue;
@@ -71,9 +71,9 @@ QVariant KexiBoolTableEdit::value()
void KexiBoolTableEdit::clear()
{
if (field()->isNotNull())
- m_currentValue = QVariant(false, 0);
+ m_currentValue = TQVariant(false, 0);
else
- m_currentValue = QVariant();
+ m_currentValue = TQVariant();
}
bool KexiBoolTableEdit::cursorAtStart()
@@ -86,14 +86,14 @@ bool KexiBoolTableEdit::cursorAtEnd()
return true;
}
-void KexiBoolTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+void KexiBoolTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
Q_UNUSED(focused);
Q_UNUSED(txt);
Q_UNUSED(align);
Q_UNUSED(x);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
// x = 1;
y_offset = -1;
#else
@@ -101,14 +101,14 @@ void KexiBoolTableEdit::setupContents( QPainter *p, bool focused, const QVariant
y_offset = 0;
#endif
if (p) {
- int s = QMAX(h - 5, 12);
- s = QMIN( h-3, s );
- s = QMIN( w-3, s );//avoid too large box
- QRect r( QMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s);
-//already set ouotside: p->setPen(QPen(colorGroup().text(), 1));
+ int s = TQMAX(h - 5, 12);
+ s = TQMIN( h-3, s );
+ s = TQMIN( w-3, s );//avoid too large box
+ TQRect r( TQMAX( w/2 - s/2, 0 ) , h/2 - s/2 /*- 1*/, s, s);
+//already set ouotside: p->setPen(TQPen(tqcolorGroup().text(), 1));
p->drawRect(r);
if (val.isNull()) { // && !field()->isNotNull()) {
- p->drawText( r, Qt::AlignCenter, "?" );
+ p->drawText( r, TQt::AlignCenter, "?" );
}
else if (val.toBool()) {
p->drawLine(r.x(), r.y(), r.right(), r.bottom());
@@ -120,53 +120,53 @@ void KexiBoolTableEdit::setupContents( QPainter *p, bool focused, const QVariant
void KexiBoolTableEdit::clickedOnContents()
{
if (field()->isNotNull())
- m_currentValue = QVariant( !m_currentValue.toBool(), 0 );
+ m_currentValue = TQVariant( !m_currentValue.toBool(), 0 );
else {
// null allowed: use the cycle: true -> false -> null
if (m_currentValue.isNull())
- m_currentValue = QVariant( true, 1 );
+ m_currentValue = TQVariant( true, 1 );
else
- m_currentValue = m_currentValue.toBool() ? QVariant( false, 1 ) : QVariant();
+ m_currentValue = m_currentValue.toBool() ? TQVariant( false, 1 ) : TQVariant();
}
}
-void KexiBoolTableEdit::handleAction(const QString& actionName)
+void KexiBoolTableEdit::handleAction(const TQString& actionName)
{
if (actionName=="edit_paste") {
emit editRequested();
bool ok;
- const int value = qApp->clipboard()->text( QClipboard::Clipboard ).toInt(&ok);
+ const int value = tqApp->tqclipboard()->text( TQClipboard::Clipboard ).toInt(&ok);
if (ok) {
- m_currentValue = (value==0) ? QVariant(false, 0) : QVariant(true, 1);
+ m_currentValue = (value==0) ? TQVariant(false, 0) : TQVariant(true, 1);
}
else {
m_currentValue = field()->isNotNull()
- ? QVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : QVariant();
+ ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
+ : TQVariant();
}
- repaintRelatedCell();
+ tqrepaintRelatedCell();
}
else if (actionName=="edit_cut") {
emit editRequested();
//! @todo handle defaultValue...
m_currentValue = field()->isNotNull()
- ? QVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
- : QVariant();
- handleCopyAction(m_origValue, QVariant());
- repaintRelatedCell();
+ ? TQVariant(0, false)/*0 instead of NULL - handle case when null is not allowed*/
+ : TQVariant();
+ handleCopyAction(m_origValue, TQVariant());
+ tqrepaintRelatedCell();
}
}
-void KexiBoolTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiBoolTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
- if (value.type()==QVariant::Bool)
- qApp->clipboard()->setText(value.toBool() ? "1" : "0");
+ if (value.type()==TQVariant::Bool)
+ tqApp->clipboard()->setText(value.toBool() ? "1" : "0");
else
- qApp->clipboard()->setText(QString::null);
+ tqApp->clipboard()->setText(TQString());
}
-int KexiBoolTableEdit::widthForValue( QVariant &val, const QFontMetrics &fm )
+int KexiBoolTableEdit::widthForValue( TQVariant &val, const TQFontMetrics &fm )
{
Q_UNUSED(fm);
return val.toPixmap().width();
diff --git a/kexi/widget/tableview/kexibooltableedit.h b/kexi/widget/tableview/kexibooltableedit.h
index 3320a573f..3fc87d587 100644
--- a/kexi/widget/tableview/kexibooltableedit.h
+++ b/kexi/widget/tableview/kexibooltableedit.h
@@ -20,7 +20,7 @@
#ifndef KEXIBOOLTABLEEDIT_H
#define KEXIBOOLTABLEEDIT_H
-#include <qvariant.h>
+#include <tqvariant.h>
#include "kexitableedit.h"
#include "kexicelleditorfactory.h"
@@ -30,9 +30,10 @@
class KexiBoolTableEdit : public KexiTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiBoolTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiBoolTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiBoolTableEdit();
@@ -44,39 +45,39 @@ class KexiBoolTableEdit : public KexiTableEdit
//! (check this with KexiDB::Field::hasEmptyProperty()),
virtual bool valueIsEmpty();
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
virtual void clear();
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
virtual void clickedOnContents();
/*! Handles action having standard name \a actionName.
Action could be: "edit_cut", "edit_paste", etc. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Handles copy action for value. Copies empty string for null, "1" for true, "0" for false.
\a visibleValue is unused here. Reimplemented after KexiTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
/*! \return width of \a value. Reimplemented after KexiTableEdit. */
- virtual int widthForValue( QVariant &val, const QFontMetrics &fm );
+ virtual int widthForValue( TQVariant &val, const TQFontMetrics &fm );
protected slots:
protected:
//! initializes this editor with \a add value
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
void showHintButton();
//! We've no editor widget that would store current value, so we do this here
- QVariant m_currentValue;
+ TQVariant m_currentValue;
signals:
void hintClicked();
diff --git a/kexi/widget/tableview/kexicelleditorfactory.cpp b/kexi/widget/tableview/kexicelleditorfactory.cpp
index a20eac071..e0e9ec038 100644
--- a/kexi/widget/tableview/kexicelleditorfactory.cpp
+++ b/kexi/widget/tableview/kexicelleditorfactory.cpp
@@ -19,8 +19,8 @@
#include "kexicelleditorfactory.h"
-#include <qptrdict.h>
-#include <qintdict.h>
+#include <tqptrdict.h>
+#include <tqintdict.h>
#include <kstaticdeleter.h>
#include <kexidb/indexschema.h>
@@ -60,15 +60,15 @@ class KexiCellEditorFactoryPrivate
}
~KexiCellEditorFactoryPrivate() {}
- QString key(uint type, const QString& subType) const
+ TQString key(uint type, const TQString& subType) const
{
- QString key = QString::number(type);
+ TQString key = TQString::number(type);
if (!subType.isEmpty())
- key += (QString(" ") + subType);
+ key += (TQString(" ") + subType);
return key;
}
- void registerItem( KexiCellEditorFactoryItem& item, uint type, const QString& subType = QString::null )
+ void registerItem( KexiCellEditorFactoryItem& item, uint type, const TQString& subType = TQString() )
{
if (!items[ &item ])
items.insert( &item, &item );
@@ -76,20 +76,20 @@ class KexiCellEditorFactoryPrivate
items_by_type.insert( key(type, subType), &item );
}
- KexiCellEditorFactoryItem *findItem(uint type, const QString& subType)
+ KexiCellEditorFactoryItem *findItem(uint type, const TQString& subType)
{
KexiCellEditorFactoryItem *item = items_by_type[ key(type, subType) ];
if (item)
return item;
- item = items_by_type[ key(type, QString::null) ];
+ item = items_by_type[ key(type, TQString()) ];
if (item)
return item;
- return items_by_type[ key( KexiDB::Field::InvalidType, QString::null ) ];
+ return items_by_type[ key( KexiDB::Field::InvalidType, TQString() ) ];
}
- QPtrDict<KexiCellEditorFactoryItem> items; //!< list of editor factory items (for later destroy)
+ TQPtrDict<KexiCellEditorFactoryItem> items; //!< list of editor factory items (for later destroy)
- QDict<KexiCellEditorFactoryItem> items_by_type; //!< editor factory items accessed by a key
+ TQDict<KexiCellEditorFactoryItem> items_by_type; //!< editor factory items accessed by a key
};
static KStaticDeleter<KexiCellEditorFactoryPrivate> KexiCellEditorFactory_deleter;
@@ -124,7 +124,7 @@ void KexiCellEditorFactory::init()
KexiCellEditorFactory_static->registerItem( *new KexiInputEditorFactoryItem(), KexiDB::Field::InvalidType );
}
-void KexiCellEditorFactory::registerItem( KexiCellEditorFactoryItem& item, uint type, const QString& subType )
+void KexiCellEditorFactory::registerItem( KexiCellEditorFactoryItem& item, uint type, const TQString& subType )
{
init();
KexiCellEditorFactory_static->registerItem( item, type, subType );
@@ -146,7 +146,7 @@ static bool hasEnumType( const KexiTableViewColumn &column )
return true;
}
-KexiTableEdit* KexiCellEditorFactory::createEditor(KexiTableViewColumn &column, QWidget* parent)
+KexiTableEdit* KexiCellEditorFactory::createEditor(KexiTableViewColumn &column, TQWidget* tqparent)
{
init();
KexiDB::Field *realField;
@@ -176,7 +176,7 @@ KexiTableEdit* KexiCellEditorFactory::createEditor(KexiTableViewColumn &column,
KexiDB::IndexSchema::ListIterator it = table->indicesIterator();
for (;it.current();++it) {
KexiDB::IndexSchema *idx = it.current();
- if (idx->fields()->findRef(&f)!=-1) {
+ if (idx->fields()->tqfindRef(&f)!=-1) {
//find details-side rel. for this index
KexiDB::Relationship *rel = idx->detailsRelationships()->first();
if (rel) {
@@ -187,10 +187,10 @@ KexiTableEdit* KexiCellEditorFactory::createEditor(KexiTableViewColumn &column,
}
#endif
- return item->createEditor(column, parent);
+ return item->createEditor(column, tqparent);
}
-KexiCellEditorFactoryItem* KexiCellEditorFactory::item( uint type, const QString& subType )
+KexiCellEditorFactoryItem* KexiCellEditorFactory::item( uint type, const TQString& subType )
{
init();
return KexiCellEditorFactory_static->findItem(type, subType);
diff --git a/kexi/widget/tableview/kexicelleditorfactory.h b/kexi/widget/tableview/kexicelleditorfactory.h
index 1b68cb8d4..26b48bb65 100644
--- a/kexi/widget/tableview/kexicelleditorfactory.h
+++ b/kexi/widget/tableview/kexicelleditorfactory.h
@@ -20,8 +20,8 @@
#ifndef KEXICELLEDITORFACTORY_H
#define KEXICELLEDITORFACTORY_H
-#include <qvariant.h>
-#include <qwidget.h>
+#include <tqvariant.h>
+#include <tqwidget.h>
#include <kexidb/field.h>
@@ -44,17 +44,17 @@ class KEXIDATATABLE_EXPORT KexiCellEditorFactory
Once registered, \a item object will be owned by the factory, so you shouldn't
care about deleting it. */
static void registerItem( KexiCellEditorFactoryItem& item, uint type,
- const QString& subType = QString::null );
+ const TQString& subType = TQString() );
/*! \return item for \a type and (optional) \a subType.
If no item found, the one with empty subtype is tried.
If still no item found, the default is tried. Eventually, may return NULL. */
- static KexiCellEditorFactoryItem* item( uint type, const QString& subType = QString::null );
+ static KexiCellEditorFactoryItem* item( uint type, const TQString& subType = TQString() );
-// static KexiTableEdit* createEditor(KexiDB::Field &f, QScrollView* parent = 0);
- /*! Creates a new editor for \a column. If \a parent is of QScrollView, the new editor
- will be created inside parent->viewport() instead. */
- static KexiTableEdit* createEditor(KexiTableViewColumn &column, QWidget* parent = 0);
+// static KexiTableEdit* createEditor(KexiDB::Field &f, TQScrollView* tqparent = 0);
+ /*! Creates a new editor for \a column. If \a tqparent is of TQScrollView, the new editor
+ will be created inside tqparent->viewport() instead. */
+ static KexiTableEdit* createEditor(KexiTableViewColumn &column, TQWidget* tqparent = 0);
protected:
static void init();
@@ -66,13 +66,13 @@ class KEXIDATATABLE_EXPORT KexiCellEditorFactoryItem
public:
KexiCellEditorFactoryItem();
virtual ~KexiCellEditorFactoryItem();
- QString className() { return m_className; }
+ TQString className() { return m_className; }
protected:
-// virtual KexiTableEdit* createEditor(KexiDB::Field &f, QScrollView* parent = 0) = 0;
- virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, QWidget* parent = 0) = 0;
+// virtual KexiTableEdit* createEditor(KexiDB::Field &f, TQScrollView* tqparent = 0) = 0;
+ virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, TQWidget* tqparent = 0) = 0;
- QString m_className;
+ TQString m_className;
friend class KexiCellEditorFactory;
};
diff --git a/kexi/widget/tableview/kexicomboboxbase.cpp b/kexi/widget/tableview/kexicomboboxbase.cpp
index 2d6d52acb..19cf0b998 100644
--- a/kexi/widget/tableview/kexicomboboxbase.cpp
+++ b/kexi/widget/tableview/kexicomboboxbase.cpp
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qstyle.h>
-#include <qwindowsstyle.h>
-#include <qpainter.h>
+#include <tqlayout.h>
+#include <tqstyle.h>
+#include <tqwindowsstyle.h>
+#include <tqpainter.h>
#include "kexicomboboxbase.h"
#include <widget/utils/kexicomboboxdropdownbutton.h>
@@ -72,7 +72,7 @@ int KexiComboBoxBase::rowToHighlightForLookupTable() const
bool ok;
const int rowUid = origValue().toInt();
//! @todo for now we're assuming the id is INTEGER
- KexiTableViewData *tvData = popup()->tableView()->data();
+ KexiTableViewData *tvData = popup()->tableView()->KexiDataAwareObjectInterface::data();
const int boundColumn = lookupFieldSchema->boundColumn();
KexiTableViewData::Iterator it(tvData->iterator());
int row=0;
@@ -86,15 +86,15 @@ int KexiComboBoxBase::rowToHighlightForLookupTable() const
return row;
}
-void KexiComboBoxBase::setValueInternal(const QVariant& add_, bool removeOld)
+void KexiComboBoxBase::setValueInternal(const TQVariant& add_, bool removeOld)
{
Q_UNUSED(removeOld);
m_mouseBtnPressedWhenPopupVisible = false;
m_updatePopupSelectionOnShow = true;
- QString add(add_.toString());
+ TQString add(add_.toString());
if (add.isEmpty()) {
KexiTableViewData *relData = column() ? column()->relatedData() : 0;
- QVariant valueToSet;
+ TQVariant valueToSet;
bool hasValueToSet = true;
int rowToHighlight = -1;
KexiDB::LookupFieldSchema *lookupFieldSchema = this->lookupFieldSchema();
@@ -113,7 +113,7 @@ void KexiComboBoxBase::setValueInternal(const QVariant& add_, bool removeOld)
const int rowToHighlight = rowToHighlightForLookupTable();
popup()->tableView()->setHighlightedRow(rowToHighlight);
- const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->data()->columnsCount() );
+ const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->KexiDataAwareObjectInterface::data()->columnsCount() );
if (m_setVisibleValueOnSetValueInternal && -1!=visibleColumn) {
//only for table views
KexiTableItem *it = popup()->tableView()->highlightedItem();
@@ -165,7 +165,7 @@ void KexiComboBoxBase::setValueInternal(const QVariant& add_, bool removeOld)
}
}
-KexiTableItem* KexiComboBoxBase::selectItemForEnteredValueInLookupTable(const QVariant& v)
+KexiTableItem* KexiComboBoxBase::selectItemForEnteredValueInLookupTable(const TQVariant& v)
{
KexiDB::LookupFieldSchema *lookupFieldSchema = this->lookupFieldSchema();
if (!popup() || !lookupFieldSchema)
@@ -173,9 +173,9 @@ KexiTableItem* KexiComboBoxBase::selectItemForEnteredValueInLookupTable(const QV
//-not effective for large sets: please cache it!
//.stripWhiteSpace() is not generic!
- const bool valueIsText = v.type()==QVariant::String || v.type()==QVariant::CString; //most common case
- const QString txt( valueIsText ? v.toString().stripWhiteSpace().lower() : QString::null );
- KexiTableViewData *lookupData = popup()->tableView()->data();
+ const bool valueIsText = v.type()==TQVariant::String || v.type()==TQVariant::CString; //most common case
+ const TQString txt( valueIsText ? v.toString().stripWhiteSpace().lower() : TQString() );
+ KexiTableViewData *lookupData = popup()->tableView()->KexiDataAwareObjectInterface::data();
const int visibleColumn = lookupFieldSchema->visibleColumn( lookupData->columnsCount() );
if (-1 == visibleColumn)
return 0;
@@ -204,17 +204,17 @@ KexiTableItem* KexiComboBoxBase::selectItemForEnteredValueInLookupTable(const QV
return it.current();
}
-QString KexiComboBoxBase::valueForString(const QString& str, int* row,
+TQString KexiComboBoxBase::valueForString(const TQString& str, int* row,
uint lookInColumn, uint returnFromColumn, bool allowNulls)
{
KexiTableViewData *relData = column() ? column()->relatedData() : 0;
if (!relData)
- return QString::null; //safety
+ return TQString(); //safety
//use 'related table data' model
//-not effective for large sets: please cache it!
//.stripWhiteSpace() is not generic!
- const QString txt = str.stripWhiteSpace().lower();
+ const TQString txt = str.stripWhiteSpace().lower();
KexiTableViewData::Iterator it( relData->iterator() );
for (*row = 0;it.current();++it, (*row)++) {
if (it.current()->at(lookInColumn).toString().stripWhiteSpace().lower()==txt)
@@ -230,11 +230,11 @@ QString KexiComboBoxBase::valueForString(const QString& str, int* row,
kexiwarn << "KexiComboBoxBase::valueForString(): no related row found, ID will be painted!" << endl;
if (allowNulls)
- return QString::null;
+ return TQString();
return str; //for sanity but it's weird to show id to the user
}
-QVariant KexiComboBoxBase::value()
+TQVariant KexiComboBoxBase::value()
{
KexiTableViewData *relData = column() ? column()->relatedData() : 0;
KexiDB::LookupFieldSchema *lookupFieldSchema = 0;
@@ -248,7 +248,7 @@ QVariant KexiComboBoxBase::value()
else {
//use 'related table data' model
KexiTableItem *it = popup() ? popup()->tableView()->selectedItem() : 0;
- return it ? it->at(0) : origValue();//QVariant();
+ return it ? it->at(0) : origValue();//TQVariant();
}
}
else if ((lookupFieldSchema = this->lookupFieldSchema()))
@@ -259,41 +259,41 @@ QVariant KexiComboBoxBase::value()
if (/*!it &&*/ m_internalEditorValueChanged && !m_userEnteredValue.toString().isEmpty()) { //
//try to select a row using the user-entered text
if (!popup()) {
- QVariant prevUserEnteredValue = m_userEnteredValue;
+ TQVariant prevUserEnteredValue = m_userEnteredValue;
createPopup(false);
m_userEnteredValue = prevUserEnteredValue;
}
it = selectItemForEnteredValueInLookupTable( m_userEnteredValue );
}
- return it ? it->at( lookupFieldSchema->boundColumn() ) : QVariant();
+ return it ? it->at( lookupFieldSchema->boundColumn() ) : TQVariant();
}
else if (popup()) {
//use 'enum hints' model
const int row = popup()->tableView()->currentRow();
if (row>=0)
- return QVariant( row );
+ return TQVariant( row );
}
if (valueFromInternalEditor().toString().isEmpty())
- return QVariant();
+ return TQVariant();
/*! \todo don't return just 1st row, but use autocompletion feature
and: show message box if entered text does not match! */
return origValue(); //unchanged
}
-QVariant KexiComboBoxBase::visibleValueForLookupField()
+TQVariant KexiComboBoxBase::visibleValueForLookupField()
{
KexiDB::LookupFieldSchema *lookupFieldSchema = this->lookupFieldSchema();
if (!popup() || !lookupFieldSchema)
- return QVariant();
- const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->data()->columnsCount() );
+ return TQVariant();
+ const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->KexiDataAwareObjectInterface::data()->columnsCount() );
if (-1 == visibleColumn)
- return QVariant();
+ return TQVariant();
KexiTableItem *it = popup()->tableView()->selectedItem();
- return it ? it->at( QMIN( (uint)visibleColumn, it->count()-1)/*sanity*/ ) : QVariant();
+ return it ? it->at( TQMIN( (uint)visibleColumn, it->count()-1)/*sanity*/ ) : TQVariant();
}
-QVariant KexiComboBoxBase::visibleValue()
+TQVariant KexiComboBoxBase::visibleValue()
{
return m_visibleValue;
}
@@ -302,7 +302,7 @@ void KexiComboBoxBase::clear()
{
if (popup())
popup()->hide();
- slotInternalEditorValueChanged(QVariant());
+ slotInternalEditorValueChanged(TQVariant());
}
tristate KexiComboBoxBase::valueChangedInternal()
@@ -332,7 +332,7 @@ tristate KexiComboBoxBase::valueChangedInternal()
bool KexiComboBoxBase::valueIsNull()
{
// bool ok;
- QVariant v( value() );
+ TQVariant v( value() );
return v.isNull();
// return !ok || v.isNull();
}
@@ -352,15 +352,15 @@ void KexiComboBoxBase::createPopup(bool show)
if (!field())
return;
m_insideCreatePopup = true;
- QWidget* thisWidget = dynamic_cast<QWidget*>(this);
- QWidget *widgetToFocus = internalEditor() ? internalEditor() : thisWidget;
+ TQWidget* thisWidget = dynamic_cast<TQWidget*>(this);
+ TQWidget *widgetToFocus = internalEditor() ? internalEditor() : thisWidget;
if (!popup()) {
setPopup( column() ? new KexiComboBoxPopup(thisWidget, *column())
: new KexiComboBoxPopup(thisWidget, *field()) );
- QObject::connect(popup(), SIGNAL(rowAccepted(KexiTableItem*,int)),
- thisWidget, SLOT(slotRowAccepted(KexiTableItem*,int)));
- QObject::connect(popup()->tableView(), SIGNAL(itemSelected(KexiTableItem*)),
- thisWidget, SLOT(slotItemSelected(KexiTableItem*)));
+ TQObject::connect(popup(), TQT_SIGNAL(rowAccepted(KexiTableItem*,int)),
+ thisWidget, TQT_SLOT(slotRowAccepted(KexiTableItem*,int)));
+ TQObject::connect(popup()->tableView(), TQT_SIGNAL(itemSelected(KexiTableItem*)),
+ thisWidget, TQT_SLOT(slotItemSelected(KexiTableItem*)));
popup()->setFocusProxy( widgetToFocus );
popup()->tableView()->setFocusProxy( widgetToFocus );
@@ -376,10 +376,10 @@ void KexiComboBoxBase::createPopup(bool show)
if (show && internalEditor() && !internalEditor()->isVisible())
/*emit*/editRequested();
- QPoint posMappedToGlobal = mapFromParentToGlobal(thisWidget->pos());
- if (posMappedToGlobal != QPoint(-1,-1)) {
+ TQPoint posMappedToGlobal = mapFromParentToGlobal(thisWidget->pos());
+ if (posMappedToGlobal != TQPoint(-1,-1)) {
//! todo alter the position to fit the popup within screen boundaries
- popup()->move( posMappedToGlobal + QPoint(0, thisWidget->height()) );
+ popup()->move( posMappedToGlobal + TQPoint(0, thisWidget->height()) );
//to avoid flickering: first resize to 0-height, then show and resize back to prev. height
const int w = popupWidthHint();
popup()->resize(w, 0);
@@ -403,8 +403,8 @@ void KexiComboBoxBase::createPopup(bool show)
m_selectAllInInternalEditor_enabled = show;
m_setValueInInternalEditor_enabled = show;
if (rowToHighlight==-1) {
- rowToHighlight = QMAX( popup()->tableView()->highlightedRow(), 0);
- setValueInInternalEditor(QVariant());
+ rowToHighlight = TQMAX( popup()->tableView()->highlightedRow(), 0);
+ setValueInInternalEditor(TQVariant());
}
popup()->tableView()->selectRow( rowToHighlight );
popup()->tableView()->setHighlightedRow( rowToHighlight );
@@ -457,11 +457,11 @@ void KexiComboBoxBase::slotItemSelected(KexiTableItem*)
{
kexidbg << "KexiComboBoxBase::slotItemSelected(): m_visibleValue = " << m_visibleValue << endl;
- QVariant valueToSet;
+ TQVariant valueToSet;
KexiTableViewData *relData = column() ? column()->relatedData() : 0;
KexiDB::LookupFieldSchema *lookupFieldSchema = this->lookupFieldSchema();
- m_visibleValue = lookupFieldSchema ? visibleValueForLookupField() : QVariant();
+ m_visibleValue = lookupFieldSchema ? visibleValueForLookupField() : TQVariant();
if (relData) {
//use 'related table data' model
@@ -471,9 +471,9 @@ void KexiComboBoxBase::slotItemSelected(KexiTableItem*)
}
else if (lookupFieldSchema) {
KexiTableItem *item = popup()->tableView()->selectedItem();
- const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->data()->columnsCount() );
+ const int visibleColumn = lookupFieldSchema->visibleColumn( popup()->tableView()->KexiDataAwareObjectInterface::data()->columnsCount() );
if (item && visibleColumn!=-1 /* && (int)item->size() >= visibleColumn --already checked*/) {
- valueToSet = item->at( QMIN( (uint)visibleColumn, item->count()-1)/*sanity*/ );
+ valueToSet = item->at( TQMIN( (uint)visibleColumn, item->count()-1)/*sanity*/ );
}
}
else {
@@ -481,8 +481,8 @@ void KexiComboBoxBase::slotItemSelected(KexiTableItem*)
valueToSet = field()->enumHint( popup()->tableView()->currentRow() );
if (valueToSet.toString().isEmpty() && !m_insideCreatePopup) {
clear();
- QWidget* thisWidget = dynamic_cast<QWidget*>(this);
- thisWidget->parentWidget()->setFocus();
+ TQWidget* thisWidget = dynamic_cast<TQWidget*>(this);
+ thisWidget->tqparentWidget()->setFocus();
return;
}
}
@@ -495,7 +495,7 @@ void KexiComboBoxBase::slotItemSelected(KexiTableItem*)
m_updatePopupSelectionOnShow = false;
}
-void KexiComboBoxBase::slotInternalEditorValueChanged(const QVariant& v)
+void KexiComboBoxBase::slotInternalEditorValueChanged(const TQVariant& v)
{
if (!m_slotInternalEditorValueChanged_enabled)
return;
@@ -509,24 +509,24 @@ void KexiComboBoxBase::slotInternalEditorValueChanged(const QVariant& v)
}
}
-void KexiComboBoxBase::setValueOrTextInInternalEditor(const QVariant& value)
+void KexiComboBoxBase::setValueOrTextInInternalEditor(const TQVariant& value)
{
if (!m_setValueOrTextInInternalEditor_enabled)
return;
setValueInInternalEditor( value );
//this text is not entered by hand:
- m_userEnteredValue = QVariant();
+ m_userEnteredValue = TQVariant();
m_internalEditorValueChanged = false;
}
-bool KexiComboBoxBase::handleKeyPressForPopup( QKeyEvent *ke )
+bool KexiComboBoxBase::handleKeyPressForPopup( TQKeyEvent *ke )
{
const int k = ke->key();
int highlightedOrSelectedRow = popup() ? popup()->tableView()->highlightedRow() : -1;
if (popup() && highlightedOrSelectedRow < 0)
highlightedOrSelectedRow = popup()->tableView()->currentRow();
- const bool enterPressed = k==Qt::Key_Enter || k==Qt::Key_Return;
+ const bool enterPressed = k==TQt::Key_Enter || k==TQt::Key_Return;
// The editor may be active but the pull down menu not existant/visible,
// e.g. when the user has pressed a normal button to activate the editor
@@ -536,37 +536,37 @@ bool KexiComboBoxBase::handleKeyPressForPopup( QKeyEvent *ke )
}
switch (k) {
- case Qt::Key_Up:
+ case TQt::Key_Up:
popup()->tableView()->setHighlightedRow(
- QMAX(highlightedOrSelectedRow-1, 0) );
+ TQMAX(highlightedOrSelectedRow-1, 0) );
updateTextForHighlightedRow();
return true;
- case Qt::Key_Down:
+ case TQt::Key_Down:
popup()->tableView()->setHighlightedRow(
- QMIN(highlightedOrSelectedRow+1, popup()->tableView()->rows()-1) );
+ TQMIN(highlightedOrSelectedRow+1, popup()->tableView()->rows()-1) );
updateTextForHighlightedRow();
return true;
- case Qt::Key_PageUp:
+ case TQt::Key_PageUp:
popup()->tableView()->setHighlightedRow(
- QMAX(highlightedOrSelectedRow-popup()->tableView()->rowsPerPage(), 0) );
+ TQMAX(highlightedOrSelectedRow-popup()->tableView()->rowsPerPage(), 0) );
updateTextForHighlightedRow();
return true;
- case Qt::Key_PageDown:
+ case TQt::Key_PageDown:
popup()->tableView()->setHighlightedRow(
- QMIN(highlightedOrSelectedRow+popup()->tableView()->rowsPerPage(),
+ TQMIN(highlightedOrSelectedRow+popup()->tableView()->rowsPerPage(),
popup()->tableView()->rows()-1) );
updateTextForHighlightedRow();
return true;
- case Qt::Key_Home:
+ case TQt::Key_Home:
popup()->tableView()->setHighlightedRow( 0 );
updateTextForHighlightedRow();
return true;
- case Qt::Key_End:
+ case TQt::Key_End:
popup()->tableView()->setHighlightedRow( popup()->tableView()->rows()-1 );
updateTextForHighlightedRow();
return true;
- case Qt::Key_Enter:
- case Qt::Key_Return: //accept
+ case TQt::Key_Enter:
+ case TQt::Key_Return: //accept
//select row that is highlighted
if (popup()->tableView()->highlightedRow()>=0)
popup()->tableView()->selectRow( popup()->tableView()->highlightedRow() );
diff --git a/kexi/widget/tableview/kexicomboboxbase.h b/kexi/widget/tableview/kexicomboboxbase.h
index 1433ab0fa..f36dd822c 100644
--- a/kexi/widget/tableview/kexicomboboxbase.h
+++ b/kexi/widget/tableview/kexicomboboxbase.h
@@ -47,12 +47,12 @@ class KEXIDATATABLE_EXPORT KexiComboBoxBase
virtual KexiDB::Field *field() const = 0;
//! \return the original value
- virtual QVariant origValue() const = 0;
+ virtual TQVariant origValue() const = 0;
//! Note: Generally in current implementation this is integer > 0; may be null if no value is set
- virtual QVariant value();
+ virtual TQVariant value();
- virtual QVariant visibleValue();
+ virtual TQVariant visibleValue();
//! Reimplement this and call this impl.: used to clear internal editor
virtual void clear();
@@ -75,29 +75,29 @@ class KEXIDATATABLE_EXPORT KexiComboBoxBase
virtual void slotItemSelected(KexiTableItem*);
//! Call this from slot
- void slotInternalEditorValueChanged(const QVariant &v);
+ void slotInternalEditorValueChanged(const TQVariant &v);
//! Implement this to return the internal editor
- virtual QWidget *internalEditor() const = 0;
+ virtual TQWidget *internalEditor() const = 0;
protected:
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
//! Used to select row item for an user-entered value \a v.
//! Only for "lookup table" mode.
- KexiTableItem* selectItemForEnteredValueInLookupTable(const QVariant& v);
+ KexiTableItem* selectItemForEnteredValueInLookupTable(const TQVariant& v);
/*! \return value from \a returnFromColumn related to \a str value from column \a lookInColumn.
If \a allowNulls is true, NULL is returend if no matched column found, else:
\a str is returned.
Example: lookInColumn=0, returnFromColumn=1 --returns user-visible string
for column #1 for id-column #0 */
- QString valueForString(const QString& str, int* row, uint lookInColumn,
+ TQString valueForString(const TQString& str, int* row, uint lookInColumn,
uint returnFromColumn, bool allowNulls = false);
//! sets \a value for the line edit without setting a flag (m_userEnteredValue) that indicates that
//! the text has been entered by hand (by a user)
- void setValueOrTextInInternalEditor(const QVariant& value); //QString& text);
+ void setValueOrTextInInternalEditor(const TQVariant& value); //TQString& text);
//! \return lookup field schema for this combo box, if present and if is valid (i.e. has defined row source)
KexiDB::LookupFieldSchema* lookupFieldSchema() const;
@@ -111,10 +111,10 @@ class KEXIDATATABLE_EXPORT KexiComboBoxBase
virtual void selectAllInInternalEditor() = 0;
//! Implement this to perform "set value" in the internal editor
- virtual void setValueInInternalEditor(const QVariant& value) = 0;
+ virtual void setValueInInternalEditor(const TQVariant& value) = 0;
//! Implement this to return value from the internal editor
- virtual QVariant valueFromInternalEditor() = 0;
+ virtual TQVariant valueFromInternalEditor() = 0;
//! Implement this as signal
virtual void editRequested() = 0;
@@ -122,9 +122,9 @@ class KEXIDATATABLE_EXPORT KexiComboBoxBase
//! Implement this as signal
virtual void acceptRequested() = 0;
- //! Implement this to return a position \a pos mapped from parent (e.g. viewport)
- //! to global coordinates. QPoint(-1, -1) should be returned if this cannot be computed.
- virtual QPoint mapFromParentToGlobal(const QPoint& pos) const = 0;
+ //! Implement this to return a position \a pos mapped from tqparent (e.g. viewport)
+ //! to global coordinates. TQPoint(-1, -1) should be returned if this cannot be computed.
+ virtual TQPoint mapFromParentToGlobal(const TQPoint& pos) const = 0;
//! Implement this to return a hint for popup width.
virtual int popupWidthHint() const = 0;
@@ -136,20 +136,20 @@ class KEXIDATATABLE_EXPORT KexiComboBoxBase
virtual KexiComboBoxPopup *popup() const = 0;
virtual void setPopup(KexiComboBoxPopup *popup) = 0;
- virtual QVariant visibleValueForLookupField();
+ virtual TQVariant visibleValueForLookupField();
void updateTextForHighlightedRow();
- bool handleKeyPressForPopup( QKeyEvent *ke );
+ bool handleKeyPressForPopup( TQKeyEvent *ke );
void acceptPopupSelection();
//! Used by KexiDBComboBox.
void undoChanges();
- QVariant m_visibleValue;
+ TQVariant m_visibleValue;
- QVariant m_userEnteredValue; //!< value (usually a text) entered by hand (by the user)
+ TQVariant m_userEnteredValue; //!< value (usually a text) entered by hand (by the user)
bool m_internalEditorValueChanged : 1; //!< true if user has text or other value inside editor
bool m_slotInternalEditorValueChanged_enabled : 1; //!< Used in slotInternalEditorValueChanged()
diff --git a/kexi/widget/tableview/kexicomboboxpopup.cpp b/kexi/widget/tableview/kexicomboboxpopup.cpp
index 5cd65d0d8..65edd806d 100644
--- a/kexi/widget/tableview/kexicomboboxpopup.cpp
+++ b/kexi/widget/tableview/kexicomboboxpopup.cpp
@@ -30,16 +30,16 @@
#include <kdebug.h>
-#include <qlayout.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
/*! @internal
Helper for KexiComboBoxPopup. */
class KexiComboBoxPopup_KexiTableView : public KexiDataTableView
{
public:
- KexiComboBoxPopup_KexiTableView(QWidget* parent=0)
- : KexiDataTableView(parent, "KexiComboBoxPopup_tv")
+ KexiComboBoxPopup_KexiTableView(TQWidget* tqparent=0)
+ : KexiDataTableView(tqparent, "KexiComboBoxPopup_tv")
{
init();
}
@@ -56,8 +56,8 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView
a.rowHighlightingEnabled = true;
a.rowMouseOverHighlightingEnabled = true;
a.persistentSelections = false;
- a.rowMouseOverHighlightingColor = colorGroup().highlight();
- a.rowMouseOverHighlightingTextColor = colorGroup().highlightedText();
+ a.rowMouseOverHighlightingColor = tqcolorGroup().highlight();
+ a.rowMouseOverHighlightingTextColor = tqcolorGroup().highlightedText();
a.rowHighlightingTextColor = a.rowMouseOverHighlightingTextColor;
a.gridEnabled = false;
setAppearance(a);
@@ -68,7 +68,7 @@ class KexiComboBoxPopup_KexiTableView : public KexiDataTableView
setContextMenuEnabled( false );
setScrollbarToolTipsEnabled( false );
installEventFilter(this);
- setBottomMarginInternal( - horizontalScrollBar()->sizeHint().height() );
+ setBottomMarginInternal( - horizontalScrollBar()->tqsizeHint().height() );
}
virtual void setData( KexiTableViewData *data, bool owner = true )
{ KexiTableView::setData( data, owner ); }
@@ -103,16 +103,16 @@ class KexiComboBoxPopupPrivate
const int KexiComboBoxPopup::defaultMaxRows = 8;
-KexiComboBoxPopup::KexiComboBoxPopup(QWidget* parent, KexiTableViewColumn &column)
- : QFrame( parent, "KexiComboBoxPopup", WType_Popup )
+KexiComboBoxPopup::KexiComboBoxPopup(TQWidget* tqparent, KexiTableViewColumn &column)
+ : TQFrame( tqparent, "KexiComboBoxPopup", WType_Popup )
{
init();
//setup tv data
setData(&column, 0);
}
-KexiComboBoxPopup::KexiComboBoxPopup(QWidget* parent, KexiDB::Field &field)
- : QFrame( parent, "KexiComboBoxPopup", WType_Popup )
+KexiComboBoxPopup::KexiComboBoxPopup(TQWidget* tqparent, KexiDB::Field &field)
+ : TQFrame( tqparent, "KexiComboBoxPopup", WType_Popup )
{
init();
//setup tv data
@@ -127,21 +127,21 @@ KexiComboBoxPopup::~KexiComboBoxPopup()
void KexiComboBoxPopup::init()
{
d = new KexiComboBoxPopupPrivate();
- setPaletteBackgroundColor(palette().color(QPalette::Active,QColorGroup::Base));
+ setPaletteBackgroundColor(palette().color(TQPalette::Active,TQColorGroup::Base));
setLineWidth( 1 );
setFrameStyle( Box | Plain );
d->tv = new KexiComboBoxPopup_KexiTableView(this);
installEventFilter(this);
- connect(d->tv, SIGNAL(itemReturnPressed(KexiTableItem*,int,int)),
- this, SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
+ connect(d->tv, TQT_SIGNAL(itemReturnPressed(KexiTableItem*,int,int)),
+ this, TQT_SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
- connect(d->tv, SIGNAL(itemMouseReleased(KexiTableItem*,int,int)),
- this, SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
+ connect(d->tv, TQT_SIGNAL(itemMouseReleased(KexiTableItem*,int,int)),
+ this, TQT_SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
- connect(d->tv, SIGNAL(itemDblClicked(KexiTableItem*,int,int)),
- this, SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
+ connect(d->tv, TQT_SIGNAL(itemDblClicked(KexiTableItem*,int,int)),
+ this, TQT_SLOT(slotTVItemAccepted(KexiTableItem*,int,int)));
}
void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *field)
@@ -166,7 +166,7 @@ void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *fiel
delete d->privateQuery;
d->privateQuery = 0;
if (lookupFieldSchema) {
- const QValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
+ const TQValueList<uint> visibleColumns( lookupFieldSchema->visibleColumns() );
const bool multipleLookupColumnJoined = visibleColumns.count() > 1;
//! @todo support more RowSourceType's, not only table and query
KexiDB::Cursor *cursor = 0;
@@ -211,7 +211,7 @@ void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *fiel
uint fieldsExpandedSize( fieldsExpanded.size() );
KexiDB::BaseExpr *expr = 0;
int count = visibleColumns.count();
- for (QValueList<uint>::ConstIterator it( visibleColumns.at(count-1) ); count>0; count--, --it) {
+ for (TQValueList<uint>::ConstIterator it( visibleColumns.at(count-1) ); count>0; count--, --it) {
KexiDB::QueryColumnInfo *ci = ((*it) < fieldsExpandedSize) ? fieldsExpanded.at( *it ) : 0;
if (!ci) {
kdWarning() << "KexiComboBoxPopup::setData(): " << *it << " >= fieldsExpandedSize" << endl;
@@ -254,11 +254,11 @@ void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *fiel
//! @todo errmsg
return;
- if (d->tv->data())
- d->tv->data()->disconnect( this );
+ if (d->tv->KexiDataAwareObjectInterface::data())
+ d->tv->KexiDataAwareObjectInterface::data()->disconnect( this );
d->tv->setData( cursor );
- connect( d->tv, SIGNAL(dataRefreshed()), this, SLOT(slotDataReloadRequested()));
+ connect( d->tv, TQT_SIGNAL(dataRefreshed()), this, TQT_SLOT(slotDataReloadRequested()));
updateSize();
return;
}
@@ -272,10 +272,10 @@ void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *fiel
d->int_f = new KexiDB::Field(field->name(), KexiDB::Field::Text);
KexiTableViewData *data = new KexiTableViewData();
data->addColumn( new KexiTableViewColumn( *d->int_f ) );
- QValueVector<QString> hints = field->enumHints();
+ TQValueVector<TQString> hints = field->enumHints();
for(uint i=0; i < hints.size(); i++) {
KexiTableItem *item = data->createItem();//new KexiTableItem(1);
- (*item)[0]=QVariant(hints[i]);
+ (*item)[0]=TQVariant(hints[i]);
kdDebug() << "added: '" << hints[i] <<"'"<<endl;
data->append( item );
}
@@ -284,25 +284,25 @@ void KexiComboBoxPopup::setData(KexiTableViewColumn *column, KexiDB::Field *fiel
void KexiComboBoxPopup::setDataInternal( KexiTableViewData *data, bool owner )
{
- if (d->tv->data())
- d->tv->data()->disconnect( this );
+ if (d->tv->KexiDataAwareObjectInterface::data())
+ d->tv->KexiDataAwareObjectInterface::data()->disconnect( this );
d->tv->setData( data, owner );
- connect( d->tv, SIGNAL(dataRefreshed()), this, SLOT(slotDataReloadRequested()));
+ connect( d->tv, TQT_SIGNAL(dataRefreshed()), this, TQT_SLOT(slotDataReloadRequested()));
updateSize();
}
void KexiComboBoxPopup::updateSize(int minWidth)
{
- const int rows = QMIN( d->max_rows, d->tv->rows() );
+ const int rows = TQMIN( d->max_rows, d->tv->rows() );
d->tv->adjustColumnWidthToContents(-1);
- KexiTableEdit *te = dynamic_cast<KexiTableEdit*>(parentWidget());
- const int width = QMAX( d->tv->tableSize().width(),
- (te ? te->totalSize().width() : (parentWidget()?parentWidget()->width():0/*sanity*/)) );
+ KexiTableEdit *te = dynamic_cast<KexiTableEdit*>(tqparentWidget());
+ const int width = TQMAX( d->tv->tableSize().width(),
+ (te ? te->totalSize().width() : (tqparentWidget()?tqparentWidget()->width():0/*sanity*/)) );
kexidbg << "KexiComboBoxPopup::updateSize(): size=" << size() << endl;
- resize( QMAX(minWidth, width)/*+(d->tv->columns()>1?2:0)*/ /*(d->updateSizeCalled?0:1)*/, d->tv->rowHeight() * rows +2 );
+ resize( TQMAX(minWidth, width)/*+(d->tv->columns()>1?2:0)*/ /*(d->updateSizeCalled?0:1)*/, d->tv->rowHeight() * rows +2 );
kexidbg << "KexiComboBoxPopup::updateSize(): size after=" << size() << endl;
//stretch the last column
@@ -320,7 +320,7 @@ void KexiComboBoxPopup::resize( int w, int h )
d->tv->verticalScrollBar()->hide();
d->tv->move(1,1);
d->tv->resize( w-2, h-2 );
- QFrame::resize(w,h);
+ TQFrame::resize(w,h);
update();
updateGeometry();
}
@@ -341,19 +341,19 @@ void KexiComboBoxPopup::slotTVItemAccepted(KexiTableItem *item, int row, int)
emit rowAccepted(item, row);
}
-bool KexiComboBoxPopup::eventFilter( QObject *o, QEvent *e )
+bool KexiComboBoxPopup::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==this && e->type()==QEvent::Hide) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(this) && e->type()==TQEvent::Hide) {
emit hidden();
}
- else if (e->type()==QEvent::MouseButtonPress) {
- kdDebug() << "QEvent::MousePress" << endl;
+ else if (e->type()==TQEvent::MouseButtonPress) {
+ kdDebug() << "TQEvent::MousePress" << endl;
}
- else if (o==d->tv) {
- if (e->type()==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ else if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(d->tv)) {
+ if (e->type()==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int k = ke->key();
- if ((ke->state()==NoButton && (k==Key_Escape || k==Key_F4))
+ if ((ke->state()==Qt::NoButton && (k==Key_Escape || k==Key_F4))
|| (ke->state()==AltButton && k==Key_Up))
{
hide();
@@ -362,7 +362,7 @@ bool KexiComboBoxPopup::eventFilter( QObject *o, QEvent *e )
}
}
}
- return QFrame::eventFilter( o, e );
+ return TQFrame::eventFilter( o, e );
}
void KexiComboBoxPopup::slotDataReloadRequested()
diff --git a/kexi/widget/tableview/kexicomboboxpopup.h b/kexi/widget/tableview/kexicomboboxpopup.h
index 42a154040..d78955b2b 100644
--- a/kexi/widget/tableview/kexicomboboxpopup.h
+++ b/kexi/widget/tableview/kexicomboboxpopup.h
@@ -20,7 +20,7 @@
#ifndef KEXICOMBOBOXPOPUP_H
#define KEXICOMBOBOXPOPUP_H
-#include <qframe.h>
+#include <tqframe.h>
class KexiComboBoxPopupPrivate;
class KexiTableView;
@@ -32,19 +32,20 @@ namespace KexiDB {
}
//! Internal class for displaying popup table view
-class KexiComboBoxPopup : public QFrame
+class KexiComboBoxPopup : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
//js TODO: more ctors!
/*! Constructor for creating a popup using definition from \a column.
If the column is lookup column, it's definition is used to display
one or more column within the popup. Otherwise column.field() is used
to display single-column data. */
- KexiComboBoxPopup(QWidget* parent, KexiTableViewColumn &column);
+ KexiComboBoxPopup(TQWidget* tqparent, KexiTableViewColumn &column);
/*! Alternative constructor supporting lookup fields and enum hints. */
- KexiComboBoxPopup(QWidget* parent, KexiDB::Field &field);
+ KexiComboBoxPopup(TQWidget* tqparent, KexiDB::Field &field);
virtual ~KexiComboBoxPopup();
@@ -59,7 +60,7 @@ class KexiComboBoxPopup : public QFrame
/*! Default maximum number of rows for KexiComboBoxPopup objects. */
static const int defaultMaxRows;
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
signals:
void rowAccepted(KexiTableItem *item, int row);
diff --git a/kexi/widget/tableview/kexicomboboxtableedit.cpp b/kexi/widget/tableview/kexicomboboxtableedit.cpp
index 75815a8ad..ba61e3057 100644
--- a/kexi/widget/tableview/kexicomboboxtableedit.cpp
+++ b/kexi/widget/tableview/kexicomboboxtableedit.cpp
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qstyle.h>
-#include <qwindowsstyle.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qclipboard.h>
+#include <tqlayout.h>
+#include <tqstyle.h>
+#include <tqwindowsstyle.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
#include "kexicomboboxtableedit.h"
#include <widget/utils/kexicomboboxdropdownbutton.h>
@@ -54,41 +54,41 @@ public:
KPushButton *button;
KexiComboBoxPopup *popup;
int currentEditorWidth;
- QSize totalSize;
+ TQSize totalSize;
KexiTableViewColumn* visibleTableViewColumn;
KexiTableEdit* internalEditor;
};
//======================================================
-KexiComboBoxTableEdit::KexiComboBoxTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiInputTableEdit(column, parent)
+KexiComboBoxTableEdit::KexiComboBoxTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiInputTableEdit(column, tqparent)
, KexiComboBoxBase()
, d(new Private())
{
setName("KexiComboBoxTableEdit");
m_setVisibleValueOnSetValueInternal = true;
- d->button = new KexiComboBoxDropDownButton( parentWidget() /*usually a viewport*/ );
+ d->button = new KexiComboBoxDropDownButton( tqparentWidget() /*usually a viewport*/ );
d->button->hide();
- d->button->setFocusPolicy( NoFocus );
- connect(d->button, SIGNAL(clicked()), this, SLOT(slotButtonClicked()));
+ d->button->setFocusPolicy( TQ_NoFocus );
+ connect(d->button, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotButtonClicked()));
- connect(m_lineedit, SIGNAL(textChanged(const QString&)), this, SLOT(slotLineEditTextChanged(const QString&)));
+ connect(m_lineedit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotLineEditTextChanged(const TQString&)));
// m_lineedit = new KLineEdit(this, "lineedit");
// m_lineedit->setFrame(false);
-// m_lineedit->setFrameStyle( QFrame::Plain | QFrame::Box );
+// m_lineedit->setFrameStyle( TQFrame::Plain | TQFrame::Box );
// m_lineedit->setLineWidth( 1 );
// if (f.isNumericType()) {
-// m_lineedit->setAlignment(AlignRight);
+// m_lineedit->tqsetAlignment(AlignRight);
// }
// setView( m_lineedit );
-// layout->addWidget(m_view);
+// tqlayout->addWidget(m_view);
// m_combo->setEditable( true );
// m_combo->clear();
// m_combo->insertStringList(f.enumHints());
-// QStringList::ConstIterator it, end( f.enumHints().constEnd() );
+// TQStringList::ConstIterator it, end( f.enumHints().constEnd() );
// for ( it = f.enumHints().constBegin(); it != end; ++it) {
// if(!hints.at(i).isEmpty())
// m_combo->insertItem(hints.at(i));
@@ -138,7 +138,7 @@ void KexiComboBoxTableEdit::setPopup(KexiComboBoxPopup *popup)
d->popup = popup;
}
-void KexiComboBoxTableEdit::showFocus( const QRect& r, bool readOnly )
+void KexiComboBoxTableEdit::showFocus( const TQRect& r, bool readOnly )
{
// d->button->move( pos().x()+ width(), pos().y() );
updateFocus( r );
@@ -151,13 +151,13 @@ void KexiComboBoxTableEdit::showFocus( const QRect& r, bool readOnly )
void KexiComboBoxTableEdit::resize(int w, int h)
{
- d->totalSize = QSize(w,h);
+ d->totalSize = TQSize(w,h);
if (!column()->isReadOnly()) {
d->button->resize( h, h );
- QWidget::resize(w - d->button->width(), h);
+ TQWidget::resize(w - d->button->width(), h);
}
m_rightMarginWhenFocused = m_rightMargin + (column()->isReadOnly() ? 0 : d->button->width());
- QRect r( pos().x(), pos().y(), w+1, h+1 );
+ TQRect r( pos().x(), pos().y(), w+1, h+1 );
if (m_scrollView)
r.moveBy(m_scrollView->contentsX(), m_scrollView->contentsY());
updateFocus( r );
@@ -167,7 +167,7 @@ void KexiComboBoxTableEdit::resize(int w, int h)
}
// internal
-void KexiComboBoxTableEdit::updateFocus( const QRect& r )
+void KexiComboBoxTableEdit::updateFocus( const TQRect& r )
{
if (!column()->isReadOnly()) {
if (d->button->width() > r.width())
@@ -182,14 +182,14 @@ void KexiComboBoxTableEdit::hideFocus()
d->button->hide();
}
-QVariant KexiComboBoxTableEdit::visibleValue()
+TQVariant KexiComboBoxTableEdit::visibleValue()
{
return KexiComboBoxBase::visibleValue();
/* KexiDB::LookupFieldSchema *lookupFieldSchema = this->lookupFieldSchema();
if (!popup() || !lookupFieldSchema)
- return QVariant();
+ return TQVariant();
KexiTableItem *it = popup()->tableView()->selectedItem();
- return it ? it->at( lookupFieldSchema->visibleColumn() ) : QVariant();*/
+ return it ? it->at( lookupFieldSchema->visibleColumn() ) : TQVariant();*/
}
void KexiComboBoxTableEdit::clear()
@@ -206,7 +206,7 @@ bool KexiComboBoxTableEdit::valueChanged()
return res == true;
}
-void KexiComboBoxTableEdit::paintFocusBorders( QPainter *p, QVariant &, int x, int y, int w, int h )
+void KexiComboBoxTableEdit::paintFocusBorders( TQPainter *p, TQVariant &, int x, int y, int w, int h )
{
// d->currentEditorWidth = w;
if (!column()->isReadOnly()) {
@@ -216,8 +216,8 @@ void KexiComboBoxTableEdit::paintFocusBorders( QPainter *p, QVariant &, int x, i
p->drawRect(x, y, w, h);
}
-void KexiComboBoxTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+void KexiComboBoxTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
if (d->internalEditor) {
d->internalEditor->setupContents( p, focused, val, txt, align, x, y_offset, w, h );
@@ -295,18 +295,18 @@ void KexiComboBoxTableEdit::show()
}
}
-bool KexiComboBoxTableEdit::handleKeyPress( QKeyEvent *ke, bool editorActive )
+bool KexiComboBoxTableEdit::handleKeyPress( TQKeyEvent *ke, bool editorActive )
{
const int k = ke->key();
- if ((ke->state()==NoButton && k==Qt::Key_F4)
- || (ke->state()==AltButton && k==Qt::Key_Down))
+ if ((ke->state()==Qt::NoButton && k==TQt::Key_F4)
+ || (ke->state()==AltButton && k==TQt::Key_Down))
{
//show popup
slotButtonClicked();
return true;
}
else if (editorActive) {
- const bool enterPressed = k==Qt::Key_Enter || k==Qt::Key_Return;
+ const bool enterPressed = k==TQt::Key_Enter || k==TQt::Key_Return;
if (enterPressed && m_internalEditorValueChanged) {
createPopup(false);
selectItemForEnteredValueInLookupTable( m_userEnteredValue );
@@ -319,52 +319,52 @@ bool KexiComboBoxTableEdit::handleKeyPress( QKeyEvent *ke, bool editorActive )
return false;
}
-void KexiComboBoxTableEdit::slotLineEditTextChanged(const QString& s)
+void KexiComboBoxTableEdit::slotLineEditTextChanged(const TQString& s)
{
slotInternalEditorValueChanged(s);
}
-int KexiComboBoxTableEdit::widthForValue( QVariant &val, const QFontMetrics &fm )
+int KexiComboBoxTableEdit::widthForValue( TQVariant &val, const TQFontMetrics &fm )
{
KexiTableViewData *relData = column() ? column()->relatedData() : 0;
if (lookupFieldSchema() || relData) {
// in 'lookupFieldSchema' or or 'related table data' model
// we're assuming val is already the text, not the index
//! @todo ok?
- return QMAX(KEXITV_MINIMUM_COLUMN_WIDTH, fm.width(val.toString()));
+ return TQMAX(KEXITV_MINIMUM_COLUMN_WIDTH, fm.width(val.toString()));
}
//use 'enum hints' model
- QValueVector<QString> hints = field()->enumHints();
+ TQValueVector<TQString> hints = field()->enumHints();
bool ok;
int idx = val.toInt(&ok);
if (!ok || idx < 0 || idx > int(hints.size()-1))
return KEXITV_MINIMUM_COLUMN_WIDTH;
- QString txt = hints.at( idx, &ok );
+ TQString txt = hints.at( idx, &ok );
if (!ok)
return KEXITV_MINIMUM_COLUMN_WIDTH;
return fm.width( txt );
}
-bool KexiComboBoxTableEdit::eventFilter( QObject *o, QEvent *e )
+bool KexiComboBoxTableEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if (!column()->isReadOnly() && e->type()==QEvent::MouseButtonPress && m_scrollView) {
- QPoint gp = static_cast<QMouseEvent*>(e)->globalPos()
- + QPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button));
- QRect r(d->button->mapToGlobal(d->button->geometry().topLeft()),
- d->button->mapToGlobal(d->button->geometry().bottomRight()));
- if (o==popup() && popup()->isVisible() && r.contains( gp )) {
+ if (!column()->isReadOnly() && e->type()==TQEvent::MouseButtonPress && m_scrollView) {
+ TQPoint gp = TQT_TQMOUSEEVENT(e)->globalPos()
+ + TQPoint(m_scrollView->childX(d->button), m_scrollView->childY(d->button));
+ TQRect r(d->button->mapToGlobal(d->button->tqgeometry().topLeft()),
+ d->button->mapToGlobal(d->button->tqgeometry().bottomRight()));
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(popup()) && popup()->isVisible() && r.tqcontains( gp )) {
m_mouseBtnPressedWhenPopupVisible = true;
}
}
return false;
}
-QSize KexiComboBoxTableEdit::totalSize() const
+TQSize KexiComboBoxTableEdit::totalSize() const
{
return d->totalSize;
}
-QWidget *KexiComboBoxTableEdit::internalEditor() const
+TQWidget *KexiComboBoxTableEdit::internalEditor() const
{
return m_lineedit;
}
@@ -394,37 +394,37 @@ void KexiComboBoxTableEdit::selectAll()
m_lineedit->selectAll();
}
-void KexiComboBoxTableEdit::setValueInInternalEditor(const QVariant& value)
+void KexiComboBoxTableEdit::setValueInInternalEditor(const TQVariant& value)
{
m_lineedit->setText(value.toString());
}
-QVariant KexiComboBoxTableEdit::valueFromInternalEditor()
+TQVariant KexiComboBoxTableEdit::valueFromInternalEditor()
{
return m_lineedit->text();
}
-QPoint KexiComboBoxTableEdit::mapFromParentToGlobal(const QPoint& pos) const
+TQPoint KexiComboBoxTableEdit::mapFromParentToGlobal(const TQPoint& pos) const
{
KexiTableView *tv = dynamic_cast<KexiTableView*>(m_scrollView);
if (!tv)
- return QPoint(-1,-1);
+ return TQPoint(-1,-1);
return tv->viewport()->mapToGlobal(pos);
}
int KexiComboBoxTableEdit::popupWidthHint() const
{
- return m_lineedit->width() + m_leftMargin + m_rightMarginWhenFocused; //QMAX(popup()->width(), d->currentEditorWidth);
+ return m_lineedit->width() + m_leftMargin + m_rightMarginWhenFocused; //TQMAX(popup()->width(), d->currentEditorWidth);
}
-void KexiComboBoxTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiComboBoxTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(value);
//! @todo does not work with BLOBs!
- qApp->clipboard()->setText( visibleValue.toString() );
+ tqApp->clipboard()->setText( visibleValue.toString() );
}
-void KexiComboBoxTableEdit::handleAction(const QString& actionName)
+void KexiComboBoxTableEdit::handleAction(const TQString& actionName)
{
const bool alreadyVisible = m_lineedit->isVisible();
@@ -434,7 +434,7 @@ void KexiComboBoxTableEdit::handleAction(const QString& actionName)
m_lineedit->clear();
}
//! @todo does not work with BLOBs!
- setValueInInternalEditor( qApp->clipboard()->text() );
+ setValueInInternalEditor( tqApp->tqclipboard()->text() );
}
else
KexiInputTableEdit::handleAction(actionName);
diff --git a/kexi/widget/tableview/kexicomboboxtableedit.h b/kexi/widget/tableview/kexicomboboxtableedit.h
index 713fa55ea..7b8a7339e 100644
--- a/kexi/widget/tableview/kexicomboboxtableedit.h
+++ b/kexi/widget/tableview/kexicomboboxtableedit.h
@@ -37,9 +37,10 @@ class KexiTableViewColumn;
class KexiComboBoxTableEdit : public KexiInputTableEdit, public KexiComboBoxBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiComboBoxTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiComboBoxTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiComboBoxTableEdit();
//! Implemented for KexiComboBoxBase
@@ -49,55 +50,55 @@ class KexiComboBoxTableEdit : public KexiInputTableEdit, public KexiComboBoxBase
virtual KexiDB::Field *field() const { return m_column->field(); }
//! Implemented for KexiComboBoxBase
- virtual QVariant origValue() const { return m_origValue; }
+ virtual TQVariant origValue() const { return m_origValue; }
- virtual void setValueInternal(const QVariant& add, bool removeOld)
+ virtual void setValueInternal(const TQVariant& add, bool removeOld)
{ KexiComboBoxBase::setValueInternal(add, removeOld); }
- virtual QVariant value() { return KexiComboBoxBase::value(); }
+ virtual TQVariant value() { return KexiComboBoxBase::value(); }
virtual void clear();
virtual bool valueChanged();
- virtual QVariant visibleValue();
+ virtual TQVariant visibleValue();
/*! Reimplemented: resizes a view(). */
virtual void resize(int w, int h);
- virtual void showFocus( const QRect& r, bool readOnly );
+ virtual void showFocus( const TQRect& r, bool readOnly );
virtual void hideFocus();
- virtual void paintFocusBorders( QPainter *p, QVariant &cal, int x, int y, int w, int h );
+ virtual void paintFocusBorders( TQPainter *p, TQVariant &cal, int x, int y, int w, int h );
/*! Setups contents of the cell. As a special case, if there is lookup field schema
defined, \a val already contains the visible value (usually the text)
set by \ref KexiTableView::paintcell(), so there is noo need to lookup the value
in the combo box's popup. */
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
/*! Used to handle key press events for the item. */
- virtual bool handleKeyPress( QKeyEvent *ke, bool editorActive );
+ virtual bool handleKeyPress( TQKeyEvent *ke, bool editorActive );
- virtual int widthForValue( QVariant &val, const QFontMetrics &fm );
+ virtual int widthForValue( TQVariant &val, const TQFontMetrics &fm );
virtual void hide();
virtual void show();
/*! \return total size of this editor, including popup button. */
- virtual QSize totalSize() const;
+ virtual TQSize totalSize() const;
virtual void createInternalEditor(KexiDB::QuerySchema& schema);
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Reimplemented after KexiInputTableEdit.
For a special case (combo box), \a visibleValue can be provided,
so it can be copied to the clipboard instead of unreadable \a value. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
public slots:
//! Implemented for KexiDataItemInterface
@@ -113,19 +114,19 @@ class KexiComboBoxTableEdit : public KexiInputTableEdit, public KexiComboBoxBase
void slotButtonClicked();
void slotRowAccepted(KexiTableItem *item, int row) { KexiComboBoxBase::slotRowAccepted(item, row); }
void slotItemSelected(KexiTableItem* item) { KexiComboBoxBase::slotItemSelected(item); }
- void slotInternalEditorValueChanged(const QVariant& v)
+ void slotInternalEditorValueChanged(const TQVariant& v)
{ KexiComboBoxBase::slotInternalEditorValueChanged(v); }
- void slotLineEditTextChanged(const QString& s);
+ void slotLineEditTextChanged(const TQString& s);
void slotPopupHidden();
protected:
//! internal
- void updateFocus( const QRect& r );
+ void updateFocus( const TQRect& r );
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Implemented for KexiComboBoxBase
- virtual QWidget *internalEditor() const;
+ virtual TQWidget *internalEditor() const;
//! Implemented for KexiComboBoxBase
virtual void moveCursorToEndInInternalEditor();
@@ -134,10 +135,10 @@ class KexiComboBoxTableEdit : public KexiInputTableEdit, public KexiComboBoxBase
virtual void selectAllInInternalEditor();
//! Implemented for KexiComboBoxBase
- virtual void setValueInInternalEditor(const QVariant& value);
+ virtual void setValueInInternalEditor(const TQVariant& value);
//! Implemented for KexiComboBoxBase
- virtual QVariant valueFromInternalEditor();
+ virtual TQVariant valueFromInternalEditor();
//! Implemented for KexiComboBoxBase
virtual void editRequested() { KexiInputTableEdit::editRequested(); }
@@ -146,7 +147,7 @@ class KexiComboBoxTableEdit : public KexiInputTableEdit, public KexiComboBoxBase
virtual void acceptRequested() { KexiInputTableEdit::acceptRequested(); }
//! Implemented for KexiComboBoxBase
- virtual QPoint mapFromParentToGlobal(const QPoint& pos) const;
+ virtual TQPoint mapFromParentToGlobal(const TQPoint& pos) const;
//! Implemented for KexiComboBoxBase
virtual int popupWidthHint() const;
diff --git a/kexi/widget/tableview/kexidataawareobjectiface.cpp b/kexi/widget/tableview/kexidataawareobjectiface.cpp
index 59edbed36..5c90eb060 100644
--- a/kexi/widget/tableview/kexidataawareobjectiface.cpp
+++ b/kexi/widget/tableview/kexidataawareobjectiface.cpp
@@ -25,9 +25,9 @@
#include "kexidataawareobjectiface.h"
-#include <qscrollview.h>
-#include <qlabel.h>
-#include <qtooltip.h>
+#include <tqscrollview.h>
+#include <tqlabel.h>
+#include <tqtooltip.h>
#include <kmessagebox.h>
@@ -79,13 +79,13 @@ KexiDataAwareObjectInterface::KexiDataAwareObjectInterface()
m_recentSearchDirection = KexiSearchAndReplaceViewInterface::Options::DefaultSearchDirection;
// setup scrollbar tooltip and related members
- m_scrollBarTip = new QLabel("",0, "vScrollBarToolTip",
- Qt::WStyle_Customize |Qt::WStyle_NoBorder|Qt::WX11BypassWM|Qt::WStyle_StaysOnTop|Qt::WStyle_Tool);
- m_scrollBarTip->setPalette(QToolTip::palette());
+ m_scrollBarTip = new TQLabel("",0, "vScrollBarToolTip",
+ TQt::WStyle_Customize |TQt::WStyle_NoBorder|TQt::WX11BypassWM|TQt::WStyle_StaysOnTop|TQt::WStyle_Tool);
+ m_scrollBarTip->setPalette(TQToolTip::palette());
m_scrollBarTip->setMargin(2);
m_scrollBarTip->setIndent(0);
- m_scrollBarTip->setAlignment(Qt::AlignCenter);
- m_scrollBarTip->setFrameStyle( QFrame::Plain | QFrame::Box );
+ m_scrollBarTip->tqsetAlignment(TQt::AlignCenter);
+ m_scrollBarTip->setFrameStyle( TQFrame::Plain | TQFrame::Box );
m_scrollBarTip->setLineWidth(1);
clearVariables();
@@ -142,7 +142,7 @@ void KexiDataAwareObjectInterface::setData( KexiTableViewData *data, bool owner
wid=KEXI_DEFAULT_DATA_COLUMN_WIDTH;//default col width in pixels
//! @todo add col width configuration and storage
addHeaderColumn(it.current()->isHeaderTextVisible()
- ? it.current()->captionAliasOrName() : QString::null,
+ ? it.current()->captionAliasOrName() : TQString(),
f->description(), it.current()->icon(), wid);
}
}
@@ -158,29 +158,29 @@ void KexiDataAwareObjectInterface::setData( KexiTableViewData *data, bool owner
if (m_data && !theSameData) {
//! @todo: store sorting settings?
setSorting(-1);
-// connect(m_data, SIGNAL(refreshRequested()), this, SLOT(slotRefreshRequested()));
- connectToReloadDataSlot(m_data, SIGNAL(reloadRequested()));
- QObject* thisObject = dynamic_cast<QObject*>(this);
+// connect(m_data, TQT_SIGNAL(refreshRequested()), this, TQT_SLOT(slotRefreshRequested()));
+ connectToReloadDataSlot(m_data, TQT_SIGNAL(reloadRequested()));
+ TQObject* thisObject = dynamic_cast<TQObject*>(this);
if (thisObject) {
- QObject::connect(m_data, SIGNAL(destroying()), thisObject, SLOT(slotDataDestroying()));
- QObject::connect(m_data, SIGNAL(rowsDeleted( const QValueList<int> & )),
- thisObject, SLOT(slotRowsDeleted( const QValueList<int> & )));
- QObject::connect(m_data, SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
- thisObject, SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
- QObject::connect(m_data, SIGNAL(rowDeleted()), thisObject, SLOT(slotRowDeleted()));
- QObject::connect(m_data, SIGNAL(rowInserted(KexiTableItem*,bool)),
- thisObject, SLOT(slotRowInserted(KexiTableItem*,bool)));
- QObject::connect(m_data, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- thisObject, SLOT(slotRowInserted(KexiTableItem*,uint,bool))); //not db-aware
- QObject::connect(m_data, SIGNAL(rowRepaintRequested(KexiTableItem&)),
- thisObject, SLOT(slotRowRepaintRequested(KexiTableItem&)));
+ TQObject::connect(m_data, TQT_SIGNAL(destroying()), thisObject, TQT_SLOT(slotDataDestroying()));
+ TQObject::connect(m_data, TQT_SIGNAL(rowsDeleted( const TQValueList<int> & )),
+ thisObject, TQT_SLOT(slotRowsDeleted( const TQValueList<int> & )));
+ TQObject::connect(m_data, TQT_SIGNAL(aboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)),
+ thisObject, TQT_SLOT(slotAboutToDeleteRow(KexiTableItem&,KexiDB::ResultInfo*,bool)));
+ TQObject::connect(m_data, TQT_SIGNAL(rowDeleted()), thisObject, TQT_SLOT(slotRowDeleted()));
+ TQObject::connect(m_data, TQT_SIGNAL(rowInserted(KexiTableItem*,bool)),
+ thisObject, TQT_SLOT(slotRowInserted(KexiTableItem*,bool)));
+ TQObject::connect(m_data, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ thisObject, TQT_SLOT(slotRowInserted(KexiTableItem*,uint,bool))); //not db-aware
+ TQObject::connect(m_data, TQT_SIGNAL(rowRepaintRequested(KexiTableItem&)),
+ thisObject, TQT_SLOT(slotRowRepaintRequested(KexiTableItem&)));
// setup scrollbar's tooltip
- QObject::connect(verticalScrollBar(),SIGNAL(sliderReleased()),
- thisObject,SLOT(vScrollBarSliderReleased()));
- QObject::connect(verticalScrollBar(),SIGNAL(valueChanged(int)),
- thisObject,SLOT(vScrollBarValueChanged(int)));
- QObject::connect(&m_scrollBarTipTimer,SIGNAL(timeout()),
- thisObject,SLOT(scrollBarTipTimeout()));
+ TQObject::connect(verticalScrollBar(),TQT_SIGNAL(sliderReleased()),
+ thisObject,TQT_SLOT(vScrollBarSliderReleased()));
+ TQObject::connect(verticalScrollBar(),TQT_SIGNAL(valueChanged(int)),
+ thisObject,TQT_SLOT(vScrollBarValueChanged(int)));
+ TQObject::connect(&m_scrollBarTipTimer,TQT_SIGNAL(timeout()),
+ thisObject,TQT_SLOT(scrollBarTipTimeout()));
}
}
@@ -214,7 +214,7 @@ void KexiDataAwareObjectInterface::setData( KexiTableViewData *data, bool owner
void KexiDataAwareObjectInterface::initDataContents()
{
m_editor = 0;
-// QSize s(tableSize());
+// TQSize s(tableSize());
// resizeContents(s.width(),s.height());
m_navPanel->setRecordCount(rows());
@@ -306,7 +306,7 @@ bool KexiDataAwareObjectInterface::sort()
return true;
}
if (m_currentItem != m_insertItem) {
- m_curRow = m_data->findRef(m_currentItem);
+ m_curRow = m_data->tqfindRef(m_currentItem);
int jump = m_curRow - oldRow;
if (jump<0)
(*m_itemIterator) -= -jump;
@@ -440,20 +440,20 @@ void KexiDataAwareObjectInterface::setSpreadSheetMode()
void KexiDataAwareObjectInterface::selectNextRow()
{
- selectRow( QMIN( rows() - 1 +(isInsertingEnabled()?1:0), m_curRow + 1 ) );
+ selectRow( TQMIN( rows() - 1 +(isInsertingEnabled()?1:0), m_curRow + 1 ) );
}
void KexiDataAwareObjectInterface::selectPrevPage()
{
selectRow(
- QMAX( 0, m_curRow - rowsPerPage() )
+ TQMAX( 0, m_curRow - rowsPerPage() )
);
}
void KexiDataAwareObjectInterface::selectNextPage()
{
selectRow(
- QMIN(
+ TQMIN(
rows() - 1 + (isInsertingEnabled()?1:0),
m_curRow + rowsPerPage()
)
@@ -480,7 +480,7 @@ void KexiDataAwareObjectInterface::selectRow(int row)
void KexiDataAwareObjectInterface::selectPrevRow()
{
- selectRow( QMAX( 0, m_curRow - 1 ) );
+ selectRow( TQMAX( 0, m_curRow - 1 ) );
}
void KexiDataAwareObjectInterface::clearSelection()
@@ -524,23 +524,23 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo
if(col>=0)
{
- newcol = QMAX(0, col);
- newcol = QMIN(columns() - 1, newcol);
+ newcol = TQMAX(0, col);
+ newcol = TQMIN(columns() - 1, newcol);
}
else {
newcol = m_curCol; //no changes
- newcol = QMAX(0, newcol); //may not be < 0 !
+ newcol = TQMAX(0, newcol); //may not be < 0 !
}
- newrow = QMAX(0, row);
- newrow = QMIN(rows() - 1 + (isInsertingEnabled()?1:0), newrow);
+ newrow = TQMAX(0, row);
+ newrow = TQMIN(rows() - 1 + (isInsertingEnabled()?1:0), newrow);
// d->pCurrentItem = itemAt(d->curRow);
// kdDebug(44021) << "setCursorPosition(): d->curRow=" << d->curRow << " oldRow=" << oldRow << " d->curCol=" << d->curCol << " oldCol=" << oldCol << endl;
if ( forceSet || m_curRow != newrow || m_curCol != newcol )
{
- kexidbg << "setCursorPosition(): " <<QString("old:%1,%2 new:%3,%4").arg(m_curCol)
- .arg(m_curRow).arg(newcol).arg(newrow) << endl;
+ kexidbg << "setCursorPosition(): " <<TQString("old:%1,%2 new:%3,%4").tqarg(m_curCol)
+ .tqarg(m_curRow).tqarg(newcol).tqarg(newrow) << endl;
// cursor moved: get rid of editor
if (m_editor) {
@@ -549,7 +549,7 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo
return;
}
//update row num. again
- newrow = QMIN( rows() - 1 + (isInsertingEnabled()?1:0), newrow);
+ newrow = TQMIN( rows() - 1 + (isInsertingEnabled()?1:0), newrow);
}
}
if (m_errorMessagePopup) {
@@ -574,7 +574,7 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo
return;
}
//update row number, because number of rows changed
- newrow = QMIN( rows() - 1 + (isInsertingEnabled()?1:0), newrow);
+ newrow = TQMIN( rows() - 1 + (isInsertingEnabled()?1:0), newrow);
m_navPanel->setCurrentRecordNumber(newrow+1); //refresh
}
@@ -621,7 +621,7 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo
// //quite clever: ensure the cell is visible:
// ensureCellVisible(m_curRow, m_curCol);
-// QPoint pcenter = QRect( columnPos(d->curCol), rowPos(d->curRow), columnWidth(d->curCol), rh).center();
+// TQPoint pcenter = TQRect( columnPos(d->curCol), rowPos(d->curRow), columnWidth(d->curCol), rh).center();
// ensureVisible(pcenter.x(), pcenter.y(), columnWidth(d->curCol)/2, rh/2);
// ensureVisible(columnPos(d->curCol), rowPos(d->curRow) - contentsY(), columnWidth(d->curCol), rh);
@@ -644,8 +644,8 @@ void KexiDataAwareObjectInterface::setCursorPosition(int row, int col/*=-1*/, bo
m_currentItem = m_insertItem;
}
else {
- kdDebug(44021) << QString("NOW item at %1 (%2) is current")
- .arg(m_curRow).arg((ulong)itemAt(m_curRow)) << endl;
+ kdDebug(44021) << TQString("NOW item at %1 (%2) is current")
+ .tqarg(m_curRow).tqarg((ulong)itemAt(m_curRow)) << endl;
//NOT EFFECTIVE!!!!!!!!!!!
//set item iterator
if (!newRowInserted && isInsertingEnabled() && m_currentItem == m_insertItem && m_curRow == (rows()-1)) {
@@ -710,7 +710,7 @@ bool KexiDataAwareObjectInterface::acceptRowEdit()
// bool allow = true;
// int faultyColumn = -1; // will be !=-1 if cursor has to be moved to that column
const bool inserting = m_newRowEditing;
-// QString msg, desc;
+// TQString msg, desc;
// bool inserting = d->pInsertItem && d->pInsertItem==d->pCurrentItem;
if (m_data->rowEditBuffer()->isEmpty() && !m_newRowEditing) {
@@ -838,8 +838,8 @@ bool KexiDataAwareObjectInterface::cancelRowEdit()
// viewport()->width(), d->rowHeight*3 + (m_navPanel ? m_navPanel->height() : 0)*3 );
// updateContents(); //js: above did not work well so we do that dirty
updateWidgetContents();
-//TODO: still doesn't repaint properly!!
-// QSize s(tableSize());
+//TODO: still doesn't tqrepaint properly!!
+// TQSize s(tableSize());
// resizeContents(s.width(), s.height());
updateWidgetContentsSize();
// m_verticalHeader->update();
@@ -890,17 +890,17 @@ bool KexiDataAwareObjectInterface::cancelEditor()
}
//! @internal
-class KexiDataAwareObjectInterfaceToolTip : public QToolTip {
+class KexiDataAwareObjectInterfaceToolTip : public TQToolTip {
public:
- KexiDataAwareObjectInterfaceToolTip( const QString & text, const QPoint & pos, QWidget * widget )
- : QToolTip(widget), m_text(text)
+ KexiDataAwareObjectInterfaceToolTip( const TQString & text, const TQPoint & pos, TQWidget * widget )
+ : TQToolTip(widget), m_text(text)
{
- tip( QRect(pos, QSize(100, 100)), text );
+ tip( TQRect(pos, TQSize(100, 100)), text );
}
- virtual void maybeTip(const QPoint & p) {
- tip( QRect(p, QSize(100, 100)), m_text);
+ virtual void maybeTip(const TQPoint & p) {
+ tip( TQRect(p, TQSize(100, 100)), m_text);
}
- QString m_text;
+ TQString m_text;
};
bool KexiDataAwareObjectInterface::acceptEditor()
@@ -912,12 +912,12 @@ bool KexiDataAwareObjectInterface::acceptEditor()
m_inside_acceptEditor = true;//avoid recursion
- QVariant newval;
+ TQVariant newval;
Validator::Result res = Validator::Ok;
- QString msg, desc;
+ TQString msg, desc;
bool setNull = false;
// bool allow = true;
-// static const QString msg_NOT_NULL = i18n("\"%1\" column requires a value to be entered.");
+// static const TQString msg_NOT_NULL = i18n("\"%1\" column requires a value to be entered.");
//autoincremented field can be omitted (left as null or empty) if we're inserting a new row
const bool autoIncColumnCanBeOmitted = m_newRowEditing && m_editor->field()->isAutoIncrement();
@@ -931,19 +931,19 @@ bool KexiDataAwareObjectInterface::acceptEditor()
//used e.g. for date or time values - the value can be null but not necessary invalid
res = Validator::Error;
editCurrentCellAgain = true;
- QWidget *par = dynamic_cast<QScrollView*>(this) ? dynamic_cast<QScrollView*>(this)->viewport() :
- dynamic_cast<QWidget*>(this);
- QWidget *edit = dynamic_cast<QWidget*>(m_editor);
+ TQWidget *par = dynamic_cast<TQScrollView*>(this) ? dynamic_cast<TQScrollView*>(this)->viewport() :
+ dynamic_cast<TQWidget*>(this);
+ TQWidget *edit = dynamic_cast<TQWidget*>(m_editor);
if (par && edit) {
//! @todo allow displaying user-defined warning
//! @todo also use for other error messages
if (!m_errorMessagePopup) {
// m_errorMessagePopup->close();
m_errorMessagePopup = new KexiArrowTip(
- i18n("Error: %1").arg(m_editor->columnInfo()->field->typeName())+"?",
- dynamic_cast<QWidget*>(this));
+ i18n("Error: %1").tqarg(m_editor->columnInfo()->field->typeName())+"?",
+ dynamic_cast<TQWidget*>(this));
m_errorMessagePopup->move(
- par->mapToGlobal(edit->pos()) + QPoint(6, edit->height() + 0) );
+ par->mapToGlobal(edit->pos()) + TQPoint(6, edit->height() + 0) );
m_errorMessagePopup->show();
}
m_editor->setFocus();
@@ -954,8 +954,8 @@ bool KexiDataAwareObjectInterface::acceptEditor()
if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) {
kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NULL NOT ALLOWED!" << endl;
res = Validator::Error;
-// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+ "\n\n" + Kexi::msgYouCanImproveData();
desc = i18n("The column's constraint is declared as NOT NULL.");
editCurrentCellAgain = true;
@@ -976,8 +976,8 @@ bool KexiDataAwareObjectInterface::acceptEditor()
if (m_editor->field()->isNotEmpty() && !autoIncColumnCanBeOmitted) {
kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): EMPTY NOT ALLOWED!" << endl;
res = Validator::Error;
-// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+ "\n\n" + Kexi::msgYouCanImproveData();
desc = i18n("The column's constraint is declared as NOT EMPTY.");
editCurrentCellAgain = true;
@@ -994,8 +994,8 @@ bool KexiDataAwareObjectInterface::acceptEditor()
if (m_editor->field()->isNotNull() && !autoIncColumnCanBeOmitted) {
kdDebug() << "KexiDataAwareObjectInterface::acceptEditor(): NEITHER NULL NOR EMPTY VALUE CAN BE SET!" << endl;
res = Validator::Error;
-// msg = Validator::msgColumnNotEmpty().arg(m_editor->columnInfo()->field->captionOrName())
- msg = Validator::msgColumnNotEmpty().arg(m_editor->field()->captionOrName())
+// msg = Validator::msgColumnNotEmpty().tqarg(m_editor->columnInfo()->field->captionOrName())
+ msg = Validator::msgColumnNotEmpty().tqarg(m_editor->field()->captionOrName())
+ "\n\n" + Kexi::msgYouCanImproveData();
desc = i18n("The column's constraint is declared as NOT EMPTY and NOT NULL.");
editCurrentCellAgain = true;
@@ -1064,16 +1064,16 @@ bool KexiDataAwareObjectInterface::acceptEditor()
if (res == Validator::Error) {
if (!msg.isEmpty()) {
if (desc.isEmpty())
- KMessageBox::sorry(dynamic_cast<QWidget*>(this), msg);
+ KMessageBox::sorry(dynamic_cast<TQWidget*>(this), msg);
else
- KMessageBox::detailedSorry(dynamic_cast<QWidget*>(this), msg, desc);
+ KMessageBox::detailedSorry(dynamic_cast<TQWidget*>(this), msg, desc);
}
editCurrentCellAgain = true;
// allow = false;
}
else if (res == Validator::Warning) {
//js: todo: message!!!
- KMessageBox::messageBox(dynamic_cast<QWidget*>(this), KMessageBox::Sorry, msg + "\n" + desc);
+ KMessageBox::messageBox(dynamic_cast<TQWidget*>(this), KMessageBox::Sorry, msg + "\n" + desc);
editCurrentCellAgain = true;
}
@@ -1083,7 +1083,7 @@ bool KexiDataAwareObjectInterface::acceptEditor()
// emit aboutToChangeCell(d->pCurrentItem, newval, allow);
// if (allow) {
//send changes to the backend
- QVariant visibleValue;
+ TQVariant visibleValue;
if (!newval.isNull()/* visible value should be null if value is null */
&& currentTVColumn->visibleLookupColumnInfo)
{
@@ -1139,13 +1139,13 @@ bool KexiDataAwareObjectInterface::acceptEditor()
m_editor->showWidget();
m_editor->setFocus();
}
-// startEditCurrentCell(newval.type()==QVariant::String ? newval.toString() : QString::null);
+// startEditCurrentCell(newval.type()==TQVariant::String ? newval.toString() : TQString());
// m_editor->setFocus();
}
return false;
}
-void KexiDataAwareObjectInterface::startEditCurrentCell(const QString &setText)
+void KexiDataAwareObjectInterface::startEditCurrentCell(const TQString &setText)
{
kdDebug() << "** KexiDataAwareObjectInterface::startEditCurrentCell("<<setText<<")"<<endl;
// if (columnType(d->curCol) == KexiDB::Field::Boolean)
@@ -1180,7 +1180,7 @@ void KexiDataAwareObjectInterface::deleteAndStartEditCurrentCell()
// columnWidth(m_curCol), rowHeight());
//OK?
ensureCellVisible(m_curRow+1, m_curCol);
- createEditor(m_curRow, m_curCol, QString::null, false/*removeOld*/);
+ createEditor(m_curRow, m_curCol, TQString(), false/*removeOld*/);
if (!m_editor)
return;
m_editor->clear();
@@ -1208,7 +1208,7 @@ void KexiDataAwareObjectInterface::deleteCurrentRow()
case ImmediateDelete:
break;
case AskDelete:
- if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<QWidget*>(this),
+ if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<TQWidget*>(this),
i18n("Do you want to delete selected row?"), 0,
KGuiItem(i18n("&Delete Row"),"editdelete"),
"dontAskBeforeDeleteRow"/*config entry*/,
@@ -1251,7 +1251,7 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row)
m_curRow++;
}
- m_data->insertRow(*newItem, row, true /*repaint*/);
+ m_data->insertRow(*newItem, row, true /*tqrepaint*/);
if (changeCurrentRow) {
//update iter...
@@ -1259,7 +1259,7 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row)
(*m_itemIterator)+=m_curRow;
}
/*
- QSize s(tableSize());
+ TQSize s(tableSize());
resizeContents(s.width(),s.height());
//redraw only this row and below:
@@ -1281,15 +1281,15 @@ void KexiDataAwareObjectInterface::insertItem(KexiTableItem *newItem, int row)
*/
}
-void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool repaint)
+void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem *item, bool tqrepaint)
{
- int row = m_data->findRef(item);
- slotRowInserted( item, row, repaint );
+ int row = m_data->tqfindRef(item);
+ slotRowInserted( item, row, tqrepaint );
}
-void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool repaint)
+void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uint row, bool tqrepaint)
{
- if (repaint && (int)row<rows()) {
+ if (tqrepaint && (int)row<rows()) {
updateWidgetContentsSize();
/* updateAllVisibleRowsBelow() used instead
@@ -1317,7 +1317,7 @@ void KexiDataAwareObjectInterface::slotRowInserted(KexiTableItem * /*item*/, uin
}
}
-tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint)
+tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool tqrepaint)
{
if (!hasData())
return true;
@@ -1325,13 +1325,13 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint)
return true;
if (ask) {
- QString tableName = m_data->dbTableName();
+ TQString tableName = m_data->dbTableName();
if (!tableName.isEmpty()) {
tableName.prepend(" \"");
tableName.append("\"");
}
- if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<QWidget*>(this),
- i18n("Do you want to clear the contents of table %1?").arg(tableName),
+ if (KMessageBox::Cancel == KMessageBox::warningContinueCancel(dynamic_cast<TQWidget*>(this),
+ i18n("Do you want to clear the contents of table %1?").tqarg(tableName),
0, KGuiItem(i18n("&Clear Contents")) ))
return cancelled;
}
@@ -1339,10 +1339,10 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint)
cancelRowEdit();
// acceptRowEdit();
// m_verticalHeader->clear();
- const bool repaintLater = repaint && m_spreadSheetMode;
+ const bool tqrepaintLater = tqrepaint && m_spreadSheetMode;
const int oldRows = rows();
- bool res = m_data->deleteAllRows(repaint && !repaintLater);
+ bool res = m_data->deleteAllRows(tqrepaint && !tqrepaintLater);
if (res) {
if (m_spreadSheetMode) {
@@ -1352,28 +1352,28 @@ tristate KexiDataAwareObjectInterface::deleteAllRows(bool ask, bool repaint)
}
}
}
- if (repaintLater)
+ if (tqrepaintLater)
m_data->reload();
// d->clearVariables();
// m_verticalHeader->setCurrentRow(-1);
// d->pUpdateTimer->start(1,true);
-// if (repaint)
-// viewport()->repaint();
+// if (tqrepaint)
+// viewport()->tqrepaint();
return res;
}
-void KexiDataAwareObjectInterface::clearColumns(bool repaint)
+void KexiDataAwareObjectInterface::clearColumns(bool tqrepaint)
{
cancelRowEdit();
m_data->clearInternal();
- clearColumnsInternal(repaint);
+ clearColumnsInternal(tqrepaint);
updateIndicesForVisibleValues();
- if (repaint)
-// viewport()->repaint();
+ if (tqrepaint)
+// viewport()->tqrepaint();
//OK?
updateWidgetContents();
@@ -1393,7 +1393,7 @@ void KexiDataAwareObjectInterface::clearColumns(bool repaint)
m_verticalHeader->setCurrentRow(-1);
- viewport()->repaint();
+ viewport()->tqrepaint();
// d->pColumnTypes.resize(0);
// d->pColumnModes.resize(0);
@@ -1419,7 +1419,7 @@ void KexiDataAwareObjectInterface::reloadData()
if (m_verticalHeader)
m_verticalHeader->setCurrentRow(-1);
- if (dynamic_cast<QWidget*>(this) && dynamic_cast<QWidget*>(this)->isVisible())
+ if (dynamic_cast<TQWidget*>(this) && dynamic_cast<TQWidget*>(this)->isVisible())
initDataContents();
else
m_initDataContentsOnShow = true;
@@ -1456,9 +1456,9 @@ int KexiDataAwareObjectInterface::dataColumns() const
return m_data->columns.count();
}
-QVariant KexiDataAwareObjectInterface::columnDefaultValue(int /*col*/) const
+TQVariant KexiDataAwareObjectInterface::columnDefaultValue(int /*col*/) const
{
- return QVariant(0);
+ return TQVariant(0);
//TODO(js)
// return m_data->columns[col].defaultValue;
}
@@ -1490,10 +1490,10 @@ void KexiDataAwareObjectInterface::setEmptyRowInsertingEnabled(bool set)
}
void KexiDataAwareObjectInterface::slotAboutToDeleteRow(KexiTableItem& item,
- KexiDB::ResultInfo* /*result*/, bool repaint)
+ KexiDB::ResultInfo* /*result*/, bool tqrepaint)
{
- if (repaint) {
- m_rowWillBeDeleted = m_data->findRef(&item);
+ if (tqrepaint) {
+ m_rowWillBeDeleted = m_data->tqfindRef(&item);
}
}
@@ -1529,12 +1529,12 @@ bool KexiDataAwareObjectInterface::deleteItem(KexiTableItem *item)/*, bool moveC
if (!item || !beforeDeleteItem(item))
return false;
- QString msg, desc;
+ TQString msg, desc;
// bool current = (item == d->pCurrentItem);
const bool lastRowDeleted = m_spreadSheetMode && m_data->last() == item; //we need to know this so we
//can return to the last row
//after reinserting it
- if (!m_data->deleteRow(*item, true /*repaint*/)) {
+ if (!m_data->deleteRow(*item, true /*tqrepaint*/)) {
/*const int button =*/
showErrorMessageForResult( m_data->result() );
// if (KMessageBox::No == button) {
@@ -1547,7 +1547,7 @@ bool KexiDataAwareObjectInterface::deleteItem(KexiTableItem *item)/*, bool moveC
//d->pCurrentItem = m_data->current();
}
-// repaintAfterDelete();
+// tqrepaintAfterDelete();
if (m_spreadSheetMode) { //append empty row for spreadsheet mode
m_data->append(m_data->createItem());//new KexiTableItem(m_data->columns.count()));
if (m_verticalHeader)
@@ -1572,7 +1572,7 @@ bool KexiDataAwareObjectInterface::hasDefaultValueAt(const KexiTableViewColumn&
return false;
}
-const QVariant* KexiDataAwareObjectInterface::bufferedValueAt(int col, bool useDefaultValueIfPossible)
+const TQVariant* KexiDataAwareObjectInterface::bufferedValueAt(int col, bool useDefaultValueIfPossible)
{
if (m_rowEditing && m_data->rowEditBuffer())
{
@@ -1585,17 +1585,17 @@ const QVariant* KexiDataAwareObjectInterface::bufferedValueAt(int col, bool useD
"fieldNumberForColumn(m_curCol) < 0" << endl;
return 0;
}
- QVariant *storedValue = &m_currentItem->at( realFieldNumber );
+ TQVariant *storedValue = &m_currentItem->at( realFieldNumber );
//db-aware data: now, try to find a buffered value (or default one)
- const QVariant *cv = m_data->rowEditBuffer()->at( *tvcol->columnInfo,
+ const TQVariant *cv = m_data->rowEditBuffer()->at( *tvcol->columnInfo,
storedValue->isNull() && useDefaultValueIfPossible);
if (cv)
return cv;
return storedValue;
}
//not db-aware data:
- const QVariant *cv = m_data->rowEditBuffer()->at( tvcol->field()->name() );
+ const TQVariant *cv = m_data->rowEditBuffer()->at( tvcol->field()->name() );
if (cv)
return cv;
}
@@ -1632,8 +1632,8 @@ void KexiDataAwareObjectInterface::boolToggled()
updateCell(m_curRow, m_curCol);
/* int s = m_currentItem->at(m_curCol).toInt();
- QVariant oldValue=m_currentItem->at(m_curCol);
- (*m_currentItem)[m_curCol] = QVariant(s ? 0 : 1);
+ TQVariant oldValue=m_currentItem->at(m_curCol);
+ (*m_currentItem)[m_curCol] = TQVariant(s ? 0 : 1);
updateCell(m_curRow, m_curCol);
// emit itemChanged(m_currentItem, m_curRow, m_curCol, oldValue);
// emit itemChanged(m_currentItem, m_curRow, m_curCol);*/
@@ -1660,7 +1660,7 @@ void KexiDataAwareObjectInterface::addNewRecordRequested()
m_editor->setFocus();
}
-bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int &curCol,
+bool KexiDataAwareObjectInterface::handleKeyPress(TQKeyEvent *e, int &curRow, int &curCol,
bool fullRowSelection, bool *moveToFirstField, bool *moveToLastField)
{
if (moveToFirstField)
@@ -1672,23 +1672,23 @@ bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int
const int k = e->key();
//kdDebug() << "-----------" << e->state() << " " << k << endl;
- if ((k == Qt::Key_Up && nobtn) || (k == Qt::Key_PageUp && e->state()==Qt::ControlButton)) {
+ if ((k == TQt::Key_Up && nobtn) || (k == TQt::Key_PageUp && e->state()==TQt::ControlButton)) {
selectPrevRow();
e->accept();
}
- else if ((k == Qt::Key_Down && nobtn) || (k == Qt::Key_PageDown && e->state()==Qt::ControlButton)) {
+ else if ((k == TQt::Key_Down && nobtn) || (k == TQt::Key_PageDown && e->state()==TQt::ControlButton)) {
selectNextRow();
e->accept();
}
- else if (k == Qt::Key_PageUp && nobtn) {
+ else if (k == TQt::Key_PageUp && nobtn) {
selectPrevPage();
e->accept();
}
- else if (k == Qt::Key_PageDown && nobtn) {
+ else if (k == TQt::Key_PageDown && nobtn) {
selectNextPage();
e->accept();
}
- else if (k == Qt::Key_Home) {
+ else if (k == TQt::Key_Home) {
if (fullRowSelection) {
//we're in row-selection mode: home key always moves to 1st row
curRow = 0;//to 1st row
@@ -1697,7 +1697,7 @@ bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int
if (nobtn) {
curCol = 0;//to 1st col
}
- else if (e->state()==Qt::ControlButton) {
+ else if (e->state()==TQt::ControlButton) {
curRow = 0;//to 1st row and col
curCol = 0;
}
@@ -1709,7 +1709,7 @@ bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int
//do not accept yet
e->ignore();
}
- else if (k == Qt::Key_End) {
+ else if (k == TQt::Key_End) {
if (fullRowSelection) {
//we're in row-selection mode: home key always moves to last row
curRow = m_data->count()-1+(isInsertingEnabled()?1:0);//to last row
@@ -1718,7 +1718,7 @@ bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int
if (nobtn) {
curCol = columns()-1;//to last col
}
- else if (e->state()==Qt::ControlButton) {
+ else if (e->state()==TQt::ControlButton) {
curRow = m_data->count()-1 /*+(isInsertingEnabled()?1:0)*/; //to last row and col
curCol = columns()-1;//to last col
}
@@ -1730,8 +1730,8 @@ bool KexiDataAwareObjectInterface::handleKeyPress(QKeyEvent *e, int &curRow, int
//do not accept yet
e->ignore();
}
- else if (isInsertingEnabled() && (e->state()==Qt::ControlButton && k == Qt::Key_Equal
- || e->state()==(Qt::ControlButton|Qt::ShiftButton) && k == Qt::Key_Equal)) {
+ else if (isInsertingEnabled() && (e->state()==TQt::ControlButton && k == TQt::Key_Equal
+ || e->state()==(TQt::ControlButton|TQt::ShiftButton) && k == TQt::Key_Equal)) {
curRow = m_data->count(); //to the new row
curCol = 0;//to first col
if (moveToFirstField)
@@ -1752,19 +1752,19 @@ void KexiDataAwareObjectInterface::vScrollBarValueChanged(int v)
return;
if (m_scrollbarToolTipsEnabled) {
- const QRect r( verticalScrollBar()->sliderRect() );
+ const TQRect r( verticalScrollBar()->sliderRect() );
const int row = lastVisibleRow()+1;
if (row<=0) {
m_scrollBarTipTimer.stop();
m_scrollBarTip->hide();
return;
}
- m_scrollBarTip->setText( i18n("Row: ") + QString::number(row) );
+ m_scrollBarTip->setText( i18n("Row: ") + TQString::number(row) );
m_scrollBarTip->adjustSize();
- QWidget* thisWidget = dynamic_cast<QWidget*>(this);
+ TQWidget* thisWidget = dynamic_cast<TQWidget*>(this);
m_scrollBarTip->move(
thisWidget->mapToGlobal( r.topLeft() + verticalScrollBar()->pos() )
- + QPoint( - m_scrollBarTip->width()-5,
+ + TQPoint( - m_scrollBarTip->width()-5,
r.height()/2 - m_scrollBarTip->height()/2) );
if (verticalScrollBar()->draggingSlider()) {
kdDebug(44021) << " draggingSlider() " << endl;
@@ -1783,7 +1783,7 @@ void KexiDataAwareObjectInterface::vScrollBarValueChanged(int v)
}
}
//update bottom view region
-/* if (m_navPanel && (contentsHeight() - contentsY() - clipper()->height()) <= QMAX(d->rowHeight,m_navPanel->height())) {
+/* if (m_navPanel && (contentsHeight() - contentsY() - clipper()->height()) <= TQMAX(d->rowHeight,m_navPanel->height())) {
slotUpdate();
triggerUpdate();
}*/
@@ -1819,7 +1819,7 @@ void KexiDataAwareObjectInterface::scrollBarTipTimeout()
m_scrollBarTipTimerCnt=0;
}
-void KexiDataAwareObjectInterface::focusOutEvent(QFocusEvent* e)
+void KexiDataAwareObjectInterface::focusOutEvent(TQFocusEvent* e)
{
Q_UNUSED(e);
m_scrollBarTipTimer.stop();
@@ -1830,12 +1830,12 @@ void KexiDataAwareObjectInterface::focusOutEvent(QFocusEvent* e)
int KexiDataAwareObjectInterface::showErrorMessageForResult(KexiDB::ResultInfo* resultInfo)
{
- QWidget *thisWidget = dynamic_cast<QWidget*>(this);
+ TQWidget *thisWidget = dynamic_cast<TQWidget*>(this);
if (resultInfo->allowToDiscardChanges) {
return KMessageBox::questionYesNo(thisWidget, resultInfo->msg
- + (resultInfo->desc.isEmpty() ? QString::null : ("\n"+resultInfo->desc)),
- QString::null,
- KGuiItem(i18n("Correct Changes", "Correct"), QString::null, i18n("Correct changes")),
+ + (resultInfo->desc.isEmpty() ? TQString() : ("\n"+resultInfo->desc)),
+ TQString(),
+ KGuiItem(i18n("Correct Changes", "Correct"), TQString(), i18n("Correct changes")),
KGuiItem(i18n("Discard Changes")) );
}
@@ -1873,7 +1873,7 @@ void KexiDataAwareObjectInterface::updateIndicesForVisibleValues()
means then the last character. \a firstCharacter == INT_MAX means "before first" place, so searching fails
immediately.
On success, true is returned and \a firstCharacter is set to position of the matched string. */
-static inline bool findInString(const QString& stringValue, int stringLength, const QString& where,
+static inline bool findInString(const TQString& stringValue, int stringLength, const TQString& where,
int& firstCharacter, bool matchAnyPartOfField, bool matchWholeField,
bool caseSensitive, bool wholeWordsOnly, bool forward)
{
@@ -1888,7 +1888,7 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
if (wholeWordsOnly) {
const int whereLength = where.length();
while (true) {
- pos = where.find( stringValue, pos, caseSensitive );
+ pos = where.tqfind( stringValue, pos, caseSensitive );
if (pos == -1)
break;
if ((pos > 0 && where.at(pos-1).isLetterOrNumber())
@@ -1902,7 +1902,7 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
firstCharacter = pos;
}
else {// !wholeWordsOnly
- firstCharacter = where.find( stringValue, pos, caseSensitive );
+ firstCharacter = where.tqfind( stringValue, pos, caseSensitive );
}
return firstCharacter != -1;
}
@@ -1915,7 +1915,7 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
if (wholeWordsOnly) {
const int whereLength = where.length();
while (true) {
- pos = where.findRev( stringValue, pos, caseSensitive );
+ pos = where.tqfindRev( stringValue, pos, caseSensitive );
if (pos == -1)
break;
if ((pos > 0 && where.at(pos-1).isLetterOrNumber())
@@ -1932,7 +1932,7 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
firstCharacter = pos;
}
else {// !wholeWordsOnly
- firstCharacter = where.findRev( stringValue, pos, caseSensitive );
+ firstCharacter = where.tqfindRev( stringValue, pos, caseSensitive );
}
return firstCharacter != -1;
}
@@ -1950,7 +1950,7 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
if (firstCharacter != -1 && firstCharacter != 0) { //we're not at 0-th char
firstCharacter = -1;
}
- else if (where.startsWith(stringValue, caseSensitive)) {
+ else if (where.tqstartsWith(stringValue, caseSensitive)) {
if (wholeWordsOnly) {
// If where.length() < stringValue.length(), true will be returned too - fine.
return !where.at( stringValue.length() ).isLetterOrNumber();
@@ -1962,12 +1962,12 @@ static inline bool findInString(const QString& stringValue, int stringLength, co
return false;
}
-tristate KexiDataAwareObjectInterface::find(const QVariant& valueToFind,
+tristate KexiDataAwareObjectInterface::tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next)
{
if (!hasData())
return cancelled;
- const QVariant prevSearchedValue( m_recentlySearchedValue );
+ const TQVariant prevSearchedValue( m_recentlySearchedValue );
m_recentlySearchedValue = valueToFind;
const KexiSearchAndReplaceViewInterface::Options::SearchDirection prevSearchDirection = m_recentSearchDirection;
m_recentSearchDirection = options.searchDirection;
@@ -2049,7 +2049,7 @@ tristate KexiDataAwareObjectInterface::find(const QVariant& valueToFind,
firstColumn = columnNumber;
lastColumn = columnNumber;
}
- const QString stringValue( caseSensitive ? valueToFind.toString() : valueToFind.toString().lower() );
+ const TQString stringValue( caseSensitive ? valueToFind.toString() : valueToFind.toString().lower() );
const int stringLength = stringValue.length();
// search
@@ -2059,7 +2059,7 @@ tristate KexiDataAwareObjectInterface::find(const QVariant& valueToFind,
for (; forward ? col <= lastColumn : col >= lastColumn;
col = forward ? (col+1) : (col-1))
{
- const QVariant cell( item->at( m_indicesForVisibleValues[ col ] ) );
+ const TQVariant cell( item->at( m_indicesForVisibleValues[ col ] ) );
if (findInString(stringValue, stringLength, cell.toString(), firstCharacter,
matchAnyPartOfField, matchWholeField, caseSensitive, wholeWordsOnly, forward))
{
@@ -2092,7 +2092,7 @@ tristate KexiDataAwareObjectInterface::find(const QVariant& valueToFind,
}
tristate KexiDataAwareObjectInterface::findNextAndReplace(
- const QVariant& valueToFind, const QVariant& replacement,
+ const TQVariant& valueToFind, const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll)
{
Q_UNUSED(replacement);
diff --git a/kexi/widget/tableview/kexidataawareobjectiface.h b/kexi/widget/tableview/kexidataawareobjectiface.h
index 4cf2aa6ae..e6e9a3579 100644
--- a/kexi/widget/tableview/kexidataawareobjectiface.h
+++ b/kexi/widget/tableview/kexidataawareobjectiface.h
@@ -26,16 +26,16 @@
#ifndef KEXIDATAAWAREOBJECTINTERFACE_H
#define KEXIDATAAWAREOBJECTINTERFACE_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <widget/utils/kexiarrowtip.h>
#include <kexisearchandreplaceiface.h>
#include "kexitableviewdata.h"
-class QObject;
-class QScrollBar;
+class TQObject;
+class TQScrollBar;
class KPopupMenu;
class KexiTableItem;
class KexiTableViewData;
@@ -54,7 +54,7 @@ namespace KexiDB {
//! \brief The KexiDataAwareObjectInterface is an interface for record-based data object.
/** This interface is implemented by KexiTableView and KexiFormView
and used by KexiDataAwareView. If yu're implementing this interface,
- add KEXI_DATAAWAREOBJECTINTERFACE convenience macro just after Q_OBJECT.
+ add KEXI_DATAAWAREOBJECTINTERFACE convenience macro just after TQ_OBJECT.
You should add following code to your destructor so data is deleted:
\code
@@ -267,14 +267,14 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
Does not clear columns information.
Does not destroy KexiTableViewData object (if present) but only clears its contents.
Displays confirmation dialog if \a ask is true (the default is false).
- Repaints widget if \a repaint is true (the default).
+ Repaints widget if \a tqrepaint is true (the default).
For empty tables, true is returned immediately.
If isDeleteEnabled() is false, false is returned.
For spreadsheet mode all current rows are just replaced by empty rows.
\return true on success, false on failure, and cancelled if user cancelled deletion
(only possible if \a ask is true).
*/
- tristate deleteAllRows(bool ask = false, bool repaint = true);
+ tristate deleteAllRows(bool ask = false, bool tqrepaint = true);
/*! \return maximum number of rows that can be displayed per one "page"
for current view's size. */
@@ -356,7 +356,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
virtual bool acceptEditor();
//! Creates editors and shows it, what usually means the beginning of a cell editing
- virtual void createEditor(int row, int col, const QString& addText = QString::null,
+ virtual void createEditor(int row, int col, const TQString& addText = TQString(),
bool removeOld = false) = 0;
/*! Used when Return key is pressed on cell, the cell has been double clicked
@@ -365,7 +365,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
was displayed (in this case, \a setText is usually not empty, what means
that text will be set in the cell replacing previous value).
*/
- virtual void startEditCurrentCell(const QString& setText = QString::null);
+ virtual void startEditCurrentCell(const TQString& setText = TQString());
/*! Deletes currently selected cell's contents, if allowed.
In most cases delete is not accepted immediately but "row editing" mode is just started. */
@@ -386,13 +386,13 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
bool hasDefaultValueAt(const KexiTableViewColumn& tvcol);
- const QVariant* bufferedValueAt(int col, bool useDefaultValueIfPossible = true);
+ const TQVariant* bufferedValueAt(int col, bool useDefaultValueIfPossible = true);
//! \return a type of column \a col - one of KexiDB::Field::Type
int columnType(int col);
//! \return default value for column \a col
- QVariant columnDefaultValue(int col) const;
+ TQVariant columnDefaultValue(int col) const;
/*! \return true is column \a col is editable.
Default implementation takes information about 'readOnly' flag from data member.
@@ -408,7 +408,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
//! signals
virtual void itemChanged(KexiTableItem *, int row, int col) = 0;
- virtual void itemChanged(KexiTableItem *, int row, int col, QVariant oldValue) = 0;
+ virtual void itemChanged(KexiTableItem *, int row, int col, TQVariant oldValue) = 0;
virtual void itemDeleteRequest(KexiTableItem *, int row, int col) = 0;
virtual void currentItemDeleteRequest() = 0;
//! Emitted for spreadsheet mode when an item was deleted and a new item has been appended
@@ -446,22 +446,22 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
we're starting to edit the cell and inverting it's state. */
virtual void boolToggled();
- virtual void connectCellSelectedSignal(const QObject* receiver,
+ virtual void connectCellSelectedSignal(const TQObject* receiver,
const char* intIntMember) = 0;
- virtual void connectRowEditStartedSignal(const QObject* receiver,
+ virtual void connectRowEditStartedSignal(const TQObject* receiver,
const char* intMember) = 0;
- virtual void connectRowEditTerminatedSignal(const QObject* receiver,
+ virtual void connectRowEditTerminatedSignal(const TQObject* receiver,
const char* voidMember) = 0;
- virtual void connectReloadActionsSignal(const QObject* receiver,
+ virtual void connectReloadActionsSignal(const TQObject* receiver,
const char* voidMember) = 0;
- virtual void connectDataSetSignal(const QObject* receiver,
+ virtual void connectDataSetSignal(const TQObject* receiver,
const char* kexiTableViewDataMember) = 0;
- virtual void connectToReloadDataSlot(const QObject* sender,
+ virtual void connectToReloadDataSlot(const TQObject* sender,
const char* voidSignal) = 0;
virtual void slotDataDestroying();
@@ -490,7 +490,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
\return true if value has been found, false if value has not been found,
and cancelled if there is nothing to find or there is no data to search in. */
- virtual tristate find(const QVariant& valueToFind,
+ virtual tristate tqfind(const TQVariant& valueToFind,
const KexiSearchAndReplaceViewInterface::Options& options, bool next);
/*! Finds \a valueToFind within the data items and replaces with \a replacement
@@ -499,12 +499,12 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
has not been found and replaced, and cancelled if there is nothing
to find or there is no data to search in or the data is read only.
If \a replaceAll is true, all found values are replaced. */
- virtual tristate findNextAndReplace(const QVariant& valueToFind,
- const QVariant& replacement,
+ virtual tristate findNextAndReplace(const TQVariant& valueToFind,
+ const TQVariant& replacement,
const KexiSearchAndReplaceViewInterface::Options& options, bool replaceAll);
/*! \return vertical scrollbar */
- virtual QScrollBar* verticalScrollBar() const = 0;
+ virtual TQScrollBar* verticalScrollBar() const = 0;
/*! Used in KexiTableView::keyPressEvent() (and in continuous forms).
\return true when the key press event \e was consumed.
@@ -523,7 +523,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
can be other than the very first field in the form.
Used by KexiTableView::keyPressEvent() and KexiTableView::keyPressEvent(). */
- virtual bool handleKeyPress(QKeyEvent *e, int &curRow, int &curCol, bool fullRowSelection,
+ virtual bool handleKeyPress(TQKeyEvent *e, int &curRow, int &curCol, bool fullRowSelection,
bool *moveToFirstField = 0, bool *moveToLastField = 0);
protected:
@@ -537,18 +537,18 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
virtual void initDataContents();
/*! Clears columns information and thus all internal table data
- and its visible representation. Repaints widget if \a repaint is true. */
- virtual void clearColumns(bool repaint = true);
+ and its visible representation. Repaints widget if \a tqrepaint is true. */
+ virtual void clearColumns(bool tqrepaint = true);
/*! Called by clearColumns() to clear internals of the object.
For example, KexiTableView removes contents of it's horizontal header. */
- virtual void clearColumnsInternal(bool repaint) = 0;
+ virtual void clearColumnsInternal(bool tqrepaint) = 0;
/*! @internal for implementation
This should append another section within horizontal header or any sort of caption
for a field using provided names. \a width is a hint for new field's width. */
- virtual void addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int size) = 0;
+ virtual void addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int size) = 0;
/*! @internal for implementation
\return sorting order (within GUI): -1: descending, 1: ascending, 0: no sorting.
@@ -630,11 +630,11 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
/*! Updates contents of the widget. Just call update() here on your widget. */
virtual void updateWidgetContents() = 0;
- /*! Updates widget's contents size e.g. using QScrollView::resizeContents(). */
+ /*! Updates widget's contents size e.g. using TQScrollView::resizeContents(). */
virtual void updateWidgetContentsSize() = 0;
/*! Updates scrollbars of the widget.
- QScrollView::updateScrollbars() will be usually called here. */
+ TQScrollView::updateScrollbars() will be usually called here. */
virtual void updateWidgetScrollBars() = 0;
/*! @internal
@@ -654,18 +654,18 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
//! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result,
- bool repaint);
+ bool tqrepaint);
- //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
+ //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed.
virtual void slotRowDeleted();
- //! Handles KexiTableViewData::rowInserted() signal to repaint when needed.
- virtual void slotRowInserted(KexiTableItem *item, bool repaint);
+ //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed.
+ virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint);
//! Like above, not db-aware version
- virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint);
+ virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint);
- virtual void slotRowsDeleted( const QValueList<int> & ) {}
+ virtual void slotRowsDeleted( const TQValueList<int> & ) {}
//! for sanity checks (return true if m_data is present; else: outputs warning)
inline bool hasData() const;
@@ -675,12 +675,12 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
virtual void selectCellInternal() {}
/*! Used in KexiDataAwareObjectInterface::slotRowDeleted()
- to repaint tow \a row and all visible below.
+ to tqrepaint tow \a row and all visible below.
Implemented if there is more than one row displayed, i.e. currently for KexiTableView. */
virtual void updateAllVisibleRowsBelow(int row) { Q_UNUSED( row ); }
//! Call this from the subclass. */
- virtual void focusOutEvent(QFocusEvent* e);
+ virtual void focusOutEvent(TQFocusEvent* e);
/*! Handles verticalScrollBar()'s valueChanged(int) signal.
Called when vscrollbar's value has been changed.
@@ -705,7 +705,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
This is per-interface global cache.
Needed for faster lookup because there could be lookup values.
Called whenever columns definition changes, i.e. in setData() and clearColumns().
- @see find() */
+ @see tqfind() */
void updateIndicesForVisibleValues();
//! data structure displayed for this object
@@ -833,7 +833,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
int m_rowWillBeDeleted;
/*! Displays passive error popup label used when invalid data has been entered. */
- QGuardedPtr<KexiArrowTip> m_errorMessagePopup;
+ TQGuardedPtr<KexiArrowTip> m_errorMessagePopup;
/*! Used to enable/disable execution of vScrollBarValueChanged()
when users navigate through rows using keyboard, so vscrollbar tooltips are not visible. */
@@ -842,8 +842,8 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
/*! True, if vscrollbar tooltips are enabled (true by default). */
bool m_scrollbarToolTipsEnabled : 1;
- QLabel* m_scrollBarTip; //!< scrollbar tooltip
- QTimer m_scrollBarTipTimer; //!< scrollbar tooltip's timer
+ TQLabel* m_scrollBarTip; //!< scrollbar tooltip
+ TQTimer m_scrollBarTipTimer; //!< scrollbar tooltip's timer
uint m_scrollBarTipTimerCnt; //!< helper for timeout counting (scrollbar tooltip)
//! Used to mark recently found value
@@ -856,19 +856,19 @@ class KEXIDATATABLE_EXPORT KexiDataAwareObjectInterface
bool exists : 1;
};
- /*! Used to mark recently found value. Updated on succesful execution of find().
+ /*! Used to mark recently found value. Updated on succesful execution of tqfind().
If the current cursor's position changes, or data in the current cell changes,
positionOfRecentlyFoundValue.exists is set to false. */
PositionOfValue m_positionOfRecentlyFoundValue;
/*! Used to compare whether we're looking for new value. */
- QVariant m_recentlySearchedValue;
+ TQVariant m_recentlySearchedValue;
/*! Used to compare whether the search direction has changed. */
KexiSearchAndReplaceViewInterface::Options::SearchDirection m_recentSearchDirection;
- //! Setup by updateIndicesForVisibleValues() and used by find()
- QValueVector<uint> m_indicesForVisibleValues;
+ //! Setup by updateIndicesForVisibleValues() and used by tqfind()
+ TQValueVector<uint> m_indicesForVisibleValues;
};
inline bool KexiDataAwareObjectInterface::hasData() const
@@ -895,24 +895,24 @@ inline KexiTableItem *KexiDataAwareObjectInterface::itemAt(int row) const
//! Convenience macro used for KexiDataAwareObjectInterface implementations.
#define KEXI_DATAAWAREOBJECTINTERFACE \
public: \
- void connectCellSelectedSignal(const QObject* receiver, const char* intIntMember) { \
- connect(this, SIGNAL(cellSelected(int,int)), receiver, intIntMember); \
+ void connectCellSelectedSignal(const TQObject* receiver, const char* intIntMember) { \
+ connect(this, TQT_SIGNAL(cellSelected(int,int)), receiver, intIntMember); \
} \
- void connectRowEditStartedSignal(const QObject* receiver, const char* intMember) { \
- connect(this, SIGNAL(rowEditStarted(int)), receiver, intMember); \
+ void connectRowEditStartedSignal(const TQObject* receiver, const char* intMember) { \
+ connect(this, TQT_SIGNAL(rowEditStarted(int)), receiver, intMember); \
} \
- void connectRowEditTerminatedSignal(const QObject* receiver, const char* voidMember) { \
- connect(this, SIGNAL(rowEditTerminated(int)), receiver, voidMember); \
+ void connectRowEditTerminatedSignal(const TQObject* receiver, const char* voidMember) { \
+ connect(this, TQT_SIGNAL(rowEditTerminated(int)), receiver, voidMember); \
} \
- void connectReloadActionsSignal(const QObject* receiver, const char* voidMember) { \
- connect(this, SIGNAL(reloadActions()), receiver, voidMember); \
+ void connectReloadActionsSignal(const TQObject* receiver, const char* voidMember) { \
+ connect(this, TQT_SIGNAL(reloadActions()), receiver, voidMember); \
} \
- void connectDataSetSignal(const QObject* receiver, \
+ void connectDataSetSignal(const TQObject* receiver, \
const char* kexiTableViewDataMember) { \
- connect(this, SIGNAL(dataSet(KexiTableViewData*)), receiver, kexiTableViewDataMember); \
+ connect(this, TQT_SIGNAL(dataSet(KexiTableViewData*)), receiver, kexiTableViewDataMember); \
} \
- void connectToReloadDataSlot(const QObject* sender, const char* voidSignal) { \
- connect(sender, voidSignal, this, SLOT(reloadData())); \
+ void connectToReloadDataSlot(const TQObject* sender, const char* voidSignal) { \
+ connect(sender, voidSignal, this, TQT_SLOT(reloadData())); \
}
#endif
diff --git a/kexi/widget/tableview/kexidataawarepropertyset.cpp b/kexi/widget/tableview/kexidataawarepropertyset.cpp
index 92fda11e5..7d49ec522 100644
--- a/kexi/widget/tableview/kexidataawarepropertyset.cpp
+++ b/kexi/widget/tableview/kexidataawarepropertyset.cpp
@@ -28,19 +28,19 @@
KexiDataAwarePropertySet::KexiDataAwarePropertySet(KexiViewBase *view,
KexiDataAwareObjectInterface* dataObject)
- : QObject( view, QCString(view->name())+"KexiDataAwarePropertySet" )
+ : TQObject( view, TQCString(view->name())+"KexiDataAwarePropertySet" )
, m_view(view)
, m_dataObject(dataObject)
, m_row(-99)
{
m_sets.setAutoDelete(true);
-// connect(m_dataObject, SIGNAL(dataSet(KexiTableViewData*)),
-// this, SLOT(slotDataSet(KexiTableViewData*)));
- m_dataObject->connectDataSetSignal(this, SLOT(slotDataSet(KexiTableViewData*)));
-// connect(m_dataObject, SIGNAL(cellSelected(int,int)),
-// this, SLOT(slotCellSelected(int,int)));
- m_dataObject->connectCellSelectedSignal(this, SLOT(slotCellSelected(int,int)));
+// connect(m_dataObject, TQT_SIGNAL(dataSet(KexiTableViewData*)),
+// this, TQT_SLOT(slotDataSet(KexiTableViewData*)));
+ m_dataObject->connectDataSetSignal(this, TQT_SLOT(slotDataSet(KexiTableViewData*)));
+// connect(m_dataObject, TQT_SIGNAL(cellSelected(int,int)),
+// this, TQT_SLOT(slotCellSelected(int,int)));
+ m_dataObject->connectCellSelectedSignal(this, TQT_SLOT(slotCellSelected(int,int)));
//
slotDataSet( m_dataObject->data() );
const bool wasDirty = view->dirty();
@@ -61,13 +61,13 @@ void KexiDataAwarePropertySet::slotDataSet( KexiTableViewData *data )
}
m_currentTVData = data;
if (!m_currentTVData.isNull()) {
- connect(m_currentTVData, SIGNAL(rowDeleted()), this, SLOT(slotRowDeleted()));
- connect(m_currentTVData, SIGNAL(rowsDeleted( const QValueList<int> & )),
- this, SLOT(slotRowsDeleted( const QValueList<int> & )));
- connect(m_currentTVData, SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
- this, SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
- connect(m_currentTVData, SIGNAL(reloadRequested()),
- this, SLOT(slotReloadRequested()));
+ connect(m_currentTVData, TQT_SIGNAL(rowDeleted()), this, TQT_SLOT(slotRowDeleted()));
+ connect(m_currentTVData, TQT_SIGNAL(rowsDeleted( const TQValueList<int> & )),
+ this, TQT_SLOT(slotRowsDeleted( const TQValueList<int> & )));
+ connect(m_currentTVData, TQT_SIGNAL(rowInserted(KexiTableItem*,uint,bool)),
+ this, TQT_SLOT(slotRowInserted(KexiTableItem*,uint,bool)));
+ connect(m_currentTVData, TQT_SIGNAL(reloadRequested()),
+ this, TQT_SLOT(slotReloadRequested()));
}
}
@@ -92,10 +92,10 @@ uint KexiDataAwarePropertySet::size() const
return m_sets.size();
}
-void KexiDataAwarePropertySet::clear(uint minimumSize)
+void KexiDataAwarePropertySet::clear(uint tqminimumSize)
{
m_sets.clear();
- m_sets.resize(QMAX(minimumSize, MAX_FIELDS));
+ m_sets.resize(TQMAX(tqminimumSize, MAX_FIELDS));
m_view->setDirty(true);
m_view->propertySetSwitched();
}
@@ -111,14 +111,14 @@ void KexiDataAwarePropertySet::insert(uint row, KoProperty::Set* set, bool newOn
kexiwarn << "KexiDataAwarePropertySet::insert() invalid args: rew="<< row<< " propertyset="<< set<< endl;
return;
}
- if (set->parent() && set->parent()!=this) {
- kexiwarn << "KexiDataAwarePropertySet::insert() propertyset's parent must be NULL or this KexiDataAwarePropertySet" << endl;
+ if (set->tqparent() && set->tqparent()!=this) {
+ kexiwarn << "KexiDataAwarePropertySet::insert() propertyset's tqparent must be NULL or this KexiDataAwarePropertySet" << endl;
return;
}
m_sets.insert(row, set);
- connect(set, SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), m_view, SLOT(setDirty()));
+ connect(set, TQT_SIGNAL(propertyChanged(KoProperty::Set&, KoProperty::Property&)), m_view, TQT_SLOT(setDirty()));
if (newOne) {
//add a special property indicating that this is brand new set,
@@ -159,14 +159,14 @@ void KexiDataAwarePropertySet::slotRowDeleted()
emit rowDeleted();
}
-void KexiDataAwarePropertySet::slotRowsDeleted( const QValueList<int> &rows )
+void KexiDataAwarePropertySet::slotRowsDeleted( const TQValueList<int> &rows )
{
//let's move most property sets up & delete unwanted
m_sets.setAutoDelete(false);//to avoid auto deleting in insert()
const int orig_size = size();
int prev_r = -1;
int num_removed = 0, cur_r = -1;
- for (QValueList<int>::ConstIterator r_it = rows.constBegin(); r_it!=rows.constEnd() && *r_it < orig_size; ++r_it) {
+ for (TQValueList<int>::ConstIterator r_it = rows.constBegin(); r_it!=rows.constEnd() && *r_it < orig_size; ++r_it) {
cur_r = *r_it;// - num_removed;
if (prev_r>=0) {
// kdDebug() << "move " << prev_r+num_removed-1 << ".." << cur_r-1 << " to " << prev_r+num_removed-1 << ".." << cur_r-2 << endl;
@@ -206,7 +206,7 @@ void KexiDataAwarePropertySet::slotRowsDeleted( const QValueList<int> &rows )
}
//void KexiDataAwarePropertySet::slotEmptyRowInserted(KexiTableItem*, uint /*index*/)
-void KexiDataAwarePropertySet::slotRowInserted(KexiTableItem*, uint row, bool /*repaint*/)
+void KexiDataAwarePropertySet::slotRowInserted(KexiTableItem*, uint row, bool /*tqrepaint*/)
{
m_view->setDirty();
@@ -238,18 +238,18 @@ KoProperty::Set* KexiDataAwarePropertySet::findPropertySetForItem(KexiTableItem&
{
if (m_currentTVData.isNull())
return 0;
- int idx = m_currentTVData->findRef(&item);
+ int idx = m_currentTVData->tqfindRef(&item);
if (idx<0)
return 0;
return m_sets[idx];
}
-int KexiDataAwarePropertySet::findRowForPropertyValue(const QCString& propertyName, const QVariant& value)
+int KexiDataAwarePropertySet::findRowForPropertyValue(const TQCString& propertyName, const TQVariant& value)
{
const int size = m_sets.size();
for (int i=0; i<size; i++) {
KoProperty::Set *set = m_sets[i];
- if (!set || !set->contains(propertyName))
+ if (!set || !set->tqcontains(propertyName))
continue;
if (set->property(propertyName).value() == value)
return i;
diff --git a/kexi/widget/tableview/kexidataawarepropertyset.h b/kexi/widget/tableview/kexidataawarepropertyset.h
index cee55da04..8d6212c40 100644
--- a/kexi/widget/tableview/kexidataawarepropertyset.h
+++ b/kexi/widget/tableview/kexidataawarepropertyset.h
@@ -20,11 +20,11 @@
#ifndef KEXIDATAAWAREPROPERTYSET_H
#define KEXIDATAAWAREPROPERTYSET_H
-#include <qguardedptr.h>
-#include <qptrvector.h>
+#include <tqguardedptr.h>
+#include <tqptrvector.h>
#include <koproperty/set.h>
-typedef QPtrVector<KoProperty::Set> SetVector;
+typedef TQPtrVector<KoProperty::Set> SetVector;
class KexiViewBase;
class KexiTableItem;
@@ -50,9 +50,10 @@ class KexiDataAwareObjectInterface;
- signalling via KexiViewBase::propertySetSwitched() that current property
set has changed (e.g. on moving to other row)
*/
-class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
+class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/*! You can instantiate KexiDataAwarePropertySet object
@@ -80,7 +81,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
/*! \return number of the first row containing \a propertyName property equal to \a value.
This is used e.g. in the Table Designer to find a row by field name.
If no such row has been found, -1 is returned. */
- int findRowForPropertyValue(const QCString& propertyName, const QVariant& value);
+ int findRowForPropertyValue(const TQCString& propertyName, const TQVariant& value);
signals:
/*! Emmited when row is deleted.
@@ -96,7 +97,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
public slots:
void removeCurrentPropertySet();
- void clear(uint minimumSize = 0);
+ void clear(uint tqminimumSize = 0);
/*! Inserts \a set property set at \a row position.
If there was a buffer at this position before, it will be destroyed.
@@ -106,7 +107,7 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
The property set \a set will be owned by this object, so you should not
delete this property set by hand but call removeCurrentPropertySet()
or remove(uint) instead.
- Note that property set's parent (QObject::parent()) must be null
+ Note that property set's tqparent (TQObject::tqparent()) must be null
or qual to this KexiDataAwarePropertySet object, otherwise this method
will fail with a warning.
*/
@@ -123,10 +124,10 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
void slotRowDeleted();
//! Called on multiple rows delete in a tableview.
- void slotRowsDeleted( const QValueList<int> &rows );
+ void slotRowsDeleted( const TQValueList<int> &rows );
//! Called on \a row insertion in a tableview.
- void slotRowInserted(KexiTableItem* item, uint row, bool repaint);
+ void slotRowInserted(KexiTableItem* item, uint row, bool tqrepaint);
//! Called on selecting another cell in a tableview.
void slotCellSelected(int, int row);
@@ -137,10 +138,10 @@ class KEXIDATATABLE_EXPORT KexiDataAwarePropertySet : public QObject
protected:
SetVector m_sets; //!< prop. sets vector
- QGuardedPtr<KexiViewBase> m_view;
+ TQGuardedPtr<KexiViewBase> m_view;
KexiDataAwareObjectInterface* m_dataObject;
-// QGuardedPtr<KexiTableView> m_tableView;
- QGuardedPtr<KexiTableViewData> m_currentTVData;
+// TQGuardedPtr<KexiTableView> m_tableView;
+ TQGuardedPtr<KexiTableViewData> m_currentTVData;
int m_row; //!< used to know if a new row is selected in slotCellSelected()
};
diff --git a/kexi/widget/tableview/kexidatatableview.cpp b/kexi/widget/tableview/kexidatatableview.cpp
index 9248e8901..7d7dbde67 100644
--- a/kexi/widget/tableview/kexidatatableview.cpp
+++ b/kexi/widget/tableview/kexidatatableview.cpp
@@ -19,8 +19,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -33,14 +33,14 @@
#include "kexidatatableview.h"
-KexiDataTableView::KexiDataTableView(QWidget *parent, const char *name)
- : KexiTableView(0, parent, name)
+KexiDataTableView::KexiDataTableView(TQWidget *tqparent, const char *name)
+ : KexiTableView(0, tqparent, name)
{
init();
}
-KexiDataTableView::KexiDataTableView(QWidget *parent, const char *name, KexiDB::Cursor *cursor)
- : KexiTableView(0, parent, name)
+KexiDataTableView::KexiDataTableView(TQWidget *tqparent, const char *name, KexiDB::Cursor *cursor)
+ : KexiTableView(0, tqparent, name)
{
init();
setData(cursor);
@@ -59,14 +59,14 @@ KexiDataTableView::init()
// m_records = 0;
// m_first = false;
-// connect(this, SIGNAL(contentsMoving(int, int)), this, SLOT(slotMoving(int)));
-// connect(verticalScrollBar(), SIGNAL(sliderMoved(int)), this, SLOT(slotMoving(int)));
+// connect(this, TQT_SIGNAL(contentsMoving(int, int)), this, TQT_SLOT(slotMoving(int)));
+// connect(verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), this, TQT_SLOT(slotMoving(int)));
}
/*void KexiDataTableView::initActions(KActionCollection *col)
{
KexiTableView::initActions(col);
- new KAction(i18n("Filter"), "filter", 0, this, SLOT(filter()), col, "tablepart_filter");
+ new KAction(i18n("Filter"), "filter", 0, this, TQT_SLOT(filter()), col, "tablepart_filter");
}*/
bool KexiDataTableView::setData(KexiDB::Cursor *cursor)
@@ -105,7 +105,7 @@ bool KexiDataTableView::setData(KexiDB::Cursor *cursor)
KexiTableViewData *tv_data = new KexiTableViewData(m_cursor);
- QString caption = m_cursor->query()->caption();
+ TQString caption = m_cursor->query()->caption();
if (caption.isEmpty())
caption = m_cursor->query()->name();
diff --git a/kexi/widget/tableview/kexidatatableview.h b/kexi/widget/tableview/kexidatatableview.h
index 6f4218947..7835289fa 100644
--- a/kexi/widget/tableview/kexidatatableview.h
+++ b/kexi/widget/tableview/kexidatatableview.h
@@ -25,7 +25,7 @@
#include "kexitableview.h"
class KexiTableItem;
-class QVariant;
+class TQVariant;
class KXMLGUIClient;
namespace KexiDB {
@@ -38,12 +38,13 @@ namespace KexiDB {
class KEXIDATATABLE_EXPORT KexiDataTableView : public KexiTableView
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* creates a blank widget
*/
- KexiDataTableView(QWidget *parent, const char *name =0);
+ KexiDataTableView(TQWidget *tqparent, const char *name =0);
/*! Creates a table widget and fills it using data from \a cursor.
Cursor will be opened (with open()) if it is not yet opened.
@@ -51,7 +52,7 @@ class KEXIDATATABLE_EXPORT KexiDataTableView : public KexiTableView
and Connection::executeQuery()), otherwise the table view remain not filled with data.
Cursor \a cursor will not be owned by this object.
*/
- KexiDataTableView(QWidget *parent, const char *name, KexiDB::Cursor *cursor);
+ KexiDataTableView(TQWidget *tqparent, const char *name, KexiDB::Cursor *cursor);
~KexiDataTableView();
@@ -88,7 +89,7 @@ class KEXIDATATABLE_EXPORT KexiDataTableView : public KexiTableView
//db stuff
KexiDB::Cursor *m_cursor;
-// QMap<KexiDBUpdateRecord*,KexiTableItem*> m_insertMapping;
+// TQMap<KexiDBUpdateRecord*,KexiTableItem*> m_insertMapping;
};
#endif
diff --git a/kexi/widget/tableview/kexidatetableedit.cpp b/kexi/widget/tableview/kexidatetableedit.cpp
index 8a1fbcaef..af71ae4c3 100644
--- a/kexi/widget/tableview/kexidatetableedit.cpp
+++ b/kexi/widget/tableview/kexidatetableedit.cpp
@@ -21,20 +21,20 @@
#include "kexidatetableedit.h"
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qrect.h>
-#include <qpalette.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
-#include <qdatetime.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qdatetimeedit.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqrect.h>
+#include <tqpalette.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
+#include <tqdatetime.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqdatetimeedit.h>
+#include <tqclipboard.h>
#include <kdebug.h>
#include <klocale.h>
@@ -48,12 +48,12 @@
#include <kexiutils/utils.h>
-KexiDateTableEdit::KexiDateTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiInputTableEdit(column, parent)
+KexiDateTableEdit::KexiDateTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiInputTableEdit(column, tqparent)
{
setName("KexiDateTableEdit");
-//! @todo add QValidator so date like "2006-59-67" cannot be even entered
+//! @todo add TQValidator so date like "2006-59-67" cannot be even entered
m_lineedit->setInputMask( m_formatter.inputMask() );
}
@@ -62,20 +62,20 @@ KexiDateTableEdit::~KexiDateTableEdit()
{
}
-void KexiDateTableEdit::setValueInInternalEditor(const QVariant &value)
+void KexiDateTableEdit::setValueInInternalEditor(const TQVariant &value)
{
if (value.isValid() && value.toDate().isValid())
m_lineedit->setText( m_formatter.dateToString( value.toDate() ) );
else
- m_lineedit->setText( QString::null );
+ m_lineedit->setText( TQString() );
}
-void KexiDateTableEdit::setValueInternal(const QVariant& add_, bool removeOld)
+void KexiDateTableEdit::setValueInternal(const TQVariant& add_, bool removeOld)
{
if (removeOld) {
//new date entering... just fill the line edit
//! @todo cut string if too long..
- QString add(add_.toString());
+ TQString add(add_.toString());
m_lineedit->setText(add);
m_lineedit->setCursorPosition(add.length());
return;
@@ -84,15 +84,15 @@ void KexiDateTableEdit::setValueInternal(const QVariant& add_, bool removeOld)
m_lineedit->setCursorPosition(0); //ok?
}
-void KexiDateTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+void KexiDateTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
Q_UNUSED(p);
Q_UNUSED(focused);
Q_UNUSED(x);
Q_UNUSED(w);
Q_UNUSED(h);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
y_offset = -1;
#else
y_offset = 0;
@@ -105,7 +105,7 @@ void KexiDateTableEdit::setupContents( QPainter *p, bool focused, const QVariant
bool KexiDateTableEdit::valueIsNull()
{
-// if (m_lineedit->text().replace(m_formatter.separator(),"").stripWhiteSpace().isEmpty())
+// if (m_lineedit->text().tqreplace(m_formatter.separator(),"").stripWhiteSpace().isEmpty())
if (m_formatter.isEmpty(m_lineedit->text())) //empty date is null
return true;
return dateValue().isNull();
@@ -116,12 +116,12 @@ bool KexiDateTableEdit::valueIsEmpty()
return valueIsNull();//js OK? TODO (nonsense?)
}
-QDate KexiDateTableEdit::dateValue() const
+TQDate KexiDateTableEdit::dateValue() const
{
return m_formatter.stringToDate( m_lineedit->text() );
}
-QVariant KexiDateTableEdit::value()
+TQVariant KexiDateTableEdit::value()
{
return m_formatter.stringToVariant( m_lineedit->text() );
}
@@ -133,21 +133,21 @@ bool KexiDateTableEdit::valueIsValid()
return m_formatter.stringToDate( m_lineedit->text() ).isValid();
}
-void KexiDateTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiDateTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
if (!value.isNull() && value.toDate().isValid())
- qApp->clipboard()->setText( m_formatter.dateToString(value.toDate()) );
+ tqApp->clipboard()->setText( m_formatter.dateToString(value.toDate()) );
else
- qApp->clipboard()->setText( QString::null );
+ tqApp->clipboard()->setText( TQString() );
}
-void KexiDateTableEdit::handleAction(const QString& actionName)
+void KexiDateTableEdit::handleAction(const TQString& actionName)
{
const bool alreadyVisible = m_lineedit->isVisible();
if (actionName=="edit_paste") {
- const QVariant newValue( m_formatter.stringToDate(qApp->clipboard()->text()) );
+ const TQVariant newValue( m_formatter.stringToDate(tqApp->clipboard()->text()) );
if (!alreadyVisible) { //paste as the entire text if the cell was not in edit mode
emit editRequested();
m_lineedit->clear();
@@ -160,16 +160,16 @@ void KexiDateTableEdit::handleAction(const QString& actionName)
/*
void
-KexiDateTableEdit::slotDateChanged(QDate date)
+KexiDateTableEdit::slotDateChanged(TQDate date)
{
m_edit->setDate(date);
- repaint();
+ tqrepaint();
}
void
KexiDateTableEdit::slotShowDatePicker()
{
- QDate date = m_edit->date();
+ TQDate date = m_edit->date();
m_datePicker->setDate(date);
m_datePicker->setFocus();
@@ -182,30 +182,30 @@ void KexiDateTableEdit::moveToFirstSection()
{
if (!m_dte_date_obj)
return;
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
if (m_dte_date)
m_dte_date->setFocusSection(0);
#else
-#ifdef Q_WS_WIN //tmp
- QKeyEvent ke_left(QEvent::KeyPress, Qt::Key_Left, 0, 0);
+#ifdef TQ_WS_WIN //tmp
+ TQKeyEvent ke_left(TQEvent::KeyPress, TQt::Key_Left, 0, 0);
for (int i=0; i<8; i++)
- QApplication::sendEvent( m_dte_date_obj, &ke_left );
+ TQApplication::sendEvent( m_dte_date_obj, &ke_left );
#endif
#endif
}
-bool KexiDateTableEdit::eventFilter( QObject *o, QEvent *e )
+bool KexiDateTableEdit::eventFilter( TQObject *o, TQEvent *e )
{
if (o==m_datePicker) {
kdDebug() << e->type() << endl;
switch (e->type()) {
- case QEvent::Hide:
+ case TQEvent::Hide:
m_datePickerPopupMenu->hide();
break;
- case QEvent::KeyPress:
- case QEvent::KeyRelease: {
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease: {
kdDebug() << "ok!" << endl;
- QKeyEvent *ke = (QKeyEvent *)e;
+ TQKeyEvent *ke = (TQKeyEvent *)e;
if (ke->key()==Key_Enter || ke->key()==Key_Return) {
//accepting picker
acceptDate();
@@ -224,27 +224,27 @@ bool KexiDateTableEdit::eventFilter( QObject *o, QEvent *e )
break;
}
}
-#ifdef Q_WS_WIN //tmp
- else if (e->type()==QEvent::FocusIn && o->parent() && o->parent()->parent()==m_edit
+#ifdef TQ_WS_WIN //tmp
+ else if (e->type()==TQEvent::FocusIn && o->tqparent() && o->tqparent()->tqparent()==m_edit
&& m_setNumberOnFocus >= 0 && m_dte_date_obj)
{
// there was a number character passed as 'add' parameter in init():
moveToFirstSection();
- QKeyEvent ke(QEvent::KeyPress, int(Qt::Key_0)+m_setNumberOnFocus,
- '0'+m_setNumberOnFocus, 0, QString::number(m_setNumberOnFocus));
- QApplication::sendEvent( m_dte_date_obj, &ke );
+ TQKeyEvent ke(TQEvent::KeyPress, int(TQt::Key_0)+m_setNumberOnFocus,
+ '0'+m_setNumberOnFocus, 0, TQString::number(m_setNumberOnFocus));
+ TQApplication::sendEvent( m_dte_date_obj, &ke );
m_setNumberOnFocus = -1;
}
#endif
-#ifdef QDateTimeEditor_HACK
- else if (e->type()==QEvent::KeyPress && m_dte_date) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if ((ke->key()==Qt::Key_Right && !m_sentEvent && cursorAtEnd())
- || (ke->key()==Qt::Key_Left && !m_sentEvent && cursorAtStart()))
+#ifdef TQDateTimeEditor_HACK
+ else if (e->type()==TQEvent::KeyPress && m_dte_date) {
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
+ if ((ke->key()==TQt::Key_Right && !m_sentEvent && cursorAtEnd())
+ || (ke->key()==TQt::Key_Left && !m_sentEvent && cursorAtStart()))
{
//the editor should send this key event:
m_sentEvent = true; //avoid recursion
- QApplication::sendEvent( this, ke );
+ TQApplication::sendEvent( this, ke );
m_sentEvent = false;
ke->ignore();
return true;
@@ -263,7 +263,7 @@ void KexiDateTableEdit::acceptDate()
bool KexiDateTableEdit::cursorAtStart()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus() && m_dte_date->focusSection()==0;
#else
return false;
@@ -272,7 +272,7 @@ bool KexiDateTableEdit::cursorAtStart()
bool KexiDateTableEdit::cursorAtEnd()
{
-#ifdef QDateTimeEditor_HACK
+#ifdef TQDateTimeEditor_HACK
return m_dte_date && m_edit->hasFocus()
&& m_dte_date->focusSection()==int(m_dte_date->sectionCount()-1);
#else
@@ -282,7 +282,7 @@ bool KexiDateTableEdit::cursorAtEnd()
void KexiDateTableEdit::clear()
{
- m_edit->setDate(QDate());
+ m_edit->setDate(TQDate());
}*/
KEXI_CELLEDITOR_FACTORY_ITEM_IMPL(KexiDateEditorFactoryItem, KexiDateTableEdit)
diff --git a/kexi/widget/tableview/kexidatetableedit.h b/kexi/widget/tableview/kexidatetableedit.h
index 4f2a4f594..aad46c4b7 100644
--- a/kexi/widget/tableview/kexidatetableedit.h
+++ b/kexi/widget/tableview/kexidatetableedit.h
@@ -26,7 +26,7 @@
#include <widget/utils/kexidatetimeformatter.h>
/*! @short Editor class for Date type.
- It is a replacement QDateEdit due to usability problems:
+ It is a replacement TQDateEdit due to usability problems:
people are accustomed to use single-character cursor.
Date format is retrieved from the KDE global settings.
and input/output is performed using KLineEdit (from KexiInputTableEdit).
@@ -34,28 +34,29 @@
class KexiDateTableEdit : public KexiInputTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDateTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiDateTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiDateTableEdit();
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
- virtual QVariant value();
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
protected:
//! helper
- void setValueInInternalEditor(const QVariant &value);
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- QDate dateValue() const;
+ void setValueInInternalEditor(const TQVariant &value);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ TQDate dateValue() const;
//! Used to format and convert date values
KexiDateFormatter m_formatter;
diff --git a/kexi/widget/tableview/kexidatetimetableedit.cpp b/kexi/widget/tableview/kexidatetimetableedit.cpp
index fbca7cd6f..46f687f05 100644
--- a/kexi/widget/tableview/kexidatetimetableedit.cpp
+++ b/kexi/widget/tableview/kexidatetimetableedit.cpp
@@ -21,20 +21,20 @@
#include "kexidatetimetableedit.h"
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qrect.h>
-#include <qpalette.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
-#include <qdatetime.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qdatetimeedit.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqrect.h>
+#include <tqpalette.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
+#include <tqdatetime.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqdatetimeedit.h>
+#include <tqclipboard.h>
#include <kdebug.h>
#include <klocale.h>
@@ -47,12 +47,12 @@
#include <kexiutils/utils.h>
-KexiDateTimeTableEdit::KexiDateTimeTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiInputTableEdit(column, parent)
+KexiDateTimeTableEdit::KexiDateTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiInputTableEdit(column, tqparent)
{
setName("KexiDateTimeTableEdit");
-//! @todo add QValidator so time like "99:88:77" cannot be even entered
+//! @todo add TQValidator so time like "99:88:77" cannot be even entered
m_lineedit->setInputMask(
dateTimeInputMask( m_dateFormatter, m_timeFormatter ) );
@@ -62,22 +62,22 @@ KexiDateTimeTableEdit::~KexiDateTimeTableEdit()
{
}
-void KexiDateTimeTableEdit::setValueInInternalEditor(const QVariant &value)
+void KexiDateTimeTableEdit::setValueInInternalEditor(const TQVariant &value)
{
if (value.isValid() && value.toDateTime().isValid())
m_lineedit->setText(
m_dateFormatter.dateToString( value.toDateTime().date() ) + " " +
m_timeFormatter.timeToString( value.toDateTime().time() ) );
else
- m_lineedit->setText( QString::null );
+ m_lineedit->setText( TQString() );
}
-void KexiDateTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld)
+void KexiDateTimeTableEdit::setValueInternal(const TQVariant& add_, bool removeOld)
{
if (removeOld) {
//new time entering... just fill the line edit
//! @todo cut string if too long..
- QString add(add_.toString());
+ TQString add(add_.toString());
m_lineedit->setText(add);
m_lineedit->setCursorPosition(add.length());
return;
@@ -86,15 +86,15 @@ void KexiDateTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOl
m_lineedit->setCursorPosition(0); //ok?
}
-void KexiDateTimeTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+void KexiDateTimeTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
Q_UNUSED(p);
Q_UNUSED(focused);
Q_UNUSED(x);
Q_UNUSED(w);
Q_UNUSED(h);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
y_offset = -1;
#else
y_offset = 0;
@@ -117,10 +117,10 @@ bool KexiDateTimeTableEdit::valueIsEmpty()
return valueIsNull();//js OK? TODO (nonsense?)
}
-QVariant KexiDateTimeTableEdit::value()
+TQVariant KexiDateTimeTableEdit::value()
{
if (textIsEmpty())
- return QVariant();
+ return TQVariant();
return stringToDateTime(m_dateFormatter, m_timeFormatter, m_lineedit->text());
}
@@ -134,22 +134,22 @@ bool KexiDateTimeTableEdit::textIsEmpty() const
return dateTimeIsEmpty( m_dateFormatter, m_timeFormatter, m_lineedit->text() );
}
-void KexiDateTimeTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiDateTimeTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
if (!value.isNull() && value.toDateTime().isValid())
- qApp->clipboard()->setText( m_dateFormatter.dateToString(value.toDateTime().date()) + " "
+ tqApp->clipboard()->setText( m_dateFormatter.dateToString(value.toDateTime().date()) + " "
+ m_timeFormatter.timeToString(value.toDateTime().time()) );
else
- qApp->clipboard()->setText( QString::null );
+ tqApp->clipboard()->setText( TQString() );
}
-void KexiDateTimeTableEdit::handleAction(const QString& actionName)
+void KexiDateTimeTableEdit::handleAction(const TQString& actionName)
{
const bool alreadyVisible = m_lineedit->isVisible();
if (actionName=="edit_paste") {
- const QVariant newValue( stringToDateTime(m_dateFormatter, m_timeFormatter, qApp->clipboard()->text()) );
+ const TQVariant newValue( stringToDateTime(m_dateFormatter, m_timeFormatter, tqApp->clipboard()->text()) );
if (!alreadyVisible) { //paste as the entire text if the cell was not in edit mode
emit editRequested();
m_lineedit->clear();
diff --git a/kexi/widget/tableview/kexidatetimetableedit.h b/kexi/widget/tableview/kexidatetimetableedit.h
index c2f9eba87..6fb88a670 100644
--- a/kexi/widget/tableview/kexidatetimetableedit.h
+++ b/kexi/widget/tableview/kexidatetimetableedit.h
@@ -26,7 +26,7 @@
#include "kexitimetableedit.h"
/*! @short Editor class for Date/Time type.
- It is a replacement QDateTimeEdit due to usability problems:
+ It is a replacement TQDateTimeEdit due to usability problems:
people are accustomed to use single-character cursor.
Date and Time format is retrieved from the KDE global settings
and input/output is performed using KLineEdit (from KexiInputTableEdit).
@@ -34,27 +34,28 @@
class KexiDateTimeTableEdit : public KexiInputTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDateTimeTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiDateTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiDateTimeTableEdit();
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
- virtual QVariant value();
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
protected:
//! helper
- void setValueInInternalEditor(const QVariant &value);
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ void setValueInInternalEditor(const TQVariant &value);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
bool textIsEmpty() const;
//! Used to format and convert date values
diff --git a/kexi/widget/tableview/kexiinputtableedit.cpp b/kexi/widget/tableview/kexiinputtableedit.cpp
index 9af5c627d..26a3ed7f6 100644
--- a/kexi/widget/tableview/kexiinputtableedit.cpp
+++ b/kexi/widget/tableview/kexiinputtableedit.cpp
@@ -20,14 +20,14 @@
#include "kexiinputtableedit.h"
-#include <qregexp.h>
-#include <qevent.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qtooltip.h>
+#include <tqregexp.h>
+#include <tqevent.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqtooltip.h>
#include <kglobal.h>
#include <klocale.h>
@@ -43,12 +43,12 @@
class MyLineEdit : public KLineEdit
{
public:
- MyLineEdit(QWidget *parent, const char *name) : KLineEdit(parent,name)
+ MyLineEdit(TQWidget *tqparent, const char *name) : KLineEdit(tqparent,name)
{}
protected:
- virtual void drawFrame ( QPainter * p ) {
- p->setPen( QPen( colorGroup().text() ) );
- QRect r = rect();
+ virtual void drawFrame ( TQPainter * p ) {
+ p->setPen( TQPen( tqcolorGroup().text() ) );
+ TQRect r = rect();
p->moveTo( r.topLeft() );
p->lineTo( r.topRight() );
p->lineTo( r.bottomRight() );
@@ -60,8 +60,8 @@ class MyLineEdit : public KLineEdit
//======================================================
-KexiInputTableEdit::KexiInputTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiTableEdit(column, parent)
+KexiInputTableEdit::KexiInputTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiTableEdit(column, tqparent)
{
setName("KexiInputTableEdit");
// m_type = f.type(); //copied because the rest of code uses m_type
@@ -91,7 +91,7 @@ void KexiInputTableEdit::init()
if (!align_right) {
//create layer for internal editor
- QHBoxLayout *lyr = new QHBoxLayout(this);
+ TQHBoxLayout *lyr = new TQHBoxLayout(this);
lyr->addSpacing(4);
lyr->setAutoAdd(true);
}
@@ -100,29 +100,29 @@ void KexiInputTableEdit::init()
m_lineedit = new MyLineEdit(this, "KexiInputTableEdit-KLineEdit");
setViewWidget(m_lineedit);
if (align_right)
- m_lineedit->setAlignment(AlignRight);
+ m_lineedit->tqsetAlignment(AlignRight);
// m_cview->setFrame(false);
-// m_cview->setFrameStyle( QFrame::Plain | QFrame::Box );
+// m_cview->setFrameStyle( TQFrame::Plain | TQFrame::Box );
// m_cview->setLineWidth( 1 );
m_calculatedCell = false;
#if 0 //js TODO
- connect(m_cview->completionBox(), SIGNAL(activated(const QString &)),
- this, SLOT(completed(const QString &)));
- connect(m_cview->completionBox(), SIGNAL(highlighted(const QString &)),
- this, SLOT(completed(const QString &)));
+ connect(m_cview->completionBox(), TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(completed(const TQString &)));
+ connect(m_cview->completionBox(), TQT_SIGNAL(highlighted(const TQString &)),
+ this, TQT_SLOT(completed(const TQString &)));
m_cview->completionBox()->setTabHandling(true);
#endif
}
-void KexiInputTableEdit::setValueInternal(const QVariant& add, bool removeOld)
+void KexiInputTableEdit::setValueInternal(const TQVariant& add, bool removeOld)
{
- QString text( m_textFormatter.valueToText(removeOld ? QVariant() : m_origValue, add.toString()) );
+ TQString text( m_textFormatter.valueToText(removeOld ? TQVariant() : m_origValue, add.toString()) );
if (text.isEmpty()) {
if (m_origValue.toString().isEmpty()) {
//we have to set NULL initial value:
- m_lineedit->setText(QString::null);
+ m_lineedit->setText(TQString());
}
}
else {
@@ -138,7 +138,7 @@ void KexiInputTableEdit::setValueInternal(const QVariant& add, bool removeOld)
#endif
if (!m_lineedit->validator()) {
- QValidator *validator = new KexiDB::FieldValidator(
+ TQValidator *validator = new KexiDB::FieldValidator(
*field(), m_lineedit, "KexiInputTableEdit-validator");
m_lineedit->setValidator( validator );
}
@@ -146,28 +146,28 @@ void KexiInputTableEdit::setValueInternal(const QVariant& add, bool removeOld)
#if 0
//moved to KexiTextFormatter
-QString KexiInputTableEdit::valueToText(KexiDB::Field* field, const QVariant& value, const QString& add)
+TQString KexiInputTableEdit::valueToText(KexiDB::Field* field, const TQVariant& value, const TQString& add)
{
- QString text; //result
+ TQString text; //result
if (field->isFPNumericType()) {
//! @todo precision!
//! @todo support 'g' format
- text = QString::number(value.toDouble(), 'f',
- QMAX(field->visibleDecimalPlaces(), 10)); //<-- 10 is quite good maximum for fractional digits
+ text = TQString::number(value.toDouble(), 'f',
+ TQMAX(field->visibleDecimalPlaces(), 10)); //<-- 10 is quite good maximum for fractional digits
//! @todo add command line settings?
if (value.toDouble() == 0.0) {
text = add.isEmpty() ? "0" : add; //eat 0
}
else {
//! @todo (js): get decimal places settings here...
- QStringList sl = QStringList::split(".", text);
+ TQStringList sl = TQStringList::split(".", text);
if (text.isEmpty()) {
//nothing
}
else if (sl.count()==2) {
// kdDebug() << "sl.count()=="<<sl.count()<< " " <<sl[0] << " | " << sl[1] << endl;
- const QString sl1 = sl[1];
+ const TQString sl1 = sl[1];
int pos = sl1.length()-1;
if (pos>=1) {
for (;pos>=0 && sl1[pos]=='0';pos--)
@@ -183,7 +183,7 @@ QString KexiInputTableEdit::valueToText(KexiDB::Field* field, const QVariant& va
}
/*moved to KexiDB::FieldValidator
if (setValidator && !m_lineedit->validator()) {
- QValidator *validator = new KDoubleValidator(m_lineedit);
+ TQValidator *validator = new KDoubleValidator(m_lineedit);
m_lineedit->setValidator( validator );
}*/
}
@@ -199,7 +199,7 @@ QString KexiInputTableEdit::valueToText(KexiDB::Field* field, const QVariant& va
/*moved to KexiDB::FieldValidator
//! @todo implement ranges here!
if (setValidator && !m_lineedit->validator()) {
- QValidator *validator;
+ TQValidator *validator;
if (KexiDB::Field::BigInteger == field()->type()) {
//! @todo use field->isUnsigned() for KexiUtils::ULongLongValidator
validator = new KexiUtils::LongLongValidator(m_lineedit);
@@ -219,10 +219,10 @@ QString KexiInputTableEdit::valueToText(KexiDB::Field* field, const QVariant& va
}
#endif
-void KexiInputTableEdit::paintEvent ( QPaintEvent * /*e*/ )
+void KexiInputTableEdit::paintEvent ( TQPaintEvent * /*e*/ )
{
- QPainter p(this);
- p.setPen( QPen( colorGroup().text() ) );
+ TQPainter p(this);
+ p.setPen( TQPen( tqcolorGroup().text() ) );
p.drawRect( rect() );
}
@@ -239,8 +239,8 @@ kdDebug() << "KexiInputTableEdit::setRestrictedCompletion()" << endl;
m_cview->useGlobalKeyBindings();
- QStringList newC;
- QStringList::ConstIterator it, end( m_comp.constEnd() );
+ TQStringList newC;
+ TQStringList::ConstIterator it, end( m_comp.constEnd() );
for( it = m_comp.constBegin(); it != end; ++it)
{
if((*it).startsWith(m_cview->text()))
@@ -251,7 +251,7 @@ kdDebug() << "KexiInputTableEdit::setRestrictedCompletion()" << endl;
}
void
-KexiInputTableEdit::completed(const QString &s)
+KexiInputTableEdit::completed(const TQString &s)
{
// kdDebug() << "KexiInputTableEdit::completed(): " << s << endl;
m_lineedit->setText(s);
@@ -274,39 +274,39 @@ bool KexiInputTableEdit::valueIsEmpty()
return !m_lineedit->text().isNull() && m_lineedit->text().isEmpty();
}
-QVariant KexiInputTableEdit::value()
+TQVariant KexiInputTableEdit::value()
{
if (field()->isFPNumericType()) {//==KexiDB::Field::Double || m_type==KexiDB::Field::Float) {
//! js @todo PRESERVE PRECISION!
- QString txt = m_lineedit->text();
+ TQString txt = m_lineedit->text();
if (m_decsym!=".")
- txt = txt.replace(m_decsym,".");//convert back
+ txt = txt.tqreplace(m_decsym,".");//convert back
bool ok;
const double result = txt.toDouble(&ok);
- return ok ? QVariant(result) : QVariant();
+ return ok ? TQVariant(result) : TQVariant();
}
else if (field()->isIntegerType()) {
//! @todo check constraints
bool ok;
if (KexiDB::Field::BigInteger == field()->type()) {
if (field()->isUnsigned()) {
- const Q_ULLONG result = m_lineedit->text().toULongLong(&ok);
- return ok ? QVariant(result) : QVariant();
+ const TQ_ULLONG result = m_lineedit->text().toULongLong(&ok);
+ return ok ? TQVariant(result) : TQVariant();
}
else {
- const Q_LLONG result = m_lineedit->text().toLongLong(&ok);
- return ok ? QVariant(result) : QVariant();
+ const TQ_LLONG result = m_lineedit->text().toLongLong(&ok);
+ return ok ? TQVariant(result) : TQVariant();
}
}
if (KexiDB::Field::Integer == field()->type()) {
if (field()->isUnsigned()) {
const uint result = m_lineedit->text().toUInt(&ok);
- return ok ? QVariant(result) : QVariant();
+ return ok ? TQVariant(result) : TQVariant();
}
}
//default: signed int
const int result = m_lineedit->text().toInt(&ok);
- return ok ? QVariant(result) : QVariant();
+ return ok ? TQVariant(result) : TQVariant();
}
//default: text
return m_lineedit->text();
@@ -328,21 +328,21 @@ bool KexiInputTableEdit::cursorAtEnd()
return m_lineedit->cursorPosition()==(int)m_lineedit->text().length();
}
-QSize KexiInputTableEdit::totalSize()
+TQSize KexiInputTableEdit::totalSize()
{
if (!m_lineedit)
return size();
return m_lineedit->size();
}
-void KexiInputTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiInputTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
//! @todo handle rich text?
- qApp->clipboard()->setText( m_textFormatter.valueToText(value, QString::null) );
+ tqApp->clipboard()->setText( m_textFormatter.valueToText(value, TQString()) );
}
-void KexiInputTableEdit::handleAction(const QString& actionName)
+void KexiInputTableEdit::handleAction(const TQString& actionName)
{
const bool alreadyVisible = m_lineedit->isVisible();
@@ -363,12 +363,12 @@ void KexiInputTableEdit::handleAction(const QString& actionName)
}
}
-bool KexiInputTableEdit::showToolTipIfNeeded(const QVariant& value, const QRect& rect,
- const QFontMetrics& fm, bool focused)
+bool KexiInputTableEdit::showToolTipIfNeeded(const TQVariant& value, const TQRect& rect,
+ const TQFontMetrics& fm, bool focused)
{
- QString text( value.type()==QVariant::String ? value.toString()
- : m_textFormatter.valueToText(value, QString::null) );
- QRect internalRect(rect);
+ TQString text( value.type()==TQVariant::String ? value.toString()
+ : m_textFormatter.valueToText(value, TQString()) );
+ TQRect internalRect(rect);
internalRect.setLeft(rect.x()+leftMargin());
internalRect.setWidth(internalRect.width()-rightMargin(focused)-2*3);
kexidbg << rect << " " << internalRect << " " << fm.width(text) << endl;
diff --git a/kexi/widget/tableview/kexiinputtableedit.h b/kexi/widget/tableview/kexiinputtableedit.h
index df7702875..3b4cf0155 100644
--- a/kexi/widget/tableview/kexiinputtableedit.h
+++ b/kexi/widget/tableview/kexiinputtableedit.h
@@ -22,7 +22,7 @@
#define KEXIINPUTTABLEEDIT_H
#include <klineedit.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "kexitableedit.h"
#include "kexicelleditorfactory.h"
@@ -33,9 +33,10 @@
class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiInputTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiInputTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiInputTableEdit();
@@ -44,7 +45,7 @@ class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
/*! \return text for \a value and \a field.
\a add is a text that should be added to the value if possible.
Used in setValueInternal(), by form widgets and for reporting/printing. */
- static QString valueToText(KexiDB::Field* field, const QVariant& value, const QString& add);
+ static TQString valueToText(KexiDB::Field* field, const TQVariant& value, const TQString& add);
#endif
virtual bool valueChanged();
@@ -57,36 +58,36 @@ class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
//! (check this with KexiDB::Field::hasEmptyProperty()),
virtual bool valueIsEmpty();
- virtual QVariant value();
+ virtual TQVariant value();
virtual bool cursorAtStart();
virtual bool cursorAtEnd();
-// virtual bool eventFilter(QObject* watched, QEvent* e);
+// virtual bool eventFilter(TQObject* watched, TQEvent* e);
//js void end(bool mark);
//js void backspace();
virtual void clear();
/*! \return total size of this editor, including any buttons, etc. (if present). */
- virtual QSize totalSize();
+ virtual TQSize totalSize();
/*! Handles action having standard name \a actionName.
Action could be: "edit_cut", "edit_paste", etc. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Handles copy action for value. The \a value is copied to clipboard in format appropriate
for the editor's impementation, e.g. for image cell it can be a pixmap.
\a visibleValue is unused here. Reimplemented after KexiTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
/*! Shows a special tooltip for \a value if needed, i.e. if the value could not fit inside \a rect
for a given font metrics \a fm.
- \return true a normal tooltip should be displayed (using QToolTip,) and false if
+ \return true a normal tooltip should be displayed (using TQToolTip,) and false if
no tooltip should be displayed or a custom tooltip was displayed internally (not yet supported).
This implementation converts the value to text using valueToText() if \a calue is not string to see
whether it can fit inside the cell's \a rect.
If the cell is currentl focused (selected), \a focused is true. */
- virtual bool showToolTipIfNeeded(const QVariant& value, const QRect& rect, const QFontMetrics& fm,
+ virtual bool showToolTipIfNeeded(const TQVariant& value, const TQRect& rect, const TQFontMetrics& fm,
bool focused);
public slots:
@@ -101,20 +102,20 @@ class KEXIDATATABLE_EXPORT KexiInputTableEdit : public KexiTableEdit
protected slots:
void setRestrictedCompletion();
- void completed(const QString &);
+ void completed(const TQString &);
protected:
//! initializes this editor with \a add value
- virtual void setValueInternal(const QVariant& add, bool removeOld);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
void showHintButton();
void init();
- virtual void paintEvent( QPaintEvent *e );
+ virtual void paintEvent( TQPaintEvent *e );
KexiTextFormatter m_textFormatter;
bool m_calculatedCell;
- QString m_decsym; //! decimal symbol
- QString m_origText; //! orig. Line Edit's text after conversion - for easy comparing
+ TQString m_decsym; //! decimal symbol
+ TQString m_origText; //! orig. Line Edit's text after conversion - for easy comparing
KLineEdit *m_lineedit;
signals:
diff --git a/kexi/widget/tableview/kexitableedit.cpp b/kexi/widget/tableview/kexitableedit.cpp
index 8c3f56123..6a9008f1c 100644
--- a/kexi/widget/tableview/kexitableedit.cpp
+++ b/kexi/widget/tableview/kexitableedit.cpp
@@ -23,44 +23,44 @@
#include <kexidb/field.h>
#include <kexidb/utils.h>
-#include <qpalette.h>
-#include <qpainter.h>
+#include <tqpalette.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include <klocale.h>
#include <kdebug.h>
-KexiTableEdit::KexiTableEdit(KexiTableViewColumn &column, QWidget* parent)
-: QWidget(dynamic_cast<QScrollView*>(parent) ? dynamic_cast<QScrollView*>(parent)->viewport() : parent)
+KexiTableEdit::KexiTableEdit(KexiTableViewColumn &column, TQWidget* tqparent)
+: TQWidget(dynamic_cast<TQScrollView*>(tqparent) ? dynamic_cast<TQScrollView*>(tqparent)->viewport() : tqparent)
,m_column(&column)
// ,m_field(&f)
// ,m_type(f.type()) //copied because the rest of code uses m_type
- ,m_scrollView(dynamic_cast<QScrollView*>(parent))
+ ,m_scrollView(dynamic_cast<TQScrollView*>(tqparent))
,m_usesSelectedTextColor(true)
,m_view(0)
// ,m_hasFocusableWidget(true)
// ,m_acceptEditorAfterDeleteContents(false)
{
- setPaletteBackgroundColor( palette().color(QPalette::Active, QColorGroup::Base) );
+ setPaletteBackgroundColor( palette().color(TQPalette::Active, TQColorGroup::Base) );
installEventFilter(this);
//margins
if (displayedField()->isFPNumericType()) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
m_leftMargin = 0;
#else
m_leftMargin = 0;
#endif
}
else if (displayedField()->isIntegerType()) {
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
m_leftMargin = 1;
#else
m_leftMargin = 0;
#endif
}
else {//default
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
m_leftMargin = 5;
#else
m_leftMargin = 5;
@@ -83,7 +83,7 @@ KexiDB::Field *KexiTableEdit::displayedField() const
return m_column->field(); //typical case
}
-void KexiTableEdit::setViewWidget(QWidget *v)
+void KexiTableEdit::setViewWidget(TQWidget *v)
{
m_view = v;
m_view->move(0,0);
@@ -91,7 +91,7 @@ void KexiTableEdit::setViewWidget(QWidget *v)
setFocusProxy(m_view);
}
-void KexiTableEdit::moveChild( QWidget * child, int x, int y )
+void KexiTableEdit::moveChild( TQWidget * child, int x, int y )
{
if (m_scrollView)
m_scrollView->moveChild(child, x, y);
@@ -99,9 +99,9 @@ void KexiTableEdit::moveChild( QWidget * child, int x, int y )
void KexiTableEdit::resize(int w, int h)
{
- QWidget::resize(w, h);
+ TQWidget::resize(w, h);
if (m_view) {
- if (!layout()) { //if there is layout (eg. KexiInputTableEdit), resize is automatic
+ if (!tqlayout()) { //if there is tqlayout (eg. KexiInputTableEdit), resize is automatic
m_view->move(0,0);
m_view->resize(w, h);
}
@@ -109,22 +109,22 @@ void KexiTableEdit::resize(int w, int h)
}
bool
-KexiTableEdit::eventFilter(QObject* watched, QEvent* e)
+KexiTableEdit::eventFilter(TQObject* watched, TQEvent* e)
{
/* if (watched == m_view) {
- if(e->type() == QEvent::KeyPress) {
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ if(e->type() == TQEvent::KeyPress) {
+ TQKeyEvent* ev = static_cast<TQKeyEvent*>(e);
// if (ev->key()==Key_Tab) {
// }
}
}*/
- if(watched == this)
+ if(TQT_BASE_OBJECT(watched) == TQT_BASE_OBJECT(this))
{
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- QKeyEvent* ev = static_cast<QKeyEvent*>(e);
+ TQKeyEvent* ev = TQT_TQKEYEVENT(e);
if(ev->key() == Key_Escape)
{
@@ -137,23 +137,23 @@ KexiTableEdit::eventFilter(QObject* watched, QEvent* e)
}
}
return false;
-// return QWidget::eventFilter(watched, e);
+// return TQWidget::eventFilter(watched, e);
}
-void KexiTableEdit::paintFocusBorders( QPainter *p, QVariant &, int x, int y, int w, int h )
+void KexiTableEdit::paintFocusBorders( TQPainter *p, TQVariant &, int x, int y, int w, int h )
{
p->drawRect(x, y, w, h);
}
-void KexiTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &/*x*/, int &y_offset, int &w, int &h )
+void KexiTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &/*x*/, int &y_offset, int &w, int &h )
{
Q_UNUSED(p);
Q_UNUSED(focused);
Q_UNUSED(h);
KexiDB::Field *realField = displayedField();
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
// x = 1;
y_offset = -1;
#else
@@ -171,11 +171,11 @@ void KexiTableEdit::setupContents( QPainter *p, bool focused, const QVariant& va
align |= AlignRight;
}
else if (realField->isIntegerType()) {
- Q_LLONG num = val.toLongLong();
+ TQ_LLONG num = val.toLongLong();
w -= 6;
align |= AlignRight;
if (!val.isNull())
- txt = QString::number(num);
+ txt = TQString::number(num);
}
else {//default:
if (!val.isNull()) {
@@ -185,18 +185,18 @@ void KexiTableEdit::setupContents( QPainter *p, bool focused, const QVariant& va
}
}
-void KexiTableEdit::paintSelectionBackground( QPainter *p, bool /*focused*/,
- const QString& txt, int align, int x, int y_offset, int w, int h, const QColor& fillColor,
- const QFontMetrics &fm, bool readOnly, bool fullRowSelection )
+void KexiTableEdit::paintSelectionBackground( TQPainter *p, bool /*focused*/,
+ const TQString& txt, int align, int x, int y_offset, int w, int h, const TQColor& fillColor,
+ const TQFontMetrics &fm, bool readOnly, bool fullRowSelection )
{
if (!readOnly && !fullRowSelection && !txt.isEmpty()) {
- QRect bound=fm.boundingRect(x, y_offset, w - (x+x), h, align, txt);
+ TQRect bound=fm.boundingRect(x, y_offset, w - (x+x), h, align, txt);
bound.setY(0);
- bound.setWidth( QMIN( bound.width()+2, w - (x+x)+1 ) );
- if (align & Qt::AlignLeft) {
+ bound.setWidth( TQMIN( bound.width()+2, w - (x+x)+1 ) );
+ if (align & TQt::AlignLeft) {
bound.setX(bound.x()-1);
}
- else if (align & Qt::AlignRight) {
+ else if (align & TQt::AlignRight) {
bound.moveLeft( w - bound.width() ); //move to left, if too wide
}
//TODO align center
@@ -208,18 +208,18 @@ void KexiTableEdit::paintSelectionBackground( QPainter *p, bool /*focused*/,
}
}
-int KexiTableEdit::widthForValue( QVariant &val, const QFontMetrics &fm )
+int KexiTableEdit::widthForValue( TQVariant &val, const TQFontMetrics &fm )
{
return fm.width( val.toString() );
}
-void KexiTableEdit::repaintRelatedCell()
+void KexiTableEdit::tqrepaintRelatedCell()
{
if (dynamic_cast<KexiDataAwareObjectInterface*>(m_scrollView))
dynamic_cast<KexiDataAwareObjectInterface*>(m_scrollView)->updateCurrentCell();
}
-bool KexiTableEdit::showToolTipIfNeeded(const QVariant& value, const QRect& rect, const QFontMetrics& fm,
+bool KexiTableEdit::showToolTipIfNeeded(const TQVariant& value, const TQRect& rect, const TQFontMetrics& fm,
bool focused)
{
Q_UNUSED(value);
diff --git a/kexi/widget/tableview/kexitableedit.h b/kexi/widget/tableview/kexitableedit.h
index ef38a11f2..d8ac7c86a 100644
--- a/kexi/widget/tableview/kexitableedit.h
+++ b/kexi/widget/tableview/kexitableedit.h
@@ -23,8 +23,8 @@
#include <kexidataiteminterface.h>
-#include <qvariant.h>
-#include <qscrollview.h>
+#include <tqvariant.h>
+#include <tqscrollview.h>
#include "kexitableviewdata.h"
@@ -36,12 +36,13 @@ namespace KexiDB {
/*! @short Abstract class for a cell editor.
Handles cell painting and displaying the editor widget.
*/
-class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemInterface
+class KEXIDATATABLE_EXPORT KexiTableEdit : public TQWidget, public KexiDataItemInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTableEdit(KexiTableViewColumn &column, QWidget* parent = 0);
+ KexiTableEdit(KexiTableViewColumn &column, TQWidget* tqparent = 0);
virtual ~KexiTableEdit();
@@ -72,7 +73,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
virtual void resize(int w, int h);
/*! \return the view widget of this editor, e.g. line edit widget. */
- virtual QWidget* widget() { return m_view; }
+ virtual TQWidget* widget() { return m_view; }
/*! Hides item's widget, if available. */
inline virtual void hideWidget() { hide(); }
@@ -83,11 +84,11 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
/*! Paints a border for the cell described by \a x, \a y, \a w, \a h on \a p painter.
The cell's value is \a val (may be useful if you want to reimplement this method).
*/
- virtual void paintFocusBorders( QPainter *p, QVariant &cal, int x, int y, int w, int h );
+ virtual void paintFocusBorders( TQPainter *p, TQVariant &cal, int x, int y, int w, int h );
/*! For reimplementation.
Sets up and paints cell's contents using context of \a val value.
- \a focused is true if the cell is focused. \a align is set using Qt::AlignmentFlags.
+ \a focused is true if the cell is focused. \a align is set using TQt::AlignmentFlags.
Some additional things may be painted using \a p,
but it is not needed to paint the text (this is done automatically outside of this method).
@@ -101,8 +102,8 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
\a p painter's pen is set to foreground color (usually black) that should be used to paint
foreground information, if needed. For example boolean editor widget paints
a rectangle using this color. */
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
/*! \return true if "selected text" color should be used to paint contents of the editor.
True by default. It's false e.g. in boolean editor, where no selection is painted
@@ -115,16 +116,16 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
/*! For reimplementation.
Paints selection's background using \a p. Most parameters are similar to these from
setupContents(). */
- virtual void paintSelectionBackground( QPainter *p, bool focused, const QString& txt,
- int align, int x, int y_offset, int w, int h, const QColor& fillColor,
- const QFontMetrics &fm, bool readOnly, bool fullRowSelection );
+ virtual void paintSelectionBackground( TQPainter *p, bool focused, const TQString& txt,
+ int align, int x, int y_offset, int w, int h, const TQColor& fillColor,
+ const TQFontMetrics &fm, bool readOnly, bool fullRowSelection );
- /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains
+ /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains
dropdown button at the right side. \return left margin's size;
0 by default. For reimplementation. */
int leftMargin() const { return m_leftMargin; }
- /*! Sometimes, editor can contain non-standard margin, for example combobox editor contains
+ /*! Sometimes, editor can contain non-standard margin, for example combobox editor tqcontains
dropdown button at the right side. THe dropdown button's width is counted only if \a focused is true.
\return right margin's size; 0 by default. For reimplementation. */
int rightMargin(bool focused) const;
@@ -133,7 +134,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
For implementation: true should be returned if \a ke should be accepted.
If \a editorActive is true, this editor is currently active, i.e. the table view is in edit mode.
By default false is returned. */
- virtual bool handleKeyPress( QKeyEvent* ke, bool editorActive ) {
+ virtual bool handleKeyPress( TQKeyEvent* ke, bool editorActive ) {
Q_UNUSED(ke); Q_UNUSED(editorActive); return false; }
/*! Handles double click request coming from the table view.
@@ -146,24 +147,24 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
For a special case (combo box), \a visibleValue can be provided,
so it can be copied to the clipboard instead of unreadable \a value.
For reimplementation. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue) = 0;
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue) = 0;
/*! \return width of \a value. For the default implementation \a val is converted to a string
and width of this string is returned. */
- virtual int widthForValue( QVariant &val, const QFontMetrics &fm );
+ virtual int widthForValue( TQVariant &val, const TQFontMetrics &fm );
/*! \return total size of this editor, including any buttons, etc. (if present).
Reimpelment this if you want to return more appropriate size. This impelmentation just
- returns QWidget::size(). */
- virtual QSize totalSize() { return QWidget::size(); }
+ returns TQWidget::size(). */
+ virtual TQSize totalSize() { return TQWidget::size(); }
/*! Shows a special tooltip for \a value if needed, i.e. if the value could not fit inside \a rect
for a given font metrics \a fm.
- \return true a normal tooltip should be displayed (using QToolTip,) and false if
+ \return true a normal tooltip should be displayed (using TQToolTip,) and false if
no tooltip should be displayed or a custom tooltip was displayed internally (not yet supported).
Default implementation does nothing and returns false.
If the cell is currentl focused (selected), \a focused is true. */
- virtual bool showToolTipIfNeeded(const QVariant& value, const QRect& rect, const QFontMetrics& fm,
+ virtual bool showToolTipIfNeeded(const TQVariant& value, const TQRect& rect, const TQFontMetrics& fm,
bool focused);
/*! Created internal editor for this editor is needed. This method is only implemented
@@ -177,28 +178,28 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
void acceptRequested();
protected:
- virtual bool eventFilter(QObject* watched, QEvent* e);
+ virtual bool eventFilter(TQObject* watched, TQEvent* e);
/*! Sets \a v as view widget for this editor. The view will be assigned as focus proxy
for the editor, its events will be filtered, it will be resized when neede, and so on. */
- void setViewWidget(QWidget *v);
+ void setViewWidget(TQWidget *v);
- /*! Moves child widget within the viewport if the parent is scrollview (otherwise does nothing).
- Use this for child widgets that are outside of this editor widget, instead of calling QWidget::move(). */
- void moveChild( QWidget * child, int x, int y );
+ /*! Moves child widget within the viewport if the tqparent is scrollview (otherwise does nothing).
+ Use this for child widgets that are outside of this editor widget, instead of calling TQWidget::move(). */
+ void moveChild( TQWidget * child, int x, int y );
/*! Allows to force redrawing the related cell by the editor itself. Usable when the editor is not
- displayed by a QWidget but rather by table view cell itself, for example KexiBlobTableEdit. */
- void repaintRelatedCell();
+ displayed by a TQWidget but rather by table view cell itself, for example KexiBlobTableEdit. */
+ void tqrepaintRelatedCell();
KexiTableViewColumn *m_column;
int m_leftMargin;
int m_rightMargin, m_rightMarginWhenFocused;
- QScrollView* m_scrollView; //!< may be 0 if the parent is not a scrollview
+ TQScrollView* m_scrollView; //!< may be 0 if the tqparent is not a scrollview
bool m_usesSelectedTextColor : 1; //!< set in ctor, @see usesSelectedTextColor()
private:
- QWidget* m_view;
+ TQWidget* m_view;
};
//! Declaration of cell editor factory
@@ -210,7 +211,7 @@ class KEXIDATATABLE_EXPORT KexiTableEdit : public QWidget, public KexiDataItemIn
virtual ~factoryclassname(); \
\
protected: \
- virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, QWidget* parent = 0); \
+ virtual KexiTableEdit* createEditor(KexiTableViewColumn &column, TQWidget* tqparent = 0); \
};
//! Implementation of cell editor factory
@@ -225,9 +226,9 @@ factoryclassname::~factoryclassname() \
{} \
\
KexiTableEdit* factoryclassname::createEditor( \
- KexiTableViewColumn &column, QWidget* parent) \
+ KexiTableViewColumn &column, TQWidget* tqparent) \
{ \
- return new itemclassname(column, parent); \
+ return new itemclassname(column, tqparent); \
}
#endif
diff --git a/kexi/widget/tableview/kexitableitem.cpp b/kexi/widget/tableview/kexitableitem.cpp
index e1669a358..659e341ec 100644
--- a/kexi/widget/tableview/kexitableitem.cpp
+++ b/kexi/widget/tableview/kexitableitem.cpp
@@ -55,8 +55,8 @@ KexiTableItem::clearValues()
void
KexiTableItem::debug() const
{
- QString s = QString("KexiTableItem (%1 items)").arg(size());
+ TQString s = TQString("KexiTableItem (%1 items)").tqarg(size());
for (uint i = 0; i < size(); i++)
- s.append( QString::number(i)+":"+at(i).toString()+" " );
+ s.append( TQString::number(i)+":"+at(i).toString()+" " );
kexidbg << s << endl;
}
diff --git a/kexi/widget/tableview/kexitableitem.h b/kexi/widget/tableview/kexitableitem.h
index 00074e825..0216ee48d 100644
--- a/kexi/widget/tableview/kexitableitem.h
+++ b/kexi/widget/tableview/kexitableitem.h
@@ -25,10 +25,10 @@
#ifndef KEXITABLEITEM_H
#define KEXITABLEITEM_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qvaluevector.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqvaluevector.h>
+#include <tqvariant.h>
#include <kexidb/connection.h>
diff --git a/kexi/widget/tableview/kexitableview.cpp b/kexi/widget/tableview/kexitableview.cpp
index 108b16966..229f909c5 100644
--- a/kexi/widget/tableview/kexitableview.cpp
+++ b/kexi/widget/tableview/kexitableview.cpp
@@ -24,18 +24,18 @@
Original Project: buX (www.bux.at)
*/
-#include <qpainter.h>
-#include <qkeycode.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qwmatrix.h>
-#include <qtimer.h>
-#include <qpopupmenu.h>
-#include <qcursor.h>
-#include <qstyle.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
+#include <tqpainter.h>
+#include <tqkeycode.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqwmatrix.h>
+#include <tqtimer.h>
+#include <tqpopupmenu.h>
+#include <tqcursor.h>
+#include <tqstyle.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
#include <kglobal.h>
#include <klocale.h>
@@ -59,16 +59,16 @@
#include <widget/utils/kexidisplayutils.h>
#include <kexidb/cursor.h>
-KexiTableView::Appearance::Appearance(QWidget *widget)
+KexiTableView::Appearance::Appearance(TQWidget *widget)
: alternateBackgroundColor( KGlobalSettings::alternateBackgroundColor() )
{
//set defaults
- if (qApp) {
- QPalette p = widget ? widget->palette() : qApp->palette();
+ if (tqApp) {
+ TQPalette p = widget ? widget->palette() : tqApp->palette();
baseColor = p.active().base();
textColor = p.active().text();
- borderColor = QColor(200,200,200);
- emptyAreaColor = p.active().color(QColorGroup::Base);
+ borderColor = TQColor(200,200,200);
+ emptyAreaColor = p.active().color(TQColorGroup::Base);
rowHighlightingColor = KexiUtils::blendedColors(p.active().highlight(), baseColor, 33, 66);
rowMouseOverHighlightingColor = KexiUtils::blendedColors(p.active().highlight(), baseColor, 10, 90);
rowMouseOverAlternateHighlightingColor = KexiUtils::blendedColors(p.active().highlight(), alternateBackgroundColor, 10, 90);
@@ -87,31 +87,31 @@ KexiTableView::Appearance::Appearance(QWidget *widget)
//-----------------------------------------
//! @internal A special What's This class displaying information about a given column
-class KexiTableView::WhatsThis : public QWhatsThis
+class KexiTableView::WhatsThis : public TQWhatsThis
{
public:
- WhatsThis(KexiTableView* tv) : QWhatsThis(tv), m_tv(tv)
+ WhatsThis(KexiTableView* tv) : TQWhatsThis(tv), m_tv(tv)
{
Q_ASSERT(tv);
}
virtual ~WhatsThis()
{
}
- virtual QString text( const QPoint & pos)
+ virtual TQString text( const TQPoint & pos)
{
const int leftMargin = m_tv->verticalHeaderVisible() ? m_tv->verticalHeader()->width() : 0;
//const int topMargin = m_tv->horizontalHeaderVisible() ? m_tv->d->pTopHeader->height() : 0;
//const int bottomMargin = m_tv->d->appearance.navigatorEnabled ? m_tv->m_navPanel->height() : 0;
- if (KexiUtils::hasParent(m_tv->verticalHeader(), m_tv->childAt(pos))) {
+ if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->verticalHeader()), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) {
return i18n("Contains a pointer to the currently selected row");
}
- else if (KexiUtils::hasParent(m_tv->m_navPanel, m_tv->childAt(pos))) {
+ else if (KexiUtils::hasParent(TQT_TQOBJECT(m_tv->m_navPanel), TQT_TQOBJECT(m_tv->tqchildAt(pos)))) {
return i18n("Row navigator");
-// return QWhatsThis::textFor(m_tv->m_navPanel, QPoint( pos.x(), pos.y() - m_tv->height() + bottomMargin ));
+// return TQWhatsThis::textFor(m_tv->m_navPanel, TQPoint( pos.x(), pos.y() - m_tv->height() + bottomMargin ));
}
KexiDB::Field *f = m_tv->field( m_tv->columnAt(pos.x()-leftMargin) );
if (!f)
- return QString::null;
+ return TQString();
return f->description().isEmpty() ? f->captionOrName() : f->description();
}
protected:
@@ -121,19 +121,19 @@ class KexiTableView::WhatsThis : public QWhatsThis
//-----------------------------------------
KexiTableViewCellToolTip::KexiTableViewCellToolTip( KexiTableView * tableView )
- : QToolTip(tableView->viewport())
+ : TQToolTip(tableView->viewport())
, m_tableView(tableView)
{
}
KexiTableViewCellToolTip::~KexiTableViewCellToolTip()
{
- remove(parentWidget());
+ remove(tqparentWidget());
}
-void KexiTableViewCellToolTip::maybeTip( const QPoint & p )
+void KexiTableViewCellToolTip::maybeTip( const TQPoint & p )
{
- const QPoint cp( m_tableView->viewportToContents( p ) );
+ const TQPoint cp( m_tableView->viewportToContents( p ) );
const int row = m_tableView->rowAt( cp.y(), true/*ignoreEnd*/ );
const int col = m_tableView->columnAt( cp.x() );
@@ -147,21 +147,21 @@ void KexiTableViewCellToolTip::maybeTip( const QPoint & p )
int h = m_tableView->rowHeight();
int x = 0;
int y_offset = 0;
- int align = Qt::SingleLine | Qt::AlignVCenter;
- QString txtValue;
- QVariant cellValue;
+ int align = TQt::SingleLine | TQt::AlignVCenter;
+ TQString txtValue;
+ TQVariant cellValue;
KexiTableViewColumn *tvcol = m_tableView->column(col);
if (!m_tableView->getVisibleLookupValue(cellValue, editor, item, tvcol))
cellValue = insertRowSelected ? editor->displayedField()->defaultValue() : item->at(col); //display default value if available
const bool focused = m_tableView->selectedItem() == item && col == m_tableView->currentColumn();
editor->setupContents( 0, focused, cellValue, txtValue, align, x, y_offset, w, h );
- QRect realRect(m_tableView->columnPos(col)-m_tableView->contentsX(),
+ TQRect realRect(m_tableView->columnPos(col)-m_tableView->contentsX(),
m_tableView->rowPos(row)-m_tableView->contentsY(), w, h); //m_tableView->cellGeometry( row, col ));
if (editor->showToolTipIfNeeded(
- txtValue.isEmpty() ? item->at(col) : QVariant(txtValue),
+ txtValue.isEmpty() ? item->at(col) : TQVariant(txtValue),
realRect, m_tableView->fontMetrics(), focused))
{
- QString squeezedTxtValue;
+ TQString squeezedTxtValue;
if (txtValue.length() > 50)
squeezedTxtValue = txtValue.left(100) + "...";
else
@@ -174,8 +174,8 @@ void KexiTableViewCellToolTip::maybeTip( const QPoint & p )
//-----------------------------------------
-KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const char* name)
-: QScrollView(parent, name, /*Qt::WRepaintNoErase | */Qt::WStaticContents /*| Qt::WResizeNoErase*/)
+KexiTableView::KexiTableView(KexiTableViewData* data, TQWidget* tqparent, const char* name)
+: TQScrollView(tqparent, name, /*TQt::WRepaintNoErase | */TQt::WStaticContents /*| TQt::WResizeNoErase*/)
, KexiRecordNavigatorHandler()
, KexiSharedActionClient()
, KexiDataAwareObjectInterface()
@@ -184,32 +184,32 @@ KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const cha
d = new KexiTableViewPrivate(this);
- connect( kapp, SIGNAL( settingsChanged(int) ), SLOT( slotSettingsChanged(int) ) );
+ connect( kapp, TQT_SIGNAL( settingsChanged(int) ), TQT_SLOT( slotSettingsChanged(int) ) );
slotSettingsChanged(KApplication::SETTINGS_SHORTCUTS);
m_data = new KexiTableViewData(); //to prevent crash because m_data==0
m_owner = true; //-this will be deleted if needed
setResizePolicy(Manual);
- viewport()->setBackgroundMode(Qt::NoBackground);
-// viewport()->setFocusPolicy(StrongFocus);
- viewport()->setFocusPolicy(WheelFocus);
- setFocusPolicy(WheelFocus); //<--- !!!!! important (was NoFocus),
- // otherwise QApplication::setActiveWindow() won't activate
+ viewport()->setBackgroundMode(TQt::NoBackground);
+// viewport()->setFocusPolicy(TQ_StrongFocus);
+ viewport()->setFocusPolicy(TQ_WheelFocus);
+ setFocusPolicy(TQ_WheelFocus); //<--- !!!!! important (was NoFocus),
+ // otherwise TQApplication::setActiveWindow() won't activate
// this widget when needed!
// setFocusProxy(viewport());
viewport()->installEventFilter(this);
//setup colors defaults
- setBackgroundMode(Qt::PaletteBackground);
-// setEmptyAreaColor(d->appearance.baseColor);//palette().active().color(QColorGroup::Base));
+ setBackgroundMode(TQt::PaletteBackground);
+// setEmptyAreaColor(d->appearance.baseColor);//palette().active().color(TQColorGroup::Base));
-// d->baseColor = colorGroup().base();
-// d->textColor = colorGroup().text();
+// d->baseColor = tqcolorGroup().base();
+// d->textColor = tqcolorGroup().text();
// d->altColor = KGlobalSettings::alternateBackgroundColor();
-// d->grayColor = QColor(200,200,200);
- d->diagonalGrayPattern = QBrush(d->appearance.borderColor, Qt::BDiagPattern);
+// d->grayColor = TQColor(200,200,200);
+ d->diagonalGrayPattern = TQBrush(d->appearance.borderColor, TQt::BDiagPattern);
setLineWidth(1);
horizontalScrollBar()->installEventFilter(this);
@@ -219,13 +219,13 @@ KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const cha
//context menu
m_popupMenu = new KPopupMenu(this, "contextMenu");
#if 0 //moved to mainwindow's actions
- d->menu_id_addRecord = m_popupMenu->insertItem(i18n("Add Record"), this, SLOT(addRecord()), Qt::CTRL+Qt::Key_Insert);
+ d->menu_id_addRecord = m_popupMenu->insertItem(i18n("Add Record"), this, TQT_SLOT(addRecord()), TQt::CTRL+TQt::Key_Insert);
d->menu_id_removeRecord = m_popupMenu->insertItem(
kapp->iconLoader()->loadIcon("button_cancel", KIcon::Small),
- i18n("Remove Record"), this, SLOT(removeRecord()), Qt::CTRL+Qt::Key_Delete);
+ i18n("Remove Record"), this, TQT_SLOT(removeRecord()), TQt::CTRL+TQt::Key_Delete);
#endif
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
d->rowHeight = fontMetrics().lineSpacing() + 4;
#else
d->rowHeight = fontMetrics().lineSpacing() + 1;
@@ -234,27 +234,27 @@ KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const cha
if(d->rowHeight < 17)
d->rowHeight = 17;
- d->pUpdateTimer = new QTimer(this);
+ d->pUpdateTimer = new TQTimer(this);
// setMargins(14, fontMetrics().height() + 4, 0, 0);
// Create headers
m_horizontalHeader = new KexiTableViewHeader(this, "topHeader");
- m_horizontalHeader->setSelectionBackgroundColor( palette().active().highlight() );
+ m_horizontalHeader->setSelectionBackgroundColor( tqpalette().active().highlight() );
m_horizontalHeader->setOrientation(Qt::Horizontal);
m_horizontalHeader->setTracking(false);
m_horizontalHeader->setMovingEnabled(false);
- connect(m_horizontalHeader, SIGNAL(sizeChange(int,int,int)), this, SLOT(slotTopHeaderSizeChange(int,int,int)));
+ connect(m_horizontalHeader, TQT_SIGNAL(sizeChange(int,int,int)), this, TQT_SLOT(slotTopHeaderSizeChange(int,int,int)));
m_verticalHeader = new KexiRecordMarker(this, "rm");
- m_verticalHeader->setSelectionBackgroundColor( palette().active().highlight() );
+ m_verticalHeader->setSelectionBackgroundColor( tqpalette().active().highlight() );
m_verticalHeader->setCellHeight(d->rowHeight);
// m_verticalHeader->setFixedWidth(d->rowHeight);
m_verticalHeader->setCurrentRow(-1);
setMargins(
- QMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight),
- m_horizontalHeader->sizeHint().height(), 0, 0);
+ TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight),
+ m_horizontalHeader->tqsizeHint().height(), 0, 0);
setupNavigator();
@@ -267,8 +267,8 @@ KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const cha
setData( data );
#if 0//(js) doesn't work!
- d->scrollTimer = new QTimer(this);
- connect(d->scrollTimer, SIGNAL(timeout()), this, SLOT(slotAutoScroll()));
+ d->scrollTimer = new TQTimer(this);
+ connect(d->scrollTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAutoScroll()));
#endif
// setBackgroundAltering(true);
@@ -278,17 +278,17 @@ KexiTableView::KexiTableView(KexiTableViewData* data, QWidget* parent, const cha
viewport()->setAcceptDrops(true);
// Connect header, table and scrollbars
- connect(horizontalScrollBar(), SIGNAL(valueChanged(int)), m_horizontalHeader, SLOT(setOffset(int)));
- connect(verticalScrollBar(), SIGNAL(valueChanged(int)), m_verticalHeader, SLOT(setOffset(int)));
- connect(m_horizontalHeader, SIGNAL(sizeChange(int, int, int)), this, SLOT(slotColumnWidthChanged(int, int, int)));
- connect(m_horizontalHeader, SIGNAL(sectionHandleDoubleClicked(int)), this, SLOT(slotSectionHandleDoubleClicked(int)));
- connect(m_horizontalHeader, SIGNAL(clicked(int)), this, SLOT(sortColumnInternal(int)));
+ connect(horizontalScrollBar(), TQT_SIGNAL(valueChanged(int)), m_horizontalHeader, TQT_SLOT(setOffset(int)));
+ connect(verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), m_verticalHeader, TQT_SLOT(setOffset(int)));
+ connect(m_horizontalHeader, TQT_SIGNAL(sizeChange(int, int, int)), this, TQT_SLOT(slotColumnWidthChanged(int, int, int)));
+ connect(m_horizontalHeader, TQT_SIGNAL(sectionHandleDoubleClicked(int)), this, TQT_SLOT(slotSectionHandleDoubleClicked(int)));
+ connect(m_horizontalHeader, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(sortColumnInternal(int)));
- connect(d->pUpdateTimer, SIGNAL(timeout()), this, SLOT(slotUpdate()));
+ connect(d->pUpdateTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotUpdate()));
// horizontalScrollBar()->show();
updateScrollBars();
-// resize(sizeHint());
+// resize(tqsizeHint());
// updateContents();
// setMinimumHeight(horizontalScrollBar()->height() + d->rowHeight + topMargin());
@@ -333,7 +333,7 @@ void KexiTableView::setupNavigator()
m_navPanel = new KexiRecordNavigator(this, leftMargin(), "navPanel");
m_navPanel->setRecordHandler(this);
- m_navPanel->setSizePolicy(QSizePolicy::Minimum,QSizePolicy::Preferred);
+ m_navPanel->tqsetSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Preferred);
}
void KexiTableView::initDataContents()
@@ -345,8 +345,8 @@ void KexiTableView::initDataContents()
m_navPanel->showEditingIndicator(false);
}
-void KexiTableView::addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int width)
+void KexiTableView::addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int width)
{
const int nr = m_horizontalHeader->count();
if (icon.isNull())
@@ -360,33 +360,33 @@ void KexiTableView::addHeaderColumn(const QString& caption, const QString& descr
void KexiTableView::updateWidgetContentsSize()
{
- QSize s(tableSize());
+ TQSize s(tableSize());
resizeContents(s.width(), s.height());
}
-void KexiTableView::slotRowsDeleted( const QValueList<int> &rows )
+void KexiTableView::slotRowsDeleted( const TQValueList<int> &rows )
{
- viewport()->repaint();
+ viewport()->tqrepaint();
updateWidgetContentsSize();
- setCursorPosition(QMAX(0, (int)m_curRow - (int)rows.count()), -1, true);
+ setCursorPosition(TQMAX(0, (int)m_curRow - (int)rows.count()), -1, true);
}
-/*void KexiTableView::addDropFilter(const QString &filter)
+/*void KexiTableView::addDropFilter(const TQString &filter)
{
d->dropFilters.append(filter);
viewport()->setAcceptDrops(true);
}*/
-void KexiTableView::setFont( const QFont &font )
+void KexiTableView::setFont( const TQFont &font )
{
- QScrollView::setFont(font);
+ TQScrollView::setFont(font);
updateFonts(true);
}
-void KexiTableView::updateFonts(bool repaint)
+void KexiTableView::updateFonts(bool tqrepaint)
{
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
d->rowHeight = fontMetrics().lineSpacing() + 4;
#else
d->rowHeight = fontMetrics().lineSpacing() + 1;
@@ -399,15 +399,15 @@ void KexiTableView::updateFonts(bool repaint)
// if(d->rowHeight < 22)
// d->rowHeight = 22;
setMargins(
- QMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight),
- m_horizontalHeader->sizeHint().height(), 0, 0);
+ TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight),
+ m_horizontalHeader->tqsizeHint().height(), 0, 0);
// setMargins(14, d->rowHeight, 0, 0);
m_verticalHeader->setCellHeight(d->rowHeight);
KexiDisplayUtils::initDisplayForAutonumberSign(d->autonumberSignDisplayParameters, this);
KexiDisplayUtils::initDisplayForDefaultValue(d->defaultValueDisplayParameters, this);
- if (repaint)
+ if (tqrepaint)
updateContents();
}
@@ -425,7 +425,7 @@ void KexiTableView::updateAllVisibleRowsBelow(int row)
clipper()->width(), clipper()->height() - (rowPos(row) - contentsY()) );
}
-void KexiTableView::clearColumnsInternal(bool /*repaint*/)
+void KexiTableView::clearColumnsInternal(bool /*tqrepaint*/)
{
while(m_horizontalHeader->count()>0)
m_horizontalHeader->removeLabel(0);
@@ -434,7 +434,7 @@ void KexiTableView::clearColumnsInternal(bool /*repaint*/)
void KexiTableView::slotUpdate()
{
// kdDebug(44021) << " KexiTableView::slotUpdate() -- " << endl;
-// QSize s(tableSize());
+// TQSize s(tableSize());
// viewport()->setUpdatesEnabled(false);
/// resizeContents(s.width(), s.height());
// viewport()->setUpdatesEnabled(true);
@@ -457,7 +457,7 @@ int KexiTableView::currentLocalSortingOrder() const
{
if (m_horizontalHeader->sortIndicatorSection()==-1)
return 0;
- return (m_horizontalHeader->sortIndicatorOrder() == Qt::Ascending) ? 1 : -1;
+ return (m_horizontalHeader->sortIndicatorOrder() == TQt::Ascending) ? 1 : -1;
}
void KexiTableView::setLocalSortingOrder(int col, int order)
@@ -465,7 +465,7 @@ void KexiTableView::setLocalSortingOrder(int col, int order)
if (order == 0)
col = -1;
if (col>=0)
- m_horizontalHeader->setSortIndicator(col, (order==1) ? Qt::Ascending : Qt::Descending);
+ m_horizontalHeader->setSortIndicator(col, (order==1) ? TQt::Ascending : TQt::Descending);
}
int KexiTableView::currentLocalSortColumn() const
@@ -488,37 +488,37 @@ void KexiTableView::updateGUIAfterSorting()
// d->pUpdateTimer->start(1,true);
}
-QSizePolicy KexiTableView::sizePolicy() const
+TQSizePolicy KexiTableView::sizePolicy() const
{
// this widget is expandable
- return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
-QSize KexiTableView::sizeHint() const
+TQSize KexiTableView::tqsizeHint() const
{
- const QSize &ts = tableSize();
- int w = QMAX( ts.width() + leftMargin()+ verticalScrollBar()->sizeHint().width() + 2*2,
+ const TQSize &ts = tableSize();
+ int w = TQMAX( ts.width() + leftMargin()+ verticalScrollBar()->tqsizeHint().width() + 2*2,
(m_navPanel->isVisible() ? m_navPanel->width() : 0) );
- int h = QMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(),
- minimumSizeHint().height() );
- w = QMIN( w, qApp->desktop()->width()*3/4 ); //stretch
- h = QMIN( h, qApp->desktop()->height()*3/4 ); //stretch
-
-// kexidbg << "KexiTableView::sizeHint()= " <<w <<", " <<h << endl;
-
- return QSize(w, h);
- /*QSize(
- QMAX( ts.width() + leftMargin() + 2*2, (m_navPanel ? m_navPanel->width() : 0) ),
- //+ QMIN(m_verticalHeader->width(),d->rowHeight) + margin()*2,
- QMAX( ts.height()+topMargin()+horizontalScrollBar()->sizeHint().height(),
- minimumSizeHint().height() )
+ int h = TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(),
+ tqminimumSizeHint().height() );
+ w = TQMIN( w, tqApp->desktop()->width()*3/4 ); //stretch
+ h = TQMIN( h, tqApp->desktop()->height()*3/4 ); //stretch
+
+// kexidbg << "KexiTableView::tqsizeHint()= " <<w <<", " <<h << endl;
+
+ return TQSize(w, h);
+ /*TQSize(
+ TQMAX( ts.width() + leftMargin() + 2*2, (m_navPanel ? m_navPanel->width() : 0) ),
+ //+ TQMIN(m_verticalHeader->width(),d->rowHeight) + margin()*2,
+ TQMAX( ts.height()+topMargin()+horizontalScrollBar()->tqsizeHint().height(),
+ tqminimumSizeHint().height() )
);*/
-// QMAX(ts.height() + topMargin(), minimumSizeHint().height()) );
+// TQMAX(ts.height() + topMargin(), tqminimumSizeHint().height()) );
}
-QSize KexiTableView::minimumSizeHint() const
+TQSize KexiTableView::tqminimumSizeHint() const
{
- return QSize(
+ return TQSize(
leftMargin() + ((columns()>0)?columnWidth(0):KEXI_DEFAULT_DATA_COLUMN_WIDTH) + 2*2,
d->rowHeight*5/2 + topMargin() + (m_navPanel && m_navPanel->isVisible() ? m_navPanel->height() : 0)
);
@@ -527,7 +527,7 @@ QSize KexiTableView::minimumSizeHint() const
void KexiTableView::createBuffer(int width, int height)
{
if(!d->pBufferPm)
- d->pBufferPm = new QPixmap(width, height);
+ d->pBufferPm = new TQPixmap(width, height);
else
if(d->pBufferPm->width() < width || d->pBufferPm->height() < height)
d->pBufferPm->resize(width, height);
@@ -536,7 +536,7 @@ void KexiTableView::createBuffer(int width, int height)
//internal
inline void KexiTableView::paintRow(KexiTableItem *item,
- QPainter *pb, int r, int rowp, int cx, int cy,
+ TQPainter *pb, int r, int rowp, int cx, int cy,
int colfirst, int collast, int maxwc)
{
if (!item)
@@ -579,7 +579,7 @@ inline void KexiTableView::paintRow(KexiTableItem *item,
// Translate painter and draw the cell
pb->saveWorldMatrix();
pb->translate(translx, transly);
- paintCell( pb, item, c, r, QRect(colp, rowp, colw, d->rowHeight));
+ paintCell( pb, item, c, r, TQRect(colp, rowp, colw, d->rowHeight));
pb->restoreWorldMatrix();
}
@@ -594,14 +594,14 @@ inline void KexiTableView::paintRow(KexiTableItem *item,
if (y_line>=0) {
RasterOp op = pb->rasterOp();
pb->setRasterOp(XorROP);
- pb->setPen( QPen(Qt::white, 3) );
+ pb->setPen( TQPen(TQt::white, 3) );
pb->drawLine(0, y_line, maxwc, y_line);
pb->setRasterOp(op);
}
}
}
-void KexiTableView::drawContents( QPainter *p, int cx, int cy, int cw, int ch)
+void KexiTableView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch)
{
if (d->disableDrawContents)
return;
@@ -613,8 +613,8 @@ void KexiTableView::drawContents( QPainter *p, int cx, int cy, int cw, int ch)
bool plus1row = false; //true if we should show 'inserting' row at the end
bool paintOnlyInsertRow = false;
-/* kdDebug(44021) << QString(" KexiTableView::drawContents(cx:%1 cy:%2 cw:%3 ch:%4)")
- .arg(cx).arg(cy).arg(cw).arg(ch) << endl;*/
+/* kdDebug(44021) << TQString(" KexiTableView::drawContents(cx:%1 cy:%2 cw:%3 ch:%4)")
+ .tqarg(cx).tqarg(cy).tqarg(cw).tqarg(ch) << endl;*/
if (rowlast == -1) {
rowlast = rows() - 1;
@@ -657,10 +657,10 @@ void KexiTableView::drawContents( QPainter *p, int cx, int cy, int cw, int ch)
createBuffer(cw, ch);
if(d->pBufferPm->isNull())
return;
- QPainter *pb = new QPainter(d->pBufferPm, this);
-// pb->fillRect(0, 0, cw, ch, colorGroup().base());
+ TQPainter *pb = new TQPainter(d->pBufferPm, this);
+// pb->fillRect(0, 0, cw, ch, tqcolorGroup().base());
-// int maxwc = QMIN(cw, (columnPos(d->numCols - 1) + columnWidth(d->numCols - 1)));
+// int maxwc = TQMIN(cw, (columnPos(d->numCols - 1) + columnWidth(d->numCols - 1)));
int maxwc = columnPos(columns() - 1) + columnWidth(columns() - 1);
// kdDebug(44021) << "KexiTableView::drawContents(): maxwc: " << maxwc << endl;
@@ -673,7 +673,7 @@ void KexiTableView::drawContents( QPainter *p, int cx, int cy, int cw, int ch)
rowp = rowPos(r); // 'insert' row's position
}
else {
- QPtrListIterator<KexiTableItem> it = m_data->iterator();
+ TQPtrListIterator<KexiTableItem> it = m_data->iterator();
it += rowfirst;//move to 1st row
rowp = rowPos(rowfirst); // row position
for (r = rowfirst;r <= rowlast; r++, ++it, rowp+=d->rowHeight) {
@@ -693,7 +693,7 @@ void KexiTableView::drawContents( QPainter *p, int cx, int cy, int cw, int ch)
paintEmptyArea(p, cx, cy, cw, ch);
}
-bool KexiTableView::isDefaultValueDisplayed(KexiTableItem *item, int col, QVariant* value)
+bool KexiTableView::isDefaultValueDisplayed(KexiTableItem *item, int col, TQVariant* value)
{
const bool cursorAtInsertRowOrEditingNewRow = (item == m_insertItem || (m_newRowEditing && m_currentItem == item));
KexiTableViewColumn *tvcol;
@@ -709,7 +709,7 @@ bool KexiTableView::isDefaultValueDisplayed(KexiTableItem *item, int col, QVaria
return false;
}
-void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row, const QRect &cr, bool print)
+void KexiTableView::paintCell(TQPainter* p, KexiTableItem *item, int col, int row, const TQRect &cr, bool print)
{
p->save();
Q_UNUSED(print);
@@ -718,12 +718,12 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
int x2 = w - 1;
int y2 = h - 1;
-/* if (0==qstrcmp("KexiComboBoxPopup",parentWidget()->className())) {
- kexidbg << parentWidget()->className() << " >>>>>> KexiTableView::paintCell(col=" << col <<"row="<<row<<") w="<<w<<endl;
+/* if (0==qstrcmp("KexiComboBoxPopup",tqparentWidget()->className())) {
+ kexidbg << tqparentWidget()->className() << " >>>>>> KexiTableView::paintCell(col=" << col <<"row="<<row<<") w="<<w<<endl;
}*/
// Draw our lines
- QPen pen(p->pen());
+ TQPen pen(p->pen());
if (d->appearance.gridEnabled) {
p->setPen(d->appearance.borderColor);
@@ -746,12 +746,12 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
int x = edit ? edit->leftMargin() : 0;
int y_offset=0;
- int align = Qt::SingleLine | Qt::AlignVCenter;
- QString txt; //text to draw
+ int align = TQt::SingleLine | TQt::AlignVCenter;
+ TQString txt; //text to draw
KexiTableViewColumn *tvcol = m_data->column(col);
- QVariant cellValue;
+ TQVariant cellValue;
if (col < (int)item->count()) {
if (m_currentItem == item) {
if (m_editor && row == m_curRow && col == m_curCol
@@ -790,44 +790,44 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
&& m_curRow /*d->highlightedRow*/ >= 0 && row != m_curRow; //d->highlightedRow;
// setup default pen
- QPen defaultPen;
+ TQPen defaultPen;
const bool usesSelectedTextColor = edit && edit->usesSelectedTextColor();
if (defaultValueDisplayed) {
if (col == m_curCol && row == m_curRow && usesSelectedTextColor)
- defaultPen = d->defaultValueDisplayParameters.selectedTextColor;
+ defaultPen = TQPen(d->defaultValueDisplayParameters.selectedTextColor);
else
- defaultPen = d->defaultValueDisplayParameters.textColor;
+ defaultPen = TQPen(d->defaultValueDisplayParameters.textColor);
}
else if (d->appearance.fullRowSelection
&& (row == d->highlightedRow || (row == m_curRow && d->highlightedRow==-1))
&& usesSelectedTextColor )
{
- defaultPen = d->appearance.rowHighlightingTextColor; //special case: highlighted row
+ defaultPen = TQPen(d->appearance.rowHighlightingTextColor); //special case: highlighted row
}
else if (d->appearance.fullRowSelection && row == m_curRow && usesSelectedTextColor)
{
- defaultPen = d->appearance.textColor; //special case for full row selection
+ defaultPen = TQPen(d->appearance.textColor); //special case for full row selection
}
else if (m_currentItem == item && col == m_curCol && !columnReadOnly
&& !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted
&& usesSelectedTextColor)
{
- defaultPen = colorGroup().highlightedText(); //selected text
+ defaultPen = TQPen(tqcolorGroup().highlightedText()); //selected text
}
else if (d->appearance.rowHighlightingEnabled && row == m_curRow
&& !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted
&& usesSelectedTextColor)
{
- defaultPen = d->appearance.rowHighlightingTextColor;
+ defaultPen = TQPen(d->appearance.rowHighlightingTextColor);
}
else if (d->appearance.rowMouseOverHighlightingEnabled && row == d->highlightedRow
&& !dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted
&& usesSelectedTextColor)
{
- defaultPen = d->appearance.rowMouseOverHighlightingTextColor;
+ defaultPen = TQPen(d->appearance.rowMouseOverHighlightingTextColor);
}
else
- defaultPen = d->appearance.textColor;
+ defaultPen = TQPen(d->appearance.textColor);
if (edit) {
if (defaultValueDisplayed)
@@ -849,7 +849,7 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
if (m_currentItem == item && (col == m_curCol || d->appearance.fullRowSelection)) {
if (edit && ((d->appearance.rowHighlightingEnabled && !d->appearance.fullRowSelection) || (row == m_curRow && d->highlightedRow==-1 && d->appearance.fullRowSelection))) //!dontPaintNonpersistentSelectionBecauseDifferentRowHasBeenHighlighted)
edit->paintSelectionBackground( p, isEnabled(), txt, align, x, y_offset, w, h,
- isEnabled() ? colorGroup().highlight() : QColor(200,200,200),//d->grayColor,
+ isEnabled() ? tqcolorGroup().highlight() : TQColor(200,200,200),//d->grayColor,
p->fontMetrics(), columnReadOnly, d->appearance.fullRowSelection );
}
@@ -867,7 +867,7 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
p->setPen(d->appearance.textColor);
}
else {
- QPen gray_pen(p->pen());
+ TQPen gray_pen(p->pen());
gray_pen.setColor(d->appearance.borderColor);
p->setPen(gray_pen);
}
@@ -887,7 +887,7 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
// autonumber = true;
// if (autonumber) {
KexiDisplayUtils::paintAutonumberSign(d->autonumberSignDisplayParameters, p,
- x, y_offset, w - x - x - ((align & Qt::AlignLeft)?2:0), h, align);
+ x, y_offset, w - x - x - ((align & TQt::AlignLeft)?2:0), h, align);
// }
}
}
@@ -897,81 +897,81 @@ void KexiTableView::paintCell(QPainter* p, KexiTableItem *item, int col, int row
if (defaultValueDisplayed)
p->setFont( d->defaultValueDisplayParameters.font );
p->setPen( defaultPen );
- p->drawText(x, y_offset, w - (x + x)- ((align & Qt::AlignLeft)?2:0)/*right space*/, h,
+ p->drawText(x, y_offset, w - (x + x)- ((align & TQt::AlignLeft)?2:0)/*right space*/, h,
align, txt);
}
p->restore();
}
-QPoint KexiTableView::contentsToViewport2( const QPoint &p )
+TQPoint KexiTableView::contentsToViewport2( const TQPoint &p )
{
- return QPoint( p.x() - contentsX(), p.y() - contentsY() );
+ return TQPoint( p.x() - contentsX(), p.y() - contentsY() );
}
void KexiTableView::contentsToViewport2( int x, int y, int& vx, int& vy )
{
- const QPoint v = contentsToViewport2( QPoint( x, y ) );
+ const TQPoint v = contentsToViewport2( TQPoint( x, y ) );
vx = v.x();
vy = v.y();
}
-QPoint KexiTableView::viewportToContents2( const QPoint& vp )
+TQPoint KexiTableView::viewportToContents2( const TQPoint& vp )
{
- return QPoint( vp.x() + contentsX(),
+ return TQPoint( vp.x() + contentsX(),
vp.y() + contentsY() );
}
-void KexiTableView::paintEmptyArea( QPainter *p, int cx, int cy, int cw, int ch )
+void KexiTableView::paintEmptyArea( TQPainter *p, int cx, int cy, int cw, int ch )
{
-// qDebug("%s: paintEmptyArea(x:%d y:%d w:%d h:%d)", (const char*)parentWidget()->caption(),cx,cy,cw,ch);
+// qDebug("%s: paintEmptyArea(x:%d y:%d w:%d h:%d)", (const char*)tqparentWidget()->caption(),cx,cy,cw,ch);
// Regions work with shorts, so avoid an overflow and adjust the
// table size to the visible size
- QSize ts( tableSize() );
-// ts.setWidth( QMIN( ts.width(), visibleWidth() ) );
-// ts.setHeight( QMIN( ts.height() - (m_navPanel ? m_navPanel->height() : 0), visibleHeight()) );
-/* kdDebug(44021) << QString(" (cx:%1 cy:%2 cw:%3 ch:%4)")
- .arg(cx).arg(cy).arg(cw).arg(ch) << endl;
- kdDebug(44021) << QString(" (w:%3 h:%4)")
- .arg(ts.width()).arg(ts.height()) << endl;*/
+ TQSize ts( tableSize() );
+// ts.setWidth( TQMIN( ts.width(), visibleWidth() ) );
+// ts.setHeight( TQMIN( ts.height() - (m_navPanel ? m_navPanel->height() : 0), visibleHeight()) );
+/* kdDebug(44021) << TQString(" (cx:%1 cy:%2 cw:%3 ch:%4)")
+ .tqarg(cx).tqarg(cy).tqarg(cw).tqarg(ch) << endl;
+ kdDebug(44021) << TQString(" (w:%3 h:%4)")
+ .tqarg(ts.width()).tqarg(ts.height()) << endl;*/
// Region of the rect we should draw, calculated in viewport
// coordinates, as a region can't handle bigger coordinates
contentsToViewport2( cx, cy, cx, cy );
- QRegion reg( QRect( cx, cy, cw, ch ) );
+ TQRegion reg( TQRect( cx, cy, cw, ch ) );
//kexidbg << "---cy-- " << contentsY() << endl;
// Subtract the table from it
-// reg = reg.subtract( QRect( QPoint( 0, 0 ), ts-QSize(0,m_navPanel->isVisible() ? m_navPanel->height() : 0) ) );
- reg = reg.subtract( QRect( QPoint( 0, 0 ), ts
- -QSize(0,QMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->sizeHint().height())
- - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0)
+// reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts-TQSize(0,m_navPanel->isVisible() ? m_navPanel->height() : 0) ) );
+ reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts
+ -TQSize(0,TQMAX((m_navPanel ? m_navPanel->height() : 0), horizontalScrollBar()->tqsizeHint().height())
+ - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0)
+ (horizontalScrollBar()->isVisible() ? 0 :
d->internal_bottomMargin
-// horizontalScrollBar()->sizeHint().height()/2
+// horizontalScrollBar()->tqsizeHint().height()/2
)
-//- /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2
+//- /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2
+ contentsY()
-// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height()/2 : 0)
+// - (verticalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height()/2 : 0)
)
) );
-// reg = reg.subtract( QRect( QPoint( 0, 0 ), ts ) );
+// reg = reg.subtract( TQRect( TQPoint( 0, 0 ), ts ) );
// And draw the rectangles (transformed inc contents coordinates as needed)
- QMemArray<QRect> r = reg.rects();
+ TQMemArray<TQRect> r = reg.tqrects();
for ( int i = 0; i < (int)r.count(); i++ ) {
- QRect rect( viewportToContents2(r[i].topLeft()), r[i].size() );
-/* kdDebug(44021) << QString("- pEA: p->fillRect(x:%1 y:%2 w:%3 h:%4)")
- .arg(rect.x()).arg(rect.y())
- .arg(rect.width()).arg(rect.height()) << endl;*/
-// p->fillRect( QRect(viewportToContents2(r[i].topLeft()),r[i].size()), d->emptyAreaColor );
+ TQRect rect( viewportToContents2(r[i].topLeft()), r[i].size() );
+/* kdDebug(44021) << TQString("- pEA: p->fillRect(x:%1 y:%2 w:%3 h:%4)")
+ .tqarg(rect.x()).tqarg(rect.y())
+ .tqarg(rect.width()).tqarg(rect.height()) << endl;*/
+// p->fillRect( TQRect(viewportToContents2(r[i].topLeft()),r[i].size()), d->emptyAreaColor );
p->fillRect( rect, d->appearance.emptyAreaColor );
-// p->fillRect( QRect(viewportToContents2(r[i].topLeft()),r[i].size()), viewport()->backgroundBrush() );
+// p->fillRect( TQRect(viewportToContents2(r[i].topLeft()),r[i].size()), viewport()->backgroundBrush() );
}
}
-void KexiTableView::contentsMouseDoubleClickEvent(QMouseEvent *e)
+void KexiTableView::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
// kdDebug(44021) << "KexiTableView::contentsMouseDoubleClickEvent()" << endl;
m_contentsMousePressEvent_dblClick = true;
@@ -987,7 +987,7 @@ void KexiTableView::contentsMouseDoubleClickEvent(QMouseEvent *e)
}
else {
startEditCurrentCell();
- // createEditor(m_curRow, m_curCol, QString::null);
+ // createEditor(m_curRow, m_curCol, TQString());
}
}
@@ -995,22 +995,22 @@ void KexiTableView::contentsMouseDoubleClickEvent(QMouseEvent *e)
}
}
-void KexiTableView::contentsMousePressEvent( QMouseEvent* e )
+void KexiTableView::contentsMousePressEvent( TQMouseEvent* e )
{
// kdDebug(44021) << "KexiTableView::contentsMousePressEvent() ??" << endl;
setFocus();
if(m_data->count()==0 && !isInsertingEnabled()) {
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
return;
}
if (columnAt(e->pos().x())==-1) { //outside a colums
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
return;
}
// d->contentsMousePressEvent_ev = *e;
// d->contentsMousePressEvent_enabled = true;
-// QTimer::singleShot(2000, this, SLOT( contentsMousePressEvent_Internal() ));
+// TQTimer::singleShot(2000, this, TQT_SLOT( contentsMousePressEvent_Internal() ));
// d->contentsMousePressEvent_timer.start(100,true);
// if (!d->contentsMousePressEvent_enabled)
@@ -1022,7 +1022,7 @@ void KexiTableView::contentsMousePressEvent( QMouseEvent* e )
return;
}
-// kdDebug(44021)<<"void KexiTableView::contentsMousePressEvent( QMouseEvent* e ) by now the current items should be set, if not -> error + crash"<<endl;
+// kdDebug(44021)<<"void KexiTableView::contentsMousePressEvent( TQMouseEvent* e ) by now the current items should be set, if not -> error + crash"<<endl;
if(e->button() == Qt::RightButton)
{
showContextMenu(e->globalPos());
@@ -1032,19 +1032,19 @@ void KexiTableView::contentsMousePressEvent( QMouseEvent* e )
if(columnType(m_curCol) == KexiDB::Field::Boolean && columnEditable(m_curCol))
{
//only accept clicking on the [x] rect (copied from KexiBoolTableEdit::setupContents())
- int s = QMAX(d->rowHeight - 5, 12);
- s = QMIN( d->rowHeight-3, s );
- s = QMIN( columnWidth(m_curCol)-3, s ); //avoid too large box
- const QRect r( columnPos(m_curCol) + QMAX( columnWidth(m_curCol)/2 - s/2, 0 ), rowPos(m_curRow) +d->rowHeight/2 - s/2 /*- 1*/, s, s);
+ int s = TQMAX(d->rowHeight - 5, 12);
+ s = TQMIN( d->rowHeight-3, s );
+ s = TQMIN( columnWidth(m_curCol)-3, s ); //avoid too large box
+ const TQRect r( columnPos(m_curCol) + TQMAX( columnWidth(m_curCol)/2 - s/2, 0 ), rowPos(m_curRow) +d->rowHeight/2 - s/2 /*- 1*/, s, s);
//kexidbg << r << endl;
- if (r.contains(e->pos())) {
+ if (r.tqcontains(e->pos())) {
// kexidbg << "e->x:" << e->x() << " e->y:" << e->y() << " " << rowPos(m_curRow) <<
// " " << columnPos(m_curCol) << endl;
boolToggled();
}
}
#if 0 //js: TODO
- else if(columnType(m_curCol) == QVariant::StringList && columnEditable(m_curCol))
+ else if(columnType(m_curCol) == TQVariant::StringList && columnEditable(m_curCol))
{
createEditor(m_curRow, m_curCol);
}
@@ -1053,7 +1053,7 @@ void KexiTableView::contentsMousePressEvent( QMouseEvent* e )
//ScrollView::contentsMousePressEvent( e );
}
-void KexiTableView::contentsMouseReleaseEvent( QMouseEvent* e )
+void KexiTableView::contentsMouseReleaseEvent( TQMouseEvent* e )
{
// kdDebug(44021) << "KexiTableView::contentsMousePressEvent() ??" << endl;
if(m_data->count()==0 && !isInsertingEnabled())
@@ -1068,12 +1068,12 @@ void KexiTableView::contentsMouseReleaseEvent( QMouseEvent* e )
if (!m_currentItem || col==-1 || row==-1 || col!=m_curCol || row!=m_curRow)//outside a current cell
return;
- QScrollView::contentsMouseReleaseEvent( e );
+ TQScrollView::contentsMouseReleaseEvent( e );
emit itemMouseReleased(m_currentItem, m_curRow, m_curCol);
}
-bool KexiTableView::handleContentsMousePressOrRelease(QMouseEvent* e, bool release)
+bool KexiTableView::handleContentsMousePressOrRelease(TQMouseEvent* e, bool release)
{
// remember old focus cell
int oldRow = m_curRow;
@@ -1088,9 +1088,9 @@ bool KexiTableView::handleContentsMousePressOrRelease(QMouseEvent* e, bool relea
newrow = rowAt(e->pos().y() - d->rowHeight);
if (newrow==-1 && m_data->count()>0) {
if (release)
- QScrollView::contentsMouseReleaseEvent( e );
+ TQScrollView::contentsMouseReleaseEvent( e );
else
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
return false;
}
newrow++;
@@ -1105,9 +1105,9 @@ bool KexiTableView::handleContentsMousePressOrRelease(QMouseEvent* e, bool relea
else {
if (rowAt(e->pos().y())==-1 || columnAt(e->pos().x())==-1) {
if (release)
- QScrollView::contentsMouseReleaseEvent( e );
+ TQScrollView::contentsMouseReleaseEvent( e );
else
- QScrollView::contentsMousePressEvent( e );
+ TQScrollView::contentsMousePressEvent( e );
return false; //clicked outside a grid
}
// get new focus cell
@@ -1121,13 +1121,13 @@ bool KexiTableView::handleContentsMousePressOrRelease(QMouseEvent* e, bool relea
return true;
}
-void KexiTableView::showContextMenu(const QPoint& _pos)
+void KexiTableView::showContextMenu(const TQPoint& _pos)
{
if (!d->contextMenuEnabled || m_popupMenu->count()<1)
return;
- QPoint pos(_pos);
- if (pos==QPoint(-1,-1)) {
- pos = viewport()->mapToGlobal( QPoint( columnPos(m_curCol), rowPos(m_curRow) + d->rowHeight ) );
+ TQPoint pos(_pos);
+ if (pos==TQPoint(-1,-1)) {
+ pos = viewport()->mapToGlobal( TQPoint( columnPos(m_curCol), rowPos(m_curRow) + d->rowHeight ) );
}
//show own context menu if configured
// if (updateContextMenu()) {
@@ -1140,7 +1140,7 @@ void KexiTableView::showContextMenu(const QPoint& _pos)
}*/
}
-void KexiTableView::contentsMouseMoveEvent( QMouseEvent *e )
+void KexiTableView::contentsMouseMoveEvent( TQMouseEvent *e )
{
int row;
const int col = columnAt(e->x());
@@ -1159,7 +1159,7 @@ void KexiTableView::contentsMouseMoveEvent( QMouseEvent *e )
d->highlightedRow = row;
updateRow(oldRow);
updateRow(d->highlightedRow);
- //currently selected (not necessary highlighted) row needs to be repainted
+ //currently selected (not necessary highlighted) row needs to be tqrepainted
updateRow(m_curRow);
m_verticalHeader->setHighlightedRow(d->highlightedRow);
}
@@ -1202,11 +1202,11 @@ void KexiTableView::contentsMouseMoveEvent( QMouseEvent *e )
contentsMousePressEvent(e);
}
#endif
- QScrollView::contentsMouseMoveEvent(e);
+ TQScrollView::contentsMouseMoveEvent(e);
}
#if 0//(js) doesn't work!
-void KexiTableView::contentsMouseReleaseEvent(QMouseEvent *)
+void KexiTableView::contentsMouseReleaseEvent(TQMouseEvent *)
{
if(d->needAutoScroll)
{
@@ -1215,13 +1215,13 @@ void KexiTableView::contentsMouseReleaseEvent(QMouseEvent *)
}
#endif
-static bool overrideEditorShortcutNeeded(QKeyEvent *e)
+static bool overrideEditorShortcutNeeded(TQKeyEvent *e)
{
//perhaps more to come...
- return e->key() == Qt::Key_Delete && e->state()==Qt::ControlButton;
+ return e->key() == TQt::Key_Delete && e->state()==TQt::ControlButton;
}
-bool KexiTableView::shortCutPressed( QKeyEvent *e, const QCString &action_name )
+bool KexiTableView::shortCutPressed( TQKeyEvent *e, const TQCString &action_name )
{
const int k = e->key();
KAction *action = m_sharedActions[action_name];
@@ -1240,20 +1240,20 @@ bool KexiTableView::shortCutPressed( QKeyEvent *e, const QCString &action_name )
//check default shortcut (when user app has no action shortcuts defined
// but we want these shortcuts to still work)
if (action_name=="data_save_row")
- return (k == Qt::Key_Return || k == Qt::Key_Enter) && e->state()==Qt::ShiftButton;
+ return (k == TQt::Key_Return || k == TQt::Key_Enter) && e->state()==TQt::ShiftButton;
if (action_name=="edit_delete_row")
- return k == Qt::Key_Delete && e->state()==Qt::ControlButton;
+ return k == TQt::Key_Delete && e->state()==TQt::ControlButton;
if (action_name=="edit_delete")
- return k == Qt::Key_Delete && e->state()==Qt::NoButton;
+ return k == TQt::Key_Delete && e->state()==Qt::NoButton;
if (action_name=="edit_edititem")
- return k == Qt::Key_F2 && e->state()==Qt::NoButton;
+ return k == TQt::Key_F2 && e->state()==Qt::NoButton;
if (action_name=="edit_insert_empty_row")
- return k == Qt::Key_Insert && e->state()==(Qt::ShiftButton | Qt::ControlButton);
+ return k == TQt::Key_Insert && e->state()==(TQt::ShiftButton | TQt::ControlButton);
return false;
}
-void KexiTableView::keyPressEvent(QKeyEvent* e)
+void KexiTableView::keyPressEvent(TQKeyEvent* e)
{
if (!hasData())
return;
@@ -1261,10 +1261,10 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
const int k = e->key();
const bool ro = isReadOnly();
- QWidget *w = focusWidget();
+ TQWidget *w = tqfocusWidget();
// if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view() && w!=m_editor)) {
// if (!w || w!=viewport() && w!=this && (!m_editor || w!=m_editor->view())) {
- if (!w || w!=viewport() && w!=this && (!m_editor || !KexiUtils::hasParent(dynamic_cast<QObject*>(m_editor), w))) {
+ if (!w || TQT_BASE_OBJECT(w)!=TQT_BASE_OBJECT(viewport()) && TQT_TQOBJECT(w)!=TQT_TQOBJECT(this) && (!m_editor || !KexiUtils::hasParent(TQT_TQOBJECT(dynamic_cast<TQT_BASE_OBJECT_NAME*>(m_editor)), TQT_TQOBJECT(w)))) {
//don't process stranger's events
e->ignore();
return;
@@ -1286,11 +1286,11 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
}
if(m_editor) {// if a cell is edited, do some special stuff
- if (k == Qt::Key_Escape) {
+ if (k == TQt::Key_Escape) {
cancelEditor();
e->accept();
return;
- } else if (k == Qt::Key_Return || k == Qt::Key_Enter) {
+ } else if (k == TQt::Key_Return || k == TQt::Key_Enter) {
if (columnType(m_curCol) == KexiDB::Field::Boolean) {
boolToggled();
}
@@ -1309,7 +1309,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
}
}
- if(k == Qt::Key_Return || k == Qt::Key_Enter)
+ if(k == TQt::Key_Return || k == TQt::Key_Enter)
{
emit itemReturnPressed(m_currentItem, m_curRow, m_curCol);
}
@@ -1317,7 +1317,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
int curRow = m_curRow;
int curCol = m_curCol;
- const bool nobtn = e->state()==NoButton;
+ const bool nobtn = e->state()==Qt::NoButton;
bool printable = false;
//check shared shortcuts
@@ -1338,8 +1338,8 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
}
}
-/* case Qt::Key_Delete:
- if (e->state()==Qt::ControlButton) {//remove current row
+/* case TQt::Key_Delete:
+ if (e->state()==TQt::ControlButton) {//remove current row
deleteCurrentRow();
}
else if (nobtn) {//remove contents of the current cell
@@ -1348,18 +1348,18 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
break;*/
// bool _return;
- if (k == Qt::Key_Shift || k == Qt::Key_Alt || k == Qt::Key_Control || k == Qt::Key_Meta) {
+ if (k == TQt::Key_Shift || k == TQt::Key_Alt || k == TQt::Key_Control || k == TQt::Key_Meta) {
e->ignore();
}
else if (KexiDataAwareObjectInterface::handleKeyPress(e, curRow, curCol, d->appearance.fullRowSelection)) {
if (e->isAccepted())
return;
}
- else if (k == Qt::Key_Backspace && nobtn) {
+ else if (k == TQt::Key_Backspace && nobtn) {
if (!ro && columnType(curCol) != KexiDB::Field::Boolean && columnEditable(curCol))
- createEditor(curRow, curCol, QString::null, true);
+ createEditor(curRow, curCol, TQString(), true);
}
- else if (k == Qt::Key_Space) {
+ else if (k == TQt::Key_Space) {
if (nobtn && !ro && columnEditable(curCol)) {
if (columnType(curCol) == KexiDB::Field::Boolean) {
boolToggled();
@@ -1368,7 +1368,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
printable = true; //just space key
}
}
- else if (k == Qt::Key_Escape) {
+ else if (k == TQt::Key_Escape) {
if (nobtn && m_rowEditing) {
cancelRowEdit();
return;
@@ -1376,8 +1376,8 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
}
else {
//others:
- if (nobtn && (k==Qt::Key_Tab || k==Qt::Key_Right)) {
-//! \todo add option for stopping at 1st column for Qt::Key_left
+ if (nobtn && (k==TQt::Key_Tab || k==TQt::Key_Right)) {
+//! \todo add option for stopping at 1st column for TQt::Key_left
//tab
if (acceptEditor()) {
if (curCol == (columns() - 1)) {
@@ -1390,10 +1390,10 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
curCol++;
}
}
- else if ((e->state()==Qt::ShiftButton && k==Qt::Key_Tab)
- || (nobtn && k==Qt::Key_Backtab)
- || (e->state()==Qt::ShiftButton && k==Qt::Key_Backtab)
- || (nobtn && k==Qt::Key_Left)
+ else if ((e->state()==TQt::ShiftButton && k==TQt::Key_Tab)
+ || (nobtn && k==TQt::Key_Backtab)
+ || (e->state()==TQt::ShiftButton && k==TQt::Key_Backtab)
+ || (nobtn && k==TQt::Key_Left)
) {
//! \todo add option for stopping at last column
//backward tab
@@ -1408,7 +1408,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
curCol--;
}
}
- else if (nobtn && k==d->contextMenuKey) { //Qt::Key_Menu:
+ else if (nobtn && k==d->contextMenuKey) { //TQt::Key_Menu:
showContextMenu();
}
else {
@@ -1418,16 +1418,16 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
e->accept();
return;
}
- else if ( nobtn && (k==Qt::Key_Enter || k==Qt::Key_Return || shortCutPressed(e, "edit_edititem")) ) {
+ else if ( nobtn && (k==TQt::Key_Enter || k==TQt::Key_Return || shortCutPressed(e, "edit_edititem")) ) {
//this condition is moved after handleKeyPress() to allow to everride enter key as well
startEditOrToggleValue();
}
else {
kexidbg << "KexiTableView::KeyPressEvent(): default" << endl;
if (e->text().isEmpty() || !e->text().isEmpty() && !e->text()[0].isPrint() ) {
- kdDebug(44021) << "NOT PRINTABLE: 0x0" << QString("%1").arg(k,0,16) <<endl;
+ kdDebug(44021) << "NOT PRINTABLE: 0x0" << TQString("%1").tqarg(k,0,16) <<endl;
// e->ignore();
- QScrollView::keyPressEvent(e);
+ TQScrollView::keyPressEvent(e);
return;
}
printable = true;
@@ -1437,7 +1437,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
//finally: we've printable char:
if (printable && !ro) {
KexiTableViewColumn *tvcol = m_data->column(curCol);
- if (tvcol->acceptsFirstChar(e->text()[0])) {
+ if (tvcol->acceptsFirstChar(TQString(e->text())[0])) {
kdDebug(44021) << "KexiTableView::KeyPressEvent(): ev pressed: acceptsFirstChar()==true" << endl;
// if (e->text()[0].isPrint())
createEditor(curRow, curCol, e->text(), true);
@@ -1450,7 +1450,7 @@ void KexiTableView::keyPressEvent(QKeyEvent* e)
m_vScrollBarValueChanged_enabled=false;
- // if focus cell changes, repaint
+ // if focus cell changes, tqrepaint
setCursorPosition(curRow, curCol);
m_vScrollBarValueChanged_enabled=true;
@@ -1495,9 +1495,9 @@ KexiDataItemInterface *KexiTableView::editor( int col, bool ignoreMissingEditor
if (m_data->cursor() && m_data->cursor()->query())
editor->createInternalEditor(*m_data->cursor()->query());
- connect(editor,SIGNAL(editRequested()),this,SLOT(slotEditRequested()));
- connect(editor,SIGNAL(cancelRequested()),this,SLOT(cancelEditor()));
- connect(editor,SIGNAL(acceptRequested()),this,SLOT(acceptEditor()));
+ connect(editor,TQT_SIGNAL(editRequested()),this,TQT_SLOT(slotEditRequested()));
+ connect(editor,TQT_SIGNAL(cancelRequested()),this,TQT_SLOT(cancelEditor()));
+ connect(editor,TQT_SIGNAL(acceptRequested()),this,TQT_SLOT(acceptEditor()));
editor->resize(columnWidth(col)-1, rowHeight()-1);
editor->installEventFilter(this);
@@ -1518,7 +1518,7 @@ void KexiTableView::editorShowFocus( int /*row*/, int col )
}*/
if (edit) {
kexidbg<< "KexiTableView::editorShowFocus() : IN" << endl;
- QRect rect = cellGeometry( m_curRow, m_curCol );
+ TQRect rect = cellGeometry( m_curRow, m_curCol );
// rect.moveBy( -contentsX(), -contentsY() );
edit->showFocus( rect, isReadOnly() || m_data->column(col)->isReadOnly() );
}
@@ -1534,7 +1534,7 @@ void KexiTableView::reloadData() {
updateContents();
}
-void KexiTableView::createEditor(int row, int col, const QString& addText, bool removeOld)
+void KexiTableView::createEditor(int row, int col, const TQString& addText, bool removeOld)
{
kdDebug(44021) << "KexiTableView::createEditor('"<<addText<<"',"<<removeOld<<")"<<endl;
if (isReadOnly()) {
@@ -1569,7 +1569,7 @@ void KexiTableView::createEditor(int row, int col, const QString& addText, bool
//refr. current and next row
updateContents(columnPos(0), rowPos(row), viewport()->width(), d->rowHeight*2);
// updateContents(columnPos(0), rowPos(row+1), viewport()->width(), d->rowHeight);
-//js: warning this breaks behaviour (cursor is skipping, etc.): qApp->processEvents(500);
+//js: warning this breaks behaviour (cursor is skipping, etc.): tqApp->processEvents(500);
ensureVisible(columnPos(m_curCol), rowPos(row+1)+d->rowHeight-1, columnWidth(m_curCol), d->rowHeight);
m_verticalHeader->setOffset(contentsY());
@@ -1598,13 +1598,13 @@ void KexiTableView::createEditor(int row, int col, const QString& addText, bool
}
}
-void KexiTableView::focusInEvent(QFocusEvent* e)
+void KexiTableView::focusInEvent(TQFocusEvent* e)
{
Q_UNUSED(e);
updateCell(m_curRow, m_curCol);
}
-void KexiTableView::focusOutEvent(QFocusEvent* e)
+void KexiTableView::focusOutEvent(TQFocusEvent* e)
{
KexiDataAwareObjectInterface::focusOutEvent(e);
}
@@ -1614,12 +1614,12 @@ bool KexiTableView::focusNextPrevChild(bool /*next*/)
return false; //special Tab/BackTab meaning
/* if (m_editor)
return true;
- return QScrollView::focusNextPrevChild(next);*/
+ return TQScrollView::focusNextPrevChild(next);*/
}
-void KexiTableView::resizeEvent(QResizeEvent *e)
+void KexiTableView::resizeEvent(TQResizeEvent *e)
{
- QScrollView::resizeEvent(e);
+ TQScrollView::resizeEvent(e);
//updateGeometries();
if (m_navPanel)
@@ -1630,34 +1630,34 @@ void KexiTableView::resizeEvent(QResizeEvent *e)
slotUpdate();
triggerUpdate();
}
-// d->pTopHeader->repaint();
+// d->pTopHeader->tqrepaint();
/* m_navPanel->setGeometry(
frameWidth(),
viewport()->height() +d->pTopHeader->height()
- -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height())
+ -(horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height())
+frameWidth(),
- m_navPanel->sizeHint().width(), // - verticalScrollBar()->sizeHint().width() - horizontalScrollBar()->sizeHint().width(),
- horizontalScrollBar()->sizeHint().height()
+ m_navPanel->tqsizeHint().width(), // - verticalScrollBar()->tqsizeHint().width() - horizontalScrollBar()->tqsizeHint().width(),
+ horizontalScrollBar()->tqsizeHint().height()
);*/
// updateContents();
// m_navPanel->setGeometry(1,horizontalScrollBar()->pos().y(),
// m_navPanel->width(), horizontalScrollBar()->height());
// updateContents(0,0,2000,2000);//js
-// erase(); repaint();
+// erase(); tqrepaint();
}
-void KexiTableView::viewportResizeEvent( QResizeEvent *e )
+void KexiTableView::viewportResizeEvent( TQResizeEvent *e )
{
- QScrollView::viewportResizeEvent( e );
+ TQScrollView::viewportResizeEvent( e );
updateGeometries();
-// erase(); repaint();
+// erase(); tqrepaint();
}
-void KexiTableView::showEvent(QShowEvent *e)
+void KexiTableView::showEvent(TQShowEvent *e)
{
- QScrollView::showEvent(e);
+ TQScrollView::showEvent(e);
if (!d->maximizeColumnsWidthOnShow.isEmpty()) {
maximizeColumnsWidth(d->maximizeColumnsWidthOnShow);
d->maximizeColumnsWidthOnShow.clear();
@@ -1670,29 +1670,29 @@ void KexiTableView::showEvent(QShowEvent *e)
}
else {
//just update size
- QSize s(tableSize());
-// QRect r(cellGeometry(rows() - 1 + (isInsertingEnabled()?1:0), columns() - 1 ));
+ TQSize s(tableSize());
+// TQRect r(cellGeometry(rows() - 1 + (isInsertingEnabled()?1:0), columns() - 1 ));
// resizeContents(r.right() + 1, r.bottom() + 1);
resizeContents(s.width(),s.height());
}
updateGeometries();
//now we can ensure cell's visibility ( if there was such a call before show() )
- if (d->ensureCellVisibleOnShow!=QPoint(-1,-1)) {
+ if (d->ensureCellVisibleOnShow!=TQPoint(-1,-1)) {
ensureCellVisible( d->ensureCellVisibleOnShow.x(), d->ensureCellVisibleOnShow.y() );
- d->ensureCellVisibleOnShow = QPoint(-1,-1); //reset the flag
+ d->ensureCellVisibleOnShow = TQPoint(-1,-1); //reset the flag
}
if (m_navPanel)
m_navPanel->updateGeometry(leftMargin());
// updateNavPanelGeometry();
}
-void KexiTableView::contentsDragMoveEvent(QDragMoveEvent *e)
+void KexiTableView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if (!hasData())
return;
if (m_dropsAtRowEnabled) {
- QPoint p = e->pos();
+ TQPoint p = e->pos();
int row = rowAt(p.y());
KexiTableItem *item = 0;
// if (row==(rows()-1) && (p.y() % d->rowHeight) > (d->rowHeight*2/3) ) {
@@ -1721,7 +1721,7 @@ void KexiTableView::contentsDragMoveEvent(QDragMoveEvent *e)
}
else
e->acceptAction(false);
-/* QStringList::ConstIterator it, end( d->dropFilters.constEnd() );
+/* TQStringList::ConstIterator it, end( d->dropFilters.constEnd() );
for( it = d->dropFilters.constBegin(); it != end; it++)
{
if(e->provides((*it).latin1()))
@@ -1733,7 +1733,7 @@ void KexiTableView::contentsDragMoveEvent(QDragMoveEvent *e)
// e->acceptAction(false);
}
-void KexiTableView::contentsDropEvent(QDropEvent *e)
+void KexiTableView::contentsDropEvent(TQDropEvent *e)
{
if (!hasData())
return;
@@ -1744,7 +1744,7 @@ void KexiTableView::contentsDropEvent(QDropEvent *e)
m_dragIndicatorLine = -1;
updateRow(row2update);
}
- QPoint p = e->pos();
+ TQPoint p = e->pos();
int row = rowAt(p.y());
if ((p.y() % d->rowHeight) > (d->rowHeight*2/3) ) {
row++;
@@ -1761,7 +1761,7 @@ void KexiTableView::contentsDropEvent(QDropEvent *e)
}
}
-void KexiTableView::viewportDragLeaveEvent( QDragLeaveEvent *e )
+void KexiTableView::viewportDragLeaveEvent( TQDragLeaveEvent *e )
{
Q_UNUSED(e);
if (!hasData())
@@ -1780,7 +1780,7 @@ void KexiTableView::updateCell(int row, int col)
{
// kdDebug(44021) << "updateCell("<<row<<", "<<col<<")"<<endl;
updateContents(cellGeometry(row, col));
-/* QRect r = cellGeometry(row, col);
+/* TQRect r = cellGeometry(row, col);
r.setHeight(r.height()+6);
r.setTop(r.top()-3);
updateContents();*/
@@ -1799,30 +1799,30 @@ void KexiTableView::updateRow(int row)
//int leftcol = d->pTopHeader->sectionAt( d->pTopHeader->offset() );
//kexidbg << contentsX() << " " << contentsY() << endl;
- //kexidbg << QRect( columnPos( leftcol ), rowPos(row), clipper()->width(), rowHeight() ) << endl;
- // updateContents( QRect( columnPos( leftcol ), rowPos(row), clipper()->width(), rowHeight() ) ); //columnPos(rightcol)+columnWidth(rightcol), rowHeight() ) );
- updateContents( QRect( contentsX(), rowPos(row), clipper()->width(), rowHeight() ) ); //columnPos(rightcol)+columnWidth(rightcol), rowHeight() ) );
+ //kexidbg << TQRect( columnPos( leftcol ), rowPos(row), clipper()->width(), rowHeight() ) << endl;
+ // updateContents( TQRect( columnPos( leftcol ), rowPos(row), clipper()->width(), rowHeight() ) ); //columnPos(rightcol)+columnWidth(rightcol), rowHeight() ) );
+ updateContents( TQRect( contentsX(), rowPos(row), clipper()->width(), rowHeight() ) ); //columnPos(rightcol)+columnWidth(rightcol), rowHeight() ) );
}
void KexiTableView::slotColumnWidthChanged( int, int, int )
{
- QSize s(tableSize());
+ TQSize s(tableSize());
int w = contentsWidth();
viewport()->setUpdatesEnabled(false);
resizeContents( s.width(), s.height() );
viewport()->setUpdatesEnabled(true);
if (contentsWidth() < w) {
updateContents(contentsX(), 0, viewport()->width(), contentsHeight());
-// repaintContents( s.width(), 0, w - s.width() + 1, contentsHeight(), true );
+// tqrepaintContents( s.width(), 0, w - s.width() + 1, contentsHeight(), true );
}
else {
// updateContents( columnPos(col), 0, contentsWidth(), contentsHeight() );
updateContents(contentsX(), 0, viewport()->width(), contentsHeight());
- // viewport()->repaint();
+ // viewport()->tqrepaint();
}
// updateContents(0, 0, d->pBufferPm->width(), d->pBufferPm->height());
- QWidget *editorWidget = dynamic_cast<QWidget*>(m_editor);
+ TQWidget *editorWidget = dynamic_cast<TQWidget*>(m_editor);
if (editorWidget)
{
editorWidget->resize(columnWidth(m_curCol)-1, rowHeight()-1);
@@ -1844,7 +1844,7 @@ void KexiTableView::slotSectionHandleDoubleClicked( int section )
void KexiTableView::updateGeometries()
{
- QSize ts = tableSize();
+ TQSize ts = tableSize();
if (m_horizontalHeader->offset() && ts.width() < (m_horizontalHeader->offset() + m_horizontalHeader->width()))
horizontalScrollBar()->setValue(ts.width() - m_horizontalHeader->width());
@@ -1871,7 +1871,7 @@ int KexiTableView::columnPos(int col) const
if (!hasData())
return 0;
//if this column is hidden, find first column before that is visible
- int c = QMIN(col, (int)m_data->columnsCount()-1), vcID = 0;
+ int c = TQMIN(col, (int)m_data->columnsCount()-1), vcID = 0;
while (c>=0 && (vcID=m_data->visibleColumnID( c ))==-1)
c--;
if (c<0)
@@ -1912,67 +1912,67 @@ int KexiTableView::rowAt(int pos, bool ignoreEnd) const
return pos;
}
-QRect KexiTableView::cellGeometry(int row, int col) const
+TQRect KexiTableView::cellGeometry(int row, int col) const
{
- return QRect(columnPos(col), rowPos(row),
+ return TQRect(columnPos(col), rowPos(row),
columnWidth(col), rowHeight());
}
-QSize KexiTableView::tableSize() const
+TQSize KexiTableView::tableSize() const
{
if ((rows()+ (isInsertingEnabled()?1:0) ) > 0 && columns() > 0) {
/* kexidbg << "tableSize()= " << columnPos( columns() - 1 ) + columnWidth( columns() - 1 )
<< ", " << rowPos( rows()-1+(isInsertingEnabled()?1:0)) + d->rowHeight
-// + QMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->sizeHint().height())
- + (m_navPanel->isVisible() ? QMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 )
+// + TQMAX(m_navPanel ? m_navPanel->height() : 0, horizontalScrollBar()->tqsizeHint().height())
+ + (m_navPanel->isVisible() ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 )
+ margin() << endl;
*/
// kexidbg<< m_navPanel->isVisible() <<" "<<m_navPanel->height()<<" "
-// <<horizontalScrollBar()->sizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl;
+// <<horizontalScrollBar()->tqsizeHint().height()<<" "<<rowPos( rows()-1+(isInsertingEnabled()?1:0))<<endl;
- //int xx = horizontalScrollBar()->sizeHint().height()/2;
+ //int xx = horizontalScrollBar()->tqsizeHint().height()/2;
- QSize s(
+ TQSize s(
columnPos( columns() - 1 ) + columnWidth( columns() - 1 ),
-// + verticalScrollBar()->sizeHint().width(),
+// + verticalScrollBar()->tqsizeHint().width(),
rowPos( rows()-1+(isInsertingEnabled()?1:0) ) + d->rowHeight
- + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->sizeHint().height())
+ + (horizontalScrollBar()->isVisible() ? 0 : horizontalScrollBar()->tqsizeHint().height())
+ d->internal_bottomMargin
-// horizontalScrollBar()->sizeHint().height()/2
-// - /*d->bottomMargin */ horizontalScrollBar()->sizeHint().height()*3/2
+// horizontalScrollBar()->tqsizeHint().height()/2
+// - /*d->bottomMargin */ horizontalScrollBar()->tqsizeHint().height()*3/2
// + ( (m_navPanel && m_navPanel->isVisible() && verticalScrollBar()->isVisible()
// && !horizontalScrollBar()->isVisible())
- // ? horizontalScrollBar()->sizeHint().height() : 0)
+ // ? horizontalScrollBar()->tqsizeHint().height() : 0)
-// + QMAX( (m_navPanel && m_navPanel->isVisible()) ? m_navPanel->height() : 0,
-// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() : 0)
+// + TQMAX( (m_navPanel && m_navPanel->isVisible()) ? m_navPanel->height() : 0,
+// horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() : 0)
// + (m_navPanel->isVisible()
-// ? QMAX( m_navPanel->height(), horizontalScrollBar()->sizeHint().height() ) :0 )
+// ? TQMAX( m_navPanel->height(), horizontalScrollBar()->tqsizeHint().height() ) :0 )
-// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->sizeHint().height() :0 )
+// - (horizontalScrollBar()->isVisible() ? horizontalScrollBar()->tqsizeHint().height() :0 )
+ margin()
//-2*d->rowHeight
);
// kexidbg << rows()-1 <<" "<< (isInsertingEnabled()?1:0) <<" "<< (m_rowEditing?1:0) << " " << s << endl;
return s;
-// +horizontalScrollBar()->sizeHint().height() + margin() );
+// +horizontalScrollBar()->tqsizeHint().height() + margin() );
}
- return QSize(0,0);
+ return TQSize(0,0);
}
void KexiTableView::ensureCellVisible(int row, int col/*=-1*/)
{
if (!isVisible()) {
//the table is invisible: we can't ensure visibility now
- d->ensureCellVisibleOnShow = QPoint(row,col);
+ d->ensureCellVisibleOnShow = TQPoint(row,col);
return;
}
//quite clever: ensure the cell is visible:
- QRect r( columnPos(col==-1 ? m_curCol : col), rowPos(row) +(d->appearance.fullRowSelection?1:0),
+ TQRect r( columnPos(col==-1 ? m_curCol : col), rowPos(row) +(d->appearance.fullRowSelection?1:0),
columnWidth(col==-1 ? m_curCol : col), rowHeight());
/* if (m_navPanel && horizontalScrollBar()->isHidden() && row == rows()-1) {
@@ -1988,7 +1988,7 @@ void KexiTableView::ensureCellVisible(int row, int col/*=-1*/)
r.setBottom(r.bottom()+m_navPanel->height());
}
- QPoint pcenter = r.center();
+ TQPoint pcenter = r.center();
ensureVisible(pcenter.x(), pcenter.y(), r.width()/2, r.height()/2);
// updateContents();
// updateNavPanelGeometry();
@@ -2007,13 +2007,13 @@ void KexiTableView::updateAfterAcceptRowEdit()
m_navPanel->showEditingIndicator(false);
}
-bool KexiTableView::getVisibleLookupValue(QVariant& cellValue, KexiTableEdit *edit,
+bool KexiTableView::getVisibleLookupValue(TQVariant& cellValue, KexiTableEdit *edit,
KexiTableItem *item, KexiTableViewColumn *tvcol) const
{
if (edit->columnInfo() && edit->columnInfo()->indexForVisibleLookupValue()!=-1
&& edit->columnInfo()->indexForVisibleLookupValue() < (int)item->count())
{
- const QVariant *visibleFieldValue = 0;
+ const TQVariant *visibleFieldValue = 0;
if (m_currentItem == item && m_data->rowEditBuffer()) {
visibleFieldValue = m_data->rowEditBuffer()->at(
*tvcol->visibleLookupColumnInfo, false/*!useDefaultValueIfPossible*/ );
@@ -2040,7 +2040,7 @@ void KexiTableView::removeEditor()
void KexiTableView::slotRowRepaintRequested(KexiTableItem& item)
{
- updateRow( m_data->findRef(&item) );
+ updateRow( m_data->tqfindRef(&item) );
}
//(js) unused
@@ -2081,15 +2081,15 @@ KexiTableView::print(KPrinter &/*printer*/)
int bottomMargin = 0;
kdDebug(44021) << "KexiTableView::print: bottom = " << bottomMargin << endl;
- QPainter p(&printer);
+ TQPainter p(&printer);
KexiTableItem *i;
int width = leftMargin;
for(int col=0; col < columns(); col++)
{
- p.fillRect(width, topMargin - d->rowHeight, columnWidth(col), d->rowHeight, QBrush(Qt::gray));
+ p.fillRect(width, topMargin - d->rowHeight, columnWidth(col), d->rowHeight, TQBrush(TQt::gray));
p.drawRect(width, topMargin - d->rowHeight, columnWidth(col), d->rowHeight);
- p.drawText(width, topMargin - d->rowHeight, columnWidth(col), d->rowHeight, Qt::AlignLeft | Qt::AlignVCenter,
+ p.drawText(width, topMargin - d->rowHeight, columnWidth(col), d->rowHeight, TQt::AlignLeft | TQt::AlignVCenter,
m_horizontalHeader->label(col));
width = width + columnWidth(col);
}
@@ -2107,7 +2107,7 @@ KexiTableView::print(KPrinter &/*printer*/)
kdDebug(44021) << "KexiTableView::print: col = " << col << " x = " << xOffset << endl;
p.saveWorldMatrix();
p.translate(xOffset, yOffset);
- paintCell(&p, i, col, QRect(0, 0, columnWidth(col) + 1, d->rowHeight), true);
+ paintCell(&p, i, col, TQRect(0, 0, columnWidth(col) + 1, d->rowHeight), true);
p.restoreWorldMatrix();
// p.drawRect(xOffset, yOffset, columnWidth(col), d->rowHeight);
xOffset = xOffset + columnWidth(col);
@@ -2136,7 +2136,7 @@ KexiTableView::print(KPrinter &/*printer*/)
}
#endif
-QString KexiTableView::columnCaption(int colNum) const
+TQString KexiTableView::columnCaption(int colNum) const
{
return m_horizontalHeader->label(colNum);
}
@@ -2167,14 +2167,14 @@ void KexiTableView::adjustColumnWidthToContents(int colNum)
if (indexOfVisibleColumn < 0)
return;
- QPtrListIterator<KexiTableItem> it = m_data->iterator();
+ TQPtrListIterator<KexiTableItem> it = m_data->iterator();
if (it.current() && it.current()->count()<=(uint)indexOfVisibleColumn)
return;
KexiCellEditorFactoryItem *item = KexiCellEditorFactory::item( columnType(indexOfVisibleColumn) );
if (!item)
return;
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int maxw = horizontalHeaderVisible()
? fm.width( m_horizontalHeader->label( colNum/* not indexOfVisibleColumn*/ ) ) : 0;
if (maxw == 0 && m_data->isEmpty())
@@ -2186,7 +2186,7 @@ void KexiTableView::adjustColumnWidthToContents(int colNum)
if (ed) {
for (it = m_data->iterator(); it.current(); ++it) {
const int wfw = ed->widthForValue( it.current()->at( indexOfVisibleColumn ), fm );
- maxw = QMAX( maxw, wfw );
+ maxw = TQMAX( maxw, wfw );
}
const bool focused = currentColumn() == colNum;
maxw += (fm.width(" ") + ed->leftMargin() + ed->rightMargin(focused));
@@ -2207,7 +2207,7 @@ void KexiTableView::setColumnWidth(int colNum, int width)
slotTopHeaderSizeChange( colNum, oldWidth, m_horizontalHeader->sectionSize( colNum ) );
}
-void KexiTableView::maximizeColumnsWidth( const QValueList<int> &columnList )
+void KexiTableView::maximizeColumnsWidth( const TQValueList<int> &columnList )
{
if (!isVisible()) {
d->maximizeColumnsWidthOnShow += columnList;
@@ -2216,11 +2216,11 @@ void KexiTableView::maximizeColumnsWidth( const QValueList<int> &columnList )
if (width() <= m_horizontalHeader->headerWidth())
return;
//sort the list and make it unique
- QValueList<int> cl, sortedList = columnList;
+ TQValueList<int> cl, sortedList = columnList;
qHeapSort(sortedList);
int i=-999;
- QValueList<int>::ConstIterator it, end( sortedList.constEnd() );
+ TQValueList<int>::ConstIterator it, end( sortedList.constEnd() );
for ( it = sortedList.constBegin(); it != end; ++it) {
if (i != (*it)) {
cl += (*it);
@@ -2271,13 +2271,13 @@ void KexiTableView::setVerticalHeaderVisible(bool set)
int left_width;
if (set) {
m_verticalHeader->show();
- left_width = QMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight);
+ left_width = TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight);
}
else {
m_verticalHeader->hide();
left_width = 0;
}
- setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->sizeHint().height() : 0, 0, 0);
+ setMargins( left_width, horizontalHeaderVisible() ? m_horizontalHeader->tqsizeHint().height() : 0, 0, 0);
}
bool KexiTableView::horizontalHeaderVisible() const
@@ -2291,7 +2291,7 @@ void KexiTableView::setHorizontalHeaderVisible(bool set)
d->horizontalHeaderVisible = set; //needed because isVisible() is not always accurate
if (set) {
m_horizontalHeader->show();
- top_height = m_horizontalHeader->sizeHint().height();
+ top_height = m_horizontalHeader->tqsizeHint().height();
}
else {
m_horizontalHeader->hide();
@@ -2308,7 +2308,7 @@ void KexiTableView::triggerUpdate()
// d->pUpdateTimer->start(200, true);
}
-void KexiTableView::setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h )
+void KexiTableView::setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h )
{
/*todo*/
kdDebug(44021)<<"KexiTableView::setHBarGeometry"<<endl;
@@ -2329,7 +2329,7 @@ void KexiTableView::setSpreadSheetMode()
setAppearance( a );
}
-int KexiTableView::validRowNumber(const QString& text)
+int KexiTableView::validRowNumber(const TQString& text)
{
bool ok=true;
int r = text.toInt(&ok);
@@ -2376,11 +2376,11 @@ void KexiTableView::copySelection()
{
if (m_currentItem && m_curCol!=-1) {
KexiTableEdit *edit = tableEditorWidget( m_curCol );
- QVariant defaultValue;
+ TQVariant defaultValue;
const bool defaultValueDisplayed
= isDefaultValueDisplayed(m_currentItem, m_curCol, &defaultValue);
if (edit) {
- QVariant visibleValue;
+ TQVariant visibleValue;
getVisibleLookupValue(visibleValue, edit, m_currentItem, m_data->column(m_curCol));
edit->handleCopyAction(
defaultValueDisplayed ? defaultValue : m_currentItem->at( m_curCol ),
@@ -2405,14 +2405,14 @@ void KexiTableView::paste()
edit->handleAction("edit_paste");
}
-bool KexiTableView::eventFilter( QObject *o, QEvent *e )
+bool KexiTableView::eventFilter( TQObject *o, TQEvent *e )
{
//don't allow to stole key my events by others:
// kexidbg << "spontaneous " << e->spontaneous() << " type=" << e->type() << endl;
- if (e->type()==QEvent::KeyPress) {
- if (e->spontaneous() /*|| e->type()==QEvent::AccelOverride*/) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ if (e->type()==TQEvent::KeyPress) {
+ if (e->spontaneous() /*|| e->type()==TQEvent::AccelOverride*/) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
const int k = ke->key();
int s = ke->state();
//cell editor's events:
@@ -2422,12 +2422,12 @@ bool KexiTableView::eventFilter( QObject *o, QEvent *e )
ke->accept();
return true;
}
- else if (m_editor && (o==dynamic_cast<QObject*>(m_editor) || o==m_editor->widget())) {
- if ( (k==Qt::Key_Tab && (s==Qt::NoButton || s==Qt::ShiftButton))
+ else if (m_editor && (o==dynamic_cast<TQT_BASE_OBJECT_NAME*>(m_editor) || TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_editor->widget()))) {
+ if ( (k==TQt::Key_Tab && (s==Qt::NoButton || s==TQt::ShiftButton))
|| (overrideEditorShortcutNeeded(ke))
- || (k==Qt::Key_Enter || k==Qt::Key_Return || k==Qt::Key_Up || k==Qt::Key_Down)
- || (k==Qt::Key_Left && m_editor->cursorAtStart())
- || (k==Qt::Key_Right && m_editor->cursorAtEnd())
+ || (k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_Up || k==TQt::Key_Down)
+ || (k==TQt::Key_Left && m_editor->cursorAtStart())
+ || (k==TQt::Key_Right && m_editor->cursorAtEnd())
)
{
//try to steal the key press from editor or it's internal widget...
@@ -2437,12 +2437,12 @@ bool KexiTableView::eventFilter( QObject *o, QEvent *e )
}
}
/*
- else if (e->type()==QEvent::KeyPress && (o==this || (m_editor && o==m_editor->widget()))){//|| o==viewport())
+ else if (e->type()==TQEvent::KeyPress && (o==this || (m_editor && o==m_editor->widget()))){//|| o==viewport())
keyPressEvent(ke);
if (ke->isAccepted())
return true;
}*/
-/*todo else if ((k==Qt::Key_Tab || k==(Qt::SHIFT|Qt::Key_Tab)) && o==d->navRowNumber) {
+/*todo else if ((k==TQt::Key_Tab || k==(TQt::SHIFT|TQt::Key_Tab)) && o==d->navRowNumber) {
//tab key focuses tv
ke->accept();
setFocus();
@@ -2450,14 +2450,14 @@ bool KexiTableView::eventFilter( QObject *o, QEvent *e )
}*/
}
}
- else if (o==horizontalScrollBar()) {
- if ((e->type()==QEvent::Show && !horizontalScrollBar()->isVisible())
- || (e->type()==QEvent::Hide && horizontalScrollBar()->isVisible())) {
+ else if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(horizontalScrollBar())) {
+ if ((e->type()==TQEvent::Show && !horizontalScrollBar()->isVisible())
+ || (e->type()==TQEvent::Hide && horizontalScrollBar()->isVisible())) {
updateWidgetContentsSize();
}
}
- else if (e->type()==QEvent::Leave) {
- if (o==viewport() && d->appearance.rowMouseOverHighlightingEnabled
+ else if (e->type()==TQEvent::Leave) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(viewport()) && d->appearance.rowMouseOverHighlightingEnabled
&& d->appearance.persistentSelections)
{
if (d->highlightedRow!=-1) {
@@ -2474,22 +2474,22 @@ bool KexiTableView::eventFilter( QObject *o, QEvent *e )
}
}
}
- d->recentCellWithToolTip = QPoint(-1,-1);
+ d->recentCellWithToolTip = TQPoint(-1,-1);
}
-/* else if (e->type()==QEvent::FocusOut && o->inherits("QWidget")) {
+/* else if (e->type()==TQEvent::FocusOut && o->inherits(TQWIDGET_OBJECT_NAME_STRING)) {
//hp==true if currently focused widget is a child of this table view
- const bool hp = KexiUtils::hasParent( static_cast<QWidget*>(o), focusWidget());
- if (!hp && KexiUtils::hasParent( this, static_cast<QWidget*>(o))) {
+ const bool hp = KexiUtils::hasParent( static_cast<TQWidget*>(o), tqfocusWidget());
+ if (!hp && KexiUtils::hasParent( this, static_cast<TQWidget*>(o))) {
//accept row editing if focus is moved to foreign widget
- //(not a child, like eg. editor) from one of our table view's children
+ //(not a child, like eg. editor) from one of our table view's tqchildren
//or from table view itself
if (!acceptRowEdit()) {
- static_cast<QWidget*>(o)->setFocus();
+ static_cast<TQWidget*>(o)->setFocus();
return true;
}
}
}*/
- return QScrollView::eventFilter(o,e);
+ return TQScrollView::eventFilter(o,e);
}
void KexiTableView::slotTopHeaderSizeChange(
@@ -2503,14 +2503,14 @@ void KexiTableView::setBottomMarginInternal(int pixels)
d->internal_bottomMargin = pixels;
}
-void KexiTableView::paletteChange( const QPalette &oldPalette )
+void KexiTableView::paletteChange( const TQPalette &oldPalette )
{
Q_UNUSED(oldPalette);
//update:
if (m_verticalHeader)
- m_verticalHeader->setSelectionBackgroundColor( palette().active().highlight() );
+ m_verticalHeader->setSelectionBackgroundColor( tqpalette().active().highlight() );
if (m_horizontalHeader)
- m_horizontalHeader->setSelectionBackgroundColor( palette().active().highlight() );
+ m_horizontalHeader->setSelectionBackgroundColor( tqpalette().active().highlight() );
}
const KexiTableView::Appearance& KexiTableView::appearance() const
@@ -2531,8 +2531,8 @@ void KexiTableView::setAppearance(const Appearance& a)
m_verticalHeader->setCellHeight(d->rowHeight);
if (m_horizontalHeader) {
setMargins(
- QMIN(m_horizontalHeader->sizeHint().height(), d->rowHeight),
- m_horizontalHeader->sizeHint().height(), 0, 0);
+ TQMIN(m_horizontalHeader->tqsizeHint().height(), d->rowHeight),
+ m_horizontalHeader->tqsizeHint().height(), 0, 0);
}
// }
if (a.rowHighlightingEnabled)
@@ -2561,8 +2561,8 @@ int KexiTableView::highlightedRow() const
void KexiTableView::setHighlightedRow(int row)
{
if (row!=-1) {
- row = QMIN(rows() - 1 + (isInsertingEnabled()?1:0), row);
- row = QMAX(0, row);
+ row = TQMIN(rows() - 1 + (isInsertingEnabled()?1:0), row);
+ row = TQMAX(0, row);
ensureCellVisible(row, -1);
}
const int previouslyHighlightedRow = d->highlightedRow;
@@ -2581,7 +2581,7 @@ void KexiTableView::setHighlightedRow(int row)
if (m_curRow>=0 && (previouslyHighlightedRow==-1 || previouslyHighlightedRow==m_curRow)
&& d->highlightedRow!=m_curRow && !d->appearance.persistentSelections)
{
- //currently selected row needs to be repainted
+ //currently selected row needs to be tqrepainted
updateRow(m_curRow);
}
}
diff --git a/kexi/widget/tableview/kexitableview.h b/kexi/widget/tableview/kexitableview.h
index 9f9c632e9..f06fce101 100644
--- a/kexi/widget/tableview/kexitableview.h
+++ b/kexi/widget/tableview/kexitableview.h
@@ -27,11 +27,11 @@
#ifndef KEXITABLEVIEW_H
#define KEXITABLEVIEW_H
-#include <qscrollview.h>
-#include <qvariant.h>
-#include <qptrlist.h>
-#include <qheader.h>
-#include <qtooltip.h>
+#include <tqscrollview.h>
+#include <tqvariant.h>
+#include <tqptrlist.h>
+#include <tqheader.h>
+#include <tqtooltip.h>
#include <kdebug.h>
@@ -64,37 +64,38 @@ namespace KexiDB {
/*! @see KexiFormScrollView
*/
class KEXIDATATABLE_EXPORT KexiTableView :
- public QScrollView,
+ public TQScrollView,
public KexiRecordNavigatorHandler,
public KexiSharedActionClient,
public KexiDataAwareObjectInterface
{
Q_OBJECT
+ TQ_OBJECT
KEXI_DATAAWAREOBJECTINTERFACE
public:
/*! Defines table view's detailed appearance settings. */
class KEXIDATATABLE_EXPORT Appearance {
public:
- Appearance(QWidget *widget = 0);
+ Appearance(TQWidget *widget = 0);
/*! base color for cells, default is "Base" color for application's
current active palette */
- QColor baseColor;
+ TQColor baseColor;
/*! text color for cells, default is "Text" color for application's
current active palette */
- QColor textColor;
+ TQColor textColor;
- /*! border color for cells, default is QColor(200,200,200) */
- QColor borderColor;
+ /*! border color for cells, default is TQColor(200,200,200) */
+ TQColor borderColor;
/*! empty area color, default is "Base" color for application's
current active palette */
- QColor emptyAreaColor;
+ TQColor emptyAreaColor;
/*! alternate background color, default is KGlobalSettings::alternateBackgroundColor() */
- QColor alternateBackgroundColor;
+ TQColor alternateBackgroundColor;
/*! true if background altering should be enabled, true by default */
bool backgroundAltering : 1;
@@ -129,26 +130,26 @@ public:
/*! color for row highlight, default is intermediate (33%/60%) between
active highlight and base color. */
- QColor rowHighlightingColor;
+ TQColor rowHighlightingColor;
/*! color for text under row highlight, default is the same as textColor.
Used when rowHighlightingEnabled is true; */
- QColor rowHighlightingTextColor;
+ TQColor rowHighlightingTextColor;
/*! color for row highlight for mouseover, default is intermediate (20%/80%) between
active highlight and base color. Used when rowMouseOverHighlightingEnabled is true. */
- QColor rowMouseOverHighlightingColor;
+ TQColor rowMouseOverHighlightingColor;
/*! color for text under row highlight for mouseover, default is the same as textColor.
Used when rowMouseOverHighlightingEnabled is true; */
- QColor rowMouseOverHighlightingTextColor;
+ TQColor rowMouseOverHighlightingTextColor;
/*! Like rowMouseOverHighlightingColor but for areas painted with alternate color.
This is computed using active highlight color and alternateBackgroundColor. */
- QColor rowMouseOverAlternateHighlightingColor;
+ TQColor rowMouseOverAlternateHighlightingColor;
};
- KexiTableView(KexiTableViewData* data=0, QWidget* parent=0, const char* name=0);
+ KexiTableView(KexiTableViewData* data=0, TQWidget* tqparent=0, const char* name=0);
virtual ~KexiTableView();
/*! \return current appearance settings */
@@ -158,7 +159,7 @@ public:
void setAppearance(const Appearance& a);
/*! \return string displayed for column's header \a colNum */
- QString columnCaption(int colNum) const;
+ TQString columnCaption(int colNum) const;
/*! Convenience function.
\return field object that define column \a colNum or NULL if there is no such column */
@@ -177,7 +178,7 @@ public:
for current table view's size. */
virtual int rowsPerPage() const;
- QRect cellGeometry(int row, int col) const;
+ TQRect cellGeometry(int row, int col) const;
int columnWidth(int col) const;
int rowHeight() const;
int columnPos(int col) const;
@@ -221,14 +222,14 @@ public:
#endif
// reimplemented for internal reasons
- virtual QSizePolicy sizePolicy() const;
- virtual QSize sizeHint() const;
- virtual QSize minimumSizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/*! Reimplemented to update cached fonts and row sizes for the painter. */
- void setFont(const QFont &f);
+ void setFont(const TQFont &f);
- virtual QSize tableSize() const;
+ virtual TQSize tableSize() const;
void emitSelected();
@@ -243,7 +244,7 @@ public:
ScrollRight
};
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
//! Initializes standard editor cell editor factories. This is called internally, once.
static void initCellEditorFactories();
@@ -256,13 +257,13 @@ public:
KexiTableItem *highlightedItem() const;
/*! \return vertical scrollbar. Implemented for KexiDataAwareObjectInterface. */
- virtual QScrollBar* verticalScrollBar() const { return QScrollView::verticalScrollBar(); }
+ virtual TQScrollBar* verticalScrollBar() const { return TQScrollView::verticalScrollBar(); }
public slots:
virtual void setData( KexiTableViewData *data, bool owner = true )
{ KexiDataAwareObjectInterface::setData( data, owner ); }
- virtual void clearColumnsInternal(bool repaint);
+ virtual void clearColumnsInternal(bool tqrepaint);
/*! Adjusts \a colNum column's width to its (current) contents.
If \a colNum == -1, all columns' width is adjusted. */
@@ -274,18 +275,18 @@ public slots:
/*! If \a set is true, \a colNum column is resized to take full possible width.
If \a set is false, no automatic resize will be performed.
If \a colNum is -1, all columns are equally resized, when needed, to take full possible width.
- This method behaves like QHeader::setStretchEnabled ( bool b, int section ). */
+ This method behaves like TQHeader::setStretchEnabled ( bool b, int section ). */
void setColumnStretchEnabled( bool set, int colNum );
/*! Maximizes widths of columns selected by \a columnList, so the horizontal
header has maximum overall width. Each selected column's width will be increased
by the same value. Does nothing if \a columnList is empty or there is no free space
to resize columns. If this table view is not visible, resizing will be performed on showing. */
- void maximizeColumnsWidth( const QValueList<int> &columnList );
+ void maximizeColumnsWidth( const TQValueList<int> &columnList );
/*! Adjusts the size of the sections to fit the size of the horizontal header
as completely as possible. Only sections for which column stretch is enabled will be resized.
- \sa setColumnStretchEnabled() QHeader::adjustHeaderSize() */
+ \sa setColumnStretchEnabled() TQHeader::adjustHeaderSize() */
void adjustHorizontalHeaderSize();
/*! Sets highlighted row number or -1 if no row has to be highlighted.
@@ -302,7 +303,7 @@ public slots:
virtual void ensureCellVisible(int row, int col/*=-1*/);
// void gotoNext();
-//js int findString(const QString &string);
+//js int findString(const TQString &string);
/*! Deletes currently selected record; does nothing if no record
is currently selected. If record is in edit mode, editing
@@ -325,7 +326,7 @@ public slots:
was displayed (in this case, \a setText is usually not empty, what means
that text will be set in the cell replacing previous value).
*/
- virtual void startEditCurrentCell(const QString& setText = QString::null)
+ virtual void startEditCurrentCell(const TQString& setText = TQString())
{ KexiDataAwareObjectInterface::startEditCurrentCell(setText); }
/*! Deletes currently selected cell's contents, if allowed.
@@ -371,20 +372,20 @@ signals:
void itemDblClicked(KexiTableItem *, int row, int col);
void itemMouseReleased(KexiTableItem *, int row, int col);
- void dragOverRow(KexiTableItem *item, int row, QDragMoveEvent* e);
- void droppedAtRow(KexiTableItem *item, int row, QDropEvent *e, KexiTableItem*& newItem);
+ void dragOverRow(KexiTableItem *item, int row, TQDragMoveEvent* e);
+ void droppedAtRow(KexiTableItem *item, int row, TQDropEvent *e, KexiTableItem*& newItem);
/*! Data has been refreshed on-screen - emitted from initDataContents(). */
virtual void dataRefreshed();
virtual void itemChanged(KexiTableItem *, int row, int col);
- virtual void itemChanged(KexiTableItem *, int row, int col, QVariant oldValue);
+ virtual void itemChanged(KexiTableItem *, int row, int col, TQVariant oldValue);
virtual void itemDeleteRequest(KexiTableItem *, int row, int col);
virtual void currentItemDeleteRequest();
//! Emitted for spreadsheet mode when an item was deleted and a new item has been appended
virtual void newItemAppendedForAfterDeletingInSpreadSheetMode();
// void addRecordRequest();
-// void contextMenuRequested(KexiTableItem *, int row, int col, const QPoint &);
+// void contextMenuRequested(KexiTableItem *, int row, int col, const TQPoint &);
void sortedColumnChanged(int col);
//! emmited when row editing is started (for updating or inserting)
@@ -403,7 +404,7 @@ protected slots:
virtual void slotDataDestroying() { KexiDataAwareObjectInterface::slotDataDestroying(); }
- virtual void slotRowsDeleted( const QValueList<int> & );
+ virtual void slotRowsDeleted( const TQValueList<int> & );
//! updates display after many rows deletion
void slotColumnWidthChanged( int col, int os, int ns );
@@ -431,19 +432,19 @@ protected slots:
virtual void slotRowRepaintRequested(KexiTableItem& item);
//! Handles KexiTableViewData::aboutToDeleteRow() signal. Prepares info for slotRowDeleted().
- virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint)
- { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, repaint); }
+ virtual void slotAboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotAboutToDeleteRow(item, result, tqrepaint); }
- //! Handles KexiTableViewData::rowDeleted() signal to repaint when needed.
+ //! Handles KexiTableViewData::rowDeleted() signal to tqrepaint when needed.
virtual void slotRowDeleted() { KexiDataAwareObjectInterface::slotRowDeleted(); }
- //! Handles KexiTableViewData::rowInserted() signal to repaint when needed.
- virtual void slotRowInserted(KexiTableItem *item, bool repaint)
- { KexiDataAwareObjectInterface::slotRowInserted(item, repaint); }
+ //! Handles KexiTableViewData::rowInserted() signal to tqrepaint when needed.
+ virtual void slotRowInserted(KexiTableItem *item, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotRowInserted(item, tqrepaint); }
//! Like above, not db-aware version
- virtual void slotRowInserted(KexiTableItem *item, uint row, bool repaint)
- { KexiDataAwareObjectInterface::slotRowInserted(item, row, repaint); }
+ virtual void slotRowInserted(KexiTableItem *item, uint row, bool tqrepaint)
+ { KexiDataAwareObjectInterface::slotRowInserted(item, row, tqrepaint); }
/*! Handles verticalScrollBar()'s valueChanged(int) signal.
Called when vscrollbar's value has been changed. */
@@ -465,7 +466,7 @@ protected:
virtual void initDataContents();
/*! Implementation for KexiDataAwareObjectInterface.
- Updates widget's contents size using QScrollView::resizeContents()
+ Updates widget's contents size using TQScrollView::resizeContents()
depending on tableSize(). */
virtual void updateWidgetContentsSize();
@@ -495,42 +496,42 @@ protected:
/*! Implementation for KexiDataAwareObjectInterface.
Adds another section within the horizontal header. */
- virtual void addHeaderColumn(const QString& caption, const QString& description,
- const QIconSet& icon, int size);
+ virtual void addHeaderColumn(const TQString& caption, const TQString& description,
+ const TQIconSet& icon, int size);
/*! @internal \return true if the row defined by \a item has default
value at column \a col. If this is the case and \a value is not NULL,
*value is set to the default value. */
- bool isDefaultValueDisplayed(KexiTableItem *item, int col, QVariant* value = 0);
+ bool isDefaultValueDisplayed(KexiTableItem *item, int col, TQVariant* value = 0);
- //! painting and layout
- void drawContents(QPainter *p, int cx, int cy, int cw, int ch);
+ //! painting and tqlayout
+ void drawContents(TQPainter *p, int cx, int cy, int cw, int ch);
void createBuffer(int width, int height);
- void paintCell(QPainter* p, KexiTableItem *item, int col, int row, const QRect &cr, bool print=false);
- void paintEmptyArea(QPainter *p, int cx, int cy, int cw, int ch);
+ void paintCell(TQPainter* p, KexiTableItem *item, int col, int row, const TQRect &cr, bool print=false);
+ void paintEmptyArea(TQPainter *p, int cx, int cy, int cw, int ch);
void updateGeometries();
- QPoint contentsToViewport2( const QPoint &p );
+ TQPoint contentsToViewport2( const TQPoint &p );
void contentsToViewport2( int x, int y, int& vx, int& vy );
- QPoint viewportToContents2( const QPoint& vp );
+ TQPoint viewportToContents2( const TQPoint& vp );
// event handling
- virtual void contentsMousePressEvent(QMouseEvent* e);
- virtual void contentsMouseReleaseEvent(QMouseEvent* e);
+ virtual void contentsMousePressEvent(TQMouseEvent* e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent* e);
//! @internal called by contentsMouseOrEvent() contentsMouseReleaseEvent() to move cursor
- bool handleContentsMousePressOrRelease(QMouseEvent* e, bool release);
- virtual void contentsMouseMoveEvent(QMouseEvent* e);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent* e);
- virtual void keyPressEvent(QKeyEvent* e);
- virtual void focusInEvent(QFocusEvent* e);
- virtual void focusOutEvent(QFocusEvent* e);
- virtual void resizeEvent(QResizeEvent* e);
- virtual void viewportResizeEvent(QResizeEvent *e);
- virtual void showEvent(QShowEvent *e);
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
- virtual void contentsDropEvent(QDropEvent *e);
- virtual void viewportDragLeaveEvent(QDragLeaveEvent *e);
- virtual void paletteChange( const QPalette &oldPalette );
+ bool handleContentsMousePressOrRelease(TQMouseEvent* e, bool release);
+ virtual void contentsMouseMoveEvent(TQMouseEvent* e);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent* e);
+ virtual void keyPressEvent(TQKeyEvent* e);
+ virtual void focusInEvent(TQFocusEvent* e);
+ virtual void focusOutEvent(TQFocusEvent* e);
+ virtual void resizeEvent(TQResizeEvent* e);
+ virtual void viewportResizeEvent(TQResizeEvent *e);
+ virtual void showEvent(TQShowEvent *e);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
+ virtual void contentsDropEvent(TQDropEvent *e);
+ virtual void viewportDragLeaveEvent(TQDragLeaveEvent *e);
+ virtual void paletteChange( const TQPalette &oldPalette );
/*! Implementation for KexiDataAwareObjectInterface */
virtual KexiDataItemInterface *editor( int col, bool ignoreMissingEditor = false );
@@ -542,7 +543,7 @@ protected:
virtual void editorShowFocus( int row, int col );
//! Creates editors and shows it, what usually means the beginning of a cell editing
- virtual void createEditor(int row, int col, const QString& addText = QString::null,
+ virtual void createEditor(int row, int col, const TQString& addText = TQString(),
bool removeOld = false);
bool focusNextPrevChild(bool next);
@@ -552,7 +553,7 @@ protected:
given action's shortcut - false is returned (beause action is already performed at main
window's level).
*/
- bool shortCutPressed( QKeyEvent *e, const QCString &action_name );
+ bool shortCutPressed( TQKeyEvent *e, const TQCString &action_name );
#if 0 //we have now KexiActionProxy
/*! Updates visibility/accesibility of popup menu items,
@@ -564,30 +565,30 @@ protected:
if menu is configured,
else: contextMenuRequested() signal is emmited.
Method used in contentsMousePressEvent() (for right button)
- and keyPressEvent() for Qt::Key_Menu key.
- If \a pos is QPoint(-1,-1) (the default), menu is positioned below the current cell.
+ and keyPressEvent() for TQt::Key_Menu key.
+ If \a pos is TQPoint(-1,-1) (the default), menu is positioned below the current cell.
*/
- void showContextMenu( const QPoint& pos = QPoint(-1,-1) );
+ void showContextMenu( const TQPoint& pos = TQPoint(-1,-1) );
/*! internal */
inline void paintRow(KexiTableItem *item,
- QPainter *pb, int r, int rowp, int cx, int cy,
+ TQPainter *pb, int r, int rowp, int cx, int cy,
int colfirst, int collast, int maxwc);
- virtual void setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h );
+ virtual void setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h );
//! Setups navigator widget
void setupNavigator();
//! internal, to determine valid row number when navigator text changed
- int validRowNumber(const QString& text);
+ int validRowNumber(const TQString& text);
/*! Reimplementation for KexiDataAwareObjectInterface
(viewport()->setFocus() is just added) */
virtual void removeEditor();
//! Internal: updated sched fonts for painting.
- void updateFonts(bool repaint = false);
+ void updateFonts(bool tqrepaint = false);
/*! @internal Changes bottom margin settings, in pixels.
At this time, it's used by KexiComboBoxPopup to decrease margin for popup's table. */
@@ -613,7 +614,7 @@ protected:
virtual void paste();
/*! Used in KexiDataAwareObjectInterface::slotRowDeleted()
- to repaint tow \a row and all visible below. */
+ to tqrepaint tow \a row and all visible below. */
virtual void updateAllVisibleRowsBelow(int row);
void updateAfterCancelRowEdit();
@@ -622,11 +623,11 @@ protected:
/*! Sets \a cellValue if there is a lookup value for the cell \a item.
Used in KexiTableView::paintCell() and KexiTableViewCellToolTip::maybeTip()
\return true is \a cellValue has been found. */
- bool getVisibleLookupValue(QVariant& cellValue, KexiTableEdit *edit,
+ bool getVisibleLookupValue(TQVariant& cellValue, KexiTableEdit *edit,
KexiTableItem *item, KexiTableViewColumn *tvcol) const;
-// //! Called to repaint contents after a row is deleted.
-// void repaintAfterDelete();
+// //! Called to tqrepaint contents after a row is deleted.
+// void tqrepaintAfterDelete();
KexiTableViewPrivate *d;
diff --git a/kexi/widget/tableview/kexitableview_p.cpp b/kexi/widget/tableview/kexitableview_p.cpp
index 7cf774dbc..d5e1641ae 100644
--- a/kexi/widget/tableview/kexitableview_p.cpp
+++ b/kexi/widget/tableview/kexitableview_p.cpp
@@ -27,7 +27,7 @@
#include "kexitableview_p.h"
#include "kexitableedit.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kglobalsettings.h>
@@ -47,12 +47,12 @@ KexiTableViewPrivate::KexiTableViewPrivate(KexiTableView* t)
//moved scrollbarToolTipsEnabled = true;
//moved scrollBarTipTimerCnt = 0;
//moved scrollBarTip = 0;
- ensureCellVisibleOnShow = QPoint(-1,-1);
- internal_bottomMargin = tv->horizontalScrollBar()->sizeHint().height()/2;
+ ensureCellVisibleOnShow = TQPoint(-1,-1);
+ internal_bottomMargin = tv->horizontalScrollBar()->tqsizeHint().height()/2;
highlightedRow = -1;
moveCursorOnMouseRelease = false;
horizontalHeaderVisible = true;
- recentCellWithToolTip = QPoint(-1,-1);
+ recentCellWithToolTip = TQPoint(-1,-1);
}
KexiTableViewPrivate::~KexiTableViewPrivate()
diff --git a/kexi/widget/tableview/kexitableview_p.h b/kexi/widget/tableview/kexitableview_p.h
index 58fe85745..b0679dfa4 100644
--- a/kexi/widget/tableview/kexitableview_p.h
+++ b/kexi/widget/tableview/kexitableview_p.h
@@ -32,10 +32,10 @@
#include <kexidb/roweditbuffer.h>
#include <widget/utils/kexidisplayutils.h>
-#include <qevent.h>
-#include <qtimer.h>
-#include <qvalidator.h>
-#include <qasciidict.h>
+#include <tqevent.h>
+#include <tqtimer.h>
+#include <tqvalidator.h>
+#include <tqasciidict.h>
#include <kpushbutton.h>
#include <ktoolbarbutton.h>
@@ -46,18 +46,18 @@
class KexiTableItem;
class KexiTableRM;
class KexiTableEdit;
-class QLabel;
+class TQLabel;
class KexiTableViewHeader;
//! @short a dynamic tooltip for table view cells
/*! @internal */
-class KexiTableViewCellToolTip : public QToolTip
+class KexiTableViewCellToolTip : public TQToolTip
{
public:
KexiTableViewCellToolTip( KexiTableView * tableView );
virtual ~KexiTableViewCellToolTip();
protected:
- virtual void maybeTip( const QPoint & p );
+ virtual void maybeTip( const TQPoint & p );
KexiTableView *m_tableView;
};
@@ -76,17 +76,17 @@ class KexiTableViewPrivate
KexiTableView *tv;
//! editors: one for each column (indexed by KexiTableViewColumn)
- QPtrDict<KexiTableEdit> editors;
+ TQPtrDict<KexiTableEdit> editors;
int rowHeight;
- QPixmap *pBufferPm;
- QTimer *pUpdateTimer;
+ TQPixmap *pBufferPm;
+ TQTimer *pUpdateTimer;
int menu_id_addRecord;
int menu_id_removeRecord;
#if 0//(js) doesn't work!
- QTimer *scrollTimer;
+ TQTimer *scrollTimer;
#endif
KexiTableView::ScrollDirection scrollDirection;
@@ -119,7 +119,7 @@ class KexiTableViewPrivate
KexiTableView::Appearance appearance;
//! brushes, fonts
- QBrush diagonalGrayPattern;
+ TQBrush diagonalGrayPattern;
//! Parameters for displaying autonumbers
KexiDisplayUtils::DisplayParameters autonumberSignDisplayParameters;
@@ -128,11 +128,11 @@ class KexiTableViewPrivate
KexiDisplayUtils::DisplayParameters defaultValueDisplayParameters;
//! Used by delayed mode of maximizeColumnsWidth()
- QValueList<int> maximizeColumnsWidthOnShow;
+ TQValueList<int> maximizeColumnsWidthOnShow;
/*! Used for delayed call of ensureCellVisible() after show().
It's equal to (-1,-1) if ensureCellVisible() shouldn't e called. */
- QPoint ensureCellVisibleOnShow;
+ TQPoint ensureCellVisibleOnShow;
/*! @internal Changes bottom margin settings, in pixels.
At this time, it's used by KexiComboBoxPopup to decrease margin for popup's table. */
@@ -145,8 +145,8 @@ class KexiTableViewPrivate
int contextMenuKey;
/*! Specifies currently displayed cell tooltip.
- Value of QPoint(-1,-1) means "no tooltip". */
- QPoint recentCellWithToolTip;
+ Value of TQPoint(-1,-1) means "no tooltip". */
+ TQPoint recentCellWithToolTip;
/*! Table cell tooltip */
KexiTableViewCellToolTip *cellToolTip;
diff --git a/kexi/widget/tableview/kexitableviewdata.cpp b/kexi/widget/tableview/kexitableviewdata.cpp
index 62259db39..1fb65c6a3 100644
--- a/kexi/widget/tableview/kexitableviewdata.cpp
+++ b/kexi/widget/tableview/kexitableviewdata.cpp
@@ -36,7 +36,7 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qapplication.h>
+#include <tqapplication.h>
unsigned short KexiTableViewData::charTable[]=
{
@@ -54,12 +54,12 @@ KexiTableViewColumn::KexiTableViewColumn(KexiDB::Field& f, bool owner)
init();
}
-KexiTableViewColumn::KexiTableViewColumn(const QString& name, KexiDB::Field::Type ctype,
+KexiTableViewColumn::KexiTableViewColumn(const TQString& name, KexiDB::Field::Type ctype,
uint cconst,
uint options,
uint length, uint precision,
- QVariant defaultValue,
- const QString& caption, const QString& description, uint width
+ TQVariant defaultValue,
+ const TQString& caption, const TQString& description, uint width
)
: columnInfo(0)
, visibleLookupColumnInfo(0)
@@ -78,8 +78,8 @@ KexiTableViewColumn::KexiTableViewColumn(const QString& name, KexiDB::Field::Typ
init();
}
-KexiTableViewColumn::KexiTableViewColumn(const QString& name, KexiDB::Field::Type ctype,
- const QString& caption, const QString& description)
+KexiTableViewColumn::KexiTableViewColumn(const TQString& name, KexiDB::Field::Type ctype,
+ const TQString& caption, const TQString& description)
: columnInfo(0)
, visibleLookupColumnInfo(0)
{
@@ -88,7 +88,7 @@ KexiTableViewColumn::KexiTableViewColumn(const QString& name, KexiDB::Field::Typ
KexiDB::Field::NoConstraints,
KexiDB::Field::NoOptions,
0, 0,
- QVariant(),
+ TQVariant(),
caption, description);
isDBAware = false;
@@ -122,7 +122,7 @@ KexiTableViewColumn::KexiTableViewColumn(
}
init();
//setup column's readonly flag: true, if
- // - it's not from parent table's field, or
+ // - it's not from tqparent table's field, or
// - if the query itself is coming from read-only connection, or
// - if the query itself is stored (i.e. has connection) and lookup column is defined
const bool columnFromMasterTable = query.masterTable()==columnInfo->field->table();
@@ -168,7 +168,7 @@ void KexiTableViewColumn::init()
void KexiTableViewColumn::setValidator( KexiUtils::Validator* v )
{
if (m_validator) {//remove old one
- if (!m_validator->parent()) //destroy if has no parent
+ if (!m_validator->tqparent()) //destroy if has no tqparent
delete m_validator;
}
m_validator = v;
@@ -205,7 +205,7 @@ bool KexiTableViewColumn::isReadOnly() const
return m_readOnly || (m_data && m_data->isReadOnly());
}
-bool KexiTableViewColumn::acceptsFirstChar(const QChar& ch) const
+bool KexiTableViewColumn::acceptsFirstChar(const TQChar& ch) const
{
// the field we're looking at can be related to "visible lookup column"
// if lookup column is present
@@ -216,7 +216,7 @@ bool KexiTableViewColumn::acceptsFirstChar(const QChar& ch) const
return visibleField->isFPNumericType();
if (ch=='-')
return !visibleField->isUnsigned();
- if (ch=='+' || (ch>='0' && ch<='9'))
+ if (ch=='+' || ((int)ch>='0' && (int)ch<='9'))
return true;
return false;
}
@@ -227,7 +227,7 @@ bool KexiTableViewColumn::acceptsFirstChar(const QChar& ch) const
case KexiDB::Field::Date:
case KexiDB::Field::DateTime:
case KexiDB::Field::Time:
- return ch>='0' && ch<='9';
+ return (int)ch>='0' && (int)ch<='9';
default:;
}
return true;
@@ -237,7 +237,7 @@ bool KexiTableViewColumn::acceptsFirstChar(const QChar& ch) const
//------------------------------------------------------
KexiTableViewData::KexiTableViewData()
- : QObject()
+ : TQObject()
, KexiTableViewDataBase()
{
init();
@@ -245,7 +245,7 @@ KexiTableViewData::KexiTableViewData()
// db-aware ctor
KexiTableViewData::KexiTableViewData(KexiDB::Cursor *c)
- : QObject()
+ : TQObject()
, KexiTableViewDataBase()
{
init();
@@ -282,9 +282,9 @@ KexiTableViewData::KexiTableViewData(KexiDB::Cursor *c)
}
KexiTableViewData::KexiTableViewData(
- const QValueList<QVariant> &keys, const QValueList<QVariant> &values,
+ const TQValueList<TQVariant> &keys, const TQValueList<TQVariant> &values,
KexiDB::Field::Type keyType, KexiDB::Field::Type valueType)
- : QObject()
+ : TQObject()
, KexiTableViewDataBase()
{
init(keys, values, keyType, valueType);
@@ -293,7 +293,7 @@ KexiTableViewData::KexiTableViewData(
KexiTableViewData::KexiTableViewData(
KexiDB::Field::Type keyType, KexiDB::Field::Type valueType)
{
- const QValueList<QVariant> empty;
+ const TQValueList<TQVariant> empty;
init(empty, empty, keyType, valueType);
}
@@ -304,7 +304,7 @@ KexiTableViewData::~KexiTableViewData()
}
void KexiTableViewData::init(
- const QValueList<QVariant> &keys, const QValueList<QVariant> &values,
+ const TQValueList<TQVariant> &keys, const TQValueList<TQVariant> &values,
KexiDB::Field::Type keyType, KexiDB::Field::Type valueType)
{
init();
@@ -318,9 +318,9 @@ void KexiTableViewData::init(
KexiTableViewColumn *valueColumn = new KexiTableViewColumn(*valueField, true);
addColumn(valueColumn);
- uint cnt = QMIN(keys.count(), values.count());
- QValueList<QVariant>::ConstIterator it_keys = keys.constBegin();
- QValueList<QVariant>::ConstIterator it_values = values.constBegin();
+ uint cnt = TQMIN(keys.count(), values.count());
+ TQValueList<TQVariant>::ConstIterator it_keys = keys.constBegin();
+ TQValueList<TQVariant>::ConstIterator it_values = values.constBegin();
for (;cnt>0;++it_keys, ++it_values, cnt--) {
KexiTableItem *item = new KexiTableItem(2);
(*item)[0] = (*it_keys);
@@ -355,14 +355,14 @@ void KexiTableViewData::init()
void KexiTableViewData::deleteLater()
{
m_cursor = 0;
- QObject::deleteLater();
+ TQObject::deleteLater();
}
void KexiTableViewData::addColumn( KexiTableViewColumn* col )
{
// if (!col->isDBAware) {
// if (!m_simpleColumnsByName)
-// m_simpleColumnsByName = new QDict<KexiTableViewColumn>(101);
+// m_simpleColumnsByName = new TQDict<KexiTableViewColumn>(101);
// m_simpleColumnsByName->insert(col->caption,col);//for faster lookup
// }
columns.append( col );
@@ -386,11 +386,11 @@ void KexiTableViewData::addColumn( KexiTableViewColumn* col )
m_itemSize = columns.count()+(m_containsROWIDInfo?1:0);
}
-QString KexiTableViewData::dbTableName() const
+TQString KexiTableViewData::dbTableName() const
{
if (m_cursor && m_cursor->query() && m_cursor->query()->masterTable())
return m_cursor->query()->masterTable()->name();
- return QString::null;
+ return TQString();
}
void KexiTableViewData::setSorting(int column, bool ascending)
@@ -506,11 +506,11 @@ int KexiTableViewData::cmpTime(Item item1, Item item2)
int KexiTableViewData::cmpStr(Item item1, Item item2)
{
CMP_NULLS(item1, item2);
- const QString &as = m_leftTmp.toString();
- const QString &bs = m_rightTmp.toString();
+ const TQString &as = m_leftTmp.toString();
+ const TQString &bs = m_rightTmp.toString();
- const QChar *a = as.unicode();
- const QChar *b = bs.unicode();
+ const TQChar *a = as.tqunicode();
+ const TQChar *b = bs.tqunicode();
if ( a == b )
return 0;
@@ -522,18 +522,18 @@ int KexiTableViewData::cmpStr(Item item1, Item item2)
unsigned short au;
unsigned short bu;
- int l=QMIN(as.length(),bs.length());
+ int l=TQMIN(as.length(),bs.length());
- au = a->unicode();
- bu = b->unicode();
+ au = a->tqunicode();
+ bu = b->tqunicode();
au = (au <= 0x17e ? charTable[au] : 0xffff);
bu = (bu <= 0x17e ? charTable[bu] : 0xffff);
while (l-- && au == bu)
{
a++,b++;
- au = a->unicode();
- bu = b->unicode();
+ au = a->tqunicode();
+ bu = b->tqunicode();
au = (au <= 0x17e ? charTable[au] : 0xffff);
bu = (bu <= 0x17e ? charTable[bu] : 0xffff);
}
@@ -578,8 +578,8 @@ void KexiTableViewData::clearRowEditBuffer()
}
bool KexiTableViewData::updateRowEditBufferRef(KexiTableItem *item,
- int colnum, KexiTableViewColumn* col, QVariant& newval, bool allowSignals,
- QVariant *visibleValueForLookupField)
+ int colnum, KexiTableViewColumn* col, TQVariant& newval, bool allowSignals,
+ TQVariant *visibleValueForLookupField)
{
m_result.clear();
if (allowSignals)
@@ -615,7 +615,7 @@ bool KexiTableViewData::updateRowEditBufferRef(KexiTableItem *item,
return false;
}
//not db-aware:
- const QString colname = col->field()->name();
+ const TQString colname = col->field()->name();
if (colname.isEmpty()) {
kdDebug() << "KexiTableViewData::updateRowEditBufferRef(): column #" << colnum<<" not found!" << endl;
return false;
@@ -635,7 +635,7 @@ bool KexiTableViewData::updateRowEditBufferRef(KexiTableItem *item,
}
//! @todo if there're multiple views for this data, we need multiple buffers!
-bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint)
+bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool tqrepaint)
{
if (!m_pRowEditBuffer)
return true; //nothing to do
@@ -645,7 +645,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint)
KexiTableViewColumn::ListIterator it_f(columns);
KexiDB::RowData::ConstIterator it_r = item.constBegin();
int col = 0;
- const QVariant *val;
+ const TQVariant *val;
for (;it_f.current() && it_r!=item.constEnd();++it_f,++it_r,col++) {
KexiDB::Field *f = it_f.current()->field();
val = 0;
@@ -655,7 +655,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint)
if (val->isNull() && !f->isAutoIncrement()) {
//NOT NULL violated
m_result.msg = i18n("\"%1\" column requires a value to be entered.")
- .arg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData();
+ .tqarg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData();
m_result.desc = i18n("The column's constraint is declared as NOT NULL.");
m_result.column = col;
return false;
@@ -666,7 +666,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint)
if (!f->isAutoIncrement() && (val->isNull() || KexiDB::isEmptyValue( f, *val ))) {
//NOT EMPTY violated
m_result.msg = i18n("\"%1\" column requires a value to be entered.")
- .arg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData();
+ .tqarg(f->captionOrName()) + "\n\n" + Kexi::msgYouCanImproveData();
m_result.desc = i18n("The column's constraint is declared as NOT EMPTY.");
m_result.column = col;
return false;
@@ -685,7 +685,7 @@ bool KexiTableViewData::saveRow(KexiTableItem& item, bool insert, bool repaint)
/* if (desc)
*desc =
-js: TODO: use KexiMainWindowImpl::showErrorMessage(const QString &title, KexiDB::Object *obj)
+js: TODO: use KexiMainWindowImpl::showErrorMessage(const TQString &title, KexiDB::Object *obj)
after it will be moved somewhere to kexidb (this will require moving other
showErrorMessage() methods from KexiMainWindowImpl to libkexiutils....)
then: just call: *desc = KexiDB::errorMessage(m_cursor);
@@ -721,12 +721,12 @@ js: TODO: use KexiMainWindowImpl::showErrorMessage(const QString &title, KexiDB:
m_pRowEditBuffer->clear();
- if (repaint)
+ if (tqrepaint)
emit rowRepaintRequested(item);
return true;
}
-bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool repaint)
+bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool tqrepaint)
{
kdDebug() << "KexiTableViewData::saveRowChanges()..." << endl;
m_result.clear();
@@ -734,32 +734,32 @@ bool KexiTableViewData::saveRowChanges(KexiTableItem& item, bool repaint)
if (!m_result.success)
return false;
- if (saveRow(item, false /*update*/, repaint)) {
+ if (saveRow(item, false /*update*/, tqrepaint)) {
emit rowUpdated(&item);
return true;
}
return false;
}
-bool KexiTableViewData::saveNewRow(KexiTableItem& item, bool repaint)
+bool KexiTableViewData::saveNewRow(KexiTableItem& item, bool tqrepaint)
{
kdDebug() << "KexiTableViewData::saveNewRow()..." << endl;
m_result.clear();
- emit aboutToInsertRow(&item, &m_result, repaint);
+ emit aboutToInsertRow(&item, &m_result, tqrepaint);
if (!m_result.success)
return false;
- if (saveRow(item, true /*insert*/, repaint)) {
- emit rowInserted(&item, repaint);
+ if (saveRow(item, true /*insert*/, tqrepaint)) {
+ emit rowInserted(&item, tqrepaint);
return true;
}
return false;
}
-bool KexiTableViewData::deleteRow(KexiTableItem& item, bool repaint)
+bool KexiTableViewData::deleteRow(KexiTableItem& item, bool tqrepaint)
{
m_result.clear();
- emit aboutToDeleteRow(item, &m_result, repaint);
+ emit aboutToDeleteRow(item, &m_result, tqrepaint);
if (!m_result.success)
return false;
@@ -784,15 +784,15 @@ bool KexiTableViewData::deleteRow(KexiTableItem& item, bool repaint)
return true;
}
-void KexiTableViewData::deleteRows( const QValueList<int> &rowsToDelete, bool repaint )
+void KexiTableViewData::deleteRows( const TQValueList<int> &rowsToDelete, bool tqrepaint )
{
- Q_UNUSED( repaint );
+ Q_UNUSED( tqrepaint );
if (rowsToDelete.isEmpty())
return;
int last_r=0;
first();
- for (QValueList<int>::ConstIterator r_it = rowsToDelete.constBegin(); r_it!=rowsToDelete.constEnd(); ++r_it) {
+ for (TQValueList<int>::ConstIterator r_it = rowsToDelete.constBegin(); r_it!=rowsToDelete.constEnd(); ++r_it) {
for (; last_r<(*r_it); last_r++) {
next();
}
@@ -804,17 +804,17 @@ void KexiTableViewData::deleteRows( const QValueList<int> &rowsToDelete, bool re
emit rowsDeleted( rowsToDelete );
}
-void KexiTableViewData::insertRow(KexiTableItem& item, uint index, bool repaint)
+void KexiTableViewData::insertRow(KexiTableItem& item, uint index, bool tqrepaint)
{
- if (!insert( index = QMIN(index, count()), &item ))
+ if (!insert( index = TQMIN(index, count()), &item ))
return;
- emit rowInserted(&item, index, repaint);
+ emit rowInserted(&item, index, tqrepaint);
}
void KexiTableViewData::clearInternal()
{
clearRowEditBuffer();
-// qApp->processEvents( 1 );
+// tqApp->processEvents( 1 );
//TODO: this is time consuming: find better data model
// KexiTableViewDataBase::clear();
const uint c = count();
@@ -822,12 +822,12 @@ void KexiTableViewData::clearInternal()
removeLast();
#ifndef KEXI_NO_PROCESS_EVENTS
if (i % 1000 == 0)
- qApp->processEvents( 1 );
+ tqApp->tqprocessEvents( 1 );
#endif
}
}
-bool KexiTableViewData::deleteAllRows(bool repaint)
+bool KexiTableViewData::deleteAllRows(bool tqrepaint)
{
clearInternal();
@@ -837,7 +837,7 @@ bool KexiTableViewData::deleteAllRows(bool repaint)
res = m_cursor->deleteAllRows();
}
- if (repaint)
+ if (tqrepaint)
emit reloadRequested();
return res;
}
@@ -873,7 +873,7 @@ void KexiTableViewData::preloadAllRows()
m_cursor->moveNext();
#ifndef KEXI_NO_PROCESS_EVENTS
if ((i % 1000) == 0)
- qApp->processEvents( 1 );
+ tqApp->tqprocessEvents( 1 );
#endif
}
}
diff --git a/kexi/widget/tableview/kexitableviewdata.h b/kexi/widget/tableview/kexitableviewdata.h
index 970d1d23a..56241fcba 100644
--- a/kexi/widget/tableview/kexitableviewdata.h
+++ b/kexi/widget/tableview/kexitableviewdata.h
@@ -25,11 +25,11 @@
#ifndef KEXITABLEVIEWDATA_H
#define KEXITABLEVIEWDATA_H
-#include <qptrlist.h>
-#include <qvariant.h>
-#include <qvaluevector.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqvariant.h>
+#include <tqvaluevector.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include "kexitableitem.h"
@@ -51,8 +51,8 @@ class KexiTableViewData;
/*! Single column definition. */
class KEXIDATATABLE_EXPORT KexiTableViewColumn {
public:
- typedef QPtrList<KexiTableViewColumn> List;
- typedef QPtrListIterator<KexiTableViewColumn> ListIterator;
+ typedef TQPtrList<KexiTableViewColumn> List;
+ typedef TQPtrListIterator<KexiTableViewColumn> ListIterator;
/*! Not db-aware ctor. if \a owner is true, the field \a will be owned by this column,
so you shouldn't care about destroying this field. */
@@ -62,18 +62,18 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
equal to these accepted by KexiDB::Field ctor. The column will be the owner
of this automatically generated field.
*/
- KexiTableViewColumn(const QString& name, KexiDB::Field::Type ctype,
+ KexiTableViewColumn(const TQString& name, KexiDB::Field::Type ctype,
uint cconst = KexiDB::Field::NoConstraints,
uint options = KexiDB::Field::NoOptions,
uint length=0, uint precision=0,
- QVariant defaultValue=QVariant(),
- const QString& caption = QString::null,
- const QString& description = QString::null,
+ TQVariant defaultValue=TQVariant(),
+ const TQString& caption = TQString(),
+ const TQString& description = TQString(),
uint width = 0);
/*! Not db-aware, convenience ctor, simplified version of the above. */
- KexiTableViewColumn(const QString& name, KexiDB::Field::Type ctype, const QString& caption,
- const QString& description = QString::null);
+ KexiTableViewColumn(const TQString& name, KexiDB::Field::Type ctype, const TQString& caption,
+ const TQString& description = TQString());
//! Db-aware version.
KexiTableViewColumn(const KexiDB::QuerySchema &query, KexiDB::QueryColumnInfo& aColumnInfo,
@@ -81,11 +81,11 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
virtual ~KexiTableViewColumn();
- virtual bool acceptsFirstChar(const QChar& ch) const;
+ virtual bool acceptsFirstChar(const TQChar& ch) const;
/*! \return true if the column is read-only
For db-aware column this can depend on whether the column
- is in parent table of this query. \sa setReadOnly() */
+ is in tqparent table of this query. \sa setReadOnly() */
bool isReadOnly() const;
//TODO: synchronize this with table view:
@@ -103,10 +103,10 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
}
/*! Sets icon for displaying in the caption area (header). */
- void setIcon(const QIconSet& icon) { m_icon = icon; }
+ void setIcon(const TQIconSet& icon) { m_icon = icon; }
/*! \return bame of icon displayed in the caption area (header). */
- QIconSet icon() const { return m_icon; }
+ TQIconSet icon() const { return m_icon; }
/*! If \a visible is true, caption has to be displayed in the column's header,
(or field's name if caption is empty. True by default. */
@@ -120,10 +120,10 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
- field's caption
- or field's alias (from query)
- or finally - field's name */
- inline QString captionAliasOrName() const { return m_captionAliasOrName; }
+ inline TQString captionAliasOrName() const { return m_captionAliasOrName; }
/*! Assigns validator \a v for this column.
- If the validator has no parent object, it will be owned by the column,
+ If the validator has no tqparent object, it will be owned by the column,
so you shouldn't care about destroying it. */
void setValidator( KexiUtils::Validator* v );
@@ -150,7 +150,7 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
/*! Only usable if related data is set (ie. this is for combo boxes).
Sets 'editable' flag for this column, what means a new value can be entered
- by hand. This is similar to QComboBox::setEditable(). */
+ by hand. This is similar to TQComboBox::setEditable(). */
void setRelatedDataEditable(bool set);
/*! Only usable if related data is set (ie. this is for combo boxes).
@@ -171,14 +171,14 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
bool isDBAware : 1; //!< true if data is stored in DB, not only in memeory
-/* QString caption;
+/* TQString caption;
int type; //!< one of KexiDB::Field::Type
uint width;
*/
// bool isNull() const;
-/* virtual QString caption() const;
- virtual void setCaption(const QString& c);
+/* virtual TQString caption() const;
+ virtual void setCaption(const TQString& c);
*/
protected:
//! special ctor that do not allocate d member;
@@ -186,9 +186,9 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
void init();
- QString m_captionAliasOrName;
+ TQString m_captionAliasOrName;
- QIconSet m_icon;
+ TQIconSet m_icon;
KexiUtils::Validator* m_validator;
@@ -211,20 +211,21 @@ class KEXIDATATABLE_EXPORT KexiTableViewColumn {
/*! List of column definitions. */
-//typedef QValueVector<KexiTableViewColumn> KexiTableViewColumnList;
+//typedef TQValueVector<KexiTableViewColumn> KexiTableViewColumnList;
-typedef QPtrList<KexiTableItem> KexiTableViewDataBase;
+typedef TQPtrList<KexiTableItem> KexiTableViewDataBase;
-/*! Reimplements QPtrList to allow configurable sorting and more.
+/*! Reimplements TQPtrList to allow configurable sorting and more.
Original author: Till Busch.
Reimplemented by Jaroslaw Staniek.
*/
-class KEXIDATATABLE_EXPORT KexiTableViewData : public QObject, protected KexiTableViewDataBase
+class KEXIDATATABLE_EXPORT KexiTableViewData : public TQObject, protected KexiTableViewDataBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- typedef QPtrListIterator<KexiTableItem> Iterator;
+ typedef TQPtrListIterator<KexiTableItem> Iterator;
//! not db-aware version
KexiTableViewData();
@@ -242,7 +243,7 @@ public:
@param valueType a type for values
*/
KexiTableViewData(
- const QValueList<QVariant> &keys, const QValueList<QVariant> &values,
+ const TQValueList<TQVariant> &keys, const TQValueList<TQVariant> &values,
KexiDB::Field::Type keyType = KexiDB::Field::Text,
KexiDB::Field::Type valueType = KexiDB::Field::Text);
@@ -284,8 +285,8 @@ public:
inline bool isDBAware() { return m_cursor; }
/*! For db-aware data set only: table name is returned;
- equivalent to cursor()->query()->parentTable()->name(). */
- QString dbTableName() const;
+ equivalent to cursor()->query()->tqparentTable()->name(). */
+ TQString dbTableName() const;
inline KexiDB::Cursor* cursor() const { return m_cursor; }
@@ -333,21 +334,21 @@ public:
Note that \a newval may be changed in aboutToChangeCell() signal handler.
\sa KexiDB::RowEditBuffer */
bool updateRowEditBufferRef(KexiTableItem *item,
- int colnum, KexiTableViewColumn* col, QVariant& newval, bool allowSignals = true,
- QVariant *visibleValueForLookupField = 0);
+ int colnum, KexiTableViewColumn* col, TQVariant& newval, bool allowSignals = true,
+ TQVariant *visibleValueForLookupField = 0);
/*! Added for convenience. Like above but \a newval is passed by value. */
inline bool updateRowEditBuffer(KexiTableItem *item, int colnum, KexiTableViewColumn* col,
- QVariant newval, bool allowSignals = true)
+ TQVariant newval, bool allowSignals = true)
{
- QVariant newv(newval);
+ TQVariant newv(newval);
return updateRowEditBufferRef(item, colnum, col, newv, allowSignals);
}
/*! Added for convenience. Like above but it's assumed that \a item item's columns are ordered
like in table view, not like in form view. Don't use this with form views. */
inline bool updateRowEditBuffer(KexiTableItem *item, int colnum,
- QVariant newval, bool allowSignals = true)
+ TQVariant newval, bool allowSignals = true)
{
KexiTableViewColumn* col = columns.at(colnum);
return col ? updateRowEditBufferRef(item, colnum, col, newval, allowSignals) : false;
@@ -358,27 +359,27 @@ public:
/*! \return last operation's result information (always not null). */
inline KexiDB::ResultInfo* result() { return &m_result; }
- bool saveRowChanges(KexiTableItem& item, bool repaint = false);
+ bool saveRowChanges(KexiTableItem& item, bool tqrepaint = false);
- bool saveNewRow(KexiTableItem& item, bool repaint = false);
+ bool saveNewRow(KexiTableItem& item, bool tqrepaint = false);
- bool deleteRow(KexiTableItem& item, bool repaint = false);
+ bool deleteRow(KexiTableItem& item, bool tqrepaint = false);
/*! Deletes rows (by number) passed with \a rowsToDelete.
Currently, this method is only for non data-aware tables. */
- void deleteRows( const QValueList<int> &rowsToDelete, bool repaint = false );
+ void deleteRows( const TQValueList<int> &rowsToDelete, bool tqrepaint = false );
/*! Deletes all rows. Works either for db-aware and non db-aware tables.
Column's definition is not changed.
For db-aware version, all rows are removed from a database.
Row-edit buffer is cleared.
- If \a repaint is true, reloadRequested() signal
+ If \a tqrepaint is true, reloadRequested() signal
is emitted after deleting (if at least one row was deleted),
- so presenters can repaint their contents.
+ so presenters can tqrepaint their contents.
\return true on success. */
- virtual bool deleteAllRows(bool repaint = false);
+ virtual bool deleteAllRows(bool tqrepaint = false);
/*! @internal method, used mostly by specialized classes like KexiTableView.
Clears internal row structures. Row-edit buffer is cleared.
@@ -389,7 +390,7 @@ public:
/*! Inserts new \a item at index \a index.
\a item will be owned by this data object.
Note: Reasonable only for not not-db-aware version. */
- void insertRow(KexiTableItem& item, uint index, bool repaint = false);
+ void insertRow(KexiTableItem& item, uint index, bool tqrepaint = false);
/*TODO: add this as well?
void insertRow(KexiTableItem& item, KexiTableItem& aboveItem); */
@@ -407,7 +408,7 @@ public:
inline bool isEmpty () const { return KexiTableViewDataBase::isEmpty(); }
inline KexiTableItem* first() { return KexiTableViewDataBase::first(); }
inline KexiTableItem* last() { return KexiTableViewDataBase::last(); }
- inline int findRef( const KexiTableItem* item ) { return KexiTableViewDataBase::findRef(item); }
+ inline int tqfindRef( const KexiTableItem* item ) { return KexiTableViewDataBase::tqfindRef(item); }
inline void sort() { KexiTableViewDataBase::sort(); }
inline bool removeFirst() { return KexiTableViewDataBase::removeFirst(); }
inline bool removeLast() { return KexiTableViewDataBase::removeLast(); }
@@ -428,7 +429,7 @@ public:
{ return new KexiTableItem(m_itemSize); }
public slots:
- //! @internal The same as QObject::deleteLater() but also sets smart pointer m_cursor to 0 to avoid crashes...
+ //! @internal The same as TQObject::deleteLater() but also sets smart pointer m_cursor to 0 to avoid crashes...
void deleteLater();
signals:
@@ -438,13 +439,13 @@ signals:
Connect this signal to your slot and set \a result->success to false
to disallow this change. You can also change \a newValue to other value,
or change other columns in \a item row. */
- void aboutToChangeCell(KexiTableItem *item, int colnum, QVariant& newValue,
+ void aboutToChangeCell(KexiTableItem *item, int colnum, TQVariant& newValue,
KexiDB::ResultInfo* result);
/*! Emited before inserting of a new, current row.
Connect this signal to your slot and set \a result->success to false
to disallow this inserting. You can also change columns in \a item row. */
- void aboutToInsertRow(KexiTableItem *item, KexiDB::ResultInfo* result, bool repaint);
+ void aboutToInsertRow(KexiTableItem *item, KexiDB::ResultInfo* result, bool tqrepaint);
/*! Emited before changing of an edited, current row.
Connect this signal to your slot and set \a result->success to false
@@ -454,21 +455,21 @@ signals:
void rowUpdated(KexiTableItem*); //!< Current row has been updated
- void rowInserted(KexiTableItem*, bool repaint); //!< A row has been inserted
+ void rowInserted(KexiTableItem*, bool tqrepaint); //!< A row has been inserted
//! A row has been inserted at \a index position (not db-aware data only)
- void rowInserted(KexiTableItem*, uint index, bool repaint);
+ void rowInserted(KexiTableItem*, uint index, bool tqrepaint);
/*! Emited before deleting of a current row.
Connect this signal to your slot and set \a result->success to false
to disallow this deleting. */
- void aboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool repaint);
+ void aboutToDeleteRow(KexiTableItem& item, KexiDB::ResultInfo* result, bool tqrepaint);
//! Current row has been deleted
void rowDeleted();
//! Rows have been deleted
- void rowsDeleted( const QValueList<int> &rowsToDelete );
+ void rowsDeleted( const TQValueList<int> &rowsToDelete );
//! Displayed data needs to be reloaded in all presenters.
void reloadRequested();
@@ -478,7 +479,7 @@ signals:
protected:
void init();
void init(
- const QValueList<QVariant> &keys, const QValueList<QVariant> &values,
+ const TQValueList<TQVariant> &keys, const TQValueList<TQVariant> &values,
KexiDB::Field::Type keyType, KexiDB::Field::Type valueType);
virtual int compareItems(Item item1, Item item2);
@@ -492,11 +493,11 @@ protected:
int cmpDateTime(Item item1, Item item2);
int cmpTime(Item item1, Item item2);
- //! Compare function for BLOB data (QByteArray). Uses size as the weight.
+ //! Compare function for BLOB data (TQByteArray). Uses size as the weight.
int cmpBLOB(Item item1, Item item2);
//! internal: for saveRowChanges() and saveNewRow()
- bool saveRow(KexiTableItem& item, bool insert, bool repaint);
+ bool saveRow(KexiTableItem& item, bool insert, bool tqrepaint);
//! (logical) sorted column number, set by setSorting()
//! can differ from m_realSortedColumn if there's lookup column used
@@ -508,15 +509,15 @@ protected:
int m_itemSize;
static unsigned short charTable[];
KexiDB::RowEditBuffer *m_pRowEditBuffer;
- QGuardedPtr<KexiDB::Cursor> m_cursor;
+ TQGuardedPtr<KexiDB::Cursor> m_cursor;
//! used to faster lookup columns of simple type (not dbaware)
-// QDict<KexiTableViewColumn> *m_simpleColumnsByName;
+// TQDict<KexiTableViewColumn> *m_simpleColumnsByName;
KexiDB::ResultInfo m_result;
uint m_visibleColumnsCount;
- QValueVector<int> m_visibleColumnsIDs, m_globalColumnsIDs;
+ TQValueVector<int> m_visibleColumnsIDs, m_globalColumnsIDs;
bool m_readOnly : 1;
bool m_insertingEnabled : 1;
@@ -534,7 +535,7 @@ protected:
//! Temporary, used in compare functions like cmpInt(), cmpString()
//! to avoid memory allocations.
- QVariant m_leftTmp, m_rightTmp;
+ TQVariant m_leftTmp, m_rightTmp;
};
#endif
diff --git a/kexi/widget/tableview/kexitableviewheader.cpp b/kexi/widget/tableview/kexitableviewheader.cpp
index 3656a0417..05212dd12 100644
--- a/kexi/widget/tableview/kexitableviewheader.cpp
+++ b/kexi/widget/tableview/kexitableviewheader.cpp
@@ -19,9 +19,9 @@
#include "kexitableviewheader.h"
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <kexiutils/utils.h>
#include <kexiutils/styleproxy.h>
@@ -31,105 +31,105 @@
class KexiTableViewHeaderStyle : public KexiUtils::StyleProxy
{
public:
- KexiTableViewHeaderStyle(QStyle *parentStyle, QWidget *widget)
- : KexiUtils::StyleProxy(parentStyle)
+ KexiTableViewHeaderStyle(TQStyle *tqparentStyle, TQWidget *widget)
+ : KexiUtils::StyleProxy(tqparentStyle)
{
- setBackgroundColor( widget->palette().active().background() );
+ setBackgroundColor( widget->tqpalette().active().background() );
}
~KexiTableViewHeaderStyle() {}
- virtual void drawPrimitive( PrimitiveElement pe,
- QPainter *p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default,
- const QStyleOption& option = QStyleOption::Default ) const
+ virtual void tqdrawPrimitive( TQ_PrimitiveElement pe,
+ TQPainter *p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default,
+ const TQStyleOption& option = TQStyleOption::Default ) const
{
- if (pe==QStyle::PE_HeaderSection) {
- QColorGroup newCg(cg);
- newCg.setColor(QColorGroup::Button, m_backgroundColor);
- newCg.setColor(QColorGroup::Background, m_backgroundColor); //set background color as well (e.g. for thinkeramik)
- m_style->drawPrimitive( pe, p, r, newCg, flags, option );
+ if (pe==TQStyle::PE_HeaderSection) {
+ TQColorGroup newCg(cg);
+ newCg.setColor(TQColorGroup::Button, m_backgroundColor);
+ newCg.setColor(TQColorGroup::Background, m_backgroundColor); //set background color as well (e.g. for thinkeramik)
+ m_style->tqdrawPrimitive( pe, p, r, newCg, flags, option );
return;
}
- m_style->drawPrimitive( pe, p, r, cg, flags, option );
+ m_style->tqdrawPrimitive( pe, p, r, cg, flags, option );
}
- void setBackgroundColor( const QColor& color ) { m_backgroundColor = color; }
+ void setBackgroundColor( const TQColor& color ) { m_backgroundColor = color; }
protected:
- QColor m_backgroundColor;
+ TQColor m_backgroundColor;
};
-KexiTableViewHeader::KexiTableViewHeader(QWidget * parent, const char * name)
- : QHeader(parent, name)
+KexiTableViewHeader::KexiTableViewHeader(TQWidget * tqparent, const char * name)
+ : TQHeader(tqparent, name)
, m_lastToolTipSection(-1)
- , m_selectionBackgroundColor(qApp->palette().active().highlight())
+ , m_selectionBackgroundColor(tqApp->tqpalette().active().highlight())
, m_selectedSection(-1)
, m_styleChangeEnabled(true)
{
- styleChange( style() );
+ styleChange( tqstyle() );
installEventFilter(this);
- connect(this, SIGNAL(sizeChange(int,int,int)),
- this, SLOT(slotSizeChange(int,int,int)));
+ connect(this, TQT_SIGNAL(sizeChange(int,int,int)),
+ this, TQT_SLOT(slotSizeChange(int,int,int)));
}
KexiTableViewHeader::~KexiTableViewHeader()
{
}
-void KexiTableViewHeader::styleChange( QStyle& oldStyle )
+void KexiTableViewHeader::styleChange( TQStyle& oldStyle )
{
- QHeader::styleChange( oldStyle );
+ TQHeader::styleChange( oldStyle );
if (!m_styleChangeEnabled)
return;
m_styleChangeEnabled = false;
- setStyle( new KexiTableViewHeaderStyle(&qApp->style(), this) );
+ setStyle( new KexiTableViewHeaderStyle(&tqApp->tqstyle(), this) );
m_styleChangeEnabled = true;
}
-int KexiTableViewHeader::addLabel ( const QString & s, int size )
+int KexiTableViewHeader::addLabel ( const TQString & s, int size )
{
m_toolTips += "";
slotSizeChange(0,0,0);//refresh
- return QHeader::addLabel(s, size);
+ return TQHeader::addLabel(s, size);
}
-int KexiTableViewHeader::addLabel ( const QIconSet & iconset, const QString & s, int size )
+int KexiTableViewHeader::addLabel ( const TQIconSet & iconset, const TQString & s, int size )
{
m_toolTips += "";
slotSizeChange(0,0,0);//refresh
- return QHeader::addLabel(iconset, s, size);
+ return TQHeader::addLabel(iconset, s, size);
}
void KexiTableViewHeader::removeLabel( int section )
{
if (section < 0 || section >= count())
return;
- QStringList::Iterator it = m_toolTips.begin();
+ TQStringList::Iterator it = m_toolTips.begin();
it += section;
m_toolTips.remove(it);
slotSizeChange(0,0,0);//refresh
- QHeader::removeLabel(section);
+ TQHeader::removeLabel(section);
}
-void KexiTableViewHeader::setToolTip( int section, const QString & toolTip )
+void KexiTableViewHeader::setToolTip( int section, const TQString & toolTip )
{
if (section < 0 || section >= (int)m_toolTips.count())
return;
m_toolTips[ section ] = toolTip;
}
-bool KexiTableViewHeader::eventFilter(QObject * watched, QEvent * e)
+bool KexiTableViewHeader::eventFilter(TQObject * watched, TQEvent * e)
{
- if (e->type()==QEvent::MouseMove) {
- const int section = sectionAt( static_cast<QMouseEvent*>(e)->x() );
+ if (e->type()==TQEvent::MouseMove) {
+ const int section = sectionAt( TQT_TQMOUSEEVENT(e)->x() );
if (section != m_lastToolTipSection && section >= 0 && section < (int)m_toolTips.count()) {
- QToolTip::remove(this, m_toolTipRect);
- QString tip = m_toolTips[ section ];
+ TQToolTip::remove(this, m_toolTipRect);
+ TQString tip = m_toolTips[ section ];
if (tip.isEmpty()) { //try label
- QFontMetrics fm(font());
- int minWidth = fm.width( label( section ) ) + style().pixelMetric( QStyle::PM_HeaderMargin );
- QIconSet *iset = iconSet( section );
+ TQFontMetrics fm(font());
+ int minWidth = fm.width( label( section ) ) + tqstyle().tqpixelMetric( TQStyle::PM_HeaderMargin );
+ TQIconSet *iset = iconSet( section );
if (iset)
- minWidth += (2+iset->pixmap( QIconSet::Small, QIconSet::Normal ).width()); //taken from QHeader::sectionSizeHint()
+ minWidth += (2+iset->pixmap( TQIconSet::Small, TQIconSet::Normal ).width()); //taken from TQHeader::sectionSizeHint()
if (minWidth > sectionSize( section ))
tip = label( section );
}
@@ -137,30 +137,30 @@ bool KexiTableViewHeader::eventFilter(QObject * watched, QEvent * e)
m_lastToolTipSection = -1;
}
else {
- QToolTip::add(this, m_toolTipRect = sectionRect(section), tip);
+ TQToolTip::add(this, m_toolTipRect = sectionRect(section), tip);
m_lastToolTipSection = section;
}
}
}
-// if (e->type()==QEvent::MouseButtonPress) {
+// if (e->type()==TQEvent::MouseButtonPress) {
// todo
// }
- return QHeader::eventFilter(watched, e);
+ return TQHeader::eventFilter(watched, e);
}
void KexiTableViewHeader::slotSizeChange(int /*section*/, int /*oldSize*/, int /*newSize*/ )
{
if (m_lastToolTipSection>0)
- QToolTip::remove(this, m_toolTipRect);
+ TQToolTip::remove(this, m_toolTipRect);
m_lastToolTipSection = -1; //tooltip's rect is now invalid
}
-void KexiTableViewHeader::setSelectionBackgroundColor(const QColor &color)
+void KexiTableViewHeader::setSelectionBackgroundColor(const TQColor &color)
{
m_selectionBackgroundColor = color;
}
-QColor KexiTableViewHeader::selectionBackgroundColor() const
+TQColor KexiTableViewHeader::selectionBackgroundColor() const
{
return m_selectionBackgroundColor;
}
@@ -182,20 +182,20 @@ int KexiTableViewHeader::selectedSection() const
return m_selectedSection;
}
-void KexiTableViewHeader::paintSection( QPainter * p, int index, const QRect & fr )
+void KexiTableViewHeader::paintSection( TQPainter * p, int index, const TQRect & fr )
{
const bool paintSelection = index==m_selectedSection && index != -1;
if (paintSelection) {
- static_cast<KexiTableViewHeaderStyle&>(style()).setBackgroundColor(
+ static_cast<KexiTableViewHeaderStyle&>(tqstyle()).setBackgroundColor(
KexiUtils::blendedColors(
- palette().active().background(), m_selectionBackgroundColor, 2, 1) );
+ tqpalette().active().background(), m_selectionBackgroundColor, 2, 1) );
}
- QHeader::paintSection( p, index, fr );
+ TQHeader::paintSection( p, index, fr );
if (paintSelection) { //revert the color for subsequent paints
- static_cast<KexiTableViewHeaderStyle&>(style()).setBackgroundColor(
- palette().active().background());
+ static_cast<KexiTableViewHeaderStyle&>(tqstyle()).setBackgroundColor(
+ tqpalette().active().background());
}
}
diff --git a/kexi/widget/tableview/kexitableviewheader.h b/kexi/widget/tableview/kexitableviewheader.h
index 5da3fa7b6..efc350558 100644
--- a/kexi/widget/tableview/kexitableviewheader.h
+++ b/kexi/widget/tableview/kexitableviewheader.h
@@ -20,9 +20,9 @@
#ifndef KEXITABLEVIEWHEADER_H
#define KEXITABLEVIEWHEADER_H
-#include <qheader.h>
+#include <tqheader.h>
-class QStyle;
+class TQStyle;
//! @short A table view header with additional actions.
/*! Displays field description (Field::description()) text as tool tip, if available.
@@ -30,44 +30,45 @@ class QStyle;
\todo react on indexChange ( int section, int fromIndex, int toIndex ) signal
*/
-class KEXIDATATABLE_EXPORT KexiTableViewHeader : public QHeader
+class KEXIDATATABLE_EXPORT KexiTableViewHeader : public TQHeader
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTableViewHeader(QWidget * parent = 0, const char * name = 0);
+ KexiTableViewHeader(TQWidget * tqparent = 0, const char * name = 0);
virtual ~KexiTableViewHeader();
- int addLabel( const QString & s, int size = -1 );
+ int addLabel( const TQString & s, int size = -1 );
- int addLabel( const QIconSet & iconset, const QString & s, int size = -1 );
+ int addLabel( const TQIconSet & iconset, const TQString & s, int size = -1 );
void removeLabel( int section );
/*! Sets \a toolTip for \a section. */
- void setToolTip( int section, const QString & toolTip );
+ void setToolTip( int section, const TQString & toolTip );
- virtual bool eventFilter(QObject * watched, QEvent * e);
+ virtual bool eventFilter(TQObject * watched, TQEvent * e);
void setSelectedSection(int section);
int selectedSection() const;
- QColor selectionBackgroundColor() const;
- void setSelectionBackgroundColor(const QColor &color);
+ TQColor selectionBackgroundColor() const;
+ void setSelectionBackgroundColor(const TQColor &color);
protected slots:
void slotSizeChange(int section, int oldSize, int newSize );
protected:
- virtual void paintSection ( QPainter * p, int index, const QRect & fr );
- virtual void styleChange( QStyle& oldStyle );
+ virtual void paintSection ( TQPainter * p, int index, const TQRect & fr );
+ virtual void styleChange( TQStyle& oldStyle );
int m_lastToolTipSection;
- QRect m_toolTipRect;
+ TQRect m_toolTipRect;
- QStringList m_toolTips;
- QColor m_selectionBackgroundColor;
+ TQStringList m_toolTips;
+ TQColor m_selectionBackgroundColor;
int m_selectedSection;
bool m_styleChangeEnabled : 1;
};
diff --git a/kexi/widget/tableview/kexitextformatter.cpp b/kexi/widget/tableview/kexitextformatter.cpp
index f4e0b89de..b73881381 100644
--- a/kexi/widget/tableview/kexitextformatter.cpp
+++ b/kexi/widget/tableview/kexitextformatter.cpp
@@ -71,7 +71,7 @@ void KexiTextFormatter::setField( KexiDB::Field* field )
}
}
-QString KexiTextFormatter::valueToText(const QVariant& value, const QString& add) const
+TQString KexiTextFormatter::valueToText(const TQVariant& value, const TQString& add) const
{
//cases, in order of expected frequency
if (!d->field || d->field->isTextType())
@@ -86,16 +86,16 @@ QString KexiTextFormatter::valueToText(const QVariant& value, const QString& add
if (value.toDouble() == 0.0)
return add.isEmpty() ? "0" : add; //eat 0
#if 0 //moved to KexiDB::formatNumberForVisibleDecimalPlaces()
- QString text( QString::number(value.toDouble(), 'f',
- QMAX(d->field->visibleDecimalPlaces(), 10)) ); //!<-- 10 is quite good maximum for fractional digits
+ TQString text( TQString::number(value.toDouble(), 'f',
+ TQMAX(d->field->visibleDecimalPlaces(), 10)) ); //!<-- 10 is quite good maximum for fractional digits
//!< @todo add command line settings?
//! @todo (js): get decimal places settings here...
- QStringList sl = QStringList::split(".", text);
+ TQStringList sl = TQStringList::split(".", text);
//nothing
}
else if (sl.count()==2) {
// kdDebug() << "sl.count()=="<<sl.count()<< " " <<sl[0] << " | " << sl[1] << endl;
- const QString sl1 = sl[1];
+ const TQString sl1 = sl[1];
int pos = sl1.length()-1;
if (pos>=1) {
for (;pos>=0 && sl1[pos]=='0';pos--)
@@ -113,16 +113,16 @@ QString KexiTextFormatter::valueToText(const QVariant& value, const QString& add
}
else if (d->field->type() == KexiDB::Field::Boolean) {
//! @todo temporary solution for booleans!
- const bool boolValue = value.isNull() ? QVariant(add).toBool() : value.toBool();
+ const bool boolValue = value.isNull() ? TQVariant(add).toBool() : value.toBool();
return boolValue ? "1" : "0";
}
else if (d->field->type() == KexiDB::Field::Date) {
- return d->dateFormatter->dateToString( value.toString().isEmpty() ? QDate() : value.toDate() );
+ return d->dateFormatter->dateToString( value.toString().isEmpty() ? TQDate() : value.toDate() );
}
else if (d->field->type() == KexiDB::Field::Time) {
return d->timeFormatter->timeToString(
- //hack to avoid converting null variant to valid QTime(0,0,0)
- value.toString().isEmpty() ? value.toTime() : QTime(99,0,0) );
+ //hack to avoid converting null variant to valid TQTime(0,0,0)
+ value.toString().isEmpty() ? value.toTime() : TQTime(99,0,0) );
}
else if (d->field->type() == KexiDB::Field::DateTime) {
if (value.toString().isEmpty() )
@@ -138,10 +138,10 @@ QString KexiTextFormatter::valueToText(const QVariant& value, const QString& add
return value.toString() + add;
}
-QVariant KexiTextFormatter::textToValue(const QString& text) const
+TQVariant KexiTextFormatter::textToValue(const TQString& text) const
{
if (!d->field)
- return QVariant();
+ return TQVariant();
const KexiDB::Field::Type t = d->field->type();
switch (t) {
case KexiDB::Field::Text:
@@ -157,7 +157,7 @@ QVariant KexiTextFormatter::textToValue(const QString& text) const
return text.toLongLong();
case KexiDB::Field::Boolean:
//! @todo temporary solution for booleans!
- return text == "1" ? QVariant(true,1) : QVariant(false,0);
+ return text == "1" ? TQVariant(true,1) : TQVariant(false,0);
case KexiDB::Field::Date:
return d->dateFormatter->stringToVariant( text );
case KexiDB::Field::Time:
@@ -167,8 +167,8 @@ QVariant KexiTextFormatter::textToValue(const QString& text) const
case KexiDB::Field::Float:
case KexiDB::Field::Double: {
// replace custom decimal symbol with '.' as required by to{Float|Double}()
- QString fixedText( text );
- fixedText.replace(KGlobal::locale()->decimalSymbol(), ".");
+ TQString fixedText( text );
+ fixedText.tqreplace(KGlobal::locale()->decimalSymbol(), ".");
if (t == KexiDB::Field::Double)
return fixedText.toDouble();
return fixedText.toFloat();
@@ -179,7 +179,7 @@ QVariant KexiTextFormatter::textToValue(const QString& text) const
//! @todo more data types!
}
-bool KexiTextFormatter::valueIsEmpty(const QString& text) const
+bool KexiTextFormatter::valueIsEmpty(const TQString& text) const
{
if (text.isEmpty())
return true;
@@ -198,7 +198,7 @@ bool KexiTextFormatter::valueIsEmpty(const QString& text) const
return text.isEmpty();
}
-bool KexiTextFormatter::valueIsValid(const QString& text) const
+bool KexiTextFormatter::valueIsValid(const TQString& text) const
{
if (!d->field)
return true;
@@ -218,7 +218,7 @@ bool KexiTextFormatter::valueIsValid(const QString& text) const
return true;
}
-QString KexiTextFormatter::inputMask() const
+TQString KexiTextFormatter::inputMask() const
{
const KexiDB::Field::Type t = d->field->type();
if (t==KexiDB::Field::Date) {
@@ -232,6 +232,6 @@ QString KexiTextFormatter::inputMask() const
else if (t==KexiDB::Field::DateTime) {
dateTimeInputMask( *d->dateFormatter, *d->timeFormatter );
}
- return QString::null;
+ return TQString();
}
diff --git a/kexi/widget/tableview/kexitextformatter.h b/kexi/widget/tableview/kexitextformatter.h
index 3ea611a44..12e67a37e 100644
--- a/kexi/widget/tableview/kexitextformatter.h
+++ b/kexi/widget/tableview/kexitextformatter.h
@@ -22,7 +22,7 @@
#include <kexidb/field.h>
-//! @short Text formatter used to format QVariant values to text for displaying and back to QVariant
+//! @short Text formatter used to format TQVariant values to text for displaying and back to TQVariant
/*! Used by KexiInputTableEdit, KexiDateTableEdit, KexiTimeTableEdit, KexiDateTimeTableEdit,
KexiDBLineEdit (forms), etc. */
class KEXIDATATABLE_EXPORT KexiTextFormatter
@@ -38,24 +38,24 @@ class KEXIDATATABLE_EXPORT KexiTextFormatter
A field schema set using setField() is used to perform the formatting.
\a add is a text that should be added to the value if possible.
Used in KexiInputTableEdit::setValueInternal(), by form widgets and for reporting/printing. */
- QString valueToText(const QVariant& value, const QString& add) const;
+ TQString valueToText(const TQVariant& value, const TQString& add) const;
/*! \return value cnverted from \a text
A field schema set using setField() is used to perform the formatting.
Used in KexiInputTableEdit::setValueInternal(), by form widgets and for reporting/printing. */
- QVariant textToValue(const QString& text) const;
+ TQVariant textToValue(const TQString& text) const;
/*! \return true if value formatted as \a text is empty.
A field schema set using setField() is used to perform the calculation. */
- bool valueIsEmpty(const QString& text) const;
+ bool valueIsEmpty(const TQString& text) const;
/*! \return true if value formatted as \a text is valid.
A field schema set using setField() is used to perform the calculation. */
- bool valueIsValid(const QString& text) const;
+ bool valueIsValid(const TQString& text) const;
- /*! \return input mask for intering values related to a field schema
+ /*! \return input tqmask for intering values related to a field schema
which has been set using setField(). */
- QString inputMask() const;
+ TQString inputMask() const;
class Private;
Private *d;
diff --git a/kexi/widget/tableview/kexitimetableedit.cpp b/kexi/widget/tableview/kexitimetableedit.cpp
index 3238c58e1..5f3313f75 100644
--- a/kexi/widget/tableview/kexitimetableedit.cpp
+++ b/kexi/widget/tableview/kexitimetableedit.cpp
@@ -19,20 +19,20 @@
#include "kexitimetableedit.h"
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qvariant.h>
-#include <qrect.h>
-#include <qpalette.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
-#include <qdatetime.h>
-#include <qcursor.h>
-#include <qpoint.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qdatetimeedit.h>
-#include <qclipboard.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqvariant.h>
+#include <tqrect.h>
+#include <tqpalette.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
+#include <tqdatetime.h>
+#include <tqcursor.h>
+#include <tqpoint.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqdatetimeedit.h>
+#include <tqclipboard.h>
#include <kdebug.h>
#include <klocale.h>
@@ -45,12 +45,12 @@
#include <kexiutils/utils.h>
-KexiTimeTableEdit::KexiTimeTableEdit(KexiTableViewColumn &column, QWidget *parent)
- : KexiInputTableEdit(column, parent)
+KexiTimeTableEdit::KexiTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent)
+ : KexiInputTableEdit(column, tqparent)
{
setName("KexiTimeTableEdit");
-//! @todo add QValidator so time like "99:88:77" cannot be even entered
+//! @todo add TQValidator so time like "99:88:77" cannot be even entered
m_lineedit->setInputMask( m_formatter.inputMask() );
}
@@ -59,20 +59,20 @@ KexiTimeTableEdit::~KexiTimeTableEdit()
{
}
-void KexiTimeTableEdit::setValueInInternalEditor(const QVariant &value)
+void KexiTimeTableEdit::setValueInInternalEditor(const TQVariant &value)
{
if (value.isValid() && value.toTime().isValid())
m_lineedit->setText( m_formatter.timeToString( value.toTime() ) );
else
- m_lineedit->setText( QString::null );
+ m_lineedit->setText( TQString() );
}
-void KexiTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld)
+void KexiTimeTableEdit::setValueInternal(const TQVariant& add_, bool removeOld)
{
if (removeOld) {
//new time entering... just fill the line edit
//! @todo cut string if too long..
- QString add(add_.toString());
+ TQString add(add_.toString());
m_lineedit->setText(add);
m_lineedit->setCursorPosition(add.length());
return;
@@ -81,20 +81,20 @@ void KexiTimeTableEdit::setValueInternal(const QVariant& add_, bool removeOld)
m_lineedit->setCursorPosition(0); //ok?
}
-void KexiTimeTableEdit::setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h )
+void KexiTimeTableEdit::setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h )
{
Q_UNUSED(p);
Q_UNUSED(focused);
Q_UNUSED(x);
Q_UNUSED(w);
Q_UNUSED(h);
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
y_offset = -1;
#else
y_offset = 0;
#endif
- if (!val.isNull() && val.canCast(QVariant::Time))
+ if (!val.isNull() && val.canCast(TQVariant::Time))
txt = m_formatter.timeToString(val.toTime());
align |= AlignLeft;
}
@@ -111,12 +111,12 @@ bool KexiTimeTableEdit::valueIsEmpty()
return valueIsNull();// OK? TODO (nonsense?)
}
-QTime KexiTimeTableEdit::timeValue()
+TQTime KexiTimeTableEdit::timeValue()
{
return m_formatter.stringToTime( m_lineedit->text() );
}
-QVariant KexiTimeTableEdit::value()
+TQVariant KexiTimeTableEdit::value()
{
return m_formatter.stringToVariant( m_lineedit->text() );
}
@@ -128,21 +128,21 @@ bool KexiTimeTableEdit::valueIsValid()
return m_formatter.stringToTime( m_lineedit->text() ).isValid();
}
-void KexiTimeTableEdit::handleCopyAction(const QVariant& value, const QVariant& visibleValue)
+void KexiTimeTableEdit::handleCopyAction(const TQVariant& value, const TQVariant& visibleValue)
{
Q_UNUSED(visibleValue);
if (!value.isNull() && value.toTime().isValid())
- qApp->clipboard()->setText( m_formatter.timeToString(value.toTime()) );
+ tqApp->clipboard()->setText( m_formatter.timeToString(value.toTime()) );
else
- qApp->clipboard()->setText( QString::null );
+ tqApp->clipboard()->setText( TQString() );
}
-void KexiTimeTableEdit::handleAction(const QString& actionName)
+void KexiTimeTableEdit::handleAction(const TQString& actionName)
{
const bool alreadyVisible = m_lineedit->isVisible();
if (actionName=="edit_paste") {
- const QVariant newValue( m_formatter.stringToTime( qApp->clipboard()->text() ) );
+ const TQVariant newValue( m_formatter.stringToTime( tqApp->clipboard()->text() ) );
if (!alreadyVisible) { //paste as the entire text if the cell was not in edit mode
emit editRequested();
m_lineedit->clear();
diff --git a/kexi/widget/tableview/kexitimetableedit.h b/kexi/widget/tableview/kexitimetableedit.h
index 4daa68ec2..6c427bbd5 100644
--- a/kexi/widget/tableview/kexitimetableedit.h
+++ b/kexi/widget/tableview/kexitimetableedit.h
@@ -24,7 +24,7 @@
#include <widget/utils/kexidatetimeformatter.h>
/*! @short Editor class for Time type.
- It is a replacement QTimeEdit due to usability problems:
+ It is a replacement TQTimeEdit due to usability problems:
people are accustomed to use single-character cursor.
Time format is retrieved from the KDE global settings
and input/output is performed using KLineEdit (from KexiInputTableEdit).
@@ -32,28 +32,29 @@
class KexiTimeTableEdit : public KexiInputTableEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiTimeTableEdit(KexiTableViewColumn &column, QWidget *parent=0);
+ KexiTimeTableEdit(KexiTableViewColumn &column, TQWidget *tqparent=0);
virtual ~KexiTimeTableEdit();
- virtual void setupContents( QPainter *p, bool focused, const QVariant& val,
- QString &txt, int &align, int &x, int &y_offset, int &w, int &h );
- virtual QVariant value();
+ virtual void setupContents( TQPainter *p, bool focused, const TQVariant& val,
+ TQString &txt, int &align, int &x, int &y_offset, int &w, int &h );
+ virtual TQVariant value();
virtual bool valueIsNull();
virtual bool valueIsEmpty();
virtual bool valueIsValid();
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleAction(const QString& actionName);
+ virtual void handleAction(const TQString& actionName);
/*! Reimplemented after KexiInputTableEdit. */
- virtual void handleCopyAction(const QVariant& value, const QVariant& visibleValue);
+ virtual void handleCopyAction(const TQVariant& value, const TQVariant& visibleValue);
protected:
//! helper
- void setValueInInternalEditor(const QVariant &value);
- virtual void setValueInternal(const QVariant& add, bool removeOld);
- QTime timeValue();
+ void setValueInInternalEditor(const TQVariant &value);
+ virtual void setValueInternal(const TQVariant& add, bool removeOld);
+ TQTime timeValue();
//! Used to format and convert time values
KexiTimeFormatter m_formatter;
diff --git a/kexi/widget/utils/kexiarrowtip.cpp b/kexi/widget/utils/kexiarrowtip.cpp
index cdffcb023..a805f5e3c 100644
--- a/kexi/widget/utils/kexiarrowtip.cpp
+++ b/kexi/widget/utils/kexiarrowtip.cpp
@@ -19,44 +19,44 @@
#include "kexiarrowtip.h"
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
#include <kexiutils/utils.h>
-KexiArrowTip::KexiArrowTip(const QString& text, QWidget* parent)
- : KexiToolTip(text, parent)
+KexiArrowTip::KexiArrowTip(const TQString& text, TQWidget* tqparent)
+ : KexiToolTip(text, tqparent)
, m_opacity(0.0)
{
- QPalette pal( palette() );
- QColorGroup cg(pal.active());
- cg.setColor(QColorGroup::Foreground, Qt::red);
+ TQPalette pal( palette() );
+ TQColorGroup cg(pal.active());
+ cg.setColor(TQColorGroup::Foreground, TQt::red);
pal.setActive(cg);
setPalette(pal);
- QFontMetrics fm(font());
- QSize sz(fm.boundingRect(m_value.toString()).size());
- sz += QSize(14, 10); //+margins
+ TQFontMetrics fm(font());
+ TQSize sz(fm.boundingRect(m_value.toString()).size());
+ sz += TQSize(14, 10); //+margins
m_arrowHeight = sz.height()/2;
- sz += QSize(0, m_arrowHeight); //+arrow height
+ sz += TQSize(0, m_arrowHeight); //+arrow height
resize(sz);
setAutoMask( false );
- //generate mask
- QPixmap maskPm(size());
- maskPm.fill( black );
- QPainter maskPainter(&maskPm);
- drawFrame(maskPainter);
- QImage maskImg( maskPm.convertToImage() );
- QBitmap bm;
- bm = maskImg.createHeuristicMask();
+ //generate tqmask
+ TQPixmap tqmaskPm(size());
+ tqmaskPm.fill( black );
+ TQPainter tqmaskPainter(&tqmaskPm);
+ drawFrame(tqmaskPainter);
+ TQImage tqmaskImg( tqmaskPm.convertToImage() );
+ TQBitmap bm;
+ bm = tqmaskImg.createHeuristicMask();
setMask( bm );
}
@@ -88,7 +88,7 @@ void KexiArrowTip::increaseOpacity()
m_opacity += 0.10;
setWindowOpacity(m_opacity);
if (m_opacity < 1.0)
- QTimer::singleShot(25, this, SLOT(increaseOpacity()));
+ TQTimer::singleShot(25, this, TQT_SLOT(increaseOpacity()));
}
void KexiArrowTip::decreaseOpacity()
@@ -100,7 +100,7 @@ void KexiArrowTip::decreaseOpacity()
}
m_opacity -= 0.10;
setWindowOpacity(m_opacity);
- QTimer::singleShot(25, this, SLOT(decreaseOpacity()));
+ TQTimer::singleShot(25, this, TQT_SLOT(decreaseOpacity()));
}
bool KexiArrowTip::close ( bool alsoDelete )
@@ -115,16 +115,16 @@ bool KexiArrowTip::close ( bool alsoDelete )
return m_opacity<=0.0;
}
-void KexiArrowTip::drawContents(QPainter& p)
+void KexiArrowTip::drawContents(TQPainter& p)
{
- p.setPen( QPen(palette().active().foreground(), 1) );
- p.drawText(QRect(0,m_arrowHeight,width(),height()-m_arrowHeight),
- Qt::AlignCenter, m_value.toString());
+ p.setPen( TQPen(tqpalette().active().foreground(), 1) );
+ p.drawText(TQRect(0,m_arrowHeight,width(),height()-m_arrowHeight),
+ TQt::AlignCenter, m_value.toString());
}
-void KexiArrowTip::drawFrame(QPainter& p)
+void KexiArrowTip::drawFrame(TQPainter& p)
{
- QPen pen(palette().active().foreground(), 1, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
+ TQPen pen(tqpalette().active().foreground(), 1, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin);
p.setPen( pen );
/*
/\
@@ -134,7 +134,7 @@ void KexiArrowTip::drawFrame(QPainter& p)
*/
//1st line
const int arrowOffset = 5; //5 pixels to right
- QPointArray pa(8);
+ TQPointArray pa(8);
pa.setPoint(0, 0, m_arrowHeight-1);
pa.setPoint(1, 0, height()-1);
pa.setPoint(2, width()-1, height()-1);
diff --git a/kexi/widget/utils/kexiarrowtip.h b/kexi/widget/utils/kexiarrowtip.h
index d6de61868..791535fa8 100644
--- a/kexi/widget/utils/kexiarrowtip.h
+++ b/kexi/widget/utils/kexiarrowtip.h
@@ -29,11 +29,12 @@
class KEXIGUIUTILS_EXPORT KexiArrowTip : public KexiToolTip
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiArrowTip(const QString& text, QWidget* parent);
+ KexiArrowTip(const TQString& text, TQWidget* tqparent);
virtual ~KexiArrowTip();
- inline QString text() const { return m_value.toString(); }
+ inline TQString text() const { return m_value.toString(); }
virtual bool close() { return close(false); }
virtual bool close( bool alsoDelete );
@@ -46,8 +47,8 @@ class KEXIGUIUTILS_EXPORT KexiArrowTip : public KexiToolTip
void decreaseOpacity();
protected:
- virtual void drawFrame(QPainter& p);
- virtual void drawContents(QPainter& p);
+ virtual void drawFrame(TQPainter& p);
+ virtual void drawContents(TQPainter& p);
int m_arrowHeight;
double m_opacity;
diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp
index 407bc6fe5..b5c22372f 100644
--- a/kexi/widget/utils/kexicomboboxdropdownbutton.cpp
+++ b/kexi/widget/utils/kexicomboboxdropdownbutton.cpp
@@ -23,18 +23,18 @@
#include <kdebug.h>
#include <kcombobox.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
-KexiComboBoxDropDownButton::KexiComboBoxDropDownButton( QWidget *parent )
- : KPushButton(parent)
+KexiComboBoxDropDownButton::KexiComboBoxDropDownButton( TQWidget *tqparent )
+ : KPushButton(tqparent)
{
m_paintedCombo = new KComboBox(this);
m_paintedCombo->hide();
m_paintedCombo->setEditable(true);
setToggleButton(true);
- styleChange(style());
+ styleChange(tqstyle());
m_paintedCombo->move(0,0);
m_paintedCombo->setFixedSize(size());
}
@@ -43,45 +43,45 @@ KexiComboBoxDropDownButton::~KexiComboBoxDropDownButton()
{
}
-void KexiComboBoxDropDownButton::drawButton(QPainter *p)
+void KexiComboBoxDropDownButton::drawButton(TQPainter *p)
{
- int flags = QStyle::Style_Enabled | QStyle::Style_HasFocus;
+ int flags = TQStyle::Style_Enabled | TQStyle::Style_HasFocus;
if (isDown())
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
KPushButton::drawButton(p);
- QRect r = rect();
+ TQRect r = rect();
r.setHeight(r.height()+m_fixForHeight);
- if (m_drawComplexControl) {
+ if (m_tqdrawComplexControl) {
if (m_fixForHeight>0 && m_paintedCombo->size()!=size()) {
m_paintedCombo->move(0,0);
- m_paintedCombo->setFixedSize(size()+QSize(0, m_fixForHeight)); //last chance to fix size
+ m_paintedCombo->setFixedSize(size()+TQSize(0, m_fixForHeight)); //last chance to fix size
}
- style().drawComplexControl( QStyle::CC_ComboBox, p,
- m_fixForHeight>0 ? (const QWidget*)m_paintedCombo : this, r, colorGroup(),
- flags, (uint)(QStyle::SC_ComboBoxArrow), QStyle::SC_None );
+ tqstyle().tqdrawComplexControl( TQStyle::CC_ComboBox, p,
+ m_fixForHeight>0 ? (const TQWidget*)m_paintedCombo : this, r, tqcolorGroup(),
+ flags, (uint)(TQStyle::SC_ComboBoxArrow), TQStyle::SC_None );
}
else {
r.setWidth(r.width()+2);
- style().drawPrimitive( QStyle::PE_ArrowDown, p, r, colorGroup(), flags);
+ tqstyle().tqdrawPrimitive( TQStyle::PE_ArrowDown, p, r, tqcolorGroup(), flags);
}
}
-void KexiComboBoxDropDownButton::styleChange( QStyle & oldStyle )
+void KexiComboBoxDropDownButton::styleChange( TQStyle & oldStyle )
{
//<hack>
- if (qstricmp(style().name(),"thinkeramik")==0) {
+ if (qstricmp(tqstyle().name(),"thinkeramik")==0) {
m_fixForHeight = 3;
}
else
m_fixForHeight = 0;
//</hack>
- m_drawComplexControl =
- (style().inherits("KStyle") && qstricmp(style().name(),"qtcurve")!=0)
- || qstricmp(style().name(),"platinum")==0;
+ m_tqdrawComplexControl =
+ (tqstyle().inherits("KStyle") && qstricmp(tqstyle().name(),"qtcurve")!=0)
+ || qstricmp(tqstyle().name(),"platinum")==0;
if (m_fixForHeight==0)
- setFixedWidth( style().querySubControlMetrics( QStyle::CC_ComboBox,
- (const QWidget*)m_paintedCombo, QStyle::SC_ComboBoxArrow ).width() +1 );
+ setFixedWidth( tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox,
+ (const TQWidget*)m_paintedCombo, TQStyle::SC_ComboBoxArrow ).width() +1 );
KPushButton::styleChange(oldStyle);
}
diff --git a/kexi/widget/utils/kexicomboboxdropdownbutton.h b/kexi/widget/utils/kexicomboboxdropdownbutton.h
index da53a7e2e..970e46c3e 100644
--- a/kexi/widget/utils/kexicomboboxdropdownbutton.h
+++ b/kexi/widget/utils/kexicomboboxdropdownbutton.h
@@ -30,19 +30,19 @@ class KComboBox;
class KEXIGUIUTILS_EXPORT KexiComboBoxDropDownButton : public KPushButton
{
public:
- KexiComboBoxDropDownButton( QWidget *parent );
+ KexiComboBoxDropDownButton( TQWidget *tqparent );
virtual ~KexiComboBoxDropDownButton();
protected:
/*! Reimplemented after @ref KPushButton to draw drop-down arrow. */
- virtual void drawButton(QPainter *p);
+ virtual void drawButton(TQPainter *p);
/*! Reimplemented after @ref KPushButton to adapt size to style changes. */
- virtual void styleChange( QStyle & oldStyle );
+ virtual void styleChange( TQStyle & oldStyle );
int m_fixForHeight;
- bool m_drawComplexControl : 1;
- KComboBox *m_paintedCombo; //!< fake combo used only to pass it as 'this' for QStyle
+ bool m_tqdrawComplexControl : 1;
+ KComboBox *m_paintedCombo; //!< fake combo used only to pass it as 'this' for TQStyle
//!< (because styles use \<static_cast\>)
};
diff --git a/kexi/widget/utils/kexicontextmenuutils.cpp b/kexi/widget/utils/kexicontextmenuutils.cpp
index 727cef6f0..8c6c3ab2e 100644
--- a/kexi/widget/utils/kexicontextmenuutils.cpp
+++ b/kexi/widget/utils/kexicontextmenuutils.cpp
@@ -27,10 +27,10 @@
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qfiledialog.h>
-#include <qapplication.h>
+#include <tqfiledialog.h>
+#include <tqapplication.h>
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
#include <win32_utils.h>
#include <krecentdirs.h>
#endif
@@ -39,8 +39,8 @@
class KexiImageContextMenu::Private
{
public:
- Private(QWidget *parent)
- : actionCollection(parent)
+ Private(TQWidget *tqparent)
+ : actionCollection(tqparent)
{
}
@@ -55,38 +55,38 @@ public:
//------------
-KexiImageContextMenu::KexiImageContextMenu(QWidget* parent)
- : KPopupMenu(parent)
+KexiImageContextMenu::KexiImageContextMenu(TQWidget* tqparent)
+ : KPopupMenu(tqparent)
, d( new Private(this) )
{
setName("KexiImageContextMenu");
- insertTitle(QString::null);
+ insertTitle(TQString());
d->insertFromFileAction = new KAction(i18n("Insert From &File..."), SmallIconSet("fileopen"), 0,
- this, SLOT(insertFromFile()), &d->actionCollection, "insert");
+ TQT_TQOBJECT(this), TQT_SLOT(insertFromFile()), &d->actionCollection, "insert");
d->insertFromFileAction->plug(this);
- d->saveAsAction = KStdAction::saveAs(this, SLOT(saveAs()), &d->actionCollection);
+ d->saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), &d->actionCollection);
// d->saveAsAction->setText(i18n("&Save &As..."));
d->saveAsAction->plug(this);
insertSeparator();
- d->cutAction = KStdAction::cut(this, SLOT(cut()), &d->actionCollection);
+ d->cutAction = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(cut()), &d->actionCollection);
d->cutAction->plug(this);
- d->copyAction = KStdAction::copy(this, SLOT(copy()), &d->actionCollection);
+ d->copyAction = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copy()), &d->actionCollection);
d->copyAction->plug(this);
- d->pasteAction = KStdAction::paste(this, SLOT(paste()), &d->actionCollection);
+ d->pasteAction = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(paste()), &d->actionCollection);
d->pasteAction->plug(this);
d->deleteAction = new KAction(i18n("&Clear"), SmallIconSet("editdelete"), 0,
- this, SLOT(clear()), &d->actionCollection, "delete");
+ TQT_TQOBJECT(this), TQT_SLOT(clear()), &d->actionCollection, "delete");
d->deleteAction->plug(this);
#ifdef KEXI_NO_UNFINISHED
d->propertiesAction = 0;
#else
insertSeparator();
d->propertiesAction = new KAction(i18n("Properties"), 0, 0,
- this, SLOT(showProperties()), &d->actionCollection, "properties");
+ this, TQT_SLOT(showProperties()), &d->actionCollection, "properties");
d->propertiesAction->plug(this);
#endif
- connect(this, SIGNAL(aboutToShow()), this, SLOT(updateActionsAvailability()));
+ connect(this, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(updateActionsAvailability()));
}
KexiImageContextMenu::~KexiImageContextMenu()
@@ -96,12 +96,12 @@ KexiImageContextMenu::~KexiImageContextMenu()
void KexiImageContextMenu::insertFromFile()
{
-// QWidget *focusWidget = qApp->focusWidget();
-#ifdef Q_WS_WIN
- QString recentDir;
- QString fileName = QFileDialog::getOpenFileName(
+// TQWidget *tqfocusWidget = tqApp->tqfocusWidget();
+#ifdef TQ_WS_WIN
+ TQString recentDir;
+ TQString fileName = TQFileDialog::getOpenFileName(
KFileDialog::getStartURL(":LastVisitedImagePath", recentDir).path(),
- convertKFileDialogFilterToQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
+ convertKFileDialogFilterToTQFileDialogFilter(KImageIO::pattern(KImageIO::Reading)),
this, 0, i18n("Insert Image From File"));
KURL url;
if (!fileName.isEmpty())
@@ -109,22 +109,22 @@ void KexiImageContextMenu::insertFromFile()
#else
KURL url( KFileDialog::getImageOpenURL(
":LastVisitedImagePath", this, i18n("Insert Image From File")) );
-// QString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
+// TQString fileName = url.isLocalFile() ? url.path() : url.prettyURL();
//! @todo download the file if remote, then set fileName properly
#endif
if (!url.isValid()) {
//focus the app again because to avoid annoying the user with unfocused main window
- if (qApp->mainWidget()) {
- //focusWidget->raise();
- //focusWidget->setFocus();
- qApp->mainWidget()->raise();
+ if (tqApp->mainWidget()) {
+ //tqfocusWidget->raise();
+ //tqfocusWidget->setFocus();
+ tqApp->mainWidget()->raise();
}
return;
}
kexipluginsdbg << "fname=" << url.prettyURL() << endl;
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//save last visited path
// KURL url(fileName);
if (url.isLocalFile())
@@ -132,16 +132,16 @@ void KexiImageContextMenu::insertFromFile()
#endif
emit insertFromFileRequested(url);
- if (qApp->mainWidget()) {
-// focusWidget->raise();
-// focusWidget->setFocus();
- qApp->mainWidget()->raise();
+ if (tqApp->mainWidget()) {
+// tqfocusWidget->raise();
+// tqfocusWidget->setFocus();
+ tqApp->mainWidget()->raise();
}
}
void KexiImageContextMenu::saveAs()
{
- QString origFilename, fileExtension;
+ TQString origFilename, fileExtension;
bool dataIsEmpty = false;
emit aboutToSaveAsRequested(origFilename, fileExtension, dataIsEmpty);
@@ -150,44 +150,44 @@ void KexiImageContextMenu::saveAs()
return;
}
if (!origFilename.isEmpty())
- origFilename = QString("/") + origFilename;
+ origFilename = TQString("/") + origFilename;
if (fileExtension.isEmpty()) {
// PNG data is the default
fileExtension = "png";
}
-#ifdef Q_WS_WIN
- QString recentDir;
- QString fileName = QFileDialog::getSaveFileName(
+#ifdef TQ_WS_WIN
+ TQString recentDir;
+ TQString fileName = TQFileDialog::getSaveFileName(
KFileDialog::getStartURL(":LastVisitedImagePath", recentDir).path() + origFilename,
- convertKFileDialogFilterToQFileDialogFilter(KImageIO::pattern(KImageIO::Writing)),
+ convertKFileDialogFilterToTQFileDialogFilter(KImageIO::pattern(KImageIO::Writing)),
this, 0, i18n("Save Image to File"));
#else
//! @todo add originalFileName! (requires access to KRecentDirs)
- QString fileName = KFileDialog::getSaveFileName(
+ TQString fileName = KFileDialog::getSaveFileName(
":LastVisitedImagePath", KImageIO::pattern(KImageIO::Writing), this, i18n("Save Image to File"));
#endif
if (fileName.isEmpty())
return;
- if (QFileInfo(fileName).extension().isEmpty())
- fileName += (QString(".")+fileExtension);
+ if (TQFileInfo(fileName).extension().isEmpty())
+ fileName += (TQString(".")+fileExtension);
kdDebug() << fileName << endl;
KURL url;
url.setPath( fileName );
-#ifdef Q_WS_WIN
+#ifdef TQ_WS_WIN
//save last visited path
if (url.isLocalFile())
KRecentDirs::add(":LastVisitedImagePath", url.directory());
#endif
- QFile f(fileName);
+ TQFile f(fileName);
if (f.exists() && KMessageBox::Yes != KMessageBox::warningYesNo(this,
"<qt>"+i18n("File \"%1\" already exists."
"<p>Do you want to replace it with a new one?")
- .arg(QDir::convertSeparators(fileName))+"</qt>",0,
+ .tqarg(TQDir::convertSeparators(fileName))+"</qt>",0,
KGuiItem(i18n("&Replace")), KGuiItem(i18n("&Don't Replace"))))
{
return;
@@ -244,7 +244,7 @@ KActionCollection* KexiImageContextMenu::actionCollection() const
}
//static
-bool KexiImageContextMenu::updateTitle(QPopupMenu *menu, const QString& title, const QString& iconName)
+bool KexiImageContextMenu::updateTitle(TQPopupMenu *menu, const TQString& title, const TQString& iconName)
{
return KexiContextMenuUtils::updateTitle(menu, title, i18n("Image"), iconName);
}
@@ -252,13 +252,13 @@ bool KexiImageContextMenu::updateTitle(QPopupMenu *menu, const QString& title, c
// -------------------------------------------
//static
-bool KexiContextMenuUtils::updateTitle(QPopupMenu *menu, const QString& objectName,
- const QString& objectTypeName, const QString& iconName)
+bool KexiContextMenuUtils::updateTitle(TQPopupMenu *menu, const TQString& objectName,
+ const TQString& objectTypeName, const TQString& iconName)
{
if (!menu || objectName.isEmpty() || objectTypeName.isEmpty())
return false;
const int id = menu->idAt(0);
- QMenuItem *item = menu->findItem(id);
+ TQMenuItem *item = menu->tqfindItem(id);
if (!item)
return false;
KPopupTitle *title = dynamic_cast<KPopupTitle *>(item->widget());
@@ -267,14 +267,14 @@ bool KexiContextMenuUtils::updateTitle(QPopupMenu *menu, const QString& objectNa
/*! @todo look at makeFirstCharacterUpperCaseInCaptions setting [bool]
(see doc/dev/settings.txt) */
- QString realTitle( i18n("Object name : Object type", "%1 : %2")
- .arg( objectName[0].upper() + objectName.mid(1) )
- .arg( objectTypeName ));
+ TQString realTitle( i18n("Object name : Object type", "%1 : %2")
+ .tqarg( objectName[0].upper() + objectName.mid(1) )
+ .tqarg( objectTypeName ));
if (iconName.isEmpty())
title->setTitle(realTitle);
else {
- QPixmap pixmap(SmallIcon( iconName ));
+ TQPixmap pixmap(SmallIcon( iconName ));
title->setTitle(realTitle, &pixmap);
}
return true;
diff --git a/kexi/widget/utils/kexicontextmenuutils.h b/kexi/widget/utils/kexicontextmenuutils.h
index 95258e964..2f73b18e7 100644
--- a/kexi/widget/utils/kexicontextmenuutils.h
+++ b/kexi/widget/utils/kexicontextmenuutils.h
@@ -35,8 +35,8 @@ class KEXIGUIUTILS_EXPORT KexiContextMenuUtils
public:
/*! Updates title for context menu.
\return true if the title has been updated. */
- static bool updateTitle(QPopupMenu *menu, const QString& objectName,
- const QString& objectTypeName, const QString& iconName);
+ static bool updateTitle(TQPopupMenu *menu, const TQString& objectName,
+ const TQString& objectTypeName, const TQString& iconName);
};
//! @short A context menu used for images within form and table views
@@ -50,17 +50,18 @@ class KEXIGUIUTILS_EXPORT KexiContextMenuUtils
class KEXIGUIUTILS_EXPORT KexiImageContextMenu : public KPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiImageContextMenu(QWidget *parent);
+ KexiImageContextMenu(TQWidget *tqparent);
virtual ~KexiImageContextMenu();
KActionCollection* actionCollection() const;
/*! Updates title for context menu.
- Used in KexiDBWidgetContextMenuExtender::createTitle(QPopupMenu *menu) and KexiDBImageBox.
+ Used in KexiDBWidgetContextMenuExtender::createTitle(TQPopupMenu *menu) and KexiDBImageBox.
\return true if the title has been updated. */
- static bool updateTitle(QPopupMenu *menu, const QString& title, const QString& iconName = QString::null);
+ static bool updateTitle(TQPopupMenu *menu, const TQString& title, const TQString& iconName = TQString());
public slots:
void updateActionsAvailability();
@@ -84,10 +85,10 @@ class KEXIGUIUTILS_EXPORT KexiImageContextMenu : public KPopupMenu
/*! Emitted before "saveAs" action was requested.
You should fill \a origFilename, \a fileExtension and \a dataIsEmpty values.
If \a dataIsEmpty is false, saving will be cancelled. */
- void aboutToSaveAsRequested(QString& origFilename, QString& fileExtension, bool& dataIsEmpty);
+ void aboutToSaveAsRequested(TQString& origFilename, TQString& fileExtension, bool& dataIsEmpty);
//! Emitted when "saveAs" action was requested
- void saveAsRequested(const QString& fileName);
+ void saveAsRequested(const TQString& fileName);
//! Emitted when "cut" action was requested
void cutRequested();
diff --git a/kexi/widget/utils/kexidatetimeformatter.cpp b/kexi/widget/utils/kexidatetimeformatter.cpp
index d8f642ca0..430d2f8fc 100644
--- a/kexi/widget/utils/kexidatetimeformatter.cpp
+++ b/kexi/widget/utils/kexidatetimeformatter.cpp
@@ -32,69 +32,69 @@ KexiDateFormatter::KexiDateFormatter()
{
// use "short date" format system settings
//! @todo allow to override the format using column property and/or global app settings
- QString df( KGlobal::locale()->dateFormatShort() );
+ TQString df( KGlobal::locale()->dateFormatShort() );
if (df.length()>2)
m_separator = df.mid(2,1);
else
m_separator = "-";
const int separatorLen = m_separator.length();
- QString yearMask("9999");
- QString yearDateFormat("yyyy"),
+ TQString yearMask("9999");
+ TQString yearDateFormat("yyyy"),
monthDateFormat("MM"),
dayDateFormat("dd"); //for setting up m_dateFormat
bool ok = df.length()>=8;
- int yearpos, monthpos, daypos; //result of df.find()
+ int yearpos, monthpos, daypos; //result of df.tqfind()
if (ok) {//look at % variables
//! @todo more variables are possible here, see void KLocale::setDateFormatShort() docs
//! http://developer.kde.org/documentation/library/3.5-api/kdelibs-apidocs/kdecore/html/classKLocale.html#a59
- yearpos = df.find("%y", 0, false); //&y or %y
+ yearpos = df.tqfind("%y", 0, false); //&y or %y
m_longYear = !(yearpos>=0 && df.mid(yearpos+1, 1)=="y");
if (!m_longYear) {
yearMask = "99";
yearDateFormat = "yy";
}
- monthpos = df.find("%m", 0, true); //%m or %n
+ monthpos = df.tqfind("%m", 0, true); //%m or %n
m_monthWithLeadingZero = true;
if (monthpos<0) {
- monthpos = df.find("%n", 0, false);
+ monthpos = df.tqfind("%n", 0, false);
m_monthWithLeadingZero = false;
monthDateFormat = "M";
}
- daypos = df.find("%d", 0, true);//%d or %e
+ daypos = df.tqfind("%d", 0, true);//%d or %e
m_dayWithLeadingZero = true;
if (daypos<0) {
- daypos = df.find("%e", 0, false);
+ daypos = df.tqfind("%e", 0, false);
m_dayWithLeadingZero = false;
dayDateFormat = "d";
}
ok = (yearpos>=0 && monthpos>=0 && daypos>=0);
}
- m_order = QDateEdit::YMD; //default
+ m_order = TQDateEdit::YMD; //default
if (ok) {
if (yearpos<monthpos && monthpos<daypos) {
//will be set in "default: YMD"
}
else if (yearpos<daypos && daypos<monthpos) {
- m_order = QDateEdit::YDM;
-//! @todo use QRegExp (to replace %Y by %1, etc.) instead of hardcoded "%1%299%399"
+ m_order = TQDateEdit::YDM;
+//! @todo use TQRegExp (to tqreplace %Y by %1, etc.) instead of hardcoded "%1%299%399"
//! because df may contain also other characters
- m_inputMask = QString("%1%299%399").arg(yearMask).arg(m_separator).arg(m_separator);
+ m_inputMask = TQString("%1%299%399").tqarg(yearMask).tqarg(m_separator).tqarg(m_separator);
m_qtFormat = yearDateFormat+m_separator+dayDateFormat+m_separator+monthDateFormat;
m_yearpos = 0;
m_daypos = yearMask.length()+separatorLen;
m_monthpos = m_daypos+2+separatorLen;
}
else if (daypos<monthpos && monthpos<yearpos) {
- m_order = QDateEdit::DMY;
- m_inputMask = QString("99%199%2%3").arg(m_separator).arg(m_separator).arg(yearMask);
+ m_order = TQDateEdit::DMY;
+ m_inputMask = TQString("99%199%2%3").tqarg(m_separator).tqarg(m_separator).tqarg(yearMask);
m_qtFormat = dayDateFormat+m_separator+monthDateFormat+m_separator+yearDateFormat;
m_daypos = 0;
m_monthpos = 2+separatorLen;
m_yearpos = m_monthpos+2+separatorLen;
}
else if (monthpos<daypos && daypos<yearpos) {
- m_order = QDateEdit::MDY;
- m_inputMask = QString("99%199%2%3").arg(m_separator).arg(m_separator).arg(yearMask);
+ m_order = TQDateEdit::MDY;
+ m_inputMask = TQString("99%199%2%3").tqarg(m_separator).tqarg(m_separator).tqarg(yearMask);
m_qtFormat = monthDateFormat+m_separator+dayDateFormat+m_separator+yearDateFormat;
m_monthpos = 0;
m_daypos = 2+separatorLen;
@@ -103,8 +103,8 @@ KexiDateFormatter::KexiDateFormatter()
else
ok = false;
}
- if (!ok || m_order == QDateEdit::YMD) {//default: YMD
- m_inputMask = QString("%1%299%399").arg(yearMask).arg(m_separator).arg(m_separator);
+ if (!ok || m_order == TQDateEdit::YMD) {//default: YMD
+ m_inputMask = TQString("%1%299%399").tqarg(yearMask).tqarg(m_separator).tqarg(m_separator);
m_qtFormat = yearDateFormat+m_separator+monthDateFormat+m_separator+dayDateFormat;
m_yearpos = 0;
m_monthpos = yearMask.length()+separatorLen;
@@ -117,12 +117,12 @@ KexiDateFormatter::~KexiDateFormatter()
{
}
-QDate KexiDateFormatter::stringToDate( const QString& str ) const
+TQDate KexiDateFormatter::stringToDate( const TQString& str ) const
{
bool ok = true;
int year = str.mid(m_yearpos, m_longYear ? 4 : 2).toInt(&ok);
if (!ok)
- return QDate();
+ return TQDate();
if (year < 30) {//2000..2029
year = 2000 + year;
}
@@ -132,35 +132,35 @@ QDate KexiDateFormatter::stringToDate( const QString& str ) const
int month = str.mid(m_monthpos, 2).toInt(&ok);
if (!ok)
- return QDate();
+ return TQDate();
int day = str.mid(m_daypos, 2).toInt(&ok);
if (!ok)
- return QDate();
+ return TQDate();
- QDate date(year, month, day);
+ TQDate date(year, month, day);
if (!date.isValid())
- return QDate();
+ return TQDate();
return date;
}
-QVariant KexiDateFormatter::stringToVariant( const QString& str ) const
+TQVariant KexiDateFormatter::stringToVariant( const TQString& str ) const
{
if (isEmpty(str))
- return QVariant();
- const QDate date( stringToDate( str ) );
+ return TQVariant();
+ const TQDate date( stringToDate( str ) );
if (date.isValid())
return date;
- return QVariant();
+ return TQVariant();
}
-bool KexiDateFormatter::isEmpty( const QString& str ) const
+bool KexiDateFormatter::isEmpty( const TQString& str ) const
{
- QString s(str);
- return s.replace(m_separator,"").stripWhiteSpace().isEmpty();
+ TQString s(str);
+ return s.tqreplace(m_separator,"").stripWhiteSpace().isEmpty();
}
-QString KexiDateFormatter::dateToString( const QDate& date ) const
+TQString KexiDateFormatter::dateToString( const TQDate& date ) const
{
return date.toString(m_qtFormat);
}
@@ -168,35 +168,35 @@ QString KexiDateFormatter::dateToString( const QDate& date ) const
//------------------------------------------------
KexiTimeFormatter::KexiTimeFormatter()
-: m_hmsRegExp( new QRegExp("(\\d*):(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
- , m_hmRegExp( new QRegExp("(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
+: m_hmsRegExp( new TQRegExp("(\\d*):(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
+ , m_hmRegExp( new TQRegExp("(\\d*):(\\d*).*( am| pm){,1}", false/*!CS*/) )
{
- QString tf( KGlobal::locale()->timeFormat() );
- //m_hourpos, m_minpos, m_secpos; are result of tf.find()
- QString hourVariable, minVariable, secVariable;
+ TQString tf( KGlobal::locale()->timeFormat() );
+ //m_hourpos, m_minpos, m_secpos; are result of tf.tqfind()
+ TQString hourVariable, minVariable, secVariable;
- //detect position of HOUR section: find %H or %k or %I or %l
+ //detect position of HOUR section: tqfind %H or %k or %I or %l
m_24h = true;
m_hoursWithLeadingZero = true;
- m_hourpos = tf.find("%H", 0, true);
+ m_hourpos = tf.tqfind("%H", 0, true);
if (m_hourpos>=0) {
m_24h = true;
m_hoursWithLeadingZero = true;
}
else {
- m_hourpos = tf.find("%k", 0, true);
+ m_hourpos = tf.tqfind("%k", 0, true);
if (m_hourpos>=0) {
m_24h = true;
m_hoursWithLeadingZero = false;
}
else {
- m_hourpos = tf.find("%I", 0, true);
+ m_hourpos = tf.tqfind("%I", 0, true);
if (m_hourpos>=0) {
m_24h = false;
m_hoursWithLeadingZero = true;
}
else {
- m_hourpos = tf.find("%l", 0, true);
+ m_hourpos = tf.tqfind("%l", 0, true);
if (m_hourpos>=0) {
m_24h = false;
m_hoursWithLeadingZero = false;
@@ -204,9 +204,9 @@ KexiTimeFormatter::KexiTimeFormatter()
}
}
}
- m_minpos = tf.find("%M", 0, true);
- m_secpos = tf.find("%S", 0, true); //can be -1
- m_ampmpos = tf.find("%p", 0, true); //can be -1
+ m_minpos = tf.tqfind("%M", 0, true);
+ m_secpos = tf.tqfind("%S", 0, true); //can be -1
+ m_ampmpos = tf.tqfind("%p", 0, true); //can be -1
if (m_hourpos<0 || m_minpos<0) {
//set default: hr and min are needed, sec are optional
@@ -221,13 +221,13 @@ KexiTimeFormatter::KexiTimeFormatter()
hourVariable = tf.mid(m_hourpos, 2);
m_inputMask = tf;
-// m_inputMask.replace( hourVariable, "00" );
-// m_inputMask.replace( "%M", "00" );
-// m_inputMask.replace( "%S", "00" ); //optional
- m_inputMask.replace( hourVariable, "99" );
- m_inputMask.replace( "%M", "99" );
- m_inputMask.replace( "%S", "00" ); //optional
- m_inputMask.replace( "%p", "AA" ); //am or pm
+// m_inputMask.tqreplace( hourVariable, "00" );
+// m_inputMask.tqreplace( "%M", "00" );
+// m_inputMask.tqreplace( "%S", "00" ); //optional
+ m_inputMask.tqreplace( hourVariable, "99" );
+ m_inputMask.tqreplace( "%M", "99" );
+ m_inputMask.tqreplace( "%S", "00" ); //optional
+ m_inputMask.tqreplace( "%p", "AA" ); //am or pm
m_inputMask += ";_";
m_outputFormat = tf;
@@ -239,7 +239,7 @@ KexiTimeFormatter::~KexiTimeFormatter()
delete m_hmRegExp;
}
-QTime KexiTimeFormatter::stringToTime( const QString& str ) const
+TQTime KexiTimeFormatter::stringToTime( const TQString& str ) const
{
int hour, min, sec;
bool pm = false;
@@ -257,7 +257,7 @@ QTime KexiTimeFormatter::stringToTime( const QString& str ) const
}
if (tryWithoutSeconds) {
if (-1 == m_hmRegExp->search(str))
- return QTime(99,0,0);
+ return TQTime(99,0,0);
hour = m_hmRegExp->cap(1).toInt();
min = m_hmRegExp->cap(2).toInt();
sec = 0;
@@ -267,98 +267,98 @@ QTime KexiTimeFormatter::stringToTime( const QString& str ) const
if (pm && hour < 12)
hour += 12; //PM
- return QTime(hour, min, sec);
+ return TQTime(hour, min, sec);
}
-QVariant KexiTimeFormatter::stringToVariant( const QString& str )
+TQVariant KexiTimeFormatter::stringToVariant( const TQString& str )
{
if (isEmpty( str ))
- return QVariant();
- const QTime time( stringToTime( str ) );
+ return TQVariant();
+ const TQTime time( stringToTime( str ) );
if (time.isValid())
return time;
- return QVariant();
+ return TQVariant();
}
-bool KexiTimeFormatter::isEmpty( const QString& str ) const
+bool KexiTimeFormatter::isEmpty( const TQString& str ) const
{
- QString s(str);
- return s.replace(':',"").stripWhiteSpace().isEmpty();
+ TQString s(str);
+ return s.tqreplace(':',"").stripWhiteSpace().isEmpty();
}
-QString KexiTimeFormatter::timeToString( const QTime& time ) const
+TQString KexiTimeFormatter::timeToString( const TQTime& time ) const
{
if (!time.isValid())
- return QString::null;
+ return TQString();
- QString s(m_outputFormat);
+ TQString s(m_outputFormat);
if (m_24h) {
if (m_hoursWithLeadingZero)
- s.replace( "%H", QString::fromLatin1(time.hour()<10 ? "0" : "") + QString::number(time.hour()) );
+ s.tqreplace( "%H", TQString::tqfromLatin1(time.hour()<10 ? "0" : "") + TQString::number(time.hour()) );
else
- s.replace( "%k", QString::number(time.hour()) );
+ s.tqreplace( "%k", TQString::number(time.hour()) );
}
else {
int time12 = (time.hour()>12) ? (time.hour()-12) : time.hour();
if (m_hoursWithLeadingZero)
- s.replace( "%I", QString::fromLatin1(time12<10 ? "0" : "") + QString::number(time12) );
+ s.tqreplace( "%I", TQString::tqfromLatin1(time12<10 ? "0" : "") + TQString::number(time12) );
else
- s.replace( "%l", QString::number(time12) );
+ s.tqreplace( "%l", TQString::number(time12) );
}
- s.replace( "%M", QString::fromLatin1(time.minute()<10 ? "0" : "") + QString::number(time.minute()) );
+ s.tqreplace( "%M", TQString::tqfromLatin1(time.minute()<10 ? "0" : "") + TQString::number(time.minute()) );
if (m_secpos>=0)
- s.replace( "%S", QString::fromLatin1(time.second()<10 ? "0" : "") + QString::number(time.second()) );
+ s.tqreplace( "%S", TQString::tqfromLatin1(time.second()<10 ? "0" : "") + TQString::number(time.second()) );
if (m_ampmpos>=0)
- s.replace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") );
+ s.tqreplace( "%p", KGlobal::locale()->translate( time.hour()>=12 ? "pm" : "am") );
return s;
}
//------------------------------------------------
-QString dateTimeInputMask(const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter)
+TQString dateTimeInputMask(const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter)
{
- QString mask(dateFormatter.inputMask());
- mask.truncate(dateFormatter.inputMask().length()-2);
- return mask + " " + timeFormatter.inputMask();
+ TQString tqmask(dateFormatter.inputMask());
+ tqmask.truncate(dateFormatter.inputMask().length()-2);
+ return tqmask + " " + timeFormatter.inputMask();
}
-QDateTime stringToDateTime(
- const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const QString& str)
+TQDateTime stringToDateTime(
+ const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str)
{
- QString s( str.stripWhiteSpace() );
- const int timepos = s.find(" ");
- const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(s.mid(timepos+1)); //.replace(':',"").stripWhiteSpace().isEmpty();
+ TQString s( str.stripWhiteSpace() );
+ const int timepos = s.tqfind(" ");
+ const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(s.mid(timepos+1)); //.tqreplace(':',"").stripWhiteSpace().isEmpty();
if (emptyTime)
s = s.left(timepos);
if (timepos>0 && !emptyTime) {
- return QDateTime(
+ return TQDateTime(
dateFormatter.stringToDate( s.left(timepos) ),
timeFormatter.stringToTime( s.mid(timepos+1) )
);
}
else {
- return QDateTime(
+ return TQDateTime(
dateFormatter.stringToDate( s ),
- QTime(0,0,0)
+ TQTime(0,0,0)
);
}
}
bool dateTimeIsEmpty( const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter,
- const QString& str )
+ const TQString& str )
{
- int timepos = str.find(" ");
- const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).replace(':',"").stripWhiteSpace().isEmpty();
- return (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) //s.left(timepos).replace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty()
+ int timepos = str.tqfind(" ");
+ const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).tqreplace(':',"").stripWhiteSpace().isEmpty();
+ return (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) //s.left(timepos).tqreplace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty()
&& emptyTime);
}
bool dateTimeIsValid( const KexiDateFormatter& dateFormatter,
- const KexiTimeFormatter& timeFormatter, const QString& str )
+ const KexiTimeFormatter& timeFormatter, const TQString& str )
{
- int timepos = str.find(" ");
- const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).replace(':',"").stripWhiteSpace().isEmpty();
- if (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) // s.left(timepos).replace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty()
+ int timepos = str.tqfind(" ");
+ const bool emptyTime = timepos >= 0 && timeFormatter.isEmpty(str.mid(timepos+1)); //s.mid(timepos+1).tqreplace(':',"").stripWhiteSpace().isEmpty();
+ if (timepos >= 0 && dateFormatter.isEmpty(str.left(timepos)) // s.left(timepos).tqreplace(m_dateFormatter.separator(), "").stripWhiteSpace().isEmpty()
&& emptyTime)
//empty date/time is valid
return true;
diff --git a/kexi/widget/utils/kexidatetimeformatter.h b/kexi/widget/utils/kexidatetimeformatter.h
index 252bc535e..1340320b3 100644
--- a/kexi/widget/utils/kexidatetimeformatter.h
+++ b/kexi/widget/utils/kexidatetimeformatter.h
@@ -20,8 +20,8 @@
#ifndef KEXIDATETIMEFORMATTER_H
#define KEXIDATETIMEFORMATTER_H
-#include <qdatetimeedit.h>
-#include <qregexp.h>
+#include <tqdatetimeedit.h>
+#include <tqregexp.h>
//! @short Date formatter used by KexiDateTableEdit and KexiDateTimeTableEdit
class KEXIGUIUTILS_EXPORT KexiDateFormatter
@@ -37,36 +37,36 @@ class KEXIGUIUTILS_EXPORT KexiDateFormatter
//! Converts string \a str to date using predefined settings.
//! \return invalid date if the conversion is impossible
- QDate stringToDate( const QString& str ) const;
+ TQDate stringToDate( const TQString& str ) const;
/*! Converts string \a str to date using predefined settings
- and returns QVariant containing the date value.
+ and returns TQVariant containing the date value.
This method does the same as stringToDate() but if \a string
contains invalid date representation, e.g. contains only spaces
- and separators, null QVariant() is returned. */
- QVariant stringToVariant( const QString& str ) const;
+ and separators, null TQVariant() is returned. */
+ TQVariant stringToVariant( const TQString& str ) const;
//! Converts \a date to string using predefined settings.
//! \return null string if \a date is invalid
- QString dateToString( const QDate& date ) const;
+ TQString dateToString( const TQDate& date ) const;
- //! \return Input mask generated using the formatter settings.
- //! Can be used in QLineEdit::setInputMask().
- QString inputMask() const { return m_inputMask; }
+ //! \return Input tqmask generated using the formatter settings.
+ //! Can be used in TQLineEdit::setInputMask().
+ TQString inputMask() const { return m_inputMask; }
//! \return separator for this date format, a single character like "-" or "/"
- QString separator() const { return m_separator; }
+ TQString separator() const { return m_separator; }
//! \return true if \a str contains only spaces
//! and separators according to the date format.
- bool isEmpty( const QString& str ) const;
+ bool isEmpty( const TQString& str ) const;
protected:
- //! Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask().
- QString m_inputMask;
+ //! Input tqmask generated using the formatter settings. Can be used in TQLineEdit::setInputMask().
+ TQString m_inputMask;
//! Order of date sections
- QDateEdit::Order m_order;
+ TQDateEdit::Order m_order;
//! 4 or 2 digits
bool m_longYear;
@@ -74,12 +74,12 @@ class KEXIGUIUTILS_EXPORT KexiDateFormatter
bool m_monthWithLeadingZero, m_dayWithLeadingZero;
//! Date format used in dateToString()
- QString m_qtFormat;
+ TQString m_qtFormat;
- //! Used in stringToDate() to convert string back to QDate
+ //! Used in stringToDate() to convert string back to TQDate
int m_yearpos, m_monthpos, m_daypos;
- QString m_separator;
+ TQString m_separator;
};
/*! @short Time formatter used by KexiTimeTableEdit and KexiDateTimeTableEdit
@@ -98,33 +98,33 @@ class KEXIGUIUTILS_EXPORT KexiTimeFormatter
//! converts string \a str to time using predefined settings
//! \return invalid time if the conversion is impossible
- QTime stringToTime( const QString& str ) const;
+ TQTime stringToTime( const TQString& str ) const;
/*! Converts string \a str to time using predefined settings
- and returns QVariant containing the time value.
+ and returns TQVariant containing the time value.
This method does the same as stringToTime() but if \a string
contains invalid time representation, e.g. contains only spaces
- and separators, null QVariant() is returned. */
- QVariant stringToVariant( const QString& str );
+ and separators, null TQVariant() is returned. */
+ TQVariant stringToVariant( const TQString& str );
//! converts \a time to string using predefined settings
//! \return null string if \a time is invalid
- QString timeToString( const QTime& time ) const;
+ TQString timeToString( const TQTime& time ) const;
- //! \return Input mask generated using the formatter settings.
- //! Can be used in QLineEdit::setInputMask().
- QString inputMask() const { return m_inputMask; }
+ //! \return Input tqmask generated using the formatter settings.
+ //! Can be used in TQLineEdit::setInputMask().
+ TQString inputMask() const { return m_inputMask; }
//! \return true if \a str contains only spaces
//! and separators according to the time format.
- bool isEmpty( const QString& str ) const;
+ bool isEmpty( const TQString& str ) const;
protected:
- //! Input mask generated using the formatter settings. Can be used in QLineEdit::setInputMask().
- QString m_inputMask;
+ //! Input tqmask generated using the formatter settings. Can be used in TQLineEdit::setInputMask().
+ TQString m_inputMask;
// //! Order of date sections
-// QDateEdit::Order m_order;
+// TQDateEdit::Order m_order;
//! 12 or 12h
bool m_24h;
@@ -132,34 +132,34 @@ class KEXIGUIUTILS_EXPORT KexiTimeFormatter
bool m_hoursWithLeadingZero;
//! Time format used in timeToString(). Notation from KLocale::setTimeFormat() is used.
- QString m_outputFormat;
+ TQString m_outputFormat;
- //! Used in stringToTime() to convert string back to QTime
+ //! Used in stringToTime() to convert string back to TQTime
int m_hourpos, m_minpos, m_secpos, m_ampmpos;
- QRegExp *m_hmsRegExp, *m_hmRegExp;
+ TQRegExp *m_hmsRegExp, *m_hmRegExp;
};
-//! \return a date/time input mask using date and time formatter.
+//! \return a date/time input tqmask using date and time formatter.
//! Date is separated from time by one space character.
-KEXIGUIUTILS_EXPORT QString dateTimeInputMask(
+KEXIGUIUTILS_EXPORT TQString dateTimeInputMask(
const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter);
-/*! \return a QDateTime value converted from string using \a dateFormatter and \a timeFormatter.
+/*! \return a TQDateTime value converted from string using \a dateFormatter and \a timeFormatter.
A single space between date and time is assumed.
Invalid value is returned when \a str contains no valid date or \a str contains invalid time.
Value with time equal 00:00:00 is returned if \a str contains empty time part. */
-KEXIGUIUTILS_EXPORT QDateTime stringToDateTime(
- const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const QString& str);
+KEXIGUIUTILS_EXPORT TQDateTime stringToDateTime(
+ const KexiDateFormatter& dateFormatter, const KexiTimeFormatter& timeFormatter, const TQString& str);
/*! \return true if \a str contains only spaces and separators according to formats provided by
\a dateFormatter and \a timeFormatter. */
KEXIGUIUTILS_EXPORT bool dateTimeIsEmpty( const KexiDateFormatter& dateFormatter,
- const KexiTimeFormatter& timeFormatter, const QString& str );
+ const KexiTimeFormatter& timeFormatter, const TQString& str );
/*! \return true if \a str gives valid date/time value according to formats provided by
\a dateFormatter and \a timeFormatter. */
KEXIGUIUTILS_EXPORT bool dateTimeIsValid( const KexiDateFormatter& dateFormatter,
- const KexiTimeFormatter& timeFormatter, const QString& str );
+ const KexiTimeFormatter& timeFormatter, const TQString& str );
#endif
diff --git a/kexi/widget/utils/kexidisplayutils.cpp b/kexi/widget/utils/kexidisplayutils.cpp
index c7d238b1d..1943b0869 100644
--- a/kexi/widget/utils/kexidisplayutils.cpp
+++ b/kexi/widget/utils/kexidisplayutils.cpp
@@ -19,19 +19,19 @@
#include "kexidisplayutils.h"
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqwidget.h>
#include <klocale.h>
#include <kstaticdeleter.h>
// a color for displaying default values or autonumbers
-#define SPECIAL_TEXT_COLOR Qt::blue
+#define SPECIAL_TEXT_COLOR TQt::blue
-static KStaticDeleter<QPixmap> KexiDisplayUtils_autonum_deleter;
-QPixmap* KexiDisplayUtils_autonum = 0;
+static KStaticDeleter<TQPixmap> KexiDisplayUtils_autonum_deleter;
+TQPixmap* KexiDisplayUtils_autonum = 0;
static const unsigned int autonumber_png_len = 245;
static const unsigned char autonumber_png_data[] = {
@@ -56,8 +56,8 @@ static const unsigned char autonumber_png_data[] = {
};
/* Generated by qembed */
-#include <qcstring.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqdict.h>
static struct Embed {
unsigned int size;
const unsigned char *data;
@@ -67,11 +67,11 @@ static struct Embed {
{ 0, 0, 0 }
};
-QPixmap* getPix(int id)
+TQPixmap* getPix(int id)
{
-// QByteArray ba;
+// TQByteArray ba;
// ba.setRawData( (char*)embed_vec[id].data, embed_vec[id].size );
- QPixmap *pix = new QPixmap();
+ TQPixmap *pix = new TQPixmap();
pix->loadFromData( embed_vec[id].data, embed_vec[id].size );
return pix;
}
@@ -90,14 +90,14 @@ KexiDisplayUtils::DisplayParameters::DisplayParameters()
{
}
-KexiDisplayUtils::DisplayParameters::DisplayParameters(QWidget *w)
+KexiDisplayUtils::DisplayParameters::DisplayParameters(TQWidget *w)
{
- textColor = w->palette().active().foreground();
- selectedTextColor = w->palette().active().highlightedText();
+ textColor = w->tqpalette().active().foreground();
+ selectedTextColor = w->tqpalette().active().highlightedText();
font = w->font();
}
-void KexiDisplayUtils::initDisplayForAutonumberSign(DisplayParameters& par, QWidget *widget)
+void KexiDisplayUtils::initDisplayForAutonumberSign(DisplayParameters& par, TQWidget *widget)
{
initDisplayUtilsImages();
@@ -105,20 +105,20 @@ void KexiDisplayUtils::initDisplayForAutonumberSign(DisplayParameters& par, QWid
par.selectedTextColor = SPECIAL_TEXT_COLOR; //hmm, unused anyway
par.font = widget->font();
par.font.setItalic(true);
- QFontMetrics fm(par.font);
+ TQFontMetrics fm(par.font);
par.textWidth = fm.width(i18n("(autonumber)"));
par.textHeight = fm.height();
}
-void KexiDisplayUtils::initDisplayForDefaultValue(DisplayParameters& par, QWidget *widget)
+void KexiDisplayUtils::initDisplayForDefaultValue(DisplayParameters& par, TQWidget *widget)
{
par.textColor = SPECIAL_TEXT_COLOR;
- par.selectedTextColor = widget->palette().active().highlightedText();
+ par.selectedTextColor = widget->tqpalette().active().highlightedText();
par.font = widget->font();
par.font.setItalic(true);
}
-void KexiDisplayUtils::paintAutonumberSign(const DisplayParameters& par, QPainter* painter,
+void KexiDisplayUtils::paintAutonumberSign(const DisplayParameters& par, TQPainter* painter,
int x, int y, int width, int height, int align, bool overrideColor)
{
painter->save();
@@ -128,37 +128,37 @@ void KexiDisplayUtils::paintAutonumberSign(const DisplayParameters& par, QPainte
painter->setPen(par.textColor);
// int text_x = x;
- if (!(align & Qt::AlignVertical_Mask))
- align |= Qt::AlignVCenter;
- if (!(align & Qt::AlignHorizontal_Mask))
- align |= Qt::AlignLeft;
+ if (!(align & TQt::AlignVertical_Mask))
+ align |= TQt::AlignVCenter;
+ if (!(align & TQt::AlignHorizontal_Mask))
+ align |= TQt::AlignLeft;
int y_pixmap_pos = 0;
- if (align & Qt::AlignVCenter) {
- y_pixmap_pos = QMAX(0, y+1 + (height - KexiDisplayUtils_autonum->height())/2);
+ if (align & TQt::AlignVCenter) {
+ y_pixmap_pos = TQMAX(0, y+1 + (height - KexiDisplayUtils_autonum->height())/2);
}
- else if (align & Qt::AlignTop) {
- y_pixmap_pos = y + QMAX(0, (par.textHeight - KexiDisplayUtils_autonum->height())/2);
+ else if (align & TQt::AlignTop) {
+ y_pixmap_pos = y + TQMAX(0, (par.textHeight - KexiDisplayUtils_autonum->height())/2);
}
- else if (align & Qt::AlignBottom) {
+ else if (align & TQt::AlignBottom) {
y_pixmap_pos = y+1 + height - KexiDisplayUtils_autonum->height()
- - QMAX(0, (par.textHeight - KexiDisplayUtils_autonum->height())/2);
+ - TQMAX(0, (par.textHeight - KexiDisplayUtils_autonum->height())/2);
}
- if (align & (Qt::AlignLeft | Qt::AlignJustify)) {
+ if (align & (TQt::AlignLeft | TQt::AlignJustify)) {
// text_x = x + KexiDisplayUtils_autonum->width() + 2;
if (!overrideColor) {
painter->drawPixmap( x, y_pixmap_pos, *KexiDisplayUtils_autonum );
x += (KexiDisplayUtils_autonum->width() + 4);
}
}
- else if (align & Qt::AlignRight) {
+ else if (align & TQt::AlignRight) {
if (!overrideColor) {
painter->drawPixmap( x + width - par.textWidth - KexiDisplayUtils_autonum->width() - 4,
y_pixmap_pos, *KexiDisplayUtils_autonum );
}
}
- else if (align & Qt::AlignCenter) {
+ else if (align & TQt::AlignCenter) {
//! @todo
if (!overrideColor)
painter->drawPixmap( x + (width - par.textWidth)/2 - KexiDisplayUtils_autonum->width() - 4,
diff --git a/kexi/widget/utils/kexidisplayutils.h b/kexi/widget/utils/kexidisplayutils.h
index 8790b662b..9d4974cd0 100644
--- a/kexi/widget/utils/kexidisplayutils.h
+++ b/kexi/widget/utils/kexidisplayutils.h
@@ -20,9 +20,9 @@
#ifndef KEXIDISPUTILS_H
#define KEXIDISPUTILS_H
-#include <qfont.h>
-#include <qcolor.h>
-class QWidget;
+#include <tqfont.h>
+#include <tqcolor.h>
+class TQWidget;
//! \brief A set of utilities related to displaying common elements in Kexi, like e.g. (autonumber) sign
class KEXIGUIUTILS_EXPORT KexiDisplayUtils
@@ -36,22 +36,22 @@ class KEXIGUIUTILS_EXPORT KexiDisplayUtils
DisplayParameters();
//! Copies properties from \a w.
- DisplayParameters(QWidget *w);
+ DisplayParameters(TQWidget *w);
- QColor textColor, selectedTextColor;
- QFont font;
+ TQColor textColor, selectedTextColor;
+ TQFont font;
int textWidth, textHeight; //!< used for "(autonumber)" text only
};
//! Initializes display parameters for autonumber sign
- static void initDisplayForAutonumberSign(DisplayParameters& par, QWidget *widget);
+ static void initDisplayForAutonumberSign(DisplayParameters& par, TQWidget *widget);
//! Paints autonumber sign using \a par parameters
- static void paintAutonumberSign(const DisplayParameters& par, QPainter* painter,
+ static void paintAutonumberSign(const DisplayParameters& par, TQPainter* painter,
int x, int y, int width, int height, int align, bool overrideColor = false);
//! Initializes display parameters for default value
- static void initDisplayForDefaultValue(DisplayParameters& par, QWidget *widget);
+ static void initDisplayForDefaultValue(DisplayParameters& par, TQWidget *widget);
};
#endif
diff --git a/kexi/widget/utils/kexidropdownbutton.cpp b/kexi/widget/utils/kexidropdownbutton.cpp
index a17e5cfb1..b2ed022e3 100644
--- a/kexi/widget/utils/kexidropdownbutton.cpp
+++ b/kexi/widget/utils/kexidropdownbutton.cpp
@@ -22,22 +22,22 @@
#include <kpopupmenu.h>
#include <kdebug.h>
-#include <qstyle.h>
-#include <qapplication.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
-KexiDropDownButton::KexiDropDownButton(QWidget *parent)
- : QToolButton(parent, "KexiDBImageBox::Button")
+KexiDropDownButton::KexiDropDownButton(TQWidget *tqparent)
+ : TQToolButton(tqparent, "KexiDBImageBox::Button")
{
- setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
+ tqsetSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding);
//! @todo get this from a KStyle
-// setFixedWidth(QMAX(18, qApp->globalStrut().width()));
+// setFixedWidth(TQMAX(18, tqApp->globalStrut().width()));
int fixedWidth;
//hack
- if (qstricmp(style().name(),"thinkeramik")==0)
+ if (qstricmp(tqstyle().name(),"thinkeramik")==0)
fixedWidth = 18; //typical width as in "windows" style
else
- fixedWidth = style().querySubControlMetrics( QStyle::CC_ComboBox,
- this, QStyle::SC_ComboBoxArrow ).width();
+ fixedWidth = tqstyle().querySubControlMetrics( TQStyle::CC_ComboBox,
+ this, TQStyle::SC_ComboBoxArrow ).width();
setFixedWidth( fixedWidth );
setPopupDelay(10/*ms*/);
}
@@ -46,37 +46,37 @@ KexiDropDownButton::~KexiDropDownButton()
{
}
-void KexiDropDownButton::drawButton( QPainter *p )
+void KexiDropDownButton::drawButton( TQPainter *p )
{
- QToolButton::drawButton(p);
- QStyle::SFlags arrowFlags = QStyle::Style_Default;
+ TQToolButton::drawButton(p);
+ TQStyle::SFlags arrowFlags = TQStyle::Style_Default;
if (isDown() || state()==On)
- arrowFlags |= QStyle::Style_Down;
+ arrowFlags |= TQStyle::Style_Down;
if (isEnabled())
- arrowFlags |= QStyle::Style_Enabled;
- style().drawPrimitive(QStyle::PE_ArrowDown, p,
- QRect((width()-7)/2, height()-9, 7, 7), colorGroup(),
- arrowFlags, QStyleOption() );
+ arrowFlags |= TQStyle::Style_Enabled;
+ tqstyle().tqdrawPrimitive(TQStyle::PE_ArrowDown, p,
+ TQRect((width()-7)/2, height()-9, 7, 7), tqcolorGroup(),
+ arrowFlags, TQStyleOption() );
}
-QSize KexiDropDownButton::sizeHint () const
+TQSize KexiDropDownButton::tqsizeHint () const
{
- return QSize( fontMetrics().maxWidth() + 2*2, fontMetrics().height()*2 + 2*2 );
+ return TQSize( fontMetrics().maxWidth() + 2*2, fontMetrics().height()*2 + 2*2 );
}
-void KexiDropDownButton::keyPressEvent( QKeyEvent * e )
+void KexiDropDownButton::keyPressEvent( TQKeyEvent * e )
{
const int k = e->key();
- const bool dropDown = (e->state() == Qt::NoButton && (k==Qt::Key_Space || k==Qt::Key_Enter || k==Qt::Key_Return || k==Qt::Key_F2 || k==Qt::Key_F4))
- || (e->state() == Qt::AltButton && k==Qt::Key_Down);
+ const bool dropDown = (e->state() == Qt::NoButton && (k==TQt::Key_Space || k==TQt::Key_Enter || k==TQt::Key_Return || k==TQt::Key_F2 || k==TQt::Key_F4))
+ || (e->state() == TQt::AltButton && k==TQt::Key_Down);
if (dropDown) {
e->accept();
animateClick();
- QMouseEvent me( QEvent::MouseButtonPress, QPoint(2,2), Qt::LeftButton, Qt::NoButton );
- QApplication::sendEvent( this, &me );
+ TQMouseEvent me( TQEvent::MouseButtonPress, TQPoint(2,2), Qt::LeftButton, Qt::NoButton );
+ TQApplication::sendEvent( this, &me );
return;
}
- QToolButton::keyPressEvent(e);
+ TQToolButton::keyPressEvent(e);
}
#include "kexidropdownbutton.moc"
diff --git a/kexi/widget/utils/kexidropdownbutton.h b/kexi/widget/utils/kexidropdownbutton.h
index fccbd409a..a2d280a73 100644
--- a/kexi/widget/utils/kexidropdownbutton.h
+++ b/kexi/widget/utils/kexidropdownbutton.h
@@ -20,26 +20,27 @@
#ifndef KexiDropDownButton_H
#define KexiDropDownButton_H
-#include <qtoolbutton.h>
-#include <qguardedptr.h>
+#include <tqtoolbutton.h>
+#include <tqguardedptr.h>
//! @short A button for drop-down "Image" menu
/*! Used in KexiDBImageBox and KexiBlobTableEdit.
Additionally, the button reacts on pressing space, return, enter,
F2, F4 and alt+down buttons. */
-class KEXIGUIUTILS_EXPORT KexiDropDownButton : public QToolButton
+class KEXIGUIUTILS_EXPORT KexiDropDownButton : public TQToolButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiDropDownButton(QWidget *parent);
+ KexiDropDownButton(TQWidget *tqparent);
virtual ~KexiDropDownButton();
- virtual void drawButton( QPainter *p );
+ virtual void drawButton( TQPainter *p );
- virtual QSize sizeHint () const;
+ virtual TQSize tqsizeHint () const;
- virtual void keyPressEvent ( QKeyEvent * e );
+ virtual void keyPressEvent ( TQKeyEvent * e );
};
#endif
diff --git a/kexi/widget/utils/kexiflowlayout.cpp b/kexi/widget/utils/kexiflowlayout.cpp
index b8a8601e1..d7150c6bf 100644
--- a/kexi/widget/utils/kexiflowlayout.cpp
+++ b/kexi/widget/utils/kexiflowlayout.cpp
@@ -23,20 +23,20 @@
/// Iterator class
-class KexiFlowLayoutIterator : public QGLayoutIterator
+class KexiFlowLayoutIterator : public TQGLayoutIterator
{
public:
- KexiFlowLayoutIterator( QPtrList<QLayoutItem> *list )
+ KexiFlowLayoutIterator( TQPtrList<TQLayoutItem> *list )
: m_idx(0), m_list( list )
{}
uint count() const;
- QLayoutItem *current();
- QLayoutItem *next();
- QLayoutItem *takeCurrent();
+ TQLayoutItem *current();
+ TQLayoutItem *next();
+ TQLayoutItem *takeCurrent();
private:
int m_idx;
- QPtrList<QLayoutItem> *m_list;
+ TQPtrList<TQLayoutItem> *m_list;
};
uint
@@ -45,47 +45,47 @@ KexiFlowLayoutIterator::count() const
return m_list->count();
}
-QLayoutItem *
+TQLayoutItem *
KexiFlowLayoutIterator::current()
{
return (m_idx < (int)count()) ? m_list->at(m_idx) : 0;
}
-QLayoutItem *
+TQLayoutItem *
KexiFlowLayoutIterator::next()
{
m_idx++;
return current();
}
-QLayoutItem *
+TQLayoutItem *
KexiFlowLayoutIterator::takeCurrent()
{
return (m_idx < (int)count()) ? m_list->take(m_idx) : 0;
}
-//// The layout itself
+//// The tqlayout itself
-KexiFlowLayout::KexiFlowLayout(QWidget *parent, int border, int space, const char *name)
- : QLayout(parent, border, space, name)
+KexiFlowLayout::KexiFlowLayout(TQWidget *tqparent, int border, int space, const char *name)
+ : TQLayout(tqparent, border, space, name)
{
- m_orientation = Horizontal;
+ m_orientation =Qt::Horizontal;
m_justify = false;
m_cached_width = 0;
}
-KexiFlowLayout::KexiFlowLayout(QLayout* parent, int space, const char *name)
- : QLayout( parent, space, name )
+KexiFlowLayout::KexiFlowLayout(TQLayout* tqparent, int space, const char *name)
+ : TQLayout( tqparent, space, name )
{
- m_orientation = Horizontal;
+ m_orientation =Qt::Horizontal;
m_justify = false;
m_cached_width = 0;
}
KexiFlowLayout::KexiFlowLayout(int space, const char *name)
- : QLayout(space, name)
+ : TQLayout(space, name)
{
- m_orientation = Horizontal;
+ m_orientation =Qt::Horizontal;
m_justify = false;
m_cached_width = 0;
}
@@ -98,29 +98,35 @@ KexiFlowLayout::~KexiFlowLayout()
void
KexiFlowLayout::addItem(QLayoutItem *item)
{
- m_list.append(item);
+ m_list.append(TQT_TQLAYOUTITEM(item));
}
void
KexiFlowLayout::addSpacing(int size)
{
- if (m_orientation == Horizontal)
- addItem( new QSpacerItem( size, 0, QSizePolicy::Fixed, QSizePolicy::Minimum ) );
+ if (m_orientation ==Qt::Horizontal)
+ addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( size, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum )) );
else
- addItem( new QSpacerItem( 0, size, QSizePolicy::Minimum, QSizePolicy::Fixed ) );
+ addItem( TQT_TQLAYOUTITEM(new TQSpacerItem( 0, size, TQSizePolicy::Minimum, TQSizePolicy::Fixed )) );
}
-QLayoutIterator
+TQLayoutIterator
KexiFlowLayout::iterator()
{
- return QLayoutIterator( new KexiFlowLayoutIterator(&m_list) );
+ // [FIXME]
+#ifdef USE_QT4
+ #warning [FIXME] ContainerAreaLayout iterators may not function correctly under Qt4
+ return TQLayoutIterator( this ); // [FIXME]
+#else // USE_QT4
+ return TQLayoutIterator( new KexiFlowLayoutIterator(&m_list) );
+#endif // USE_QT4
}
-QPtrList<QWidget>*
+TQPtrList<TQWidget>*
KexiFlowLayout::widgetList() const
{
- QPtrList<QWidget> *list = new QPtrList<QWidget>();
- for (QPtrListIterator<QLayoutItem> it(m_list); it.current(); ++it) {
+ TQPtrList<TQWidget> *list = new TQPtrList<TQWidget>();
+ for (TQPtrListIterator<TQLayoutItem> it(m_list); it.current(); ++it) {
if(it.current()->widget())
list->append(it.current()->widget());
}
@@ -128,11 +134,11 @@ KexiFlowLayout::widgetList() const
}
void
-KexiFlowLayout::invalidate()
+KexiFlowLayout::tqinvalidate()
{
- QLayout::invalidate();
- m_cached_sizeHint = QSize();
- m_cached_minSize = QSize();
+ TQLayout::tqinvalidate();
+ m_cached_tqsizeHint = TQSize();
+ m_cached_minSize = TQSize();
m_cached_width = 0;
}
@@ -145,7 +151,7 @@ KexiFlowLayout::isEmpty()
bool
KexiFlowLayout::hasHeightForWidth() const
{
- return (m_orientation == Horizontal);
+ return (m_orientation ==Qt::Horizontal);
}
int
@@ -154,7 +160,7 @@ KexiFlowLayout::heightForWidth(int w) const
if(m_cached_width != w) {
// workaround to allow this method to stay 'const'
KexiFlowLayout *mthis = (KexiFlowLayout*)this;
- int h = mthis->simulateLayout( QRect(0,0,w,0) );
+ int h = mthis->simulateLayout( TQRect(0,0,w,0) );
mthis->m_cached_hfw = h;
mthis->m_cached_width = w;
return h;
@@ -162,73 +168,73 @@ KexiFlowLayout::heightForWidth(int w) const
return m_cached_hfw;
}
-QSize
-KexiFlowLayout::sizeHint() const
+TQSize
+KexiFlowLayout::tqsizeHint() const
{
- if(m_cached_sizeHint.isEmpty()) {
+ if(m_cached_tqsizeHint.isEmpty()) {
KexiFlowLayout *mthis = (KexiFlowLayout*)this;
- QRect r = QRect(0, 0, 2000, 2000);
+ TQRect r = TQRect(0, 0, 2000, 2000);
mthis->simulateLayout(r);
}
- return m_cached_sizeHint;
+ return m_cached_tqsizeHint;
}
-QSize
-KexiFlowLayout::minimumSize() const
+TQSize
+KexiFlowLayout::tqminimumSize() const
{
-//js: do we really need to simulate layout here?
-// I commented this out because it was impossible to stretch layout conveniently.
-// Now, minimum size is computed automatically based on item's minimumSize...
+//js: do we really need to simulate tqlayout here?
+// I commented this out because it was impossible to stretch tqlayout conveniently.
+// Now, minimum size is computed automatically based on item's tqminimumSize...
#if 0
if(m_cached_minSize.isEmpty()) {
KexiFlowLayout *mthis = (KexiFlowLayout*)this;
- QRect r = QRect(0, 0, 2000, 2000);
+ TQRect r = TQRect(0, 0, 2000, 2000);
mthis->simulateLayout(r);
}
#endif
return m_cached_minSize;
}
-QSizePolicy::ExpandData
+TQSizePolicy::ExpandData
KexiFlowLayout::expanding() const
{
- if(m_orientation == Vertical)
- return QSizePolicy::Vertically;
+ if(m_orientation == Qt::Vertical)
+ return TQ_SPVertically;
else
- return QSizePolicy::Horizontally;
+ return TQ_SPHorizontally;
}
void
-KexiFlowLayout::setGeometry(const QRect &r)
+KexiFlowLayout::setGeometry(const TQRect &r)
{
- QLayout::setGeometry(r);
- if(m_orientation == Horizontal)
+ TQLayout::setGeometry(r);
+ if(m_orientation ==Qt::Horizontal)
doHorizontalLayout(r);
else
doVerticalLayout(r);
}
int
-KexiFlowLayout::simulateLayout(const QRect &r)
+KexiFlowLayout::simulateLayout(const TQRect &r)
{
- if(m_orientation == Horizontal)
+ if(m_orientation ==Qt::Horizontal)
return doHorizontalLayout(r, true);
else
return doVerticalLayout(r, true);
}
int
-KexiFlowLayout::doHorizontalLayout(const QRect &r, bool testOnly)
+KexiFlowLayout::doHorizontalLayout(const TQRect &r, bool testOnly)
{
int x = r.x();
int y = r.y();
int h = 0; // height of this line
int availableSpace = r.width() + spacing();
- int expandingWidgets=0; // number of widgets in the line with QSizePolicy == Expanding
- QPtrListIterator<QLayoutItem> it(m_list);
- QPtrList<QLayoutItem> currentLine;
- QLayoutItem *o;
- QSize minSize, sizeHint(20, 20);
+ int expandingWidgets=0; // number of widgets in the line with TQSizePolicy == Expanding
+ TQPtrListIterator<TQLayoutItem> it(m_list);
+ TQPtrList<TQLayoutItem> currentLine;
+ TQLayoutItem *o;
+ TQSize minSize, tqsizeHint(20, 20);
int minSizeHeight = 0 - spacing();
while ( (o = it.current()) != 0 ) {
@@ -238,41 +244,41 @@ KexiFlowLayout::doHorizontalLayout(const QRect &r, bool testOnly)
}
// kdDebug() << "- doHorizontalLayout(): " << o->widget()->className() << " " << o->widget()->name() << endl;
- QSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts)
+ TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child tqlayouts)
if ((x + oSizeHint.width()) > r.right() && h > 0) {
- // do the layout of current line
- QPtrListIterator<QLayoutItem> it2(currentLine);
- QLayoutItem *item;
+ // do the tqlayout of current line
+ TQPtrListIterator<TQLayoutItem> it2(currentLine);
+ TQLayoutItem *item;
int wx = r.x();
- int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0;
+ int tqsizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0;
while( (item = it2.current()) != 0 ) {
- QSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take
- QSize itemMinSize = item->minimumSize(); // a while to get them
- QSize s;
+ TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take
+ TQSize itemMinSize = item->tqminimumSize(); // a while to get them
+ TQSize s;
if(m_justify) {
if(expandingWidgets != 0) {
- if(item->expanding() == QSizePolicy::Horizontally || item->expanding() == QSizePolicy::BothDirections)
- s = QSize( QMIN(itemSizeHint.width() + availableSpace / expandingWidgets
+ if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections)
+ s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets
, r.width()), itemSizeHint.height() );
else
- s = QSize( QMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
+ s = TQSize( TQMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
}
else
- s = QSize( QMIN(itemSizeHint.width() + availableSpace / (int)currentLine.count()
+ s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / (int)currentLine.count()
, r.width()), itemSizeHint.height() );
}
else
- s = QSize ( QMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
+ s = TQSize ( TQMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
if(!testOnly)
- item->setGeometry( QRect(QPoint(wx, y), s) );
+ item->setGeometry( TQRect(TQPoint(wx, y), s) );
wx = wx + s.width() + spacing();
minSizeWidth = minSizeWidth + spacing() + itemMinSize.width();
- sizeHintWidth = sizeHintWidth + spacing() + itemSizeHint.width();
- lineMinHeight = QMAX( lineMinHeight, itemMinSize.height() );
+ tqsizeHintWidth = tqsizeHintWidth + spacing() + itemSizeHint.width();
+ lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() );
++it2;
}
- sizeHint = sizeHint.expandedTo( QSize(sizeHintWidth, 0) );
- minSize = minSize.expandedTo( QSize(minSizeWidth, 0) );
+ tqsizeHint = tqsizeHint.expandedTo( TQSize(tqsizeHintWidth, 0) );
+ minSize = minSize.expandedTo( TQSize(minSizeWidth, 0) );
minSizeHeight = minSizeHeight + spacing() + lineMinHeight;
// start a new line
y = y + spacing() + h;
@@ -284,68 +290,68 @@ KexiFlowLayout::doHorizontalLayout(const QRect &r, bool testOnly)
}
x = x + spacing() + oSizeHint.width();
- h = QMAX( h, oSizeHint.height() );
+ h = TQMAX( h, oSizeHint.height() );
currentLine.append(o);
- if(o->expanding() == QSizePolicy::Horizontally || o->expanding() == QSizePolicy::BothDirections)
+ if(o->expandingDirections() == TQSizePolicy::Horizontally || o->expandingDirections() == TQSizePolicy::BothDirections)
++expandingWidgets;
- availableSpace = QMAX(0, availableSpace - spacing() - oSizeHint.width());
+ availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.width());
++it;
}
- // don't forget to layout the last line
- QPtrListIterator<QLayoutItem> it2(currentLine);
- QLayoutItem *item;
+ // don't forget to tqlayout the last line
+ TQPtrListIterator<TQLayoutItem> it2(currentLine);
+ TQLayoutItem *item;
int wx = r.x();
- int sizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0;
+ int tqsizeHintWidth = 0 -spacing(), minSizeWidth=0 - spacing(), lineMinHeight=0;
while( (item = it2.current()) != 0 ) {
- QSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take
- QSize itemMinSize = item->minimumSize(); // a while to get them
- QSize s;
+ TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take
+ TQSize itemMinSize = item->tqminimumSize(); // a while to get them
+ TQSize s;
if(m_justify) {
if(expandingWidgets != 0) {
- if(item->expanding() == QSizePolicy::Horizontally || item->expanding() == QSizePolicy::BothDirections)
- s = QSize( QMIN(itemSizeHint.width() + availableSpace / expandingWidgets
+ if(item->expandingDirections() == TQSizePolicy::Horizontally || item->expandingDirections() == TQSizePolicy::BothDirections)
+ s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / expandingWidgets
, r.width()), itemSizeHint.height() );
else
- s = QSize( QMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
+ s = TQSize( TQMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
}
else
- s = QSize( QMIN(itemSizeHint.width() + availableSpace / (int)currentLine.count()
+ s = TQSize( TQMIN(itemSizeHint.width() + availableSpace / (int)currentLine.count()
, r.width()), itemSizeHint.height() );
}
else
- s = QSize ( QMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
+ s = TQSize ( TQMIN(itemSizeHint.width(), r.width()), itemSizeHint.height() );
if(!testOnly)
- item->setGeometry( QRect(QPoint(wx, y), s) );
+ item->setGeometry( TQRect(TQPoint(wx, y), s) );
wx = wx + s.width() + spacing();
minSizeWidth = minSizeWidth + spacing() + itemMinSize.width();
- sizeHintWidth = sizeHintWidth + spacing() + itemSizeHint.width();
- lineMinHeight = QMAX( lineMinHeight, itemMinSize.height() );
+ tqsizeHintWidth = tqsizeHintWidth + spacing() + itemSizeHint.width();
+ lineMinHeight = TQMAX( lineMinHeight, itemMinSize.height() );
++it2;
}
- sizeHint = sizeHint.expandedTo( QSize(sizeHintWidth, y + spacing() + h) );
+ tqsizeHint = tqsizeHint.expandedTo( TQSize(tqsizeHintWidth, y + spacing() + h) );
minSizeHeight = minSizeHeight + spacing() + lineMinHeight;
- minSize = minSize.expandedTo( QSize(minSizeWidth, minSizeHeight) );
+ minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) );
- // store sizeHint() and minimumSize()
- m_cached_sizeHint = sizeHint + QSize(2* margin(), 2*margin());
- m_cached_minSize = minSize + QSize(2* margin() , 2*margin());
+ // store tqsizeHint() and tqminimumSize()
+ m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin());
+ m_cached_minSize = minSize + TQSize(2* margin() , 2*margin());
// return our height
return y + h - r.y();
}
int
-KexiFlowLayout::doVerticalLayout(const QRect &r, bool testOnly)
+KexiFlowLayout::doVerticalLayout(const TQRect &r, bool testOnly)
{
int x = r.x();
int y = r.y();
int w = 0; // width of this line
int availableSpace = r.height() + spacing();
- int expandingWidgets=0; // number of widgets in the line with QSizePolicy == Expanding
- QPtrListIterator<QLayoutItem> it(m_list);
- QPtrList<QLayoutItem> currentLine;
- QLayoutItem *o;
- QSize minSize, sizeHint(20, 20);
+ int expandingWidgets=0; // number of widgets in the line with TQSizePolicy == Expanding
+ TQPtrListIterator<TQLayoutItem> it(m_list);
+ TQPtrList<TQLayoutItem> currentLine;
+ TQLayoutItem *o;
+ TQSize minSize, tqsizeHint(20, 20);
int minSizeWidth = 0 - spacing();
while ( (o = it.current()) != 0 ) {
@@ -354,41 +360,41 @@ KexiFlowLayout::doVerticalLayout(const QRect &r, bool testOnly)
continue;
}
- QSize oSizeHint = o->sizeHint(); // we cache these ones because it can take a while to get it (eg for child layouts)
+ TQSize oSizeHint = o->tqsizeHint(); // we cache these ones because it can take a while to get it (eg for child tqlayouts)
if (y + oSizeHint.height() > r.bottom() && w > 0) {
- // do the layout of current line
- QPtrListIterator<QLayoutItem> it2(currentLine);
- QLayoutItem *item;
+ // do the tqlayout of current line
+ TQPtrListIterator<TQLayoutItem> it2(currentLine);
+ TQLayoutItem *item;
int wy = r.y();
- int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0;
+ int tqsizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0;
while( (item = it2.current()) != 0 ) {
- QSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take
- QSize itemMinSize = item->minimumSize(); // a while to get them
- QSize s;
+ TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take
+ TQSize itemMinSize = item->tqminimumSize(); // a while to get them
+ TQSize s;
if(m_justify) {
if(expandingWidgets != 0) {
- if(item->expanding() == QSizePolicy::Vertically || item->expanding() == QSizePolicy::BothDirections)
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height() + availableSpace / expandingWidgets
+ if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections)
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets
, r.height()) );
else
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height(), r.height()) );
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height(), r.height()) );
}
else
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height() + availableSpace / (int)currentLine.count()
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / (int)currentLine.count()
, r.height()) );
}
else
- s = QSize ( itemSizeHint.width(), QMIN(itemSizeHint.height(), r.height()) );
+ s = TQSize ( itemSizeHint.width(), TQMIN(itemSizeHint.height(), r.height()) );
if(!testOnly)
- item->setGeometry( QRect(QPoint(x, wy), s) );
+ item->setGeometry( TQRect(TQPoint(x, wy), s) );
wy = wy + s.height() + spacing();
minSizeHeight = minSizeHeight + spacing() + itemMinSize.height();
- sizeHintHeight = sizeHintHeight + spacing() + itemSizeHint.height();
- colMinWidth = QMAX( colMinWidth, itemMinSize.width() );
+ tqsizeHintHeight = tqsizeHintHeight + spacing() + itemSizeHint.height();
+ colMinWidth = TQMAX( colMinWidth, itemMinSize.width() );
++it2;
}
- sizeHint = sizeHint.expandedTo( QSize(0, sizeHintHeight) );
- minSize = minSize.expandedTo( QSize(0, minSizeHeight) );
+ tqsizeHint = tqsizeHint.expandedTo( TQSize(0, tqsizeHintHeight) );
+ minSize = minSize.expandedTo( TQSize(0, minSizeHeight) );
minSizeWidth = minSizeWidth + spacing() + colMinWidth;
// start a new column
x = x + spacing() + w;
@@ -400,53 +406,82 @@ KexiFlowLayout::doVerticalLayout(const QRect &r, bool testOnly)
}
y = y + spacing() + oSizeHint.height();
- w = QMAX( w, oSizeHint.width() );
+ w = TQMAX( w, oSizeHint.width() );
currentLine.append(o);
- if(o->expanding() == QSizePolicy::Vertically || o->expanding() == QSizePolicy::BothDirections)
+ if(o->expandingDirections() == TQSizePolicy::Vertically || o->expandingDirections() == TQSizePolicy::BothDirections)
++expandingWidgets;
- availableSpace = QMAX(0, availableSpace - spacing() - oSizeHint.height());
+ availableSpace = TQMAX(0, availableSpace - spacing() - oSizeHint.height());
++it;
}
- // don't forget to layout the last line
- QPtrListIterator<QLayoutItem> it2(currentLine);
- QLayoutItem *item;
+ // don't forget to tqlayout the last line
+ TQPtrListIterator<TQLayoutItem> it2(currentLine);
+ TQLayoutItem *item;
int wy = r.y();
- int sizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0;
+ int tqsizeHintHeight = 0 - spacing(), minSizeHeight = 0 - spacing(), colMinWidth=0;
while( (item = it2.current()) != 0 ) {
- QSize itemSizeHint = item->sizeHint(); // we cache these ones because it can take
- QSize itemMinSize = item->minimumSize(); // a while to get them
- QSize s;
+ TQSize itemSizeHint = item->tqsizeHint(); // we cache these ones because it can take
+ TQSize itemMinSize = item->tqminimumSize(); // a while to get them
+ TQSize s;
if(m_justify) {
if(expandingWidgets != 0) {
- if(item->expanding() == QSizePolicy::Vertically || item->expanding() == QSizePolicy::BothDirections)
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height() + availableSpace / expandingWidgets
+ if(item->expandingDirections() == TQSizePolicy::Vertically || item->expandingDirections() == TQSizePolicy::BothDirections)
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / expandingWidgets
, r.height()) );
else
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height(), r.height()) );
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height(), r.height()) );
}
else
- s = QSize( itemSizeHint.width(), QMIN(itemSizeHint.height() + availableSpace / (int)currentLine.count()
+ s = TQSize( itemSizeHint.width(), TQMIN(itemSizeHint.height() + availableSpace / (int)currentLine.count()
, r.height()) );
}
else
- s = QSize ( itemSizeHint.width(), QMIN(itemSizeHint.height(), r.height()) );
+ s = TQSize ( itemSizeHint.width(), TQMIN(itemSizeHint.height(), r.height()) );
if(!testOnly)
- item->setGeometry( QRect(QPoint(x, wy), s) );
+ item->setGeometry( TQRect(TQPoint(x, wy), s) );
wy = wy + s.height() + spacing();
minSizeHeight = minSizeHeight + spacing() + itemMinSize.height();
- sizeHintHeight = sizeHintHeight + spacing() + itemSizeHint.height();
- colMinWidth = QMAX( colMinWidth, itemMinSize.width() );
+ tqsizeHintHeight = tqsizeHintHeight + spacing() + itemSizeHint.height();
+ colMinWidth = TQMAX( colMinWidth, itemMinSize.width() );
++it2;
}
- sizeHint = sizeHint.expandedTo( QSize( x + spacing() + w, sizeHintHeight) );
+ tqsizeHint = tqsizeHint.expandedTo( TQSize( x + spacing() + w, tqsizeHintHeight) );
minSizeWidth = minSizeWidth + spacing() + colMinWidth;
- minSize = minSize.expandedTo( QSize(minSizeWidth, minSizeHeight) );
+ minSize = minSize.expandedTo( TQSize(minSizeWidth, minSizeHeight) );
- // store sizeHint() and minimumSize()
- m_cached_sizeHint = sizeHint + QSize(2* margin(), 2*margin());
- m_cached_minSize = minSize + QSize(2* margin(), 2*margin());
+ // store tqsizeHint() and tqminimumSize()
+ m_cached_tqsizeHint = tqsizeHint + TQSize(2* margin(), 2*margin());
+ m_cached_minSize = minSize + TQSize(2* margin(), 2*margin());
// return our width
return x + w - r.x();
}
+#ifdef USE_QT4
+/*!
+ \reimp
+*/
+int KexiFlowLayout::count() const {
+ return m_list.count();
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* KexiFlowLayout::itemAt(int index) const {
+ return index >= 0 && index < m_list.count() ? (const_cast<TQPtrList<TQLayoutItem>&>(m_list).tqat(index)) : 0;
+}
+
+/*!
+ \reimp
+*/
+TQLayoutItem* KexiFlowLayout::takeAt(int index) {
+ if (index < 0 || index >= m_list.count())
+ return 0;
+ TQLayoutItem *item = m_list.tqat(index);
+ m_list.remove(m_list.tqat(index));
+ delete item;
+
+ invalidate();
+ return item;
+}
+#endif // USE_QT4 \ No newline at end of file
diff --git a/kexi/widget/utils/kexiflowlayout.h b/kexi/widget/utils/kexiflowlayout.h
index 173ddad57..e410fb835 100644
--- a/kexi/widget/utils/kexiflowlayout.h
+++ b/kexi/widget/utils/kexiflowlayout.h
@@ -20,27 +20,27 @@
#ifndef KEXIFLOWLAYOUT_H
#define KEXIFLOWLAYOUT_H
-#include <qlayout.h>
-#include <qptrlist.h>
+#include <tqlayout.h>
+#include <tqptrlist.h>
-//! @short a special "flow" layout
-class KEXIGUIUTILS_EXPORT KexiFlowLayout : public QLayout
+//! @short a special "flow" tqlayout
+class KEXIGUIUTILS_EXPORT KexiFlowLayout : public TQLayout
{
public:
- KexiFlowLayout(QWidget *parent, int border=0, int space=-1, const char *name=0);
- KexiFlowLayout(QLayout* parent, int space=-1, const char *name=0);
+ KexiFlowLayout(TQWidget *tqparent, int border=0, int space=-1, const char *name=0);
+ KexiFlowLayout(TQLayout* tqparent, int space=-1, const char *name=0);
KexiFlowLayout(int space=-1, const char *name=0);
~KexiFlowLayout();
- /*! \return the widgets in the order of the layout,
+ /*! \return the widgets in the order of the tqlayout,
ie as it is stored in m_list. You must delete the list after using it. */
- QPtrList<QWidget>* widgetList() const;
+ TQPtrList<TQWidget>* widgetList() const;
- /*! Sets layout's orientation to \a orientation. Default orientation is Vertical. */
- void setOrientation(Orientation orientation) { m_orientation = orientation; }
+ /*! Sets tqlayout's orientation to \a orientation. Default orientation isQt::Vertical. */
+ void setOrientation(Qt::Orientation orientation) { m_orientation = orientation; }
- /*! \return layout's orientation. */
+ /*! \return tqlayout's orientation. */
Qt::Orientation orientation() const { return m_orientation; }
void setJustified(bool justify) { m_justify = justify; }
@@ -48,31 +48,35 @@ class KEXIGUIUTILS_EXPORT KexiFlowLayout : public QLayout
virtual void addItem(QLayoutItem *item);
virtual void addSpacing(int size);
- virtual QLayoutIterator iterator();
- virtual void invalidate();
+ virtual TQLayoutIterator iterator();
+ virtual void tqinvalidate();
virtual bool hasHeightForWidth() const;
virtual int heightForWidth(int width) const;
- virtual QSize sizeHint() const;
- virtual QSize minimumSize() const;
- virtual QSizePolicy::ExpandData expanding() const;
+ virtual TQSize tqsizeHint() const;
+ virtual TQSize tqminimumSize() const;
+ virtual TQSizePolicy::ExpandData expanding() const;
virtual bool isEmpty();
+#ifdef USE_QT4
+ QLAYOUT_REQUIRED_METHOD_DECLARATIONS
+#endif // USE_QT4
+
protected:
- virtual void setGeometry(const QRect&);
- int simulateLayout(const QRect &r);
- int doHorizontalLayout(const QRect&, bool testonly = false);
- int doVerticalLayout(const QRect&, bool testonly = false);
+ virtual void setGeometry(const TQRect&);
+ int simulateLayout(const TQRect &r);
+ int doHorizontalLayout(const TQRect&, bool testonly = false);
+ int doVerticalLayout(const TQRect&, bool testonly = false);
private:
- QPtrList<QLayoutItem> m_list;
+ TQPtrList<TQLayoutItem> m_list;
int m_cached_width;
int m_cached_hfw;
bool m_justify;
- Orientation m_orientation;
- QSize m_cached_sizeHint;
- QSize m_cached_minSize;
+ Qt::Orientation m_orientation;
+ TQSize m_cached_tqsizeHint;
+ TQSize m_cached_minSize;
};
#endif
diff --git a/kexi/widget/utils/kexigradientwidget.cpp b/kexi/widget/utils/kexigradientwidget.cpp
index 0411318de..2a1a3ba31 100644
--- a/kexi/widget/utils/kexigradientwidget.cpp
+++ b/kexi/widget/utils/kexigradientwidget.cpp
@@ -17,30 +17,30 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qapplication.h>
-#include <qbitmap.h>
-#include <qimage.h>
-#include <qobjectlist.h>
-#include <qpainter.h>
-#include <qstyle.h>
+#include <tqapplication.h>
+#include <tqbitmap.h>
+#include <tqimage.h>
+#include <tqobjectlist.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
#include <kimageeffect.h>
#include <kpixmap.h>
#include "kexigradientwidget.h"
-KexiGradientWidget::KexiGradientWidget( QWidget *parent, const char *name, WFlags f )
- : QWidget( parent, name, f ), p_displayMode( NoGradient ),
+KexiGradientWidget::KexiGradientWidget( TQWidget *tqparent, const char *name, WFlags f )
+ : TQWidget( tqparent, name, f ), p_displayMode( NoGradient ),
p_gradientType( VerticalGradient ),
- p_color1( Qt::white ), p_color2( Qt::blue ), p_currentChild( 0 ),
+ p_color1( TQt::white ), p_color2( TQt::blue ), p_currentChild( 0 ),
p_opacity( 0.5 ), p_cacheDirty( true )
{
p_customBackgroundWidgets.setAutoDelete( false );
p_knownWidgets.setAutoDelete( false );
- p_backgroundColor = QWidget::paletteBackgroundColor();
+ p_backgroundColor = TQWidget::paletteBackgroundColor();
- connect ( &p_rebuildDelayTimer, SIGNAL( timeout() ), this, SLOT( setCacheDirty() ) );
+ connect ( &p_rebuildDelayTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( setCacheDirty() ) );
installEventFilter( this );
}
@@ -49,17 +49,17 @@ KexiGradientWidget::~KexiGradientWidget()
{
}
-bool KexiGradientWidget::isValidChildWidget( QObject* child ) {
- const QWidget* wgt = dynamic_cast<QWidget*>( child );
+bool KexiGradientWidget::isValidChildWidget( TQObject* child ) {
+ const TQWidget* wgt = dynamic_cast<TQWidget*>( child );
if ( wgt == 0L )
return false;
- if ( wgt->inherits( "QScrollView" ) )
+ if ( wgt->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) )
return false;
- if ( wgt->inherits( "QComboBox" ) )
+ if ( wgt->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) )
return false;
- if ( wgt->inherits( "QLineEdit" ) )
+ if ( wgt->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) )
return false;
if ( wgt->inherits( "KexiDBForm" ) )
return false;
@@ -67,14 +67,14 @@ bool KexiGradientWidget::isValidChildWidget( QObject* child ) {
return true;
}
-void KexiGradientWidget::buildChildrenList( WidgetList& list, QWidget* p ) {
- QObjectList* objects = p->queryList( "QWidget", 0, false, false );
+void KexiGradientWidget::buildChildrenList( WidgetList& list, TQWidget* p ) {
+ TQObjectList* objects = p->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, false, false );
- for ( QObjectList::Iterator it = objects->begin(); it != objects->end(); ++it ) {
+ for ( TQObjectList::Iterator it = objects->begin(); it != objects->end(); ++it ) {
if ( isValidChildWidget( ( *it ) ) == false )
continue;
- list.append( dynamic_cast<QWidget*>( ( *it ) ) );
- buildChildrenList( list, dynamic_cast<QWidget*>( ( *it ) ) );
+ list.append( dynamic_cast<TQWidget*>( ( *it ) ) );
+ buildChildrenList( list, dynamic_cast<TQWidget*>( ( *it ) ) );
}
delete objects;
@@ -85,20 +85,20 @@ void KexiGradientWidget::rebuildCache( void ) {
buildChildrenList( childWidgetList, this );
/**
- Disable the effect and behave like a normal QWidget.
+ Disable the effect and behave like a normal TQWidget.
*/
if ( p_displayMode == NoGradient ) {
// if ( p_backgroundPixmap.isNull() ) {
//unsetPalette();
//} else {
- QWidget::setPaletteBackgroundPixmap( p_backgroundPixmap );
+ TQWidget::setPaletteBackgroundPixmap( p_backgroundPixmap );
//}
- QWidget::setPaletteBackgroundColor( p_backgroundColor );
+ TQWidget::setPaletteBackgroundColor( p_backgroundColor );
for ( WidgetList::Iterator it = childWidgetList.begin();
it != childWidgetList.end(); ++it ) {
- if ( p_customBackgroundWidgets.contains( ( *it ) ) == false ) {
+ if ( p_customBackgroundWidgets.tqcontains( ( *it ) ) == false ) {
( *it )->unsetPalette();
}
}
@@ -110,8 +110,8 @@ void KexiGradientWidget::rebuildCache( void ) {
}
KPixmap tempPixmap;
- QImage gradientImage;
- QImage bgImage;
+ TQImage gradientImage;
+ TQImage bgImage;
/**
Draw the gradient
@@ -124,7 +124,7 @@ void KexiGradientWidget::rebuildCache( void ) {
*/
if ( p_displayMode == FadedGradient ) {
tempPixmap.resize( size() );
- QPainter p( &tempPixmap, this );
+ TQPainter p( &tempPixmap, this );
if ( p_backgroundPixmap.isNull() ) {
/*
@@ -133,8 +133,8 @@ void KexiGradientWidget::rebuildCache( void ) {
*/
unsetPalette();
p.fillRect( 0, 0, width(), height(), palette().brush(
- isEnabled() ? QPalette::Active : QPalette::Disabled,
- QColorGroup::Background ) );
+ isEnabled() ? TQPalette::Active : TQPalette::Disabled,
+ TQColorGroup::Background ) );
} else {
p.drawTiledPixmap( 0, 0, width(), height(), p_backgroundPixmap );
}
@@ -155,12 +155,12 @@ void KexiGradientWidget::rebuildCache( void ) {
}
/**
- All children need to have our background set.
+ All tqchildren need to have our background set.
*/
KPixmap partPixmap;
- QRect area;
- QWidget* childWidget = 0;
- const QPoint topLeft( 0, 0 );
+ TQRect area;
+ TQWidget* childWidget = 0;
+ const TQPoint topLeft( 0, 0 );
for ( WidgetList::Iterator it = childWidgetList.begin();
it != childWidgetList.end(); ++it ) {
@@ -170,7 +170,7 @@ void KexiGradientWidget::rebuildCache( void ) {
/**
Exclude widgets with a custom palette.
*/
- if ( p_customBackgroundWidgets.contains( childWidget ) ) {
+ if ( p_customBackgroundWidgets.tqcontains( childWidget ) ) {
continue;
}
@@ -179,8 +179,8 @@ void KexiGradientWidget::rebuildCache( void ) {
Get the part of the tempPixmap that is
under the current child-widget.
*/
- if ( childWidget->parent() == this ) {
- area = childWidget->geometry();
+ if ( TQT_BASE_OBJECT(childWidget->tqparent()) == TQT_BASE_OBJECT(this) ) {
+ area = childWidget->tqgeometry();
} else {
area.setTopLeft( childWidget->mapTo( this,
childWidget->clipRegion().boundingRect().topLeft() ) );
@@ -192,17 +192,17 @@ void KexiGradientWidget::rebuildCache( void ) {
childWidget->setPaletteBackgroundPixmap( partPixmap );
}
- QWidget::setPaletteBackgroundPixmap( tempPixmap );
+ TQWidget::setPaletteBackgroundPixmap( tempPixmap );
/**
Unset the dirty-flag at the end of the method.
- QWidget::setPaletteBackgroundPixmap() causes this
+ TQWidget::setPaletteBackgroundPixmap() causes this
to get set to true again, so set it to false
right after setting the pixmap.
*/
p_cacheDirty = false;
}
-void KexiGradientWidget::paintEvent( QPaintEvent* e ) {
+void KexiGradientWidget::paintEvent( TQPaintEvent* e ) {
/**
Rebuild the background-pixmap if necessary.
*/
@@ -213,19 +213,19 @@ void KexiGradientWidget::paintEvent( QPaintEvent* e ) {
/**
Draw the widget as usual
*/
- QWidget::paintEvent( e );
+ TQWidget::paintEvent( e );
}
-bool KexiGradientWidget::eventFilter( QObject* object, QEvent* event ) {
- QWidget* child = dynamic_cast<QWidget*>( object );
+bool KexiGradientWidget::eventFilter( TQObject* object, TQEvent* event ) {
+ TQWidget* child = dynamic_cast<TQWidget*>( object );
/**
Manage list of child-widgets.
*/
- if ( object == this ) {
- if ( event->type() == QEvent::ChildInserted ) {
- child = dynamic_cast<QWidget*>( dynamic_cast<QChildEvent*>( event )->child() );
- if ( isValidChildWidget( child ) == false ) {
+ if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(this) ) {
+ if ( event->type() == TQEvent::ChildInserted ) {
+ child = dynamic_cast<TQWidget*>( dynamic_cast<TQChildEvent*>( event )->child() );
+ if ( isValidChildWidget( TQT_TQOBJECT(child) ) == false ) {
return false;
}
/**
@@ -236,11 +236,11 @@ bool KexiGradientWidget::eventFilter( QObject* object, QEvent* event ) {
... and install 'this' as the child's event-filter.
*/
child->installEventFilter( this );
- } else if ( event->type() == QEvent::ChildRemoved ) {
+ } else if ( event->type() == TQEvent::ChildRemoved ) {
/**
Remove the child-widget from the list of known widgets.
*/
- p_knownWidgets.remove( dynamic_cast<QWidget*>( dynamic_cast<QChildEvent*>( event )->child() ) );
+ p_knownWidgets.remove( dynamic_cast<TQWidget*>( dynamic_cast<TQChildEvent*>( event )->child() ) );
}
return false;
}
@@ -248,14 +248,14 @@ bool KexiGradientWidget::eventFilter( QObject* object, QEvent* event ) {
/**
Manage custombackground-list.
*/
- if ( event->type() == QEvent::PaletteChange ) {
+ if ( event->type() == TQEvent::PaletteChange ) {
/**
p_currentChild will be == 0L, when the user
sets it's palette manually.
In this case, it has to be added to the customBackground-list.
*/
if ( p_currentChild == 0L && child != 0L ) {
- if ( p_customBackgroundWidgets.contains( child ) == false ) {
+ if ( p_customBackgroundWidgets.tqcontains( child ) == false ) {
p_customBackgroundWidgets.append( child );
return false;
}
@@ -269,7 +269,7 @@ bool KexiGradientWidget::eventFilter( QObject* object, QEvent* event ) {
Add the new child to the list of widgets, we don't set
the background ourselves if it isn't in the list.
*/
- if ( p_customBackgroundWidgets.contains( child ) == false ) {
+ if ( p_customBackgroundWidgets.tqcontains( child ) == false ) {
if ( child->paletteBackgroundPixmap() != 0L ) {
p_customBackgroundWidgets.append( child );
}
@@ -290,37 +290,37 @@ bool KexiGradientWidget::eventFilter( QObject* object, QEvent* event ) {
p_currentChild = 0;
}
- if ( event->type() == QEvent::Move ) {
- if ( p_customBackgroundWidgets.contains( child ) == false ) {
+ if ( event->type() == TQEvent::Move ) {
+ if ( p_customBackgroundWidgets.tqcontains( child ) == false ) {
updateChildBackground( child );
}
}
return false;
}
-void KexiGradientWidget::updateChildBackground( QWidget* childWidget )
+void KexiGradientWidget::updateChildBackground( TQWidget* childWidget )
{
KPixmap partPixmap;
KPixmap bgPixmap;
- QRect area;
- const QPoint topLeft( 0, 0 );
+ TQRect area;
+ const TQPoint topLeft( 0, 0 );
- bgPixmap = paletteBackgroundPixmap() ? (*paletteBackgroundPixmap()) : QPixmap();
+ bgPixmap = paletteBackgroundPixmap() ? (*paletteBackgroundPixmap()) : TQPixmap();
if ( bgPixmap.isNull() )
return;
/**
- Exclude widgtes that don't have a parent.
- This happens when children are removed
+ Exclude widgtes that don't have a tqparent.
+ This happens when tqchildren are removed
which are in the knownWidgets-list.
*/
- if ( childWidget->parent() == 0L )
+ if ( childWidget->tqparent() == 0L )
return;
/**
Exclude widgets with a custom palette.
*/
- if ( p_customBackgroundWidgets.contains( childWidget ) ) {
+ if ( p_customBackgroundWidgets.tqcontains( childWidget ) ) {
return;
}
@@ -329,8 +329,8 @@ void KexiGradientWidget::updateChildBackground( QWidget* childWidget )
Get the part of the tempPixmap that is
under the current child-widget.
*/
- if ( childWidget->parent() == this ) {
- area = childWidget->geometry();
+ if ( TQT_BASE_OBJECT(childWidget->tqparent()) == TQT_BASE_OBJECT(this) ) {
+ area = childWidget->tqgeometry();
} else {
area.setTopLeft( childWidget->mapTo( this,
childWidget->clipRegion().boundingRect().topLeft() ) );
@@ -342,15 +342,15 @@ void KexiGradientWidget::updateChildBackground( QWidget* childWidget )
childWidget->setPaletteBackgroundPixmap( partPixmap );
}
-void KexiGradientWidget::setPaletteBackgroundColor( const QColor& color )
+void KexiGradientWidget::setPaletteBackgroundColor( const TQColor& color )
{
p_backgroundColor = color;
if ( p_displayMode == NoGradient ) {
- QWidget::setPaletteBackgroundColor( p_backgroundColor );
+ TQWidget::setPaletteBackgroundColor( p_backgroundColor );
}
}
-const QColor& KexiGradientWidget::paletteBackgroundColor() const
+const TQColor& KexiGradientWidget::paletteBackgroundColor() const
{
return p_backgroundColor;
}
diff --git a/kexi/widget/utils/kexigradientwidget.h b/kexi/widget/utils/kexigradientwidget.h
index 0032e7b10..3a90add8e 100644
--- a/kexi/widget/utils/kexigradientwidget.h
+++ b/kexi/widget/utils/kexigradientwidget.h
@@ -20,8 +20,8 @@
#ifndef KEXIGRADIENTWIDGET_H
#define KEXIGRADIENTWIDGET_H
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include <kimageeffect.h>
#include <kpixmap.h>
@@ -32,15 +32,16 @@
/*!
@author Christian Nitschkowski
*/
-class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
- typedef QPtrList<QWidget> WidgetList;
+class KEXIGUIUTILS_EXPORT KexiGradientWidget : public TQWidget {
+ typedef TQPtrList<TQWidget> WidgetList;
Q_OBJECT
- Q_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode DESIGNABLE true)
- Q_PROPERTY(GradientType gradientType READ gradientType WRITE setGradientType DESIGNABLE true)
- Q_PROPERTY(QColor gradientColor1 READ gradientColor1 WRITE setGradientColor1 DESIGNABLE true)
- Q_PROPERTY(QColor gradientColor2 READ gradientColor2 WRITE setGradientColor2 DESIGNABLE true)
- Q_PROPERTY(double blendOpacity READ blendOpacity WRITE setBlendOpacity DESIGNABLE true)
+ TQ_OBJECT
+ TQ_PROPERTY(DisplayMode displayMode READ displayMode WRITE setDisplayMode DESIGNABLE true)
+ TQ_PROPERTY(GradientType gradientType READ gradientType WRITE setGradientType DESIGNABLE true)
+ TQ_PROPERTY(TQColor gradientColor1 READ gradientColor1 WRITE setGradientColor1 DESIGNABLE true)
+ TQ_PROPERTY(TQColor gradientColor2 READ gradientColor2 WRITE setGradientColor2 DESIGNABLE true)
+ TQ_PROPERTY(double blendOpacity READ blendOpacity WRITE setBlendOpacity DESIGNABLE true)
Q_ENUMS( DisplayMode GradientType )
public:
@@ -48,7 +49,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
Modes for displaying the gradient.
*/
enum DisplayMode {
- NoGradient, //!< No gradient at all. Will behave just like a QWidget
+ NoGradient, //!< No gradient at all. Will behave just like a TQWidget
FadedGradient, //!< Gradient will be faded with the widgets background
SimpleGradient //!< Gradient will replace the usual widget background
};
@@ -68,16 +69,16 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
EllipticGradient = KImageEffect::EllipticGradient
};
- KexiGradientWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ KexiGradientWidget( TQWidget *tqparent = 0, const char *name = 0, WFlags f = 0 );
virtual ~KexiGradientWidget();
- virtual void setPaletteBackgroundPixmap( const QPixmap& pixmap ) {
+ virtual void setPaletteBackgroundPixmap( const TQPixmap& pixmap ) {
p_backgroundPixmap = pixmap;
p_rebuildDelayTimer.start( REBUILD_DELAY, true );
}
- virtual const QColor& paletteBackgroundColor() const;
+ virtual const TQColor& paletteBackgroundColor() const;
/*!
Set the displaymode \a mode.
@@ -114,14 +115,14 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
/*! Set color #1 for the gradient-effect.
\a color is the new color. */
- void setGradientColor1( const QColor& color ) {
+ void setGradientColor1( const TQColor& color ) {
p_color1 = color;
p_cacheDirty = true;
}
/*! Set color #2 for the gradient-effect.
\a color is the new color. */
- void setGradientColor2( const QColor& color ) {
+ void setGradientColor2( const TQColor& color ) {
p_color2 = color;
p_cacheDirty = true;
}
@@ -131,17 +132,17 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
\a color1 is the first color,
\a color2 the second.
*/
- void setGradientColors( const QColor& color1, const QColor& color2 ) {
+ void setGradientColors( const TQColor& color1, const TQColor& color2 ) {
p_color1 = color1;
p_color2 = color2;
p_cacheDirty = true;
}
/*! \return the color #1 used for the gradient. */
- QColor gradientColor1() const { return p_color1; }
+ TQColor gradientColor1() const { return p_color1; }
/*! \return the color #2 used for the gradient. */
- QColor gradientColor2() const { return p_color2; }
+ TQColor gradientColor2() const { return p_color2; }
/*!
Sets the opacity of the gradient when fading with background.
@@ -155,47 +156,47 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
double blendOpacity() const { return p_opacity; }
public slots:
- virtual void setPaletteBackgroundColor( const QColor& color );
+ virtual void setPaletteBackgroundColor( const TQColor& color );
protected:
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
virtual void enabledChange( bool enabled ) {
p_cacheDirty = true;
- QWidget::enabledChange( enabled );
+ TQWidget::enabledChange( enabled );
}
- virtual void paletteChange( const QPalette& pal ) {
+ virtual void paletteChange( const TQPalette& pal ) {
p_cacheDirty = true;
- QWidget::paletteChange( pal );
+ TQWidget::paletteChange( pal );
}
- virtual void paintEvent( QPaintEvent* e );
+ virtual void paintEvent( TQPaintEvent* e );
- virtual void resizeEvent( QResizeEvent* e ) {
+ virtual void resizeEvent( TQResizeEvent* e ) {
p_rebuildDelayTimer.start( REBUILD_DELAY, true );
- QWidget::resizeEvent( e );
+ TQWidget::resizeEvent( e );
}
- virtual void styleChange( QStyle& style ) {
+ virtual void styleChange( TQStyle& style ) {
p_cacheDirty = true;
- QWidget::styleChange( style );
+ TQWidget::styleChange( style );
}
private:
/*!
- Builds a list of children of \a p.
+ Builds a list of tqchildren of \a p.
Only widgets that work correctly with KexiGradientWidget
will be in this list.
The results will be stored in \a list.
- The method recursively calls itself until all children of \a p
+ The method recursively calls itself until all tqchildren of \a p
have been found and stored in the list.
*/
- static void buildChildrenList( WidgetList& list, QWidget* p );
+ static void buildChildrenList( WidgetList& list, TQWidget* p );
/*!
\a return if the \a child is a widget that should
get a background set.
*/
- static bool isValidChildWidget( QObject* child );
+ static bool isValidChildWidget( TQObject* child );
/*!
Rebuilds the cache completely.
@@ -210,7 +211,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
The same code is used for PaletteChange-events, but in a
different location.
*/
- void updateChildBackground( QWidget* childWidget );
+ void updateChildBackground( TQWidget* childWidget );
private:
WidgetList p_knownWidgets;
@@ -218,14 +219,14 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
DisplayMode p_displayMode;
GradientType p_gradientType;
KPixmap p_backgroundPixmap;
- QColor p_color1;
- QColor p_color2;
- QTimer p_rebuildDelayTimer;
- QWidget* p_currentChild;
+ TQColor p_color1;
+ TQColor p_color2;
+ TQTimer p_rebuildDelayTimer;
+ TQWidget* p_currentChild;
double p_opacity;
bool p_cacheDirty;
- QColor p_backgroundColor;
+ TQColor p_backgroundColor;
public slots:
/*!
@@ -233,7 +234,7 @@ class KEXIGUIUTILS_EXPORT KexiGradientWidget : public QWidget {
is set up completely.
*/
virtual void polish() {
- QWidget::polish();
+ TQWidget::polish();
rebuildCache();
}
diff --git a/kexi/widget/utils/kexirecordmarker.cpp b/kexi/widget/utils/kexirecordmarker.cpp
index d434fcaf6..654f3be7b 100644
--- a/kexi/widget/utils/kexirecordmarker.cpp
+++ b/kexi/widget/utils/kexirecordmarker.cpp
@@ -22,20 +22,20 @@
#include "kexirecordmarker.h"
-#include <qcolor.h>
-#include <qstyle.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qapplication.h>
+#include <tqcolor.h>
+#include <tqstyle.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
#include <kexiutils/utils.h>
-static KStaticDeleter<QImage> KexiRecordMarker_pen_deleter, KexiRecordMarker_plus_deleter;
-QImage* KexiRecordMarker_pen = 0, *KexiRecordMarker_plus = 0;
+static KStaticDeleter<TQImage> KexiRecordMarker_pen_deleter, KexiRecordMarker_plus_deleter;
+TQImage* KexiRecordMarker_pen = 0, *KexiRecordMarker_plus = 0;
static const unsigned char img_pen_data[] = {
0x00,0x00,0x03,0x30,0x78,0x9c,0xfb,0xff,0xff,0x3f,0xc3,0x7f,0x32,0x30,
@@ -56,7 +56,7 @@ static struct EmbedImage {
const unsigned char *data;
ulong compressed;
int numColors;
- const QRgb *colorTable;
+ const TQRgb *colorTable;
bool alpha;
const char *name;
} embed_image[] = {
@@ -64,14 +64,14 @@ static struct EmbedImage {
{ 10, 10, 32, (const unsigned char*)img_pen_data, 50, 0, 0, true, "tableview_plus.png" }
};
-QImage* getImg(const unsigned char* data, int id)
+TQImage* getImg(const unsigned char* data, int id)
{
- QByteArray baunzip;
- baunzip = qUncompress( data, embed_image[id].compressed );
- QImage *img = new QImage( QImage((uchar*)baunzip.data(),
+ TQByteArray baunzip;
+ baunzip = tqUncompress( data, embed_image[id].compressed );
+ TQImage *img = new TQImage( TQImage((uchar*)baunzip.data(),
embed_image[id].width, embed_image[id].height,
- embed_image[id].depth, (QRgb*)embed_image[id].colorTable,
- embed_image[id].numColors, QImage::BigEndian
+ embed_image[id].depth, (TQRgb*)embed_image[id].colorTable,
+ embed_image[id].numColors, TQImage::BigEndian
).copy() );
if ( embed_image[id].alpha )
img->setAlphaBuffer(true);
@@ -100,7 +100,7 @@ public:
, highlightedRow(-1)
, editRow(-1)
, rows(0)
- , selectionBackgroundColor(qApp->palette().active().highlight())
+ , selectionBackgroundColor(tqApp->tqpalette().active().highlight())
, showInsertRow(true)
{
}
@@ -110,14 +110,14 @@ public:
int highlightedRow;
int editRow;
int rows;
- QColor selectionBackgroundColor;
+ TQColor selectionBackgroundColor;
bool showInsertRow : 1;
};
//----------------------------------------------------------------
-KexiRecordMarker::KexiRecordMarker(QWidget *parent, const char* name)
- : QWidget(parent, name)
+KexiRecordMarker::KexiRecordMarker(TQWidget *tqparent, const char* name)
+ : TQWidget(tqparent, name)
, d( new Private() )
{
initRecordMarkerImages();
@@ -128,13 +128,13 @@ KexiRecordMarker::~KexiRecordMarker()
delete d;
}
-QImage* KexiRecordMarker::penImage()
+TQImage* KexiRecordMarker::penImage()
{
initRecordMarkerImages();
return KexiRecordMarker_pen;
}
-QImage* KexiRecordMarker::plusImage()
+TQImage* KexiRecordMarker::plusImage()
{
initRecordMarkerImages();
return KexiRecordMarker_plus;
@@ -178,36 +178,36 @@ int KexiRecordMarker::rows() const
return d->rows;
}
-void KexiRecordMarker::paintEvent(QPaintEvent *e)
+void KexiRecordMarker::paintEvent(TQPaintEvent *e)
{
- QPainter p(this);
- QRect r(e->rect());
+ TQPainter p(this);
+ TQRect r(e->rect());
int first = (r.top() + d->offset) / d->rowHeight;
int last = (r.bottom() + d->offset) / d->rowHeight;
if(last > (d->rows-1+(d->showInsertRow?1:0)))
last = d->rows-1+(d->showInsertRow?1:0);
- QColorGroup selectedColorGroup(colorGroup());
- selectedColorGroup.setColor( QColorGroup::Button,
- KexiUtils::blendedColors( selectedColorGroup.color(QColorGroup::Background),
+ TQColorGroup selectedColorGroup(tqcolorGroup());
+ selectedColorGroup.setColor( TQColorGroup::Button,
+ KexiUtils::blendedColors( selectedColorGroup.color(TQColorGroup::Background),
d->selectionBackgroundColor, 2, 1) );
- selectedColorGroup.setColor( QColorGroup::Background,
- selectedColorGroup.color(QColorGroup::Button) ); //set background color as well (e.g. for thinkeramik)
- QColorGroup highlightedColorGroup(colorGroup());
- highlightedColorGroup.setColor( QColorGroup::Button,
- KexiUtils::blendedColors( highlightedColorGroup.color(QColorGroup::Background),
+ selectedColorGroup.setColor( TQColorGroup::Background,
+ selectedColorGroup.color(TQColorGroup::Button) ); //set background color as well (e.g. for thinkeramik)
+ TQColorGroup highlightedColorGroup(tqcolorGroup());
+ highlightedColorGroup.setColor( TQColorGroup::Button,
+ KexiUtils::blendedColors( highlightedColorGroup.color(TQColorGroup::Background),
d->selectionBackgroundColor, 4, 1) );
- highlightedColorGroup.setColor( QColorGroup::Background,
- highlightedColorGroup.color(QColorGroup::Button) ); //set background color as well (e.g. for thinkeramik)
+ highlightedColorGroup.setColor( TQColorGroup::Background,
+ highlightedColorGroup.color(TQColorGroup::Button) ); //set background color as well (e.g. for thinkeramik)
for(int i=first; i <= last; i++)
{
int y = ((d->rowHeight * i)-d->offset);
- QRect r(0, y, width(), d->rowHeight);
+ TQRect r(0, y, width(), d->rowHeight);
p.drawRect(r);
- style().drawPrimitive( QStyle::PE_HeaderSection, &p, r,
- (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : colorGroup()),
- QStyle::Style_Raised | (isEnabled() ? QStyle::Style_Enabled : 0));
+ tqstyle().tqdrawPrimitive( TQStyle::PE_HeaderSection, &p, r,
+ (d->currentRow == i) ? selectedColorGroup : (d->highlightedRow == i ? highlightedColorGroup : tqcolorGroup()),
+ TQStyle::Style_Raised | (isEnabled() ? TQStyle::Style_Enabled : 0));
}
if (d->editRow!=-1 && d->editRow >= first && d->editRow <= (last/*+1 for insert row*/)) {
//show pen when editing
@@ -220,9 +220,9 @@ void KexiRecordMarker::paintEvent(QPaintEvent *e)
&& (!d->showInsertRow || (d->showInsertRow && d->currentRow < last)))/*don't display marker for 'insert' row*/
{
//show marker
- p.setBrush(colorGroup().foreground());
- p.setPen(QPen(Qt::NoPen));
- QPointArray points(3);
+ p.setBrush(tqcolorGroup().foreground());
+ p.setPen(TQPen(TQt::NoPen));
+ TQPointArray points(3);
int ofs = d->rowHeight / 4;
int ofs2 = (width() - ofs) / 2 -1;
int pos = ((d->rowHeight*d->currentRow)-d->offset)-ofs/2+2;
@@ -294,12 +294,12 @@ void KexiRecordMarker::showInsertRow(bool show)
update();
}
-void KexiRecordMarker::setSelectionBackgroundColor(const QColor &color)
+void KexiRecordMarker::setSelectionBackgroundColor(const TQColor &color)
{
d->selectionBackgroundColor = color;
}
-QColor KexiRecordMarker::selectionBackgroundColor() const
+TQColor KexiRecordMarker::selectionBackgroundColor() const
{
return d->selectionBackgroundColor;
}
diff --git a/kexi/widget/utils/kexirecordmarker.h b/kexi/widget/utils/kexirecordmarker.h
index 1408f83b9..1348ca1d4 100644
--- a/kexi/widget/utils/kexirecordmarker.h
+++ b/kexi/widget/utils/kexirecordmarker.h
@@ -23,23 +23,24 @@
#ifndef KEXIRECORDMARKER_H
#define KEXIRECORDMARKER_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QImage;
+class TQImage;
//! \brief Record marker, usually displayed at the left side of a table view or a continuous form.
-class KEXIGUIUTILS_EXPORT KexiRecordMarker : public QWidget
+class KEXIGUIUTILS_EXPORT KexiRecordMarker : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRecordMarker(QWidget *parent, const char* name = 0);
+ KexiRecordMarker(TQWidget *tqparent, const char* name = 0);
~KexiRecordMarker();
int rows() const;
- static QImage* penImage();
- static QImage* plusImage();
+ static TQImage* penImage();
+ static TQImage* plusImage();
public slots:
void setOffset(int offset);
@@ -51,8 +52,8 @@ class KEXIGUIUTILS_EXPORT KexiRecordMarker : public QWidget
void setEditRow(int row);
void showInsertRow(bool show);
- QColor selectionBackgroundColor() const;
- void setSelectionBackgroundColor(const QColor &color);
+ TQColor selectionBackgroundColor() const;
+ void setSelectionBackgroundColor(const TQColor &color);
void addLabel(bool upd=true);
void removeLabel(bool upd=true);
@@ -63,7 +64,7 @@ class KEXIGUIUTILS_EXPORT KexiRecordMarker : public QWidget
void clear(bool upd=true);
protected:
- virtual void paintEvent(QPaintEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
class Private;
Private * const d;
diff --git a/kexi/widget/utils/kexirecordnavigator.cpp b/kexi/widget/utils/kexirecordnavigator.cpp
index f0dff0878..6fe7fbdc4 100644
--- a/kexi/widget/utils/kexirecordnavigator.cpp
+++ b/kexi/widget/utils/kexirecordnavigator.cpp
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qtoolbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvalidator.h>
-#include <qtooltip.h>
-#include <qscrollview.h>
+#include <tqtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvalidator.h>
+#include <tqtooltip.h>
+#include <tqscrollview.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -46,9 +46,9 @@ class KexiRecordNavigatorPrivate
{
}
KexiRecordNavigatorHandler *handler;
- QHBoxLayout *lyr;
+ TQHBoxLayout *lyr;
- QLabel *editingIndicatorLabel;
+ TQLabel *editingIndicatorLabel;
bool editingIndicatorEnabled : 1;
bool editingIndicatorVisible : 1;
};
@@ -65,103 +65,103 @@ KexiRecordNavigatorHandler::~KexiRecordNavigatorHandler()
//--------------------------------------------------
-KexiRecordNavigator::KexiRecordNavigator(QWidget *parent, int leftMargin, const char *name)
- : QFrame(parent, name)
+KexiRecordNavigator::KexiRecordNavigator(TQWidget *tqparent, int leftMargin, const char *name)
+ : TQFrame(tqparent, name)
, m_view(0)
, m_isInsertingEnabled(true)
, d( new KexiRecordNavigatorPrivate() )
{
- if (parent->inherits("QScrollView"))
- setParentView( dynamic_cast<QScrollView*>(parent) );
- setFrameStyle(QFrame::NoFrame);
- d->lyr = new QHBoxLayout(this,0,0,"nav_lyr");
+ if (tqparent->inherits(TQSCROLLVIEW_OBJECT_NAME_STRING))
+ setParentView( dynamic_cast<TQScrollView*>(tqparent) );
+ setFrameStyle(TQFrame::NoFrame);
+ d->lyr = new TQHBoxLayout(this,0,0,"nav_lyr");
- m_textLabel = new QLabel(this);
+ m_textLabel = new TQLabel(this);
d->lyr->addWidget( m_textLabel );
setLabelText(i18n("Row:"));
- int bw = 6+SmallIcon("navigator_first").width(); //QMIN( horizontalScrollBar()->height(), 20);
- QFont f = font();
+ int bw = 6+SmallIcon("navigator_first").width(); //TQMIN( horizontalScrollBar()->height(), 20);
+ TQFont f = font();
f.setPixelSize((bw > 12) ? 12 : bw);
- QFontMetrics fm(f);
+ TQFontMetrics fm(f);
m_nav1DigitWidth = fm.width("8");
- d->lyr->addWidget( m_navBtnFirst = new QToolButton(this) );
+ d->lyr->addWidget( m_navBtnFirst = new TQToolButton(this) );
m_navBtnFirst->setFixedWidth(bw);
- m_navBtnFirst->setFocusPolicy(NoFocus);
+ m_navBtnFirst->setFocusPolicy(TQ_NoFocus);
m_navBtnFirst->setIconSet( SmallIconSet("navigator_first") );
- QToolTip::add(m_navBtnFirst, i18n("First row"));
+ TQToolTip::add(m_navBtnFirst, i18n("First row"));
- d->lyr->addWidget( m_navBtnPrev = new QToolButton(this) );
+ d->lyr->addWidget( m_navBtnPrev = new TQToolButton(this) );
m_navBtnPrev->setFixedWidth(bw);
- m_navBtnPrev->setFocusPolicy(NoFocus);
+ m_navBtnPrev->setFocusPolicy(TQ_NoFocus);
m_navBtnPrev->setIconSet( SmallIconSet("navigator_prev") );
m_navBtnPrev->setAutoRepeat(true);
- QToolTip::add(m_navBtnPrev, i18n("Previous row"));
+ TQToolTip::add(m_navBtnPrev, i18n("Previous row"));
d->lyr->addSpacing( 6 );
d->lyr->addWidget( m_navRecordNumber = new KLineEdit(this) );
- m_navRecordNumber->setAlignment(AlignRight | AlignVCenter);
- m_navRecordNumber->setFocusPolicy(ClickFocus);
+ m_navRecordNumber->tqsetAlignment(AlignRight | AlignVCenter);
+ m_navRecordNumber->setFocusPolicy(TQ_ClickFocus);
m_navRecordNumber->installEventFilter(this);
// m_navRowNumber->setFixedWidth(fw);
- m_navRecordNumberValidator = new QIntValidator(1, INT_MAX, this);
+ m_navRecordNumberValidator = new TQIntValidator(1, INT_MAX, TQT_TQOBJECT(this));
m_navRecordNumber->setValidator(m_navRecordNumberValidator);
m_navRecordNumber->installEventFilter(this);
- QToolTip::add(m_navRecordNumber, i18n("Current row number"));
+ TQToolTip::add(m_navRecordNumber, i18n("Current row number"));
KLineEdit *lbl_of = new KLineEdit(i18n("of"), this);
- lbl_of->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Preferred);
+ lbl_of->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred);
lbl_of->setMaximumWidth(fm.width(lbl_of->text())+8);
lbl_of->setReadOnly(true);
lbl_of->setLineWidth(0);
- lbl_of->setFocusPolicy(NoFocus);
- lbl_of->setAlignment(AlignCenter);
+ lbl_of->setFocusPolicy(TQ_NoFocus);
+ lbl_of->tqsetAlignment(AlignCenter);
d->lyr->addWidget( lbl_of );
d->lyr->addWidget( m_navRecordCount = new KLineEdit(this) );
- m_navRecordCount->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Preferred);
+ m_navRecordCount->tqsetSizePolicy(TQSizePolicy::Fixed,TQSizePolicy::Preferred);
m_navRecordCount->setReadOnly(true);
m_navRecordCount->setLineWidth(0);
- m_navRecordCount->setFocusPolicy(NoFocus);
- m_navRecordCount->setAlignment(AlignLeft | AlignVCenter);
- QToolTip::add(m_navRecordCount, i18n("Number of rows"));
+ m_navRecordCount->setFocusPolicy(TQ_NoFocus);
+ m_navRecordCount->tqsetAlignment(AlignLeft | AlignVCenter);
+ TQToolTip::add(m_navRecordCount, i18n("Number of rows"));
lbl_of->setFont(f);
m_navRecordNumber->setFont(f);
m_navRecordCount->setFont(f);
setFont(f);
- d->lyr->addWidget( m_navBtnNext = new QToolButton(this) );
+ d->lyr->addWidget( m_navBtnNext = new TQToolButton(this) );
m_navBtnNext->setFixedWidth(bw);
- m_navBtnNext->setFocusPolicy(NoFocus);
+ m_navBtnNext->setFocusPolicy(TQ_NoFocus);
m_navBtnNext->setIconSet( SmallIconSet("navigator_next") );
m_navBtnNext->setAutoRepeat(true);
- QToolTip::add(m_navBtnNext, i18n("Next row"));
+ TQToolTip::add(m_navBtnNext, i18n("Next row"));
- d->lyr->addWidget( m_navBtnLast = new QToolButton(this) );
+ d->lyr->addWidget( m_navBtnLast = new TQToolButton(this) );
m_navBtnLast->setFixedWidth(bw);
- m_navBtnLast->setFocusPolicy(NoFocus);
+ m_navBtnLast->setFocusPolicy(TQ_NoFocus);
m_navBtnLast->setIconSet( SmallIconSet("navigator_last") );
- QToolTip::add(m_navBtnLast, i18n("Last row"));
+ TQToolTip::add(m_navBtnLast, i18n("Last row"));
d->lyr->addSpacing( 6 );
- d->lyr->addWidget( m_navBtnNew = new QToolButton(this) );
+ d->lyr->addWidget( m_navBtnNew = new TQToolButton(this) );
m_navBtnNew->setFixedWidth(bw);
- m_navBtnNew->setFocusPolicy(NoFocus);
+ m_navBtnNew->setFocusPolicy(TQ_NoFocus);
m_navBtnNew->setIconSet( SmallIconSet("navigator_new") );
- QToolTip::add(m_navBtnNew, i18n("New row"));
+ TQToolTip::add(m_navBtnNew, i18n("New row"));
m_navBtnNext->setEnabled(isInsertingEnabled());
d->lyr->addSpacing( 6 );
d->lyr->addStretch(10);
- connect(m_navBtnPrev,SIGNAL(clicked()),this,SLOT(slotPrevButtonClicked()));
- connect(m_navBtnNext,SIGNAL(clicked()),this,SLOT(slotNextButtonClicked()));
- connect(m_navBtnLast,SIGNAL(clicked()),this,SLOT(slotLastButtonClicked()));
- connect(m_navBtnFirst,SIGNAL(clicked()),this,SLOT(slotFirstButtonClicked()));
- connect(m_navBtnNew,SIGNAL(clicked()),this,SLOT(slotNewButtonClicked()));
+ connect(m_navBtnPrev,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPrevButtonClicked()));
+ connect(m_navBtnNext,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNextButtonClicked()));
+ connect(m_navBtnLast,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotLastButtonClicked()));
+ connect(m_navBtnFirst,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotFirstButtonClicked()));
+ connect(m_navBtnNew,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotNewButtonClicked()));
setRecordCount(0);
setCurrentRecordNumber(0);
@@ -185,30 +185,30 @@ void KexiRecordNavigator::setInsertingEnabled(bool set)
void KexiRecordNavigator::setEnabled( bool set )
{
- QFrame::setEnabled(set);
+ TQFrame::setEnabled(set);
if (set && !m_isInsertingEnabled)
m_navBtnNew->setEnabled( false );
}
-bool KexiRecordNavigator::eventFilter( QObject *o, QEvent *e )
+bool KexiRecordNavigator::eventFilter( TQObject *o, TQEvent *e )
{
- if (o==m_navRecordNumber) {
+ if (TQT_BASE_OBJECT(o)==TQT_BASE_OBJECT(m_navRecordNumber)) {
bool recordEntered = false;
bool ret;
- if (e->type()==QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ if (e->type()==TQEvent::KeyPress) {
+ TQKeyEvent *ke = TQT_TQKEYEVENT(e);
switch (ke->key()) {
- case Qt::Key_Escape: {
+ case TQt::Key_Escape: {
ke->accept();
m_navRecordNumber->undo();
if (m_view)
m_view->setFocus();
return true;
}
- case Qt::Key_Enter:
- case Qt::Key_Return:
- case Qt::Key_Tab:
- case Qt::Key_BackTab:
+ case TQt::Key_Enter:
+ case TQt::Key_Return:
+ case TQt::Key_Tab:
+ case TQt::Key_BackTab:
{
recordEntered=true;
ke->accept(); //to avoid pressing Enter later
@@ -217,10 +217,10 @@ bool KexiRecordNavigator::eventFilter( QObject *o, QEvent *e )
default:;
}
}
- else if (e->type()==QEvent::FocusOut) {
- if (static_cast<QFocusEvent*>(e)->reason()!=QFocusEvent::Tab
- && static_cast<QFocusEvent*>(e)->reason()!=QFocusEvent::Backtab
- && static_cast<QFocusEvent*>(e)->reason()!=QFocusEvent::Other)
+ else if (e->type()==TQEvent::FocusOut) {
+ if (TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Tab
+ && TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Backtab
+ && TQT_TQFOCUSEVENT(e)->reason()!=TQFocusEvent::Other)
recordEntered=true;
ret = false;
}
@@ -230,7 +230,7 @@ bool KexiRecordNavigator::eventFilter( QObject *o, QEvent *e )
uint r = m_navRecordNumber->text().toUInt(&ok);
if (!ok || r<1)
r = (recordCount()>0)?1:0;
- if (m_view && (hasFocus() || e->type()==QEvent::KeyPress))
+ if (m_view && (hasFocus() || e->type()==TQEvent::KeyPress))
m_view->setFocus();
setCurrentRecordNumber(r);
emit recordNumberEntered(r);
@@ -253,14 +253,14 @@ void KexiRecordNavigator::setCurrentRecordNumber(uint r)
uint recCnt = recordCount();
if (r>(recCnt+(m_isInsertingEnabled?1:0)))
r = recCnt+(m_isInsertingEnabled?1:0);
- QString n;
+ TQString n;
if (r>0)
- n = QString::number(r);
+ n = TQString::number(r);
else
n = " ";
// if (d->navRecordNumber->text().length() != n.length()) {//resize
// d->navRecordNumber->setFixedWidth(
-// d->nav1DigitWidth*QMAX( QMAX(n.length(),2)+1,d->navRecordCount->text().length()+1)+6
+// d->nav1DigitWidth*TQMAX( TQMAX(n.length(),2)+1,d->navRecordCount->text().length()+1)+6
// );
// }
@@ -283,7 +283,7 @@ void KexiRecordNavigator::updateButtons(uint recCnt)
void KexiRecordNavigator::setRecordCount(uint count)
{
- const QString & n = QString::number(count);
+ const TQString & n = TQString::number(count);
if (m_isInsertingEnabled && currentRecordNumber()==0) {
setCurrentRecordNumber(1);
}
@@ -297,7 +297,7 @@ void KexiRecordNavigator::setRecordCount(uint count)
}
}
//update row number widget's width
- const int w = m_nav1DigitWidth*QMAX( QMAX(n.length(),2)+1,m_navRecordNumber->text().length()+1)+6;
+ const int w = m_nav1DigitWidth*TQMAX( TQMAX(n.length(),2)+1,m_navRecordNumber->text().length()+1)+6;
if (m_navRecordNumber->width()!=w) //resize
m_navRecordNumber->setFixedWidth(w);
@@ -326,18 +326,18 @@ uint KexiRecordNavigator::recordCount() const
return r;
}
-void KexiRecordNavigator::setParentView(QScrollView *view)
+void KexiRecordNavigator::setParentView(TQScrollView *view)
{
m_view = view;
}
void KexiRecordNavigator::updateGeometry(int leftMargin)
{
- QFrame::updateGeometry();
+ TQFrame::updateGeometry();
if (m_view) {
int navWidth;
if (m_view->horizontalScrollBar()->isVisible()) {
- navWidth = sizeHint().width();
+ navWidth = tqsizeHint().width();
}
else {
navWidth = leftMargin + m_view->clipper()->width();
@@ -345,23 +345,23 @@ void KexiRecordNavigator::updateGeometry(int leftMargin)
setGeometry(
m_view->frameWidth(),
- m_view->height() - m_view->horizontalScrollBar()->sizeHint().height()-m_view->frameWidth(),
+ m_view->height() - m_view->horizontalScrollBar()->tqsizeHint().height()-m_view->frameWidth(),
navWidth,
- m_view->horizontalScrollBar()->sizeHint().height()
+ m_view->horizontalScrollBar()->tqsizeHint().height()
);
m_view->updateScrollBars();
}
}
-void KexiRecordNavigator::setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h )
+void KexiRecordNavigator::setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h )
{
hbar.setGeometry( x + width(), y, w - width(), h );
}
-void KexiRecordNavigator::setLabelText(const QString& text)
+void KexiRecordNavigator::setLabelText(const TQString& text)
{
- m_textLabel->setText(text.isEmpty() ? QString::null : (QString::fromLatin1(" ")+text+" "));
+ m_textLabel->setText(text.isEmpty() ? TQString() : (TQString::tqfromLatin1(" ")+text+" "));
}
void KexiRecordNavigator::setInsertingButtonVisible(bool set)
@@ -428,9 +428,9 @@ void KexiRecordNavigator::setEditingIndicatorEnabled(bool set)
d->editingIndicatorEnabled = set;
if (d->editingIndicatorEnabled) {
if (!d->editingIndicatorLabel) {
- d->editingIndicatorLabel = new QLabel(this);
- d->editingIndicatorLabel->setAlignment(Qt::AlignCenter);
- QPixmap pix;
+ d->editingIndicatorLabel = new TQLabel(this);
+ d->editingIndicatorLabel->tqsetAlignment(TQt::AlignCenter);
+ TQPixmap pix;
pix.convertFromImage( *KexiRecordMarker::penImage() );
d->editingIndicatorLabel->setFixedWidth( pix.width() + 2*2 );
d->lyr->insertWidget( 0, d->editingIndicatorLabel );
@@ -451,14 +451,14 @@ void KexiRecordNavigator::showEditingIndicator(bool show)
if (!d->editingIndicatorEnabled)
return;
if (d->editingIndicatorVisible) {
- QPixmap pix;
+ TQPixmap pix;
pix.convertFromImage( *KexiRecordMarker::penImage() );
d->editingIndicatorLabel->setPixmap( pix );
- QToolTip::add( d->editingIndicatorLabel, i18n("Editing indicator") );
+ TQToolTip::add( d->editingIndicatorLabel, i18n("Editing indicator") );
}
else {
- d->editingIndicatorLabel->setPixmap( QPixmap() );
- QToolTip::remove( d->editingIndicatorLabel );
+ d->editingIndicatorLabel->setPixmap( TQPixmap() );
+ TQToolTip::remove( d->editingIndicatorLabel );
}
}
diff --git a/kexi/widget/utils/kexirecordnavigator.h b/kexi/widget/utils/kexirecordnavigator.h
index 674746e22..29faf1158 100644
--- a/kexi/widget/utils/kexirecordnavigator.h
+++ b/kexi/widget/utils/kexirecordnavigator.h
@@ -21,14 +21,14 @@
#ifndef KEXIRECORDNAVIGATOR_H
#define KEXIRECORDNAVIGATOR_H
-#include <qframe.h>
+#include <tqframe.h>
#include <kexi_export.h>
-class QToolButton;
-class QIntValidator;
-class QScrollView;
-class QScrollBar;
-class QLabel;
+class TQToolButton;
+class TQIntValidator;
+class TQScrollView;
+class TQScrollBar;
+class TQLabel;
class KLineEdit;
class KGuiItem;
class KexiRecordNavigatorPrivate;
@@ -62,15 +62,16 @@ class KEXIGUIUTILS_EXPORT KexiRecordNavigatorHandler
Note that using this way, you can allow to exist more than one navigator widget
connected with your data-aware object (don't matter if this is sane).
*/
-class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public QFrame
+class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiRecordNavigator(QWidget *parent, int leftMargin = 0, const char *name=0);
+ KexiRecordNavigator(TQWidget *tqparent, int leftMargin = 0, const char *name=0);
virtual ~KexiRecordNavigator();
- void setParentView(QScrollView *view);
+ void setParentView(TQScrollView *view);
/*! Sets record navigator handler. This allows to react
on actions performed within navigator and vice versa. */
@@ -86,15 +87,15 @@ class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public QFrame
/*! \return record count displayed for this navigator. */
uint recordCount() const;
- /*! Sets horizontal bar's \a hbar (at the bottom) geometry so this record navigator
+ /*! Sets horizontal bar's \a hbar (at the bottom) tqgeometry so this record navigator
is properly positioned together with horizontal scroll bar. This method is used
- in QScrollView::setHBarGeometry() implementations:
+ in TQScrollView::setHBarGeometry() implementations:
see KexiTableView::setHBarGeometry() and KexiFormScrollView::setHBarGeometry()
for usage examples. */
- void setHBarGeometry( QScrollBar & hbar, int x, int y, int w, int h );
+ void setHBarGeometry( TQScrollBar & hbar, int x, int y, int w, int h );
/*! @internal used for keyboard handling. */
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
/*! \return true if "editing" indicator is visible for this navigator.
@see showEditingIndicator() */
@@ -149,7 +150,7 @@ class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public QFrame
/*! Sets label text at the left of the for record navigator's button.
By default this label contains translated "Row:" text. */
- void setLabelText(const QString& text);
+ void setLabelText(const TQString& text);
signals:
void prevButtonClicked();
@@ -165,23 +166,23 @@ class KEXIGUIUTILS_EXPORT KexiRecordNavigator : public QFrame
void slotLastButtonClicked();
void slotFirstButtonClicked();
void slotNewButtonClicked();
- //void slotRecordNumberReturnPressed(const QString& text);
+ //void slotRecordNumberReturnPressed(const TQString& text);
protected:
void updateButtons(uint recCnt);
- QLabel *m_textLabel;
- QToolButton *m_navBtnFirst;
- QToolButton *m_navBtnPrev;
- QToolButton *m_navBtnNext;
- QToolButton *m_navBtnLast;
- QToolButton *m_navBtnNew;
+ TQLabel *m_textLabel;
+ TQToolButton *m_navBtnFirst;
+ TQToolButton *m_navBtnPrev;
+ TQToolButton *m_navBtnNext;
+ TQToolButton *m_navBtnLast;
+ TQToolButton *m_navBtnNew;
KLineEdit *m_navRecordNumber;
- QIntValidator *m_navRecordNumberValidator;
+ TQIntValidator *m_navRecordNumberValidator;
KLineEdit *m_navRecordCount; //!< readonly counter
uint m_nav1DigitWidth;
// uint m_recordCount;
- QScrollView *m_view;
+ TQScrollView *m_view;
bool m_isInsertingEnabled : 1;
KexiRecordNavigatorPrivate *d;
diff --git a/kexi/widget/utils/kexisharedactionclient.h b/kexi/widget/utils/kexisharedactionclient.h
index 80181bc7e..58b3bd6a3 100644
--- a/kexi/widget/utils/kexisharedactionclient.h
+++ b/kexi/widget/utils/kexisharedactionclient.h
@@ -20,7 +20,7 @@
#ifndef KEXISHAREDACTIONCLIENT_H
#define KEXISHAREDACTIONCLIENT_H
-#include <qasciidict.h>
+#include <tqasciidict.h>
class KAction;
#include <kexi_export.h>
@@ -43,7 +43,7 @@ class KEXIGUIUTILS_EXPORT KexiSharedActionClient
protected:
//! Actions pluged for this widget using plugSharedAction(), available by name.
- QAsciiDict<KAction> m_sharedActions;
+ TQAsciiDict<KAction> m_sharedActions;
};
#endif
diff --git a/kexi/widget/utils/kexitooltip.cpp b/kexi/widget/utils/kexitooltip.cpp
index 69a8b583c..d5df13aa8 100644
--- a/kexi/widget/utils/kexitooltip.cpp
+++ b/kexi/widget/utils/kexitooltip.cpp
@@ -19,58 +19,58 @@
#include "kexitooltip.h"
-#include <qpixmap.h>
-#include <qbitmap.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qtooltip.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
-KexiToolTip::KexiToolTip(const QVariant& value, QWidget* parent)
- : QWidget(parent, "KexiToolTip", Qt::WStyle_Customize | Qt::WType_Popup | Qt::WStyle_NoBorder
- | Qt::WX11BypassWM | Qt::WDestructiveClose)
+KexiToolTip::KexiToolTip(const TQVariant& value, TQWidget* tqparent)
+ : TQWidget(tqparent, "KexiToolTip", TQt::WStyle_Customize | TQt::WType_Popup | TQt::WStyle_NoBorder
+ | TQt::WX11BypassWM | TQt::WDestructiveClose)
, m_value(value)
{
- setPalette( QToolTip::palette() );
- setFocusPolicy(QWidget::NoFocus);
+ setPalette( TQToolTip::palette() );
+ setFocusPolicy(TQ_NoFocus);
}
KexiToolTip::~KexiToolTip()
{
}
-QSize KexiToolTip::sizeHint() const
+TQSize KexiToolTip::tqsizeHint() const
{
- QSize sz(fontMetrics().boundingRect(m_value.toString()).size());
+ TQSize sz(fontMetrics().boundingRect(m_value.toString()).size());
return sz;
}
void KexiToolTip::show()
{
updateGeometry();
- QWidget::show();
+ TQWidget::show();
}
-void KexiToolTip::paintEvent( QPaintEvent *pev )
+void KexiToolTip::paintEvent( TQPaintEvent *pev )
{
- QWidget::paintEvent(pev);
- QPainter p(this);
+ TQWidget::paintEvent(pev);
+ TQPainter p(this);
drawFrame(p);
drawContents(p);
}
-void KexiToolTip::drawFrame(QPainter& p)
+void KexiToolTip::drawFrame(TQPainter& p)
{
- p.setPen( QPen(palette().active().foreground(), 1) );
+ p.setPen( TQPen(tqpalette().active().foreground(), 1) );
p.drawRect(rect());
}
-void KexiToolTip::drawContents(QPainter& p)
+void KexiToolTip::drawContents(TQPainter& p)
{
- p.drawText(rect(), Qt::AlignCenter, m_value.toString());
+ p.drawText(rect(), TQt::AlignCenter, m_value.toString());
}
#include "kexitooltip.moc"
diff --git a/kexi/widget/utils/kexitooltip.h b/kexi/widget/utils/kexitooltip.h
index cbb0931f4..3ff931206 100644
--- a/kexi/widget/utils/kexitooltip.h
+++ b/kexi/widget/utils/kexitooltip.h
@@ -20,28 +20,29 @@
#ifndef KEXITOOLTIP_H
#define KEXITOOLTIP_H
-#include <qwidget.h>
-#include <qvariant.h>
+#include <tqwidget.h>
+#include <tqvariant.h>
//! \brief A tooltip that can display rich content
-class KEXIGUIUTILS_EXPORT KexiToolTip : public QWidget
+class KEXIGUIUTILS_EXPORT KexiToolTip : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- KexiToolTip(const QVariant& value, QWidget* parent);
+ KexiToolTip(const TQVariant& value, TQWidget* tqparent);
virtual ~KexiToolTip();
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
public slots:
virtual void show();
protected:
- virtual void paintEvent( QPaintEvent *pev );
- virtual void drawFrame(QPainter& p);
- virtual void drawContents(QPainter& p);
+ virtual void paintEvent( TQPaintEvent *pev );
+ virtual void drawFrame(TQPainter& p);
+ virtual void drawContents(TQPainter& p);
- QVariant m_value;
+ TQVariant m_value;
};
#endif
diff --git a/kexi/widget/utils/klistviewitemtemplate.h b/kexi/widget/utils/klistviewitemtemplate.h
index 1c89f96c3..3807d43cb 100644
--- a/kexi/widget/utils/klistviewitemtemplate.h
+++ b/kexi/widget/utils/klistviewitemtemplate.h
@@ -22,27 +22,27 @@
#include <klistview.h>
-//! QListViewItem class with ability for storing additional data member
+//! TQListViewItem class with ability for storing additional data member
template<class type>
class KListViewItemTemplate : public KListViewItem
{
public:
- KListViewItemTemplate(type _data, QListView *parent)
- : KListViewItem(parent), data(_data) {}
- KListViewItemTemplate(type _data, QListViewItem *parent)
- : KListViewItem(parent), data(_data) {}
- KListViewItemTemplate(type _data, QListView *parent, QListViewItem *after)
- : KListViewItem(parent, after), data(_data) {}
- KListViewItemTemplate(type _data, QListViewItem *parent, QListViewItem *after)
- : KListViewItem(parent, after), data(_data) {}
- KListViewItemTemplate(type _data, QListView *parent, QString label1, QString label2=QString::null, QString label3=QString::null, QString label4=QString::null, QString label5=QString::null, QString label6=QString::null, QString label7=QString::null, QString label8=QString::null)
- : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
- KListViewItemTemplate(type _data, QListViewItem *parent, QString label1, QString label2=QString::null, QString label3=QString::null, QString label4=QString::null, QString label5=QString::null, QString label6=QString::null, QString label7=QString::null, QString label8=QString::null)
- : KListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
- KListViewItemTemplate(type _data, QListView *parent, QListViewItem *after, QString label1, QString label2=QString::null, QString label3=QString::null, QString label4=QString::null, QString label5=QString::null, QString label6=QString::null, QString label7=QString::null, QString label8=QString::null)
- : KListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
- KListViewItemTemplate(type _data, QListViewItem *parent, QListViewItem *after, QString label1, QString label2=QString::null, QString label3=QString::null, QString label4=QString::null, QString label5=QString::null, QString label6=QString::null, QString label7=QString::null, QString label8=QString::null)
- : KListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
+ KListViewItemTemplate(type _data, TQListView *tqparent)
+ : KListViewItem(tqparent), data(_data) {}
+ KListViewItemTemplate(type _data, TQListViewItem *tqparent)
+ : KListViewItem(tqparent), data(_data) {}
+ KListViewItemTemplate(type _data, TQListView *tqparent, TQListViewItem *after)
+ : KListViewItem(tqparent, after), data(_data) {}
+ KListViewItemTemplate(type _data, TQListViewItem *tqparent, TQListViewItem *after)
+ : KListViewItem(tqparent, after), data(_data) {}
+ KListViewItemTemplate(type _data, TQListView *tqparent, TQString label1, TQString label2=TQString(), TQString label3=TQString(), TQString label4=TQString(), TQString label5=TQString(), TQString label6=TQString(), TQString label7=TQString(), TQString label8=TQString())
+ : KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
+ KListViewItemTemplate(type _data, TQListViewItem *tqparent, TQString label1, TQString label2=TQString(), TQString label3=TQString(), TQString label4=TQString(), TQString label5=TQString(), TQString label6=TQString(), TQString label7=TQString(), TQString label8=TQString())
+ : KListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
+ KListViewItemTemplate(type _data, TQListView *tqparent, TQListViewItem *after, TQString label1, TQString label2=TQString(), TQString label3=TQString(), TQString label4=TQString(), TQString label5=TQString(), TQString label6=TQString(), TQString label7=TQString(), TQString label8=TQString())
+ : KListViewItem(tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
+ KListViewItemTemplate(type _data, TQListViewItem *tqparent, TQListViewItem *after, TQString label1, TQString label2=TQString(), TQString label3=TQString(), TQString label4=TQString(), TQString label5=TQString(), TQString label6=TQString(), TQString label7=TQString(), TQString label8=TQString())
+ : KListViewItem(tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8), data(_data) {}
type data;
};