summaryrefslogtreecommitdiffstats
path: root/kspread
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 /kspread
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 'kspread')
-rw-r--r--kspread/DESIGN.html44
-rw-r--r--kspread/Doxyfile6
-rw-r--r--kspread/KSpreadAppIface.cc18
-rw-r--r--kspread/KSpreadAppIface.h10
-rw-r--r--kspread/KSpreadCellIface.cc268
-rw-r--r--kspread/KSpreadCellIface.h112
-rw-r--r--kspread/KSpreadColumnIface.cc2
-rw-r--r--kspread/KSpreadDocIface.cc48
-rw-r--r--kspread/KSpreadDocIface.h26
-rw-r--r--kspread/KSpreadLayoutIface.cc230
-rw-r--r--kspread/KSpreadLayoutIface.h44
-rw-r--r--kspread/KSpreadMapIface.cc28
-rw-r--r--kspread/KSpreadMapIface.h16
-rw-r--r--kspread/KSpreadRowIface.cc2
-rw-r--r--kspread/KSpreadTableIface.cc72
-rw-r--r--kspread/KSpreadTableIface.h48
-rw-r--r--kspread/KSpreadViewIface.cc38
-rw-r--r--kspread/KSpreadViewIface.h36
-rw-r--r--kspread/OASIS.txt32
-rw-r--r--kspread/commands.cc144
-rw-r--r--kspread/commands.h104
-rw-r--r--kspread/dependencies.cc128
-rw-r--r--kspread/dependencies.h6
-rw-r--r--kspread/dialogs/SheetSelectWidget.ui4
-rw-r--r--kspread/dialogs/font_cell_format.ui36
-rw-r--r--kspread/dialogs/kspread_dlg_angle.cc20
-rw-r--r--kspread/dialogs/kspread_dlg_angle.h5
-rw-r--r--kspread/dialogs/kspread_dlg_area.cc36
-rw-r--r--kspread/dialogs/kspread_dlg_area.h15
-rw-r--r--kspread/dialogs/kspread_dlg_comment.cc22
-rw-r--r--kspread/dialogs/kspread_dlg_comment.h11
-rw-r--r--kspread/dialogs/kspread_dlg_conditional.cc140
-rw-r--r--kspread/dialogs/kspread_dlg_conditional.h40
-rw-r--r--kspread/dialogs/kspread_dlg_cons.cc198
-rw-r--r--kspread/dialogs/kspread_dlg_cons.h39
-rw-r--r--kspread/dialogs/kspread_dlg_csv.cc218
-rw-r--r--kspread/dialogs/kspread_dlg_csv.h89
-rw-r--r--kspread/dialogs/kspread_dlg_database.cc436
-rw-r--r--kspread/dialogs/kspread_dlg_database.h137
-rw-r--r--kspread/dialogs/kspread_dlg_find.cc68
-rw-r--r--kspread/dialogs/kspread_dlg_find.h29
-rw-r--r--kspread/dialogs/kspread_dlg_format.cc62
-rw-r--r--kspread/dialogs/kspread_dlg_format.h33
-rw-r--r--kspread/dialogs/kspread_dlg_formula.cc244
-rw-r--r--kspread/dialogs/kspread_dlg_formula.h85
-rw-r--r--kspread/dialogs/kspread_dlg_goalseek.cc102
-rw-r--r--kspread/dialogs/kspread_dlg_goalseek.h69
-rw-r--r--kspread/dialogs/kspread_dlg_goto.cc26
-rw-r--r--kspread/dialogs/kspread_dlg_goto.h5
-rw-r--r--kspread/dialogs/kspread_dlg_insert.cc40
-rw-r--r--kspread/dialogs/kspread_dlg_insert.h19
-rw-r--r--kspread/dialogs/kspread_dlg_layout.cc1092
-rw-r--r--kspread/dialogs/kspread_dlg_layout.h282
-rw-r--r--kspread/dialogs/kspread_dlg_list.cc86
-rw-r--r--kspread/dialogs/kspread_dlg_list.h31
-rw-r--r--kspread/dialogs/kspread_dlg_paperlayout.cc182
-rw-r--r--kspread/dialogs/kspread_dlg_paperlayout.h59
-rw-r--r--kspread/dialogs/kspread_dlg_pasteinsert.cc28
-rw-r--r--kspread/dialogs/kspread_dlg_pasteinsert.h13
-rw-r--r--kspread/dialogs/kspread_dlg_preference.cc316
-rw-r--r--kspread/dialogs/kspread_dlg_preference.h104
-rw-r--r--kspread/dialogs/kspread_dlg_reference.cc138
-rw-r--r--kspread/dialogs/kspread_dlg_reference.h46
-rw-r--r--kspread/dialogs/kspread_dlg_resize2.cc44
-rw-r--r--kspread/dialogs/kspread_dlg_resize2.h6
-rw-r--r--kspread/dialogs/kspread_dlg_series.cc70
-rw-r--r--kspread/dialogs/kspread_dlg_series.h17
-rw-r--r--kspread/dialogs/kspread_dlg_show.cc38
-rw-r--r--kspread/dialogs/kspread_dlg_show.h9
-rw-r--r--kspread/dialogs/kspread_dlg_showColRow.cc48
-rw-r--r--kspread/dialogs/kspread_dlg_showColRow.h13
-rw-r--r--kspread/dialogs/kspread_dlg_sort.cc230
-rw-r--r--kspread/dialogs/kspread_dlg_sort.h63
-rw-r--r--kspread/dialogs/kspread_dlg_special.cc56
-rw-r--r--kspread/dialogs/kspread_dlg_special.h11
-rw-r--r--kspread/dialogs/kspread_dlg_styles.cc62
-rw-r--r--kspread/dialogs/kspread_dlg_styles.h14
-rw-r--r--kspread/dialogs/kspread_dlg_subtotal.cc62
-rw-r--r--kspread/dialogs/kspread_dlg_subtotal.h15
-rw-r--r--kspread/dialogs/kspread_dlg_validity.cc198
-rw-r--r--kspread/dialogs/kspread_dlg_validity.h49
-rw-r--r--kspread/dialogs/kspreadsubtotal.ui34
-rw-r--r--kspread/dialogs/link.cc122
-rw-r--r--kspread/dialogs/link.h11
-rw-r--r--kspread/dialogs/position_cell_format.ui70
-rw-r--r--kspread/dialogs/protection_cell_format.ui32
-rw-r--r--kspread/dialogs/sheet_properties.cc16
-rw-r--r--kspread/dialogs/sheet_properties.h7
-rw-r--r--kspread/dialogs/sheet_properties_base.ui44
-rw-r--r--kspread/digest.cc6
-rw-r--r--kspread/digest.h6
-rw-r--r--kspread/doc/PAINTING.html10
-rw-r--r--kspread/formula.cc134
-rw-r--r--kspread/formula.h42
-rw-r--r--kspread/functions.cc90
-rw-r--r--kspread/functions.h70
-rw-r--r--kspread/ksploadinginfo.h26
-rw-r--r--kspread/kspread_autofill.cc202
-rw-r--r--kspread/kspread_autofill.h36
-rw-r--r--kspread/kspread_brush.cc42
-rw-r--r--kspread/kspread_brush.h26
-rw-r--r--kspread/kspread_canvas.cc1214
-rw-r--r--kspread/kspread_canvas.h201
-rw-r--r--kspread/kspread_cell.cc1388
-rw-r--r--kspread/kspread_cell.h252
-rw-r--r--kspread/kspread_cluster.cc28
-rw-r--r--kspread/kspread_cluster.h18
-rw-r--r--kspread/kspread_condition.cc150
-rw-r--r--kspread/kspread_condition.h40
-rw-r--r--kspread/kspread_doc.cc454
-rw-r--r--kspread/kspread_doc.h167
-rw-r--r--kspread/kspread_editors.cc372
-rw-r--r--kspread/kspread_editors.h95
-rw-r--r--kspread/kspread_events.cc2
-rw-r--r--kspread/kspread_events.h14
-rw-r--r--kspread/kspread_factory.cc8
-rw-r--r--kspread/kspread_factory.h5
-rw-r--r--kspread/kspread_format.cc485
-rw-r--r--kspread/kspread_format.h208
-rw-r--r--kspread/kspread_functions_conversion.cc28
-rw-r--r--kspread/kspread_functions_database.cc2
-rw-r--r--kspread/kspread_functions_datetime.cc94
-rw-r--r--kspread/kspread_functions_engineering.cc236
-rw-r--r--kspread/kspread_functions_financial.cc42
-rw-r--r--kspread/kspread_functions_helper.cc18
-rw-r--r--kspread/kspread_functions_helper.h6
-rw-r--r--kspread/kspread_functions_information.cc16
-rw-r--r--kspread/kspread_functions_math.cc14
-rw-r--r--kspread/kspread_functions_reference.cc18
-rw-r--r--kspread/kspread_functions_statistical.cc6
-rw-r--r--kspread/kspread_functions_text.cc134
-rw-r--r--kspread/kspread_generalProperty.cpp56
-rw-r--r--kspread/kspread_generalProperty.h9
-rw-r--r--kspread/kspread_genvalidationstyle.cc86
-rw-r--r--kspread/kspread_genvalidationstyle.h42
-rw-r--r--kspread/kspread_global.h14
-rw-r--r--kspread/kspread_handler.cc114
-rw-r--r--kspread/kspread_handler.h27
-rw-r--r--kspread/kspread_locale.cc14
-rw-r--r--kspread/kspread_locale.h8
-rw-r--r--kspread/kspread_map.cc112
-rw-r--r--kspread/kspread_map.h51
-rw-r--r--kspread/kspread_numformat.cc256
-rw-r--r--kspread/kspread_object.cc520
-rw-r--r--kspread/kspread_object.h126
-rw-r--r--kspread/kspread_pen.cc14
-rw-r--r--kspread/kspread_pen.h12
-rw-r--r--kspread/kspread_propertyEditor.cpp14
-rw-r--r--kspread/kspread_propertyEditor.h9
-rw-r--r--kspread/kspread_sheet.cc1234
-rw-r--r--kspread/kspread_sheet.h294
-rw-r--r--kspread/kspread_sheetprint.cc344
-rw-r--r--kspread/kspread_sheetprint.h135
-rw-r--r--kspread/kspread_style.cc526
-rw-r--r--kspread/kspread_style.h220
-rw-r--r--kspread/kspread_style_manager.cc102
-rw-r--r--kspread/kspread_style_manager.h28
-rw-r--r--kspread/kspread_toolbox.cc78
-rw-r--r--kspread/kspread_toolbox.h38
-rw-r--r--kspread/kspread_undo.cc512
-rw-r--r--kspread/kspread_undo.h298
-rw-r--r--kspread/kspread_util.cc248
-rw-r--r--kspread/kspread_util.h124
-rw-r--r--kspread/kspread_value.cc70
-rw-r--r--kspread/kspread_value.h38
-rw-r--r--kspread/kspread_view.cc1470
-rw-r--r--kspread/kspread_view.h140
-rw-r--r--kspread/ksprsavinginfo.h12
-rw-r--r--kspread/manipulator.cc244
-rw-r--r--kspread/manipulator.h144
-rw-r--r--kspread/manipulator_data.cc18
-rw-r--r--kspread/manipulator_data.h8
-rw-r--r--kspread/plugins/calculator/configdlg.cpp62
-rw-r--r--kspread/plugins/calculator/configdlg.h75
-rw-r--r--kspread/plugins/calculator/dlabel.cpp8
-rw-r--r--kspread/plugins/calculator/dlabel.h9
-rw-r--r--kspread/plugins/calculator/kcalc.cpp576
-rw-r--r--kspread/plugins/calculator/kcalc.h207
-rw-r--r--kspread/plugins/calculator/kcalc_core.cpp170
-rw-r--r--kspread/plugins/calculator/kcalctype.h2
-rw-r--r--kspread/plugins/calculator/main.cpp34
-rw-r--r--kspread/plugins/calculator/main.h22
-rw-r--r--kspread/plugins/calculator/stats.cpp2
-rw-r--r--kspread/plugins/calculator/stats.h10
-rw-r--r--kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc40
-rw-r--r--kspread/plugins/insertcalendar/kspread_insertcalendardialog.h23
-rw-r--r--kspread/plugins/insertcalendar/kspread_insertcalendardialogbase.ui18
-rw-r--r--kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc48
-rw-r--r--kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h9
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_cell.cpp72
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_cell.h36
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_doc.cpp30
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_doc.h32
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_sheet.cpp14
-rw-r--r--kspread/plugins/scripting/kspreadcore/krs_sheet.h6
-rw-r--r--kspread/plugins/scripting/kspreadcore/kspreadcoremodule.cpp8
-rw-r--r--kspread/plugins/scripting/kspreadcore/kspreadcoremodule.h8
-rw-r--r--kspread/plugins/scripting/scripting.cc26
-rw-r--r--kspread/plugins/scripting/scripting.h3
-rwxr-xr-xkspread/plugins/scripting/scripts/exporthtml/ExportHtml.py10
-rwxr-xr-xkspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py188
-rw-r--r--kspread/region.cc164
-rw-r--r--kspread/region.h90
-rw-r--r--kspread/selection.cc238
-rw-r--r--kspread/selection.h67
-rw-r--r--kspread/templates/Business/BalanceSheet.kst200
-rw-r--r--kspread/templates/Business/PackingSlip.kst212
-rw-r--r--kspread/templates/Business/PriceQuotation.kst206
-rw-r--r--kspread/templates/HomeFamily/CreditCardTracker.kst284
-rw-r--r--kspread/templates/HomeFamily/MenuPlan.kst72
-rw-r--r--kspread/templates/HomeFamily/VacationChecklist.kst72
-rw-r--r--kspread/tests/formula_tester.cc44
-rw-r--r--kspread/tests/formula_tester.h14
-rwxr-xr-xkspread/tests/generate-openformula-tests2
-rw-r--r--kspread/tests/inspector.cc152
-rw-r--r--kspread/tests/inspector.h1
-rw-r--r--kspread/tests/test_formula.cc6
-rw-r--r--kspread/tests/tester.cc12
-rw-r--r--kspread/tests/tester.h12
-rw-r--r--kspread/tests/testrunner.cc56
-rw-r--r--kspread/tests/testrunner.h1
-rw-r--r--kspread/tests/value_tester.cc38
-rw-r--r--kspread/tests/value_tester.h4
-rw-r--r--kspread/valuecalc.cc38
-rw-r--r--kspread/valuecalc.h40
-rw-r--r--kspread/valueconverter.cc28
-rw-r--r--kspread/valueformatter.cc240
-rw-r--r--kspread/valueformatter.h26
-rw-r--r--kspread/valueparser.cc110
-rw-r--r--kspread/valueparser.h28
230 files changed, 12958 insertions, 12869 deletions
diff --git a/kspread/DESIGN.html b/kspread/DESIGN.html
index a2248654..2358c3c2 100644
--- a/kspread/DESIGN.html
+++ b/kspread/DESIGN.html
@@ -22,7 +22,7 @@ and the source code itself.</p>
<h2>Document/View Architecture</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>MVC (Model/View/Controller) means that the application consists of three
big parts, the <i>Model</i> which holds the data structure and objects,
@@ -49,7 +49,7 @@ to some extent he can take most part of the KSpread back-end and glue a new
user interface around the code.</p>
<h2>Dependency Handling</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>When a cell holds a formula, then it is likely that it depends on other
cell(s) for calculating the result. For example, if cell A11 has the formula
@@ -181,10 +181,10 @@ and the dependency manager will do the rest. In addition, this gives us
recursive dependency calculation at almost no cost.</p>
<h2>Manipulators</h2>
-<p>Status: PLANNED.</p>
+<p>tqStatus: PLANNED.</p>
<p>Currently, every operation on a cell or on a range of cells is quite complex.
-You need to ensure correct repainting, recalculation, iterate on a range and so on.</p>
+You need to ensure correct tqrepainting, recalculation, iterate on a range and so on.</p>
<p>To address this issue, manipulators shall be implemented. A manipulator will
implement one operation (formatting change, sequence fill, ..., ...).</p>
@@ -218,7 +218,7 @@ below.</p>
accomplish this.</p>
<h2>Selection handling</h2>
-<p>Status: PLANNED</p>
+<p>tqStatus: PLANNED</p>
<p>The selection shall be an instance of some RangeList class,
or however we want to call it - this will contain a list of
@@ -227,10 +227,10 @@ more entries. This will allow easy implementation of CTRL-selections and so,
because thanks to manipulators, each operation will automatically support these.</p>
<h2>Repaint Triggering</h2>
-<p>Status: PLANNED</p>
+<p>tqStatus: PLANNED</p>
<p>As mentioned above, the interface between the core and the GUI needs to be kept
-at minimum. Also, the number of repaints needs to be as low as possible, and repaints
+at minimum. Also, the number of tqrepaints needs to be as low as possible, and tqrepaints
should be groupped whenever possible. To achieve all this, the following approach
can be used:</p>
@@ -246,8 +246,8 @@ methods - disableUpdates(), enableUpdates(), rangeListChanged() and
rangeListFormattingChanged(). All these will be used (solely?) by manipulators,
preferably by the base manipulator class, so that we don't have to call these
functions in each operation. After a call to disableUpdates(), there will
-be no repainting and no dependency calculation. Note that a call to
-enableUpdates() won't cause any repaints either, as the sheet cannot remember
+be no tqrepainting and no dependency calculation. Note that a call to
+enableUpdates() won't cause any tqrepaints either, as the sheet cannot remember
all the calls (due to loss of range information). Hence, the base manipulator
class needs to call the correct rangeList*Changed method to trigger an
update in an effective way. The base manipulator needs to be configurable by
@@ -255,7 +255,7 @@ the manipulators that derive from it, so that it knows whether it changed
cell's content or formatting.</p>
<h2>Formula Engine</h2>
-<p>Status: FINISHED.</p>
+<p>tqStatus: FINISHED.</p>
<p>This formula engine is just an expression evaluator. To offer better
performance, the expression is first compiled into byte codes which will
@@ -353,7 +353,7 @@ to follow its algorithm from there.</p>
based on Polish notation. Instead of ordering the tokens in suffix Polish
form, the parser (which is also the code generator) simply outputs
byte codes. In its operation, the parser requires the knowledge of operator
-precedence to correctly translate unparenthesized infix expression and
+precedence to correctly translate untqparenthesized infix expression and
thus requires the use of a syntax stack.</p>
<p>The parser algorithm is given as follows:</p>
@@ -376,7 +376,7 @@ Step 4: If it is an operator<br>
<p>The reduce rules are:</p>
<p>Rule A: <i>function argument</i>:
-if token is semicolon or right parenthesis,
+if token is semicolon or right tqparenthesis,
if syntax stack looks as:
<ul type="square">
<li>non-operator &lt;--- top</li>
@@ -422,7 +422,7 @@ then reduce to:<br>
</ul>
</p>
-<p>Rule D: parenthesis removal<br>
+<p>Rule D: tqparenthesis removal<br>
if syntax stack looks as:<br>
<ul type="square">
<li>operator (</li>
@@ -472,7 +472,7 @@ token right before the percent. If yes, then the following code is generated:
<h2>Value</h2>
-<p>Status: FINISHED.<br>
+<p>tqStatus: FINISHED.<br>
</p>
<p>to be written.</p>
@@ -480,7 +480,7 @@ token right before the percent. If yes, then the following code is generated:
<h2>Commands Based on KCommand<br>
</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>Until lately, to implement undo and redo, KSpread creates corresponding
KSpreadUndo classes for each action and runs them when the user undoes
@@ -492,15 +492,15 @@ hence we should be able to undo/redo every operation (provided that the
corresponding manipulator provides methods to store/recall the undo information).</p>
<h2>Cell Storage</h2>
-<p>Status: PLANNED.</p>
+<p>tqStatus: PLANNED.</p>
<p>Cells are grouped together, and then hashed.</p>
<h2>Format Storage</h2>
-<p>Status: PLANNED.</p>
+<p>tqStatus: PLANNED.</p>
<p>Formatting specifies how a cell should look like. It involves font
-attributes like bold or italics, vertical and horizontal alignment,
+attributes like bold or italics, vertical and horizontal tqalignment,
rotation angle, shading, background color and so on. Each cell can have
its own format, but bear also in mind that a whole row or column format
should also apply.</p>
@@ -589,7 +589,7 @@ be in more than one leaf in the quad-tree. <i>Details on the possible use of
quad-tree or other methods should be explored further more</i>.</p>
<h2>Default Toolbars</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>Relevant mailing-list threads:</p>
@@ -652,7 +652,7 @@ Borders, Background, Foreground</li>
</ul>
<h2>Test Framework</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>Relevant mailing-list threads:</p>
@@ -704,7 +704,7 @@ test cases.</p>
</p>
<h2>Coding Style</h2>
-<p>Status: IN PROGRESS.</p>
+<p>tqStatus: IN PROGRESS.</p>
<p>(to be written in details).</p>
@@ -718,7 +718,7 @@ classes and functions should write the documentation.</p>
<p>In complex source files, list of header includes can be very long. Unless
there is special reason not do it, try to group them together, i.e. standard
-C/C++ headers come first, followed by Qt headers, and then KDE headers,
+C/C++ headers come first, followed by TQt headers, and then KDE headers,
KOffice core/UI headers and application specific headers. For each group,
sort the header files alphabetically. </p>
diff --git a/kspread/Doxyfile b/kspread/Doxyfile
index af6b4467..33244f7f 100644
--- a/kspread/Doxyfile
+++ b/kspread/Doxyfile
@@ -74,7 +74,7 @@ REPEAT_BRIEF = YES
# as the annotated text. Otherwise, the brief description is used as-is. If left
# blank, the following values are used ("$name" is automatically replaced with the
# name of the entity): "The $name class" "The $name widget" "The $name file"
-# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+# "is" "provides" "specifies" "tqcontains" "represents" "a" "an" "the"
ABBREVIATE_BRIEF =
@@ -431,8 +431,8 @@ EXCLUDE_SYMLINKS = NO
# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
# certain files from those directories.
-EXCLUDE_PATTERNS = *.moc.* \
- moc* \
+EXCLUDE_PATTERNS = *.tqmoc.* \
+ tqmoc* \
*.all_cpp.* \
*unload.* \
*/test/* \
diff --git a/kspread/KSpreadAppIface.cc b/kspread/KSpreadAppIface.cc
index 31fb328a..8ebc978c 100644
--- a/kspread/KSpreadAppIface.cc
+++ b/kspread/KSpreadAppIface.cc
@@ -46,7 +46,7 @@ DCOPRef AppIface::createDoc()
return DCOPRef( kapp->dcopClient()->appId(), doc->dcopObject()->objId() );
}
-DCOPRef AppIface::createDoc( const QString& name )
+DCOPRef AppIface::createDoc( const TQString& name )
{
// ######### Torben: Check for duplicate names here
Doc* doc = new Doc( 0, name.latin1() );
@@ -55,25 +55,25 @@ DCOPRef AppIface::createDoc( const QString& name )
return DCOPRef( kapp->dcopClient()->appId(), doc->dcopObject()->objId() );
}
-QMap<QString,DCOPRef> AppIface::documents()
+TQMap<TQString,DCOPRef> AppIface::documents()
{
- QMap<QString,DCOPRef> map;
+ TQMap<TQString,DCOPRef> map;
- QValueList<Doc*> lst = Doc::documents();
- QValueListIterator<Doc*> it = lst.begin();
+ TQValueList<Doc*> lst = Doc::documents();
+ TQValueListIterator<Doc*> it = lst.begin();
for( ; it != lst.end(); ++it )
{
- map[ QString( (*it)->name() ) ] =
+ map[ TQString( (*it)->name() ) ] =
DCOPRef( kapp->dcopClient()->appId(), (*it)->dcopObject()->objId() );
}
return map;
}
-DCOPRef AppIface::document( const QString& name )
+DCOPRef AppIface::document( const TQString& name )
{
- QValueList<Doc*> lst = Doc::documents();
- QValueListIterator<Doc*> it = lst.begin();
+ TQValueList<Doc*> lst = Doc::documents();
+ TQValueListIterator<Doc*> it = lst.begin();
for( ; it != lst.end(); ++it )
if ( name == (*it)->name() )
return DCOPRef( kapp->dcopClient()->appId(), (*it)->dcopObject()->objId() );
diff --git a/kspread/KSpreadAppIface.h b/kspread/KSpreadAppIface.h
index 6f28be73..69912a6c 100644
--- a/kspread/KSpreadAppIface.h
+++ b/kspread/KSpreadAppIface.h
@@ -24,8 +24,8 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
namespace KSpread
{
@@ -38,9 +38,9 @@ public:
k_dcop:
virtual DCOPRef createDoc();
- virtual DCOPRef createDoc( const QString& name );
- virtual QMap<QString,DCOPRef> documents();
- virtual DCOPRef document( const QString& name );
+ virtual DCOPRef createDoc( const TQString& name );
+ virtual TQMap<TQString,DCOPRef> documents();
+ virtual DCOPRef document( const TQString& name );
};
} // namespace KSpread
diff --git a/kspread/KSpreadCellIface.cc b/kspread/KSpreadCellIface.cc
index 9caae79e..4188a1e4 100644
--- a/kspread/KSpreadCellIface.cc
+++ b/kspread/KSpreadCellIface.cc
@@ -40,7 +40,7 @@ CellIface::CellIface()
{
}
-void CellIface::setCell( Sheet* sheet, const QPoint& point )
+void CellIface::setCell( Sheet* sheet, const TQPoint& point )
{
m_sheet = sheet;
m_point = point;
@@ -60,43 +60,43 @@ bool CellIface::isEmpty() const
return cell->isEmpty();
}
-QString CellIface::text() const
+TQString CellIface::text() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return m_sheet->doc()->converter()->asString (cell->value()).asString();
}
-void CellIface::setText( const QString& text )
+void CellIface::setText( const TQString& text )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->setCellText( text );
}
-QString CellIface::visibleContentAsString() const
+TQString CellIface::visibleContentAsString() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- if (cell->isEmpty()) return QString::null;
- QString ret;
+ if (cell->isEmpty()) return TQString();
+ TQString ret;
ret=cell->value().asString();
if (ret.isEmpty())
{
- ret=QString::number(cell->value().asFloat());
+ ret=TQString::number(cell->value().asFloat());
}
return ret;
}
-QString CellIface::comment() const
+TQString CellIface::comment() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->comment(m_point.x(), m_point.y());
}
-void CellIface::setComment( const QString& comment )
+void CellIface::setComment( const TQString& comment )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -125,11 +125,11 @@ double CellIface::value() const
return m_sheet->doc()->converter()->asFloat (cell->value()).asFloat();
}
-void CellIface::setBgColor(const QString& _c)
+void CellIface::setBgColor(const TQString& _c)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(_c);
+ TQColor c(_c);
cell->format()->setBgColor(c);
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -138,21 +138,21 @@ void CellIface::setBgColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setBgColor(c);
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::bgColor() const
+TQString CellIface::bgColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->bgColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::textColor() const
+TQString CellIface::textColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->textColor( m_point.x(), m_point.y() ).name();
}
@@ -161,16 +161,16 @@ void CellIface::setTextColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setTextColor(c);
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-void CellIface::setTextColor(const QString& _c)
+void CellIface::setTextColor(const TQString& _c)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(_c);
+ TQColor c(_c);
cell->format()->setTextColor(c);
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -221,7 +221,7 @@ bool CellIface::multiRow() const
return cell->format()->multiRow( m_point.x(), m_point.y() );
}
-void CellIface::setAlign( const QString& _Align )
+void CellIface::setAlign( const TQString& _Align )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -238,11 +238,11 @@ void CellIface::setAlign( const QString& _Align )
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::align() const
+TQString CellIface::align() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QString alignString;
+ TQString alignString;
switch( cell->format()->align( m_point.x(), m_point.y() ) )
{
case Format::Left :
@@ -261,7 +261,7 @@ QString CellIface::align() const
return alignString;
}
-void CellIface::setAlignY( const QString& _AlignY )
+void CellIface::setAlignY( const TQString& _AlignY )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -278,11 +278,11 @@ void CellIface::setAlignY( const QString& _AlignY )
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::alignY() const
+TQString CellIface::alignY() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QString alignString;
+ TQString alignString;
switch( cell->format()->alignY( m_point.x(), m_point.y() ) )
{
case Format::Top :
@@ -301,7 +301,7 @@ QString CellIface::alignY() const
return alignString;
}
-void CellIface::setPostfix(const QString &_postfix)
+void CellIface::setPostfix(const TQString &_postfix)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -309,14 +309,14 @@ void CellIface::setPostfix(const QString &_postfix)
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::prefix() const
+TQString CellIface::prefix() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
return cell->format()->prefix( m_point.x(), m_point.y() );
}
-void CellIface::setPrefix(const QString &_prefix)
+void CellIface::setPrefix(const TQString &_prefix)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -324,14 +324,14 @@ void CellIface::setPrefix(const QString &_prefix)
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::postfix() const
+TQString CellIface::postfix() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
return cell->format()->postfix( m_point.x(), m_point.y() );
}
-void CellIface::setFormatType(const QString &_formatType)
+void CellIface::setFormatType(const TQString &_formatType)
{
if( !m_sheet ) return;
@@ -382,12 +382,12 @@ void CellIface::setFormatType(const QString &_formatType)
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::getFormatType() const
+TQString CellIface::getFormatType() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QString stringFormat;
+ TQString stringFormat;
switch( cell->format()->getFormatType(m_point.x(), m_point.y()))
{
case Text_format:
@@ -579,7 +579,7 @@ int CellIface::textFontSize() const
return cell->format()->textFontSize( m_point.x(), m_point.y() );
}
-void CellIface::setTextFontFamily( const QString& _font )
+void CellIface::setTextFontFamily( const TQString& _font )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -587,15 +587,15 @@ void CellIface::setTextFontFamily( const QString& _font )
m_sheet->setRegionPaintDirty(cell->cellRect());
}
-QString CellIface::textFontFamily() const
+TQString CellIface::textFontFamily() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
return cell->format()->textFontFamily( m_point.x(), m_point.y() );
}
//border left
-void CellIface::setLeftBorderStyle( const QString& _style )
+void CellIface::setLeftBorderStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -615,10 +615,10 @@ void CellIface::setLeftBorderStyle( const QString& _style )
}
-void CellIface::setLeftBorderColor(const QString& _c)
+void CellIface::setLeftBorderColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setLeftBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -629,7 +629,7 @@ void CellIface::setLeftBorderColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setLeftBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -650,28 +650,28 @@ int CellIface::leftBorderWidth() const
return cell->format()->leftBorderWidth(m_point.x(), m_point.y());
}
-QString CellIface::leftBorderColor() const
+TQString CellIface::leftBorderColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->leftBorderColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::leftBorderStyle() const
+TQString CellIface::leftBorderStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->leftBorderStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -679,7 +679,7 @@ QString CellIface::leftBorderStyle() const
}
//border right
-void CellIface::setRightBorderStyle( const QString& _style )
+void CellIface::setRightBorderStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -699,10 +699,10 @@ void CellIface::setRightBorderStyle( const QString& _style )
}
-void CellIface::setRightBorderColor(const QString& _c)
+void CellIface::setRightBorderColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setRightBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -712,7 +712,7 @@ void CellIface::setRightBorderColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setRightBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -733,28 +733,28 @@ int CellIface::rightBorderWidth() const
return cell->format()->rightBorderWidth(m_point.x(), m_point.y());
}
-QString CellIface::rightBorderColor() const
+TQString CellIface::rightBorderColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->rightBorderColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::rightBorderStyle() const
+TQString CellIface::rightBorderStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->rightBorderStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -762,7 +762,7 @@ QString CellIface::rightBorderStyle() const
}
//border top
-void CellIface::setTopBorderStyle( const QString& _style )
+void CellIface::setTopBorderStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -782,10 +782,10 @@ void CellIface::setTopBorderStyle( const QString& _style )
}
-void CellIface::setTopBorderColor(const QString& _c)
+void CellIface::setTopBorderColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setTopBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -795,7 +795,7 @@ void CellIface::setTopBorderColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setTopBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -815,28 +815,28 @@ int CellIface::topBorderWidth() const
return cell->format()->topBorderWidth(m_point.x(), m_point.y());
}
-QString CellIface::topBorderColor() const
+TQString CellIface::topBorderColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->topBorderColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::topBorderStyle() const
+TQString CellIface::topBorderStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->topBorderStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -844,7 +844,7 @@ QString CellIface::topBorderStyle() const
}
//border bottom
-void CellIface::setBottomBorderStyle( const QString& _style )
+void CellIface::setBottomBorderStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -864,10 +864,10 @@ void CellIface::setBottomBorderStyle( const QString& _style )
}
-void CellIface::setBottomBorderColor(const QString& _c)
+void CellIface::setBottomBorderColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setBottomBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -877,7 +877,7 @@ void CellIface::setBottomBorderColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setBottomBorderColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -897,28 +897,28 @@ int CellIface::bottomBorderWidth() const
return cell->format()->bottomBorderWidth(m_point.x(), m_point.y());
}
-QString CellIface::bottomBorderColor() const
+TQString CellIface::bottomBorderColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->bottomBorderColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::bottomBorderStyle() const
+TQString CellIface::bottomBorderStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->bottomBorderStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -926,7 +926,7 @@ QString CellIface::bottomBorderStyle() const
}
//fall back diagonal
-void CellIface::setFallDiagonalStyle( const QString& _style )
+void CellIface::setFallDiagonalStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -946,10 +946,10 @@ void CellIface::setFallDiagonalStyle( const QString& _style )
}
-void CellIface::setFallDiagonalColor(const QString& _c)
+void CellIface::setFallDiagonalColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setFallDiagonalColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -959,7 +959,7 @@ void CellIface::setFallDiagonalColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setFallDiagonalColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -979,28 +979,28 @@ int CellIface::fallDiagonalWidth() const
return cell->format()->fallDiagonalWidth(m_point.x(), m_point.y());
}
-QString CellIface::fallDiagonalColor() const
+TQString CellIface::fallDiagonalColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->fallDiagonalColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::fallDiagonalStyle() const
+TQString CellIface::fallDiagonalStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->fallDiagonalStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -1009,7 +1009,7 @@ QString CellIface::fallDiagonalStyle() const
//GoUpDiagonal
-void CellIface::setGoUpDiagonalStyle( const QString& _style )
+void CellIface::setGoUpDiagonalStyle( const TQString& _style )
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -1029,10 +1029,10 @@ void CellIface::setGoUpDiagonalStyle( const QString& _style )
}
-void CellIface::setGoUpDiagonalColor(const QString& _c)
+void CellIface::setGoUpDiagonalColor(const TQString& _c)
{
if( !m_sheet ) return;
- QColor c(_c);
+ TQColor c(_c);
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
cell->format()->setGoUpDiagonalColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
@@ -1042,7 +1042,7 @@ void CellIface::setGoUpDiagonalColor(int r,int g,int b)
{
if( !m_sheet ) return;
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
- QColor c(r,g,b);
+ TQColor c(r,g,b);
cell->format()->setGoUpDiagonalColor(c );
m_sheet->setRegionPaintDirty(cell->cellRect());
}
@@ -1062,28 +1062,28 @@ int CellIface::goUpDiagonalWidth() const
return cell->format()->goUpDiagonalWidth(m_point.x(), m_point.y());
}
-QString CellIface::goUpDiagonalColor() const
+TQString CellIface::goUpDiagonalColor() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
return cell->format()->goUpDiagonalColor( m_point.x(), m_point.y() ).name();
}
-QString CellIface::goUpDiagonalStyle() const
+TQString CellIface::goUpDiagonalStyle() const
{
- if( !m_sheet ) return QString::null;
+ if( !m_sheet ) return TQString();
Cell* cell = m_sheet->cellAt( m_point );
Qt::PenStyle penStyle=cell->format()->goUpDiagonalStyle( m_point.x(), m_point.y() );
- QString tmp;
- if( penStyle==Qt::DotLine)
+ TQString tmp;
+ if( penStyle==TQt::DotLine)
tmp="DotLine";
- else if( penStyle==Qt::DashLine)
+ else if( penStyle==TQt::DashLine)
tmp="DashLine";
- else if( penStyle==Qt::DashDotLine)
+ else if( penStyle==TQt::DashDotLine)
tmp="DashDotLine";
- else if( penStyle==Qt::DashDotDotLine)
+ else if( penStyle==TQt::DashDotDotLine)
tmp="DashDotDotLine";
- else if( penStyle==Qt::SolidLine)
+ else if( penStyle==TQt::SolidLine)
tmp="SolidLine";
else
tmp="SolidLine";
@@ -1132,7 +1132,7 @@ bool CellIface::hasValidation() const
return false;
}
-QString CellIface::validationTitle() const
+TQString CellIface::validationTitle() const
{
if( !m_sheet ) return "";
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -1144,7 +1144,7 @@ QString CellIface::validationTitle() const
return "";
}
-QString CellIface::validationMessage() const
+TQString CellIface::validationMessage() const
{
if( !m_sheet ) return "";
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -1156,20 +1156,20 @@ QString CellIface::validationMessage() const
return "";
}
-QStringList CellIface::listValidation() const
+TQStringList CellIface::listValidation() const
{
- if( !m_sheet ) return QStringList();
+ if( !m_sheet ) return TQStringList();
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
if ( cell->getValidity( 0 ) )
{
return cell->getValidity( 0 )->listValidity;
}
else
- return QStringList();
+ return TQStringList();
}
-QString CellIface::validationTitleInfo() const
+TQString CellIface::validationTitleInfo() const
{
if( !m_sheet ) return "";
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
@@ -1181,7 +1181,7 @@ QString CellIface::validationTitleInfo() const
return "";
}
-QString CellIface::validationMessageInfo() const
+TQString CellIface::validationMessageInfo() const
{
if( !m_sheet ) return "";
Cell* cell = m_sheet->nonDefaultCell( m_point.x(), m_point.y() );
diff --git a/kspread/KSpreadCellIface.h b/kspread/KSpreadCellIface.h
index f172d9f7..a1304c01 100644
--- a/kspread/KSpreadCellIface.h
+++ b/kspread/KSpreadCellIface.h
@@ -28,11 +28,11 @@
#ifndef KSPREAD_CELL_IFACE_H
#define KSPREAD_CELL_IFACE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <dcopobject.h>
-class QPoint;
+class TQPoint;
namespace KSpread
{
@@ -44,45 +44,45 @@ class CellIface : virtual public DCOPObject
public:
CellIface();
- void setCell( Sheet* sheet, const QPoint& point );
+ void setCell( Sheet* sheet, const TQPoint& point );
k_dcop:
virtual bool isDefault() const;
virtual bool isEmpty() const;
- virtual QString text() const;
- virtual void setText( const QString& text );
+ virtual TQString text() const;
+ virtual void setText( const TQString& text );
virtual void setValue( int value );
virtual void setValue( double value );
virtual double value() const;
- virtual QString visibleContentAsString() const;
- virtual void setBgColor(const QString& _c);
+ virtual TQString visibleContentAsString() const;
+ virtual void setBgColor(const TQString& _c);
virtual void setBgColor(int r,int g,int b);
- virtual QString bgColor() const;
- virtual void setTextColor(const QString& _c);
+ virtual TQString bgColor() const;
+ virtual void setTextColor(const TQString& _c);
virtual void setTextColor(int r,int g,int b);
- virtual QString textColor()const ;
- virtual void setComment(const QString &_comment);
- virtual QString comment()const;
+ virtual TQString textColor()const ;
+ virtual void setComment(const TQString &_comment);
+ virtual TQString comment()const;
virtual void setAngle(int angle);
virtual int angle() const ;
virtual void setVerticalText(bool _vertical);
virtual bool verticalText() const ;
virtual void setMultiRow(bool _multi);
virtual bool multiRow() const;
- virtual void setAlign(const QString &_align);
- virtual QString align() const;
- virtual void setAlignY(const QString &_alignY);
- virtual QString alignY() const;
- virtual void setPrefix(const QString &_prefix);
- virtual QString prefix() const;
- virtual void setPostfix(const QString &_postfix);
- virtual QString postfix() const;
+ virtual void setAlign(const TQString &_align);
+ virtual TQString align() const;
+ virtual void setAlignY(const TQString &_alignY);
+ virtual TQString alignY() const;
+ virtual void setPrefix(const TQString &_prefix);
+ virtual TQString prefix() const;
+ virtual void setPostfix(const TQString &_postfix);
+ virtual TQString postfix() const;
/** @deprecated use setFormatType*/
- virtual void setFormatNumber(const QString &ft) { setFormatType(ft); }
- virtual void setFormatType(const QString &formatType);
+ virtual void setFormatNumber(const TQString &ft) { setFormatType(ft); }
+ virtual void setFormatType(const TQString &formatType);
/** @deprecated use getFormatType */
- virtual QString getFormatNumber() const { return getFormatType(); }
- virtual QString getFormatType() const;
+ virtual TQString getFormatNumber() const { return getFormatType(); }
+ virtual TQString getFormatType() const;
virtual void setPrecision(int _p);
virtual int precision() const;
//font
@@ -96,56 +96,56 @@ k_dcop:
virtual bool textFontStrike( ) const;
virtual void setTextFontSize( int _size );
virtual int textFontSize() const;
- virtual void setTextFontFamily( const QString& _font );
- virtual QString textFontFamily() const;
+ virtual void setTextFontFamily( const TQString& _font );
+ virtual TQString textFontFamily() const;
//border left
- virtual void setLeftBorderStyle( const QString& _style );
- virtual void setLeftBorderColor(const QString& _c);
+ virtual void setLeftBorderStyle( const TQString& _style );
+ virtual void setLeftBorderColor(const TQString& _c);
virtual void setLeftBorderColor(int r,int g,int b);
virtual void setLeftBorderWidth( int _size );
virtual int leftBorderWidth() const;
- virtual QString leftBorderColor() const;
- virtual QString leftBorderStyle() const;
+ virtual TQString leftBorderColor() const;
+ virtual TQString leftBorderStyle() const;
//border right
- virtual void setRightBorderStyle( const QString& _style );
- virtual void setRightBorderColor(const QString& _c);
+ virtual void setRightBorderStyle( const TQString& _style );
+ virtual void setRightBorderColor(const TQString& _c);
virtual void setRightBorderColor(int r,int g,int b);
virtual void setRightBorderWidth( int _size );
virtual int rightBorderWidth() const;
- virtual QString rightBorderColor() const;
- virtual QString rightBorderStyle() const;
+ virtual TQString rightBorderColor() const;
+ virtual TQString rightBorderStyle() const;
//border top
- virtual void setTopBorderStyle( const QString& _style );
- virtual void setTopBorderColor(const QString& _c);
+ virtual void setTopBorderStyle( const TQString& _style );
+ virtual void setTopBorderColor(const TQString& _c);
virtual void setTopBorderColor(int r,int g,int b);
virtual void setTopBorderWidth( int _size );
virtual int topBorderWidth() const;
- virtual QString topBorderColor() const;
- virtual QString topBorderStyle() const;
+ virtual TQString topBorderColor() const;
+ virtual TQString topBorderStyle() const;
//border bottom
- virtual void setBottomBorderStyle( const QString& _style );
- virtual void setBottomBorderColor(const QString& _c);
+ virtual void setBottomBorderStyle( const TQString& _style );
+ virtual void setBottomBorderColor(const TQString& _c);
virtual void setBottomBorderColor(int r,int g,int b);
virtual void setBottomBorderWidth( int _size );
virtual int bottomBorderWidth() const;
- virtual QString bottomBorderColor() const;
- virtual QString bottomBorderStyle() const;
+ virtual TQString bottomBorderColor() const;
+ virtual TQString bottomBorderStyle() const;
// fall back diagonal
- virtual void setFallDiagonalStyle( const QString& _style );
- virtual void setFallDiagonalColor(const QString& _c);
+ virtual void setFallDiagonalStyle( const TQString& _style );
+ virtual void setFallDiagonalColor(const TQString& _c);
virtual void setFallDiagonalColor(int r,int g,int b);
virtual void setFallDiagonalWidth( int _size );
virtual int fallDiagonalWidth() const;
- virtual QString fallDiagonalColor() const;
- virtual QString fallDiagonalStyle() const;
+ virtual TQString fallDiagonalColor() const;
+ virtual TQString fallDiagonalStyle() const;
//GoUpDiagonal
- virtual void setGoUpDiagonalStyle( const QString& _style );
- virtual void setGoUpDiagonalColor(const QString& _c);
+ virtual void setGoUpDiagonalStyle( const TQString& _style );
+ virtual void setGoUpDiagonalColor(const TQString& _c);
virtual void setGoUpDiagonalColor(int r,int g,int b);
virtual void setGoUpDiagonalWidth( int _size );
virtual int goUpDiagonalWidth() const;
- virtual QString goUpDiagonalColor() const;
- virtual QString goUpDiagonalStyle() const;
+ virtual TQString goUpDiagonalColor() const;
+ virtual TQString goUpDiagonalStyle() const;
//indent
virtual void setIndent(double indent);
virtual double getIndent() const ;
@@ -155,18 +155,18 @@ k_dcop:
virtual bool hasValidation() const;
virtual void removeValidity();
- virtual QString validationTitle() const;
- virtual QString validationMessage() const;
+ virtual TQString validationTitle() const;
+ virtual TQString validationMessage() const;
virtual bool displayValidationMessage() const;
virtual bool validationAllowEmptyCell() const;
virtual bool displayValidationInformation() const;
- virtual QStringList listValidation() const;
+ virtual TQStringList listValidation() const;
- virtual QString validationTitleInfo() const;
- virtual QString validationMessageInfo() const;
+ virtual TQString validationTitleInfo() const;
+ virtual TQString validationMessageInfo() const;
private:
- QPoint m_point;
+ TQPoint m_point;
Sheet* m_sheet;
};
diff --git a/kspread/KSpreadColumnIface.cc b/kspread/KSpreadColumnIface.cc
index 848f0b8a..c0fc813f 100644
--- a/kspread/KSpreadColumnIface.cc
+++ b/kspread/KSpreadColumnIface.cc
@@ -19,7 +19,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbrush.h>
+#include <tqbrush.h>
#include "kspread_format.h"
#include "KSpreadLayoutIface.h"
diff --git a/kspread/KSpreadDocIface.cc b/kspread/KSpreadDocIface.cc
index 13ab0a0c..a4374800 100644
--- a/kspread/KSpreadDocIface.cc
+++ b/kspread/KSpreadDocIface.cc
@@ -33,7 +33,7 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
using namespace KSpread;
@@ -50,12 +50,12 @@ DCOPRef DocIface::map()
doc->map()->dcopObject()->objId() );
}
-void DocIface::changeDefaultGridPenColor( const QColor &_col)
+void DocIface::changeDefaultGridPenColor( const TQColor &_col)
{
doc->setGridColor(_col);
}
-QColor DocIface::pageBorderColor() const
+TQColor DocIface::pageBorderColor() const
{
return doc->pageBorderColor();
}
@@ -105,13 +105,13 @@ void DocIface::setShowTabBar(bool _show)
doc->refreshInterface();
}
-void DocIface::changePageBorderColor( const QColor & _color)
+void DocIface::changePageBorderColor( const TQColor & _color)
{
doc->changePageBorderColor( _color);
doc->refreshInterface();
}
-void DocIface::addIgnoreWordAll( const QString &word)
+void DocIface::addIgnoreWordAll( const TQString &word)
{
doc->addIgnoreWordAll( word );
}
@@ -121,12 +121,12 @@ void DocIface::clearIgnoreWordAll( )
doc->clearIgnoreWordAll();
}
-QStringList DocIface::spellListIgnoreAll() const
+TQStringList DocIface::spellListIgnoreAll() const
{
return doc->spellListIgnoreAll();
}
-void DocIface::addStringCompletion(const QString & stringCompletion)
+void DocIface::addStringCompletion(const TQString & stringCompletion)
{
doc->addStringCompletion( stringCompletion );
}
@@ -137,30 +137,30 @@ int DocIface::zoom() const
}
-QString DocIface::moveToValue()const
+TQString DocIface::moveToValue()const
{
switch(doc->getMoveToValue())
{
case Bottom:
- return QString("bottom");
+ return TQString("bottom");
break;
case Left:
- return QString("left");
+ return TQString("left");
break;
case Top:
- return QString("top");
+ return TQString("top");
break;
case Right:
- return QString("right");
+ return TQString("right");
break;
case BottomFirst:
- return QString("bottomFirst");
+ return TQString("bottomFirst");
break;
}
- return QString::null;
+ return TQString();
}
-void DocIface::setMoveToValue(const QString & move)
+void DocIface::setMoveToValue(const TQString & move)
{
if ( move.lower()=="bottom" )
doc->setMoveToValue(Bottom);
@@ -174,7 +174,7 @@ void DocIface::setMoveToValue(const QString & move)
doc->setMoveToValue(BottomFirst);
}
-void DocIface::setTypeOfCalc( const QString & calc )
+void DocIface::setTypeOfCalc( const TQString & calc )
{
if ( calc.lower()=="sum")
doc->setTypeOfCalc(SumOfNumber );
@@ -189,32 +189,32 @@ void DocIface::setTypeOfCalc( const QString & calc )
else if ( calc.lower()=="none")
doc->setTypeOfCalc(NoneCalc );
else
- kdDebug()<<"Error in setTypeOfCalc( const QString & calc ) :"<<calc<<endl;
+ kdDebug()<<"Error in setTypeOfCalc( const TQString & calc ) :"<<calc<<endl;
doc->refreshInterface();
}
-QString DocIface::typeOfCalc() const
+TQString DocIface::typeOfCalc() const
{
switch( doc->getTypeOfCalc() )
{
case SumOfNumber:
- return QString("sum");
+ return TQString("sum");
break;
case Min:
- return QString("min");
+ return TQString("min");
break;
case Max:
- return QString("max");
+ return TQString("max");
break;
case Average:
- return QString("average");
+ return TQString("average");
break;
case Count:
- return QString("count");
+ return TQString("count");
break;
case NoneCalc:
default:
- return QString("none");
+ return TQString("none");
break;
}
}
diff --git a/kspread/KSpreadDocIface.h b/kspread/KSpreadDocIface.h
index 02d0aa17..f13f93f2 100644
--- a/kspread/KSpreadDocIface.h
+++ b/kspread/KSpreadDocIface.h
@@ -24,9 +24,9 @@
#ifndef KSPREAD_DOC_IFACE_H
#define KSPREAD_DOC_IFACE_H
-#include <qstring.h>
-#include <qcolor.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
#include <dcopref.h>
@@ -53,25 +53,25 @@ k_dcop:
void setShowRowHeader(bool _show);
void setShowTabBar(bool _show);
- void changeDefaultGridPenColor( const QColor &_col);
+ void changeDefaultGridPenColor( const TQColor &_col);
bool showFormulaBar()const;
bool showStatusBar()const;
- QColor pageBorderColor() const;
- void changePageBorderColor( const QColor & _color);
- void addIgnoreWordAll( const QString &word);
+ TQColor pageBorderColor() const;
+ void changePageBorderColor( const TQColor & _color);
+ void addIgnoreWordAll( const TQString &word);
void clearIgnoreWordAll( );
- QStringList spellListIgnoreAll() const;
+ TQStringList spellListIgnoreAll() const;
- void addStringCompletion(const QString & stringCompletion);
+ void addStringCompletion(const TQString & stringCompletion);
int zoom() const;
- void setMoveToValue(const QString & move);
- QString moveToValue()const;
+ void setMoveToValue(const TQString & move);
+ TQString moveToValue()const;
- void setTypeOfCalc( const QString & calc );
- QString typeOfCalc() const;
+ void setTypeOfCalc( const TQString & calc );
+ TQString typeOfCalc() const;
private:
Doc* doc;
diff --git a/kspread/KSpreadLayoutIface.cc b/kspread/KSpreadLayoutIface.cc
index 0483ae2c..1ca174cf 100644
--- a/kspread/KSpreadLayoutIface.cc
+++ b/kspread/KSpreadLayoutIface.cc
@@ -21,57 +21,57 @@
*/
#include "KSpreadLayoutIface.h"
-#include <qbrush.h>
+#include <tqbrush.h>
#include "kspread_format.h"
using namespace KSpread;
LayoutIface::LayoutIface(Format *_layout)
{
- layout=_layout;
+ tqlayout=_layout;
}
-void LayoutIface::setBgColor(const QString& _c)
+void LayoutIface::setBgColor(const TQString& _c)
{
- QColor c(_c);
- layout->setBgColor(c);
+ TQColor c(_c);
+ tqlayout->setBgColor(c);
}
void LayoutIface::setBgColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setBgColor(c);
+ TQColor c(r,g,b);
+ tqlayout->setBgColor(c);
}
void LayoutIface::setTextColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setTextColor(c);
+ TQColor c(r,g,b);
+ tqlayout->setTextColor(c);
}
-void LayoutIface::setTextColor(const QString& _c)
+void LayoutIface::setTextColor(const TQString& _c)
{
- QColor c(_c);
- layout->setTextColor(c);
+ TQColor c(_c);
+ tqlayout->setTextColor(c);
}
void LayoutIface::setAngle(int angle)
{
- layout->setAngle(angle);
+ tqlayout->setAngle(angle);
}
void LayoutIface::setVerticalText(bool _vertical)
{
- layout->setVerticalText(_vertical);
+ tqlayout->setVerticalText(_vertical);
}
void LayoutIface::setMultiRow(bool _multi)
{
- layout->setMultiRow( _multi );
+ tqlayout->setMultiRow( _multi );
}
-void LayoutIface::setAlign( const QString& _Align )
+void LayoutIface::setAlign( const TQString& _Align )
{
Format::Align Align;
if(_Align=="Left")
@@ -82,10 +82,10 @@ void LayoutIface::setAlign( const QString& _Align )
Align=Format::Center;
else
Align=Format::Undefined;
- layout->setAlign( Align);
+ tqlayout->setAlign( Align);
}
-void LayoutIface::setAlignY( const QString& _AlignY )
+void LayoutIface::setAlignY( const TQString& _AlignY )
{
Format::AlignY AlignY;
if(_AlignY=="Top")
@@ -96,23 +96,23 @@ void LayoutIface::setAlignY( const QString& _AlignY )
AlignY=Format::Bottom;
else
AlignY=Format::Middle;
- layout->setAlignY( AlignY);
+ tqlayout->setAlignY( AlignY);
}
-void LayoutIface::setPostfix(const QString &_postfix)
+void LayoutIface::setPostfix(const TQString &_postfix)
{
- layout->setPostfix( _postfix );
+ tqlayout->setPostfix( _postfix );
}
-void LayoutIface::setPrefix(const QString &_prefix)
+void LayoutIface::setPrefix(const TQString &_prefix)
{
- layout->setPrefix( _prefix );
+ tqlayout->setPrefix( _prefix );
}
-void LayoutIface::setFormatType(const QString &_formatType)
+void LayoutIface::setFormatType(const TQString &_formatType)
{
FormatType format;
- layout->setPrecision(2);
+ tqlayout->setPrecision(2);
if (_formatType=="Generic")
format = Generic_format;
else if(_formatType=="Number")
@@ -151,265 +151,265 @@ void LayoutIface::setFormatType(const QString &_formatType)
format=fraction_three_digits;
else
format=Generic_format;
- layout->setFormatType( format);
+ tqlayout->setFormatType( format);
}
void LayoutIface::setPrecision(int _p)
{
- layout->setPrecision( _p );
+ tqlayout->setPrecision( _p );
}
void LayoutIface::setTextFontBold(bool _b)
{
- layout->setTextFontBold( _b );
+ tqlayout->setTextFontBold( _b );
}
void LayoutIface::setTextFontItalic(bool _b)
{
- layout->setTextFontItalic( _b );
+ tqlayout->setTextFontItalic( _b );
}
void LayoutIface::setTextFontUnderline(bool _b)
{
- layout->setTextFontUnderline( _b );
+ tqlayout->setTextFontUnderline( _b );
}
void LayoutIface::setTextFontStrike(bool _b)
{
- layout->setTextFontStrike( _b );
+ tqlayout->setTextFontStrike( _b );
}
void LayoutIface::setTextFontSize( int _size )
{
- layout->setTextFontSize( _size );
+ tqlayout->setTextFontSize( _size );
}
-void LayoutIface::setTextFontFamily( const QString& _font )
+void LayoutIface::setTextFontFamily( const TQString& _font )
{
- layout->setTextFontFamily( _font );
+ tqlayout->setTextFontFamily( _font );
}
//border left
-void LayoutIface::setLeftBorderStyle( const QString& _style )
+void LayoutIface::setLeftBorderStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setLeftBorderStyle(Qt::DotLine);
+ tqlayout->setLeftBorderStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setLeftBorderStyle(Qt::DashLine);
+ tqlayout->setLeftBorderStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setLeftBorderStyle(Qt::DashDotLine);
+ tqlayout->setLeftBorderStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setLeftBorderStyle(Qt::DashDotDotLine);
+ tqlayout->setLeftBorderStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setLeftBorderStyle(Qt::SolidLine);
+ tqlayout->setLeftBorderStyle(Qt::SolidLine);
else
- layout->setLeftBorderStyle(Qt::SolidLine);
+ tqlayout->setLeftBorderStyle(Qt::SolidLine);
}
-void LayoutIface::setLeftBorderColor(const QString& _c)
+void LayoutIface::setLeftBorderColor(const TQString& _c)
{
- QColor c(_c);
- layout->setLeftBorderColor(c );
+ TQColor c(_c);
+ tqlayout->setLeftBorderColor(c );
}
void LayoutIface::setLeftBorderColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setLeftBorderColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setLeftBorderColor(c );
}
void LayoutIface::setLeftBorderWidth( int _size )
{
- layout->setLeftBorderWidth( _size );
+ tqlayout->setLeftBorderWidth( _size );
}
//border right
-void LayoutIface::setRightBorderStyle( const QString& _style )
+void LayoutIface::setRightBorderStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setRightBorderStyle(Qt::DotLine);
+ tqlayout->setRightBorderStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setRightBorderStyle(Qt::DashLine);
+ tqlayout->setRightBorderStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setRightBorderStyle(Qt::DashDotLine);
+ tqlayout->setRightBorderStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setRightBorderStyle(Qt::DashDotDotLine);
+ tqlayout->setRightBorderStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setRightBorderStyle(Qt::SolidLine);
+ tqlayout->setRightBorderStyle(Qt::SolidLine);
else
- layout->setRightBorderStyle(Qt::SolidLine);
+ tqlayout->setRightBorderStyle(Qt::SolidLine);
}
-void LayoutIface::setRightBorderColor(const QString& _c)
+void LayoutIface::setRightBorderColor(const TQString& _c)
{
- QColor c(_c);
- layout->setRightBorderColor(c );
+ TQColor c(_c);
+ tqlayout->setRightBorderColor(c );
}
void LayoutIface::setRightBorderColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setRightBorderColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setRightBorderColor(c );
}
void LayoutIface::setRightBorderWidth( int _size )
{
- layout->setRightBorderWidth( _size );
+ tqlayout->setRightBorderWidth( _size );
}
//border top
-void LayoutIface::setTopBorderStyle( const QString& _style )
+void LayoutIface::setTopBorderStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setTopBorderStyle(Qt::DotLine);
+ tqlayout->setTopBorderStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setTopBorderStyle(Qt::DashLine);
+ tqlayout->setTopBorderStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setTopBorderStyle(Qt::DashDotLine);
+ tqlayout->setTopBorderStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setTopBorderStyle(Qt::DashDotDotLine);
+ tqlayout->setTopBorderStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setTopBorderStyle(Qt::SolidLine);
+ tqlayout->setTopBorderStyle(Qt::SolidLine);
else
- layout->setTopBorderStyle(Qt::SolidLine);
+ tqlayout->setTopBorderStyle(Qt::SolidLine);
}
-void LayoutIface::setTopBorderColor(const QString& _c)
+void LayoutIface::setTopBorderColor(const TQString& _c)
{
- QColor c(_c);
- layout->setTopBorderColor(c );
+ TQColor c(_c);
+ tqlayout->setTopBorderColor(c );
}
void LayoutIface::setTopBorderColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setTopBorderColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setTopBorderColor(c );
}
void LayoutIface::setTopBorderWidth( int _size )
{
- layout->setTopBorderWidth( _size );
+ tqlayout->setTopBorderWidth( _size );
}
//border bottom
-void LayoutIface::setBottomBorderStyle( const QString& _style )
+void LayoutIface::setBottomBorderStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setBottomBorderStyle(Qt::DotLine);
+ tqlayout->setBottomBorderStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setBottomBorderStyle(Qt::DashLine);
+ tqlayout->setBottomBorderStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setBottomBorderStyle(Qt::DashDotLine);
+ tqlayout->setBottomBorderStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setBottomBorderStyle(Qt::DashDotDotLine);
+ tqlayout->setBottomBorderStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setBottomBorderStyle(Qt::SolidLine);
+ tqlayout->setBottomBorderStyle(Qt::SolidLine);
else
- layout->setBottomBorderStyle(Qt::SolidLine);
+ tqlayout->setBottomBorderStyle(Qt::SolidLine);
}
-void LayoutIface::setBottomBorderColor(const QString& _c)
+void LayoutIface::setBottomBorderColor(const TQString& _c)
{
- QColor c(_c);
- layout->setBottomBorderColor(c );
+ TQColor c(_c);
+ tqlayout->setBottomBorderColor(c );
}
void LayoutIface::setBottomBorderColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setBottomBorderColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setBottomBorderColor(c );
}
void LayoutIface::setBottomBorderWidth( int _size )
{
- layout->setBottomBorderWidth( _size );
+ tqlayout->setBottomBorderWidth( _size );
}
//fall back diagonal
-void LayoutIface::setFallDiagonalStyle( const QString& _style )
+void LayoutIface::setFallDiagonalStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setFallDiagonalStyle(Qt::DotLine);
+ tqlayout->setFallDiagonalStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setFallDiagonalStyle(Qt::DashLine);
+ tqlayout->setFallDiagonalStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setFallDiagonalStyle(Qt::DashDotLine);
+ tqlayout->setFallDiagonalStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setFallDiagonalStyle(Qt::DashDotDotLine);
+ tqlayout->setFallDiagonalStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setFallDiagonalStyle(Qt::SolidLine);
+ tqlayout->setFallDiagonalStyle(Qt::SolidLine);
else
- layout->setFallDiagonalStyle(Qt::SolidLine);
+ tqlayout->setFallDiagonalStyle(Qt::SolidLine);
}
-void LayoutIface::setFallDiagonalColor(const QString& _c)
+void LayoutIface::setFallDiagonalColor(const TQString& _c)
{
- QColor c(_c);
- layout->setFallDiagonalColor(c );
+ TQColor c(_c);
+ tqlayout->setFallDiagonalColor(c );
}
void LayoutIface::setFallDiagonalColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setFallDiagonalColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setFallDiagonalColor(c );
}
void LayoutIface::setFallDiagonalWidth( int _size )
{
- layout->setFallDiagonalWidth( _size );
+ tqlayout->setFallDiagonalWidth( _size );
}
//GoUpDiagonal
-void LayoutIface::setGoUpDiagonalStyle( const QString& _style )
+void LayoutIface::setGoUpDiagonalStyle( const TQString& _style )
{
if(_style=="DotLine")
- layout->setGoUpDiagonalStyle(Qt::DotLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::DotLine);
else if(_style=="DashLine")
- layout->setGoUpDiagonalStyle(Qt::DashLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::DashLine);
else if(_style=="DashDotLine")
- layout->setGoUpDiagonalStyle(Qt::DashDotLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::DashDotLine);
else if(_style=="DashDotDotLine")
- layout->setGoUpDiagonalStyle(Qt::DashDotDotLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::DashDotDotLine);
else if(_style=="SolidLine")
- layout->setGoUpDiagonalStyle(Qt::SolidLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::SolidLine);
else
- layout->setGoUpDiagonalStyle(Qt::SolidLine);
+ tqlayout->setGoUpDiagonalStyle(Qt::SolidLine);
}
-void LayoutIface::setGoUpDiagonalColor(const QString& _c)
+void LayoutIface::setGoUpDiagonalColor(const TQString& _c)
{
- QColor c(_c);
- layout->setGoUpDiagonalColor(c );
+ TQColor c(_c);
+ tqlayout->setGoUpDiagonalColor(c );
}
void LayoutIface::setGoUpDiagonalColor(int r,int g,int b)
{
- QColor c(r,g,b);
- layout->setGoUpDiagonalColor(c );
+ TQColor c(r,g,b);
+ tqlayout->setGoUpDiagonalColor(c );
}
void LayoutIface::setGoUpDiagonalWidth( int _size )
{
- layout->setGoUpDiagonalWidth( _size );
+ tqlayout->setGoUpDiagonalWidth( _size );
}
void LayoutIface::setIndent( double indent )
{
if( indent >= 0.0 )
- layout->setIndent( indent );
+ tqlayout->setIndent( indent );
else
- layout->setIndent( 0.0 );
+ tqlayout->setIndent( 0.0 );
}
void LayoutIface::setDontPrintText ( bool _print)
{
- layout->setDontPrintText ( _print);
+ tqlayout->setDontPrintText ( _print);
}
diff --git a/kspread/KSpreadLayoutIface.h b/kspread/KSpreadLayoutIface.h
index a69b6241..c4231032 100644
--- a/kspread/KSpreadLayoutIface.h
+++ b/kspread/KSpreadLayoutIface.h
@@ -37,20 +37,20 @@ public:
virtual void update(){;}
k_dcop:
- virtual void setBgColor(const QString& _c);
+ virtual void setBgColor(const TQString& _c);
virtual void setBgColor(int r,int g,int b);
- virtual void setTextColor(const QString& _c);
+ virtual void setTextColor(const TQString& _c);
virtual void setTextColor(int r,int g,int b);
virtual void setAngle(int angle);
virtual void setVerticalText(bool _vertical);
virtual void setMultiRow(bool _multi);
- virtual void setAlign(const QString &_align);
- virtual void setAlignY(const QString &_alignY);
- virtual void setPrefix(const QString &_prefix);
- virtual void setPostfix(const QString &_postfix);
+ virtual void setAlign(const TQString &_align);
+ virtual void setAlignY(const TQString &_alignY);
+ virtual void setPrefix(const TQString &_prefix);
+ virtual void setPostfix(const TQString &_postfix);
/** @deprecated use setFormatType*/
- virtual void setFormatNumber(const QString &ft) { setFormatType(ft); }
- virtual void setFormatType(const QString &formatType);
+ virtual void setFormatNumber(const TQString &ft) { setFormatType(ft); }
+ virtual void setFormatType(const TQString &formatType);
/** @deprecated use getFormatType */
virtual void setPrecision(int _p);
//font
@@ -59,35 +59,35 @@ k_dcop:
virtual void setTextFontUnderline( bool _b );
virtual void setTextFontStrike( bool _b );
virtual void setTextFontSize( int _size );
- virtual void setTextFontFamily( const QString& _font );
+ virtual void setTextFontFamily( const TQString& _font );
//border left
- virtual void setLeftBorderStyle( const QString& _style );
- virtual void setLeftBorderColor(const QString& _c);
+ virtual void setLeftBorderStyle( const TQString& _style );
+ virtual void setLeftBorderColor(const TQString& _c);
virtual void setLeftBorderColor(int r,int g,int b);
virtual void setLeftBorderWidth( int _size );
//border right
- virtual void setRightBorderStyle( const QString& _style );
- virtual void setRightBorderColor(const QString& _c);
+ virtual void setRightBorderStyle( const TQString& _style );
+ virtual void setRightBorderColor(const TQString& _c);
virtual void setRightBorderColor(int r,int g,int b);
virtual void setRightBorderWidth( int _size );
//border top
- virtual void setTopBorderStyle( const QString& _style );
- virtual void setTopBorderColor(const QString& _c);
+ virtual void setTopBorderStyle( const TQString& _style );
+ virtual void setTopBorderColor(const TQString& _c);
virtual void setTopBorderColor(int r,int g,int b);
virtual void setTopBorderWidth( int _size );
//border bottom
- virtual void setBottomBorderStyle( const QString& _style );
- virtual void setBottomBorderColor(const QString& _c);
+ virtual void setBottomBorderStyle( const TQString& _style );
+ virtual void setBottomBorderColor(const TQString& _c);
virtual void setBottomBorderColor(int r,int g,int b);
virtual void setBottomBorderWidth( int _size );
// fall back diagonal
- virtual void setFallDiagonalStyle( const QString& _style );
- virtual void setFallDiagonalColor(const QString& _c);
+ virtual void setFallDiagonalStyle( const TQString& _style );
+ virtual void setFallDiagonalColor(const TQString& _c);
virtual void setFallDiagonalColor(int r,int g,int b);
virtual void setFallDiagonalWidth( int _size );
//GoUpDiagonal
- virtual void setGoUpDiagonalStyle( const QString& _style );
- virtual void setGoUpDiagonalColor(const QString& _c);
+ virtual void setGoUpDiagonalStyle( const TQString& _style );
+ virtual void setGoUpDiagonalColor(const TQString& _c);
virtual void setGoUpDiagonalColor(int r,int g,int b);
virtual void setGoUpDiagonalWidth( int _size );
//indent
@@ -95,7 +95,7 @@ k_dcop:
//don't print text
virtual void setDontPrintText ( bool _b);
private:
- Format *layout;
+ Format *tqlayout;
};
} //namespace KSpread
diff --git a/kspread/KSpreadMapIface.cc b/kspread/KSpreadMapIface.cc
index 3f5cf79f..046f4c44 100644
--- a/kspread/KSpreadMapIface.cc
+++ b/kspread/KSpreadMapIface.cc
@@ -40,7 +40,7 @@ MapIface::MapIface( Map* map )
m_map = map;
}
-DCOPRef MapIface::sheet( const QString& name )
+DCOPRef MapIface::sheet( const TQString& name )
{
Sheet* t = m_map->findSheet( name );
if ( !t )
@@ -58,7 +58,7 @@ DCOPRef MapIface::sheetByIndex( int index )
return DCOPRef();
}
- kdDebug(36001) << "+++++++ Returning table " << t->QObject::name() << endl;
+ kdDebug(36001) << "+++++++ Returning table " << t->TQObject::name() << endl;
return DCOPRef( kapp->dcopClient()->appId(), t->dcopObject()->objId() );
}
@@ -68,31 +68,31 @@ int MapIface::sheetCount() const
return m_map->count();
}
-QStringList MapIface::sheetNames() const
+TQStringList MapIface::sheetNames() const
{
- QStringList names;
+ TQStringList names;
- QPtrList<Sheet>& lst = m_map->sheetList();
- QPtrListIterator<Sheet> it( lst );
+ TQPtrList<Sheet>& lst = m_map->sheetList();
+ TQPtrListIterator<Sheet> it( lst );
for( ; it.current(); ++it )
names.append( it.current()->name() );
return names;
}
-QValueList<DCOPRef> MapIface::sheets()
+TQValueList<DCOPRef> MapIface::sheets()
{
- QValueList<DCOPRef> t;
+ TQValueList<DCOPRef> t;
- QPtrList<Sheet>& lst = m_map->sheetList();
- QPtrListIterator<Sheet> it( lst );
+ TQPtrList<Sheet>& lst = m_map->sheetList();
+ TQPtrListIterator<Sheet> it( lst );
for( ; it.current(); ++it )
t.append( DCOPRef( kapp->dcopClient()->appId(), it.current()->dcopObject()->objId() ) );
return t;
}
-DCOPRef MapIface::insertSheet( const QString& name )
+DCOPRef MapIface::insertSheet( const TQString& name )
{
if ( m_map->findSheet( name ) )
return sheet( name );
@@ -103,8 +103,8 @@ DCOPRef MapIface::insertSheet( const QString& name )
return sheet( name );
}
-bool MapIface::processDynamic(const QCString &fun, const QByteArray &/*data*/,
- QCString& replyType, QByteArray &replyData)
+bool MapIface::processDynamic(const TQCString &fun, const TQByteArray &/*data*/,
+ TQCString& replyType, TQByteArray &replyData)
{
// Does the name follow the pattern "foobar()" ?
uint len = fun.length();
@@ -119,7 +119,7 @@ bool MapIface::processDynamic(const QCString &fun, const QByteArray &/*data*/,
return false;
replyType = "DCOPRef";
- QDataStream out( replyData, IO_WriteOnly );
+ TQDataStream out( replyData, IO_WriteOnly );
out << DCOPRef( kapp->dcopClient()->appId(), t->dcopObject()->objId() );
return true;
}
diff --git a/kspread/KSpreadMapIface.h b/kspread/KSpreadMapIface.h
index 8e7d156a..d2b46572 100644
--- a/kspread/KSpreadMapIface.h
+++ b/kspread/KSpreadMapIface.h
@@ -21,8 +21,8 @@
#ifndef KSPREAD_MAP_IFACE_H
#define KSPREAD_MAP_IFACE_H
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <dcopobject.h>
#include <dcopref.h>
@@ -38,16 +38,16 @@ class MapIface : virtual public DCOPObject
public:
MapIface( Map* );
- virtual bool processDynamic(const QCString &fun, const QByteArray &data,
- QCString& replyType, QByteArray &replyData);
+ virtual bool processDynamic(const TQCString &fun, const TQByteArray &data,
+ TQCString& replyType, TQByteArray &replyData);
k_dcop:
- virtual DCOPRef sheet( const QString& name );
+ virtual DCOPRef sheet( const TQString& name );
virtual DCOPRef sheetByIndex( int index );
virtual int sheetCount() const;
- virtual QStringList sheetNames() const;
- virtual QValueList<DCOPRef> sheets();
- virtual DCOPRef insertSheet( const QString& name );
+ virtual TQStringList sheetNames() const;
+ virtual TQValueList<DCOPRef> sheets();
+ virtual DCOPRef insertSheet( const TQString& name );
private:
Map* m_map;
diff --git a/kspread/KSpreadRowIface.cc b/kspread/KSpreadRowIface.cc
index 0a8eed90..69db292f 100644
--- a/kspread/KSpreadRowIface.cc
+++ b/kspread/KSpreadRowIface.cc
@@ -22,7 +22,7 @@
#include "KSpreadLayoutIface.h"
#include "KSpreadRowIface.h"
#include "kspread_format.h"
-#include <qbrush.h>
+#include <tqbrush.h>
using namespace KSpread;
diff --git a/kspread/KSpreadTableIface.cc b/kspread/KSpreadTableIface.cc
index a6588d55..b2f31f61 100644
--- a/kspread/KSpreadTableIface.cc
+++ b/kspread/KSpreadTableIface.cc
@@ -52,19 +52,19 @@ using namespace KSpread;
class KSpread::CellProxy : public DCOPObjectProxy
{
public:
- CellProxy( Sheet* sheet, const QCString& prefix );
+ CellProxy( Sheet* sheet, const TQCString& prefix );
~CellProxy();
- virtual bool process( const QCString& obj, const QCString& fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData );
+ virtual bool process( const TQCString& obj, const TQCString& fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData );
private:
- QCString m_prefix;
+ TQCString m_prefix;
CellIface* m_cell;
Sheet* m_sheet;
};
-KSpread::CellProxy::CellProxy( Sheet* sheet, const QCString& prefix )
+KSpread::CellProxy::CellProxy( Sheet* sheet, const TQCString& prefix )
: DCOPObjectProxy( kapp->dcopClient() ), m_prefix( prefix )
{
m_cell = new CellIface;
@@ -76,8 +76,8 @@ KSpread::CellProxy::~CellProxy()
delete m_cell;
}
-bool KSpread::CellProxy::process( const QCString& obj, const QCString& fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData )
+bool KSpread::CellProxy::process( const TQCString& obj, const TQCString& fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData )
{
kdDebug()<<"CellProxy::process: requested object:"<<obj<<endl;
@@ -87,13 +87,13 @@ bool KSpread::CellProxy::process( const QCString& obj, const QCString& fun, cons
if ( fun == "functions()" ) {
replyType = "QCStringList";
- QDataStream reply( replyData, IO_WriteOnly );
+ TQDataStream reply( replyData, IO_WriteOnly );
QCStringList repList=m_cell->functions();
reply<<repList;
return true;
}
- QString cellID=QString::fromUtf8(obj.data() + m_prefix.length());
+ TQString cellID=TQString::fromUtf8(obj.data() + m_prefix.length());
cellID=m_sheet->sheetName()+"!"+cellID;
kdDebug()<<"CellProxy::process: cellID="<<cellID<<endl;
@@ -128,11 +128,11 @@ SheetIface::SheetIface( Sheet* t )
void SheetIface::sheetNameHasChanged() {
ident.resize(1);
- QObject *currentObj = m_sheet;
+ TQObject *currentObj = m_sheet;
while (currentObj != 0L) {
ident.prepend( currentObj->name() );
ident.prepend("/");
- currentObj = currentObj->parent();
+ currentObj = currentObj->tqparent();
}
if ( ident[0] == '/' )
ident = ident.mid(1);
@@ -141,7 +141,7 @@ void SheetIface::sheetNameHasChanged() {
setObjId(ident);
delete m_proxy;
- QCString str = objId();
+ TQCString str = objId();
str += "/";
kdDebug(36001)<<"SheetIface::tableNameHasChanged(): new DCOP-ID:"<<objId()<<endl;
m_proxy = new CellProxy( m_sheet, str );
@@ -166,14 +166,14 @@ DCOPRef SheetIface::cell( int x, int y )
if ( y == 0 )
y = 1;
- QCString str = objId() + '/' + Cell::name( x, y ).latin1();
+ TQCString str = objId() + '/' + Cell::name( x, y ).latin1();
return DCOPRef( kapp->dcopClient()->appId(), str );
}
-DCOPRef SheetIface::cell( const QString& name )
+DCOPRef SheetIface::cell( const TQString& name )
{
- QCString str = objId();
+ TQCString str = objId();
str += "/";
str += name.latin1();
@@ -200,7 +200,7 @@ DCOPRef SheetIface::row( int _row )
}
-QString SheetIface::name() const
+TQString SheetIface::name() const
{
return m_sheet->sheetName();
}
@@ -212,13 +212,13 @@ int SheetIface::maxColumn() const
}
-bool SheetIface::areaHasNoContent(QRect area) const
+bool SheetIface::areaHasNoContent(TQRect area) const
{
kdDebug(36001) << "SheetIface::areaHasNoContent("<<area<<");"<<endl;
return m_sheet->areaIsEmpty(area);
}
-bool SheetIface::areaHasNoComments(QRect area) const
+bool SheetIface::areaHasNoComments(TQRect area) const
{
return m_sheet->areaIsEmpty(area, Sheet::Comment);
}
@@ -228,8 +228,8 @@ int SheetIface::maxRow() const
return m_sheet->maxRow();
}
-bool SheetIface::processDynamic( const QCString& fun, const QByteArray&/*data*/,
- QCString& replyType, QByteArray &replyData )
+bool SheetIface::processDynamic( const TQCString& fun, const TQByteArray&/*data*/,
+ TQCString& replyType, TQByteArray &replyData )
{
kdDebug(36001) << "Calling '" << fun.data() << "'" << endl;
// Does the name follow the pattern "foobar()" ?
@@ -245,15 +245,15 @@ bool SheetIface::processDynamic( const QCString& fun, const QByteArray&/*data*/,
if ( !p.isValid() )
return false;
- QCString str = objId() + "/" + fun.left( len - 2 );
+ TQCString str = objId() + "/" + fun.left( len - 2 );
replyType = "DCOPRef";
- QDataStream out( replyData, IO_WriteOnly );
+ TQDataStream out( replyData, IO_WriteOnly );
out << DCOPRef( kapp->dcopClient()->appId(), str );
return true;
}
-bool SheetIface::setSheetName( const QString & name)
+bool SheetIface::setSheetName( const TQString & name)
{
return m_sheet->setSheetName( name);
}
@@ -356,73 +356,73 @@ float SheetIface::bottomBorder()const
return m_sheet->print()->bottomBorder();
}
-QString SheetIface::paperFormatString() const
+TQString SheetIface::paperFormatString() const
{
return m_sheet->print()->paperFormatString();
}
-QString SheetIface::headLeft()const
+TQString SheetIface::headLeft()const
{
return m_sheet->print()->headLeft();
}
-QString SheetIface::headMid()const
+TQString SheetIface::headMid()const
{
return m_sheet->print()->headMid();
}
-QString SheetIface::headRight()const
+TQString SheetIface::headRight()const
{
return m_sheet->print()->headRight();
}
-QString SheetIface::footLeft()const
+TQString SheetIface::footLeft()const
{
return m_sheet->print()->footLeft();
}
-QString SheetIface::footMid()const
+TQString SheetIface::footMid()const
{
return m_sheet->print()->footMid();
}
-QString SheetIface::footRight()const
+TQString SheetIface::footRight()const
{
return m_sheet->print()->footRight();
}
-void SheetIface::setHeaderLeft(const QString & text)
+void SheetIface::setHeaderLeft(const TQString & text)
{
m_sheet->print()->setHeadFootLine( text, headMid(), headRight(),
footLeft(), footMid(), footRight() );
}
-void SheetIface::setHeaderMiddle(const QString & text)
+void SheetIface::setHeaderMiddle(const TQString & text)
{
m_sheet->print()->setHeadFootLine( headLeft(), text, headRight(),
footLeft(), footMid(), footRight() );
}
-void SheetIface::setHeaderRight(const QString & text)
+void SheetIface::setHeaderRight(const TQString & text)
{
m_sheet->print()->setHeadFootLine( headLeft(), headMid(), text,
footLeft(), footMid(), footRight() );
}
-void SheetIface::setFooterLeft(const QString & text)
+void SheetIface::setFooterLeft(const TQString & text)
{
m_sheet->print()->setHeadFootLine( headLeft(), headMid(), headRight(),
text, footMid(), footRight() );
}
-void SheetIface::setFooterMiddle(const QString & text)
+void SheetIface::setFooterMiddle(const TQString & text)
{
m_sheet->print()->setHeadFootLine( headLeft(), headMid(), headRight(),
footLeft(), text, footRight() );
}
-void SheetIface::setFooterRight(const QString & text)
+void SheetIface::setFooterRight(const TQString & text)
{
m_sheet->print()->setHeadFootLine( headLeft(), headMid(), headRight(),
footLeft(), footMid(), text );
diff --git a/kspread/KSpreadTableIface.h b/kspread/KSpreadTableIface.h
index d52aa05a..a1244ad5 100644
--- a/kspread/KSpreadTableIface.h
+++ b/kspread/KSpreadTableIface.h
@@ -29,7 +29,7 @@
#include <dcopobject.h>
#include <dcopref.h>
-#include <qstring.h>
+#include <tqstring.h>
namespace KSpread
{
@@ -43,21 +43,21 @@ public:
SheetIface( Sheet* );
~SheetIface();
- bool processDynamic( const QCString& fun, const QByteArray& data,
- QCString& replyType, QByteArray &replyData );
+ bool processDynamic( const TQCString& fun, const TQByteArray& data,
+ TQCString& replyType, TQByteArray &replyData );
void sheetNameHasChanged();
k_dcop:
virtual DCOPRef cell( int x, int y );
- virtual DCOPRef cell( const QString& name );
+ virtual DCOPRef cell( const TQString& name );
virtual DCOPRef column( int _col );
virtual DCOPRef row( int _row );
- virtual QString name() const;
+ virtual TQString name() const;
virtual int maxColumn() const;
virtual int maxRow() const;
- virtual bool setSheetName( const QString & name);
+ virtual bool setSheetName( const TQString & name);
virtual bool insertColumn( int col,int nbCol );
@@ -66,8 +66,8 @@ k_dcop:
virtual void removeRow( int row,int nbRow );
virtual bool isHidden()const;
- virtual bool areaHasNoContent(QRect area) const ;
- virtual bool areaHasNoComments(QRect area) const ;
+ virtual bool areaHasNoContent(TQRect area) const ;
+ virtual bool areaHasNoComments(TQRect area) const ;
virtual bool showGrid() const;
virtual bool showFormula() const;
@@ -84,26 +84,26 @@ k_dcop:
virtual float rightBorder() const;
virtual float topBorder() const;
virtual float bottomBorder() const;
- QString paperFormatString() const;
-
- QString headLeft()const;
- QString headMid()const;
- QString headRight()const;
- QString footLeft()const;
- QString footMid()const;
- QString footRight()const;
-
- void setHeaderLeft(const QString & text);
- void setHeaderMiddle(const QString & text);
- void setHeaderRight(const QString & text);
- void setFooterLeft(const QString & text);
- void setFooterMiddle(const QString & text);
- void setFooterRight(const QString & text);
+ TQString paperFormatString() const;
+
+ TQString headLeft()const;
+ TQString headMid()const;
+ TQString headRight()const;
+ TQString footLeft()const;
+ TQString footMid()const;
+ TQString footRight()const;
+
+ void setHeaderLeft(const TQString & text);
+ void setHeaderMiddle(const TQString & text);
+ void setHeaderRight(const TQString & text);
+ void setFooterLeft(const TQString & text);
+ void setFooterMiddle(const TQString & text);
+ void setFooterRight(const TQString & text);
bool isProtected() const;
private:
Sheet* m_sheet;
CellProxy* m_proxy;
- QCString ident;
+ TQCString ident;
};
} // namespace KSpread
diff --git a/kspread/KSpreadViewIface.cc b/kspread/KSpreadViewIface.cc
index 11a98968..95eeda3a 100644
--- a/kspread/KSpreadViewIface.cc
+++ b/kspread/KSpreadViewIface.cc
@@ -87,14 +87,14 @@ void ViewIface::show()
m_view->show();
}
-void ViewIface::find()
+void ViewIface::tqfind()
{
- m_view->find();
+ m_view->tqfind();
}
-void ViewIface::replace()
+void ViewIface::tqreplace()
{
- m_view->replace();
+ m_view->tqreplace();
}
void ViewIface::conditional()
@@ -137,7 +137,7 @@ void ViewIface::nextSheet()
m_view->nextSheet();
}
-bool ViewIface::showSheet(QString sheetName)
+bool ViewIface::showSheet(TQString sheetName)
{
return m_view->showSheet(sheetName);
}
@@ -287,12 +287,12 @@ void ViewIface::copyAsText()
m_view->copyAsText();
}
-void ViewIface::setSelection(QRect selection)
+void ViewIface::setSelection(TQRect selection)
{
m_view->selectionInfo()->initialize(selection);//,m_view->activeSheet());
}
-QRect ViewIface::selection()
+TQRect ViewIface::selection()
{
return m_view->selectionInfo()->selection();
}
@@ -342,7 +342,7 @@ void ViewIface::setSelectionVerticalText(bool enable)
m_view->verticalText(enable);
}
-void ViewIface::setSelectionComment(QString comment)
+void ViewIface::setSelectionComment(TQString comment)
{
m_view->setSelectionComment(comment);
}
@@ -352,17 +352,17 @@ void ViewIface::setSelectionAngle(int value)
m_view->setSelectionAngle(value);
}
-void ViewIface::setSelectionTextColor( QColor txtColor )
+void ViewIface::setSelectionTextColor( TQColor txtColor )
{
m_view->setSelectionTextColor(txtColor);
}
-void ViewIface::setSelectionBgColor( QColor bgColor )
+void ViewIface::setSelectionBgColor( TQColor bgColor )
{
m_view->setSelectionBackgroundColor(bgColor);
}
-void ViewIface::setSelectionBorderColor( QColor bdColor )
+void ViewIface::setSelectionBorderColor( TQColor bdColor )
{
m_view->setSelectionBorderColor(bdColor);
}
@@ -382,32 +382,32 @@ void ViewIface::cutSelection()
m_view->cutSelection();
}
-void ViewIface::setLeftBorderColor(QColor color)
+void ViewIface::setLeftBorderColor(TQColor color)
{
m_view->setSelectionLeftBorderColor(color);
}
-void ViewIface::setTopBorderColor(QColor color)
+void ViewIface::setTopBorderColor(TQColor color)
{
m_view->setSelectionTopBorderColor(color);
}
-void ViewIface::setRightBorderColor(QColor color)
+void ViewIface::setRightBorderColor(TQColor color)
{
m_view->setSelectionRightBorderColor(color);
}
-void ViewIface::setBottomBorderColor(QColor color)
+void ViewIface::setBottomBorderColor(TQColor color)
{
m_view->setSelectionBottomBorderColor(color);
}
-void ViewIface::setAllBorderColor(QColor color)
+void ViewIface::setAllBorderColor(TQColor color)
{
m_view->setSelectionAllBorderColor(color);
}
-void ViewIface::setOutlineBorderColor(QColor color)
+void ViewIface::setOutlineBorderColor(TQColor color)
{
m_view->setSelectionOutlineBorderColor(color);
}
@@ -442,9 +442,9 @@ void ViewIface::sortDec()
m_view->sortDec();
}
-void ViewIface::layoutDlg()
+void ViewIface::tqlayoutDlg()
{
- m_view->layoutDlg();
+ m_view->tqlayoutDlg();
}
diff --git a/kspread/KSpreadViewIface.h b/kspread/KSpreadViewIface.h
index 5e57591b..f41a5217 100644
--- a/kspread/KSpreadViewIface.h
+++ b/kspread/KSpreadViewIface.h
@@ -26,8 +26,8 @@
#ifndef KSPREAD_VIEW_IFACE_H
#define KSPREAD_VIEW_IFACE_H
-#include <qcolor.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqstring.h>
#include <KoViewIface.h>
@@ -53,10 +53,10 @@ k_dcop:
virtual void hide();
virtual void show();
- virtual void setSelection(QRect selection);
- virtual QRect selection();
- virtual void find();
- virtual void replace();
+ virtual void setSelection(TQRect selection);
+ virtual TQRect selection();
+ virtual void tqfind();
+ virtual void tqreplace();
virtual void conditional();
virtual void validity();
virtual void insertSeries();
@@ -66,7 +66,7 @@ k_dcop:
virtual void preference();
virtual void nextSheet();
virtual void previousSheet();
- virtual bool showSheet(QString sheetName);
+ virtual bool showSheet(TQString sheetName);
virtual void sortList();
virtual void setAreaName();
virtual void showAreaName();
@@ -108,22 +108,22 @@ k_dcop:
virtual void setSelectionLower();
virtual void setSelectionFirstLetterUpper();
virtual void setSelectionVerticalText(bool enable);
- virtual void setSelectionComment(QString comment);
+ virtual void setSelectionComment(TQString comment);
virtual void setSelectionAngle(int value);
- virtual void setSelectionTextColor(QColor txtColor );
- virtual void setSelectionBgColor(QColor bgColor );
- virtual void setSelectionBorderColor(QColor bdColor );
+ virtual void setSelectionTextColor(TQColor txtColor );
+ virtual void setSelectionBgColor(TQColor bgColor );
+ virtual void setSelectionBorderColor(TQColor bdColor );
virtual void deleteSelection();
virtual void copySelection();
virtual void cutSelection();
- virtual void setLeftBorderColor(QColor color);
- virtual void setTopBorderColor(QColor color);
- virtual void setRightBorderColor(QColor color);
- virtual void setBottomBorderColor(QColor color);
- virtual void setAllBorderColor(QColor color);
- virtual void setOutlineBorderColor(QColor color);
+ virtual void setLeftBorderColor(TQColor color);
+ virtual void setTopBorderColor(TQColor color);
+ virtual void setRightBorderColor(TQColor color);
+ virtual void setBottomBorderColor(TQColor color);
+ virtual void setAllBorderColor(TQColor color);
+ virtual void setOutlineBorderColor(TQColor color);
virtual void removeBorder();
virtual void increaseIndent();
@@ -132,7 +132,7 @@ k_dcop:
void subtotals();
void sortInc();
void sortDec();
- void layoutDlg();
+ void tqlayoutDlg();
void increaseFontSize();
void decreaseFontSize();
diff --git a/kspread/OASIS.txt b/kspread/OASIS.txt
index bf0feb94..d85e8779 100644
--- a/kspread/OASIS.txt
+++ b/kspread/OASIS.txt
@@ -51,7 +51,7 @@ Document/Workbook
[x] Active sheet
[x] Header
[x] Footer
- [x] Page layout
+ [x] Page tqlayout
[x] Protection status
[x] Print range
[x] Print setup
@@ -96,7 +96,7 @@ rich text will be converted to simple plain text.
Link may not fully compatible since KSpread can only link the whole cell,
not partial text. For example, if the text is "Visit the website" where only
the string "website" is a hyperlink to an URL, in KSpread the whole string
-"Visit the website" becomes the link. Consequently, if the text contains
+"Visit the website" becomes the link. Consequently, if the text tqcontains
two or more links, only the first link will be used.
(I will fixe when we convert it to kotext)
@@ -155,44 +155,44 @@ Merged cells
</table:table-cell>
<table:covered-table-cell table:style-name="ce3"/>
-Cell horizontal alignment: top
- <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default">
+Cell horizontal tqalignment: top
+ <style:style style:name="ce1" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties style:vertical-align="top"/>
</style:style>
-Cell horizontal alignment: middle
- <style:style style:name="ce2" style:family="table-cell" style:parent-style-name="Default">
+Cell horizontal tqalignment: middle
+ <style:style style:name="ce2" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties style:vertical-align="middle"/>
</style:style>
-Cell horizontal alignment: bottom
- <style:style style:name="ce3" style:family="table-cell" style:parent-style-name="Default">
+Cell horizontal tqalignment: bottom
+ <style:style style:name="ce3" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties style:vertical-align="bottom"/>
</style:style>
-Cell vertical alignment: top
- <style:style style:name="ce5" style:family="table-cell" style:parent-style-name="Default">
+Cell vertical tqalignment: top
+ <style:style style:name="ce5" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties fo:text-align="center"
style:text-align-source="fix" style:repeat-content="none"
fo:margin-left="0in" style:vertical-align="top"/>
</style:style>
-Cell vertical alignment: middle
- <style:style style:name="ce6" style:family="table-cell" style:parent-style-name="Default">
+Cell vertical tqalignment: middle
+ <style:style style:name="ce6" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties fo:text-align="center"
style:text-align-source="fix" style:repeat-content="none"
fo:margin-left="0in" style:vertical-align="middle"/>
</style:style>
-Cell vertical alignment: bottom
- <style:style style:name="ce7" style:family="table-cell" style:parent-style-name="Default">
+Cell vertical tqalignment: bottom
+ <style:style style:name="ce7" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties fo:text-align="center"
style:text-align-source="fix" style:repeat-content="none"
fo:margin-left="0in" style:vertical-align="bottom"/>
</style:style>
- <style:style style:name="Heading" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="Heading" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties style:text-align-source="fix" style:repeat-content="false"/>
<style:paragraph-properties fo:text-align="center"/>
<style:text-properties fo:font-size="16pt" fo:font-style="italic" fo:font-weight="bold"/>
@@ -200,7 +200,7 @@ Cell vertical alignment: bottom
Unprotected cell
- <style:style style:name="ce1" style:family="table-cell" style:parent-style-name="Default">
+ <style:style style:name="ce1" style:family="table-cell" style:tqparent-style-name="Default">
<style:table-cell-properties style:cell-protect="none"
style:print-content="true"/>
</style:style>
diff --git a/kspread/commands.cc b/kspread/commands.cc
index 0a5a8a02..9a7ceda4 100644
--- a/kspread/commands.cc
+++ b/kspread/commands.cc
@@ -51,7 +51,7 @@ void UndoWrapperCommand::unexecute()
undoAction->undo();
}
-QString UndoWrapperCommand::name() const
+TQString UndoWrapperCommand::name() const
{
return undoAction->getName();
}
@@ -67,17 +67,17 @@ MergeCellCommand::MergeCellCommand( Cell* c, int cs, int rs )
oldRowSpan = cell->extraYCells();
if( cell )
{
- QRect area( cell->column(), cell->row(), cs+1, rs+1 );
+ TQRect area( cell->column(), cell->row(), cs+1, rs+1 );
rangeName = util_rangeName( area );
}
}
-QString MergeCellCommand::name() const
+TQString MergeCellCommand::name() const
{
if( rangeName.isEmpty() )
return i18n("Merge Cells");
else
- return i18n("Merge Cells %1").arg( rangeName );
+ return i18n("Merge Cells %1").tqarg( rangeName );
}
void MergeCellCommand::execute()
@@ -103,7 +103,7 @@ DissociateCellCommand::DissociateCellCommand( Cell* c )
oldRowSpan = cell->extraYCells();
}
-QString DissociateCellCommand::name() const
+TQString DissociateCellCommand::name() const
{
return i18n("Dissociate Cell");
}
@@ -124,14 +124,14 @@ void DissociateCellCommand::unexecute()
// ----- RenameSheetCommand -----
-RenameSheetCommand::RenameSheetCommand( Sheet* s, const QString &name )
+RenameSheetCommand::RenameSheetCommand( Sheet* s, const TQString &name )
{
sheet = s;
if( s ) oldName = s->sheetName();
newName = name;
}
-QString RenameSheetCommand::name() const
+TQString RenameSheetCommand::name() const
{
return i18n("Rename Sheet");
}
@@ -172,9 +172,9 @@ void HideSheetCommand::unexecute()
sheet->hideSheet( false );
}
-QString HideSheetCommand::name() const
+TQString HideSheetCommand::name() const
{
- QString n = QString( i18n("Hide Sheet %1") ).arg( sheetName );
+ TQString n = TQString( i18n("Hide Sheet %1") ).tqarg( sheetName );
if( n.length() > 64 ) n = i18n("Hide Sheet");
return n;
}
@@ -203,9 +203,9 @@ void ShowSheetCommand::unexecute()
sheet->hideSheet( true );
}
-QString ShowSheetCommand::name() const
+TQString ShowSheetCommand::name() const
{
- QString n = QString( i18n("Show Sheet %1") ).arg( sheetName );
+ TQString n = TQString( i18n("Show Sheet %1") ).tqarg( sheetName );
if( n.length() > 64 ) n = i18n("Show Sheet");
return n;
}
@@ -232,7 +232,7 @@ void AddSheetCommand::unexecute()
doc->takeSheet( sheet );
}
-QString AddSheetCommand::name() const
+TQString AddSheetCommand::name() const
{
return i18n("Add Sheet");
}
@@ -258,7 +258,7 @@ void RemoveSheetCommand::unexecute()
doc->insertSheet( sheet );
}
-QString RemoveSheetCommand::name() const
+TQString RemoveSheetCommand::name() const
{
return i18n("Remove Sheet");
}
@@ -269,7 +269,7 @@ SheetPropertiesCommand::SheetPropertiesCommand( Doc* d, Sheet* s )
{
sheet = s;
doc = d;
- oldDirection = newDirection = sheet->layoutDirection();
+ oldDirection = newDirection = sheet->tqlayoutDirection();
oldAutoCalc = newAutoCalc = sheet->getAutoCalc();
oldShowGrid = newShowGrid = sheet->getShowGrid();
oldShowPageBorders = newShowPageBorders = sheet->isShowPageBorders();
@@ -282,7 +282,7 @@ SheetPropertiesCommand::SheetPropertiesCommand( Doc* d, Sheet* s )
oldCapitalizeFirstLetter = newCapitalizeFirstLetter = sheet->getFirstLetterUpper();
}
-QString SheetPropertiesCommand::name() const
+TQString SheetPropertiesCommand::name() const
{
return i18n("Change Sheet Properties");
}
@@ -399,7 +399,7 @@ void InsertColumnCommand::unexecute()
sheet->removeColumn( insertPosColumn,nbColumnInserted );
}
-QString InsertColumnCommand::name() const
+TQString InsertColumnCommand::name() const
{
return i18n("Insert Columns");
}
@@ -431,7 +431,7 @@ void DefinePrintRangeCommand::unexecute()
sheet->print()->setPrintRange( printRange );
}
-QString DefinePrintRangeCommand::name() const
+TQString DefinePrintRangeCommand::name() const
{
return i18n("Set Page Layout");
}
@@ -532,12 +532,12 @@ void PaperLayoutCommand::unexecute()
}
-QString PaperLayoutCommand::name() const
+TQString PaperLayoutCommand::name() const
{
return i18n("Set Page Layout");
}
-LinkCommand::LinkCommand( Cell* c, const QString& text, const QString& link )
+LinkCommand::LinkCommand( Cell* c, const TQString& text, const TQString& link )
{
cell = c;
oldText = cell->text();
@@ -570,7 +570,7 @@ void LinkCommand::unexecute()
doc->addDamage( new CellDamage( cell ) );
}
-QString LinkCommand::name() const
+TQString LinkCommand::name() const
{
return newLink.isEmpty() ? i18n("Remove Link") : i18n("Set Link");
}
@@ -590,37 +590,37 @@ ChangeObjectGeometryCommand::~ChangeObjectGeometryCommand()
void ChangeObjectGeometryCommand::execute()
{
- doc->repaint( obj->geometry() );
+ doc->tqrepaint( obj->tqgeometry() );
- KoRect geometry = obj->geometry();
- geometry.moveBy( m_diff.x(), m_diff.y() );
- geometry.setWidth( geometry.width() + r_diff.width() );
- geometry.setHeight( geometry.height() + r_diff.height() );
- obj->setGeometry( geometry );
+ KoRect tqgeometry = obj->tqgeometry();
+ tqgeometry.moveBy( m_diff.x(), m_diff.y() );
+ tqgeometry.setWidth( tqgeometry.width() + r_diff.width() );
+ tqgeometry.setHeight( tqgeometry.height() + r_diff.height() );
+ obj->setGeometry( tqgeometry );
// if ( object->isSelected())
// doc->updateObjectStatusBarItem();
- doc->repaint( obj );
+ doc->tqrepaint( obj );
}
void ChangeObjectGeometryCommand::unexecute()
{
- doc->repaint( obj->geometry() );
+ doc->tqrepaint( obj->tqgeometry() );
- KoRect geometry = obj->geometry();
- geometry.moveBy( -m_diff.x(), -m_diff.y() );
- geometry.setWidth( geometry.width() - r_diff.width() );
- geometry.setHeight( geometry.height() - r_diff.height() );
- obj->setGeometry( geometry );
+ KoRect tqgeometry = obj->tqgeometry();
+ tqgeometry.moveBy( -m_diff.x(), -m_diff.y() );
+ tqgeometry.setWidth( tqgeometry.width() - r_diff.width() );
+ tqgeometry.setHeight( tqgeometry.height() - r_diff.height() );
+ obj->setGeometry( tqgeometry );
// if ( object->isSelected())
// doc->updateObjectStatusBarItem();
- doc->repaint( obj );
+ doc->tqrepaint( obj );
}
-QString ChangeObjectGeometryCommand::name() const
+TQString ChangeObjectGeometryCommand::name() const
{
- /*if ( fabs( obj->geometry().width() - newGeometry.width() )<1e-3 && fabs( obj->geometry().height() - newGeometry.height() ) < 1e-3 )
+ /*if ( fabs( obj->tqgeometry().width() - newGeometry.width() )<1e-3 && fabs( obj->tqgeometry().height() - newGeometry.height() ) < 1e-3 )
return i18n("Move Object");
else */
return i18n("Resize Object");
@@ -665,7 +665,7 @@ void RemoveObjectCommand::execute()
}
obj->setSelected( false );
- doc->repaint( obj );
+ doc->tqrepaint( obj );
executed = true;
}
@@ -677,11 +677,11 @@ void RemoveObjectCommand::unexecute()
EmbeddedKOfficeObject *eko = dynamic_cast<EmbeddedKOfficeObject *>(obj);
eko->embeddedObject()->setDeleted(false);
}
- doc->repaint( obj );
+ doc->tqrepaint( obj );
executed = false;
}
-QString RemoveObjectCommand::name() const
+TQString RemoveObjectCommand::name() const
{
if ( cut )
return i18n("Cut Object");
@@ -689,18 +689,18 @@ QString RemoveObjectCommand::name() const
return i18n("Remove Object");
}
-InsertObjectCommand::InsertObjectCommand( const KoRect& _geometry, KoDocumentEntry& _entry, Canvas *_canvas ) //child
+InsertObjectCommand::InsertObjectCommand( const KoRect& _tqgeometry, KoDocumentEntry& _entry, Canvas *_canvas ) //child
{
- geometry = _geometry;
+ tqgeometry = _tqgeometry;
entry = _entry;
canvas = _canvas;
type = OBJECT_KOFFICE_PART;
obj = 0;
}
-InsertObjectCommand::InsertObjectCommand(const KoRect& _geometry, KoDocumentEntry& _entry, const QRect& _data, Canvas *_canvas ) //chart
+InsertObjectCommand::InsertObjectCommand(const KoRect& _tqgeometry, KoDocumentEntry& _entry, const TQRect& _data, Canvas *_canvas ) //chart
{
- geometry = _geometry;
+ tqgeometry = _tqgeometry;
entry = _entry;
data = _data;
canvas = _canvas;
@@ -708,10 +708,10 @@ InsertObjectCommand::InsertObjectCommand(const KoRect& _geometry, KoDocumentEntr
obj = 0;
}
-InsertObjectCommand::InsertObjectCommand( const KoRect& _geometry , KURL& _file, Canvas *_canvas ) //picture
+InsertObjectCommand::InsertObjectCommand( const KoRect& _tqgeometry , KURL& _file, Canvas *_canvas ) //picture
{
//In the case of pictures, only the top left point of the rectangle is relevant
- geometry = _geometry;
+ tqgeometry = _tqgeometry;
file = _file;
canvas = _canvas;
type = OBJECT_PICTURE;
@@ -737,7 +737,7 @@ void InsertObjectCommand::execute()
if ( obj ) //restore the object which was removed from the object list in InsertObjectCommand::unexecute()
{
canvas->doc()->embeddedObjects().append( obj );
- canvas->doc()->repaint( obj );
+ canvas->doc()->tqrepaint( obj );
}
else
{
@@ -746,17 +746,17 @@ void InsertObjectCommand::execute()
{
case OBJECT_CHART:
{
- success = canvas->activeSheet()->insertChart( geometry, entry, data );
+ success = canvas->activeSheet()->insertChart( tqgeometry, entry, data );
break;
}
case OBJECT_KOFFICE_PART:
{
- success = canvas->activeSheet()->insertChild( geometry, entry );
+ success = canvas->activeSheet()->insertChild( tqgeometry, entry );
break;
}
case OBJECT_PICTURE:
{
- success = canvas->activeSheet()->insertPicture( geometry.topLeft() , file );
+ success = canvas->activeSheet()->insertPicture( tqgeometry.topLeft() , file );
break;
}
default:
@@ -780,17 +780,17 @@ void InsertObjectCommand::unexecute()
canvas->doc()->embeddedObjects().removeRef( obj );
obj->setSelected( false );
- canvas->doc()->repaint( obj );
+ canvas->doc()->tqrepaint( obj );
executed = false;
}
-QString InsertObjectCommand::name() const
+TQString InsertObjectCommand::name() const
{
return i18n("Insert Object");
}
-RenameNameObjectCommand::RenameNameObjectCommand( const QString &_name, const QString &_objectName,
+RenameNameObjectCommand::RenameNameObjectCommand( const TQString &_name, const TQString &_objectName,
EmbeddedObject *_obj, Doc *_doc ):
KNamedCommand( _name ),
newObjectName( _objectName ),
@@ -821,7 +821,7 @@ void RenameNameObjectCommand::unexecute()
// doc->updateSideBarItem( m_page );
}
-GeometryPropertiesCommand::GeometryPropertiesCommand( const QString &name, QPtrList<EmbeddedObject> &objects,
+GeometryPropertiesCommand::GeometryPropertiesCommand( const TQString &name, TQPtrList<EmbeddedObject> &objects,
bool newValue, KgpType type, Doc *_doc )
: KNamedCommand( name )
, m_objects( objects )
@@ -829,7 +829,7 @@ GeometryPropertiesCommand::GeometryPropertiesCommand( const QString &name, QPtrL
, m_type( type )
, m_doc( _doc )
{
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
for ( ; it.current() ; ++it )
{
it.current()->incCmdRef();
@@ -840,8 +840,8 @@ GeometryPropertiesCommand::GeometryPropertiesCommand( const QString &name, QPtrL
}
}
-GeometryPropertiesCommand::GeometryPropertiesCommand( const QString &name, QValueList<bool> &lst,
- QPtrList<EmbeddedObject> &objects, bool newValue,
+GeometryPropertiesCommand::GeometryPropertiesCommand( const TQString &name, TQValueList<bool> &lst,
+ TQPtrList<EmbeddedObject> &objects, bool newValue,
KgpType type, Doc *_doc)
: KNamedCommand( name )
, m_oldValue( lst )
@@ -850,28 +850,28 @@ GeometryPropertiesCommand::GeometryPropertiesCommand( const QString &name, QValu
, m_type( type )
, m_doc ( _doc )
{
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
for ( ; it.current() ; ++it )
it.current()->incCmdRef();
}
GeometryPropertiesCommand::~GeometryPropertiesCommand()
{
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
for ( ; it.current() ; ++it )
it.current()->decCmdRef();
}
void GeometryPropertiesCommand::execute()
{
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
for ( ; it.current() ; ++it )
{
if ( m_type == ProtectSize )
{
it.current()->setProtect( m_newValue );
if ( it.current()->isSelected() )
- m_doc->repaint( it.current() );
+ m_doc->tqrepaint( it.current() );
}
else if ( m_type == KeepRatio)
it.current()->setKeepRatio( m_newValue );
@@ -887,21 +887,21 @@ void GeometryPropertiesCommand::unexecute()
{
obj->setProtect( *m_oldValue.at(i) );
if ( obj->isSelected() )
- m_doc->repaint( obj );
+ m_doc->tqrepaint( obj );
}
else if ( m_type == KeepRatio)
obj->setKeepRatio( *m_oldValue.at(i) );
}
}
-MoveObjectByCmd::MoveObjectByCmd( const QString &_name, const KoPoint &_diff, QPtrList<EmbeddedObject> &_objects,
+MoveObjectByCmd::MoveObjectByCmd( const TQString &_name, const KoPoint &_diff, TQPtrList<EmbeddedObject> &_objects,
Doc *_doc,Sheet *_page )
: KNamedCommand( _name ), diff( _diff ), objects( _objects )
{
objects.setAutoDelete( false );
doc = _doc;
m_page=_page;
- QPtrListIterator<EmbeddedObject> it( objects );
+ TQPtrListIterator<EmbeddedObject> it( objects );
for ( ; it.current() ; ++it )
{
it.current()->incCmdRef();
@@ -910,37 +910,37 @@ MoveObjectByCmd::MoveObjectByCmd( const QString &_name, const KoPoint &_diff, QP
MoveObjectByCmd::~MoveObjectByCmd()
{
- QPtrListIterator<EmbeddedObject> it( objects );
+ TQPtrListIterator<EmbeddedObject> it( objects );
for ( ; it.current() ; ++it )
it.current()->decCmdRef();
}
void MoveObjectByCmd::execute()
{
- QRect oldRect;
+ TQRect oldRect;
for ( unsigned int i = 0; i < objects.count(); i++ ) {
- doc->repaint( objects.at( i )->geometry() );
+ doc->tqrepaint( objects.at( i )->tqgeometry() );
- KoRect r = objects.at( i )->geometry();
+ KoRect r = objects.at( i )->tqgeometry();
r.moveBy( diff.x(), diff.y() );
objects.at( i )->setGeometry( r );
- doc->repaint( objects.at( i ) );
+ doc->tqrepaint( objects.at( i ) );
}
}
void MoveObjectByCmd::unexecute()
{
- QRect oldRect;
+ TQRect oldRect;
for ( unsigned int i = 0; i < objects.count(); i++ ) {
- doc->repaint( objects.at( i )->geometry() );
+ doc->tqrepaint( objects.at( i )->tqgeometry() );
- KoRect r = objects.at( i )->geometry();
+ KoRect r = objects.at( i )->tqgeometry();
r.moveBy( -diff.x(), -diff.y() );
objects.at( i )->setGeometry( r );
- doc->repaint( objects.at( i ) );
+ doc->tqrepaint( objects.at( i ) );
}
}
diff --git a/kspread/commands.h b/kspread/commands.h
index 81bcca9a..d0bd9132 100644
--- a/kspread/commands.h
+++ b/kspread/commands.h
@@ -24,8 +24,8 @@
#include <KoPageLayout.h>
#include <KoQueryTrader.h>
#include <KoUnit.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <kcommand.h>
@@ -93,7 +93,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
UndoAction* undoAction;
@@ -111,7 +111,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Cell* cell;
@@ -119,7 +119,7 @@ protected:
int rowSpan;
int oldColSpan;
int oldRowSpan;
- QString rangeName;
+ TQString rangeName;
};
@@ -133,7 +133,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Cell* cell;
@@ -151,16 +151,16 @@ protected:
class RenameSheetCommand : public KCommand
{
public:
- RenameSheetCommand( Sheet* sheet, const QString &name );
+ RenameSheetCommand( Sheet* sheet, const TQString &name );
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Sheet* sheet;
- QString oldName;
- QString newName;
+ TQString oldName;
+ TQString newName;
};
class HideSheetCommand : public KCommand
@@ -170,11 +170,11 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Doc* doc;
- QString sheetName;
+ TQString sheetName;
};
class ShowSheetCommand : public KCommand
@@ -184,11 +184,11 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Doc* doc;
- QString sheetName;
+ TQString sheetName;
};
@@ -199,7 +199,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Sheet* sheet;
@@ -214,7 +214,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Sheet* sheet;
@@ -244,7 +244,7 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Sheet* sheet;
@@ -270,11 +270,11 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Doc* doc;
- QString sheetName;
+ TQString sheetName;
unsigned int insertPosColumn;
unsigned int nbColumnInserted;
@@ -288,12 +288,12 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Doc* doc;
- QString sheetName;
- QRect printRangeRedo, printRange;
+ TQString sheetName;
+ TQRect printRangeRedo, printRange;
};
@@ -304,11 +304,11 @@ public:
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Doc* doc;
- QString sheetName;
+ TQString sheetName;
KoPageLayout pl;
KoPageLayout plRedo;
KoHeadFoot hf;
@@ -321,12 +321,12 @@ protected:
bool printCommentIndicatorRedo;
bool printFormulaIndicator;
bool printFormulaIndicatorRedo;
- QRect printRange;
- QRect printRangeRedo;
- QPair<int, int> printRepeatColumns;
- QPair<int, int> printRepeatColumnsRedo;
- QPair<int, int> printRepeatRows;
- QPair<int, int> printRepeatRowsRedo;
+ TQRect printRange;
+ TQRect printRangeRedo;
+ TQPair<int, int> printRepeatColumns;
+ TQPair<int, int> printRepeatColumnsRedo;
+ TQPair<int, int> printRepeatRows;
+ TQPair<int, int> printRepeatRowsRedo;
double zoom;
double zoomRedo;
int pageLimitX;
@@ -339,19 +339,19 @@ protected:
class LinkCommand : public KCommand
{
public:
- LinkCommand( Cell* cell, const QString& text, const QString& link );
+ LinkCommand( Cell* cell, const TQString& text, const TQString& link );
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
Cell* cell;
Doc* doc;
- QString oldText;
- QString oldLink;
- QString newText;
- QString newLink;
+ TQString oldText;
+ TQString oldLink;
+ TQString newText;
+ TQString newLink;
};
@@ -363,7 +363,7 @@ class ChangeObjectGeometryCommand : public KCommand
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
KoPoint m_diff;
@@ -380,7 +380,7 @@ class RemoveObjectCommand : public KCommand
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
EmbeddedObject *obj;
@@ -392,21 +392,21 @@ class RemoveObjectCommand : public KCommand
class InsertObjectCommand : public KCommand
{
public:
- InsertObjectCommand( const KoRect& _geometry, KoDocumentEntry&, Canvas *_canvas ); //child
- InsertObjectCommand( const KoRect& _geometry, KoDocumentEntry&, const QRect& _data, Canvas *_canvas ); //chart
- InsertObjectCommand( const KoRect& _geometry, KURL& _file, Canvas *_canvas ); //picture
+ InsertObjectCommand( const KoRect& _tqgeometry, KoDocumentEntry&, Canvas *_canvas ); //child
+ InsertObjectCommand( const KoRect& _tqgeometry, KoDocumentEntry&, const TQRect& _data, Canvas *_canvas ); //chart
+ InsertObjectCommand( const KoRect& _tqgeometry, KURL& _file, Canvas *_canvas ); //picture
~InsertObjectCommand();
virtual void execute();
virtual void unexecute();
- virtual QString name() const;
+ virtual TQString name() const;
protected:
- KoRect geometry;
+ KoRect tqgeometry;
Canvas *canvas;
bool executed;
KoDocumentEntry entry;
- QRect data;
+ TQRect data;
ObjType type;
KURL file;
EmbeddedObject *obj;
@@ -415,12 +415,12 @@ class InsertObjectCommand : public KCommand
class RenameNameObjectCommand : public KNamedCommand
{
public:
- RenameNameObjectCommand( const QString &_name, const QString &_objectName, EmbeddedObject *_obj, Doc *_doc );
+ RenameNameObjectCommand( const TQString &_name, const TQString &_objectName, EmbeddedObject *_obj, Doc *_doc );
~RenameNameObjectCommand();
void execute();
void unexecute();
protected:
- QString oldObjectName, newObjectName;
+ TQString oldObjectName, newObjectName;
EmbeddedObject *object;
Doc *doc;
Sheet *m_page;
@@ -431,9 +431,9 @@ class GeometryPropertiesCommand : public KNamedCommand
{
public:
enum KgpType { ProtectSize, KeepRatio};
- GeometryPropertiesCommand( const QString &name, QPtrList<EmbeddedObject> &objects,
+ GeometryPropertiesCommand( const TQString &name, TQPtrList<EmbeddedObject> &objects,
bool newValue, KgpType type, Doc *_doc );
- GeometryPropertiesCommand( const QString &name, QValueList<bool> &lst, QPtrList<EmbeddedObject> &objects,
+ GeometryPropertiesCommand( const TQString &name, TQValueList<bool> &lst, TQPtrList<EmbeddedObject> &objects,
bool newValue, KgpType type, Doc *_doc );
~GeometryPropertiesCommand();
@@ -441,8 +441,8 @@ public:
virtual void unexecute();
protected:
- QValueList<bool> m_oldValue;
- QPtrList<EmbeddedObject> m_objects;
+ TQValueList<bool> m_oldValue;
+ TQPtrList<EmbeddedObject> m_objects;
bool m_newValue;
KgpType m_type;
Doc *m_doc;
@@ -451,7 +451,7 @@ protected:
class MoveObjectByCmd : public KNamedCommand
{
public:
- MoveObjectByCmd( const QString &_name, const KoPoint &_diff, QPtrList<EmbeddedObject> &_objects,
+ MoveObjectByCmd( const TQString &_name, const KoPoint &_diff, TQPtrList<EmbeddedObject> &_objects,
Doc *_doc, Sheet *m_page );
~MoveObjectByCmd();
@@ -461,7 +461,7 @@ public:
protected:
KoPoint diff;
- QPtrList<EmbeddedObject> objects;
+ TQPtrList<EmbeddedObject> objects;
Doc *doc;
Sheet *m_page;
};
diff --git a/kspread/dependencies.cc b/kspread/dependencies.cc
index c46d926a..7f7c986f 100644
--- a/kspread/dependencies.cc
+++ b/kspread/dependencies.cc
@@ -25,7 +25,7 @@
#include "kspread_cell.h"
#include "kspread_sheet.h"
-#include <qmap.h>
+#include <tqmap.h>
//rows x cols in one cell-chunk; bigger values lead to slower updating
//of range-dependencies, lower values will increase memory usage
@@ -63,9 +63,9 @@ class DependencyList {
/** get dependencies of a cell */
RangeList getDependencies (const Point &cell);
/** get cells depending on this cell, either through normal or range dependency */
- QValueList<Point> getDependants (const Point &cell);
+ TQValueList<Point> getDependants (const Point &cell);
- void areaModified (const QString &name);
+ void areaModified (const TQString &name);
protected:
/** update structures: cell 1 depends on cell 2 */
void addDependency (const Point &cell1, const Point &cell2);
@@ -87,13 +87,13 @@ class DependencyList {
dependencies effectively) */
Point leadingCell (const Point &cell) const;
/** list of leading cells of all cell chunks that this range belongs to */
- QValueList<Point> leadingCells (const Range &range) const;
+ TQValueList<Point> leadingCells (const Range &range) const;
/** retrieve a list of cells that a given cell depends on */
RangeList computeDependencies (const Point &cell) const;
- QValueList<Point> getCellDeps(const Point& cell) const {
- CellDepsMap::const_iterator it = cellDeps.find( cell );
- return it == cellDeps.end() ? QValueList<Point>() : *it;
+ TQValueList<Point> getCellDeps(const Point& cell) const {
+ CellDepsMap::const_iterator it = cellDeps.tqfind( cell );
+ return it == cellDeps.end() ? TQValueList<Point>() : *it;
}
/** debug */
@@ -103,14 +103,14 @@ class DependencyList {
Sheet *sheet;
/** dependencies of each cell */
- QMap<Point, RangeList> dependencies;
+ TQMap<Point, RangeList> dependencies;
/** list of cells (but NOT ranges) that depend on a cell */
- typedef QMap<Point, QValueList<Point> > CellDepsMap;
+ typedef TQMap<Point, TQValueList<Point> > CellDepsMap;
CellDepsMap cellDeps;
/** all range dependencies splitted into cell-chunks (TODO: describe) */
- QMap<Point, QValueList<RangeDependency> > rangeDeps;
+ TQMap<Point, TQValueList<RangeDependency> > rangeDeps;
/** list of cells referencing a given named area */
- QMap<QString, QMap<Point, bool> > areaDeps;
+ TQMap<TQString, TQMap<Point, bool> > areaDeps;
};
} // namespace KSpread
@@ -121,16 +121,16 @@ using namespace KSpread;
// gdb or from debug output to check that everything is set up ok.
void DependencyList::dump()
{
- QMap<Point, RangeList>::const_iterator it = dependencies.begin();
+ TQMap<Point, RangeList>::const_iterator it = dependencies.begin();
for ( ; it != dependencies.end(); ++it ) {
Point p = it.key();
kdDebug() << "Cell " << p.sheetName() << " " << p.pos()
<< " depends on :" << endl;
RangeList rl = (*it);
- QValueList<Point>::const_iterator itp = rl.cells.begin();
+ TQValueList<Point>::const_iterator itp = rl.cells.begin();
for ( ; itp != rl.cells.end(); ++itp )
kdDebug() << " cell " << (*itp).pos() << endl;
- QValueList<Range>::const_iterator itr = rl.ranges.begin();
+ TQValueList<Range>::const_iterator itr = rl.ranges.begin();
for ( ; itr != rl.ranges.end(); ++itr )
kdDebug() << " range " << (*itr).toString() << endl;
}
@@ -141,7 +141,7 @@ void DependencyList::dump()
Point p = cit.key();
kdDebug() << "The cells that depend on " << p.sheetName() << " " << p.pos()
<< " are :" << endl;
- QValueList<Point>::const_iterator itp = (*cit).begin();
+ TQValueList<Point>::const_iterator itp = (*cit).begin();
for ( ; itp != (*cit).end(); ++itp )
kdDebug() << " cell " << (*itp).pos() << endl;
}
@@ -181,7 +181,7 @@ void DependencyManager::rangeListChanged (const RangeList &rangeList)
deps->processDependencies (rangeList);
}
-void DependencyManager::areaModified (const QString &name)
+void DependencyManager::areaModified (const TQString &name)
{
deps->areaModified (name);
}
@@ -191,7 +191,7 @@ RangeList DependencyManager::getDependencies (const Point &cell)
return deps->getDependencies (cell);
}
-QValueList<Point> DependencyManager::getDependants (const Point &cell)
+TQValueList<Point> DependencyManager::getDependants (const Point &cell)
{
return deps->getDependants (cell);
}
@@ -231,20 +231,20 @@ RangeList DependencyList::getDependencies (const Point &cell)
{
RangeList rl;
//look if the cell has any dependencies
- if (!dependencies.contains (cell))
+ if (!dependencies.tqcontains (cell))
return rl; //it doesn't - return an empty list
//the cell does have dependencies - return them!
return dependencies[cell];
}
-QValueList<Point> DependencyList::getDependants (const Point &cell)
+TQValueList<Point> DependencyList::getDependants (const Point &cell)
{
//cell dependencies go first
- QValueList<Point> list = getCellDeps( cell );
+ TQValueList<Point> list = getCellDeps( cell );
//next, append range dependencies
Point leading = leadingCell (cell);
- QValueList<RangeDependency>::iterator it;
+ TQValueList<RangeDependency>::iterator it;
if (!rangeDeps.count (leading))
return list; //no range dependencies in this cell chunk -> nothing more to do
@@ -253,7 +253,7 @@ QValueList<Point> DependencyList::getDependants (const Point &cell)
{
//process all range dependencies, and for each range including the questioned cell,
//add the depending cell to the list
- if ((*it).range.contains (cell))
+ if ((*it).range.tqcontains (cell))
{
Point c;
c.setRow ((*it).cellrow);
@@ -266,16 +266,16 @@ QValueList<Point> DependencyList::getDependants (const Point &cell)
return list;
}
-void DependencyList::areaModified (const QString &name)
+void DependencyList::areaModified (const TQString &name)
{
// since area names are something like aliases, modifying an area name
// basically means that all cells referencing this area should be treated
// as modified - that will retrieve updated area ranges and also update
// everything as necessary ...
- if (!areaDeps.contains (name))
+ if (!areaDeps.tqcontains (name))
return;
- QMap<Point, bool>::iterator it;
+ TQMap<Point, bool>::iterator it;
for (it = areaDeps[name].begin(); it != areaDeps[name].end(); ++it)
{
Cell *c = it.key().cell();
@@ -310,8 +310,8 @@ void DependencyList::addRangeDependency (const RangeDependency &rd)
cell.setColumn (rd.cellcolumn);
dependencies[cell].ranges.push_back (rd.range);
- QValueList<Point> leadings = leadingCells (rd.range);
- QValueList<Point>::iterator it;
+ TQValueList<Point> leadings = leadingCells (rd.range);
+ TQValueList<Point>::iterator it;
for (it = leadings.begin(); it != leadings.end(); ++it)
sh->dependencies()->deps->rangeDeps[*it].push_back (rd);
@@ -323,12 +323,12 @@ void DependencyList::addRangeDependency (const RangeDependency &rd)
void DependencyList::removeDependencies (const Point &cell)
{
//look if the cell has any dependencies
- if (!dependencies.contains (cell))
+ if (!dependencies.tqcontains (cell))
return; //it doesn't - nothing more to do
//first we remove cell-dependencies
- QValueList<Point> cells = dependencies[cell].cells;
- QValueList<Point>::iterator it1;
+ TQValueList<Point> cells = dependencies[cell].cells;
+ TQValueList<Point>::iterator it1;
for (it1 = cells.begin(); it1 != cells.end(); ++it1)
{
//get sheet-pointer - needed to handle inter-sheet dependencies correctly
@@ -336,27 +336,27 @@ void DependencyList::removeDependencies (const Point &cell)
if (!sh)
sh = sheet;
- if (!sh->dependencies()->deps->cellDeps.contains (*it1))
+ if (!sh->dependencies()->deps->cellDeps.tqcontains (*it1))
continue; //this should never happen
//we no longer depend on this cell
- QValueList<Point>::iterator cit;
- cit = sh->dependencies()->deps->cellDeps[*it1].find (cell);
+ TQValueList<Point>::iterator cit;
+ cit = sh->dependencies()->deps->cellDeps[*it1].tqfind (cell);
if (cit != sh->dependencies()->deps->cellDeps[*it1].end())
sh->dependencies()->deps->cellDeps[*it1].erase (cit);
}
//then range-dependencies are removed
- QValueList<Range> ranges = dependencies[cell].ranges;
- QValueList<Range>::iterator it2;
- QValueList<Point> leads;
+ TQValueList<Range> ranges = dependencies[cell].ranges;
+ TQValueList<Range>::iterator it2;
+ TQValueList<Point> leads;
for (it2 = ranges.begin(); it2 != ranges.end(); ++it2)
{
//we construct a list of cell-chunks containing a range and merge it
//with lists generated from all previous ranges (duplicates are removed)
- QValueList<Point> leadings = leadingCells (*it2);
+ TQValueList<Point> leadings = leadingCells (*it2);
for (it1 = leadings.begin(); it1 != leadings.end(); ++it1)
- if (!leads.contains (*it1))
+ if (!leads.tqcontains (*it1))
leads.push_back (*it1);
}
for (it1 = leads.begin(); it1 != leads.end(); ++it1)
@@ -366,9 +366,9 @@ void DependencyList::removeDependencies (const Point &cell)
if (!sh)
sh = sheet;
- if (sh->dependencies()->deps->rangeDeps.contains (*it1))
+ if (sh->dependencies()->deps->rangeDeps.tqcontains (*it1))
{
- QValueList<RangeDependency>::iterator it3;
+ TQValueList<RangeDependency>::iterator it3;
it3 = sh->dependencies()->deps->rangeDeps[*it1].begin();
//erase all range dependencies of this cell in this cell-chunk
while (it3 != sh->dependencies()->deps->rangeDeps[*it1].end())
@@ -384,9 +384,9 @@ void DependencyList::removeDependencies (const Point &cell)
}
// remove information about named area dependencies
- QMap<QString, QMap<Point, bool> >::iterator itr;
+ TQMap<TQString, TQMap<Point, bool> >::iterator itr;
for (itr = areaDeps.begin(); itr != areaDeps.end(); ++itr) {
- if (itr.data().contains (cell))
+ if (itr.data().tqcontains (cell))
itr.data().remove (cell);
}
@@ -413,8 +413,8 @@ void DependencyList::generateDependencies (const Point &cell)
//now that we have the new dependencies, we put them into our data structures
//and we're done
- QValueList<Point>::iterator it1;
- QValueList<Range>::iterator it2;
+ TQValueList<Point>::iterator it1;
+ TQValueList<Range>::iterator it2;
for (it1 = rl.cells.begin(); it1 != rl.cells.end(); ++it1)
addDependency (cell, *it1);
@@ -448,8 +448,8 @@ void DependencyList::generateDependencies (const Range &range)
void DependencyList::generateDependencies (const RangeList &rangeList)
{
- QValueList<Point>::const_iterator it1;
- QValueList<Range>::const_iterator it2;
+ TQValueList<Point>::const_iterator it1;
+ TQValueList<Range>::const_iterator it2;
for (it1 = rangeList.cells.begin(); it1 != rangeList.cells.end(); ++it1)
generateDependencies (*it1);
@@ -459,9 +459,9 @@ void DependencyList::generateDependencies (const RangeList &rangeList)
void DependencyList::processDependencies (const Point &cell)
{
- const QValueList<Point> d = getCellDeps(cell);
- QValueList<Point>::const_iterator it = d.begin();
- const QValueList<Point>::const_iterator end = d.end();
+ const TQValueList<Point> d = getCellDeps(cell);
+ TQValueList<Point>::const_iterator it = d.begin();
+ const TQValueList<Point>::const_iterator end = d.end();
for (; it != end; ++it)
updateCell (*it);
@@ -474,14 +474,14 @@ void DependencyList::processRangeDependencies (const Point &cell)
if (!rangeDeps.count (leading))
return; //no range dependencies in this cell chunk
- const QValueList<RangeDependency> rd = rangeDeps[leading];
+ const TQValueList<RangeDependency> rd = rangeDeps[leading];
- QValueList<RangeDependency>::const_iterator it;
+ TQValueList<RangeDependency>::const_iterator it;
for (it = rd.begin(); it != rd.end(); ++it)
{
//process all range dependencies, and for each range including the modified cell,
//recalc the depending cell
- if ((*it).range.contains (cell))
+ if ((*it).range.tqcontains (cell))
{
Point c;
c.setRow ((*it).cellrow);
@@ -504,9 +504,9 @@ void DependencyList::processDependencies (const Range &range)
c.setColumn (col);
c.setSheet( sheet );
- const QValueList<Point> d = getCellDeps(c);
- QValueList<Point>::const_iterator it = d.begin();
- const QValueList<Point>::const_iterator end = d.end();
+ const TQValueList<Point> d = getCellDeps(c);
+ TQValueList<Point>::const_iterator it = d.begin();
+ const TQValueList<Point>::const_iterator end = d.end();
for (; it != end; ++it)
updateCell (*it);
}
@@ -521,13 +521,13 @@ void DependencyList::processRangeDependencies (const Range &range)
//This will probably happen as a part of splitting this into dep manager
//and recalc manager
- QValueList<Point> leadings = leadingCells (range);
- QValueList<Point>::iterator it;
+ TQValueList<Point> leadings = leadingCells (range);
+ TQValueList<Point>::iterator it;
for (it = leadings.begin(); it != leadings.end(); ++it)
{
if (!rangeDeps.count (*it))
continue; //no range dependencies in this cell chunk
- QValueList<RangeDependency>::iterator it2;
+ TQValueList<RangeDependency>::iterator it2;
for (it2 = rangeDeps[*it].begin(); it2 != rangeDeps[*it].end(); ++it2)
{
//process all range dependencies, and for each range intersecting with our range,
@@ -546,8 +546,8 @@ void DependencyList::processRangeDependencies (const Range &range)
void DependencyList::processDependencies (const RangeList &rangeList)
{
- QValueList<Point>::const_iterator it1;
- QValueList<Range>::const_iterator it2;
+ TQValueList<Point>::const_iterator it1;
+ TQValueList<Range>::const_iterator it2;
for (it1 = rangeList.cells.begin(); it1 != rangeList.cells.end(); ++it1)
processDependencies (*it1);
@@ -601,9 +601,9 @@ Point DependencyList::leadingCell (const Point &cell) const
return c;
}
-QValueList<Point> DependencyList::leadingCells (const Range &range) const
+TQValueList<Point> DependencyList::leadingCells (const Range &range) const
{
- QValueList<Point> cells;
+ TQValueList<Point> cells;
Point cell1, cell2, cell;
cell1.setRow (range.startRow());
@@ -663,14 +663,14 @@ RangeList DependencyList::computeDependencies (const Point &cell) const
//parse each cell/range and put it to our RangeList
if (tokenType == Token::Cell)
{
- QString text = token.text();
+ TQString text = token.text();
Point cell (text, sheet->workbook(), sheet);
if (cell.isValid())
rl.cells.push_back (cell);
}
else if (tokenType == Token::Range)
{
- QString text = token.text();
+ TQString text = token.text();
Range range (text, sheet->workbook(), sheet);
if (range.isValid())
rl.ranges.push_back (range);
diff --git a/kspread/dependencies.h b/kspread/dependencies.h
index e6ea47bf..0bc0a9a5 100644
--- a/kspread/dependencies.h
+++ b/kspread/dependencies.h
@@ -20,7 +20,7 @@
#ifndef KSPREAD_DEPENDENCIES
#define KSPREAD_DEPENDENCIES
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "kspread_util.h"
@@ -64,12 +64,12 @@ class DependencyManager {
void rangeListChanged (const RangeList &rangeList);
/** a named area was somehow modified */
- void areaModified (const QString &name);
+ void areaModified (const TQString &name);
/** get dependencies of a cell */
RangeList getDependencies (const Point &cell);
/** get cells depending on this cell, either through normal or range dependency */
- QValueList<Point> getDependants (const Point &cell);
+ TQValueList<Point> getDependants (const Point &cell);
protected:
/** local d-pointer */
diff --git a/kspread/dialogs/SheetSelectWidget.ui b/kspread/dialogs/SheetSelectWidget.ui
index c42989ae..525b83f3 100644
--- a/kspread/dialogs/SheetSelectWidget.ui
+++ b/kspread/dialogs/SheetSelectWidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SheetSelectWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SheetSelectWidget</cstring>
</property>
@@ -254,7 +254,7 @@ It is even possible to print a sheet more than once. Just insert the desired she
<tabstop>ButtonMoveDown</tabstop>
<tabstop>ButtonMoveBottom</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/kspread/dialogs/font_cell_format.ui b/kspread/dialogs/font_cell_format.ui
index fa56db72..3bb6b78a 100644
--- a/kspread/dialogs/font_cell_format.ui
+++ b/kspread/dialogs/font_cell_format.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FontTab</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>FontTab</cstring>
</property>
@@ -20,15 +20,15 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>Varying (No Change)</string>
@@ -54,7 +54,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Choose the style for your font for the currently selected cells. When you select several cells with different styles, the displayed style is set to Varying (No Change) and leaving it that way will keep all your current style settings for each cell. Changing to Roman for example will change all the selected cells style text to Roman.</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>Varying (No Change)</string>
@@ -80,7 +80,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Choose the weight for your font for the currently selected cells. When you select several cells with different font weight, the displayed weight is set to Varying (No Change) and leaving it that way will keep all your current weight settings for each cell. Changing to Bold for example will change all the selected cells font weight to Bold.</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -88,7 +88,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Color:</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>underline</cstring>
</property>
@@ -99,7 +99,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>If this is checked, the current cell text wil be underlined.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -107,7 +107,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Size:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -115,7 +115,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Weight:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -134,7 +134,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>Choose the color for the current cell text. Clicking on the color bar will bring you the standard KDE Select Color dialog where you will be able to choose the new color.</string>
</property>
</widget>
- <widget class="QCheckBox" row="5" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="5" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>strike</cstring>
</property>
@@ -145,7 +145,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>This will strike out the current cell text if this is checked.</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<property name="name">
<cstring>size_combo</cstring>
</property>
@@ -168,14 +168,14 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<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="QListBox" row="0" column="0" rowspan="2" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="2" colspan="1">
<property name="name">
<cstring>family_combo</cstring>
</property>
@@ -183,7 +183,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<string>This box lists all your available font families. Click on one family to set it in the current cell.</string>
</property>
</widget>
- <widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -194,7 +194,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>example_label</cstring>
</property>
@@ -206,7 +206,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignHCenter</set>
</property>
<property name="whatsThis" stdset="0">
@@ -219,7 +219,7 @@ The default font is set for all cells in the Format -&gt; Style Manager menu wit
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcolorbutton.h</includehint>
</includehints>
diff --git a/kspread/dialogs/kspread_dlg_angle.cc b/kspread/dialogs/kspread_dlg_angle.cc
index 8dc31e1c..dc633c55 100644
--- a/kspread/dialogs/kspread_dlg_angle.cc
+++ b/kspread/dialogs/kspread_dlg_angle.cc
@@ -21,8 +21,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kbuttonbox.h>
#include <kdebug.h>
@@ -38,29 +38,29 @@
using namespace KSpread;
-AngleDialog::AngleDialog(View* parent, const char* name, const QPoint &_marker)
- : KDialogBase( parent, name,TRUE,i18n("Change Angle" ), Ok|Cancel|Default )
+AngleDialog::AngleDialog(View* tqparent, const char* name, const TQPoint &_marker)
+ : KDialogBase( tqparent, name,TRUE,i18n("Change Angle" ), Ok|Cancel|Default )
{
- m_pView=parent;
+ m_pView=tqparent;
marker=_marker;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay = new TQVBoxLayout( page, 0, spacingHint() );
m_pAngle = new KIntNumInput( page );
m_pAngle->setRange( -90, 90, 1 );
m_pAngle->setLabel( i18n("Angle:") );
m_pAngle->setSuffix(" ");
lay->addWidget( m_pAngle );
- QWidget* spacer = new QWidget( page );
- spacer->setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Expanding ) );
+ TQWidget* spacer = new TQWidget( page );
+ spacer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Expanding ) );
lay->addWidget( spacer );
m_pAngle->setFocus();
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
Cell *cell = m_pView->activeSheet()->cellAt( marker.x(), marker.y() );
int angle=-(cell->format()->getAngle(marker.x(), marker.y()));
diff --git a/kspread/dialogs/kspread_dlg_angle.h b/kspread/dialogs/kspread_dlg_angle.h
index 0f2fc447..26ce07e1 100644
--- a/kspread/dialogs/kspread_dlg_angle.h
+++ b/kspread/dialogs/kspread_dlg_angle.h
@@ -35,15 +35,16 @@ class View;
class AngleDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- AngleDialog( View* parent,const char* name,const QPoint &_marker);
+ AngleDialog( View* tqparent,const char* name,const TQPoint &_marker);
public slots:
void slotOk();
void slotDefault();
protected:
View* m_pView;
- QPoint marker;
+ TQPoint marker;
KIntNumInput *m_pAngle;
};
diff --git a/kspread/dialogs/kspread_dlg_area.cc b/kspread/dialogs/kspread_dlg_area.cc
index 7932ad13..880b357b 100644
--- a/kspread/dialogs/kspread_dlg_area.cc
+++ b/kspread/dialogs/kspread_dlg_area.cc
@@ -21,9 +21,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
#include <kmessagebox.h>
@@ -37,46 +37,46 @@
using namespace KSpread;
-AreaDialog::AreaDialog( View * parent, const char * name, const QPoint & _marker )
- : KDialogBase( parent, name, TRUE, i18n("Area Name"), Ok | Cancel )
+AreaDialog::AreaDialog( View * tqparent, const char * name, const TQPoint & _marker )
+ : KDialogBase( tqparent, name, TRUE, i18n("Area Name"), Ok | Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
m_marker = _marker;
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout * lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout * lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel * label = new QLabel( i18n("Enter the area name:"), page );
+ TQLabel * label = new TQLabel( i18n("Enter the area name:"), page );
lay1->addWidget( label );
- m_areaName = new QLineEdit(page);
- m_areaName->setMinimumWidth( m_areaName->sizeHint().width() * 3 );
+ m_areaName = new TQLineEdit(page);
+ m_areaName->setMinimumWidth( m_areaName->tqsizeHint().width() * 3 );
lay1->addWidget( m_areaName );
m_areaName->setFocus();
- connect ( m_areaName, SIGNAL(textChanged ( const QString & )), this, SLOT(slotAreaNamechanged( const QString &)));
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
+ connect ( m_areaName, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(slotAreaNamechanged( const TQString &)));
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
enableButtonOK(!m_areaName->text().isEmpty());
}
-void AreaDialog::slotAreaNamechanged( const QString & text)
+void AreaDialog::slotAreaNamechanged( const TQString & text)
{
enableButtonOK(!text.isEmpty());
}
void AreaDialog::slotOk()
{
- QString tmp(m_areaName->text());
+ TQString tmp(m_areaName->text());
if( !tmp.isEmpty() )
{
tmp = tmp.lower();
- QRect rect( m_pView->selectionInfo()->selection() );
+ TQRect rect( m_pView->selectionInfo()->selection() );
bool newName = true;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area = m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
if(tmp == (*it).ref_name)
diff --git a/kspread/dialogs/kspread_dlg_area.h b/kspread/dialogs/kspread_dlg_area.h
index 302715c8..6236cf85 100644
--- a/kspread/dialogs/kspread_dlg_area.h
+++ b/kspread/dialogs/kspread_dlg_area.h
@@ -26,9 +26,9 @@
#include <kdialogbase.h>
-class QPushButton;
-class QLineEdit;
-class QLabel;
+class TQPushButton;
+class TQLineEdit;
+class TQLabel;
namespace KSpread
{
@@ -37,17 +37,18 @@ class View;
class AreaDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- AreaDialog( View * parent, const char * name, const QPoint & _marker );
+ AreaDialog( View * tqparent, const char * name, const TQPoint & _marker );
public slots:
void slotOk();
- void slotAreaNamechanged( const QString & text);
+ void slotAreaNamechanged( const TQString & text);
protected:
View * m_pView;
- QLineEdit * m_areaName;
- QPoint m_marker;
+ TQLineEdit * m_areaName;
+ TQPoint m_marker;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_comment.cc b/kspread/dialogs/kspread_dlg_comment.cc
index 79ce9c49..603ceae5 100644
--- a/kspread/dialogs/kspread_dlg_comment.cc
+++ b/kspread/dialogs/kspread_dlg_comment.cc
@@ -21,9 +21,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kbuttonbox.h>
@@ -38,16 +38,16 @@
using namespace KSpread;
-CommentDialog::CommentDialog( View* parent, const char* name,const QPoint &_marker)
- : KDialogBase( parent, name,TRUE,i18n("Cell Comment"),Ok|Cancel )
+CommentDialog::CommentDialog( View* tqparent, const char* name,const TQPoint &_marker)
+ : KDialogBase( tqparent, name,TRUE,i18n("Cell Comment"),Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
marker= _marker;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- multiLine = new QMultiLineEdit( page );
+ multiLine = new TQMultiLineEdit( page );
lay1->addWidget(multiLine);
multiLine->setFocus();
@@ -57,8 +57,8 @@ CommentDialog::CommentDialog( View* parent, const char* name,const QPoint &_mark
if(!cell->format()->comment(marker.x(),marker.y()).isEmpty())
multiLine->setText(cell->format()->comment(marker.x(),marker.y()));
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect(multiLine, SIGNAL(textChanged ()),this, SLOT(slotTextChanged()));
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect(multiLine, TQT_SIGNAL(textChanged ()),this, TQT_SLOT(slotTextChanged()));
slotTextChanged();
diff --git a/kspread/dialogs/kspread_dlg_comment.h b/kspread/dialogs/kspread_dlg_comment.h
index 21636d35..e44aed81 100644
--- a/kspread/dialogs/kspread_dlg_comment.h
+++ b/kspread/dialogs/kspread_dlg_comment.h
@@ -26,8 +26,8 @@
#include <kdialogbase.h>
-class QPushButton;
-class QMultiLineEdit;
+class TQPushButton;
+class TQMultiLineEdit;
namespace KSpread
{
@@ -37,8 +37,9 @@ class View;
class CommentDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- CommentDialog( View* parent, const char* name,const QPoint &_marker );
+ CommentDialog( View* tqparent, const char* name,const TQPoint &_marker );
public slots:
void slotOk();
@@ -46,8 +47,8 @@ public slots:
protected:
View* m_pView;
- QMultiLineEdit *multiLine;
- QPoint marker;
+ TQMultiLineEdit *multiLine;
+ TQPoint marker;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_conditional.cc b/kspread/dialogs/kspread_dlg_conditional.cc
index e9289d3f..b19900c1 100644
--- a/kspread/dialogs/kspread_dlg_conditional.cc
+++ b/kspread/dialogs/kspread_dlg_conditional.cc
@@ -41,28 +41,28 @@
#include <KoGlobal.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
using namespace KSpread;
-ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+ConditionalWidget::ConditionalWidget( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
- QGridLayout * Form1Layout = new QGridLayout( this, 1, 1, 11, 6, "Form1Layout");
+ TQGridLayout * Form1Layout = new TQGridLayout( this, 1, 1, 11, 6, "Form1Layout");
- QGroupBox * groupBox1_3 = new QGroupBox( this, "groupBox1_3" );
+ TQGroupBox * groupBox1_3 = new TQGroupBox( this, "groupBox1_3" );
groupBox1_3->setColumnLayout(0, Qt::Vertical );
- groupBox1_3->layout()->setSpacing( KDialog::spacingHint() );
- groupBox1_3->layout()->setMargin( KDialog::marginHint() );
- QGridLayout * groupBox1_3Layout = new QGridLayout( groupBox1_3->layout() );
- groupBox1_3Layout->setAlignment( Qt::AlignTop );
+ groupBox1_3->tqlayout()->setSpacing( KDialog::spacingHint() );
+ groupBox1_3->tqlayout()->setMargin( KDialog::marginHint() );
+ TQGridLayout * groupBox1_3Layout = new TQGridLayout( groupBox1_3->tqlayout() );
+ groupBox1_3Layout->tqsetAlignment( TQt::AlignTop );
- QLabel * textLabel1_3 = new QLabel( groupBox1_3, "textLabel1_3" );
+ TQLabel * textLabel1_3 = new TQLabel( groupBox1_3, "textLabel1_3" );
groupBox1_3Layout->addWidget( textLabel1_3, 0, 0 );
- m_condition_3 = new QComboBox( false, groupBox1_3, "m_condition_3" );
+ m_condition_3 = new TQComboBox( false, groupBox1_3, "m_condition_3" );
groupBox1_3Layout->addWidget( m_condition_3, 0, 1 );
m_firstValue_3 = new KLineEdit( groupBox1_3, "m_firstValue_3" );
@@ -73,38 +73,38 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags
m_secondValue_3->setEnabled( false );
groupBox1_3Layout->addWidget( m_secondValue_3, 0, 3 );
- m_style_3 = new QComboBox( false, groupBox1_3, "m_style_3" );
+ m_style_3 = new TQComboBox( false, groupBox1_3, "m_style_3" );
m_style_3->setEnabled( false );
groupBox1_3Layout->addWidget( m_style_3, 1, 1 );
- QLabel * textLabel2_3 = new QLabel( groupBox1_3, "textLabel2_3" );
+ TQLabel * textLabel2_3 = new TQLabel( groupBox1_3, "textLabel2_3" );
groupBox1_3Layout->addWidget( textLabel2_3, 1, 0 );
- QSpacerItem * spacer = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_3Layout->addItem( spacer, 1, 2 );
- QSpacerItem * spacer_2 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer_2 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_3Layout->addItem( spacer_2, 1, 3 );
Form1Layout->addWidget( groupBox1_3, 2, 0 );
- QGroupBox * groupBox1_2 = new QGroupBox( this, "groupBox1_2" );
+ TQGroupBox * groupBox1_2 = new TQGroupBox( this, "groupBox1_2" );
groupBox1_2->setColumnLayout(0, Qt::Vertical );
- groupBox1_2->layout()->setSpacing( KDialog::spacingHint() );
- groupBox1_2->layout()->setMargin( KDialog::marginHint() );
+ groupBox1_2->tqlayout()->setSpacing( KDialog::spacingHint() );
+ groupBox1_2->tqlayout()->setMargin( KDialog::marginHint() );
- QGridLayout * groupBox1_2Layout = new QGridLayout( groupBox1_2->layout() );
- groupBox1_2Layout->setAlignment( Qt::AlignTop );
+ TQGridLayout * groupBox1_2Layout = new TQGridLayout( groupBox1_2->tqlayout() );
+ groupBox1_2Layout->tqsetAlignment( TQt::AlignTop );
- QLabel * textLabel1_2 = new QLabel( groupBox1_2, "textLabel1_2" );
+ TQLabel * textLabel1_2 = new TQLabel( groupBox1_2, "textLabel1_2" );
groupBox1_2Layout->addWidget( textLabel1_2, 0, 0 );
- QLabel * textLabel2_2 = new QLabel( groupBox1_2, "textLabel2_2" );
+ TQLabel * textLabel2_2 = new TQLabel( groupBox1_2, "textLabel2_2" );
groupBox1_2Layout->addWidget( textLabel2_2, 1, 0 );
- m_condition_2 = new QComboBox( false, groupBox1_2, "m_condition_2" );
+ m_condition_2 = new TQComboBox( false, groupBox1_2, "m_condition_2" );
groupBox1_2Layout->addWidget( m_condition_2, 0, 1 );
- m_style_2 = new QComboBox( false, groupBox1_2, "m_style_2" );
+ m_style_2 = new TQComboBox( false, groupBox1_2, "m_style_2" );
m_style_2->setEnabled( false );
groupBox1_2Layout->addWidget( m_style_2, 1, 1 );
@@ -117,30 +117,30 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags
groupBox1_2Layout->addWidget( m_secondValue_2, 0, 3 );
- QSpacerItem * spacer_3 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer_3 = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_2Layout->addItem( spacer_3, 1, 2 );
- QSpacerItem * spacer_4 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer_4 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_2Layout->addItem( spacer_4, 1, 3 );
Form1Layout->addWidget( groupBox1_2, 1, 0 );
- QGroupBox * groupBox1_1 = new QGroupBox( this, "groupBox1_1" );
+ TQGroupBox * groupBox1_1 = new TQGroupBox( this, "groupBox1_1" );
groupBox1_1->setColumnLayout(0, Qt::Vertical );
- groupBox1_1->layout()->setSpacing( KDialog::spacingHint() );
- groupBox1_1->layout()->setMargin( KDialog::marginHint() );
+ groupBox1_1->tqlayout()->setSpacing( KDialog::spacingHint() );
+ groupBox1_1->tqlayout()->setMargin( KDialog::marginHint() );
- QGridLayout * groupBox1_1Layout = new QGridLayout( groupBox1_1->layout() );
- groupBox1_1Layout->setAlignment( Qt::AlignTop );
+ TQGridLayout * groupBox1_1Layout = new TQGridLayout( groupBox1_1->tqlayout() );
+ groupBox1_1Layout->tqsetAlignment( TQt::AlignTop );
- QLabel * textLabel1_1 = new QLabel( groupBox1_1, "textLabel1_2_2" );
+ TQLabel * textLabel1_1 = new TQLabel( groupBox1_1, "textLabel1_2_2" );
groupBox1_1Layout->addWidget( textLabel1_1, 0, 0 );
- QLabel * textLabel2_1 = new QLabel( groupBox1_1, "textLabel2_2_2" );
+ TQLabel * textLabel2_1 = new TQLabel( groupBox1_1, "textLabel2_2_2" );
groupBox1_1Layout->addWidget( textLabel2_1, 1, 0 );
- m_condition_1 = new QComboBox( false, groupBox1_1, "m_condition_1" );
+ m_condition_1 = new TQComboBox( false, groupBox1_1, "m_condition_1" );
groupBox1_1Layout->addWidget( m_condition_1, 0, 1 );
- m_style_1 = new QComboBox( false, groupBox1_1, "m_style_1" );
+ m_style_1 = new TQComboBox( false, groupBox1_1, "m_style_1" );
m_style_1->setEnabled( false );
groupBox1_1Layout->addWidget( m_style_1, 1, 1 );
@@ -152,16 +152,16 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags
m_secondValue_1->setEnabled( false );
groupBox1_1Layout->addWidget( m_secondValue_1, 0, 3 );
- QSpacerItem * spacer_5 = new QSpacerItem( 41, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer_5 = new TQSpacerItem( 41, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_1Layout->addItem( spacer_5, 1, 2 );
- QSpacerItem * spacer_6 = new QSpacerItem( 61, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer_6 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
groupBox1_1Layout->addItem( spacer_6, 1, 3 );
Form1Layout->addWidget( groupBox1_1, 0, 0 );
- resize( QSize(702, 380).expandedTo( minimumSizeHint() ) );
+ resize( TQSize(702, 380).expandedTo( tqminimumSizeHint() ) );
clearWState( WState_Polished );
- QStringList list;
+ TQStringList list;
list += i18n( "<none>" );
list += i18n( "equal to" );
list += i18n( "greater than" );
@@ -189,16 +189,16 @@ ConditionalWidget::ConditionalWidget( QWidget* parent, const char* name, WFlags
textLabel2_2->setText( i18n( "Cell style" ) );
textLabel2_3->setText( i18n( "Cell style" ) );
- connect( m_condition_1, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged1( const QString & ) ) );
- connect( m_condition_2, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged2( const QString & ) ) );
- connect( m_condition_3, SIGNAL( highlighted( const QString & ) ), this, SLOT( slotTextChanged3( const QString & ) ) );
+ connect( m_condition_1, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged1( const TQString & ) ) );
+ connect( m_condition_2, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged2( const TQString & ) ) );
+ connect( m_condition_3, TQT_SIGNAL( highlighted( const TQString & ) ), this, TQT_SLOT( slotTextChanged3( const TQString & ) ) );
}
ConditionalWidget::~ConditionalWidget()
{
}
-void ConditionalWidget::slotTextChanged1( const QString & text )
+void ConditionalWidget::slotTextChanged1( const TQString & text )
{
if ( text == i18n( "<none>" ) )
{
@@ -223,7 +223,7 @@ void ConditionalWidget::slotTextChanged1( const QString & text )
}
}
-void ConditionalWidget::slotTextChanged2( const QString & text )
+void ConditionalWidget::slotTextChanged2( const TQString & text )
{
if ( text == i18n( "<none>" ) )
{
@@ -248,7 +248,7 @@ void ConditionalWidget::slotTextChanged2( const QString & text )
}
}
-void ConditionalWidget::slotTextChanged3( const QString & text )
+void ConditionalWidget::slotTextChanged3( const TQString & text )
{
if ( text == i18n( "<none>" ) )
{
@@ -276,22 +276,22 @@ void ConditionalWidget::slotTextChanged3( const QString & text )
* ConditionalDialog
* Sets conditional cell formattings.
*/
-ConditionalDialog::ConditionalDialog( View * parent, const char * name,
- const QRect & marker )
- : KDialogBase( parent, name, true, "", KDialogBase::Ok | KDialogBase::Cancel,
+ConditionalDialog::ConditionalDialog( View * tqparent, const char * name,
+ const TQRect & marker )
+ : KDialogBase( tqparent, name, true, "", KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok, false ),
- m_view( parent ),
+ m_view( tqparent ),
m_dlg( new ConditionalWidget( this ) ),
m_marker( marker )
{
- QStringList list( m_view->doc()->styleManager()->styleNames() );
+ TQStringList list( m_view->doc()->styleManager()->styleNames() );
m_dlg->m_style_1->insertStringList( list );
m_dlg->m_style_2->insertStringList( list );
m_dlg->m_style_3->insertStringList( list );
setCaption( i18n( "Conditional Cell Attributes" ) );
- setButtonBoxOrientation( Vertical );
+ setButtonBoxOrientation(Qt::Vertical );
setMainWidget( m_dlg );
init();
@@ -299,13 +299,13 @@ ConditionalDialog::ConditionalDialog( View * parent, const char * name,
void ConditionalDialog::init()
{
- QValueList<Conditional> conditionList;
- QValueList<Conditional> otherList;
+ TQValueList<Conditional> conditionList;
+ TQValueList<Conditional> otherList;
bool found;
int numCondition;
- QValueList<Conditional>::iterator it1;
- QValueList<Conditional>::iterator it2;
+ TQValueList<Conditional>::iterator it1;
+ TQValueList<Conditional>::iterator it2;
Cell * obj = m_view->activeSheet()->cellAt( m_marker.left(),
m_marker.top() );
@@ -415,11 +415,11 @@ void ConditionalDialog::init()
void ConditionalDialog::init( Conditional const & tmp, int numCondition )
{
kdDebug() << "Adding " << numCondition << endl;
- QComboBox * cb = 0;
- QComboBox * sb = 0;
+ TQComboBox * cb = 0;
+ TQComboBox * sb = 0;
KLineEdit * kl1 = 0;
KLineEdit * kl2 = 0;
- QString value;
+ TQString value;
switch( numCondition )
{
@@ -517,7 +517,7 @@ void ConditionalDialog::init( Conditional const & tmp, int numCondition )
}
}
-Conditional::Type ConditionalDialog::typeOfCondition( QComboBox const * const cb ) const
+Conditional::Type ConditionalDialog::typeOfCondition( TQComboBox const * const cb ) const
{
Conditional::Type result = Conditional::None;
switch( cb->currentItem() )
@@ -593,9 +593,9 @@ bool ConditionalDialog::checkInputData()
return true;
}
-bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBox * cb,
+bool ConditionalDialog::getCondition( Conditional & newCondition, const TQComboBox * cb,
const KLineEdit * edit1, const KLineEdit * edit2,
- const QComboBox * sb, Style * style )
+ const TQComboBox * sb, Style * style )
{
if ( !cb->isEnabled() )
return false;
@@ -607,9 +607,9 @@ bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBo
bool ok = false;
double d1 = edit1->text().toDouble( &ok );
double d2 = 0.0;
- QString * s1 = 0;
- QString * s2 = 0;
- QString * sn = 0;
+ TQString * s1 = 0;
+ TQString * s2 = 0;
+ TQString * sn = 0;
if ( ok )
{
@@ -620,12 +620,12 @@ bool ConditionalDialog::getCondition( Conditional & newCondition, const QComboBo
else
{
d1 = 0.0;
- s1 = new QString( edit1->text() );
+ s1 = new TQString( edit1->text() );
if ( edit2->isEnabled() )
- s2 = new QString( edit2->text() );
+ s2 = new TQString( edit2->text() );
}
- sn = new QString( sb->currentText() );
+ sn = new TQString( sb->currentText() );
newCondition.val1 = d1;
newCondition.val2 = d2;
@@ -651,7 +651,7 @@ void ConditionalDialog::slotOk()
m_view->doc()->emitBeginOperation( false );
StyleManager * manager = m_view->doc()->styleManager();
- QValueList<Conditional> newList;
+ TQValueList<Conditional> newList;
Conditional newCondition;
diff --git a/kspread/dialogs/kspread_dlg_conditional.h b/kspread/dialogs/kspread_dlg_conditional.h
index 4b0e065c..9ecba7be 100644
--- a/kspread/dialogs/kspread_dlg_conditional.h
+++ b/kspread/dialogs/kspread_dlg_conditional.h
@@ -24,11 +24,11 @@
#define __kspread_dlg_conditional__
#include <kdialogbase.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kspread_condition.h"
-class QComboBox;
+class TQComboBox;
class KLineEdit;
namespace KSpread
@@ -36,42 +36,44 @@ namespace KSpread
class Style;
class View;
-class ConditionalWidget : public QWidget
+class ConditionalWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConditionalWidget( QWidget * parent = 0, const char * name = 0, WFlags fl = 0 );
+ ConditionalWidget( TQWidget * tqparent = 0, const char * name = 0, WFlags fl = 0 );
~ConditionalWidget();
- QComboBox * m_condition_1;
- QComboBox * m_style_1;
+ TQComboBox * m_condition_1;
+ TQComboBox * m_style_1;
KLineEdit * m_firstValue_1;
KLineEdit * m_secondValue_1;
- QComboBox * m_condition_2;
- QComboBox * m_style_2;
+ TQComboBox * m_condition_2;
+ TQComboBox * m_style_2;
KLineEdit * m_firstValue_2;
KLineEdit * m_secondValue_2;
- QComboBox * m_condition_3;
- QComboBox * m_style_3;
+ TQComboBox * m_condition_3;
+ TQComboBox * m_style_3;
KLineEdit * m_firstValue_3;
KLineEdit * m_secondValue_3;
public slots:
- void slotTextChanged1( const QString & );
- void slotTextChanged2( const QString & );
- void slotTextChanged3( const QString & );
+ void slotTextChanged1( const TQString & );
+ void slotTextChanged2( const TQString & );
+ void slotTextChanged3( const TQString & );
};
class ConditionalDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConditionalDialog( View * parent, const char * name,
- const QRect & marker );
+ ConditionalDialog( View * tqparent, const char * name,
+ const TQRect & marker );
void init();
@@ -81,19 +83,19 @@ class ConditionalDialog : public KDialogBase
protected:
View * m_view;
ConditionalWidget * m_dlg;
- QRect m_marker;
+ TQRect m_marker;
Conditional::Type m_result;
private:
void init( Conditional const & tmp, int numCondition );
- Conditional::Type typeOfCondition( QComboBox const * const cb ) const;
+ Conditional::Type typeOfCondition( TQComboBox const * const cb ) const;
bool checkInputData( KLineEdit const * const edit1,
KLineEdit const * const edit2 );
bool checkInputData();
- bool getCondition( Conditional & newCondition, const QComboBox * cb,
+ bool getCondition( Conditional & newCondition, const TQComboBox * cb,
const KLineEdit * edit1, const KLineEdit * edit2,
- const QComboBox * sb, Style * style );
+ const TQComboBox * sb, Style * style );
};
diff --git a/kspread/dialogs/kspread_dlg_cons.cc b/kspread/dialogs/kspread_dlg_cons.cc
index 7f10e610..ca049ee1 100644
--- a/kspread/dialogs/kspread_dlg_cons.cc
+++ b/kspread/dialogs/kspread_dlg_cons.cc
@@ -28,11 +28,11 @@
#include <assert.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kdialogbase.h>
@@ -54,24 +54,24 @@
using namespace KSpread;
-ConsolidateDialog::ConsolidateDialog( View* parent, const char* name )
- : KDialogBase( parent, name, false, i18n("Consolidate"), Ok|Cancel )
+ConsolidateDialog::ConsolidateDialog( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name, false, i18n("Consolidate"), Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *grid1 = new QGridLayout( page, 12, 2, marginHint(), spacingHint() );
+ TQGridLayout *grid1 = new TQGridLayout( page, 12, 2, marginHint(), spacingHint() );
- QLabel* tmpQLabel;
- tmpQLabel = new QLabel( page, "Label_1" );
- grid1->addWidget(tmpQLabel,0,0);
- tmpQLabel->setText( i18n("&Function:") );
+ TQLabel* tmpTQLabel;
+ tmpTQLabel = new TQLabel( page, "Label_1" );
+ grid1->addWidget(tmpTQLabel,0,0);
+ tmpTQLabel->setText( i18n("&Function:") );
- m_pFunction = new QComboBox( page );
+ m_pFunction = new TQComboBox( page );
grid1->addWidget(m_pFunction,1,0);
- tmpQLabel->setBuddy(m_pFunction);
+ tmpTQLabel->setBuddy(m_pFunction);
m_pFunction->insertItem( i18n("Sum"), Sum );
m_pFunction->insertItem( i18n("Average"), Average );
@@ -82,41 +82,41 @@ ConsolidateDialog::ConsolidateDialog( View* parent, const char* name )
m_pFunction->insertItem( i18n("Standard Deviation"), StdDev );
m_pFunction->insertItem( i18n("Variance"), Var );
- tmpQLabel = new QLabel( page, "Label_1" );
- tmpQLabel->setText( i18n("Re&ference:") );
- grid1->addWidget(tmpQLabel,2,0);
+ tmpTQLabel = new TQLabel( page, "Label_1" );
+ tmpTQLabel->setText( i18n("Re&ference:") );
+ grid1->addWidget(tmpTQLabel,2,0);
- m_pRef = new QLineEdit( page );
+ m_pRef = new TQLineEdit( page );
grid1->addWidget(m_pRef,3,0);
- tmpQLabel->setBuddy(m_pRef);
+ tmpTQLabel->setBuddy(m_pRef);
- tmpQLabel = new QLabel( page, "Label_1" );
- grid1->addWidget(tmpQLabel,4,0);
- tmpQLabel->setText( i18n("&Entered references:") );
+ tmpTQLabel = new TQLabel( page, "Label_1" );
+ grid1->addWidget(tmpTQLabel,4,0);
+ tmpTQLabel->setText( i18n("&Entered references:") );
- m_pRefs = new QListBox( page );
+ m_pRefs = new TQListBox( page );
grid1->addMultiCellWidget( m_pRefs,5,8,0,0);
- tmpQLabel->setBuddy(m_pRefs);
+ tmpTQLabel->setBuddy(m_pRefs);
- m_pRow = new QCheckBox( i18n("&Description in row"), page );
+ m_pRow = new TQCheckBox( i18n("&Description in row"), page );
grid1->addWidget( m_pRow,9,0);
- m_pCol = new QCheckBox( i18n("De&scription in column"), page );
+ m_pCol = new TQCheckBox( i18n("De&scription in column"), page );
grid1->addWidget(m_pCol,10,0);
- m_pCopy = new QCheckBox( i18n("Co&py data"), page );
+ m_pCopy = new TQCheckBox( i18n("Co&py data"), page );
grid1->addWidget(m_pCopy,11,0);
- m_pAdd = new QPushButton( i18n("&Add"), page );
+ m_pAdd = new TQPushButton( i18n("&Add"), page );
grid1->addWidget(m_pAdd,2,1);
- m_pRemove = new QPushButton( i18n("&Remove"), page );
+ m_pRemove = new TQPushButton( i18n("&Remove"), page );
grid1->addWidget(m_pRemove,3,1);
- connect( m_pAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_pRef, SIGNAL( returnPressed() ), this, SLOT( slotReturnPressed() ) );
+ connect( m_pAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdd() ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_pRef, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( slotReturnPressed() ) );
- connect(m_pView->selectionInfo(), SIGNAL(changed(const Region&)),
- this, SLOT(slotSelectionChanged()));
+ connect(m_pView->selectionInfo(), TQT_SIGNAL(changed(const Region&)),
+ this, TQT_SLOT(slotSelectionChanged()));
}
ConsolidateDialog::~ConsolidateDialog()
@@ -128,10 +128,10 @@ enum Description { D_ROW, D_COL, D_NONE, D_BOTH };
struct st_cell
{
- QString xdesc;
- QString ydesc;
+ TQString xdesc;
+ TQString ydesc;
Cell* cell;
- QString sheet;
+ TQString sheet;
int x;
int y;
};
@@ -146,7 +146,7 @@ void ConsolidateDialog::slotOk()
int dx = m_pView->selectionInfo()->selection().left();
int dy = m_pView->selectionInfo()->selection().top();
- QString function;
+ TQString function;
switch( m_pFunction->currentItem() )
{
@@ -161,9 +161,9 @@ void ConsolidateDialog::slotOk()
default: break; // bad bad !
}
- QStringList r = refs();
- QValueList<Range> ranges;
- QStringList::Iterator s = r.begin();
+ TQStringList r = refs();
+ TQValueList<Range> ranges;
+ TQStringList::Iterator s = r.begin();
for( ; s != r.end(); ++s )
{
Range r( *s, map );
@@ -190,21 +190,21 @@ void ConsolidateDialog::slotOk()
// Check whether all ranges have same size
Q_ASSERT( ranges.count() > 0 );
- QValueList<Range>::Iterator it = ranges.begin();
+ TQValueList<Range>::Iterator it = ranges.begin();
int w = (*it).range().right() - (*it).range().left() + 1;
int h = (*it).range().bottom() - (*it).range().top() + 1;
if ( w <= ( ( desc == D_BOTH || desc == D_COL ) ? 1 : 0 ) ||
h <= ( ( desc == D_BOTH || desc == D_ROW ) ? 1 : 0 ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- KMessageBox::error( this, i18n( "The range\n%1\nis too small" ).arg( *( r.begin() ) ));
+ KMessageBox::error( this, i18n( "The range\n%1\nis too small" ).tqarg( *( r.begin() ) ));
return;
}
if( (*it).range().bottom()==KS_rowMax || (*it).range().right()== KS_colMax )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- KMessageBox::error( this, i18n( "The range\n%1\nis too large" ).arg( *( r.begin() ) ));
+ KMessageBox::error( this, i18n( "The range\n%1\nis too large" ).tqarg( *( r.begin() ) ));
return;
}
@@ -212,7 +212,7 @@ void ConsolidateDialog::slotOk()
int i = 1;
for( ; it != ranges.end(); ++it, i++ )
{
- QRect currentRange=(*it).range();
+ TQRect currentRange=(*it).range();
int w2 = currentRange.right() - currentRange.left() + 1;
int h2 = currentRange.bottom() - currentRange.top() + 1;
@@ -220,7 +220,7 @@ void ConsolidateDialog::slotOk()
if(currentRange.bottom()==KS_rowMax || currentRange.right()== KS_colMax)
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- KMessageBox::error( this, i18n( "The range\n%1\nis too large" ).arg( r[i]));
+ KMessageBox::error( this, i18n( "The range\n%1\nis too large" ).tqarg( r[i]));
return;
}
if ( ( desc == D_NONE && ( w != w2 || h != h2 ) ) ||
@@ -228,7 +228,7 @@ void ConsolidateDialog::slotOk()
( desc == D_COL && w != w2 ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- QString tmp = i18n( "The ranges\n%1\nand\n%2\nhave different size").arg( *( r.begin() ) ).arg( r[i] );
+ TQString tmp = i18n( "The ranges\n%1\nand\n%2\nhave different size").tqarg( *( r.begin() ) ).tqarg( r[i] );
KMessageBox::error( this, tmp);
return;
}
@@ -238,22 +238,22 @@ void ConsolidateDialog::slotOk()
if ( desc == D_NONE )
{
// Check whether the destination is part of the source ...
- QRect dest;
+ TQRect dest;
dest.setCoords( dx, dy, dx + w - 1, dy + h - 1 );
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
Sheet *t = (*it).sheet();
Q_ASSERT( t );
- QRect r;
+ TQRect r;
- QRect currentRange=(*it).range();
+ TQRect currentRange=(*it).range();
r.setCoords( currentRange.left(), currentRange.top(), currentRange.right(), currentRange.bottom() );
if ( t == sheet && r.intersects( dest ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- QString tmp( i18n("The source tables intersect with the destination table") );
+ TQString tmp( i18n("The source tables intersect with the destination table") );
KMessageBox::error( this, tmp);
return;
}
@@ -264,7 +264,7 @@ void ConsolidateDialog::slotOk()
for( int y = 0; y < h; y++ )
{
bool novalue=true;
- QString formula = "=" + function + "(";
+ TQString formula = "=" + function + "(";
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -289,7 +289,7 @@ void ConsolidateDialog::slotOk()
else if ( desc == D_ROW )
{
// Get list of all descriptions in the rows
- QStringList lst;
+ TQStringList lst;
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -301,8 +301,8 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( x, (*it).range().top() );
if ( c )
{
- QString s = c->value().asString();
- if ( !lst.contains( s ) )
+ TQString s = c->value().asString();
+ if ( !lst.tqcontains( s ) )
lst.append( s );
}
}
@@ -310,20 +310,20 @@ void ConsolidateDialog::slotOk()
lst.sort();
// Check whether the destination is part of the source ...
- QRect dest;
+ TQRect dest;
dest.setCoords( dx, dy, dx + lst.count() - 1, dy + h - 1 );
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
Sheet *t = (*it).sheet();
assert( t );
- QRect r;
- QRect currentRange=(*it).range();
+ TQRect r;
+ TQRect currentRange=(*it).range();
r.setCoords( currentRange.left(), currentRange.top(), currentRange.right(), currentRange.bottom() );
if ( t == sheet && r.intersects( dest ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- QString tmp( i18n("The source tables intersect with the destination table") );
+ TQString tmp( i18n("The source tables intersect with the destination table") );
KMessageBox::error( this, tmp);
return;
}
@@ -331,7 +331,7 @@ void ConsolidateDialog::slotOk()
// Now create the consolidation sheet
int x = 0;
- QStringList::Iterator s = lst.begin();
+ TQStringList::Iterator s = lst.begin();
for( ; s != lst.end(); ++s, ++x )
{
sheet->setText( dy, dx + x, *s );
@@ -339,7 +339,7 @@ void ConsolidateDialog::slotOk()
for( int y = 1; y < h; ++y )
{
int count = 0;
- QString formula = "=" + function + "(";
+ TQString formula = "=" + function + "(";
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -372,7 +372,7 @@ void ConsolidateDialog::slotOk()
else if ( desc == D_COL )
{
// Get list of all descriptions in the columns
- QStringList lst;
+ TQStringList lst;
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -383,8 +383,8 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( (*it).range().left(), y );
if ( c )
{
- QString s = c->value().asString();
- if ( !s.isEmpty() && lst.find( s ) == lst.end() )
+ TQString s = c->value().asString();
+ if ( !s.isEmpty() && lst.tqfind( s ) == lst.end() )
lst.append( s );
}
}
@@ -392,20 +392,20 @@ void ConsolidateDialog::slotOk()
lst.sort();
// Check whether the destination is part of the source ...
- QRect dest;
+ TQRect dest;
dest.setCoords( dx, dy, dx + w - 1, dy + lst.count() - 1 );
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
Sheet *t = (*it).sheet();
assert( t );
- QRect r;
- QRect currentRange=(*it).range();
+ TQRect r;
+ TQRect currentRange=(*it).range();
r.setCoords( currentRange.left(), currentRange.top(), currentRange.right(), currentRange.bottom() );
if ( t == sheet && r.intersects( dest ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- QString tmp( i18n("The source tables intersect with the destination table") );
+ TQString tmp( i18n("The source tables intersect with the destination table") );
KMessageBox::error( this, tmp);
return;
}
@@ -413,7 +413,7 @@ void ConsolidateDialog::slotOk()
// Now create the consolidation sheet
int y = 0;
- QStringList::Iterator s = lst.begin();
+ TQStringList::Iterator s = lst.begin();
for( ; s != lst.end(); ++s, ++y )
{
sheet->setText( dy + y, dx, *s );
@@ -421,7 +421,7 @@ void ConsolidateDialog::slotOk()
for( int x = 1; x < w; ++x )
{
int count = 0;
- QString formula = "=" + function + "(";
+ TQString formula = "=" + function + "(";
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -432,7 +432,7 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( (*it).range().left(), i );
if ( c )
{
- QString v = c->value().asString();
+ TQString v = c->value().asString();
if ( !v.isEmpty() && *s == v )
{
// Cell *c2 = t->cellAt( x + (*it).range.left(), i );
@@ -455,7 +455,7 @@ void ConsolidateDialog::slotOk()
else if ( desc == D_BOTH )
{
// Get list of all descriptions in the columns
- QStringList cols;
+ TQStringList cols;
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -466,8 +466,8 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( (*it).range().left(), y );
if ( c )
{
- QString s = c->value().asString();
- if ( !s.isEmpty() && cols.find( s ) == cols.end() )
+ TQString s = c->value().asString();
+ if ( !s.isEmpty() && cols.tqfind( s ) == cols.end() )
cols.append( s );
}
}
@@ -475,7 +475,7 @@ void ConsolidateDialog::slotOk()
cols.sort();
// Get list of all descriptions in the rows
- QStringList rows;
+ TQStringList rows;
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -486,8 +486,8 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( x, (*it).range().top() );
if ( c )
{
- QString s = c->value().asString();
- if ( !s.isEmpty() && rows.find( s ) == rows.end() )
+ TQString s = c->value().asString();
+ if ( !s.isEmpty() && rows.tqfind( s ) == rows.end() )
rows.append( s );
}
}
@@ -495,27 +495,27 @@ void ConsolidateDialog::slotOk()
rows.sort();
// Check whether the destination is part of the source ...
- QRect dest;
+ TQRect dest;
dest.setCoords( dx, dy, dx + cols.count(), dy + rows.count() );
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
Sheet *t = (*it).sheet();
assert( t );
- QRect r;
- QRect currentRange=(*it).range();
+ TQRect r;
+ TQRect currentRange=(*it).range();
r.setCoords( currentRange.left(), currentRange.top(), currentRange.right(), currentRange.bottom() );
if ( t == sheet && r.intersects( dest ) )
{
m_pView->slotUpdateView( m_pView->activeSheet() );
- QString tmp( i18n("The source tables intersect with the destination table") );
+ TQString tmp( i18n("The source tables intersect with the destination table") );
KMessageBox::error( this, tmp);
return;
}
}
// Fill the list with all interesting cells
- QValueList<st_cell> lst;
+ TQValueList<st_cell> lst;
it = ranges.begin();
for( ; it != ranges.end(); ++it )
{
@@ -526,13 +526,13 @@ void ConsolidateDialog::slotOk()
Cell *c = t->cellAt( x, (*it).range().top() );
if ( c )
{
- QString ydesc = c->value().asString();
+ TQString ydesc = c->value().asString();
for( int y = (*it).range().top() + 1; y <= (*it).range().bottom() ; ++y )
{
Cell *c2 = t->cellAt( (*it).range().left(), y );
if ( c2 )
{
- QString xdesc = c2->value().asString();
+ TQString xdesc = c2->value().asString();
Cell *c3 = t->cellAt( x, y );
if ( c3 && c3->value().isNumber() )
{
@@ -553,7 +553,7 @@ void ConsolidateDialog::slotOk()
// Draw the row description
int i = 1;
- QStringList::Iterator s = rows.begin();
+ TQStringList::Iterator s = rows.begin();
for( ; s != rows.end(); ++s, ++i )
sheet->setText( dy, dx + i, *s );
@@ -565,16 +565,16 @@ void ConsolidateDialog::slotOk()
// Draw the data
int x = 1;
- QStringList::Iterator ydesc = rows.begin();
+ TQStringList::Iterator ydesc = rows.begin();
for( ; ydesc != rows.end(); ++ydesc, x++ )
{
int y = 1;
- QStringList::Iterator xdesc = cols.begin();
+ TQStringList::Iterator xdesc = cols.begin();
for( ; xdesc != cols.end(); ++xdesc, y++ )
{
int count = 0;
- QString formula = "=" + function + "(";
- QValueList<st_cell>::Iterator lit = lst.begin();
+ TQString formula = "=" + function + "(";
+ TQValueList<st_cell>::Iterator lit = lst.begin();
for( ; lit != lst.end(); ++lit )
{
if ( (*lit).xdesc == *xdesc && (*lit).ydesc == *ydesc )
@@ -621,9 +621,9 @@ void ConsolidateDialog::slotRemove()
actionButton( Ok )->setEnabled( false );
}
-QStringList ConsolidateDialog::refs()
+TQStringList ConsolidateDialog::refs()
{
- QStringList list;
+ TQStringList list;
int c = m_pRefs->count();
for( int i = 0; i < c; i++ )
@@ -640,19 +640,19 @@ void ConsolidateDialog::slotSelectionChanged()
return;
}
- QString area = m_pView->selectionInfo()->name();
+ TQString area = m_pView->selectionInfo()->name();
m_pRef->setText( area );
m_pRef->setSelection( 0, area.length() );
}
void ConsolidateDialog::slotReturnPressed()
{
- QString txt = m_pRef->text();
+ TQString txt = m_pRef->text();
Range r( txt, m_pView->doc()->map() );
if ( !r.isValid() )
{
- KMessageBox::error( this, i18n("The range\n%1\n is malformed").arg( txt ));
+ KMessageBox::error( this, i18n("The range\n%1\n is malformed").tqarg( txt ));
return;
}
@@ -663,14 +663,14 @@ void ConsolidateDialog::slotReturnPressed()
}
}
-void ConsolidateDialog::closeEvent ( QCloseEvent * )
+void ConsolidateDialog::closeEvent ( TQCloseEvent * )
{
delete this;
}
-QString ConsolidateDialog::evaluate( const QString& formula, Sheet* sheet )
+TQString ConsolidateDialog::evaluate( const TQString& formula, Sheet* sheet )
{
- QString result = "###";
+ TQString result = "###";
Formula *f = new Formula (sheet);
f->setExpression (formula);
if (!f->isValid()) {
diff --git a/kspread/dialogs/kspread_dlg_cons.h b/kspread/dialogs/kspread_dlg_cons.h
index d45e0fb8..b845f00f 100644
--- a/kspread/dialogs/kspread_dlg_cons.h
+++ b/kspread/dialogs/kspread_dlg_cons.h
@@ -29,14 +29,14 @@
#ifndef __kspread_dlg_cons__
#define __kspread_dlg_cons__
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdialogbase.h>
-class QLineEdit;
-class QPushButton;
-class QComboBox;
-class QCheckBox;
-class QListBox;
+class TQLineEdit;
+class TQPushButton;
+class TQComboBox;
+class TQCheckBox;
+class TQListBox;
namespace KSpread
{
@@ -46,10 +46,11 @@ class View;
class ConsolidateDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConsolidateDialog( View* parent, const char* name );
+ ConsolidateDialog( View* tqparent, const char* name );
~ConsolidateDialog();
- QStringList refs();
+ TQStringList refs();
public slots:
virtual void slotOk();
@@ -61,19 +62,19 @@ public slots:
void slotReturnPressed();
protected:
- virtual void closeEvent ( QCloseEvent * );
+ virtual void closeEvent ( TQCloseEvent * );
View* m_pView;
- QLineEdit* m_pRef;
- QListBox* m_pRefs;
- QComboBox* m_pFunction;
- QPushButton* m_pAdd;
- QPushButton* m_pRemove;
- QCheckBox* m_pRow;
- QCheckBox* m_pCol;
- QCheckBox* m_pCopy;
-
- QString evaluate( const QString& formula, Sheet* sheet );
+ TQLineEdit* m_pRef;
+ TQListBox* m_pRefs;
+ TQComboBox* m_pFunction;
+ TQPushButton* m_pAdd;
+ TQPushButton* m_pRemove;
+ TQCheckBox* m_pRow;
+ TQCheckBox* m_pCol;
+ TQCheckBox* m_pCopy;
+
+ TQString evaluate( const TQString& formula, Sheet* sheet );
enum { Sum = 0, Average, Count, Max, Min, Product, StdDev, Var };
};
diff --git a/kspread/dialogs/kspread_dlg_csv.cc b/kspread/dialogs/kspread_dlg_csv.cc
index 3c103b8e..ed1bf44f 100644
--- a/kspread/dialogs/kspread_dlg_csv.cc
+++ b/kspread/dialogs/kspread_dlg_csv.cc
@@ -20,17 +20,17 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qmime.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtable.h>
-#include <qlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqmime.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtable.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -49,9 +49,9 @@
using namespace KSpread;
-CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode mode)
- : KDialogBase( parent, name, true, QString::null, Ok|Cancel ),
- m_pView( parent ),
+CSVDialog::CSVDialog( View * tqparent, const char * name, TQRect const & rect, Mode mode)
+ : KDialogBase( tqparent, name, true, TQString(), Ok|Cancel ),
+ m_pView( tqparent ),
m_cancelled( false ),
m_adjustRows( 0 ),
m_startline( 0 ),
@@ -65,10 +65,10 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
setSizeGripEnabled( TRUE );
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- // MyDialogLayout = new QGridLayout( page, 4, 4, marginHint(), spacingHint(), "MyDialogLayout");
- MyDialogLayout = new QGridLayout( page, 1, 1, 11, 6, "MyDialogLayout");
+ // MyDialogLayout = new TQGridLayout( page, 4, 4, marginHint(), spacingHint(), "MyDialogLayout");
+ MyDialogLayout = new TQGridLayout( page, 1, 1, 11, 6, "MyDialogLayout");
// Limit the range
int column = m_targetRect.left();
@@ -77,108 +77,108 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
if( m_targetRect.bottom() > lastCell->row() )
m_targetRect.setBottom( lastCell->row() );
- m_sheet = new QTable( page, "m_table" );
- //m_sheet->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)7, 0, 0, m_sheet->sizePolicy().hasHeightForWidth() ) );
+ m_sheet = new TQTable( page, "m_table" );
+ //m_sheet->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)7, 0, 0, m_sheet->sizePolicy().hasHeightForWidth() ) );
m_sheet->setNumRows( 0 );
m_sheet->setNumCols( 0 );
MyDialogLayout->addMultiCellWidget( m_sheet, 3, 3, 0, 3 );
// Delimiter: comma, semicolon, tab, space, other
- m_delimiterBox = new QButtonGroup( page, "m_delimiterBox" );
- m_delimiterBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, m_delimiterBox->sizePolicy().hasHeightForWidth() ) );
+ m_delimiterBox = new TQButtonGroup( page, "m_delimiterBox" );
+ m_delimiterBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_delimiterBox->sizePolicy().hasHeightForWidth() ) );
m_delimiterBox->setTitle( i18n( "Delimiter" ) );
m_delimiterBox->setColumnLayout(0, Qt::Vertical );
- m_delimiterBox->layout()->setSpacing( KDialog::spacingHint() );
- m_delimiterBox->layout()->setMargin( KDialog::marginHint() );
- m_delimiterBoxLayout = new QGridLayout( m_delimiterBox->layout() );
- m_delimiterBoxLayout->setAlignment( Qt::AlignTop );
+ m_delimiterBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ m_delimiterBox->tqlayout()->setMargin( KDialog::marginHint() );
+ m_delimiterBoxLayout = new TQGridLayout( m_delimiterBox->tqlayout() );
+ m_delimiterBoxLayout->tqsetAlignment( TQt::AlignTop );
MyDialogLayout->addMultiCellWidget( m_delimiterBox, 0, 2, 0, 0 );
- m_ignoreDuplicates = new QCheckBox( page, "m_ignoreDuplicates" );
+ m_ignoreDuplicates = new TQCheckBox( page, "m_ignoreDuplicates" );
m_ignoreDuplicates->setText( i18n( "Ignore duplicate delimiters" ) );
MyDialogLayout->addMultiCellWidget( m_ignoreDuplicates, 2, 2, 2, 3 );
- m_radioComma = new QRadioButton( m_delimiterBox, "m_radioComma" );
+ m_radioComma = new TQRadioButton( m_delimiterBox, "m_radioComma" );
m_radioComma->setText( i18n( "Comma" ) );
m_radioComma->setChecked( TRUE );
m_delimiterBoxLayout->addWidget( m_radioComma, 0, 0 );
- m_radioSemicolon = new QRadioButton( m_delimiterBox, "m_radioSemicolon" );
+ m_radioSemicolon = new TQRadioButton( m_delimiterBox, "m_radioSemicolon" );
m_radioSemicolon->setText( i18n( "Semicolon" ) );
m_delimiterBoxLayout->addWidget( m_radioSemicolon, 0, 1 );
- m_radioTab = new QRadioButton( m_delimiterBox, "m_radioTab" );
+ m_radioTab = new TQRadioButton( m_delimiterBox, "m_radioTab" );
m_radioTab->setText( i18n( "Tabulator" ) );
m_delimiterBoxLayout->addWidget( m_radioTab, 1, 0 );
- m_radioSpace = new QRadioButton( m_delimiterBox, "m_radioSpace" );
+ m_radioSpace = new TQRadioButton( m_delimiterBox, "m_radioSpace" );
m_radioSpace->setText( i18n( "Space" ) );
m_delimiterBoxLayout->addWidget( m_radioSpace, 1, 1 );
- m_radioOther = new QRadioButton( m_delimiterBox, "m_radioOther" );
+ m_radioOther = new TQRadioButton( m_delimiterBox, "m_radioOther" );
m_radioOther->setText( i18n( "Other" ) );
m_delimiterBoxLayout->addWidget( m_radioOther, 0, 2 );
- m_delimiterEdit = new QLineEdit( m_delimiterBox, "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 = new TQLineEdit( m_delimiterBox, "m_delimiterEdit" );
+ m_delimiterEdit->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, m_delimiterEdit->sizePolicy().hasHeightForWidth() ) );
+ m_delimiterEdit->setMaximumSize( TQSize( 30, 32767 ) );
m_delimiterBoxLayout->addWidget( m_delimiterEdit, 1, 2 );
// Format: number, text, currency,
- m_formatBox = new QButtonGroup( page, "m_formatBox" );
- m_formatBox->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, m_formatBox->sizePolicy().hasHeightForWidth() ) );
+ m_formatBox = new TQButtonGroup( page, "m_formatBox" );
+ m_formatBox->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, m_formatBox->sizePolicy().hasHeightForWidth() ) );
m_formatBox->setTitle( i18n( "Format" ) );
m_formatBox->setColumnLayout(0, Qt::Vertical );
- m_formatBox->layout()->setSpacing( KDialog::spacingHint() );
- m_formatBox->layout()->setMargin( KDialog::marginHint() );
- m_formatBoxLayout = new QGridLayout( m_formatBox->layout() );
- m_formatBoxLayout->setAlignment( Qt::AlignTop );
+ m_formatBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ m_formatBox->tqlayout()->setMargin( KDialog::marginHint() );
+ m_formatBoxLayout = new TQGridLayout( m_formatBox->tqlayout() );
+ m_formatBoxLayout->tqsetAlignment( TQt::AlignTop );
MyDialogLayout->addMultiCellWidget( m_formatBox, 0, 2, 1, 1 );
- m_radioNumber = new QRadioButton( m_formatBox, "m_radioNumber" );
+ m_radioNumber = new TQRadioButton( m_formatBox, "m_radioNumber" );
m_radioNumber->setText( i18n( "Number" ) );
m_formatBoxLayout->addMultiCellWidget( m_radioNumber, 1, 1, 0, 1 );
- m_radioText = new QRadioButton( m_formatBox, "m_radioText" );
+ m_radioText = new TQRadioButton( m_formatBox, "m_radioText" );
m_radioText->setText( i18n( "Text" ) );
m_radioText->setChecked( TRUE );
m_formatBoxLayout->addWidget( m_radioText, 0, 0 );
- m_radioCurrency = new QRadioButton( m_formatBox, "m_radioCurrency" );
+ m_radioCurrency = new TQRadioButton( m_formatBox, "m_radioCurrency" );
m_radioCurrency->setText( i18n( "Currency" ) );
m_formatBoxLayout->addMultiCellWidget( m_radioCurrency, 0, 0, 1, 2 );
- m_radioDate = new QRadioButton( m_formatBox, "m_radioDate" );
+ m_radioDate = new TQRadioButton( m_formatBox, "m_radioDate" );
m_radioDate->setText( i18n( "Date" ) );
m_formatBoxLayout->addWidget( m_radioDate, 1, 2 );
- m_comboLine = new QComboBox( FALSE, page, "m_comboLine" );
+ m_comboLine = new TQComboBox( FALSE, page, "m_comboLine" );
m_comboLine->insertItem( i18n( "1" ) );
- m_comboLine->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) );
+ m_comboLine->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboLine->sizePolicy().hasHeightForWidth() ) );
MyDialogLayout->addWidget( m_comboLine, 1, 3 );
- m_comboQuote = new QComboBox( FALSE, page, "m_comboQuote" );
+ m_comboQuote = new TQComboBox( FALSE, page, "m_comboQuote" );
m_comboQuote->insertItem( i18n( "\"" ) );
m_comboQuote->insertItem( i18n( "'" ) );
m_comboQuote->insertItem( i18n( "None" ) );
- m_comboQuote->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, m_comboQuote->sizePolicy().hasHeightForWidth() ) );
+ m_comboQuote->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_comboQuote->sizePolicy().hasHeightForWidth() ) );
MyDialogLayout->addWidget( m_comboQuote, 1, 2 );
- QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Preferred );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
MyDialogLayout->addItem( spacer_2, 2, 3 );
- TextLabel3 = new QLabel( page, "TextLabel3" );
- TextLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
+ TextLabel3 = new TQLabel( page, "TextLabel3" );
+ TextLabel3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel3->sizePolicy().hasHeightForWidth() ) );
TextLabel3->setText( i18n( "Start at line:" ) );
MyDialogLayout->addWidget( TextLabel3, 0, 3 );
- TextLabel2 = new QLabel( page, "TextLabel2" );
- TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
+ TextLabel2 = new TQLabel( page, "TextLabel2" );
+ TextLabel2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel2->sizePolicy().hasHeightForWidth() ) );
TextLabel2->setText( i18n( "Textquote:" ) );
MyDialogLayout->addWidget( TextLabel2, 0, 2 );
@@ -186,7 +186,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
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.") );
@@ -200,12 +200,12 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
m_cancelled = true;
return;
}
- m_fileArray = QByteArray(mime->encodedData( "text/plain" ) );
+ m_fileArray = TQByteArray(mime->tqencodedData( "text/plain" ) );
}
else if ( mode == File )
{
setCaption( i18n( "Inserting Text File" ) );
- QString file = KFileDialog::getOpenFileName(":",
+ TQString file = KFileDialog::getOpenFileName(":",
"text/plain",
this);
//cancel action !
@@ -215,7 +215,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
m_cancelled = true;
return;
}
- QFile in(file);
+ TQFile in(file);
if (!in.open(IO_ReadOnly))
{
KMessageBox::sorry( this, i18n("Cannot open input file.") );
@@ -224,7 +224,7 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
m_cancelled = true;
return;
}
- m_fileArray = QByteArray(in.size());
+ m_fileArray = TQByteArray(in.size());
in.readBlock(m_fileArray.data(), in.size());
in.close();
}
@@ -249,31 +249,31 @@ CSVDialog::CSVDialog( View * parent, const char * name, QRect const & rect, Mode
fillSheet();
fillComboBox();
- resize(sizeHint());
-
- m_sheet->setSelectionMode(QTable::NoSelection);
-
- connect(m_formatBox, SIGNAL(clicked(int)),
- this, SLOT(formatClicked(int)));
- connect(m_delimiterBox, SIGNAL(clicked(int)),
- this, SLOT(delimiterClicked(int)));
- connect(m_delimiterEdit, SIGNAL(returnPressed()),
- this, SLOT(returnPressed()));
- connect(m_delimiterEdit, SIGNAL(textChanged ( const QString & )),
- this, SLOT(textChanged ( const QString & ) ));
- connect(m_comboLine, SIGNAL(activated(const QString&)),
- this, SLOT(lineSelected(const QString&)));
- connect(m_comboQuote, SIGNAL(activated(const QString&)),
- this, SLOT(textquoteSelected(const QString&)));
- connect(m_sheet, SIGNAL(currentChanged(int, int)),
- this, SLOT(currentCellChanged(int, int)));
- connect(m_ignoreDuplicates, SIGNAL(stateChanged(int)),
- this, SLOT(ignoreDuplicatesChanged(int)));
+ resize(tqsizeHint());
+
+ m_sheet->setSelectionMode(TQTable::NoSelection);
+
+ connect(m_formatBox, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(formatClicked(int)));
+ connect(m_delimiterBox, TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(delimiterClicked(int)));
+ connect(m_delimiterEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(returnPressed()));
+ connect(m_delimiterEdit, TQT_SIGNAL(textChanged ( const TQString & )),
+ this, TQT_SLOT(textChanged ( const TQString & ) ));
+ connect(m_comboLine, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(lineSelected(const TQString&)));
+ connect(m_comboQuote, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(textquoteSelected(const TQString&)));
+ connect(m_sheet, TQT_SIGNAL(currentChanged(int, int)),
+ this, TQT_SLOT(currentCellChanged(int, int)));
+ connect(m_ignoreDuplicates, TQT_SIGNAL(stateChanged(int)),
+ this, TQT_SLOT(ignoreDuplicatesChanged(int)));
}
CSVDialog::~CSVDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
bool CSVDialog::cancelled()
@@ -286,11 +286,11 @@ void CSVDialog::fillSheet()
int row, column;
bool lastCharDelimiter = false;
bool ignoreDups = m_ignoreDuplicates->isChecked();
- 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;
- QChar x;
- QString field = "";
+ TQChar x;
+ TQString field = "";
for (row = 0; row < m_sheet->numRows(); ++row)
for (column = 0; column < m_sheet->numCols(); ++column)
@@ -300,12 +300,12 @@ void CSVDialog::fillSheet()
if (m_mode != Column)
{
m_mode = Column;
- m_data = QString(m_fileArray);
+ m_data = TQString(m_fileArray);
m_fileArray.resize(0);
}
- QTextStream inputStream(m_data, IO_ReadOnly);
- inputStream.setEncoding(QTextStream::Locale);
+ TQTextStream inputStream(m_data, IO_ReadOnly);
+ inputStream.setEncoding(TQTextStream::Locale);
while (!inputStream.atEnd())
{
@@ -318,7 +318,7 @@ void CSVDialog::fillSheet()
case S_START :
if (x == m_textquote)
{
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == m_delimiter)
{
@@ -337,10 +337,10 @@ void CSVDialog::fillSheet()
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;
}
else if (x == '\n')
{
@@ -364,11 +364,11 @@ void CSVDialog::fillSheet()
field += x;
}
break;
- case S_MAYBE_END_OF_QUOTED_FIELD :
+ case S_MAYBE_END_OF_TQUOTED_FIELD :
if (x == m_textquote)
{
field += x;
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
}
else if (x == m_delimiter || x == '\n')
{
@@ -389,10 +389,10 @@ void CSVDialog::fillSheet()
}
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 == m_delimiter || x == '\n')
{
setText(row - m_startline, column, field);
@@ -412,14 +412,14 @@ void CSVDialog::fillSheet()
}
else
{
- state = S_END_OF_QUOTED_FIELD;
+ state = S_END_OF_TQUOTED_FIELD;
}
break;
case S_MAYBE_NORMAL_FIELD :
if (x == m_textquote)
{
field = "";
- state = S_QUOTED_FIELD;
+ state = S_TQUOTED_FIELD;
break;
}
case S_NORMAL_FIELD :
@@ -461,7 +461,7 @@ void CSVDialog::fillSheet()
for (column = 0; column < m_sheet->numCols(); ++column)
{
- QString header = m_sheet->horizontalHeader()->label(column);
+ TQString header = m_sheet->horizontalHeader()->label(column);
if (header != i18n("Text") && header != i18n("Number") &&
header != i18n("Date") && header != i18n("Currency"))
m_sheet->horizontalHeader()->setLabel(column, i18n("Text"));
@@ -474,10 +474,10 @@ void CSVDialog::fillComboBox()
{
m_comboLine->clear();
for (int row = 0; row < m_sheet->numRows(); ++row)
- m_comboLine->insertItem(QString::number(row + 1), row);
+ m_comboLine->insertItem(TQString::number(row + 1), row);
}
-void CSVDialog::setText(int row, int col, const QString& text)
+void CSVDialog::setText(int row, int col, const TQString& text)
{
if (row < 1) // skipped by the user
return;
@@ -514,7 +514,7 @@ void CSVDialog::returnPressed()
fillSheet();
}
-void CSVDialog::textChanged ( const QString & )
+void CSVDialog::textChanged ( const TQString & )
{
m_radioOther->setChecked ( true );
delimiterClicked(4); // other
@@ -522,7 +522,7 @@ void CSVDialog::textChanged ( const QString & )
void CSVDialog::formatClicked(int id)
{
- QString header;
+ TQString header;
switch (id)
{
@@ -567,7 +567,7 @@ void CSVDialog::delimiterClicked(int id)
fillSheet();
}
-void CSVDialog::textquoteSelected(const QString& mark)
+void CSVDialog::textquoteSelected(const TQString& mark)
{
if (mark == i18n("none"))
m_textquote = 0;
@@ -577,7 +577,7 @@ void CSVDialog::textquoteSelected(const QString& mark)
fillSheet();
}
-void CSVDialog::lineSelected(const QString& line)
+void CSVDialog::lineSelected(const TQString& line)
{
m_startline = line.toInt() - 1;
fillSheet();
@@ -586,7 +586,7 @@ void CSVDialog::lineSelected(const QString& line)
void CSVDialog::currentCellChanged(int, int col)
{
int id;
- QString header = m_sheet->horizontalHeader()->label(col);
+ TQString header = m_sheet->horizontalHeader()->label(col);
if (header == i18n("Text"))
id = 1;
@@ -603,7 +603,7 @@ void CSVDialog::currentCellChanged(int, int col)
void CSVDialog::accept()
{
Sheet * sheet = m_pView->activeSheet();
- QString csv_delimiter = QString::null;
+ TQString csv_delimiter = TQString();
Cell * cell;
int numRows = m_sheet->numRows();
@@ -647,7 +647,7 @@ void CSVDialog::accept()
int left = m_targetRect.left();
int top = m_targetRect.top();
- QMemArray<double> widths( numCols );
+ TQMemArray<double> widths( numCols );
for ( i = 0; i < numCols; ++i )
{
ColumnFormat * c = sheet->nonDefaultColumnFormat( left + i );
@@ -661,11 +661,11 @@ void CSVDialog::accept()
cell = sheet->nonDefaultCell( left + col, top + row );
cell->setCellText( getText( row, col ) );
- QFontMetrics fm = sheet->painter().fontMetrics();
+ TQFontMetrics fm = sheet->painter().fontMetrics();
double w = fm.width( cell->strOutText() );
if ( w == 0.0 )
{
- QFontMetrics fm( cell->format()->textFont( left + col, top + row ) );
+ TQFontMetrics fm( cell->format()->textFont( left + col, top + row ) );
w = fm.width('x') * (double) getText( row, col ).length();
}
@@ -705,12 +705,12 @@ void CSVDialog::accept()
}
m_pView->slotUpdateView( sheet );
- QDialog::accept();
+ TQDialog::accept();
}
int CSVDialog::getHeader(int col)
{
- QString header = m_sheet->horizontalHeader()->label(col);
+ TQString header = m_sheet->horizontalHeader()->label(col);
if (header == i18n("Text"))
return TEXT;
@@ -722,7 +722,7 @@ int CSVDialog::getHeader(int col)
return DATE;
}
-QString CSVDialog::getText(int row, int col)
+TQString CSVDialog::getText(int row, int col)
{
return m_sheet->text(row, col);
}
diff --git a/kspread/dialogs/kspread_dlg_csv.h b/kspread/dialogs/kspread_dlg_csv.h
index ab676966..1da65838 100644
--- a/kspread/dialogs/kspread_dlg_csv.h
+++ b/kspread/dialogs/kspread_dlg_csv.h
@@ -25,17 +25,17 @@
#include <kdialogbase.h>
-class QVBoxLayout;
-class QHBoxLayout;
-class QGridLayout;
-class QButtonGroup;
-class QComboBox;
-class QCheckBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QRadioButton;
-class QTable;
+class TQVBoxLayout;
+class TQHBoxLayout;
+class TQGridLayout;
+class TQButtonGroup;
+class TQComboBox;
+class TQCheckBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQRadioButton;
+class TQTable;
namespace KSpread
@@ -55,13 +55,14 @@ class View;
class CSVDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { Clipboard, File, Column };
enum Header { TEXT, NUMBER, DATE, CURRENCY };
- CSVDialog( View * parent, const char * name, QRect const & rect, Mode mode);
+ CSVDialog( View * tqparent, const char * name, TQRect const & rect, Mode mode);
~CSVDialog();
@@ -74,54 +75,54 @@ class CSVDialog : public KDialogBase
private:
View* m_pView;
- QGridLayout* MyDialogLayout;
- QHBoxLayout* Layout1;
- QGridLayout* m_delimiterBoxLayout;
- QGridLayout* m_formatBoxLayout;
- QTable* m_sheet;
- QButtonGroup* m_delimiterBox;
- QRadioButton* m_radioComma;
- QRadioButton* m_radioSemicolon;
- QRadioButton* m_radioTab;
- QRadioButton* m_radioSpace;
- QRadioButton* m_radioOther;
- QLineEdit* m_delimiterEdit;
- QButtonGroup* m_formatBox;
- QRadioButton* m_radioNumber;
- QRadioButton* m_radioText;
- QRadioButton* m_radioCurrency;
- QRadioButton* m_radioDate;
- QComboBox* m_comboLine;
- QComboBox* m_comboQuote;
- QLabel* TextLabel3;
- QLabel* TextLabel2;
- QCheckBox * m_ignoreDuplicates;
+ TQGridLayout* MyDialogLayout;
+ TQHBoxLayout* Layout1;
+ TQGridLayout* m_delimiterBoxLayout;
+ TQGridLayout* m_formatBoxLayout;
+ TQTable* m_sheet;
+ TQButtonGroup* m_delimiterBox;
+ TQRadioButton* m_radioComma;
+ TQRadioButton* m_radioSemicolon;
+ TQRadioButton* m_radioTab;
+ TQRadioButton* m_radioSpace;
+ TQRadioButton* m_radioOther;
+ TQLineEdit* m_delimiterEdit;
+ TQButtonGroup* m_formatBox;
+ TQRadioButton* m_radioNumber;
+ TQRadioButton* m_radioText;
+ TQRadioButton* m_radioCurrency;
+ TQRadioButton* m_radioDate;
+ TQComboBox* m_comboLine;
+ TQComboBox* m_comboQuote;
+ TQLabel* TextLabel3;
+ TQLabel* TextLabel2;
+ TQCheckBox * m_ignoreDuplicates;
void fillSheet();
void fillComboBox();
- void setText(int row, int col, const QString& text);
+ void setText(int row, int col, const TQString& text);
void adjustRows(int iRows);
int getHeader(int col);
- QString getText(int row, int col);
+ TQString getText(int row, int col);
bool m_cancelled;
int m_adjustRows;
int m_startline;
- QChar m_textquote;
- QString m_delimiter;
- QString m_data;
- QByteArray m_fileArray;
- QRect m_targetRect;
+ TQChar m_textquote;
+ TQString m_delimiter;
+ TQString m_data;
+ TQByteArray m_fileArray;
+ TQRect m_targetRect;
Mode m_mode;
private slots:
void returnPressed();
void formatClicked(int id);
void delimiterClicked(int id);
- void lineSelected(const QString& line);
- void textquoteSelected(const QString& mark);
+ void lineSelected(const TQString& line);
+ void textquoteSelected(const TQString& mark);
void currentCellChanged(int, int col);
- void textChanged ( const QString & );
+ void textChanged ( const TQString & );
void ignoreDuplicatesChanged(int);
};
diff --git a/kspread/dialogs/kspread_dlg_database.cc b/kspread/dialogs/kspread_dlg_database.cc
index ca64eb0b..1bca7c85 100644
--- a/kspread/dialogs/kspread_dlg_database.cc
+++ b/kspread/dialogs/kspread_dlg_database.cc
@@ -34,38 +34,38 @@
#include <knumvalidator.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qheader.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qsqldatabase.h>
-#include <qsqlerror.h>
-#include <qsqlfield.h>
-#include <qsqlquery.h>
-#include <qsqlrecord.h>
-#include <qtextedit.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqheader.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqsqldatabase.h>
+#include <tqsqlerror.h>
+#include <tqsqlfield.h>
+#include <tqsqlquery.h>
+#include <tqsqlrecord.h>
+#include <tqtextedit.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
using namespace KSpread;
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
/********************************************************
* Database wizard *
********************************************************/
-DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char * name, bool modal, WFlags fl )
- : KWizard( (QWidget *) parent, name, modal, fl ),
+DatabaseDialog::DatabaseDialog( View * tqparent, TQRect const & rect, const char * name, bool modal, WFlags fl )
+ : KWizard( (TQWidget *) tqparent, name, modal, fl ),
m_currentPage( eDatabase ),
- m_pView( parent ),
+ m_pView( tqparent ),
m_targetRect( rect ),
m_dbConnection( 0L )
{
@@ -76,103 +76,103 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
// database page
- m_database = new QWidget( this, "m_database" );
- m_databaseLayout = new QGridLayout( m_database, 1, 1, -1, -1, "m_databaseLayout");
+ m_database = new TQWidget( this, "m_database" );
+ m_databaseLayout = new TQGridLayout( m_database, 1, 1, -1, -1, "m_databaseLayout");
- QFrame * Frame5 = new QFrame( m_database, "Frame5" );
- Frame5->setFrameShape( QFrame::MShape );
- Frame5->setFrameShadow( QFrame::MShadow );
- QVBoxLayout * Frame5Layout = new QVBoxLayout( Frame5, 11, 6, "Frame5Layout");
+ TQFrame * Frame5 = new TQFrame( m_database, "Frame5" );
+ Frame5->setFrameShape( TQFrame::MShape );
+ Frame5->setFrameShadow( TQFrame::MShadow );
+ TQVBoxLayout * Frame5Layout = new TQVBoxLayout( Frame5, 11, 6, "Frame5Layout");
- QFrame * Frame16 = new QFrame( Frame5, "Frame16" );
- Frame16->setFrameShape( QFrame::NoFrame );
- Frame16->setFrameShadow( QFrame::Plain );
- QGridLayout * Frame16Layout = new QGridLayout( Frame16, 1, 1, 11, 7, "Frame16Layout");
+ TQFrame * Frame16 = new TQFrame( Frame5, "Frame16" );
+ Frame16->setFrameShape( TQFrame::NoFrame );
+ Frame16->setFrameShadow( TQFrame::Plain );
+ TQGridLayout * Frame16Layout = new TQGridLayout( Frame16, 1, 1, 11, 7, "Frame16Layout");
- m_Type = new QLabel( Frame16, "m_Type" );
+ m_Type = new TQLabel( Frame16, "m_Type" );
m_Type->setText( i18n( "Type:" ) );
Frame16Layout->addWidget( m_Type, 0, 0 );
- QLabel * TextLabel4 = new QLabel( Frame16, "TextLabel4" );
+ TQLabel * TextLabel4 = new TQLabel( Frame16, "TextLabel4" );
TextLabel4->setText( i18n( "User name:\n"
"(if necessary)" ) );
Frame16Layout->addWidget( TextLabel4, 4, 0 );
- QLabel * TextLabel2 = new QLabel( Frame16, "TextLabel2" );
+ TQLabel * TextLabel2 = new TQLabel( Frame16, "TextLabel2" );
TextLabel2->setText( i18n( "Host:" ) );
Frame16Layout->addWidget( TextLabel2, 2, 0 );
- m_driver = new QComboBox( FALSE, Frame16, "m_driver" );
+ m_driver = new TQComboBox( FALSE, Frame16, "m_driver" );
Frame16Layout->addWidget( m_driver, 0, 1 );
- m_username = new QLineEdit( Frame16, "m_username" );
+ m_username = new TQLineEdit( Frame16, "m_username" );
Frame16Layout->addWidget( m_username, 4, 1 );
- m_host = new QLineEdit( Frame16, "m_host" );
+ m_host = new TQLineEdit( Frame16, "m_host" );
m_host->setText("localhost");
Frame16Layout->addWidget( m_host, 2, 1 );
- QLabel * TextLabel3 = new QLabel( Frame16, "TextLabel3" );
+ TQLabel * TextLabel3 = new TQLabel( Frame16, "TextLabel3" );
TextLabel3->setText( i18n( "Port:\n(if necessary)") );
Frame16Layout->addWidget( TextLabel3, 3, 0 );
- m_password = new QLineEdit( Frame16, "m_password" );
- m_password->setEchoMode( QLineEdit::Password );
+ m_password = new TQLineEdit( Frame16, "m_password" );
+ m_password->setEchoMode( TQLineEdit::Password );
Frame16Layout->addWidget( m_password, 5, 1 );
- m_port = new QLineEdit( Frame16, "m_port" );
+ m_port = new TQLineEdit( Frame16, "m_port" );
m_port->setValidator( new KIntValidator( m_port ) );
Frame16Layout->addWidget( m_port, 3, 1 );
- QLabel * dbName = new QLabel( Frame16, "dbName" );
+ TQLabel * dbName = new TQLabel( Frame16, "dbName" );
dbName->setText( i18n( "Database name: ") );
Frame16Layout->addWidget( dbName, 1, 0 );
- m_databaseName = new QLineEdit( Frame16, "m_databaseName" );
+ m_databaseName = new TQLineEdit( Frame16, "m_databaseName" );
Frame16Layout->addWidget( m_databaseName, 1, 1 );
- QLabel * TextLabel5 = new QLabel( Frame16, "TextLabel5" );
+ TQLabel * TextLabel5 = new TQLabel( Frame16, "TextLabel5" );
TextLabel5->setText( i18n( "Password:\n"
"(if necessary)" ) );
Frame16Layout->addWidget( TextLabel5, 5, 0 );
Frame5Layout->addWidget( Frame16 );
- m_databaseStatus = new QLabel( Frame5, "m_databaseStatus" );
- m_databaseStatus->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)5, 0, 0, m_databaseStatus->sizePolicy().hasHeightForWidth() ) );
- m_databaseStatus->setMaximumSize( QSize( 32767, 30 ) );
- m_databaseStatus->setText( " " );
- Frame5Layout->addWidget( m_databaseStatus );
+ m_databasetqStatus = new TQLabel( Frame5, "m_databasetqStatus" );
+ m_databasetqStatus->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)5, 0, 0, m_databasetqStatus->sizePolicy().hasHeightForWidth() ) );
+ m_databasetqStatus->setMaximumSize( TQSize( 32767, 30 ) );
+ m_databasetqStatus->setText( " " );
+ Frame5Layout->addWidget( m_databasetqStatus );
m_databaseLayout->addWidget( Frame5, 0, 1 );
- QFrame * Frame17 = new QFrame( m_database, "Frame17" );
- Frame17->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17->sizePolicy().hasHeightForWidth() ) );
- Frame17->setMinimumSize( QSize( 111, 0 ) );
- Frame17->setFrameShape( QFrame::NoFrame );
- Frame17->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17 = new TQFrame( m_database, "Frame17" );
+ Frame17->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17->sizePolicy().hasHeightForWidth() ) );
+ Frame17->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17->setFrameShape( TQFrame::NoFrame );
+ Frame17->setFrameShadow( TQFrame::Plain );
m_databaseLayout->addWidget( Frame17, 0, 0 );
addPage( m_database, i18n( "Database" ) );
// new page
- m_sheet = new QWidget( this, "m_table" );
- m_sheetLayout = new QGridLayout( m_sheet, 1, 1, 11, 6, "m_tableLayout");
+ m_sheet = new TQWidget( this, "m_table" );
+ m_sheetLayout = new TQGridLayout( m_sheet, 1, 1, 11, 6, "m_tableLayout");
- QFrame * Frame5_2 = new QFrame( m_sheet, "Frame5_2" );
- Frame5_2->setFrameShape( QFrame::MShape );
- Frame5_2->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2Layout = new QGridLayout( Frame5_2, 1, 1, 11, 6, "Frame5_2Layout");
+ TQFrame * Frame5_2 = new TQFrame( m_sheet, "Frame5_2" );
+ Frame5_2->setFrameShape( TQFrame::MShape );
+ Frame5_2->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2Layout = new TQGridLayout( Frame5_2, 1, 1, 11, 6, "Frame5_2Layout");
- QHBoxLayout * Layout21 = new QHBoxLayout( 0, 0, 6, "Layout21");
+ TQHBoxLayout * Layout21 = new TQHBoxLayout( 0, 0, 6, "Layout21");
- // QLabel * TextLabel12_2 = new QLabel( Frame5_2, "TextLabel12_2" );
+ // TQLabel * TextLabel12_2 = new TQLabel( Frame5_2, "TextLabel12_2" );
// TextLabel12_2->setText( i18n( "Database:" ) );
// Layout21->addWidget( TextLabel12_2 );
- // m_databaseList = new QComboBox( FALSE, Frame5_2, "m_databaseList" );
+ // m_databaseList = new TQComboBox( FALSE, Frame5_2, "m_databaseList" );
// Layout21->addWidget( m_databaseList );
// m_connectButton = new KPushButton( Frame5_2, "m_connectButton" );
@@ -181,11 +181,11 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2Layout->addLayout( Layout21, 0, 0 );
- m_sheetStatus = new QLabel( Frame5_2, "m_tableStatus" );
- m_sheetStatus->setText( " " );
- Frame5_2Layout->addWidget( m_sheetStatus, 3, 0 );
+ m_sheettqStatus = new TQLabel( Frame5_2, "m_tabletqStatus" );
+ m_sheettqStatus->setText( " " );
+ Frame5_2Layout->addWidget( m_sheettqStatus, 3, 0 );
- m_SelectSheetLabel = new QLabel( Frame5_2, "m_SelectSheetLabel" );
+ m_SelectSheetLabel = new TQLabel( Frame5_2, "m_SelectSheetLabel" );
m_SelectSheetLabel->setText( i18n( "Select tables:" ) );
Frame5_2Layout->addWidget( m_SelectSheetLabel, 1, 0 );
@@ -197,24 +197,24 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
m_sheetLayout->addWidget( Frame5_2, 0, 1 );
- QFrame * Frame17_2 = new QFrame( m_sheet, "Frame17_2" );
- Frame17_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_2->sizePolicy().hasHeightForWidth() ) );
- Frame17_2->setMinimumSize( QSize( 111, 0 ) );
- Frame17_2->setFrameShape( QFrame::NoFrame );
- Frame17_2->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_2 = new TQFrame( m_sheet, "Frame17_2" );
+ Frame17_2->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_2->sizePolicy().hasHeightForWidth() ) );
+ Frame17_2->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_2->setFrameShape( TQFrame::NoFrame );
+ Frame17_2->setFrameShadow( TQFrame::Plain );
m_sheetLayout->addWidget( Frame17_2, 0, 0 );
addPage( m_sheet, i18n( "Sheets" ) );
- m_columns = new QWidget( this, "m_columns" );
- m_columnsLayout = new QGridLayout( m_columns, 1, 1, 11, 6, "m_columnsLayout");
+ m_columns = new TQWidget( this, "m_columns" );
+ m_columnsLayout = new TQGridLayout( m_columns, 1, 1, 11, 6, "m_columnsLayout");
- QFrame * Frame5_2_2 = new QFrame( m_columns, "Frame5_2_2" );
- Frame5_2_2->setFrameShape( QFrame::MShape );
- Frame5_2_2->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2_2Layout = new QGridLayout( Frame5_2_2, 1, 1, 11, 6, "Frame5_2_2Layout");
+ TQFrame * Frame5_2_2 = new TQFrame( m_columns, "Frame5_2_2" );
+ Frame5_2_2->setFrameShape( TQFrame::MShape );
+ Frame5_2_2->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2_2Layout = new TQGridLayout( Frame5_2_2, 1, 1, 11, 6, "Frame5_2_2Layout");
- QLabel * TextLabel11_2 = new QLabel( Frame5_2_2, "TextLabel11_2" );
+ TQLabel * TextLabel11_2 = new TQLabel( Frame5_2_2, "TextLabel11_2" );
TextLabel11_2->setText( i18n( "Select columns:" ) );
Frame5_2_2Layout->addWidget( TextLabel11_2, 0, 0 );
@@ -227,57 +227,57 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2_2Layout->addWidget( m_columnView, 1, 0 );
- m_columnsStatus = new QLabel( Frame5_2_2, "m_columnsStatus" );
- m_columnsStatus->setText( " " );
- Frame5_2_2Layout->addWidget( m_columnsStatus, 2, 0 );
+ m_columnstqStatus = new TQLabel( Frame5_2_2, "m_columnstqStatus" );
+ m_columnstqStatus->setText( " " );
+ Frame5_2_2Layout->addWidget( m_columnstqStatus, 2, 0 );
m_columnsLayout->addWidget( Frame5_2_2, 0, 1 );
- QFrame * Frame17_3 = new QFrame( m_columns, "Frame17_3" );
- Frame17_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_3->sizePolicy().hasHeightForWidth() ) );
- Frame17_3->setMinimumSize( QSize( 111, 0 ) );
- Frame17_3->setFrameShape( QFrame::NoFrame );
- Frame17_3->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_3 = new TQFrame( m_columns, "Frame17_3" );
+ Frame17_3->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_3->sizePolicy().hasHeightForWidth() ) );
+ Frame17_3->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_3->setFrameShape( TQFrame::NoFrame );
+ Frame17_3->setFrameShadow( TQFrame::Plain );
m_columnsLayout->addWidget( Frame17_3, 0, 0 );
addPage( m_columns, i18n( "Columns" ) );
// options page
- m_options = new QWidget( this, "m_options" );
- m_optionsLayout = new QGridLayout( m_options, 1, 1, 11, 6, "m_optionsLayout");
+ m_options = new TQWidget( this, "m_options" );
+ m_optionsLayout = new TQGridLayout( m_options, 1, 1, 11, 6, "m_optionsLayout");
- QFrame * optionsFrame = new QFrame( m_options, "optionsFrame" );
- optionsFrame->setFrameShape( QFrame::MShape );
- optionsFrame->setFrameShadow( QFrame::MShadow );
- QGridLayout * optionsFrameLayout = new QGridLayout( optionsFrame, 1, 1, 11, 6, "optionsFrameLayout");
+ TQFrame * optionsFrame = new TQFrame( m_options, "optionsFrame" );
+ optionsFrame->setFrameShape( TQFrame::MShape );
+ optionsFrame->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * optionsFrameLayout = new TQGridLayout( optionsFrame, 1, 1, 11, 6, "optionsFrameLayout");
- m_columns_1 = new QComboBox( false, optionsFrame, "m_columns_1" );
+ m_columns_1 = new TQComboBox( false, optionsFrame, "m_columns_1" );
optionsFrameLayout->addWidget( m_columns_1, 2, 0 );
- m_operatorValue_2 = new QLineEdit( optionsFrame, "m_operatorValue_2" );
+ m_operatorValue_2 = new TQLineEdit( optionsFrame, "m_operatorValue_2" );
optionsFrameLayout->addWidget( m_operatorValue_2, 3, 2 );
- m_andBox = new QRadioButton( optionsFrame, "m_andBox" );
+ m_andBox = new TQRadioButton( optionsFrame, "m_andBox" );
m_andBox->setText( i18n( "Match all of the following (AND)" ) );
m_andBox->setChecked( true );
optionsFrameLayout->addMultiCellWidget( m_andBox, 0, 0, 0, 2 );
- m_orBox = new QRadioButton( optionsFrame, "m_orBox" );
+ m_orBox = new TQRadioButton( optionsFrame, "m_orBox" );
m_orBox->setText( i18n( "Match any of the following (OR)" ) );
optionsFrameLayout->addMultiCellWidget( m_orBox, 1, 1, 0, 2 );
- m_operatorValue_1 = new QLineEdit( optionsFrame, "m_operatorValue" );
+ m_operatorValue_1 = new TQLineEdit( optionsFrame, "m_operatorValue" );
optionsFrameLayout->addWidget( m_operatorValue_1, 2, 2 );
- m_columns_2 = new QComboBox( FALSE, optionsFrame, "m_columns_2" );
+ m_columns_2 = new TQComboBox( FALSE, optionsFrame, "m_columns_2" );
optionsFrameLayout->addWidget( m_columns_2, 3, 0 );
- m_operatorValue_3 = new QLineEdit( optionsFrame, "m_operatorValue_3" );
+ m_operatorValue_3 = new TQLineEdit( optionsFrame, "m_operatorValue_3" );
optionsFrameLayout->addWidget( m_operatorValue_3, 4, 2 );
- m_operator_1 = new QComboBox( FALSE, optionsFrame, "m_operator_1" );
+ m_operator_1 = new TQComboBox( FALSE, optionsFrame, "m_operator_1" );
m_operator_1->insertItem( i18n( "equals" ) );
m_operator_1->insertItem( i18n( "not equal" ) );
m_operator_1->insertItem( i18n( "in" ) );
@@ -290,7 +290,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_1, 2, 1 );
- m_operator_2 = new QComboBox( FALSE, optionsFrame, "m_operator_2" );
+ m_operator_2 = new TQComboBox( FALSE, optionsFrame, "m_operator_2" );
m_operator_2->insertItem( i18n( "equals" ) );
m_operator_2->insertItem( i18n( "not equal" ) );
m_operator_2->insertItem( i18n( "in" ) );
@@ -301,7 +301,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_2, 3, 1 );
- m_operator_3 = new QComboBox( FALSE, optionsFrame, "m_operator_3" );
+ m_operator_3 = new TQComboBox( FALSE, optionsFrame, "m_operator_3" );
m_operator_3->insertItem( i18n( "equals" ) );
m_operator_3->insertItem( i18n( "not equal" ) );
m_operator_3->insertItem( i18n( "in" ) );
@@ -312,88 +312,88 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
optionsFrameLayout->addWidget( m_operator_3, 4, 1 );
- m_columns_3 = new QComboBox( false, optionsFrame, "m_columns_3" );
+ m_columns_3 = new TQComboBox( false, optionsFrame, "m_columns_3" );
optionsFrameLayout->addWidget( m_columns_3, 4, 0 );
- m_distinct = new QCheckBox( optionsFrame, "m_distinct" );
+ m_distinct = new TQCheckBox( optionsFrame, "m_distinct" );
m_distinct->setText( i18n( "Distinct" ) );
optionsFrameLayout->addWidget( m_distinct, 7, 2 );
- QLabel * TextLabel19 = new QLabel( optionsFrame, "TextLabel19" );
+ TQLabel * TextLabel19 = new TQLabel( optionsFrame, "TextLabel19" );
TextLabel19->setText( i18n( "Sorted by" ) );
optionsFrameLayout->addWidget( TextLabel19, 5, 0 );
- m_columnsSort_1 = new QComboBox( false, optionsFrame, "m_columnsSort_1" );
+ m_columnsSort_1 = new TQComboBox( false, optionsFrame, "m_columnsSort_1" );
optionsFrameLayout->addWidget( m_columnsSort_1, 5, 1 );
- m_sortMode_1 = new QComboBox( false, optionsFrame, "m_sortMode_1" );
+ m_sortMode_1 = new TQComboBox( false, optionsFrame, "m_sortMode_1" );
m_sortMode_1->insertItem( i18n( "Ascending" ) );
m_sortMode_1->insertItem( i18n( "Descending" ) );
optionsFrameLayout->addWidget( m_sortMode_1, 5, 2 );
- QLabel * TextLabel19_2 = new QLabel( optionsFrame, "TextLabel19_2" );
+ TQLabel * TextLabel19_2 = new TQLabel( optionsFrame, "TextLabel19_2" );
TextLabel19_2->setText( i18n( "Sorted by" ) );
optionsFrameLayout->addWidget( TextLabel19_2, 6, 0 );
- m_columnsSort_2 = new QComboBox( false, optionsFrame, "m_columnsSort_2" );
+ m_columnsSort_2 = new TQComboBox( false, optionsFrame, "m_columnsSort_2" );
optionsFrameLayout->addWidget( m_columnsSort_2, 6, 1 );
- m_sortMode_2 = new QComboBox( false, optionsFrame, "m_sortMode_2" );
+ m_sortMode_2 = new TQComboBox( false, optionsFrame, "m_sortMode_2" );
m_sortMode_2->insertItem( i18n( "Ascending" ) );
m_sortMode_2->insertItem( i18n( "Descending" ) );
optionsFrameLayout->addWidget( m_sortMode_2, 6, 2 );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
optionsFrameLayout->addItem( spacer, 7, 1 );
- QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem* spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
optionsFrameLayout->addItem( spacer_2, 7, 0 );
m_optionsLayout->addWidget( optionsFrame, 0, 1 );
- QFrame * Frame17_4 = new QFrame( m_options, "Frame17_4" );
- Frame17_4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_4->sizePolicy().hasHeightForWidth() ) );
- Frame17_4->setMinimumSize( QSize( 111, 0 ) );
- Frame17_4->setFrameShape( QFrame::NoFrame );
- Frame17_4->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_4 = new TQFrame( m_options, "Frame17_4" );
+ Frame17_4->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_4->sizePolicy().hasHeightForWidth() ) );
+ Frame17_4->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_4->setFrameShape( TQFrame::NoFrame );
+ Frame17_4->setFrameShadow( TQFrame::Plain );
m_optionsLayout->addWidget( Frame17_4, 0, 0 );
addPage( m_options, i18n( "Query Options" ) );
// result page
- m_result = new QWidget( this, "m_result" );
- m_resultLayout = new QGridLayout( m_result, 1, 1, 11, 6, "m_resultLayout");
+ m_result = new TQWidget( this, "m_result" );
+ m_resultLayout = new TQGridLayout( m_result, 1, 1, 11, 6, "m_resultLayout");
- QFrame * Frame5_2_2_3 = new QFrame( m_result, "Frame5_2_2_3" );
- Frame5_2_2_3->setFrameShape( QFrame::MShape );
- Frame5_2_2_3->setFrameShadow( QFrame::MShadow );
- QGridLayout * Frame5_2_2_3Layout = new QGridLayout( Frame5_2_2_3, 1, 1, 11, 6, "Frame5_2_2_3Layout");
+ TQFrame * Frame5_2_2_3 = new TQFrame( m_result, "Frame5_2_2_3" );
+ Frame5_2_2_3->setFrameShape( TQFrame::MShape );
+ Frame5_2_2_3->setFrameShadow( TQFrame::MShadow );
+ TQGridLayout * Frame5_2_2_3Layout = new TQGridLayout( Frame5_2_2_3, 1, 1, 11, 6, "Frame5_2_2_3Layout");
- QLabel * TextLabel17 = new QLabel( Frame5_2_2_3, "TextLabel17" );
+ TQLabel * TextLabel17 = new TQLabel( Frame5_2_2_3, "TextLabel17" );
TextLabel17->setText( i18n( "SQL query:" ) );
Frame5_2_2_3Layout->addWidget( TextLabel17, 0, 0 );
- m_sqlQuery = new QTextEdit( Frame5_2_2_3, "m_sqlQuery" );
+ m_sqlQuery = new TQTextEdit( Frame5_2_2_3, "m_sqlQuery" );
Frame5_2_2_3Layout->addWidget( m_sqlQuery, 1, 0 );
- QFrame * Frame12 = new QFrame( Frame5_2_2_3, "Frame12" );
- Frame12->setFrameShape( QFrame::StyledPanel );
- Frame12->setFrameShadow( QFrame::Raised );
- QGridLayout * Frame12Layout = new QGridLayout( Frame12, 1, 1, 11, 6, "Frame12Layout");
+ TQFrame * Frame12 = new TQFrame( Frame5_2_2_3, "Frame12" );
+ Frame12->setFrameShape( TQFrame::StyledPanel );
+ Frame12->setFrameShadow( TQFrame::Raised );
+ TQGridLayout * Frame12Layout = new TQGridLayout( Frame12, 1, 1, 11, 6, "Frame12Layout");
- m_startingRegion = new QRadioButton( Frame12, "m_startingRegion" );
+ m_startingRegion = new TQRadioButton( Frame12, "m_startingRegion" );
m_startingRegion->setText( i18n( "Insert in region" ) );
Frame12Layout->addWidget( m_startingRegion, 0, 0 );
- m_cell = new QLineEdit( Frame12, "m_cell" );
+ m_cell = new TQLineEdit( Frame12, "m_cell" );
Frame12Layout->addWidget( m_cell, 1, 1 );
- m_region = new QLineEdit( Frame12, "m_region" );
+ m_region = new TQLineEdit( Frame12, "m_region" );
Frame12Layout->addWidget( m_region, 0, 1 );
- m_startingCell = new QRadioButton( Frame12, "m_startingCell" );
+ m_startingCell = new TQRadioButton( Frame12, "m_startingCell" );
m_startingCell->setText( i18n( "Starting in cell" ) );
m_startingCell->setChecked( TRUE );
Frame12Layout->addWidget( m_startingCell, 1, 0 );
@@ -401,11 +401,11 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
Frame5_2_2_3Layout->addWidget( Frame12, 2, 0 );
m_resultLayout->addWidget( Frame5_2_2_3, 0, 1 );
- QFrame * Frame17_5 = new QFrame( m_result, "Frame17_5" );
- Frame17_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)7, 0, 0, Frame17_5->sizePolicy().hasHeightForWidth() ) );
- Frame17_5->setMinimumSize( QSize( 111, 0 ) );
- Frame17_5->setFrameShape( QFrame::NoFrame );
- Frame17_5->setFrameShadow( QFrame::Plain );
+ TQFrame * Frame17_5 = new TQFrame( m_result, "Frame17_5" );
+ Frame17_5->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)7, 0, 0, Frame17_5->sizePolicy().hasHeightForWidth() ) );
+ Frame17_5->setMinimumSize( TQSize( 111, 0 ) );
+ Frame17_5->setFrameShape( TQFrame::NoFrame );
+ Frame17_5->setFrameShadow( TQFrame::Plain );
m_resultLayout->addWidget( Frame17_5, 0, 0 );
addPage( m_result, i18n( "Result" ) );
@@ -413,18 +413,18 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
finishButton()->setEnabled(false);
// signals and slots connections
- connect( m_orBox, SIGNAL( clicked() ), this, SLOT( orBox_clicked() ) );
- connect( m_andBox, SIGNAL( clicked() ), this, SLOT( andBox_clicked() ) );
- connect( m_startingCell, SIGNAL( clicked() ), this, SLOT( startingCell_clicked() ) );
- connect( m_startingRegion, SIGNAL( clicked() ), this, SLOT( startingRegion_clicked() ) );
- connect( m_driver, SIGNAL( activated(int) ), this, SLOT( databaseDriverChanged(int) ) );
- connect( m_host, SIGNAL( textChanged(const QString &) ), this, SLOT( databaseHostChanged(const QString &) ) );
- connect( m_databaseName, SIGNAL( textChanged(const QString &) ), this, SLOT( databaseNameChanged(const QString &) ) );
- connect( m_sheetView, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint &, int ) ),
- this, SLOT( popupSheetViewMenu(QListViewItem *, const QPoint &, int ) ) );
- connect( m_sheetView, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( sheetViewClicked( QListViewItem * ) ) );
-
- QStringList str = QSqlDatabase::drivers();
+ connect( m_orBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( orBox_clicked() ) );
+ connect( m_andBox, TQT_SIGNAL( clicked() ), this, TQT_SLOT( andBox_clicked() ) );
+ connect( m_startingCell, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startingCell_clicked() ) );
+ connect( m_startingRegion, TQT_SIGNAL( clicked() ), this, TQT_SLOT( startingRegion_clicked() ) );
+ connect( m_driver, TQT_SIGNAL( activated(int) ), this, TQT_SLOT( databaseDriverChanged(int) ) );
+ connect( m_host, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( databaseHostChanged(const TQString &) ) );
+ connect( m_databaseName, TQT_SIGNAL( textChanged(const TQString &) ), this, TQT_SLOT( databaseNameChanged(const TQString &) ) );
+ connect( m_sheetView, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQT_SLOT( popupSheetViewMenu(TQListViewItem *, const TQPoint &, int ) ) );
+ connect( m_sheetView, TQT_SIGNAL( clicked( TQListViewItem * ) ), this, TQT_SLOT( sheetViewClicked( TQListViewItem * ) ) );
+
+ TQStringList str = TQSqlDatabase::drivers();
m_driver->insertItem("");
m_driver->insertStringList( str );
@@ -439,7 +439,7 @@ DatabaseDialog::DatabaseDialog( View * parent, QRect const & rect, const char *
DatabaseDialog::~DatabaseDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
if ( m_dbConnection )
m_dbConnection->close();
}
@@ -579,8 +579,8 @@ void DatabaseDialog::accept()
}
int i;
- QString queryStr;
- QString tmp = m_sqlQuery->text();
+ TQString queryStr;
+ TQString tmp = m_sqlQuery->text();
for ( i = 0; i < (int) tmp.length(); ++i )
{
if ( tmp[i] != '\n' )
@@ -590,7 +590,7 @@ void DatabaseDialog::accept()
}
Cell * cell;
- QSqlQuery query( QString::null, m_dbConnection );
+ TQSqlQuery query( TQString(), m_dbConnection );
// Check the whole query for SQL that might modify database.
// If there is an update command, then it must be at the start of the string,
@@ -598,8 +598,8 @@ void DatabaseDialog::accept()
// An update command must also be followed by a space, or it would be parsed
// as an identifier.
// For sanity, also check that there is a SELECT
- QRegExp couldModifyDB( "(^|[( \\s])(UPDATE|DELETE|INSERT|CREATE) ", false /* cs */ );
- QRegExp couldQueryDB( "(^|[( \\s])(SELECT) ", false /* cs */ );
+ TQRegExp couldModifyDB( "(^|[( \\s])(UPDATE|DELETE|INSERT|CREATE) ", false /* cs */ );
+ TQRegExp couldQueryDB( "(^|[( \\s])(SELECT) ", false /* cs */ );
if (couldModifyDB.search( queryStr ) != -1 || couldQueryDB.search ( queryStr ) == -1 )
{
@@ -647,7 +647,7 @@ void DatabaseDialog::accept()
if ( !m_pView->doc()->undoLocked() )
{
- QRect r(left, top, count, height);
+ TQRect r(left, top, count, height);
UndoInsertData * undo = new UndoInsertData( m_pView->doc(), sheet, r );
m_pView->doc()->addCommand( undo );
}
@@ -692,7 +692,7 @@ void DatabaseDialog::accept()
bool DatabaseDialog::databaseDoNext()
{
- m_dbConnection = QSqlDatabase::addDatabase( m_driver->currentText() );
+ m_dbConnection = TQSqlDatabase::addDatabase( m_driver->currentText() );
if ( m_dbConnection )
{
@@ -717,11 +717,11 @@ bool DatabaseDialog::databaseDoNext()
m_dbConnection->setPort( port );
}
- m_databaseStatus->setText( i18n("Connecting to database...") );
+ m_databasetqStatus->setText( i18n("Connecting to database...") );
if ( m_dbConnection->open() )
{
- m_databaseStatus->setText( i18n("Connected. Retrieving table information...") );
- QStringList sheetList( m_dbConnection->tables() );
+ m_databasetqStatus->setText( i18n("Connected. Retrieving table information...") );
+ TQStringList sheetList( m_dbConnection->tables() );
if ( sheetList.isEmpty() )
{
@@ -734,21 +734,21 @@ bool DatabaseDialog::databaseDoNext()
for ( i = 0; i < sheetList.size(); ++i )
{
- QCheckListItem * item = new QCheckListItem( m_sheetView, sheetList[i],
- QCheckListItem::CheckBox );
+ TQCheckListItem * item = new TQCheckListItem( m_sheetView, sheetList[i],
+ TQCheckListItem::CheckBox );
item->setOn(false);
m_sheetView->insertItem( item );
}
m_sheetView->setEnabled( true );
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
}
else
{
- QSqlError error = m_dbConnection->lastError();
- QString errorMsg;
- QString err1 = error.driverText();
- QString err2 = error.databaseText();
+ TQSqlError error = m_dbConnection->lastError();
+ TQString errorMsg;
+ TQString err1 = error.driverText();
+ TQString err2 = error.databaseText();
if ( !err1.isEmpty() )
{
errorMsg.append( error.driverText() );
@@ -759,7 +759,7 @@ bool DatabaseDialog::databaseDoNext()
errorMsg.append( error.databaseText() );
errorMsg.append( "\n" );
}
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
KMessageBox::error( this, errorMsg );
return false;
@@ -768,7 +768,7 @@ bool DatabaseDialog::databaseDoNext()
else
{
KMessageBox::error( this, i18n("Driver could not be loaded") );
- m_databaseStatus->setText( " " );
+ m_databasetqStatus->setText( " " );
return false;
}
setNextEnabled(m_sheet, true);
@@ -778,14 +778,14 @@ bool DatabaseDialog::databaseDoNext()
bool DatabaseDialog::sheetsDoNext()
{
- m_databaseStatus->setText( i18n("Retrieving meta data of tables...") );
- QStringList sheets;
+ m_databasetqStatus->setText( i18n("Retrieving meta data of tables...") );
+ TQStringList sheets;
- for (QListViewItem * item = (QCheckListItem *) m_sheetView->firstChild(); item; item = item->nextSibling())
+ for (TQListViewItem * item = (TQCheckListItem *) m_sheetView->firstChild(); item; item = item->nextSibling())
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
- sheets.append(((QCheckListItem * ) item)->text());
+ sheets.append(((TQCheckListItem * ) item)->text());
}
}
@@ -796,21 +796,21 @@ bool DatabaseDialog::sheetsDoNext()
}
m_columnView->clear();
- QSqlRecord info;
- QCheckListItem * item;
+ TQSqlRecord info;
+ TQCheckListItem * item;
for (int i = 0; i < (int) sheets.size(); ++i)
{
info = m_dbConnection->record( sheets[i] );
for (int j = 0; j < (int) info.count(); ++j)
{
- QString name = info.fieldName(j);
- item = new QCheckListItem( m_columnView, name,
- QCheckListItem::CheckBox );
+ TQString name = info.fieldName(j);
+ item = new TQCheckListItem( m_columnView, name,
+ TQCheckListItem::CheckBox );
item->setOn(false);
m_columnView->insertItem( item );
item->setText( 1, sheets[i] );
- QSqlField * field = info.field(name);
- item->setText( 2, QVariant::typeToName(field->type()) );
+ TQSqlField * field = info.field(name);
+ item->setText( 2, TQVariant::typeToName(field->type()) );
}
}
m_columnView->setSorting(1, true);
@@ -824,12 +824,12 @@ bool DatabaseDialog::sheetsDoNext()
bool DatabaseDialog::columnsDoNext()
{
- QStringList columns;
- for (QListViewItem * item = m_columnView->firstChild(); item; item = item->nextSibling())
+ TQStringList columns;
+ for (TQListViewItem * item = m_columnView->firstChild(); item; item = item->nextSibling())
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
- columns.append( item->text(1) + "." + ((QCheckListItem * ) item)->text());
+ columns.append( item->text(1) + "." + ((TQCheckListItem * ) item)->text());
}
}
@@ -858,11 +858,11 @@ bool DatabaseDialog::columnsDoNext()
}
-QString DatabaseDialog::getWhereCondition(QString const & column,
- QString const & value,
+TQString DatabaseDialog::getWhereCondition(TQString const & column,
+ TQString const & value,
int op)
{
- QString wherePart;
+ TQString wherePart;
switch( op )
{
@@ -908,7 +908,7 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
if ( op != 2 && op != 3 )
{
- QString val;
+ TQString val;
bool ok = false;
value.toDouble(&ok);
@@ -929,7 +929,7 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
}
else // "in" & "not in"
{
- QString val;
+ TQString val;
if (value[0] != '(')
val = "(";
val += value;
@@ -941,21 +941,21 @@ QString DatabaseDialog::getWhereCondition(QString const & column,
return wherePart;
}
-QString DatabaseDialog::exchangeWildcards(QString const & value)
+TQString DatabaseDialog::exchangeWildcards(TQString const & value)
{
- QString str(value);
- int p = str.find('*');
+ TQString str(value);
+ int p = str.tqfind('*');
while ( p > -1 )
{
- str = str.replace( p, 1, "%" );
- p = str.find('*');
+ str = str.tqreplace( p, 1, "%" );
+ p = str.tqfind('*');
}
- p = str.find('?');
+ p = str.tqfind('?');
while ( p > -1 )
{
- str = str.replace( p, 1, "_" );
- p = str.find('?');
+ str = str.tqreplace( p, 1, "_" );
+ p = str.tqfind('?');
}
return str;
}
@@ -964,8 +964,8 @@ bool DatabaseDialog::optionsDoNext()
{
if ( m_operator_1->currentItem() == 4 )
{
- if ( ( m_operatorValue_1->text().find('*') != -1 )
- || ( m_operatorValue_1->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_1->text().tqfind('*') != -1 )
+ || ( m_operatorValue_1->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -978,8 +978,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_2->currentItem() == 4 )
{
- if ( ( m_operatorValue_2->text().find('*') != -1 )
- || ( m_operatorValue_2->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_2->text().tqfind('*') != -1 )
+ || ( m_operatorValue_2->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -992,8 +992,8 @@ bool DatabaseDialog::optionsDoNext()
if ( m_operator_3->currentItem() == 4 )
{
- if ( ( m_operatorValue_3->text().find('*') != -1 )
- || ( m_operatorValue_3->text().find('?') != -1 ) )
+ if ( ( m_operatorValue_3->text().tqfind('*') != -1 )
+ || ( m_operatorValue_3->text().tqfind('?') != -1 ) )
{
// xgettext: no-c-format
int res = KMessageBox::warningYesNo( this, i18n("'*' or '?' are not valid wildcards in SQL. "
@@ -1004,7 +1004,7 @@ bool DatabaseDialog::optionsDoNext()
}
}
- QString query("SELECT ");
+ TQString query("SELECT ");
if (m_distinct->isChecked())
query += "DISTINCT ";
@@ -1020,16 +1020,16 @@ bool DatabaseDialog::optionsDoNext()
query += "\nFROM ";
- QListViewItem * item = (QCheckListItem *) m_sheetView->firstChild();
+ TQListViewItem * item = (TQCheckListItem *) m_sheetView->firstChild();
bool b = false;
while ( item )
{
- if (((QCheckListItem * ) item)->isOn())
+ if (((TQCheckListItem * ) item)->isOn())
{
if ( b )
query += ", ";
b = true;
- query += ((QCheckListItem * ) item)->text();
+ query += ((TQCheckListItem * ) item)->text();
}
item = item->nextSibling();
}
@@ -1131,7 +1131,7 @@ void DatabaseDialog::connectButton_clicked()
qWarning( "DatabaseDialog::connectButton_clicked(): Not implemented yet!" );
}
-void DatabaseDialog::databaseNameChanged(const QString & s)
+void DatabaseDialog::databaseNameChanged(const TQString & s)
{
if ( !m_driver->currentText().isEmpty() && !s.isEmpty()
&& !m_host->text().isEmpty() )
@@ -1140,7 +1140,7 @@ void DatabaseDialog::databaseNameChanged(const QString & s)
setNextEnabled(m_database, false);
}
-void DatabaseDialog::databaseHostChanged(const QString & s)
+void DatabaseDialog::databaseHostChanged(const TQString & s)
{
if ( !m_driver->currentText().isEmpty() && !s.isEmpty()
&& !m_databaseName->text().isEmpty() )
@@ -1158,16 +1158,16 @@ void DatabaseDialog::databaseDriverChanged(int index)
setNextEnabled(m_database, false);
}
-void DatabaseDialog::popupSheetViewMenu( QListViewItem *, const QPoint &, int )
+void DatabaseDialog::popupSheetViewMenu( TQListViewItem *, const TQPoint &, int )
{
// TODO: popup menu with "Select All", "Inverse selection", "remove selection"
}
-void DatabaseDialog::sheetViewClicked( QListViewItem * )
+void DatabaseDialog::sheetViewClicked( TQListViewItem * )
{
// if ( item )
// {
-// QCheckListItem * i = (QCheckListItem *) item;
+// TQCheckListItem * i = (TQCheckListItem *) item;
// i->setOn( !i->isOn() );
// }
// kdDebug() << "clicked" << endl;
@@ -1176,4 +1176,4 @@ void DatabaseDialog::sheetViewClicked( QListViewItem * )
#include "kspread_dlg_database.moc"
-#endif // QT_NO_SQL
+#endif // TQT_NO_SQL
diff --git a/kspread/dialogs/kspread_dlg_database.h b/kspread/dialogs/kspread_dlg_database.h
index ae958d40..d2e921fe 100644
--- a/kspread/dialogs/kspread_dlg_database.h
+++ b/kspread/dialogs/kspread_dlg_database.h
@@ -22,24 +22,24 @@
#ifndef __kspread_dlg_database__
#define __kspread_dlg_database__
-#include <qdialog.h>
-#include <qrect.h>
+#include <tqdialog.h>
+#include <tqrect.h>
#include <kwizard.h>
-class QCheckBox;
-class QComboBox;
-class QFrame;
-class QGridLayout;
-class QLabel;
-class QLineEdit;
-class QListViewItem;
-class QHBoxLayout;
-class QRadioButton;
-class QSqlDatabase;
-class QTextEdit;
-class QVBoxLayout;
-class QWidget;
+class TQCheckBox;
+class TQComboBox;
+class TQFrame;
+class TQGridLayout;
+class TQLabel;
+class TQLineEdit;
+class TQListViewItem;
+class TQHBoxLayout;
+class TQRadioButton;
+class TQSqlDatabase;
+class TQTextEdit;
+class TQVBoxLayout;
+class TQWidget;
class KListView;
class KPushButton;
@@ -50,11 +50,12 @@ class View;
class DatabaseDialog : public KWizard
{
Q_OBJECT
+ TQ_OBJECT
public:
enum PageId { eDatabase = 0, eSheets = 1, eColumns = 2, eOptions = 3, eResult = 4 };
- DatabaseDialog( View * parent, QRect const & rect, const char * name = 0, bool modal = FALSE, WFlags fl = 0 );
+ DatabaseDialog( View * tqparent, TQRect const & rect, const char * name = 0, bool modal = FALSE, WFlags fl = 0 );
virtual ~DatabaseDialog();
private slots:
@@ -63,70 +64,70 @@ class DatabaseDialog : public KWizard
void startingCell_clicked();
void startingRegion_clicked();
void connectButton_clicked();
- void databaseNameChanged( const QString & s );
- void databaseHostChanged( const QString & s );
+ void databaseNameChanged( const TQString & s );
+ void databaseHostChanged( const TQString & s );
void databaseDriverChanged( int );
- void popupSheetViewMenu( QListViewItem *, const QPoint &, int );
- void sheetViewClicked( QListViewItem * );
+ void popupSheetViewMenu( TQListViewItem *, const TQPoint &, int );
+ void sheetViewClicked( TQListViewItem * );
void accept();
protected:
void next();
void back();
- QGridLayout * m_databaseLayout;
- QGridLayout * m_sheetLayout;
- QGridLayout * m_columnsLayout;
- QGridLayout * m_optionsLayout;
- QGridLayout * m_resultLayout;
+ TQGridLayout * m_databaseLayout;
+ TQGridLayout * m_sheetLayout;
+ TQGridLayout * m_columnsLayout;
+ TQGridLayout * m_optionsLayout;
+ TQGridLayout * m_resultLayout;
private:
int m_currentPage;
View * m_pView;
- QRect m_targetRect;
- QSqlDatabase * m_dbConnection;
-
- QWidget * m_database;
- QLabel * m_databaseStatus;
- QLineEdit * m_username;
- QLineEdit * m_port;
- QLineEdit * m_databaseName;
- QComboBox * m_driver;
- QLineEdit * m_password;
- QLineEdit * m_host;
- QLabel * m_Type;
- QWidget * m_sheet;
- QComboBox * m_databaseList;
+ TQRect m_targetRect;
+ TQSqlDatabase * m_dbConnection;
+
+ TQWidget * m_database;
+ TQLabel * m_databasetqStatus;
+ TQLineEdit * m_username;
+ TQLineEdit * m_port;
+ TQLineEdit * m_databaseName;
+ TQComboBox * m_driver;
+ TQLineEdit * m_password;
+ TQLineEdit * m_host;
+ TQLabel * m_Type;
+ TQWidget * m_sheet;
+ TQComboBox * m_databaseList;
KPushButton * m_connectButton;
- QLabel * m_sheetStatus;
- QLabel * m_SelectSheetLabel;
+ TQLabel * m_sheettqStatus;
+ TQLabel * m_SelectSheetLabel;
KListView * m_sheetView;
- QWidget * m_columns;
+ TQWidget * m_columns;
KListView * m_columnView;
- QLabel * m_columnsStatus;
- QWidget * m_options;
- QComboBox * m_columns_1;
- QComboBox * m_columns_2;
- QComboBox * m_columns_3;
- QComboBox * m_operator_1;
- QComboBox * m_operator_2;
- QComboBox * m_operator_3;
- QLineEdit * m_operatorValue_1;
- QLineEdit * m_operatorValue_2;
- QLineEdit * m_operatorValue_3;
- QRadioButton * m_andBox;
- QRadioButton * m_orBox;
- QComboBox * m_columnsSort_1;
- QComboBox * m_columnsSort_2;
- QComboBox * m_sortMode_1;
- QComboBox * m_sortMode_2;
- QCheckBox * m_distinct;
- QWidget * m_result;
- QTextEdit * m_sqlQuery;
- QRadioButton * m_startingRegion;
- QLineEdit * m_cell;
- QLineEdit * m_region;
- QRadioButton * m_startingCell;
+ TQLabel * m_columnstqStatus;
+ TQWidget * m_options;
+ TQComboBox * m_columns_1;
+ TQComboBox * m_columns_2;
+ TQComboBox * m_columns_3;
+ TQComboBox * m_operator_1;
+ TQComboBox * m_operator_2;
+ TQComboBox * m_operator_3;
+ TQLineEdit * m_operatorValue_1;
+ TQLineEdit * m_operatorValue_2;
+ TQLineEdit * m_operatorValue_3;
+ TQRadioButton * m_andBox;
+ TQRadioButton * m_orBox;
+ TQComboBox * m_columnsSort_1;
+ TQComboBox * m_columnsSort_2;
+ TQComboBox * m_sortMode_1;
+ TQComboBox * m_sortMode_2;
+ TQCheckBox * m_distinct;
+ TQWidget * m_result;
+ TQTextEdit * m_sqlQuery;
+ TQRadioButton * m_startingRegion;
+ TQLineEdit * m_cell;
+ TQLineEdit * m_region;
+ TQRadioButton * m_startingCell;
void switchPage( int id );
bool databaseDoNext();
@@ -134,8 +135,8 @@ class DatabaseDialog : public KWizard
bool columnsDoNext();
bool optionsDoNext();
- QString exchangeWildcards(QString const & value);
- QString getWhereCondition( QString const &, QString const &, int );
+ TQString exchangeWildcards(TQString const & value);
+ TQString getWhereCondition( TQString const &, TQString const &, int );
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_find.cc b/kspread/dialogs/kspread_dlg_find.cc
index 397b31d8..954e0a5c 100644
--- a/kspread/dialogs/kspread_dlg_find.cc
+++ b/kspread/dialogs/kspread_dlg_find.cc
@@ -19,49 +19,49 @@
#include "kspread_dlg_find.h"
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qcombobox.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqcombobox.h>
using namespace KSpread;
-FindOption::FindOption( QWidget *parent)
+FindOption::FindOption( TQWidget *tqparent)
{
- QVBoxLayout *layout = new QVBoxLayout(parent);
- m_moreOptions = new QPushButton( i18n( "More Options" ), parent );
- layout->addWidget( m_moreOptions );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(tqparent);
+ m_moreOptions = new TQPushButton( i18n( "More Options" ), tqparent );
+ tqlayout->addWidget( m_moreOptions );
- connect( m_moreOptions, SIGNAL( clicked () ), this, SLOT( slotMoreOptions() ) );
+ connect( m_moreOptions, TQT_SIGNAL( clicked () ), this, TQT_SLOT( slotMoreOptions() ) );
- m_findExtension = new QWidget( parent );
- layout->addWidget( m_findExtension );
- QVBoxLayout *layout1 = new QVBoxLayout( m_findExtension );
- m_searchInAllSheet = new QCheckBox( i18n( "Search entire sheet" ),m_findExtension );
- layout1->addWidget( m_searchInAllSheet );
+ m_findExtension = new TQWidget( tqparent );
+ tqlayout->addWidget( m_findExtension );
+ TQVBoxLayout *tqlayout1 = new TQVBoxLayout( m_findExtension );
+ m_searchInAllSheet = new TQCheckBox( i18n( "Search entire sheet" ),m_findExtension );
+ tqlayout1->addWidget( m_searchInAllSheet );
- QHBoxLayout *comboLayout = new QHBoxLayout( m_findExtension );
- QLabel *label = new QLabel( i18n( "Search in:" ), m_findExtension );
+ TQHBoxLayout *comboLayout = new TQHBoxLayout( m_findExtension );
+ TQLabel *label = new TQLabel( i18n( "Search in:" ), m_findExtension );
comboLayout->addWidget( label );
- m_searchIn = new QComboBox( m_findExtension );
+ m_searchIn = new TQComboBox( m_findExtension );
comboLayout->addWidget( m_searchIn );
- layout1->addLayout( comboLayout );
+ tqlayout1->addLayout( comboLayout );
- QStringList lst;
+ TQStringList lst;
lst << i18n( "Cell Values" );
lst << i18n( "Comments" );
m_searchIn->insertStringList( lst );
- comboLayout = new QHBoxLayout( m_findExtension );
- label = new QLabel( i18n( "Search direction:" ), m_findExtension );
+ comboLayout = new TQHBoxLayout( m_findExtension );
+ label = new TQLabel( i18n( "Search direction:" ), m_findExtension );
comboLayout->addWidget( label );
- m_searchDirection = new QComboBox( m_findExtension );
+ m_searchDirection = new TQComboBox( m_findExtension );
comboLayout->addWidget( m_searchDirection );
- layout1->addLayout( comboLayout );
+ tqlayout1->addLayout( comboLayout );
lst.clear();
lst << i18n( "Across then Down" );
@@ -115,17 +115,17 @@ bool FindOption::searchInAllSheet() const
return m_searchInAllSheet->isChecked();
}
-FindDlg::FindDlg(QWidget *parent, const char *name, long options, const QStringList &findStrings, bool hasSelection )
- : KFindDialog(parent,name,options,findStrings,hasSelection )
+FindDlg::FindDlg(TQWidget *tqparent, const char *name, long options, const TQStringList &findStrings, bool hasSelection )
+ : KFindDialog(tqparent,name,options,findStrings,hasSelection )
{
m_findOptions = new FindOption( findExtension() );
- connect( m_findOptions, SIGNAL( adjustSize() ), SLOT( slotAjustSize() ) );
- setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+ connect( m_findOptions, TQT_SIGNAL( adjustSize() ), TQT_SLOT( slotAjustSize() ) );
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum));
}
FindDlg::~FindDlg()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
void FindDlg::slotAjustSize()
@@ -139,17 +139,17 @@ bool FindDlg::searchInAllSheet() const
}
-SearchDlg::SearchDlg(QWidget *parent, const char *name, long options, const QStringList &findStrings, const QStringList &replaceStrings, bool hasSelection )
- : KReplaceDialog(parent,name,options,findStrings,replaceStrings,hasSelection )
+SearchDlg::SearchDlg(TQWidget *tqparent, const char *name, long options, const TQStringList &findStrings, const TQStringList &replaceStrings, bool hasSelection )
+ : KReplaceDialog(tqparent,name,options,findStrings,replaceStrings,hasSelection )
{
m_findOptions = new FindOption( findExtension() );
- connect( m_findOptions, SIGNAL( adjustSize() ), SLOT( slotAjustSize() ) );
- setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
+ connect( m_findOptions, TQT_SIGNAL( adjustSize() ), TQT_SLOT( slotAjustSize() ) );
+ tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum));
}
SearchDlg::~SearchDlg()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
void SearchDlg::slotAjustSize()
diff --git a/kspread/dialogs/kspread_dlg_find.h b/kspread/dialogs/kspread_dlg_find.h
index ecf5bf57..d0f35f75 100644
--- a/kspread/dialogs/kspread_dlg_find.h
+++ b/kspread/dialogs/kspread_dlg_find.h
@@ -22,21 +22,22 @@
#include <kfinddialog.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kreplacedialog.h>
-class QCheckBox;
-class QPushButton;
-class QComboBox;
+class TQCheckBox;
+class TQPushButton;
+class TQComboBox;
namespace KSpread
{
-class FindOption : public QObject
+class FindOption : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- FindOption( QWidget *parent);
+ FindOption( TQWidget *tqparent);
bool searchInAllSheet() const;
enum searchTypeValue { Value, Note};
@@ -52,19 +53,20 @@ signals:
void adjustSize();
private:
- QPushButton *m_moreOptions;
- QCheckBox *m_searchInAllSheet;
- QWidget *m_findExtension;
- QComboBox *m_searchIn;
- QComboBox *m_searchDirection;
+ TQPushButton *m_moreOptions;
+ TQCheckBox *m_searchInAllSheet;
+ TQWidget *m_findExtension;
+ TQComboBox *m_searchIn;
+ TQComboBox *m_searchDirection;
};
class FindDlg : public KFindDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- FindDlg( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), bool hasSelection = false );
+ FindDlg( TQWidget *tqparent = 0, const char *name = 0, long options = 0, const TQStringList &findStrings = TQStringList(), bool hasSelection = false );
~FindDlg();
bool searchInAllSheet() const;
FindOption::searchTypeValue searchType() const { return m_findOptions->searchType(); }
@@ -79,9 +81,10 @@ class FindDlg : public KFindDialog
class SearchDlg : public KReplaceDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- SearchDlg( QWidget *parent = 0, const char *name = 0, long options = 0, const QStringList &findStrings = QStringList(), const QStringList &replaceStrings = QStringList(), bool hasSelection = false );
+ SearchDlg( TQWidget *tqparent = 0, const char *name = 0, long options = 0, const TQStringList &findStrings = TQStringList(), const TQStringList &replaceStrings = TQStringList(), bool hasSelection = false );
~SearchDlg();
bool searchInAllSheet() const;
FindOption::searchTypeValue searchType() const { return m_findOptions->searchType(); }
diff --git a/kspread/dialogs/kspread_dlg_format.cc b/kspread/dialogs/kspread_dlg_format.cc
index 98c6d02e..6374c102 100644
--- a/kspread/dialogs/kspread_dlg_format.cc
+++ b/kspread/dialogs/kspread_dlg_format.cc
@@ -23,11 +23,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kbuttonbox.h>
#include <kmessagebox.h>
@@ -54,22 +54,22 @@ FormatDialog::FormatDialog( View* view, const char* name )
m_cells[ i ] = 0;
m_view = view;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *vbox = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *vbox = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *toplabel = new QLabel( i18n("Select the sheet style to apply:"), page );
- m_combo = new QComboBox( page );
- m_label = new QLabel( page );
+ TQLabel *toplabel = new TQLabel( i18n("Select the sheet style to apply:"), page );
+ m_combo = new TQComboBox( page );
+ m_label = new TQLabel( page );
vbox->addWidget( toplabel );
vbox->addWidget( m_combo );
vbox->addWidget( m_label );
- QStringList lst = Factory::global()->dirs()->findAllResources( "sheet-styles", "*.ksts", TRUE );
+ TQStringList lst = Factory::global()->dirs()->findAllResources( "sheet-styles", "*.ksts", TRUE );
- QStringList::Iterator it = lst.begin();
+ TQStringList::Iterator it = lst.begin();
for( ; it != lst.end(); ++it )
{
KSimpleConfig cfg( *it, TRUE );
@@ -88,8 +88,8 @@ FormatDialog::FormatDialog( View* view, const char* name )
slotActivated( 0 );
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( m_combo, SIGNAL( activated( int ) ), this, SLOT( slotActivated( int ) ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( m_combo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivated( int ) ) );
}
FormatDialog::~FormatDialog()
@@ -102,11 +102,11 @@ void FormatDialog::slotActivated( int index )
{
enableButtonOK(true);
- QString img = Factory::global()->dirs()->findResource( "sheet-styles", m_entries[ index ].image );
+ TQString img = Factory::global()->dirs()->findResource( "sheet-styles", m_entries[ index ].image );
if ( img.isEmpty() )
{
- QString str( i18n( "Could not find image %1." ) );
- str = str.arg( m_entries[ index ].image );
+ TQString str( i18n( "Could not find image %1." ) );
+ str = str.tqarg( m_entries[ index ].image );
KMessageBox::error( this, str );
enableButtonOK(false);
@@ -114,11 +114,11 @@ void FormatDialog::slotActivated( int index )
return;
}
- QPixmap pix( img );
+ TQPixmap pix( img );
if ( pix.isNull() )
{
- QString str( i18n( "Could not load image %1." ) );
- str = str.arg( img );
+ TQString str( i18n( "Could not load image %1." ) );
+ str = str.tqarg( img );
KMessageBox::error( this,str );
enableButtonOK(false);
@@ -134,34 +134,34 @@ void FormatDialog::slotOk()
m_view->doc()->emitBeginOperation( false );
- QString xml = Factory::global()->dirs()->findResource( "sheet-styles", m_entries[ m_combo->currentItem() ].xml );
+ TQString xml = Factory::global()->dirs()->findResource( "sheet-styles", m_entries[ m_combo->currentItem() ].xml );
if ( xml.isEmpty() )
{
- QString str( i18n( "Could not find sheet-style XML file '%1'." ) );
- str = str.arg( m_entries[ m_combo->currentItem() ].xml );
+ TQString str( i18n( "Could not find sheet-style XML file '%1'." ) );
+ str = str.tqarg( m_entries[ m_combo->currentItem() ].xml );
KMessageBox::error( this, str );
return;
}
- QFile file( xml );
+ TQFile file( xml );
file.open( IO_ReadOnly );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &file );
file.close();
if ( !parseXML( doc ) )
{
- QString str( i18n( "Parsing error in sheet-style XML file %1." ) );
- str = str.arg( m_entries[ m_combo->currentItem() ].xml );
+ TQString str( i18n( "Parsing error in sheet-style XML file %1." ) );
+ str = str.tqarg( m_entries[ m_combo->currentItem() ].xml );
KMessageBox::error( this, str );
return;
}
- QRect r = m_view->selectionInfo()->selection();
+ TQRect r = m_view->selectionInfo()->selection();
if ( !m_view->doc()->undoLocked() )
{
- QString title=i18n("Change Format");
+ TQString title=i18n("Change Format");
UndoCellFormat *undo = new UndoCellFormat( m_view->doc(), m_view->activeSheet(), r, title);
m_view->doc()->addCommand( undo );
}
@@ -317,7 +317,7 @@ void FormatDialog::slotOk()
accept();
}
-bool FormatDialog::parseXML( const QDomDocument& doc )
+bool FormatDialog::parseXML( const TQDomDocument& doc )
{
for( int i = 0; i < 16; ++i )
{
@@ -325,7 +325,7 @@ bool FormatDialog::parseXML( const QDomDocument& doc )
m_cells[ i ] = 0;
}
- QDomElement e = doc.documentElement().firstChild().toElement();
+ TQDomElement e = doc.documentElement().firstChild().toElement();
for( ; !e.isNull(); e = e.nextSibling().toElement() )
{
if ( e.tagName() == "cell" )
diff --git a/kspread/dialogs/kspread_dlg_format.h b/kspread/dialogs/kspread_dlg_format.h
index f7c0d23b..a482c13e 100644
--- a/kspread/dialogs/kspread_dlg_format.h
+++ b/kspread/dialogs/kspread_dlg_format.h
@@ -27,15 +27,15 @@
#define KSPREAD_DLG_FORMAT
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qcolor.h>
-#include <qpen.h>
-#include <qfont.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqcolor.h>
+#include <tqpen.h>
+#include <tqfont.h>
-class QComboBox;
-class QLabel;
-class QDomDocument;
+class TQComboBox;
+class TQLabel;
+class TQDomDocument;
namespace KSpread
{
@@ -49,6 +49,7 @@ class View;
class FormatDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
FormatDialog( View* view, const char* name = 0 );
~FormatDialog();
@@ -58,20 +59,20 @@ private slots:
void slotOk();
private:
- bool parseXML( const QDomDocument& doc );
+ bool parseXML( const TQDomDocument& doc );
- QComboBox* m_combo;
- QLabel* m_label;
+ TQComboBox* m_combo;
+ TQLabel* m_label;
View* m_view;
struct Entry
{
- QString xml;
- QString image;
- QString config;
- QString name;
+ TQString xml;
+ TQString image;
+ TQString config;
+ TQString name;
};
- QValueList<Entry> m_entries;
+ TQValueList<Entry> m_entries;
Format* m_cells[ 16 ];
};
diff --git a/kspread/dialogs/kspread_dlg_formula.cc b/kspread/dialogs/kspread_dlg_formula.cc
index 54100b8c..0981a4e7 100644
--- a/kspread/dialogs/kspread_dlg_formula.cc
+++ b/kspread/dialogs/kspread_dlg_formula.cc
@@ -24,8 +24,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qtextbrowser.h>
-#include <qtabwidget.h>
+#include <tqtextbrowser.h>
+#include <tqtabwidget.h>
#include "kspread_dlg_formula.h"
#include "kspread_canvas.h"
@@ -43,22 +43,22 @@
#include <kdebug.h>
#include <kbuttonbox.h>
#include <knumvalidator.h>
-#include <qcombobox.h>
-#include <qevent.h>
-#include <qlistbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqcombobox.h>
+#include <tqevent.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
-#include <qlayout.h>
+#include <tqlayout.h>
using namespace KSpread;
-FormulaDialog::FormulaDialog( View* parent, const char* name,const QString& formulaName)
- : KDialogBase( parent, name,false,i18n("Function"), Ok|Cancel )
+FormulaDialog::FormulaDialog( View* tqparent, const char* name,const TQString& formulaName)
+ : KDialogBase( tqparent, name,false,i18n("Function"), Ok|Cancel )
{
- setWFlags( Qt::WDestructiveClose );
+ setWFlags( TQt::WDestructiveClose );
- m_pView = parent;
+ m_pView = tqparent;
m_focus = 0;
m_desc = 0;
@@ -80,80 +80,80 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const QString& form
Q_ASSERT( m_pView->canvasWidget()->editor() );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QGridLayout *grid1 = new QGridLayout(page,11,2,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid1 = new TQGridLayout(page,11,2,KDialog::marginHint(), KDialog::spacingHint());
searchFunct = new KLineEdit(page);
- QSizePolicy sp3( QSizePolicy::Preferred, QSizePolicy::Fixed );
- searchFunct->setSizePolicy( sp3 );
+ TQSizePolicy sp3( TQSizePolicy::Preferred, TQSizePolicy::Fixed );
+ searchFunct->tqsetSizePolicy( sp3 );
grid1->addWidget( searchFunct, 0, 0 );
- typeFunction = new QComboBox(page);
- QStringList cats = FunctionRepository::self()->groups();
+ typeFunction = new TQComboBox(page);
+ TQStringList cats = FunctionRepository::self()->groups();
cats.prepend( i18n("All") );
typeFunction->insertStringList( cats );
grid1->addWidget( typeFunction, 1, 0 );
- functions = new QListBox(page);
- QSizePolicy sp1( QSizePolicy::Preferred, QSizePolicy::Expanding );
- functions->setSizePolicy( sp1 );
+ functions = new TQListBox(page);
+ TQSizePolicy sp1( TQSizePolicy::Preferred, TQSizePolicy::Expanding );
+ functions->tqsetSizePolicy( sp1 );
grid1->addWidget( functions, 2, 0 );
- selectFunction = new QPushButton( page );
- QToolTip::add(selectFunction, i18n("Insert function") );
+ selectFunction = new TQPushButton( page );
+ TQToolTip::add(selectFunction, i18n("Insert function") );
selectFunction->setPixmap( BarIcon( "down", KIcon::SizeSmall ) );
grid1->addWidget( selectFunction, 3, 0 );
- result = new QLineEdit( page );
+ result = new TQLineEdit( page );
grid1->addMultiCellWidget( result, 4, 4, 0, 1 );
- m_tabwidget = new QTabWidget( page );
- QSizePolicy sp2( QSizePolicy::Expanding, QSizePolicy::Expanding );
- m_tabwidget->setSizePolicy( sp2 );
+ m_tabwidget = new TQTabWidget( page );
+ TQSizePolicy sp2( TQSizePolicy::Expanding, TQSizePolicy::Expanding );
+ m_tabwidget->tqsetSizePolicy( sp2 );
grid1->addMultiCellWidget( m_tabwidget, 0, 2, 1, 1 );
- m_browser = new QTextBrowser( m_tabwidget );
+ m_browser = new TQTextBrowser( m_tabwidget );
m_browser->setMinimumWidth( 300 );
m_tabwidget->addTab( m_browser, i18n("&Help") );
int index = m_tabwidget->currentPageIndex();
- m_input = new QWidget( m_tabwidget );
- QVBoxLayout *grid2 = new QVBoxLayout( m_input, KDialog::marginHint(), KDialog::spacingHint() );
+ m_input = new TQWidget( m_tabwidget );
+ TQVBoxLayout *grid2 = new TQVBoxLayout( m_input, KDialog::marginHint(), KDialog::spacingHint() );
- // grid2->setResizeMode (QLayout::Minimum);
+ // grid2->setResizeMode (TQLayout::Minimum);
- label1 = new QLabel(m_input);
+ label1 = new TQLabel(m_input);
grid2->addWidget( label1 );
- firstElement=new QLineEdit(m_input);
+ firstElement=new TQLineEdit(m_input);
grid2->addWidget( firstElement );
- label2=new QLabel(m_input);
+ label2=new TQLabel(m_input);
grid2->addWidget( label2 );
- secondElement=new QLineEdit(m_input);
+ secondElement=new TQLineEdit(m_input);
grid2->addWidget( secondElement );
- label3=new QLabel(m_input);
+ label3=new TQLabel(m_input);
grid2->addWidget( label3 );
- thirdElement=new QLineEdit(m_input);
+ thirdElement=new TQLineEdit(m_input);
grid2->addWidget( thirdElement );
- label4=new QLabel(m_input);
+ label4=new TQLabel(m_input);
grid2->addWidget( label4 );
- fourElement=new QLineEdit(m_input);
+ fourElement=new TQLineEdit(m_input);
grid2->addWidget( fourElement );
- label5=new QLabel(m_input);
+ label5=new TQLabel(m_input);
grid2->addWidget( label5 );
- fiveElement=new QLineEdit(m_input);
+ fiveElement=new TQLineEdit(m_input);
grid2->addWidget( fiveElement );
grid2->addStretch( 10 );
@@ -165,43 +165,43 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const QString& form
refresh_result = true;
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( slotClose() ) );
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( typeFunction, SIGNAL( activated(const QString &) ),
- this, SLOT( slotActivated(const QString &) ) );
- connect( functions, SIGNAL( highlighted(const QString &) ),
- this, SLOT( slotSelected(const QString &) ) );
- connect( functions, SIGNAL( selected(const QString &) ),
- this, SLOT( slotSelected(const QString &) ) );
- connect( functions, SIGNAL( doubleClicked(QListBoxItem * ) ),
- this ,SLOT( slotDoubleClicked(QListBoxItem *) ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( slotClose() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( typeFunction, TQT_SIGNAL( activated(const TQString &) ),
+ this, TQT_SLOT( slotActivated(const TQString &) ) );
+ connect( functions, TQT_SIGNAL( highlighted(const TQString &) ),
+ this, TQT_SLOT( slotSelected(const TQString &) ) );
+ connect( functions, TQT_SIGNAL( selected(const TQString &) ),
+ this, TQT_SLOT( slotSelected(const TQString &) ) );
+ connect( functions, TQT_SIGNAL( doubleClicked(TQListBoxItem * ) ),
+ this ,TQT_SLOT( slotDoubleClicked(TQListBoxItem *) ) );
slotActivated(i18n("All"));
- connect( selectFunction, SIGNAL(clicked()),
- this,SLOT(slotSelectButton()));
+ connect( selectFunction, TQT_SIGNAL(clicked()),
+ this,TQT_SLOT(slotSelectButton()));
- connect( firstElement,SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotChangeText(const QString &)));
- connect( secondElement,SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotChangeText(const QString &)));
- connect( thirdElement,SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotChangeText(const QString &)));
- connect( fourElement,SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotChangeText(const QString &)));
- connect( fiveElement,SIGNAL(textChanged ( const QString & )),
- this,SLOT(slotChangeText(const QString &)));
+ connect( firstElement,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotChangeText(const TQString &)));
+ connect( secondElement,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotChangeText(const TQString &)));
+ connect( thirdElement,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotChangeText(const TQString &)));
+ connect( fourElement,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotChangeText(const TQString &)));
+ connect( fiveElement,TQT_SIGNAL(textChanged ( const TQString & )),
+ this,TQT_SLOT(slotChangeText(const TQString &)));
- connect( m_pView->choice(), SIGNAL(changed(const Region&)),
- this, SLOT(slotSelectionChanged()));
+ connect( m_pView->choice(), TQT_SIGNAL(changed(const Region&)),
+ this, TQT_SLOT(slotSelectionChanged()));
- connect( m_browser, SIGNAL( linkClicked( const QString& ) ),
- this, SLOT( slotShowFunction( const QString& ) ) );
+ connect( m_browser, TQT_SIGNAL( linkClicked( const TQString& ) ),
+ this, TQT_SLOT( slotShowFunction( const TQString& ) ) );
// Save the name of the active sheet.
m_sheetName = m_pView->activeSheet()->sheetName();
// Save the cells current text.
- QString tmp_oldText = m_pView->canvasWidget()->editor()->text();
+ TQString tmp_oldText = m_pView->canvasWidget()->editor()->text();
// Position of the cell.
m_column = m_pView->canvasWidget()->markerColumn();
m_row = m_pView->canvasWidget()->markerRow();
@@ -219,13 +219,13 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const QString& form
// Allow the user to select cells on the spreadsheet.
m_pView->canvasWidget()->startChoose();
- qApp->installEventFilter( this );
+ tqApp->installEventFilter( this );
// Was a function name passed along with the constructor ? Then activate it.
if( !formulaName.isEmpty() )
{
- functions->setCurrentItem( functions->index( functions->findItem( formulaName ) ) );
- slotDoubleClicked( functions->findItem( formulaName ) );
+ functions->setCurrentItem( functions->index( functions->tqfindItem( formulaName ) ) );
+ slotDoubleClicked( functions->tqfindItem( formulaName ) );
}
else
{
@@ -240,10 +240,10 @@ FormulaDialog::FormulaDialog( View* parent, const char* name,const QString& form
if( functions->currentItem() == -1 )
selectFunction->setEnabled( false );
- connect( searchFunct, SIGNAL( textChanged( const QString & ) ),
- this, SLOT( slotSearchText(const QString &) ) );
- connect( searchFunct, SIGNAL( returnPressed() ),
- this, SLOT( slotPressReturn() ) );
+ connect( searchFunct, TQT_SIGNAL( textChanged( const TQString & ) ),
+ this, TQT_SLOT( slotSearchText(const TQString &) ) );
+ connect( searchFunct, TQT_SIGNAL( returnPressed() ),
+ this, TQT_SLOT( slotPressReturn() ) );
}
FormulaDialog::~FormulaDialog()
@@ -262,24 +262,24 @@ void FormulaDialog::slotPressReturn()
*/
}
-void FormulaDialog::slotSearchText(const QString &_text)
+void FormulaDialog::slotSearchText(const TQString &_text)
{
- QString result = listFunct.makeCompletion( _text.upper() );
+ TQString result = listFunct.makeCompletion( _text.upper() );
if( !result.isNull() )
- functions->setCurrentItem( functions->index( functions->findItem( result ) ) );
+ functions->setCurrentItem( functions->index( functions->tqfindItem( result ) ) );
}
-bool FormulaDialog::eventFilter( QObject* obj, QEvent* ev )
+bool FormulaDialog::eventFilter( TQObject* obj, TQEvent* ev )
{
- if ( obj == firstElement && ev->type() == QEvent::FocusIn )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(firstElement) && ev->type() == TQEvent::FocusIn )
m_focus = firstElement;
- else if ( obj == secondElement && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(secondElement) && ev->type() == TQEvent::FocusIn )
m_focus = secondElement;
- else if ( obj == thirdElement && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(thirdElement) && ev->type() == TQEvent::FocusIn )
m_focus = thirdElement;
- else if ( obj == fourElement && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(fourElement) && ev->type() == TQEvent::FocusIn )
m_focus = fourElement;
- else if ( obj == fiveElement && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(fiveElement) && ev->type() == TQEvent::FocusIn )
m_focus = fiveElement;
else
return FALSE;
@@ -304,14 +304,14 @@ void FormulaDialog::slotOk()
}
// Revert the marker to its original position
- m_pView->selectionInfo()->initialize( QPoint( m_column, m_row ) );
+ m_pView->selectionInfo()->initialize( TQPoint( m_column, m_row ) );
// If there is still an editor then set the text.
// Usually the editor is always in place.
if( m_pView->canvasWidget()->editor() != 0 )
{
Q_ASSERT( m_pView->canvasWidget()->editor() );
- QString tmp = result->text();
+ TQString tmp = result->text();
if( tmp.at(0) != '=')
tmp = "=" + tmp;
int pos = m_pView->canvasWidget()->editor()->cursorPosition()+ tmp.length();
@@ -342,7 +342,7 @@ void FormulaDialog::slotClose()
// Revert the marker to its original position
- m_pView->selectionInfo()->initialize( QPoint( m_column, m_row ) );
+ m_pView->selectionInfo()->initialize( TQPoint( m_column, m_row ) );
// If there is still an editor then reset the text.
// Usually the editor is always in place.
@@ -364,11 +364,11 @@ void FormulaDialog::slotSelectButton()
{
if( functions->currentItem() != -1 )
{
- slotDoubleClicked(functions->findItem(functions->text(functions->currentItem())));
+ slotDoubleClicked(functions->tqfindItem(functions->text(functions->currentItem())));
}
}
-void FormulaDialog::slotChangeText( const QString& )
+void FormulaDialog::slotChangeText( const TQString& )
{
// Test the lock
if( !refresh_result )
@@ -377,19 +377,19 @@ void FormulaDialog::slotChangeText( const QString& )
if ( m_focus == 0 )
return;
- QString tmp = m_leftText+m_funcName+"(";
+ TQString tmp = m_leftText+m_funcName+"(";
tmp += createFormula();
tmp = tmp+ ")" + m_rightText;
result->setText( tmp );
}
-QString FormulaDialog::createFormula()
+TQString FormulaDialog::createFormula()
{
- QString tmp( "" );
+ TQString tmp( "" );
if ( !m_desc )
- return QString::null;
+ return TQString();
bool first = TRUE;
@@ -437,15 +437,15 @@ QString FormulaDialog::createFormula()
return(tmp);
}
-QString FormulaDialog::createParameter( const QString& _text, int param )
+TQString FormulaDialog::createParameter( const TQString& _text, int param )
{
if ( _text.isEmpty() )
- return QString( "" );
+ return TQString( "" );
if ( !m_desc )
- return QString( "" );
+ return TQString( "" );
- QString text;
+ TQString text;
ParameterType elementType = m_desc->param( param ).type();
@@ -470,13 +470,13 @@ QString FormulaDialog::createParameter( const QString& _text, int param )
text = "\\"; // changed: was "\""
// Escape quotes
- QString tmp = _text;
+ TQString tmp = _text;
int pos;
int start = 1;
- while( ( pos = tmp.find( '"', start ) ) != -1 )
+ while( ( pos = tmp.tqfind( '"', start ) ) != -1 )
{
if (tmp[pos - 1] != '\\')
- tmp.replace( pos, 1, "\\\"" );
+ tmp.tqreplace( pos, 1, "\\\"" );
else
start = pos + 1;
}
@@ -494,13 +494,13 @@ QString FormulaDialog::createParameter( const QString& _text, int param )
text = "\"";
// Escape quotes
- QString tmp = _text;
+ TQString tmp = _text;
int pos;
int start = 1;
- while( ( pos = tmp.find( '"', start ) ) != -1 )
+ while( ( pos = tmp.tqfind( '"', start ) ) != -1 )
{
if (tmp[pos - 1] != '\\')
- tmp.replace( pos, 1, "\\\"" );
+ tmp.tqreplace( pos, 1, "\\\"" );
else
start = pos + 1;
}
@@ -525,7 +525,7 @@ QString FormulaDialog::createParameter( const QString& _text, int param )
return text;
}
-static void showEntry( QLineEdit* edit, QLabel* label,
+static void showEntry( TQLineEdit* edit, TQLabel* label,
FunctionDescription* desc, int param )
{
edit->show();
@@ -547,14 +547,14 @@ static void showEntry( QLineEdit* edit, QLabel* label,
edit->setText( "0" );
break;
case KSpread_Int:
- edit->setValidator(new QIntValidator (edit));
+ edit->setValidator(new TQIntValidator (TQT_TQOBJECT(edit)));
edit->setText( "0" );
break;
}
}
-void FormulaDialog::slotDoubleClicked( QListBoxItem* item )
+void FormulaDialog::slotDoubleClicked( TQListBoxItem* item )
{
if ( !item )
return;
@@ -568,13 +568,13 @@ void FormulaDialog::slotDoubleClicked( QListBoxItem* item )
m_focus = 0;
int old_length = result->text().length();
- // Dont change order of these function calls due to a bug in Qt 2.2
- m_browser->setText( m_desc->toQML() );
+ // Dont change order of these function calls due to a bug in TQt 2.2
+ m_browser->setText( m_desc->toTQML() );
m_tabwidget->setTabEnabled( m_input, TRUE );
m_tabwidget->setCurrentPage( 1 );
//
- // Show as many QLineEdits as needed.
+ // Show as many TQLineEdits as needed.
//
if( m_desc->params() > 0 )
{
@@ -654,7 +654,7 @@ void FormulaDialog::slotDoubleClicked( QListBoxItem* item )
result->setText("=" + result->text());
//
- // Put focus somewhere is there are no QLineEdits visible
+ // Put focus somewhere is there are no TQLineEdits visible
//
if( m_desc->params() == 0 )
{
@@ -667,7 +667,7 @@ void FormulaDialog::slotDoubleClicked( QListBoxItem* item )
slotChangeText( "" );
}
-void FormulaDialog::slotSelected( const QString& function )
+void FormulaDialog::slotSelected( const TQString& function )
{
FunctionDescription* desc =
FunctionRepository::self()->functionInfo (function);
@@ -687,7 +687,7 @@ void FormulaDialog::slotSelected( const QString& function )
m_desc = desc;
// Set the help text
- m_browser->setText( m_desc->toQML() );
+ m_browser->setText( m_desc->toTQML() );
m_browser->setContentsPos( 0, 0 );
m_focus=0;
@@ -700,20 +700,20 @@ void FormulaDialog::slotSelected( const QString& function )
}
// from hyperlink in the "Related Function"
-void FormulaDialog::slotShowFunction( const QString& function )
+void FormulaDialog::slotShowFunction( const TQString& function )
{
FunctionDescription* desc =
FunctionRepository::self()->functionInfo( function );
if ( !desc ) return;
// select the category
- QString category = desc->group();
+ TQString category = desc->group();
typeFunction->setCurrentText( category );
slotActivated( category );
// select the function
- QListBoxItem* item = functions->findItem( function,
- Qt::ExactMatch | Qt::CaseSensitive );
+ TQListBoxItem* item = functions->tqfindItem( function,
+ TQt::ExactMatch | TQt::CaseSensitive );
if( item ) functions->setCurrentItem( item );
slotSelected( function );
@@ -726,14 +726,14 @@ void FormulaDialog::slotSelectionChanged()
if (m_pView->choice()->isValid())
{
- QString area = m_pView->choice()->name();
+ TQString area = m_pView->choice()->name();
m_focus->setText( area );
}
}
-void FormulaDialog::slotActivated( const QString& category )
+void FormulaDialog::slotActivated( const TQString& category )
{
- QStringList lst;
+ TQStringList lst;
if ( category == i18n("All") )
lst = FunctionRepository::self()->functionNames();
else
@@ -744,8 +744,8 @@ void FormulaDialog::slotActivated( const QString& category )
functions->clear();
functions->insertStringList( lst );
- QStringList upperList;
- for ( QStringList::Iterator it = lst.begin(); it != lst.end();++it )
+ TQStringList upperList;
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end();++it )
upperList.append((*it).upper());
listFunct.setItems( upperList );
@@ -755,7 +755,7 @@ void FormulaDialog::slotActivated( const QString& category )
slotSelected( functions->text(0) );
}
-void FormulaDialog::closeEvent ( QCloseEvent * e )
+void FormulaDialog::closeEvent ( TQCloseEvent * e )
{
e->accept();
}
diff --git a/kspread/dialogs/kspread_dlg_formula.h b/kspread/dialogs/kspread_dlg_formula.h
index d4e224e7..62ffef19 100644
--- a/kspread/dialogs/kspread_dlg_formula.h
+++ b/kspread/dialogs/kspread_dlg_formula.h
@@ -27,18 +27,18 @@
#ifndef __kspread_dlg_formula__
#define __kspread_dlg_formula__
-#include <qframe.h>
+#include <tqframe.h>
#include <kcompletion.h>
#include <kdialogbase.h>
-class QComboBox;
-class QLabel;
-class QLineEdit;
-class QListBox;
-class QPushButton;
-class QTabWidget;
-class QTextBrowser;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
+class TQListBox;
+class TQPushButton;
+class TQTabWidget;
+class TQTextBrowser;
class KLineEdit;
namespace KSpread
@@ -50,20 +50,21 @@ class View;
class FormulaDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- FormulaDialog( View* parent, const char* name,const QString& formulaName=0);
+ FormulaDialog( View* tqparent, const char* name,const TQString& formulaName=0);
~FormulaDialog();
private:
/**
* Turns the @p text into a parameter that koscript can understand. The type
* of this parameter is extracted by looking at parameter number @p param in @ref #m_desc.
*/
- QString createParameter( const QString& _text, int param );
+ TQString createParameter( const TQString& _text, int param );
/**
* Reads the text out of @ref #firstElement and friends and creates a parameter
* list for the function.
*/
- QString createFormula();
+ TQString createFormula();
private slots:
/**
@@ -78,27 +79,27 @@ private slots:
* Called if a function name was selected but not double clicked.
* This will just show the help page for the function.
*/
- void slotSelected( const QString& function );
+ void slotSelected( const TQString& function );
/**
* Called if the user clicked on one of the "related function"
* This will switch the active function and show help page
* of the function as well.
*/
- void slotShowFunction( const QString& function );
+ void slotShowFunction( const TQString& function );
/**
* Called if the user double clicked on some method name.
* That will switch into editing mode, allowing the user
* to enter the parameters for the function.
*/
- void slotDoubleClicked( QListBoxItem* item );
+ void slotDoubleClicked( TQListBoxItem* item );
/**
* Called if a category of methods has been selected.
*/
- void slotActivated(const QString& category );
+ void slotActivated(const TQString& category );
/**
* Called if the text of @ref #firstElement, @ref #secondElement etc. changes.
*/
- void slotChangeText(const QString& text );
+ void slotChangeText(const TQString& text );
/**
* Connected to @ref View to get notified if the selection in the
* sheet changes.
@@ -112,7 +113,7 @@ private slots:
/**
* Called if the user changes some character in @ref #searchFunct.
*/
- void slotSearchText(const QString& text );
+ void slotSearchText(const TQString& text );
/**
* Called if the user pressed return in @ref #searchFunct.
*/
@@ -122,50 +123,50 @@ public:
/**
* Find out which widget got focus.
*/
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
protected:
- virtual void closeEvent ( QCloseEvent * );
+ virtual void closeEvent ( TQCloseEvent * );
private:
View* m_pView;
- QTabWidget* m_tabwidget;
- QTextBrowser* m_browser;
- QWidget* m_input;
+ TQTabWidget* m_tabwidget;
+ TQTextBrowser* m_browser;
+ TQWidget* m_input;
- QPushButton *selectFunction;
- QComboBox *typeFunction;
- QListBox *functions;
- QLineEdit *result;
+ TQPushButton *selectFunction;
+ TQComboBox *typeFunction;
+ TQListBox *functions;
+ TQLineEdit *result;
KLineEdit *searchFunct;
KCompletion listFunct;
- QLabel* label1;
- QLabel* label2;
- QLabel* label3;
- QLabel* label4;
- QLabel* label5;
- QLineEdit *firstElement;
- QLineEdit *secondElement;
- QLineEdit *thirdElement;
- QLineEdit *fourElement;
- QLineEdit *fiveElement;
+ TQLabel* label1;
+ TQLabel* label2;
+ TQLabel* label3;
+ TQLabel* label4;
+ TQLabel* label5;
+ TQLineEdit *firstElement;
+ TQLineEdit *secondElement;
+ TQLineEdit *thirdElement;
+ TQLineEdit *fourElement;
+ TQLineEdit *fiveElement;
/**
* Tells which of the lineedits has the logical focus currently.
* It may happen that a lineedit does not have qt focus but
* logical focus but not the other way round.
*/
- QLineEdit* m_focus;
+ TQLineEdit* m_focus;
int m_column;
int m_row;
- QString m_oldText;
+ TQString m_oldText;
- QString m_funcName;
- QString m_sheetName;
+ TQString m_funcName;
+ TQString m_sheetName;
- QString m_rightText;
- QString m_leftText;
+ TQString m_rightText;
+ TQString m_leftText;
/**
* A lock for @ref #slotChangeText.
*/
diff --git a/kspread/dialogs/kspread_dlg_goalseek.cc b/kspread/dialogs/kspread_dlg_goalseek.cc
index a87ad3ef..beae8437 100644
--- a/kspread/dialogs/kspread_dlg_goalseek.cc
+++ b/kspread/dialogs/kspread_dlg_goalseek.cc
@@ -42,22 +42,22 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qtooltip.h>
-#include <qvariant.h>
-#include <qwhatsthis.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqvariant.h>
+#include <tqwhatsthis.h>
#include <math.h>
using namespace KSpread;
-GoalSeekDialog::GoalSeekDialog( View * parent, QPoint const & marker,
+GoalSeekDialog::GoalSeekDialog( View * tqparent, TQPoint const & marker,
const char * name, bool, WFlags fl )
- : KDialog( parent, name, false, fl ),
- m_pView( parent ),
+ : KDialog( tqparent, name, false, fl ),
+ m_pView( tqparent ),
m_maxIter( 1000 ),
m_restored( true ),
m_focus(0),
@@ -65,7 +65,7 @@ GoalSeekDialog::GoalSeekDialog( View * parent, QPoint const & marker,
m_marker( m_pView->selectionInfo()->marker() ),
m_selection( m_pView->selectionInfo()->selection() )
{
- setWFlags( Qt::WDestructiveClose );
+ setWFlags( TQt::WDestructiveClose );
if ( !name )
setName( "GoalSeekDialog" );
@@ -74,41 +74,41 @@ GoalSeekDialog::GoalSeekDialog( View * parent, QPoint const & marker,
setCaption( i18n( "Goal Seek" ) );
setSizeGripEnabled( true );
- GoalSeekDialogLayout = new QGridLayout( this, 1, 1, 11, 6, "GoalSeekDialogLayout");
+ GoalSeekDialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "GoalSeekDialogLayout");
- m_startFrame = new QFrame( this, "m_startFrame" );
- m_startFrame->setFrameShape( QFrame::StyledPanel );
- m_startFrame->setFrameShadow( QFrame::Raised );
- m_startFrameLayout = new QGridLayout( m_startFrame, 1, 1, 11, 6, "m_startFrameLayout");
+ m_startFrame = new TQFrame( this, "m_startFrame" );
+ m_startFrame->setFrameShape( TQFrame::StyledPanel );
+ m_startFrame->setFrameShadow( TQFrame::Raised );
+ m_startFrameLayout = new TQGridLayout( m_startFrame, 1, 1, 11, 6, "m_startFrameLayout");
- QLabel * TextLabel4 = new QLabel( m_startFrame, "TextLabel4" );
+ TQLabel * TextLabel4 = new TQLabel( m_startFrame, "TextLabel4" );
TextLabel4->setText( i18n( "To value:" ) );
m_startFrameLayout->addWidget( TextLabel4, 1, 0 );
- m_targetValueEdit = new QLineEdit( m_startFrame, "m_targetValueEdit" );
+ m_targetValueEdit = new TQLineEdit( m_startFrame, "m_targetValueEdit" );
m_startFrameLayout->addWidget( m_targetValueEdit, 1, 1 );
- m_targetEdit = new QLineEdit( m_startFrame, "m_targetEdit" );
+ m_targetEdit = new TQLineEdit( m_startFrame, "m_targetEdit" );
m_startFrameLayout->addWidget( m_targetEdit, 0, 1 );
m_targetEdit->setText( Cell::name( marker.x(), marker.y() ) );
- m_sourceEdit = new QLineEdit( m_startFrame, "m_sourceEdit" );
+ m_sourceEdit = new TQLineEdit( m_startFrame, "m_sourceEdit" );
m_startFrameLayout->addWidget( m_sourceEdit, 2, 1 );
- QLabel * TextLabel5 = new QLabel( m_startFrame, "TextLabel5" );
+ TQLabel * TextLabel5 = new TQLabel( m_startFrame, "TextLabel5" );
TextLabel5->setText( i18n( "By changing cell:" ) );
m_startFrameLayout->addWidget( TextLabel5, 2, 0 );
- QLabel * TextLabel3 = new QLabel( m_startFrame, "TextLabel3" );
+ TQLabel * TextLabel3 = new TQLabel( m_startFrame, "TextLabel3" );
TextLabel3->setText( i18n( "Set cell:" ) );
m_startFrameLayout->addWidget( TextLabel3, 0, 0 );
GoalSeekDialogLayout->addWidget( m_startFrame, 0, 0 );
- QVBoxLayout * Layout5 = new QVBoxLayout( 0, 0, 6, "Layout5");
+ TQVBoxLayout * Layout5 = new TQVBoxLayout( 0, 0, 6, "Layout5");
- m_buttonOk = new QPushButton( this, "m_buttonOk" );
+ m_buttonOk = new TQPushButton( this, "m_buttonOk" );
m_buttonOk->setText( i18n( "&Start" ) );
m_buttonOk->setAccel( 276824143 );
m_buttonOk->setAutoDefault( TRUE );
@@ -119,40 +119,40 @@ GoalSeekDialog::GoalSeekDialog( View * parent, QPoint const & marker,
m_buttonCancel->setAccel( 276824131 );
m_buttonCancel->setAutoDefault( TRUE );
Layout5->addWidget( m_buttonCancel );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
Layout5->addItem( spacer );
GoalSeekDialogLayout->addMultiCellLayout( Layout5, 0, 1, 1, 1 );
- m_resultFrame = new QFrame( this, "m_resultFrame" );
- m_resultFrame->setFrameShape( QFrame::StyledPanel );
- m_resultFrame->setFrameShadow( QFrame::Raised );
+ m_resultFrame = new TQFrame( this, "m_resultFrame" );
+ m_resultFrame->setFrameShape( TQFrame::StyledPanel );
+ m_resultFrame->setFrameShadow( TQFrame::Raised );
m_resultFrame->setMinimumWidth( 350 );
- m_resultFrameLayout = new QGridLayout( m_resultFrame, 1, 1, 11, 6, "m_resultFrameLayout");
+ m_resultFrameLayout = new TQGridLayout( m_resultFrame, 1, 1, 11, 6, "m_resultFrameLayout");
- m_currentValueLabel = new QLabel( m_resultFrame, "m_currentValueLabel" );
+ m_currentValueLabel = new TQLabel( m_resultFrame, "m_currentValueLabel" );
m_currentValueLabel->setText( i18n( "Current value:" ) );
m_resultFrameLayout->addWidget( m_currentValueLabel, 2, 0 );
- m_newValueDesc = new QLabel( m_resultFrame, "m_newValueDesc" );
+ m_newValueDesc = new TQLabel( m_resultFrame, "m_newValueDesc" );
m_newValueDesc->setText( i18n( "New value:" ) );
m_resultFrameLayout->addWidget( m_newValueDesc, 1, 0 );
- m_newValue = new QLabel( m_resultFrame, "m_newValue" );
+ m_newValue = new TQLabel( m_resultFrame, "m_newValue" );
m_newValue->setText( "m_targetValueEdit" );
m_resultFrameLayout->addWidget( m_newValue, 1, 1 );
- m_currentValue = new QLabel( m_resultFrame, "m_currentValue" );
+ m_currentValue = new TQLabel( m_resultFrame, "m_currentValue" );
m_currentValue->setText( "m_currentValue" );
m_resultFrameLayout->addWidget( m_currentValue, 2, 1 );
- m_resultText = new QLabel( m_resultFrame, "m_resultText" );
+ m_resultText = new TQLabel( m_resultFrame, "m_resultText" );
m_resultText->setText( "Goal seeking with cell <cell> found <a | no> solution:" );
- m_resultText->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) );
+ m_resultText->tqsetAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
m_resultFrameLayout->addMultiCellWidget( m_resultText, 0, 0, 0, 1 );
@@ -165,14 +165,14 @@ GoalSeekDialog::GoalSeekDialog( View * parent, QPoint const & marker,
// Allow the user to select cells on the spreadsheet.
m_pView->canvasWidget()->startChoose();
- qApp->installEventFilter( this );
+ tqApp->installEventFilter( this );
// signals and slots connections
- connect( m_buttonOk, SIGNAL( clicked() ), this, SLOT( buttonOkClicked() ) );
- connect( m_buttonCancel, SIGNAL( clicked() ), this, SLOT( buttonCancelClicked() ) );
+ connect( m_buttonOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( buttonOkClicked() ) );
+ connect( m_buttonCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( buttonCancelClicked() ) );
- connect( m_pView->choice(), SIGNAL(changed(const Region&)),
- this, SLOT(slotSelectionChanged()));
+ connect( m_pView->choice(), TQT_SIGNAL(changed(const Region&)),
+ this, TQT_SLOT(slotSelectionChanged()));
// tab order
setTabOrder( m_targetEdit, m_targetValueEdit );
@@ -195,13 +195,13 @@ GoalSeekDialog::~GoalSeekDialog()
}
}
-bool GoalSeekDialog::eventFilter( QObject* obj, QEvent* ev )
+bool GoalSeekDialog::eventFilter( TQObject* obj, TQEvent* ev )
{
- if ( obj == m_targetValueEdit && ev->type() == QEvent::FocusIn )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_targetValueEdit) && ev->type() == TQEvent::FocusIn )
m_focus = m_targetValueEdit;
- else if ( obj == m_targetEdit && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_targetEdit) && ev->type() == TQEvent::FocusIn )
m_focus = m_targetEdit;
- else if ( obj == m_sourceEdit && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_sourceEdit) && ev->type() == TQEvent::FocusIn )
m_focus = m_sourceEdit;
else
return FALSE;
@@ -212,7 +212,7 @@ bool GoalSeekDialog::eventFilter( QObject* obj, QEvent* ev )
return FALSE;
}
-void GoalSeekDialog::closeEvent ( QCloseEvent * e )
+void GoalSeekDialog::closeEvent ( TQCloseEvent * e )
{
e->accept();
}
@@ -224,7 +224,7 @@ void GoalSeekDialog::slotSelectionChanged()
if (m_pView->choice()->isValid())
{
- QString area = m_pView->choice()->name();
+ TQString area = m_pView->choice()->name();
m_focus->setText( area );
}
}
@@ -315,7 +315,7 @@ void GoalSeekDialog::buttonOkClicked()
if ( !pDoc->undoLocked() )
{
UndoSetText * undo
- = new UndoSetText( pDoc, m_pView->activeSheet(), QString::number(m_oldSource),
+ = new UndoSetText( pDoc, m_pView->activeSheet(), TQString::number(m_oldSource),
m_sourceCell->column(), m_sourceCell->row(),
m_sourceCell->formatType() );
@@ -363,7 +363,7 @@ void GoalSeekDialog::chooseCleanup()
sheet = m_pView->activeSheet();
// Revert the marker to its original position
- m_pView->selectionInfo()->initialize(QRect(m_marker, m_anchor));//, sheet );
+ m_pView->selectionInfo()->initialize(TQRect(m_marker, m_anchor));//, sheet );
}
@@ -447,7 +447,7 @@ void GoalSeekDialog::startCalc(double _start, double _goal)
--m_maxIter;
if ( m_maxIter % 20 == 0 )
- m_newValue->setText( QString::number(m_maxIter) );
+ m_newValue->setText( TQString::number(m_maxIter) );
}
m_newValueDesc->setText( i18n( "New value:" ) );
@@ -459,7 +459,7 @@ void GoalSeekDialog::startCalc(double _start, double _goal)
// m_targetCell->setCalcDirtyFlag();
m_targetCell->calc( false );
- m_resultText->setText( i18n( "Goal seeking with cell %1 found a solution:" ).arg( m_sourceEdit->text() ) );
+ m_resultText->setText( i18n( "Goal seeking with cell %1 found a solution:" ).tqarg( m_sourceEdit->text() ) );
m_newValue->setText( m_pView->doc()->locale()->formatNumber( startA ) );
m_currentValue->setText( m_pView->doc()->locale()->formatNumber( m_oldSource ) );
m_restored = false;
@@ -471,7 +471,7 @@ void GoalSeekDialog::startCalc(double _start, double _goal)
m_targetCell->setCalcDirtyFlag();
m_sourceCell->sheet()->setRegionPaintDirty(m_sourceCell->cellRect());
m_targetCell->calc( false );
- m_resultText->setText( i18n( "Goal seeking with cell %1 has found NO solution." ).arg( m_sourceEdit->text() ) );
+ m_resultText->setText( i18n( "Goal seeking with cell %1 has found NO solution." ).tqarg( m_sourceEdit->text() ) );
m_newValue->setText( "" );
m_currentValue->setText( m_pView->doc()->locale()->formatNumber( m_oldSource ) );
m_restored = true;
diff --git a/kspread/dialogs/kspread_dlg_goalseek.h b/kspread/dialogs/kspread_dlg_goalseek.h
index 966bcf17..b3b01f19 100644
--- a/kspread/dialogs/kspread_dlg_goalseek.h
+++ b/kspread/dialogs/kspread_dlg_goalseek.h
@@ -27,16 +27,16 @@
#define __kspread_dlg_goalseek__
#include <kdialog.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqpoint.h>
+#include <tqrect.h>
-class QFrame;
-class QGridLayout;
-class QHBoxLayout;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QVBoxLayout;
+class TQFrame;
+class TQGridLayout;
+class TQHBoxLayout;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQVBoxLayout;
namespace KSpread
{
@@ -48,16 +48,17 @@ class View;
class GoalSeekDialog : public KDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- GoalSeekDialog( View * parent, QPoint const & marker, const char * name = 0,
+ GoalSeekDialog( View * tqparent, TQPoint const & marker, const char * name = 0,
bool modal = FALSE, WFlags fl = 0 );
~GoalSeekDialog();
/**
* Find out which widget got focus.
*/
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
public slots:
void buttonOkClicked();
@@ -65,11 +66,11 @@ class GoalSeekDialog : public KDialog
void slotSelectionChanged();
protected:
- virtual void closeEvent ( QCloseEvent * );
+ virtual void closeEvent ( TQCloseEvent * );
- QGridLayout * GoalSeekDialogLayout;
- QGridLayout * m_startFrameLayout;
- QGridLayout * m_resultFrameLayout;
+ TQGridLayout * GoalSeekDialogLayout;
+ TQGridLayout * m_startFrameLayout;
+ TQGridLayout * m_resultFrameLayout;
private:
View * m_pView;
@@ -80,32 +81,32 @@ class GoalSeekDialog : public KDialog
bool m_restored;
double m_oldSource;
- QString m_oldText;
- QString m_sheetName;
-
- QFrame * m_startFrame;
- QLineEdit * m_targetValueEdit;
- QLineEdit * m_targetEdit;
- QLineEdit * m_sourceEdit;
- QPushButton * m_buttonOk;
- QPushButton * m_buttonCancel;
- QFrame * m_resultFrame;
- QLabel * m_newValueDesc;
- QLabel * m_currentValueLabel;
- QLabel * m_newValue;
- QLabel * m_currentValue;
- QLabel * m_resultText;
+ TQString m_oldText;
+ TQString m_sheetName;
+
+ TQFrame * m_startFrame;
+ TQLineEdit * m_targetValueEdit;
+ TQLineEdit * m_targetEdit;
+ TQLineEdit * m_sourceEdit;
+ TQPushButton * m_buttonOk;
+ TQPushButton * m_buttonCancel;
+ TQFrame * m_resultFrame;
+ TQLabel * m_newValueDesc;
+ TQLabel * m_currentValueLabel;
+ TQLabel * m_newValue;
+ TQLabel * m_currentValue;
+ TQLabel * m_resultText;
/**
* Tells which of the lineedits has the logical focus currently.
* It may happen that a lineedit does not have qt focus but
* logical focus but not the other way round.
*/
- QLineEdit * m_focus;
+ TQLineEdit * m_focus;
- QPoint m_anchor;
- QPoint m_marker;
- QRect m_selection;
+ TQPoint m_anchor;
+ TQPoint m_marker;
+ TQRect m_selection;
void startCalc(double _start, double _goal);
void chooseCleanup();
diff --git a/kspread/dialogs/kspread_dlg_goto.cc b/kspread/dialogs/kspread_dlg_goto.cc
index 12117e36..457dc80c 100644
--- a/kspread/dialogs/kspread_dlg_goto.cc
+++ b/kspread/dialogs/kspread_dlg_goto.cc
@@ -22,8 +22,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klineedit.h>
@@ -38,15 +38,15 @@
using namespace KSpread;
-GotoDialog::GotoDialog( View* parent, const char* name )
- : KDialogBase( parent, name, TRUE, i18n("Goto Cell"), Ok|Cancel )
+GotoDialog::GotoDialog( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name, TRUE, i18n("Goto Cell"), Ok|Cancel )
{
- m_pView = parent;
- QWidget *page = new QWidget( this );
+ m_pView = tqparent;
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel(i18n("Enter cell:"), page);
+ TQLabel *label = new TQLabel(i18n("Enter cell:"), page);
lay1->addWidget(label);
m_nameCell = new KLineEdit( page );
@@ -55,12 +55,12 @@ GotoDialog::GotoDialog( View* parent, const char* name )
m_nameCell->setFocus();
enableButtonOK( false );
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( m_nameCell, SIGNAL(textChanged ( const QString & )),
- this, SLOT(textChanged ( const QString & )));
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( m_nameCell, TQT_SIGNAL(textChanged ( const TQString & )),
+ this, TQT_SLOT(textChanged ( const TQString & )));
}
-void GotoDialog::textChanged ( const QString &_text )
+void GotoDialog::textChanged ( const TQString &_text )
{
enableButtonOK(!_text.isEmpty());
}
@@ -69,7 +69,7 @@ void GotoDialog::slotOk()
{
m_pView->doc()->emitBeginOperation( false );
- QString tmp_upper;
+ TQString tmp_upper;
tmp_upper=m_nameCell->text().upper();
Region region(m_pView, tmp_upper);
if ( region.isValid() )
diff --git a/kspread/dialogs/kspread_dlg_goto.h b/kspread/dialogs/kspread_dlg_goto.h
index 7237f575..70226971 100644
--- a/kspread/dialogs/kspread_dlg_goto.h
+++ b/kspread/dialogs/kspread_dlg_goto.h
@@ -37,12 +37,13 @@ class View;
class GotoDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- GotoDialog( View* parent, const char* name);
+ GotoDialog( View* tqparent, const char* name);
public slots:
void slotOk();
- void textChanged ( const QString &_text );
+ void textChanged ( const TQString &_text );
protected:
diff --git a/kspread/dialogs/kspread_dlg_insert.cc b/kspread/dialogs/kspread_dlg_insert.cc
index 3685c1a6..1cca23ca 100644
--- a/kspread/dialogs/kspread_dlg_insert.cc
+++ b/kspread/dialogs/kspread_dlg_insert.cc
@@ -24,10 +24,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kdebug.h>
@@ -42,36 +42,36 @@
using namespace KSpread;
-InsertDialog::InsertDialog( View* parent, const char* name,const QRect &_rect,Mode _mode)
- : KDialogBase( parent, name, TRUE,"",Ok|Cancel )
+InsertDialog::InsertDialog( View* tqparent, const char* name,const TQRect &_rect,Mode _mode)
+ : KDialogBase( tqparent, name, TRUE,"",Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
rect=_rect;
insRem=_mode;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Insert"),page);
+ TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n("Insert"),page);
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
+ grp->tqlayout();
lay1->addWidget(grp);
if( insRem==Insert)
{
- rb1 = new QRadioButton( i18n("Move towards right"), grp );
- rb2 = new QRadioButton( i18n("Move towards bottom"), grp );
- rb3 = new QRadioButton( i18n("Insert rows"), grp );
- rb4 = new QRadioButton( i18n("Insert columns"), grp );
+ rb1 = new TQRadioButton( i18n("Move towards right"), grp );
+ rb2 = new TQRadioButton( i18n("Move towards bottom"), grp );
+ rb3 = new TQRadioButton( i18n("Insert rows"), grp );
+ rb4 = new TQRadioButton( i18n("Insert columns"), grp );
setCaption( i18n("Insert Cells") );
}
else if(insRem==Remove)
{
grp->setTitle(i18n("Remove"));
- rb1 = new QRadioButton( i18n("Move towards left"), grp );
- rb2 = new QRadioButton( i18n("Move towards top"), grp );
- rb3 = new QRadioButton( i18n("Remove rows"), grp );
- rb4 = new QRadioButton( i18n("Remove columns"), grp );
+ rb1 = new TQRadioButton( i18n("Move towards left"), grp );
+ rb2 = new TQRadioButton( i18n("Move towards top"), grp );
+ rb3 = new TQRadioButton( i18n("Remove rows"), grp );
+ rb4 = new TQRadioButton( i18n("Remove columns"), grp );
setCaption( i18n("Remove Cells") );
}
else
@@ -80,7 +80,7 @@ InsertDialog::InsertDialog( View* parent, const char* name,const QRect &_rect,Mo
rb1->setChecked(true);
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
}
void InsertDialog::slotOk()
diff --git a/kspread/dialogs/kspread_dlg_insert.h b/kspread/dialogs/kspread_dlg_insert.h
index 29fa4e22..27a961ac 100644
--- a/kspread/dialogs/kspread_dlg_insert.h
+++ b/kspread/dialogs/kspread_dlg_insert.h
@@ -29,9 +29,9 @@
#include <kdialogbase.h>
-class QCheckBox;
-class QRadioButton;
-class QRect;
+class TQCheckBox;
+class TQRadioButton;
+class TQRect;
namespace KSpread
{
@@ -41,10 +41,11 @@ class View;
class InsertDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Mode { Insert, Remove };
- InsertDialog( View* parent, const char* name, const QRect &_rect, Mode _mode );
+ InsertDialog( View* tqparent, const char* name, const TQRect &_rect, Mode _mode );
public slots:
void slotOk();
@@ -52,11 +53,11 @@ public slots:
private:
View* m_pView;
- QRadioButton *rb1;
- QRadioButton *rb2;
- QRadioButton *rb3;
- QRadioButton *rb4;
- QRect rect;
+ TQRadioButton *rb1;
+ TQRadioButton *rb2;
+ TQRadioButton *rb3;
+ TQRadioButton *rb4;
+ TQRect rect;
Mode insRem;
};
diff --git a/kspread/dialogs/kspread_dlg_layout.cc b/kspread/dialogs/kspread_dlg_layout.cc
index e86e3271..6b5c233b 100644
--- a/kspread/dialogs/kspread_dlg_layout.cc
+++ b/kspread/dialogs/kspread_dlg_layout.cc
@@ -32,16 +32,16 @@
#include <stdlib.h>
#include <math.h>
-#include <qbitmap.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qfontdatabase.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qwhatsthis.h>
+#include <tqbitmap.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqfontdatabase.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqwhatsthis.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
@@ -73,22 +73,22 @@ using namespace KSpread;
*
***************************************************************************/
-PatternSelect::PatternSelect( QWidget *parent, const char * )
- : QFrame( parent )
+PatternSelect::PatternSelect( TQWidget *tqparent, const char * )
+ : TQFrame( tqparent )
{
- penStyle = NoPen;
+ penStyle = Qt::NoPen;
penWidth = 1;
- penColor = colorGroup().text();
+ penColor = tqcolorGroup().text();
selected = false;
undefined = false;
}
-void PatternSelect::setPattern( const QColor &_color, int _width, PenStyle _style )
+void PatternSelect::setPattern( const TQColor &_color, int _width, Qt::PenStyle _style )
{
penStyle = _style;
penColor = _color;
penWidth = _width;
- repaint();
+ tqrepaint();
}
void PatternSelect::setUndefined()
@@ -96,15 +96,15 @@ void PatternSelect::setUndefined()
undefined = true;
}
-void PatternSelect::paintEvent( QPaintEvent *_ev )
+void PatternSelect::paintEvent( TQPaintEvent *_ev )
{
- QFrame::paintEvent( _ev );
+ TQFrame::paintEvent( _ev );
- QPainter painter( this );
+ TQPainter painter( this );
if ( !undefined )
{
- QPen pen( penColor, penWidth, penStyle);
+ TQPen pen( penColor, penWidth, penStyle);
painter.setPen( pen );
painter.drawLine( 6, height()/2, width() - 6,height()/2 );
}
@@ -114,7 +114,7 @@ void PatternSelect::paintEvent( QPaintEvent *_ev )
}
}
-void PatternSelect::mousePressEvent( QMouseEvent * )
+void PatternSelect::mousePressEvent( TQMouseEvent * )
{
slotSelect();
@@ -126,8 +126,8 @@ void PatternSelect::slotUnselect()
selected = false;
setLineWidth( 1 );
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- repaint();
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ tqrepaint();
}
void PatternSelect::slotSelect()
@@ -135,8 +135,8 @@ void PatternSelect::slotSelect()
selected = true;
setLineWidth( 2 );
- setFrameStyle( QFrame::Panel | QFrame::Plain );
- repaint();
+ setFrameStyle( TQFrame::Panel | TQFrame::Plain );
+ tqrepaint();
}
@@ -147,22 +147,22 @@ void PatternSelect::slotSelect()
*
***************************************************************************/
-GeneralTab::GeneralTab( QWidget* parent, CellFormatDialog * dlg )
- : QWidget( parent ),
+GeneralTab::GeneralTab( TQWidget* tqparent, CellFormatDialog * dlg )
+ : TQWidget( tqparent ),
m_dlg( dlg )
{
- QGridLayout * layout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "layout");
+ TQGridLayout * tqlayout = new TQGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "tqlayout");
- QGroupBox * groupBox = new QGroupBox( this, "groupBox1" );
+ TQGroupBox * groupBox = new TQGroupBox( this, "groupBox1" );
groupBox->setColumnLayout(0, Qt::Vertical );
groupBox->setTitle( i18n( "Style" ) );
- groupBox->layout()->setSpacing( KDialog::spacingHint() );
- groupBox->layout()->setMargin( KDialog::marginHint() );
+ groupBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ groupBox->tqlayout()->setMargin( KDialog::marginHint() );
- QGridLayout * groupBoxLayout = new QGridLayout( groupBox->layout() );
- groupBoxLayout->setAlignment( Qt::AlignTop );
+ TQGridLayout * groupBoxLayout = new TQGridLayout( groupBox->tqlayout() );
+ groupBoxLayout->tqsetAlignment( TQt::AlignTop );
- QLabel * label1 = new QLabel( groupBox, "label1" );
+ TQLabel * label1 = new TQLabel( groupBox, "label1" );
label1->setText( i18n( "Name:" ) );
groupBoxLayout->addWidget( label1, 0, 0 );
@@ -170,19 +170,19 @@ GeneralTab::GeneralTab( QWidget* parent, CellFormatDialog * dlg )
m_nameEdit->setText( m_dlg->styleName );
groupBoxLayout->addWidget( m_nameEdit, 0, 1 );
- QLabel * label2 = new QLabel( groupBox, "label2" );
+ TQLabel * label2 = new TQLabel( groupBox, "label2" );
label2->setText( i18n( "Inherit style:" ) );
groupBoxLayout->addWidget( label2, 1, 0 );
m_parentBox = new KComboBox( false, groupBox, "m_parentBox" );
m_parentBox->clear();
m_parentBox->insertItem( i18n( "<None>" ) );
- QStringList tmp = m_dlg->getStyleManager()->styleNames();
+ TQStringList tmp = m_dlg->getStyleManager()->styleNames();
tmp.remove( m_dlg->styleName );
m_parentBox->insertStringList( tmp );
- if ( m_dlg->getStyle()->parent() )
- m_parentBox->setCurrentText( m_dlg->getStyle()->parentName() );
+ if ( m_dlg->getStyle()->tqparent() )
+ m_parentBox->setCurrentText( m_dlg->getStyle()->tqparentName() );
else
{
m_parentBox->setCurrentText( i18n( "<None>" ) );
@@ -191,15 +191,15 @@ GeneralTab::GeneralTab( QWidget* parent, CellFormatDialog * dlg )
m_parentBox->setEnabled( false );
}
- connect( m_parentBox, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotNewParent( const QString & ) ) );
- connect( m_nameEdit, SIGNAL( lostFocus() ), this, SLOT( slotNameChanged() ) );
+ connect( m_parentBox, TQT_SIGNAL( textChanged( const TQString & ) ), this, TQT_SLOT( slotNewParent( const TQString & ) ) );
+ connect( m_nameEdit, TQT_SIGNAL( lostFocus() ), this, TQT_SLOT( slotNameChanged() ) );
groupBoxLayout->addWidget( m_parentBox, 1, 1 );
- QSpacerItem * spacer = new QSpacerItem( 20, 260, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem * spacer = new TQSpacerItem( 20, 260, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
- layout->addWidget( groupBox, 0, 0 );
- layout->addItem( spacer, 1, 0 );
+ tqlayout->addWidget( groupBox, 0, 0 );
+ tqlayout->addItem( spacer, 1, 0 );
if ( m_dlg->getStyle()->type() == Style::BUILTIN )
{
@@ -207,7 +207,7 @@ GeneralTab::GeneralTab( QWidget* parent, CellFormatDialog * dlg )
m_parentBox->setEnabled( false );
}
- resize( QSize( 534, 447 ).expandedTo(minimumSizeHint()) );
+ resize( TQSize( 534, 447 ).expandedTo(tqminimumSizeHint()) );
}
GeneralTab::~GeneralTab()
@@ -219,18 +219,18 @@ void GeneralTab::slotNameChanged()
checkName();
}
-void GeneralTab::slotNewParent( const QString & parentName )
+void GeneralTab::slotNewParent( const TQString & tqparentName )
{
kdDebug() << "New Parent" << endl;
- if ( !checkParent( parentName ) )
+ if ( !checkParent( tqparentName ) )
return;
- if ( parentName.isEmpty() || parentName == i18n( "<None>" ) )
+ if ( tqparentName.isEmpty() || tqparentName == i18n( "<None>" ) )
m_dlg->getStyle()->setParent( 0 );
else
- m_dlg->getStyle()->setParent( m_dlg->getStyleManager()->style( parentName ) );
+ m_dlg->getStyle()->setParent( m_dlg->getStyleManager()->style( tqparentName ) );
- // Set difference to new parent, set GUI to parent values, add changes made before
+ // Set difference to new tqparent, set GUI to tqparent values, add changes made before
// m_dlg->initGUI();
}
@@ -248,29 +248,29 @@ bool GeneralTab::checkName()
return true;
}
-bool GeneralTab::checkParent( const QString & parentName )
+bool GeneralTab::checkParent( const TQString & tqparentName )
{
- if ( m_dlg->getStyle()->parentName() != parentName
- && m_parentBox->isEnabled() && parentName != i18n( "<None>" ) && !parentName.isEmpty() )
+ if ( m_dlg->getStyle()->tqparentName() != tqparentName
+ && m_parentBox->isEnabled() && tqparentName != i18n( "<None>" ) && !tqparentName.isEmpty() )
{
- if ( m_nameEdit->text() == parentName )
+ if ( m_nameEdit->text() == tqparentName )
{
KMessageBox::sorry( this, i18n( "A style cannot inherit from itself." ) );
return false;
}
- if ( !m_dlg->checkCircle( m_nameEdit->text(), parentName ) )
+ if ( !m_dlg->checkCircle( m_nameEdit->text(), tqparentName ) )
{
KMessageBox::sorry( this,
i18n( "The style cannot inherit from '%1' because of recursive references." )
- .arg( m_parentBox->currentText() ) );
+ .tqarg( m_parentBox->currentText() ) );
return false;
}
- CustomStyle * p = m_dlg->getStyleManager()->style( parentName );
+ CustomStyle * p = m_dlg->getStyleManager()->style( tqparentName );
if ( !p )
{
- KMessageBox::sorry( this, i18n( "The parent style does not exist." ) );
+ KMessageBox::sorry( this, i18n( "The tqparent style does not exist." ) );
return false;
}
}
@@ -290,7 +290,7 @@ bool GeneralTab::apply( CustomStyle * style )
{
if ( style->type() != Style::BUILTIN )
{
- QString name( style->name() );
+ TQString name( style->name() );
style->setName( m_nameEdit->text() );
if ( m_parentBox->isEnabled() )
{
@@ -318,7 +318,7 @@ bool GeneralTab::apply( CustomStyle * style )
***************************************************************************/
CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
- : QObject(),
+ : TQObject(),
m_doc( _sheet->doc() ),
m_sheet( _sheet ),
m_pView( _view ),
@@ -330,7 +330,7 @@ CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
isRowSelected = _view->selectionInfo()->isRowSelected();
isColumnSelected = _view->selectionInfo()->isColumnSelected();
- QRect range = _view->selectionInfo()->selection();
+ TQRect range = _view->selectionInfo()->selection();
left = range.left();
top = range.top();
right = range.right();
@@ -430,7 +430,7 @@ CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
textFontItalic = obj->format()->textFontItalic( left, top );
strike=obj->format()->textFontStrike( left, top );
underline = obj->format()->textFontUnderline( left, top );
- // Needed to initialize the font correctly ( bug in Qt )
+ // Needed to initialize the font correctly ( bug in TQt )
textFont = obj->format()->textFont( left, top );
obj->format()->currencyInfo( cCurrency );
@@ -461,7 +461,7 @@ CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
for ( int x = left; x <= right; x++ )
{
cl = m_pView->activeSheet()->columnFormat( x );
- widthSize = QMAX( cl->dblWidth(), widthSize );
+ widthSize = TQMAX( cl->dblWidth(), widthSize );
}
}
@@ -470,7 +470,7 @@ CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
for ( int y = top; y <= bottom; y++ )
{
rl = m_pView->activeSheet()->rowFormat(y);
- heightSize = QMAX( rl->dblHeight(), heightSize );
+ heightSize = TQMAX( rl->dblHeight(), heightSize );
}
}
@@ -629,7 +629,7 @@ CellFormatDialog::CellFormatDialog( View * _view, Sheet * _sheet )
CellFormatDialog::CellFormatDialog( View * _view, CustomStyle * _style,
StyleManager * _manager, Doc * doc )
- : QObject(),
+ : TQObject(),
m_doc( doc ),
m_sheet( 0 ),
m_pView( _view ),
@@ -696,7 +696,7 @@ void CellFormatDialog::initGUI()
strike = ( flags & (uint) Style::FStrike );
underline = ( flags & (uint) Style::FUnderline );
- // Needed to initialize the font correctly ( bug in Qt )
+ // Needed to initialize the font correctly ( bug in TQt )
textFont = m_style->font();
cCurrency = m_style->currency();
brushColor = m_style->backGroundBrush().color();
@@ -766,9 +766,9 @@ void CellFormatDialog::initMembers()
defaultHeightSize = sheet ? sheet->rowFormat(0)->dblHeight() : 0;
}
-bool CellFormatDialog::checkCircle( QString const & name, QString const & parent )
+bool CellFormatDialog::checkCircle( TQString const & name, TQString const & tqparent )
{
- return m_styleManager->checkCircle( name, parent );
+ return m_styleManager->checkCircle( name, tqparent );
}
void CellFormatDialog::checkBorderRight(Format *obj,int x,int y)
@@ -846,9 +846,9 @@ void CellFormatDialog::initParameters(Format *obj,int x,int y)
if ( underline != obj->textFontUnderline( x, y ) )
bUnderline = false;
if ( prefix != obj->prefix( x, y ) )
- prefix = QString::null;
+ prefix = TQString();
if ( postfix != obj->postfix( x, y ) )
- postfix = QString::null;
+ postfix = TQString();
if ( floatFormat != obj->floatFormat( x, y ) )
bFloatFormat = false;
if ( floatColor != obj->floatColor( x, y ) )
@@ -886,20 +886,20 @@ void CellFormatDialog::initParameters(Format *obj,int x,int y)
void CellFormatDialog::init()
{
- QColorGroup colorGroup = QApplication::palette().active();
+ TQColorGroup tqcolorGroup = TQApplication::tqpalette().active();
// Did we initialize the bitmaps ?
if ( formatOnlyNegSignedPixmap == 0L )
{
- QColor black = colorGroup.text(); // not necessarily black :)
+ TQColor black = tqcolorGroup.text(); // not necessarily black :)
formatOnlyNegSignedPixmap = paintFormatPixmap( "123.456", black, "-123.456", black );
- formatRedOnlyNegSignedPixmap = paintFormatPixmap( "123.456", black, "-123.456", Qt::red );
- formatRedNeverSignedPixmap = paintFormatPixmap( "123.456", black, "123.456", Qt::red );
+ formatRedOnlyNegSignedPixmap = paintFormatPixmap( "123.456", black, "-123.456", TQt::red );
+ formatRedNeverSignedPixmap = paintFormatPixmap( "123.456", black, "123.456", TQt::red );
formatAlwaysSignedPixmap = paintFormatPixmap( "+123.456", black, "-123.456", black );
- formatRedAlwaysSignedPixmap = paintFormatPixmap( "+123.456", black, "-123.456", Qt::red );
+ formatRedAlwaysSignedPixmap = paintFormatPixmap( "+123.456", black, "-123.456", TQt::red );
}
- tab = new QTabDialog( (QWidget*)m_pView, 0L, true );
+ tab = new TQTabDialog( (TQWidget*)m_pView, 0L, true );
//tab->setGeometry( tab->x(), tab->y(), 420, 400 );
if ( m_style )
@@ -936,31 +936,31 @@ void CellFormatDialog::init()
tab->adjustSize();
- connect( tab, SIGNAL( applyButtonPressed() ), this, SLOT( slotApply() ) );
+ connect( tab, TQT_SIGNAL( applyButtonPressed() ), this, TQT_SLOT( slotApply() ) );
tab->exec();
}
-QPixmap * CellFormatDialog::paintFormatPixmap( const char * _string1, const QColor & _color1,
- const char *_string2, const QColor & _color2 )
+TQPixmap * CellFormatDialog::paintFormatPixmap( const char * _string1, const TQColor & _color1,
+ const char *_string2, const TQColor & _color2 )
{
- QPixmap * pixmap = new QPixmap( 150, 14 );
+ TQPixmap * pixmap = new TQPixmap( 150, 14 );
- QPainter painter;
+ TQPainter painter;
painter.begin( pixmap );
- painter.fillRect( 0, 0, 150, 14, QApplication::palette().active().base() );
+ painter.fillRect( 0, 0, 150, 14, TQApplication::tqpalette().active().base() );
painter.setPen( _color1 );
- painter.drawText( 2, 11, _string1 );
+ painter.drawText( 2, 11, TQString(_string1) );
painter.setPen( _color2 );
- painter.drawText( 75, 11, _string2 );
+ painter.drawText( 75, 11, TQString(_string2) );
painter.end();
- QBitmap bm( pixmap->size() );
+ TQBitmap bm( pixmap->size() );
bm.fill( color0 );
painter.begin( &bm );
painter.setPen( color1 );
- painter.drawText( 2, 11, _string1 );
- painter.drawText( 75, 11, _string2 );
+ painter.drawText( 2, 11, TQString(_string1) );
+ painter.drawText( 75, 11, TQString(_string2) );
painter.end();
pixmap->setMask( bm );
@@ -1078,116 +1078,116 @@ void CellFormatDialog::slotApply()
*
***************************************************************************/
-CellFormatPageFloat::CellFormatPageFloat( QWidget* parent, CellFormatDialog *_dlg )
- : QWidget ( parent ),
+CellFormatPageFloat::CellFormatPageFloat( TQWidget* tqparent, CellFormatDialog *_dlg )
+ : TQWidget ( tqparent ),
dlg( _dlg )
{
- QVBoxLayout* layout = new QVBoxLayout( this, 6,10 );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 6,10 );
- QButtonGroup *grp = new QButtonGroup( i18n("Format"),this);
- QGridLayout *grid = new QGridLayout(grp,11,2,KDialog::marginHint(), KDialog::spacingHint());
+ TQButtonGroup *grp = new TQButtonGroup( i18n("Format"),this);
+ TQGridLayout *grid = new TQGridLayout(grp,11,2,KDialog::marginHint(), KDialog::spacingHint());
int fHeight = grp->fontMetrics().height();
grid->addRowSpacing( 0, fHeight/2 ); // groupbox title
grp->setRadioButtonExclusive( true );
- generic=new QRadioButton(i18n("Generic"),grp);
- QWhatsThis::add(generic, i18n( "This is the default format and KSpread autodetects the actual data type depending on the current cell data. By default, KSpread right justifies numbers, dates and times within a cell and left justifies anything else." ) );
+ generic=new TQRadioButton(i18n("Generic"),grp);
+ TQWhatsThis::add(generic, i18n( "This is the default format and KSpread autodetects the actual data type depending on the current cell data. By default, KSpread right justifies numbers, dates and times within a cell and left justifies anything else." ) );
grid->addWidget(generic,1,0);
- number=new QRadioButton(i18n("Number"),grp);
- QWhatsThis::add(number, i18n( "The number notation uses the notation you globally choose in KControl -> Regional & Accessibility -> Numbers tab. Numbers are right justified by default." ) );
+ number=new TQRadioButton(i18n("Number"),grp);
+ TQWhatsThis::add(number, i18n( "The number notation uses the notation you globally choose in KControl -> Regional & Accessibility -> Numbers tab. Numbers are right justified by default." ) );
grid->addWidget(number,2,0);
- percent=new QRadioButton(i18n("Percent"),grp);
- QWhatsThis::add(percent, i18n( "When you have a number in the current cell and you switch from the dcell format from Generic to Percent, the current cell number will be multiplied by 100%.\nFor example if you enter 12 and set the cell format to Percent, the number will then be 1,200 %. Switching back to Generic cell format will bring it back to 12.\nYou can also use the Percent icon in the Format Toolbar." ) );
+ percent=new TQRadioButton(i18n("Percent"),grp);
+ TQWhatsThis::add(percent, i18n( "When you have a number in the current cell and you switch from the dcell format from Generic to Percent, the current cell number will be multiplied by 100%.\nFor example if you enter 12 and set the cell format to Percent, the number will then be 1,200 %. Switching back to Generic cell format will bring it back to 12.\nYou can also use the Percent icon in the Format Toolbar." ) );
grid->addWidget(percent,3,0);
- money=new QRadioButton(i18n("Money"),grp);
- QWhatsThis::add(money, i18n( "The Money format converts your number into money notation using the settings globally fixed in KControl in Regional & Accessibility -> Money. The currency symbol will be displayed and the precision will be the one set in KControl.\nYou can also use the Currency icon in the Format Toolbar to set the cell formatting to look like your current currency." ) );
+ money=new TQRadioButton(i18n("Money"),grp);
+ TQWhatsThis::add(money, i18n( "The Money format converts your number into money notation using the settings globally fixed in KControl in Regional & Accessibility -> Money. The currency symbol will be displayed and the precision will be the one set in KControl.\nYou can also use the Currency icon in the Format Toolbar to set the cell formatting to look like your current currency." ) );
grid->addWidget(money,4,0);
- scientific=new QRadioButton(i18n("Scientific"),grp);
- QWhatsThis::add(scientific, i18n( "The scientific format changes your number using the scientific notation. For example, 0.0012 will be changed to 1.2E-03. Going back using Generic cell format will display 0.0012 again." ) );
+ scientific=new TQRadioButton(i18n("Scientific"),grp);
+ TQWhatsThis::add(scientific, i18n( "The scientific format changes your number using the scientific notation. For example, 0.0012 will be changed to 1.2E-03. Going back using Generic cell format will display 0.0012 again." ) );
grid->addWidget(scientific,5,0);
- fraction=new QRadioButton(i18n("Fraction"),grp);
- QWhatsThis::add(fraction, i18n( "The fraction format changes your number into a fraction. For example, 0.1 can be changed to 1/8, 2/16, 1/10, etc. You define the type of fraction by choosing it in the field on the right. If the exact fraction is not possible in the fraction mode you choose, the nearest closest match is chosen.\n For example: when we have 1.5 as number, we choose Fraction and Sixteenths 1/16 the text displayed into cell is \"1 8/16\" which is an exact fraction. If you have 1.4 as number in your cell and you choose Fraction and Sixteenths 1/16 then the cell will display \"1 6/16\" which is the nearest closest Sixteenth fraction." ) );
+ fraction=new TQRadioButton(i18n("Fraction"),grp);
+ TQWhatsThis::add(fraction, i18n( "The fraction format changes your number into a fraction. For example, 0.1 can be changed to 1/8, 2/16, 1/10, etc. You define the type of fraction by choosing it in the field on the right. If the exact fraction is not possible in the fraction mode you choose, the nearest closest match is chosen.\n For example: when we have 1.5 as number, we choose Fraction and Sixteenths 1/16 the text displayed into cell is \"1 8/16\" which is an exact fraction. If you have 1.4 as number in your cell and you choose Fraction and Sixteenths 1/16 then the cell will display \"1 6/16\" which is the nearest closest Sixteenth fraction." ) );
grid->addWidget(fraction,6,0);
- date=new QRadioButton(i18n("Date format"),grp);
- QWhatsThis::add(date, i18n( "To enter a date, you should enter it in one of the formats set in KControl in Regional & Accessibility ->Time & Dates. There are two formats set here: the date format and the short date format.\nJust like you can drag down numbers you can also drag down dates and the next cells will also get dates." ) );
+ date=new TQRadioButton(i18n("Date format"),grp);
+ TQWhatsThis::add(date, i18n( "To enter a date, you should enter it in one of the formats set in KControl in Regional & Accessibility ->Time & Dates. There are two formats set here: the date format and the short date format.\nJust like you can drag down numbers you can also drag down dates and the next cells will also get dates." ) );
grid->addWidget(date,7,0);
- time=new QRadioButton(i18n("Time format"),grp);
- QWhatsThis::add(time, i18n( "This formats your cell content as a time. To enter a time, you should enter it in the Time format set in KControl in Regional & Accessibility ->Time & Dates. In the Cell Format dialog box you can set how the time should be displayed by choosing one of the available time format options. The default format is the system format set in KControl. When the number in the cell does not make sense as a time, KSpread will display 00:00 in the global format you have in KControl." ) );
+ time=new TQRadioButton(i18n("Time format"),grp);
+ TQWhatsThis::add(time, i18n( "This formats your cell content as a time. To enter a time, you should enter it in the Time format set in KControl in Regional & Accessibility ->Time & Dates. In the Cell Format dialog box you can set how the time should be displayed by choosing one of the available time format options. The default format is the system format set in KControl. When the number in the cell does not make sense as a time, KSpread will display 00:00 in the global format you have in KControl." ) );
grid->addWidget(time,8,0);
- textFormat=new QRadioButton(i18n("Text"),grp);
- QWhatsThis::add(textFormat, i18n( "This formats your cell content as text. This can be useful if you want a number treated as text instead as a number, for example for a ZIP code. Setting a number as text format will left justify it. When numbers are formatted as text, they cannot be used in calculations or formulas. It also change the way the cell is justified." ) );
+ textFormat=new TQRadioButton(i18n("Text"),grp);
+ TQWhatsThis::add(textFormat, i18n( "This formats your cell content as text. This can be useful if you want a number treated as text instead as a number, for example for a ZIP code. Setting a number as text format will left justify it. When numbers are formatted as text, they cannot be used in calculations or formulas. It also change the way the cell is justified." ) );
grid->addWidget(textFormat,9,0);
- customFormat=new QRadioButton(i18n("Custom"),grp);
- QWhatsThis::add(customFormat, i18n( "The custom format does not work yet. To be enabled in the next release." ) );
+ customFormat=new TQRadioButton(i18n("Custom"),grp);
+ TQWhatsThis::add(customFormat, i18n( "The custom format does not work yet. To be enabled in the next release." ) );
grid->addWidget(customFormat,10,0);
customFormat->setEnabled( false );
- QGroupBox *box2 = new QGroupBox( grp, "Box");
+ TQGroupBox *box2 = new TQGroupBox( grp, "Box");
box2->setTitle(i18n("Preview"));
- QGridLayout *grid3 = new QGridLayout(box2,1,3,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid3 = new TQGridLayout(box2,1,3,KDialog::marginHint(), KDialog::spacingHint());
- exampleLabel=new QLabel(box2);
- QWhatsThis::add(exampleLabel, i18n( "This will display a preview of your choice so you can know what it does before clicking the OK button to validate it." ) );
+ exampleLabel=new TQLabel(box2);
+ TQWhatsThis::add(exampleLabel, i18n( "This will display a preview of your choice so you can know what it does before clicking the OK button to validate it." ) );
grid3->addWidget(exampleLabel,0,1);
grid->addMultiCellWidget(box2,9,10,1,1);
- customFormatEdit = new QLineEdit( grp );
+ customFormatEdit = new TQLineEdit( grp );
grid->addMultiCellWidget( customFormatEdit, 1, 1, 1, 1 );
customFormatEdit->setHidden( true );
- listFormat=new QListBox(grp);
+ listFormat=new TQListBox(grp);
grid->addMultiCellWidget(listFormat,2,7,1,1);
- QWhatsThis::add(listFormat, i18n( "Displays choices of format for the fraction, date or time formats." ) );
- layout->addWidget(grp);
+ TQWhatsThis::add(listFormat, i18n( "Displays choices of format for the fraction, date or time formats." ) );
+ tqlayout->addWidget(grp);
/* *** */
- QGroupBox *box = new QGroupBox( this, "Box");
+ TQGroupBox *box = new TQGroupBox( this, "Box");
- grid = new QGridLayout(box,3,4,KDialog::marginHint(), KDialog::spacingHint());
+ grid = new TQGridLayout(box,3,4,KDialog::marginHint(), KDialog::spacingHint());
- postfix = new QLineEdit( box, "LineEdit_1" );
- QWhatsThis::add(postfix, i18n( "You can add here a Postfix such as a $HK symbol to the end of each cell content in the checked format." ) );
+ postfix = new TQLineEdit( box, "LineEdit_1" );
+ TQWhatsThis::add(postfix, i18n( "You can add here a Postfix such as a $HK symbol to the end of each cell content in the checked format." ) );
grid->addWidget(postfix,2,1);
precision = new KIntNumInput( dlg->precision, box, 10 );
precision->setSpecialValueText(i18n("variable"));
precision->setRange(-1,10,1,false);
- QWhatsThis::add(precision, i18n( "You can control how many digits are displayed after the decimal point for numeric values. This can also be changed using the Increase precision or Decrease precision icons in the Format toolbar. " ) );
+ TQWhatsThis::add(precision, i18n( "You can control how many digits are displayed after the decimal point for numeric values. This can also be changed using the Increase precision or Decrease precision icons in the Format toolbar. " ) );
grid->addWidget(precision,1,1);
- prefix = new QLineEdit( box, "LineEdit_3" );
- QWhatsThis::add(prefix, i18n( "You can add here a Prefix such as a $ symbol at the start of each cell content in the checked format." ) );
+ prefix = new TQLineEdit( box, "LineEdit_3" );
+ TQWhatsThis::add(prefix, i18n( "You can add here a Prefix such as a $ symbol at the start of each cell content in the checked format." ) );
grid->addWidget(prefix,0,1);
- format = new QComboBox( box, "ListBox_1" );
- QWhatsThis::add(format, i18n( "You can choose whether positive values are displayed with a leading + sign and whether negative values are shown in red." ) );
+ format = new TQComboBox( box, "ListBox_1" );
+ TQWhatsThis::add(format, i18n( "You can choose whether positive values are displayed with a leading + sign and whether negative values are shown in red." ) );
grid->addWidget(format,0,3);
- QLabel* tmpQLabel;
- tmpQLabel = new QLabel( box, "Label_1" );
- grid->addWidget(tmpQLabel,2,0);
- tmpQLabel->setText( i18n("Postfix:") );
+ TQLabel* tmpTQLabel;
+ tmpTQLabel = new TQLabel( box, "Label_1" );
+ grid->addWidget(tmpTQLabel,2,0);
+ tmpTQLabel->setText( i18n("Postfix:") );
postfix->setText( dlg->postfix );
- tmpQLabel = new QLabel( box, "Label_2" );
- grid->addWidget(tmpQLabel,0,0);
+ tmpTQLabel = new TQLabel( box, "Label_2" );
+ grid->addWidget(tmpTQLabel,0,0);
- tmpQLabel->setText( i18n("Prefix:") );
- tmpQLabel = new QLabel( box, "Label_3" );
- grid->addWidget(tmpQLabel,1,0);
- tmpQLabel->setText( i18n("Precision:") );
+ tmpTQLabel->setText( i18n("Prefix:") );
+ tmpTQLabel = new TQLabel( box, "Label_3" );
+ grid->addWidget(tmpTQLabel,1,0);
+ tmpTQLabel->setText( i18n("Precision:") );
prefix->setText( dlg->prefix );
@@ -1197,22 +1197,22 @@ CellFormatPageFloat::CellFormatPageFloat( QWidget* parent, CellFormatDialog *_dl
format->insertItem( *_dlg->formatAlwaysSignedPixmap, 3 );
format->insertItem( *_dlg->formatRedAlwaysSignedPixmap, 4 );
- tmpQLabel = new QLabel( box, "Label_4" );
- grid->addWidget(tmpQLabel, 0, 2);
- tmpQLabel->setText( i18n("Format:") );
+ tmpTQLabel = new TQLabel( box, "Label_4" );
+ grid->addWidget(tmpTQLabel, 0, 2);
+ tmpTQLabel->setText( i18n("Format:") );
- currencyLabel = new QLabel( box, "LabelCurrency" );
+ currencyLabel = new TQLabel( box, "LabelCurrency" );
grid->addWidget(currencyLabel, 1, 2);
currencyLabel->setText( i18n("Currency:") );
- currency = new QComboBox( box, "ComboCurrency" );
+ currency = new TQComboBox( box, "ComboCurrency" );
grid->addWidget(currency, 1, 3);
currency->insertItem( i18n("Automatic") );
int index = 2; //ignore first two in the list
bool ok = true;
- QString text;
+ TQString text;
while ( ok )
{
@@ -1245,7 +1245,7 @@ CellFormatPageFloat::CellFormatPageFloat( QWidget* parent, CellFormatDialog *_dl
format->setCurrentItem( 3 );
else if ( dlg->floatFormat == Format::AlwaysSigned && dlg->floatColor == Format::NegRed )
format->setCurrentItem( 4 );
- layout->addWidget(box);
+ tqlayout->addWidget(box);
cellFormatType=dlg->formatType;
newFormatType = cellFormatType;
@@ -1265,7 +1265,7 @@ CellFormatPageFloat::CellFormatPageFloat( QWidget* parent, CellFormatDialog *_dl
currency->show();
if (dlg->bCurrency)
{
- QString tmp;
+ TQString tmp;
if (dlg->cCurrency.type != 1)
{
Currency curr(dlg->cCurrency.type);
@@ -1293,24 +1293,24 @@ CellFormatPageFloat::CellFormatPageFloat( QWidget* parent, CellFormatDialog *_dl
customFormat->setChecked(true);
}
- connect(generic,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(fraction,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(money,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(date,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(scientific,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(number,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(percent,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(time,SIGNAL(clicked ()),this,SLOT(slotChangeState()));
- connect(textFormat,SIGNAL(clicked()),this,SLOT(slotChangeState()));
- connect(customFormat,SIGNAL(clicked()),this,SLOT(slotChangeState()));
-
- connect(listFormat,SIGNAL(selectionChanged ()),this,SLOT(makeformat()));
- connect(precision,SIGNAL(valueChanged(int)),this,SLOT(slotChangeValue(int)));
- connect(prefix,SIGNAL(textChanged ( const QString & ) ),this,SLOT(makeformat()));
- connect(postfix,SIGNAL(textChanged ( const QString & ) ),this,SLOT(makeformat()));
- connect(currency,SIGNAL(activated ( const QString & ) ),this, SLOT(currencyChanged(const QString &)));
- connect(format,SIGNAL(activated ( int ) ),this,SLOT(formatChanged(int)));
- connect(format, SIGNAL(activated(int)), this, SLOT(makeformat()));
+ connect(generic,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(fraction,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(money,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(date,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(scientific,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(number,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(percent,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(time,TQT_SIGNAL(clicked ()),this,TQT_SLOT(slotChangeState()));
+ connect(textFormat,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotChangeState()));
+ connect(customFormat,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotChangeState()));
+
+ connect(listFormat,TQT_SIGNAL(selectionChanged ()),this,TQT_SLOT(makeformat()));
+ connect(precision,TQT_SIGNAL(valueChanged(int)),this,TQT_SLOT(slotChangeValue(int)));
+ connect(prefix,TQT_SIGNAL(textChanged ( const TQString & ) ),this,TQT_SLOT(makeformat()));
+ connect(postfix,TQT_SIGNAL(textChanged ( const TQString & ) ),this,TQT_SLOT(makeformat()));
+ connect(currency,TQT_SIGNAL(activated ( const TQString & ) ),this, TQT_SLOT(currencyChanged(const TQString &)));
+ connect(format,TQT_SIGNAL(activated ( int ) ),this,TQT_SLOT(formatChanged(int)));
+ connect(format, TQT_SIGNAL(activated(int)), this, TQT_SLOT(makeformat()));
slotChangeState();
m_bFormatColorChanged=false;
m_bFormatTypeChanged=false;
@@ -1328,7 +1328,7 @@ void CellFormatPageFloat::slotChangeValue(int)
}
void CellFormatPageFloat::slotChangeState()
{
- QStringList list;
+ TQStringList list;
listFormat->clear();
currency->hide();
currencyLabel->hide();
@@ -1402,9 +1402,9 @@ void CellFormatPageFloat::slotChangeState()
listFormat->setEnabled(true);
- list+=i18n("System: ")+dlg->locale()->formatTime(QTime::currentTime(),false);
- list+=i18n("System: ")+dlg->locale()->formatTime(QTime::currentTime(),true);
- QDateTime tmpTime (QDate (1, 1, 1900), QTime (10, 35, 25));
+ list+=i18n("System: ")+dlg->locale()->formatTime(TQTime::currentTime(),false);
+ list+=i18n("System: ")+dlg->locale()->formatTime(TQTime::currentTime(),true);
+ TQDateTime tmpTime (TQDate (1, 1, 1900), TQTime (10, 35, 25));
ValueFormatter *fmt = dlg->getDoc()->formatter();
@@ -1461,12 +1461,12 @@ void CellFormatPageFloat::slotChangeState()
void CellFormatPageFloat::init()
{
- QStringList list;
- QString tmp;
- QString tmp2;
- QDate tmpDate( 2000,2,18);
- list+=i18n("System: ")+dlg->locale()->formatDate (QDate::currentDate(), true);
- list+=i18n("System: ")+dlg->locale()->formatDate (QDate::currentDate(), false);
+ TQStringList list;
+ TQString tmp;
+ TQString tmp2;
+ TQDate tmpDate( 2000,2,18);
+ list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::tqcurrentDate(), true);
+ list+=i18n("System: ")+dlg->locale()->formatDate (TQDate::tqcurrentDate(), false);
ValueFormatter *fmt = dlg->getDoc()->formatter();
@@ -1576,7 +1576,7 @@ void CellFormatPageFloat::init()
}
-void CellFormatPageFloat::currencyChanged(const QString &)
+void CellFormatPageFloat::currencyChanged(const TQString &)
{
int index = currency->currentItem();
if (index > 0)
@@ -1676,10 +1676,10 @@ void CellFormatPageFloat::updateFormatType ()
void CellFormatPageFloat::makeformat()
{
m_bFormatTypeChanged=true;
- QString tmp;
+ TQString tmp;
updateFormatType();
- QColor color;
+ TQColor color;
Format::FloatFormat floatFormat = Format::OnlyNegSigned;
switch( format->currentItem() )
{
@@ -1689,11 +1689,11 @@ void CellFormatPageFloat::makeformat()
break;
case 1:
floatFormat = Format::OnlyNegSigned;
- color = Qt::red;
+ color = TQt::red;
break;
case 2:
floatFormat = Format::AlwaysUnsigned;
- color = Qt::red;
+ color = TQt::red;
break;
case 3:
floatFormat = Format::AlwaysSigned;
@@ -1701,7 +1701,7 @@ void CellFormatPageFloat::makeformat()
break;
case 4:
floatFormat = Format::AlwaysSigned;
- color = Qt::red;
+ color = TQt::red;
break;
}
if (!dlg->value.isNumber() || dlg->value.asFloat() >= 0 || !format->isEnabled())
@@ -1711,9 +1711,9 @@ void CellFormatPageFloat::makeformat()
ValueFormatter *fmt = dlg->getDoc()->formatter();
tmp = fmt->formatText(dlg->value, newFormatType, precision->value(),
floatFormat,
- prefix->isEnabled() ? prefix->text() : QString::null,
- postfix->isEnabled() ? postfix->text() : QString::null,
- newFormatType == Money_format ? dlg->cCurrency.symbol : QString::null);
+ prefix->isEnabled() ? prefix->text() : TQString(),
+ postfix->isEnabled() ? postfix->text() : TQString(),
+ newFormatType == Money_format ? dlg->cCurrency.symbol : TQString());
if (tmp.length() > 50)
tmp = tmp.left (50);
exampleLabel->setText(tmp.prepend("<font color=" + color.name() + ">").append("</font>"));
@@ -1881,8 +1881,8 @@ void CellFormatPageFloat::apply(FormatManipulator* _obj)
*
***************************************************************************/
-CellFormatPageProtection::CellFormatPageProtection( QWidget* parent, CellFormatDialog * _dlg )
- : ProtectionTab( parent ),
+CellFormatPageProtection::CellFormatPageProtection( TQWidget* tqparent, CellFormatDialog * _dlg )
+ : ProtectionTab( tqparent ),
m_dlg( _dlg )
{
m_bDontPrint->setChecked( m_dlg->bDontPrintText );
@@ -1953,19 +1953,19 @@ void CellFormatPageProtection::apply(FormatManipulator* _obj)
*
***************************************************************************/
-CellFormatPageFont::CellFormatPageFont( QWidget* parent, CellFormatDialog *_dlg ) : FontTab( parent )
+CellFormatPageFont::CellFormatPageFont( TQWidget* tqparent, CellFormatDialog *_dlg ) : FontTab( tqparent )
{
dlg = _dlg;
bTextColorUndefined = !dlg->bTextColor;
- connect( textColorButton, SIGNAL( changed( const QColor & ) ),
- this, SLOT( slotSetTextColor( const QColor & ) ) );
+ connect( textColorButton, TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( slotSetTextColor( const TQColor & ) ) );
- QStringList tmpListFont;
- QFontDatabase *fontDataBase = new QFontDatabase();
- tmpListFont = fontDataBase->families();
+ TQStringList tmpListFont;
+ TQFontDatabase *fontDataBase = new TQFontDatabase();
+ tmpListFont = fontDataBase->tqfamilies();
delete fontDataBase;
family_combo->insertStringList( tmpListFont);
@@ -1976,13 +1976,13 @@ CellFormatPageFont::CellFormatPageFont( QWidget* parent, CellFormatDialog *_dlg
selFont.setFamily( dlg->textFontFamily );
kdDebug(36001) << "Family = " << dlg->textFontFamily << endl;
- if ( !family_combo->findItem(dlg->textFontFamily))
+ if ( !family_combo->tqfindItem(dlg->textFontFamily))
{
family_combo->insertItem("",0);
family_combo->setCurrentItem(0);
}
else
- family_combo->setCurrentItem(family_combo->index(family_combo->findItem(dlg->textFontFamily)));
+ family_combo->setCurrentItem(family_combo->index(family_combo->tqfindItem(dlg->textFontFamily)));
}
else
{
@@ -1990,42 +1990,42 @@ CellFormatPageFont::CellFormatPageFont( QWidget* parent, CellFormatDialog *_dlg
family_combo->setCurrentItem(0);
}
- connect( family_combo, SIGNAL(highlighted(const QString &)),
- SLOT(family_chosen_slot(const QString &)) );
+ connect( family_combo, TQT_SIGNAL(highlighted(const TQString &)),
+ TQT_SLOT(family_chosen_slot(const TQString &)) );
- QStringList lst;
+ TQStringList lst;
lst.append("");
for ( unsigned int i = 1; i < 100; ++i )
- lst.append( QString( "%1" ).arg( i ) );
+ lst.append( TQString( "%1" ).tqarg( i ) );
size_combo->insertStringList( lst );
- size_combo->setInsertionPolicy(QComboBox::NoInsertion);
+ size_combo->setInsertionPolicy(TQComboBox::NoInsertion);
- connect( size_combo, SIGNAL(activated(const QString &)),
- SLOT(size_chosen_slot(const QString &)) );
- connect( size_combo ,SIGNAL( textChanged(const QString &)),
- this,SLOT(size_chosen_slot(const QString &)));
+ connect( size_combo, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(size_chosen_slot(const TQString &)) );
+ connect( size_combo ,TQT_SIGNAL( textChanged(const TQString &)),
+ this,TQT_SLOT(size_chosen_slot(const TQString &)));
- connect( weight_combo, SIGNAL(activated(const QString &)),
- SLOT(weight_chosen_slot(const QString &)) );
+ connect( weight_combo, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(weight_chosen_slot(const TQString &)) );
- connect( style_combo, SIGNAL(activated(const QString &)),
- SLOT(style_chosen_slot(const QString &)) );
+ connect( style_combo, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(style_chosen_slot(const TQString &)) );
strike->setChecked(dlg->strike);
- connect( strike, SIGNAL( clicked()),
- SLOT(strike_chosen_slot()) );
+ connect( strike, TQT_SIGNAL( clicked()),
+ TQT_SLOT(strike_chosen_slot()) );
underline->setChecked(dlg->underline);
- connect( underline, SIGNAL( clicked()),
- SLOT(underline_chosen_slot()) );
+ connect( underline, TQT_SIGNAL( clicked()),
+ TQT_SLOT(underline_chosen_slot()) );
example_label->setText(i18n("Dolor Ipse"));
- connect(this,SIGNAL(fontSelected( const QFont& )),
- this,SLOT(display_example( const QFont&)));
+ connect(this,TQT_SIGNAL(fontSelected( const TQFont& )),
+ this,TQT_SLOT(display_example( const TQFont&)));
setCombos();
display_example( selFont );
@@ -2033,7 +2033,7 @@ CellFormatPageFont::CellFormatPageFont( QWidget* parent, CellFormatDialog *_dlg
this->resize( 400, 400 );
}
-void CellFormatPageFont::slotSetTextColor( const QColor &_color )
+void CellFormatPageFont::slotSetTextColor( const TQColor &_color )
{
textColor = _color;
bTextColorUndefined = false;
@@ -2109,23 +2109,23 @@ void CellFormatPageFont::strike_chosen_slot()
emit fontSelected(selFont);
}
-void CellFormatPageFont::family_chosen_slot(const QString & family)
+void CellFormatPageFont::family_chosen_slot(const TQString & family)
{
selFont.setFamily(family);
emit fontSelected(selFont);
}
-void CellFormatPageFont::size_chosen_slot(const QString & size)
+void CellFormatPageFont::size_chosen_slot(const TQString & size)
{
- QString size_string = size;
+ TQString size_string = size;
selFont.setPointSize(size_string.toInt());
emit fontSelected(selFont);
}
-void CellFormatPageFont::weight_chosen_slot(const QString & weight)
+void CellFormatPageFont::weight_chosen_slot(const TQString & weight)
{
- QString weight_string = weight;
+ TQString weight_string = weight;
if ( weight_string == i18n("Normal"))
selFont.setBold(false);
@@ -2134,9 +2134,9 @@ void CellFormatPageFont::weight_chosen_slot(const QString & weight)
emit fontSelected(selFont);
}
-void CellFormatPageFont::style_chosen_slot(const QString & style)
+void CellFormatPageFont::style_chosen_slot(const TQString & style)
{
- QString style_string = style;
+ TQString style_string = style;
if ( style_string == i18n("Roman"))
selFont.setItalic(false);
@@ -2146,28 +2146,28 @@ void CellFormatPageFont::style_chosen_slot(const QString & style)
}
-void CellFormatPageFont::display_example(const QFont& font)
+void CellFormatPageFont::display_example(const TQFont& font)
{
- QString string;
+ TQString string;
fontChanged=true;
example_label->setFont(font);
- example_label->repaint();
+ example_label->tqrepaint();
}
void CellFormatPageFont::setCombos()
{
- QString string;
- QComboBox* combo;
+ TQString string;
+ TQComboBox* combo;
int number_of_entries;
bool found;
if ( dlg->bTextColor )
textColor = dlg->textColor;
else
- textColor = colorGroup().text();
+ textColor = tqcolorGroup().text();
if ( !textColor.isValid() )
- textColor =colorGroup().text();
+ textColor =tqcolorGroup().text();
textColorButton->setColor( textColor );
@@ -2182,7 +2182,7 @@ void CellFormatPageFont::setCombos()
found = false;
for (int i = 0; i < number_of_entries ; i++){
- if ( string == (QString) combo->text(i)){
+ if ( string == (TQString) combo->text(i)){
combo->setCurrentItem(i);
found = true;
// kdDebug(36001) << "Found Size " << string.data() << " setting to item " i << endl;
@@ -2228,8 +2228,8 @@ void CellFormatPageFont::setCombos()
*
***************************************************************************/
-CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialog *_dlg )
- : PositionTab(parent ),
+CellFormatPagePosition::CellFormatPagePosition( TQWidget* tqparent, CellFormatDialog *_dlg )
+ : PositionTab(tqparent ),
dlg( _dlg )
{
if ( dlg->alignX == Format::Left )
@@ -2241,7 +2241,7 @@ CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialo
else if ( dlg->alignX == Format::Undefined )
standard->setChecked( true );
- connect(horizontalGroup, SIGNAL(clicked(int)), this, SLOT(slotStateChanged(int)));
+ connect(horizontalGroup, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotStateChanged(int)));
if ( dlg->alignY ==Format::Top )
top->setChecked( true );
@@ -2265,13 +2265,13 @@ CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialo
mergeCell->setChecked(dlg->isMerged);
mergeCell->setEnabled(!dlg->oneCell && ((!dlg->isRowSelected) && (!dlg->isColumnSelected)));
- QGridLayout *grid2 = new QGridLayout(indentGroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid2 = new TQGridLayout(indentGroup, 1, 1, KDialog::marginHint(), KDialog::spacingHint());
grid2->addRowSpacing( 0, indentGroup->fontMetrics().height()/8 ); // groupbox title
m_indent = new KoUnitDoubleSpinBox( indentGroup, 0.0, 400.0, 10.0,dlg->indent,dlg->getDoc()->unit() );
grid2->addWidget(m_indent, 0, 0);
width = new KoUnitDoubleSpinBox( m_widthPanel );
- QGridLayout *gridWidth = new QGridLayout(m_widthPanel, 1, 1, 0, 0);
+ TQGridLayout *gridWidth = new TQGridLayout(m_widthPanel, 1, 1, 0, 0);
gridWidth->addWidget(width, 0, 0);
width->setValue ( dlg->widthSize );
width->setUnit( dlg->getDoc()->unit() );
@@ -2281,12 +2281,12 @@ CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialo
if ( dlg->isRowSelected )
width->setEnabled(false);
- defaultWidth->setText(i18n("Default width (%1 %2)").arg(KoUnit::toUserValue(dlg->defaultWidthSize, dlg->getDoc()->unit()), 0, 'f', 2).arg(dlg->getDoc()->unitName()));
+ defaultWidth->setText(i18n("Default width (%1 %2)").tqarg(KoUnit::toUserValue(dlg->defaultWidthSize, dlg->getDoc()->unit()), 0, 'f', 2).tqarg(dlg->getDoc()->unitName()));
if ( dlg->isRowSelected )
defaultWidth->setEnabled(false);
height=new KoUnitDoubleSpinBox( m_heightPanel );
- QGridLayout *gridHeight = new QGridLayout(m_heightPanel, 1, 1, 0, 0);
+ TQGridLayout *gridHeight = new TQGridLayout(m_heightPanel, 1, 1, 0, 0);
gridHeight->addWidget(height, 0, 0);
height->setValue( dlg->heightSize );
height->setUnit( dlg->getDoc()->unit() );
@@ -2296,7 +2296,7 @@ CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialo
if ( dlg->isColumnSelected )
height->setEnabled(false);
- defaultHeight->setText(i18n("Default height (%1 %2)").arg(KoUnit::toUserValue(dlg->defaultHeightSize, dlg->getDoc()->unit()), 0, 'f', 2).arg(dlg->getDoc()->unitName())); //annma
+ defaultHeight->setText(i18n("Default height (%1 %2)").tqarg(KoUnit::toUserValue(dlg->defaultHeightSize, dlg->getDoc()->unit()), 0, 'f', 2).tqarg(dlg->getDoc()->unitName())); //annma
if ( dlg->isColumnSelected )
defaultHeight->setEnabled(false);
@@ -2307,11 +2307,11 @@ CellFormatPagePosition::CellFormatPagePosition( QWidget* parent, CellFormatDialo
defaultWidth->setEnabled(false);
}
- connect(defaultWidth , SIGNAL(clicked() ),this, SLOT(slotChangeWidthState()));
- connect(defaultHeight , SIGNAL(clicked() ),this, SLOT(slotChangeHeightState()));
- connect(vertical , SIGNAL(clicked() ),this, SLOT(slotChangeVerticalState()));
- connect(multi , SIGNAL(clicked() ), this, SLOT(slotChangeMultiState()));
- connect(angleRotation, SIGNAL(valueChanged(int)), this, SLOT(slotChangeAngle(int)));
+ connect(defaultWidth , TQT_SIGNAL(clicked() ),this, TQT_SLOT(slotChangeWidthState()));
+ connect(defaultHeight , TQT_SIGNAL(clicked() ),this, TQT_SLOT(slotChangeHeightState()));
+ connect(vertical , TQT_SIGNAL(clicked() ),this, TQT_SLOT(slotChangeVerticalState()));
+ connect(multi , TQT_SIGNAL(clicked() ), this, TQT_SLOT(slotChangeMultiState()));
+ connect(angleRotation, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotChangeAngle(int)));
slotStateChanged( 0 );
m_bOptionText = false;
@@ -2529,16 +2529,16 @@ double CellFormatPagePosition::getSizeWidth() const
*
***************************************************************************/
-BorderButton::BorderButton( QWidget *parent, const char *_name ) : QPushButton(parent,_name)
+BorderButton::BorderButton( TQWidget *tqparent, const char *_name ) : TQPushButton(tqparent,_name)
{
penStyle = Qt::NoPen;
penWidth = 1;
- penColor = colorGroup().text();
+ penColor = tqcolorGroup().text();
setToggleButton( true );
setOn( false);
setChanged(false);
}
-void BorderButton::mousePressEvent( QMouseEvent * )
+void BorderButton::mousePressEvent( TQMouseEvent * )
{
this->setOn(!isOn());
@@ -2547,9 +2547,9 @@ void BorderButton::mousePressEvent( QMouseEvent * )
void BorderButton::setUndefined()
{
- setPenStyle(SolidLine );
+ setPenStyle(Qt::SolidLine );
setPenWidth(1);
- setColor(colorGroup().midlight());
+ setColor(tqcolorGroup().midlight());
}
@@ -2558,7 +2558,7 @@ void BorderButton::unselect()
setOn(false);
setPenWidth(1);
setPenStyle(Qt::NoPen);
- setColor( colorGroup().text() );
+ setColor( tqcolorGroup().text() );
setChanged(true);
}
@@ -2570,8 +2570,8 @@ void BorderButton::unselect()
*
***************************************************************************/
-Border::Border( QWidget *parent, const char *_name,bool _oneCol, bool _oneRow )
- : QFrame( parent, _name )
+Border::Border( TQWidget *tqparent, const char *_name,bool _oneCol, bool _oneRow )
+ : TQFrame( tqparent, _name )
{
oneCol=_oneCol;
oneRow=_oneRow;
@@ -2580,13 +2580,13 @@ Border::Border( QWidget *parent, const char *_name,bool _oneCol, bool _oneRow )
#define OFFSETX 5
#define OFFSETY 5
-void Border::paintEvent( QPaintEvent *_ev )
+void Border::paintEvent( TQPaintEvent *_ev )
{
- QFrame::paintEvent( _ev );
- QPen pen;
- QPainter painter;
+ TQFrame::paintEvent( _ev );
+ TQPen pen;
+ TQPainter painter;
painter.begin( this );
- pen=QPen( colorGroup().midlight(),2,SolidLine);
+ pen=TQPen( tqcolorGroup().midlight(),2,SolidLine);
painter.setPen( pen );
painter.drawLine( OFFSETX-5, OFFSETY, OFFSETX , OFFSETY );
@@ -2617,7 +2617,7 @@ void Border::paintEvent( QPaintEvent *_ev )
emit redraw();
}
-void Border::mousePressEvent( QMouseEvent* _ev )
+void Border::mousePressEvent( TQMouseEvent* _ev )
{
emit choosearea(_ev);
}
@@ -2630,8 +2630,8 @@ void Border::mousePressEvent( QMouseEvent* _ev )
*
***************************************************************************/
-CellFormatPageBorder::CellFormatPageBorder( QWidget* parent, CellFormatDialog *_dlg )
- : QWidget( parent ),
+CellFormatPageBorder::CellFormatPageBorder( TQWidget* tqparent, CellFormatDialog *_dlg )
+ : TQWidget( tqparent ),
dlg( _dlg )
{
sheet = dlg->getSheet();
@@ -2646,15 +2646,15 @@ CellFormatPageBorder::CellFormatPageBorder( QWidget* parent, CellFormatDialog *_
style->setEnabled(false);
size->setEnabled(false);
- preview->setPattern( black , 1, SolidLine );
+ preview->setPattern( black , 1, Qt::SolidLine );
this->resize( 400, 400 );
}
void CellFormatPageBorder::InitializeGrids()
{
- QGridLayout *grid = new QGridLayout(this,5,2,KDialog::marginHint(), KDialog::spacingHint());
- QGridLayout *grid2 = NULL;
- QGroupBox* tmpQGroupBox = NULL;
+ TQGridLayout *grid = new TQGridLayout(this,5,2,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid2 = NULL;
+ TQGroupBox* tmpTQGroupBox = NULL;
/***********************/
/* here is the data to initialize all the border buttons with */
@@ -2664,11 +2664,11 @@ void CellFormatPageBorder::InitializeGrids()
const char shortcutButtonNames[BorderShortcutType_END][20] =
{"remove", "all", "outline"};
- QString borderButtonIconNames[BorderType_END] =
+ TQString borderButtonIconNames[BorderType_END] =
{"border_top", "border_bottom", "border_left", "border_right",
"border_vertical", "border_horizontal", "border_fall", "border_up"};
- QString shortcutButtonIconNames[BorderShortcutType_END] =
+ TQString shortcutButtonIconNames[BorderShortcutType_END] =
{ "border_remove", "", "border_outline"};
int borderButtonPositions[BorderType_END][2] =
@@ -2678,40 +2678,40 @@ void CellFormatPageBorder::InitializeGrids()
{ {0,0}, {0,1},{0,2} };
/***********************/
- /* set up a layout box for most of the border setting buttons */
- tmpQGroupBox = new QGroupBox( this, "GroupBox_1" );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setTitle( i18n("Border") );
- tmpQGroupBox->setAlignment( AlignLeft );
- grid2 = new QGridLayout(tmpQGroupBox,6,5,KDialog::marginHint(), KDialog::spacingHint());
- int fHeight = tmpQGroupBox->fontMetrics().height();
+ /* set up a tqlayout box for most of the border setting buttons */
+ tmpTQGroupBox = new TQGroupBox( this, "GroupBox_1" );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->setTitle( i18n("Border") );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
+ grid2 = new TQGridLayout(tmpTQGroupBox,6,5,KDialog::marginHint(), KDialog::spacingHint());
+ int fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
- area=new Border(tmpQGroupBox,"area",dlg->oneCol,dlg->oneRow);
+ area=new Border(tmpTQGroupBox,"area",dlg->oneCol,dlg->oneRow);
grid2->addMultiCellWidget(area,2,4,1,3);
- area->setBackgroundColor( colorGroup().base() );
+ area->setBackgroundColor( tqcolorGroup().base() );
/* initailize the buttons that are in this box */
for (int i=BorderType_Top; i < BorderType_END; i++)
{
- borderButtons[i] = new BorderButton(tmpQGroupBox,
+ borderButtons[i] = new BorderButton(tmpTQGroupBox,
borderButtonNames[i]);
loadIcon(borderButtonIconNames[i], borderButtons[i]);
grid2->addWidget(borderButtons[i], borderButtonPositions[i][0] + 1,
borderButtonPositions[i][1]);
}
- grid->addMultiCellWidget(tmpQGroupBox,0,2,0,0);
+ grid->addMultiCellWidget(tmpTQGroupBox,0,2,0,0);
/* the remove, all, and outline border buttons are in a second box down
below.*/
- tmpQGroupBox = new QGroupBox( this, "GroupBox_3" );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setTitle( i18n("Preselect") );
- tmpQGroupBox->setAlignment( AlignLeft );
+ tmpTQGroupBox = new TQGroupBox( this, "GroupBox_3" );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->setTitle( i18n("Preselect") );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
- grid2 = new QGridLayout(tmpQGroupBox,1,3,KDialog::marginHint(), KDialog::spacingHint());
+ grid2 = new TQGridLayout(tmpTQGroupBox,1,3,KDialog::marginHint(), KDialog::spacingHint());
/* the "all" button is different depending on what kind of region is currently
selected */
@@ -2730,7 +2730,7 @@ void CellFormatPageBorder::InitializeGrids()
for (int i=BorderShortcutType_Remove; i < BorderShortcutType_END; i++)
{
- shortcutButtons[i] = new BorderButton(tmpQGroupBox,
+ shortcutButtons[i] = new BorderButton(tmpTQGroupBox,
shortcutButtonNames[i]);
loadIcon(shortcutButtonIconNames[i], shortcutButtons[i]);
grid2->addWidget(shortcutButtons[i], shortcutButtonPositions[i][0],
@@ -2742,16 +2742,16 @@ void CellFormatPageBorder::InitializeGrids()
shortcutButtons[BorderShortcutType_All]->setEnabled(false);
}
- grid->addMultiCellWidget(tmpQGroupBox,3,4,0,0);
+ grid->addMultiCellWidget(tmpTQGroupBox,3,4,0,0);
/* now set up the group box with the pattern selector */
- tmpQGroupBox = new QGroupBox( this, "GroupBox_10" );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setTitle( i18n("Pattern") );
- tmpQGroupBox->setAlignment( AlignLeft );
+ tmpTQGroupBox = new TQGroupBox( this, "GroupBox_10" );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->setTitle( i18n("Pattern") );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
- grid2 = new QGridLayout(tmpQGroupBox,7,2,KDialog::marginHint(), KDialog::spacingHint());
- fHeight = tmpQGroupBox->fontMetrics().height();
+ grid2 = new TQGridLayout(tmpTQGroupBox,7,2,KDialog::marginHint(), KDialog::spacingHint());
+ fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
char name[] = "PatternXX";
@@ -2761,8 +2761,8 @@ void CellFormatPageBorder::InitializeGrids()
{
name[7] = '0' + (i+1) / 10;
name[8] = '0' + (i+1) % 10;
- pattern[i] = new PatternSelect( tmpQGroupBox, name );
- pattern[i]->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ pattern[i] = new PatternSelect( tmpTQGroupBox, name );
+ pattern[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(pattern[i], i % 5 + 1, i / 5);
/* this puts them in the pattern:
1 6
@@ -2773,23 +2773,23 @@ void CellFormatPageBorder::InitializeGrids()
*/
}
- color = new KColorButton (tmpQGroupBox, "PushButton_1" );
+ color = new KColorButton (tmpTQGroupBox, "PushButton_1" );
grid2->addWidget(color,7,1);
- QLabel *tmpQLabel = new QLabel( tmpQGroupBox, "Label_6" );
- tmpQLabel->setText( i18n("Color:") );
- grid2->addWidget(tmpQLabel,7,0);
+ TQLabel *tmpTQLabel = new TQLabel( tmpTQGroupBox, "Label_6" );
+ tmpTQLabel->setText( i18n("Color:") );
+ grid2->addWidget(tmpTQLabel,7,0);
/* tack on the 'customize' border pattern selector */
- QGridLayout *grid3 = new QGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
- customize = new QCheckBox(i18n("Customize"),tmpQGroupBox);
+ TQGridLayout *grid3 = new TQGridLayout( this, 2, 2, KDialog::marginHint(), KDialog::spacingHint() );
+ customize = new TQCheckBox(i18n("Customize"),tmpTQGroupBox);
grid3->addWidget(customize,0,0);
- connect( customize, SIGNAL( clicked()), SLOT(cutomize_chosen_slot()) );
+ connect( customize, TQT_SIGNAL( clicked()), TQT_SLOT(cutomize_chosen_slot()) );
- size=new QComboBox(true,tmpQGroupBox);
+ size=new TQComboBox(true,tmpTQGroupBox);
grid3->addWidget(size,1,1);
size->setValidator(new KIntValidator( size ));
- QString tmp;
+ TQString tmp;
for ( int i=0;i<10;i++)
{
tmp=tmp.setNum(i);
@@ -2797,40 +2797,40 @@ void CellFormatPageBorder::InitializeGrids()
}
size->setCurrentItem(1);
- style=new QComboBox(tmpQGroupBox);
+ style=new TQComboBox(tmpTQGroupBox);
grid3->addWidget(style,1,0);
style->insertItem(paintFormatPixmap(DotLine),0 );
style->insertItem(paintFormatPixmap(DashLine) ,1);
style->insertItem(paintFormatPixmap(DashDotLine),2 );
style->insertItem(paintFormatPixmap(DashDotDotLine),3 );
style->insertItem(paintFormatPixmap(SolidLine),4);
- style->setBackgroundColor( colorGroup().background() );
+ style->setBackgroundColor( tqcolorGroup().background() );
grid2->addMultiCell(grid3,6,6,0,1);
- grid->addMultiCellWidget(tmpQGroupBox,0,3,1,1);
+ grid->addMultiCellWidget(tmpTQGroupBox,0,3,1,1);
/* Now the preview box is put together */
- tmpQGroupBox = new QGroupBox(this, "GroupBox_4" );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setTitle( i18n("Preview") );
- tmpQGroupBox->setAlignment( AlignLeft );
+ tmpTQGroupBox = new TQGroupBox(this, "GroupBox_4" );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->setTitle( i18n("Preview") );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
- grid2 = new QGridLayout(tmpQGroupBox,1,1,KDialog::marginHint(), KDialog::spacingHint());
- fHeight = tmpQGroupBox->fontMetrics().height();
+ grid2 = new TQGridLayout(tmpTQGroupBox,1,1,KDialog::marginHint(), KDialog::spacingHint());
+ fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
- preview = new PatternSelect( tmpQGroupBox, "Pattern_preview" );
- preview->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ preview = new PatternSelect( tmpTQGroupBox, "Pattern_preview" );
+ preview->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(preview,1,0);
- grid->addWidget(tmpQGroupBox,4,1);
+ grid->addWidget(tmpTQGroupBox,4,1);
}
void CellFormatPageBorder::InitializeBorderButtons()
{
for (int i=BorderType_Top; i < BorderType_END; i++)
{
- if (dlg->borders[i].style != Qt::NoPen ||
+ if (dlg->borders[i].style != TQt::NoPen ||
!dlg->borders[i].bStyle )
{
/* the horozontil and vertical buttons might be disabled depending on what
@@ -2859,51 +2859,51 @@ void CellFormatPageBorder::InitializeBorderButtons()
void CellFormatPageBorder::InitializePatterns()
{
- pattern[0]->setPattern( black, 1, DotLine );
- pattern[1]->setPattern( black, 1, DashLine );
- pattern[2]->setPattern( black, 1, SolidLine );
- pattern[3]->setPattern( black, 1, DashDotLine );
- pattern[4]->setPattern( black, 1, DashDotDotLine );
- pattern[5]->setPattern( black, 2, SolidLine );
- pattern[6]->setPattern( black, 3, SolidLine );
- pattern[7]->setPattern( black, 4, SolidLine );
- pattern[8]->setPattern( black, 5, SolidLine );
- pattern[9]->setPattern( black, 1, NoPen );
+ pattern[0]->setPattern( black, 1, Qt::DotLine );
+ pattern[1]->setPattern( black, 1, Qt::DashLine );
+ pattern[2]->setPattern( black, 1, Qt::SolidLine );
+ pattern[3]->setPattern( black, 1, Qt::DashDotLine );
+ pattern[4]->setPattern( black, 1, Qt::DashDotDotLine );
+ pattern[5]->setPattern( black, 2, Qt::SolidLine );
+ pattern[6]->setPattern( black, 3, Qt::SolidLine );
+ pattern[7]->setPattern( black, 4, Qt::SolidLine );
+ pattern[8]->setPattern( black, 5, Qt::SolidLine );
+ pattern[9]->setPattern( black, 1, Qt::NoPen );
slotSetColorButton( black );
}
void CellFormatPageBorder::SetConnections()
{
- connect( color, SIGNAL( changed( const QColor & ) ),
- this, SLOT( slotSetColorButton( const QColor & ) ) );
+ connect( color, TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( slotSetColorButton( const TQColor & ) ) );
for (int i=0; i < NUM_BORDER_PATTERNS; i++)
{
- connect( pattern[i], SIGNAL( clicked( PatternSelect* ) ),
- this, SLOT( slotUnselect2( PatternSelect* ) ) );
+ connect( pattern[i], TQT_SIGNAL( clicked( PatternSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( PatternSelect* ) ) );
}
for (int i = BorderType_Top; i < BorderType_END; i++)
{
- connect( borderButtons[i], SIGNAL( clicked (BorderButton *) ),
- this, SLOT( changeState( BorderButton *) ) );
+ connect( borderButtons[i], TQT_SIGNAL( clicked (BorderButton *) ),
+ this, TQT_SLOT( changeState( BorderButton *) ) );
}
for (int i = BorderShortcutType_Remove; i < BorderShortcutType_END; i++)
{
- connect( shortcutButtons[i], SIGNAL( clicked(BorderButton *) ),
- this, SLOT( preselect(BorderButton *) ) );
+ connect( shortcutButtons[i], TQT_SIGNAL( clicked(BorderButton *) ),
+ this, TQT_SLOT( preselect(BorderButton *) ) );
}
- connect( area ,SIGNAL( redraw()),this,SLOT(draw()));
- connect( area ,SIGNAL( choosearea(QMouseEvent * )),
- this,SLOT( slotPressEvent(QMouseEvent *)));
+ connect( area ,TQT_SIGNAL( redraw()),this,TQT_SLOT(draw()));
+ connect( area ,TQT_SIGNAL( choosearea(TQMouseEvent * )),
+ this,TQT_SLOT( slotPressEvent(TQMouseEvent *)));
- connect( style, SIGNAL( activated(int)), this, SLOT(slotChangeStyle(int)));
- connect( size, SIGNAL( textChanged(const QString &)),
- this, SLOT(slotChangeStyle(const QString &)));
- connect( size ,SIGNAL( activated(int)), this, SLOT(slotChangeStyle(int)));
+ connect( style, TQT_SIGNAL( activated(int)), this, TQT_SLOT(slotChangeStyle(int)));
+ connect( size, TQT_SIGNAL( textChanged(const TQString &)),
+ this, TQT_SLOT(slotChangeStyle(const TQString &)));
+ connect( size ,TQT_SIGNAL( activated(int)), this, TQT_SLOT(slotChangeStyle(int)));
}
void CellFormatPageBorder::cutomize_chosen_slot()
@@ -2919,11 +2919,11 @@ void CellFormatPageBorder::cutomize_chosen_slot()
style->setEnabled( false );
size->setEnabled( false );
pattern[2]->slotSelect();
- preview->setPattern( black , 1, SolidLine );
+ preview->setPattern( black , 1, Qt::SolidLine );
}
}
-void CellFormatPageBorder::slotChangeStyle(const QString &)
+void CellFormatPageBorder::slotChangeStyle(const TQString &)
{
/* if they try putting text in the size box, then erase the line */
slotChangeStyle(0);
@@ -2932,30 +2932,30 @@ void CellFormatPageBorder::slotChangeStyle(const QString &)
void CellFormatPageBorder::slotChangeStyle(int)
{
int index = style->currentItem();
- QString tmp;
+ TQString tmp;
int penSize = size->currentText().toInt();
if ( !penSize)
{
- preview->setPattern( preview->getColor(), penSize, NoPen );
+ preview->setPattern( preview->getColor(), penSize, Qt::NoPen );
}
else
{
switch(index)
{
case 0:
- preview->setPattern( preview->getColor(), penSize, DotLine );
+ preview->setPattern( preview->getColor(), penSize, Qt::DotLine );
break;
case 1:
- preview->setPattern( preview->getColor(), penSize, DashLine );
+ preview->setPattern( preview->getColor(), penSize, Qt::DashLine );
break;
case 2:
- preview->setPattern( preview->getColor(), penSize, DashDotLine );
+ preview->setPattern( preview->getColor(), penSize, Qt::DashDotLine );
break;
case 3:
- preview->setPattern( preview->getColor(), penSize, DashDotDotLine );
+ preview->setPattern( preview->getColor(), penSize, Qt::DashDotDotLine );
break;
case 4:
- preview->setPattern( preview->getColor(), penSize, SolidLine );
+ preview->setPattern( preview->getColor(), penSize, Qt::SolidLine );
break;
default:
kdDebug(36001)<<"Error in combobox\n";
@@ -2965,23 +2965,23 @@ void CellFormatPageBorder::slotChangeStyle(int)
slotUnselect2(preview);
}
-QPixmap CellFormatPageBorder::paintFormatPixmap(PenStyle _style)
+TQPixmap CellFormatPageBorder::paintFormatPixmap(PenStyle _style)
{
- QPixmap pixmap( style->width(), 14 );
- QPainter painter;
- QPen pen;
- pen=QPen( colorGroup().text(),1,_style);
+ TQPixmap pixmap( style->width(), 14 );
+ TQPainter painter;
+ TQPen pen;
+ pen=TQPen( tqcolorGroup().text(),1,_style);
painter.begin( &pixmap );
- painter.fillRect( 0, 0, style->width(), 14, colorGroup().background() );
+ painter.fillRect( 0, 0, style->width(), 14, tqcolorGroup().background() );
painter.setPen( pen );
painter.drawLine( 0, 7, style->width(), 7 );
painter.end();
return pixmap;
}
-void CellFormatPageBorder::loadIcon( QString _pix, BorderButton *_button)
+void CellFormatPageBorder::loadIcon( TQString _pix, BorderButton *_button)
{
- _button->setPixmap( QPixmap( BarIcon(_pix, Factory::global()) ) );
+ _button->setPixmap( TQPixmap( BarIcon(_pix, Factory::global()) ) );
}
void CellFormatPageBorder::apply(FormatManipulator* obj)
@@ -3013,7 +3013,7 @@ void CellFormatPageBorder::applyTopOutline(FormatManipulator* obj)
{
BorderButton * top = borderButtons[BorderType_Top];
- QPen tmpPen( top->getColor(), top->getPenWidth(), top->getPenStyle());
+ TQPen tmpPen( top->getColor(), top->getPenWidth(), top->getPenStyle());
if ( dlg->getStyle() )
{
@@ -3030,7 +3030,7 @@ void CellFormatPageBorder::applyBottomOutline(FormatManipulator* obj)
{
BorderButton * bottom = borderButtons[BorderType_Bottom];
- QPen tmpPen( bottom->getColor(), bottom->getPenWidth(), bottom->getPenStyle() );
+ TQPen tmpPen( bottom->getColor(), bottom->getPenWidth(), bottom->getPenStyle() );
if ( dlg->getStyle() )
{
@@ -3046,7 +3046,7 @@ void CellFormatPageBorder::applyBottomOutline(FormatManipulator* obj)
void CellFormatPageBorder::applyLeftOutline(FormatManipulator* obj)
{
BorderButton * left = borderButtons[BorderType_Left];
- QPen tmpPen( left->getColor(), left->getPenWidth(), left->getPenStyle() );
+ TQPen tmpPen( left->getColor(), left->getPenWidth(), left->getPenStyle() );
if ( dlg->getStyle() )
{
@@ -3062,7 +3062,7 @@ void CellFormatPageBorder::applyLeftOutline(FormatManipulator* obj)
void CellFormatPageBorder::applyRightOutline(FormatManipulator* obj)
{
BorderButton* right = borderButtons[BorderType_Right];
- QPen tmpPen( right->getColor(), right->getPenWidth(), right->getPenStyle() );
+ TQPen tmpPen( right->getColor(), right->getPenWidth(), right->getPenStyle() );
if ( dlg->getStyle() )
{
@@ -3079,9 +3079,9 @@ void CellFormatPageBorder::applyDiagonalOutline(FormatManipulator* obj)
{
BorderButton * fallDiagonal = borderButtons[BorderType_FallingDiagonal];
BorderButton * goUpDiagonal = borderButtons[BorderType_RisingDiagonal];
- QPen tmpPenFall( fallDiagonal->getColor(), fallDiagonal->getPenWidth(),
+ TQPen tmpPenFall( fallDiagonal->getColor(), fallDiagonal->getPenWidth(),
fallDiagonal->getPenStyle());
- QPen tmpPenGoUp( goUpDiagonal->getColor(), goUpDiagonal->getPenWidth(),
+ TQPen tmpPenGoUp( goUpDiagonal->getColor(), goUpDiagonal->getPenWidth(),
goUpDiagonal->getPenStyle());
if ( dlg->getStyle() )
@@ -3102,7 +3102,7 @@ void CellFormatPageBorder::applyDiagonalOutline(FormatManipulator* obj)
void CellFormatPageBorder::applyHorizontalOutline(FormatManipulator* obj)
{
- QPen tmpPen( borderButtons[BorderType_Horizontal]->getColor(),
+ TQPen tmpPen( borderButtons[BorderType_Horizontal]->getColor(),
borderButtons[BorderType_Horizontal]->getPenWidth(),
borderButtons[BorderType_Horizontal]->getPenStyle());
@@ -3120,7 +3120,7 @@ void CellFormatPageBorder::applyHorizontalOutline(FormatManipulator* obj)
void CellFormatPageBorder::applyVerticalOutline(FormatManipulator* obj)
{
BorderButton* vertical = borderButtons[BorderType_Vertical];
- QPen tmpPen( vertical->getColor(), vertical->getPenWidth(),
+ TQPen tmpPen( vertical->getColor(), vertical->getPenWidth(),
vertical->getPenStyle());
if ( dlg->getStyle() )
@@ -3135,7 +3135,7 @@ void CellFormatPageBorder::applyVerticalOutline(FormatManipulator* obj)
}
-void CellFormatPageBorder::slotSetColorButton( const QColor &_color )
+void CellFormatPageBorder::slotSetColorButton( const TQColor &_color )
{
currentColor = _color;
@@ -3223,7 +3223,7 @@ void CellFormatPageBorder::preselect( BorderButton *_p )
vertical->setChanged(true);
}
}
- area->repaint();
+ area->tqrepaint();
}
void CellFormatPageBorder::changeState( BorderButton *_p)
@@ -3240,10 +3240,10 @@ void CellFormatPageBorder::changeState( BorderButton *_p)
{
_p->setPenWidth(1);
_p->setPenStyle(Qt::NoPen);
- _p->setColor( colorGroup().text() );
+ _p->setColor( tqcolorGroup().text() );
}
- area->repaint();
+ area->tqrepaint();
}
void CellFormatPageBorder::draw()
@@ -3256,39 +3256,39 @@ void CellFormatPageBorder::draw()
BorderButton* fallingDiagonal = borderButtons[BorderType_FallingDiagonal];
BorderButton* vertical = borderButtons[BorderType_Vertical];
BorderButton* horizontal = borderButtons[BorderType_Horizontal];
- QPen pen;
- QPainter painter;
+ TQPen pen;
+ TQPainter painter;
painter.begin( area );
- if ((bottom->getPenStyle())!=Qt::NoPen)
+ if ((bottom->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( bottom->getColor(), bottom->getPenWidth(),bottom->getPenStyle());
+ pen=TQPen( bottom->getColor(), bottom->getPenWidth(),bottom->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX, area->height()-OFFSETY, area->width()-OFFSETX , area->height()-OFFSETY );
}
- if ((top->getPenStyle())!=Qt::NoPen)
+ if ((top->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( top->getColor(), top->getPenWidth(),top->getPenStyle());
+ pen=TQPen( top->getColor(), top->getPenWidth(),top->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX, OFFSETY, area->width() -OFFSETX, OFFSETY );
}
- if ((left->getPenStyle())!=Qt::NoPen)
+ if ((left->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( left->getColor(), left->getPenWidth(),left->getPenStyle());
+ pen=TQPen( left->getColor(), left->getPenWidth(),left->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX, OFFSETY, OFFSETX , area->height()-OFFSETY );
}
- if ((right->getPenStyle())!=Qt::NoPen)
+ if ((right->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( right->getColor(), right->getPenWidth(),right->getPenStyle());
+ pen=TQPen( right->getColor(), right->getPenWidth(),right->getPenStyle());
painter.setPen( pen );
painter.drawLine( area->width()-OFFSETX, OFFSETY, area->width()-OFFSETX,
area->height()-OFFSETY );
}
- if ((fallingDiagonal->getPenStyle())!=Qt::NoPen)
+ if ((fallingDiagonal->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( fallingDiagonal->getColor(), fallingDiagonal->getPenWidth(),
+ pen=TQPen( fallingDiagonal->getColor(), fallingDiagonal->getPenWidth(),
fallingDiagonal->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX, OFFSETY, area->width()-OFFSETX,
@@ -3301,9 +3301,9 @@ void CellFormatPageBorder::draw()
area->height()-OFFSETY );
}
}
- if ((risingDiagonal->getPenStyle())!=Qt::NoPen)
+ if ((risingDiagonal->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( risingDiagonal->getColor(), risingDiagonal->getPenWidth(),
+ pen=TQPen( risingDiagonal->getColor(), risingDiagonal->getPenWidth(),
risingDiagonal->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX, area->height()-OFFSETY , area->width()-OFFSETX ,
@@ -3316,16 +3316,16 @@ void CellFormatPageBorder::draw()
}
}
- if ((vertical->getPenStyle())!=Qt::NoPen)
+ if ((vertical->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( vertical->getColor(), vertical->getPenWidth(),
+ pen=TQPen( vertical->getColor(), vertical->getPenWidth(),
vertical->getPenStyle());
painter.setPen( pen );
painter.drawLine( area->width()/2, 5 , area->width()/2 , area->height()-5 );
}
- if ((horizontal->getPenStyle())!=Qt::NoPen)
+ if ((horizontal->getPenStyle())!=TQt::NoPen)
{
- pen=QPen( horizontal->getColor(), horizontal->getPenWidth(),
+ pen=TQPen( horizontal->getColor(), horizontal->getPenWidth(),
horizontal->getPenStyle());
painter.setPen( pen );
painter.drawLine( OFFSETX,area->height()/2,area->width()-OFFSETX,
@@ -3350,7 +3350,7 @@ void CellFormatPageBorder::invertState(BorderButton *_p)
}
}
-void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
+void CellFormatPageBorder::slotPressEvent(TQMouseEvent *_ev)
{
BorderButton* top = borderButtons[BorderType_Top];
BorderButton* bottom = borderButtons[BorderType_Bottom];
@@ -3360,8 +3360,8 @@ void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
BorderButton* horizontal = borderButtons[BorderType_Horizontal];
- QRect rect(OFFSETX,OFFSETY-8,area->width()-OFFSETX,OFFSETY+8);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ TQRect rect(OFFSETX,OFFSETY-8,area->width()-OFFSETX,OFFSETY+8);
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((top->getPenWidth()!=preview->getPenWidth()) ||
(top->getColor()!=currentColor) ||
@@ -3378,7 +3378,7 @@ void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
}
rect.setCoords(OFFSETX,area->height()-OFFSETY-8,area->width()-OFFSETX,
area->height()-OFFSETY+8);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((bottom->getPenWidth()!=preview->getPenWidth()) ||
(bottom->getColor()!=currentColor) ||
@@ -3395,7 +3395,7 @@ void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
}
rect.setCoords(OFFSETX-8,OFFSETY,OFFSETX+8,area->height()-OFFSETY);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((left->getPenWidth()!=preview->getPenWidth()) ||
(left->getColor()!=currentColor) ||
@@ -3412,7 +3412,7 @@ void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
}
rect.setCoords(area->width()-OFFSETX-8,OFFSETY,area->width()-OFFSETX+8,
area->height()-OFFSETY);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((right->getPenWidth()!=preview->getPenWidth()) ||
(right->getColor()!=currentColor) ||
@@ -3431,12 +3431,12 @@ void CellFormatPageBorder::slotPressEvent(QMouseEvent *_ev)
//don't work because I don't know how create a rectangle
//for diagonal
/*rect.setCoords(OFFSETX,OFFSETY,XLEN-OFFSETX,YHEI-OFFSETY);
-if (rect.contains(QPoint(_ev->x(),_ev->y())))
+if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
invertState(fallDiagonal);
}
rect.setCoords(OFFSETX,YHEI-OFFSETY,XLEN-OFFSETX,OFFSETY);
-if (rect.contains(QPoint(_ev->x(),_ev->y())))
+if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
invertState(goUpDiagonal);
} */
@@ -3446,7 +3446,7 @@ if (rect.contains(QPoint(_ev->x(),_ev->y())))
rect.setCoords(area->width()/2-8,OFFSETY,area->width()/2+8,
area->height()-OFFSETY);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((vertical->getPenWidth()!=preview->getPenWidth()) ||
(vertical->getColor()!=currentColor) ||
@@ -3466,7 +3466,7 @@ if (rect.contains(QPoint(_ev->x(),_ev->y())))
{
rect.setCoords(OFFSETX,area->height()/2-8,area->width()-OFFSETX,
area->height()/2+8);
- if (rect.contains(QPoint(_ev->x(),_ev->y())))
+ if (rect.tqcontains(TQPoint(_ev->x(),_ev->y())))
{
if (((horizontal->getPenWidth()!=preview->getPenWidth()) ||
(horizontal->getColor()!=currentColor) ||
@@ -3483,7 +3483,7 @@ if (rect.contains(QPoint(_ev->x(),_ev->y())))
}
}
- area->repaint();
+ area->tqrepaint();
}
@@ -3494,35 +3494,35 @@ if (rect.contains(QPoint(_ev->x(),_ev->y())))
*
***************************************************************************/
-BrushSelect::BrushSelect( QWidget *parent, const char * ) : QFrame( parent )
+BrushSelect::BrushSelect( TQWidget *tqparent, const char * ) : TQFrame( tqparent )
{
brushStyle = Qt::NoBrush;
- brushColor = Qt::red;
+ brushColor = TQt::red;
selected = false;
}
-void BrushSelect::setPattern( const QColor &_color,BrushStyle _style )
+void BrushSelect::setPattern( const TQColor &_color,Qt::BrushStyle _style )
{
brushStyle = _style;
brushColor = _color;
- repaint();
+ tqrepaint();
}
-void BrushSelect::paintEvent( QPaintEvent *_ev )
+void BrushSelect::paintEvent( TQPaintEvent *_ev )
{
- QFrame::paintEvent( _ev );
+ TQFrame::paintEvent( _ev );
- QPainter painter;
- QBrush brush(brushColor,brushStyle);
+ TQPainter painter;
+ TQBrush brush(brushColor,brushStyle);
painter.begin( this );
- painter.setPen( Qt::NoPen );
+ painter.setPen( TQt::NoPen );
painter.setBrush( brush);
painter.drawRect( 2, 2, width()-4, height()-4);
painter.end();
}
-void BrushSelect::mousePressEvent( QMouseEvent * )
+void BrushSelect::mousePressEvent( TQMouseEvent * )
{
slotSelect();
@@ -3534,8 +3534,8 @@ void BrushSelect::slotUnselect()
selected = false;
setLineWidth( 1 );
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
- repaint();
+ setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ tqrepaint();
}
void BrushSelect::slotSelect()
@@ -3543,8 +3543,8 @@ void BrushSelect::slotSelect()
selected = true;
setLineWidth( 2 );
- setFrameStyle( QFrame::Panel | QFrame::Plain );
- repaint();
+ setFrameStyle( TQFrame::Panel | TQFrame::Plain );
+ tqrepaint();
}
@@ -3555,186 +3555,186 @@ void BrushSelect::slotSelect()
*
***************************************************************************/
-CellFormatPagePattern::CellFormatPagePattern( QWidget* parent, CellFormatDialog *_dlg ) : QWidget( parent )
+CellFormatPagePattern::CellFormatPagePattern( TQWidget* tqparent, CellFormatDialog *_dlg ) : TQWidget( tqparent )
{
dlg = _dlg;
bBgColorUndefined = !dlg->bBgColor;
- QGridLayout *grid = new QGridLayout(this,5,2,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid = new TQGridLayout(this,5,2,KDialog::marginHint(), KDialog::spacingHint());
- QGroupBox* tmpQGroupBox;
- tmpQGroupBox = new QGroupBox( this, "GroupBox_20" );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setTitle( i18n("Pattern") );
- tmpQGroupBox->setAlignment( AlignLeft );
+ TQGroupBox* tmpTQGroupBox;
+ tmpTQGroupBox = new TQGroupBox( this, "GroupBox_20" );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->setTitle( i18n("Pattern") );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
- QGridLayout *grid2 = new QGridLayout(tmpQGroupBox,8,3,KDialog::marginHint(), KDialog::spacingHint());
- int fHeight = tmpQGroupBox->fontMetrics().height();
+ TQGridLayout *grid2 = new TQGridLayout(tmpTQGroupBox,8,3,KDialog::marginHint(), KDialog::spacingHint());
+ int fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
- brush1 = new BrushSelect( tmpQGroupBox, "Frame_1" );
- brush1->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush1 = new BrushSelect( tmpTQGroupBox, "Frame_1" );
+ brush1->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush1,1,0);
- brush2 = new BrushSelect( tmpQGroupBox, "Frame_2" );
- brush2->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush2 = new BrushSelect( tmpTQGroupBox, "Frame_2" );
+ brush2->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush2,1,1);
- brush3 = new BrushSelect( tmpQGroupBox, "Frame_3" );
- brush3->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush3 = new BrushSelect( tmpTQGroupBox, "Frame_3" );
+ brush3->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush3,1,2);
- brush4 = new BrushSelect( tmpQGroupBox, "Frame_4" );
- brush4->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush4 = new BrushSelect( tmpTQGroupBox, "Frame_4" );
+ brush4->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush4,2,0);
- brush5 = new BrushSelect( tmpQGroupBox, "Frame_5" );
- brush5->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush5 = new BrushSelect( tmpTQGroupBox, "Frame_5" );
+ brush5->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush5,2,1);
- brush6 = new BrushSelect( tmpQGroupBox, "Frame_6" );
- brush6->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush6 = new BrushSelect( tmpTQGroupBox, "Frame_6" );
+ brush6->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush6,2,2);
- brush7 = new BrushSelect( tmpQGroupBox, "Frame_7" );
- brush7->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush7 = new BrushSelect( tmpTQGroupBox, "Frame_7" );
+ brush7->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush7,3,0);
- brush8 = new BrushSelect( tmpQGroupBox, "Frame_8" );
- brush8->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush8 = new BrushSelect( tmpTQGroupBox, "Frame_8" );
+ brush8->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush8,3,1);
- brush9 = new BrushSelect( tmpQGroupBox, "Frame_9" );
- brush9->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush9 = new BrushSelect( tmpTQGroupBox, "Frame_9" );
+ brush9->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush9,3,2);
- brush10 = new BrushSelect( tmpQGroupBox, "Frame_10" );
- brush10->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush10 = new BrushSelect( tmpTQGroupBox, "Frame_10" );
+ brush10->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush10,4,0);
- brush11 = new BrushSelect( tmpQGroupBox, "Frame_11" );
- brush11->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush11 = new BrushSelect( tmpTQGroupBox, "Frame_11" );
+ brush11->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush11,4,1);
- brush12 = new BrushSelect( tmpQGroupBox, "Frame_12" );
- brush12->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush12 = new BrushSelect( tmpTQGroupBox, "Frame_12" );
+ brush12->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush12,4,2);
- brush13 = new BrushSelect( tmpQGroupBox, "Frame_13" );
- brush13->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush13 = new BrushSelect( tmpTQGroupBox, "Frame_13" );
+ brush13->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush13,5,0);
- brush14 = new BrushSelect( tmpQGroupBox, "Frame_14" );
- brush14->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush14 = new BrushSelect( tmpTQGroupBox, "Frame_14" );
+ brush14->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush14,5,1);
- brush15 = new BrushSelect( tmpQGroupBox, "Frame_15" );
- brush15->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ brush15 = new BrushSelect( tmpTQGroupBox, "Frame_15" );
+ brush15->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(brush15,5,2);
- QGridLayout *grid3 = new QGridLayout( 1, 2 );
- color = new KColorButton (tmpQGroupBox, "ColorButton_1" );
+ TQGridLayout *grid3 = new TQGridLayout( 1, 2 );
+ color = new KColorButton (tmpTQGroupBox, "ColorButton_1" );
grid3->addWidget(color,0,1);
- QLabel *tmpQLabel = new QLabel( tmpQGroupBox, "Label_1" );
- tmpQLabel->setText( i18n("Color:") );
- grid3->addWidget(tmpQLabel,0,0);
+ TQLabel *tmpTQLabel = new TQLabel( tmpTQGroupBox, "Label_1" );
+ tmpTQLabel->setText( i18n("Color:") );
+ grid3->addWidget(tmpTQLabel,0,0);
grid2->addMultiCell(grid3,6,6,0,2);
- grid3 = new QGridLayout( 1, 3 );
+ grid3 = new TQGridLayout( 1, 3 );
grid3->setSpacing(KDialog::spacingHint());
- tmpQLabel = new QLabel( tmpQGroupBox, "Label_2" );
- grid3->addWidget(tmpQLabel,0,0);
- tmpQLabel->setText( i18n("Background color:") );
+ tmpTQLabel = new TQLabel( tmpTQGroupBox, "Label_2" );
+ grid3->addWidget(tmpTQLabel,0,0);
+ tmpTQLabel->setText( i18n("Background color:") );
- bgColorButton = new KColorButton( tmpQGroupBox, "ColorButton" );
+ bgColorButton = new KColorButton( tmpTQGroupBox, "ColorButton" );
grid3->addWidget(bgColorButton,0,1);
if ( dlg->bBgColor )
bgColor = dlg->bgColor;
else
- bgColor = colorGroup().base();
+ bgColor = tqcolorGroup().base();
if (!bgColor.isValid())
- bgColor = colorGroup().base();
+ bgColor = tqcolorGroup().base();
bgColorButton->setColor( bgColor );
- connect( bgColorButton, SIGNAL( changed( const QColor & ) ),
- this, SLOT( slotSetBackgroundColor( const QColor & ) ) );
+ connect( bgColorButton, TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( slotSetBackgroundColor( const TQColor & ) ) );
- notAnyColor=new QPushButton(i18n("No Color"),tmpQGroupBox);
+ notAnyColor=new TQPushButton(i18n("No Color"),tmpTQGroupBox);
grid3->addWidget(notAnyColor,0,2);
- connect( notAnyColor, SIGNAL( clicked( ) ),
- this, SLOT( slotNotAnyColor( ) ) );
+ connect( notAnyColor, TQT_SIGNAL( clicked( ) ),
+ this, TQT_SLOT( slotNotAnyColor( ) ) );
b_notAnyColor=false;
grid2->addMultiCell(grid3,7,7,0,2);
- grid->addMultiCellWidget(tmpQGroupBox,0,3,0,0);
+ grid->addMultiCellWidget(tmpTQGroupBox,0,3,0,0);
- tmpQGroupBox = new QGroupBox( this, "GroupBox1" );
- tmpQGroupBox->setTitle( i18n("Preview") );
- tmpQGroupBox->setFrameStyle( QFrame::Box | QFrame::Sunken );
- tmpQGroupBox->setAlignment( AlignLeft );
+ tmpTQGroupBox = new TQGroupBox( this, "GroupBox1" );
+ tmpTQGroupBox->setTitle( i18n("Preview") );
+ tmpTQGroupBox->setFrameStyle( TQFrame::Box | TQFrame::Sunken );
+ tmpTQGroupBox->tqsetAlignment( AlignLeft );
- grid2 = new QGridLayout(tmpQGroupBox,2,1,KDialog::marginHint(), KDialog::spacingHint());
- fHeight = tmpQGroupBox->fontMetrics().height();
+ grid2 = new TQGridLayout(tmpTQGroupBox,2,1,KDialog::marginHint(), KDialog::spacingHint());
+ fHeight = tmpTQGroupBox->fontMetrics().height();
grid2->addRowSpacing( 0, fHeight/2 ); // groupbox title
- current = new BrushSelect( tmpQGroupBox, "Current" );
- current->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ current = new BrushSelect( tmpTQGroupBox, "Current" );
+ current->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
grid2->addWidget(current,1,0);
- grid->addWidget( tmpQGroupBox,4,0);
-
- connect( brush1, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush2, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush3, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush4, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush5, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush6, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush7, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush8, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush9, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush10, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush11, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush12, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush13, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush14, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
- connect( brush15, SIGNAL( clicked( BrushSelect* ) ),
- this, SLOT( slotUnselect2( BrushSelect* ) ) );
-
- brush1->setPattern( Qt::red, Qt::VerPattern );
- brush2->setPattern( Qt::red,Qt::HorPattern );
- brush3->setPattern( Qt::red,Qt::Dense1Pattern );
- brush4->setPattern( Qt::red,Qt::Dense2Pattern );
- brush5->setPattern( Qt::red,Qt::Dense3Pattern );
- brush6->setPattern( Qt::red,Qt::Dense4Pattern );
- brush7->setPattern( Qt::red,Qt::Dense5Pattern );
- brush8->setPattern( Qt::red,Qt::Dense6Pattern );
- brush9->setPattern( Qt::red,Qt::Dense7Pattern );
- brush10->setPattern( Qt::red,Qt::CrossPattern );
- brush11->setPattern( Qt::red,Qt::BDiagPattern );
- brush12->setPattern( Qt::red,Qt::FDiagPattern );
- brush13->setPattern( Qt::red,Qt::VerPattern );
- brush14->setPattern( Qt::red,Qt::DiagCrossPattern );
- brush15->setPattern( Qt::red,Qt::NoBrush );
+ grid->addWidget( tmpTQGroupBox,4,0);
+
+ connect( brush1, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush2, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush3, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush4, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush5, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush6, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush7, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush8, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush9, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush10, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush11, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush12, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush13, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush14, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+ connect( brush15, TQT_SIGNAL( clicked( BrushSelect* ) ),
+ this, TQT_SLOT( slotUnselect2( BrushSelect* ) ) );
+
+ brush1->setPattern( TQt::red,Qt::VerPattern );
+ brush2->setPattern( TQt::red,Qt::HorPattern );
+ brush3->setPattern( TQt::red,Qt::Dense1Pattern );
+ brush4->setPattern( TQt::red,Qt::Dense2Pattern );
+ brush5->setPattern( TQt::red,Qt::Dense3Pattern );
+ brush6->setPattern( TQt::red,Qt::Dense4Pattern );
+ brush7->setPattern( TQt::red,Qt::Dense5Pattern );
+ brush8->setPattern( TQt::red,Qt::Dense6Pattern );
+ brush9->setPattern( TQt::red,Qt::Dense7Pattern );
+ brush10->setPattern( TQt::red,Qt::CrossPattern );
+ brush11->setPattern( TQt::red,Qt::BDiagPattern );
+ brush12->setPattern( TQt::red,Qt::FDiagPattern );
+ brush13->setPattern( TQt::red,Qt::VerPattern );
+ brush14->setPattern( TQt::red,Qt::DiagCrossPattern );
+ brush15->setPattern( TQt::red,Qt::NoBrush );
current->setPattern(dlg->brushColor,dlg->brushStyle);
current->slotSelect();
@@ -3742,8 +3742,8 @@ CellFormatPagePattern::CellFormatPagePattern( QWidget* parent, CellFormatDialog
color->setColor(dlg->brushColor);
current->setBackgroundColor( bgColor );
- connect( color, SIGNAL( changed( const QColor & ) ),
- this, SLOT( slotSetColorButton( const QColor & ) ) );
+ connect( color, TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( slotSetColorButton( const TQColor & ) ) );
slotSetColorButton( dlg->brushColor );
init();
@@ -3753,11 +3753,11 @@ CellFormatPagePattern::CellFormatPagePattern( QWidget* parent, CellFormatDialog
void CellFormatPagePattern::slotNotAnyColor()
{
b_notAnyColor = true;
- bgColorButton->setColor( colorGroup().base() );
- current->setBackgroundColor( colorGroup().base() );
+ bgColorButton->setColor( tqcolorGroup().base() );
+ current->setBackgroundColor( tqcolorGroup().base() );
}
-void CellFormatPagePattern::slotSetBackgroundColor( const QColor &_color )
+void CellFormatPagePattern::slotSetBackgroundColor( const TQColor &_color )
{
bgColor =_color;
current->setBackgroundColor( bgColor );
@@ -3767,63 +3767,63 @@ void CellFormatPagePattern::slotSetBackgroundColor( const QColor &_color )
void CellFormatPagePattern::init()
{
- if (dlg->brushStyle == Qt::VerPattern)
+ if (dlg->brushStyle == TQt::VerPattern)
{
brush1->slotSelect();
}
- else if (dlg->brushStyle == Qt::HorPattern)
+ else if (dlg->brushStyle == TQt::HorPattern)
{
brush2->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense1Pattern)
+ else if (dlg->brushStyle == TQt::Dense1Pattern)
{
brush3->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense2Pattern)
+ else if (dlg->brushStyle == TQt::Dense2Pattern)
{
brush4->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense3Pattern)
+ else if (dlg->brushStyle == TQt::Dense3Pattern)
{
brush5->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense4Pattern)
+ else if (dlg->brushStyle == TQt::Dense4Pattern)
{
brush6->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense5Pattern)
+ else if (dlg->brushStyle == TQt::Dense5Pattern)
{
brush7->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense6Pattern)
+ else if (dlg->brushStyle == TQt::Dense6Pattern)
{
brush8->slotSelect();
}
- else if (dlg->brushStyle == Qt::Dense7Pattern)
+ else if (dlg->brushStyle == TQt::Dense7Pattern)
{
brush9->slotSelect();
}
- else if (dlg->brushStyle == Qt::CrossPattern)
+ else if (dlg->brushStyle == TQt::CrossPattern)
{
brush10->slotSelect();
}
- else if (dlg->brushStyle == Qt::BDiagPattern)
+ else if (dlg->brushStyle == TQt::BDiagPattern)
{
brush11->slotSelect();
}
- else if (dlg->brushStyle == Qt::FDiagPattern)
+ else if (dlg->brushStyle == TQt::FDiagPattern)
{
brush12->slotSelect();
}
- else if (dlg->brushStyle == Qt::VerPattern)
+ else if (dlg->brushStyle == TQt::VerPattern)
{
brush13->slotSelect();
}
- else if (dlg->brushStyle == Qt::DiagCrossPattern)
+ else if (dlg->brushStyle == TQt::DiagCrossPattern)
{
brush14->slotSelect();
}
- else if (dlg->brushStyle == Qt::NoBrush)
+ else if (dlg->brushStyle == TQt::NoBrush)
{
brush15->slotSelect();
}
@@ -3831,7 +3831,7 @@ void CellFormatPagePattern::init()
kdDebug(36001) << "Error in brushStyle" << endl;
}
-void CellFormatPagePattern::slotSetColorButton( const QColor &_color )
+void CellFormatPagePattern::slotSetColorButton( const TQColor &_color )
{
currentColor = _color;
@@ -3896,12 +3896,12 @@ void CellFormatPagePattern::apply( CustomStyle * style )
if ( selectedBrush != 0L
&& ( dlg->brushStyle != selectedBrush->getBrushStyle()
|| dlg->brushColor != selectedBrush->getBrushColor() ) )
- style->changeBackGroundBrush( QBrush( selectedBrush->getBrushColor(), selectedBrush->getBrushStyle() ) );
+ style->changeBackGroundBrush( TQBrush( selectedBrush->getBrushColor(), selectedBrush->getBrushStyle() ) );
/*
TODO: check...
if ( b_notAnyColor)
- style->changeBgColor( QColor() );
+ style->changeBgColor( TQColor() );
else
*/
if ( bgColor != dlg->getStyle()->bgColor() )
@@ -3913,13 +3913,13 @@ void CellFormatPagePattern::apply(FormatManipulator *_obj)
if ( selectedBrush != 0L
&& ( dlg->brushStyle != selectedBrush->getBrushStyle()
|| dlg->brushColor != selectedBrush->getBrushColor() ) )
- _obj->setBackgroundBrush( QBrush( selectedBrush->getBrushColor(), selectedBrush->getBrushStyle() ) );
+ _obj->setBackgroundBrush( TQBrush( selectedBrush->getBrushColor(), selectedBrush->getBrushStyle() ) );
if ( bgColor == dlg->bgColor )
return;
if ( b_notAnyColor)
- _obj->setBackgroundColor( QColor() );
+ _obj->setBackgroundColor( TQColor() );
else if ( !bBgColorUndefined )
_obj->setBackgroundColor( bgColor );
}
diff --git a/kspread/dialogs/kspread_dlg_layout.h b/kspread/dialogs/kspread_dlg_layout.h
index 0dfb10fa..a16e409d 100644
--- a/kspread/dialogs/kspread_dlg_layout.h
+++ b/kspread/dialogs/kspread_dlg_layout.h
@@ -31,10 +31,10 @@
#define __kspread_dlg_layout_h__
-#include <qtabdialog.h>
-#include <qapplication.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
+#include <tqtabdialog.h>
+#include <tqapplication.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
#include <knuminput.h>
#include <kcompletion.h>
#include "kspread_view.h"
@@ -45,23 +45,23 @@
#include "font_cell_format.h"
#include "protection_cell_format.h"
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
class KoUnitDoubleSpinBox;
-class QPixmap;
-class QRadioButton;
-class QPushButton;
-class QDate;
-class QTime;
-class QLabel;
-class QWidget;
+class TQPixmap;
+class TQRadioButton;
+class TQPushButton;
+class TQDate;
+class TQTime;
+class TQLabel;
+class TQWidget;
class KLineEdit;
-class QFrame;
-class QListBox;
-class QCheckBox;
+class TQFrame;
+class TQListBox;
+class TQCheckBox;
class KColorButton;
-class QComboBox;
+class TQComboBox;
class KComboBox;
class KoUnitDoubleSpinBox;
@@ -94,22 +94,23 @@ enum BorderShortcutType
BorderShortcutType_END
};
-class PatternSelect : public QFrame
+class PatternSelect : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- PatternSelect( QWidget *parent, const char *_name );
+ PatternSelect( TQWidget *tqparent, const char *_name );
- void setPenStyle( PenStyle _pat ) { penStyle = _pat; repaint(); }
- PenStyle getPenStyle() { return penStyle; }
- void setColor( const QColor &_col ) { penColor = _col; repaint(); }
- const QColor& getColor() { return penColor; }
- void setPenWidth( int _w ) { penWidth = _w; repaint(); }
+ void setPenStyle( Qt::PenStyle _pat ) { penStyle = _pat; tqrepaint(); }
+ Qt::PenStyle getPenStyle() { return penStyle; }
+ void setColor( const TQColor &_col ) { penColor = _col; tqrepaint(); }
+ const TQColor& getColor() { return penColor; }
+ void setPenWidth( int _w ) { penWidth = _w; tqrepaint(); }
int getPenWidth() { return penWidth; }
- void setPattern( const QColor &_color, int _width, PenStyle _style );
+ void setPattern( const TQColor &_color, int _width, Qt::PenStyle _style );
void setUndefined();
- void setDefined() { undefined = FALSE; repaint(); }
+ void setDefined() { undefined = FALSE; tqrepaint(); }
bool isDefined() { return !undefined; }
@@ -121,29 +122,30 @@ public slots:
void slotSelect();
protected:
- virtual void paintEvent( QPaintEvent *_ev );
- virtual void mousePressEvent( QMouseEvent *_ev );
+ virtual void paintEvent( TQPaintEvent *_ev );
+ virtual void mousePressEvent( TQMouseEvent *_ev );
- PenStyle penStyle;
- QColor penColor;
+ Qt::PenStyle penStyle;
+ TQColor penColor;
int penWidth;
bool selected;
bool undefined;
};
-class GeneralTab : public QWidget
+class GeneralTab : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- GeneralTab( QWidget * parent, CellFormatDialog * _dlg );
+ GeneralTab( TQWidget * tqparent, CellFormatDialog * _dlg );
~GeneralTab();
bool apply( CustomStyle * style );
protected slots:
- void slotNewParent( const QString & parentName );
+ void slotNewParent( const TQString & tqparentName );
void slotNameChanged();
private:
@@ -151,10 +153,10 @@ class GeneralTab : public QWidget
KComboBox * m_parentBox;
KLineEdit * m_nameEdit;
- QString m_name;
- QString m_parent;
+ TQString m_name;
+ TQString m_parent;
- bool checkParent( const QString & parentName );
+ bool checkParent( const TQString & tqparentName );
bool checkName();
};
@@ -163,8 +165,9 @@ class GeneralTab : public QWidget
class CellFormatPageFont : public FontTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPageFont( QWidget* parent, CellFormatDialog *_dlg );
+ CellFormatPageFont( TQWidget* tqparent, CellFormatDialog *_dlg );
void apply( CustomStyle * style );
void apply( FormatManipulator *_obj );
@@ -174,24 +177,24 @@ signals:
* Connect to this to monitor the font as it as selected if you are
* not running modal.
*/
- void fontSelected( const QFont &font );
+ void fontSelected( const TQFont &font );
private slots:
- void family_chosen_slot(const QString & );
- void size_chosen_slot(const QString & );
- void weight_chosen_slot(const QString &);
- void style_chosen_slot(const QString &);
+ void family_chosen_slot(const TQString & );
+ void size_chosen_slot(const TQString & );
+ void weight_chosen_slot(const TQString &);
+ void style_chosen_slot(const TQString &);
void underline_chosen_slot();
void strike_chosen_slot();
- void display_example(const QFont &font);
- void slotSetTextColor( const QColor &_color );
+ void display_example(const TQFont &font);
+ void slotSetTextColor( const TQColor &_color );
private:
void setCombos();
- QColor textColor;
- QFont selFont;
+ TQColor textColor;
+ TQFont selFont;
bool fontChanged;
bool bTextColorUndefined;
CellFormatDialog *dlg;
@@ -202,11 +205,12 @@ private:
* This widget is part of the format dialog.
* It allows the user to cinfigure the way numbers are formatted.
*/
-class CellFormatPageFloat : public QWidget
+class CellFormatPageFloat : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPageFloat( QWidget *parent, CellFormatDialog *_dlg );
+ CellFormatPageFloat( TQWidget *tqparent, CellFormatDialog *_dlg );
void apply( CustomStyle * style );
void apply( FormatManipulator *_obj );
@@ -217,27 +221,27 @@ public slots:
void init();
void slotChangeValue(int);
void formatChanged(int);
- void currencyChanged(const QString &);
+ void currencyChanged(const TQString &);
protected:
- QLineEdit* postfix;
+ TQLineEdit* postfix;
KIntNumInput* precision;
- QLineEdit* prefix;
- QComboBox *format;
- QComboBox *currency;
- QLabel *currencyLabel;
- QRadioButton *generic;
- QRadioButton *number;
- QRadioButton *percent;
- QRadioButton *date;
- QRadioButton *money;
- QRadioButton *scientific;
- QRadioButton *fraction;
- QRadioButton *time;
- QRadioButton *textFormat;
- QRadioButton *customFormat;
- QListBox *listFormat;
- QLineEdit* customFormatEdit;
- QLabel *exampleLabel;
+ TQLineEdit* prefix;
+ TQComboBox *format;
+ TQComboBox *currency;
+ TQLabel *currencyLabel;
+ TQRadioButton *generic;
+ TQRadioButton *number;
+ TQRadioButton *percent;
+ TQRadioButton *date;
+ TQRadioButton *money;
+ TQRadioButton *scientific;
+ TQRadioButton *fraction;
+ TQRadioButton *time;
+ TQRadioButton *textFormat;
+ TQRadioButton *customFormat;
+ TQListBox *listFormat;
+ TQLineEdit* customFormatEdit;
+ TQLabel *exampleLabel;
CellFormatDialog *dlg;
FormatType cellFormatType, newFormatType;
//test if value changed
@@ -248,8 +252,9 @@ protected:
class CellFormatPagePosition : public PositionTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPagePosition( QWidget *parent, CellFormatDialog *_dlg );
+ CellFormatPagePosition( TQWidget *tqparent, CellFormatDialog *_dlg );
void apply( CustomStyle * style );
void apply( FormatManipulator *_obj );
@@ -276,30 +281,32 @@ protected:
-class Border : public QFrame
+class Border : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- Border( QWidget *parent,const char *_name,bool _oneCol,bool _oneRow );
+ Border( TQWidget *tqparent,const char *_name,bool _oneCol,bool _oneRow );
signals:
void redraw();
- void choosearea(QMouseEvent * _ev);
+ void choosearea(TQMouseEvent * _ev);
protected:
- virtual void paintEvent( QPaintEvent *_ev );
- virtual void mousePressEvent( QMouseEvent* _ev );
+ virtual void paintEvent( TQPaintEvent *_ev );
+ virtual void mousePressEvent( TQMouseEvent* _ev );
bool oneCol;
bool oneRow;
};
-class BorderButton : public QPushButton
+class BorderButton : public TQPushButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- BorderButton( QWidget *parent, const char *_name );
- void setPenStyle( PenStyle _pat ) { penStyle = _pat;}
- PenStyle getPenStyle() { return penStyle; }
- void setColor( const QColor &_col ) { penColor = _col; }
- const QColor& getColor() { return penColor; }
+ BorderButton( TQWidget *tqparent, const char *_name );
+ void setPenStyle( Qt::PenStyle _pat ) { penStyle = _pat;}
+ Qt::PenStyle getPenStyle() { return penStyle; }
+ void setColor( const TQColor &_col ) { penColor = _col; }
+ const TQColor& getColor() { return penColor; }
void setPenWidth( int _w ) { penWidth = _w; }
int getPenWidth() { return penWidth; }
bool isChanged() { return changed; }
@@ -309,34 +316,35 @@ public:
signals:
void clicked(BorderButton *);
protected:
- virtual void mousePressEvent( QMouseEvent *_ev );
- PenStyle penStyle;
- QColor penColor;
+ virtual void mousePressEvent( TQMouseEvent *_ev );
+ Qt::PenStyle penStyle;
+ TQColor penColor;
int penWidth;
bool changed;
};
-class CellFormatPageBorder : public QWidget
+class CellFormatPageBorder : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPageBorder( QWidget *parent, CellFormatDialog *_dlg );
+ CellFormatPageBorder( TQWidget *tqparent, CellFormatDialog *_dlg );
void apply(FormatManipulator* obj);
void invertState(BorderButton *_button);
- QPixmap paintFormatPixmap(PenStyle _style);
+ TQPixmap paintFormatPixmap(PenStyle _style);
public slots:
void changeState(BorderButton *_this);
void preselect( BorderButton *_this);
void draw();
- void slotSetColorButton( const QColor &_color );
+ void slotSetColorButton( const TQColor &_color );
void slotUnselect2( PatternSelect *_select );
- void loadIcon( QString pix,BorderButton *_button);
- void slotPressEvent(QMouseEvent *_ev);
+ void loadIcon( TQString pix,BorderButton *_button);
+ void slotPressEvent(TQMouseEvent *_ev);
void slotChangeStyle(int );
- void slotChangeStyle(const QString & );
+ void slotChangeStyle(const TQString & );
void cutomize_chosen_slot();
protected:
@@ -351,11 +359,11 @@ protected:
/* the pattern box that is the 'preview' of what is selected above. */
PatternSelect* preview;
- QComboBox* size;
- QComboBox* style;
+ TQComboBox* size;
+ TQComboBox* style;
KColorButton* color;
- QCheckBox* customize;
- QColor currentColor;
+ TQCheckBox* customize;
+ TQColor currentColor;
Border *area;
CellFormatDialog *dlg;
private:
@@ -374,17 +382,18 @@ private:
void applyDiagonalOutline(FormatManipulator* obj);
};
-class BrushSelect : public QFrame
+class BrushSelect : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- BrushSelect( QWidget *parent, const char *_name );
+ BrushSelect( TQWidget *tqparent, const char *_name );
- void setBrushStyle( BrushStyle _pat ) { brushStyle = _pat; repaint(); }
- BrushStyle getBrushStyle() const { return brushStyle; }
- QColor getBrushColor() const { return brushColor; }
- void setBrushColor(const QColor &_c) { brushColor=_c;}
- void setPattern( const QColor &_color, BrushStyle _style );
+ void setBrushStyle( Qt::BrushStyle _pat ) { brushStyle = _pat; tqrepaint(); }
+ Qt::BrushStyle getBrushStyle() const { return brushStyle; }
+ TQColor getBrushColor() const { return brushColor; }
+ void setBrushColor(const TQColor &_c) { brushColor=_c;}
+ void setPattern( const TQColor &_color, Qt::BrushStyle _style );
signals:
void clicked( BrushSelect *_this );
@@ -394,20 +403,21 @@ public slots:
void slotSelect();
protected:
- virtual void paintEvent( QPaintEvent *_ev );
- virtual void mousePressEvent( QMouseEvent *_ev );
+ virtual void paintEvent( TQPaintEvent *_ev );
+ virtual void mousePressEvent( TQMouseEvent *_ev );
- BrushStyle brushStyle;
- QColor brushColor;
+ Qt::BrushStyle brushStyle;
+ TQColor brushColor;
bool selected;
};
-class CellFormatPagePattern : public QWidget
+class CellFormatPagePattern : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPagePattern( QWidget *parent, CellFormatDialog *_dlg );
+ CellFormatPagePattern( TQWidget *tqparent, CellFormatDialog *_dlg );
void apply( CustomStyle * style );
void apply( FormatManipulator *_obj );
@@ -415,8 +425,8 @@ public:
void init();
public slots:
void slotUnselect2( BrushSelect *_select );
- void slotSetColorButton( const QColor &_color );
- void slotSetBackgroundColor( const QColor &_color );
+ void slotSetColorButton( const TQColor &_color );
+ void slotSetBackgroundColor( const TQColor &_color );
void slotNotAnyColor( );
protected:
BrushSelect *selectedBrush;
@@ -437,10 +447,10 @@ protected:
BrushSelect *brush15;
BrushSelect *current;
KColorButton* color;
- QPushButton* notAnyColor;
- QColor currentColor;
+ TQPushButton* notAnyColor;
+ TQColor currentColor;
- QColor bgColor;
+ TQColor bgColor;
bool bBgColorUndefined;
KColorButton *bgColorButton;
bool b_notAnyColor;
@@ -450,9 +460,10 @@ protected:
class CellFormatPageProtection : public ProtectionTab
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellFormatPageProtection( QWidget * parent, CellFormatDialog * _dlg );
+ CellFormatPageProtection( TQWidget * tqparent, CellFormatDialog * _dlg );
~CellFormatPageProtection();
///when protection is set through Style Manager
void apply( CustomStyle * style );
@@ -469,9 +480,10 @@ class CellFormatPageProtection : public ProtectionTab
/**
* Dialog for the "Cell Format..." action
*/
-class CellFormatDialog : public QObject
+class CellFormatDialog : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Create a format dlg for the rectangular area in '_sheet'.
@@ -504,7 +516,7 @@ public:
StyleManager * getStyleManager() const { return m_styleManager; }
bool isSingleCell() { return ( left == right && top == bottom ); }
- bool checkCircle( QString const & name, QString const & parent );
+ bool checkCircle( TQString const & name, TQString const & tqparent );
KLocale * locale() const { return m_pView->doc()->locale(); }
@@ -513,22 +525,22 @@ public:
{
int width;
bool bStyle;
- QColor color;
+ TQColor color;
bool bColor;
- PenStyle style;
+ Qt::PenStyle style;
};
// The format of the selected area
CellBorderFormat borders[BorderType_END];
- BrushStyle brushStyle;
- QColor brushColor;
+ Qt::BrushStyle brushStyle;
+ TQColor brushColor;
bool oneCol;
bool oneRow;
- QString prefix;
- QString postfix;
+ TQString prefix;
+ TQString postfix;
int precision;
Format::FloatFormat floatFormat;
bool bFloatFormat;
@@ -536,7 +548,7 @@ public:
Format::Currency cCurrency;
bool bFloatColor;
bool bCurrency;
- QColor textColor;
+ TQColor textColor;
bool bTextColor;
bool bTextFontBold;
bool textFontBold;
@@ -545,19 +557,19 @@ public:
bool bTextFontSize;
int textFontSize;
bool bTextFontFamily;
- QString textFontFamily;
+ TQString textFontFamily;
bool bStrike;
bool strike;
bool bUnderline;
bool underline;
- QFont textFont;
- QColor bgColor;
+ TQFont textFont;
+ TQColor bgColor;
bool bBgColor;
- QString actionText;
+ TQString actionText;
Format::Align alignX;
Format::AlignY alignY;
- QString styleName;
- QString styleParent;
+ TQString styleName;
+ TQString styleParent;
bool bMultiRow;
bool bVerticalText;
@@ -574,11 +586,11 @@ public:
double indent;
- QPixmap* formatOnlyNegSignedPixmap;
- QPixmap* formatRedOnlyNegSignedPixmap;
- QPixmap* formatRedNeverSignedPixmap;
- QPixmap* formatAlwaysSignedPixmap;
- QPixmap* formatRedAlwaysSignedPixmap;
+ TQPixmap* formatOnlyNegSignedPixmap;
+ TQPixmap* formatRedOnlyNegSignedPixmap;
+ TQPixmap* formatRedNeverSignedPixmap;
+ TQPixmap* formatAlwaysSignedPixmap;
+ TQPixmap* formatRedAlwaysSignedPixmap;
int textRotation;
bool bTextRotation;
@@ -610,8 +622,8 @@ protected:
* Draws a pixmap showing a text consisting of two parts, @p _string1 and @p _string2 .
* The parts' colors are given by @p _color1 and @p _color2 .
*/
- QPixmap* paintFormatPixmap( const char *_string1, const QColor & _color1,
- const char *_string2, const QColor & _color2 );
+ TQPixmap* paintFormatPixmap( const char *_string1, const TQColor & _color1,
+ const char *_string2, const TQColor & _color2 );
GeneralTab * generalPage;
CellFormatPageFloat *floatPage;
@@ -620,7 +632,7 @@ protected:
CellFormatPagePosition *positionPage;
CellFormatPagePattern *patternPage;
CellFormatPageProtection *protectPage;
- QTabDialog *tab;
+ TQTabDialog *tab;
Doc * m_doc;
Sheet * m_sheet;
diff --git a/kspread/dialogs/kspread_dlg_list.cc b/kspread/dialogs/kspread_dlg_list.cc
index bb3c75e9..83eb54c9 100644
--- a/kspread/dialogs/kspread_dlg_list.cc
+++ b/kspread/dialogs/kspread_dlg_list.cc
@@ -19,12 +19,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qmultilineedit.h>
-#include <qpushbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqmultilineedit.h>
+#include <tqpushbutton.h>
#include <kbuttonbox.h>
#include <kconfig.h>
@@ -39,53 +39,53 @@
using namespace KSpread;
-ListDialog::ListDialog( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n("Custom Lists"), Ok|Cancel )
+ListDialog::ListDialog( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n("Custom Lists"), Ok|Cancel )
{
- QWidget* page = new QWidget( this );
+ TQWidget* page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *grid1 = new QGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid1 = new TQGridLayout( page,10,3,KDialog::marginHint(), KDialog::spacingHint());
- QLabel *lab=new QLabel(page);
+ TQLabel *lab=new TQLabel(page);
lab->setText(i18n("List:" ));
grid1->addWidget(lab,0,0);
- list=new QListBox(page);
+ list=new TQListBox(page);
grid1->addMultiCellWidget(list,1,8,0,0);
- lab=new QLabel(page);
+ lab=new TQLabel(page);
lab->setText(i18n("Entry:" ));
grid1->addWidget(lab,0,1);
- entryList=new QMultiLineEdit(page);
+ entryList=new TQMultiLineEdit(page);
grid1->addMultiCellWidget(entryList,1,8,1,1);
- m_pRemove=new QPushButton(i18n("&Remove"),page);
+ m_pRemove=new TQPushButton(i18n("&Remove"),page);
grid1->addWidget(m_pRemove,3,2);
- m_pAdd=new QPushButton(i18n("&Add"),page);
+ m_pAdd=new TQPushButton(i18n("&Add"),page);
grid1->addWidget(m_pAdd,1,2);
- m_pNew=new QPushButton(i18n("&New"),page);
+ m_pNew=new TQPushButton(i18n("&New"),page);
grid1->addWidget(m_pNew,2,2);
- m_pModify=new QPushButton(i18n("&Modify"),page);
+ m_pModify=new TQPushButton(i18n("&Modify"),page);
grid1->addWidget(m_pModify,4,2);
- m_pCopy=new QPushButton(i18n("Co&py"),page);
+ m_pCopy=new TQPushButton(i18n("Co&py"),page);
grid1->addWidget(m_pCopy,5,2);
m_pAdd->setEnabled(false);
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_pAdd, SIGNAL( clicked() ), this, SLOT( slotAdd() ) );
- connect( m_pNew, SIGNAL( clicked() ), this, SLOT( slotNew() ) );
- connect( m_pModify, SIGNAL( clicked() ), this, SLOT( slotModify() ) );
- connect( m_pCopy, SIGNAL( clicked() ), this, SLOT( slotCopy() ) );
- connect( list, SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(slotDoubleClicked(QListBoxItem *)));
- connect( list, SIGNAL(clicked ( QListBoxItem * )),this,SLOT(slotTextClicked(QListBoxItem * )));
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_pAdd, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAdd() ) );
+ connect( m_pNew, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotNew() ) );
+ connect( m_pModify, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotModify() ) );
+ connect( m_pCopy, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCopy() ) );
+ connect( list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
+ connect( list, TQT_SIGNAL(clicked ( TQListBoxItem * )),this,TQT_SLOT(slotTextClicked(TQListBoxItem * )));
init();
entryList->setEnabled(false);
m_pModify->setEnabled(false);
@@ -96,7 +96,7 @@ ListDialog::ListDialog( QWidget* parent, const char* name )
}
-void ListDialog::slotTextClicked(QListBoxItem*)
+void ListDialog::slotTextClicked(TQListBoxItem*)
{
//we can't remove the two first item
bool state=list->currentItem()>1;
@@ -107,7 +107,7 @@ void ListDialog::slotTextClicked(QListBoxItem*)
void ListDialog::init()
{
- QString month;
+ TQString month;
month+=i18n("January")+", ";
month+=i18n("February")+", ";
month+=i18n("March") +", ";
@@ -120,10 +120,10 @@ void ListDialog::init()
month+=i18n("October")+", ";
month+=i18n("November")+", ";
month+=i18n("December");
- QStringList lst;
+ TQStringList lst;
lst.append(month);
- QString smonth;
+ TQString smonth;
smonth+=i18n("Jan")+", ";
smonth+=i18n("Feb")+", ";
smonth+=i18n("Mar") +", ";
@@ -138,7 +138,7 @@ void ListDialog::init()
smonth+=i18n("Dec");
lst.append(smonth);
- QString day=i18n("Monday")+", ";
+ TQString day=i18n("Monday")+", ";
day+=i18n("Tuesday")+", ";
day+=i18n("Wednesday")+", ";
day+=i18n("Thursday")+", ";
@@ -147,7 +147,7 @@ void ListDialog::init()
day+=i18n("Sunday");
lst.append(day);
- QString sday=i18n("Mon")+", ";
+ TQString sday=i18n("Mon")+", ";
sday+=i18n("Tue")+", ";
sday+=i18n("Wed")+", ";
sday+=i18n("Thu")+", ";
@@ -158,9 +158,9 @@ void ListDialog::init()
config = Factory::global()->config();
config->setGroup( "Parameters" );
- QStringList other=config->readListEntry("Other list");
- QString tmp;
- for ( QStringList::Iterator it = other.begin(); it != other.end();++it )
+ TQStringList other=config->readListEntry("Other list");
+ TQString tmp;
+ for ( TQStringList::Iterator it = other.begin(); it != other.end();++it )
{
if((*it)!="\\")
tmp+=(*it)+", ";
@@ -174,16 +174,16 @@ void ListDialog::init()
list->insertStringList(lst);
}
-void ListDialog::slotDoubleClicked(QListBoxItem *)
+void ListDialog::slotDoubleClicked(TQListBoxItem *)
{
//we can't modify the two first item
if(list->currentItem()<2)
return;
- QString tmp=list->currentText();
+ TQString tmp=list->currentText();
entryList->setText("");
- QStringList result=result.split(", ",tmp);
+ TQStringList result=result.split(", ",tmp);
int index=0;
- for ( QStringList::Iterator it = result.begin(); it != result.end();++it )
+ for ( TQStringList::Iterator it = result.begin(); it != result.end();++it )
{
entryList->insertLine((*it),index);
index++;
@@ -196,7 +196,7 @@ void ListDialog::slotAdd()
{
m_pAdd->setEnabled(false);
list->setEnabled(true);
- QString tmp;
+ TQString tmp;
for(int i=0;i<entryList->numLines();i++)
{
if(!entryList->textLine(i).isEmpty())
@@ -254,13 +254,13 @@ void ListDialog::slotOk()
}
if(m_bChanged)
{
- QStringList result;
+ TQStringList result;
result.append("\\");
//don't save the two first line
for(unsigned int i=2;i<list->count();i++)
{
- QStringList tmp=result.split(", ",list->text(i));
+ TQStringList tmp=result.split(", ",list->text(i));
if ( !tmp.isEmpty() )
{
result+=tmp;
@@ -285,7 +285,7 @@ void ListDialog::slotModify()
//you can modify list but not the two first list
if(list->currentItem ()>1 && !entryList->text().isEmpty())
{
- QString tmp;
+ TQString tmp;
for(int i=0;i<entryList->numLines();i++)
{
if(!entryList->textLine(i).isEmpty())
diff --git a/kspread/dialogs/kspread_dlg_list.h b/kspread/dialogs/kspread_dlg_list.h
index 88d3c243..714186bb 100644
--- a/kspread/dialogs/kspread_dlg_list.h
+++ b/kspread/dialogs/kspread_dlg_list.h
@@ -24,11 +24,11 @@
#include <kdialogbase.h>
-class QListBox;
-class QListBoxItem;
-class QLineEdit;
-class QMultiLineEdit;
-class QPushButton;
+class TQListBox;
+class TQListBoxItem;
+class TQLineEdit;
+class TQMultiLineEdit;
+class TQPushButton;
class KConfig;
@@ -38,15 +38,16 @@ namespace KSpread
class ListDialog: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ListDialog( QWidget* parent, const char* name );
+ ListDialog( TQWidget* tqparent, const char* name );
void init();
public slots:
virtual void slotOk();
- void slotDoubleClicked(QListBoxItem *);
- void slotTextClicked(QListBoxItem*);
+ void slotDoubleClicked(TQListBoxItem *);
+ void slotTextClicked(TQListBoxItem*);
void slotRemove();
void slotAdd();
void slotNew();
@@ -56,13 +57,13 @@ public slots:
protected:
KConfig *config;
- QListBox * list;
- QMultiLineEdit *entryList;
- QPushButton* m_pRemove;
- QPushButton* m_pNew;
- QPushButton* m_pAdd;
- QPushButton* m_pModify;
- QPushButton* m_pCopy;
+ TQListBox * list;
+ TQMultiLineEdit *entryList;
+ TQPushButton* m_pRemove;
+ TQPushButton* m_pNew;
+ TQPushButton* m_pAdd;
+ TQPushButton* m_pModify;
+ TQPushButton* m_pCopy;
bool m_bChanged;
};
diff --git a/kspread/dialogs/kspread_dlg_paperlayout.cc b/kspread/dialogs/kspread_dlg_paperlayout.cc
index 771cee5b..6c277be6 100644
--- a/kspread/dialogs/kspread_dlg_paperlayout.cc
+++ b/kspread/dialogs/kspread_dlg_paperlayout.cc
@@ -31,14 +31,14 @@
#include <kspread_view.h>
#include <selection.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qhgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqhgroupbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -47,19 +47,19 @@
using namespace KSpread;
-PaperLayout::PaperLayout( QWidget * parent, const char * name,
- const KoPageLayout & layout,
+PaperLayout::PaperLayout( TQWidget * tqparent, const char * name,
+ const KoPageLayout & tqlayout,
const KoHeadFoot & headfoot,
int tabs, KoUnit::Unit unit,
Sheet * sheet, View * view)
- : KoPageLayoutDia( parent, name, layout, headfoot, tabs, unit, false /*no modal*/),
+ : KoPageLayoutDia( tqparent, name, tqlayout, headfoot, tabs, unit, false /*no modal*/),
m_pSheet( sheet ),
m_pView( view )
{
initTab();
- connect(view->selectionInfo(), SIGNAL(changed(const Region&)),
- this, SLOT(slotSelectionChanged()));
- qApp->installEventFilter( this );
+ connect(view->selectionInfo(), TQT_SIGNAL(changed(const Region&)),
+ this, TQT_SLOT(slotSelectionChanged()));
+ tqApp->installEventFilter( this );
m_focus= 0L;
}
@@ -67,10 +67,10 @@ void PaperLayout::initTab()
{
SheetPrint* print = m_pSheet->print();
- QWidget *tab = addPage(i18n( "Options" ));
- QVBoxLayout *vbox = new QVBoxLayout( tab, KDialog::marginHint(), KDialog::spacingHint() );
+ TQWidget *tab = addPage(i18n( "Options" ));
+ TQVBoxLayout *vbox = new TQVBoxLayout( tab, KDialog::marginHint(), KDialog::spacingHint() );
- pApplyToAll = new QCheckBox ( i18n( "&Apply to all sheets" ), tab );
+ pApplyToAll = new TQCheckBox ( i18n( "&Apply to all sheets" ), tab );
pApplyToAll->setChecked( print->printGrid() );
vbox->addWidget( pApplyToAll );
@@ -86,76 +86,76 @@ void PaperLayout::initTab()
vbox->addStretch( 1 );
}
-void PaperLayout::initGeneralOptions( QWidget * tab, QVBoxLayout * vbox )
+void PaperLayout::initGeneralOptions( TQWidget * tab, TQVBoxLayout * vbox )
{
SheetPrint* print = m_pSheet->print();
- QGroupBox *group = new QGroupBox( i18n("General Options"), tab );
- QGridLayout *l = new QGridLayout( group, 2, 3 );
+ TQGroupBox *group = new TQGroupBox( i18n("General Options"), tab );
+ TQGridLayout *l = new TQGridLayout( group, 2, 3 );
- pPrintGrid = new QCheckBox ( i18n("Print &grid"), group );
+ pPrintGrid = new TQCheckBox ( i18n("Print &grid"), group );
pPrintGrid->setChecked( print->printGrid() );
l->addWidget( pPrintGrid, 0, 0 );
- pPrintCommentIndicator = new QCheckBox ( i18n("Print &comment indicator"), group );
+ pPrintCommentIndicator = new TQCheckBox ( i18n("Print &comment indicator"), group );
pPrintCommentIndicator->setChecked( print->printCommentIndicator() );
l->addWidget( pPrintCommentIndicator, 0, 1 );
- pPrintFormulaIndicator = new QCheckBox ( i18n("Print &formula indicator"), group );
+ pPrintFormulaIndicator = new TQCheckBox ( i18n("Print &formula indicator"), group );
pPrintFormulaIndicator->setChecked( print->printFormulaIndicator() );
l->addWidget( pPrintFormulaIndicator, 0, 2 );
- pPrintObjects = new QCheckBox ( i18n("Print &objects"), group );
+ pPrintObjects = new TQCheckBox ( i18n("Print &objects"), group );
pPrintObjects->setChecked( print->printObjects() );
l->addWidget( pPrintObjects, 1, 0 );
- pPrintCharts = new QCheckBox ( i18n("Print &charts"), group );
+ pPrintCharts = new TQCheckBox ( i18n("Print &charts"), group );
pPrintCharts->setChecked( print->printCharts() );
l->addWidget( pPrintCharts, 1, 1 );
// Not used yet unless someone implement some kind of drawing object
-// pPrintGraphics = new QCheckBox ( i18n("Print &drawings"), group );
+// pPrintGraphics = new TQCheckBox ( i18n("Print &drawings"), group );
// pPrintGraphics->setChecked( print->printGraphics() );
// l->addWidget( pPrintGraphics, 1, 2 );
vbox->addWidget( group );
}
-void PaperLayout::initRanges( QWidget * tab, QVBoxLayout * vbox )
+void PaperLayout::initRanges( TQWidget * tab, TQVBoxLayout * vbox )
{
SheetPrint* print = m_pSheet->print();
- QGroupBox *rangeGroup = new QGroupBox( i18n("Ranges"), tab );
+ TQGroupBox *rangeGroup = new TQGroupBox( i18n("Ranges"), tab );
rangeGroup->setColumnLayout( 0, Qt::Vertical );
rangeGroup->setMargin( KDialog::marginHint() );
vbox->addWidget( rangeGroup );
- QGridLayout *grid = new QGridLayout( rangeGroup->layout(), 3, 2, KDialog::spacingHint() );
+ TQGridLayout *grid = new TQGridLayout( rangeGroup->tqlayout(), 3, 2, KDialog::spacingHint() );
- QLabel *pPrintRange = new QLabel ( i18n("Print range:"), rangeGroup );
+ TQLabel *pPrintRange = new TQLabel ( i18n("Print range:"), rangeGroup );
grid->addWidget( pPrintRange, 0, 0 );
- ePrintRange = new QLineEdit( rangeGroup );
+ ePrintRange = new TQLineEdit( rangeGroup );
ePrintRange->setText( util_rangeName( print->printRange() ) );
grid->addWidget( ePrintRange, 0, 1 );
- QLabel *pRepeatCols = new QLabel ( i18n("Repeat columns on each page:"), rangeGroup );
+ TQLabel *pRepeatCols = new TQLabel ( i18n("Repeat columns on each page:"), rangeGroup );
grid->addWidget( pRepeatCols, 1, 0 );
- eRepeatCols = new QLineEdit( rangeGroup );
+ eRepeatCols = new TQLineEdit( rangeGroup );
if ( print->printRepeatColumns().first != 0 )
eRepeatCols->setText( Cell::columnName( print->printRepeatColumns().first ) + ":" +
Cell::columnName( print->printRepeatColumns().second ) );
grid->addWidget( eRepeatCols, 1, 1 );
- QLabel *pRepeatRows = new QLabel ( i18n("Repeat rows on each page:"), rangeGroup );
+ TQLabel *pRepeatRows = new TQLabel ( i18n("Repeat rows on each page:"), rangeGroup );
grid->addWidget( pRepeatRows, 2, 0 );
- eRepeatRows = new QLineEdit( rangeGroup );
+ eRepeatRows = new TQLineEdit( rangeGroup );
if ( print->printRepeatRows().first != 0 )
- eRepeatRows->setText( QString().setNum( print->printRepeatRows().first ) +
+ eRepeatRows->setText( TQString().setNum( print->printRepeatRows().first ) +
":" +
- QString().setNum( print->printRepeatRows().second ) );
+ TQString().setNum( print->printRepeatRows().second ) );
grid->addWidget( eRepeatRows, 2, 1 );
grid->addColSpacing( 0, pPrintRange->width() );
@@ -173,65 +173,65 @@ void PaperLayout::initRanges( QWidget * tab, QVBoxLayout * vbox )
grid->addRowSpacing( 2, eRepeatCols->height() );
}
-void PaperLayout::initScaleOptions( QWidget * tab, QVBoxLayout * vbox )
+void PaperLayout::initScaleOptions( TQWidget * tab, TQVBoxLayout * vbox )
{
SheetPrint* print = m_pSheet->print();
- QButtonGroup *zoomGroup = new QButtonGroup( i18n("Scale Printout"), tab );
+ TQButtonGroup *zoomGroup = new TQButtonGroup( i18n("Scale Printout"), tab );
zoomGroup->setColumnLayout( 0, Qt::Vertical );
zoomGroup->setMargin( KDialog::marginHint() );
vbox->addWidget( zoomGroup );
- QGridLayout *grid = new QGridLayout( zoomGroup->layout(), 2, 6,
+ TQGridLayout *grid = new TQGridLayout( zoomGroup->tqlayout(), 2, 6,
KDialog::spacingHint() );
- m_rScalingZoom = new QRadioButton ( i18n("Zoom:"), zoomGroup );
+ m_rScalingZoom = new TQRadioButton ( i18n("Zoom:"), zoomGroup );
grid->addWidget( m_rScalingZoom, 0, 0 );
- m_cZoom = new QComboBox( true, zoomGroup, "Zoom" );
- grid->addMultiCellWidget( m_cZoom, 0, 0, 1, 5, Qt::AlignLeft );
+ m_cZoom = new TQComboBox( true, zoomGroup, "Zoom" );
+ grid->addMultiCellWidget( m_cZoom, 0, 0, 1, 5, TQt::AlignLeft );
- QStringList lst;
+ TQStringList lst;
for( int i = 5; i < 500; i += 5 )
{
- lst.append( QString( i18n( "%1%" ) ).arg( i ) );
- if( qRound( print->zoom() * 100 ) > i &&
- qRound( print->zoom() * 100 ) < i + 5 )
+ lst.append( TQString( i18n( "%1%" ) ).tqarg( i ) );
+ if( tqRound( print->zoom() * 100 ) > i &&
+ tqRound( print->zoom() * 100 ) < i + 5 )
{
- lst.append( QString( i18n( "%1%" ) ).arg( qRound( print->zoom() * 100 ) ) );
+ lst.append( TQString( i18n( "%1%" ) ).tqarg( tqRound( print->zoom() * 100 ) ) );
}
}
m_cZoom->insertStringList( lst );
int number_of_entries = m_cZoom->count();
- QString string = QString( i18n( "%1%" ) ).arg( qRound( print->zoom() * 100 ) );
+ TQString string = TQString( i18n( "%1%" ) ).tqarg( tqRound( print->zoom() * 100 ) );
for (int i = 0; i < number_of_entries ; i++)
{
- if ( string == (QString) m_cZoom->text(i) )
+ if ( string == (TQString) m_cZoom->text(i) )
{
m_cZoom->setCurrentItem( i );
break;
}
}
- m_rScalingLimitPages = new QRadioButton ( i18n("Limit pages:"), zoomGroup );
+ m_rScalingLimitPages = new TQRadioButton ( i18n("Limit pages:"), zoomGroup );
grid->addWidget( m_rScalingLimitPages, 1, 0 );
- QLabel *pLimitPagesX = new QLabel ( i18n("X:"), zoomGroup );
+ TQLabel *pLimitPagesX = new TQLabel ( i18n("X:"), zoomGroup );
grid->addWidget( pLimitPagesX, 1, 1 );
- m_cLimitPagesX = new QComboBox( true, zoomGroup, "pagesX" );
+ m_cLimitPagesX = new TQComboBox( true, zoomGroup, "pagesX" );
grid->addWidget( m_cLimitPagesX, 1, 2 );
- QStringList lstX;
+ TQStringList lstX;
lstX.append( i18n( "No Limit" ) );
for( int i = 1; i <= 20; i += 1 )
{
- lstX.append( QString( "%1" ).arg( i ) );
+ lstX.append( TQString( "%1" ).tqarg( i ) );
}
if( print->pageLimitX() > 20 )
{
- lstX.append( QString( "%1" ).arg( print->pageLimitX() ) );
+ lstX.append( TQString( "%1" ).tqarg( print->pageLimitX() ) );
}
m_cLimitPagesX->insertStringList( lstX );
@@ -240,21 +240,21 @@ void PaperLayout::initScaleOptions( QWidget * tab, QVBoxLayout * vbox )
else
m_cLimitPagesX->setCurrentItem( 21 );
- QLabel *pLimitPagesY = new QLabel ( i18n("Y:"), zoomGroup );
+ TQLabel *pLimitPagesY = new TQLabel ( i18n("Y:"), zoomGroup );
grid->addWidget( pLimitPagesY, 1, 3 );
- m_cLimitPagesY = new QComboBox( true, zoomGroup, "pagesY" );
+ m_cLimitPagesY = new TQComboBox( true, zoomGroup, "pagesY" );
grid->addWidget( m_cLimitPagesY, 1, 4 );
- QStringList lstY;
+ TQStringList lstY;
lstY.append( i18n( "No Limit" ) );
for( int i = 1; i <= 20; i += 1 )
{
- lstY.append( QString( "%1" ).arg( i ) );
+ lstY.append( TQString( "%1" ).tqarg( i ) );
}
if( print->pageLimitY() > 20 )
{
- lstY.append( QString( "%1" ).arg( print->pageLimitY() ) );
+ lstY.append( TQString( "%1" ).tqarg( print->pageLimitY() ) );
}
m_cLimitPagesY->insertStringList( lstY );
@@ -272,9 +272,9 @@ void PaperLayout::initScaleOptions( QWidget * tab, QVBoxLayout * vbox )
m_rScalingZoom->setChecked( true );
}
- connect( m_cZoom, SIGNAL( activated( int ) ), this, SLOT( slotChooseZoom( int ) ) );
- connect( m_cLimitPagesX, SIGNAL( activated( int ) ), this, SLOT( slotChoosePageLimit( int ) ) );
- connect( m_cLimitPagesY, SIGNAL( activated( int ) ), this, SLOT( slotChoosePageLimit( int ) ) );
+ connect( m_cZoom, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotChooseZoom( int ) ) );
+ connect( m_cLimitPagesX, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotChoosePageLimit( int ) ) );
+ connect( m_cLimitPagesY, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotChoosePageLimit( int ) ) );
}
void PaperLayout::slotChooseZoom( int /*index*/ )
@@ -312,7 +312,7 @@ void PaperLayout::slotOk()
{
SheetPrint *print = sheet->print();
- KoPageLayout pl = layout();
+ KoPageLayout pl = tqlayout();
KoHeadFoot hf = headFoot();
KoUnit::Unit unit = sheet->doc()->unit();
print->setPrintGrid( pPrintGrid->isChecked() );
@@ -321,17 +321,17 @@ void PaperLayout::slotOk()
print->setPrintObjects( pPrintObjects->isChecked() );
print->setPrintCharts( pPrintCharts->isChecked() );
// print->setPrintGraphics( pPrintGraphics->isChecked() );
- QString tmpPrintRange = ePrintRange->text();
- QString tmpRepeatCols = eRepeatCols->text();
- QString tmpRepeatRows = eRepeatRows->text();
+ TQString tmpPrintRange = ePrintRange->text();
+ TQString tmpRepeatCols = eRepeatCols->text();
+ TQString tmpRepeatRows = eRepeatRows->text();
if ( tmpPrintRange.isEmpty() )
{
- print->setPrintRange( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) );
+ print->setPrintRange( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) );
}
else
{
bool error = true;
- int first = tmpPrintRange.find(":");
+ int first = tmpPrintRange.tqfind(":");
if ( ( first != -1 ) && ( (int)tmpPrintRange.length() > first ) )
{
Point point1 ( tmpPrintRange.left( first ) );
@@ -341,10 +341,10 @@ void PaperLayout::slotOk()
if ( point2.isValid() )
{
error = false;
- print->setPrintRange ( QRect( QPoint( QMIN( point1.pos().x(), point2.pos().x() ),
- QMIN( point1.pos().y(), point2.pos().y() ) ),
- QPoint( QMAX( point1.pos().x(), point2.pos().x() ),
- QMAX( point1.pos().y(), point2.pos().y() ) ) ) );
+ print->setPrintRange ( TQRect( TQPoint( TQMIN( point1.pos().x(), point2.pos().x() ),
+ TQMIN( point1.pos().y(), point2.pos().y() ) ),
+ TQPoint( TQMAX( point1.pos().x(), point2.pos().x() ),
+ TQMAX( point1.pos().y(), point2.pos().y() ) ) ) );
}
}
}
@@ -354,12 +354,12 @@ void PaperLayout::slotOk()
if ( tmpRepeatCols.isEmpty() )
{
- print->setPrintRepeatColumns( qMakePair( 0, 0 ) );
+ print->setPrintRepeatColumns( tqMakePair( 0, 0 ) );
}
else
{
bool error = true;
- int first = tmpRepeatCols.find(":");
+ int first = tmpRepeatCols.tqfind(":");
if ( ( first != -1 ) && ( (int)tmpRepeatCols.length() > first ) )
{
int col1 = util_decodeColumnLabelText( tmpRepeatCols.left( first ) );
@@ -369,7 +369,7 @@ void PaperLayout::slotOk()
if ( col2 > 0 && col2 <= KS_colMax )
{
error = false;
- print->setPrintRepeatColumns ( qMakePair( col1, col2 ) );
+ print->setPrintRepeatColumns ( tqMakePair( col1, col2 ) );
}
}
}
@@ -380,12 +380,12 @@ void PaperLayout::slotOk()
if ( tmpRepeatRows.isEmpty() )
{
- print->setPrintRepeatRows ( qMakePair( 0, 0 ) );
+ print->setPrintRepeatRows ( tqMakePair( 0, 0 ) );
}
else
{
bool error = true;
- int first = tmpRepeatRows.find(":");
+ int first = tmpRepeatRows.tqfind(":");
if ( ( first != -1 ) && ( (int)tmpRepeatRows.length() > first ) )
{
int row1 = tmpRepeatRows.left( first ).toInt();
@@ -395,7 +395,7 @@ void PaperLayout::slotOk()
if ( row2 > 0 && row2 <= KS_rowMax )
{
error = false;
- print->setPrintRepeatRows ( qMakePair( row1, row2 ) );
+ print->setPrintRepeatRows ( tqMakePair( row1, row2 ) );
}
}
}
@@ -407,11 +407,11 @@ void PaperLayout::slotOk()
if ( m_rScalingZoom->isChecked() )
{
kdDebug() << "Zoom is selected" << endl;
- if( QString( "%1%" ).arg( qRound( print->zoom() * 100 ) ) != m_cZoom->currentText() )
+ if( TQString( "%1%" ).tqarg( tqRound( print->zoom() * 100 ) ) != m_cZoom->currentText() )
{
kdDebug() << "New zoom is different than original: " << m_cZoom->currentText() << endl;
- QString zoomtext = m_cZoom->currentText();
- zoomtext.replace("%","");
+ TQString zoomtext = m_cZoom->currentText();
+ zoomtext.tqreplace("%","");
bool convertok = false;
double zoomvalue = zoomtext.toDouble(&convertok);
if (!convertok)
@@ -478,8 +478,8 @@ void PaperLayout::slotOk()
if ( pl.format == PG_CUSTOM )
{
- print->setPaperWidth( qRound( POINT_TO_MM( pl.ptWidth ) *1000 ) / 1000 );
- print->setPaperHeight( qRound( POINT_TO_MM( pl.ptHeight ) *1000 ) / 1000 );
+ print->setPaperWidth( tqRound( POINT_TO_MM( pl.ptWidth ) *1000 ) / 1000 );
+ print->setPaperHeight( tqRound( POINT_TO_MM( pl.ptHeight ) *1000 ) / 1000 );
}
print->setPaperLayout( POINT_TO_MM(pl.ptLeft), POINT_TO_MM(pl.ptTop),
@@ -505,7 +505,7 @@ void PaperLayout::slotOk()
accept();
}
-void PaperLayout::closeEvent ( QCloseEvent * )
+void PaperLayout::closeEvent ( TQCloseEvent * )
{
delete this;
}
@@ -516,7 +516,7 @@ void PaperLayout::slotSelectionChanged()
if (!m_pView->selectionInfo()->isValid())
return;
- QString area = util_rangeName( m_pView->selectionInfo()->lastRange() );
+ TQString area = util_rangeName( m_pView->selectionInfo()->lastRange() );
if ( m_focus )
{
if ( m_focus == ePrintRange )
@@ -536,13 +536,13 @@ void PaperLayout::slotCancel()
reject();
}
-bool PaperLayout::eventFilter( QObject* obj, QEvent* ev )
+bool PaperLayout::eventFilter( TQObject* obj, TQEvent* ev )
{
- if ( obj == ePrintRange && ev->type() == QEvent::FocusIn )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(ePrintRange) && ev->type() == TQEvent::FocusIn )
m_focus = ePrintRange;
- else if ( obj == eRepeatCols && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(eRepeatCols) && ev->type() == TQEvent::FocusIn )
m_focus = eRepeatCols;
- else if ( obj == eRepeatRows && ev->type() == QEvent::FocusIn )
+ else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(eRepeatRows) && ev->type() == TQEvent::FocusIn )
m_focus = eRepeatRows;
else
return false;
diff --git a/kspread/dialogs/kspread_dlg_paperlayout.h b/kspread/dialogs/kspread_dlg_paperlayout.h
index 93981628..a7316f22 100644
--- a/kspread/dialogs/kspread_dlg_paperlayout.h
+++ b/kspread/dialogs/kspread_dlg_paperlayout.h
@@ -20,16 +20,16 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __kspread_dlg_paperlayout__
-#define __kspread_dlg_paperlayout__
+#ifndef __kspread_dlg_papertqlayout__
+#define __kspread_dlg_papertqlayout__
#include <kdialogbase.h>
#include <KoPageLayoutDia.h>
-class QCheckBox;
-class QComboBox;
-class QRadioButton;
-class QLineEdit;
+class TQCheckBox;
+class TQComboBox;
+class TQRadioButton;
+class TQLineEdit;
namespace KSpread
{
@@ -39,14 +39,15 @@ class View;
class PaperLayout: public KoPageLayoutDia
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaperLayout( QWidget* parent, const char* name,
- const KoPageLayout& layout,
+ PaperLayout( TQWidget* tqparent, const char* name,
+ const KoPageLayout& tqlayout,
const KoHeadFoot& headfoot,
int tabs, KoUnit::Unit unit,
Sheet * sheet, View *view);
- bool eventFilter( QObject* obj, QEvent* ev );
+ bool eventFilter( TQObject* obj, TQEvent* ev );
protected slots:
virtual void slotOk();
@@ -57,36 +58,36 @@ protected:
void initTab();
protected:
- virtual void closeEvent ( QCloseEvent * );
+ virtual void closeEvent ( TQCloseEvent * );
private slots:
void slotChooseZoom( int index );
void slotChoosePageLimit( int index );
private:
- void initGeneralOptions( QWidget * tab, QVBoxLayout * vbox );
- void initRanges( QWidget * tab, QVBoxLayout * vbox );
- void initScaleOptions( QWidget * tab, QVBoxLayout * vbox );
+ void initGeneralOptions( TQWidget * tab, TQVBoxLayout * vbox );
+ void initRanges( TQWidget * tab, TQVBoxLayout * vbox );
+ void initScaleOptions( TQWidget * tab, TQVBoxLayout * vbox );
Sheet * m_pSheet;
View * m_pView;
- QCheckBox * pApplyToAll;
- QCheckBox * pPrintGrid;
- QCheckBox * pPrintCommentIndicator;
- QCheckBox * pPrintFormulaIndicator;
- QCheckBox * pPrintObjects;
- QCheckBox * pPrintCharts;
- QCheckBox * pPrintGraphics;
- QLineEdit * ePrintRange;
- QLineEdit * eRepeatCols;
- QLineEdit * eRepeatRows;
- QLineEdit * m_focus;
- QComboBox * m_cZoom;
- QComboBox * m_cLimitPagesX;
- QComboBox * m_cLimitPagesY;
- QRadioButton * m_rScalingZoom;
- QRadioButton * m_rScalingLimitPages;
+ TQCheckBox * pApplyToAll;
+ TQCheckBox * pPrintGrid;
+ TQCheckBox * pPrintCommentIndicator;
+ TQCheckBox * pPrintFormulaIndicator;
+ TQCheckBox * pPrintObjects;
+ TQCheckBox * pPrintCharts;
+ TQCheckBox * pPrintGraphics;
+ TQLineEdit * ePrintRange;
+ TQLineEdit * eRepeatCols;
+ TQLineEdit * eRepeatRows;
+ TQLineEdit * m_focus;
+ TQComboBox * m_cZoom;
+ TQComboBox * m_cLimitPagesX;
+ TQComboBox * m_cLimitPagesY;
+ TQRadioButton * m_rScalingZoom;
+ TQRadioButton * m_rScalingLimitPages;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_pasteinsert.cc b/kspread/dialogs/kspread_dlg_pasteinsert.cc
index 98a37296..83e8bce3 100644
--- a/kspread/dialogs/kspread_dlg_pasteinsert.cc
+++ b/kspread/dialogs/kspread_dlg_pasteinsert.cc
@@ -20,13 +20,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kbuttonbox.h>
-#include <qbuttongroup.h>
+#include <tqbuttongroup.h>
#include <kdebug.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
#include "kspread_dlg_pasteinsert.h"
#include "kspread_canvas.h"
@@ -37,25 +37,25 @@
using namespace KSpread;
-PasteInsertDialog::PasteInsertDialog( View* parent, const char* name,const QRect &_rect)
- : KDialogBase( parent, name, TRUE,i18n("Paste Inserting Cells"),Ok|Cancel )
+PasteInsertDialog::PasteInsertDialog( View* tqparent, const char* name,const TQRect &_rect)
+ : KDialogBase( tqparent, name, TRUE,i18n("Paste Inserting Cells"),Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
rect=_rect;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Insert"),page);
+ TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n("Insert"),page);
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
+ grp->tqlayout();
lay1->addWidget(grp);
- rb1 = new QRadioButton( i18n("Move towards right"), grp );
- rb2 = new QRadioButton( i18n("Move towards bottom"), grp );
+ rb1 = new TQRadioButton( i18n("Move towards right"), grp );
+ rb2 = new TQRadioButton( i18n("Move towards bottom"), grp );
rb1->setChecked(true);
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
}
void PasteInsertDialog::slotOk()
diff --git a/kspread/dialogs/kspread_dlg_pasteinsert.h b/kspread/dialogs/kspread_dlg_pasteinsert.h
index 8914f90d..7159b87e 100644
--- a/kspread/dialogs/kspread_dlg_pasteinsert.h
+++ b/kspread/dialogs/kspread_dlg_pasteinsert.h
@@ -25,8 +25,8 @@
#include <kdialogbase.h>
-class QCheckBox;
-class QRadioButton;
+class TQCheckBox;
+class TQRadioButton;
namespace KSpread
{
@@ -36,16 +36,17 @@ class View;
class PasteInsertDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PasteInsertDialog( View* parent, const char* name, const QRect &_rect );
+ PasteInsertDialog( View* tqparent, const char* name, const TQRect &_rect );
public slots:
void slotOk();
private:
View* m_pView;
- QRadioButton *rb1;
- QRadioButton *rb2;
- QRect rect;
+ TQRadioButton *rb1;
+ TQRadioButton *rb2;
+ TQRect rect;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_preference.cc b/kspread/dialogs/kspread_dlg_preference.cc
index b6d0c216..2b13cbdf 100644
--- a/kspread/dialogs/kspread_dlg_preference.cc
+++ b/kspread/dialogs/kspread_dlg_preference.cc
@@ -25,12 +25,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qvgroupbox.h>
-#include <qwhatsthis.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqvgroupbox.h>
+#include <tqwhatsthis.h>
#include <kconfig.h>
#include <kstatusbar.h>
@@ -55,39 +55,39 @@
using namespace KSpread;
-PreferenceDialog::PreferenceDialog( View* parent, const char* /*name*/)
+PreferenceDialog::PreferenceDialog( View* tqparent, const char* /*name*/)
: KDialogBase(KDialogBase::IconList,i18n("Configure KSpread") ,
KDialogBase::Ok | KDialogBase::Cancel| KDialogBase::Default,
KDialogBase::Ok)
{
- m_pView=parent;
+ m_pView=tqparent;
- connect(this, SIGNAL(okClicked()),this,SLOT(slotApply()));
+ connect(this, TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotApply()));
- QVBox *page2=addVBoxPage(i18n("Locale Settings"), QString::null,BarIcon("gohome",KIcon::SizeMedium));
- _localePage=new parameterLocale(parent,page2 );
+ TQVBox *page2=addVBoxPage(i18n("Locale Settings"), TQString(),BarIcon("gohome",KIcon::SizeMedium));
+ _localePage=new parameterLocale(tqparent,page2 );
- QVBox *page3=addVBoxPage(i18n("Interface"), QString::null,BarIcon("signature", KIcon::SizeMedium) );
- _configure = new configure(parent,page3 );
+ TQVBox *page3=addVBoxPage(i18n("Interface"), TQString(),BarIcon("signature", KIcon::SizeMedium) );
+ _configure = new configure(tqparent,page3 );
- QVBox * page4=addVBoxPage(i18n("Misc"), QString::null,BarIcon("misc",KIcon::SizeMedium) );
- _miscParameter = new miscParameters(parent,page4 );
+ TQVBox * page4=addVBoxPage(i18n("Misc"), TQString(),BarIcon("misc",KIcon::SizeMedium) );
+ _miscParameter = new miscParameters(tqparent,page4 );
- QVBox *page5=addVBoxPage(i18n("Color"), QString::null,BarIcon("colorize",KIcon::SizeMedium) );
- _colorParameter=new colorParameters(parent,page5 );
+ TQVBox *page5=addVBoxPage(i18n("Color"), TQString(),BarIcon("colorize",KIcon::SizeMedium) );
+ _colorParameter=new colorParameters(tqparent,page5 );
- QVBox *page6=addVBoxPage(i18n("Page Layout"), QString::null,BarIcon("edit",KIcon::SizeMedium) );
- _layoutPage=new configureLayoutPage(parent,page6 );
+ TQVBox *page6=addVBoxPage(i18n("Page Layout"), TQString(),BarIcon("edit",KIcon::SizeMedium) );
+ _layoutPage=new configureLayoutPage(tqparent,page6 );
- QVBox *page7 = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"),
+ TQVBox *page7 = addVBoxPage( i18n("Spelling"), i18n("Spell Checker Behavior"),
BarIcon("spellcheck", KIcon::SizeMedium) );
- _spellPage=new configureSpellPage(parent,page7);
+ _spellPage=new configureSpellPage(tqparent,page7);
if (KoSpeaker::isKttsdInstalled()) {
- QVBox *page8 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"),
+ TQVBox *page8 = addVBoxPage( i18n("Abbreviation for Text-to-Speech", "TTS"),
i18n("Text-to-Speech Settings"), BarIcon("access", KIcon::SizeMedium) );
- _ttsPage=new configureTTSPage(parent, page8);
+ _ttsPage=new configureTTSPage(tqparent, page8);
} else _ttsPage = 0;
}
@@ -150,26 +150,26 @@ void PreferenceDialog::slotDefault()
}
-parameterLocale::parameterLocale( View* _view, QVBox *box , char *name )
- :QObject ( box->parent(),name)
+parameterLocale::parameterLocale( View* _view, TQVBox *box , char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
m_bUpdateLocale=false;
- QGroupBox* tmpQGroupBox = new QVGroupBox( i18n("Settings"), box, "GroupBox" );
+ TQGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n("Settings"), box, "GroupBox" );
KLocale* locale=_view->doc()->locale();
- m_language=new QLabel( tmpQGroupBox,"label");
- m_number=new QLabel( tmpQGroupBox,"label6");
- m_date=new QLabel( tmpQGroupBox,"label1");
- m_shortDate=new QLabel( tmpQGroupBox,"label5");
- m_time=new QLabel( tmpQGroupBox,"label2");
- m_money=new QLabel( tmpQGroupBox,"label3");
+ m_language=new TQLabel( tmpTQGroupBox,"label");
+ m_number=new TQLabel( tmpTQGroupBox,"label6");
+ m_date=new TQLabel( tmpTQGroupBox,"label1");
+ m_shortDate=new TQLabel( tmpTQGroupBox,"label5");
+ m_time=new TQLabel( tmpTQGroupBox,"label2");
+ m_money=new TQLabel( tmpTQGroupBox,"label3");
updateToMatchLocale(locale);
- m_updateButton=new QPushButton ( i18n("&Update Locale Settings"), tmpQGroupBox);
- connect(m_updateButton, SIGNAL(clicked()),this,SLOT(updateDefaultSystemConfig()));
+ m_updateButton=new TQPushButton ( i18n("&Update Locale Settings"), tmpTQGroupBox);
+ connect(m_updateButton, TQT_SIGNAL(clicked()),this,TQT_SLOT(updateDefaultSystemConfig()));
}
void parameterLocale::apply()
@@ -192,16 +192,16 @@ void parameterLocale::updateDefaultSystemConfig()
void parameterLocale::updateToMatchLocale(KLocale* locale)
{
- m_language->setText( i18n("Language: %1").arg( locale->language() ));
- m_number->setText( i18n("Default number format: %1").arg( locale->formatNumber(12.55) ));
- m_date->setText( i18n("Long date format: %1").arg( locale->formatDate( QDate::currentDate() )));
- m_shortDate->setText( i18n("Short date format: %1").arg( locale->formatDate( QDate::currentDate() ,true) ));
- m_time->setText( i18n("Time format: %1").arg( locale->formatTime( QTime::currentTime() ) ));
- m_money->setText( i18n("Currency format: %1").arg( locale->formatMoney(12.55) ));
+ m_language->setText( i18n("Language: %1").tqarg( locale->language() ));
+ m_number->setText( i18n("Default number format: %1").tqarg( locale->formatNumber(12.55) ));
+ m_date->setText( i18n("Long date format: %1").tqarg( locale->formatDate( TQDate::tqcurrentDate() )));
+ m_shortDate->setText( i18n("Short date format: %1").tqarg( locale->formatDate( TQDate::tqcurrentDate() ,true) ));
+ m_time->setText( i18n("Time format: %1").tqarg( locale->formatTime( TQTime::currentTime() ) ));
+ m_money->setText( i18n("Currency format: %1").tqarg( locale->formatMoney(12.55) ));
}
-configure::configure( View* _view, QVBox *box , char *name )
- :QObject ( box->parent(),name)
+configure::configure( View* _view, TQVBox *box , char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
@@ -214,7 +214,7 @@ configure::configure( View* _view, QVBox *box , char *name )
bool statusBar=true;
m_oldBackupFile = true;
- QGroupBox* tmpQGroupBox = new QVGroupBox( i18n("Settings"), box, "GroupBox" );
+ TQGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n("Settings"), box, "GroupBox" );
config = Factory::global()->config();
int _page=1;
@@ -232,58 +232,58 @@ configure::configure( View* _view, QVBox *box , char *name )
rowHeader=config->readBoolEntry("Row Header",true);
tabbar=config->readBoolEntry("Tabbar",true);
formulaBar=config->readBoolEntry("Formula bar",true);
- statusBar=config->readBoolEntry("Status bar",true);
+ statusBar=config->readBoolEntry("tqStatus bar",true);
oldRecent=config->readNumEntry( "NbRecentFile" ,10);
oldAutoSaveValue=config->readNumEntry("AutoSave",KoDocument::defaultAutoSave()/60);
m_oldBackupFile=config->readBoolEntry("BackupFile",m_oldBackupFile);
}
- nbPage=new KIntNumInput(_page, tmpQGroupBox , 10);
+ nbPage=new KIntNumInput(_page, tmpTQGroupBox , 10);
nbPage->setRange(1, 10, 1);
nbPage->setLabel(i18n("Number of sheets open at the &beginning:"));
- QWhatsThis::add(nbPage, i18n( "Controls how many worksheets will be created if the option Start with an empty document is chosen when KSpread is started." ) );
+ TQWhatsThis::add(nbPage, i18n( "Controls how many worksheets will be created if the option Start with an empty document is chosen when KSpread is started." ) );
- nbRecentFile=new KIntNumInput(oldRecent, tmpQGroupBox , 10);
+ nbRecentFile=new KIntNumInput(oldRecent, tmpTQGroupBox , 10);
nbRecentFile->setRange(1, 20, 1);
nbRecentFile->setLabel(i18n("&Number of files to show in Recent Files list:"));
- QWhatsThis::add(nbRecentFile, i18n( "Controls the maximum number of filenames that are shown when you select File-> Open Recent." ) );
+ TQWhatsThis::add(nbRecentFile, i18n( "Controls the maximum number of filenames that are shown when you select File-> Open Recent." ) );
- autoSaveDelay=new KIntNumInput(oldAutoSaveValue, tmpQGroupBox , 10);
+ autoSaveDelay=new KIntNumInput(oldAutoSaveValue, tmpTQGroupBox , 10);
autoSaveDelay->setRange(0, 60, 1);
autoSaveDelay->setLabel(i18n("Au&tosave delay (minutes):"));
autoSaveDelay->setSpecialValueText(i18n("Do not save automatically"));
autoSaveDelay->setSuffix(i18n("min"));
- QWhatsThis::add(autoSaveDelay, i18n( "Here you can select the time between autosaves, or disable this feature altogether by choosing Do not save automatically (drag the slider to the far left)." ) );
+ TQWhatsThis::add(autoSaveDelay, i18n( "Here you can select the time between autosaves, or disable this feature altogether by choosing Do not save automatically (drag the slider to the far left)." ) );
- m_createBackupFile = new QCheckBox( i18n("Create backup files"), tmpQGroupBox );
+ m_createBackupFile = new TQCheckBox( i18n("Create backup files"), tmpTQGroupBox );
m_createBackupFile->setChecked( m_oldBackupFile );
- QWhatsThis::add(m_createBackupFile, i18n( "Check this box if you want some backup files created. This is checked per default." ) );
+ TQWhatsThis::add(m_createBackupFile, i18n( "Check this box if you want some backup files created. This is checked per default." ) );
- showVScrollBar=new QCheckBox(i18n("Show &vertical scrollbar"),tmpQGroupBox);
+ showVScrollBar=new TQCheckBox(i18n("Show &vertical scrollbar"),tmpTQGroupBox);
showVScrollBar->setChecked(vertical);
- QWhatsThis::add(showVScrollBar, i18n( "Check or uncheck this box to show or hide the vertical scrollbar in all sheets." ) );
+ TQWhatsThis::add(showVScrollBar, i18n( "Check or uncheck this box to show or hide the vertical scrollbar in all sheets." ) );
- showHScrollBar=new QCheckBox(i18n("Show &horizontal scrollbar"),tmpQGroupBox);
+ showHScrollBar=new TQCheckBox(i18n("Show &horizontal scrollbar"),tmpTQGroupBox);
showHScrollBar->setChecked(horizontal);
- QWhatsThis::add(showHScrollBar, i18n( "Check or uncheck this box to show or hide the horizontal scrollbar in all sheets." ) );
+ TQWhatsThis::add(showHScrollBar, i18n( "Check or uncheck this box to show or hide the horizontal scrollbar in all sheets." ) );
- showColHeader=new QCheckBox(i18n("Show c&olumn header"),tmpQGroupBox);
+ showColHeader=new TQCheckBox(i18n("Show c&olumn header"),tmpTQGroupBox);
showColHeader->setChecked(colHeader);
- QWhatsThis::add(showColHeader, i18n( "Check this box to show the column letters across the top of each worksheet." ) );
- showRowHeader=new QCheckBox(i18n("Show &row header"),tmpQGroupBox);
+ TQWhatsThis::add(showColHeader, i18n( "Check this box to show the column letters across the top of each worksheet." ) );
+ showRowHeader=new TQCheckBox(i18n("Show &row header"),tmpTQGroupBox);
showRowHeader->setChecked(rowHeader);
- QWhatsThis::add(showRowHeader, i18n( "Check this box to show the row numbers down the left side." ) );
+ TQWhatsThis::add(showRowHeader, i18n( "Check this box to show the row numbers down the left side." ) );
- showTabBar =new QCheckBox(i18n("Show ta&bs"),tmpQGroupBox);
+ showTabBar =new TQCheckBox(i18n("Show ta&bs"),tmpTQGroupBox);
showTabBar->setChecked(tabbar);
- QWhatsThis::add(showTabBar, i18n( "This check box controls whether the sheet tabs are shown at the bottom of the worksheet." ) );
+ TQWhatsThis::add(showTabBar, i18n( "This check box controls whether the sheet tabs are shown at the bottom of the worksheet." ) );
- showFormulaBar =new QCheckBox(i18n("Sho&w formula toolbar"),tmpQGroupBox);
+ showFormulaBar =new TQCheckBox(i18n("Sho&w formula toolbar"),tmpTQGroupBox);
showFormulaBar->setChecked(formulaBar);
- QWhatsThis::add(showFormulaBar, i18n( "Here is where you can choose to show or hide the Formula bar." ) );
+ TQWhatsThis::add(showFormulaBar, i18n( "Here is where you can choose to show or hide the Formula bar." ) );
- showStatusBar =new QCheckBox(i18n("Show stat&us bar"),tmpQGroupBox);
+ showStatusBar =new TQCheckBox(i18n("Show stat&us bar"),tmpTQGroupBox);
showStatusBar->setChecked(statusBar);
- QWhatsThis::add(showStatusBar, i18n( "Uncheck this box if you want to hide the status bar." ) );
+ TQWhatsThis::add(showStatusBar, i18n( "Uncheck this box if you want to hide the status bar." ) );
}
@@ -377,7 +377,7 @@ void configure::apply()
}
active=showStatusBar->isChecked();
- config->writeEntry( "Status bar",active);
+ config->writeEntry( "tqStatus bar",active);
m_pView->showStatusBar( active );
int val=nbRecentFile->value();
@@ -405,13 +405,13 @@ void configure::apply()
}
-miscParameters::miscParameters( View* _view,QVBox *box, char *name )
- :QObject ( box->parent(),name)
+miscParameters::miscParameters( View* _view,TQVBox *box, char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
- QGroupBox* tmpQGroupBox = new QVGroupBox( i18n("Misc"), box, "GroupBox" );
+ TQGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n("Misc"), box, "GroupBox" );
config = Factory::global()->config();
indentUnit = _view->doc()->unit();
@@ -430,17 +430,17 @@ miscParameters::miscParameters( View* _view,QVBox *box, char *name )
m_oldNbRedo=config->readNumEntry("UndoRedo",m_oldNbRedo);
}
- m_undoRedoLimit=new KIntNumInput( m_oldNbRedo, tmpQGroupBox );
+ m_undoRedoLimit=new KIntNumInput( m_oldNbRedo, tmpTQGroupBox );
m_undoRedoLimit->setLabel(i18n("Undo/redo limit:"));
m_undoRedoLimit->setRange(10, 60, 1);
- QLabel *label=new QLabel(i18n("&Completion mode:"), tmpQGroupBox);
+ TQLabel *label=new TQLabel(i18n("&Completion mode:"), tmpTQGroupBox);
- typeCompletion=new QComboBox(tmpQGroupBox);
+ typeCompletion=new TQComboBox(tmpTQGroupBox);
label->setBuddy(typeCompletion);
- QWhatsThis::add(typeCompletion, i18n( "Lets you choose the (auto) text completion mode from a range of options in the drop down selection box." ) );
- QStringList listType;
+ TQWhatsThis::add(typeCompletion, i18n( "Lets you choose the (auto) text completion mode from a range of options in the drop down selection box." ) );
+ TQStringList listType;
listType+=i18n("None");
listType+=i18n("Manual");
listType+=i18n("Popup");
@@ -449,10 +449,10 @@ miscParameters::miscParameters( View* _view,QVBox *box, char *name )
typeCompletion->insertStringList(listType);
typeCompletion->setCurrentItem(0);
comboChanged=false;
- connect(typeCompletion,SIGNAL(activated( const QString & )),this,SLOT(slotTextComboChanged(const QString &)));
+ connect(typeCompletion,TQT_SIGNAL(activated( const TQString & )),this,TQT_SLOT(slotTextComboChanged(const TQString &)));
- label=new QLabel(i18n("&Pressing enter moves cell cursor:"), tmpQGroupBox);
- typeOfMove=new QComboBox( tmpQGroupBox);
+ label=new TQLabel(i18n("&Pressing enter moves cell cursor:"), tmpTQGroupBox);
+ typeOfMove=new TQComboBox( tmpTQGroupBox);
label->setBuddy(typeOfMove);
listType.clear();
listType+=i18n("Down");
@@ -462,13 +462,13 @@ miscParameters::miscParameters( View* _view,QVBox *box, char *name )
listType+=i18n("Down, First Column");
typeOfMove->insertStringList(listType);
typeOfMove->setCurrentItem(0);
- QWhatsThis::add(typeOfMove, i18n( "When you have selected a cell, pressing the Enter key will move the cell cursor one cell left, right, up or down, as determined by this setting." ) );
+ TQWhatsThis::add(typeOfMove, i18n( "When you have selected a cell, pressing the Enter key will move the cell cursor one cell left, right, up or down, as determined by this setting." ) );
- label=new QLabel(i18n("&Method of calc:"), tmpQGroupBox);
+ label=new TQLabel(i18n("&Method of calc:"), tmpTQGroupBox);
- typeCalc=new QComboBox( tmpQGroupBox);
+ typeCalc=new TQComboBox( tmpTQGroupBox);
label->setBuddy(typeCalc);
- QStringList listTypeCalc;
+ TQStringList listTypeCalc;
listTypeCalc+=i18n("Sum");
listTypeCalc+=i18n("Min");
listTypeCalc+=i18n("Max");
@@ -478,26 +478,26 @@ miscParameters::miscParameters( View* _view,QVBox *box, char *name )
listTypeCalc+=i18n("None");
typeCalc->insertStringList(listTypeCalc);
typeCalc->setCurrentItem(0);
- QWhatsThis::add(typeCalc, i18n( "This drop down selection box can be used to choose the calculation performed by the Statusbar Summary function." ) );
+ TQWhatsThis::add(typeCalc, i18n( "This drop down selection box can be used to choose the calculation performed by the Statusbar Summary function." ) );
-// valIndent = new KDoubleNumInput( _indent, tmpQGroupBox , 10.0 );
- valIndent = new KDoubleNumInput( tmpQGroupBox );
+// valIndent = new KDoubleNumInput( _indent, tmpTQGroupBox , 10.0 );
+ valIndent = new KDoubleNumInput( tmpTQGroupBox );
valIndent->setRange( KoUnit::toUserValue( 0.0, indentUnit ),
KoUnit::toUserValue( 400.0, indentUnit ),
KoUnit::toUserValue( 10.0, indentUnit) );
// valIndent->setRange( 0.0, 100.0, 10.0 );
valIndent->setValue ( KoUnit::toUserValue( _indent, indentUnit ) );
- QWhatsThis::add(valIndent, i18n( "Lets you define the amount of indenting used by the Increase Indent and Decrease Indent option in the Format menu." ) );
- valIndent->setLabel(i18n("&Indentation step (%1):").arg(KoUnit::unitName(indentUnit)));
+ TQWhatsThis::add(valIndent, i18n( "Lets you define the amount of indenting used by the Increase Indent and Decrease Indent option in the Format menu." ) );
+ valIndent->setLabel(i18n("&Indentation step (%1):").tqarg(KoUnit::unitName(indentUnit)));
- msgError= new QCheckBox(i18n("&Show error message for invalid formulae"),tmpQGroupBox);
+ msgError= new TQCheckBox(i18n("&Show error message for invalid formulae"),tmpTQGroupBox);
msgError->setChecked(m_bMsgError);
- QWhatsThis::add(msgError, i18n( "If this box is checked a message box will pop up when what you have entered into a cell cannot be understood by KSpread." ) );
+ TQWhatsThis::add(msgError, i18n( "If this box is checked a message box will pop up when what you have entered into a cell cannot be understood by KSpread." ) );
initComboBox();
}
-void miscParameters::slotTextComboChanged(const QString &)
+void miscParameters::slotTextComboChanged(const TQString &)
{
comboChanged=true;
}
@@ -534,19 +534,19 @@ switch(tmpCompletion )
}
switch( m_pView->doc()->getMoveToValue( ))
{
- case Bottom:
+ case KSpread::Bottom:
typeOfMove->setCurrentItem(0);
break;
- case Left:
+ case KSpread::Left:
typeOfMove->setCurrentItem(3);
break;
- case Top:
+ case KSpread::Top:
typeOfMove->setCurrentItem(1);
break;
- case Right:
+ case KSpread::Right:
typeOfMove->setCurrentItem(2);
break;
- case BottomFirst:
+ case KSpread::BottomFirst:
typeOfMove->setCurrentItem(4);
break;
default :
@@ -637,23 +637,23 @@ void miscParameters::apply()
config->writeEntry( "Completion Mode", (int)tmpCompletion);
}
- KSpread::MoveTo tmpMoveTo=Bottom;
+ KSpread::MoveTo tmpMoveTo=KSpread::Bottom;
switch(typeOfMove->currentItem())
{
case 0:
- tmpMoveTo=Bottom;
+ tmpMoveTo=KSpread::Bottom;
break;
case 1:
- tmpMoveTo=Top;
+ tmpMoveTo=KSpread::Top;
break;
case 2:
- tmpMoveTo=Right;
+ tmpMoveTo=KSpread::Right;
break;
case 3:
- tmpMoveTo=Left;
+ tmpMoveTo=KSpread::Left;
break;
case 4:
- tmpMoveTo=BottomFirst;
+ tmpMoveTo=KSpread::BottomFirst;
break;
}
if(tmpMoveTo!=m_pView->doc()->getMoveToValue())
@@ -716,13 +716,13 @@ void miscParameters::apply()
-colorParameters::colorParameters( View* _view,QVBox *box , char *name )
- :QObject ( box->parent(),name)
+colorParameters::colorParameters( View* _view,TQVBox *box , char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
config = Factory::global()->config();
- QColor _gridColor(Qt::lightGray);
+ TQColor _gridColor(TQt::lightGray);
if ( config->hasGroup("KSpread Color" ) )
{
@@ -730,36 +730,36 @@ colorParameters::colorParameters( View* _view,QVBox *box , char *name )
_gridColor = config->readColorEntry("GridColor",&_gridColor);
}
- QGroupBox* tmpQGroupBox = new QVGroupBox( i18n("Color"), box, "GroupBox" );
+ TQGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n("Color"), box, "GroupBox" );
- QLabel *label = new QLabel(i18n("&Grid color:"), tmpQGroupBox,"label20" );
+ TQLabel *label = new TQLabel(i18n("&Grid color:"), tmpTQGroupBox,"label20" );
gridColor = new KColorButton( _gridColor,
- Qt::lightGray,
- tmpQGroupBox );
- QWhatsThis::add(gridColor, i18n( "Click here to change the grid color ie the color of the borders of each cell." ) );
+ TQt::lightGray,
+ tmpTQGroupBox );
+ TQWhatsThis::add(gridColor, i18n( "Click here to change the grid color ie the color of the borders of each cell." ) );
label->setBuddy(gridColor);
- QColor _pbColor(Qt::red);
+ TQColor _pbColor(TQt::red);
if ( config->hasGroup("KSpread Color" ) )
{
config->setGroup( "KSpread Color" );
_pbColor = config->readColorEntry("PageBorderColor", &_pbColor);
}
- QLabel * label2 = new QLabel( i18n("&Page borders:"), tmpQGroupBox, "label21" );
+ TQLabel * label2 = new TQLabel( i18n("&Page borders:"), tmpTQGroupBox, "label21" );
pageBorderColor = new KColorButton( _pbColor,
- Qt::red,
- tmpQGroupBox );
- QWhatsThis::add(pageBorderColor, i18n( "When the View ->Show Page Borders menu item is checked, the page borders are displayed. Click here to choose another color for the borders than the default red." ) );
+ TQt::red,
+ tmpTQGroupBox );
+ TQWhatsThis::add(pageBorderColor, i18n( "When the View ->Show Page Borders menu item is checked, the page borders are displayed. Click here to choose another color for the borders than the default red." ) );
label2->setBuddy(pageBorderColor);
}
void colorParameters::apply()
{
- QColor _col = gridColor->color();
+ TQColor _col = gridColor->color();
if ( m_pView->doc()->gridColor() != _col )
{
m_pView->doc()->setGridColor( _col );
@@ -767,7 +767,7 @@ void colorParameters::apply()
config->writeEntry( "GridColor", _col );
}
- QColor _pbColor = pageBorderColor->color();
+ TQColor _pbColor = pageBorderColor->color();
if ( m_pView->doc()->pageBorderColor() != _pbColor )
{
m_pView->doc()->changePageBorderColor( _pbColor );
@@ -784,55 +784,55 @@ void colorParameters::slotDefault()
-configureLayoutPage::configureLayoutPage( View* _view,QVBox *box , char *name )
- :QObject ( box->parent(),name)
+configureLayoutPage::configureLayoutPage( View* _view,TQVBox *box , char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
- QGroupBox* tmpQGroupBox = new QGroupBox( 0, Qt::Vertical, i18n("Default Parameters"), box, "GroupBox" );
- tmpQGroupBox->layout()->setSpacing(KDialog::spacingHint());
- tmpQGroupBox->layout()->setMargin(KDialog::marginHint());
+ TQGroupBox* tmpTQGroupBox = new TQGroupBox( 0, Qt::Vertical, i18n("Default Parameters"), box, "GroupBox" );
+ tmpTQGroupBox->tqlayout()->setSpacing(KDialog::spacingHint());
+ tmpTQGroupBox->tqlayout()->setMargin(KDialog::marginHint());
- QGridLayout *grid1 = new QGridLayout(tmpQGroupBox->layout(),8,1);
+ TQGridLayout *grid1 = new TQGridLayout(tmpTQGroupBox->tqlayout(),8,1);
grid1->addRowSpacing( 0, KDialog::marginHint() );
grid1->setRowStretch( 7, 10 );
config = Factory::global()->config();
- QLabel *label=new QLabel(i18n("Default page &size:"), tmpQGroupBox);
+ TQLabel *label=new TQLabel(i18n("Default page &size:"), tmpTQGroupBox);
grid1->addWidget(label,0,0);
- defaultSizePage=new QComboBox( tmpQGroupBox);
+ defaultSizePage=new TQComboBox( tmpTQGroupBox);
label->setBuddy(defaultSizePage);
defaultSizePage->insertStringList( KoPageFormat::allFormats() );
defaultSizePage->setCurrentItem(1);
- QWhatsThis::add(defaultSizePage, i18n( "Choose the default page size for your worksheet among all the most common page sizes.\nNote that you can overwrite the page size for the current sheet using the Format -> Page Layout... dialog." ) );
+ TQWhatsThis::add(defaultSizePage, i18n( "Choose the default page size for your worksheet among all the most common page sizes.\nNote that you can overwrite the page size for the current sheet using the Format -> Page Layout... dialog." ) );
grid1->addWidget(defaultSizePage,1,0);
- label=new QLabel(i18n("Default page &orientation:"), tmpQGroupBox);
+ label=new TQLabel(i18n("Default page &orientation:"), tmpTQGroupBox);
grid1->addWidget(label,2,0);
- defaultOrientationPage=new QComboBox( tmpQGroupBox);
+ defaultOrientationPage=new TQComboBox( tmpTQGroupBox);
label->setBuddy(defaultOrientationPage);
- QStringList listType;
+ TQStringList listType;
listType+=i18n( "Portrait" );
listType+=i18n( "Landscape" );
defaultOrientationPage->insertStringList(listType);
defaultOrientationPage->setCurrentItem(0);
- QWhatsThis::add(defaultOrientationPage, i18n( "Choose the sheet orientation: portrait or lanscape.\nNote that you can overwrite the orientation for the current sheet using the Format -> Page Layout... dialog." ) );
+ TQWhatsThis::add(defaultOrientationPage, i18n( "Choose the sheet orientation: portrait or lanscape.\nNote that you can overwrite the orientation for the current sheet using the Format -> Page Layout... dialog." ) );
grid1->addWidget(defaultOrientationPage,3,0);
- label=new QLabel(tmpQGroupBox);
+ label=new TQLabel(tmpTQGroupBox);
label->setText(i18n("Default page &unit:"));
grid1->addWidget(label,4,0);
- defaultUnit=new QComboBox( tmpQGroupBox);
+ defaultUnit=new TQComboBox( tmpTQGroupBox);
label->setBuddy(defaultUnit);
defaultUnit->insertStringList(KoUnit::listOfUnitName());
defaultUnit->setCurrentItem(0);
- QWhatsThis::add(defaultUnit, i18n( "Choose the default unit that will be used in your sheet.\nNote that you can overwrite the unit for the current sheet using the Format -> Page Layout... dialog." ) );
+ TQWhatsThis::add(defaultUnit, i18n( "Choose the default unit that will be used in your sheet.\nNote that you can overwrite the unit for the current sheet using the Format -> Page Layout... dialog." ) );
grid1->addWidget(defaultUnit,5,0);
initCombo();
@@ -890,8 +890,8 @@ void configureLayoutPage::apply()
m_pView->slotUpdateView( m_pView->activeSheet() );
}
-configureSpellPage::configureSpellPage( View* _view,QVBox *box , char *name )
- :QObject ( box->parent(),name)
+configureSpellPage::configureSpellPage( View* _view,TQVBox *box , char *name )
+ :TQObject ( box->tqparent(),name)
{
m_pView = _view;
@@ -899,13 +899,13 @@ configureSpellPage::configureSpellPage( View* _view,QVBox *box , char *name )
m_spellConfigWidget = new KSpellConfig( box, "spell_check",m_pView->doc()->getKSpellConfig()/*, false*/);
- dontCheckUpperWord = new QCheckBox( i18n("Skip all uppercase words"),box);
- QWhatsThis::add(dontCheckUpperWord, i18n( "If checked, the words written in uppercase letters are not spell checked. This might be useful if you have a lot of acronyms such as KDE for example." ) );
- dontCheckTitleCase = new QCheckBox( i18n("Do not check title case"),box);
- QWhatsThis::add(dontCheckTitleCase, i18n( "Check this box if you want the spellchecker to ignore the title case, for example My Own Spreadsheet or My own spreadsheet. If this is unchecked, the spell checker will ask for a uppercase letter in the title nouns." ) );
+ dontCheckUpperWord = new TQCheckBox( i18n("Skip all uppercase words"),box);
+ TQWhatsThis::add(dontCheckUpperWord, i18n( "If checked, the words written in uppercase letters are not spell checked. This might be useful if you have a lot of acronyms such as KDE for example." ) );
+ dontCheckTitleCase = new TQCheckBox( i18n("Do not check title case"),box);
+ TQWhatsThis::add(dontCheckTitleCase, i18n( "Check this box if you want the spellchecker to ignore the title case, for example My Own Spreadsheet or My own spreadsheet. If this is unchecked, the spell checker will ask for a uppercase letter in the title nouns." ) );
- QWidget* spacer = new QWidget( box );
- spacer->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding ) );
+ TQWidget* spacer = new TQWidget( box );
+ spacer->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
if( config->hasGroup("KSpell kspread") )
{
@@ -955,33 +955,33 @@ void configureSpellPage::slotDefault()
////
-configureTTSPage::configureTTSPage( View *_view, QVBox *box, char *name )
- : QObject( box->parent(), name )
+configureTTSPage::configureTTSPage( View *_view, TQVBox *box, char *name )
+ : TQObject( box->tqparent(), name )
{
Q_UNUSED(_view);
- m_cbSpeakPointerWidget = new QCheckBox(i18n("Speak widget under &mouse pointer"), box);
- m_cbSpeakFocusWidget = new QCheckBox(i18n("Speak widget with &focus"), box);
- m_gbScreenReaderOptions = new QVGroupBox("", box);
+ m_cbSpeakPointerWidget = new TQCheckBox(i18n("Speak widget under &mouse pointer"), box);
+ m_cbSpeakFocusWidget = new TQCheckBox(i18n("Speak widget with &focus"), box);
+ m_gbScreenReaderOptions = new TQVGroupBox("", box);
m_gbScreenReaderOptions->setMargin( KDialog::marginHint() );
m_gbScreenReaderOptions->setInsideSpacing( KDialog::spacingHint() );
- m_cbSpeakTooltips = new QCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions);
- m_cbSpeakWhatsThis = new QCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions);
- m_cbSpeakDisabled = new QCheckBox(i18n("Verbal indication if widget is disabled (grayed)",
+ m_cbSpeakTooltips = new TQCheckBox(i18n("Speak &tool tips"), m_gbScreenReaderOptions);
+ m_cbSpeakWhatsThis = new TQCheckBox(i18n("Speak &What's This"), m_gbScreenReaderOptions);
+ m_cbSpeakDisabled = new TQCheckBox(i18n("Verbal indication if widget is disabled (grayed)",
"&Say whether disabled"), m_gbScreenReaderOptions);
- m_cbSpeakAccelerators = new QCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions);
- QHBox* hbAcceleratorPrefix = new QHBox(m_gbScreenReaderOptions);
- QWidget* spacer = new QWidget(hbAcceleratorPrefix);
+ m_cbSpeakAccelerators = new TQCheckBox(i18n("Spea&k accelerators"), m_gbScreenReaderOptions);
+ TQHBox* hbAcceleratorPrefix = new TQHBox(m_gbScreenReaderOptions);
+ TQWidget* spacer = new TQWidget(hbAcceleratorPrefix);
spacer->setMinimumWidth(2 * KDialog::marginHint());
m_lblAcceleratorPrefix =
- new QLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"),
+ new TQLabel(i18n("A word spoken before another word", "Pr&efaced by the word:"),
hbAcceleratorPrefix);
- m_leAcceleratorPrefixWord = new QLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"),
+ m_leAcceleratorPrefixWord = new TQLineEdit(i18n("Keyboard accelerator, such as Alt+F", "Accelerator"),
hbAcceleratorPrefix);
m_lblAcceleratorPrefix->setBuddy(m_leAcceleratorPrefixWord);
- QHBox* hbPollingInterval = new QHBox(m_gbScreenReaderOptions);
+ TQHBox* hbPollingInterval = new TQHBox(m_gbScreenReaderOptions);
hbPollingInterval->setMargin( 0 );
- QLabel* lblPollingInterval = new QLabel(i18n("&Polling interval:"), hbPollingInterval);
+ TQLabel* lblPollingInterval = new TQLabel(i18n("&Polling interval:"), hbPollingInterval);
m_iniPollingInterval = new KIntNumInput(hbPollingInterval);
m_iniPollingInterval->setSuffix(" ms");
m_iniPollingInterval->setRange(100, 5000, 100, true);
@@ -1000,9 +1000,9 @@ configureTTSPage::configureTTSPage( View *_view, QVBox *box, char *name )
m_iniPollingInterval->setValue(config->readNumEntry("PollingInterval", 600));
screenReaderOptionChanged();
- connect(m_cbSpeakPointerWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
- connect(m_cbSpeakFocusWidget, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
- connect(m_cbSpeakAccelerators, SIGNAL(toggled(bool)), this, SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakPointerWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakFocusWidget, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
+ connect(m_cbSpeakAccelerators, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(screenReaderOptionChanged()));
}
void configureTTSPage::slotDefault()
diff --git a/kspread/dialogs/kspread_dlg_preference.h b/kspread/dialogs/kspread_dlg_preference.h
index d23739b8..ec4abf11 100644
--- a/kspread/dialogs/kspread_dlg_preference.h
+++ b/kspread/dialogs/kspread_dlg_preference.h
@@ -33,10 +33,10 @@ class KConfig;
class KIntNumInput;
class KDoubleNumInput;
class KSpellConfig;
-class QCheckBox;
-class QComboBox;
-class QVGroupBox;
-class QPushButton;
+class TQCheckBox;
+class TQComboBox;
+class TQVGroupBox;
+class TQPushButton;
class KColorButton;
namespace KSpread
@@ -44,11 +44,12 @@ namespace KSpread
class Sheet;
class View;
-class parameterLocale : public QObject
+class parameterLocale : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- parameterLocale( View* _view,QVBox *box, char *name = 0);
+ parameterLocale( View* _view,TQVBox *box, char *name = 0);
void apply();
public slots:
void updateDefaultSystemConfig();
@@ -58,17 +59,18 @@ public slots:
*/
void updateToMatchLocale(KLocale* locale);
- QLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number;
- QPushButton *m_updateButton;
+ TQLabel *m_shortDate,*m_time,*m_money,*m_date,*m_language,*m_number;
+ TQPushButton *m_updateButton;
View* m_pView;
bool m_bUpdateLocale;
};
-class configure : public QObject
+class configure : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- configure( View* _view,QVBox *box, char *name = 0 );
+ configure( View* _view,TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
protected:
@@ -76,14 +78,14 @@ protected:
KIntNumInput *nbPage;
KIntNumInput* nbRecentFile;
KIntNumInput* autoSaveDelay;
- QCheckBox *showVScrollBar;
- QCheckBox *showHScrollBar;
- QCheckBox *showColHeader;
- QCheckBox *showRowHeader;
- QCheckBox *showTabBar;
- QCheckBox *showFormulaBar;
- QCheckBox *showStatusBar;
- QCheckBox *m_createBackupFile;
+ TQCheckBox *showVScrollBar;
+ TQCheckBox *showHScrollBar;
+ TQCheckBox *showColHeader;
+ TQCheckBox *showRowHeader;
+ TQCheckBox *showTabBar;
+ TQCheckBox *showFormulaBar;
+ TQCheckBox *showStatusBar;
+ TQCheckBox *m_createBackupFile;
bool m_oldBackupFile;
KConfig* config;
@@ -92,18 +94,19 @@ protected:
} ;
-class miscParameters : public QObject
+class miscParameters : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- miscParameters( View* _view, QVBox *box, char *name = 0 );
+ miscParameters( View* _view, TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
void initComboBox();
public slots:
- void slotTextComboChanged(const QString &);
+ void slotTextComboChanged(const TQString &);
protected:
View* m_pView;
@@ -114,20 +117,21 @@ protected:
*/
KoUnit::Unit indentUnit;
KConfig* config;
- QComboBox *typeCompletion;
- QComboBox *typeCalc;
- QComboBox *typeOfMove;
- QCheckBox *msgError;
+ TQComboBox *typeCompletion;
+ TQComboBox *typeCalc;
+ TQComboBox *typeOfMove;
+ TQCheckBox *msgError;
KIntNumInput* m_undoRedoLimit;
bool comboChanged;
int m_oldNbRedo;
} ;
-class colorParameters : public QObject
+class colorParameters : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- colorParameters( View* _view, QVBox *box, char *name = 0 );
+ colorParameters( View* _view, TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
protected:
@@ -137,19 +141,20 @@ protected:
KConfig* config;
} ;
-class configureLayoutPage : public QObject
+class configureLayoutPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- configureLayoutPage( View* _view,QVBox *box, char *name = 0 );
+ configureLayoutPage( View* _view,TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
void initCombo();
protected:
View* m_pView;
- QComboBox *defaultOrientationPage;
- QComboBox *defaultSizePage;
- QComboBox *defaultUnit;
+ TQComboBox *defaultOrientationPage;
+ TQComboBox *defaultSizePage;
+ TQComboBox *defaultUnit;
//store old config
int paper;
int orientation;
@@ -158,51 +163,54 @@ protected:
KConfig* config;
} ;
-class configureSpellPage : public QObject
+class configureSpellPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- configureSpellPage( View* _view, QVBox *box, char *name = 0 );
+ configureSpellPage( View* _view, TQVBox *box, char *name = 0 );
void apply();
void slotDefault();
protected:
View * m_pView;
KConfig * config;
KSpellConfig *m_spellConfigWidget;
- QCheckBox *dontCheckUpperWord;
- QCheckBox *dontCheckTitleCase;
+ TQCheckBox *dontCheckUpperWord;
+ TQCheckBox *dontCheckTitleCase;
} ;
-class configureTTSPage : public QObject
+class configureTTSPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- configureTTSPage( View *_view, QVBox *box, char *name = 0 );
+ configureTTSPage( View *_view, TQVBox *box, char *name = 0 );
void slotDefault();
void apply();
private slots:
void screenReaderOptionChanged();
private:
KConfig* config;
- QCheckBox* m_cbSpeakPointerWidget;
- QCheckBox* m_cbSpeakFocusWidget;
- QVGroupBox* m_gbScreenReaderOptions;
- QCheckBox* m_cbSpeakTooltips;
- QCheckBox* m_cbSpeakWhatsThis;
- QCheckBox* m_cbSpeakDisabled;
- QCheckBox* m_cbSpeakAccelerators;
- QLabel* m_lblAcceleratorPrefix;
- QLineEdit* m_leAcceleratorPrefixWord;
+ TQCheckBox* m_cbSpeakPointerWidget;
+ TQCheckBox* m_cbSpeakFocusWidget;
+ TQVGroupBox* m_gbScreenReaderOptions;
+ TQCheckBox* m_cbSpeakTooltips;
+ TQCheckBox* m_cbSpeakWhatsThis;
+ TQCheckBox* m_cbSpeakDisabled;
+ TQCheckBox* m_cbSpeakAccelerators;
+ TQLabel* m_lblAcceleratorPrefix;
+ TQLineEdit* m_leAcceleratorPrefixWord;
KIntNumInput* m_iniPollingInterval;
};
class PreferenceDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum { KS_PREFERENCES = 1, KS_LOCALE = 2, KS_INTERFACE = 4,
KS_MISC = 8, KS_COLOR = 16, KS_LAYOUT = 32, KS_SPELLING = 64 };
- PreferenceDialog( View* parent, const char* name);
+ PreferenceDialog( View* tqparent, const char* name);
public slots:
void slotApply();
void slotDefault();
diff --git a/kspread/dialogs/kspread_dlg_reference.cc b/kspread/dialogs/kspread_dlg_reference.cc
index 5c7faf2b..1fbb55e3 100644
--- a/kspread/dialogs/kspread_dlg_reference.cc
+++ b/kspread/dialogs/kspread_dlg_reference.cc
@@ -35,12 +35,12 @@
#include "selection.h"
#include "kspread_locale.h"
-#include <qvariant.h>
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqvariant.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <kmessagebox.h>
@@ -51,22 +51,22 @@
using namespace KSpread;
-reference::reference( View* parent, const char* name )
- : QDialog( parent, name,TRUE )
+reference::reference( View* tqparent, const char* name )
+ : TQDialog( tqparent, name,TRUE )
{
- m_pView = parent;
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ m_pView = tqparent;
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setMargin( KDialog::marginHint() );
lay1->setSpacing( KDialog::spacingHint() );
- m_list = new QListBox(this);
+ m_list = new TQListBox(this);
lay1->addWidget( m_list );
setCaption( i18n("Area Name") );
- m_rangeName = new QLabel(this);
+ m_rangeName = new TQLabel(this);
lay1->addWidget(m_rangeName);
- m_pRemove = new QPushButton(i18n("&Remove"), this);
+ m_pRemove = new TQPushButton(i18n("&Remove"), this);
lay1->addWidget( m_pRemove );
//m_pRemove->setEnabled(false);
KButtonBox *bb = new KButtonBox( this );
@@ -75,23 +75,23 @@ reference::reference( View* parent, const char* name )
m_pOk = bb->addButton( KStdGuiItem::ok() );
m_pCancel = bb->addButton( KStdGuiItem::cancel() );
m_pOk->setDefault( TRUE );
- bb->layout();
+ bb->tqlayout();
lay1->addWidget( bb );
- QString text;
- QStringList sheetName;
- QPtrListIterator<Sheet> it2 ( m_pView->doc()->map()->sheetList() );
+ TQString text;
+ TQStringList sheetName;
+ TQPtrListIterator<Sheet> it2 ( m_pView->doc()->map()->sheetList() );
for( ; it2.current(); ++it2 )
{
sheetName.append( it2.current()->sheetName());
}
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area = m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
text = (*it).ref_name;
- if ( sheetName.contains((*it).sheet_name ))
+ if ( sheetName.tqcontains((*it).sheet_name ))
m_list->insertItem(text);
}
@@ -102,24 +102,24 @@ reference::reference( View* parent, const char* name )
m_pEdit->setEnabled( false );
}
- connect( m_pOk, SIGNAL( clicked() ), this, SLOT( slotOk() ) );
- connect( m_pCancel, SIGNAL( clicked() ), this, SLOT( slotCancel() ) );
- connect( m_pEdit, SIGNAL( clicked() ), this, SLOT( slotEdit() ) );
- connect( m_pRemove, SIGNAL( clicked() ), this, SLOT( slotRemove() ) );
- connect( m_list, SIGNAL(doubleClicked(QListBoxItem *)), this,
- SLOT(slotDoubleClicked(QListBoxItem *)));
- connect( m_list, SIGNAL(highlighted ( QListBoxItem * ) ), this,
- SLOT(slotHighlighted(QListBoxItem * )));
- m_rangeName->setText(i18n("Area: %1").arg(""));
+ connect( m_pOk, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( m_pCancel, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotCancel() ) );
+ connect( m_pEdit, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotEdit() ) );
+ connect( m_pRemove, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotRemove() ) );
+ connect( m_list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)), this,
+ TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
+ connect( m_list, TQT_SIGNAL(highlighted ( TQListBoxItem * ) ), this,
+ TQT_SLOT(slotHighlighted(TQListBoxItem * )));
+ m_rangeName->setText(i18n("Area: %1").tqarg(""));
resize( 250, 200 );
}
-void reference::displayAreaValues(QString const & areaName)
+void reference::displayAreaValues(TQString const & areaName)
{
- QString tmpName;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area( m_pView->doc()->listArea() );
+ TQString tmpName;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area( m_pView->doc()->listArea() );
for ( it = area.begin(); it != area.end(); ++it )
{
if ((*it).ref_name == areaName)
@@ -134,17 +134,17 @@ void reference::displayAreaValues(QString const & areaName)
}
}
- tmpName = i18n("Area: %1").arg(tmpName);
+ tmpName = i18n("Area: %1").tqarg(tmpName);
m_rangeName->setText(tmpName);
}
-void reference::slotHighlighted(QListBoxItem * )
+void reference::slotHighlighted(TQListBoxItem * )
{
- QString tmp = m_list->text(m_list->currentItem());
+ TQString tmp = m_list->text(m_list->currentItem());
displayAreaValues(tmp);
}
-void reference::slotDoubleClicked(QListBoxItem *)
+void reference::slotDoubleClicked(TQListBoxItem *)
{
slotOk();
}
@@ -158,19 +158,19 @@ void reference::slotRemove()
if (ret == KMessageBox::Cancel)
return;
- QString textRemove;
+ TQString textRemove;
if ( m_list->currentItem() != -1)
{
m_pView->doc()->emitBeginOperation( false );
- QString textRemove = m_list->text(m_list->currentItem());
+ TQString textRemove = m_list->text(m_list->currentItem());
m_pView->doc()->removeArea(textRemove );
m_pView->doc()->setModified(true);
/*
m_list->clear();
- QString text;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area=m_pView->doc()->listArea();
+ TQString text;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area=m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
text=(*it).ref_name;
@@ -200,14 +200,14 @@ void reference::slotRemove()
void reference::slotEdit()
{
- QString name(m_list->text(m_list->currentItem()));
+ TQString name(m_list->text(m_list->currentItem()));
if ( name.isEmpty() )
return;
EditAreaName editDlg( m_pView, "EditArea", name );
editDlg.exec();
- m_rangeName->setText(i18n("Area: %1").arg(""));
- QString tmp = m_list->text(m_list->currentItem());
+ m_rangeName->setText(i18n("Area: %1").tqarg(""));
+ TQString tmp = m_list->text(m_list->currentItem());
if (!tmp.isEmpty())
displayAreaValues( tmp );
}
@@ -216,12 +216,12 @@ void reference::slotOk()
{
m_pView->doc()->emitBeginOperation( false );
- QString text;
+ TQString text;
if (m_list->currentItem() != -1)
{
int index = m_list->currentItem();
text = m_list->text(index);
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQValueList<Reference> area = m_pView->doc()->listArea();
if (m_pView->activeSheet()->sheetName() != area[ index ].sheet_name)
{
@@ -246,60 +246,60 @@ void reference::slotCancel()
-EditAreaName::EditAreaName( View * parent,
+EditAreaName::EditAreaName( View * tqparent,
const char * name,
- QString const & areaname )
- : KDialogBase( parent, name ,true,i18n( "Edit Area" ) , Ok|Cancel )
+ TQString const & areaname )
+ : KDialogBase( tqparent, name ,true,i18n( "Edit Area" ) , Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
resize( 350, 142 );
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5,
- (QSizePolicy::SizeType)4, 0, 0,
+ tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5,
+ (TQSizePolicy::SizeType)4, 0, 0,
sizePolicy().hasHeightForWidth() ) );
- QWidget * page = new QWidget( this );
+ TQWidget * page = new TQWidget( this );
setMainWidget(page);
- QGridLayout * EditAreaNameLayout
- = new QGridLayout( page, 1, 1, 11, 6, "EditAreaNameLayout");
+ TQGridLayout * EditAreaNameLayout
+ = new TQGridLayout( page, 1, 1, 11, 6, "EditAreaNameLayout");
- QHBoxLayout * Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
- QSpacerItem * spacer = new QSpacerItem( 0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ TQHBoxLayout * Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
+ TQSpacerItem * spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
Layout1->addItem( spacer );
EditAreaNameLayout->addMultiCellLayout( Layout1, 3, 3, 0, 1 );
- QLabel * TextLabel4 = new QLabel( page, "TextLabel4" );
+ TQLabel * TextLabel4 = new TQLabel( page, "TextLabel4" );
TextLabel4->setText( i18n( "Cells:" ) );
EditAreaNameLayout->addWidget( TextLabel4, 2, 0 );
- m_area = new QLineEdit( page, "m_area" );
+ m_area = new TQLineEdit( page, "m_area" );
EditAreaNameLayout->addWidget( m_area, 2, 1 );
- QLabel * TextLabel1 = new QLabel( page, "TextLabel1" );
+ TQLabel * TextLabel1 = new TQLabel( page, "TextLabel1" );
TextLabel1->setText( i18n( "Sheet:" ) );
EditAreaNameLayout->addWidget( TextLabel1, 1, 0 );
- m_sheets = new QComboBox( FALSE, page, "m_sheets" );
+ m_sheets = new TQComboBox( FALSE, page, "m_sheets" );
EditAreaNameLayout->addWidget( m_sheets, 1, 1 );
- QLabel * TextLabel2 = new QLabel( page, "TextLabel2" );
+ TQLabel * TextLabel2 = new TQLabel( page, "TextLabel2" );
TextLabel2->setText( i18n( "Area name:" ) );
EditAreaNameLayout->addWidget( TextLabel2, 0, 0 );
- m_areaName = new QLabel( page, "m_areaName" );
+ m_areaName = new TQLabel( page, "m_areaName" );
m_areaName->setText( areaname );
EditAreaNameLayout->addWidget( m_areaName, 0, 1 );
- QPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
+ TQPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
for (unsigned int c = 0; c < sheetList.count(); ++c)
{
Sheet * t = sheetList.at(c);
@@ -308,9 +308,9 @@ EditAreaName::EditAreaName( View * parent,
m_sheets->insertItem( t->sheetName() );
}
- QString tmpName;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area(m_pView->doc()->listArea());
+ TQString tmpName;
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area(m_pView->doc()->listArea());
for ( it = area.begin(); it != area.end(); ++it )
{
if ((*it).ref_name == areaname)
diff --git a/kspread/dialogs/kspread_dlg_reference.h b/kspread/dialogs/kspread_dlg_reference.h
index 3ba3e761..30932101 100644
--- a/kspread/dialogs/kspread_dlg_reference.h
+++ b/kspread/dialogs/kspread_dlg_reference.h
@@ -28,52 +28,54 @@
#include <kdialogbase.h>
-class QComboBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QListBox;
-class QListBoxItem;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQListBox;
+class TQListBoxItem;
namespace KSpread
{
class View;
-class reference: public QDialog
+class reference: public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- reference( View* parent, const char* name );
+ reference( View* tqparent, const char* name );
public slots:
void slotOk();
void slotCancel();
- void slotDoubleClicked(QListBoxItem *);
+ void slotDoubleClicked(TQListBoxItem *);
void slotRemove();
void slotEdit();
- void slotHighlighted(QListBoxItem *);
+ void slotHighlighted(TQListBoxItem *);
protected:
View * m_pView;
- QListBox * m_list;
- QPushButton * m_pOk;
- QPushButton * m_pCancel;
- QPushButton * m_pEdit;
- QPushButton * m_pRemove;
- QLabel * m_rangeName;
+ TQListBox * m_list;
+ TQPushButton * m_pOk;
+ TQPushButton * m_pCancel;
+ TQPushButton * m_pEdit;
+ TQPushButton * m_pRemove;
+ TQLabel * m_rangeName;
private:
- void displayAreaValues(QString const & areaName);
+ void displayAreaValues(TQString const & areaName);
};
class EditAreaName : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditAreaName( View * parent, const char * name,
- QString const & areaname );
+ EditAreaName( View * tqparent, const char * name,
+ TQString const & areaname );
~EditAreaName();
public slots:
@@ -82,9 +84,9 @@ public slots:
private:
View * m_pView;
- QLineEdit * m_area;
- QComboBox * m_sheets;
- QLabel * m_areaName;
+ TQLineEdit * m_area;
+ TQComboBox * m_sheets;
+ TQLabel * m_areaName;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_resize2.cc b/kspread/dialogs/kspread_dlg_resize2.cc
index 43e9cd4d..d287ee4f 100644
--- a/kspread/dialogs/kspread_dlg_resize2.cc
+++ b/kspread/dialogs/kspread_dlg_resize2.cc
@@ -25,8 +25,8 @@
#include <float.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <knuminput.h>
@@ -47,22 +47,22 @@
using namespace KSpread;
-ResizeRow::ResizeRow( View* parent, const char* name )
- : KDialogBase( parent, name, true, i18n("Resize Row"), Ok|Cancel|Default )
+ResizeRow::ResizeRow( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n("Resize Row"), Ok|Cancel|Default )
{
- m_pView = parent;
+ m_pView = tqparent;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *vLay = new QVBoxLayout( page, 0, spacingHint() );
- QHBoxLayout *hLay = new QHBoxLayout( vLay );
+ TQVBoxLayout *vLay = new TQVBoxLayout( page, 0, spacingHint() );
+ TQHBoxLayout *hLay = new TQHBoxLayout( vLay );
- QRect selection( m_pView->selectionInfo()->selection() );
+ TQRect selection( m_pView->selectionInfo()->selection() );
RowFormat* rl = m_pView->activeSheet()->rowFormat( selection.top() );
rowHeight = rl->dblHeight();
- QLabel * label1 = new QLabel( page, "label1" );
+ TQLabel * label1 = new TQLabel( page, "label1" );
label1->setText( i18n( "Height:" ) );
hLay->addWidget( label1 );
@@ -72,11 +72,11 @@ ResizeRow::ResizeRow( View* parent, const char* name )
hLay->addWidget( m_pHeight );
- QWidget *hSpacer = new QWidget( page );
+ TQWidget *hSpacer = new TQWidget( page );
hSpacer->setMinimumSize( spacingHint(), spacingHint() );
hLay->addWidget( hSpacer );
- QWidget *vSpacer = new QWidget( page );
+ TQWidget *vSpacer = new TQWidget( page );
vSpacer->setMinimumSize( spacingHint(), spacingHint() );
vLay->addWidget( vSpacer );
@@ -113,22 +113,22 @@ void ResizeRow::slotDefault()
m_pHeight->setValue(KoUnit::toUserValue(points, m_pView->doc()->unit()));
}
-ResizeColumn::ResizeColumn( View* parent, const char* name )
- : KDialogBase( parent, name, true, i18n("Resize Column"), Ok|Cancel|Default )
+ResizeColumn::ResizeColumn( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n("Resize Column"), Ok|Cancel|Default )
{
- m_pView = parent;
+ m_pView = tqparent;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *vLay = new QVBoxLayout( page, 0, spacingHint() );
- QHBoxLayout *hLay = new QHBoxLayout( vLay );
+ TQVBoxLayout *vLay = new TQVBoxLayout( page, 0, spacingHint() );
+ TQHBoxLayout *hLay = new TQHBoxLayout( vLay );
- QRect selection( m_pView->selectionInfo()->selection() );
+ TQRect selection( m_pView->selectionInfo()->selection() );
ColumnFormat* cl = m_pView->activeSheet()->columnFormat( selection.left() );
columnWidth = cl->dblWidth();
- QLabel * label1 = new QLabel( page, "label1" );
+ TQLabel * label1 = new TQLabel( page, "label1" );
label1->setText( i18n( "Width:" ) );
hLay->addWidget( label1 );
@@ -138,11 +138,11 @@ ResizeColumn::ResizeColumn( View* parent, const char* name )
hLay->addWidget( m_pWidth );
- QWidget *hSpacer = new QWidget( page );
+ TQWidget *hSpacer = new TQWidget( page );
hSpacer->setMinimumSize( spacingHint(), spacingHint() );
hLay->addWidget( hSpacer );
- QWidget *vSpacer = new QWidget( page );
+ TQWidget *vSpacer = new TQWidget( page );
vSpacer->setMinimumSize( spacingHint(), spacingHint() );
vLay->addWidget( vSpacer );
diff --git a/kspread/dialogs/kspread_dlg_resize2.h b/kspread/dialogs/kspread_dlg_resize2.h
index 395796ac..3e955f18 100644
--- a/kspread/dialogs/kspread_dlg_resize2.h
+++ b/kspread/dialogs/kspread_dlg_resize2.h
@@ -38,9 +38,10 @@ class View;
class ResizeRow: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ResizeRow( View* parent, const char* name = 0 );
+ ResizeRow( View* tqparent, const char* name = 0 );
double rowHeight;
protected slots:
@@ -55,9 +56,10 @@ protected:
class ResizeColumn: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ResizeColumn( View* parent, const char* name = 0 );
+ ResizeColumn( View* tqparent, const char* name = 0 );
double columnWidth;
protected slots:
diff --git a/kspread/dialogs/kspread_dlg_series.cc b/kspread/dialogs/kspread_dlg_series.cc
index 666beee6..725859d3 100644
--- a/kspread/dialogs/kspread_dlg_series.cc
+++ b/kspread/dialogs/kspread_dlg_series.cc
@@ -30,70 +30,70 @@
#include "kspread_sheet.h"
#include "kspread_view.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
#include <kmessagebox.h>
#include <knumvalidator.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qwhatsthis.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqwhatsthis.h>
#include <knuminput.h>
using namespace KSpread;
-SeriesDlg::SeriesDlg( View* parent, const char* name,const QPoint &_marker)
- : KDialogBase( parent, name,TRUE,i18n("Series"),Ok|Cancel )
+SeriesDlg::SeriesDlg( View* tqparent, const char* name,const TQPoint &_marker)
+ : KDialogBase( tqparent, name,TRUE,i18n("Series"),Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
marker=_marker;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QBoxLayout *grid1 = new QHBoxLayout(page);
+ TQBoxLayout *grid1 = new TQHBoxLayout(page);
grid1->setSpacing( spacingHint() );
- QButtonGroup* gb1 = new QButtonGroup( 2, Qt::Vertical,
+ TQButtonGroup* gb1 = new TQButtonGroup( 2, Qt::Vertical,
i18n("Insert Values"), page );
- column = new QRadioButton( i18n("Vertical"), gb1 );
- QWhatsThis::add(column, i18n("Insert the series vertically, one below the other") );
- row = new QRadioButton( i18n("Horizontal"), gb1 );
- QWhatsThis::add(row, i18n("Insert the series horizontally, from left to right") );
+ column = new TQRadioButton( i18n("Vertical"), gb1 );
+ TQWhatsThis::add(column, i18n("Insert the series vertically, one below the other") );
+ row = new TQRadioButton( i18n("Horizontal"), gb1 );
+ TQWhatsThis::add(row, i18n("Insert the series horizontally, from left to right") );
column->setChecked(true);
- QButtonGroup* gb2 = new QButtonGroup( 2, Qt::Vertical,
+ TQButtonGroup* gb2 = new TQButtonGroup( 2, Qt::Vertical,
i18n("Type"), page );
- linear = new QRadioButton( i18n("Linear (2,4,6,...)"), gb2 );
- QWhatsThis::add(linear, i18n("Generate a series from 'start' to 'end' and for each step add "
+ linear = new TQRadioButton( i18n("Linear (2,4,6,...)"), gb2 );
+ TQWhatsThis::add(linear, i18n("Generate a series from 'start' to 'end' and for each step add "
"the value provided in step. This creates a series where each value "
"is 'step' larger than the value before it.") );
- geometric = new QRadioButton( i18n("Geometric (2,4,8,...)"), gb2 );
- QWhatsThis::add(geometric, i18n("Generate a series from 'start' to 'end' and for each step multiply "
+ geometric = new TQRadioButton( i18n("Geometric (2,4,8,...)"), gb2 );
+ TQWhatsThis::add(geometric, i18n("Generate a series from 'start' to 'end' and for each step multiply "
"the value with the value provided in step. Using a step of 5 produces a list like: "
"5, 25, 125, 625 since 5 multiplied by 5 (step) equals 25, and that multiplied by 5 equals 125, "
"which multiplied by the same step-value of 5 equals 625.") );
linear->setChecked(true);
- QGroupBox* gb = new QGroupBox( 1, Qt::Vertical, i18n("Parameters"), page );
- QWidget *params = new QWidget( gb );
- QGridLayout *params_layout = new QGridLayout( params, 3, 2 );
+ TQGroupBox* gb = new TQGroupBox( 1, Qt::Vertical, i18n("Parameters"), page );
+ TQWidget *params = new TQWidget( gb );
+ TQGridLayout *params_layout = new TQGridLayout( params, 3, 2 );
params_layout->setSpacing( spacingHint() );
params_layout->setAutoAdd( true );
- new QLabel( i18n( "Start value:" ), params );
+ new TQLabel( i18n( "Start value:" ), params );
start=new KDoubleNumInput(-999999.999, 999999.99, 0.0, 1.0, 3, params);
- new QLabel( i18n( "Stop value:" ), params );
+ new TQLabel( i18n( "Stop value:" ), params );
end=new KDoubleNumInput(-999999.999, 999999.99, 0.0, 1.0, 3, params);
- new QLabel( i18n( "Step value:" ), params );
+ new TQLabel( i18n( "Step value:" ), params );
step=new KDoubleNumInput(-999999.999, 999999.99, 0.0, 1.0, 3, params);
grid1->addWidget(gb);
@@ -103,16 +103,16 @@ SeriesDlg::SeriesDlg( View* parent, const char* name,const QPoint &_marker)
start->setFocus();
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
}
void SeriesDlg::slotOk()
{
- Series mode=Column; //same as Vertical
- Series type=Linear; // same as Horizontal
- QString tmp;
+ Series mode=Column; //same asQt::Vertical
+ Series type=Linear; // same asQt::Horizontal
+ TQString tmp;
double dstep, dend, dstart;
Sheet * m_pSheet;
m_pSheet = m_pView->activeSheet();
@@ -193,8 +193,8 @@ void SeriesDlg::slotOk()
}
}
- // double val_end = QMAX(dend, dstart);
- // double val_start = QMIN(dend, dstart);
+ // double val_end = TQMAX(dend, dstart);
+ // double val_start = TQMIN(dend, dstart);
m_pView->doc()->emitBeginOperation( false );
m_pSheet->setSeries( marker, dstart, dend, dstep, mode, type );
diff --git a/kspread/dialogs/kspread_dlg_series.h b/kspread/dialogs/kspread_dlg_series.h
index 9d056ead..fd7cc548 100644
--- a/kspread/dialogs/kspread_dlg_series.h
+++ b/kspread/dialogs/kspread_dlg_series.h
@@ -28,8 +28,8 @@
#include <kdialogbase.h>
-class QRadioButton;
-class QCheckBox;
+class TQRadioButton;
+class TQCheckBox;
class KDoubleNumInput;
namespace KSpread
@@ -40,9 +40,10 @@ class View;
class SeriesDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- SeriesDlg(View* parent, const char* name,const QPoint &_marker);
+ SeriesDlg(View* tqparent, const char* name,const TQPoint &_marker);
Sheet* sheet;
@@ -54,11 +55,11 @@ protected:
KDoubleNumInput *end;
KDoubleNumInput *step;
- QRadioButton* column;
- QRadioButton* row;
- QRadioButton* linear;
- QRadioButton* geometric;
- QPoint marker;
+ TQRadioButton* column;
+ TQRadioButton* row;
+ TQRadioButton* linear;
+ TQRadioButton* geometric;
+ TQPoint marker;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_show.cc b/kspread/dialogs/kspread_dlg_show.cc
index fd4ba801..0719eb07 100644
--- a/kspread/dialogs/kspread_dlg_show.cc
+++ b/kspread/dialogs/kspread_dlg_show.cc
@@ -22,10 +22,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-#include <qlistbox.h>
-#include <qlabel.h>
+#include <tqlistbox.h>
+#include <tqlabel.h>
#include <kcommand.h>
@@ -38,24 +38,24 @@
using namespace KSpread;
-ShowDialog::ShowDialog( View* parent, const char* name )
- : KDialogBase( parent, name,TRUE,i18n("Show Sheet"),Ok|Cancel )
+ShowDialog::ShowDialog( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name,TRUE,i18n("Show Sheet"),Ok|Cancel )
{
- m_pView = parent;
- QWidget *page = new QWidget( this );
+ m_pView = tqparent;
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel( i18n("Select hidden sheets to show:"), page );
+ TQLabel *label = new TQLabel( i18n("Select hidden sheets to show:"), page );
lay1->addWidget( label );
- list=new QListBox(page);
+ list=new TQListBox(page);
lay1->addWidget( list );
- list->setSelectionMode(QListBox::Multi);
- QString text;
- QStringList::Iterator it;
- QStringList tabsList=m_pView->doc()->map()->hiddenSheets();
+ list->setSelectionMode(TQListBox::Multi);
+ TQString text;
+ TQStringList::Iterator it;
+ TQStringList tabsList=m_pView->doc()->map()->hiddenSheets();
for ( it = tabsList.begin(); it != tabsList.end(); ++it )
{
text=*it;
@@ -63,13 +63,13 @@ ShowDialog::ShowDialog( View* parent, const char* name )
}
if(!list->count())
enableButtonOK(false);
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( list, SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(slotDoubleClicked(QListBoxItem *)));
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
resize( 200, 150 );
setFocus();
}
-void ShowDialog::slotDoubleClicked(QListBoxItem *)
+void ShowDialog::slotDoubleClicked(TQListBoxItem *)
{
slotOk();
}
@@ -80,7 +80,7 @@ void ShowDialog::slotOk()
{
m_pView->doc()->emitBeginOperation( false );
- QStringList listSheet;
+ TQStringList listSheet;
for (int i=0; i < list->numRows(); i++)
{
@@ -97,7 +97,7 @@ void ShowDialog::slotOk()
Sheet *sheet;
KMacroCommand *macroUndo=new KMacroCommand( i18n("Show Sheet") );
- for ( QStringList::Iterator it = listSheet.begin(); it != listSheet.end(); ++it )
+ for ( TQStringList::Iterator it = listSheet.begin(); it != listSheet.end(); ++it )
{
sheet=m_pView->doc()->map()->findSheet( *it );
KCommand* command = new ShowSheetCommand( sheet );
diff --git a/kspread/dialogs/kspread_dlg_show.h b/kspread/dialogs/kspread_dlg_show.h
index f3772aea..239e18b6 100644
--- a/kspread/dialogs/kspread_dlg_show.h
+++ b/kspread/dialogs/kspread_dlg_show.h
@@ -27,7 +27,7 @@
#include <kdialogbase.h>
-class QListBox;
+class TQListBox;
namespace KSpread
{
@@ -36,17 +36,18 @@ class View;
class ShowDialog: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ShowDialog( View* parent, const char* name );
+ ShowDialog( View* tqparent, const char* name );
public slots:
void slotOk();
- void slotDoubleClicked(QListBoxItem *);
+ void slotDoubleClicked(TQListBoxItem *);
protected:
View* m_pView;
- QListBox * list;
+ TQListBox * list;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_showColRow.cc b/kspread/dialogs/kspread_dlg_showColRow.cc
index 908d8bbc..0a8ea14d 100644
--- a/kspread/dialogs/kspread_dlg_showColRow.cc
+++ b/kspread/dialogs/kspread_dlg_showColRow.cc
@@ -20,8 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
@@ -35,17 +35,17 @@
using namespace KSpread;
-ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
- : KDialogBase( parent, name,TRUE,"",Ok|Cancel )
+ShowColRow::ShowColRow( View* tqparent, const char* name, Type _type )
+ : KDialogBase( tqparent, name,TRUE,"",Ok|Cancel )
{
- m_pView = parent;
+ m_pView = tqparent;
typeShow=_type;
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QLabel *label = new QLabel( page );
+ TQLabel *label = new TQLabel( page );
if(_type==Column) {
setCaption( i18n("Show Columns") );
@@ -56,7 +56,7 @@ ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
label->setText(i18n("Select hidden rows to show:"));
}
- list=new QListBox(page);
+ list=new TQListBox(page);
lay1->addWidget( label );
lay1->addWidget( list );
@@ -66,21 +66,21 @@ ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
{
ColumnFormat *col=m_pView->activeSheet()->firstCol();
- QString text;
- QStringList listCol;
+ TQString text;
+ TQStringList listCol;
for( ; col; col = col->next() )
{
if(col->isHide())
listInt.append(col->column());
}
qHeapSort(listInt);
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
for( it = listInt.begin(); it != listInt.end(); ++it )
{
if(!showColNumber)
- listCol+=i18n("Column: %1").arg(Cell::columnName(*it));
+ listCol+=i18n("Column: %1").tqarg(Cell::columnName(*it));
else
- listCol+=i18n("Column: %1").arg(text.setNum(*it));
+ listCol+=i18n("Column: %1").tqarg(text.setNum(*it));
}
list->insertStringList(listCol);
}
@@ -88,17 +88,17 @@ ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
{
RowFormat *row=m_pView->activeSheet()->firstRow();
- QString text;
- QStringList listRow;
+ TQString text;
+ TQStringList listRow;
for( ; row; row = row->next() )
{
if(row->isHide())
listInt.append(row->row());
}
qHeapSort(listInt);
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
for( it = listInt.begin(); it != listInt.end(); ++it )
- listRow+=i18n("Row: %1").arg(text.setNum(*it));
+ listRow+=i18n("Row: %1").tqarg(text.setNum(*it));
list->insertStringList(listRow);
}
@@ -107,14 +107,14 @@ ShowColRow::ShowColRow( View* parent, const char* name, Type _type )
enableButtonOK(false);
//selection multiple
- list->setSelectionMode(QListBox::Multi);
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( list, SIGNAL(doubleClicked(QListBoxItem *)),this,SLOT(slotDoubleClicked(QListBoxItem *)));
+ list->setSelectionMode(TQListBox::Multi);
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( list, TQT_SIGNAL(doubleClicked(TQListBoxItem *)),this,TQT_SLOT(slotDoubleClicked(TQListBoxItem *)));
resize( 200, 150 );
setFocus();
}
-void ShowColRow::slotDoubleClicked(QListBoxItem *)
+void ShowColRow::slotDoubleClicked(TQListBoxItem *)
{
slotOk();
}
@@ -128,11 +128,11 @@ void ShowColRow::slotOk()
{
if (typeShow == Column)
{
- region.add(QRect(*listInt.at(i), 1, 1, KS_rowMax));
+ region.add(TQRect(*listInt.at(i), 1, 1, KS_rowMax));
}
if (typeShow == Row)
{
- region.add(QRect(1, *listInt.at(i), KS_colMax, 1));
+ region.add(TQRect(1, *listInt.at(i), KS_colMax, 1));
}
}
}
diff --git a/kspread/dialogs/kspread_dlg_showColRow.h b/kspread/dialogs/kspread_dlg_showColRow.h
index 572f98b2..c0bdc591 100644
--- a/kspread/dialogs/kspread_dlg_showColRow.h
+++ b/kspread/dialogs/kspread_dlg_showColRow.h
@@ -23,11 +23,11 @@
#ifndef __kspread_dlg_showColRow__
#define __kspread_dlg_showColRow__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <kdialogbase.h>
-class QListBox;
+class TQListBox;
namespace KSpread
{
@@ -36,19 +36,20 @@ class View;
class ShowColRow: public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Column, Row };
- ShowColRow( View* parent, const char* name, Type _type );
+ ShowColRow( View* tqparent, const char* name, Type _type );
public slots:
void slotOk();
- void slotDoubleClicked(QListBoxItem *);
+ void slotDoubleClicked(TQListBoxItem *);
protected:
View* m_pView;
- QListBox * list;
+ TQListBox * list;
Type typeShow;
- QValueList<int> listInt;
+ TQValueList<int> listInt;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_sort.cc b/kspread/dialogs/kspread_dlg_sort.cc
index 6539d149..ac7cd187 100644
--- a/kspread/dialogs/kspread_dlg_sort.cc
+++ b/kspread/dialogs/kspread_dlg_sort.cc
@@ -26,20 +26,20 @@
*/
-#include <qbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qrect.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qvbox.h>
+#include <tqbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqrect.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqvbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -56,10 +56,10 @@
using namespace KSpread;
-SortDialog::SortDialog( View * parent, const char * name,
+SortDialog::SortDialog( View * tqparent, const char * name,
bool modal )
- : KDialogBase( parent, name, modal,"Sort",Ok|Cancel ),
- m_pView( parent )
+ : KDialogBase( tqparent, name, modal,"Sort",Ok|Cancel ),
+ m_pView( tqparent )
{
if ( !name )
setName( "SortDialog" );
@@ -68,96 +68,96 @@ SortDialog::SortDialog( View * parent, const char * name,
setCaption( i18n( "Sorting" ) );
//setSizeGripEnabled( true );
- QVBox *page = makeVBoxMainWidget();
+ TQVBox *page = makeVBoxMainWidget();
- m_tabWidget = new QTabWidget( page, "m_tabWidget" );
+ m_tabWidget = new TQTabWidget( page, "m_tabWidget" );
- m_page1 = new QWidget( m_tabWidget, "m_page1" );
- QGridLayout * page1Layout
- = new QGridLayout( m_page1, 1, 1, 11, 6, "page1Layout");
+ m_page1 = new TQWidget( m_tabWidget, "m_page1" );
+ TQGridLayout * page1Layout
+ = new TQGridLayout( m_page1, 1, 1, 11, 6, "page1Layout");
//---------------- Sort Layout & Header Row/Column Toggle
//Sort orientation selector (for selecting Left-To-Right or Top-To-Bottom sorting of the selection)
- QGroupBox* layoutGroup = new QGroupBox(2 , Qt::Vertical, m_page1, "layoutGroup");
- layoutGroup->setTitle( i18n("Layout") );
+ TQGroupBox* tqlayoutGroup = new TQGroupBox(2 , Qt::Vertical, m_page1, "tqlayoutGroup");
+ tqlayoutGroup->setTitle( i18n("Layout") );
- QHButtonGroup * orientationGroup = new QHButtonGroup( layoutGroup, "orientationGroup" );
+ TQHButtonGroup * orientationGroup = new TQHButtonGroup( tqlayoutGroup, "orientationGroup" );
orientationGroup->setLineWidth(0);
orientationGroup->setMargin(0);
- orientationGroup->layout()->setMargin(0);
+ orientationGroup->tqlayout()->setMargin(0);
- m_sortColumn = new QRadioButton( orientationGroup, "m_sortColumn" );
+ m_sortColumn = new TQRadioButton( orientationGroup, "m_sortColumn" );
m_sortColumn->setText( i18n( "Sort &Rows" ) );
- m_sortRow = new QRadioButton( orientationGroup, "m_sortRow" );
+ m_sortRow = new TQRadioButton( orientationGroup, "m_sortRow" );
m_sortRow->setText( i18n( "Sort &Columns" ) );
//First row / column contains header toggle
- m_firstRowOrColHeader = new QCheckBox( layoutGroup, "m_copyLayout" );
+ m_firstRowOrColHeader = new TQCheckBox( tqlayoutGroup, "m_copyLayout" );
//m_firstRowOrColHeader->setText( i18n( "&First row contains headers" ) );
m_firstRowOrColHeader->setChecked(true);
- page1Layout->addWidget(layoutGroup,0,0);
+ page1Layout->addWidget(tqlayoutGroup,0,0);
//----------------
page1Layout->addRowSpacing(2,10);
- QGroupBox * sort1Box = new QGroupBox( m_page1, "sort1Box" );
+ TQGroupBox * sort1Box = new TQGroupBox( m_page1, "sort1Box" );
sort1Box->setTitle( i18n( "Sort By" ) );
sort1Box->setFlat(true);
sort1Box->setColumnLayout(0, Qt::Vertical );
- sort1Box->layout()->setSpacing( KDialog::spacingHint() );
- sort1Box->layout()->setMargin( KDialog::marginHint() );
- QHBoxLayout * sort1BoxLayout = new QHBoxLayout( sort1Box->layout() );
- sort1BoxLayout->setAlignment( Qt::AlignTop );
+ sort1Box->tqlayout()->setSpacing( KDialog::spacingHint() );
+ sort1Box->tqlayout()->setMargin( KDialog::marginHint() );
+ TQHBoxLayout * sort1BoxLayout = new TQHBoxLayout( sort1Box->tqlayout() );
+ sort1BoxLayout->tqsetAlignment( TQt::AlignTop );
- m_sortKey1 = new QComboBox( false, sort1Box, "m_sortKey1" );
+ m_sortKey1 = new TQComboBox( false, sort1Box, "m_sortKey1" );
sort1BoxLayout->addWidget( m_sortKey1 );
- m_sortOrder1 = new QComboBox( false, sort1Box, "m_sortOrder1" );
+ m_sortOrder1 = new TQComboBox( false, sort1Box, "m_sortOrder1" );
m_sortOrder1->insertItem( i18n( "Ascending" ) );
m_sortOrder1->insertItem( i18n( "Descending" ) );
sort1BoxLayout->addWidget( m_sortOrder1 );
page1Layout->addWidget( sort1Box, 3, 0 );
- QGroupBox * sort2Box = new QGroupBox( m_page1, "sort2Box" );
+ TQGroupBox * sort2Box = new TQGroupBox( m_page1, "sort2Box" );
sort2Box->setTitle( i18n( "Then By" ) );
sort2Box->setFlat(true);
sort2Box->setColumnLayout(0, Qt::Vertical );
- sort2Box->layout()->setSpacing( KDialog::spacingHint() );
- sort2Box->layout()->setMargin( KDialog::marginHint() );
- QHBoxLayout * sort2BoxLayout = new QHBoxLayout( sort2Box->layout() );
- sort2BoxLayout->setAlignment( Qt::AlignTop );
+ sort2Box->tqlayout()->setSpacing( KDialog::spacingHint() );
+ sort2Box->tqlayout()->setMargin( KDialog::marginHint() );
+ TQHBoxLayout * sort2BoxLayout = new TQHBoxLayout( sort2Box->tqlayout() );
+ sort2BoxLayout->tqsetAlignment( TQt::AlignTop );
- m_sortKey2 = new QComboBox( false, sort2Box, "m_sortKey2" );
+ m_sortKey2 = new TQComboBox( false, sort2Box, "m_sortKey2" );
m_sortKey2->insertItem( i18n( "None" ) );
sort2BoxLayout->addWidget( m_sortKey2 );
- m_sortOrder2 = new QComboBox( false, sort2Box, "m_sortOrder2" );
+ m_sortOrder2 = new TQComboBox( false, sort2Box, "m_sortOrder2" );
m_sortOrder2->insertItem( i18n( "Ascending" ) );
m_sortOrder2->insertItem( i18n( "Descending" ) );
sort2BoxLayout->addWidget( m_sortOrder2 );
page1Layout->addWidget( sort2Box, 4, 0 );
- QGroupBox * sort3Box = new QGroupBox( m_page1, "sort3Box" );
+ TQGroupBox * sort3Box = new TQGroupBox( m_page1, "sort3Box" );
sort3Box->setTitle( i18n( "Then By" ) );
sort3Box->setFlat(true);
sort3Box->setColumnLayout(0, Qt::Vertical );
- sort3Box->layout()->setSpacing( KDialog::spacingHint() );
- sort3Box->layout()->setMargin( KDialog::marginHint() );
- QHBoxLayout * sort3BoxLayout = new QHBoxLayout( sort3Box->layout() );
- sort3BoxLayout->setAlignment( Qt::AlignTop );
+ sort3Box->tqlayout()->setSpacing( KDialog::spacingHint() );
+ sort3Box->tqlayout()->setMargin( KDialog::marginHint() );
+ TQHBoxLayout * sort3BoxLayout = new TQHBoxLayout( sort3Box->tqlayout() );
+ sort3BoxLayout->tqsetAlignment( TQt::AlignTop );
- m_sortKey3 = new QComboBox( false, sort3Box, "m_sortKey3" );
+ m_sortKey3 = new TQComboBox( false, sort3Box, "m_sortKey3" );
m_sortKey3->insertItem( i18n( "None" ) );
m_sortKey3->setEnabled( false );
sort3BoxLayout->addWidget( m_sortKey3 );
- m_sortOrder3 = new QComboBox( false, sort3Box, "m_sortOrder3" );
+ m_sortOrder3 = new TQComboBox( false, sort3Box, "m_sortOrder3" );
m_sortOrder3->insertItem( i18n( "Ascending" ) );
m_sortOrder3->insertItem( i18n( "Descending" ) );
m_sortOrder3->setEnabled( false );
@@ -169,23 +169,23 @@ SortDialog::SortDialog( View * parent, const char * name,
//---------------- options page
- m_page2 = new QWidget( m_tabWidget, "m_page2" );
- QGridLayout * page2Layout = new QGridLayout( m_page2, 1, 1, 11, 6, "page2Layout");
- page2Layout->setAlignment(Qt::AlignTop);
+ m_page2 = new TQWidget( m_tabWidget, "m_page2" );
+ TQGridLayout * page2Layout = new TQGridLayout( m_page2, 1, 1, 11, 6, "page2Layout");
+ page2Layout->tqsetAlignment(TQt::AlignTop);
- QGroupBox * firstKeyBox = new QGroupBox( m_page2, "firstKeyBox" );
+ TQGroupBox * firstKeyBox = new TQGroupBox( m_page2, "firstKeyBox" );
firstKeyBox->setTitle( i18n( "First Key" ) );
firstKeyBox->setColumnLayout(0, Qt::Vertical );
- firstKeyBox->layout()->setSpacing( KDialog::spacingHint() );
- firstKeyBox->layout()->setMargin( KDialog::marginHint() );
- QVBoxLayout * firstKeyBoxLayout = new QVBoxLayout( firstKeyBox->layout() );
- firstKeyBoxLayout->setAlignment( Qt::AlignTop );
+ firstKeyBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ firstKeyBox->tqlayout()->setMargin( KDialog::marginHint() );
+ TQVBoxLayout * firstKeyBoxLayout = new TQVBoxLayout( firstKeyBox->tqlayout() );
+ firstKeyBoxLayout->tqsetAlignment( TQt::AlignTop );
- m_useCustomLists = new QCheckBox( firstKeyBox, "m_useCustomLists_2" );
+ m_useCustomLists = new TQCheckBox( firstKeyBox, "m_useCustomLists_2" );
m_useCustomLists->setText( i18n( "&Use custom list" ) );
firstKeyBoxLayout->addWidget( m_useCustomLists );
- m_customList = new QComboBox( false, firstKeyBox, "m_customList" );
+ m_customList = new TQComboBox( false, firstKeyBox, "m_customList" );
m_customList->setEnabled( false );
m_customList->setMaximumSize( 230, 30 );
firstKeyBoxLayout->addWidget( m_customList );
@@ -198,31 +198,31 @@ SortDialog::SortDialog( View * parent, const char * name,
to just copy and paste the data and then sort the newly pasted data in place.
-- Robert Knight
- QGroupBox * resultToBox = new QGroupBox( m_page2, "resultToBox" );
+ TQGroupBox * resultToBox = new TQGroupBox( m_page2, "resultToBox" );
resultToBox->setTitle( i18n( "Location to Store Sort Results" ) );
resultToBox->setColumnLayout(0, Qt::Vertical );
- resultToBox->layout()->setSpacing( KDialog::spacingHint() );
- resultToBox->layout()->setMargin( KDialog::marginHint() );
+ resultToBox->tqlayout()->setSpacing( KDialog::spacingHint() );
+ resultToBox->tqlayout()->setMargin( KDialog::marginHint() );
- QHBoxLayout * resultToBoxLayout = new QHBoxLayout( resultToBox->layout() );
- resultToBoxLayout->setAlignment( Qt::AlignTop );
+ TQHBoxLayout * resultToBoxLayout = new TQHBoxLayout( resultToBox->tqlayout() );
+ resultToBoxLayout->tqsetAlignment( TQt::AlignTop );
- QLabel * destinationSheet=new QLabel(resultToBox,"destinationSheet");
+ TQLabel * destinationSheet=new TQLabel(resultToBox,"destinationSheet");
destinationSheet->setText("Destination Sheet:");
resultToBoxLayout->addWidget(destinationSheet);
- m_outputSheet = new QComboBox( false, resultToBox, "m_outputSheet" );
+ m_outputSheet = new TQComboBox( false, resultToBox, "m_outputSheet" );
resultToBoxLayout->addWidget( m_outputSheet );
- QSpacerItem * spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ TQSpacerItem * spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
resultToBoxLayout->addItem( spacer );
- QLabel * startingCellLabel = new QLabel( resultToBox, "destinationCellLabel" );
+ TQLabel * startingCellLabel = new TQLabel( resultToBox, "destinationCellLabel" );
startingCellLabel->setText( i18n( "Destination Cell:" ) );
resultToBoxLayout->addWidget( startingCellLabel );
- m_outputCell = new QLineEdit( resultToBox, "m_outputCell" );
- m_outputCell->setMaximumSize( QSize( 60, 32767 ) );
+ m_outputCell = new TQLineEdit( resultToBox, "m_outputCell" );
+ m_outputCell->setMaximumSize( TQSize( 60, 32767 ) );
resultToBoxLayout->addWidget( m_outputCell );
page2Layout->addWidget( resultToBox, 1,0 );*/
@@ -230,43 +230,43 @@ SortDialog::SortDialog( View * parent, const char * name,
m_tabWidget->insertTab( m_page2, i18n( "Options" ) );
- QHBoxLayout * Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1");
- QSpacerItem * spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding,
- QSizePolicy::Minimum );
+ TQHBoxLayout * Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1");
+ TQSpacerItem * spacer_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum );
Layout1->addItem( spacer_2 );
- m_copyLayout = new QCheckBox( m_page2, "m_copyLayout" );
+ m_copyLayout = new TQCheckBox( m_page2, "m_copyLayout" );
m_copyLayout->setText( i18n( "Copy cell &formatting (Borders, Colours, Text Style)" ) );
page2Layout->addWidget( m_copyLayout, 1, 0 );
- m_respectCase = new QCheckBox( m_page2, "m_copyLayout" );
+ m_respectCase = new TQCheckBox( m_page2, "m_copyLayout" );
m_respectCase->setText( i18n( "Case sensitive sort" ) );
m_respectCase->setChecked( true );
page2Layout->addWidget( m_respectCase, 2,0 );
- connect( m_sortKey2, SIGNAL( activated( int ) ), this,
- SLOT( sortKey2textChanged( int ) ) );
- connect( m_useCustomLists, SIGNAL( stateChanged(int) ), this,
- SLOT( useCustomListsStateChanged(int) ) );
- connect( m_firstRowOrColHeader, SIGNAL( stateChanged(int) ), this,
- SLOT( firstRowHeaderChanged(int) ) );
- connect( orientationGroup, SIGNAL( pressed(int) ), this,
- SLOT( slotOrientationChanged(int) ) );
+ connect( m_sortKey2, TQT_SIGNAL( activated( int ) ), this,
+ TQT_SLOT( sortKey2textChanged( int ) ) );
+ connect( m_useCustomLists, TQT_SIGNAL( stateChanged(int) ), this,
+ TQT_SLOT( useCustomListsStateChanged(int) ) );
+ connect( m_firstRowOrColHeader, TQT_SIGNAL( stateChanged(int) ), this,
+ TQT_SLOT( firstRowHeaderChanged(int) ) );
+ connect( orientationGroup, TQT_SIGNAL( pressed(int) ), this,
+ TQT_SLOT( slotOrientationChanged(int) ) );
init();
}
-QRect SortDialog::sourceArea()
+TQRect SortDialog::sourceArea()
{
return m_pView->selectionInfo()->selection();
}
SortDialog::Orientation SortDialog::guessDataOrientation()
{
- const QRect selection=sourceArea();
+ const TQRect selection=sourceArea();
if (selection.width() >= selection.height())
return SortColumns;
@@ -276,12 +276,12 @@ SortDialog::Orientation SortDialog::guessDataOrientation()
SortDialog::~SortDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
void SortDialog::init()
{
- QStringList lst;
+ TQStringList lst;
lst<<i18n("January");
lst<<i18n("February");
lst<<i18n("March");
@@ -305,9 +305,9 @@ void SortDialog::init()
KConfig * config = Factory::global()->config();
config->setGroup( "Parameters" );
- QStringList other = config->readListEntry("Other list");
- QString tmp;
- for ( QStringList::Iterator it = other.begin(); it != other.end(); ++it )
+ TQStringList other = config->readListEntry("Other list");
+ TQString tmp;
+ for ( TQStringList::Iterator it = other.begin(); it != other.end(); ++it )
{
if((*it) != "\\")
tmp += (*it) + ", ";
@@ -320,7 +320,7 @@ void SortDialog::init()
}
m_customList->insertStringList(lst);
- /*QPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
+ /*TQPtrList<Sheet> sheetList = m_pView->doc()->map()->sheetList();
for (unsigned int c = 0; c < sheetList.count(); ++c)
{
Sheet * t = sheetList.at(c);
@@ -330,10 +330,10 @@ void SortDialog::init()
}
m_outputSheet->setCurrentText( m_pView->activeSheet()->sheetName() );*/
- QRect r = sourceArea();
- /*QString cellArea;
+ TQRect r = sourceArea();
+ /*TQString cellArea;
cellArea += Cell::columnName(r.left());
- cellArea += QString::number( r.top() );
+ cellArea += TQString::number( r.top() );
m_outputCell->setText( cellArea );*/
//If the top-most row or left-most column all contain text items (as opposed to numbers, dates etc.)
@@ -350,8 +350,8 @@ void SortDialog::init()
int right = r.right();
for (int i = r.left(); i <= right; ++i)
{
- QString guessName=m_pView->activeSheet()->guessColumnTitle(r,i);
- QString colName=i18n(" (Column %1)").arg(Cell::columnName(i));
+ TQString guessName=m_pView->activeSheet()->guessColumnTitle(r,i);
+ TQString colName=i18n(" (Column %1)").tqarg(Cell::columnName(i));
if (!guessName.isEmpty())
{
@@ -359,13 +359,13 @@ void SortDialog::init()
}
else
{
- m_listColumn += i18n("Column %1").arg(Cell::columnName(i));
+ m_listColumn += i18n("Column %1").tqarg(Cell::columnName(i));
if ( i == r.left() )
selectionMayHaveHeader=false;
}
}
- // m_listColumn += i18n("Column %1").arg(Cell::columnName(i));
+ // m_listColumn += i18n("Column %1").tqarg(Cell::columnName(i));
}
// Entire rows selected ?
else if ( util_isRowSelected(r) )
@@ -376,8 +376,8 @@ void SortDialog::init()
int bottom = r.bottom();
for (int i = r.top(); i <= bottom; ++i)
{
- QString guessName=m_pView->activeSheet()->guessRowTitle(r,i);
- QString rowName=i18n(" (Row %1)").arg(i);
+ TQString guessName=m_pView->activeSheet()->guessRowTitle(r,i);
+ TQString rowName=i18n(" (Row %1)").tqarg(i);
if (!guessName.isEmpty())
{
@@ -385,7 +385,7 @@ void SortDialog::init()
}
else
{
- m_listRow += i18n("Row %1").arg(i);
+ m_listRow += i18n("Row %1").tqarg(i);
if ( i == r.top() )
selectionMayHaveHeader=false;
@@ -418,14 +418,14 @@ void SortDialog::init()
int bottom = r.bottom();
for (int i = r.left(); i <= right; ++i)
{
- QString guessName=m_pView->activeSheet()->guessColumnTitle(r,i);
- QString colName=i18n(" (Column %1)").arg(Cell::columnName(i));
+ TQString guessName=m_pView->activeSheet()->guessColumnTitle(r,i);
+ TQString colName=i18n(" (Column %1)").tqarg(Cell::columnName(i));
if (!guessName.isEmpty())
m_listColumn += guessName + colName;
else
{
- m_listColumn += i18n("Column %1").arg(Cell::columnName(i));
+ m_listColumn += i18n("Column %1").tqarg(Cell::columnName(i));
if (i == r.left())
selectionMayHaveHeader=false;
@@ -434,14 +434,14 @@ void SortDialog::init()
for (int i = r.top(); i <= bottom; ++i)
{
- QString guessName=m_pView->activeSheet()->guessRowTitle(r,i);
- QString rowName=i18n(" (Row %1)").arg(i);
+ TQString guessName=m_pView->activeSheet()->guessRowTitle(r,i);
+ TQString rowName=i18n(" (Row %1)").tqarg(i);
if (!guessName.isEmpty())
m_listRow += guessName + rowName;
else
{
- m_listRow += i18n("Row %1").arg(i);
+ m_listRow += i18n("Row %1").tqarg(i);
if (i == r.top())
selectionMayHaveHeader=false;
@@ -549,7 +549,7 @@ void SortDialog::slotOk()
}*/
//outputPoint.setSheet(sheet);
- QRect sortArea = sourceArea();
+ TQRect sortArea = sourceArea();
Point outputPoint;
outputPoint.setPos(sortArea.topLeft());
outputPoint.setSheet(sheet);
@@ -574,7 +574,7 @@ void SortDialog::slotOk()
int h = outputPoint.pos().y() + sortArea.height();
int w = outputPoint.pos().x() + sortArea.width();
- if ( sortArea.contains(outputPoint.pos())
+ if ( sortArea.tqcontains(outputPoint.pos())
|| ( w >= sortArea.left() && w <= sortArea.right() )
|| ( h >= sortArea.top() && h <= sortArea.bottom() ) )
{
@@ -589,7 +589,7 @@ void SortDialog::slotOk()
int key1 = 1;
int key2 = 0;
int key3 = 0;
- QStringList * firstKey = 0L;
+ TQStringList * firstKey = 0L;
Sheet::SortingOrder order1;
Sheet::SortingOrder order2;
Sheet::SortingOrder order3;
@@ -631,9 +631,9 @@ void SortDialog::slotOk()
if ( m_useCustomLists->isChecked() )
{
- firstKey = new QStringList();
- QString list = m_customList->currentText();
- QString tmp;
+ firstKey = new TQStringList();
+ TQString list = m_customList->currentText();
+ TQString tmp;
int l = list.length();
for ( int i = 0; i < l; ++i )
{
diff --git a/kspread/dialogs/kspread_dlg_sort.h b/kspread/dialogs/kspread_dlg_sort.h
index 3ac29512..2abe5bda 100644
--- a/kspread/dialogs/kspread_dlg_sort.h
+++ b/kspread/dialogs/kspread_dlg_sort.h
@@ -30,16 +30,16 @@
#include <kdialogbase.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
-class QCheckBox;
-class QComboBox;
-class QLabel;
-class QLineEdit;
-class QPushButton;
-class QRadioButton;
-class QTabWidget;
-class QWidget;
+class TQCheckBox;
+class TQComboBox;
+class TQLabel;
+class TQLineEdit;
+class TQPushButton;
+class TQRadioButton;
+class TQTabWidget;
+class TQWidget;
namespace KSpread
{
@@ -49,6 +49,7 @@ class View;
class SortDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Orientation
@@ -57,13 +58,13 @@ class SortDialog : public KDialogBase
SortRows=1
};
- SortDialog( View * parent, const char * name = 0,
+ SortDialog( View * tqparent, const char * name = 0,
bool modal = false );
~SortDialog();
protected:
Orientation guessDataOrientation();
- QRect sourceArea();
+ TQRect sourceArea();
private slots:
void sortKey2textChanged( int );
@@ -77,33 +78,33 @@ class SortDialog : public KDialogBase
View * m_pView;
- QStringList m_listColumn;
- QStringList m_listRow;
+ TQStringList m_listColumn;
+ TQStringList m_listRow;
- QWidget * m_page1;
- QWidget * m_page2;
+ TQWidget * m_page1;
+ TQWidget * m_page2;
- QTabWidget * m_tabWidget;
+ TQTabWidget * m_tabWidget;
- QComboBox * m_sortKey1;
- QComboBox * m_sortOrder1;
- QComboBox * m_sortKey2;
- QComboBox * m_sortOrder2;
- QComboBox * m_sortKey3;
- QComboBox * m_sortOrder3;
+ TQComboBox * m_sortKey1;
+ TQComboBox * m_sortOrder1;
+ TQComboBox * m_sortKey2;
+ TQComboBox * m_sortOrder2;
+ TQComboBox * m_sortKey3;
+ TQComboBox * m_sortOrder3;
- QCheckBox * m_useCustomLists;
- QComboBox * m_customList;
+ TQCheckBox * m_useCustomLists;
+ TQComboBox * m_customList;
- QRadioButton * m_sortColumn;
- QRadioButton * m_sortRow;
+ TQRadioButton * m_sortColumn;
+ TQRadioButton * m_sortRow;
- QCheckBox * m_copyLayout;
- QCheckBox * m_firstRowOrColHeader;
- QCheckBox * m_respectCase;
+ TQCheckBox * m_copyLayout;
+ TQCheckBox * m_firstRowOrColHeader;
+ TQCheckBox * m_respectCase;
- /*QComboBox * m_outputSheet;
- QLineEdit * m_outputCell;*/
+ /*TQComboBox * m_outputSheet;
+ TQLineEdit * m_outputCell;*/
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_special.cc b/kspread/dialogs/kspread_dlg_special.cc
index 3c9426c7..192fea6d 100644
--- a/kspread/dialogs/kspread_dlg_special.cc
+++ b/kspread/dialogs/kspread_dlg_special.cc
@@ -20,9 +20,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qradiobutton.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqradiobutton.h>
#include <klocale.h>
@@ -36,47 +36,47 @@
using namespace KSpread;
-SpecialDialog::SpecialDialog( View* parent, const char* name )
- : KDialogBase( parent, name, TRUE,i18n("Special Paste"),Ok|Cancel )
+SpecialDialog::SpecialDialog( View* tqparent, const char* name )
+ : KDialogBase( tqparent, name, TRUE,i18n("Special Paste"),Ok|Cancel )
{
- m_pView = parent;
- QWidget *page = new QWidget( this );
+ m_pView = tqparent;
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *lay1 = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page, 0, spacingHint() );
- QButtonGroup *grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n( "Paste What" ),page );
+ TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Paste What" ),page );
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
+ grp->tqlayout();
lay1->addWidget(grp);
- rb1 = new QRadioButton( i18n("Everything"), grp );
- rb2 = new QRadioButton( i18n("Text"), grp );
- rb3 = new QRadioButton( i18n("Format"), grp );
- rb10 = new QRadioButton( i18n("Comment"), grp );
- rb11 = new QRadioButton( i18n("Result"), grp );
+ rb1 = new TQRadioButton( i18n("Everything"), grp );
+ rb2 = new TQRadioButton( i18n("Text"), grp );
+ rb3 = new TQRadioButton( i18n("Format"), grp );
+ rb10 = new TQRadioButton( i18n("Comment"), grp );
+ rb11 = new TQRadioButton( i18n("Result"), grp );
- rb4 = new QRadioButton( i18n("Everything without border"), grp );
+ rb4 = new TQRadioButton( i18n("Everything without border"), grp );
rb1->setChecked(true);
- grp = new QButtonGroup( 1, QGroupBox::Horizontal, i18n("Operation"),page);
+ grp = new TQButtonGroup( 1, Qt::Horizontal, i18n("Operation"),page);
grp->setRadioButtonExclusive( TRUE );
- grp->layout();
+ grp->tqlayout();
lay1->addWidget(grp);
- rb5 = new QRadioButton( i18n("Overwrite"), grp );
- rb6 = new QRadioButton( i18n("Addition"), grp );
- rb7 = new QRadioButton( i18n("Subtraction"), grp );
- rb8 = new QRadioButton( i18n("Multiplication"), grp );
- rb9 = new QRadioButton( i18n("Division"), grp );
+ rb5 = new TQRadioButton( i18n("Overwrite"), grp );
+ rb6 = new TQRadioButton( i18n("Addition"), grp );
+ rb7 = new TQRadioButton( i18n("Subtraction"), grp );
+ rb8 = new TQRadioButton( i18n("Multiplication"), grp );
+ rb9 = new TQRadioButton( i18n("Division"), grp );
rb5->setChecked(true);
- // cb = new QCheckBox(i18n("Transpose"),this);
- // cb->layout();
+ // cb = new TQCheckBox(i18n("Transpose"),this);
+ // cb->tqlayout();
// lay1->addWidget(cb);
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
- connect( rb3, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) );
- connect( rb10, SIGNAL( toggled( bool ) ), this, SLOT( slotToggled( bool ) ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotOk() ) );
+ connect( rb3, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggled( bool ) ) );
+ connect( rb10, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotToggled( bool ) ) );
}
void SpecialDialog::slotOk()
diff --git a/kspread/dialogs/kspread_dlg_special.h b/kspread/dialogs/kspread_dlg_special.h
index 00491387..1e9f0eab 100644
--- a/kspread/dialogs/kspread_dlg_special.h
+++ b/kspread/dialogs/kspread_dlg_special.h
@@ -26,7 +26,7 @@
#include <kdialogbase.h>
-class QRadioButton;
+class TQRadioButton;
namespace KSpread
{
@@ -36,8 +36,9 @@ class View;
class SpecialDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- SpecialDialog( View* parent, const char* name );
+ SpecialDialog( View* tqparent, const char* name );
public slots:
void slotOk();
@@ -45,9 +46,9 @@ public slots:
private:
View* m_pView;
- QRadioButton *rb1, *rb2, *rb3, *rb4, *rb5;
- QRadioButton *rb6, *rb7, *rb8;
- QRadioButton *rb9, *rb10, *rb11;
+ TQRadioButton *rb1, *rb2, *rb3, *rb4, *rb5;
+ TQRadioButton *rb6, *rb7, *rb8;
+ TQRadioButton *rb9, *rb10, *rb11;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_styles.cc b/kspread/dialogs/kspread_dlg_styles.cc
index 088c82f3..818581f6 100644
--- a/kspread/dialogs/kspread_dlg_styles.cc
+++ b/kspread/dialogs/kspread_dlg_styles.cc
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qheader.h>
-#include <qlayout.h>
-#include <qmap.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqmap.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -39,18 +39,18 @@
using namespace KSpread;
-StyleWidget::StyleWidget( QWidget * parent, const char * name, WFlags fl )
- : QWidget( parent, name, fl )
+StyleWidget::StyleWidget( TQWidget * tqparent, const char * name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
- QVBoxLayout * layout = new QVBoxLayout( this, 11, 6, "layout");
+ TQVBoxLayout * tqlayout = new TQVBoxLayout( this, 11, 6, "tqlayout");
m_styleList = new KListView( this, "m_styleList" );
m_styleList->addColumn( i18n( "Styles" ) );
m_styleList->setResizeMode( KListView::AllColumns );
- layout->addWidget( m_styleList );
+ tqlayout->addWidget( m_styleList );
m_displayBox = new KComboBox( FALSE, this, "m_displayBox" );
- layout->addWidget( m_displayBox );
+ tqlayout->addWidget( m_displayBox );
m_styleList->header()->setLabel( 0, i18n( "Styles" ) );
m_displayBox->clear();
@@ -58,8 +58,8 @@ StyleWidget::StyleWidget( QWidget * parent, const char * name, WFlags fl )
m_displayBox->insertItem( i18n( "Applied Styles" ) );
m_displayBox->insertItem( i18n( "Custom Styles" ) );
m_displayBox->insertItem( i18n( "Hierarchical" ) );
- connect( m_styleList, SIGNAL(doubleClicked ( QListViewItem *)),this, SIGNAL( modifyStyle()));
- resize( QSize(446, 384).expandedTo(minimumSizeHint()) );
+ connect( m_styleList, TQT_SIGNAL(doubleClicked ( TQListViewItem *)),this, TQT_SIGNAL( modifyStyle()));
+ resize( TQSize(446, 384).expandedTo(tqminimumSizeHint()) );
}
StyleWidget::~StyleWidget()
@@ -68,17 +68,17 @@ StyleWidget::~StyleWidget()
-StyleDlg::StyleDlg( View * parent, StyleManager * manager,
+StyleDlg::StyleDlg( View * tqparent, StyleManager * manager,
const char * name )
- : KDialogBase( parent, name, true, "",
+ : KDialogBase( tqparent, name, true, "",
KDialogBase::Ok | KDialogBase::User1 | KDialogBase::User2 | KDialogBase::User3 | KDialogBase::Close,
KDialogBase::Ok, false, KGuiItem( i18n( "&New..." ) ), KGuiItem( i18n( "&Modify..." ) ), KGuiItem( i18n( "&Delete" ) ) ),
- m_view( parent ),
+ m_view( tqparent ),
m_styleManager( manager ),
m_dlg( new StyleWidget( this ) )
{
setCaption( i18n( "Style Manager" ) );
- setButtonBoxOrientation( Vertical );
+ setButtonBoxOrientation(Qt::Vertical );
setMainWidget( m_dlg );
slotDisplayMode( 0 );
@@ -86,11 +86,11 @@ StyleDlg::StyleDlg( View * parent, StyleManager * manager,
enableButton( KDialogBase::User2, true );
enableButton( KDialogBase::User3, false );
- connect( m_dlg->m_styleList, SIGNAL( selectionChanged( QListViewItem * ) ),
- this, SLOT( slotSelectionChanged( QListViewItem * ) ) );
- connect( m_dlg->m_displayBox, SIGNAL( activated( int ) ), this, SLOT( slotDisplayMode( int ) ) );
- connect( this, SIGNAL( user3Clicked() ), this, SLOT( slotUser3() ) );
- connect( m_dlg, SIGNAL( modifyStyle() ), this, SLOT( slotUser2()));
+ connect( m_dlg->m_styleList, TQT_SIGNAL( selectionChanged( TQListViewItem * ) ),
+ this, TQT_SLOT( slotSelectionChanged( TQListViewItem * ) ) );
+ connect( m_dlg->m_displayBox, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotDisplayMode( int ) ) );
+ connect( this, TQT_SIGNAL( user3Clicked() ), this, TQT_SLOT( slotUser3() ) );
+ connect( m_dlg, TQT_SIGNAL( modifyStyle() ), this, TQT_SLOT( slotUser2()));
}
StyleDlg::~StyleDlg()
@@ -99,7 +99,7 @@ StyleDlg::~StyleDlg()
void StyleDlg::fillComboBox()
{
- class Map : public QMap<CustomStyle *, KListViewItem *> {};
+ class Map : public TQMap<CustomStyle *, KListViewItem *> {};
Map entries;
entries.clear();
@@ -111,13 +111,13 @@ void StyleDlg::fillComboBox()
while ( entries.count() != count )
{
- if ( entries.find( iter.data() ) == entries.end() )
+ if ( entries.tqfind( iter.data() ) == entries.end() )
{
- if ( iter.data()->parent() == 0 )
+ if ( iter.data()->tqparent() == 0 )
entries[iter.data()] = new KListViewItem( m_dlg->m_styleList, iter.data()->name() );
else
{
- Map::const_iterator i = entries.find( iter.data()->parent() );
+ Map::const_iterator i = entries.tqfind( iter.data()->tqparent() );
if ( i != entries.end() )
entries[iter.data()] = new KListViewItem( i.data(), iter.data()->name() );
}
@@ -187,7 +187,7 @@ void StyleDlg::slotOk()
CustomStyle * s = 0;
- QString name( item->text( 0 ) );
+ TQString name( item->text( 0 ) );
if ( name == i18n( "Default" ) )
s = m_styleManager->defaultStyle();
else
@@ -222,7 +222,7 @@ void StyleDlg::slotUser1()
if ( item )
{
- QString name( item->text( 0 ) );
+ TQString name( item->text( 0 ) );
if ( name == i18n( "Default" ) )
s = m_styleManager->defaultStyle();
else
@@ -232,11 +232,11 @@ void StyleDlg::slotUser1()
s = m_styleManager->defaultStyle();
int i = 1;
- QString newName( i18n( "style%1" ).arg( m_styleManager->count() + i ) );
+ TQString newName( i18n( "style%1" ).tqarg( m_styleManager->count() + i ) );
while ( m_styleManager->style( newName ) != 0 )
{
++i;
- newName = i18n( "style%1" ).arg( m_styleManager->count() + i );
+ newName = i18n( "style%1" ).tqarg( m_styleManager->count() + i );
}
CustomStyle * style = new CustomStyle( newName, s );
@@ -264,7 +264,7 @@ void StyleDlg::slotUser2()
CustomStyle * s = 0;
- QString name( item->text( 0 ) );
+ TQString name( item->text( 0 ) );
if ( name == i18n( "Default" ) )
s = m_styleManager->defaultStyle();
else
@@ -286,7 +286,7 @@ void StyleDlg::slotUser3()
CustomStyle * s = 0;
- QString name( item->text( 0 ) );
+ TQString name( item->text( 0 ) );
if ( name == i18n( "Default" ) )
s = m_styleManager->defaultStyle();
else
@@ -304,13 +304,13 @@ void StyleDlg::slotUser3()
slotDisplayMode( m_dlg->m_displayBox->currentItem() );
}
-void StyleDlg::slotSelectionChanged( QListViewItem * item )
+void StyleDlg::slotSelectionChanged( TQListViewItem * item )
{
if ( !item )
return;
CustomStyle* style = 0;
- QString name( item->text( 0 ) );
+ TQString name( item->text( 0 ) );
if ( name == i18n( "Default" ) )
style = m_styleManager->defaultStyle();
else
diff --git a/kspread/dialogs/kspread_dlg_styles.h b/kspread/dialogs/kspread_dlg_styles.h
index 15ff4d4b..5a87dcff 100644
--- a/kspread/dialogs/kspread_dlg_styles.h
+++ b/kspread/dialogs/kspread_dlg_styles.h
@@ -22,24 +22,25 @@
#define __kspread_dlg_styles__
#include <kdialogbase.h>
-#include <qwidget.h>
+#include <tqwidget.h>
class KComboBox;
class KListView;
-class QListViewItem;
+class TQListViewItem;
namespace KSpread
{
class StyleManager;
class View;
-class StyleWidget : public QWidget
+class StyleWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- StyleWidget( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ StyleWidget( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~StyleWidget();
KListView * m_styleList;
@@ -51,8 +52,9 @@ signals:
class StyleDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- StyleDlg( View * parent, StyleManager * manager,
+ StyleDlg( View * tqparent, StyleManager * manager,
const char * name = "StyleDlg" );
~StyleDlg();
@@ -62,7 +64,7 @@ class StyleDlg : public KDialogBase
void slotUser2();
void slotUser3();
void slotDisplayMode( int mode );
- void slotSelectionChanged( QListViewItem * );
+ void slotSelectionChanged( TQListViewItem * );
private:
View * m_view;
diff --git a/kspread/dialogs/kspread_dlg_subtotal.cc b/kspread/dialogs/kspread_dlg_subtotal.cc
index f64664b5..696821cb 100644
--- a/kspread/dialogs/kspread_dlg_subtotal.cc
+++ b/kspread/dialogs/kspread_dlg_subtotal.cc
@@ -19,10 +19,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlistview.h>
-#include <qmemarray.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlistview.h>
+#include <tqmemarray.h>
#include <kdebug.h>
#include <klocale.h>
@@ -38,14 +38,14 @@
using namespace KSpread;
-SubtotalDialog::SubtotalDialog( View * parent, QRect const & selection, const char * name )
- : KDialogBase(parent, name, true, i18n( "Subtotals" ), Ok | Cancel | User1, Ok, true, KGuiItem(i18n( "Remove All" )) ),
- m_pView( parent ),
+SubtotalDialog::SubtotalDialog( View * tqparent, TQRect const & selection, const char * name )
+ : KDialogBase(tqparent, name, true, i18n( "Subtotals" ), Ok | Cancel | User1, Ok, true, KGuiItem(i18n( "Remove All" )) ),
+ m_pView( tqparent ),
m_pSheet( m_pView->activeSheet() ),
m_selection( selection ),
m_dialog( new Subtotal( this ) )
{
- setButtonBoxOrientation( Vertical );
+ setButtonBoxOrientation( Qt::Vertical );
setMainWidget( m_dialog );
fillColumnBoxes();
@@ -59,14 +59,14 @@ SubtotalDialog::~SubtotalDialog()
void SubtotalDialog::slotOk()
{
int numOfCols = m_selection.width();
- QMemArray<int> columns( numOfCols );
+ TQMemArray<int> columns( numOfCols );
int n = 0;
bool empty = true;
int left = m_selection.left();
- for ( QListViewItem * item = m_dialog->m_columnList->firstChild(); item; item = item->nextSibling() )
+ for ( TQListViewItem * item = m_dialog->m_columnList->firstChild(); item; item = item->nextSibling() )
{
- if ( ((QCheckListItem * ) item)->isOn() )
+ if ( ((TQCheckListItem * ) item)->isOn() )
{
columns[n] = left + n;
empty = false;
@@ -89,9 +89,9 @@ void SubtotalDialog::slotOk()
int bottom = m_selection.bottom();
int top = m_selection.top();
left = m_selection.left();
- QString oldText = m_pSheet->cellAt( mainCol, top )->strOutText();
- QString newText;
- QString result( " " + i18n("Result") );
+ TQString oldText = m_pSheet->cellAt( mainCol, top )->strOutText();
+ TQString newText;
+ TQString result( " " + i18n("Result") );
int lastChangedRow = top;
m_pView->doc()->emitBeginOperation( false );
@@ -193,7 +193,7 @@ void SubtotalDialog::removeSubtotalLines()
int t = m_selection.top();
Cell * cell;
- QString text;
+ TQString text;
for ( int y = m_selection.bottom(); y >= t; --y )
{
@@ -206,7 +206,7 @@ void SubtotalDialog::removeSubtotalLines()
continue;
text = cell->text();
- if ( text.find( "SUBTOTAL" ) != -1 )
+ if ( text.tqfind( "SUBTOTAL" ) != -1 )
{
containsSubtotal = true;
break;
@@ -216,7 +216,7 @@ void SubtotalDialog::removeSubtotalLines()
if ( containsSubtotal )
{
kdDebug() << "Line " << y << " contains a subtotal " << endl;
- QRect rect( l, y, m_selection.width(), 1 );
+ TQRect rect( l, y, m_selection.width(), 1 );
m_pSheet->unshiftColumn( rect );
m_selection.setHeight( m_selection.height() - 1 );
@@ -231,10 +231,10 @@ void SubtotalDialog::fillColumnBoxes()
int row = m_selection.top();
Cell * cell;
- QCheckListItem * item;
+ TQCheckListItem * item;
- QString text;
- QString col( i18n( "Column '%1' ") );
+ TQString text;
+ TQString col( i18n( "Column '%1' ") );
for ( int i = m_selection.left(); i <= r; ++i )
{
@@ -243,14 +243,14 @@ void SubtotalDialog::fillColumnBoxes()
if ( text.length() > 0 )
{
- text = col.arg( Cell::columnName( i ) );
+ text = col.tqarg( Cell::columnName( i ) );
}
m_dialog->m_columnBox->insertItem( text );
- item = new QCheckListItem( m_dialog->m_columnList,
+ item = new TQCheckListItem( m_dialog->m_columnList,
text,
- QCheckListItem::CheckBox );
+ TQCheckListItem::CheckBox );
item->setOn(false);
m_dialog->m_columnList->insertItem( item );
}
@@ -258,7 +258,7 @@ void SubtotalDialog::fillColumnBoxes()
void SubtotalDialog::fillFunctionBox()
{
- QStringList lst;
+ TQStringList lst;
lst << i18n( "Average" );
lst << i18n( "Count" );
lst << i18n( "CountA" );
@@ -274,13 +274,13 @@ void SubtotalDialog::fillFunctionBox()
}
bool SubtotalDialog::addSubtotal( int mainCol, int column, int row, int topRow,
- bool addRow, QString const & text )
+ bool addRow, TQString const & text )
{
kdDebug() << "Adding subtotal: " << mainCol << ", " << column << ", Rows: " << row << ", " << topRow
<< ": addRow: " << addRow << ", Text: " << text << endl;
if ( addRow )
{
- QRect rect(m_selection.left(), row + 1, m_selection.width(), 1);
+ TQRect rect(m_selection.left(), row + 1, m_selection.width(), 1);
if ( !m_pSheet->shiftColumn( rect ) )
return false;
@@ -293,18 +293,18 @@ bool SubtotalDialog::addSubtotal( int mainCol, int column, int row, int topRow,
cell->format()->setTextFontUnderline( true );
}
- QString colName = Cell::columnName( column );
+ TQString colName = Cell::columnName( column );
- QString formula("=SUBTOTAL(");
- formula += QString::number( m_dialog->m_functionBox->currentItem() + 1 );
+ TQString formula("=SUBTOTAL(");
+ formula += TQString::number( m_dialog->m_functionBox->currentItem() + 1 );
formula += "; ";
formula += colName;
- formula += QString::number( topRow );
+ formula += TQString::number( topRow );
// if ( topRow != row )
{
formula += ":";
formula += colName;
- formula += QString::number( row );
+ formula += TQString::number( row );
}
formula += ")";
diff --git a/kspread/dialogs/kspread_dlg_subtotal.h b/kspread/dialogs/kspread_dlg_subtotal.h
index 8bb2f3fb..230560a5 100644
--- a/kspread/dialogs/kspread_dlg_subtotal.h
+++ b/kspread/dialogs/kspread_dlg_subtotal.h
@@ -25,10 +25,10 @@
#include <kdialogbase.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqpoint.h>
+#include <tqrect.h>
-class QLineEdit;
+class TQLineEdit;
namespace KSpread
{
@@ -39,13 +39,14 @@ class View;
class SubtotalDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- SubtotalDialog( View * parent, QRect const & selection,
+ SubtotalDialog( View * tqparent, TQRect const & selection,
const char * name );
~SubtotalDialog();
- QRect const & selection() const { return m_selection; }
+ TQRect const & selection() const { return m_selection; }
Sheet * sheet() const { return m_pSheet; }
private slots:
@@ -56,14 +57,14 @@ class SubtotalDialog : public KDialogBase
private:
View * m_pView;
Sheet * m_pSheet;
- QRect m_selection;
+ TQRect m_selection;
Subtotal * m_dialog;
void fillColumnBoxes();
void fillFunctionBox();
void removeSubtotalLines();
bool addSubtotal( int mainCol, int column, int row, int topRow,
- bool addRow, QString const & text );
+ bool addRow, TQString const & text );
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspread_dlg_validity.cc b/kspread/dialogs/kspread_dlg_validity.cc
index f40b6caa..885d06f7 100644
--- a/kspread/dialogs/kspread_dlg_validity.cc
+++ b/kspread/dialogs/kspread_dlg_validity.cc
@@ -28,43 +28,43 @@
#include "kspread_sheet.h"
#include "kspread_view.h"
-#include <qlayout.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
#include <knumvalidator.h>
#include <kdebug.h>
#include <kmessagebox.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qtextedit.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqtextedit.h>
+#include <tqcheckbox.h>
using namespace KSpread;
-DlgValidity::DlgValidity(View* parent,const char* name , const QRect &_marker )
- :KDialogBase(KDialogBase::Tabbed, i18n("Validity"),User2|User1|Cancel, User1, parent, name,true,false,KStdGuiItem::ok(),i18n("Clear &All"))
+DlgValidity::DlgValidity(View* tqparent,const char* name , const TQRect &_marker )
+ :KDialogBase(KDialogBase::Tabbed, i18n("Validity"),User2|User1|Cancel, User1, tqparent, name,true,false,KStdGuiItem::ok(),i18n("Clear &All"))
{
- m_pView=parent;
+ m_pView=tqparent;
marker=_marker;
- QFrame *page1 = addPage(i18n("&Values"));
- QVBoxLayout *lay1 = new QVBoxLayout( page1, KDialogBase::marginHint(), KDialogBase::spacingHint() );
+ TQFrame *page1 = addPage(i18n("&Values"));
+ TQVBoxLayout *lay1 = new TQVBoxLayout( page1, KDialogBase::marginHint(), KDialogBase::spacingHint() );
- QGroupBox* tmpQButtonGroup;
- tmpQButtonGroup = new QGroupBox( 0, Qt::Vertical, i18n("Validity Criteria"), page1, "ButtonGroup_1" );
- tmpQButtonGroup->layout()->setSpacing(KDialog::spacingHint());
- tmpQButtonGroup->layout()->setMargin(KDialog::marginHint());
- QGridLayout *grid1 = new QGridLayout(tmpQButtonGroup->layout(),4,2);
+ TQGroupBox* tmpTQButtonGroup;
+ tmpTQButtonGroup = new TQGroupBox( 0, Qt::Vertical, i18n("Validity Criteria"), page1, "ButtonGroup_1" );
+ tmpTQButtonGroup->tqlayout()->setSpacing(KDialog::spacingHint());
+ tmpTQButtonGroup->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *grid1 = new TQGridLayout(tmpTQButtonGroup->tqlayout(),4,2);
- QLabel *tmpQLabel = new QLabel( tmpQButtonGroup, "Label_1" );
- tmpQLabel->setText(i18n("Allow:" ));
- grid1->addWidget(tmpQLabel,0,0);
+ TQLabel *tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_1" );
+ tmpTQLabel->setText(i18n("Allow:" ));
+ grid1->addWidget(tmpTQLabel,0,0);
- chooseType=new QComboBox(tmpQButtonGroup);
+ chooseType=new TQComboBox(tmpTQButtonGroup);
grid1->addWidget(chooseType,0,1);
- QStringList listType;
+ TQStringList listType;
listType+=i18n("All");
listType+=i18n("Number");
listType+=i18n("Integer");
@@ -76,16 +76,16 @@ DlgValidity::DlgValidity(View* parent,const char* name , const QRect &_marker )
chooseType->insertStringList(listType);
chooseType->setCurrentItem(0);
- allowEmptyCell = new QCheckBox( i18n( "Allow blanks" ), tmpQButtonGroup );
+ allowEmptyCell = new TQCheckBox( i18n( "Allow blanks" ), tmpTQButtonGroup );
grid1->addWidget(allowEmptyCell,1,0);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_2" );
- tmpQLabel->setText(i18n("Data:" ));
- grid1->addWidget(tmpQLabel,2,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_2" );
+ tmpTQLabel->setText(i18n("Data:" ));
+ grid1->addWidget(tmpTQLabel,2,0);
- choose=new QComboBox(tmpQButtonGroup);
+ choose=new TQComboBox(tmpTQButtonGroup);
grid1->addWidget(choose,2,1);
- QStringList list;
+ TQStringList list;
list+=i18n("equal to");
list+=i18n("greater than");
list+=i18n("less than");
@@ -97,25 +97,25 @@ DlgValidity::DlgValidity(View* parent,const char* name , const QRect &_marker )
choose->insertStringList(list);
choose->setCurrentItem(0);
- edit1 = new QLabel( tmpQButtonGroup, "Label_3" );
+ edit1 = new TQLabel( tmpTQButtonGroup, "Label_3" );
edit1->setText(i18n("Minimum:" ));
grid1->addWidget(edit1,3,0);
- val_min=new QLineEdit(tmpQButtonGroup);
+ val_min=new TQLineEdit(tmpTQButtonGroup);
grid1->addWidget(val_min,3,1);
val_min->setValidator( new KFloatValidator( val_min ) );
- edit2 = new QLabel( tmpQButtonGroup, "Label_4" );
+ edit2 = new TQLabel( tmpTQButtonGroup, "Label_4" );
edit2->setText(i18n("Maximum:" ));
grid1->addWidget(edit2,4,0);
- val_max=new QLineEdit(tmpQButtonGroup);
+ val_max=new TQLineEdit(tmpTQButtonGroup);
grid1->addWidget(val_max,4,1);
val_max->setValidator( new KFloatValidator( val_max ) );
- lay1->addWidget(tmpQButtonGroup);
+ lay1->addWidget(tmpTQButtonGroup);
//Apply minimum width of column1 to avoid horizontal move when changing option
- //A bit ugly to apply text always, but I couldn't get a label->QFontMetrix.boundingRect("text").width()
+ //A bit ugly to apply text always, but I couldn't get a label->TQFontMetrix.boundingRect("text").width()
//to give mew the correct results - Philipp
edit2->setText( i18n( "Date:" ) );
grid1->addColSpacing( 0, edit2->width() );
@@ -136,88 +136,88 @@ DlgValidity::DlgValidity(View* parent,const char* name , const QRect &_marker )
edit2->setText( i18n( "Number:" ) );
grid1->addColSpacing( 0, edit2->width() );
- validityList = new QTextEdit( tmpQButtonGroup );
+ validityList = new TQTextEdit( tmpTQButtonGroup );
grid1->addMultiCellWidget(validityList,2, 4,1, 1);
- validityLabelList = new QLabel( tmpQButtonGroup, "Label_Label_List" );
+ validityLabelList = new TQLabel( tmpTQButtonGroup, "Label_Label_List" );
validityLabelList->setText(i18n("Entries:" ));
grid1->addWidget(validityLabelList,2,0);
- QFrame *page2 = addPage(i18n("&Error Alert"));
+ TQFrame *page2 = addPage(i18n("&Error Alert"));
- lay1 = new QVBoxLayout( page2, KDialogBase::marginHint(), KDialogBase::spacingHint() );
+ lay1 = new TQVBoxLayout( page2, KDialogBase::marginHint(), KDialogBase::spacingHint() );
- tmpQButtonGroup = new QButtonGroup( 0, Qt::Vertical, i18n("Contents"), page2, "ButtonGroup_2" );
- tmpQButtonGroup->layout()->setSpacing(KDialog::spacingHint());
- tmpQButtonGroup->layout()->setMargin(KDialog::marginHint());
- QGridLayout *grid2 = new QGridLayout(tmpQButtonGroup->layout(),5,2);
+ tmpTQButtonGroup = new TQButtonGroup( 0, Qt::Vertical, i18n("Contents"), page2, "ButtonGroup_2" );
+ tmpTQButtonGroup->tqlayout()->setSpacing(KDialog::spacingHint());
+ tmpTQButtonGroup->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *grid2 = new TQGridLayout(tmpTQButtonGroup->tqlayout(),5,2);
- displayMessage = new QCheckBox(i18n( "Show error message when invalid values are entered" ),tmpQButtonGroup );
+ displayMessage = new TQCheckBox(i18n( "Show error message when invalid values are entered" ),tmpTQButtonGroup );
displayMessage->setChecked( true );
grid2->addMultiCellWidget(displayMessage,0, 0,0, 1);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_5" );
- tmpQLabel->setText(i18n("Action:" ));
- grid2->addWidget(tmpQLabel,1,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_5" );
+ tmpTQLabel->setText(i18n("Action:" ));
+ grid2->addWidget(tmpTQLabel,1,0);
- chooseAction=new QComboBox(tmpQButtonGroup);
+ chooseAction=new TQComboBox(tmpTQButtonGroup);
grid2->addWidget(chooseAction,1,1);
- QStringList list2;
+ TQStringList list2;
list2+=i18n("Stop");
list2+=i18n("Warning");
list2+=i18n("Information");
chooseAction->insertStringList(list2);
chooseAction->setCurrentItem(0);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_6" );
- tmpQLabel->setText(i18n("Title:" ));
- grid2->addWidget(tmpQLabel,2,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_6" );
+ tmpTQLabel->setText(i18n("Title:" ));
+ grid2->addWidget(tmpTQLabel,2,0);
- title=new QLineEdit( tmpQButtonGroup);
+ title=new TQLineEdit( tmpTQButtonGroup);
grid2->addWidget(title,2,1);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_7" );
- tmpQLabel->setText(i18n("Message:" ));
- grid2->addWidget(tmpQLabel,3,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_7" );
+ tmpTQLabel->setText(i18n("Message:" ));
+ grid2->addWidget(tmpTQLabel,3,0);
- message =new QTextEdit( tmpQButtonGroup);
+ message =new TQTextEdit( tmpTQButtonGroup);
grid2->addMultiCellWidget(message,3, 4,1, 1);
- lay1->addWidget(tmpQButtonGroup);
- message->setTextFormat( Qt::PlainText );
+ lay1->addWidget(tmpTQButtonGroup);
+ message->setTextFormat( TQt::PlainText );
- QFrame *page3 = addPage(i18n("Input Help"));
- lay1 = new QVBoxLayout( page3, KDialogBase::marginHint(), KDialogBase::spacingHint() );
+ TQFrame *page3 = addPage(i18n("Input Help"));
+ lay1 = new TQVBoxLayout( page3, KDialogBase::marginHint(), KDialogBase::spacingHint() );
- tmpQButtonGroup = new QButtonGroup( 0, Qt::Vertical, i18n("Contents"), page3, "ButtonGroup_2" );
- tmpQButtonGroup->layout()->setSpacing(KDialog::spacingHint());
- tmpQButtonGroup->layout()->setMargin(KDialog::marginHint());
+ tmpTQButtonGroup = new TQButtonGroup( 0, Qt::Vertical, i18n("Contents"), page3, "ButtonGroup_2" );
+ tmpTQButtonGroup->tqlayout()->setSpacing(KDialog::spacingHint());
+ tmpTQButtonGroup->tqlayout()->setMargin(KDialog::marginHint());
- QGridLayout *grid3 = new QGridLayout(tmpQButtonGroup->layout(),5,2);
+ TQGridLayout *grid3 = new TQGridLayout(tmpTQButtonGroup->tqlayout(),5,2);
- displayHelp = new QCheckBox(i18n( "Show input help when cell is selected" ),tmpQButtonGroup );
+ displayHelp = new TQCheckBox(i18n( "Show input help when cell is selected" ),tmpTQButtonGroup );
displayMessage->setChecked( false );
grid3->addMultiCellWidget(displayHelp,0, 0,0, 1);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_6" );
- tmpQLabel->setText(i18n("Title:" ));
- grid3->addWidget(tmpQLabel,2,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_6" );
+ tmpTQLabel->setText(i18n("Title:" ));
+ grid3->addWidget(tmpTQLabel,2,0);
- titleHelp=new QLineEdit( tmpQButtonGroup);
+ titleHelp=new TQLineEdit( tmpTQButtonGroup);
grid3->addWidget(titleHelp,2,1);
- tmpQLabel = new QLabel( tmpQButtonGroup, "Label_7" );
- tmpQLabel->setText(i18n("Message:" ));
- grid3->addWidget(tmpQLabel,3,0);
+ tmpTQLabel = new TQLabel( tmpTQButtonGroup, "Label_7" );
+ tmpTQLabel->setText(i18n("Message:" ));
+ grid3->addWidget(tmpTQLabel,3,0);
- messageHelp =new QTextEdit( tmpQButtonGroup);
+ messageHelp =new TQTextEdit( tmpTQButtonGroup);
grid3->addMultiCellWidget(messageHelp,3, 4,1, 1);
- lay1->addWidget(tmpQButtonGroup);
- messageHelp->setTextFormat( Qt::PlainText );
+ lay1->addWidget(tmpTQButtonGroup);
+ messageHelp->setTextFormat( TQt::PlainText );
- connect(choose,SIGNAL(activated(int )),this,SLOT(changeIndexCond(int)));
- connect(chooseType,SIGNAL(activated(int )),this,SLOT(changeIndexType(int)));
- connect( this, SIGNAL(user1Clicked()), SLOT(OkPressed()) );
- connect( this, SIGNAL(user2Clicked()), SLOT(clearAllPressed()) );
+ connect(choose,TQT_SIGNAL(activated(int )),this,TQT_SLOT(changeIndexCond(int)));
+ connect(chooseType,TQT_SIGNAL(activated(int )),this,TQT_SLOT(changeIndexType(int)));
+ connect( this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(OkPressed()) );
+ connect( this, TQT_SIGNAL(user2Clicked()), TQT_SLOT(clearAllPressed()) );
init();
}
@@ -367,8 +367,8 @@ void DlgValidity::changeIndexType(int _index)
}
break;
}
- if ( width() < sizeHint().width() )
- resize( sizeHint() );
+ if ( width() < tqsizeHint().width() )
+ resize( tqsizeHint() );
}
void DlgValidity::changeIndexCond(int _index)
@@ -431,7 +431,7 @@ void DlgValidity::init()
{
message->setText(tmpValidity->message);
title->setText(tmpValidity->title);
- QString tmp;
+ TQString tmp;
switch( tmpValidity->m_restriction)
{
case Restriction::None:
@@ -473,9 +473,9 @@ void DlgValidity::init()
case Restriction::List:
{
chooseType->setCurrentItem(7);
- QStringList lst =tmpValidity->listValidity;
- QString tmp;
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst =tmpValidity->listValidity;
+ TQString tmp;
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
tmp +=( *it )+"\n";
}
validityList->setText( tmp );
@@ -641,10 +641,10 @@ void DlgValidity::OkPressed()
result.title=title->text();
result.valMin=0;
result.valMax=0;
- result.timeMin=QTime(0,0,0);
- result.timeMax=QTime(0,0,0);
- result.dateMin=QDate(0,0,0);
- result.dateMax=QDate(0,0,0);
+ result.timeMin=TQTime(0,0,0);
+ result.timeMax=TQTime(0,0,0);
+ result.dateMin=TQDate(0,0,0);
+ result.dateMax=TQDate(0,0,0);
}
else
{
@@ -725,10 +725,10 @@ void DlgValidity::OkPressed()
result.title=title->text();
result.valMin=0;
result.valMax=0;
- result.timeMin=QTime(0,0,0);
- result.timeMax=QTime(0,0,0);
- result.dateMin=QDate(0,0,0);
- result.dateMax=QDate(0,0,0);
+ result.timeMin=TQTime(0,0,0);
+ result.timeMax=TQTime(0,0,0);
+ result.dateMin=TQDate(0,0,0);
+ result.dateMax=TQDate(0,0,0);
if( chooseType->currentItem()==1)
{
@@ -738,8 +738,8 @@ void DlgValidity::OkPressed()
}
else
{
- result.valMin=QMIN(val_min->text().toDouble(),val_max->text().toDouble());
- result.valMax=QMAX(val_max->text().toDouble(),val_min->text().toDouble());
+ result.valMin=TQMIN(val_min->text().toDouble(),val_max->text().toDouble());
+ result.valMax=TQMAX(val_max->text().toDouble(),val_min->text().toDouble());
}
}
else if( chooseType->currentItem()==2 || chooseType->currentItem()==6)
@@ -750,8 +750,8 @@ void DlgValidity::OkPressed()
}
else
{
- result.valMin=QMIN(val_min->text().toInt(),val_max->text().toInt());
- result.valMax=QMAX(val_max->text().toInt(),val_min->text().toInt());
+ result.valMin=TQMIN(val_min->text().toInt(),val_max->text().toInt());
+ result.valMax=TQMAX(val_max->text().toInt(),val_min->text().toInt());
}
}
else if( chooseType->currentItem()==4)
@@ -796,7 +796,7 @@ void DlgValidity::OkPressed()
}
else if ( chooseType->currentItem()==7 )
{
- result.listValidity=QStringList::split( "\n", validityList->text() );
+ result.listValidity=TQStringList::split( "\n", validityList->text() );
}
}
result.displayMessage = displayMessage->isChecked();
diff --git a/kspread/dialogs/kspread_dlg_validity.h b/kspread/dialogs/kspread_dlg_validity.h
index 4bf96bbe..b9546cac 100644
--- a/kspread/dialogs/kspread_dlg_validity.h
+++ b/kspread/dialogs/kspread_dlg_validity.h
@@ -28,12 +28,12 @@
#include "kspread_cell.h"
-class QLabel;
-class QLineEdit;
-class QTextEdit;
-class QComboBox;
-class QPushButton;
-class QCheckBox;
+class TQLabel;
+class TQLineEdit;
+class TQTextEdit;
+class TQComboBox;
+class TQPushButton;
+class TQCheckBox;
namespace KSpread
{
@@ -43,8 +43,9 @@ class View;
class DlgValidity : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
-DlgValidity(View* parent, const char* name ,const QRect &_marker );
+DlgValidity(View* tqparent, const char* name ,const TQRect &_marker );
void init();
public slots:
@@ -56,24 +57,24 @@ protected:
void displayOrNotListOfValidity( bool _displayList);
View* m_pView;
- QRect marker;
- QLineEdit *val_max;
- QLineEdit *val_min;
- QLabel *edit1;
- QLabel *edit2;
- QComboBox *choose;
- QComboBox *chooseAction;
- QComboBox *chooseType;
- QLineEdit * title;
- QTextEdit *message;
+ TQRect marker;
+ TQLineEdit *val_max;
+ TQLineEdit *val_min;
+ TQLabel *edit1;
+ TQLabel *edit2;
+ TQComboBox *choose;
+ TQComboBox *chooseAction;
+ TQComboBox *chooseType;
+ TQLineEdit * title;
+ TQTextEdit *message;
Validity result;
- QCheckBox *displayMessage;
- QCheckBox *allowEmptyCell;
- QCheckBox *displayHelp;
- QTextEdit *messageHelp;
- QLineEdit *titleHelp;
- QTextEdit *validityList;
- QLabel *validityLabelList;
+ TQCheckBox *displayMessage;
+ TQCheckBox *allowEmptyCell;
+ TQCheckBox *displayHelp;
+ TQTextEdit *messageHelp;
+ TQLineEdit *titleHelp;
+ TQTextEdit *validityList;
+ TQLabel *validityLabelList;
};
} // namespace KSpread
diff --git a/kspread/dialogs/kspreadsubtotal.ui b/kspread/dialogs/kspreadsubtotal.ui
index a5da5c42..9cfb871a 100644
--- a/kspread/dialogs/kspreadsubtotal.ui
+++ b/kspread/dialogs/kspreadsubtotal.ui
@@ -18,7 +18,7 @@ License along with this library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<author>Norbert Andres &lt;nandres@web.de&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KSpreadSubtotal</cstring>
</property>
@@ -43,7 +43,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>TabWidget2</cstring>
</property>
@@ -55,7 +55,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -72,12 +72,12 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QComboBox" row="3" column="0">
+ <widget class="TQComboBox" row="3" column="0">
<property name="name">
<cstring>m_functionBox</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>m_addSubtotalToLabel</cstring>
</property>
@@ -85,7 +85,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>Add Subtotal to:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>m_useFunctionLabel</cstring>
</property>
@@ -93,12 +93,12 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>Use function:</string>
</property>
</widget>
- <widget class="QComboBox" row="1" column="0">
+ <widget class="TQComboBox" row="1" column="0">
<property name="name">
<cstring>m_columnBox</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>m_eachChangeLabel</cstring>
</property>
@@ -106,7 +106,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>At each change in:</string>
</property>
</widget>
- <widget class="QListView" row="5" column="0">
+ <widget class="TQListView" row="5" column="0">
<column>
<property name="text">
<string>Columns</string>
@@ -124,7 +124,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>tab</cstring>
</property>
@@ -141,7 +141,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_replaceSubtotals</cstring>
</property>
@@ -152,7 +152,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>m_pageBreak</cstring>
</property>
@@ -163,7 +163,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>&amp;Page break between groups</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>m_summaryBelow</cstring>
</property>
@@ -177,7 +177,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<bool>false</bool>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0">
+ <widget class="TQCheckBox" row="3" column="0">
<property name="name">
<cstring>m_summaryOnly</cstring>
</property>
@@ -195,14 +195,14 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>0</width>
<height>152</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="4" column="0">
+ <widget class="TQCheckBox" row="4" column="0">
<property name="name">
<cstring>m_IgnoreBox</cstring>
</property>
@@ -218,5 +218,5 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kspread/dialogs/link.cc b/kspread/dialogs/link.cc
index 7704eee5..0e115e01 100644
--- a/kspread/dialogs/link.cc
+++ b/kspread/dialogs/link.cc
@@ -24,10 +24,10 @@
#include "link.h"
-#include <qcombobox.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqcombobox.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kdesktopfile.h>
#include <kdialogbase.h>
@@ -43,22 +43,22 @@ using namespace KSpread;
class LinkDialog::Private
{
public:
- QString text;
- QFrame* internetPage;
+ TQString text;
+ TQFrame* internetPage;
KLineEdit* internetText;
KLineEdit* internetLink;
- QFrame* mailPage;
+ TQFrame* mailPage;
KLineEdit* mailText;
KLineEdit* mailLink;
- QFrame* filePage;
+ TQFrame* filePage;
KLineEdit* fileText;
KURLRequester* fileLink;
- QFrame* cellPage;
+ TQFrame* cellPage;
KLineEdit* cellText;
KLineEdit* cellLink;
};
-LinkDialog::LinkDialog( QWidget*, const char* )
+LinkDialog::LinkDialog( TQWidget*, const char* )
: KDialogBase( KDialogBase::IconList,i18n( "Insert Link") ,
KDialogBase::Ok | KDialogBase::Cancel,
KDialogBase::Ok )
@@ -66,57 +66,57 @@ LinkDialog::LinkDialog( QWidget*, const char* )
d = new Private;
// link for web or ftp
- d->internetPage = addPage( i18n( "Internet" ), QString::null,
+ d->internetPage = addPage( i18n( "Internet" ), TQString(),
BarIcon( "html",KIcon::SizeMedium ) );
- QVBoxLayout* iLayout = new QVBoxLayout( d->internetPage, marginHint(), spacingHint() );
- iLayout->add( new QLabel( i18n("Text to display:" ), d->internetPage ) );
+ TQVBoxLayout* iLayout = new TQVBoxLayout( d->internetPage, marginHint(), spacingHint() );
+ iLayout->add( new TQLabel( i18n("Text to display:" ), d->internetPage ) );
d->internetText = new KLineEdit( d->internetPage );
iLayout->add( d->internetText );
- iLayout->add( new QLabel( i18n("Internet address:" ), d->internetPage ) );
+ iLayout->add( new TQLabel( i18n("Internet address:" ), d->internetPage ) );
d->internetLink = new KLineEdit( d->internetPage );
iLayout->add( d->internetLink );
- iLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
- connect( d->internetText, SIGNAL( textChanged( const QString& ) ), this,
- SLOT( setText( const QString& ) ) );
+ iLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
+ connect( d->internetText, TQT_SIGNAL( textChanged( const TQString& ) ), this,
+ TQT_SLOT( setText( const TQString& ) ) );
// link for e-mail
- d->mailPage = addPage( i18n( "Mail" ), QString::null,
+ d->mailPage = addPage( i18n( "Mail" ), TQString(),
BarIcon( "mail_generic",KIcon::SizeMedium ) );
- QVBoxLayout* mLayout = new QVBoxLayout( d->mailPage, marginHint(), spacingHint() );
- mLayout->add( new QLabel( i18n("Text to display:" ), d->mailPage ) );
+ TQVBoxLayout* mLayout = new TQVBoxLayout( d->mailPage, marginHint(), spacingHint() );
+ mLayout->add( new TQLabel( i18n("Text to display:" ), d->mailPage ) );
d->mailText = new KLineEdit( d->mailPage );
mLayout->add( d->mailText );
- mLayout->add( new QLabel( i18n("Email:" ), d->mailPage ) );
+ mLayout->add( new TQLabel( i18n("Email:" ), d->mailPage ) );
d->mailLink = new KLineEdit( d->mailPage );
mLayout->add( d->mailLink );
- mLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
- connect( d->mailText, SIGNAL( textChanged( const QString& ) ), this,
- SLOT( setText( const QString& ) ) );
+ mLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
+ connect( d->mailText, TQT_SIGNAL( textChanged( const TQString& ) ), this,
+ TQT_SLOT( setText( const TQString& ) ) );
// link for external file
- d->filePage = addPage( i18n( "File" ), QString::null,
+ d->filePage = addPage( i18n( "File" ), TQString(),
BarIcon( "filenew",KIcon::SizeMedium ) );
- QVBoxLayout* fLayout = new QVBoxLayout( d->filePage, marginHint(), spacingHint() );
- fLayout->add( new QLabel( i18n("Text to display:" ), d->filePage ) );
+ TQVBoxLayout* fLayout = new TQVBoxLayout( d->filePage, marginHint(), spacingHint() );
+ fLayout->add( new TQLabel( i18n("Text to display:" ), d->filePage ) );
d->fileText = new KLineEdit( d->filePage );
fLayout->add( d->fileText );
- fLayout->add( new QLabel( i18n("File location:" ), d->filePage ) );
+ fLayout->add( new TQLabel( i18n("File location:" ), d->filePage ) );
d->fileLink = new KURLRequester( d->filePage );
fLayout->add( d->fileLink );
- fLayout->add( new QLabel( i18n("Recent file:" ), d->filePage ) );
- QComboBox* recentFile = new QComboBox( d->filePage );
- recentFile->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
+ fLayout->add( new TQLabel( i18n("Recent file:" ), d->filePage ) );
+ TQComboBox* recentFile = new TQComboBox( d->filePage );
+ recentFile->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed );
fLayout->add( recentFile );
- fLayout->addItem( new QSpacerItem( 0, 40, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ) );
- connect( d->fileText, SIGNAL( textChanged( const QString& ) ), this,
- SLOT( setText( const QString& ) ) );
- QObject::connect( recentFile, SIGNAL( highlighted ( const QString &) ),
- d->fileLink->lineEdit(), SLOT( setText( const QString & ) ) );
+ fLayout->addItem( new TQSpacerItem( 0, 40, TQSizePolicy::Minimum, TQSizePolicy::MinimumExpanding ) );
+ connect( d->fileText, TQT_SIGNAL( textChanged( const TQString& ) ), this,
+ TQT_SLOT( setText( const TQString& ) ) );
+ TQObject::connect( recentFile, TQT_SIGNAL( highlighted ( const TQString &) ),
+ d->fileLink->lineEdit(), TQT_SLOT( setText( const TQString & ) ) );
// populate recent files
- QStringList fileList = KRecentDocument::recentDocuments();
- for( QStringList::ConstIterator it = fileList.begin();it != fileList.end(); ++it )
+ TQStringList fileList = KRecentDocument::recentDocuments();
+ for( TQStringList::ConstIterator it = fileList.begin();it != fileList.end(); ++it )
{
KDesktopFile f(*it, true /* read only */);
if ( !f.readURL().isEmpty() )
@@ -129,18 +129,18 @@ LinkDialog::LinkDialog( QWidget*, const char* )
}
// link to another cell
- d->cellPage = addPage( i18n( "Cell" ), QString::null,
+ d->cellPage = addPage( i18n( "Cell" ), TQString(),
BarIcon( "misc",KIcon::SizeMedium ) );
- QVBoxLayout* cLayout = new QVBoxLayout( d->cellPage, marginHint(), spacingHint() );
- cLayout->add( new QLabel( i18n("Text to display:" ), d->cellPage ) );
+ TQVBoxLayout* cLayout = new TQVBoxLayout( d->cellPage, marginHint(), spacingHint() );
+ cLayout->add( new TQLabel( i18n("Text to display:" ), d->cellPage ) );
d->cellText = new KLineEdit( d->cellPage );
cLayout->add( d->cellText );
- cLayout->add( new QLabel( i18n("Cell:" ), d->cellPage ) );
+ cLayout->add( new TQLabel( i18n("Cell:" ), d->cellPage ) );
d->cellLink = new KLineEdit( d->cellPage );
cLayout->add( d->cellLink );
- cLayout->addItem( new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding ) );
- connect( d->cellText, SIGNAL( textChanged( const QString& ) ), this,
- SLOT( setText( const QString& ) ) );
+ cLayout->addItem( new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding ) );
+ connect( d->cellText, TQT_SIGNAL( textChanged( const TQString& ) ), this,
+ TQT_SLOT( setText( const TQString& ) ) );
enableButtonSeparator( true );
d->internetText->setFocus();
@@ -152,36 +152,36 @@ LinkDialog::~LinkDialog()
delete d;
}
-QString LinkDialog::text() const
+TQString LinkDialog::text() const
{
return d->text;
}
-QString LinkDialog::link() const
+TQString LinkDialog::link() const
{
- QString str;
+ TQString str;
switch( activePageIndex() )
{
case 0:
str = d->internetLink->text();
if( !str.isEmpty() )
- if( str.find( "http://" )==-1 )
- if( str.find( "https://" )==-1 )
- if( str.find( "ftp://" )==-1 )
+ if( str.tqfind( "http://" )==-1 )
+ if( str.tqfind( "https://" )==-1 )
+ if( str.tqfind( "ftp://" )==-1 )
str.prepend( "http://" );
break;
case 1:
str = d->mailLink->text();
if( !str.isEmpty() )
- if( str.find( "mailto:" )==-1 )
+ if( str.tqfind( "mailto:" )==-1 )
str.prepend( "mailto:" );
break;
case 2:
str = d->fileLink->lineEdit()->text();
if( !str.isEmpty() )
- if( str.find( "file:/" )==-1 )
+ if( str.tqfind( "file:/" )==-1 )
str.prepend( "file://" );
break;
@@ -194,7 +194,7 @@ QString LinkDialog::link() const
return str;
}
-void LinkDialog::setText( const QString& text )
+void LinkDialog::setText( const TQString& text )
{
d->text = text;
@@ -217,39 +217,39 @@ void LinkDialog::setText( const QString& text )
// link must be complete, e.g. "http://www.koffice.org" instead of
// "www.koffice.org" only, since protocol is used to decide which page to show
-void LinkDialog::setLink( const QString& link )
+void LinkDialog::setLink( const TQString& link )
{
if( link.startsWith( "https://" ) )
{
- d->internetLink->setText( link.mid( QString("https://").length() ) );
+ d->internetLink->setText( link.mid( TQString("https://").length() ) );
showPage( 0 );
return;
}
if( link.startsWith( "http://" ) )
{
- d->internetLink->setText( link.mid( QString("http://").length() ) );
+ d->internetLink->setText( link.mid( TQString("http://").length() ) );
showPage( 0 );
return;
}
if( link.startsWith( "ftp://" ) )
{
- d->internetLink->setText( link.mid( QString("ftp://").length() ) );
+ d->internetLink->setText( link.mid( TQString("ftp://").length() ) );
showPage( 0 );
return;
}
if( link.startsWith( "mailto:" ) )
{
- d->mailLink->setText( link.mid( QString("mailto:").length() ) );
+ d->mailLink->setText( link.mid( TQString("mailto:").length() ) );
showPage( 1 );
return;
}
if( link.startsWith( "file:/" ) )
{
- QString s = link.mid( QString("file:/").length() );
+ TQString s = link.mid( TQString("file:/").length() );
while(s.startsWith("//")) s.remove(0,1);
d->fileLink->lineEdit()->setText(s);
showPage( 2 );
@@ -263,7 +263,7 @@ void LinkDialog::setLink( const QString& link )
void LinkDialog::slotOk()
{
- QString str;
+ TQString str;
switch( activePageIndex() )
{
case 0: str = i18n( "Internet address is empty" ); break;
diff --git a/kspread/dialogs/link.h b/kspread/dialogs/link.h
index 12d00973..c34640fe 100644
--- a/kspread/dialogs/link.h
+++ b/kspread/dialogs/link.h
@@ -33,16 +33,17 @@ namespace KSpread
class LinkDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- LinkDialog( QWidget* parent, const char* name = 0 );
+ LinkDialog( TQWidget* tqparent, const char* name = 0 );
~LinkDialog();
- QString text() const;
- QString link() const;
+ TQString text() const;
+ TQString link() const;
public slots:
- void setText( const QString& text );
- void setLink( const QString& link );
+ void setText( const TQString& text );
+ void setLink( const TQString& link );
protected slots:
void slotOk();
diff --git a/kspread/dialogs/position_cell_format.ui b/kspread/dialogs/position_cell_format.ui
index eb3fb840..6438278e 100644
--- a/kspread/dialogs/position_cell_format.ui
+++ b/kspread/dialogs/position_cell_format.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PositionTab</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PositionTab</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="margin">
<number>7</number>
</property>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>horizontalGroup</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>standard</cstring>
</property>
@@ -53,15 +53,15 @@
<string>Standard</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>left</cstring>
</property>
@@ -69,7 +69,7 @@
<string>Left</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>center</cstring>
</property>
@@ -77,7 +77,7 @@
<string>Center</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>right</cstring>
</property>
@@ -89,7 +89,7 @@
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup" row="0" column="1">
+ <widget class="TQButtonGroup" row="0" column="1">
<property name="name">
<cstring>buttonGroup2</cstring>
</property>
@@ -106,7 +106,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>top</cstring>
</property>
@@ -114,7 +114,7 @@
<string>Top</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>middle</cstring>
</property>
@@ -122,7 +122,7 @@
<string>Middle</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>bottom</cstring>
</property>
@@ -132,7 +132,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>groupBox4</cstring>
</property>
@@ -146,7 +146,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>angleRotation</cstring>
</property>
@@ -166,7 +166,7 @@
<number>15</number>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>spinBox3</cstring>
</property>
@@ -185,7 +185,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -201,7 +201,7 @@ Vertical text puts your text vertically.</string>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>multi</cstring>
</property>
@@ -209,7 +209,7 @@ Vertical text puts your text vertically.</string>
<string>Wrap text</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>vertical</cstring>
</property>
@@ -219,7 +219,7 @@ Vertical text puts your text vertically.</string>
</widget>
</vbox>
</widget>
- <widget class="QGroupBox" row="2" column="1">
+ <widget class="TQGroupBox" row="2" column="1">
<property name="name">
<cstring>indentGroup</cstring>
</property>
@@ -230,7 +230,7 @@ Vertical text puts your text vertically.</string>
<string>Set the amount of indent that will be used in the cell when you choose the Format -&gt; Increase Indent or Format -&gt; Decrease Indent menus.</string>
</property>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -245,7 +245,7 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>mergeCell</cstring>
</property>
@@ -255,7 +255,7 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>sizeCellGroup</cstring>
</property>
@@ -269,15 +269,15 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>defaultHeight</cstring>
</property>
@@ -298,14 +298,14 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -313,7 +313,7 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<string>Height:</string>
</property>
</widget>
- <widget class="QFrame" row="0" column="1">
+ <widget class="TQFrame" row="0" column="1">
<property name="name">
<cstring>m_heightPanel</cstring>
</property>
@@ -329,15 +329,15 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>defaultWidth</cstring>
</property>
@@ -358,14 +358,14 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QFrame" row="0" column="1">
+ <widget class="TQFrame" row="0" column="1">
<property name="name">
<cstring>m_widthPanel</cstring>
</property>
@@ -379,7 +379,7 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<number>1</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -407,5 +407,5 @@ When a merged cell is selected and when you uncheck this, then all cells come ba
<slot>setValue(int)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kspread/dialogs/protection_cell_format.ui b/kspread/dialogs/protection_cell_format.ui
index 56b7352f..bdf9bf77 100644
--- a/kspread/dialogs/protection_cell_format.ui
+++ b/kspread/dialogs/protection_cell_format.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ProtectionTab</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ProtectionTab</cstring>
</property>
@@ -22,7 +22,7 @@ You can learn more about all these settings in the User Manual in the Advanced K
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox2</cstring>
</property>
@@ -33,7 +33,7 @@ You can learn more about all these settings in the User Manual in the Advanced K
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_bDontPrint</cstring>
</property>
@@ -47,7 +47,7 @@ Note that you can print it even if the cell is protected</string>
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -58,15 +58,15 @@ Note that you can print it even if the cell is protected</string>
<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>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_bHideAll</cstring>
</property>
@@ -77,9 +77,9 @@ Note that you can print it even if the cell is protected</string>
<string>This hides the cell content and works only when the sheet is protected. Whether the cell itself is protected or not does not matter.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -95,14 +95,14 @@ Note that you can print it even if the cell is protected</string>
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_bIsProtected</cstring>
</property>
@@ -118,9 +118,9 @@ Note that you can print it even if the cell is protected</string>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
@@ -136,14 +136,14 @@ Note that you can print it even if the cell is protected</string>
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>m_bHideFormula</cstring>
</property>
@@ -176,5 +176,5 @@ Note that you can print it even if the cell is protected</string>
<slot>setDisabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kspread/dialogs/sheet_properties.cc b/kspread/dialogs/sheet_properties.cc
index e7854935..efd30b03 100644
--- a/kspread/dialogs/sheet_properties.cc
+++ b/kspread/dialogs/sheet_properties.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qvbox.h>
-#include <qcheckbox.h>
+#include <tqvbox.h>
+#include <tqcheckbox.h>
#include <kcombobox.h>
#include <kdialogbase.h>
@@ -31,15 +31,15 @@
using namespace KSpread;
-SheetPropertiesDialog::SheetPropertiesDialog( QWidget* parent ):
- KDialogBase( parent, "sheetPropertiesDialog", true,
+SheetPropertiesDialog::SheetPropertiesDialog( TQWidget* tqparent ):
+ KDialogBase( tqparent, "sheetPropertiesDialog", true,
i18n("Sheet Properties"),
KDialogBase::Ok|KDialogBase::Cancel|KDialogBase::Default )
{
- QVBox* mainWidget = makeVBoxMainWidget();
+ TQVBox* mainWidget = makeVBoxMainWidget();
d = new SheetPropertiesBase( mainWidget );
- QWidget* spacer = new QWidget( mainWidget );
- spacer->setSizePolicy( QSizePolicy::Fixed, QSizePolicy::Expanding );
+ TQWidget* spacer = new TQWidget( mainWidget );
+ spacer->tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Expanding );
enableButtonSeparator( true );
}
@@ -63,7 +63,7 @@ void SheetPropertiesDialog::slotDefault()
setCapitalizeFirstLetter( false );
}
-Sheet::LayoutDirection SheetPropertiesDialog::layoutDirection() const
+Sheet::LayoutDirection SheetPropertiesDialog::tqlayoutDirection() const
{
if( d->directionComboBox->currentText() == i18n( "Left to Right" ) )
return Sheet::LeftToRight;
diff --git a/kspread/dialogs/sheet_properties.h b/kspread/dialogs/sheet_properties.h
index ef20d75c..b2f364f4 100644
--- a/kspread/dialogs/sheet_properties.h
+++ b/kspread/dialogs/sheet_properties.h
@@ -20,7 +20,7 @@
#ifndef SHEET_PROPERTIES_DIALOG
#define SHEET_PROPERTIES_DIALOG
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kdialogbase.h>
#include "kspread_sheet.h"
@@ -31,16 +31,17 @@ class SheetPropertiesBase;
class SheetPropertiesDialog : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- SheetPropertiesDialog( QWidget* parent = 0 );
+ SheetPropertiesDialog( TQWidget* tqparent = 0 );
~SheetPropertiesDialog();
virtual void slotDefault();
- Sheet::LayoutDirection layoutDirection() const;
+ Sheet::LayoutDirection tqlayoutDirection() const;
void setLayoutDirection( Sheet::LayoutDirection dir );
diff --git a/kspread/dialogs/sheet_properties_base.ui b/kspread/dialogs/sheet_properties_base.ui
index 588895fd..f1fe56c8 100644
--- a/kspread/dialogs/sheet_properties_base.ui
+++ b/kspread/dialogs/sheet_properties_base.ui
@@ -18,7 +18,7 @@ License along with this library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 51 Franklin Street,
Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<author>Ariya Hidayat &lt;ariya@kde.org&gt;</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SheetPropertiesBase</cstring>
</property>
@@ -45,23 +45,23 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <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</cstring>
</property>
@@ -99,7 +99,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -118,22 +118,22 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="4" column="1">
+ <widget class="TQCheckBox" row="4" column="1">
<property name="name">
<cstring>showCommentIndicatorCheckBox</cstring>
</property>
@@ -144,7 +144,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked cells containing comments will be marked by a small red triangle at the top right corner.</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0">
+ <widget class="TQCheckBox" row="3" column="0">
<property name="name">
<cstring>useLCModeCheckBox</cstring>
</property>
@@ -155,7 +155,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked the cell reference shown at the left end of the Formula Bar will be displayed in LC mode (i.e. L2C3) rather than in its normal form B3. This does not seem to be of much use at the moment.</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>showPageBordersCheckBox</cstring>
</property>
@@ -166,7 +166,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If you check this option, the page borders will be drawn on your current sheet. Per default the page borders are not displayed. It is useful to see the page borders if you want to print your sheet.</string>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="0">
+ <widget class="TQCheckBox" row="4" column="0">
<property name="name">
<cstring>capitalizeFirstLetterCheckBox</cstring>
</property>
@@ -177,7 +177,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>Check this box and the first letter of any text you type in will automatically be converted to uppercase.</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>hideZeroCheckBox</cstring>
</property>
@@ -188,7 +188,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked any cell containing the value zero will appear blank.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="1">
+ <widget class="TQCheckBox" row="2" column="1">
<property name="name">
<cstring>showFormulaCheckBox</cstring>
</property>
@@ -199,7 +199,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked KSpread will display the actual formulae in cells rather than the results.</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>showColumnAsNumbersCheckBox</cstring>
</property>
@@ -210,7 +210,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked the column headings will show as numbers rather than as letters. Letters are default.</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="1">
+ <widget class="TQCheckBox" row="3" column="1">
<property name="name">
<cstring>showFormulaIndicatorCheckBox</cstring>
</property>
@@ -221,7 +221,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If this box is checked KSpread will display a small blue triangle at the bottom left corner of cells containing formulae. This is useful if you want to protect cells with formulae.</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>showGridCheckBox</cstring>
</property>
@@ -232,7 +232,7 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<string>If checked the grid (the cell limits) will be shown. This is default. If you uncheck it, the grid willl be hidden.</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>autoCalcCheckBox</cstring>
</property>
@@ -250,8 +250,8 @@ Fifth Floor, Boston, MA 02110-1301, USA.</comment>
<includes>
<include location="global" impldecl="in implementation">kdialog.h</include>
</includes>
-<layoutdefaults spacing="6" margin="11"/>
-<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
+<tqlayoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
<includehints>
<includehint>kcombobox.h</includehint>
</includehints>
diff --git a/kspread/digest.cc b/kspread/digest.cc
index bfb118d8..ca45c35d 100644
--- a/kspread/digest.cc
+++ b/kspread/digest.cc
@@ -828,14 +828,14 @@ void rtl_digest_destroySHA1 (rtlDigest Digest)
*
*======================================================================*/
-bool SHA1::getHash( QString const & text, QCString & hash )
+bool SHA1::getHash( TQString const & text, TQCString & hash )
{
rtlDigest aDigest = rtl_digest_createSHA1();
- rtlDigestError aError = rtl_digest_updateSHA1( aDigest, text.unicode(), text.length() * sizeof(QChar) );
+ rtlDigestError aError = rtl_digest_updateSHA1( aDigest, text.tqunicode(), text.length() * sizeof(TQChar) );
if ( aError == rtl_Digest_E_None )
{
- QCString digest;
+ TQCString digest;
digest.resize( RTL_DIGEST_LENGTH_SHA1 + 1 );
digest.fill( '\0', RTL_DIGEST_LENGTH_SHA1 );
diff --git a/kspread/digest.h b/kspread/digest.h
index 92ba0456..aceea9de 100644
--- a/kspread/digest.h
+++ b/kspread/digest.h
@@ -43,13 +43,13 @@
#ifndef _DIGEST_
#define _DIGEST_
-#include <qcstring.h>
-#include <qstring.h>
+#include <tqcstring.h>
+#include <tqstring.h>
class SHA1
{
public:
- static bool getHash( QString const & text, QCString & hash );
+ static bool getHash( TQString const & text, TQCString & hash );
};
#endif
diff --git a/kspread/doc/PAINTING.html b/kspread/doc/PAINTING.html
index 1f2578f2..58bd1ed5 100644
--- a/kspread/doc/PAINTING.html
+++ b/kspread/doc/PAINTING.html
@@ -16,7 +16,7 @@ supposed to work. At present, it is not a complete description.</p>
<h2>General</h2>
<p>Painting is started by KSpreadCanvas::paintUpdates(). This method
-calls paintCell() on all visible cells, i.e. it always repaints the
+calls paintCell() on all visible cells, i.e. it always tqrepaints the
entire sheet. This is inefficient, but is OK for most circumstances.
There is a bug in bugzilla (#xxxx) which points this out.</p>
@@ -59,10 +59,10 @@ If it doesn't, two things can happen:</p>
slightly buggy.)
</ol>
-The layout code also takes into account if the cell has vertical text,
+The tqlayout code also takes into account if the cell has vertical text,
if it is angled, indented text, and so on.</p>
-<p>The result of the layout process is the setting of the following
+<p>The result of the tqlayout process is the setting of the following
variables in a cell:</p>
<table cellspacing="0" cellpadding="3" border="1">
@@ -100,7 +100,7 @@ variables in a cell:</p>
</pre>
</table>
-<p>After the layout process, paintCell() uses these
+<p>After the tqlayout process, paintCell() uses these
variables to position the text within the cell and also to paint "more
text" markers, etc.</p>
@@ -129,7 +129,7 @@ that is demanded can be handled in several different ways:</p>
<li>The content can be partially shown, i.e. cut.
<li>The content can overflow into neighbor cell(s). Which cells that
- are affected is dependent on alignment, if the neighbors are
+ are affected is dependent on tqalignment, if the neighbors are
empty, etc, etc. </ul>
<h3>Borders and overflow</h3>
diff --git a/kspread/formula.cc b/kspread/formula.cc
index 73b4ffdf..17b95497 100644
--- a/kspread/formula.cc
+++ b/kspread/formula.cc
@@ -34,10 +34,10 @@
#include <limits.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qvaluestack.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqvaluestack.h>
#include <klocale.h>
@@ -98,12 +98,12 @@ public:
Sheet *sheet;
bool dirty;
bool valid;
- QString expression;
- QValueVector<Opcode> codes;
- QValueVector<Value> constants;
+ TQString expression;
+ TQValueVector<Opcode> codes;
+ TQValueVector<Value> constants;
};
-class TokenStack : public QValueVector<Token>
+class TokenStack : public TQValueVector<Token>
{
public:
TokenStack();
@@ -127,14 +127,14 @@ const Token Token::null;
// helper function: return operator of given token text
// e.g. "*" yields Operator::Asterisk, and so on
-Token::Op KSpread::matchOperator( const QString& text )
+Token::Op KSpread::matchOperator( const TQString& text )
{
Token::Op result = Token::InvalidOp;
if( text.length() == 1 )
{
- QChar p = text[0];
- switch( p.unicode() )
+ TQChar p = text[0];
+ switch( p.tqunicode() )
{
case '+': result = Token::Plus; break;
case '-': result = Token::Minus; break;
@@ -209,7 +209,7 @@ static Value tokenAsValue( const Token& token )
**********************/
// creates a token
-Token::Token( Type type, const QString& text, int pos )
+Token::Token( Type type, const TQString& text, int pos )
{
m_type = type;
m_text = text;
@@ -252,10 +252,10 @@ double Token::asFloat() const
else return 0.0;
}
-QString Token::asString() const
+TQString Token::asString() const
{
if( isString() ) return m_text.mid( 1, m_text.length()-2 );
- else return QString::null;
+ else return TQString();
}
Token::Op Token::asOperator() const
@@ -264,18 +264,18 @@ Token::Op Token::asOperator() const
else return InvalidOp;
}
-QString Token::sheetName() const
+TQString Token::sheetName() const
{
- if( !isCell() && !isRange() ) return QString::null;
- int i = m_text.find( '!' );
- if( i < 0 ) return QString();
- QString sheet = m_text.left( i );
+ if( !isCell() && !isRange() ) return TQString();
+ int i = m_text.tqfind( '!' );
+ if( i < 0 ) return TQString();
+ TQString sheet = m_text.left( i );
return sheet;
}
-QString Token::description() const
+TQString Token::description() const
{
- QString desc;
+ TQString desc;
switch (m_type )
{
@@ -292,7 +292,7 @@ QString Token::description() const
while( desc.length() < 10 ) desc.prepend( ' ' );
desc.prepend( " " );
- desc.prepend( QString::number( m_pos ) );
+ desc.prepend( TQString::number( m_pos ) );
desc.append( " : " ).append( m_text );
return desc;
@@ -303,7 +303,7 @@ QString Token::description() const
TokenStack
**********************/
-TokenStack::TokenStack(): QValueVector<Token>()
+TokenStack::TokenStack(): TQValueVector<Token>()
{
topIndex = 0;
ensureSpace();
@@ -353,9 +353,9 @@ void TokenStack::ensureSpace()
**********************/
// helper function: return true for valid identifier character
-bool KSpread::isIdentifier( QChar ch )
+bool KSpread::isIdentifier( TQChar ch )
{
- return ( ch.unicode() == '_' ) || (ch.unicode() == '$' ) || ( ch.isLetter() );
+ return ( ch.tqunicode() == '_' ) || (ch.tqunicode() == '$' ) || ( ch.isLetter() );
}
@@ -404,7 +404,7 @@ Sheet* Formula::sheet() const
// note that both the real lex and parse processes will happen later on
// when needed (i.e. "lazy parse"), for example during formula evaluation.
-void Formula::setExpression( const QString& expr )
+void Formula::setExpression( const TQString& expr )
{
d->expression = expr;
d->dirty = true;
@@ -413,7 +413,7 @@ void Formula::setExpression( const QString& expr )
// Returns the expression associated with this formula.
-QString Formula::expression() const
+TQString Formula::expression() const
{
return d->expression;
}
@@ -441,7 +441,7 @@ bool Formula::isValid() const
void Formula::clear()
{
- d->expression = QString::null;
+ d->expression = TQString();
d->dirty = true;
d->valid = false;
d->constants.clear();
@@ -461,7 +461,7 @@ Tokens Formula::tokens() const
return scan( d->expression, locale );
}
-Tokens Formula::scan( const QString& expr, KLocale* locale ) const
+Tokens Formula::scan( const TQString& expr, KLocale* locale ) const
{
// to hold the result
Tokens tokens;
@@ -471,14 +471,14 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
InString, InIdentifier, InCell, InRange, InSheetOrAreaName } state;
// use locale settings if specified
- QString thousand = locale ? locale->thousandsSeparator() : "";
- QString decimal = locale ? locale->decimalSymbol() : ".";
+ TQString thousand = locale ? locale->thousandsSeparator() : "";
+ TQString decimal = locale ? locale->decimalSymbol() : ".";
// initialize variables
state = Start;
unsigned int i = 0;
- QString ex = expr;
- QString tokenText;
+ TQString ex = expr;
+ TQString tokenText;
int tokenStart = 0;
// first character must be equal sign (=)
@@ -489,12 +489,12 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
ex.remove( 0, 1 );
// force a terminator
- ex.append( QChar() );
+ ex.append( TQChar() );
// main loop
while( (state != Bad) && (state != Finish) && (i < ex.length()) )
{
- QChar ch = ex[i];
+ TQChar ch = ex[i];
switch( state )
{
@@ -527,7 +527,7 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
}
// aposthrophe (') marks sheet name for 3-d cell, e.g 'Sales Q3'!A4, or a named range
- else if ( ch.unicode() == '\'' )
+ else if ( ch.tqunicode() == '\'' )
{
i++;
state = InSheetOrAreaName;
@@ -541,14 +541,14 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
}
// terminator character
- else if ( ch == QChar::null )
+ else if ( ch == TQChar::null )
state = Finish;
// look for operator match
else
{
int op;
- QString s;
+ TQString s;
// check for two-chars operator, such as '<=', '>=', etc
s.append( ch ).append( ex[i+1] );
@@ -557,7 +557,7 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
// check for one-char operator, such as '+', ';', etc
if( op == Token::InvalidOp )
{
- s = QString( ch );
+ s = TQString( ch );
op = matchOperator( s );
}
@@ -597,7 +597,7 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
else
{
// check for cell reference, e.g A1, VV123, ...
- QRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
+ TQRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
int n = exp.search( tokenText );
if( n >= 0 )
state = InCell;
@@ -625,13 +625,13 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
{
// check if it's a cell ref like A32, not named area
- QString cell;
+ TQString cell;
for( int j = tokenText.length()-1; j>=0; j-- )
if( tokenText[j] == '!' )
break;
else
cell.prepend( tokenText[j] );
- QRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
+ TQRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
if( exp.search( cell ) != 0 )
{
@@ -680,7 +680,7 @@ Tokens Formula::scan( const QString& expr, KLocale* locale ) const
case InSheetOrAreaName:
// consume until '
- if ( ch.unicode() != '\'' )
+ if ( ch.tqunicode() != '\'' )
tokenText.append( ex[i++] );
else
@@ -842,7 +842,7 @@ void Formula::compile( const Tokens& tokens ) const
if( tokens.count() == 0 ) return;
TokenStack syntaxStack;
- QValueStack<int> argStack;
+ TQValueStack<int> argStack;
unsigned argCount = 1;
for( unsigned i = 0; i <= tokens.count(); i++ )
@@ -966,7 +966,7 @@ void Formula::compile( const Tokens& tokens ) const
}
}
- // rule for function call with parentheses, but without argument
+ // rule for function call with tqparentheses, but without argument
// e.g. "2*PI()"
if( !ruleFound )
if( syntaxStack.itemCount() >= 3 )
@@ -987,7 +987,7 @@ void Formula::compile( const Tokens& tokens ) const
}
}
- // rule for parenthesis: ( Y ) -> Y
+ // rule for tqparenthesis: ( Y ) -> Y
if( !ruleFound )
if( syntaxStack.itemCount() >= 3 )
{
@@ -1143,13 +1143,13 @@ void Formula::compile( const Tokens& tokens ) const
}
}
-bool Formula::isNamedArea( const QString& expr ) const
+bool Formula::isNamedArea( const TQString& expr ) const
{
- QString tokenText( expr );
+ TQString tokenText( expr );
// check for named areas ...
if (d->sheet) {
- const QValueList<Reference> areas = d->sheet->doc()->listArea();
- QValueList<Reference>::const_iterator it;
+ const TQValueList<Reference> areas = d->sheet->doc()->listArea();
+ TQValueList<Reference>::const_iterator it;
for (it = areas.begin(); it != areas.end(); ++it) {
if ((*it).ref_name.lower() == tokenText.lower()) {
// we got a named area
@@ -1171,12 +1171,12 @@ struct stackEntry {
Value Formula::eval() const
{
- QValueStack<stackEntry> stack;
+ TQValueStack<stackEntry> stack;
stackEntry entry;
unsigned index;
Value val1, val2;
- QString c;
- QValueVector<Value> args;
+ TQString c;
+ TQValueVector<Value> args;
Sheet *sheet = 0;
ValueParser* parser = 0;
@@ -1469,9 +1469,9 @@ Value Formula::eval() const
// Debugging aid
-QString Formula::dump() const
+TQString Formula::dump() const
{
- QString result;
+ TQString result;
if( d->dirty )
{
@@ -1479,36 +1479,36 @@ QString Formula::dump() const
compile( tokens );
}
- result = QString("Expression: [%1]\n").arg( d->expression );
+ result = TQString("Expression: [%1]\n").tqarg( d->expression );
#if 0
Value value = eval();
- result.append( QString("Result: %1\n").arg(
+ result.append( TQString("Result: %1\n").tqarg(
converter->asString(value).asString() ) );
#endif
result.append(" Constants:\n");
for( unsigned c = 0; c < d->constants.count(); c++ )
{
- QString vtext;
+ TQString vtext;
Value val = d->constants[c];
- if( val.isString() ) vtext = QString("[%1]").arg( val.asString() );
- else if( val.isNumber() ) vtext = QString("%1").arg( val.asFloat() );
- else if( val.isBoolean() ) vtext = QString("%1").arg( val.asBoolean() ? "True":"False");
+ if( val.isString() ) vtext = TQString("[%1]").tqarg( val.asString() );
+ else if( val.isNumber() ) vtext = TQString("%1").tqarg( val.asFloat() );
+ else if( val.isBoolean() ) vtext = TQString("%1").tqarg( val.asBoolean() ? "True":"False");
else if( val.isError() ) vtext = "error";
else vtext = "???";
- result += QString(" #%1 = %2\n").arg(c).arg( vtext );
+ result += TQString(" #%1 = %2\n").tqarg(c).tqarg( vtext );
}
result.append("\n");
result.append(" Code:\n");
for( unsigned i = 0; i < d->codes.count(); i++ )
{
- QString ctext;
+ TQString ctext;
switch( d->codes[i].type )
{
- case Opcode::Load: ctext = QString("Load #%1").arg( d->codes[i].index ); break;
- case Opcode::Ref: ctext = QString("Ref #%1").arg( d->codes[i].index ); break;
- case Opcode::Function: ctext = QString("Function (%1)").arg( d->codes[i].index ); break;
+ case Opcode::Load: ctext = TQString("Load #%1").tqarg( d->codes[i].index ); break;
+ case Opcode::Ref: ctext = TQString("Ref #%1").tqarg( d->codes[i].index ); break;
+ case Opcode::Function: ctext = TQString("Function (%1)").tqarg( d->codes[i].index ); break;
case Opcode::Add: ctext = "Add"; break;
case Opcode::Sub: ctext = "Sub"; break;
case Opcode::Mul: ctext = "Mul"; break;
@@ -1528,7 +1528,7 @@ QString Formula::dump() const
return result;
}
-QTextStream& operator<<( QTextStream& ts, Formula formula )
+TQTextStream& operator<<( TQTextStream& ts, Formula formula )
{
ts << formula.dump();
return ts;
diff --git a/kspread/formula.h b/kspread/formula.h
index 2425e73d..8a1e2f03 100644
--- a/kspread/formula.h
+++ b/kspread/formula.h
@@ -20,8 +20,8 @@
#ifndef KSPREAD_FORMULA
#define KSPREAD_FORMULA
-#include <qstring.h>
-#include <qvaluevector.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
class KLocale;
@@ -81,7 +81,7 @@ class Token
/**
* Creates a token.
*/
- Token( Type type = Unknown, const QString& text = QString::null, int pos = -1 );
+ Token( Type type = Unknown, const TQString& text = TQString(), int pos = -1 );
static const Token null;
@@ -100,7 +100,7 @@ class Token
* text(), you might use asInteger(), asFloat(), asString(), sheetName(),
* etc.
*/
- QString text() const { return m_text; }
+ TQString text() const { return m_text; }
int pos() const { return m_pos; };
@@ -169,14 +169,14 @@ class Token
/**
* Returns string value for a string token.
- * For any other type of token, it returns QString::null.
+ * For any other type of token, it returns TQString().
*
* Note that token text for a string token still has leading and trailing
* double-quotes, i.e for "KOffice", text() return "KOffice"
* (with the quotes, 9 characters) while asString() only return KOffice
* (without quotes, 7 characters).
*/
- QString asString() const;
+ TQString asString() const;
/**
* Returns operator value for an operator token.
@@ -186,7 +186,7 @@ class Token
/**
* Returns sheet name in a cell reference token.
- * For any other type of token, it returns QString::null.
+ * For any other type of token, it returns TQString().
*
* If the cell reference doesn't specify sheet name, an empty string
* is returned. As example, for "Sheet1!B3" , sheetName() returns
@@ -196,18 +196,18 @@ class Token
* in "'Sales Forecast'!F4", sheetName() returns the name
* without the quotes, i.e "Sales Forecast" in this case.
*/
- QString sheetName() const;
+ TQString sheetName() const;
/**
* Returns a short description of the token.
* Should be used only to assist debugging.
*/
- QString description() const;
+ TQString description() const;
protected:
Type m_type;
- QString m_text;
+ TQString m_text;
int m_pos;
};
@@ -216,10 +216,10 @@ class Token
* Class Tokens represents array of tokens.
*
*/
-class Tokens: public QValueVector<Token>
+class Tokens: public TQValueVector<Token>
{
public:
- Tokens(): QValueVector<Token>(), m_valid(true) {};
+ Tokens(): TQValueVector<Token>(), m_valid(true) {};
bool valid() const { return m_valid; }
void setValid( bool v ){ m_valid = v; }
protected:
@@ -267,12 +267,12 @@ class Formula
/**
* Sets the expression for this formula.
*/
- void setExpression( const QString& expr );
+ void setExpression( const TQString& expr );
/**
* Gets the expression of this formula.
*/
- QString expression() const;
+ TQString expression() const;
/**
* Clears everything, makes as like a newly constructed formula.
@@ -280,7 +280,7 @@ class Formula
void clear();
/**
- * Returns true if the specified expression is valid, i.e. it contains
+ * Returns true if the specified expression is valid, i.e. it tqcontains
* no parsing error.
* Empty formula (i.e. without expression) is always invalid.
*/
@@ -304,9 +304,9 @@ class Formula
* If the expression contains error (e.g. unknown operator, string no terminated)
* this function returns tokens which is not valid.
*/
- Tokens scan( const QString& expr, KLocale* locale = 0 ) const;
+ Tokens scan( const TQString& expr, KLocale* locale = 0 ) const;
- QString dump() const;
+ TQString dump() const;
protected:
@@ -315,7 +315,7 @@ class Formula
/**
* helper function: return true for valid named area
*/
- bool isNamedArea( const QString& expr ) const;
+ bool isNamedArea( const TQString& expr ) const;
private:
class Private;
@@ -328,19 +328,19 @@ class Formula
/**
* Dumps the formula, should be used only to assist debugging.
*/
-QTextStream& operator<<( QTextStream& ts, Formula formula );
+TQTextStream& operator<<( TQTextStream& ts, Formula formula );
/**
* helper function: return operator of given token text
* e.g. "*" yields Operator::Asterisk, and so on
*/
-Token::Op matchOperator( const QString& text );
+Token::Op matchOperator( const TQString& text );
/**
* helper function: return true for valid identifier character
*/
-bool isIdentifier( QChar ch );
+bool isIdentifier( TQChar ch );
} // namespace KSpread
diff --git a/kspread/functions.cc b/kspread/functions.cc
index 1f53c01e..0cc0dd98 100644
--- a/kspread/functions.cc
+++ b/kspread/functions.cc
@@ -22,10 +22,10 @@
#include "functions.h"
#include "valuecalc.h"
-#include <qdict.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qvaluevector.h>
+#include <tqdict.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqvaluevector.h>
#include <kdebug.h>
#include <klocale.h>
@@ -40,7 +40,7 @@ namespace KSpread
class Function::Private
{
public:
- QString name;
+ TQString name;
FunctionPtr ptr;
int paramMin, paramMax;
bool acceptArray;
@@ -50,8 +50,8 @@ public:
class FunctionRepository::Private
{
public:
- QDict<Function> functions;
- QDict<FunctionDescription> funcs;
+ TQDict<Function> functions;
+ TQDict<FunctionDescription> funcs;
};
} // namespace KSpread
@@ -59,7 +59,7 @@ public:
using namespace KSpread;
-Function::Function( const QString& name, FunctionPtr ptr )
+Function::Function( const TQString& name, FunctionPtr ptr )
{
d = new Private;
d->name = name;
@@ -75,7 +75,7 @@ Function::~Function()
delete d;
}
-QString Function::name() const
+TQString Function::name() const
{
return d->name;
}
@@ -207,11 +207,11 @@ FunctionRepository* FunctionRepository::self()
kdDebug() << "Functions registered, loading descriptions" << endl;
// find all XML description files
- QStringList files = Factory::global()->dirs()->findAllResources
+ TQStringList files = Factory::global()->dirs()->findAllResources
("extensions", "*.xml", TRUE);
// load desc/help from XML file
- for( QStringList::Iterator it = files.begin(); it != files.end(); ++it )
+ for( TQStringList::Iterator it = files.begin(); it != files.end(); ++it )
s_self->loadFile (*it);
kdDebug() << "All ok, repository ready" << endl;
@@ -240,22 +240,22 @@ void FunctionRepository::add( Function* function )
d->functions.insert( function->name().upper(), function );
}
-Function *FunctionRepository::function (const QString& name)
+Function *FunctionRepository::function (const TQString& name)
{
- return d->functions.find (name.upper());
+ return d->functions.tqfind (name.upper());
}
-FunctionDescription *FunctionRepository::functionInfo (const QString& name)
+FunctionDescription *FunctionRepository::functionInfo (const TQString& name)
{
- return d->funcs.find (name.upper());
+ return d->funcs.tqfind (name.upper());
}
// returns names of function in certain group
-QStringList FunctionRepository::functionNames( const QString& group )
+TQStringList FunctionRepository::functionNames( const TQString& group )
{
- QStringList lst;
+ TQStringList lst;
- QDictIterator<FunctionDescription> it (d->funcs);
+ TQDictIterator<FunctionDescription> it (d->funcs);
for(; it.current(); ++it) {
if (group.isNull() || (it.current()->group() == group))
lst.append (it.current()->name());
@@ -265,41 +265,41 @@ QStringList FunctionRepository::functionNames( const QString& group )
return lst;
}
-void FunctionRepository::loadFile (const QString& filename)
+void FunctionRepository::loadFile (const TQString& filename)
{
- QFile file (filename);
+ TQFile file (filename);
if (!file.open (IO_ReadOnly))
return;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &file );
file.close();
- QString group = "";
+ TQString group = "";
- QDomNode n = doc.documentElement().firstChild();
+ TQDomNode n = doc.documentElement().firstChild();
for (; !n.isNull(); n = n.nextSibling())
{
if (!n.isElement())
continue;
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.tagName() == "Group")
{
group = i18n (e.namedItem ("GroupName").toElement().text().utf8());
m_groups.append( group );
m_groups.sort();
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
for (; !n2.isNull(); n2 = n2.nextSibling())
{
if (!n2.isElement())
continue;
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if (e2.tagName() == "Function")
{
FunctionDescription* desc = new FunctionDescription( e2 );
desc->setGroup (group);
- if (d->functions.find (desc->name()))
+ if (d->functions.tqfind (desc->name()))
d->funcs.insert (desc->name(), desc);
}
}
@@ -310,7 +310,7 @@ void FunctionRepository::loadFile (const QString& filename)
// ------------------------------------------------------------
-static ParameterType toType( const QString& type )
+static ParameterType toType( const TQString& type )
{
if ( type == "Boolean" )
return KSpread_Boolean;
@@ -324,7 +324,7 @@ static ParameterType toType( const QString& type )
return KSpread_Float;
}
-static QString toString (ParameterType type, bool range = FALSE)
+static TQString toString (ParameterType type, bool range = FALSE)
{
if ( !range )
{
@@ -357,7 +357,7 @@ static QString toString (ParameterType type, bool range = FALSE)
}
}
- return QString::null;
+ return TQString();
}
FunctionParameter::FunctionParameter()
@@ -373,16 +373,16 @@ FunctionParameter::FunctionParameter (const FunctionParameter& param)
m_range = param.m_range;
}
-FunctionParameter::FunctionParameter (const QDomElement& element)
+FunctionParameter::FunctionParameter (const TQDomElement& element)
{
m_type = KSpread_Float;
m_range = FALSE;
- QDomNode n = element.firstChild();
+ TQDomNode n = element.firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
if ( n.isElement() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "Comment" )
m_help = i18n( e.text().utf8() );
else if ( e.tagName() == "Type" )
@@ -402,14 +402,14 @@ FunctionDescription::FunctionDescription()
m_type = KSpread_Float;
}
-FunctionDescription::FunctionDescription (const QDomElement& element)
+FunctionDescription::FunctionDescription (const TQDomElement& element)
{
- QDomNode n = element.firstChild();
+ TQDomNode n = element.firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if (!n.isElement())
continue;
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( e.tagName() == "Name" )
m_name = e.text();
else if ( e.tagName() == "Type" )
@@ -418,12 +418,12 @@ FunctionDescription::FunctionDescription (const QDomElement& element)
m_params.append (FunctionParameter (e));
else if ( e.tagName() == "Help" )
{
- QDomNode n2 = e.firstChild();
+ TQDomNode n2 = e.firstChild();
for( ; !n2.isNull(); n2 = n2.nextSibling() )
{
if (!n2.isElement())
continue;
- QDomElement e2 = n2.toElement();
+ TQDomElement e2 = n2.toElement();
if ( e2.tagName() == "Text" )
m_help.append ( i18n( e2.text().utf8() ) );
else if ( e2.tagName() == "Syntax" )
@@ -447,16 +447,16 @@ FunctionDescription::FunctionDescription( const FunctionDescription& desc )
m_type = desc.m_type;
}
-QString FunctionDescription::toQML() const
+TQString FunctionDescription::toTQML() const
{
- QString text( "<qt><h1>" );
+ TQString text( "<qt><h1>" );
text += name();
text += "</h1>";
if( !m_help.isEmpty() )
{
text += i18n("<p>");
- QStringList::ConstIterator it = m_help.begin();
+ TQStringList::ConstIterator it = m_help.begin();
for( ; it != m_help.end(); ++it )
{
text += *it;
@@ -472,7 +472,7 @@ QString FunctionDescription::toQML() const
if ( !m_syntax.isEmpty() )
{
text += i18n("<h2>Syntax</h2><ul>");
- QStringList::ConstIterator it = m_syntax.begin();
+ TQStringList::ConstIterator it = m_syntax.begin();
for( ; it != m_syntax.end(); ++it )
{
text += "<li>";
@@ -484,7 +484,7 @@ QString FunctionDescription::toQML() const
if ( !m_params.isEmpty() )
{
text += i18n("<h2>Parameters</h2><ul>");
- QValueList<FunctionParameter>::ConstIterator it = m_params.begin();
+ TQValueList<FunctionParameter>::ConstIterator it = m_params.begin();
for( ; it != m_params.end(); ++it )
{
text += i18n("<li><b>Comment:</b> ");
@@ -498,7 +498,7 @@ QString FunctionDescription::toQML() const
if ( !m_examples.isEmpty() )
{
text += i18n("<h2>Examples</h2><ul>");
- QStringList::ConstIterator it = m_examples.begin();
+ TQStringList::ConstIterator it = m_examples.begin();
for( ; it != m_examples.end(); ++it )
{
text += "<li>";
@@ -510,7 +510,7 @@ QString FunctionDescription::toQML() const
if ( !m_related.isEmpty() )
{
text += i18n("<h2>Related Functions</h2><ul>");
- QStringList::ConstIterator it = m_related.begin();
+ TQStringList::ConstIterator it = m_related.begin();
for( ; it != m_related.end(); ++it )
{
text += "<li>";
diff --git a/kspread/functions.h b/kspread/functions.h
index 5a52ad57..9cf7faf2 100644
--- a/kspread/functions.h
+++ b/kspread/functions.h
@@ -22,10 +22,10 @@
#ifndef KSPREAD_FUNCTIONS
#define KSPREAD_FUNCTIONS
-#include <qstringlist.h>
-#include <qvaluevector.h>
+#include <tqstringlist.h>
+#include <tqvaluevector.h>
-class QDomElement;
+class TQDomElement;
namespace KSpread
{
@@ -33,14 +33,14 @@ class Sheet;
class Value;
class ValueCalc;
-typedef QValueVector<Value> valVector;
+typedef TQValueVector<Value> valVector;
struct rangeInfo {
int col1, col2, row1, row2;
};
struct FuncExtra {
// here we'll add all the extras a function may need
- QValueVector<rangeInfo> ranges;
+ TQValueVector<rangeInfo> ranges;
Sheet *sheet;
int myrow, mycol;
};
@@ -50,7 +50,7 @@ typedef Value (*FunctionPtr)(valVector, ValueCalc *, FuncExtra *);
class Function
{
public:
- Function (const QString& name, FunctionPtr ptr);
+ Function (const TQString& name, FunctionPtr ptr);
~Function();
/**
setParamCount sets allowed parameter count for a function.
@@ -65,10 +65,10 @@ public:
void setAcceptArray (bool accept = true);
bool needsExtra ();
void setNeedsExtra (bool extra);
- QString name() const;
- QString localizedName() const;
- QString helpText() const;
- void setHelpText( const QString& text );
+ TQString name() const;
+ TQString localizedName() const;
+ TQString helpText() const;
+ void setHelpText( const TQString& text );
Value exec (valVector args, ValueCalc *calc, FuncExtra *extra = 0);
private:
@@ -83,14 +83,14 @@ class FunctionParameter
public:
FunctionParameter();
FunctionParameter( const FunctionParameter& param );
- FunctionParameter( const QDomElement& element );
+ FunctionParameter( const TQDomElement& element );
- QString helpText() const { return m_help; }
+ TQString helpText() const { return m_help; }
ParameterType type() const { return m_type; }
bool hasRange() const { return m_range; }
private:
- QString m_help;
+ TQString m_help;
ParameterType m_type;
bool m_range;
};
@@ -99,33 +99,33 @@ class FunctionDescription
{
public:
FunctionDescription();
- FunctionDescription (const QDomElement& element);
+ FunctionDescription (const TQDomElement& element);
FunctionDescription (const FunctionDescription& desc);
- const QStringList& examples() { return m_examples; }
- const QStringList& syntax() { return m_syntax; }
- const QStringList& related() { return m_related; }
- const QStringList& helpText() const { return m_help; }
- QString name() const { return m_name; }
+ const TQStringList& examples() { return m_examples; }
+ const TQStringList& syntax() { return m_syntax; }
+ const TQStringList& related() { return m_related; }
+ const TQStringList& helpText() const { return m_help; }
+ TQString name() const { return m_name; }
ParameterType type() const { return m_type; }
int params() const { return m_params.count(); }
FunctionParameter& param( int i ) { return m_params[ i ]; }
- void setGroup( const QString& g ) { m_group = g; }
- QString group() const { return m_group; }
+ void setGroup( const TQString& g ) { m_group = g; }
+ TQString group() const { return m_group; }
- QString toQML() const;
+ TQString toTQML() const;
private:
- QString m_group;
- QStringList m_examples;
- QStringList m_syntax;
- QStringList m_related;
- QStringList m_help;
- QString m_name;
+ TQString m_group;
+ TQStringList m_examples;
+ TQStringList m_syntax;
+ TQStringList m_related;
+ TQStringList m_help;
+ TQString m_name;
ParameterType m_type;
- QValueList<FunctionParameter> m_params;
+ TQValueList<FunctionParameter> m_params;
};
class FunctionRepository
@@ -138,14 +138,14 @@ public:
void add (Function *function);
- Function *function (const QString& name);
+ Function *function (const TQString& name);
- FunctionDescription *functionInfo (const QString& name);
+ FunctionDescription *functionInfo (const TQString& name);
/** return functions within a group, or all if no group given */
- QStringList functionNames (const QString& group = QString::null);
+ TQStringList functionNames (const TQString& group = TQString());
- const QStringList &groups () const { return m_groups; }
+ const TQStringList &groups () const { return m_groups; }
private:
@@ -155,9 +155,9 @@ private:
static FunctionRepository* s_self;
/** loads function descriptions from a XML file */
- void loadFile (const QString& filename);
+ void loadFile (const TQString& filename);
- QStringList m_groups;
+ TQStringList m_groups;
// no copy or assign
FunctionRepository( const FunctionRepository& );
diff --git a/kspread/ksploadinginfo.h b/kspread/ksploadinginfo.h
index 72b64d7c..0c5aed03 100644
--- a/kspread/ksploadinginfo.h
+++ b/kspread/ksploadinginfo.h
@@ -20,8 +20,8 @@
#ifndef KSPLOADINGINFO_H
#define KSPLOADINGINFO_H
-#include <qpoint.h>
-#include <qstringlist.h>
+#include <tqpoint.h>
+#include <tqstringlist.h>
#include <KoPoint.h>
@@ -35,25 +35,25 @@ class KSPLoadingInfo
public:
KSPLoadingInfo() { m_loadTemplate = false;}
~KSPLoadingInfo() {}
- void addWordInAreaList( const QString & word) { m_areaNamed.append( word ); }
- bool findWordInAreaList(const QString & word) const { return (m_areaNamed.find( word ) != m_areaNamed.end());}
- void appendValidation( const QString &name, const QDomElement &element){ m_validationList.insert( name, element);}
- QDomElement validation( const QString &name) { return m_validationList[name];}
+ void addWordInAreaList( const TQString & word) { m_areaNamed.append( word ); }
+ bool findWordInAreaList(const TQString & word) const { return (m_areaNamed.tqfind( word ) != m_areaNamed.end());}
+ void appendValidation( const TQString &name, const TQDomElement &element){ m_validationList.insert( name, element);}
+ TQDomElement validation( const TQString &name) { return m_validationList[name];}
/**
* @return the cursor positions
*/
- const QMap<Sheet*, QPoint>& cursorPositions() const { return m_cursorPositions; }
+ const TQMap<Sheet*, TQPoint>& cursorPositions() const { return m_cursorPositions; }
/**
* Stores the cursor position @p point for @p sheet .
*/
- void setCursorPosition( Sheet* sheet, const QPoint& point ) { m_cursorPositions.insert( sheet, point );}
+ void setCursorPosition( Sheet* sheet, const TQPoint& point ) { m_cursorPositions.insert( sheet, point );}
/**
* @return scrolling offsets
*/
- const QMap<Sheet*, KoPoint>& scrollingOffsets() const { return m_scrollingOffsets; }
+ const TQMap<Sheet*, KoPoint>& scrollingOffsets() const { return m_scrollingOffsets; }
/**
* Stores the scrolling offset @p point for @p sheet .
@@ -68,10 +68,10 @@ public:
}
private:
- QStringList m_areaNamed;
- QMap<QString,QDomElement> m_validationList;
- QMap<Sheet*, QPoint> m_cursorPositions;
- QMap<Sheet*, KoPoint> m_scrollingOffsets;
+ TQStringList m_areaNamed;
+ TQMap<TQString,TQDomElement> m_validationList;
+ TQMap<Sheet*, TQPoint> m_cursorPositions;
+ TQMap<Sheet*, KoPoint> m_scrollingOffsets;
bool m_loadTemplate;
};
diff --git a/kspread/kspread_autofill.cc b/kspread/kspread_autofill.cc
index c5e0084f..8a84e904 100644
--- a/kspread/kspread_autofill.cc
+++ b/kspread/kspread_autofill.cc
@@ -30,7 +30,7 @@
#include <math.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -45,11 +45,11 @@
using namespace KSpread;
-QStringList *AutoFillSequenceItem::month = 0L;
-QStringList *AutoFillSequenceItem::shortMonth = 0L;
-QStringList *AutoFillSequenceItem::day = 0L;
-QStringList *AutoFillSequenceItem::shortDay = 0L;
-QStringList *AutoFillSequenceItem::other = 0L;
+TQStringList *AutoFillSequenceItem::month = 0L;
+TQStringList *AutoFillSequenceItem::shortMonth = 0L;
+TQStringList *AutoFillSequenceItem::day = 0L;
+TQStringList *AutoFillSequenceItem::shortDay = 0L;
+TQStringList *AutoFillSequenceItem::other = 0L;
/**********************************************************************************
*
* AutoFillDeltaSequence
@@ -66,7 +66,7 @@ AutoFillDeltaSequence::AutoFillDeltaSequence( AutoFillSequence *_first, AutoFill
return;
}
- m_sequence = new QMemArray<double> ( _first->count() );
+ m_sequence = new TQMemArray<double> ( _first->count() );
AutoFillSequenceItem *item = _first->getFirst();
AutoFillSequenceItem *item2 = _next->getFirst();
@@ -135,14 +135,14 @@ AutoFillSequenceItem::AutoFillSequenceItem( double _d )
m_Type = FLOAT;
}
-AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
+AutoFillSequenceItem::AutoFillSequenceItem( const TQString &_str )
{
m_String = _str;
m_Type = STRING;
if ( month == 0L )
{
- month = new QStringList();
+ month = new TQStringList();
month->append( i18n("January") );
month->append( i18n("February") );
month->append( i18n("March") );
@@ -159,7 +159,7 @@ AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
if ( shortMonth == 0L )
{
- shortMonth = new QStringList();
+ shortMonth = new TQStringList();
shortMonth->append( i18n("Jan") );
shortMonth->append( i18n("Feb") );
shortMonth->append( i18n("Mar") );
@@ -176,7 +176,7 @@ AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
if ( day == 0L )
{
- day = new QStringList();
+ day = new TQStringList();
day->append( i18n("Monday") );
day->append( i18n("Tuesday") );
day->append( i18n("Wednesday") );
@@ -188,7 +188,7 @@ AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
if ( shortDay == 0L )
{
- shortDay = new QStringList();
+ shortDay = new TQStringList();
shortDay->append( i18n("Mon") );
shortDay->append( i18n("Tue") );
shortDay->append( i18n("Wed") );
@@ -200,44 +200,44 @@ AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
if( other==0L)
{
- // other=new QStringList();
+ // other=new TQStringList();
KConfig *config = Factory::global()->config();
config->setGroup( "Parameters" );
- other=new QStringList(config->readListEntry("Other list"));
+ other=new TQStringList(config->readListEntry("Other list"));
}
- if ( month->find( _str ) != month->end() )
+ if ( month->tqfind( _str ) != month->end() )
{
m_Type = MONTH;
return;
}
- if ( shortMonth->find( _str ) != shortMonth->end() )
+ if ( shortMonth->tqfind( _str ) != shortMonth->end() )
{
m_Type = SHORTMONTH;
return;
}
- if ( day->find( _str ) != day->end() )
+ if ( day->tqfind( _str ) != day->end() )
{
m_Type = DAY;
return;
}
- if ( shortDay->find( _str ) != shortDay->end() )
+ if ( shortDay->tqfind( _str ) != shortDay->end() )
{
m_Type = SHORTDAY;
return;
}
- if( other->find(_str)!=other->end())
+ if( other->tqfind(_str)!=other->end())
{
m_Type = OTHER;
m_OtherBegin=0;
m_OtherEnd=other->count();
- int index= other->findIndex(_str);
+ int index= other->tqfindIndex(_str);
//find end and begin of qstringlist of other.
- for ( QStringList::Iterator it = other->find(_str); it != other->end();++it )
+ for ( TQStringList::Iterator it = other->tqfind(_str); it != other->end();++it )
{
if((*it)=="\\")
{
@@ -246,8 +246,8 @@ AutoFillSequenceItem::AutoFillSequenceItem( const QString &_str )
}
index++;
}
- index= other->findIndex(_str);
- for ( QStringList::Iterator it = other->find(_str); it != other->begin();--it )
+ index= other->tqfindIndex(_str);
+ for ( TQStringList::Iterator it = other->tqfind(_str); it != other->begin();--it )
{
if((*it)=="\\")
{
@@ -286,8 +286,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
return false;
case MONTH:
{
- int i = month->findIndex( m_String );
- int j = month->findIndex( seq->getString() );
+ int i = month->tqfindIndex( m_String );
+ int j = month->tqfindIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -299,8 +299,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case SHORTMONTH:
{
- int i = shortMonth->findIndex( m_String );
- int j = shortMonth->findIndex( seq->getString() );
+ int i = shortMonth->tqfindIndex( m_String );
+ int j = shortMonth->tqfindIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -312,8 +312,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case DAY:
{
- int i = day->findIndex( m_String );
- int j = day->findIndex( seq->getString() );
+ int i = day->tqfindIndex( m_String );
+ int j = day->tqfindIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -326,8 +326,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
case SHORTDAY:
{
- int i = shortDay->findIndex( m_String );
- int j = shortDay->findIndex( seq->getString() );
+ int i = shortDay->tqfindIndex( m_String );
+ int j = shortDay->tqfindIndex( seq->getString() );
int k = j;
if ( j + 1 == i )
@@ -340,8 +340,8 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
{
if( m_OtherEnd!= seq->getIOtherEnd() || m_OtherBegin!= seq->getIOtherBegin())
return false;
- int i = other->findIndex( m_String );
- int j = other->findIndex( seq->getString() );
+ int i = other->tqfindIndex( m_String );
+ int j = other->tqfindIndex( seq->getString() );
int k = j;
if ( j < i )
k += (m_OtherEnd - m_OtherBegin - 1);
@@ -356,9 +356,9 @@ bool AutoFillSequenceItem::getDelta( AutoFillSequenceItem *seq, double &_delta )
}
}
-QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
+TQString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
{
- QString erg;
+ TQString erg;
switch( m_Type )
{
case INTEGER:
@@ -373,7 +373,7 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case MONTH:
{
- int i = month->findIndex( m_String );
+ int i = month->tqfindIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += month->count();
@@ -383,7 +383,7 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case SHORTMONTH:
{
- int i = shortMonth->findIndex( m_String );
+ int i = shortMonth->tqfindIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += shortMonth->count();
@@ -393,7 +393,7 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case DAY:
{
- int i = day->findIndex( m_String );
+ int i = day->tqfindIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += day->count();
@@ -403,7 +403,7 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case SHORTDAY:
{
- int i = shortDay->findIndex( m_String );
+ int i = shortDay->tqfindIndex( m_String );
int j = i + _no * (int) _delta;
while (j < 0)
j += shortDay->count();
@@ -413,7 +413,7 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
case OTHER:
{
- int i = other->findIndex( m_String )-(m_OtherBegin+1);
+ int i = other->tqfindIndex( m_String )-(m_OtherBegin+1);
int j = i + _no * (int) _delta;
int k = j % (m_OtherEnd - m_OtherBegin-1);
erg = (*other->at( (k+m_OtherBegin+1) ));
@@ -424,12 +424,12 @@ QString AutoFillSequenceItem::getSuccessor( int _no, double _delta )
break;
}
- return QString( erg );
+ return TQString( erg );
}
-QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
+TQString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
{
- QString erg;
+ TQString erg;
switch( m_Type )
{
case INTEGER:
@@ -444,7 +444,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case MONTH:
{
- int i = month->findIndex( m_String );
+ int i = month->tqfindIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += month->count();
@@ -454,7 +454,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case SHORTMONTH:
{
- int i = shortMonth->findIndex( m_String );
+ int i = shortMonth->tqfindIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += shortMonth->count();
@@ -464,7 +464,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case DAY:
{
- int i = day->findIndex( m_String );
+ int i = day->tqfindIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += day->count();
@@ -474,7 +474,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case SHORTDAY:
{
- int i = shortDay->findIndex( m_String );
+ int i = shortDay->tqfindIndex( m_String );
int j = i - _no * (int) _delta;
while ( j < 0 )
j += shortDay->count();
@@ -484,7 +484,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
case OTHER:
{
- int i = other->findIndex( m_String ) - (m_OtherBegin + 1);
+ int i = other->tqfindIndex( m_String ) - (m_OtherBegin + 1);
int j = i - _no * (int) _delta;
while ( j < 0 )
j += (m_OtherEnd - m_OtherBegin - 1);
@@ -497,7 +497,7 @@ QString AutoFillSequenceItem::getPredecessor( int _no, double _delta )
break;
}
- return QString( erg );
+ return TQString( erg );
}
/**********************************************************************************
@@ -512,7 +512,7 @@ AutoFillSequence::AutoFillSequence( Cell *_cell )
if ( _cell->isFormula() )
{
- QString d = _cell->encodeFormula();
+ TQString d = _cell->encodeFormula();
sequence.append( new AutoFillSequenceItem( d ) );
}
else if ( _cell->value().isNumber() )
@@ -542,12 +542,12 @@ bool AutoFillSequence::matches( AutoFillSequence* _seq, AutoFillDeltaSequence *_
void AutoFillSequence::fillCell( Cell *src, Cell *dest, AutoFillDeltaSequence *delta, int _block, bool down )
{
- QString erg = "";
+ TQString erg = "";
// Special handling for formulas
if ( sequence.first() != 0L && sequence.first()->getType() == AutoFillSequenceItem::FORMULA )
{
- QString f = dest->decodeFormula( sequence.first()->getString() );
+ TQString f = dest->decodeFormula( sequence.first()->getString() );
dest->setCellText( f );
dest->copyFormat( src );
return;
@@ -576,7 +576,7 @@ void AutoFillSequence::fillCell( Cell *src, Cell *dest, AutoFillDeltaSequence *d
*
**********************************************************************************/
-void Sheet::autofill( QRect &src, QRect &dest )
+void Sheet::autofill( TQRect &src, TQRect &dest )
{
if (src == dest)
{
@@ -603,13 +603,13 @@ void Sheet::autofill( QRect &src, QRect &dest )
for ( int y = src.top(); y <= src.bottom(); y++ )
{
int x;
- QPtrList<Cell> destList;
+ TQPtrList<Cell> destList;
for ( x = src.right() + 1; x <= dest.right(); x++ )
destList.append( nonDefaultCell( x, y ) );
- QPtrList<Cell> srcList;
+ TQPtrList<Cell> srcList;
for ( x = src.left(); x <= src.right(); x++ )
srcList.append( cellAt( x, y ) );
- QPtrList<AutoFillSequence> seqList;
+ TQPtrList<AutoFillSequence> seqList;
seqList.setAutoDelete( true );
for ( x = src.left(); x <= src.right(); x++ )
seqList.append( new AutoFillSequence( cellAt( x, y ) ) );
@@ -623,15 +623,15 @@ void Sheet::autofill( QRect &src, QRect &dest )
for ( int x = src.left(); x <= dest.right(); x++ )
{
int y;
- QPtrList<Cell> destList;
+ TQPtrList<Cell> destList;
for ( y = src.bottom() + 1; y <= dest.bottom(); y++ )
destList.append( nonDefaultCell( x, y ) );
- QPtrList<Cell> srcList;
+ TQPtrList<Cell> srcList;
for ( y = src.top(); y <= src.bottom(); y++ )
{
srcList.append( cellAt( x, y ) );
}
- QPtrList<AutoFillSequence> seqList;
+ TQPtrList<AutoFillSequence> seqList;
seqList.setAutoDelete( true );
for ( y = src.top(); y <= src.bottom(); y++ )
seqList.append( new AutoFillSequence( cellAt( x, y ) ) );
@@ -648,18 +648,18 @@ void Sheet::autofill( QRect &src, QRect &dest )
for ( int y = dest.top(); y <= dest.bottom(); y++ )
{
int x;
- QPtrList<Cell> destList;
+ TQPtrList<Cell> destList;
for ( x = dest.left(); x < src.left(); x++ )
{
destList.append( nonDefaultCell( x, y ) );
}
- QPtrList<Cell> srcList;
+ TQPtrList<Cell> srcList;
for ( x = src.left(); x <= src.right(); x++ )
{
srcList.append( cellAt( x, y ) );
}
- QPtrList<AutoFillSequence> seqList;
+ TQPtrList<AutoFillSequence> seqList;
seqList.setAutoDelete( true );
for ( x = src.left(); x <= src.right(); x++ )
seqList.append( new AutoFillSequence( cellAt( x, y ) ) );
@@ -672,20 +672,20 @@ void Sheet::autofill( QRect &src, QRect &dest )
{
if (src.top() != dest.bottom() )
dest.setBottom(dest.bottom() - 1);
- int startVal = QMIN( dest.left(), src.left());
- int endVal = QMAX(src.right(), dest.right());
+ int startVal = TQMIN( dest.left(), src.left());
+ int endVal = TQMAX(src.right(), dest.right());
for ( int x = startVal; x <= endVal; x++ )
{
int y;
- QPtrList<Cell> destList;
+ TQPtrList<Cell> destList;
for ( y = dest.top(); y < src.top(); y++ )
destList.append( nonDefaultCell( x, y ) );
- QPtrList<Cell> srcList;
+ TQPtrList<Cell> srcList;
for ( y = src.top(); y <= src.bottom(); ++y )
{
srcList.append( cellAt( x, y ) );
}
- QPtrList<AutoFillSequence> seqList;
+ TQPtrList<AutoFillSequence> seqList;
seqList.setAutoDelete( true );
for ( y = src.top(); y <= src.bottom(); y++ )
seqList.append( new AutoFillSequence( cellAt( x, y ) ) );
@@ -703,9 +703,9 @@ void Sheet::autofill( QRect &src, QRect &dest )
}
-void Sheet::fillSequence( QPtrList<Cell>& _srcList,
- QPtrList<Cell>& _destList,
- QPtrList<AutoFillSequence>& _seqList,
+void Sheet::fillSequence( TQPtrList<Cell>& _srcList,
+ TQPtrList<Cell>& _destList,
+ TQPtrList<AutoFillSequence>& _seqList,
bool down)
{
doc()->emitBeginOperation(true);
@@ -721,14 +721,14 @@ void Sheet::fillSequence( QPtrList<Cell>& _srcList,
}
-QVariant getDiff( const Value& value1, const Value& value2 , AutoFillSequenceItem::Type type )
+TQVariant getDiff( const Value& value1, const Value& value2 , AutoFillSequenceItem::Type type )
{
if ( type == AutoFillSequenceItem::FLOAT )
- return QVariant( value2.asFloat() - value1.asFloat() );
+ return TQVariant( value2.asFloat() - value1.asFloat() );
if ( type == AutoFillSequenceItem::TIME || type == AutoFillSequenceItem::DATE )
- return QVariant( (int)( value2.asInteger() - value1.asInteger() ) );
+ return TQVariant( (int)( value2.asInteger() - value1.asInteger() ) );
- return QVariant( (int)0 );
+ return TQVariant( (int)0 );
// note: date and time difference can be calculated as
// the difference of the serial number
/* if( (type == AutoFillSequenceItem::FLOAT) ||
@@ -739,15 +739,15 @@ QVariant getDiff( const Value& value1, const Value& value2 , AutoFillSequenceIt
return 0.0;*/
}
-bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
- QPtrList<Cell>& _destList,
- QPtrList<AutoFillSequence>& _seqList,
+bool Sheet::FillSequenceWithInterval(TQPtrList<Cell>& _srcList,
+ TQPtrList<Cell>& _destList,
+ TQPtrList<AutoFillSequence>& _seqList,
bool down)
{
if (_srcList.first()->isFormula())
return false;
- QPtrList<AutoFillDeltaSequence> deltaList;
+ TQPtrList<AutoFillDeltaSequence> deltaList;
deltaList.setAutoDelete( true );
bool ok = false;
@@ -755,8 +755,8 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
{
AutoFillSequenceItem::Type type;
- QValueVector< QVariant > tmp( _seqList.count() ); /*= new QValueList< QVariant > ( _seqList.count() )*/;
- QValueVector< QVariant > diff( _seqList.count() ); /*= new QValueList< QVariant > ( _seqList.count() )*/;
+ TQValueVector< TQVariant > tmp( _seqList.count() ); /*= new TQValueList< TQVariant > ( _seqList.count() )*/;
+ TQValueVector< TQVariant > diff( _seqList.count() ); /*= new TQValueList< TQVariant > ( _seqList.count() )*/;
int p = -1;
int count = 0;
int tmpcount = 0;
@@ -813,7 +813,7 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
}
}
- QVariant delta = getDiff(cellValue , cell2Value , type );
+ TQVariant delta = getDiff(cellValue , cell2Value , type );
if (count < 1)
{
@@ -856,7 +856,7 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
// we have found something:
if (count > 0 && (tmpcount > 0 || count == 1))
{
- QVariant cellValue( (int) 0 );
+ TQVariant cellValue( (int) 0 );
Cell * dest;
Cell * src;
@@ -880,7 +880,7 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
else
cellValue = (int)src->value().asInteger();
- QString res;
+ TQString res;
// copy all the data
while (dest)
{
@@ -895,9 +895,9 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
i += count;
}
- QVariant currentDiff = diff.at( i );
+ TQVariant currentDiff = diff.at( i );
- if (cellValue.type() == QVariant::Double)
+ if (cellValue.type() == TQVariant::Double)
if (down)
cellValue = cellValue.asDouble() + currentDiff.asDouble();
else
@@ -1075,8 +1075,8 @@ bool Sheet::FillSequenceWithInterval(QPtrList<Cell>& _srcList,
return ok;
}
-void Sheet::FillSequenceWithCopy(QPtrList<Cell>& _srcList,
- QPtrList<Cell>& _destList,
+void Sheet::FillSequenceWithCopy(TQPtrList<Cell>& _srcList,
+ TQPtrList<Cell>& _destList,
bool down)
{
// We did not find any valid interval. So just copy over the marked
@@ -1115,7 +1115,7 @@ void Sheet::FillSequenceWithCopy(QPtrList<Cell>& _srcList,
{
if ( _srcList.at( s )->isFormula() )
{
- QString d = _srcList.at( s )->encodeFormula();
+ TQString d = _srcList.at( s )->encodeFormula();
cell->setCellText( cell->decodeFormula( d ) );
}
else if(_srcList.at( s )->value().isNumber() && _srcList.count()==1)
@@ -1130,7 +1130,7 @@ void Sheet::FillSequenceWithCopy(QPtrList<Cell>& _srcList,
{
// FIXME this is a workaround to avoid those nasty one minute off
// "dragging down" time is inaccurate overa large lists!
- // This is the best approximation I could find (raphael)
+ // This is the best approximation I could tqfind (raphael)
if (down)
{
// factor = 1.000002/24. + 0.000000001;
@@ -1147,43 +1147,43 @@ void Sheet::FillSequenceWithCopy(QPtrList<Cell>& _srcList,
else
val = (_srcList.at( s )->value().asFloat() + (incr * factor));
- QString tmp;
+ TQString tmp;
tmp = tmp.setNum(val);
cell->setCellText( tmp );
++incr;
}
else if((AutoFillSequenceItem::month != 0L)
- && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != 0L
- && AutoFillSequenceItem::month->find( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end()
+ && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != 0L
+ && AutoFillSequenceItem::month->tqfind( _srcList.at( s )->text()) != AutoFillSequenceItem::month->end()
&& _srcList.count() == 1)
{
- QString strMonth=_srcList.at( s )->text();
- int i = AutoFillSequenceItem::month->findIndex( strMonth )+incr;
+ TQString strMonth=_srcList.at( s )->text();
+ int i = AutoFillSequenceItem::month->tqfindIndex( strMonth )+incr;
int k = (i) % AutoFillSequenceItem::month->count();
cell->setCellText((*AutoFillSequenceItem::month->at( k )));
incr++;
}
else if(AutoFillSequenceItem::day != 0L
- && AutoFillSequenceItem::day->find( _srcList.at( s )->text()) != 0L
- && AutoFillSequenceItem::day->find( _srcList.at( s )->text())
+ && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text()) != 0L
+ && AutoFillSequenceItem::day->tqfind( _srcList.at( s )->text())
!= AutoFillSequenceItem::day->end()
&& _srcList.count()==1)
{
- QString strDay=_srcList.at( s )->text();
- int i = AutoFillSequenceItem::day->findIndex( strDay )+incr;
+ TQString strDay=_srcList.at( s )->text();
+ int i = AutoFillSequenceItem::day->tqfindIndex( strDay )+incr;
int k = (i) % AutoFillSequenceItem::day->count();
cell->setCellText((*AutoFillSequenceItem::day->at( k )));
incr++;
}
else
{
- QRegExp number("(\\d+)");
+ TQRegExp number("(\\d+)");
int pos =number.search(_srcList.at( s )->text());
if( pos!=-1 )
{
- QString tmp=number.cap(1);
+ TQString tmp=number.cap(1);
int num=tmp.toInt()+incr;
- cell->setCellText(_srcList.at( s )->text().replace(number,QString::number(num)));
+ cell->setCellText(_srcList.at( s )->text().tqreplace(number,TQString::number(num)));
++incr;
}
else if ( !_srcList.at( s )->link().isEmpty() )
diff --git a/kspread/kspread_autofill.h b/kspread/kspread_autofill.h
index 088f1751..ac597711 100644
--- a/kspread/kspread_autofill.h
+++ b/kspread/kspread_autofill.h
@@ -26,11 +26,11 @@
#ifndef __kspread_autofill_h__
#define __kspread_autofill_h__
-#include <qdatetime.h>
-#include <qmemarray.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqdatetime.h>
+#include <tqmemarray.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
namespace KSpread
{
@@ -47,31 +47,31 @@ public:
AutoFillSequenceItem( int _i );
AutoFillSequenceItem( double _d );
- AutoFillSequenceItem( const QString &_str );
+ AutoFillSequenceItem( const TQString &_str );
bool getDelta( AutoFillSequenceItem *_seq, double &delta );
- QString getSuccessor( int _no, double _delta );
- QString getPredecessor( int _no, double _delta );
+ TQString getSuccessor( int _no, double _delta );
+ TQString getPredecessor( int _no, double _delta );
Type getType()const { return m_Type; }
int getIValue()const { return m_IValue; }
double getDValue()const { return m_DValue; }
- QString getString()const { return m_String; }
+ TQString getString()const { return m_String; }
int getIOtherEnd()const {return m_OtherEnd; }
int getIOtherBegin()const {return m_OtherBegin; }
- static QStringList *other;
- static QStringList *month;
- static QStringList *day;
- static QStringList *shortMonth;
- static QStringList *shortDay;
+ static TQStringList *other;
+ static TQStringList *month;
+ static TQStringList *day;
+ static TQStringList *shortMonth;
+ static TQStringList *shortDay;
protected:
int m_IValue;
double m_DValue;
int m_OtherBegin;
int m_OtherEnd;
- QString m_String;
+ TQString m_String;
Type m_Type;
};
@@ -91,7 +91,7 @@ public:
void fillCell( Cell *src, Cell *dest, AutoFillDeltaSequence *delta, int _block, bool down = true );
protected:
- QPtrList<AutoFillSequenceItem> sequence;
+ TQPtrList<AutoFillSequenceItem> sequence;
};
class AutoFillDeltaSequence
@@ -104,13 +104,13 @@ public:
bool equals( AutoFillDeltaSequence *_delta );
- QMemArray<double>* getSequence() { return m_sequence; }
+ TQMemArray<double>* getSequence() { return m_sequence; }
double getItemDelta( int _pos );
protected:
bool m_ok;
- QMemArray<double>* m_sequence;
+ TQMemArray<double>* m_sequence;
};
} // namespace KSpread
diff --git a/kspread/kspread_brush.cc b/kspread/kspread_brush.cc
index 5d3aa9c5..3a66549b 100644
--- a/kspread/kspread_brush.cc
+++ b/kspread/kspread_brush.cc
@@ -26,8 +26,8 @@
#include <KoXmlNS.h>
KSpreadBrush::KSpreadBrush()
-: m_gColor1( Qt::red )
-, m_gColor2( Qt::green )
+: m_gColor1( TQt::red )
+, m_gColor2( TQt::green )
, m_gType( BCT_GHORZ )
, m_fillType( FT_BRUSH )
, m_unbalanced( false )
@@ -37,7 +37,7 @@ KSpreadBrush::KSpreadBrush()
}
-KSpreadBrush::KSpreadBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
+KSpreadBrush::KSpreadBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
BCType gType, FillType fillType, bool unbalanced,
int xfactor, int yfactor )
: m_brush( brush )
@@ -72,7 +72,7 @@ void KSpreadBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles&
{
case FT_BRUSH:
{
- if( m_brush.style() != Qt::NoBrush )
+ if( m_brush.style() != TQt::NoBrush )
{
KoOasisStyles::saveOasisFillStyle( styleObjectAuto, mainStyles, m_brush );
}
@@ -92,19 +92,19 @@ void KSpreadBrush::saveOasisFillStyle( KoGenStyle &styleObjectAuto, KoGenStyles&
}
-/*QString KSpreadBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const
+/*TQString KSpreadBrush::saveOasisGradientStyle( KoGenStyles& mainStyles ) const
{
KoGenStyle gradientStyle( KPrDocument::STYLE_GRADIENT no family name);
gradientStyle.addAttribute( "draw:start-color", m_gColor1.name() );
gradientStyle.addAttribute( "draw:end-color", m_gColor2.name() );
- QString unbalancedx( "50%" );
- QString unbalancedy( "50%" );
+ TQString unbalancedx( "50%" );
+ TQString unbalancedy( "50%" );
if ( m_unbalanced )
{
- unbalancedx = QString( "%1%" ).arg( m_xfactor / 4 + 50 );
- unbalancedy = QString( "%1%" ).arg( m_yfactor / 4 + 50 );
+ unbalancedx = TQString( "%1%" ).tqarg( m_xfactor / 4 + 50 );
+ unbalancedy = TQString( "%1%" ).tqarg( m_yfactor / 4 + 50 );
}
gradientStyle.addAttribute( "draw:cx", unbalancedx );
gradientStyle.addAttribute( "draw:cy", unbalancedy );
@@ -160,7 +160,7 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
{
- const QString fill = styleStack.attributeNS( KoXmlNS::draw, "fill" );
+ const TQString fill = styleStack.attributeNS( KoXmlNS::draw, "fill" );
kdDebug(33001) << " load object gradient fill type :" << fill << endl;
if ( fill == "solid" || fill == "hatch" )
@@ -169,19 +169,19 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro
}
else if ( fill == "gradient" )
{
- QString style = styleStack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
- QDomElement* draw = context.oasisStyles().drawStyles()[style];
+ TQString style = styleStack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
+ TQDomElement* draw = context.oasisStyles().drawStyles()[style];
if ( draw )
{
- setGColor1( draw->attributeNS( KoXmlNS::draw, "start-color", QString::null ) );
- setGColor2( draw->attributeNS( KoXmlNS::draw, "end-color", QString::null ) );
+ setGColor1( draw->attributeNS( KoXmlNS::draw, "start-color", TQString() ) );
+ setGColor2( draw->attributeNS( KoXmlNS::draw, "end-color", TQString() ) );
- QString type = draw->attributeNS( KoXmlNS::draw, "style", QString::null );
+ TQString type = draw->attributeNS( KoXmlNS::draw, "style", TQString() );
kdDebug()<<" type :"<<type<<endl;
if ( type == "linear" )
{
- int angle = draw->attributeNS( KoXmlNS::draw, "angle", QString::null ).toInt() / 10;
+ int angle = draw->attributeNS( KoXmlNS::draw, "angle", TQString() ).toInt() / 10;
// make sure the angle is between 0 and 359
angle = abs( angle );
@@ -223,12 +223,12 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro
// and (un-)balanced settings of kpresenter. Let's try it.
int x, y;
if ( draw->hasAttributeNS( KoXmlNS::draw, "cx" ) )
- x = draw->attributeNS( KoXmlNS::draw, "cx", QString::null ).remove( '%' ).toInt();
+ x = draw->attributeNS( KoXmlNS::draw, "cx", TQString() ).remove( '%' ).toInt();
else
x = 50;
if ( draw->hasAttributeNS( KoXmlNS::draw, "cy" ) )
- y = draw->attributeNS( KoXmlNS::draw, "cy", QString::null ).remove( '%' ).toInt();
+ y = draw->attributeNS( KoXmlNS::draw, "cy", TQString() ).remove( '%' ).toInt();
else
y = 50;
@@ -250,8 +250,8 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro
// We have to set a brush with brushstyle != no background fill
// otherwise the properties dialog for the object won't
// display the preview for the gradient.
- QBrush tmpBrush;
- tmpBrush.setStyle( static_cast<Qt::BrushStyle>( 1 ) );
+ TQBrush tmpBrush;
+ tmpBrush.setStyle( static_cast<TQt::BrushStyle>( 1 ) );
setBrush( tmpBrush );
setFillType( FT_GRADIENT );
}
@@ -264,7 +264,7 @@ void KSpreadBrush::loadOasisFillStyle( KoOasisContext &context, const char * pro
//todo
//not implementer in kpresenter...
//the drawing object is filled with the bitmap specified by the draw:fill-image-name attribute.
- //QBrush implement setPixmap
+ //TQBrush implement setPixmap
//easy just add pixmap and store it.
}
}
diff --git a/kspread/kspread_brush.h b/kspread/kspread_brush.h
index 436ae612..ebb0c5f6 100644
--- a/kspread/kspread_brush.h
+++ b/kspread/kspread_brush.h
@@ -21,30 +21,30 @@
#ifndef KSPREADBRUSH_H
#define KSPREADBRUSH_H
-#include <qbrush.h>
+#include <tqbrush.h>
#include "kspread_global.h"
class KoGenStyle;
class KoGenStyles;
class KoOasisContext;
-class QDomElement;
+class TQDomElement;
class KSpreadBrush
{
public:
KSpreadBrush();
- KSpreadBrush( const QBrush &brush, const QColor &gColor1, const QColor &gColor2,
+ KSpreadBrush( const TQBrush &brush, const TQColor &gColor1, const TQColor &gColor2,
BCType gType, FillType fillType, bool unbalanced,
int xfactor, int yfactor );
KSpreadBrush &operator=( const KSpreadBrush &brush );
- void setBrush( const QBrush &brush )
+ void setBrush( const TQBrush &brush )
{ m_brush = brush; }
- void setGColor1( const QColor &gColor1 )
+ void setGColor1( const TQColor &gColor1 )
{ m_gColor1 = gColor1; }
- void setGColor2( const QColor &gColor2 )
+ void setGColor2( const TQColor &gColor2 )
{ m_gColor2 = gColor2; }
void setGType( BCType gType )
{ m_gType = gType; }
@@ -57,11 +57,11 @@ public:
void setGYFactor( int yfactor )
{ m_yfactor = yfactor; }
- QBrush getBrush() const
+ TQBrush getBrush() const
{ return m_brush; }
- QColor getGColor1() const
+ TQColor getGColor1() const
{ return m_gColor1; }
- QColor getGColor2() const
+ TQColor getGColor2() const
{ return m_gColor2; }
BCType getGType() const
{ return m_gType; }
@@ -78,10 +78,10 @@ public:
void loadOasisFillStyle( KoOasisContext &context, const char * propertyType );
private:
- //QString saveOasisGradientStyle( KoGenStyles& mainStyles ) const;
- QBrush m_brush;
- QColor m_gColor1;
- QColor m_gColor2;
+ //TQString saveOasisGradientStyle( KoGenStyles& mainStyles ) const;
+ TQBrush m_brush;
+ TQColor m_gColor1;
+ TQColor m_gColor2;
BCType m_gType;
FillType m_fillType;
bool m_unbalanced;
diff --git a/kspread/kspread_canvas.cc b/kspread/kspread_canvas.cc
index 0f0971c5..d3cd8199 100644
--- a/kspread/kspread_canvas.cc
+++ b/kspread/kspread_canvas.cc
@@ -45,16 +45,16 @@
#include <float.h>
#include <stdlib.h>
-#include <qapplication.h>
-#include <qbuffer.h>
-#include <qclipboard.h>
-#include <qdrawutil.h>
-#include <qlabel.h>
-#include <qpoint.h>
-#include <qscrollbar.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qwidgetlist.h>
+#include <tqapplication.h>
+#include <tqbuffer.h>
+#include <tqclipboard.h>
+#include <tqdrawutil.h>
+#include <tqlabel.h>
+#include <tqpoint.h>
+#include <tqscrollbar.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqwidgetlist.h>
#include <kcursor.h>
#include <kdebug.h>
@@ -103,7 +103,7 @@ class Canvas::Private
KSpread::CellEditor *cellEditor;
View *view;
- QTimer* scrollTimer;
+ TQTimer* scrollTimer;
// Non visible range left from current screen
// Example: If the first visible column is 'E', then xOffset stores
@@ -117,12 +117,12 @@ class Canvas::Private
// Used to draw the grey grid that is usually only visible on the
// screen, but not by printing on paper.
- QPen defaultGridPen;
+ TQPen defaultGridPen;
// see setLastEditorWithFocus, lastEditorWithFocus
Canvas::EditorType focusEditorType;
- QLabel *validationInfo;
+ TQLabel *validationInfo;
// true if the user is to choose a cell.
bool chooseCell;
@@ -141,19 +141,19 @@ class Canvas::Private
// If we use the lower right corner of the marker to start autofilling, then this
// rectangle conatins all cells that were already marker when the user started
// to mark the rectangle which he wants to become autofilled.
- QRect autoFillSource;
+ TQRect autoFillSource;
// Start coordinates for drag and drop
- QPoint dragStart;
+ TQPoint dragStart;
bool dragging;
// Used to indicate whether the user started drawing a rubber band rectangle
bool rubberBandStarted;
- QPoint rubberBandStart;
- QPoint rubberBandEnd;
+ TQPoint rubberBandStart;
+ TQPoint rubberBandEnd;
// If the mouse is over some anchor ( in the sense of HTML anchors )
- QString anchor;
+ TQString anchor;
bool mouseSelectedObject;
bool drawContour;
@@ -161,7 +161,7 @@ class Canvas::Private
/**
* Saves the last mouse position during mouse move events.
*/
- QPoint m_savedMousePos;
+ TQPoint m_savedMousePos;
//---- stuff needed for resizing ----
/// object which gets resized
@@ -205,7 +205,7 @@ class Canvas::Private
****************************************************************/
Canvas::Canvas (View *_view)
- : QWidget( _view, "", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase )
+ : TQWidget( _view, "", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase )
{
d = new Private;
@@ -213,15 +213,15 @@ Canvas::Canvas (View *_view)
d->chooseCell = false;
d->validationInfo = 0L;
- QWidget::setFocusPolicy( QWidget::StrongFocus );
+ TQWidget::setFocusPolicy( TQ_StrongFocus );
- d->dragStart = QPoint( -1, -1 );
+ d->dragStart = TQPoint( -1, -1 );
d->dragging = false;
d->defaultGridPen.setColor( lightGray );
d->defaultGridPen.setWidth( 1 );
- d->defaultGridPen.setStyle( SolidLine );
+ d->defaultGridPen.setStyle( Qt::SolidLine );
d->xOffset = 0.0;
d->yOffset = 0.0;
@@ -256,17 +256,17 @@ Canvas::Canvas (View *_view)
d->prevSpokenRow = -1;
d->prevSpokenCol = -1;
- d->scrollTimer = new QTimer( this );
- connect (d->scrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) );
+ d->scrollTimer = new TQTimer( this );
+ connect (d->scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( doAutoScroll() ) );
if( d->view)
{
- connect( d->view, SIGNAL( autoScroll( const QPoint & )), this, SLOT( slotAutoScroll( const QPoint &)));
+ connect( d->view, TQT_SIGNAL( autoScroll( const TQPoint & )), this, TQT_SLOT( slotAutoScroll( const TQPoint &)));
}
if (kospeaker)
{
- connect (kospeaker, SIGNAL(customSpeakWidget(QWidget*, const QPoint&, uint)),
- this, SLOT(speakCell(QWidget*, const QPoint&, uint)));
+ connect (kospeaker, TQT_SIGNAL(customSpeakWidget(TQWidget*, const TQPoint&, uint)),
+ this, TQT_SLOT(speakCell(TQWidget*, const TQPoint&, uint)));
}
setFocus();
@@ -275,7 +275,7 @@ Canvas::Canvas (View *_view)
setAcceptDrops( true );
setInputMethodEnabled( true ); // ensure using the InputMethod
- setWFlags(Qt::WNoAutoErase);
+ setWFlags(TQt::WNoAutoErase);
}
Canvas::~Canvas()
@@ -330,7 +330,7 @@ void Canvas::setYOffset( double _yOffset )
d->yOffset = _yOffset;
}
-const QPen& Canvas::defaultGridPen() const
+const TQPen& Canvas::defaultGridPen() const
{
return d->defaultGridPen;
}
@@ -346,7 +346,7 @@ Canvas::EditorType Canvas::lastEditorWithFocus() const
}
-bool Canvas::eventFilter( QObject *o, QEvent *e )
+bool Canvas::eventFilter( TQObject *o, TQEvent *e )
{
/* this canvas event filter acts on events sent to the line edit as well
as events to this filter itself.
@@ -355,9 +355,9 @@ bool Canvas::eventFilter( QObject *o, QEvent *e )
return true;
switch ( e->type() )
{
- case QEvent::KeyPress:
+ case TQEvent::KeyPress:
{
- QKeyEvent * keyev = static_cast<QKeyEvent *>(e);
+ TQKeyEvent * keyev = TQT_TQKEYEVENT(e);
if ((keyev->key()==Key_Tab) || (keyev->key()==Key_Backtab))
{
keyPressEvent ( keyev );
@@ -365,11 +365,11 @@ bool Canvas::eventFilter( QObject *o, QEvent *e )
}
break;
}
- case QEvent::IMStart:
- case QEvent::IMCompose:
- case QEvent::IMEnd:
+ case TQEvent::IMStart:
+ case TQEvent::IMCompose:
+ case TQEvent::IMEnd:
{
- QIMEvent * imev = static_cast<QIMEvent *>(e);
+ TQIMEvent * imev = static_cast<TQIMEvent *>(e);
processIMEvent( imev );
break;
}
@@ -394,12 +394,12 @@ Selection* Canvas::choice() const
return d->view->choice();
}
-QRect Canvas::selection() const
+TQRect Canvas::selection() const
{
return d->view->selectionInfo()->selection();
}
-QPoint Canvas::marker() const
+TQPoint Canvas::marker() const
{
return d->view->selectionInfo()->marker();
}
@@ -441,7 +441,7 @@ void Canvas::startChoose()
d->chooseCell = true;
}
-void Canvas::startChoose( const QRect& rect )
+void Canvas::startChoose( const TQRect& rect )
{
if (d->chooseCell)
return;
@@ -486,17 +486,17 @@ VBorder* Canvas::vBorderWidget() const
return d->view->vBorderWidget();
}
-QScrollBar* Canvas::horzScrollBar() const
+TQScrollBar* Canvas::horzScrollBar() const
{
return d->view->horzScrollBar();
}
-QScrollBar* Canvas::vertScrollBar() const
+TQScrollBar* Canvas::vertScrollBar() const
{
return d->view->vertScrollBar();
}
-Sheet* Canvas::findSheet( const QString& _name ) const
+Sheet* Canvas::findSheet( const TQString& _name ) const
{
return d->view->doc()->map()->findSheet( _name );
}
@@ -521,13 +521,13 @@ void Canvas::validateSelection()
Cell * cell = sheet->cellAt( col,row );
if ( cell && cell->getValidity(0) && cell->getValidity()->displayValidationInformation)
{
- QString title = cell->getValidity(0)->titleInfo;
- QString message = cell->getValidity(0)->messageInfo;
+ TQString title = cell->getValidity(0)->titleInfo;
+ TQString message = cell->getValidity(0)->messageInfo;
if ( title.isEmpty() && message.isEmpty() )
return;
if ( !d->validationInfo )
- d->validationInfo = new QLabel( this );
+ d->validationInfo = new TQLabel( this );
kdDebug()<<" display info validation\n";
double u = cell->dblWidth( col );
double v = cell->dblHeight( row );
@@ -547,12 +547,12 @@ void Canvas::validateSelection()
ypos = sheet->dblRowPos( moveY );
}
//d->validationInfo->setGeometry( 3, y + 3, len + 2, hei + 2 );
- d->validationInfo->setAlignment( Qt::AlignVCenter );
- QPainter painter;
+ d->validationInfo->tqsetAlignment( TQt::AlignVCenter );
+ TQPainter painter;
painter.begin( this );
int len = 0;
int hei = 0;
- QString resultText;
+ TQString resultText;
if ( !title.isEmpty() )
{
len = painter.fontMetrics().width( title );
@@ -563,10 +563,10 @@ void Canvas::validateSelection()
{
int i = 0;
int pos = 0;
- QString t;
+ TQString t;
do
{
- i = message.find( "\n", pos );
+ i = message.tqfind( "\n", pos );
if ( i == -1 )
t = message.mid( pos, message.length() - pos );
else
@@ -575,7 +575,7 @@ void Canvas::validateSelection()
pos = i + 1;
}
hei += painter.fontMetrics().height();
- len = QMAX( len, painter.fontMetrics().width( t ) );
+ len = TQMAX( len, painter.fontMetrics().width( t ) );
}
while ( i != -1 );
resultText += message;
@@ -587,7 +587,7 @@ void Canvas::validateSelection()
ypos - yOffset()+v,
len,
hei );
- QRect marker( d->view->doc()->zoomRect( unzoomedMarker ) );
+ TQRect marker( d->view->doc()->zoomRect( unzoomedMarker ) );
d->validationInfo->setGeometry( marker );
d->validationInfo->show();
@@ -606,7 +606,7 @@ void Canvas::validateSelection()
}
-void Canvas::scrollToCell(QPoint location) const
+void Canvas::scrollToCell(TQPoint location) const
{
Sheet* sheet = activeSheet();
if (sheet == NULL)
@@ -635,7 +635,7 @@ void Canvas::scrollToCell(QPoint location) const
// xpos is the position of the cell in the current window in unzoomed
// document coordinates.
double xpos;
- if ( sheet->layoutDirection()==Sheet::LeftToRight )
+ if ( sheet->tqlayoutDirection()==Sheet::LeftToRight )
xpos = sheet->dblColumnPos( location.x() ) - xOffset();
else
xpos = unzoomedWidth - sheet->dblColumnPos( location.x() ) + xOffset();
@@ -648,7 +648,7 @@ void Canvas::scrollToCell(QPoint location) const
//kdDebug(36001) << "Canvas::scrollToCell : height=" << height() << endl;
//kdDebug(36001) << "Canvas::scrollToCell : width=" << width() << endl;
- if ( sheet->layoutDirection()==Sheet::RightToLeft ) {
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft ) {
// Right to left sheet.
double minX = unzoomedWidth - 100.0; // less than that, we scroll
@@ -730,7 +730,7 @@ void Canvas::slotScrollHorz( int _value )
kdDebug(36001) << "slotScrollHorz: value = " << _value << endl;
//kdDebug(36001) << kdBacktrace() << endl;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
_value = horzScrollBar()->maxValue() - _value;
double unzoomedValue = d->view->doc()->unzoomItX( _value );
@@ -745,7 +745,7 @@ void Canvas::slotScrollHorz( int _value )
unzoomedValue = 0.0;
}
- double xpos = sheet->dblColumnPos( QMIN( KS_colMax, d->view->activeSheet()->maxColumn()+10 ) ) - d->xOffset;
+ double xpos = sheet->dblColumnPos( TQMIN( KS_colMax, d->view->activeSheet()->maxColumn()+10 ) ) - d->xOffset;
if ( unzoomedValue > ( xpos + d->xOffset ) )
unzoomedValue = xpos + d->xOffset;
@@ -756,7 +756,7 @@ void Canvas::slotScrollHorz( int _value )
/* what cells will need painted now? */
- QRect area = visibleCells();
+ TQRect area = visibleCells();
double tmp;
if (dx > 0)
{
@@ -778,7 +778,7 @@ void Canvas::slotScrollHorz( int _value )
kdDebug(36001) << "slotScrollHorz(): XOffset after setting: "
<< d->xOffset << endl;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
dx = -dx;
scroll( dx, 0 );
@@ -805,7 +805,7 @@ void Canvas::slotScrollVert( int _value )
unzoomedValue << ")" << endl;
}
- double ypos = activeSheet()->dblRowPos( QMIN( KS_rowMax, d->view->activeSheet()->maxRow()+10 ) );
+ double ypos = activeSheet()->dblRowPos( TQMIN( KS_rowMax, d->view->activeSheet()->maxRow()+10 ) );
if ( unzoomedValue > ypos )
unzoomedValue = ypos;
@@ -816,7 +816,7 @@ void Canvas::slotScrollVert( int _value )
/* what cells will need painted now? */
- QRect area = visibleCells();
+ TQRect area = visibleCells();
double tmp;
if (dy > 0)
{
@@ -845,7 +845,7 @@ void Canvas::slotScrollVert( int _value )
void Canvas::slotMaxColumn( int _max_column )
{
int oldValue = horzScrollBar()->maxValue() - horzScrollBar()->value();
- double xpos = activeSheet()->dblColumnPos( QMIN( KS_colMax, _max_column + 10 ) ) - xOffset();
+ double xpos = activeSheet()->dblColumnPos( TQMIN( KS_colMax, _max_column + 10 ) ) - xOffset();
double unzoomWidth = d->view->doc()->unzoomItX( width() );
//Don't go beyond the maximum column range (KS_colMax)
@@ -855,13 +855,13 @@ void Canvas::slotMaxColumn( int _max_column )
horzScrollBar()->setRange( 0, d->view->doc()->zoomItX( xpos + xOffset() ) );
- if ( activeSheet()->layoutDirection()==Sheet::RightToLeft )
+ if ( activeSheet()->tqlayoutDirection()==Sheet::RightToLeft )
horzScrollBar()->setValue( horzScrollBar()->maxValue() - oldValue );
}
void Canvas::slotMaxRow( int _max_row )
{
- double ypos = activeSheet()->dblRowPos( QMIN( KS_rowMax, _max_row + 10 ) ) - yOffset();
+ double ypos = activeSheet()->dblRowPos( TQMIN( KS_rowMax, _max_row + 10 ) ) - yOffset();
double unzoomHeight = d->view->doc()->unzoomItY( height() );
//Don't go beyond the maximum row range (KS_rowMax)
@@ -872,7 +872,7 @@ void Canvas::slotMaxRow( int _max_row )
vertScrollBar()->setRange( 0, d->view->doc()->zoomItY( ypos + yOffset() ) );
}
-void Canvas::mouseMoveEvent( QMouseEvent * _ev )
+void Canvas::mouseMoveEvent( TQMouseEvent * _ev )
{
// Dont allow modifications if document is readonly. Selecting is no modification
if ( (!d->view->koDocument()->isReadWrite()) && (d->mouseAction!=Mark))
@@ -920,11 +920,11 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
update( d->m_boundingRealRect );
- QRect drawingRect;
+ TQRect drawingRect;
if ( d->modType == MT_MOVE )
{
- drawingRect = QRect( _ev->pos() - d->m_origPos, d->m_origSize );
+ drawingRect = TQRect( _ev->pos() - d->m_origPos, d->m_origSize );
d->m_boundingRealRect = drawingRect;
}
else
@@ -969,9 +969,9 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
d->m_boundingRealRect = drawingRect; //redraw this area next time the mouse has been moved
//update( d->m_boundingRealRect );
- QPainter p(this);
+ TQPainter p(this);
p.setRasterOp( NotROP );
- p.setPen( QPen( black, 0, DotLine ) );
+ p.setPen( TQPen( black, 0, DotLine ) );
p.drawRect( drawingRect );
p.end();
return;
@@ -983,7 +983,7 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
}
if ( d->dragStart.x() != -1 )
{
- QPoint p ( (int) _ev->pos().x() + (int) xOffset(),
+ TQPoint p ( (int) _ev->pos().x() + (int) xOffset(),
(int) _ev->pos().y() + (int) yOffset() );
if ( ( d->dragStart - p ).manhattanLength() > 4 )
@@ -1007,12 +1007,12 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
if ( d->mouseSelectedObject )
{
EmbeddedObject *obj = 0;
- QPoint p ( (int) _ev->x(),
+ TQPoint p ( (int) _ev->x(),
(int) _ev->y() );
if ( ( obj = getObject( p, activeSheet() ) ) && obj->isSelected() )
{
- KoRect const bound = obj->geometry();
- QRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(),
+ KoRect const bound = obj->tqgeometry();
+ TQRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(),
bound.width(),
bound.height() ) );
zoomedBound.moveBy( (int)(-xOffset() * doc()->zoomedResolutionX() ), (int)(-yOffset() * doc()->zoomedResolutionY() ));
@@ -1023,7 +1023,7 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
double dwidth = d->view->doc()->unzoomItX( width() );
double ev_PosX;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
ev_PosX = dwidth - d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
}
@@ -1051,25 +1051,25 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
//*** Highlighted Range Resize Handling ***
if (d->mouseAction == ResizeSelection)
{
- choice()->update(QPoint(col,row));
+ choice()->update(TQPoint(col,row));
return;
}
//Check to see if the mouse is over a highlight range size grip and if it is, change the cursor
- //shape to a resize arrow
+ //tqshape to a resize arrow
if (highlightRangeSizeGripAt(ev_PosX,ev_PosY))
{
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
setCursor( sizeBDiagCursor );
else
setCursor( sizeFDiagCursor );
return;
}
- QRect rct( (d->chooseCell ? choice() : selectionInfo())->lastRange() );
+ TQRect rct( (d->chooseCell ? choice() : selectionInfo())->lastRange() );
- QRect r1;
- QRect r2;
+ TQRect r1;
+ TQRect r2;
double lx = sheet->dblColumnPos( rct.left() );
double rx = sheet->dblColumnPos( rct.right() + 1 );
@@ -1089,8 +1089,8 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
// Test whether the mouse is over some anchor
{
Cell *cell = sheet->visibleCellAt( col, row );
- QString anchor;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ TQString anchor;
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
anchor = cell->testAnchor( d->view->doc()->zoomItX( cell->dblWidth() - ev_PosX + xpos ),
d->view->doc()->zoomItY( ev_PosY - ypos ) );
@@ -1109,8 +1109,8 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
}
// Test wether mouse is over the selection handle
- QRect selectionHandle = d->view->selectionInfo()->selectionHandleArea();
- if ( selectionHandle.contains( QPoint( d->view->doc()->zoomItX( ev_PosX ),
+ TQRect selectionHandle = d->view->selectionInfo()->selectionHandleArea();
+ if ( selectionHandle.tqcontains( TQPoint( d->view->doc()->zoomItX( ev_PosX ),
d->view->doc()->zoomItY( ev_PosY ) ) ) )
{
//If the cursor is over the handle, than it might be already on the next cell.
@@ -1120,7 +1120,7 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
if ( !sheet->isProtected() )
{
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
setCursor( sizeBDiagCursor );
else
setCursor( sizeFDiagCursor );
@@ -1131,8 +1131,8 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
if ( !sheet->isProtected() )
setCursor( KCursor::handCursor() );
}
- else if ( r1.contains( QPoint( (int) ev_PosX, (int) ev_PosY ) )
- && !r2.contains( QPoint( (int) ev_PosX, (int) ev_PosY ) ) )
+ else if ( r1.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) )
+ && !r2.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) )
{
setCursor( KCursor::handCursor() );
}
@@ -1152,10 +1152,10 @@ void Canvas::mouseMoveEvent( QMouseEvent * _ev )
return;
// Set the new extent of the selection
- (d->chooseCell ? choice() : selectionInfo())->update(QPoint(col,row));
+ (d->chooseCell ? choice() : selectionInfo())->update(TQPoint(col,row));
}
-void Canvas::mouseReleaseEvent( QMouseEvent* /*_ev*/)
+void Canvas::mouseReleaseEvent( TQMouseEvent* /*_ev*/)
{
if ( d->scrollTimer->isActive() )
d->scrollTimer->stop();
@@ -1177,7 +1177,7 @@ void Canvas::mouseReleaseEvent( QMouseEvent* /*_ev*/)
doc()->addCommand( cmd );
} else
{
- repaint();
+ tqrepaint();
}
d->m_isMoving = false;
break;
@@ -1199,7 +1199,7 @@ void Canvas::mouseReleaseEvent( QMouseEvent* /*_ev*/)
return;
Selection* selectionInfo = d->view->selectionInfo();
- QRect s( selectionInfo->lastRange() );
+ TQRect s( selectionInfo->lastRange() );
// The user started the drag in the lower right corner of the marker ?
if ( d->mouseAction == ResizeCell && !sheet->isProtected() )
@@ -1209,7 +1209,7 @@ void Canvas::mouseReleaseEvent( QMouseEvent* /*_ev*/)
}
else if ( d->mouseAction == AutoFill && !sheet->isProtected() )
{
- QRect dest = s;
+ TQRect dest = s;
sheet->autofill( d->autoFillSource, dest );
d->view->updateEditWidget();
@@ -1225,17 +1225,17 @@ void Canvas::mouseReleaseEvent( QMouseEvent* /*_ev*/)
d->dragStart.setX( -1 );
}
-void Canvas::processClickSelectionHandle( QMouseEvent *event )
+void Canvas::processClickSelectionHandle( TQMouseEvent *event )
{
// Auto fill ? That is done using the left mouse button.
- if ( event->button() == LeftButton )
+ if ( event->button() == Qt::LeftButton )
{
d->mouseAction = AutoFill;
d->autoFillSource = selectionInfo()->lastRange();
}
// Resize a cell (done with the right mouse button) ?
// But for that to work there must not be a selection.
- else if ( event->button() == MidButton && selectionInfo()->isSingular())
+ else if ( event->button() == Qt::MidButton && selectionInfo()->isSingular())
{
d->mouseAction = ResizeCell;
}
@@ -1246,20 +1246,20 @@ void Canvas::processClickSelectionHandle( QMouseEvent *event )
void Canvas::processLeftClickAnchor()
{
bool isRefLink = localReferenceAnchor( d->anchor );
- bool isLocalLink = (d->anchor.find("file:") == 0);
+ bool isLocalLink = (d->anchor.tqfind("file:") == 0);
if ( !isRefLink )
{
- QString type=KMimeType::findByURL(d->anchor, 0, isLocalLink)->name();
+ TQString type=KMimeType::findByURL(d->anchor, 0, isLocalLink)->name();
if ( KRun::isExecutableFile( d->anchor , type ) )
{
- //QString question = i18n("Do you want to open this link to '%1'?\n").arg(d->anchor);
+ //TQString question = i18n("Do you want to open this link to '%1'?\n").tqarg(d->anchor);
//question += i18n("Note that opening a link to a local file may "
// "compromise your system's security.");
- QString question = i18n("This link points to the program or script '%1'.\n"
- "Malicious programs can harm your computer. Are you sure that you want to run this program?").arg(d->anchor);
+ TQString question = i18n("This link points to the program or script '%1'.\n"
+ "Malicious programs can harm your computer. Are you sure that you want to run this program?").tqarg(d->anchor);
// this will also start local programs, so adding a "don't warn again"
// checkbox will probably be too dangerous
int choice = KMessageBox::warningYesNo(this, question, i18n("Open Link?"));
@@ -1290,13 +1290,13 @@ bool Canvas::highlightRangeSizeGripAt(double x, double y)
KoRect visibleRect;
sheetAreaToRect((*it)->rect().normalize(), visibleRect);
- QPoint bottomRight((int) visibleRect.right(), (int) visibleRect.bottom());
- QRect handle( ( (int) bottomRight.x() - 6 ),
+ TQPoint bottomRight((int) visibleRect.right(), (int) visibleRect.bottom());
+ TQRect handle( ( (int) bottomRight.x() - 6 ),
( (int) bottomRight.y() - 6 ),
( 6 ),
( 6 ) );
- if (handle.contains(QPoint((int) x,(int) y)))
+ if (handle.tqcontains(TQPoint((int) x,(int) y)))
{
return true;
}
@@ -1305,15 +1305,15 @@ bool Canvas::highlightRangeSizeGripAt(double x, double y)
return false;
}
-void Canvas::mousePressEvent( QMouseEvent * _ev )
+void Canvas::mousePressEvent( TQMouseEvent * _ev )
{
- if ( _ev->button() == LeftButton )
+ if ( _ev->button() == Qt::LeftButton )
{
d->mousePressed = true;
d->view->enableAutoScroll();
}
- if ( activeSheet() && _ev->button() == LeftButton)
+ if ( activeSheet() && _ev->button() == Qt::LeftButton)
{
d->m_moveStartPosMouse = objectRect( false ).topLeft();
EmbeddedObject *obj = getObject( _ev->pos(), activeSheet() );
@@ -1352,9 +1352,9 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
d->m_resizeObject = obj;
- d->m_ratio = static_cast<double>( obj->geometry().width() ) /
- static_cast<double>( obj->geometry().height() );
- d->m_rectBeforeResize = obj->geometry();
+ d->m_ratio = static_cast<double>( obj->tqgeometry().width() ) /
+ static_cast<double>( obj->tqgeometry().height() );
+ d->m_rectBeforeResize = obj->tqgeometry();
}
KoPoint docPoint ( doc()->unzoomPoint( _ev->pos() ) );
@@ -1381,7 +1381,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
double dwidth = d->view->doc()->unzoomItX( width() );
double ev_PosX;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
ev_PosX = dwidth - d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
}
@@ -1414,7 +1414,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
if (d->chooseCell && highlightRangeSizeGripAt(ev_PosX,ev_PosY))
{
- choice()->setActiveElement(QPoint(col,row));
+ choice()->setActiveElement(TQPoint(col,row));
d->mouseAction = ResizeSelection;
return;
}
@@ -1428,7 +1428,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
d->scrollTimer->start( 50 );
// Did we click in the lower right corner of the marker/marked-area ?
- if ( selectionInfo()->selectionHandleArea().contains( QPoint( d->view->doc()->zoomItX( ev_PosX ),
+ if ( selectionInfo()->selectionHandleArea().tqcontains( TQPoint( d->view->doc()->zoomItX( ev_PosX ),
d->view->doc()->zoomItY( ev_PosY ) ) ) )
{
processClickSelectionHandle( _ev );
@@ -1439,10 +1439,10 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
// TODO Stefan: adapt to non-cont. selection
{
// start drag ?
- QRect rct( selectionInfo()->lastRange() );
+ TQRect rct( selectionInfo()->lastRange() );
- QRect r1;
- QRect r2;
+ TQRect r1;
+ TQRect r2;
{
double lx = sheet->dblColumnPos( rct.left() );
double rx = sheet->dblColumnPos( rct.right() + 1 );
@@ -1462,8 +1462,8 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
d->dragStart.setX( -1 );
- if ( r1.contains( QPoint( (int) ev_PosX, (int) ev_PosY ) )
- && !r2.contains( QPoint( (int) ev_PosX, (int) ev_PosY ) ) )
+ if ( r1.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) )
+ && !r2.tqcontains( TQPoint( (int) ev_PosX, (int) ev_PosY ) ) )
{
d->dragStart.setX( (int) ev_PosX );
d->dragStart.setY( (int) ev_PosY );
@@ -1479,7 +1479,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
d->view->koDocument()->isReadWrite() &&
!selectionInfo()->isColumnOrRowSelected())
{
- (d->chooseCell ? choice() : selectionInfo())->update(QPoint(col,row));
+ (d->chooseCell ? choice() : selectionInfo())->update(TQPoint(col,row));
return;
}
@@ -1495,7 +1495,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
switch (_ev->button())
{
- case LeftButton:
+ case Qt::LeftButton:
if (!d->anchor.isEmpty())
{
// Hyperlink pressed
@@ -1510,7 +1510,7 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
// Start a marking action
d->mouseAction = Mark;
// extend the existing selection
- choice()->extend(QPoint(col,row), activeSheet());
+ choice()->extend(TQPoint(col,row), activeSheet());
#endif
}
else
@@ -1518,10 +1518,10 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
// Start a marking action
d->mouseAction = Mark;
// extend the existing selection
- selectionInfo()->extend(QPoint(col,row), activeSheet());
+ selectionInfo()->extend(TQPoint(col,row), activeSheet());
}
// TODO Stefan: simplification, if NCS of choices is working
-/* (d->chooseCell ? choice() : selectionInfo())->extend(QPoint(col,row), activeSheet());*/
+/* (d->chooseCell ? choice() : selectionInfo())->extend(TQPoint(col,row), activeSheet());*/
}
#endif
else
@@ -1529,24 +1529,24 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
// Start a marking action
d->mouseAction = Mark;
// reinitialize the selection
- (d->chooseCell ? choice() : selectionInfo())->initialize(QPoint(col,row), activeSheet());
+ (d->chooseCell ? choice() : selectionInfo())->initialize(TQPoint(col,row), activeSheet());
}
break;
- case MidButton:
+ case Qt::MidButton:
// Paste operation with the middle button?
if ( d->view->koDocument()->isReadWrite() && !sheet->isProtected() )
{
- (d->chooseCell ? choice() : selectionInfo())->initialize( QPoint( col, row ), activeSheet() );
+ (d->chooseCell ? choice() : selectionInfo())->initialize( TQPoint( col, row ), activeSheet() );
sheet->paste(selectionInfo()->lastRange(), true, Paste::Normal,
- Paste::OverWrite, false, 0, false, QClipboard::Selection);
+ Paste::OverWrite, false, 0, false, TQClipboard::Selection);
sheet->setRegionPaintDirty(*selectionInfo());
}
break;
- case RightButton:
- if (!selectionInfo()->contains( QPoint( col, row ) ))
+ case Qt::RightButton:
+ if (!selectionInfo()->tqcontains( TQPoint( col, row ) ))
{
// No selection or the mouse press was outside of an existing selection?
- (d->chooseCell ? choice() : selectionInfo())->initialize(QPoint(col,row), activeSheet());
+ (d->chooseCell ? choice() : selectionInfo())->initialize(TQPoint(col,row), activeSheet());
}
break;
default:
@@ -1561,10 +1561,10 @@ void Canvas::mousePressEvent( QMouseEvent * _ev )
updatePosWidget();
// Context menu?
- if ( _ev->button() == RightButton )
+ if ( _ev->button() == Qt::RightButton )
{
// TODO: Handle anchor // TODO Stefan: ???
- QPoint p = mapToGlobal( _ev->pos() );
+ TQPoint p = mapToGlobal( _ev->pos() );
d->view->openPopupMenu( p );
}
}
@@ -1579,13 +1579,13 @@ void Canvas::startTheDrag()
TextDrag * d = new TextDrag( this );
setCursor( KCursor::handCursor() );
- QDomDocument doc = sheet->saveCellRegion(*selectionInfo());
+ TQDomDocument doc = sheet->saveCellRegion(*selectionInfo());
// Save to buffer
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &buffer );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc;
buffer.close();
@@ -1596,7 +1596,7 @@ void Canvas::startTheDrag()
setCursor( KCursor::arrowCursor() );
}
-void Canvas::mouseDoubleClickEvent( QMouseEvent* _ev)
+void Canvas::mouseDoubleClickEvent( TQMouseEvent* _ev)
{
EmbeddedObject *obj;
@@ -1623,20 +1623,20 @@ void Canvas::mouseDoubleClickEvent( QMouseEvent* _ev)
createEditor(true);
}
-void Canvas::wheelEvent( QWheelEvent* _ev )
+void Canvas::wheelEvent( TQWheelEvent* _ev )
{
if ( _ev->orientation() == Qt::Vertical )
{
if ( vertScrollBar() )
- QApplication::sendEvent( vertScrollBar(), _ev );
+ TQApplication::sendEvent( vertScrollBar(), _ev );
}
else if ( horzScrollBar() )
{
- QApplication::sendEvent( horzScrollBar(), _ev );
+ TQApplication::sendEvent( horzScrollBar(), _ev );
}
}
-void Canvas::paintEvent( QPaintEvent* _ev )
+void Canvas::paintEvent( TQPaintEvent* _ev )
{
if ( d->view->doc()->isLoading() )
return;
@@ -1648,8 +1648,8 @@ void Canvas::paintEvent( QPaintEvent* _ev )
// ElapsedTime et( "Canvas::paintEvent" );
double dwidth = d->view->doc()->unzoomItX( width() );
- KoRect rect = d->view->doc()->unzoomRect( _ev->rect() & QWidget::rect() );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ KoRect rect = d->view->doc()->unzoomRect( _ev->rect() & TQWidget::rect() );
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
rect.moveBy( -xOffset(), yOffset() );
else
rect.moveBy( xOffset(), yOffset() );
@@ -1662,7 +1662,7 @@ void Canvas::paintEvent( QPaintEvent* _ev )
int right_col;
//Philipp: I don't know why we need the +1, but otherwise we don't get it correctly
//Testcase: Move a dialog slowly up left. Sometimes the top/left most points are not painted
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
right_col = sheet->leftColumn( dwidth - tl.x(), tmp );
left_col = sheet->rightColumn( dwidth - br.x() + 1.0 );
@@ -1675,14 +1675,14 @@ void Canvas::paintEvent( QPaintEvent* _ev )
int top_row = sheet->topRow( tl.y(), tmp );
int bottom_row = sheet->bottomRow( br.y() + 1.0 );
- QRect vr( QPoint(left_col, top_row),
- QPoint(right_col, bottom_row) );
+ TQRect vr( TQPoint(left_col, top_row),
+ TQPoint(right_col, bottom_row) );
d->view->doc()->emitBeginOperation( false );
sheet->setRegionPaintDirty( vr );
d->view->doc()->emitEndOperation( vr );
}
-void Canvas::focusInEvent( QFocusEvent* )
+void Canvas::focusInEvent( TQFocusEvent* )
{
if ( !d->cellEditor )
return;
@@ -1703,7 +1703,7 @@ void Canvas::focusInEvent( QFocusEvent* )
d->cellEditor->setFocus();
}
-void Canvas::focusOutEvent( QFocusEvent* )
+void Canvas::focusOutEvent( TQFocusEvent* )
{
if ( d->scrollTimer->isActive() )
d->scrollTimer->stop();
@@ -1711,7 +1711,7 @@ void Canvas::focusOutEvent( QFocusEvent* )
d->view->disableAutoScroll();
}
-void Canvas::dragMoveEvent( QDragMoveEvent * _ev )
+void Canvas::dragMoveEvent( TQDragMoveEvent * _ev )
{
Sheet * sheet = activeSheet();
if ( !sheet )
@@ -1728,27 +1728,27 @@ void Canvas::dragMoveEvent( QDragMoveEvent * _ev )
double width = sheet->columnFormat( selectionInfo()->lastRange().left() )->dblWidth( this );
double height = sheet->rowFormat( selectionInfo()->lastRange().top() )->dblHeight( this );
- QRect r1 ((int) xpos - 1, (int) ypos - 1, (int) width + 3, (int) height + 3);
+ TQRect r1 ((int) xpos - 1, (int) ypos - 1, (int) width + 3, (int) height + 3);
double ev_PosX;
- if (sheet->layoutDirection()==Sheet::RightToLeft)
+ if (sheet->tqlayoutDirection()==Sheet::RightToLeft)
ev_PosX = dwidth - d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
else
ev_PosX = d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
double ev_PosY = d->view->doc()->unzoomItY( _ev->pos().y() ) + yOffset();
- if ( r1.contains( QPoint ((int) ev_PosX, (int) ev_PosY) ) )
+ if ( r1.tqcontains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) )
_ev->ignore( r1 );
}
-void Canvas::dragLeaveEvent( QDragLeaveEvent * )
+void Canvas::dragLeaveEvent( TQDragLeaveEvent * )
{
if ( d->scrollTimer->isActive() )
d->scrollTimer->stop();
}
-void Canvas::dropEvent( QDropEvent * _ev )
+void Canvas::dropEvent( TQDropEvent * _ev )
{
d->dragging = false;
if ( d->scrollTimer->isActive() )
@@ -1766,17 +1766,17 @@ void Canvas::dropEvent( QDropEvent * _ev )
double width = sheet->columnFormat( selectionInfo()->lastRange().left() )->dblWidth( this );
double height = sheet->rowFormat( selectionInfo()->lastRange().top() )->dblHeight( this );
- QRect r1 ((int) xpos - 1, (int) ypos - 1, (int) width + 3, (int) height + 3);
+ TQRect r1 ((int) xpos - 1, (int) ypos - 1, (int) width + 3, (int) height + 3);
double ev_PosX;
- if (sheet->layoutDirection()==Sheet::RightToLeft)
+ if (sheet->tqlayoutDirection()==Sheet::RightToLeft)
ev_PosX = dwidth - d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
else
ev_PosX = d->view->doc()->unzoomItX( _ev->pos().x() ) + xOffset();
double ev_PosY = d->view->doc()->unzoomItY( _ev->pos().y() ) + yOffset();
- if ( r1.contains( QPoint ((int) ev_PosX, (int) ev_PosY) ) )
+ if ( r1.tqcontains( TQPoint ((int) ev_PosX, (int) ev_PosY) ) )
{
_ev->ignore( );
return;
@@ -1794,7 +1794,7 @@ void Canvas::dropEvent( QDropEvent * _ev )
return;
}
- QByteArray b;
+ TQByteArray b;
bool makeUndo = true;
@@ -1806,7 +1806,7 @@ void Canvas::dropEvent( QDropEvent * _ev )
{
UndoDragDrop * undo
= new UndoDragDrop(d->view->doc(), sheet, *selectionInfo(),
- QRect(col, row,
+ TQRect(col, row,
selectionInfo()->boundingRect().width(),
selectionInfo()->boundingRect().height()));
d->view->doc()->addCommand( undo );
@@ -1816,8 +1816,8 @@ void Canvas::dropEvent( QDropEvent * _ev )
}
- b = _ev->encodedData( TextDrag::selectionMimeType() );
- sheet->paste( b, QRect( col, row, 1, 1 ), makeUndo );
+ b = _ev->tqencodedData( TextDrag::selectionMimeType() );
+ sheet->paste( b, TQRect( col, row, 1, 1 ), makeUndo );
if ( _ev->source() == this )
_ev->acceptAction();
@@ -1825,8 +1825,8 @@ void Canvas::dropEvent( QDropEvent * _ev )
}
else
{
- QString text;
- if ( !QTextDrag::decode( _ev, text ) )
+ TQString text;
+ if ( !TQTextDrag::decode( _ev, text ) )
{
_ev->ignore();
return;
@@ -1834,7 +1834,7 @@ void Canvas::dropEvent( QDropEvent * _ev )
// if ( TextDrag::target() == _ev->source() )
// sheet->deleteSelection( selectionInfo() );
- sheet->pasteTextPlain( text, QRect( col, row, 1, 1 ) );
+ sheet->pasteTextPlain( text, TQRect( col, row, 1, 1 ) );
_ev->accept();
if ( _ev->source() == this )
_ev->acceptAction();
@@ -1843,7 +1843,7 @@ void Canvas::dropEvent( QDropEvent * _ev )
}
}
-void Canvas::resizeEvent( QResizeEvent* _ev )
+void Canvas::resizeEvent( TQResizeEvent* _ev )
{
if (!activeSheet())
return;
@@ -1855,12 +1855,12 @@ void Canvas::resizeEvent( QResizeEvent* _ev )
// workaround to allow horizontal resizing and zoom changing when sheet
// direction and interface direction don't match (e.g. an RTL sheet on an
// LTR interface)
- if ( activeSheet() && activeSheet()->layoutDirection()==Sheet::RightToLeft && !QApplication::reverseLayout() )
+ if ( activeSheet() && activeSheet()->tqlayoutDirection()==Sheet::RightToLeft && !TQApplication::reverseLayout() )
{
int dx = _ev->size().width() - _ev->oldSize().width();
scroll(dx, 0);
}
- else if ( activeSheet() && activeSheet()->layoutDirection()==Sheet::LeftToRight && QApplication::reverseLayout() )
+ else if ( activeSheet() && activeSheet()->tqlayoutDirection()==Sheet::LeftToRight && TQApplication::reverseLayout() )
{
int dx = _ev->size().width() - _ev->oldSize().width();
scroll(-dx, 0);
@@ -1875,7 +1875,7 @@ void Canvas::resizeEvent( QResizeEvent* _ev )
d->view->doc()->zoomItX( activeSheet()->sizeMaxX() ) )
{
horzScrollBar()->setRange( 0, d->view->doc()->zoomItX( activeSheet()->sizeMaxX() - ev_Width ) );
- if ( activeSheet()->layoutDirection()==Sheet::RightToLeft )
+ if ( activeSheet()->tqlayoutDirection()==Sheet::RightToLeft )
horzScrollBar()->setValue( horzScrollBar()->maxValue() - oldValue );
}
}
@@ -1888,7 +1888,7 @@ void Canvas::resizeEvent( QResizeEvent* _ev )
int( d->view->doc()->zoomItX( activeSheet()->sizeMaxX() ) - ev_Width ) )
{
horzScrollBar()->setRange( 0, d->view->doc()->zoomItX( activeSheet()->sizeMaxX() - ev_Width ) );
- if ( activeSheet()->layoutDirection()==Sheet::RightToLeft )
+ if ( activeSheet()->tqlayoutDirection()==Sheet::RightToLeft )
horzScrollBar()->setValue( horzScrollBar()->maxValue() - oldValue );
}
}
@@ -1913,9 +1913,9 @@ void Canvas::resizeEvent( QResizeEvent* _ev )
}
}
-QPoint Canvas::cursorPos()
+TQPoint Canvas::cursorPos()
{
- QPoint cursor;
+ TQPoint cursor;
if (d->chooseCell && !choice()->isEmpty())
cursor = choice()->cursor();
else
@@ -1924,14 +1924,14 @@ QPoint Canvas::cursorPos()
return cursor;
}
-QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
+TQRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
{
kdDebug(36001) << "Canvas::moveDirection" << endl;
- QPoint destination;
- QPoint cursor = cursorPos();
+ TQPoint destination;
+ TQPoint cursor = cursorPos();
- QPoint cellCorner = cursor;
+ TQPoint cellCorner = cursor;
Cell* cell = activeSheet()->cellAt(cursor.x(), cursor.y());
/* cell is either the same as the marker, or the cell that is forced obscuring
@@ -1940,7 +1940,7 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
if (cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- cellCorner = QPoint(cell->column(), cell->row());
+ cellCorner = TQPoint(cell->column(), cell->row());
}
/* how many cells must we move to get to the next cell? */
@@ -1954,7 +1954,7 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
NEVER use cell->column() or cell->row() -- it might be a default cell
*/
{
- case Bottom:
+ case KSpread::Bottom:
offset = cell->mergedYCells() - (cursor.y() - cellCorner.y()) + 1;
rl = activeSheet()->rowFormat( cursor.y() + offset );
while ( ((cursor.y() + offset) <= KS_rowMax) && rl->isHide())
@@ -1963,9 +1963,9 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
rl = activeSheet()->rowFormat( cursor.y() + offset );
}
- destination = QPoint(cursor.x(), QMIN(cursor.y() + offset, KS_rowMax));
+ destination = TQPoint(cursor.x(), TQMIN(cursor.y() + offset, KS_rowMax));
break;
- case Top:
+ case KSpread::Top:
offset = (cellCorner.y() - cursor.y()) - 1;
rl = activeSheet()->rowFormat( cursor.y() + offset );
while ( ((cursor.y() + offset) >= 1) && rl->isHide())
@@ -1973,9 +1973,9 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
offset--;
rl = activeSheet()->rowFormat( cursor.y() + offset );
}
- destination = QPoint(cursor.x(), QMAX(cursor.y() + offset, 1));
+ destination = TQPoint(cursor.x(), TQMAX(cursor.y() + offset, 1));
break;
- case Left:
+ case KSpread::Left:
offset = (cellCorner.x() - cursor.x()) - 1;
cl = activeSheet()->columnFormat( cursor.x() + offset );
while ( ((cursor.x() + offset) >= 1) && cl->isHide())
@@ -1983,9 +1983,9 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
offset--;
cl = activeSheet()->columnFormat( cursor.x() + offset );
}
- destination = QPoint(QMAX(cursor.x() + offset, 1), cursor.y());
+ destination = TQPoint(TQMAX(cursor.x() + offset, 1), cursor.y());
break;
- case Right:
+ case KSpread::Right:
offset = cell->mergedXCells() - (cursor.x() - cellCorner.x()) + 1;
cl = activeSheet()->columnFormat( cursor.x() + offset );
while ( ((cursor.x() + offset) <= KS_colMax) && cl->isHide())
@@ -1993,9 +1993,9 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
offset++;
cl = activeSheet()->columnFormat( cursor.x() + offset );
}
- destination = QPoint(QMIN(cursor.x() + offset, KS_colMax), cursor.y());
+ destination = TQPoint(TQMIN(cursor.x() + offset, KS_colMax), cursor.y());
break;
- case BottomFirst:
+ case KSpread::BottomFirst:
offset = cell->mergedYCells() - (cursor.y() - cellCorner.y()) + 1;
rl = activeSheet()->rowFormat( cursor.y() + offset );
while ( ((cursor.y() + offset) <= KS_rowMax) && rl->isHide())
@@ -2004,7 +2004,7 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
rl = activeSheet()->rowFormat( cursor.y() + offset );
}
- destination = QPoint( 1, QMIN( cursor.y() + offset, KS_rowMax ) );
+ destination = TQPoint( 1, TQMIN( cursor.y() + offset, KS_rowMax ) );
break;
}
@@ -2018,14 +2018,14 @@ QRect Canvas::moveDirection( KSpread::MoveTo direction, bool extendSelection )
}
d->view->updateEditWidget();
- return QRect( cursor, destination );
+ return TQRect( cursor, destination );
}
-void Canvas::processEnterKey(QKeyEvent* event)
+void Canvas::processEnterKey(TQKeyEvent* event)
{
// array is true, if ctrl+alt are pressed
- bool array = (event->state() & Qt::AltButton) &&
- (event->state() & Qt::ControlButton);
+ bool array = (event->state() & TQt::AltButton) &&
+ (event->state() & TQt::ControlButton);
/* save changes to the current editor */
if (!d->chooseCell)
@@ -2039,24 +2039,24 @@ void Canvas::processEnterKey(QKeyEvent* event)
KSpread::MoveTo direction = d->view->doc()->getMoveToValue();
//if shift Button clicked inverse move direction
- if (event->state() & Qt::ShiftButton)
+ if (event->state() & TQt::ShiftButton)
{
switch( direction )
{
- case Bottom:
- direction = Top;
+ case KSpread::Bottom:
+ direction = KSpread::Top;
break;
- case Top:
- direction = Bottom;
+ case KSpread::Top:
+ direction = KSpread::Bottom;
break;
- case Left:
- direction = Right;
+ case KSpread::Left:
+ direction = KSpread::Right;
break;
- case Right:
- direction = Left;
+ case KSpread::Right:
+ direction = KSpread::Left;
break;
- case BottomFirst:
- direction = BottomFirst;
+ case KSpread::BottomFirst:
+ direction = KSpread::BottomFirst;
break;
}
}
@@ -2064,11 +2064,11 @@ void Canvas::processEnterKey(QKeyEvent* event)
/* never extend a selection with the enter key -- the shift key reverses
direction, not extends the selection
*/
- QRect r( moveDirection( direction, false ) );
+ TQRect r( moveDirection( direction, false ) );
d->view->doc()->emitEndOperation( r );
}
-void Canvas::processArrowKey( QKeyEvent *event)
+void Canvas::processArrowKey( TQKeyEvent *event)
{
/* NOTE: hitting the tab key also calls this function. Don't forget
to account for it
@@ -2080,35 +2080,35 @@ void Canvas::processArrowKey( QKeyEvent *event)
deleteEditor( true );
}
- KSpread::MoveTo direction = Bottom;
+ KSpread::MoveTo direction = KSpread::Bottom;
bool makingSelection = event->state() & ShiftButton;
switch (event->key())
{
case Key_Down:
- direction = Bottom;
+ direction = KSpread::Bottom;
break;
case Key_Up:
- direction = Top;
+ direction = KSpread::Top;
break;
case Key_Left:
- if (activeSheet()->layoutDirection()==Sheet::RightToLeft)
- direction = Right;
+ if (activeSheet()->tqlayoutDirection()==Sheet::RightToLeft)
+ direction = KSpread::Right;
else
- direction = Left;
+ direction = KSpread::Left;
break;
case Key_Right:
- if (activeSheet()->layoutDirection()==Sheet::RightToLeft)
- direction = Left;
+ if (activeSheet()->tqlayoutDirection()==Sheet::RightToLeft)
+ direction = KSpread::Left;
else
- direction = Right;
+ direction = KSpread::Right;
break;
case Key_Tab:
- direction = Right;
+ direction = KSpread::Right;
break;
case Key_Backtab:
//Shift+Tab moves to the left
- direction = Left;
+ direction = KSpread::Left;
makingSelection = false;
break;
default:
@@ -2116,11 +2116,11 @@ void Canvas::processArrowKey( QKeyEvent *event)
break;
}
- QRect r( moveDirection( direction, makingSelection ) );
+ TQRect r( moveDirection( direction, makingSelection ) );
d->view->doc()->emitEndOperation( r );
}
-void Canvas::processEscapeKey(QKeyEvent * event)
+void Canvas::processEscapeKey(TQKeyEvent * event)
{
if ( d->cellEditor )
deleteEditor( false );
@@ -2133,9 +2133,9 @@ void Canvas::processEscapeKey(QKeyEvent * event)
}
event->accept(); // ?
- QPoint cursor = cursorPos();
+ TQPoint cursor = cursorPos();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
if ( d->mousePressed /*&& toolEditMode == TEM_MOUSE */)
{
@@ -2150,14 +2150,14 @@ void Canvas::processEscapeKey(QKeyEvent * event)
case MT_RESIZE_RU:
case MT_RESIZE_RD:
{
- QRect oldBoundingRect = doc()->zoomRect( d->m_resizeObject->geometry()/*getRepaintRect()*/);
+ TQRect oldBoundingRect = doc()->zoomRect( d->m_resizeObject->tqgeometry()/*getRepaintRect()*/);
d->m_resizeObject->setGeometry( d->m_rectBeforeResize );
oldBoundingRect.moveBy( (int)( -xOffset()*doc()->zoomedResolutionX() ) ,
(int)( -yOffset() * doc()->zoomedResolutionY()) );
activeSheet()->setRegionPaintDirty( oldBoundingRect );
- repaint( oldBoundingRect );
- repaintObject( d->m_resizeObject );
+ tqrepaint( oldBoundingRect );
+ tqrepaintObject( d->m_resizeObject );
d->m_ratio = 0.0;
d->m_resizeObject = 0;
d->m_isResizing = false;
@@ -2186,7 +2186,7 @@ void Canvas::processEscapeKey(QKeyEvent * event)
}
}
-bool Canvas::processHomeKey(QKeyEvent* event)
+bool Canvas::processHomeKey(TQKeyEvent* event)
{
bool makingSelection = event->state() & ShiftButton;
Sheet* sheet = activeSheet();
@@ -2194,12 +2194,12 @@ bool Canvas::processHomeKey(QKeyEvent* event)
if ( d->cellEditor )
// We are in edit mode -> go beginning of line
{
- QApplication::sendEvent( d->editWidget, event );
+ TQApplication::sendEvent( d->editWidget, event );
return false;
}
else
{
- QPoint destination;
+ TQPoint destination;
/* start at the first used cell in the row and cycle through the right until
we find a cell that has some output text. But don't look past the current
marker.
@@ -2213,11 +2213,11 @@ bool Canvas::processHomeKey(QKeyEvent* event)
if (event->state() & ControlButton)
{
/* ctrl + Home will always just send us to location (1,1) */
- destination = QPoint( 1, 1 );
+ destination = TQPoint( 1, 1 );
}
else
{
- QPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
+ TQPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
Cell * cell = sheet->getFirstCellRow(marker.y());
while (cell != NULL && cell->column() < marker.x() && cell->isEmpty())
@@ -2228,12 +2228,12 @@ bool Canvas::processHomeKey(QKeyEvent* event)
int col = ( cell ? cell->column() : 1 );
if ( col == marker.x())
col = 1;
- destination = QPoint(col, marker.y());
+ destination = TQPoint(col, marker.y());
}
if ( selectionInfo()->marker() == destination )
{
- d->view->doc()->emitEndOperation( QRect( destination, destination ) );
+ d->view->doc()->emitEndOperation( TQRect( destination, destination ) );
return false;
}
@@ -2249,19 +2249,19 @@ bool Canvas::processHomeKey(QKeyEvent* event)
return true;
}
-bool Canvas::processEndKey( QKeyEvent *event )
+bool Canvas::processEndKey( TQKeyEvent *event )
{
bool makingSelection = event->state() & ShiftButton;
Sheet* sheet = activeSheet();
Cell* cell = NULL;
- QPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
+ TQPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
// move to the last used cell in the row
// We are in edit mode -> go beginning of line
if ( d->cellEditor )
{
- QApplication::sendEvent( d->editWidget, event );
- d->view->doc()->emitEndOperation( QRect( marker, marker ) );
+ TQApplication::sendEvent( d->editWidget, event );
+ d->view->doc()->emitEndOperation( TQRect( marker, marker ) );
return false;
}
else
@@ -2276,10 +2276,10 @@ bool Canvas::processEndKey( QKeyEvent *event )
col = (cell == NULL) ? KS_colMax : cell->column();
- QPoint destination( col, marker.y() );
+ TQPoint destination( col, marker.y() );
if ( destination == marker )
{
- d->view->doc()->emitEndOperation( QRect( destination, destination ) );
+ d->view->doc()->emitEndOperation( TQRect( destination, destination ) );
return false;
}
@@ -2295,7 +2295,7 @@ bool Canvas::processEndKey( QKeyEvent *event )
return true;
}
-bool Canvas::processPriorKey(QKeyEvent *event)
+bool Canvas::processPriorKey(TQKeyEvent *event)
{
bool makingSelection = event->state() & ShiftButton;
if (!d->chooseCell)
@@ -2303,12 +2303,12 @@ bool Canvas::processPriorKey(QKeyEvent *event)
deleteEditor( true );
}
- QPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
+ TQPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
- QPoint destination(marker.x(), QMAX(1, marker.y() - 10));
+ TQPoint destination(marker.x(), TQMAX(1, marker.y() - 10));
if ( destination == marker )
{
- d->view->doc()->emitEndOperation( QRect( destination, destination ) );
+ d->view->doc()->emitEndOperation( TQRect( destination, destination ) );
return false;
}
@@ -2323,7 +2323,7 @@ bool Canvas::processPriorKey(QKeyEvent *event)
return true;
}
-bool Canvas::processNextKey(QKeyEvent *event)
+bool Canvas::processNextKey(TQKeyEvent *event)
{
bool makingSelection = event->state() & ShiftButton;
@@ -2332,12 +2332,12 @@ bool Canvas::processNextKey(QKeyEvent *event)
deleteEditor( true /*save changes*/ );
}
- QPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
- QPoint destination(marker.x(), QMAX(1, marker.y() + 10));
+ TQPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
+ TQPoint destination(marker.x(), TQMAX(1, marker.y() + 10));
if ( marker == destination )
{
- d->view->doc()->emitEndOperation( QRect( destination, destination ) );
+ d->view->doc()->emitEndOperation( TQRect( destination, destination ) );
return false;
}
@@ -2352,7 +2352,7 @@ bool Canvas::processNextKey(QKeyEvent *event)
return true;
}
-void Canvas::processDeleteKey(QKeyEvent* /* event */)
+void Canvas::processDeleteKey(TQKeyEvent* /* event */)
{
if ( isObjectSelected() )
{
@@ -2364,13 +2364,13 @@ void Canvas::processDeleteKey(QKeyEvent* /* event */)
activeSheet()->clearTextSelection( selectionInfo() );
d->editWidget->setText( "" );
- QPoint cursor = cursorPos();
+ TQPoint cursor = cursorPos();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
return;
}
-void Canvas::processF2Key(QKeyEvent* /* event */)
+void Canvas::processF2Key(TQKeyEvent* /* event */)
{
d->editWidget->setFocus();
if ( d->cellEditor )
@@ -2378,13 +2378,13 @@ void Canvas::processF2Key(QKeyEvent* /* event */)
d->editWidget->cursorForward( false );
- QPoint cursor = cursorPos();
+ TQPoint cursor = cursorPos();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
return;
}
-void Canvas::processF4Key(QKeyEvent* event)
+void Canvas::processF4Key(TQKeyEvent* event)
{
/* passes F4 to the editor (if any), which will process it
*/
@@ -2394,13 +2394,13 @@ void Canvas::processF4Key(QKeyEvent* event)
// d->editWidget->setFocus();
d->editWidget->setCursorPosition( d->cellEditor->cursorPosition() );
}
- QPoint cursor = cursorPos();
+ TQPoint cursor = cursorPos();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
return;
}
-void Canvas::processOtherKey(QKeyEvent *event)
+void Canvas::processOtherKey(TQKeyEvent *event)
{
// No null character ...
if ( event->text().isEmpty() || !d->view->koDocument()->isReadWrite()
@@ -2420,26 +2420,26 @@ void Canvas::processOtherKey(QKeyEvent *event)
d->cellEditor->handleKeyPressEvent( event );
}
- QPoint cursor = cursorPos();
+ TQPoint cursor = cursorPos();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
return;
}
-bool Canvas::processControlArrowKey( QKeyEvent *event )
+bool Canvas::processControlArrowKey( TQKeyEvent *event )
{
bool makingSelection = event->state() & ShiftButton;
Sheet* sheet = activeSheet();
Cell* cell = NULL;
Cell* lastCell;
- QPoint destination;
+ TQPoint destination;
bool searchThroughEmpty = true;
int row;
int col;
- QPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
+ TQPoint marker = d->chooseCell ? choice()->marker() : selectionInfo()->marker();
/* here, we want to move to the first or last cell in the given direction that is
actually being used. Ignore empty cells and cells on hidden rows/columns */
@@ -2541,7 +2541,7 @@ bool Canvas::processControlArrowKey( QKeyEvent *event )
//Ctrl+Key_Left
case Key_Left:
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
cell = sheet->cellAt( marker.x(), marker.y() );
if ( (cell != NULL) && (!cell->isEmpty()) && (marker.x() != KS_colMax))
@@ -2635,7 +2635,7 @@ bool Canvas::processControlArrowKey( QKeyEvent *event )
//Ctrl+Key_Right
case Key_Right:
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
cell = sheet->cellAt( marker.x(), marker.y() );
if ( (cell != NULL) && (!cell->isEmpty()) && (marker.x() != 1))
@@ -2730,7 +2730,7 @@ bool Canvas::processControlArrowKey( QKeyEvent *event )
if ( marker == destination )
{
- d->view->doc()->emitEndOperation( QRect( destination, destination ) );
+ d->view->doc()->emitEndOperation( TQRect( destination, destination ) );
return false;
}
@@ -2746,7 +2746,7 @@ bool Canvas::processControlArrowKey( QKeyEvent *event )
}
-void Canvas::keyPressEvent ( QKeyEvent * _ev )
+void Canvas::keyPressEvent ( TQKeyEvent * _ev )
{
Sheet * sheet = activeSheet();
@@ -2754,7 +2754,7 @@ void Canvas::keyPressEvent ( QKeyEvent * _ev )
return;
// Dont handle the remaining special keys.
- if ( _ev->state() & ( Qt::AltButton | Qt::ControlButton ) &&
+ if ( _ev->state() & ( TQt::AltButton | TQt::ControlButton ) &&
(_ev->key() != Key_Down) &&
(_ev->key() != Key_Up) &&
(_ev->key() != Key_Right) &&
@@ -2764,12 +2764,12 @@ void Canvas::keyPressEvent ( QKeyEvent * _ev )
(_ev->key() != Key_Return) &&
(_ev->key() != KGlobalSettings::contextMenuKey()))
{
- QWidget::keyPressEvent( _ev );
+ TQWidget::keyPressEvent( _ev );
return;
}
// Always accept so that events are not
- // passed to the parent.
+ // passed to the tqparent.
_ev->accept();
d->view->doc()->emitBeginOperation(false);
@@ -2777,7 +2777,7 @@ void Canvas::keyPressEvent ( QKeyEvent * _ev )
int row = markerRow();
int col = markerColumn();
KoPoint kop(sheet->columnPos(col, this), sheet->rowPos(row, this));
- QPoint p = d->view->doc()->zoomPoint(kop);
+ TQPoint p = d->view->doc()->zoomPoint(kop);
p = mapToGlobal(p);
d->view->openPopupMenu( p );
}
@@ -2858,7 +2858,7 @@ void Canvas::keyPressEvent ( QKeyEvent * _ev )
return;
}
-void Canvas::processIMEvent( QIMEvent * event )
+void Canvas::processIMEvent( TQIMEvent * event )
{
d->view->doc()->emitBeginOperation( false );
if ( !d->cellEditor && !d->chooseCell )
@@ -2868,7 +2868,7 @@ void Canvas::processIMEvent( QIMEvent * event )
d->cellEditor->handleIMEvent( event );
}
- QPoint cursor;
+ TQPoint cursor;
if ( d->chooseCell )
{
@@ -2880,10 +2880,10 @@ void Canvas::processIMEvent( QIMEvent * event )
else
cursor = selectionInfo()->cursor();
- d->view->doc()->emitEndOperation( QRect( cursor, cursor ) );
+ d->view->doc()->emitEndOperation( TQRect( cursor, cursor ) );
}
-bool Canvas::formatKeyPress( QKeyEvent * _ev )
+bool Canvas::formatKeyPress( TQKeyEvent * _ev )
{
if (!(_ev->state() & ControlButton ))
return false;
@@ -2901,7 +2901,7 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
if ( !d->view->doc()->undoLocked() )
{
- QString dummy;
+ TQString dummy;
UndoCellFormat * undo = new UndoCellFormat( d->view->doc(), sheet, *selectionInfo(), dummy );
d->view->doc()->addCommand( undo );
}
@@ -2909,7 +2909,7 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
Region::ConstIterator end(selectionInfo()->constEnd());
for (Region::ConstIterator it = selectionInfo()->constBegin(); it != end; ++it)
{
- QRect rect = (*it)->rect().normalize();
+ TQRect rect = (*it)->rect().normalize();
int right = rect.right();
int bottom = rect.bottom();
@@ -2932,7 +2932,7 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
cell = sheet->getNextCellRight( cell->column(), r );
} // while (cell)
RowFormat * rw = sheet->nonDefaultRowFormat( r );
- QPen pen;
+ TQPen pen;
switch ( _ev->key() )
{
case Key_Exclam:
@@ -2964,12 +2964,12 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
case Key_Ampersand:
if ( r == rect.top() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
rw->setTopBorderPen( pen );
}
if ( r == rect.bottom() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
rw->setBottomBorderPen( pen );
}
break;
@@ -3004,7 +3004,7 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
}
ColumnFormat * cw = sheet->nonDefaultColumnFormat( c );
- QPen pen;
+ TQPen pen;
switch ( _ev->key() )
{
case Key_Exclam:
@@ -3036,12 +3036,12 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
case Key_Ampersand:
if ( c == rect.left() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cw->setLeftBorderPen( pen );
}
if ( c == rect.right() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cw->setRightBorderPen( pen );
}
break;
@@ -3076,9 +3076,9 @@ bool Canvas::formatKeyPress( QKeyEvent * _ev )
return true;
}
-bool Canvas::formatCellByKey (Cell *cell, int key, const QRect &rect)
+bool Canvas::formatCellByKey (Cell *cell, int key, const TQRect &rect)
{
- QPen pen;
+ TQPen pen;
switch (key)
{
case Key_Exclam:
@@ -3111,22 +3111,22 @@ bool Canvas::formatCellByKey (Cell *cell, int key, const QRect &rect)
case Key_Ampersand:
if ( cell->row() == rect.top() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cell->setTopBorderPen( pen );
}
if ( cell->row() == rect.bottom() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cell->setBottomBorderPen( pen );
}
if ( cell->column() == rect.left() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cell->setLeftBorderPen( pen );
}
if ( cell->column() == rect.right() )
{
- pen = QPen( d->view->borderColor(), 1, SolidLine);
+ pen = TQPen( d->view->borderColor(), 1, SolidLine);
cell->setRightBorderPen( pen );
}
break;
@@ -3136,9 +3136,9 @@ bool Canvas::formatCellByKey (Cell *cell, int key, const QRect &rect)
}
-void Canvas::slotAutoScroll(const QPoint &scrollDistance)
+void Canvas::slotAutoScroll(const TQPoint &scrollDistance)
{
- QPoint d = scrollDistance;
+ TQPoint d = scrollDistance;
horzScrollBar()->setValue( horzScrollBar()->value() + d.x() );
vertScrollBar()->setValue( vertScrollBar()->value() + d.y() );
}
@@ -3151,7 +3151,7 @@ void Canvas::doAutoScroll()
return;
}
bool select = false;
- QPoint pos = mapFromGlobal( QCursor::pos() );
+ TQPoint pos = mapFromGlobal( TQCursor::pos() );
//Provide progressive scrolling depending on the mouse position
if ( pos.y() < 0 )
@@ -3182,7 +3182,7 @@ void Canvas::doAutoScroll()
if ( select )
{
- QMouseEvent * event = new QMouseEvent(QEvent::MouseMove, pos, 0, 0);
+ TQMouseEvent * event = new TQMouseEvent(TQEvent::MouseMove, pos, 0, 0);
mouseMoveEvent( event );
delete event;
}
@@ -3191,7 +3191,7 @@ void Canvas::doAutoScroll()
d->scrollTimer->start( 50 );
}
-void Canvas::speakCell(QWidget* w, const QPoint& p, uint flags)
+void Canvas::speakCell(TQWidget* w, const TQPoint& p, uint flags)
{
Q_UNUSED(flags);
if (w != this) return;
@@ -3199,17 +3199,17 @@ void Canvas::speakCell(QWidget* w, const QPoint& p, uint flags)
if (!sheet) return;
int row = -1;
int col = -1;
- if (p == QPoint()) {
+ if (p == TQPoint()) {
row = markerRow();
col = markerColumn();
if (row == d->prevSpokenFocusRow && col == d->prevSpokenFocusCol) return;
d->prevSpokenFocusRow = row;
d->prevSpokenFocusCol = col;
} else {
- QPoint wp = w->mapFromGlobal(p);
+ TQPoint wp = w->mapFromGlobal(p);
double tmp;
double posX;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
double dwidth = d->view->doc()->unzoomItX( width() );
posX = dwidth - d->view->doc()->unzoomItX( wp.x() );
@@ -3231,22 +3231,22 @@ void Canvas::speakCell(QWidget* w, const QPoint& p, uint flags)
if (row >=0 && col >= 0) {
Cell* cell = sheet->cellAt( col, row );
if (!cell) return;
- QString text = cell->strOutText();
+ TQString text = cell->strOutText();
if (!text.isEmpty()) {
text.prepend(i18n("Spreadsheet cell", "Cell ") + cell->name() + " ");
if (cell->isFormula()) {
- QString f = cell->text();
+ TQString f = cell->text();
// Try to format the formula so synth can more clearly speak it.
- QString f2;
+ TQString f2;
for (uint i = 0; i < f.length(); i++) f2 += f[i] + " ";
- f2.replace("(", i18n("character (", "left paren"));
- f2.replace(")", i18n("character )", "right paren"));
- f2.replace(":", i18n("character :", "colon"));
- f2.replace(";", i18n("character ;", "semicolon"));
- f2.replace("=", i18n("character =", "equals"));
- f2.replace(".", i18n("character .", "point"));
- f2.replace(",", i18n("character ,", "comma"));
- f2.replace(" . . ", i18n("characters ..", " dot dot "));
+ f2.tqreplace("(", i18n("character (", "left paren"));
+ f2.tqreplace(")", i18n("character )", "right paren"));
+ f2.tqreplace(":", i18n("character :", "colon"));
+ f2.tqreplace(";", i18n("character ;", "semicolon"));
+ f2.tqreplace("=", i18n("character =", "equals"));
+ f2.tqreplace(".", i18n("character .", "point"));
+ f2.tqreplace(",", i18n("character ,", "comma"));
+ f2.tqreplace(" . . ", i18n("characters ..", " dot dot "));
text.append(i18n("Spreadsheet formula", " Formula ") + f2);
}
// kdDebug() << "Canvas::speakCell: text = " << text << endl;
@@ -3280,22 +3280,22 @@ double Canvas::autoScrollAccelerationY( int offset )
}
-KSpread::EmbeddedObject *Canvas::getObject( const QPoint &pos, Sheet *_sheet )
+KSpread::EmbeddedObject *Canvas::getObject( const TQPoint &pos, Sheet *_sheet )
{
- QPoint const p ( (int) pos.x() ,
+ TQPoint const p ( (int) pos.x() ,
(int) pos.y() );
- QPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
for( ; itObject.current(); ++itObject )
{
if ( itObject.current()->sheet() == _sheet )
{
- KoRect const bound = ( itObject.current() )->geometry();
- QRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(),
+ KoRect const bound = ( itObject.current() )->tqgeometry();
+ TQRect zoomedBound = doc()->zoomRect( KoRect(bound.left(), bound.top(),
bound.width(),
bound.height() ) );
zoomedBound.moveBy( (int)( -xOffset() * doc()->zoomedResolutionX() ), (int)( -yOffset() * doc()->zoomedResolutionY() ) );
- if ( zoomedBound.contains( p ) )
+ if ( zoomedBound.tqcontains( p ) )
return itObject.current();
}
}
@@ -3307,7 +3307,7 @@ void Canvas::selectObject( EmbeddedObject *obj )
if ( obj->sheet() != activeSheet() || obj->isSelected() )
return;
obj->setSelected( true );
- repaintObject( obj );
+ tqrepaintObject( obj );
d->mouseSelectedObject = true;
emit objectSelectedChanged();
@@ -3319,7 +3319,7 @@ void Canvas::deselectObject( EmbeddedObject *obj )
if ( obj->sheet() != activeSheet() || !obj->isSelected() )
return;
obj->setSelected( false );
- repaintObject( obj );
+ tqrepaintObject( obj );
d->mouseSelectedObject = false;
emit objectSelectedChanged();
@@ -3327,7 +3327,7 @@ void Canvas::deselectObject( EmbeddedObject *obj )
void Canvas::selectAllObjects()
{
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
{
if ( it.current()->sheet() == activeSheet() )
@@ -3345,7 +3345,7 @@ void Canvas::deselectAllObjects()
//lowerObject();
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
deselectObject( it.current() );
@@ -3429,9 +3429,9 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep
{
EmbeddedObject *obj = d->m_resizeObject;
- KoRect objRect = obj->geometry();
+ KoRect objRect = obj->tqgeometry();
objRect.moveBy( -xOffset(), -yOffset() );
- QRect oldBoundingRect( doc()->zoomRect( objRect ) );
+ TQRect oldBoundingRect( doc()->zoomRect( objRect ) );
bool left = false;
bool right = false;
@@ -3440,22 +3440,22 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep
if ( _modType == MT_RESIZE_UP || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_RU )
{
top = true;
-// snapStatus |= KoGuides::SNAP_HORIZ;
+// snaptqStatus |= KoGuides::SNAP_HORIZ;
}
if ( _modType == MT_RESIZE_DN || _modType == MT_RESIZE_LD || _modType == MT_RESIZE_RD )
{
bottom = true;
-// snapStatus |= KoGuides::SNAP_HORIZ;
+// snaptqStatus |= KoGuides::SNAP_HORIZ;
}
if ( _modType == MT_RESIZE_LF || _modType == MT_RESIZE_LU || _modType == MT_RESIZE_LD )
{
left = true;
-// snapStatus |= KoGuides::SNAP_VERT;
+// snaptqStatus |= KoGuides::SNAP_VERT;
}
if ( _modType == MT_RESIZE_RT || _modType == MT_RESIZE_RU || _modType == MT_RESIZE_RD )
{
right = true;
-// snapStatus |= KoGuides::SNAP_VERT;
+// snaptqStatus |= KoGuides::SNAP_VERT;
}
double newLeft = objRect.left();
@@ -3572,38 +3572,38 @@ void Canvas::resizeObject( ModifyType _modType, const KoPoint & point, bool keep
// {
// sp.setY( rect.bottom() );
// }
-// m_gl.repaintSnapping( sp, snapStatus );
+// m_gl.tqrepaintSnapping( sp, snaptqStatus );
// }
- repaint( oldBoundingRect );
- repaintObject( obj );
+ tqrepaint( oldBoundingRect );
+ tqrepaintObject( obj );
emit objectSizeChanged();
}
}
-void Canvas::finishResizeObject( const QString &/*name*/, bool /*layout*/ )
+void Canvas::finishResizeObject( const TQString &/*name*/, bool /*tqlayout*/ )
{
if ( d->m_resizeObject )
{
- KoPoint move = KoPoint( d->m_resizeObject->geometry().x() - d->m_rectBeforeResize.x(),
- d->m_resizeObject->geometry().y() - d->m_rectBeforeResize.y() );
- KoSize size = KoSize( d->m_resizeObject->geometry().width() - d->m_rectBeforeResize.width(),
- d->m_resizeObject->geometry().height() - d->m_rectBeforeResize.height() );
+ KoPoint move = KoPoint( d->m_resizeObject->tqgeometry().x() - d->m_rectBeforeResize.x(),
+ d->m_resizeObject->tqgeometry().y() - d->m_rectBeforeResize.y() );
+ KoSize size = KoSize( d->m_resizeObject->tqgeometry().width() - d->m_rectBeforeResize.width(),
+ d->m_resizeObject->tqgeometry().height() - d->m_rectBeforeResize.height() );
- if ( ( d->m_resizeObject->geometry() ) != d->m_rectBeforeResize )
+ if ( ( d->m_resizeObject->tqgeometry() ) != d->m_rectBeforeResize )
{
ChangeObjectGeometryCommand *resizeCmd = new ChangeObjectGeometryCommand( d->m_resizeObject, move, size );
// the command is not executed as the object is allready resized.
doc()->addCommand( resizeCmd );
}
-// if ( layout )
-// doc()->layout( m_resizeObject );
+// if ( tqlayout )
+// doc()->tqlayout( m_resizeObject );
d->m_ratio = 0.0;
d->m_isResizing = false;
- repaintObject( d->m_resizeObject );
+ tqrepaintObject( d->m_resizeObject );
d->m_resizeObject = NULL;
}
}
@@ -3627,7 +3627,7 @@ void Canvas::lowerObject()
d->m_objectDisplayAbove = 0;
}
-void Canvas::displayObjectList( QPtrList<EmbeddedObject> &list )
+void Canvas::displayObjectList( TQPtrList<EmbeddedObject> &list )
{
list = doc()->embeddedObjects();
list.setAutoDelete( false );
@@ -3636,7 +3636,7 @@ void Canvas::displayObjectList( QPtrList<EmbeddedObject> &list )
{
// it can happen that the object is no longer there e.g. when
// the insert of the object is undone
- int pos = doc()->embeddedObjects().findRef( d->m_objectDisplayAbove );
+ int pos = doc()->embeddedObjects().tqfindRef( d->m_objectDisplayAbove );
if ( pos != -1 && d->m_objectDisplayAbove->isSelected() )
{
list.take( pos );
@@ -3667,9 +3667,9 @@ void Canvas::deleteEditor (bool saveChanges, bool array)
d->editWidget->setEditMode( false );
- QString t = d->cellEditor->text();
+ TQString t = d->cellEditor->text();
// Delete the cell editor first and after that update the document.
- // That means we get a synchronous repaint after the cell editor
+ // That means we get a synchronous tqrepaint after the cell editor
// widget is gone. Otherwise we may get painting errors.
delete d->cellEditor;
d->cellEditor = 0;
@@ -3679,9 +3679,9 @@ void Canvas::deleteEditor (bool saveChanges, bool array)
if ( t.at(0)=='=' )
{
//a formula
- int openParenthese = t.contains('(' );
- int closeParenthese = t.contains(')' );
- int diff = QABS( openParenthese - closeParenthese );
+ int openParenthese = t.tqcontains('(' );
+ int closeParenthese = t.tqcontains(')' );
+ int diff = TQABS( openParenthese - closeParenthese );
if ( openParenthese > closeParenthese )
{
for (int i=0; i < diff;i++)
@@ -3752,7 +3752,7 @@ bool Canvas::createEditor( EditorType ed, bool addFocus, bool captureArrowKeys )
double xpos = sheet->dblColumnPos( markerColumn() ) - xOffset();
- Sheet::LayoutDirection sheetDir = sheet->layoutDirection();
+ Sheet::LayoutDirection sheetDir = sheet->tqlayoutDirection();
bool rtlText = cell->strOutText().isRightToLeft();
// if sheet and cell direction don't match, then the editor's location
@@ -3765,40 +3765,40 @@ bool Canvas::createEditor( EditorType ed, bool addFocus, bool captureArrowKeys )
if ( sheetDir == Sheet::RightToLeft )
{
double dwidth = d->view->doc()->unzoomItX( width() );
- double w2 = QMAX( w, min_w );
+ double w2 = TQMAX( w, min_w );
xpos = dwidth - w2 - xpos;
}
double ypos = sheet->dblRowPos( markerRow() ) - yOffset();
- QPalette p = d->cellEditor->palette();
- QColorGroup g( p.active() );
+ TQPalette p = d->cellEditor->palette();
+ TQColorGroup g( p.active() );
- QColor color = cell->format()->textColor( markerColumn(), markerRow() );
+ TQColor color = cell->format()->textColor( markerColumn(), markerRow() );
if ( !color.isValid() )
- color = QApplication::palette().active().text();
- g.setColor( QColorGroup::Text, color);
+ color = TQApplication::tqpalette().active().text();
+ g.setColor( TQColorGroup::Text, color);
color = cell->bgColor( markerColumn(), markerRow() );
if ( !color.isValid() )
color = g.base();
- g.setColor( QColorGroup::Background, color );
+ g.setColor( TQColorGroup::Background, color );
- d->cellEditor->setPalette( QPalette( g, p.disabled(), g ) );
- QFont tmpFont = cell->format()->textFont( markerColumn(), markerRow() );
+ d->cellEditor->setPalette( TQPalette( g, p.disabled(), g ) );
+ TQFont tmpFont = cell->format()->textFont( markerColumn(), markerRow() );
tmpFont.setPointSizeFloat( 0.01 * d->view->doc()->zoom() * tmpFont.pointSizeFloat() );
d->cellEditor->setFont( tmpFont );
KoRect rect( xpos, ypos, w, h ); //needed to circumvent rounding issue with height/width
- QRect zoomedRect=d->view->doc()->zoomRect( rect );
+ TQRect zoomedRect=d->view->doc()->zoomRect( rect );
/*zoomedRect.setLeft(zoomedRect.left()-2);
zoomedRect.setRight(zoomedRect.right()+4);
zoomedRect.setTop(zoomedRect.top()-1);
zoomedRect.setBottom(zoomedRect.bottom()+2);*/
d->cellEditor->setGeometry( zoomedRect );
- d->cellEditor->setMinimumSize( QSize( d->view->doc()->zoomItX( min_w ), d->view->doc()->zoomItY( min_h ) ) );
+ d->cellEditor->setMinimumSize( TQSize( d->view->doc()->zoomItX( min_w ), d->view->doc()->zoomItY( min_h ) ) );
d->cellEditor->show();
//kdDebug(36001) << "FOCUS1" << endl;
//Laurent 2001-12-05
@@ -3817,10 +3817,10 @@ bool Canvas::createEditor( EditorType ed, bool addFocus, bool captureArrowKeys )
return true;
}
-void Canvas::repaintObject( EmbeddedObject *obj )
+void Canvas::tqrepaintObject( EmbeddedObject *obj )
{
- //Calculate where the object appears on the canvas widget and then repaint that part of the widget
- QRect canvasRelativeGeometry = doc()->zoomRect( obj->geometry() );
+ //Calculate where the object appears on the canvas widget and then tqrepaint that part of the widget
+ TQRect canvasRelativeGeometry = doc()->zoomRect( obj->tqgeometry() );
canvasRelativeGeometry.moveBy( (int)( -xOffset()*doc()->zoomedResolutionX() ) ,
(int)( -yOffset() * doc()->zoomedResolutionY()) );
@@ -3828,17 +3828,17 @@ void Canvas::repaintObject( EmbeddedObject *obj )
/* if ( !obj->isSelected() )
{
- KoRect g = obj->geometry();
+ KoRect g = obj->tqgeometry();
g.moveBy( -xOffset(), -yOffset() );
- QRect geometry( doc()->zoomRect( g ) );
+ TQRect tqgeometry( doc()->zoomRect( g ) );
- update( geometry );
+ update( tqgeometry );
}
else
{
- QPainter p(this);
+ TQPainter p(this);
p.translate( -xOffset() * doc()->zoomedResolutionX() , -yOffset() * doc()->zoomedResolutionY() );
- obj->draw(&p); //this goes faster than calling repaint
+ obj->draw(&p); //this goes faster than calling tqrepaint
p.end();
}*/
}
@@ -3846,16 +3846,16 @@ void Canvas::repaintObject( EmbeddedObject *obj )
void Canvas::copyOasisObjects()
{
// We'll create a store (ZIP format) in memory
- QBuffer buffer;
- QCString mimeType = "application/vnd.oasis.opendocument.spreadsheet";
- KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType );
+ TQBuffer buffer;
+ TQCString mimeType = "application/vnd.oasis.opendocument.spreadsheet";
+ KoStore* store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Write, mimeType );
Q_ASSERT( store );
Q_ASSERT( !store->bad() );
KoOasisStore oasisStore( store );
KoXmlWriter* manifestWriter = oasisStore.manifestWriter( mimeType );
- QString plainText;
+ TQString plainText;
KoPicture picture;
if ( !doc()->saveOasisHelper( store, manifestWriter, Doc::SaveSelected, &plainText, &picture )
|| !oasisStore.closeManifestWriter() )
@@ -3867,7 +3867,7 @@ void Canvas::copyOasisObjects()
KMultipleDrag* multiDrag = new KMultipleDrag();
if ( !plainText.isEmpty() )
- multiDrag->addDragObject( new QTextDrag( plainText, 0 ) );
+ multiDrag->addDragObject( new TQTextDrag( plainText, 0 ) );
if ( !picture.isNull() )
multiDrag->addDragObject( picture.dragObject( 0 ) );
KoStoreDrag* storeDrag = new KoStoreDrag( mimeType, 0 );
@@ -3876,30 +3876,30 @@ void Canvas::copyOasisObjects()
multiDrag->addDragObject( storeDrag );
//save the objects as pictures too so that other programs can access them
- QPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
itObject.toFirst();
if ( itObject.current() )
{
KoRect kr = objectRect(false);
- QRect r( kr.toQRect() );
- QPixmap pixmap( r.width(), r.height() );
+ TQRect r( kr.toTQRect() );
+ TQPixmap pixmap( r.width(), r.height() );
pixmap.fill( "white" );
- QPainter p(&pixmap);
+ TQPainter p(&pixmap);
for( ; itObject.current(); ++itObject )
{
if ( itObject.current()->isSelected() )
- p.drawPixmap( itObject.current()->geometry().toQRect().left() - r.left(), itObject.current()->geometry().toQRect().top() - r.top(), itObject.current()->toPixmap( 1.0 , 1.0 ) );
+ p.drawPixmap( itObject.current()->tqgeometry().toTQRect().left() - r.left(), itObject.current()->tqgeometry().toTQRect().top() - r.top(), itObject.current()->toPixmap( 1.0 , 1.0 ) );
}
p.end();
if (!pixmap.isNull())
{
- QImageDrag *imagedrag = new QImageDrag( pixmap.convertToImage() );
+ TQImageDrag *imagedrag = new TQImageDrag( pixmap.convertToImage() );
multiDrag->addDragObject( imagedrag );
}
}
- QDragObject *dragObject = multiDrag;
- QApplication::clipboard()->setData( dragObject, QClipboard::Clipboard );
+ TQDragObject *dragObject = multiDrag;
+ TQApplication::tqclipboard()->setData( dragObject, TQClipboard::Clipboard );
}
void Canvas::closeEditor()
@@ -3944,30 +3944,30 @@ void Canvas::setSelectionChangePaintDirty(Sheet* sheet, const Region& region)
void Canvas::updatePosWidget()
{
- QString buffer;
+ TQString buffer;
// No selection, or only one cell merged selected
if ( selectionInfo()->isSingular() )
{
if (activeSheet()->getLcMode())
{
- buffer = "L" + QString::number( markerRow() ) +
- "C" + QString::number( markerColumn() );
+ buffer = "L" + TQString::number( markerRow() ) +
+ "C" + TQString::number( markerColumn() );
}
else
{
buffer = Cell::columnName( markerColumn() ) +
- QString::number( markerRow() );
+ TQString::number( markerRow() );
}
}
else
{
if (activeSheet()->getLcMode())
{
- buffer = QString::number( (selectionInfo()->lastRange().bottom()-selectionInfo()->lastRange().top()+1) )+"Lx";
+ buffer = TQString::number( (selectionInfo()->lastRange().bottom()-selectionInfo()->lastRange().top()+1) )+"Lx";
if ( util_isRowSelected( selectionInfo()->lastRange() ) )
- buffer+=QString::number((KS_colMax-selectionInfo()->lastRange().left()+1))+"C";
+ buffer+=TQString::number((KS_colMax-selectionInfo()->lastRange().left()+1))+"C";
else
- buffer+=QString::number((selectionInfo()->lastRange().right()-selectionInfo()->lastRange().left()+1))+"C";
+ buffer+=TQString::number((selectionInfo()->lastRange().right()-selectionInfo()->lastRange().left()+1))+"C";
}
else
{
@@ -3975,9 +3975,9 @@ void Canvas::updatePosWidget()
//=> it's not a good display
//=> for the moment I display pos of marker
buffer=Cell::columnName( selectionInfo()->lastRange().left() ) +
- QString::number(selectionInfo()->lastRange().top()) + ":" +
- Cell::columnName( QMIN( KS_colMax, selectionInfo()->lastRange().right() ) ) +
- QString::number(selectionInfo()->lastRange().bottom());
+ TQString::number(selectionInfo()->lastRange().top()) + ":" +
+ Cell::columnName( TQMIN( KS_colMax, selectionInfo()->lastRange().right() ) ) +
+ TQString::number(selectionInfo()->lastRange().bottom());
//buffer=activeSheet()->columnLabel( m_iMarkerColumn );
//buffer+=tmp.setNum(m_iMarkerRow);
}
@@ -3989,7 +3989,7 @@ void Canvas::updatePosWidget()
void Canvas::equalizeRow()
{
- QRect s( selection() );
+ TQRect s( selection() );
RowFormat *rl = d->view->activeSheet()->rowFormat(s.top());
int size=rl->height(this);
if ( s.top() == s.bottom() )
@@ -3999,14 +3999,14 @@ void Canvas::equalizeRow()
Sheet *sheet = activeSheet();
if ( !sheet )
return;
- size=QMAX(d->view->activeSheet()->rowFormat(i)->height(this),size);
+ size=TQMAX(d->view->activeSheet()->rowFormat(i)->height(this),size);
}
d->view->vBorderWidget()->equalizeRow(size);
}
void Canvas::equalizeColumn()
{
- QRect s( selection() );
+ TQRect s( selection() );
ColumnFormat *cl = d->view->activeSheet()->columnFormat(s.left());
int size=cl->width(this);
if ( s.left() == s.right() )
@@ -4014,12 +4014,12 @@ void Canvas::equalizeColumn()
for(int i=s.left()+1;i<=s.right();i++)
{
- size=QMAX(d->view->activeSheet()->columnFormat(i)->width(this),size);
+ size=TQMAX(d->view->activeSheet()->columnFormat(i)->width(this),size);
}
d->view->hBorderWidget()->equalizeColumn(size);
}
-QRect Canvas::cellsInArea( const QRect area ) const
+TQRect Canvas::cellsInArea( const TQRect area ) const
{
KoRect unzoomedRect = d->view->doc()->unzoomRect( area );
@@ -4031,13 +4031,13 @@ QRect Canvas::cellsInArea( const QRect area ) const
int top_row = activeSheet()->topRow( unzoomedRect.top(), tmp );
int bottom_row = activeSheet()->bottomRow( unzoomedRect.bottom() );
- return QRect( left_col, top_row,
+ return TQRect( left_col, top_row,
right_col - left_col + 1, bottom_row - top_row + 1 );
}
-QRect Canvas::visibleCells() const
+TQRect Canvas::visibleCells() const
{
- return cellsInArea( QRect(0,0,width(),height()) );
+ return cellsInArea( TQRect(0,0,width(),height()) );
}
@@ -4053,18 +4053,18 @@ void Canvas::paintUpdates()
if (activeSheet() == NULL)
return;
- QPainter painter(this);
+ TQPainter painter(this);
//Save clip region
- QRegion rgnComplete( painter.clipRegion() );
- QWMatrix matrix;
+ TQRegion rgnComplete( painter.clipRegion() );
+ TQWMatrix matrix;
if ( d->view )
{
matrix = d->view->matrix();
}
else
{
- matrix = painter.worldMatrix();
+ matrix = painter.tqworldMatrix();
}
@@ -4073,12 +4073,12 @@ void Canvas::paintUpdates()
painter.save();
clipoutChildren( painter );
- KoRect unzoomedRect = d->view->doc()->unzoomRect( QRect( 0, 0, width(), height() ) );
+ KoRect unzoomedRect = d->view->doc()->unzoomRect( TQRect( 0, 0, width(), height() ) );
// unzoomedRect.moveBy( xOffset(), yOffset() );
/* paint any visible cell that has the paintDirty flag */
- QRect range = visibleCells();
+ TQRect range = visibleCells();
Cell* cell = NULL;
double topPos = activeSheet()->dblRowPos(range.top());
@@ -4100,20 +4100,20 @@ void Canvas::paintUpdates()
kdDebug(36001) << "painting dirty cells " << endl;
#endif
- QValueList<QPoint> mergedCellsPainted;
+ TQValueList<TQPoint> mergedCellsPainted;
for ( x = range.left(); x <= right; ++x )
{
for ( y = range.top(); y <= bottom; ++y )
{
- if ( sheet->cellIsPaintDirty( QPoint( x, y ) ) )
+ if ( sheet->cellIsPaintDirty( TQPoint( x, y ) ) )
{
cell = sheet->cellAt( x, y );
- // recalc and relayout only for non default cells
+ // recalc and retqlayout only for non default cells
if (!cell->isDefault())
{
if (cell->calcDirtyFlag()) cell->calc();
- if (cell->layoutDirtyFlag()) cell->makeLayout( painter, x, y );
+ if (cell->tqlayoutDirtyFlag()) cell->makeLayout( painter, x, y );
}
/* bool paintBordersBottom = false;
@@ -4123,10 +4123,10 @@ void Canvas::paintUpdates()
int paintBorder=Cell::Border_None;
- QPen bottomPen( cell->effBottomBorderPen( x, y ) );
- QPen rightPen( cell->effRightBorderPen( x, y ) );
- QPen leftPen( cell->effLeftBorderPen( x, y ) );
- QPen topPen( cell->effTopBorderPen( x, y ) );
+ TQPen bottomPen( cell->effBottomBorderPen( x, y ) );
+ TQPen rightPen( cell->effRightBorderPen( x, y ) );
+ TQPen leftPen( cell->effLeftBorderPen( x, y ) );
+ TQPen topPen( cell->effTopBorderPen( x, y ) );
// paint right border
// - if rightmost cell
@@ -4185,7 +4185,7 @@ void Canvas::paintUpdates()
}
cell->paintCell( unzoomedRect, painter, d->view, dblCorner,
- QPoint( x, y), paintBorder,
+ TQPoint( x, y), paintBorder,
rightPen,bottomPen,leftPen,topPen,
mergedCellsPainted);
}
@@ -4202,28 +4202,28 @@ void Canvas::paintUpdates()
paintHighlightedRanges(painter, unzoomedRect);
paintNormalMarker(painter, unzoomedRect);
- //restore clip region with children area
+ //restore clip region with tqchildren area
painter.restore();
//painter.setClipRegion( rgnComplete );
}
-void Canvas::clipoutChildren( QPainter& painter ) const
+void Canvas::clipoutChildren( TQPainter& painter ) const
{
- QRegion rgn = painter.clipRegion();
+ TQRegion rgn = painter.clipRegion();
if ( rgn.isEmpty() )
- rgn = QRegion( QRect( 0, 0, width(), height() ) );
+ rgn = TQRegion( TQRect( 0, 0, width(), height() ) );
const double horizontalOffset = -xOffset() * doc()->zoomedResolutionX();
const double verticalOffset = -yOffset() * doc()->zoomedResolutionY();
- QPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
for( ; itObject.current(); ++itObject )
{
if ( ( itObject.current() )->sheet() == activeSheet() )
{
- QRect childGeometry = doc()->zoomRect( itObject.current()->geometry());
+ TQRect childGeometry = doc()->zoomRect( itObject.current()->tqgeometry());
//The clipping region is given in device coordinates
//so subtract the current offset (scroll position) of the canvas
@@ -4232,25 +4232,25 @@ void Canvas::clipoutChildren( QPainter& painter ) const
if (painter.window().intersects(childGeometry))
rgn -= childGeometry;
- //painter.fillRect( doc()->zoomRect( itObject.current()->geometry() ), QColor("red" ) );
+ //painter.fillRect( doc()->zoomRect( itObject.current()->tqgeometry() ), TQColor("red" ) );
}
}
painter.setClipRegion( rgn );
}
-QRect Canvas::painterWindowGeometry( const QPainter& painter ) const
+TQRect Canvas::painterWindowGeometry( const TQPainter& painter ) const
{
- QRect zoomedWindowGeometry = painter.window();
+ TQRect zoomedWindowGeometry = painter.window();
zoomedWindowGeometry.moveBy( (int)( xOffset() * doc()->zoomedResolutionX() ) , (int)( yOffset() * doc()->zoomedResolutionY() ) );
return zoomedWindowGeometry;
}
-void Canvas::paintChildren( QPainter& painter, QWMatrix& /*matrix*/ )
+void Canvas::paintChildren( TQPainter& painter, TQWMatrix& /*matrix*/ )
{
- QPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> itObject( doc()->embeddedObjects() );
itObject.toFirst();
if ( !itObject.current() )
return;
@@ -4258,29 +4258,29 @@ void Canvas::paintChildren( QPainter& painter, QWMatrix& /*matrix*/ )
painter.save();
painter.translate( -xOffset() * doc()->zoomedResolutionX() , -yOffset() * doc()->zoomedResolutionY() );
- const QRect zoomedWindowGeometry = painterWindowGeometry( painter );
+ const TQRect zoomedWindowGeometry = painterWindowGeometry( painter );
const Sheet* sheet = activeSheet();
for( ; itObject.current(); ++itObject )
{
- QRect const zoomedObjectGeometry = doc()->zoomRect( itObject.current()->geometry() );
+ TQRect const zoomedObjectGeometry = doc()->zoomRect( itObject.current()->tqgeometry() );
if ( ( itObject.current() )->sheet() == activeSheet() &&
zoomedWindowGeometry.intersects( zoomedObjectGeometry ) )
{
- //To prevent unnecessary redrawing of the embedded object, we only repaint
+ //To prevent unnecessary redrawing of the embedded object, we only tqrepaint
//if one or more of the cells underneath the object has been marked as 'dirty'.
- QRect canvasRelativeGeometry = zoomedObjectGeometry;
+ TQRect canvasRelativeGeometry = zoomedObjectGeometry;
canvasRelativeGeometry.moveBy( (int)( -xOffset()*doc()->zoomedResolutionX() ) ,
(int)( -yOffset() * doc()->zoomedResolutionY()) );
- const QRect cellsUnderObject=cellsInArea( canvasRelativeGeometry );
+ const TQRect cellsUnderObject=cellsInArea( canvasRelativeGeometry );
bool redraw=false;
for (int x=cellsUnderObject.left();x<=cellsUnderObject.right();x++)
{
for (int y=cellsUnderObject.top();y<=cellsUnderObject.bottom();y++)
- if ( sheet->cellIsPaintDirty( QPoint(x,y) ) )
+ if ( sheet->cellIsPaintDirty( TQPoint(x,y) ) )
{
redraw=true;
break;
@@ -4296,10 +4296,10 @@ void Canvas::paintChildren( QPainter& painter, QWMatrix& /*matrix*/ )
painter.restore();
}
-void Canvas::paintHighlightedRanges(QPainter& painter, const KoRect& /*viewRect*/)
+void Canvas::paintHighlightedRanges(TQPainter& painter, const KoRect& /*viewRect*/)
{
- QValueList<QColor> colors = choice()->colors();
- QBrush nullBrush;
+ TQValueList<TQColor> colors = choice()->colors();
+ TQBrush nullBrush;
int index = 0;
Region::ConstIterator end(choice()->constEnd());
for (Region::ConstIterator it = choice()->constBegin(); it != end; ++it)
@@ -4311,7 +4311,7 @@ void Canvas::paintHighlightedRanges(QPainter& painter, const KoRect& /*viewRect*
continue;
}
- QRect region = (*it)->rect().normalize();
+ TQRect region = (*it)->rect().normalize();
//double positions[4];
//bool paintSides[4];
@@ -4321,12 +4321,12 @@ void Canvas::paintHighlightedRanges(QPainter& painter, const KoRect& /*viewRect*
//Convert region from sheet coordinates to canvas coordinates for use with the painter
//retrieveMarkerInfo(region,viewRect,positions,paintSides);
- QPen highlightPen( colors[(index) % colors.size()] ); // (*it)->color() );
+ TQPen highlightPen( colors[(index) % colors.size()] ); // (*it)->color() );
painter.setPen(highlightPen);
//Adjust the canvas coordinate - rect to take account of zoom level
- QRect zoomedRect;
+ TQRect zoomedRect;
zoomedRect.setCoords ( d->view->doc()->zoomItX(unzoomedRect.left()),
d->view->doc()->zoomItY(unzoomedRect.top()),
@@ -4348,8 +4348,8 @@ void Canvas::paintHighlightedRanges(QPainter& painter, const KoRect& /*viewRect*
//click and drag to resize the region)
- QBrush sizeGripBrush( colors[(index) % colors.size()] ); // (*it)->color());
- QPen sizeGripPen(Qt::white);
+ TQBrush sizeGripBrush( colors[(index) % colors.size()] ); // (*it)->color());
+ TQPen sizeGripPen(TQt::white);
painter.setPen(sizeGripPen);
painter.setBrush(sizeGripBrush);
@@ -4359,7 +4359,7 @@ void Canvas::paintHighlightedRanges(QPainter& painter, const KoRect& /*viewRect*
}
}
-void Canvas::paintNormalMarker(QPainter& painter, const KoRect &viewRect)
+void Canvas::paintNormalMarker(TQPainter& painter, const KoRect &viewRect)
{
//Only the active element (the one with the anchor) will be drawn with a border
@@ -4372,13 +4372,13 @@ void Canvas::paintNormalMarker(QPainter& painter, const KoRect &viewRect)
Region::ConstIterator end(selectionInfo()->constEnd());
for (Region::ConstIterator it(selectionInfo()->constBegin()); it != end; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
double positions[4];
bool paintSides[4];
- bool current = QRect(selectionInfo()->anchor(), selectionInfo()->marker()).normalize() == range;
- QPen pen( Qt::black, 2 );
+ bool current = TQRect(selectionInfo()->anchor(), selectionInfo()->marker()).normalize() == range;
+ TQPen pen( TQt::black, 2 );
painter.setPen( pen );
retrieveMarkerInfo( selectionInfo()->extendToMergedAreas(range), viewRect, positions, paintSides );
@@ -4406,7 +4406,7 @@ void Canvas::paintNormalMarker(QPainter& painter, const KoRect &viewRect)
painter.drawLine( d->view->doc()->zoomItX( left ) - l, d->view->doc()->zoomItY( top ),
d->view->doc()->zoomItX( right ) + l, d->view->doc()->zoomItY( top ) );
}
- if ( activeSheet()->layoutDirection()==Sheet::RightToLeft )
+ if ( activeSheet()->tqlayoutDirection()==Sheet::RightToLeft )
{
if ( paintRight )
{
@@ -4437,7 +4437,7 @@ void Canvas::paintNormalMarker(QPainter& painter, const KoRect &viewRect)
}
}
}
- else // activeSheet()->layoutDirection()==Sheet::LeftToRight
+ else // activeSheet()->tqlayoutDirection()==Sheet::LeftToRight
{
if ( paintLeft )
{
@@ -4471,11 +4471,11 @@ void Canvas::paintNormalMarker(QPainter& painter, const KoRect &viewRect)
}
}
-void Canvas::sheetAreaToRect(const QRect& sheetArea, KoRect& rect)
+void Canvas::sheetAreaToRect(const TQRect& sheetArea, KoRect& rect)
{
Sheet* sheet=activeSheet();
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
rect.setLeft(sheet->dblColumnPos( sheetArea.right()+1 ) );
rect.setRight(sheet->dblColumnPos( sheetArea.left() ));
@@ -4491,7 +4491,7 @@ void Canvas::sheetAreaToRect(const QRect& sheetArea, KoRect& rect)
}
-void Canvas::sheetAreaToVisibleRect( const QRect& sheetArea,
+void Canvas::sheetAreaToVisibleRect( const TQRect& sheetArea,
KoRect& visibleRect )
{
Sheet* sheet=activeSheet();
@@ -4503,7 +4503,7 @@ void Canvas::sheetAreaToVisibleRect( const QRect& sheetArea,
double xpos;
double x;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
xpos = dwidth - sheet->dblColumnPos( sheetArea.right() ) + xOffset();
x = dwidth - sheet->dblColumnPos( sheetArea.left() ) + xOffset();
@@ -4526,7 +4526,7 @@ void Canvas::sheetAreaToVisibleRect( const QRect& sheetArea,
double h = ( y - ypos ) + th;
/* left, top, right, bottom */
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
visibleRect.setLeft(xpos - tw );
visibleRect.setRight(xpos - tw + w );
@@ -4540,7 +4540,7 @@ void Canvas::sheetAreaToVisibleRect( const QRect& sheetArea,
visibleRect.setBottom(ypos + h);
}
-void Canvas::retrieveMarkerInfo( const QRect &marker,
+void Canvas::retrieveMarkerInfo( const TQRect &marker,
const KoRect &viewRect,
double positions[],
bool paintSides[] )
@@ -4562,7 +4562,7 @@ void Canvas::retrieveMarkerInfo( const QRect &marker,
double xpos;
double x;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
xpos = dWidth - sheet->dblColumnPos( marker.right() ) + xOffset();
x = dWidth - sheet->dblColumnPos( marker.left() ) + xOffset();
@@ -4584,7 +4584,7 @@ void Canvas::retrieveMarkerInfo( const QRect &marker,
double h = ( y - ypos ) + th;
//left, top, right, bottom
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
positions[0] = xpos - tw;
positions[2] = xpos - tw + w;
@@ -4608,7 +4608,7 @@ void Canvas::retrieveMarkerInfo( const QRect &marker,
(bottom >= viewRect.top()) && (top <= viewRect.bottom());
paintSides[1] = (viewRect.top() <= top) && (top <= viewRect.bottom())
&& (right >= viewRect.left()) && (left <= viewRect.right());
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
paintSides[2] = (viewRect.left() <= right ) &&
(right - 1 <= viewRect.right()) &&
(bottom >= viewRect.top()) && (top <= viewRect.bottom());
@@ -4619,10 +4619,10 @@ void Canvas::retrieveMarkerInfo( const QRect &marker,
paintSides[3] = (viewRect.top() <= bottom) && (bottom <= viewRect.bottom())
&& (right >= viewRect.left()) && (left <= viewRect.right());
- positions[0] = QMAX( left, viewRect.left() );
- positions[1] = QMAX( top, viewRect.top() );
- positions[2] = QMIN( right, viewRect.right() );
- positions[3] = QMIN( bottom, viewRect.bottom() );
+ positions[0] = TQMAX( left, viewRect.left() );
+ positions[1] = TQMAX( top, viewRect.top() );
+ positions[2] = TQMIN( right, viewRect.right() );
+ positions[3] = TQMIN( bottom, viewRect.bottom() );
}
@@ -4632,8 +4632,8 @@ void Canvas::retrieveMarkerInfo( const QRect &marker,
*
****************************************************************/
-VBorder::VBorder( QWidget *_parent, Canvas *_canvas, View *_view)
- : QWidget( _parent, "", /*WNorthWestGravity*/WStaticContents | WResizeNoErase | WRepaintNoErase )
+VBorder::VBorder( TQWidget *_parent, Canvas *_canvas, View *_view)
+ : TQWidget( _parent, "", /*WNorthWestGravity*/WStaticContents | WResizeNoErase | WRepaintNoErase )
{
m_pView = _view;
m_pCanvas = _canvas;
@@ -4646,8 +4646,8 @@ VBorder::VBorder( QWidget *_parent, Canvas *_canvas, View *_view)
m_iSelectionAnchor=1;
m_bMousePressed = false;
- m_scrollTimer = new QTimer( this );
- connect (m_scrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) );
+ m_scrollTimer = new TQTimer( this );
+ connect (m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( doAutoScroll() ) );
}
@@ -4656,18 +4656,18 @@ VBorder::~VBorder()
delete m_scrollTimer;
}
-QSize VBorder::sizeHint() const
+TQSize VBorder::tqsizeHint() const
{
- return QSize( 40, 10 );
+ return TQSize( 40, 10 );
}
-void VBorder::mousePressEvent( QMouseEvent * _ev )
+void VBorder::mousePressEvent( TQMouseEvent * _ev )
{
if ( !m_pView->koDocument()->isReadWrite() )
return;
- if ( _ev->button() == LeftButton )
+ if ( _ev->button() == Qt::LeftButton )
m_bMousePressed = true;
const Sheet *sheet = m_pCanvas->activeSheet();
@@ -4732,16 +4732,16 @@ void VBorder::mousePressEvent( QMouseEvent * _ev )
m_iSelectionAnchor = hit_row;
- if ( !m_pView->selectionInfo()->contains( QPoint(1, hit_row) ) ||
- !( _ev->button() == RightButton ) ||
+ if ( !m_pView->selectionInfo()->tqcontains( TQPoint(1, hit_row) ) ||
+ !( _ev->button() == Qt::RightButton ) ||
!m_pView->selectionInfo()->isRowSelected() )
{
- QPoint newMarker( 1, hit_row );
- QPoint newAnchor( KS_colMax, hit_row );
+ TQPoint newMarker( 1, hit_row );
+ TQPoint newAnchor( KS_colMax, hit_row );
#ifdef NONCONTIGUOUSSELECTION
if (_ev->state() == ControlButton)
{
- m_pView->selectionInfo()->extend(QRect(newAnchor, newMarker));
+ m_pView->selectionInfo()->extend(TQRect(newAnchor, newMarker));
}
else
#endif
@@ -4751,13 +4751,13 @@ void VBorder::mousePressEvent( QMouseEvent * _ev )
}
else
{
- m_pView->selectionInfo()->initialize(QRect(newAnchor, newMarker));
+ m_pView->selectionInfo()->initialize(TQRect(newAnchor, newMarker));
}
}
- if ( _ev->button() == RightButton )
+ if ( _ev->button() == Qt::RightButton )
{
- QPoint p = mapToGlobal( _ev->pos() );
+ TQPoint p = mapToGlobal( _ev->pos() );
m_pView->popupRowMenu( p );
m_bSelection = false;
}
@@ -4765,7 +4765,7 @@ void VBorder::mousePressEvent( QMouseEvent * _ev )
}
}
-void VBorder::mouseReleaseEvent( QMouseEvent * _ev )
+void VBorder::mouseReleaseEvent( TQMouseEvent * _ev )
{
if ( m_scrollTimer->isActive() )
m_scrollTimer->stop();
@@ -4784,7 +4784,7 @@ void VBorder::mouseReleaseEvent( QMouseEvent * _ev )
if ( m_bResize )
{
// Remove size indicator painted by paintSizeIndicator
- QPainter painter;
+ TQPainter painter;
painter.begin( m_pCanvas );
painter.setRasterOp( NotROP );
painter.drawLine( 0, m_iResizePos, m_pCanvas->width(), m_iResizePos );
@@ -4792,11 +4792,11 @@ void VBorder::mouseReleaseEvent( QMouseEvent * _ev )
int start = m_iResizedRow;
int end = m_iResizedRow;
- QRect rect;
+ TQRect rect;
rect.setCoords( 1, m_iResizedRow, KS_colMax, m_iResizedRow );
if ( m_pView->selectionInfo()->isRowSelected() )
{
- if ( m_pView->selectionInfo()->contains( QPoint( 1, m_iResizedRow ) ) )
+ if ( m_pView->selectionInfo()->tqcontains( TQPoint( 1, m_iResizedRow ) ) )
{
start = m_pView->selectionInfo()->lastRange().top();
end = m_pView->selectionInfo()->lastRange().bottom();
@@ -4844,7 +4844,7 @@ void VBorder::mouseReleaseEvent( QMouseEvent * _ev )
}
else if ( m_bSelection )
{
- QRect rect = m_pView->selectionInfo()->lastRange();
+ TQRect rect = m_pView->selectionInfo()->lastRange();
// TODO: please don't remove. Right now it's useless, but it's for a future feature
// Norbert
@@ -4855,7 +4855,7 @@ void VBorder::mouseReleaseEvent( QMouseEvent * _ev )
int i;
RowFormat * row;
- QValueList<int>hiddenRows;
+ TQValueList<int>hiddenRows;
for ( i = rect.top(); i <= rect.bottom(); ++i )
{
@@ -4880,7 +4880,7 @@ void VBorder::equalizeRow( double resize )
Sheet *sheet = m_pCanvas->activeSheet();
Q_ASSERT( sheet );
- QRect selection( m_pView->selectionInfo()->selection() );
+ TQRect selection( m_pView->selectionInfo()->selection() );
if ( !m_pCanvas->d->view->doc()->undoLocked() )
{
UndoResizeColRow *undo = new UndoResizeColRow( m_pCanvas->d->view->doc(), m_pCanvas->activeSheet(), selection );
@@ -4890,12 +4890,12 @@ void VBorder::equalizeRow( double resize )
for ( int i = selection.top(); i <= selection.bottom(); i++ )
{
rl = sheet->nonDefaultRowFormat( i );
- resize = QMAX( 2.0, resize);
+ resize = TQMAX( 2.0, resize);
rl->setDblHeight( resize );
}
}
-void VBorder::mouseDoubleClickEvent(QMouseEvent*)
+void VBorder::mouseDoubleClickEvent(TQMouseEvent*)
{
Sheet *sheet = m_pCanvas->activeSheet();
if (!sheet)
@@ -4908,7 +4908,7 @@ void VBorder::mouseDoubleClickEvent(QMouseEvent*)
}
-void VBorder::mouseMoveEvent( QMouseEvent * _ev )
+void VBorder::mouseMoveEvent( TQMouseEvent * _ev )
{
if ( !m_pView->koDocument()->isReadWrite() )
return;
@@ -4935,8 +4935,8 @@ void VBorder::mouseMoveEvent( QMouseEvent * _ev )
if ( row > KS_rowMax )
return;
- QPoint newAnchor = m_pView->selectionInfo()->anchor();
- QPoint newMarker = m_pView->selectionInfo()->marker();
+ TQPoint newAnchor = m_pView->selectionInfo()->anchor();
+ TQPoint newMarker = m_pView->selectionInfo()->marker();
newMarker.setY( row );
newAnchor.setY( m_iSelectionAnchor );
m_pView->selectionInfo()->update(newMarker);
@@ -4990,11 +4990,11 @@ void VBorder::doAutoScroll()
return;
}
- QPoint pos( mapFromGlobal( QCursor::pos() ) );
+ TQPoint pos( mapFromGlobal( TQCursor::pos() ) );
if ( pos.y() < 0 || pos.y() > height() )
{
- QMouseEvent * event = new QMouseEvent( QEvent::MouseMove, pos, 0, 0 );
+ TQMouseEvent * event = new TQMouseEvent( TQEvent::MouseMove, pos, 0, 0 );
mouseMoveEvent( event );
delete event;
}
@@ -5003,10 +5003,10 @@ void VBorder::doAutoScroll()
m_scrollTimer->start( 50 );
}
-void VBorder::wheelEvent( QWheelEvent* _ev )
+void VBorder::wheelEvent( TQWheelEvent* _ev )
{
if ( m_pCanvas->vertScrollBar() )
- QApplication::sendEvent( m_pCanvas->vertScrollBar(), _ev );
+ TQApplication::sendEvent( m_pCanvas->vertScrollBar(), _ev );
}
@@ -5016,7 +5016,7 @@ void VBorder::paintSizeIndicator( int mouseY, bool firstTime )
if (!sheet)
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( m_pCanvas );
painter.setRasterOp( NotROP );
@@ -5034,11 +5034,11 @@ void VBorder::paintSizeIndicator( int mouseY, bool firstTime )
painter.end();
- QString tmpSize;
+ TQString tmpSize;
if ( m_iResizePos != y )
- tmpSize = i18n("Height: %1 %2").arg( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItY( m_iResizePos - y ),
+ tmpSize = i18n("Height: %1 %2").tqarg( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItY( m_iResizePos - y ),
m_pView->doc()->unit() ) )
- .arg( m_pView->doc()->unitName() );
+ .tqarg( m_pView->doc()->unitName() );
else
tmpSize = i18n( "Hide Row" );
@@ -5049,22 +5049,22 @@ void VBorder::paintSizeIndicator( int mouseY, bool firstTime )
if ( !m_lSize )
{
- m_lSize = new QLabel( m_pCanvas );
+ m_lSize = new TQLabel( m_pCanvas );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
m_lSize->setGeometry( m_pCanvas->width() - len - 5,
y + 3, len + 2, hei + 2 );
else
m_lSize->setGeometry( 3, y + 3, len + 2,hei + 2 );
- m_lSize->setAlignment( Qt::AlignVCenter );
+ m_lSize->tqsetAlignment( TQt::AlignVCenter );
m_lSize->setText( tmpSize );
- m_lSize->setPalette( QToolTip::palette() );
+ m_lSize->setPalette( TQToolTip::palette() );
m_lSize->show();
}
else
{
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
m_lSize->setGeometry( m_pCanvas->width() - len - 5,
y + 3, len + 2, hei + 2 );
else
@@ -5085,22 +5085,22 @@ void VBorder::updateRows( int from, int to )
update( 0, y0, width(), y1-y0 );
}
-void VBorder::paintEvent( QPaintEvent* _ev )
+void VBorder::paintEvent( TQPaintEvent* _ev )
{
Sheet *sheet = m_pCanvas->activeSheet();
if ( !sheet )
return;
- QPainter painter( this );
- QColor highlightColor = View::highlightColor();
- QPen pen( Qt::black, 1 );
+ TQPainter painter( this );
+ TQColor highlightColor = View::highlightColor();
+ TQPen pen( TQt::black, 1 );
painter.setPen( pen );
- // painter.setBackgroundColor( colorGroup().base() );
+ // painter.setBackgroundColor( tqcolorGroup().base() );
// painter.eraseRect( _ev->rect() );
- //QFontMetrics fm = painter.fontMetrics();
- // Matthias Elter: This causes a SEGFAULT in ~QPainter!
+ //TQFontMetrics fm = painter.fontMetrics();
+ // Matthias Elter: This causes a SEGFAULT in ~TQPainter!
// Only god and the trolls know why ;-)
// bah...took me quite some time to track this one down...
@@ -5113,13 +5113,13 @@ void VBorder::paintEvent( QPaintEvent* _ev )
yPos = yPos - m_pCanvas->yOffset();
int width = m_pCanvas->d->view->doc()->zoomItX( YBORDER_WIDTH );
- QFont normalFont = painter.font();
+ TQFont normalFont = painter.font();
if ( m_pCanvas->d->view->doc()->zoom() < 100 )
{
normalFont.setPointSizeFloat( 0.01 * m_pCanvas->d->view->doc()->zoom() *
normalFont.pointSizeFloat() );
}
- QFont boldFont = normalFont;
+ TQFont boldFont = normalFont;
boldFont.setBold( true );
//Loop through the rows, until we are out of range
@@ -5134,32 +5134,32 @@ void VBorder::paintEvent( QPaintEvent* _ev )
if ( selected )
{
- QBrush fillSelected( highlightColor );
+ TQBrush fillSelected( highlightColor );
qDrawPlainRect ( &painter, 0, zoomedYPos, width, height+1, highlightColor.dark(150),
1, &fillSelected );
}
else if ( highlighted )
{
- QBrush fillHighlighted( highlightColor );
+ TQBrush fillHighlighted( highlightColor );
qDrawPlainRect ( &painter, 0, zoomedYPos, width, height+1, highlightColor.dark(150),
1, &fillHighlighted );
}
else
{
- QColor c = colorGroup().background();
- QBrush fill( c );
+ TQColor c = tqcolorGroup().background();
+ TQBrush fill( c );
qDrawPlainRect ( &painter, 0, zoomedYPos, width, height+1, c.dark(150),
1, &fill );
}
- QString rowText = QString::number( y );
+ TQString rowText = TQString::number( y );
// Reset painter
painter.setFont( normalFont );
- painter.setPen( colorGroup().text() );
+ painter.setPen( tqcolorGroup().text() );
if ( selected )
- painter.setPen( colorGroup().highlightedText() );
+ painter.setPen( tqcolorGroup().highlightedText() );
else if ( highlighted )
painter.setFont( boldFont );
@@ -5175,7 +5175,7 @@ void VBorder::paintEvent( QPaintEvent* _ev )
}
-void VBorder::focusOutEvent( QFocusEvent* )
+void VBorder::focusOutEvent( TQFocusEvent* )
{
if ( m_scrollTimer->isActive() )
m_scrollTimer->stop();
@@ -5189,8 +5189,8 @@ void VBorder::focusOutEvent( QFocusEvent* )
*
****************************************************************/
-HBorder::HBorder( QWidget *_parent, Canvas *_canvas,View *_view )
- : QWidget( _parent, "", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase )
+HBorder::HBorder( TQWidget *_parent, Canvas *_canvas,View *_view )
+ : TQWidget( _parent, "", /*WNorthWestGravity*/ WStaticContents| WResizeNoErase | WRepaintNoErase )
{
m_pView = _view;
m_pCanvas = _canvas;
@@ -5202,8 +5202,8 @@ HBorder::HBorder( QWidget *_parent, Canvas *_canvas,View *_view )
m_iSelectionAnchor=1;
m_bMousePressed = false;
- m_scrollTimer = new QTimer( this );
- connect( m_scrollTimer, SIGNAL( timeout() ), this, SLOT( doAutoScroll() ) );
+ m_scrollTimer = new TQTimer( this );
+ connect( m_scrollTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( doAutoScroll() ) );
}
@@ -5212,17 +5212,17 @@ HBorder::~HBorder()
delete m_scrollTimer;
}
-QSize HBorder::sizeHint() const
+TQSize HBorder::tqsizeHint() const
{
- return QSize( 40, 10 );
+ return TQSize( 40, 10 );
}
-void HBorder::mousePressEvent( QMouseEvent * _ev )
+void HBorder::mousePressEvent( TQMouseEvent * _ev )
{
if (!m_pView->koDocument()->isReadWrite())
return;
- if ( _ev->button() == LeftButton )
+ if ( _ev->button() == Qt::LeftButton )
m_bMousePressed = true;
const Sheet *sheet = m_pCanvas->activeSheet();
@@ -5239,7 +5239,7 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
double ev_PosX;
double dWidth = m_pCanvas->d->view->doc()->unzoomItX( width() );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
ev_PosX = dWidth - m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
else
ev_PosX = m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
@@ -5250,7 +5250,7 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
double x;
const double unzoomedPixel = m_pCanvas->d->view->doc()->unzoomItX( 1 );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
int tmpCol = sheet->leftColumn( m_pCanvas->xOffset(), x );
@@ -5319,7 +5319,7 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
{
// Determine the column to resize
double tmp;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
m_iResizedColumn = sheet->leftColumn( ev_PosX - 1, tmp );
// kdDebug() << "RColumn: " << m_iResizedColumn << ", PosX: " << ev_PosX << endl;
@@ -5348,16 +5348,16 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
m_iSelectionAnchor = hit_col;
- if ( !m_pView->selectionInfo()->contains( QPoint( hit_col, 1 ) ) ||
- !( _ev->button() == RightButton ) ||
+ if ( !m_pView->selectionInfo()->tqcontains( TQPoint( hit_col, 1 ) ) ||
+ !( _ev->button() == Qt::RightButton ) ||
!m_pView->selectionInfo()->isColumnSelected() )
{
- QPoint newMarker( hit_col, 1 );
- QPoint newAnchor( hit_col, KS_rowMax );
+ TQPoint newMarker( hit_col, 1 );
+ TQPoint newAnchor( hit_col, KS_rowMax );
#ifdef NONCONTIGUOUSSELECTION
if (_ev->state() == ControlButton)
{
- m_pView->selectionInfo()->extend(QRect(newAnchor, newMarker));
+ m_pView->selectionInfo()->extend(TQRect(newAnchor, newMarker));
}
else
#endif
@@ -5367,13 +5367,13 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
}
else
{
- m_pView->selectionInfo()->initialize(QRect(newAnchor, newMarker));
+ m_pView->selectionInfo()->initialize(TQRect(newAnchor, newMarker));
}
}
- if ( _ev->button() == RightButton )
+ if ( _ev->button() == Qt::RightButton )
{
- QPoint p = mapToGlobal( _ev->pos() );
+ TQPoint p = mapToGlobal( _ev->pos() );
m_pView->popupColumnMenu( p );
m_bSelection = false;
}
@@ -5381,7 +5381,7 @@ void HBorder::mousePressEvent( QMouseEvent * _ev )
}
}
-void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
+void HBorder::mouseReleaseEvent( TQMouseEvent * _ev )
{
if ( m_scrollTimer->isActive() )
m_scrollTimer->stop();
@@ -5401,7 +5401,7 @@ void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
double ev_PosX;
// Remove size indicator painted by paintSizeIndicator
- QPainter painter;
+ TQPainter painter;
painter.begin( m_pCanvas );
painter.setRasterOp( NotROP );
painter.drawLine( m_iResizePos, 0, m_iResizePos, m_pCanvas->height() );
@@ -5409,11 +5409,11 @@ void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
int start = m_iResizedColumn;
int end = m_iResizedColumn;
- QRect rect;
+ TQRect rect;
rect.setCoords( m_iResizedColumn, 1, m_iResizedColumn, KS_rowMax );
if ( m_pView->selectionInfo()->isColumnSelected() )
{
- if ( m_pView->selectionInfo()->contains( QPoint( m_iResizedColumn, 1 ) ) )
+ if ( m_pView->selectionInfo()->tqcontains( TQPoint( m_iResizedColumn, 1 ) ) )
{
start = m_pView->selectionInfo()->lastRange().left();
end = m_pView->selectionInfo()->lastRange().right();
@@ -5424,7 +5424,7 @@ void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
double width = 0.0;
double x;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
ev_PosX = dWidth - m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
else
ev_PosX = m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
@@ -5469,7 +5469,7 @@ void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
}
else if ( m_bSelection )
{
- QRect rect = m_pView->selectionInfo()->lastRange();
+ TQRect rect = m_pView->selectionInfo()->lastRange();
// TODO: please don't remove. Right now it's useless, but it's for a future feature
// Norbert
@@ -5480,7 +5480,7 @@ void HBorder::mouseReleaseEvent( QMouseEvent * _ev )
int i;
ColumnFormat * col;
- QValueList<int>hiddenCols;
+ TQValueList<int>hiddenCols;
for ( i = rect.left(); i <= rect.right(); ++i )
{
@@ -5505,7 +5505,7 @@ void HBorder::equalizeColumn( double resize )
Sheet *sheet = m_pCanvas->activeSheet();
Q_ASSERT( sheet );
- QRect selection( m_pView->selectionInfo()->selection() );
+ TQRect selection( m_pView->selectionInfo()->selection() );
if ( !m_pCanvas->d->view->doc()->undoLocked() )
{
UndoResizeColRow *undo = new UndoResizeColRow( m_pCanvas->d->view->doc(), m_pCanvas->activeSheet(), selection );
@@ -5515,13 +5515,13 @@ void HBorder::equalizeColumn( double resize )
for ( int i = selection.left(); i <= selection.right(); i++ )
{
cl = sheet->nonDefaultColumnFormat( i );
- resize = QMAX( 2.0, resize );
+ resize = TQMAX( 2.0, resize );
cl->setDblWidth( resize );
}
}
-void HBorder::mouseDoubleClickEvent(QMouseEvent*)
+void HBorder::mouseDoubleClickEvent(TQMouseEvent*)
{
Sheet *sheet = m_pCanvas->activeSheet();
if (!sheet)
@@ -5533,7 +5533,7 @@ void HBorder::mouseDoubleClickEvent(QMouseEvent*)
sheet->adjustColumn(*m_pCanvas->selectionInfo());
}
-void HBorder::mouseMoveEvent( QMouseEvent * _ev )
+void HBorder::mouseMoveEvent( TQMouseEvent * _ev )
{
if ( !m_pView->koDocument()->isReadWrite() )
return;
@@ -5545,7 +5545,7 @@ void HBorder::mouseMoveEvent( QMouseEvent * _ev )
double dWidth = m_pCanvas->d->view->doc()->unzoomItX( width() );
double ev_PosX;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
ev_PosX = dWidth - m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
else
ev_PosX = m_pCanvas->d->view->doc()->unzoomItX( _ev->pos().x() ) + m_pCanvas->xOffset();
@@ -5565,13 +5565,13 @@ void HBorder::mouseMoveEvent( QMouseEvent * _ev )
if ( col > KS_colMax )
return;
- QPoint newMarker = m_pView->selectionInfo()->marker();
- QPoint newAnchor = m_pView->selectionInfo()->anchor();
+ TQPoint newMarker = m_pView->selectionInfo()->marker();
+ TQPoint newAnchor = m_pView->selectionInfo()->anchor();
newMarker.setX( col );
newAnchor.setX( m_iSelectionAnchor );
m_pView->selectionInfo()->update(newMarker);
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
if ( _ev->pos().x() < width() - m_pCanvas->width() )
{
@@ -5607,7 +5607,7 @@ void HBorder::mouseMoveEvent( QMouseEvent * _ev )
const double unzoomedPixel = m_pCanvas->d->view->doc()->unzoomItX( 1 );
double x;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
int tmpCol = sheet->leftColumn( m_pCanvas->xOffset(), x );
@@ -5661,11 +5661,11 @@ void HBorder::doAutoScroll()
return;
}
- QPoint pos( mapFromGlobal( QCursor::pos() ) );
+ TQPoint pos( mapFromGlobal( TQCursor::pos() ) );
if ( pos.x() < 0 || pos.x() > width() )
{
- QMouseEvent * event = new QMouseEvent( QEvent::MouseMove, pos, 0, 0 );
+ TQMouseEvent * event = new TQMouseEvent( TQEvent::MouseMove, pos, 0, 0 );
mouseMoveEvent( event );
delete event;
}
@@ -5674,23 +5674,23 @@ void HBorder::doAutoScroll()
m_scrollTimer->start( 50 );
}
-void HBorder::wheelEvent( QWheelEvent* _ev )
+void HBorder::wheelEvent( TQWheelEvent* _ev )
{
if ( m_pCanvas->horzScrollBar() )
- QApplication::sendEvent( m_pCanvas->horzScrollBar(), _ev );
+ TQApplication::sendEvent( m_pCanvas->horzScrollBar(), _ev );
}
-void HBorder::resizeEvent( QResizeEvent* _ev )
+void HBorder::resizeEvent( TQResizeEvent* _ev )
{
// workaround to allow horizontal resizing and zoom changing when sheet
// direction and interface direction don't match (e.g. an RTL sheet on an
// LTR interface)
- if ( m_pCanvas->activeSheet() && m_pCanvas->activeSheet()->layoutDirection()==Sheet::RightToLeft && !QApplication::reverseLayout() )
+ if ( m_pCanvas->activeSheet() && m_pCanvas->activeSheet()->tqlayoutDirection()==Sheet::RightToLeft && !TQApplication::reverseLayout() )
{
int dx = _ev->size().width() - _ev->oldSize().width();
scroll(dx, 0);
}
- else if ( m_pCanvas->activeSheet() && m_pCanvas->activeSheet()->layoutDirection()==Sheet::LeftToRight && QApplication::reverseLayout() )
+ else if ( m_pCanvas->activeSheet() && m_pCanvas->activeSheet()->tqlayoutDirection()==Sheet::LeftToRight && TQApplication::reverseLayout() )
{
int dx = _ev->size().width() - _ev->oldSize().width();
scroll(-dx, 0);
@@ -5703,14 +5703,14 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime )
if (!sheet)
return;
- QPainter painter;
+ TQPainter painter;
painter.begin( m_pCanvas );
painter.setRasterOp( NotROP );
if ( !firstTime )
painter.drawLine( m_iResizePos, 0, m_iResizePos, m_pCanvas->height() );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
m_iResizePos = mouseX + m_pCanvas->width() - width();
else
m_iResizePos = mouseX;
@@ -5718,7 +5718,7 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime )
// Dont make the column have a width < 2 pixels.
int x = m_pCanvas->d->view->doc()->zoomItX( sheet->dblColumnPos( m_iResizedColumn ) - m_pCanvas->xOffset() );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
x = m_pCanvas->width() - x;
@@ -5735,12 +5735,12 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime )
painter.end();
- QString tmpSize;
+ TQString tmpSize;
if ( m_iResizePos != x )
tmpSize = i18n("Width: %1 %2")
- .arg( KGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->layoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ),
+ .tqarg( KGlobal::locale()->formatNumber( KoUnit::toUserValue( m_pCanvas->doc()->unzoomItX( (sheet->tqlayoutDirection()==Sheet::RightToLeft) ? x - m_iResizePos : m_iResizePos - x ),
m_pView->doc()->unit() )))
- .arg( m_pView->doc()->unitName() );
+ .tqarg( m_pView->doc()->unitName() );
else
tmpSize = i18n( "Hide Column" );
@@ -5751,21 +5751,21 @@ void HBorder::paintSizeIndicator( int mouseX, bool firstTime )
if ( !m_lSize )
{
- m_lSize = new QLabel( m_pCanvas );
+ m_lSize = new TQLabel( m_pCanvas );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
m_lSize->setGeometry( x - len - 5, 3, len + 2, hei + 2 );
else
m_lSize->setGeometry( x + 3, 3, len + 2, hei + 2 );
- m_lSize->setAlignment( Qt::AlignVCenter );
+ m_lSize->tqsetAlignment( TQt::AlignVCenter );
m_lSize->setText( tmpSize );
- m_lSize->setPalette( QToolTip::palette() );
+ m_lSize->setPalette( TQToolTip::palette() );
m_lSize->show();
}
else
{
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
m_lSize->setGeometry( x - len - 5, 3, len + 2, hei + 2 );
else
m_lSize->setGeometry( x + 3, 3, len + 2, hei + 2 );
@@ -5785,15 +5785,15 @@ void HBorder::updateColumns( int from, int to )
update( x0, 0, x1-x0, height() );
}
-void HBorder::paintEvent( QPaintEvent* _ev )
+void HBorder::paintEvent( TQPaintEvent* _ev )
{
Sheet * sheet = m_pCanvas->activeSheet();
if ( !sheet )
return;
- QColor highlightColor = View::highlightColor();
- QPainter painter( this );
- QPen pen( Qt::black, 1 );
+ TQColor highlightColor = View::highlightColor();
+ TQPainter painter( this );
+ TQPen pen( TQt::black, 1 );
painter.setPen( pen );
painter.setBackgroundColor( white );
@@ -5801,15 +5801,15 @@ void HBorder::paintEvent( QPaintEvent* _ev )
// painter.eraseRect( _ev->rect() );
- //QFontMetrics fm = painter.fontMetrics();
- // Matthias Elter: This causes a SEGFAULT in ~QPainter!
+ //TQFontMetrics fm = painter.fontMetrics();
+ // Matthias Elter: This causes a SEGFAULT in ~TQPainter!
// Only god and the trolls know why ;-)
// bah...took me quite some time to track this one down...
double xPos;
int x;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
//Get the left column and the current x-position
x = sheet->leftColumn( int( m_pCanvas->d->view->doc()->unzoomItX( width() ) - m_pCanvas->d->view->doc()->unzoomItX( _ev->rect().x() ) + m_pCanvas->xOffset() ), xPos );
@@ -5824,18 +5824,18 @@ void HBorder::paintEvent( QPaintEvent* _ev )
xPos = xPos - m_pCanvas->xOffset();
}
- int height = m_pCanvas->d->view->doc()->zoomItY( painter.font().pointSizeFloat() + 5 );
+ int height = m_pCanvas->d->view->doc()->zoomItY( TQFont(painter.font()).pointSizeFloat() + 5 );
- QFont normalFont = painter.font();
+ TQFont normalFont = painter.font();
if ( m_pCanvas->d->view->doc()->zoom() < 100 )
{
normalFont.setPointSizeFloat( 0.01 * m_pCanvas->d->view->doc()->zoom() *
normalFont.pointSizeFloat() );
}
- QFont boldFont = normalFont;
+ TQFont boldFont = normalFont;
boldFont.setBold( true );
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
if ( x > KS_colMax )
x = KS_colMax;
@@ -5854,35 +5854,35 @@ void HBorder::paintEvent( QPaintEvent* _ev )
if ( selected )
{
- QBrush fillSelected( highlightColor );
+ TQBrush fillSelected( highlightColor );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, highlightColor.dark(150),
1, &fillSelected );
}
else if ( highlighted )
{
- QBrush fillHighlighted( highlightColor );
+ TQBrush fillHighlighted( highlightColor );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, highlightColor.dark(150),
1, &fillHighlighted );
}
else
{
- QColor c = colorGroup().background();
- QBrush fill( c );
+ TQColor c = tqcolorGroup().background();
+ TQBrush fill( c );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, c.dark(150),
1, &fill );
}
// Reset painter
painter.setFont( normalFont );
- painter.setPen( colorGroup().text() );
+ painter.setPen( tqcolorGroup().text() );
if ( selected )
- painter.setPen( colorGroup().highlightedText() );
+ painter.setPen( tqcolorGroup().highlightedText() );
else if ( highlighted )
painter.setFont( boldFont );
if ( !m_pView->activeSheet()->getShowColumnNumber() )
{
- QString colText = Cell::columnName( x );
+ TQString colText = Cell::columnName( x );
int len = painter.fontMetrics().width( colText );
if ( !col_lay->isHide() )
painter.drawText( zoomedXPos + ( width - len ) / 2,
@@ -5891,7 +5891,7 @@ void HBorder::paintEvent( QPaintEvent* _ev )
}
else
{
- QString tmp;
+ TQString tmp;
int len = painter.fontMetrics().width( tmp.setNum(x) );
if (!col_lay->isHide())
painter.drawText( zoomedXPos + ( width - len ) / 2,
@@ -5917,35 +5917,35 @@ void HBorder::paintEvent( QPaintEvent* _ev )
if ( selected )
{
- QBrush fillSelected( highlightColor );
+ TQBrush fillSelected( highlightColor );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, highlightColor.dark(),
1, &fillSelected );
}
else if ( highlighted )
{
- QBrush fillHighlighted( highlightColor );
+ TQBrush fillHighlighted( highlightColor );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, highlightColor.dark(),
1, &fillHighlighted );
}
else
{
- QColor c = colorGroup().background();
- QBrush fill( c );
+ TQColor c = tqcolorGroup().background();
+ TQBrush fill( c );
qDrawPlainRect ( &painter, zoomedXPos, 0, width+1, height, c.dark(150),
1, &fill );
}
// Reset painter
painter.setFont( normalFont );
- painter.setPen( colorGroup().text() );
+ painter.setPen( tqcolorGroup().text() );
if ( selected )
- painter.setPen( colorGroup().highlightedText() );
+ painter.setPen( tqcolorGroup().highlightedText() );
else if ( highlighted )
painter.setFont( boldFont );
if ( !m_pView->activeSheet()->getShowColumnNumber() )
{
- QString colText = Cell::columnName( x );
+ TQString colText = Cell::columnName( x );
int len = painter.fontMetrics().width( colText );
if (!col_lay->isHide())
painter.drawText( zoomedXPos + ( width - len ) / 2,
@@ -5954,7 +5954,7 @@ void HBorder::paintEvent( QPaintEvent* _ev )
}
else
{
- QString tmp;
+ TQString tmp;
int len = painter.fontMetrics().width( tmp.setNum(x) );
if (!col_lay->isHide())
painter.drawText( zoomedXPos + ( width - len ) / 2,
@@ -5969,7 +5969,7 @@ void HBorder::paintEvent( QPaintEvent* _ev )
}
-void HBorder::focusOutEvent( QFocusEvent* )
+void HBorder::focusOutEvent( TQFocusEvent* )
{
if ( m_scrollTimer->isActive() )
m_scrollTimer->stop();
@@ -5983,28 +5983,28 @@ void HBorder::focusOutEvent( QFocusEvent* )
****************************************************************/
ToolTip::ToolTip( Canvas* canvas )
- : QToolTip( canvas ), m_canvas( canvas )
+ : TQToolTip( canvas ), m_canvas( canvas )
{
}
// find the label for the tip
-// this is a hack of course, because it's not available from QToolTip
-QLabel *tip_findLabel()
+// this is a hack of course, because it's not available from TQToolTip
+TQLabel *tip_findLabel()
{
- QWidgetList *list = QApplication::allWidgets();
- QWidgetListIt it( *list );
- QWidget * w;
+ TQWidgetList *list = TQApplication::tqallWidgets();
+ TQWidgetListIt it( *list );
+ TQWidget * w;
while ( (w=it.current()) != 0 )
{
- if(w->isA("QTipLabel"))
- return static_cast<QLabel*>(w);
+ if(w->isA("TQTipLabel"))
+ return static_cast<TQLabel*>(w);
++it;
}
delete list;
return 0;
}
-void ToolTip::maybeTip( const QPoint& p )
+void ToolTip::maybeTip( const TQPoint& p )
{
Sheet *sheet = m_canvas->activeSheet();
if ( !sheet )
@@ -6014,7 +6014,7 @@ void ToolTip::maybeTip( const QPoint& p )
double ypos, xpos;
double dwidth = m_canvas->doc()->unzoomItX( m_canvas->width() );
int col;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
col = sheet->leftColumn( (dwidth - m_canvas->doc()->unzoomItX( p.x() ) +
m_canvas->xOffset()), xpos );
else
@@ -6038,8 +6038,8 @@ void ToolTip::maybeTip( const QPoint& p )
// - cell content if the cell dimension is too small
// - cell comment
// - hyperlink
- QString tipText;
- QString comment = cell->format()->comment( col, row );
+ TQString tipText;
+ TQString comment = cell->format()->comment( col, row );
// If cell is too small, show the content
if ( cell->testFlag( Cell::Flag_CellTooShortX ) ||
@@ -6082,10 +6082,10 @@ void ToolTip::maybeTip( const QPoint& p )
}
// Get the cell dimensions
- QRect marker;
+ TQRect marker;
bool insideMarker = false;
- if ( sheet->layoutDirection()==Sheet::RightToLeft )
+ if ( sheet->tqlayoutDirection()==Sheet::RightToLeft )
{
KoRect unzoomedMarker( dwidth - u - xpos + m_canvas->xOffset(),
ypos - m_canvas->yOffset(),
@@ -6093,7 +6093,7 @@ void ToolTip::maybeTip( const QPoint& p )
v );
marker = m_canvas->doc()->zoomRect( unzoomedMarker );
- insideMarker = marker.contains( p );
+ insideMarker = marker.tqcontains( p );
}
else
{
@@ -6103,7 +6103,7 @@ void ToolTip::maybeTip( const QPoint& p )
v );
marker = m_canvas->doc()->zoomRect( unzoomedMarker );
- insideMarker = marker.contains( p );
+ insideMarker = marker.tqcontains( p );
}
// No use if mouse is somewhere else
@@ -6112,15 +6112,15 @@ void ToolTip::maybeTip( const QPoint& p )
// Find the tipLabel
// NOTE: if we failed, check again when the tip is shown already
- QLabel* tipLabel = tip_findLabel();
+ TQLabel* tipLabel = tip_findLabel();
// Ensure that it is plain text
// Not funny if (intentional or not) <a> appears as hyperlink
if ( tipLabel )
- tipLabel->setTextFormat( Qt::PlainText );
+ tipLabel->setTextFormat( TQt::PlainText );
- QFontMetrics fm = tipLabel ? tipLabel->fontMetrics() : m_canvas->fontMetrics();
- const QRect r( 0, 0, 200, -1 );
+ TQFontMetrics fm = tipLabel ? tipLabel->fontMetrics() : m_canvas->fontMetrics();
+ const TQRect r( 0, 0, 200, -1 );
// Wrap the text if too long
if ( tipText.length() > 16 )
{
@@ -6159,7 +6159,7 @@ void ToolTip::maybeTip( const QPoint& p )
{
tipLabel = tip_findLabel();
if( tipLabel )
- tipLabel->setTextFormat( Qt::PlainText );
+ tipLabel->setTextFormat( TQt::PlainText );
}
}
diff --git a/kspread/kspread_canvas.h b/kspread/kspread_canvas.h
index f6f18758..ce18e157 100644
--- a/kspread/kspread_canvas.h
+++ b/kspread/kspread_canvas.h
@@ -35,9 +35,9 @@
#include <vector>
-#include <qlineedit.h>
-#include <qtooltip.h>
-#include <qpen.h>
+#include <tqlineedit.h>
+#include <tqtooltip.h>
+#include <tqpen.h>
#include <ksharedptr.h>
@@ -48,12 +48,12 @@
#define YBORDER_WIDTH 50
#define XBORDER_HEIGHT 20
-class QWidget;
-class QTimer;
-class QButton;
-class QPainter;
-class QLabel;
-class QScrollBar;
+class TQWidget;
+class TQTimer;
+class TQButton;
+class TQPainter;
+class TQLabel;
+class TQScrollBar;
class KoRect;
class KoPoint;
@@ -86,13 +86,14 @@ class EmbeddedObject;
* That means that this class knows what to do when a key is pressed
* or if the mouse button was clicked.
*/
-class KSPREAD_EXPORT Canvas : public QWidget
+class KSPREAD_EXPORT Canvas : public TQWidget
{
friend class HBorder;
friend class VBorder;
friend class View;
Q_OBJECT
+ TQ_OBJECT
public:
/**
* The current action associated with the mouse.
@@ -137,13 +138,13 @@ public:
* @see Selection::lastRange()
* @see Selection::activeElement()
*/
- QRect selection() const;
+ TQRect selection() const;
/**
* convenience function.
* @return selection's marker
* @see Selection::marker()
*/
- QPoint marker() const;
+ TQPoint marker() const;
/**
* convenience function.
* @return selection's marker's column
@@ -160,7 +161,7 @@ public:
/**
* @return the pen, the default grid is painted with (light gray)
*/
- const QPen& defaultGridPen() const;
+ const TQPen& defaultGridPen() const;
/**
* convenience function
@@ -188,7 +189,7 @@ public:
/**
* @return a rect indicating which cell range is currently visible onscreen
*/
- QRect visibleCells() const;
+ TQRect visibleCells() const;
/**
* @return a pointer to the active sheet
@@ -198,7 +199,7 @@ public:
* convenience function
* @see Map::findSheet()
*/
- Sheet* findSheet( const QString& _name ) const;
+ Sheet* findSheet( const TQString& _name ) const;
/**
@@ -218,7 +219,7 @@ public:
*
* @param location the cell coordinates to scroll to
*/
- void scrollToCell(QPoint location) const;
+ void scrollToCell(TQPoint location) const;
/**
* Chooses the correct EditorType by looking at
* the current cells value. By default CellEditor is chosen.
@@ -254,7 +255,7 @@ public:
/**
* Switches to choose mode and sets the initial @p selection.
*/
- void startChoose( const QRect& selection );
+ void startChoose( const TQRect& selection );
/**
* Switches to selection mode.
* Clear the choice.
@@ -283,7 +284,7 @@ public:
*/
void closeEditor();
- // Created by the view since it's layout is managed there,
+ // Created by the view since it's tqlayout is managed there,
// but is in fact a sibling of the canvas, which needs to know about it.
void setEditWidget( KSpread::EditWidget * ew );
@@ -305,7 +306,7 @@ public:
double autoScrollAccelerationY( int offset );
//TODO: These embedded-object related methods need API documentation!
- EmbeddedObject* getObject( const QPoint &pos, Sheet *_sheet );
+ EmbeddedObject* getObject( const TQPoint &pos, Sheet *_sheet );
void selectAllObjects();
void deselectAllObjects();
void selectObject( EmbeddedObject* );
@@ -325,7 +326,7 @@ public:
/// resize the m_resizeObject
void resizeObject( ModifyType _modType, const KoPoint & point, bool keepRatio );
/// create KPrResizeCmd
- void finishResizeObject( const QString &name, bool layout = true );
+ void finishResizeObject( const TQString &name, bool tqlayout = true );
/**
* @brief Display object above the other objects in editiong mode
@@ -349,11 +350,11 @@ public:
*
* @return List of objects
*/
- void displayObjectList( QPtrList<EmbeddedObject> &list );
+ void displayObjectList( TQPtrList<EmbeddedObject> &list );
KoRect objectRect( bool all ) const;
- void repaintObject( EmbeddedObject *obj );
+ void tqrepaintObject( EmbeddedObject *obj );
/**
* This is intended to copy the selected objects to the clipboard so that they can be pasted into other
@@ -376,19 +377,19 @@ signals:
void objectSizeChanged();
protected:
- virtual void keyPressEvent ( QKeyEvent* _ev );
- virtual void paintEvent ( QPaintEvent* _ev );
- virtual void mousePressEvent( QMouseEvent* _ev );
- virtual void mouseReleaseEvent( QMouseEvent* _ev );
- virtual void mouseMoveEvent( QMouseEvent* _ev );
- virtual void mouseDoubleClickEvent( QMouseEvent* );
- virtual void wheelEvent( QWheelEvent* );
- virtual void focusInEvent( QFocusEvent* );
- virtual void focusOutEvent( QFocusEvent* );
- virtual void resizeEvent( QResizeEvent * _ev );
- virtual void dragMoveEvent(QDragMoveEvent * _ev);
- virtual void dropEvent(QDropEvent * _ev);
- virtual void dragLeaveEvent(QDragLeaveEvent * _ev);
+ virtual void keyPressEvent ( TQKeyEvent* _ev );
+ virtual void paintEvent ( TQPaintEvent* _ev );
+ virtual void mousePressEvent( TQMouseEvent* _ev );
+ virtual void mouseReleaseEvent( TQMouseEvent* _ev );
+ virtual void mouseMoveEvent( TQMouseEvent* _ev );
+ virtual void mouseDoubleClickEvent( TQMouseEvent* );
+ virtual void wheelEvent( TQWheelEvent* );
+ virtual void focusInEvent( TQFocusEvent* );
+ virtual void focusOutEvent( TQFocusEvent* );
+ virtual void resizeEvent( TQResizeEvent * _ev );
+ virtual void dragMoveEvent(TQDragMoveEvent * _ev);
+ virtual void dropEvent(TQDropEvent * _ev);
+ virtual void dragLeaveEvent(TQDragLeaveEvent * _ev);
/**
* Checks to see if there is a size grip for a highlight range at a given position.
@@ -406,18 +407,18 @@ private slots:
/**
* Scroll canvas when receiving this signal
*/
- void slotAutoScroll(const QPoint &scrollDist);
+ void slotAutoScroll(const TQPoint &scrollDist);
void doAutoScroll();
- void speakCell(QWidget* w, const QPoint& p, uint flags);
+ void speakCell(TQWidget* w, const TQPoint& p, uint flags);
private:
- virtual bool eventFilter( QObject *o, QEvent *e );
+ virtual bool eventFilter( TQObject *o, TQEvent *e );
HBorder* hBorderWidget() const;
VBorder* vBorderWidget() const;
- QScrollBar* horzScrollBar() const;
- QScrollBar* vertScrollBar() const;
+ TQScrollBar* horzScrollBar() const;
+ TQScrollBar* vertScrollBar() const;
/**
* Returns the area of the document currently visible in a painter's
@@ -425,27 +426,27 @@ private:
* translating it by the current x and y offset of the Canvas (taking
* the zoom level into account)
*/
- QRect painterWindowGeometry( const QPainter& painter ) const;
+ TQRect painterWindowGeometry( const TQPainter& painter ) const;
/**
* Enables clipping and removes the areas on the canvas widget occupied by embedded objects from
* the clip region. This ensures that subsequent drawing operations using the given painter
* don't paint over the area occupied by embedded objects
*/
- void clipoutChildren( QPainter& painter ) const;
+ void clipoutChildren( TQPainter& painter ) const;
/**
* Returns the range of cells which appear in the specified area of the Canvas widget
- * For example, cellsInArea( QRect(0,0,width(),height()) ) returns a range containing all visible cells
+ * For example, cellsInArea( TQRect(0,0,width(),height()) ) returns a range containing all visible cells
*
* @param area The area (in pixels) on the Canvas widget
*/
- QRect cellsInArea( const QRect area ) const;
+ TQRect cellsInArea( const TQRect area ) const;
/**
- * Paints the children
+ * Paints the tqchildren
*/
- void paintChildren( QPainter& painter, QWMatrix& matrix );
+ void paintChildren( TQPainter& painter, TQWMatrix& matrix );
/**
* @see #setLastEditorWithFocus
@@ -458,7 +459,7 @@ private:
void startTheDrag();
/* helpers for the paintUpdates function */
- void paintNormalMarker(QPainter& painter, const KoRect &viewRect);
+ void paintNormalMarker(TQPainter& painter, const KoRect &viewRect);
/**
* Paint the highlighted ranges of cells. When the user is editing a formula in a text box, cells and ranges referenced
@@ -466,7 +467,7 @@ private:
* @param painter The painter on which to draw the highlighted ranges
* @param viewRect The area currently visible on the canvas
*/
- void paintHighlightedRanges(QPainter& painter, const KoRect& viewRect);
+ void paintHighlightedRanges(TQPainter& painter, const KoRect& viewRect);
/**
* Calculates the visible region on the canvas occupied by a range of cells on the currently active sheet.
@@ -479,7 +480,7 @@ private:
* @param visibleRect This is set to the visible region occupied by the given range of cells
*
*/
- void sheetAreaToVisibleRect( const QRect& sheetArea,
+ void sheetAreaToVisibleRect( const TQRect& sheetArea,
KoRect& visibleRect );
/**
@@ -490,7 +491,7 @@ private:
* @param sheetArea The range of cells on the current sheet
* @param visibleRect This is set to the physical region occupied by the given range of cells
*/
- void sheetAreaToRect( const QRect& sheetArea, KoRect& rect );
+ void sheetAreaToRect( const TQRect& sheetArea, KoRect& rect );
/**
@@ -507,43 +508,43 @@ private:
* Again, these are in the order left, top, right, bottom.
* This should be preallocated with a size of at least 4.
*/
- void retrieveMarkerInfo( const QRect &marker, const KoRect &viewRect,
+ void retrieveMarkerInfo( const TQRect &marker, const KoRect &viewRect,
double positions[], bool paintSides[] );
- bool formatKeyPress( QKeyEvent * _ev );
+ bool formatKeyPress( TQKeyEvent * _ev );
/** helper method for formatKeyPress */
- bool formatCellByKey(Cell *cell, int key, const QRect &rect);
+ bool formatCellByKey(Cell *cell, int key, const TQRect &rect);
- void processClickSelectionHandle(QMouseEvent *event);
+ void processClickSelectionHandle(TQMouseEvent *event);
void processLeftClickAnchor();
/** current cursor position, be it marker or choose marker */
- QPoint cursorPos();
+ TQPoint cursorPos();
/**
* returns the rect that needs to be redrawn
*/
- QRect moveDirection(KSpread::MoveTo direction, bool extendSelection);
-
- void processEnterKey(QKeyEvent *event);
- void processArrowKey(QKeyEvent *event);
- void processEscapeKey(QKeyEvent *event);
- bool processHomeKey(QKeyEvent *event);
- bool processEndKey(QKeyEvent *event);
- bool processPriorKey(QKeyEvent *event);
- bool processNextKey(QKeyEvent *event);
- void processDeleteKey(QKeyEvent *event);
- void processF2Key(QKeyEvent *event);
- void processF4Key(QKeyEvent *event);
- void processOtherKey(QKeyEvent *event);
- bool processControlArrowKey(QKeyEvent *event);
-
- void processIMEvent( QIMEvent * event );
+ TQRect moveDirection(KSpread::MoveTo direction, bool extendSelection);
+
+ void processEnterKey(TQKeyEvent *event);
+ void processArrowKey(TQKeyEvent *event);
+ void processEscapeKey(TQKeyEvent *event);
+ bool processHomeKey(TQKeyEvent *event);
+ bool processEndKey(TQKeyEvent *event);
+ bool processPriorKey(TQKeyEvent *event);
+ bool processNextKey(TQKeyEvent *event);
+ void processDeleteKey(TQKeyEvent *event);
+ void processF2Key(TQKeyEvent *event);
+ void processF4Key(TQKeyEvent *event);
+ void processOtherKey(TQKeyEvent *event);
+ bool processControlArrowKey(TQKeyEvent *event);
+
+ void processIMEvent( TQIMEvent * event );
/**
* Used in choose mode. Shows/hides the editor depending on the selected
@@ -556,7 +557,7 @@ private:
* This function sets the paint dirty flag for a @p changedRegion in a
* @p sheet .
* The calculation which cells really should look different with the new
- * selection rather than repainting the entire area has to be done before.
+ * selection rather than tqrepainting the entire area has to be done before.
* @param sheet the sheet, which contains the cells
* @param changedRegion the cell region to be set as dirty
*/
@@ -572,11 +573,12 @@ private:
/**
* HBorder
*/
-class HBorder : public QWidget
+class HBorder : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- HBorder( QWidget *_parent, Canvas *_canvas, View *_view );
+ HBorder( TQWidget *_parent, Canvas *_canvas, View *_view );
~HBorder();
int markerColumn() const { return m_iSelectionAnchor; }
@@ -584,26 +586,26 @@ public:
void updateColumns( int from, int to );
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
private slots:
void doAutoScroll();
protected:
- virtual void paintEvent ( QPaintEvent* _ev );
- virtual void mousePressEvent( QMouseEvent* _ev );
- virtual void mouseReleaseEvent( QMouseEvent* _ev );
- virtual void mouseDoubleClickEvent( QMouseEvent* _ev );
- virtual void mouseMoveEvent( QMouseEvent* _ev );
- virtual void wheelEvent( QWheelEvent* );
- virtual void focusOutEvent( QFocusEvent* ev );
- virtual void resizeEvent( QResizeEvent * _ev );
+ virtual void paintEvent ( TQPaintEvent* _ev );
+ virtual void mousePressEvent( TQMouseEvent* _ev );
+ virtual void mouseReleaseEvent( TQMouseEvent* _ev );
+ virtual void mouseDoubleClickEvent( TQMouseEvent* _ev );
+ virtual void mouseMoveEvent( TQMouseEvent* _ev );
+ virtual void wheelEvent( TQWheelEvent* );
+ virtual void focusOutEvent( TQFocusEvent* ev );
+ virtual void resizeEvent( TQResizeEvent * _ev );
void paintSizeIndicator( int mouseX, bool firstTime );
private:
Canvas *m_pCanvas;
View *m_pView;
- QTimer * m_scrollTimer;
+ TQTimer * m_scrollTimer;
/**
* Flag that inidicates whether the user wants to mark columns.
@@ -643,7 +645,7 @@ private:
/**
* The label used for showing the current size, when resizing
*/
- QLabel *m_lSize;
+ TQLabel *m_lSize;
/**
* True when the mouse button is pressed
@@ -658,36 +660,37 @@ private:
/**
* VBorder
*/
-class VBorder : public QWidget
+class VBorder : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VBorder( QWidget *_parent, Canvas *_canvas, View *_view );
+ VBorder( TQWidget *_parent, Canvas *_canvas, View *_view );
~VBorder();
int markerRow() const { return m_iSelectionAnchor; }
void equalizeRow( double resize );
void updateRows( int from, int to );
- QSize sizeHint() const;
+ TQSize tqsizeHint() const;
private slots:
void doAutoScroll();
protected:
- virtual void paintEvent ( QPaintEvent* _ev );
- virtual void mousePressEvent( QMouseEvent* _ev );
- virtual void mouseReleaseEvent( QMouseEvent* _ev );
- virtual void mouseMoveEvent( QMouseEvent* _ev );
- virtual void mouseDoubleClickEvent( QMouseEvent* _ev );
- virtual void wheelEvent( QWheelEvent* );
- virtual void focusOutEvent( QFocusEvent* ev );
+ virtual void paintEvent ( TQPaintEvent* _ev );
+ virtual void mousePressEvent( TQMouseEvent* _ev );
+ virtual void mouseReleaseEvent( TQMouseEvent* _ev );
+ virtual void mouseMoveEvent( TQMouseEvent* _ev );
+ virtual void mouseDoubleClickEvent( TQMouseEvent* _ev );
+ virtual void wheelEvent( TQWheelEvent* );
+ virtual void focusOutEvent( TQFocusEvent* ev );
void paintSizeIndicator( int mouseY, bool firstTime );
private:
Canvas *m_pCanvas;
View *m_pView;
- QTimer * m_scrollTimer;
+ TQTimer * m_scrollTimer;
bool m_bSelection;
int m_iSelectionAnchor;
@@ -697,7 +700,7 @@ private:
/**
* The label used for showing the current size, when resizing
*/
- QLabel *m_lSize;
+ TQLabel *m_lSize;
/**
* True when the mouse button is pressed
@@ -710,7 +713,7 @@ private:
/**
* Tooltip, which displays the comment and cell content, when it's too short
*/
-class ToolTip : public QToolTip
+class ToolTip : public TQToolTip
{
public:
ToolTip( Canvas* canvas );
@@ -719,7 +722,7 @@ protected:
/**
* @reimp
*/
- void maybeTip( const QPoint& p );
+ void maybeTip( const TQPoint& p );
private:
Canvas* m_canvas;
diff --git a/kspread/kspread_cell.cc b/kspread/kspread_cell.cc
index 49e1d802..d71e0185 100644
--- a/kspread/kspread_cell.cc
+++ b/kspread/kspread_cell.cc
@@ -45,9 +45,9 @@
#include <float.h>
#include <math.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
#include "kspread_canvas.h"
#include "kspread_condition.h"
@@ -94,7 +94,7 @@ using namespace KSpread;
namespace Cell_LNS
{
- QChar decimal_point = '\0';
+ TQChar decimal_point = '\0';
}
using namespace Cell_LNS;
@@ -116,7 +116,7 @@ public:
Extra() {}
// Not empty when the cell holds a link
- QString link;
+ TQString link;
// Number of cells explicitly merged by the user in X and Y directions.
int mergedXCells;
@@ -140,7 +140,7 @@ public:
// FIXME (comment): If the list consists of more than one obscuring
// element, then is there an order between them that
// is important?
- QValueList<Cell*> obscuringCells;
+ TQValueList<Cell*> obscuringCells;
// If non-NULL, contains a pointer to a condition or a validity test.
Conditions *conditions;
@@ -193,13 +193,13 @@ public:
//
// /Tomas
//
- QString strText;
+ TQString strText;
// This is the text we want to display. Not necessarily the same
// as strText, e.g. strText="1" and strOutText="1.00" Also holds
// value that we got from calculation, formerly known as
// strFormulaOut
- QString strOutText;
+ TQString strOutText;
// the Formula object for the cell
KSpread::Formula *formula;
@@ -223,7 +223,7 @@ public:
Extra *extra();
Format *format;
- Q_UINT32 flags;
+ TQ_UINT32 flags;
private:
// "Extra stuff", see explanation for Cell::Extra.
@@ -277,7 +277,7 @@ Cell::Extra* Cell::Private::extra()
cellExtra->extraWidth = 0.0;
cellExtra->extraHeight = 0.0;
cellExtra->nbLines = 0;
-// cellExtra->highlight = QColor(0,0,0);
+// cellExtra->highlight = TQColor(0,0,0);
}
return cellExtra;
@@ -366,7 +366,7 @@ int Cell::column() const
// Return the name of this cell, i.e. the string that the user would
// use to reference it. Example: A1, BZ16
//
-QString Cell::name() const
+TQString Cell::name() const
{
return name( d->column, d->row );
}
@@ -374,16 +374,16 @@ QString Cell::name() const
// Return the name of any cell given by (col, row).
//
-QString Cell::name( int col, int row )
+TQString Cell::name( int col, int row )
{
- return columnName( col ) + QString::number( row );
+ return columnName( col ) + TQString::number( row );
}
// Return the name of this cell, including the sheet name.
// Example: sheet1!A5
//
-QString Cell::fullName() const
+TQString Cell::fullName() const
{
return fullName( sheet(), d->column, d->row );
}
@@ -391,7 +391,7 @@ QString Cell::fullName() const
// Return the full name of any cell given a sheet and (col, row).
//
-QString Cell::fullName( const Sheet* s, int col, int row )
+TQString Cell::fullName( const Sheet* s, int col, int row )
{
return s->sheetName() + "!" + name( col, row );
}
@@ -399,7 +399,7 @@ QString Cell::fullName( const Sheet* s, int col, int row )
// Return the symbolic name of the column of this cell. Examples: A, BB.
//
-QString Cell::columnName() const
+TQString Cell::columnName() const
{
return columnName( d->column );
}
@@ -411,21 +411,21 @@ KLocale* Cell::locale() const
// Return the symbolic name of any column.
//
-QString Cell::columnName( uint column )
+TQString Cell::columnName( uint column )
{
- QString str;
+ TQString str;
unsigned digits = 1;
unsigned offset = 0;
column--;
- if( column > 4058115285U ) return QString("@@@");
+ if( column > 4058115285U ) return TQString("@@@");
for( unsigned limit = 26; column >= limit+offset; limit *= 26, digits++ )
offset += limit;
for( unsigned c = column - offset; digits; --digits, c/=26 )
- str.prepend( QChar( 'A' + (c%26) ) );
+ str.prepend( TQChar( 'A' + (c%26) ) );
return str;
}
@@ -445,7 +445,7 @@ bool Cell::isFormula() const
// FIXME: These two functions are inconsistently named. It should be
// either text() and outText() or strText() and strOutText().
//
-QString Cell::text() const
+TQString Cell::text() const
{
return d->strText;
}
@@ -455,7 +455,7 @@ QString Cell::text() const
// square when shown. This could, for instance, be the calculated
// result of a formula.
//
-QString Cell::strOutText() const
+TQString Cell::strOutText() const
{
return d->strOutText;
}
@@ -486,7 +486,7 @@ void Cell::setValue( const Value& v )
clearAllErrors();
//If the value has not changed then we don't need to do anything
- //(ie. no need to relayout, update dependant cells etc.),
+ //(ie. no need to retqlayout, update dependant cells etc.),
//unless this cell contains a formula, in which case its dependancies might have changed
//even though the value has not. For example, if this cell was previously empty (and its value is
//therefore empty) and a new dependency upon an empty cell has been added. The new value would still
@@ -513,7 +513,7 @@ void Cell::setValue( const Value& v )
format()->sheet()->setRegionPaintDirty(cellRect());
}
-void Cell::setCellValue (const Value &v, FormatType fmtType, const QString &txt)
+void Cell::setCellValue (const Value &v, FormatType fmtType, const TQString &txt)
{
if ( !txt.isNull() )
{
@@ -617,7 +617,7 @@ void Cell::copyFormat( const Cell* cell )
if ( cell->format()->currencyInfo( c ) )
format()->setCurrency( c );*/
- QValueList<Conditional> conditionList = cell->conditionList();
+ TQValueList<Conditional> conditionList = cell->conditionList();
if (d->hasExtra())
delete d->extra()->conditions;
if ( cell->d->hasExtra() && cell->d->extra()->conditions )
@@ -644,7 +644,7 @@ void Cell::copyContent( const Cell* cell )
{
// change all the references, e.g. from A1 to A3 if copying
// from e.g. B2 to B4
- QString d = cell->encodeFormula();
+ TQString d = cell->encodeFormula();
setCellText( cell->decodeFormula( d ) );
}
else
@@ -697,7 +697,7 @@ void Cell::mergeCells( int _col, int _row, int _x, int _y )
d->extra()->mergedYCells = 0;
}
- // Refresh the layout
+ // Refresh the tqlayout
setFlag( Flag_LayoutDirty );
return;
}
@@ -717,7 +717,7 @@ void Cell::mergeCells( int _col, int _row, int _x, int _y )
}
}
- // Refresh the layout
+ // Refresh the tqlayout
setFlag( Flag_LayoutDirty );
}
@@ -768,8 +768,8 @@ void Cell::setLayoutDirtyFlag( bool format )
if (!d->hasExtra())
return;
- QValueList<Cell*>::iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::iterator end = d->extra()->obscuringCells.end();
+ TQValueList<Cell*>::iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
(*it)->setLayoutDirtyFlag( format );
}
@@ -797,22 +797,22 @@ bool Cell::needsPrinting() const
// Background color or brush?
if ( format()->hasProperty( Format::PBackgroundBrush ) ) {
- const QBrush& brush=backGroundBrush(column(),row());
+ const TQBrush& brush=backGroundBrush(column(),row());
//Only brushes that are visible (ie. they have a brush style and are not white)
//need to be drawn
- if ( (brush.style() != Qt::NoBrush) &&
- (brush.color() != Qt::white || brush.pixmap()) )
+ if ( (brush.style() != TQt::NoBrush) &&
+ (brush.color() != TQt::white || brush.pixmap()) )
return true;
}
if ( format()->hasProperty( Format::PBackgroundColor ) ) {
kdDebug() << "needsPrinting: Has background colour" << endl;
- QColor backgroundColor=bgColor(column(),row());
+ TQColor backgroundColor=bgColor(column(),row());
//We don't need to print anything if the background is white
- if (backgroundColor != Qt::white)
+ if (backgroundColor != TQt::white)
return true;
}
@@ -844,8 +844,8 @@ bool Cell::isPartOfMerged() const
if (!d->hasExtra())
return false;
- QValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
+ TQValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
Cell *cell = *it;
@@ -884,8 +884,8 @@ Cell *Cell::ultimateObscuringCell() const
return d->extra()->obscuringCells.first();
#if 0
- QValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
+ TQValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
Cell *cell = *it;
@@ -905,11 +905,11 @@ Cell *Cell::ultimateObscuringCell() const
}
-QValueList<Cell*> Cell::obscuringCells() const
+TQValueList<Cell*> Cell::obscuringCells() const
{
if (!d->hasExtra())
{
- QValueList<Cell*> empty;
+ TQValueList<Cell*> empty;
return empty;
}
return d->extra()->obscuringCells;
@@ -949,14 +949,14 @@ void Cell::unobscure( Cell * cell )
format()->sheet()->setRegionPaintDirty( cellRect() );
}
-QString Cell::encodeFormula( bool _era, int _col, int _row ) const
+TQString Cell::encodeFormula( bool _era, int _col, int _row ) const
{
if ( _col == -1 )
_col = d->column;
if ( _row == -1 )
_row = d->row;
- QString erg = "";
+ TQString erg = "";
if(d->strText.isEmpty())
return d->strText;
@@ -967,7 +967,7 @@ QString Cell::encodeFormula( bool _era, int _col, int _row ) const
unsigned int pos = 0;
const unsigned int length = d->strText.length();
- // All this can surely be made 10 times faster, but I just "ported" it to QString
+ // All this can surely be made 10 times faster, but I just "ported" it to TQString
// without any attempt to optimize things -- this is really brittle (Werner)
while ( pos < length )
{
@@ -1003,7 +1003,7 @@ QString Cell::encodeFormula( bool _era, int _col, int _row ) const
}
else
{
- QString tmp = "";
+ TQString tmp = "";
if ( d->strText[pos] == '$' )
{
tmp = "$";
@@ -1012,7 +1012,7 @@ QString Cell::encodeFormula( bool _era, int _col, int _row ) const
}
if ( d->strText[pos].isLetter() )
{
- QString buffer;
+ TQString buffer;
unsigned int pos2 = 0;
while ( pos < length && d->strText[pos].isLetter() )
{
@@ -1049,20 +1049,20 @@ QString Cell::encodeFormula( bool _era, int _col, int _row ) const
int col = 0;
col = util_decodeColumnLabelText( buffer );
if ( fix1 )
- erg += QString( "$%1" ).arg( col );
+ erg += TQString( "$%1" ).tqarg( col );
else
if (_era)
- erg += QChar(0xA7) + QString( "%1" ).arg( col );
+ erg += TQChar(0xA7) + TQString( "%1" ).tqarg( col );
else
- erg += QString( "#%1" ).arg( col - _col );
+ erg += TQString( "#%1" ).tqarg( col - _col );
if ( fix2 )
- erg += QString( "$%1#").arg( row );
+ erg += TQString( "$%1#").tqarg( row );
else
if (_era)
- erg += QChar(0xA7) + QString( "%1#" ).arg( row );
+ erg += TQChar(0xA7) + TQString( "%1#" ).tqarg( row );
else
- erg += QString( "#%1#" ).arg( row - _row );
+ erg += TQString( "#%1#" ).tqarg( row - _row );
}
}
else
@@ -1083,19 +1083,19 @@ QString Cell::encodeFormula( bool _era, int _col, int _row ) const
return erg;
}
-QString Cell::decodeFormula( const QString &_text, int _col, int _row) const
+TQString Cell::decodeFormula( const TQString &_text, int _col, int _row) const
{
if ( _col == -1 )
_col = d->column;
if ( _row == -1 )
_row = d->row;
- QString erg = "";
+ TQString erg = "";
unsigned int pos = 0;
const unsigned int length = _text.length();
if ( _text.isEmpty() )
- return QString();
+ return TQString();
while ( pos < length )
{
@@ -1115,17 +1115,17 @@ QString Cell::decodeFormula( const QString &_text, int _col, int _row) const
if ( pos < length )
erg += _text[pos++];
}
- else if ( _text[pos] == '#' || _text[pos] == '$' || _text[pos] == QChar(0xA7))
+ else if ( _text[pos] == '#' || _text[pos] == '$' || _text[pos] == TQChar(0xA7))
{
bool abs1 = false;
bool abs2 = false;
bool era1 = false; // if 1st is relative but encoded absolutely
bool era2 = false;
- QChar _t = _text[pos++];
+ TQChar _t = _text[pos++];
if ( _t == '$' )
abs1 = true;
- else if ( _t == QChar(0xA7) )
+ else if ( _t == TQChar(0xA7) )
era1 = true;
int col = 0;
@@ -1140,7 +1140,7 @@ QString Cell::decodeFormula( const QString &_text, int _col, int _row) const
_t = _text[pos++];
if ( _t == '$' )
abs2 = true;
- else if ( _t == QChar(0xA7) )
+ else if ( _t == TQChar(0xA7) )
era2 = true;
int row = 0;
@@ -1164,7 +1164,7 @@ QString Cell::decodeFormula( const QString &_text, int _col, int _row) const
if ( abs2 )
erg += "$";
- erg += QString::number( row );
+ erg += TQString::number( row );
}
else
erg += _text[pos++];
@@ -1204,7 +1204,7 @@ void Cell::freeAllObscuredCells()
// Layout
-// Recalculate the entire layout. This includes the following members:
+// Recalculate the entire tqlayout. This includes the following members:
//
// d->textX, d->textY
// d->textWidth, d->textHeight
@@ -1218,15 +1218,15 @@ void Cell::freeAllObscuredCells()
// d->strOutText
//
-void Cell::makeLayout( QPainter &_painter, int _col, int _row )
+void Cell::makeLayout( TQPainter &_painter, int _col, int _row )
{
// Are _col and _row really needed ?
//
- // Yes they are: they are useful if this is the default layout, in
+ // Yes they are: they are useful if this is the default tqlayout, in
// which case d->row and d->column are 0 and 0, but _col and _row
// are the real coordinates of the cell.
- // There is no need to remake the layout if it hasn't changed.
+ // There is no need to remake the tqlayout if it hasn't changed.
if ( !testFlag( Flag_LayoutDirty ) )
return;
@@ -1244,7 +1244,7 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
d->extra()->mergedXCells, d->extra()->mergedYCells );
// If the column for this cell is hidden or the row is too low,
- // there is no use in remaking the layout.
+ // there is no use in remaking the tqlayout.
ColumnFormat *cl1 = format()->sheet()->columnFormat( _col );
RowFormat *rl1 = format()->sheet()->rowFormat( _row );
if ( cl1->isHide()
@@ -1259,7 +1259,7 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
// Empty text? Reset the outstring and, if this is the default
// cell, return.
if ( d->strOutText.isEmpty() ) {
- d->strOutText = QString::null;
+ d->strOutText = TQString();
if ( isDefault() ) {
clearFlag( Flag_LayoutDirty );
@@ -1309,7 +1309,7 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
d->extra()->extraHeight = height;
}
- QFontMetrics fm = _painter.fontMetrics();
+ TQFontMetrics fm = _painter.fontMetrics();
d->fmAscent = fm.ascent();
// Check if we need to break the line into multiple lines and are
@@ -1326,15 +1326,15 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
&& format()->multiRow( _col, _row ) )
{
// Copy of d->strOutText but without the newlines.
-// QString o = d->strOutText.replace( QChar('\n'), " " );
+// TQString o = d->strOutText.tqreplace( TQChar('\n'), " " );
// don't remove the existing LF, these are intended line wraps (whishlist #9881)
- QString o = d->strOutText;
+ TQString o = d->strOutText;
// Break the line at appropriate places, i.e. spaces, if
// necessary. This means to change the spaces where breaks occur
// into newlines.
- if ( o.find(' ') != -1 )
+ if ( o.tqfind(' ') != -1 )
{
d->strOutText = "";
@@ -1350,8 +1350,8 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
do {
- breakpos = o.find( ' ', breakpos );
- int linefeed = o.find( '\n', pos1 );
+ breakpos = o.tqfind( ' ', breakpos );
+ int linefeed = o.tqfind( '\n', pos1 );
// kdDebug() << "start: " << start << "; breakpos: " << breakpos << "; pos1: " << pos1 << "; linefeed: " << linefeed << endl;
@@ -1394,11 +1394,11 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
}
breakpos++;
- } while( o.find( ' ', breakpos ) != -1 );
+ } while( o.tqfind( ' ', breakpos ) != -1 );
}
else
{
- lines = o.contains('\n');
+ lines = o.tqcontains('\n');
}
d->textHeight *= lines;
@@ -1409,12 +1409,12 @@ void Cell::makeLayout( QPainter &_painter, int _col, int _row )
// Calculate the maximum width, taking into account linebreaks,
// and put it in d->textWidth.
- QString t;
+ TQString t;
int i;
int pos = 0;
d->textWidth = 0.0;
do {
- i = d->strOutText.find( "\n", pos );
+ i = d->strOutText.tqfind( "\n", pos );
if ( i == -1 )
t = d->strOutText.mid( pos, d->strOutText.length() - pos );
@@ -1589,7 +1589,7 @@ void Cell::valueChanged ()
void Cell::setOutputText()
{
if ( isDefault() ) {
- d->strOutText = QString::null;
+ d->strOutText = TQString();
if ( d->hasExtra() && d->extra()->conditions )
d->extra()->conditions->checkMatches();
@@ -1597,11 +1597,11 @@ void Cell::setOutputText()
return;
}
- // If nothing has changed, we don't need to remake the text layout.
+ // If nothing has changed, we don't need to remake the text tqlayout.
if ( !testFlag(Flag_TextFormatDirty) )
return;
- // We don't want to remake the layout unnecessarily.
+ // We don't want to remake the tqlayout unnecessarily.
clearFlag( Flag_TextFormatDirty );
// Display a formula if warranted. If not, display the value instead;
@@ -1687,7 +1687,7 @@ void Cell::offsetAlign( int _col, int _row )
const double effTop = BORDER_SPACE + 0.5 * effTopBorderPen( _col, _row ).width();
const double effBottom = h - BORDER_SPACE - 0.5 * effBottomBorderPen( _col, _row ).width();
- // Calculate d->textY based on the vertical alignment and a few
+ // Calculate d->textY based on the vertical tqalignment and a few
// other inputs.
switch( ay )
{
@@ -1846,7 +1846,7 @@ void Cell::offsetAlign( int _col, int _row )
a = Format::Left;
}
- // Calculate d->textX based on alignment and textwidth.
+ // Calculate d->textX based on tqalignment and textwidth.
switch ( a ) {
case Format::Left:
d->textX = 0.5 * effLeftBorderPen( _col, _row ).width() + BORDER_SPACE;
@@ -1868,10 +1868,10 @@ void Cell::offsetAlign( int _col, int _row )
//
// Used in makeLayout() and calculateTextParameters().
//
-void Cell::textSize( QPainter &_paint )
+void Cell::textSize( TQPainter &_paint )
{
- QFontMetrics fm = _paint.fontMetrics();
- // Horizontal text ?
+ TQFontMetrics fm = _paint.fontMetrics();
+ //Qt::Horizontal text ?
int tmpAngle;
int _row = row();
@@ -1919,7 +1919,7 @@ void Cell::textSize( QPainter &_paint )
// Set d->textWidth and d->textHeight to correct values according to
// if the text is horizontal, vertical or rotated.
if ( !tmpVerticalText && !tmpAngle ) {
- // Horizontal text.
+ //Qt::Horizontal text.
d->textWidth = format()->sheet()->doc()->unzoomItX( fm.width( d->strOutText ) );
int offsetFont = 0;
@@ -1946,10 +1946,10 @@ void Cell::textSize( QPainter &_paint )
* cos ( tmpAngle * M_PI / 180 ) ) );
}
else {
- // Vertical text.
+ //Qt::Vertical text.
int width = 0;
for ( unsigned int i = 0; i < d->strOutText.length(); i++ )
- width = QMAX( width, fm.width( d->strOutText.at( i ) ) );
+ width = TQMAX( width, fm.width( d->strOutText.at( i ) ) );
d->textWidth = format()->sheet()->doc()->unzoomItX( width );
d->textHeight = format()->sheet()->doc()->unzoomItY( ( fm.ascent() + fm.descent() )
@@ -1963,9 +1963,9 @@ void Cell::textSize( QPainter &_paint )
// Used in makeLayout() and calculateTextParameters().
//
-void Cell::applyZoomedFont( QPainter &painter, int _col, int _row )
+void Cell::applyZoomedFont( TQPainter &painter, int _col, int _row )
{
- QFont tmpFont( format()->textFont( _col, _row ) );
+ TQFont tmpFont( format()->textFont( _col, _row ) );
// If there is a matching condition on this cell then set the
// according style parameters.
@@ -2020,7 +2020,7 @@ void Cell::applyZoomedFont( QPainter &painter, int _col, int _row )
//used in Sheet::adjustColumnHelper and Sheet::adjustRow
-void Cell::calculateTextParameters( QPainter &_painter,
+void Cell::calculateTextParameters( TQPainter &_painter,
int _col, int _row )
{
// Apply the correct font to _painter.
@@ -2051,9 +2051,9 @@ bool Cell::makeFormula()
if (format()->sheet()->doc()->getShowMessageError())
{
- QString tmp(i18n("Error in cell %1\n\n"));
- tmp = tmp.arg( fullName() );
- KMessageBox::error( (QWidget*)0L, tmp);
+ TQString tmp(i18n("Error in cell %1\n\n"));
+ tmp = tmp.tqarg( fullName() );
+ KMessageBox::error( (TQWidget*)0L, tmp);
}
setFlag(Flag_ParseError);
Value v;
@@ -2133,14 +2133,14 @@ bool Cell::calc(bool delay)
// coordinates.
//
-void Cell::paintCell( const KoRect &rect, QPainter & painter,
+void Cell::paintCell( const KoRect &rect, TQPainter & painter,
View *view,
const KoPoint &coordinate,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
int paintBorder,
- QPen & rightPen, QPen & bottomPen,
- QPen & leftPen, QPen & topPen,
- QValueList<QPoint> &mergedCellsPainted,
+ TQPen & rightPen, TQPen & bottomPen,
+ TQPen & leftPen, TQPen & topPen,
+ TQValueList<TQPoint> &mergedCellsPainted,
bool drawCursor )
{
bool paintBorderRight = paintBorder & Border_Right;
@@ -2177,7 +2177,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
Q_ASSERT(isDefault()
|| (((cellRef.x() == d->column) && (cellRef.y() == d->row))));
- Sheet::LayoutDirection sheetDir = format()->sheet()->layoutDirection();
+ Sheet::LayoutDirection sheetDir = format()->sheet()->tqlayoutDirection();
double left = coordinate.x();
@@ -2193,7 +2193,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
double width = width0;
double height = height0;
- // Handle right-to-left layout.
+ // Handle right-to-left tqlayout.
// In an RTL sheet the cells have to be painted at their opposite horizontal
// location on the canvas, meaning that column A will be the rightmost column
// on screen, column B will be to the left of it and so on. Here we change
@@ -2243,24 +2243,24 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// itself really is selected.
bool selected = false;
if ( view != NULL ) {
- selected = view->selectionInfo()->contains( cellRef );
+ selected = view->selectionInfo()->tqcontains( cellRef );
// But the cell doesn't look selected if this is the marker cell.
Cell *cell = format()->sheet()->cellAt( view->selectionInfo()->marker() );
- QPoint bottomRight( view->selectionInfo()->marker().x() + cell->extraXCells(),
+ TQPoint bottomRight( view->selectionInfo()->marker().x() + cell->extraXCells(),
view->selectionInfo()->marker().y() + cell->extraYCells() );
- QRect markerArea( view->selectionInfo()->marker(), bottomRight );
- selected = selected && !( markerArea.contains( cellRef ) );
+ TQRect markerArea( view->selectionInfo()->marker(), bottomRight );
+ selected = selected && !( markerArea.tqcontains( cellRef ) );
// Don't draw any selection at all when printing.
- if ( painter.device()->isExtDev() || !drawCursor )
+ if ( painter.tqdevice()->isExtDev() || !drawCursor )
selected = false;
}
- // Need to make a new layout ?
+ // Need to make a new tqlayout ?
//
// FIXME: We have already used (at least) extraWidth/Height above,
- // and now we are recalculating the layout. This has to be
+ // and now we are recalculating the tqlayout. This has to be
// moved up above all uses.
//
// FIXME: This needs to be taken out eventually - it is done in
@@ -2285,7 +2285,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// If there is a condition giving the background color for this cell
// (and it matches), use that one, otherwise get the standard
// background.
- QColor backgroundColor;
+ TQColor backgroundColor;
if ( d->hasExtra() && d->extra()->conditions
&& d->extra()->conditions->matchedStyle()
&& d->extra()->conditions->matchedStyle()->hasFeature( Style::SBackgroundColor, true ) )
@@ -2299,7 +2299,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// 2. Paint the default borders if we are on screen or if we are printing
// and the checkbox to do this is checked.
- if ( painter.device()->devType() != QInternal::Printer
+ if ( painter.tqdevice()->devType() != TQInternal::Printer
|| format()->sheet()->print()->printGrid())
paintDefaultBorders( painter, rect, cellRect, cellRef,
paintBorderRight, paintBorderBottom,
@@ -2336,7 +2336,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// If we print pages, then we disable clipping, otherwise borders are
// cut in the middle at the page borders.
- if ( painter.device()->isExtDev() )
+ if ( painter.tqdevice()->isExtDev() )
painter.setClipping( false );
// Paint the borders if this cell is not part of another merged cell.
@@ -2350,7 +2350,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
}
// Turn clipping back on.
- if ( painter.device()->isExtDev() )
+ if ( painter.tqdevice()->isExtDev() )
painter.setClipping( true );
// 5. Paint diagonal lines and page borders.
@@ -2364,12 +2364,12 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
if ( !isObscured() ) {
// 6a. Paint possible comment indicator.
- if ( !painter.device()->isExtDev()
+ if ( !painter.tqdevice()->isExtDev()
|| format()->sheet()->print()->printCommentIndicator() )
paintCommentIndicator( painter, cellRect, cellRef, backgroundColor );
// 6b. Paint possible formula indicator.
- if ( !painter.device()->isExtDev()
+ if ( !painter.tqdevice()->isExtDev()
|| format()->sheet()->print()->printFormulaIndicator() )
paintFormulaIndicator( painter, cellRect, backgroundColor );
@@ -2389,7 +2389,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// b) something indicates that the text should not be painted
// c) the sheet is protected and the cell is hidden.
if ( !d->strOutText.isEmpty()
- && ( !painter.device()->isExtDev()
+ && ( !painter.tqdevice()->isExtDev()
|| !format()->getDontprintText( cellRef.x(), cellRef.y() ) )
&& !( format()->sheet()->isProtected()
&& format()->isHideAll( cellRef.x(), cellRef.y() ) ) )
@@ -2402,37 +2402,37 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// cells, then paint the obscuring cell(s). Otherwise don't do
// anything so that we don't cause an infinite loop.
if ( isObscured() && paintingObscured == 0 &&
- !( sheetDir == Sheet::RightToLeft && painter.device()->isExtDev() ) )
+ !( sheetDir == Sheet::RightToLeft && painter.tqdevice()->isExtDev() ) )
{
//kdDebug(36001) << "painting cells that obscure " << name() << endl;
- // Store the obscuringCells list in a list of QPoint(column, row)
+ // Store the obscuringCells list in a list of TQPoint(column, row)
// This avoids crashes during the iteration through
// obscuringCells, when the cells may get non valid or the list
// itself gets changed during a call of obscuringCell->paintCell
// (this happens e.g. when there is an updateDepend)
if (d->hasExtra()) {
- QValueList<QPoint> listPoints;
- QValueList<Cell*>::iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::iterator end = d->extra()->obscuringCells.end();
+ TQValueList<TQPoint> listPoints;
+ TQValueList<Cell*>::iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
Cell *obscuringCell = *it;
- listPoints.append( QPoint( obscuringCell->column(), obscuringCell->row() ) );
+ listPoints.append( TQPoint( obscuringCell->column(), obscuringCell->row() ) );
}
- QValueList<QPoint>::iterator it1 = listPoints.begin();
- QValueList<QPoint>::iterator end1 = listPoints.end();
+ TQValueList<TQPoint>::iterator it1 = listPoints.begin();
+ TQValueList<TQPoint>::iterator end1 = listPoints.end();
for ( ; it1 != end1; ++it1 ) {
- QPoint obscuringCellRef = *it1;
+ TQPoint obscuringCellRef = *it1;
// Only paint those obscuring cells that haven't been already
// painted yet.
//
// This optimization removes an O(n^4) behaviour where n is
// the number of cells on one edge in a merged cell.
- if ( mergedCellsPainted.contains( obscuringCellRef ) )
+ if ( mergedCellsPainted.tqcontains( obscuringCellRef ) )
continue;
Cell *obscuringCell = format()->sheet()->cellAt( obscuringCellRef.x(),
@@ -2452,19 +2452,19 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// Get the effective pens for the borders. These are
// determined by possible conditions on the cell with
// associated styles.
- QPen rp( obscuringCell->effRightBorderPen( obscuringCellRef.x(),
+ TQPen rp( obscuringCell->effRightBorderPen( obscuringCellRef.x(),
obscuringCellRef.y() ) );
- QPen bp( obscuringCell->effBottomBorderPen( obscuringCellRef.x(),
+ TQPen bp( obscuringCell->effBottomBorderPen( obscuringCellRef.x(),
obscuringCellRef.y() ) );
- QPen lp( obscuringCell->effLeftBorderPen( obscuringCellRef.x(),
+ TQPen lp( obscuringCell->effLeftBorderPen( obscuringCellRef.x(),
obscuringCellRef.y() ) );
- QPen tp( obscuringCell->effTopBorderPen( obscuringCellRef.x(),
+ TQPen tp( obscuringCell->effTopBorderPen( obscuringCellRef.x(),
obscuringCellRef.y() ) );
//kdDebug(36001) << " painting obscuring cell "
// << obscuringCell->name() << endl;
- // QPen highlightPen;
+ // TQPen highlightPen;
//Note: Painting of highlight isn't quite right. If several
// cells are merged, then the whole merged cell will be
@@ -2497,9 +2497,9 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
* Modification for drawing the button
*/
if ( d->style == Cell::ST_Button ) {
- QBrush fill( Qt::lightGray );
- QApplication::style().drawControl( QStyle::CE_PushButton, &_painter, this,
- QRect( _tx + 1, _ty + 1, w2 - 1, h2 - 1 ),
+ TQBrush fill( TQt::lightGray );
+ TQApplication::style().tqdrawControl( TQStyle::CE_PushButton, &_painter, this,
+ TQRect( _tx + 1, _ty + 1, w2 - 1, h2 - 1 ),
defaultColorGroup ); //, selected, &fill );
}
@@ -2507,7 +2507,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
* Modification for drawing the combo box
*/
else if ( d->style == Cell::ST_Select ) {
- QApplication::style().drawComboButton( &_painter, _tx + 1, _ty + 1,
+ TQApplication::style().drawComboButton( &_painter, _tx + 1, _ty + 1,
w2 - 1, h2 - 1,
defaultColorGroup, selected );
}
@@ -2515,27 +2515,27 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
#if 0
- void Cell::paintCellHighlight(QPainter& painter,
+ void Cell::paintCellHighlight(TQPainter& painter,
const KoRect& cellRect,
- const QPoint& cellRef,
+ const TQPoint& cellRef,
const int highlightBorder,
- const QPen& rightPen,
- const QPen& bottomPen,
- const QPen& leftPen,
- const QPen& topPen
+ const TQPen& rightPen,
+ const TQPen& bottomPen,
+ const TQPen& leftPen,
+ const TQPen& topPen
)
{
//painter.drawLine(cellRect.left(),cellRect.top(),cellRect.right(),cellRect.bottom());
- //QPen pen(d->extra()->highlight);
+ //TQPen pen(d->extra()->highlight);
//painter.setPen(highlightPen);
- QBrush nullBrush;
+ TQBrush nullBrush;
painter.setBrush(nullBrush);
- QRect zoomedCellRect = sheet()->doc()->zoomRect( cellRect );
+ TQRect zoomedCellRect = sheet()->doc()->zoomRect( cellRect );
//The highlight rect is just inside the main cell rect
- //This saves the hassle of repainting nearby cells when the highlight is changed as the highlight areas
+ //This saves the hassle of tqrepainting nearby cells when the highlight is changed as the highlight areas
//do not overlap
zoomedCellRect.setLeft(zoomedCellRect.left()+1);
//zoomedCellRect.setRight(zoomedCellRect.right()-1);
@@ -2570,7 +2570,7 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
if (highlightBorder & Border_SizeGrip)
{
- QBrush brush(rightPen.color());
+ TQBrush brush(rightPen.color());
painter.setBrush(brush);
painter.setPen(rightPen);
painter.drawRect(zoomedCellRect.right()-3,zoomedCellRect.bottom()-3,4,4);
@@ -2583,17 +2583,17 @@ void Cell::paintCell( const KoRect &rect, QPainter & painter,
// Paint all the cells that this cell obscures (helper function to paintCell).
//
-void Cell::paintObscuredCells(const KoRect& rect, QPainter& painter,
+void Cell::paintObscuredCells(const KoRect& rect, TQPainter& painter,
View* view,
const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintBorderRight,
bool _paintBorderBottom,
bool paintBorderLeft,
bool _paintBorderTop,
- QPen & rightPen, QPen & _bottomPen,
- QPen & leftPen, QPen & _topPen,
- QValueList<QPoint> &mergedCellsPainted)
+ TQPen & rightPen, TQPen & _bottomPen,
+ TQPen & leftPen, TQPen & _topPen,
+ TQValueList<TQPoint> &mergedCellsPainted)
{
// If there are no obscured cells, return.
if ( !extraXCells() && !extraYCells() )
@@ -2614,8 +2614,8 @@ void Cell::paintObscuredCells(const KoRect& rect, QPainter& painter,
uint column = cellRef.x() + x;
uint row = cellRef.y() + y;
- QPen topPen;
- QPen bottomPen;
+ TQPen topPen;
+ TQPen bottomPen;
bool paintBorderTop;
bool paintBorderBottom;
@@ -2642,7 +2642,7 @@ void Cell::paintObscuredCells(const KoRect& rect, QPainter& painter,
cellUp->row() );
#if 0
- int penWidth = QMAX(1, sheet()->doc()->zoomItY( topPen.width() ));
+ int penWidth = TQMAX(1, sheet()->doc()->zoomItY( topPen.width() ));
topPen.setWidth( penWidth );
#endif
}
@@ -2660,14 +2660,14 @@ void Cell::paintObscuredCells(const KoRect& rect, QPainter& painter,
if (paintBorderBottom) paintBorder |= Cell::Border_Bottom;
/*Cell::BorderSides highlightBorder = Border_None;
- QPen highlightPen;*/
+ TQPen highlightPen;*/
//kdDebug(36001) << "calling paintcell for obscured cell "
// << cell->name() << endl;
cell->paintCell( rect, painter, view,
corner,
- QPoint( cellRef.x() + x, cellRef.y() + y ),
+ TQPoint( cellRef.x() + x, cellRef.y() + y ),
paintBorder,
rightPen, bottomPen, leftPen, topPen,
mergedCellsPainted);
@@ -2682,12 +2682,12 @@ void Cell::paintObscuredCells(const KoRect& rect, QPainter& painter,
// Paint the background of this cell.
//
-void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef, bool selected,
- QColor &backgroundColor )
+void Cell::paintBackground( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef, bool selected,
+ TQColor &backgroundColor )
{
- QColorGroup defaultColorGroup = QApplication::palette().active();
- QRect zoomedCellRect = sheet()->doc()->zoomRect( cellRect );
+ TQColorGroup defaultColorGroup = TQApplication::tqpalette().active();
+ TQRect zoomedCellRect = sheet()->doc()->zoomRect( cellRect );
// If this is not the KS_rowMax and/or KS_colMax, then we reduce
// width and/or height by one. This is due to the fact that the
@@ -2705,7 +2705,7 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
{
//If the cell's background color is too bright, use the default highlight color
//Otherwise use a lighter version of the cell's background color.
- QColor c;
+ TQColor c;
int averageColor = (backgroundColor.red() + backgroundColor.green() + backgroundColor.blue()) / 3;
@@ -2720,10 +2720,10 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
painter.setBackgroundColor( c );
}
else {
- QColor bg( backgroundColor );
+ TQColor bg( backgroundColor );
// Handle printers separately.
- if ( !painter.device()->isExtDev() ) {
+ if ( !painter.tqdevice()->isExtDev() ) {
if ( bg.isValid() )
painter.setBackgroundColor( bg );
else
@@ -2732,9 +2732,9 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
else {
//bad hack but there is a qt bug
//so I can print backgroundcolor
- QBrush bb( bg );
+ TQBrush bb( bg );
if ( !bg.isValid() )
- bb.setColor( Qt::white );
+ bb.setColor( TQt::white );
painter.fillRect( zoomedCellRect, bb );
return;
@@ -2742,11 +2742,11 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
}
// Erase the background of the cell.
- if ( !painter.device()->isExtDev() )
+ if ( !painter.tqdevice()->isExtDev() )
painter.eraseRect( zoomedCellRect );
// Get a background brush
- QBrush bb;
+ TQBrush bb;
if ( d->hasExtra()
&& d->extra()->conditions
&& d->extra()->conditions->matchedStyle()
@@ -2756,7 +2756,7 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
bb = backGroundBrush( cellRef.x(), cellRef.y() );
// Draw background pattern if necessary.
- if ( bb.style() != Qt::NoBrush )
+ if ( bb.style() != TQt::NoBrush )
painter.fillRect( zoomedCellRect, bb );
backgroundColor = painter.backgroundColor();
@@ -2765,13 +2765,13 @@ void Cell::paintBackground( QPainter& painter, const KoRect &cellRect,
// Paint the standard light grey borders that are always visible.
//
-void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
+void Cell::paintDefaultBorders( TQPainter& painter, const KoRect &rect,
const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintBorderRight, bool /*paintBorderBottom*/,
bool paintBorderLeft, bool paintBorderTop,
- QPen const & rightPen, QPen const & /*bottomPen*/,
- QPen const & leftPen, QPen const & topPen )
+ TQPen const & rightPen, TQPen const & /*bottomPen*/,
+ TQPen const & leftPen, TQPen const & topPen )
{
/*
*** Notes about optimisation ***
@@ -2783,15 +2783,15 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
I also couldn't work out under what conditions the variables dt / db would come out as anything other than 0 in the code
for painting the various borders. The effTopBorderPen / effBottomBorderPen calls were taking up a lot of time
according some profiling I did. If that code really is necessary, we need to find a more efficient way of getting the widths
- than grabbing the whole QPen object and asking it.
+ than grabbing the whole TQPen object and asking it.
--Robert Knight (robertknight@gmail.com)
*/
Doc* doc = sheet()->doc();
- Sheet::LayoutDirection sheetDir = format()->sheet()->layoutDirection();
- bool paintingToExternalDevice = painter.device()->isExtDev();
+ Sheet::LayoutDirection sheetDir = format()->sheet()->tqlayoutDirection();
+ bool paintingToExternalDevice = painter.tqdevice()->isExtDev();
// Each cell is responsible for drawing it's top and left portions
// of the "default" grid. --Or not drawing it if it shouldn't be
@@ -2803,23 +2803,23 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
bool paintBottom=false;
bool paintRight=false;
- paintLeft = ( paintBorderLeft && leftPen.style() == Qt::NoPen
+ paintLeft = ( paintBorderLeft && leftPen.style() == TQt::NoPen
&& sheet()->getShowGrid() && sheetDir==Sheet::LeftToRight );
- paintRight = ( paintBorderRight && rightPen.style() == Qt::NoPen
+ paintRight = ( paintBorderRight && rightPen.style() == TQt::NoPen
&& sheet()->getShowGrid() && sheetDir==Sheet::RightToLeft );
- paintTop = ( paintBorderTop && topPen.style() == Qt::NoPen
+ paintTop = ( paintBorderTop && topPen.style() == TQt::NoPen
&& sheet()->getShowGrid() );
// paintBottom = ( paintBorderBottom && sheet()->getShowGrid()
-// && bottomPen.style() == Qt::NoPen );
+// && bottomPen.style() == TQt::NoPen );
//Set the single-pixel with pen for drawing the borders with.
- painter.setPen( QPen( sheet()->doc()->gridColor(), 1, Qt::SolidLine ) );
+ painter.setPen( TQPen( sheet()->doc()->gridColor(), 1, TQt::SolidLine ) );
// If there are extra cells, there might be more conditions.
if (d->hasExtra()) {
- QValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
+ TQValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
Cell *cell = *it;
@@ -2846,12 +2846,12 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
if ( cellRef.x() > 1 ) {
Cell *cell_west = format()->sheet()->cellAt( cellRef.x() - 1,
cellRef.y() );
- QPen t = cell_west->effTopBorderPen( cellRef.x() - 1, cellRef.y() );
- QPen b = cell_west->effBottomBorderPen( cellRef.x() - 1, cellRef.y() );
+ TQPen t = cell_west->effTopBorderPen( cellRef.x() - 1, cellRef.y() );
+ TQPen b = cell_west->effBottomBorderPen( cellRef.x() - 1, cellRef.y() );
- if ( t.style() != Qt::NoPen )
+ if ( t.style() != TQt::NoPen )
dt = ( t.width() + 1 )/2;
- if ( b.style() != Qt::NoPen )
+ if ( b.style() != TQt::NoPen )
db = ( t.width() / 2);
}
#endif
@@ -2860,15 +2860,15 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
// On paper, we always have full cells, on screen not.
if ( paintingToExternalDevice ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.right() ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.y() + dt ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.right() ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.bottom() - db ) ) );
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.right() ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.y() + dt ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.right() ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.bottom() - db ) ) );
else
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.x() ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.y() + dt ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.x() ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.bottom() - db ) ) );
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.y() + dt ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.x() ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.bottom() - db ) ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -2895,12 +2895,12 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
Cell *cell_north = format()->sheet()->cellAt( cellRef.x(),
cellRef.y() - 1 );
- QPen l = cell_north->effLeftBorderPen( cellRef.x(), cellRef.y() - 1 );
- QPen r = cell_north->effRightBorderPen( cellRef.x(), cellRef.y() - 1 );
+ TQPen l = cell_north->effLeftBorderPen( cellRef.x(), cellRef.y() - 1 );
+ TQPen r = cell_north->effRightBorderPen( cellRef.x(), cellRef.y() - 1 );
- if ( l.style() != Qt::NoPen )
+ if ( l.style() != TQt::NoPen )
dl = ( l.width() - 1 ) / 2 + 1;
- if ( r.style() != Qt::NoPen )
+ if ( r.style() != TQt::NoPen )
dr = r.width() / 2;
}
#endif
@@ -2910,10 +2910,10 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
if ( paintingToExternalDevice ) {
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.x() + dl ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.y() ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.right() - dr ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.y() ) ) );
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() + dl ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.y() ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.right() - dr ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.y() ) ) );
}
else {
painter.drawLine( doc->zoomItX( cellRect.x() + dl ),
@@ -2934,31 +2934,31 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
Cell *cell_east = format()->sheet()->cellAt( cellRef.x() + 1,
cellRef.y() );
- QPen t = cell_east->effTopBorderPen( cellRef.x() + 1, cellRef.y() );
- QPen b = cell_east->effBottomBorderPen( cellRef.x() + 1, cellRef.y() );
+ TQPen t = cell_east->effTopBorderPen( cellRef.x() + 1, cellRef.y() );
+ TQPen b = cell_east->effBottomBorderPen( cellRef.x() + 1, cellRef.y() );
- if ( t.style() != Qt::NoPen )
+ if ( t.style() != TQt::NoPen )
dt = ( t.width() + 1 ) / 2;
- if ( b.style() != Qt::NoPen )
+ if ( b.style() != TQt::NoPen )
db = ( t.width() / 2);
}
#endif
- //painter.setPen( QPen( sheet()->doc()->gridColor(), 1, Qt::SolidLine ) );
+ //painter.setPen( TQPen( sheet()->doc()->gridColor(), 1, TQt::SolidLine ) );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.x() ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.y() + dt ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.x() ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.bottom() - db ) ) );
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.y() + dt ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.x() ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.bottom() - db ) ) );
else
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.right() ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.y() + dt ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.right() ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.bottom() - db ) ) );
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.right() ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.y() + dt ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.right() ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.bottom() - db ) ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -2982,24 +2982,24 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
Cell *cell_south = format()->sheet()->cellAt( cellRef.x(),
cellRef.y() + 1 );
- QPen l = cell_south->effLeftBorderPen( cellRef.x(), cellRef.y() + 1 );
- QPen r = cell_south->effRightBorderPen( cellRef.x(), cellRef.y() + 1 );
+ TQPen l = cell_south->effLeftBorderPen( cellRef.x(), cellRef.y() + 1 );
+ TQPen r = cell_south->effRightBorderPen( cellRef.x(), cellRef.y() + 1 );
- if ( l.style() != Qt::NoPen )
+ if ( l.style() != TQt::NoPen )
dl = ( l.width() - 1 ) / 2 + 1;
- if ( r.style() != Qt::NoPen )
+ if ( r.style() != TQt::NoPen )
dr = r.width() / 2;
}
- painter.setPen( QPen( sheet()->doc()->gridColor(), 1, Qt::SolidLine ) );
+ painter.setPen( TQPen( sheet()->doc()->gridColor(), 1, TQt::SolidLine ) );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
- painter.drawLine( doc->zoomItX( QMAX( rect.left(), cellRect.x() + dl ) ),
- doc->zoomItY( QMAX( rect.top(), cellRect.bottom() ) ),
- doc->zoomItX( QMIN( rect.right(), cellRect.right() - dr ) ),
- doc->zoomItY( QMIN( rect.bottom(), cellRect.bottom() ) ) );
+ if ( painter.tqdevice()->isExtDev() ) {
+ painter.drawLine( doc->zoomItX( TQMAX( rect.left(), cellRect.x() + dl ) ),
+ doc->zoomItY( TQMAX( rect.top(), cellRect.bottom() ) ),
+ doc->zoomItX( TQMIN( rect.right(), cellRect.right() - dr ) ),
+ doc->zoomItY( TQMIN( rect.bottom(), cellRect.bottom() ) ) );
}
else {
painter.drawLine( doc->zoomItX( cellRect.x() + dl ),
@@ -3013,10 +3013,10 @@ void Cell::paintDefaultBorders( QPainter& painter, const KoRect &rect,
// Paint a comment indicator if the cell has a comment.
//
-void Cell::paintCommentIndicator( QPainter& painter,
+void Cell::paintCommentIndicator( TQPainter& painter,
const KoRect &cellRect,
- const QPoint &/*cellRef*/,
- QColor &backgroundColor )
+ const TQPoint &/*cellRef*/,
+ TQColor &backgroundColor )
{
Doc * doc = sheet()->doc();
@@ -3026,20 +3026,20 @@ void Cell::paintCommentIndicator( QPainter& painter,
&& cellRect.width() > 10.0
&& cellRect.height() > 10.0
&& ( sheet()->print()->printCommentIndicator()
- || ( !painter.device()->isExtDev() && sheet()->getShowCommentIndicator() ) ) ) {
- QColor penColor = Qt::red;
+ || ( !painter.tqdevice()->isExtDev() && sheet()->getShowCommentIndicator() ) ) ) {
+ TQColor penColor = TQt::red;
// If background has high red part, switch to blue.
- if ( qRed( backgroundColor.rgb() ) > 127 &&
- qGreen( backgroundColor.rgb() ) < 80 &&
- qBlue( backgroundColor.rgb() ) < 80 )
+ if ( tqRed( backgroundColor.rgb() ) > 127 &&
+ tqGreen( backgroundColor.rgb() ) < 80 &&
+ tqBlue( backgroundColor.rgb() ) < 80 )
{
- penColor = Qt::blue;
+ penColor = TQt::blue;
}
// Get the triangle.
- QPointArray point( 3 );
- if ( format()->sheet()->layoutDirection()==Sheet::RightToLeft ) {
+ TQPointArray point( 3 );
+ if ( format()->sheet()->tqlayoutDirection()==Sheet::RightToLeft ) {
point.setPoint( 0, doc->zoomItX( cellRect.x() + 6.0 ),
doc->zoomItY( cellRect.y() ) );
point.setPoint( 1, doc->zoomItX( cellRect.x() ),
@@ -3057,8 +3057,8 @@ void Cell::paintCommentIndicator( QPainter& painter,
}
// And draw it.
- painter.setBrush( QBrush( penColor ) );
- painter.setPen( Qt::NoPen );
+ painter.setBrush( TQBrush( penColor ) );
+ painter.setPen( TQt::NoPen );
painter.drawPolygon( point );
}
}
@@ -3067,9 +3067,9 @@ void Cell::paintCommentIndicator( QPainter& painter,
// Paint a small rectangle if this cell holds a formula.
//
-void Cell::paintFormulaIndicator( QPainter& painter,
+void Cell::paintFormulaIndicator( TQPainter& painter,
const KoRect &cellRect,
- QColor &backgroundColor )
+ TQColor &backgroundColor )
{
if ( isFormula() &&
format()->sheet()->getShowFormulaIndicator() &&
@@ -3078,18 +3078,18 @@ void Cell::paintFormulaIndicator( QPainter& painter,
{
Doc* doc = sheet()->doc();
- QColor penColor = Qt::blue;
+ TQColor penColor = TQt::blue;
// If background has high blue part, switch to red.
- if ( qRed( backgroundColor.rgb() ) < 80 &&
- qGreen( backgroundColor.rgb() ) < 80 &&
- qBlue( backgroundColor.rgb() ) > 127 )
+ if ( tqRed( backgroundColor.rgb() ) < 80 &&
+ tqGreen( backgroundColor.rgb() ) < 80 &&
+ tqBlue( backgroundColor.rgb() ) > 127 )
{
- penColor = Qt::red;
+ penColor = TQt::red;
}
// Get the triangle...
- QPointArray point( 3 );
- if ( format()->sheet()->layoutDirection()==Sheet::RightToLeft ) {
+ TQPointArray point( 3 );
+ if ( format()->sheet()->tqlayoutDirection()==Sheet::RightToLeft ) {
point.setPoint( 0, doc->zoomItX( cellRect.right() - 6.0 ),
doc->zoomItY( cellRect.bottom() ) );
point.setPoint( 1, doc->zoomItX( cellRect.right() ),
@@ -3107,8 +3107,8 @@ void Cell::paintFormulaIndicator( QPainter& painter,
}
// ...and draw it.
- painter.setBrush( QBrush( penColor ) );
- painter.setPen( Qt::NoPen );
+ painter.setBrush( TQBrush( penColor ) );
+ painter.setPen( TQt::NoPen );
painter.drawPolygon( point );
}
}
@@ -3116,30 +3116,30 @@ void Cell::paintFormulaIndicator( QPainter& painter,
// Paint an indicator that the text in the cell is cut.
//
-void Cell::paintMoreTextIndicator( QPainter& painter,
+void Cell::paintMoreTextIndicator( TQPainter& painter,
const KoRect &cellRect,
- QColor &backgroundColor )
+ TQColor &backgroundColor )
{
// Show a red triangle when it's not possible to write all text in cell.
// Don't print the red triangle if we're printing.
if( testFlag( Flag_CellTooShortX ) &&
- !painter.device()->isExtDev() &&
+ !painter.tqdevice()->isExtDev() &&
cellRect.height() > 4.0 &&
cellRect.width() > 4.0 )
{
Doc* doc = sheet()->doc();
- QColor penColor = Qt::red;
+ TQColor penColor = TQt::red;
// If background has high red part, switch to blue.
- if ( qRed( backgroundColor.rgb() ) > 127
- && qGreen( backgroundColor.rgb() ) < 80
- && qBlue( backgroundColor.rgb() ) < 80 )
+ if ( tqRed( backgroundColor.rgb() ) > 127
+ && tqGreen( backgroundColor.rgb() ) < 80
+ && tqBlue( backgroundColor.rgb() ) < 80 )
{
- penColor = Qt::blue;
+ penColor = TQt::blue;
}
// Get the triangle...
- QPointArray point( 3 );
+ TQPointArray point( 3 );
if ( d->strOutText.isRightToLeft() ) {
point.setPoint( 0, doc->zoomItX( cellRect.left() + 4.0 ),
doc->zoomItY( cellRect.y() + cellRect.height() / 2.0 -4.0 ) );
@@ -3158,8 +3158,8 @@ void Cell::paintMoreTextIndicator( QPainter& painter,
}
// ...and paint it.
- painter.setBrush( QBrush( penColor ) );
- painter.setPen( Qt::NoPen );
+ painter.setBrush( TQBrush( penColor ) );
+ painter.setPen( TQt::NoPen );
painter.drawPolygon( point );
}
}
@@ -3167,26 +3167,26 @@ void Cell::paintMoreTextIndicator( QPainter& painter,
// Paint the real contents of a cell - the text.
//
-void Cell::paintText( QPainter& painter,
+void Cell::paintText( TQPainter& painter,
const KoRect &cellRect,
- const QPoint &cellRef )
+ const TQPoint &cellRef )
{
Doc *doc = sheet()->doc();
ColumnFormat *colFormat = format()->sheet()->columnFormat( cellRef.x() );
- QColorGroup defaultColorGroup = QApplication::palette().active();
- QColor textColorPrint = effTextColor( cellRef.x(), cellRef.y() );
+ TQColorGroup defaultColorGroup = TQApplication::tqpalette().active();
+ TQColor textColorPrint = effTextColor( cellRef.x(), cellRef.y() );
// Resolve the text color if invalid (=default).
if ( !textColorPrint.isValid() ) {
- if ( painter.device()->isExtDev() )
- textColorPrint = Qt::black;
+ if ( painter.tqdevice()->isExtDev() )
+ textColorPrint = TQt::black;
else
- textColorPrint = QApplication::palette().active().text();
+ textColorPrint = TQApplication::tqpalette().active().text();
}
- QPen tmpPen( textColorPrint );
+ TQPen tmpPen( textColorPrint );
// Set the font according to the current zoom.
applyZoomedFont( painter, cellRef.x(), cellRef.y() );
@@ -3203,14 +3203,14 @@ void Cell::paintText( QPainter& painter,
double v = value().asFloat();
if ( format()->floatColor( cellRef.x(), cellRef.y()) == Format::NegRed
&& v < 0.0 )
- tmpPen.setColor( Qt::red );
+ tmpPen.setColor( TQt::red );
}
}
// Check for blue color, for hyperlink.
if ( !link().isEmpty() ) {
- tmpPen.setColor( QApplication::palette().active().link() );
- QFont f = painter.font();
+ tmpPen.setColor( TQApplication::tqpalette().active().link() );
+ TQFont f = painter.font();
f.setUnderline( true );
painter.setFont( f );
}
@@ -3234,7 +3234,7 @@ void Cell::paintText( QPainter& painter,
if ( selected && ( cellRef.x() != marker.x() || cellRef.y() != marker.y() ) )
{
- QPen p( tmpPen );
+ TQPen p( tmpPen );
p.setColor( defaultColorGroup.highlightedText() );
painter.setPen( p );
}
@@ -3244,7 +3244,7 @@ void Cell::paintText( QPainter& painter,
#endif
painter.setPen( tmpPen );
- QString tmpText = d->strOutText;
+ TQString tmpText = d->strOutText;
double tmpHeight = d->textHeight;
double tmpWidth = d->textWidth;
@@ -3266,7 +3266,7 @@ void Cell::paintText( QPainter& painter,
if ( format()->sheet()->getHideZero()
&& value().isNumber()
&& value().asFloat() == 0 ) {
- d->strOutText = QString::null;
+ d->strOutText = TQString();
}
// Clear extra cell if column or row is hidden
@@ -3304,7 +3304,7 @@ void Cell::paintText( QPainter& painter,
if ( a == Format::Right && !isEmpty() && testFlag( Flag_CellTooShortX ) )
offsetCellTooShort = format()->sheet()->doc()->unzoomItX( 4 );
- QFontMetrics fm2 = painter.fontMetrics();
+ TQFontMetrics fm2 = painter.fontMetrics();
double offsetFont = 0.0;
if ( format()->alignY( column(), row() ) == Format::Bottom
@@ -3348,7 +3348,7 @@ void Cell::paintText( QPainter& painter,
// - One line of text , horizontal
// - Angled text
// - Multiple rows of text , horizontal
- // - Vertical text
+ // -Qt::Vertical text
if ( !tmpMultiRow && !tmpVerticalText && !tmpAngle ) {
// Case 1: The simple case, one line, no angle.
@@ -3359,7 +3359,7 @@ void Cell::paintText( QPainter& painter,
// Case 2: an angle.
int angle = tmpAngle;
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
painter.rotate( angle );
double x;
@@ -3383,13 +3383,13 @@ void Cell::paintText( QPainter& painter,
else if ( tmpMultiRow && !tmpVerticalText ) {
// Case 3: Multiple rows, but horizontal.
- QString t;
+ TQString t;
int i;
int pos = 0;
double dy = 0.0;
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
do {
- i = d->strOutText.find( "\n", pos );
+ i = d->strOutText.tqfind( "\n", pos );
if ( i == -1 )
t = d->strOutText.mid( pos, d->strOutText.length() - pos );
else {
@@ -3424,13 +3424,13 @@ void Cell::paintText( QPainter& painter,
} while ( i != -1 );
}
else if ( tmpVerticalText && !d->strOutText.isEmpty() ) {
- // Case 4: Vertical text.
+ // Case 4:Qt::Vertical text.
- QString t;
+ TQString t;
int i = 0;
int len = 0;
double dy = 0.0;
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
do {
len = d->strOutText.length();
t = d->strOutText.at( i );
@@ -3459,14 +3459,14 @@ void Cell::paintText( QPainter& painter,
// Paint page borders on the page. Only do this on the screen.
//
-void Cell::paintPageBorders( QPainter& painter,
+void Cell::paintPageBorders( TQPainter& painter,
const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintBorderRight,
bool paintBorderBottom )
{
// Not screen? Return immediately.
- if ( painter.device()->isExtDev() )
+ if ( painter.tqdevice()->isExtDev() )
return;
if ( ! format()->sheet()->isShowPageBorders() )
@@ -3474,7 +3474,7 @@ void Cell::paintPageBorders( QPainter& painter,
SheetPrint* print = format()->sheet()->print();
- Sheet::LayoutDirection sheetDir = format()->sheet()->layoutDirection();
+ Sheet::LayoutDirection sheetDir = format()->sheet()->tqlayoutDirection();
Doc* doc = sheet()->doc();
int zcellRect_left = doc->zoomItX (cellRect.left());
@@ -3538,13 +3538,13 @@ void Cell::paintPageBorders( QPainter& painter,
// Paint the cell borders.
//
-void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
+void Cell::paintCellBorders( TQPainter& painter, const KoRect& rect,
const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintRight, bool paintBottom,
bool paintLeft, bool paintTop,
- QPen & _rightPen, QPen & _bottomPen,
- QPen & _leftPen, QPen & _topPen )
+ TQPen & _rightPen, TQPen & _bottomPen,
+ TQPen & _leftPen, TQPen & _topPen )
{
//Sanity check: If we are not painting any of the borders then the function
@@ -3554,7 +3554,7 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
Doc * doc = sheet()->doc();
- Sheet::LayoutDirection sheetDir = format()->sheet()->layoutDirection();
+ Sheet::LayoutDirection sheetDir = format()->sheet()->tqlayoutDirection();
// compute zoomed rectangles
// I don't use KoRect, because that ends up producing lots of warnings
@@ -3580,8 +3580,8 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// paintBottom = paintBottom && ( d->extra()->extraYCells() == 0 );
if (d->hasExtra()) {
- QValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
- QValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
+ TQValueList<Cell*>::const_iterator it = d->extra()->obscuringCells.begin();
+ TQValueList<Cell*>::const_iterator end = d->extra()->obscuringCells.end();
for ( ; it != end; ++it ) {
Cell* cell = *it;
@@ -3599,28 +3599,28 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// Must create copies of these since otherwise the zoomIt()
// operation will be performed on them repeatedly.
- QPen leftPen( _leftPen );
- QPen rightPen( _rightPen );
- QPen topPen( _topPen );
- QPen bottomPen( _bottomPen );
+ TQPen leftPen( _leftPen );
+ TQPen rightPen( _rightPen );
+ TQPen topPen( _topPen );
+ TQPen bottomPen( _bottomPen );
// Determine the pens that should be used for drawing
// the borders.
//
- int left_penWidth = QMAX( 1, doc->zoomItX( leftPen.width() ) );
- int right_penWidth = QMAX( 1, doc->zoomItX( rightPen.width() ) );
- int top_penWidth = QMAX( 1, doc->zoomItY( topPen.width() ) );
- int bottom_penWidth = QMAX( 1, doc->zoomItY( bottomPen.width() ) );
+ int left_penWidth = TQMAX( 1, doc->zoomItX( leftPen.width() ) );
+ int right_penWidth = TQMAX( 1, doc->zoomItX( rightPen.width() ) );
+ int top_penWidth = TQMAX( 1, doc->zoomItY( topPen.width() ) );
+ int bottom_penWidth = TQMAX( 1, doc->zoomItY( bottomPen.width() ) );
leftPen.setWidth( left_penWidth );
rightPen.setWidth( right_penWidth );
topPen.setWidth( top_penWidth );
bottomPen.setWidth( bottom_penWidth );
- if ( paintLeft && leftPen.style() != Qt::NoPen ) {
- int top = ( QMAX( 0, -1 + top_penWidth ) ) / 2 +
- ( ( QMAX( 0, -1 + top_penWidth ) ) % 2 );
- int bottom = ( QMAX( 0, -1 + bottom_penWidth ) ) / 2 + 1;
+ if ( paintLeft && leftPen.style() != TQt::NoPen ) {
+ int top = ( TQMAX( 0, -1 + top_penWidth ) ) / 2 +
+ ( ( TQMAX( 0, -1 + top_penWidth ) ) % 2 );
+ int bottom = ( TQMAX( 0, -1 + bottom_penWidth ) ) / 2 + 1;
painter.setPen( leftPen );
@@ -3628,11 +3628,11 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
// FIXME: There is probably Cut&Paste bugs here as well as below.
- // The QMIN/QMAX and left/right pairs don't really make sense.
+ // The TQMIN/TQMAX and left/right pairs don't really make sense.
//
- // UPDATE: In fact, most of these QMIN/QMAX combinations
+ // UPDATE: In fact, most of these TQMIN/TQMAX combinations
// are TOTALLY BOGUS. For one thing, the idea
// that we always have full cells on paper is wrong
// since we can have embedded sheets in e.g. kword,
@@ -3640,15 +3640,15 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// REVISE THIS WHOLE BORDER PAINTING SECTION!
//
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMIN( zrect_right, zcellRect_right ),
- QMAX( zrect_top, zcellRect_top - top ),
- QMIN( zrect_right, zcellRect_right ),
- QMIN( zrect_bottom, zcellRect_bottom + bottom ) );
+ painter.drawLine( TQMIN( zrect_right, zcellRect_right ),
+ TQMAX( zrect_top, zcellRect_top - top ),
+ TQMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_bottom, zcellRect_bottom + bottom ) );
else
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_top - top ),
- QMAX( zrect_left, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_bottom + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_top - top ),
+ TQMAX( zrect_left, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_bottom + bottom ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -3664,10 +3664,10 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
}
}
- if ( paintRight && rightPen.style() != Qt::NoPen ) {
- int top = ( QMAX( 0, -1 + top_penWidth ) ) / 2 +
- ( ( QMAX( 0, -1 + top_penWidth ) ) % 2 );
- int bottom = ( QMAX( 0, -1 + bottom_penWidth ) ) / 2 + 1;
+ if ( paintRight && rightPen.style() != TQt::NoPen ) {
+ int top = ( TQMAX( 0, -1 + top_penWidth ) ) / 2 +
+ ( ( TQMAX( 0, -1 + top_penWidth ) ) % 2 );
+ int bottom = ( TQMAX( 0, -1 + bottom_penWidth ) ) / 2 + 1;
painter.setPen( rightPen );
@@ -3675,12 +3675,12 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_top - top ),
- QMAX( zrect_left, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_bottom + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_top - top ),
+ TQMAX( zrect_left, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_bottom + bottom ) );
else {
// FIXME: This is the way all these things should look.
// Make it so.
@@ -3688,9 +3688,9 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// Only print the right border if it is visible.
if ( zcellRect_right <= zrect_right + right_penWidth / 2)
painter.drawLine( zcellRect_right,
- QMAX( zrect_top, zcellRect_top - top ),
+ TQMAX( zrect_top, zcellRect_top - top ),
zcellRect_right,
- QMIN( zrect_bottom, zcellRect_bottom + bottom ) );
+ TQMIN( zrect_bottom, zcellRect_bottom + bottom ) );
}
}
else {
@@ -3707,7 +3707,7 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
}
}
- if ( paintTop && topPen.style() != Qt::NoPen ) {
+ if ( paintTop && topPen.style() != TQt::NoPen ) {
painter.setPen( topPen );
//kdDebug(36001) << " painting top border of cell " << name()
@@ -3716,11 +3716,11 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( zcellRect_top >= zrect_top + top_penWidth / 2)
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
zcellRect_top,
- QMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_right, zcellRect_right ),
zcellRect_top );
}
else {
@@ -3729,7 +3729,7 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
}
}
- if ( paintBottom && bottomPen.style() != Qt::NoPen ) {
+ if ( paintBottom && bottomPen.style() != TQt::NoPen ) {
painter.setPen( bottomPen );
//kdDebug(36001) << " painting bottom border of cell " << name()
@@ -3738,11 +3738,11 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( zcellRect_bottom <= zrect_bottom + bottom_penWidth / 2)
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
zcellRect_bottom,
- QMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_right, zcellRect_right ),
zcellRect_bottom );
}
else {
@@ -3762,9 +3762,9 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
#if 0
// Look at the cells on our corners. It may happen that we
// just erased parts of their borders corner, so we might need
- // to repaint these corners.
+ // to tqrepaint these corners.
//
- QPen vert_pen, horz_pen;
+ TQPen vert_pen, horz_pen;
int vert_penWidth, horz_penWidth;
// Some useful referenses.
@@ -3793,10 +3793,10 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
vert_pen = cell_northwest->effRightBorderPen( cellRef.x() - 1,
cellRef.y() - 1 );
- vert_penWidth = QMAX( 1, doc->zoomItX( vert_pen.width() ) );
+ vert_penWidth = TQMAX( 1, doc->zoomItX( vert_pen.width() ) );
vert_pen.setWidth( vert_penWidth );
- if ( vert_pen.style() != Qt::NoPen ) {
+ if ( vert_pen.style() != TQt::NoPen ) {
if ( cell_west->effTopBorderValue( cellRef.x() - 1, cellRef.y() )
>= cell_northwest->effBottomBorderValue( cellRef.x() - 1, cellRef.y() - 1 ) )
horz_pen = cell_west->effTopBorderPen( cellRef.x() - 1, cellRef.y() );
@@ -3804,23 +3804,23 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
horz_pen = cell_northwest->effBottomBorderPen( cellRef.x() - 1,
cellRef.y() - 1 );
- horz_penWidth = QMAX( 1, doc->zoomItY( horz_pen.width() ) );
- int bottom = ( QMAX( 0, -1 + horz_penWidth ) ) / 2 + 1;
+ horz_penWidth = TQMAX( 1, doc->zoomItY( horz_pen.width() ) );
+ int bottom = ( TQMAX( 0, -1 + horz_penWidth ) ) / 2 + 1;
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMAX( zrect_left, zcellRect_right ),
- QMAX( zrect_top, zcellRect_top ),
- QMIN( zrect_right, zcellRect_right ),
- QMIN( zrect_bottom, zcellRect_top + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
+ TQMAX( zrect_top, zcellRect_top ),
+ TQMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_bottom, zcellRect_top + bottom ) );
else
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_top ),
- QMIN( zrect_right, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_top + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_top ),
+ TQMIN( zrect_right, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_top + bottom ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -3842,9 +3842,9 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
cellRef.y() - 1 );
// vert_pen = effRightBorderPen( cellRef.x(), cellRef.y() - 1 );
- vert_penWidth = QMAX( 1, doc->zoomItX( vert_pen.width() ) );
+ vert_penWidth = TQMAX( 1, doc->zoomItX( vert_pen.width() ) );
vert_pen.setWidth( vert_penWidth );
- if ( ( vert_pen.style() != Qt::NoPen ) && ( cellRef.x() < KS_colMax ) ) {
+ if ( ( vert_pen.style() != TQt::NoPen ) && ( cellRef.x() < KS_colMax ) ) {
if ( cell_east->effTopBorderValue( cellRef.x() + 1, cellRef.y() )
>= cell_northeast->effBottomBorderValue( cellRef.x() + 1,
cellRef.y() - 1 ) )
@@ -3854,23 +3854,23 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
cellRef.y() - 1 );
// horz_pen = effTopBorderPen( cellRef.x() + 1, cellRef.y() );
- horz_penWidth = QMAX( 1, doc->zoomItY( horz_pen.width() ) );
- int bottom = ( QMAX( 0, -1 + horz_penWidth ) ) / 2 + 1;
+ horz_penWidth = TQMAX( 1, doc->zoomItY( horz_pen.width() ) );
+ int bottom = ( TQMAX( 0, -1 + horz_penWidth ) ) / 2 + 1;
painter.setPen( vert_pen );
//If we are on paper printout, we limit the length of the lines
//On paper, we always have full cells, on screen not
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_top ),
- QMIN( zrect_right, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_top + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_top ),
+ TQMIN( zrect_right, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_top + bottom ) );
else
- painter.drawLine( QMAX( zrect_left, zcellRect_right ),
- QMAX( zrect_top, zcellRect_top ),
- QMIN( zrect_right, zcellRect_right ),
- QMIN( zrect_bottom, zcellRect_top + bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
+ TQMAX( zrect_top, zcellRect_top ),
+ TQMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_bottom, zcellRect_top + bottom ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -3894,9 +3894,9 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
cellRef.y() + 1 );
// vert_pen = effLeftBorderPen( cellRef.x(), cellRef.y() + 1 );
- vert_penWidth = QMAX( 1, doc->zoomItY( vert_pen.width() ) );
+ vert_penWidth = TQMAX( 1, doc->zoomItY( vert_pen.width() ) );
vert_pen.setWidth( vert_penWidth );
- if ( vert_pen.style() != Qt::NoPen ) {
+ if ( vert_pen.style() != TQt::NoPen ) {
if ( cell_west->effBottomBorderValue( cellRef.x() - 1, cellRef.y() )
>= cell_southwest->effTopBorderValue( cellRef.x() - 1,
cellRef.y() + 1 ) )
@@ -3907,23 +3907,23 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
cellRef.y() + 1 );
// horz_pen = effBottomBorderPen( cellRef.x() - 1, cellRef.y() );
- horz_penWidth = QMAX( 1, doc->zoomItX( horz_pen.width() ) );
- int bottom = ( QMAX( 0, -1 + horz_penWidth ) ) / 2;
+ horz_penWidth = TQMAX( 1, doc->zoomItX( horz_pen.width() ) );
+ int bottom = ( TQMAX( 0, -1 + horz_penWidth ) ) / 2;
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMAX( zrect_left, zcellRect_right ),
- QMAX( zrect_top, zcellRect_bottom - bottom ),
- QMIN( zrect_right, zcellRect_right ),
- QMIN( zrect_bottom, zcellRect_bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
+ TQMAX( zrect_top, zcellRect_bottom - bottom ),
+ TQMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_bottom, zcellRect_bottom ) );
else
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_bottom - bottom ),
- QMIN( zrect_right, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_bottom - bottom ),
+ TQMIN( zrect_right, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_bottom ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -3945,9 +3945,9 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
cellRef.y() + 1 );
// vert_pen = effRightBorderPen( cellRef.x(), cellRef.y() + 1 );
- vert_penWidth = QMAX( 1, doc->zoomItY( vert_pen.width() ) );
+ vert_penWidth = TQMAX( 1, doc->zoomItY( vert_pen.width() ) );
vert_pen.setWidth( vert_penWidth );
- if ( ( vert_pen.style() != Qt::NoPen ) && ( cellRef.x() < KS_colMax ) ) {
+ if ( ( vert_pen.style() != TQt::NoPen ) && ( cellRef.x() < KS_colMax ) ) {
if ( cell_east ->effBottomBorderValue( cellRef.x() + 1, cellRef.y() )
>= cell_southeast->effTopBorderValue( cellRef.x() + 1,
cellRef.y() + 1 ) )
@@ -3959,23 +3959,23 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
->effTopBorderPen( cellRef.x() + 1, cellRef.y() + 1 );
// horz_pen = effBottomBorderPen( cellRef.x() + 1, cellRef.y() );
- horz_penWidth = QMAX( 1, doc->zoomItX( horz_pen.width() ) );
- int bottom = ( QMAX( 0, -1 + horz_penWidth ) ) / 2;
+ horz_penWidth = TQMAX( 1, doc->zoomItX( horz_pen.width() ) );
+ int bottom = ( TQMAX( 0, -1 + horz_penWidth ) ) / 2;
painter.setPen( vert_pen );
// If we are on paper printout, we limit the length of the lines.
// On paper, we always have full cells, on screen not.
- if ( painter.device()->isExtDev() ) {
+ if ( painter.tqdevice()->isExtDev() ) {
if ( sheetDir == Sheet::RightToLeft )
- painter.drawLine( QMAX( zrect_left, zcellRect_left ),
- QMAX( zrect_top, zcellRect_bottom - bottom ),
- QMIN( zrect_right, zcellRect_left ),
- QMIN( zrect_bottom, zcellRect_bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_left ),
+ TQMAX( zrect_top, zcellRect_bottom - bottom ),
+ TQMIN( zrect_right, zcellRect_left ),
+ TQMIN( zrect_bottom, zcellRect_bottom ) );
else
- painter.drawLine( QMAX( zrect_left, zcellRect_right ),
- QMAX( zrect_top, zcellRect_bottom - bottom ),
- QMIN( zrect_right, zcellRect_right ),
- QMIN( zrect_bottom, zcellRect_bottom ) );
+ painter.drawLine( TQMAX( zrect_left, zcellRect_right ),
+ TQMAX( zrect_top, zcellRect_bottom - bottom ),
+ TQMIN( zrect_right, zcellRect_right ),
+ TQMIN( zrect_bottom, zcellRect_bottom ) );
}
else {
if ( sheetDir == Sheet::RightToLeft )
@@ -3993,16 +3993,16 @@ void Cell::paintCellBorders( QPainter& painter, const KoRect& rect,
// Paint diagonal lines through the cell.
//
-void Cell::paintCellDiagonalLines( QPainter& painter,
+void Cell::paintCellDiagonalLines( TQPainter& painter,
const KoRect &cellRect,
- const QPoint &cellRef )
+ const TQPoint &cellRef )
{
if ( isPartOfMerged() )
return;
Doc* doc = sheet()->doc();
- if ( effFallDiagonalPen( cellRef.x(), cellRef.y() ).style() != Qt::NoPen ) {
+ if ( effFallDiagonalPen( cellRef.x(), cellRef.y() ).style() != TQt::NoPen ) {
painter.setPen( effFallDiagonalPen( cellRef.x(), cellRef.y() ) );
painter.drawLine( doc->zoomItX( cellRect.x() ),
doc->zoomItY( cellRect.y() ),
@@ -4010,7 +4010,7 @@ void Cell::paintCellDiagonalLines( QPainter& painter,
doc->zoomItY( cellRect.bottom() ) );
}
- if ( effGoUpDiagonalPen( cellRef.x(), cellRef.y() ).style() != Qt::NoPen ) {
+ if ( effGoUpDiagonalPen( cellRef.x(), cellRef.y() ).style() != TQt::NoPen ) {
painter.setPen( effGoUpDiagonalPen( cellRef.x(), cellRef.y() ) );
painter.drawLine( doc->zoomItX( cellRect.x() ),
doc->zoomItY( cellRect.bottom() ),
@@ -4060,9 +4060,9 @@ int Cell::effAlignX()
// Used in paintText().
//
-QString Cell::textDisplaying( QPainter &_painter )
+TQString Cell::textDisplaying( TQPainter &_painter )
{
- QFontMetrics fm = _painter.fontMetrics();
+ TQFontMetrics fm = _painter.fontMetrics();
int a = format()->align( column(), row() );
bool isNumeric = value().isNumber();
@@ -4079,7 +4079,7 @@ QString Cell::textDisplaying( QPainter &_painter )
len += cl2->dblWidth() - 1.0; //-1.0 because the pixel in between 2 cells is shared between both cells
}
- QString tmp;
+ TQString tmp;
double tmpIndent = 0.0;
if ( !isEmpty() )
tmpIndent = format()->getIndent( column(), row() );
@@ -4105,8 +4105,8 @@ QString Cell::textDisplaying( QPainter &_painter )
//out of space to fit even the integer part of the number then display #########
//TODO Perhaps try to display integer part in standard form if there is not enough room for it?
- if (!tmp.contains('.'))
- d->strOutText=QString().fill('#',20);
+ if (!tmp.tqcontains('.'))
+ d->strOutText=TQString().fill('#',20);
}
// 4 equal length of red triangle +1 point.
@@ -4115,7 +4115,7 @@ QString Cell::textDisplaying( QPainter &_painter )
{
if ( format()->getAngle( column(), row() ) != 0 )
{
- QString tmp2;
+ TQString tmp2;
RowFormat *rl = format()->sheet()->rowFormat( row() );
if ( d->textHeight > rl->dblHeight() )
{
@@ -4124,7 +4124,7 @@ QString Cell::textDisplaying( QPainter &_painter )
tmp2 = d->strOutText.left( j );
if ( format()->sheet()->doc()->unzoomItY( fm.width( tmp2 ) ) < rl->dblHeight() - 1.0 )
{
- return d->strOutText.left( QMIN( tmp.length(), tmp2.length() ) );
+ return d->strOutText.left( TQMIN( tmp.length(), tmp2.length() ) );
}
}
}
@@ -4136,10 +4136,10 @@ QString Cell::textDisplaying( QPainter &_painter )
return tmp;
}
}
- return QString( "" );
+ return TQString( "" );
}
else if ( format()->verticalText( column(), row() ) ) {
- // Vertical text.
+ //Qt::Vertical text.
RowFormat *rl = format()->sheet()->rowFormat( row() );
double tmpIndent = 0.0;
@@ -4159,7 +4159,7 @@ QString Cell::textDisplaying( QPainter &_painter )
tmpIndent = format()->getIndent( column(), row() );
if ( ( d->textWidth + tmpIndent > len ) || d->textWidth == 0.0 )
- return QString( "" );
+ return TQString( "" );
for ( int i = d->strOutText.length(); i != 0; i-- ) {
if ( format()->sheet()->doc()->unzoomItY( fm.ascent() + fm.descent() ) * i
@@ -4167,7 +4167,7 @@ QString Cell::textDisplaying( QPainter &_painter )
return d->strOutText.left( i );
}
- return QString( "" );
+ return TQString( "" );
}
ColumnFormat *cl = format()->sheet()->columnFormat( column() );
@@ -4176,7 +4176,7 @@ QString Cell::textDisplaying( QPainter &_painter )
if ( d->hasExtra() && (d->extra()->extraWidth != 0.0) )
w = d->extra()->extraWidth;
- QString tmp;
+ TQString tmp;
for ( int i = d->strOutText.length(); i != 0; i-- ) {
tmp = d->strOutText.left( i );
@@ -4185,7 +4185,7 @@ QString Cell::textDisplaying( QPainter &_painter )
return tmp;
}
- return QString::null;
+ return TQString();
}
@@ -4248,7 +4248,7 @@ int Cell::height( int _row, const Canvas *_canvas ) const
//
///////////////////////////////////////////
-const QBrush& Cell::backGroundBrush( int _col, int _row ) const
+const TQBrush& Cell::backGroundBrush( int _col, int _row ) const
{
if ( d->hasExtra() && (!d->extra()->obscuringCells.isEmpty()) )
{
@@ -4259,7 +4259,7 @@ const QBrush& Cell::backGroundBrush( int _col, int _row ) const
return format()->backGroundBrush( _col, _row );
}
-const QColor& Cell::bgColor( int _col, int _row ) const
+const TQColor& Cell::bgColor( int _col, int _row ) const
{
if ( d->hasExtra() && (!d->extra()->obscuringCells.isEmpty()) )
{
@@ -4277,7 +4277,7 @@ const QColor& Cell::bgColor( int _col, int _row ) const
//
///////////////////////////////////////////
-void Cell::setLeftBorderPen( const QPen& p )
+void Cell::setLeftBorderPen( const TQPen& p )
{
if ( column() == 1 )
{
@@ -4290,7 +4290,7 @@ void Cell::setLeftBorderPen( const QPen& p )
format()->setLeftBorderPen( p );
}
-void Cell::setTopBorderPen( const QPen& p )
+void Cell::setTopBorderPen( const TQPen& p )
{
if ( row() == 1 )
{
@@ -4302,7 +4302,7 @@ void Cell::setTopBorderPen( const QPen& p )
format()->setTopBorderPen( p );
}
-void Cell::setRightBorderPen( const QPen& p )
+void Cell::setRightBorderPen( const TQPen& p )
{
Cell* cell = 0L;
if ( column() < KS_colMax )
@@ -4315,7 +4315,7 @@ void Cell::setRightBorderPen( const QPen& p )
format()->setRightBorderPen( p );
}
-void Cell::setBottomBorderPen( const QPen& p )
+void Cell::setBottomBorderPen( const TQPen& p )
{
Cell* cell = 0L;
if ( row() < KS_rowMax )
@@ -4328,7 +4328,7 @@ void Cell::setBottomBorderPen( const QPen& p )
format()->setBottomBorderPen( p );
}
-const QPen& Cell::rightBorderPen( int _col, int _row ) const
+const TQPen& Cell::rightBorderPen( int _col, int _row ) const
{
if ( !format()->hasProperty( Format::PRightBorder ) && ( _col < KS_colMax ) )
{
@@ -4340,7 +4340,7 @@ const QPen& Cell::rightBorderPen( int _col, int _row ) const
return format()->rightBorderPen( _col, _row );
}
-const QPen& Cell::leftBorderPen( int _col, int _row ) const
+const TQPen& Cell::leftBorderPen( int _col, int _row ) const
{
if ( !format()->hasProperty( Format::PLeftBorder ) )
{
@@ -4352,7 +4352,7 @@ const QPen& Cell::leftBorderPen( int _col, int _row ) const
return format()->leftBorderPen( _col, _row );
}
-const QPen& Cell::bottomBorderPen( int _col, int _row ) const
+const TQPen& Cell::bottomBorderPen( int _col, int _row ) const
{
if ( !format()->hasProperty( Format::PBottomBorder ) && ( _row < KS_rowMax ) )
{
@@ -4364,7 +4364,7 @@ const QPen& Cell::bottomBorderPen( int _col, int _row ) const
return format()->bottomBorderPen( _col, _row );
}
-const QPen& Cell::topBorderPen( int _col, int _row ) const
+const TQPen& Cell::topBorderPen( int _col, int _row ) const
{
if ( !format()->hasProperty( Format::PTopBorder ) )
{
@@ -4376,7 +4376,7 @@ const QPen& Cell::topBorderPen( int _col, int _row ) const
return format()->topBorderPen( _col, _row );
}
-const QColor & Cell::effTextColor( int col, int row ) const
+const TQColor & Cell::effTextColor( int col, int row ) const
{
if ( d->hasExtra() && d->extra()->conditions
&& d->extra()->conditions->matchedStyle()
@@ -4386,7 +4386,7 @@ const QColor & Cell::effTextColor( int col, int row ) const
return format()->textColor( col, row );
}
-const QPen& Cell::effLeftBorderPen( int col, int row ) const
+const TQPen& Cell::effLeftBorderPen( int col, int row ) const
{
if ( isPartOfMerged() )
{
@@ -4402,7 +4402,7 @@ const QPen& Cell::effLeftBorderPen( int col, int row ) const
return leftBorderPen( col, row );
}
-const QPen& Cell::effTopBorderPen( int col, int row ) const
+const TQPen& Cell::effTopBorderPen( int col, int row ) const
{
if ( isPartOfMerged() )
{
@@ -4418,7 +4418,7 @@ const QPen& Cell::effTopBorderPen( int col, int row ) const
return topBorderPen( col, row );
}
-const QPen& Cell::effRightBorderPen( int col, int row ) const
+const TQPen& Cell::effRightBorderPen( int col, int row ) const
{
if ( isPartOfMerged() )
{
@@ -4434,7 +4434,7 @@ const QPen& Cell::effRightBorderPen( int col, int row ) const
return rightBorderPen( col, row );
}
-const QPen& Cell::effBottomBorderPen( int col, int row ) const
+const TQPen& Cell::effBottomBorderPen( int col, int row ) const
{
if ( isPartOfMerged() )
{
@@ -4450,7 +4450,7 @@ const QPen& Cell::effBottomBorderPen( int col, int row ) const
return bottomBorderPen( col, row );
}
-const QPen & Cell::effGoUpDiagonalPen( int col, int row ) const
+const TQPen & Cell::effGoUpDiagonalPen( int col, int row ) const
{
if ( d->hasExtra() && d->extra()->conditions
&& d->extra()->conditions->matchedStyle()
@@ -4460,7 +4460,7 @@ const QPen & Cell::effGoUpDiagonalPen( int col, int row ) const
return format()->goUpDiagonalPen( col, row );
}
-const QPen & Cell::effFallDiagonalPen( int col, int row ) const
+const TQPen & Cell::effFallDiagonalPen( int col, int row ) const
{
if ( d->hasExtra() && d->extra()->conditions
&& d->extra()->conditions->matchedStyle()
@@ -4546,23 +4546,23 @@ void Cell::incPrecision()
if ( tmpPreci == -1 )
{
- int pos = d->strOutText.find(decimal_point);
+ int pos = d->strOutText.tqfind(decimal_point);
if ( pos == -1 )
- pos = d->strOutText.find('.');
+ pos = d->strOutText.tqfind('.');
if ( pos == -1 )
format()->setPrecision(1);
else
{
int start = 0;
- if ( d->strOutText.find('%') != -1 )
+ if ( d->strOutText.tqfind('%') != -1 )
start = 2;
- else if ( d->strOutText.find(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
+ else if ( d->strOutText.tqfind(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
start = locale()->currencySymbol().length() + 1;
- else if ( (start=d->strOutText.find('E')) != -1 )
+ else if ( (start=d->strOutText.tqfind('E')) != -1 )
start = d->strOutText.length() - start;
//kdDebug(36001) << "start=" << start << " pos=" << pos << " length=" << d->strOutText.length() << endl;
- format()->setPrecision( QMAX( 0, (int)d->strOutText.length() - start - pos ) );
+ format()->setPrecision( TQMAX( 0, (int)d->strOutText.length() - start - pos ) );
}
}
else if ( tmpPreci < 10 )
@@ -4582,13 +4582,13 @@ void Cell::decPrecision()
// kdDebug(36001) << "decPrecision: tmpPreci = " << tmpPreci << endl;
if ( format()->precision(column(),row()) == -1 )
{
- int pos = d->strOutText.find( decimal_point );
+ int pos = d->strOutText.tqfind( decimal_point );
int start = 0;
- if ( d->strOutText.find('%') != -1 )
+ if ( d->strOutText.tqfind('%') != -1 )
start = 2;
- else if ( d->strOutText.find(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
+ else if ( d->strOutText.tqfind(locale()->currencySymbol()) == ((int)(d->strOutText.length()-locale()->currencySymbol().length())) )
start = locale()->currencySymbol().length() + 1;
- else if ( (start = d->strOutText.find('E')) != -1 )
+ else if ( (start = d->strOutText.tqfind('E')) != -1 )
start = d->strOutText.length() - start;
else
start = 0;
@@ -4618,9 +4618,9 @@ void Cell::setNumber( double number )
checkNumberFormat();
}
-void Cell::setCellText( const QString& _text, bool asText )
+void Cell::setCellText( const TQString& _text, bool asText )
{
- // QString ctext = _text;
+ // TQString ctext = _text;
// (Tomas) is this trim necessary for anything ?
// if( ctext.length() > 5000 )
@@ -4642,7 +4642,7 @@ void Cell::setCellText( const QString& _text, bool asText )
return;
}
- QString oldText = d->strText;
+ TQString oldText = d->strText;
setDisplayText( _text );
if(!format()->sheet()->isLoading() && !testValidity() )
{
@@ -4651,7 +4651,7 @@ void Cell::setCellText( const QString& _text, bool asText )
}
}
-void Cell::setDisplayText( const QString& _text )
+void Cell::setDisplayText( const TQString& _text )
{
bool isLoading = format()->sheet()->isLoading();
@@ -4686,10 +4686,10 @@ void Cell::setDisplayText( const QString& _text )
}
if ( !isLoading )
- format()->sheet()->doc()->emitEndOperation( QRect( d->column, d->row, 1, 1 ) );
+ format()->sheet()->doc()->emitEndOperation( TQRect( d->column, d->row, 1, 1 ) );
}
-void Cell::setLink( const QString& link )
+void Cell::setLink( const TQString& link )
{
d->extra()->link = link;
@@ -4697,14 +4697,14 @@ void Cell::setLink( const QString& link )
setCellText( link );
}
-QString Cell::link() const
+TQString Cell::link() const
{
- return d->hasExtra() ? d->extra()->link : QString::null;
+ return d->hasExtra() ? d->extra()->link : TQString();
}
void Cell::update()
{
- /* those obscuring us need to redo their layout cause they can't obscure us
+ /* those obscuring us need to redo their tqlayout cause they can't obscure us
now that we've got text.
This includes cells obscuring cells that we are obscuring
*/
@@ -4780,7 +4780,7 @@ bool Cell::testValidity() const
else if ( d->extra()->validity->m_restriction == Restriction::List )
{
//test int value
- if ( value().isString() && d->extra()->validity->listValidity.contains( value().asString() ) )
+ if ( value().isString() && d->extra()->validity->listValidity.tqcontains( value().asString() ) )
valid = true;
}
else if(d->extra()->validity->m_restriction==Restriction::TextLength)
@@ -4908,15 +4908,15 @@ bool Cell::testValidity() const
switch (d->extra()->validity->m_action )
{
case Action::Stop:
- KMessageBox::error((QWidget*)0L, d->extra()->validity->message,
+ KMessageBox::error((TQWidget*)0L, d->extra()->validity->message,
d->extra()->validity->title);
break;
case Action::Warning:
- KMessageBox::warningYesNo((QWidget*)0L, d->extra()->validity->message,
+ KMessageBox::warningYesNo((TQWidget*)0L, d->extra()->validity->message,
d->extra()->validity->title);
break;
case Action::Information:
- KMessageBox::information((QWidget*)0L, d->extra()->validity->message,
+ KMessageBox::information((TQWidget*)0L, d->extra()->validity->message,
d->extra()->validity->title);
break;
}
@@ -5009,7 +5009,7 @@ bool Cell::updateChart(bool refresh)
CellBinding *bind;
for ( bind = format()->sheet()->firstCellBinding(); bind != 0L; bind = format()->sheet()->nextCellBinding() )
{
- if ( bind->contains( d->column, d->row ) )
+ if ( bind->tqcontains( d->column, d->row ) )
{
if (!refresh)
return true;
@@ -5030,14 +5030,14 @@ double Cell::getDouble ()
//(Tomas) umm can't we simply call value().asFloat() ?
if (isDate())
{
- QDate date = value().asDate();
- QDate dummy (1900, 1, 1);
+ TQDate date = value().asDate();
+ TQDate dummy (1900, 1, 1);
return (dummy.daysTo (date) + 1);
}
if (isTime())
{
- QTime time = value().asTime();
- QTime dummy;
+ TQTime time = value().asTime();
+ TQTime dummy;
return dummy.secsTo( time );
}
if (value().isNumber())
@@ -5076,14 +5076,14 @@ void Cell::convertToMoney ()
void Cell::convertToTime ()
{
//(Tomas) This is weird. And I mean *REALLY* weird. First, we
- //generate a time (QTime), then we convert it to text, then
+ //generate a time (TQTime), then we convert it to text, then
//we give the text to the cell and ask it to parse it. Weird...
if (isDefault() || isEmpty())
return;
setValue (getDouble ());
- QTime time = value().asDateTime().time();
+ TQTime time = value().asDateTime().time();
int msec = (int) ( (value().asFloat() - (int) value().asFloat()) * 1000 );
time = time.addMSecs( msec );
setCellText( time.toString() );
@@ -5092,7 +5092,7 @@ void Cell::convertToTime ()
void Cell::convertToDate ()
{
//(Tomas) This is weird. And I mean *REALLY* weird. First, we
- //generate a date (QDate), then we convert it to text, then
+ //generate a date (TQDate), then we convert it to text, then
//we give the text to the cell and ask it to parse it. Weird...
if (isDefault() || isEmpty())
@@ -5101,7 +5101,7 @@ void Cell::convertToDate ()
setValue (getDouble ());
//TODO: why did we call setValue(), when we override it here?
- QDate date(1900, 1, 1);
+ TQDate date(1900, 1, 1);
date = date.addDays( (int) value().asFloat() - 1 );
date = value().asDateTime().date();
setCellText (locale()->formatDate (date, true));
@@ -5115,7 +5115,7 @@ void Cell::checkTextInput()
d->value = Value::empty();
// Get the text from that cell
- QString str = d->strText;
+ TQString str = d->strText;
sheet()->doc()->parser()->parse (str, this);
@@ -5128,7 +5128,7 @@ void Cell::checkTextInput()
if (format()->sheet()->getFirstLetterUpper() && value().isString() &&
(!d->strText.isEmpty()))
{
- QString str = value().asString();
+ TQString str = value().asString();
setValue( Value( str[0].upper() + str.right( str.length()-1 ) ) );
}
}
@@ -5148,18 +5148,18 @@ void Cell::checkNumberFormat()
// Saving and loading
-QDomElement Cell::save( QDomDocument& doc,
+TQDomElement Cell::save( TQDomDocument& doc,
int _x_offset, int _y_offset,
bool force, bool copy, bool era )
{
// Save the position of this cell
- QDomElement cell = doc.createElement( "cell" );
+ TQDomElement cell = doc.createElement( "cell" );
cell.setAttribute( "row", d->row - _y_offset );
cell.setAttribute( "column", d->column - _x_offset );
//
// Save the formatting information
//
- QDomElement formatElement = format()->save( doc, d->column, d->row, force, copy );
+ TQDomElement formatElement = format()->save( doc, d->column, d->row, force, copy );
if ( formatElement.hasChildNodes() || formatElement.attributes().length() ) // don't save empty tags
cell.appendChild( formatElement );
@@ -5173,7 +5173,7 @@ QDomElement Cell::save( QDomDocument& doc,
if ( d->hasExtra() && d->extra()->conditions )
{
- QDomElement conditionElement = d->extra()->conditions->saveConditions( doc );
+ TQDomElement conditionElement = d->extra()->conditions->saveConditions( doc );
if ( !conditionElement.isNull() )
cell.appendChild( conditionElement );
@@ -5181,9 +5181,9 @@ QDomElement Cell::save( QDomDocument& doc,
if ( d->hasExtra() && (d->extra()->validity != 0) )
{
- QDomElement validity = doc.createElement("validity");
+ TQDomElement validity = doc.createElement("validity");
- QDomElement param=doc.createElement("param");
+ TQDomElement param=doc.createElement("param");
param.setAttribute("cond",(int)d->extra()->validity->m_cond);
param.setAttribute("action",(int)d->extra()->validity->m_action);
param.setAttribute("allow",(int)d->extra()->validity->m_restriction);
@@ -5195,34 +5195,34 @@ QDomElement Cell::save( QDomDocument& doc,
if ( !d->extra()->validity->listValidity.isEmpty() )
param.setAttribute( "listvalidity", d->extra()->validity->listValidity.join( ";" ) );
validity.appendChild(param);
- QDomElement title = doc.createElement( "title" );
+ TQDomElement title = doc.createElement( "title" );
title.appendChild( doc.createTextNode( d->extra()->validity->title ) );
validity.appendChild( title );
- QDomElement message = doc.createElement( "message" );
+ TQDomElement message = doc.createElement( "message" );
message.appendChild( doc.createCDATASection( d->extra()->validity->message ) );
validity.appendChild( message );
- QDomElement inputTitle = doc.createElement( "inputtitle" );
+ TQDomElement inputTitle = doc.createElement( "inputtitle" );
inputTitle.appendChild( doc.createTextNode( d->extra()->validity->titleInfo ) );
validity.appendChild( inputTitle );
- QDomElement inputMessage = doc.createElement( "inputmessage" );
+ TQDomElement inputMessage = doc.createElement( "inputmessage" );
inputMessage.appendChild( doc.createTextNode( d->extra()->validity->messageInfo ) );
validity.appendChild( inputMessage );
- QString tmp;
+ TQString tmp;
if ( d->extra()->validity->timeMin.isValid() )
{
- QDomElement timeMin = doc.createElement( "timemin" );
+ TQDomElement timeMin = doc.createElement( "timemin" );
tmp=d->extra()->validity->timeMin.toString();
timeMin.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( timeMin );
}
if ( d->extra()->validity->timeMax.isValid() )
{
- QDomElement timeMax = doc.createElement( "timemax" );
+ TQDomElement timeMax = doc.createElement( "timemax" );
tmp=d->extra()->validity->timeMax.toString();
timeMax.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( timeMax );
@@ -5230,17 +5230,17 @@ QDomElement Cell::save( QDomDocument& doc,
if ( d->extra()->validity->dateMin.isValid() )
{
- QDomElement dateMin = doc.createElement( "datemin" );
- QString tmp("%1/%2/%3");
- tmp = tmp.arg(d->extra()->validity->dateMin.year()).arg(d->extra()->validity->dateMin.month()).arg(d->extra()->validity->dateMin.day());
+ TQDomElement dateMin = doc.createElement( "datemin" );
+ TQString tmp("%1/%2/%3");
+ tmp = tmp.tqarg(d->extra()->validity->dateMin.year()).tqarg(d->extra()->validity->dateMin.month()).tqarg(d->extra()->validity->dateMin.day());
dateMin.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( dateMin );
}
if ( d->extra()->validity->dateMax.isValid() )
{
- QDomElement dateMax = doc.createElement( "datemax" );
- QString tmp("%1/%2/%3");
- tmp = tmp.arg(d->extra()->validity->dateMax.year()).arg(d->extra()->validity->dateMax.month()).arg(d->extra()->validity->dateMax.day());
+ TQDomElement dateMax = doc.createElement( "datemax" );
+ TQString tmp("%1/%2/%3");
+ tmp = tmp.tqarg(d->extra()->validity->dateMax.year()).tqarg(d->extra()->validity->dateMax.month()).tqarg(d->extra()->validity->dateMax.day());
dateMax.appendChild( doc.createTextNode( tmp ) );
validity.appendChild( dateMax );
}
@@ -5250,7 +5250,7 @@ QDomElement Cell::save( QDomDocument& doc,
if ( format()->comment() )
{
- QDomElement comment = doc.createElement( "comment" );
+ TQDomElement comment = doc.createElement( "comment" );
comment.appendChild( doc.createCDATASection( *format()->comment() ) );
cell.appendChild( comment );
}
@@ -5264,13 +5264,13 @@ QDomElement Cell::save( QDomDocument& doc,
// are position independent.
if ( isFormula() )
{
- QDomElement text = doc.createElement( "text" );
+ TQDomElement text = doc.createElement( "text" );
// if we are cutting to the clipboard, relative references need to be encoded absolutely
text.appendChild( doc.createTextNode( encodeFormula( era ) ) );
cell.appendChild( text );
/* we still want to save the results of the formula */
- QDomElement formulaResult = doc.createElement( "result" );
+ TQDomElement formulaResult = doc.createElement( "result" );
saveCellResult( doc, formulaResult, d->strOutText );
cell.appendChild( formulaResult );
@@ -5279,15 +5279,15 @@ QDomElement Cell::save( QDomDocument& doc,
{
// KSpread pre 1.4 saves link as rich text, marked with first char '
// Have to be saved in some CDATA section because of too many special charatcers.
- QDomElement text = doc.createElement( "text" );
- QString qml = "!<a href=\"" + link() + "\">" + d->strText + "</a>";
+ TQDomElement text = doc.createElement( "text" );
+ TQString qml = "!<a href=\"" + link() + "\">" + d->strText + "</a>";
text.appendChild( doc.createCDATASection( qml ) );
cell.appendChild( text );
}
else
{
// Save the cell contents (in a locale-independent way)
- QDomElement text = doc.createElement( "text" );
+ TQDomElement text = doc.createElement( "text" );
saveCellResult( doc, text, d->strText );
cell.appendChild( text );
}
@@ -5296,23 +5296,23 @@ QDomElement Cell::save( QDomDocument& doc,
// (the >2 is due to "row" and "column" attributes)
return cell;
else
- return QDomElement();
+ return TQDomElement();
}
-bool Cell::saveCellResult( QDomDocument& doc, QDomElement& result,
- QString str )
+bool Cell::saveCellResult( TQDomDocument& doc, TQDomElement& result,
+ TQString str )
{
- QString dataType = "Other"; // fallback
+ TQString dataType = "Other"; // fallback
if ( value().isNumber() )
{
if ( isDate() )
{
// serial number of date
- QDate dd = value().asDateTime().date();
+ TQDate dd = value().asDateTime().date();
dataType = "Date";
str = "%1/%2/%3";
- str = str.arg(dd.year()).arg(dd.month()).arg(dd.day());
+ str = str.tqarg(dd.year()).tqarg(dd.month()).tqarg(dd.day());
}
else if( isTime() )
{
@@ -5325,9 +5325,9 @@ bool Cell::saveCellResult( QDomDocument& doc, QDomElement& result,
// real number
dataType = "Num";
if (value().isInteger())
- str = QString::number(value().asInteger());
+ str = TQString::number(value().asInteger());
else
- str = QString::number(value().asFloat(), 'g', DBL_DIG);
+ str = TQString::number(value().asFloat(), 'g', DBL_DIG);
}
}
@@ -5357,8 +5357,8 @@ void Cell::saveOasisAnnotation( KoXmlWriter &xmlwriter )
{
//<office:annotation draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.899cm" svg:height="2.691cm" svg:x="2.858cm" svg:y="0.001cm" draw:caption-point-x="-2.858cm" draw:caption-point-y="-0.001cm">
xmlwriter.startElement( "office:annotation" );
- QStringList text = QStringList::split( "\n", *format()->comment() );
- for ( QStringList::Iterator it = text.begin(); it != text.end(); ++it ) {
+ TQStringList text = TQStringList::split( "\n", *format()->comment() );
+ for ( TQStringList::Iterator it = text.begin(); it != text.end(); ++it ) {
xmlwriter.startElement( "text:p" );
xmlwriter.addTextNode( *it );
xmlwriter.endElement();
@@ -5369,7 +5369,7 @@ void Cell::saveOasisAnnotation( KoXmlWriter &xmlwriter )
-QString Cell::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
+TQString Cell::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
{
if ( d->hasExtra() && d->extra()->conditions )
{
@@ -5391,7 +5391,7 @@ bool Cell::saveOasis( KoXmlWriter& xmlwriter, KoGenStyles &mainStyles,
xmlwriter.startElement( "table:covered-table-cell" );
#if 0
//add font style
- QFont font;
+ TQFont font;
Value const value( cell->value() );
if ( !cell->isDefault() )
{
@@ -5456,7 +5456,7 @@ bool Cell::saveOasis( KoXmlWriter& xmlwriter, KoGenStyles &mainStyles,
<< "repeated " << repeated << " time(s)" << endl;
if ( repeated > 1 )
- xmlwriter.addAttribute( "table:number-columns-repeated", QString::number( repeated ) );
+ xmlwriter.addAttribute( "table:number-columns-repeated", TQString::number( repeated ) );
}
@@ -5468,7 +5468,7 @@ bool Cell::saveOasis( KoXmlWriter& xmlwriter, KoGenStyles &mainStyles,
if ( isFormula() )
{
//kdDebug() << "Formula found" << endl;
- QString formula( convertFormulaToOasisFormat( text() ) );
+ TQString formula( convertFormulaToOasisFormat( text() ) );
xmlwriter.addAttribute( "table:formula", formula );
}
else if ( !link().isEmpty() )
@@ -5492,10 +5492,10 @@ bool Cell::saveOasis( KoXmlWriter& xmlwriter, KoGenStyles &mainStyles,
int rowSpan = mergedYCells() + 1;
if ( colSpan > 1 )
- xmlwriter.addAttribute( "table:number-columns-spanned", QString::number( colSpan ) );
+ xmlwriter.addAttribute( "table:number-columns-spanned", TQString::number( colSpan ) );
if ( rowSpan > 1 )
- xmlwriter.addAttribute( "table:number-rows-spanned", QString::number( rowSpan ) );
+ xmlwriter.addAttribute( "table:number-rows-spanned", TQString::number( rowSpan ) );
}
if ( !isEmpty() && link().isEmpty() )
@@ -5527,16 +5527,16 @@ void Cell::saveOasisValue (KoXmlWriter &xmlWriter)
{
xmlWriter.addAttribute( "office:value-type", "float" );
if (value().isInteger())
- xmlWriter.addAttribute( "office:value", QString::number( value().asInteger() ) );
+ xmlWriter.addAttribute( "office:value", TQString::number( value().asInteger() ) );
else
- xmlWriter.addAttribute( "office:value", QString::number( value().asFloat(), 'g', DBL_DIG ) );
+ xmlWriter.addAttribute( "office:value", TQString::number( value().asFloat(), 'g', DBL_DIG ) );
break;
}
case Value::fmt_Percent:
{
xmlWriter.addAttribute( "office:value-type", "percentage" );
xmlWriter.addAttribute( "office:value",
- QString::number( value().asFloat() ) );
+ TQString::number( value().asFloat() ) );
break;
}
case Value::fmt_Money:
@@ -5546,7 +5546,7 @@ void Cell::saveOasisValue (KoXmlWriter &xmlWriter)
if (format()->currencyInfo(currency))
xmlWriter.addAttribute( "office:currency", Currency::getCurrencyCode(currency.type) );
xmlWriter.addAttribute( "office:value",
- QString::number( value().asFloat() ) );
+ TQString::number( value().asFloat() ) );
break;
}
case Value::fmt_DateTime: break; //NOTHING HERE
@@ -5573,10 +5573,10 @@ void Cell::saveOasisValue (KoXmlWriter &xmlWriter)
};
}
-QString Cell::convertFormulaToOasisFormat( const QString & formula ) const
+TQString Cell::convertFormulaToOasisFormat( const TQString & formula ) const
{
- QString s;
- QRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)");
+ TQString s;
+ TQRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)");
int n = exp.search( formula, 0 );
kdDebug() << "Exp: " << formula << ", n: " << n << ", Length: " << formula.length()
<< ", Matched length: " << exp.matchedLength() << endl;
@@ -5661,11 +5661,11 @@ QString Cell::convertFormulaToOasisFormat( const QString & formula ) const
return s;
}
-void Cell::loadOasisConditional( QDomElement * style )
+void Cell::loadOasisConditional( TQDomElement * style )
{
if ( style )//safe
{
- QDomElement e;
+ TQDomElement e;
forEachElement( e, style->toElement() )
{
if ( e.localName() == "map" && e.namespaceURI() == KoXmlNS::style )
@@ -5683,20 +5683,20 @@ void Cell::loadOasisConditional( QDomElement * style )
}
}
-bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisContext , Style* style )
+bool Cell::loadOasis( const TQDomElement& element , KoOasisLoadingContext& oasisContext , Style* style )
{
kdDebug() << "*** Loading cell properties ***** at " << column() << "," << row () << endl;
if ( element.hasAttributeNS( KoXmlNS::table, "style-name" ) )
{
- kdDebug()<<" table:style-name: "<<element.attributeNS( KoXmlNS::table, "style-name", QString::null )<<endl;
+ kdDebug()<<" table:style-name: "<<element.attributeNS( KoXmlNS::table, "style-name", TQString() )<<endl;
oasisContext.fillStyleStack( element, KoXmlNS::table, "styleName", "table-cell" );
- QString str = element.attributeNS( KoXmlNS::table, "style-name", QString::null );
- const QDomElement* cellStyle = oasisContext.oasisStyles().findStyle( str, "table-cell" );
+ TQString str = element.attributeNS( KoXmlNS::table, "style-name", TQString() );
+ const TQDomElement* cellStyle = oasisContext.oasisStyles().findStyle( str, "table-cell" );
if ( cellStyle )
- loadOasisConditional( const_cast<QDomElement *>( cellStyle ) );
+ loadOasisConditional( const_cast<TQDomElement *>( cellStyle ) );
}
if (style)
@@ -5713,9 +5713,9 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
bool isFormula = false;
if ( element.hasAttributeNS( KoXmlNS::table, "formula" ) )
{
- kdDebug()<<" formula :"<<element.attributeNS( KoXmlNS::table, "formula", QString::null )<<endl;
+ kdDebug()<<" formula :"<<element.attributeNS( KoXmlNS::table, "formula", TQString() )<<endl;
isFormula = true;
- QString oasisFormula( element.attributeNS( KoXmlNS::table, "formula", QString::null ) );
+ TQString oasisFormula( element.attributeNS( KoXmlNS::table, "formula", TQString() ) );
//necessary to remove it to load formula from oocalc2.0 (use namespace)
if (oasisFormula.startsWith( "oooc:" ) )
oasisFormula= oasisFormula.mid( 5 );
@@ -5734,8 +5734,8 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
//
if ( element.hasAttributeNS( KoXmlNS::table, "validation-name" ) )
{
- kdDebug()<<" validation-name: "<<element.attributeNS( KoXmlNS::table, "validation-name", QString::null )<<endl;
- loadOasisValidation( element.attributeNS( KoXmlNS::table, "validation-name", QString::null ) );
+ kdDebug()<<" validation-name: "<<element.attributeNS( KoXmlNS::table, "validation-name", TQString() )<<endl;
+ loadOasisValidation( element.attributeNS( KoXmlNS::table, "validation-name", TQString() ) );
}
//
@@ -5743,11 +5743,11 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
//
if( element.hasAttributeNS( KoXmlNS::office, "value-type" ) )
{
- QString valuetype = element.attributeNS( KoXmlNS::office, "value-type", QString::null );
+ TQString valuetype = element.attributeNS( KoXmlNS::office, "value-type", TQString() );
kdDebug()<<" value-type: " << valuetype << endl;
if( valuetype == "boolean" )
{
- QString val = element.attributeNS( KoXmlNS::office, "boolean-value", QString::null ).lower();
+ TQString val = element.attributeNS( KoXmlNS::office, "boolean-value", TQString() ).lower();
if( ( val == "true" ) || ( val == "false" ) )
{
bool value = val == "true";
@@ -5759,13 +5759,13 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
else if( valuetype == "float" )
{
bool ok = false;
- double value = element.attributeNS( KoXmlNS::office, "value", QString::null ).toDouble( &ok );
+ double value = element.attributeNS( KoXmlNS::office, "value", TQString() ).toDouble( &ok );
if( ok )
setCellValue( value );
if ( !isFormula && d->strText.isEmpty())
{
- QString str = locale()->formatNumber( value, 15 );
+ TQString str = locale()->formatNumber( value, 15 );
setCellText( str );
}
}
@@ -5774,14 +5774,14 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
else if( valuetype == "currency" )
{
bool ok = false;
- double value = element.attributeNS( KoXmlNS::office, "value", QString::null ).toDouble( &ok );
+ double value = element.attributeNS( KoXmlNS::office, "value", TQString() ).toDouble( &ok );
if( ok )
{
setCellValue( value, Money_format );
if (element.hasAttributeNS( KoXmlNS::office, "currency" ) )
{
- Currency currency(element.attributeNS( KoXmlNS::office, "currency", QString::null ) );
+ Currency currency(element.attributeNS( KoXmlNS::office, "currency", TQString() ) );
format()->setCurrency( currency.getIndex(), currency.getDisplayCode() );
}
}
@@ -5789,7 +5789,7 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
else if( valuetype == "percentage" )
{
bool ok = false;
- double v = element.attributeNS( KoXmlNS::office, "value", QString::null ).toDouble( &ok );
+ double v = element.attributeNS( KoXmlNS::office, "value", TQString() ).toDouble( &ok );
if( ok )
{
Value value;
@@ -5799,7 +5799,7 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
if ( !isFormula && d->strText.isEmpty())
{
- QString str = locale()->formatNumber( v, 15 );
+ TQString str = locale()->formatNumber( v, 15 );
setCellText( str );
}
@@ -5808,22 +5808,22 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
}
else if ( valuetype == "date" )
{
- QString value = element.attributeNS( KoXmlNS::office, "value", QString::null );
+ TQString value = element.attributeNS( KoXmlNS::office, "value", TQString() );
if ( value.isEmpty() )
- value = element.attributeNS( KoXmlNS::office, "date-value", QString::null );
+ value = element.attributeNS( KoXmlNS::office, "date-value", TQString() );
kdDebug() << "Type: date, value: " << value << endl;
// "1980-10-15"
int year = 0, month = 0, day = 0;
bool ok = false;
- int p1 = value.find( '-' );
+ int p1 = value.tqfind( '-' );
if ( p1 > 0 )
year = value.left( p1 ).toInt( &ok );
kdDebug() << "year: " << value.left( p1 ) << endl;
- int p2 = value.find( '-', ++p1 );
+ int p2 = value.tqfind( '-', ++p1 );
if ( ok )
month = value.mid( p1, p2 - p1 ).toInt( &ok );
@@ -5837,23 +5837,23 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
if ( ok )
{
- setCellValue( QDate( year, month, day ) );
+ setCellValue( TQDate( year, month, day ) );
if ( style )
format()->setFormatType (style->formatType());
- kdDebug() << "Set QDate: " << year << " - " << month << " - " << day << endl;
+ kdDebug() << "Set TQDate: " << year << " - " << month << " - " << day << endl;
}
}
else if ( valuetype == "time" )
{
- QString value = element.attributeNS( KoXmlNS::office, "value", QString::null );
+ TQString value = element.attributeNS( KoXmlNS::office, "value", TQString() );
if ( value.isEmpty() )
- value = element.attributeNS( KoXmlNS::office, "time-value", QString::null );
+ value = element.attributeNS( KoXmlNS::office, "time-value", TQString() );
kdDebug() << "Type: time: " << value << endl;
// "PT15H10M12S"
int hours = 0, minutes = 0, seconds = 0;
int l = value.length();
- QString num;
+ TQString num;
bool ok = false;
for ( int i = 0; i < l; ++i )
{
@@ -5883,18 +5883,18 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
{
// Value kval( timeToNum( hours, minutes, seconds ) );
// cell->setValue( kval );
- setCellValue( QTime( hours % 24, minutes, seconds ) );
+ setCellValue( TQTime( hours % 24, minutes, seconds ) );
if ( style )
format()->setFormatType (style->formatType());
}
}
else if( valuetype == "string" )
{
- QString value = element.attributeNS( KoXmlNS::office, "value", QString::null );
+ TQString value = element.attributeNS( KoXmlNS::office, "value", TQString() );
if ( value.isEmpty() && element.hasAttributeNS( KoXmlNS::office, "string-value" ))
{
//if there is not string-value entry don't overwrite value stored into <text:p>
- value = element.attributeNS( KoXmlNS::office, "string-value", QString::null );
+ value = element.attributeNS( KoXmlNS::office, "string-value", TQString() );
setCellValue( value );
}
format()->setFormatType (Text_format);
@@ -5911,13 +5911,13 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
if ( element.hasAttributeNS( KoXmlNS::table, "number-columns-spanned" ) )
{
bool ok = false;
- int span = element.attributeNS( KoXmlNS::table, "number-columns-spanned", QString::null ).toInt( &ok );
+ int span = element.attributeNS( KoXmlNS::table, "number-columns-spanned", TQString() ).toInt( &ok );
if( ok ) colSpan = span;
}
if ( element.hasAttributeNS( KoXmlNS::table, "number-rows-spanned" ) )
{
bool ok = false;
- int span = element.attributeNS( KoXmlNS::table, "number-rows-spanned", QString::null ).toInt( &ok );
+ int span = element.attributeNS( KoXmlNS::table, "number-rows-spanned", TQString() ).toInt( &ok );
if( ok ) rowSpan = span;
}
if ( colSpan > 1 || rowSpan > 1 )
@@ -5926,14 +5926,14 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
//
// cell comment/annotation
//
- QDomElement annotationElement = KoDom::namedItemNS( element, KoXmlNS::office, "annotation" );
+ TQDomElement annotationElement = KoDom::namedItemNS( element, KoXmlNS::office, "annotation" );
if ( !annotationElement.isNull() )
{
- QString comment;
- QDomNode node = annotationElement.firstChild();
+ TQString comment;
+ TQDomNode node = annotationElement.firstChild();
while( !node.isNull() )
{
- QDomElement commentElement = node.toElement();
+ TQDomElement commentElement = node.toElement();
if( !commentElement.isNull() )
if( commentElement.localName() == "p" && commentElement.namespaceURI() == KoXmlNS::text )
{
@@ -5948,7 +5948,7 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
format()->setComment( comment );
}
- QDomElement frame = KoDom::namedItemNS( element, KoXmlNS::draw, "frame" );
+ TQDomElement frame = KoDom::namedItemNS( element, KoXmlNS::draw, "frame" );
if ( !frame.isNull() )
loadOasisObjects( frame, oasisContext );
@@ -5958,15 +5958,15 @@ bool Cell::loadOasis( const QDomElement& element , KoOasisLoadingContext& oasisC
return true;
}
-void Cell::loadOasisCellText( const QDomElement& parent )
+void Cell::loadOasisCellText( const TQDomElement& tqparent )
{
//Search and load each paragraph of text. Each paragraph is separated by a line break
- QDomElement textParagraphElement;
- QString cellText;
+ TQDomElement textParagraphElement;
+ TQString cellText;
bool multipleTextParagraphsFound=false;
- forEachElement( textParagraphElement , parent )
+ forEachElement( textParagraphElement , tqparent )
{
if ( textParagraphElement.localName()=="p" &&
textParagraphElement.namespaceURI()== KoXmlNS::text )
@@ -5980,12 +5980,12 @@ void Cell::loadOasisCellText( const QDomElement& parent )
multipleTextParagraphsFound=true;
}
- QDomElement textA = KoDom::namedItemNS( textParagraphElement, KoXmlNS::text, "a" );
+ TQDomElement textA = KoDom::namedItemNS( textParagraphElement, KoXmlNS::text, "a" );
if( !textA.isNull() )
{
if ( textA.hasAttributeNS( KoXmlNS::xlink, "href" ) )
{
- QString link = textA.attributeNS( KoXmlNS::xlink, "href", QString::null );
+ TQString link = textA.attributeNS( KoXmlNS::xlink, "href", TQString() );
cellText = textA.text();
setCellText( cellText );
setValue( cellText );
@@ -6010,24 +6010,24 @@ void Cell::loadOasisCellText( const QDomElement& parent )
}
}
-void Cell::loadOasisObjects( const QDomElement &parent, KoOasisLoadingContext& oasisContext )
+void Cell::loadOasisObjects( const TQDomElement &tqparent, KoOasisLoadingContext& oasisContext )
{
- for( QDomElement e = parent; !e.isNull(); e = e.nextSibling().toElement() )
+ for( TQDomElement e = tqparent; !e.isNull(); e = e.nextSibling().toElement() )
{
if ( e.localName() == "frame" && e.namespaceURI() == KoXmlNS::draw )
{
EmbeddedObject *obj = 0;
- QDomNode object = KoDom::namedItemNS( e, KoXmlNS::draw, "object" );
+ TQDomNode object = KoDom::namedItemNS( e, KoXmlNS::draw, "object" );
if ( !object.isNull() )
{
- if ( !object.toElement().attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", QString::null).isNull() )
+ if ( !object.toElement().attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", TQString()).isNull() )
obj = new EmbeddedChart( sheet()->doc(), sheet() );
else
obj = new EmbeddedKOfficeObject( sheet()->doc(), sheet() );
}
else
{
- QDomNode image = KoDom::namedItemNS( e, KoXmlNS::draw, "image" );
+ TQDomNode image = KoDom::namedItemNS( e, KoXmlNS::draw, "image" );
if ( !image.isNull() )
obj = new EmbeddedPictureObject( sheet(), sheet()->doc()->pictureCollection() );
else
@@ -6039,7 +6039,7 @@ void Cell::loadOasisObjects( const QDomElement &parent, KoOasisLoadingContext& o
obj->loadOasis( e, oasisContext );
sheet()->doc()->insertObject( obj );
- QString ref = e.attributeNS( KoXmlNS::table, "end-cell-address", QString::null );
+ TQString ref = e.attributeNS( KoXmlNS::table, "end-cell-address", TQString() );
if ( ref.isNull() )
continue;
@@ -6048,39 +6048,39 @@ void Cell::loadOasisObjects( const QDomElement &parent, KoOasisLoadingContext& o
if ( !point.isValid() )
continue;
- KoRect geometry = obj->geometry();
- geometry.setLeft( geometry.left() + sheet()->columnPos( d->column, 0 ) );
- geometry.setTop( geometry.top() + sheet()->rowPos( d->row, 0 ) );
+ KoRect tqgeometry = obj->tqgeometry();
+ tqgeometry.setLeft( tqgeometry.left() + sheet()->columnPos( d->column, 0 ) );
+ tqgeometry.setTop( tqgeometry.top() + sheet()->rowPos( d->row, 0 ) );
- QString str = e.attributeNS( KoXmlNS::table, "end-x", QString::null );
+ TQString str = e.attributeNS( KoXmlNS::table, "end-x", TQString() );
if ( !str.isNull() )
{
uint end_x = (uint) KoUnit::parseValue( str );
- geometry.setRight( sheet()->columnPos( point.column(), 0) + end_x );
+ tqgeometry.setRight( sheet()->columnPos( point.column(), 0) + end_x );
}
- str = e.attributeNS( KoXmlNS::table, "end-y", QString::null );
+ str = e.attributeNS( KoXmlNS::table, "end-y", TQString() );
if ( !str.isNull() )
{
uint end_y = (uint) KoUnit::parseValue( str );
- geometry.setBottom( sheet()->rowPos( point.row(), 0) + end_y );
+ tqgeometry.setBottom( sheet()->rowPos( point.row(), 0) + end_y );
}
- obj->setGeometry( geometry );
+ obj->setGeometry( tqgeometry );
}
}
}
}
-void Cell::loadOasisValidation( const QString& validationName )
+void Cell::loadOasisValidation( const TQString& validationName )
{
- QDomElement element = sheet()->doc()->loadingInfo()->validation( validationName);
+ TQDomElement element = sheet()->doc()->loadingInfo()->validation( validationName);
if (d->hasExtra())
delete d->extra()->validity;
d->extra()->validity = new Validity;
if ( element.hasAttributeNS( KoXmlNS::table, "condition" ) )
{
- QString valExpression = element.attributeNS( KoXmlNS::table, "condition", QString::null );
+ TQString valExpression = element.attributeNS( KoXmlNS::table, "condition", TQString() );
kdDebug()<<" element.attribute( table:condition ) "<<valExpression<<endl;
//Condition ::= ExtendedTrueCondition | TrueFunction 'and' TrueCondition
//TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time()
@@ -6095,7 +6095,7 @@ void Cell::loadOasisValidation( const QString& validationName )
//A NumberValue is a whole or decimal number. It must not contain comma separators for numbers of 1000 or greater.
//ExtendedTrueCondition
- if ( valExpression.contains( "cell-content-text-length()" ) )
+ if ( valExpression.tqcontains( "cell-content-text-length()" ) )
{
//"cell-content-text-length()>45"
valExpression = valExpression.remove("oooc:cell-content-text-length()" );
@@ -6104,22 +6104,22 @@ void Cell::loadOasisValidation( const QString& validationName )
loadOasisValidationCondition( valExpression );
}
- else if ( valExpression.contains( "cell-content-is-text()" ) )
+ else if ( valExpression.tqcontains( "cell-content-is-text()" ) )
{
d->extra()->validity->m_restriction = Restriction::Text;
}
//cell-content-text-length-is-between(Value, Value) | cell-content-text-length-is-not-between(Value, Value) | cell-content-is-in-list( StringList )
- else if ( valExpression.contains( "cell-content-text-length-is-between" ) )
+ else if ( valExpression.tqcontains( "cell-content-text-length-is-between" ) )
{
d->extra()->validity->m_restriction = Restriction::TextLength;
d->extra()->validity->m_cond = Conditional::Between;
valExpression = valExpression.remove( "oooc:cell-content-text-length-is-between(" );
kdDebug()<<" valExpression :"<<valExpression<<endl;
valExpression = valExpression.remove( ")" );
- QStringList listVal = QStringList::split( ",", valExpression );
+ TQStringList listVal = TQStringList::split( ",", valExpression );
loadOasisValidationValue( listVal );
}
- else if ( valExpression.contains( "cell-content-text-length-is-not-between" ) )
+ else if ( valExpression.tqcontains( "cell-content-text-length-is-not-between" ) )
{
d->extra()->validity->m_restriction = Restriction::TextLength;
d->extra()->validity->m_cond = Conditional::Different;
@@ -6127,63 +6127,63 @@ void Cell::loadOasisValidation( const QString& validationName )
kdDebug()<<" valExpression :"<<valExpression<<endl;
valExpression = valExpression.remove( ")" );
kdDebug()<<" valExpression :"<<valExpression<<endl;
- QStringList listVal = QStringList::split( ",", valExpression );
+ TQStringList listVal = TQStringList::split( ",", valExpression );
loadOasisValidationValue( listVal );
}
- else if ( valExpression.contains( "cell-content-is-in-list(" ) )
+ else if ( valExpression.tqcontains( "cell-content-is-in-list(" ) )
{
d->extra()->validity->m_restriction = Restriction::List;
valExpression = valExpression.remove( "oooc:cell-content-is-in-list(" );
kdDebug()<<" valExpression :"<<valExpression<<endl;
valExpression = valExpression.remove( ")" );
- d->extra()->validity->listValidity = QStringList::split( ";", valExpression );
+ d->extra()->validity->listValidity = TQStringList::split( ";", valExpression );
}
//TrueFunction ::= cell-content-is-whole-number() | cell-content-is-decimal-number() | cell-content-is-date() | cell-content-is-time()
else
{
- if (valExpression.contains( "cell-content-is-whole-number()" ) )
+ if (valExpression.tqcontains( "cell-content-is-whole-number()" ) )
{
d->extra()->validity->m_restriction = Restriction::Number;
valExpression = valExpression.remove( "oooc:cell-content-is-whole-number() and " );
}
- else if (valExpression.contains( "cell-content-is-decimal-number()" ) )
+ else if (valExpression.tqcontains( "cell-content-is-decimal-number()" ) )
{
d->extra()->validity->m_restriction = Restriction::Integer;
valExpression = valExpression.remove( "oooc:cell-content-is-decimal-number() and " );
}
- else if (valExpression.contains( "cell-content-is-date()" ) )
+ else if (valExpression.tqcontains( "cell-content-is-date()" ) )
{
d->extra()->validity->m_restriction = Restriction::Date;
valExpression = valExpression.remove( "oooc:cell-content-is-date() and " );
}
- else if (valExpression.contains( "cell-content-is-time()" ) )
+ else if (valExpression.tqcontains( "cell-content-is-time()" ) )
{
d->extra()->validity->m_restriction = Restriction::Time;
valExpression = valExpression.remove( "oooc:cell-content-is-time() and " );
}
kdDebug()<<"valExpression :"<<valExpression<<endl;
- if ( valExpression.contains( "cell-content()" ) )
+ if ( valExpression.tqcontains( "cell-content()" ) )
{
valExpression = valExpression.remove( "cell-content()" );
loadOasisValidationCondition( valExpression );
}
//GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value)
//for the moment we support just int/double value, not text/date/time :(
- if ( valExpression.contains( "cell-content-is-between(" ) )
+ if ( valExpression.tqcontains( "cell-content-is-between(" ) )
{
valExpression = valExpression.remove( "cell-content-is-between(" );
valExpression = valExpression.remove( ")" );
- QStringList listVal = QStringList::split( "," , valExpression );
+ TQStringList listVal = TQStringList::split( "," , valExpression );
loadOasisValidationValue( listVal );
d->extra()->validity->m_cond = Conditional::Between;
}
- if ( valExpression.contains( "cell-content-is-not-between(" ) )
+ if ( valExpression.tqcontains( "cell-content-is-not-between(" ) )
{
valExpression = valExpression.remove( "cell-content-is-not-between(" );
valExpression = valExpression.remove( ")" );
- QStringList listVal = QStringList::split( ",", valExpression );
+ TQStringList listVal = TQStringList::split( ",", valExpression );
loadOasisValidationValue( listVal );
d->extra()->validity->m_cond = Conditional::Different;
}
@@ -6192,27 +6192,27 @@ void Cell::loadOasisValidation( const QString& validationName )
if ( element.hasAttributeNS( KoXmlNS::table, "allow-empty-cell" ) )
{
kdDebug()<<" element.hasAttribute( table:allow-empty-cell ) :"<<element.hasAttributeNS( KoXmlNS::table, "allow-empty-cell" )<<endl;
- d->extra()->validity->allowEmptyCell = ( ( element.attributeNS( KoXmlNS::table, "allow-empty-cell", QString::null )=="true" ) ? true : false );
+ d->extra()->validity->allowEmptyCell = ( ( element.attributeNS( KoXmlNS::table, "allow-empty-cell", TQString() )=="true" ) ? true : false );
}
if ( element.hasAttributeNS( KoXmlNS::table, "base-cell-address" ) )
{
//todo what is it ?
}
- QDomElement help = KoDom::namedItemNS( element, KoXmlNS::table, "help-message" );
+ TQDomElement help = KoDom::namedItemNS( element, KoXmlNS::table, "help-message" );
if ( !help.isNull() )
{
if ( help.hasAttributeNS( KoXmlNS::table, "title" ) )
{
- kdDebug()<<"help.attribute( table:title ) :"<<help.attributeNS( KoXmlNS::table, "title", QString::null )<<endl;
- d->extra()->validity->titleInfo = help.attributeNS( KoXmlNS::table, "title", QString::null );
+ kdDebug()<<"help.attribute( table:title ) :"<<help.attributeNS( KoXmlNS::table, "title", TQString() )<<endl;
+ d->extra()->validity->titleInfo = help.attributeNS( KoXmlNS::table, "title", TQString() );
}
if ( help.hasAttributeNS( KoXmlNS::table, "display" ) )
{
- kdDebug()<<"help.attribute( table:display ) :"<<help.attributeNS( KoXmlNS::table, "display", QString::null )<<endl;
- d->extra()->validity->displayValidationInformation = ( ( help.attributeNS( KoXmlNS::table, "display", QString::null )=="true" ) ? true : false );
+ kdDebug()<<"help.attribute( table:display ) :"<<help.attributeNS( KoXmlNS::table, "display", TQString() )<<endl;
+ d->extra()->validity->displayValidationInformation = ( ( help.attributeNS( KoXmlNS::table, "display", TQString() )=="true" ) ? true : false );
}
- QDomElement attrText = KoDom::namedItemNS( help, KoXmlNS::text, "p" );
+ TQDomElement attrText = KoDom::namedItemNS( help, KoXmlNS::text, "p" );
if ( !attrText.isNull() )
{
kdDebug()<<"help text :"<<attrText.text()<<endl;
@@ -6220,14 +6220,14 @@ void Cell::loadOasisValidation( const QString& validationName )
}
}
- QDomElement error = KoDom::namedItemNS( element, KoXmlNS::table, "error-message" );
+ TQDomElement error = KoDom::namedItemNS( element, KoXmlNS::table, "error-message" );
if ( !error.isNull() )
{
if ( error.hasAttributeNS( KoXmlNS::table, "title" ) )
- d->extra()->validity->title = error.attributeNS( KoXmlNS::table, "title", QString::null );
+ d->extra()->validity->title = error.attributeNS( KoXmlNS::table, "title", TQString() );
if ( error.hasAttributeNS( KoXmlNS::table, "message-type" ) )
{
- QString str = error.attributeNS( KoXmlNS::table, "message-type", QString::null );
+ TQString str = error.attributeNS( KoXmlNS::table, "message-type", TQString() );
if ( str == "warning" )
d->extra()->validity->m_action = Action::Warning;
else if ( str == "information" )
@@ -6240,30 +6240,30 @@ void Cell::loadOasisValidation( const QString& validationName )
if ( error.hasAttributeNS( KoXmlNS::table, "display" ) )
{
- kdDebug()<<" display message :"<<error.attributeNS( KoXmlNS::table, "display", QString::null )<<endl;
- d->extra()->validity->displayMessage = (error.attributeNS( KoXmlNS::table, "display", QString::null )=="true");
+ kdDebug()<<" display message :"<<error.attributeNS( KoXmlNS::table, "display", TQString() )<<endl;
+ d->extra()->validity->displayMessage = (error.attributeNS( KoXmlNS::table, "display", TQString() )=="true");
}
- QDomElement attrText = KoDom::namedItemNS( error, KoXmlNS::text, "p" );
+ TQDomElement attrText = KoDom::namedItemNS( error, KoXmlNS::text, "p" );
if ( !attrText.isNull() )
d->extra()->validity->message = attrText.text();
}
}
-void Cell::loadOasisValidationValue( const QStringList &listVal )
+void Cell::loadOasisValidationValue( const TQStringList &listVal )
{
bool ok = false;
kdDebug()<<" listVal[0] :"<<listVal[0]<<" listVal[1] :"<<listVal[1]<<endl;
if ( d->extra()->validity->m_restriction == Restriction::Date )
{
- d->extra()->validity->dateMin = QDate::fromString( listVal[0] );
- d->extra()->validity->dateMax = QDate::fromString( listVal[1] );
+ d->extra()->validity->dateMin = TQDate::fromString( listVal[0] );
+ d->extra()->validity->dateMax = TQDate::fromString( listVal[1] );
}
else if ( d->extra()->validity->m_restriction == Restriction::Time )
{
- d->extra()->validity->timeMin = QTime::fromString( listVal[0] );
- d->extra()->validity->timeMax = QTime::fromString( listVal[1] );
+ d->extra()->validity->timeMin = TQTime::fromString( listVal[0] );
+ d->extra()->validity->timeMax = TQTime::fromString( listVal[1] );
}
else
{
@@ -6295,36 +6295,36 @@ void Cell::loadOasisValidationValue( const QStringList &listVal )
}
}
-void Cell::loadOasisValidationCondition( QString &valExpression )
+void Cell::loadOasisValidationCondition( TQString &valExpression )
{
- QString value;
- if (valExpression.find( "<=" )==0 )
+ TQString value;
+ if (valExpression.tqfind( "<=" )==0 )
{
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::InferiorEqual;
}
- else if (valExpression.find( ">=" )==0 )
+ else if (valExpression.tqfind( ">=" )==0 )
{
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::SuperiorEqual;
}
- else if (valExpression.find( "!=" )==0 )
+ else if (valExpression.tqfind( "!=" )==0 )
{
//add Differentto attribute
value = valExpression.remove( 0,2 );
d->extra()->validity->m_cond = Conditional::DifferentTo;
}
- else if ( valExpression.find( "<" )==0 )
+ else if ( valExpression.tqfind( "<" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Inferior;
}
- else if(valExpression.find( ">" )==0 )
+ else if(valExpression.tqfind( ">" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Superior;
}
- else if (valExpression.find( "=" )==0 )
+ else if (valExpression.tqfind( "=" )==0 )
{
value = valExpression.remove( 0,1 );
d->extra()->validity->m_cond = Conditional::Equal;
@@ -6333,11 +6333,11 @@ void Cell::loadOasisValidationCondition( QString &valExpression )
kdDebug()<<" I don't know how to parse it :"<<valExpression<<endl;
if ( d->extra()->validity->m_restriction == Restriction::Date )
{
- d->extra()->validity->dateMin = QDate::fromString( value );
+ d->extra()->validity->dateMin = TQDate::fromString( value );
}
else if (d->extra()->validity->m_restriction == Restriction::Date )
{
- d->extra()->validity->timeMin = QTime::fromString( value );
+ d->extra()->validity->timeMin = TQTime::fromString( value );
}
else
{
@@ -6358,7 +6358,7 @@ void Cell::loadOasisValidationCondition( QString &valExpression )
}
-bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
+bool Cell::load( const TQDomElement & cell, int _xshift, int _yshift,
Paste::Mode pm, Paste::Operation op, bool paste )
{
bool ok;
@@ -6387,7 +6387,7 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
//
// Load formatting information.
//
- QDomElement f = cell.namedItem( "format" ).toElement();
+ TQDomElement f = cell.namedItem( "format" ).toElement();
if ( !f.isNull()
&& ( (pm == Paste::Normal) || (pm == Paste::Format) || (pm == Paste::NoBorder) ) )
{
@@ -6443,7 +6443,7 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
//
// Load the condition section of a cell.
//
- QDomElement conditionsElement = cell.namedItem( "condition" ).toElement();
+ TQDomElement conditionsElement = cell.namedItem( "condition" ).toElement();
if ( !conditionsElement.isNull())
{
if (d->hasExtra())
@@ -6462,10 +6462,10 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
}
}
- QDomElement validity = cell.namedItem( "validity" ).toElement();
+ TQDomElement validity = cell.namedItem( "validity" ).toElement();
if ( !validity.isNull())
{
- QDomElement param = validity.namedItem( "param" ).toElement();
+ TQDomElement param = validity.namedItem( "param" ).toElement();
if(!param.isNull())
{
d->extra()->validity = new Validity;
@@ -6513,46 +6513,46 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
}
if ( param.hasAttribute("listvalidity") )
{
- d->extra()->validity->listValidity=QStringList::split(";", param.attribute("listvalidity") );
+ d->extra()->validity->listValidity=TQStringList::split(";", param.attribute("listvalidity") );
}
}
- QDomElement inputTitle = validity.namedItem( "inputtitle" ).toElement();
+ TQDomElement inputTitle = validity.namedItem( "inputtitle" ).toElement();
if (!inputTitle.isNull())
{
d->extra()->validity->titleInfo = inputTitle.text();
}
- QDomElement inputMessage = validity.namedItem( "inputmessage" ).toElement();
+ TQDomElement inputMessage = validity.namedItem( "inputmessage" ).toElement();
if (!inputMessage.isNull())
{
d->extra()->validity->messageInfo = inputMessage.text();
}
- QDomElement title = validity.namedItem( "title" ).toElement();
+ TQDomElement title = validity.namedItem( "title" ).toElement();
if (!title.isNull())
{
d->extra()->validity->title = title.text();
}
- QDomElement message = validity.namedItem( "message" ).toElement();
+ TQDomElement message = validity.namedItem( "message" ).toElement();
if (!message.isNull())
{
d->extra()->validity->message = message.text();
}
- QDomElement timeMin = validity.namedItem( "timemin" ).toElement();
+ TQDomElement timeMin = validity.namedItem( "timemin" ).toElement();
if ( !timeMin.isNull() )
{
d->extra()->validity->timeMin = toTime(timeMin);
}
- QDomElement timeMax = validity.namedItem( "timemax" ).toElement();
+ TQDomElement timeMax = validity.namedItem( "timemax" ).toElement();
if ( !timeMax.isNull() )
{
d->extra()->validity->timeMax = toTime(timeMax);
}
- QDomElement dateMin = validity.namedItem( "datemin" ).toElement();
+ TQDomElement dateMin = validity.namedItem( "datemin" ).toElement();
if ( !dateMin.isNull() )
{
d->extra()->validity->dateMin = toDate(dateMin);
}
- QDomElement dateMax = validity.namedItem( "datemax" ).toElement();
+ TQDomElement dateMax = validity.namedItem( "datemax" ).toElement();
if ( !dateMax.isNull() )
{
d->extra()->validity->dateMax = toDate(dateMax);
@@ -6567,10 +6567,10 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
//
// Load the comment
//
- QDomElement comment = cell.namedItem( "comment" ).toElement();
+ TQDomElement comment = cell.namedItem( "comment" ).toElement();
if ( !comment.isNull() && ( pm == Paste::Normal || pm == Paste::Comment || pm == Paste::NoBorder ))
{
- QString t = comment.text();
+ TQString t = comment.text();
//t = t.stripWhiteSpace();
format()->setComment( t );
}
@@ -6581,7 +6581,7 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
//
// TODO: make this suck less. We set data twice, in loadCellData, and
// also here. Not good.
- QDomElement text = cell.namedItem( "text" ).toElement();
+ TQDomElement text = cell.namedItem( "text" ).toElement();
if ( !text.isNull() &&
( pm == Paste::Normal || pm == Paste::Text || pm == Paste::NoBorder || pm == Paste::Result ) )
@@ -6592,8 +6592,8 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
if ( cell.hasAttribute( "dataType" ) ) // new docs
text.setAttribute( "dataType", cell.attribute( "dataType" ) );
- QDomElement result = cell.namedItem( "result" ).toElement();
- QString txt = text.text();
+ TQDomElement result = cell.namedItem( "result" ).toElement();
+ TQString txt = text.text();
if ((pm == Paste::Result) && (txt[0] == '='))
// paste text of the element, if we want to paste result
// and the source cell contains a formula
@@ -6606,8 +6606,8 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
if ( !result.isNull() )
{
- QString dataType;
- QString t = result.text();
+ TQString dataType;
+ TQString t = result.text();
if ( result.hasAttribute( "dataType" ) )
dataType = result.attribute( "dataType" );
@@ -6646,12 +6646,12 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
setValue ( dd );
else
{
- int pos = t.find( '/' );
+ int pos = t.tqfind( '/' );
int year = t.mid( 0, pos ).toInt();
- int pos1 = t.find( '/', pos + 1 );
+ int pos1 = t.tqfind( '/', pos + 1 );
int month = t.mid( pos + 1, ( ( pos1 - 1 ) - pos ) ).toInt();
int day = t.right( t.length() - pos1 - 1 ).toInt();
- QDate date( year, month, day );
+ TQDate date( year, month, day );
if ( date.isValid() )
setValue( date );
else
@@ -6670,12 +6670,12 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.find( ':' );
+ pos = t.tqfind( ':' );
hours = t.mid( 0, pos ).toInt();
- pos1 = t.find( ':', pos + 1 );
+ pos1 = t.tqfind( ':', pos + 1 );
minutes = t.mid( pos + 1, ( ( pos1 - 1 ) - pos ) ).toInt();
second = t.right( t.length() - pos1 - 1 ).toInt();
- QTime time( hours, minutes, second );
+ TQTime time( hours, minutes, second );
if ( time.isValid() )
setValue( time );
else
@@ -6695,11 +6695,11 @@ bool Cell::load( const QDomElement & cell, int _xshift, int _yshift,
return true;
}
-bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
+bool Cell::loadCellData(const TQDomElement & text, Paste::Operation op )
{
//TODO: use converter()->asString() to generate strText
- QString t = text.text();
+ TQString t = text.text();
t = t.stripWhiteSpace();
setFlag(Flag_LayoutDirty);
@@ -6724,19 +6724,19 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
// extract the link and the correspoding text
// This is a rather dirty hack, but enough for KSpread generated XML
bool inside_tag = false;
- QString qml_text;
- QString tag;
- QString qml_link;
+ TQString qml_text;
+ TQString tag;
+ TQString qml_link;
for( unsigned i = 1; i < t.length(); i++ )
{
- QChar ch = t[i];
+ TQChar ch = t[i];
if( ch == '<' )
{
if( !inside_tag )
{
inside_tag = true;
- tag = QString::null;
+ tag = TQString();
}
}
else if( ch == '>' )
@@ -6744,10 +6744,10 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
if( inside_tag )
{
inside_tag = false;
- if( tag.startsWith( "a href=\"", true ) )
- if( tag.endsWith( "\"" ) )
+ if( tag.tqstartsWith( "a href=\"", true ) )
+ if( tag.tqendsWith( "\"" ) )
qml_link = tag.mid( 8, tag.length()-9 );
- tag = QString::null;
+ tag = TQString();
}
}
else
@@ -6767,7 +6767,7 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
else
{
bool newStyleLoading = true;
- QString dataType;
+ TQString dataType;
if ( text.hasAttribute( "dataType" ) ) // new docs
{
@@ -6776,9 +6776,9 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
else // old docs: do the ugly solution of calling checkTextInput to parse the text
{
// ...except for date/time
- if (isDate() && ( t.contains('/') == 2 ))
+ if (isDate() && ( t.tqcontains('/') == 2 ))
dataType = "Date";
- else if (isTime() && ( t.contains(':') == 2 ) )
+ else if (isTime() && ( t.tqcontains(':') == 2 ) )
dataType = "Time";
else
{
@@ -6805,7 +6805,7 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
else if( dataType == "Num" )
{
bool ok = false;
- if (t.contains('.'))
+ if (t.tqcontains('.'))
setValue ( Value( t.toDouble(&ok) ) ); // We save in non-localized format
else
setValue ( Value( t.toLong(&ok) ) );
@@ -6818,7 +6818,7 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
/* KLocale::formatNumber requires the precision we want to return.
*/
- int precision = t.length() - t.find('.') - 1;
+ int precision = t.length() - t.tqfind('.') - 1;
if ( formatType() == Percentage_format )
{
@@ -6842,12 +6842,12 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
// date ?
else if( dataType == "Date" )
{
- int pos = t.find('/');
+ int pos = t.tqfind('/');
int year = t.mid(0,pos).toInt();
- int pos1 = t.find('/',pos+1);
+ int pos1 = t.tqfind('/',pos+1);
int month = t.mid(pos+1,((pos1-1)-pos)).toInt();
int day = t.right(t.length()-pos1-1).toInt();
- setValue( QDate(year,month,day) );
+ setValue( TQDate(year,month,day) );
if ( value().asDate().isValid() ) // Should always be the case for new docs
d->strText = locale()->formatDate( value().asDate(), true );
else // This happens with old docs, when format is set wrongly to date
@@ -6864,12 +6864,12 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.find(':');
+ pos = t.tqfind(':');
hours = t.mid(0,pos).toInt();
- pos1 = t.find(':',pos+1);
+ pos1 = t.tqfind(':',pos+1);
minutes = t.mid(pos+1,((pos1-1)-pos)).toInt();
second = t.right(t.length()-pos1-1).toInt();
- setValue( QTime(hours,minutes,second) );
+ setValue( TQTime(hours,minutes,second) );
if ( value().asTime().isValid() ) // Should always be the case for new docs
d->strText = locale()->formatTime( value().asTime(), true );
else // This happens with old docs, when format is set wrongly to time
@@ -6904,49 +6904,49 @@ bool Cell::loadCellData(const QDomElement & text, Paste::Operation op )
return true;
}
-QTime Cell::toTime(const QDomElement &element)
+TQTime Cell::toTime(const TQDomElement &element)
{
//TODO: can't we use tryParseTime (after modification) instead?
- QString t = element.text();
+ TQString t = element.text();
t = t.stripWhiteSpace();
int hours = -1;
int minutes = -1;
int second = -1;
int pos, pos1;
- pos = t.find(':');
+ pos = t.tqfind(':');
hours = t.mid(0,pos).toInt();
- pos1 = t.find(':',pos+1);
+ pos1 = t.tqfind(':',pos+1);
minutes = t.mid(pos+1,((pos1-1)-pos)).toInt();
second = t.right(t.length()-pos1-1).toInt();
- setValue( Value( QTime(hours,minutes,second)) );
+ setValue( Value( TQTime(hours,minutes,second)) );
return value().asTime();
}
-QDate Cell::toDate(const QDomElement &element)
+TQDate Cell::toDate(const TQDomElement &element)
{
- QString t = element.text();
+ TQString t = element.text();
int pos;
int pos1;
int year = -1;
int month = -1;
int day = -1;
- pos = t.find('/');
+ pos = t.tqfind('/');
year = t.mid(0,pos).toInt();
- pos1 = t.find('/',pos+1);
+ pos1 = t.tqfind('/',pos+1);
month = t.mid(pos+1,((pos1-1)-pos)).toInt();
day = t.right(t.length()-pos1-1).toInt();
- setValue( Value( QDate(year,month,day) ) );
+ setValue( Value( TQDate(year,month,day) ) );
return value().asDate();
}
-QString Cell::pasteOperation( const QString &new_text, const QString &old_text, Paste::Operation op )
+TQString Cell::pasteOperation( const TQString &new_text, const TQString &old_text, Paste::Operation op )
{
if ( op == Paste::OverWrite )
return new_text;
- QString tmp_op;
- QString tmp;
- QString old;
+ TQString tmp_op;
+ TQString tmp;
+ TQString old;
if( !new_text.isEmpty() && new_text[0] == '=' )
{
@@ -6986,16 +6986,16 @@ QString Cell::pasteOperation( const QString &new_text, const QString &old_text,
switch( op )
{
case Paste::Add:
- tmp_op = QString::number(old.toDouble()+tmp.toDouble());
+ tmp_op = TQString::number(old.toDouble()+tmp.toDouble());
break;
case Paste::Mul :
- tmp_op = QString::number(old.toDouble()*tmp.toDouble());
+ tmp_op = TQString::number(old.toDouble()*tmp.toDouble());
break;
case Paste::Sub:
- tmp_op = QString::number(old.toDouble()-tmp.toDouble());
+ tmp_op = TQString::number(old.toDouble()-tmp.toDouble());
break;
case Paste::Div:
- tmp_op = QString::number(old.toDouble()/tmp.toDouble());
+ tmp_op = TQString::number(old.toDouble()/tmp.toDouble());
break;
default:
Q_ASSERT( 0 );
@@ -7041,10 +7041,10 @@ QString Cell::pasteOperation( const QString &new_text, const QString &old_text,
return tmp;
}
-QString Cell::testAnchor( int x, int y ) const
+TQString Cell::testAnchor( int x, int y ) const
{
if( link().isEmpty() )
- return QString::null;
+ return TQString();
const Doc* doc = format()->sheet()->doc();
int x1 = doc->zoomItX( d->textX );
@@ -7056,7 +7056,7 @@ QString Cell::testAnchor( int x, int y ) const
if( y > y1 ) if( y < y2 )
return link();
- return QString::null;
+ return TQString();
}
void Cell::sheetDies()
@@ -7219,24 +7219,24 @@ bool Cell::operator==( const Cell& other ) const
return true;
}
-QRect Cell::cellRect()
+TQRect Cell::cellRect()
{
Q_ASSERT(!isDefault());
- return QRect(QPoint(d->column, d->row), QPoint(d->column, d->row));
+ return TQRect(TQPoint(d->column, d->row), TQPoint(d->column, d->row));
}
-QValueList<Conditional> Cell::conditionList() const
+TQValueList<Conditional> Cell::conditionList() const
{
if ( !d->hasExtra() || !d->extra()->conditions )
{
- QValueList<Conditional> emptyList;
+ TQValueList<Conditional> emptyList;
return emptyList;
}
return d->extra()->conditions->conditionList();
}
-void Cell::setConditionList( const QValueList<Conditional> & newList )
+void Cell::setConditionList( const TQValueList<Conditional> & newList )
{
if (d->hasExtra())
delete d->extra()->conditions;
@@ -7264,7 +7264,7 @@ bool Cell::calcDirtyFlag()
return isFormula() ? testFlag( Flag_CalcDirty ) : false;
}
-bool Cell::layoutDirtyFlag() const
+bool Cell::tqlayoutDirtyFlag() const
{
return testFlag( Flag_LayoutDirty );
}
@@ -7286,21 +7286,21 @@ bool Cell::doesMergeCells() const
void Cell::clearFlag( CellFlags flag )
{
- d->flags &= ~(Q_UINT32)flag;
+ d->flags &= ~(TQ_UINT32)flag;
}
void Cell::setFlag( CellFlags flag )
{
- d->flags |= (Q_UINT32)flag;
+ d->flags |= (TQ_UINT32)flag;
}
bool Cell::testFlag( CellFlags flag ) const
{
- return ( d->flags & (Q_UINT32)flag );
+ return ( d->flags & (TQ_UINT32)flag );
}
-void Cell::checkForNamedAreas( QString & formula ) const
+void Cell::checkForNamedAreas( TQString & formula ) const
{
KSPLoadingInfo* loadinginfo = sheet()->doc()->loadingInfo();
if(! loadinginfo) {
@@ -7310,7 +7310,7 @@ void Cell::checkForNamedAreas( QString & formula ) const
int l = formula.length();
int i = 0;
- QString word;
+ TQString word;
int start = 0;
while ( i < l )
{
@@ -7324,7 +7324,7 @@ void Cell::checkForNamedAreas( QString & formula ) const
{
if ( loadinginfo->findWordInAreaList(word) )
{
- formula = formula.replace( start, word.length(), "'" + word + "'" );
+ formula = formula.tqreplace( start, word.length(), "'" + word + "'" );
l = formula.length();
++i;
kdDebug() << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl;
@@ -7339,7 +7339,7 @@ void Cell::checkForNamedAreas( QString & formula ) const
{
if ( loadinginfo->findWordInAreaList(word) )
{
- formula = formula.replace( start, word.length(), "'" + word + "'" );
+ formula = formula.tqreplace( start, word.length(), "'" + word + "'" );
l = formula.length();
++i;
kdDebug() << "Formula: " << formula << ", L: " << l << ", i: " << i + 1 <<endl;
diff --git a/kspread/kspread_cell.h b/kspread/kspread_cell.h
index 1de6a20b..e7d4e2bb 100644
--- a/kspread/kspread_cell.h
+++ b/kspread/kspread_cell.h
@@ -35,15 +35,15 @@
#ifndef KSPREAD_CELL
#define KSPREAD_CELL
-#include <qpainter.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqpainter.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include "kspread_condition.h"
class KLocale;
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
class KoXmlWriter;
class KoGenStyles;
class KoGenStyle;
@@ -103,23 +103,23 @@ struct Validity
}
inline bool operator!=( const Validity& other ) const { return !operator==( other ); }
- QString message;
- QString title;
- QString titleInfo;
- QString messageInfo;
+ TQString message;
+ TQString title;
+ TQString titleInfo;
+ TQString messageInfo;
double valMin;
double valMax;
Conditional::Type m_cond;
Action::Type m_action;
Restriction::Type m_restriction;
- QTime timeMin;
- QTime timeMax;
- QDate dateMin;
- QDate dateMax;
+ TQTime timeMin;
+ TQTime timeMax;
+ TQDate dateMin;
+ TQDate dateMax;
bool displayMessage;
bool allowEmptyCell;
bool displayValidationInformation;
- QStringList listValidity;
+ TQStringList listValidity;
};
class Formula;
@@ -177,36 +177,36 @@ public:
* Returns the name of the cell. For example, the cell in first column and
* first row is "A1".
*/
- QString name() const;
+ TQString name() const;
/**
* Returns the full name of the cell, i.e. including the worksheet name.
* Example: "Sheet1!A1"
*/
- QString fullName() const;
+ TQString fullName() const;
/**
* Returns the column name of the cell.
*/
- QString columnName() const;
+ TQString columnName() const;
/**
* Given the cell position, this static function returns the name of the cell.
* Example: name(5,4) will return "E4".
*/
- static QString name( int col, int row );
+ static TQString name( int col, int row );
/**
* Given the sheet and cell position, this static function returns the full name
* of the cell, i.e. with the name of the sheet.
*/
- static QString fullName( const Sheet *s, int col, int row );
+ static TQString fullName( const Sheet *s, int col, int row );
/**
* Given the column number, this static function returns the corresponding
* column name, i.e. the first column is "A", the second is "B", and so on.
*/
- static QString columnName( uint column );
+ static TQString columnName( uint column );
/**
* Returns the locale setting of this cell.
@@ -221,9 +221,9 @@ public:
* Return the text the user entered. This could be a value (e.g. "14.03")
* or a formula (e.g. "=SUM(A1:A10)")
*/
- QString text() const;
+ TQString text() const;
- QString strOutText() const;
+ TQString strOutText() const;
Formula *formula () const;
@@ -256,7 +256,7 @@ public:
* \note Calls setValue() after setting the formatting and input text.
*/
void setCellValue (const Value& value, FormatType fmtType = No_format,
- const QString& inputText = QString::null);
+ const TQString& inputText = TQString());
Cell* previousCell() const;
Cell* nextCell() const;
@@ -265,12 +265,12 @@ public:
/**
* Moves around the cell. It cares about obscured and obscuring cells and
- * forces, relayout, calculation and redrawing of the cell.
+ * forces, retqlayout, calculation and redrawing of the cell.
*/
void move( int column, int row );
/**
- * This method notifies the cell that the parent sheet is being deleted.
+ * This method notifies the cell that the tqparent sheet is being deleted.
*/
// Note: This used to remove any links from this cell to other cells. However, this caused a problem
// in other parts of the code which relied upon walking from one cell to the next using
@@ -292,7 +292,7 @@ public:
* back to relative references during decoding) - is used for cutting to clipboard
* Usually this is false, to only store the properties explicitely set.
*/
- QDomElement save( QDomDocument& doc, int _x_offset = 0, int _y_offset = 0, bool force = false, bool copy = false, bool era = false );
+ TQDomElement save( TQDomDocument& doc, int _x_offset = 0, int _y_offset = 0, bool force = false, bool copy = false, bool era = false );
bool saveOasis( KoXmlWriter& xmlwriter, KoGenStyles& mainStyles,
int row, int column, int &repeated,
@@ -303,9 +303,9 @@ public:
/**
* @return the OASIS style's name
*/
- QString saveOasisCellStyle( KoGenStyle &currentCellStyle,KoGenStyles &mainStyles );
+ TQString saveOasisCellStyle( KoGenStyle &currentCellStyle,KoGenStyles &mainStyles );
- bool load( const QDomElement& cell, int _xshift, int _yshift, Paste::Mode pm = Paste::Normal,
+ bool load( const TQDomElement& cell, int _xshift, int _yshift, Paste::Mode pm = Paste::Normal,
Paste::Operation op = Paste::OverWrite, bool paste = false );
/**
@@ -313,10 +313,10 @@ public:
* @param element An OASIS XML element
* @param oasisContext The loading context assoiated with the XML element
*/
- bool loadOasis( const QDomElement & element, KoOasisLoadingContext &oasisContext , Style* style);
+ bool loadOasis( const TQDomElement & element, KoOasisLoadingContext &oasisContext , Style* style);
- QTime toTime(const QDomElement &element);
- QDate toDate(const QDomElement &element);
+ TQTime toTime(const TQDomElement &element);
+ TQDate toDate(const TQDomElement &element);
/**
* Copyies the format from the cell at the position (_column|_row).
@@ -370,15 +370,15 @@ public:
* @param mergedCellsPainted list of merged cells being painted
* @param drawCursor whether to draw the cursor and selection or not
*/
- void paintCell( const KoRect & rect, QPainter & painter,
+ void paintCell( const KoRect & rect, TQPainter & painter,
View * view, const KoPoint & coordinate,
- const QPoint & cellRef,
+ const TQPoint & cellRef,
int paintBorder,
- QPen & rightPen,
- QPen & bottomPen,
- QPen & leftPen,
- QPen & topPen,
- QValueList<QPoint> &mergedCellsPainted,
+ TQPen & rightPen,
+ TQPen & bottomPen,
+ TQPen & leftPen,
+ TQPen & topPen,
+ TQValueList<TQPoint> &mergedCellsPainted,
bool drawCursor = true );
@@ -417,9 +417,9 @@ public:
double dblHeight( int _row = -1, const Canvas *_canvas = 0L ) const;
/**
- * @return a QRect for this cell (i.e., a 1x1 rect). @see zoomedCellRect
+ * @return a TQRect for this cell (i.e., a 1x1 rect). @see zoomedCellRect
*/
- QRect cellRect();
+ TQRect cellRect();
/**
* @return true if the cell should be printed in a print out.
@@ -451,14 +451,14 @@ public:
* The high-level method for setting text, when the user inputs it.
* It will revert back to the old text if testValidity() returns action==stop.
*/
- void setCellText( const QString& _text, bool asString = false );
+ void setCellText( const TQString& _text, bool asString = false );
/**
* Sets the text in the cell when the user inputs it.
* Will determine the type of contents automatically.
* Called by setCellText.
*/
- void setDisplayText( const QString& _text );
+ void setDisplayText( const TQString& _text );
/**
* Sets a link for this cell. For example, setLink( "mailto:joe@somewhere.com" )
@@ -466,13 +466,13 @@ public:
* Possible choices for link are URL (web, ftp), e-mail address, local file,
* or another cell.
*/
- void setLink( const QString& link );
+ void setLink( const TQString& link );
/**
* Returns the link associated with cell. It is empty if this cell
* contains no link.
*/
- QString link() const;
+ TQString link() const;
////////////////////////////////
//
@@ -483,39 +483,39 @@ public:
/**
* @return effective pen for the left border
* If this cell is merged by another cell, the other cell's
- * left border pen. If this cell's conditional formatting contains
+ * left border pen. If this cell's conditional formatting tqcontains
* a left border pen and the condition is matched, the conditional
* formatting's pen. Otherwise, its own left border pen.
*/
- const QPen & effLeftBorderPen( int col, int row ) const;
+ const TQPen & effLeftBorderPen( int col, int row ) const;
/**
* @return effective pen for the top border
* @see effLeftBorderPen
*/
- const QPen & effTopBorderPen( int col, int row ) const;
+ const TQPen & effTopBorderPen( int col, int row ) const;
/**
* @return effective pen for the right border
* @see effLeftBorderPen
*/
- const QPen & effRightBorderPen( int col, int row ) const;
+ const TQPen & effRightBorderPen( int col, int row ) const;
/**
* @return effective pen for the bottom border
* @see effLeftBorderPen
*/
- const QPen & effBottomBorderPen( int col, int row ) const;
+ const TQPen & effBottomBorderPen( int col, int row ) const;
/**
* @return effective pen for the go up diagonal border
* If this cell's conditional formatting contains a go up diagonal pen and
* the condition is matched, the conditional formatting's pen. Otherwise,
* its own go up diagonal pen.
*/
- const QPen & effGoUpDiagonalPen( int col, int row ) const;
+ const TQPen & effGoUpDiagonalPen( int col, int row ) const;
/**
* @return effective pen for the go up diagonal border
* @see effGoUpDiagonalPen
*/
- const QPen & effFallDiagonalPen( int col, int row ) const;
- const QColor & effTextColor( int col, int row ) const;
+ const TQPen & effFallDiagonalPen( int col, int row ) const;
+ const TQColor & effTextColor( int col, int row ) const;
/**
* @return "worth" of the effective bottom border pen
@@ -545,32 +545,32 @@ public:
/**
* @see Format::leftBorderPen
*/
- const QPen& leftBorderPen( int col, int row ) const;
+ const TQPen& leftBorderPen( int col, int row ) const;
/**
* @see Format::topBorderPen
*/
- const QPen& topBorderPen( int col, int row ) const;
+ const TQPen& topBorderPen( int col, int row ) const;
/**
* @see Format::rightBorderPen
*/
- const QPen& rightBorderPen( int col, int row ) const;
+ const TQPen& rightBorderPen( int col, int row ) const;
/**
* @see Format::bottomBorderPen
*/
- const QPen& bottomBorderPen( int col, int row ) const;
+ const TQPen& bottomBorderPen( int col, int row ) const;
/**
* @see Format::bgColor
*/
- const QColor& bgColor( int col, int row ) const;
+ const TQColor& bgColor( int col, int row ) const;
/**
* @see Format::backGroundBrush
*/
- const QBrush& backGroundBrush( int col, int row ) const;
+ const TQBrush& backGroundBrush( int col, int row ) const;
////////////////////////////////
//
@@ -581,22 +581,22 @@ public:
/**
* @see Format::setLeftBorderPen
*/
- void setLeftBorderPen( const QPen& p );
+ void setLeftBorderPen( const TQPen& p );
/**
* @see Format::setTopBorderPen
*/
- void setTopBorderPen( const QPen& p );
+ void setTopBorderPen( const TQPen& p );
/**
* @see Format::setRightBorderPen
*/
- void setRightBorderPen( const QPen& p );
+ void setRightBorderPen( const TQPen& p );
/**
* @see Format::setBottomBorderPen
*/
- void setBottomBorderPen( const QPen& p );
+ void setBottomBorderPen( const TQPen& p );
//////////////////////
//
@@ -647,7 +647,7 @@ public:
*/
bool updateChart(bool refresh=true);
- QString testAnchor( int _x, int _y ) const;
+ TQString testAnchor( int _x, int _y ) const;
/**
* Starts calculating.
@@ -681,7 +681,7 @@ public:
* some cell specific format value like font or text change.
*/
void setLayoutDirtyFlag( bool format = false );
- bool layoutDirtyFlag() const;
+ bool tqlayoutDirtyFlag() const;
void clearDisplayDirtyFlag();
void setDisplayDirtyFlag();
@@ -724,7 +724,7 @@ public:
/**
* @return the obscuring cell list (might be empty)
*/
- QValueList<Cell*> obscuringCells() const;
+ TQValueList<Cell*> obscuringCells() const;
void clearObscuringCells();
@@ -781,8 +781,8 @@ public:
* @param _col row the formula is in
* @param _row column the formula is in
*/
- QString encodeFormula( bool _era = false, int _col = -1, int _row = -1 ) const;
- QString decodeFormula( const QString &_text, int _col = -1, int _row = -1 ) const;
+ TQString encodeFormula( bool _era = false, int _col = -1, int _row = -1 ) const;
+ TQString decodeFormula( const TQString &_text, int _col = -1, int _row = -1 ) const;
/**
* Merges the @p new_text with @p old_text during a paste operation.
@@ -793,7 +793,7 @@ public:
*
* @return the merged text.
*/
- QString pasteOperation( const QString &new_text, const QString &old_text, Paste::Operation op );
+ TQString pasteOperation( const TQString &new_text, const TQString &old_text, Paste::Operation op );
/**
* @return true if the cell contains a formula that could not
@@ -807,10 +807,10 @@ public:
void clearAllErrors();
/**
- * Calculates the layout of the cell, i,e, determines what should be shown
+ * Calculates the tqlayout of the cell, i,e, determines what should be shown
* for this cell, m_strOutText.
*/
- void makeLayout( QPainter &_painter, int _col, int _row );
+ void makeLayout( TQPainter &_painter, int _col, int _row );
/**
* Parses the formula.
@@ -825,12 +825,12 @@ public:
/**
* Gets a copy of the list of current conditions
*/
- QValueList<Conditional> conditionList() const;
+ TQValueList<Conditional> conditionList() const;
/**
* Replace the old set of conditions with a new one
*/
- void setConditionList(const QValueList<Conditional> &newList);
+ void setConditionList(const TQValueList<Conditional> &newList);
Validity * getValidity( int newStruct = -1 );
@@ -846,7 +846,7 @@ public:
* Calculates the text parameters stored in cell
* Applies font to use to @p painter
*/
- void calculateTextParameters( QPainter &painter, int _col, int _row );
+ void calculateTextParameters( TQPainter &painter, int _col, int _row );
/**
* return align X when align is undefined
@@ -900,9 +900,9 @@ public:
* In that case the cell usually displays "#####"
*
* LayoutDirty
- * Flag showing whether the current layout is OK.
+ * Flag showing whether the current tqlayout is OK.
* If you change for example the fonts point size, set this flag. When the
- * cell must draw itself on the screen it will first recalculate its layout.
+ * cell must draw itself on the screen it will first recalculate its tqlayout.
*
* CalcDirty
* Shows whether recalculation is necessary.
@@ -925,7 +925,7 @@ public:
* If this flag is set, then it is known that this cell has to be updated
* on the display. This means that somewhere in the calling stack there is a
* function which will call @ref Sheet::updateCell once it retains
- * the control. If a function changes the contents/layout of this cell and this
+ * the control. If a function changes the contents/tqlayout of this cell and this
* flag is not set, then the function must set it at once. After the changes
* are done the function must call <tt>m_pSheet->updateCell(...).
* The flag is cleared by the function format()->sheet()->updateCell.
@@ -951,19 +951,19 @@ protected:
/**
* Applies the font to use to @p painter
*/
- void applyZoomedFont( QPainter &painter, int _col, int _row );
+ void applyZoomedFont( TQPainter &painter, int _col, int _row );
/**
* Called from makeFormat() to determine the space
* needed for the text.
*/
- void textSize( QPainter &_paint );
+ void textSize( TQPainter &_paint );
/**
* Called from @ref #paintCell to determine the text
* wich can be displaying.
*/
- QString textDisplaying( QPainter &painter);
+ TQString textDisplaying( TQPainter &painter);
/**
* Cleans up formula stuff.
@@ -990,15 +990,15 @@ protected:
/**
* Load the text paragraphs from an OASIS XML cell description.
- * @param parent The DOM element representing the cell.
+ * @param tqparent The DOM element representing the cell.
*/
- void loadOasisCellText( const QDomElement& parent );
- void loadOasisObjects( const QDomElement& e, KoOasisLoadingContext& oasisContext );
- void loadOasisValidation( const QString& validationName );
+ void loadOasisCellText( const TQDomElement& tqparent );
+ void loadOasisObjects( const TQDomElement& e, KoOasisLoadingContext& oasisContext );
+ void loadOasisValidation( const TQString& validationName );
- void loadOasisValidationCondition( QString &valExpression );
+ void loadOasisValidationCondition( TQString &valExpression );
void saveOasisAnnotation( KoXmlWriter &xmlwriter );
- void loadOasisConditional( QDomElement * style );
+ void loadOasisConditional( TQDomElement * style );
@@ -1010,60 +1010,60 @@ private:
// static const char* s_dataTypeToString[];
/* helper functions to the paintCell(...) function */
- /* void paintCellHighlight(QPainter& painter,
+ /* void paintCellHighlight(TQPainter& painter,
const KoRect& cellRect,
- const QPoint& cellRef,
+ const TQPoint& cellRef,
const int highlightBorder,
- const QPen& rightPen,
- const QPen& bottomPen,
- const QPen& leftPen,
- const QPen& topPen
+ const TQPen& rightPen,
+ const TQPen& bottomPen,
+ const TQPen& leftPen,
+ const TQPen& topPen
);*/
- void paintCellBorders( QPainter& painter, const KoRect &rect,
+ void paintCellBorders( TQPainter& painter, const KoRect &rect,
const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintBorderRight, bool paintBorderBottom,
bool paintBorderLeft, bool paintBorderTop,
- QPen & rightPen, QPen & bottomPen,
- QPen & leftPen, QPen & topPen );
- void paintPageBorders( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef,
+ TQPen & rightPen, TQPen & bottomPen,
+ TQPen & leftPen, TQPen & topPen );
+ void paintPageBorders( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef,
bool paintBorderRight, bool paintBorderBottom );
- void paintText( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef );
- void paintMoreTextIndicator( QPainter& painter, const KoRect &cellRect,
- QColor &backgroundColor );
- void paintCommentIndicator( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef, QColor &backgroundColor );
- void paintFormulaIndicator( QPainter& painter, const KoRect &cellRect,
- QColor &backgroundColor );
- void paintDefaultBorders( QPainter& painter, const KoRect &rect,
- const KoRect &cellRect, const QPoint &cellRef,
+ void paintText( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef );
+ void paintMoreTextIndicator( TQPainter& painter, const KoRect &cellRect,
+ TQColor &backgroundColor );
+ void paintCommentIndicator( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef, TQColor &backgroundColor );
+ void paintFormulaIndicator( TQPainter& painter, const KoRect &cellRect,
+ TQColor &backgroundColor );
+ void paintDefaultBorders( TQPainter& painter, const KoRect &rect,
+ const KoRect &cellRect, const TQPoint &cellRef,
bool paintBorderRight, bool paintBorderBottom,
bool paintBorderLeft, bool paintBorderTop,
- QPen const & rightPen, QPen const & bottomPen,
- QPen const & leftPen, QPen const & topPen );
- void paintBackground( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef, bool selected,
- QColor &backgroundColor );
- void paintObscuredCells( const KoRect& rect, QPainter& painter,
+ TQPen const & rightPen, TQPen const & bottomPen,
+ TQPen const & leftPen, TQPen const & topPen );
+ void paintBackground( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef, bool selected,
+ TQColor &backgroundColor );
+ void paintObscuredCells( const KoRect& rect, TQPainter& painter,
View* view, const KoRect &cellRect,
- const QPoint &cellRef,
+ const TQPoint &cellRef,
bool paintBorderRight, bool paintBorderBottom,
bool paintBorderLeft, bool paintBorderTop,
- QPen & rightPen, QPen & bottomPen,
- QPen & leftPen, QPen & topPen,
- QValueList<QPoint> &mergedCellsPainted );
- void paintCellDiagonalLines( QPainter& painter, const KoRect &cellRect,
- const QPoint &cellRef );
+ TQPen & rightPen, TQPen & bottomPen,
+ TQPen & leftPen, TQPen & topPen,
+ TQValueList<TQPoint> &mergedCellsPainted );
+ void paintCellDiagonalLines( TQPainter& painter, const KoRect &cellRect,
+ const TQPoint &cellRef );
/** handle the fact that a cell has been updated - calls cellUpdated()
- in the parent Sheet object */
+ in the tqparent Sheet object */
void valueChanged ();
/* helper functions to the makeLayout(...) function */
@@ -1072,9 +1072,9 @@ private:
/* helper functions to the load/save routines */
- bool loadCellData(const QDomElement &text, Paste::Operation op);
- bool saveCellResult( QDomDocument& doc, QDomElement& result,
- QString str );
+ bool loadCellData(const TQDomElement &text, Paste::Operation op);
+ bool saveCellResult( TQDomDocument& doc, TQDomElement& result,
+ TQString str );
void update();
int effAlignX();
@@ -1085,7 +1085,7 @@ private:
*/
void offsetAlign( int _col, int _row );
- void checkForNamedAreas( QString & formula ) const;
+ void checkForNamedAreas( TQString & formula ) const;
/**
* replacements:
* 1. "==" -> "="
@@ -1093,8 +1093,8 @@ private:
* "A1" -> "[.A1]"
* 3. "," -> "."
*/
- QString convertFormulaToOasisFormat( const QString & formula ) const;
- void loadOasisValidationValue( const QStringList &listVal );
+ TQString convertFormulaToOasisFormat( const TQString & formula ) const;
+ void loadOasisValidationValue( const TQStringList &listVal );
};
diff --git a/kspread/kspread_cluster.cc b/kspread/kspread_cluster.cc
index 74d0e339..21fe0ef0 100644
--- a/kspread/kspread_cluster.cc
+++ b/kspread/kspread_cluster.cc
@@ -213,25 +213,25 @@ void Cluster::remove( int x, int y )
}
}
-bool Cluster::shiftRow( const QPoint& marker )
+bool Cluster::shiftRow( const TQPoint& marker )
{
bool dummy;
return shiftRow( marker, dummy );
}
-bool Cluster::shiftColumn( const QPoint& marker )
+bool Cluster::shiftColumn( const TQPoint& marker )
{
bool dummy;
return shiftColumn( marker, dummy );
}
-void Cluster::unshiftColumn( const QPoint& marker )
+void Cluster::unshiftColumn( const TQPoint& marker )
{
bool dummy;
unshiftColumn( marker, dummy );
}
-void Cluster::unshiftRow( const QPoint& marker )
+void Cluster::unshiftRow( const TQPoint& marker )
{
bool dummy;
unshiftRow( marker, dummy );
@@ -252,7 +252,7 @@ Cell* Cluster::firstCell() const
return m_first;
}
-bool Cluster::shiftRow( const QPoint& marker, bool& work )
+bool Cluster::shiftRow( const TQPoint& marker, bool& work )
{
work = false;
@@ -309,7 +309,7 @@ bool Cluster::shiftRow( const QPoint& marker, bool& work )
return true;
}
-bool Cluster::shiftColumn( const QPoint& marker, bool& work )
+bool Cluster::shiftColumn( const TQPoint& marker, bool& work )
{
work = false;
@@ -391,7 +391,7 @@ bool Cluster::insertColumn( int col )
{
bool work = true;
for( int t2 = 0; work && t2 < KSPREAD_CLUSTER_LEVEL2; ++t2 )
- shiftRow( QPoint( col, t1 * KSPREAD_CLUSTER_LEVEL2 + t2 ), work );
+ shiftRow( TQPoint( col, t1 * KSPREAD_CLUSTER_LEVEL2 + t2 ), work );
}
return true;
@@ -421,13 +421,13 @@ bool Cluster::insertRow( int row )
{
bool work = true;
for( int t2 = 0; work && t2 < KSPREAD_CLUSTER_LEVEL2; ++t2 )
- shiftColumn( QPoint( t1 * KSPREAD_CLUSTER_LEVEL2 + t2, row ), work );
+ shiftColumn( TQPoint( t1 * KSPREAD_CLUSTER_LEVEL2 + t2, row ), work );
}
return true;
}
-void Cluster::unshiftColumn( const QPoint& marker, bool& work )
+void Cluster::unshiftColumn( const TQPoint& marker, bool& work )
{
work = false;
@@ -475,7 +475,7 @@ void Cluster::unshiftColumn( const QPoint& marker, bool& work )
setAutoDelete( a );
}
-void Cluster::unshiftRow( const QPoint& marker, bool& work )
+void Cluster::unshiftRow( const TQPoint& marker, bool& work )
{
work = false;
@@ -548,7 +548,7 @@ void Cluster::removeColumn( int col )
{
bool work = true;
for( int t2 = 0; work && t2 < KSPREAD_CLUSTER_LEVEL2; ++t2 )
- unshiftRow( QPoint( col, t1 * KSPREAD_CLUSTER_LEVEL2 + t2 ), work );
+ unshiftRow( TQPoint( col, t1 * KSPREAD_CLUSTER_LEVEL2 + t2 ), work );
}
}
@@ -577,7 +577,7 @@ void Cluster::removeRow( int row )
{
bool work = true;
for( int t2 = 0; work && t2 < KSPREAD_CLUSTER_LEVEL2; ++t2 )
- unshiftColumn( QPoint( t1 * KSPREAD_CLUSTER_LEVEL2 + t2, row ), work );
+ unshiftColumn( TQPoint( t1 * KSPREAD_CLUSTER_LEVEL2 + t2, row ), work );
}
}
@@ -1039,7 +1039,7 @@ bool ColumnCluster::insertColumn( int col )
int cx = col / KSPREAD_CLUSTER_LEVEL2;
int dx = col % KSPREAD_CLUSTER_LEVEL2;
- // Is there a column layout at the right most position ?
+ // Is there a column tqlayout at the right most position ?
// In this case the shift is impossible.
ColumnFormat** cl = m_cluster[ KSPREAD_CLUSTER_LEVEL1 - 1 ];
if ( cl && cl[ KSPREAD_CLUSTER_LEVEL2 - 1 ] )
@@ -1356,7 +1356,7 @@ bool RowCluster::insertRow( int row )
int cx = row / KSPREAD_CLUSTER_LEVEL2;
int dx = row % KSPREAD_CLUSTER_LEVEL2;
- // Is there a row layout at the bottom most position ?
+ // Is there a row tqlayout at the bottom most position ?
// In this case the shift is impossible.
RowFormat** cl = m_cluster[ KSPREAD_CLUSTER_LEVEL1 - 1 ];
if ( cl && cl[ KSPREAD_CLUSTER_LEVEL2 - 1 ] )
diff --git a/kspread/kspread_cluster.h b/kspread/kspread_cluster.h
index f7963f08..702fc746 100644
--- a/kspread/kspread_cluster.h
+++ b/kspread/kspread_cluster.h
@@ -26,7 +26,7 @@
#define KSPREAD_CLUSTER_LEVEL2 256
#define KSPREAD_CLUSTER_MAX (128*256)
-class QPoint;
+class TQPoint;
namespace KSpread
{
@@ -98,7 +98,7 @@ public:
Cell* firstCell() const;
- bool shiftRow( const QPoint& marker );
+ bool shiftRow( const TQPoint& marker );
/**
* Moves all cells in the column marker.x() beginning with
* the one at marker.y() one position downwards.
@@ -106,14 +106,14 @@ public:
* @return false if a cell would drop out of the sheet because of that.
* In this case the shift is not performed.
*/
- bool shiftColumn( const QPoint& marker );
+ bool shiftColumn( const TQPoint& marker );
/**
* Moves all cells in the column marker.x() beginning with
* the one at marker.y() + 1 one position upwards.
*/
- void unshiftColumn( const QPoint& marker );
- void unshiftRow( const QPoint& marker );
+ void unshiftColumn( const TQPoint& marker );
+ void unshiftRow( const TQPoint& marker );
/**
* Moves all columns beginning with @p col one position
@@ -243,11 +243,11 @@ private:
* @param work is set to true if the method found some clusters
* which belong to the shifted row.
*/
- bool shiftRow( const QPoint& marker, bool& work );
- bool shiftColumn( const QPoint& marker, bool& work );
+ bool shiftRow( const TQPoint& marker, bool& work );
+ bool shiftColumn( const TQPoint& marker, bool& work );
- void unshiftColumn( const QPoint& marker, bool& work );
- void unshiftRow( const QPoint& marker, bool& work );
+ void unshiftColumn( const TQPoint& marker, bool& work );
+ void unshiftRow( const TQPoint& marker, bool& work );
/** helper method used by valueRange */
Value makeArray (int col1, int row1, int col2, int row2) const;
diff --git a/kspread/kspread_condition.cc b/kspread/kspread_condition.cc
index fd3eb7e7..fdca8e46 100644
--- a/kspread/kspread_condition.cc
+++ b/kspread/kspread_condition.cc
@@ -33,8 +33,8 @@
#include <KoXmlWriter.h>
#include <KoXmlNS.h>
#include <kdebug.h>
-#include <qdom.h>
-#include <qbuffer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
#include "kspread_condition.h"
@@ -63,11 +63,11 @@ Conditional::Conditional( const Conditional& c )
Conditional& Conditional::operator=( const Conditional& d )
{
- strVal1 = d.strVal1 ? new QString( *d.strVal1 ) : 0;
- strVal2 = d.strVal2 ? new QString( *d.strVal2 ) : 0;
- styleName = d.styleName ? new QString( *d.styleName ) : 0;
- fontcond = d.fontcond ? new QFont( *d.fontcond ) : 0;
- colorcond = d.colorcond ? new QColor( *d.colorcond ) : 0;
+ strVal1 = d.strVal1 ? new TQString( *d.strVal1 ) : 0;
+ strVal2 = d.strVal2 ? new TQString( *d.strVal2 ) : 0;
+ styleName = d.styleName ? new TQString( *d.styleName ) : 0;
+ fontcond = d.fontcond ? new TQFont( *d.fontcond ) : 0;
+ colorcond = d.colorcond ? new TQColor( *d.colorcond ) : 0;
val1 = d.val1;
val2 = d.val2;
style = d.style;
@@ -118,9 +118,9 @@ bool Conditions::currentCondition( Conditional & condition )
{
/* for now, the first condition that is true is the one that will be used */
- QValueList<Conditional>::const_iterator it;
+ TQValueList<Conditional>::const_iterator it;
double value = m_cell->value().asFloat();
- QString strVal = m_cell->value().asString();
+ TQString strVal = m_cell->value().asString();
for ( it = m_condList.begin(); it != m_condList.end(); ++it )
@@ -211,8 +211,8 @@ bool Conditions::currentCondition( Conditional & condition )
return true;
}
else
- if ( ( value > QMIN(condition.val1, condition.val2 ) )
- && ( value < QMAX(condition.val1, condition.val2 ) ) )
+ if ( ( value > TQMIN(condition.val1, condition.val2 ) )
+ && ( value < TQMAX(condition.val1, condition.val2 ) ) )
{
return true;
}
@@ -225,8 +225,8 @@ bool Conditions::currentCondition( Conditional & condition )
return true;
}
else
- if ( ( value < QMIN(condition.val1, condition.val2 ) )
- || ( value > QMAX(condition.val1, condition.val2) ) )
+ if ( ( value < TQMIN(condition.val1, condition.val2 ) )
+ || ( value > TQMAX(condition.val1, condition.val2) ) )
{
return true;
}
@@ -251,16 +251,16 @@ bool Conditions::currentCondition( Conditional & condition )
return false;
}
-QValueList<Conditional> Conditions::conditionList() const
+TQValueList<Conditional> Conditions::conditionList() const
{
return m_condList;
}
-void Conditions::setConditionList( const QValueList<Conditional> & list )
+void Conditions::setConditionList( const TQValueList<Conditional> & list )
{
m_condList.clear();
- QValueList<Conditional>::const_iterator it;
+ TQValueList<Conditional>::const_iterator it;
for ( it = list.begin(); it != list.end(); ++it )
{
Conditional d = *it;
@@ -273,13 +273,13 @@ void Conditions::saveOasisConditions( KoGenStyle &currentCellStyle )
//todo fix me with kspread old format!!!
if ( m_condList.isEmpty() )
return;
- QValueList<Conditional>::const_iterator it;
+ TQValueList<Conditional>::const_iterator it;
int i = 0;
for ( it = m_condList.begin(); it != m_condList.end(); ++it, ++i )
{
Conditional condition = *it;
//<style:map style:condition="cell-content()=45" style:apply-style-name="Default" style:base-cell-address="Sheet1.E10"/>
- QMap<QString, QString> map;
+ TQMap<TQString, TQString> map;
map.insert( "style:condition", saveOasisConditionValue( condition ) );
map.insert( "style:apply-style-name", *( condition.styleName ) );
//map.insert( ""style:base-cell-address", "..." );//todo
@@ -287,11 +287,11 @@ void Conditions::saveOasisConditions( KoGenStyle &currentCellStyle )
}
}
-QString Conditions::saveOasisConditionValue( Conditional &condition)
+TQString Conditions::saveOasisConditionValue( Conditional &condition)
{
//we can also compare text value.
//todo adapt it.
- QString value;
+ TQString value;
switch( condition.cond )
{
case Conditional::None:
@@ -301,35 +301,35 @@ QString Conditions::saveOasisConditionValue( Conditional &condition)
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::Superior:
value="cell-content()>";
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::Inferior:
value="cell-content()<";
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::SuperiorEqual:
value="cell-content()>=";
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::InferiorEqual:
value="cell-content()<=";
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::Between:
value="cell-content-is-between(";
@@ -342,9 +342,9 @@ QString Conditions::saveOasisConditionValue( Conditional &condition)
}
else
{
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
value+=",";
- value+=QString::number( condition.val2 );
+ value+=TQString::number( condition.val2 );
}
value+=")";
break;
@@ -353,7 +353,7 @@ QString Conditions::saveOasisConditionValue( Conditional &condition)
if ( condition.strVal1 )
value+=*condition.strVal1;
else
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
break;
case Conditional::Different:
value="cell-content-is-not-between(";
@@ -366,9 +366,9 @@ QString Conditions::saveOasisConditionValue( Conditional &condition)
}
else
{
- value+=QString::number( condition.val1 );
+ value+=TQString::number( condition.val1 );
value+=",";
- value+=QString::number( condition.val2 );
+ value+=TQString::number( condition.val2 );
}
value+=")";
break;
@@ -377,13 +377,13 @@ QString Conditions::saveOasisConditionValue( Conditional &condition)
}
-QDomElement Conditions::saveConditions( QDomDocument & doc ) const
+TQDomElement Conditions::saveConditions( TQDomDocument & doc ) const
{
- QDomElement conditions = doc.createElement("condition");
- QValueList<Conditional>::const_iterator it;
- QDomElement child;
+ TQDomElement conditions = doc.createElement("condition");
+ TQValueList<Conditional>::const_iterator it;
+ TQDomElement child;
int num = 0;
- QString name;
+ TQString name;
for ( it = m_condList.begin(); it != m_condList.end(); ++it )
{
@@ -429,7 +429,7 @@ QDomElement Conditions::saveConditions( QDomDocument & doc ) const
if ( num == 0 )
{
/* there weren't any real conditions -- return a null dom element */
- return QDomElement();
+ return TQDomElement();
}
else
{
@@ -437,25 +437,25 @@ QDomElement Conditions::saveConditions( QDomDocument & doc ) const
}
}
-void Conditions::loadOasisConditions( const QDomElement & element )
+void Conditions::loadOasisConditions( const TQDomElement & element )
{
kdDebug(36003) << "Loading conditional styles" << endl;
- QDomNode node( element );
+ TQDomNode node( element );
StyleManager * manager = m_cell->sheet()->doc()->styleManager();
while ( !node.isNull() )
{
- QDomElement elementItem = node.toElement();
+ TQDomElement elementItem = node.toElement();
if ( elementItem.tagName()== "map" && elementItem.namespaceURI() == KoXmlNS::style )
{
bool ok = true;
- kdDebug(36003) << "\tcondition: "<< elementItem.attributeNS( KoXmlNS::style, "condition", QString::null )<<endl;
+ kdDebug(36003) << "\tcondition: "<< elementItem.attributeNS( KoXmlNS::style, "condition", TQString() )<<endl;
Conditional newCondition;
- loadOasisConditionValue( elementItem.attributeNS( KoXmlNS::style, "condition", QString::null ), newCondition );
+ loadOasisConditionValue( elementItem.attributeNS( KoXmlNS::style, "condition", TQString() ), newCondition );
if ( elementItem.hasAttributeNS( KoXmlNS::style, "apply-style-name" ) )
{
- kdDebug(36003)<<"\tstyle: "<<elementItem.attributeNS( KoXmlNS::style, "apply-style-name", QString::null )<<endl;
- newCondition.styleName = new QString( elementItem.attributeNS( KoXmlNS::style, "apply-style-name", QString::null ) );
+ kdDebug(36003)<<"\tstyle: "<<elementItem.attributeNS( KoXmlNS::style, "apply-style-name", TQString() )<<endl;
+ newCondition.styleName = new TQString( elementItem.attributeNS( KoXmlNS::style, "apply-style-name", TQString() ) );
newCondition.style = manager->style( *newCondition.styleName );
if ( !newCondition.style )
ok = false;
@@ -472,29 +472,29 @@ void Conditions::loadOasisConditions( const QDomElement & element )
}
}
-void Conditions::loadOasisConditionValue( const QString &styleCondition, Conditional &newCondition )
+void Conditions::loadOasisConditionValue( const TQString &styleCondition, Conditional &newCondition )
{
- QString val( styleCondition );
- if ( val.contains( "cell-content()" ) )
+ TQString val( styleCondition );
+ if ( val.tqcontains( "cell-content()" ) )
{
val = val.remove( "cell-content()" );
loadOasisCondition( val,newCondition );
}
//GetFunction ::= cell-content-is-between(Value, Value) | cell-content-is-not-between(Value, Value)
//for the moment we support just int/double value, not text/date/time :(
- if ( val.contains( "cell-content-is-between(" ) )
+ if ( val.tqcontains( "cell-content-is-between(" ) )
{
val = val.remove( "cell-content-is-between(" );
val = val.remove( ")" );
- QStringList listVal = QStringList::split( "," , val );
+ TQStringList listVal = TQStringList::split( "," , val );
loadOasisValidationValue( listVal, newCondition );
newCondition.cond = Conditional::Between;
}
- if ( val.contains( "cell-content-is-not-between(" ) )
+ if ( val.tqcontains( "cell-content-is-not-between(" ) )
{
val = val.remove( "cell-content-is-not-between(" );
val = val.remove( ")" );
- QStringList listVal = QStringList::split( ",", val );
+ TQStringList listVal = TQStringList::split( ",", val );
loadOasisValidationValue( listVal,newCondition );
newCondition.cond = Conditional::Different;
}
@@ -502,36 +502,36 @@ void Conditions::loadOasisConditionValue( const QString &styleCondition, Conditi
}
-void Conditions::loadOasisCondition( QString &valExpression, Conditional &newCondition )
+void Conditions::loadOasisCondition( TQString &valExpression, Conditional &newCondition )
{
- QString value;
- if (valExpression.find( "<=" )==0 )
+ TQString value;
+ if (valExpression.tqfind( "<=" )==0 )
{
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::InferiorEqual;
}
- else if (valExpression.find( ">=" )==0 )
+ else if (valExpression.tqfind( ">=" )==0 )
{
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::SuperiorEqual;
}
- else if (valExpression.find( "!=" )==0 )
+ else if (valExpression.tqfind( "!=" )==0 )
{
//add Differentto attribute
value = valExpression.remove( 0,2 );
newCondition.cond = Conditional::DifferentTo;
}
- else if ( valExpression.find( "<" )==0 )
+ else if ( valExpression.tqfind( "<" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Inferior;
}
- else if(valExpression.find( ">" )==0 )
+ else if(valExpression.tqfind( ">" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Superior;
}
- else if (valExpression.find( "=" )==0 )
+ else if (valExpression.tqfind( "=" )==0 )
{
value = valExpression.remove( 0,1 );
newCondition.cond = Conditional::Equal;
@@ -546,14 +546,14 @@ void Conditions::loadOasisCondition( QString &valExpression, Conditional &newCon
newCondition.val1 = value.toInt(&ok);
if ( !ok )
{
- newCondition.strVal1 = new QString( value );
+ newCondition.strVal1 = new TQString( value );
kdDebug()<<" Try to parse this value :"<<value<<endl;
}
}
}
-void Conditions::loadOasisValidationValue( const QStringList &listVal, Conditional &newCondition )
+void Conditions::loadOasisValidationValue( const TQStringList &listVal, Conditional &newCondition )
{
bool ok = false;
kdDebug()<<" listVal[0] :"<<listVal[0]<<" listVal[1] :"<<listVal[1]<<endl;
@@ -564,7 +564,7 @@ void Conditions::loadOasisValidationValue( const QStringList &listVal, Condition
newCondition.val1 = listVal[0].toInt(&ok);
if ( !ok )
{
- newCondition.strVal1 = new QString( listVal[0] );
+ newCondition.strVal1 = new TQString( listVal[0] );
kdDebug()<<" Try to parse this value :"<<listVal[0]<<endl;
}
}
@@ -575,16 +575,16 @@ void Conditions::loadOasisValidationValue( const QStringList &listVal, Condition
newCondition.val2 = listVal[1].toInt(&ok);
if ( !ok )
{
- newCondition.strVal2 = new QString( listVal[1] );
+ newCondition.strVal2 = new TQString( listVal[1] );
kdDebug()<<" Try to parse this value :"<<listVal[1]<<endl;
}
}
}
-void Conditions::loadConditions( const QDomElement & element )
+void Conditions::loadConditions( const TQDomElement & element )
{
- QDomNodeList nodeList = element.childNodes();
+ TQDomNodeList nodeList = element.childNodes();
Conditional newCondition;
bool ok;
StyleManager * manager = m_cell->sheet()->doc()->styleManager();
@@ -597,7 +597,7 @@ void Conditions::loadConditions( const QDomElement & element )
newCondition.fontcond = 0;
newCondition.colorcond = 0;
- QDomElement conditionElement = nodeList.item( i ).toElement();
+ TQDomElement conditionElement = nodeList.item( i ).toElement();
ok = conditionElement.hasAttribute( "cond" );
@@ -615,22 +615,22 @@ void Conditions::loadConditions( const QDomElement & element )
if ( conditionElement.hasAttribute( "strval1" ) )
{
- newCondition.strVal1 = new QString( conditionElement.attribute( "strval1" ) );
+ newCondition.strVal1 = new TQString( conditionElement.attribute( "strval1" ) );
if ( conditionElement.hasAttribute( "strval2" ) )
- newCondition.strVal2 = new QString( conditionElement.attribute( "strval2" ) );
+ newCondition.strVal2 = new TQString( conditionElement.attribute( "strval2" ) );
}
if ( conditionElement.hasAttribute( "color" ) )
- newCondition.colorcond = new QColor( conditionElement.attribute( "color" ) );
+ newCondition.colorcond = new TQColor( conditionElement.attribute( "color" ) );
- QDomElement font = conditionElement.namedItem( "font" ).toElement();
+ TQDomElement font = conditionElement.namedItem( "font" ).toElement();
if ( !font.isNull() )
- newCondition.fontcond = new QFont( util_toFont( font ) );
+ newCondition.fontcond = new TQFont( util_toFont( font ) );
if ( conditionElement.hasAttribute( "style" ) )
{
- newCondition.styleName = new QString( conditionElement.attribute( "style" ) );
+ newCondition.styleName = new TQString( conditionElement.attribute( "style" ) );
newCondition.style = manager->style( *newCondition.styleName );
if ( !newCondition.style )
ok = false;
@@ -653,12 +653,12 @@ bool Conditions::operator==( const Conditions& other ) const
return false;
if ( m_condList.count() != other.m_condList.count() )
return false;
- QValueList<Conditional>::ConstIterator end( m_condList.end() );
- for ( QValueList<Conditional>::ConstIterator it( m_condList.begin() ); it != end; ++it )
+ TQValueList<Conditional>::ConstIterator end( m_condList.end() );
+ for ( TQValueList<Conditional>::ConstIterator it( m_condList.begin() ); it != end; ++it )
{
bool found = false;
- QValueList<Conditional>::ConstIterator otherEnd( other.m_condList.end() );
- for ( QValueList<Conditional>::ConstIterator otherIt( other.m_condList.begin() ); otherIt != otherEnd; ++otherIt )
+ TQValueList<Conditional>::ConstIterator otherEnd( other.m_condList.end() );
+ for ( TQValueList<Conditional>::ConstIterator otherIt( other.m_condList.begin() ); otherIt != otherEnd; ++otherIt )
{
if ( (*it) == (*otherIt) )
found = true;
diff --git a/kspread/kspread_condition.h b/kspread/kspread_condition.h
index a95c9260..87e235d3 100644
--- a/kspread/kspread_condition.h
+++ b/kspread/kspread_condition.h
@@ -22,16 +22,16 @@
#ifndef __kspread_condition_h__
#define __kspread_condition_h__
-#include <qdom.h>
-#include <qvaluelist.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
#include <koffice_export.h>
#include "kspread_global.h"
-class QColor;
-class QFont;
-class QString;
+class TQColor;
+class TQFont;
+class TQString;
class KoGenStyle;
namespace KSpread
@@ -51,11 +51,11 @@ public:
double val1;
double val2;
- QString * strVal1;
- QString * strVal2;
- QColor * colorcond;
- QFont * fontcond;
- QString * styleName;
+ TQString * strVal1;
+ TQString * strVal2;
+ TQColor * colorcond;
+ TQFont * fontcond;
+ TQString * styleName;
Style * style;
Type cond;
@@ -97,26 +97,26 @@ class Conditions
/**
* Retrieve the current list of conditions we're checking
*/
- QValueList<Conditional> conditionList() const;
+ TQValueList<Conditional> conditionList() const;
/**
* Replace the current list of conditions with this new one
*/
- void setConditionList( const QValueList<Conditional> & list );
+ void setConditionList( const TQValueList<Conditional> & list );
/**
* Saves the conditions to a DOM tree structure.
* @return the DOM element for the conditions.
*/
- QDomElement saveConditions( QDomDocument & doc ) const;
+ TQDomElement saveConditions( TQDomDocument & doc ) const;
/**
* Takes a parsed DOM element and recreates the conditions structure out of
* it
*/
- void loadConditions( const QDomElement & element );
+ void loadConditions( const TQDomElement & element );
- void loadOasisConditions( const QDomElement & element );
+ void loadOasisConditions( const TQDomElement & element );
void saveOasisConditions( KoGenStyle &currentCellStyle );
@@ -134,14 +134,14 @@ class Conditions
private:
Conditions() {}
- QString saveOasisConditionValue(Conditional &cond);
- void loadOasisConditionValue( const QString &styleCondition, Conditional &newCondition );
- void loadOasisValidationValue( const QStringList &listVal, Conditional &newCondition );
- void loadOasisCondition( QString &valExpression, Conditional &newCondition );
+ TQString saveOasisConditionValue(Conditional &cond);
+ void loadOasisConditionValue( const TQString &styleCondition, Conditional &newCondition );
+ void loadOasisValidationValue( const TQStringList &listVal, Conditional &newCondition );
+ void loadOasisCondition( TQString &valExpression, Conditional &newCondition );
const Cell * m_cell;
- QValueList<Conditional> m_condList;
+ TQValueList<Conditional> m_condList;
Style * m_matchedStyle;
};
diff --git a/kspread/kspread_doc.cc b/kspread/kspread_doc.cc
index 2164a28b..825808b8 100644
--- a/kspread/kspread_doc.cc
+++ b/kspread/kspread_doc.cc
@@ -33,10 +33,10 @@
#include <dirent.h>
#include <pwd.h>
-#include <qapplication.h>
-#include <qfileinfo.h>
-#include <qfont.h>
-#include <qpair.h>
+#include <tqapplication.h>
+#include <tqfileinfo.h>
+#include <tqfont.h>
+#include <tqpair.h>
#include <kstandarddirs.h>
#include <kdebug.h>
@@ -104,14 +104,14 @@ public:
Sheet *activeSheet;
KSPLoadingInfo *m_loadingInfo;
- static QValueList<Doc*> s_docs;
+ static TQValueList<Doc*> s_docs;
static int s_docId;
DCOPObject* dcop;
// URL of the this part. This variable is only set if the load() function
// had been called with an URL as argument.
- QString fileURL;
+ TQString fileURL;
// for undo/redo
int undoLocked;
@@ -121,16 +121,16 @@ public:
// This flag is used to avoid updates etc. during loading.
bool isLoading;
- QColor pageBorderColor;
+ TQColor pageBorderColor;
- QPtrList<Plugin> plugins;
+ TQPtrList<Plugin> plugins;
- QValueList<Reference> refs;
+ TQValueList<Reference> refs;
KCompletion listCompletion;
int numOperations;
- QValueList<Damage*> damages;
+ TQValueList<Damage*> damages;
// document properties
int syntaxVersion;
@@ -138,7 +138,7 @@ public:
bool horizontalScrollBar:1;
bool columnHeader:1;
bool rowHeader:1;
- QColor gridColor;
+ TQColor gridColor;
double indentValue;
bool showStatusBar:1;
bool showTabBar:1;
@@ -152,11 +152,11 @@ public:
bool dontCheckUpperWord:1;
bool dontCheckTitleCase:1;
bool configLoadFromFile:1;
- QStringList spellListIgnoreAll;
+ TQStringList spellListIgnoreAll;
/// list of all objects
- QPtrList<EmbeddedObject> m_embeddedObjects;
+ TQPtrList<EmbeddedObject> m_embeddedObjects;
KoPictureCollection m_pictureCollection;
- QValueList<KoPictureKey> usedPictures;
+ TQValueList<KoPictureKey> usedPictures;
bool m_savingWholeDocument;
};
@@ -166,11 +166,11 @@ public:
*
*****************************************************************************/
-QValueList<Doc*> Doc::Private::s_docs;
+TQValueList<Doc*> Doc::Private::s_docs;
int Doc::Private::s_docId = 0;
-Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
+Doc::Doc( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
{
d = new Private;
d->m_loadingInfo = 0L;
@@ -187,10 +187,10 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->activeSheet = 0;
- d->pageBorderColor = Qt::red;
+ d->pageBorderColor = TQt::red;
d->configLoadFromFile = false;
- QFont f( KoGlobal::defaultFont() );
+ TQFont f( KoGlobal::defaultFont() );
Format::setGlobalRowHeight( f.pointSizeFloat() + 3 );
Format::setGlobalColWidth( ( f.pointSizeFloat() + 3 ) * 5 );
@@ -205,20 +205,20 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->dcop = 0;
d->isLoading = false;
- d->numOperations = 1; // don't start repainting before the GUI is done...
+ d->numOperations = 1; // don't start tqrepainting before the GUI is done...
d->undoLocked = 0;
d->commandHistory = new KoCommandHistory( actionCollection() );
- connect( d->commandHistory, SIGNAL( commandExecuted() ), SLOT( commandExecuted() ) );
- connect( d->commandHistory, SIGNAL( documentRestored() ), SLOT( documentRestored() ) );
+ connect( d->commandHistory, TQT_SIGNAL( commandExecuted() ), TQT_SLOT( commandExecuted() ) );
+ connect( d->commandHistory, TQT_SIGNAL( documentRestored() ), TQT_SLOT( documentRestored() ) );
// Make us scripsheet if the document has a name
// Set a name if there is no name specified
if ( !name )
{
- QString tmp( "Document%1" );
- tmp = tmp.arg( d->s_docId++ );
+ TQString tmp( "Document%1" );
+ tmp = tmp.tqarg( d->s_docId++ );
setName( tmp.local8Bit());//tmp.latin1() );
dcopObject();
}
@@ -231,14 +231,14 @@ Doc::Doc( QWidget *parentWidget, const char *widgetName, QObject* parent, const
d->horizontalScrollBar = true;
d->columnHeader = true;
d->rowHeader = true;
- d->gridColor = Qt::lightGray;
+ d->gridColor = TQt::lightGray;
d->indentValue = 10.0;
d->showStatusBar = true;
d->showFormulaBar = true;
d->showTabBar = true;
d->showError = false;
d->calcMethod = SumOfNumber;
- d->moveTo = Bottom;
+ d->moveTo = KSpread::Bottom;
d->completionMode = KGlobalSettings::CompletionAuto;
d->spellConfig = 0;
d->dontCheckUpperWord = false;
@@ -271,16 +271,16 @@ Doc::~Doc()
delete d;
}
-QValueList<Doc*> Doc::documents()
+TQValueList<Doc*> Doc::documents()
{
return Private::s_docs;
}
-bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
+bool Doc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
// ElapsedTime et( " initDoc " );
- QString f;
+ TQString f;
if (flags==KoDocument::InitDocEmpty)
{
@@ -311,7 +311,7 @@ bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
dlgtype = KoTemplateChooseDia::OnlyTemplates;
ret = KoTemplateChooseDia::choose( Factory::global(), f,
- dlgtype, "kspread_template", parentWidget );
+ dlgtype, "kspread_template", tqparentWidget );
if ( ret == KoTemplateChooseDia::File )
{
@@ -366,7 +366,7 @@ bool Doc::initDoc(InitDocFlags flags, QWidget* parentWidget)
return false;
}
-void Doc::openTemplate (const QString& file)
+void Doc::openTemplate (const TQString& file)
{
d->m_loadingInfo = new KSPLoadingInfo;
d->m_loadingInfo->setLoadTemplate( true );
@@ -485,17 +485,17 @@ void Doc::doNotPaint(bool status)
}
-QColor Doc::pageBorderColor() const
+TQColor Doc::pageBorderColor() const
{
return d->pageBorderColor;
}
-void Doc::changePageBorderColor( const QColor & _color)
+void Doc::changePageBorderColor( const TQColor & _color)
{
d->pageBorderColor = _color;
}
-const QValueList<Reference> &Doc::listArea()
+const TQValueList<Reference> &Doc::listArea()
{
return d->refs;
}
@@ -505,11 +505,11 @@ KCompletion& Doc::completion()
return d->listCompletion;
}
-KoView* Doc::createViewInstance( QWidget* parent, const char* name )
+KoView* Doc::createViewInstance( TQWidget* tqparent, const char* name )
{
if ( name == 0 )
name = "View";
- return new View( parent, name, this );
+ return new View( tqparent, name, this );
}
bool Doc::saveChildren( KoStore* _store )
@@ -530,10 +530,10 @@ bool Doc::completeSaving( KoStore* _store )
}
-QDomDocument Doc::saveXML()
+TQDomDocument Doc::saveXML()
{
//Terminate current cell edition, if any
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
/* don't pull focus away from the editor if this is just a background
autosave */
@@ -543,28 +543,28 @@ QDomDocument Doc::saveXML()
static_cast<View *>( it.current() )->deleteEditor( true );
}
- QDomDocument doc = createDomDocument( "spreadsheet", CURRENT_DTD_VERSION );
- QDomElement spread = doc.documentElement();
+ TQDomDocument doc = createDomDocument( "spreadsheet", CURRENT_DTD_VERSION );
+ TQDomElement spread = doc.documentElement();
spread.setAttribute( "editor", "KSpread" );
spread.setAttribute( "mime", "application/x-kspread" );
spread.setAttribute( "syntaxVersion", CURRENT_SYNTAX_VERSION );
- QDomElement dlocale = ((Locale *)locale())->save( doc );
+ TQDomElement dlocale = ((Locale *)locale())->save( doc );
spread.appendChild( dlocale );
if (d->refs.count() != 0 )
{
- QDomElement areaname = saveAreaName( doc );
+ TQDomElement areaname = saveAreaName( doc );
spread.appendChild( areaname );
}
if( !d->spellListIgnoreAll.isEmpty() )
{
- QDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
+ TQDomElement spellCheckIgnore = doc.createElement( "SPELLCHECKIGNORELIST" );
spread.appendChild( spellCheckIgnore );
- for ( QStringList::Iterator it = d->spellListIgnoreAll.begin(); it != d->spellListIgnoreAll.end(); ++it )
+ for ( TQStringList::Iterator it = d->spellListIgnoreAll.begin(); it != d->spellListIgnoreAll.end(); ++it )
{
- QDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
+ TQDomElement spellElem = doc.createElement( "SPELLCHECKIGNOREWORD" );
spellCheckIgnore.appendChild( spellElem );
spellElem.setAttribute( "word", *it );
}
@@ -579,7 +579,7 @@ QDomDocument Doc::saveXML()
++iter;
}
- QDomElement defaults = doc.createElement( "defaults" );
+ TQDomElement defaults = doc.createElement( "defaults" );
defaults.setAttribute( "row-height", Format::globalRowHeight() );
defaults.setAttribute( "col-width", Format::globalColWidth() );
spread.appendChild( defaults );
@@ -587,14 +587,14 @@ QDomDocument Doc::saveXML()
Plugin * plugin = d->plugins.first();
for ( ; plugin != 0; plugin = d->plugins.next() )
{
- QDomElement data( plugin->saveXML( doc ) );
+ TQDomElement data( plugin->saveXML( doc ) );
if ( !data.isNull() )
spread.appendChild( data );
}
- QDomElement s = styleManager()->save( doc );
+ TQDomElement s = styleManager()->save( doc );
spread.appendChild( s );
- QDomElement e = map()->save( doc );
+ TQDomElement e = map()->save( doc );
spread.appendChild( e );
setModified( false );
@@ -617,11 +617,11 @@ bool Doc::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
}
bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag,
- QString* /*plainText*/, KoPicture* /*picture*/ )
+ TQString* /*plainText*/, KoPicture* /*picture*/ )
{
d->m_pictureCollection.assignUniqueIds();
//Terminate current cell edition, if any
- QPtrListIterator<KoView> it2( views() );
+ TQPtrListIterator<KoView> it2( views() );
d->m_savingWholeDocument = saveFlag == SaveAll ? true : false;
/* don't pull focus away from the editor if this is just a background
@@ -647,8 +647,8 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
}
contentTmpFile.setAutoDelete( true );
- QFile* tmpFile = contentTmpFile.file();
- KoXmlWriter contentTmpWriter( tmpFile, 1 );
+ TQFile* tmpFile = contentTmpFile.file();
+ KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
@@ -684,8 +684,8 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// Done with writing out the contents to the tempfile, we can now write out the automatic styles
contentWriter->startElement( "office:automatic-styles" );
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_AUTO );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( contentWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
@@ -765,7 +765,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
- contentWriter->addCompleteElement( tmpFile );
+ contentWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentTmpFile.close();
@@ -821,7 +821,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
if ( saveFlag == SaveSelected )
{
- QPtrListIterator<EmbeddedObject> it(embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it(embeddedObjects() );
for( ; it.current(); ++it )
{
if ( it.current()->getType() != OBJECT_CHART && it.current()->getType() != OBJECT_KOFFICE_PART )
@@ -841,7 +841,7 @@ bool Doc::saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag
return true;
}
-void Doc::loadOasisSettings( const QDomDocument&settingsDoc )
+void Doc::loadOasisSettings( const TQDomDocument&settingsDoc )
{
KoOasisSettings settings( settingsDoc );
KoOasisSettings::Items viewSettings = settings.itemSet( "view-settings" );
@@ -869,9 +869,9 @@ void Doc::loadOasisIgnoreList( const KoOasisSettings& settings )
KoOasisSettings::Items configurationSettings = settings.itemSet( "configuration-settings" );
if ( !configurationSettings.isNull() )
{
- const QString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
+ const TQString ignorelist = configurationSettings.parseConfigItemString( "SpellCheckerIgnoreList" );
//kdDebug()<<" ignorelist :"<<ignorelist<<endl;
- d->spellListIgnoreAll = QStringList::split( ',', ignorelist );
+ d->spellListIgnoreAll = TQStringList::split( ',', ignorelist );
}
}
@@ -882,8 +882,8 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
KoXmlWriter* stylesWriter = createOasisXmlWriter( &stylesDev, "office:document-styles" );
stylesWriter->startElement( "office:styles" );
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( KoGenStyle::STYLE_USER );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
(*it).style->writeStyle( stylesWriter, mainStyles, "style:style", (*it).name, "style:paragraph-properties" );
}
@@ -941,7 +941,7 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
styles = mainStyles.styles( KoGenStyle::STYLE_PAGELAYOUT );
it = styles.begin();
for ( ; it != styles.end() ; ++it ) {
- (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-layout", (*it).name, "style:page-layout-properties", false /*don't close*/ );
+ (*it).style->writeStyle( stylesWriter, mainStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties", false /*don't close*/ );
stylesWriter->endElement();
}
@@ -963,12 +963,12 @@ void Doc::saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) con
delete stylesWriter;;
}
-bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* store)
+bool Doc::loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* store)
{
if ( !d->m_loadingInfo )
d->m_loadingInfo = new KSPLoadingInfo;
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
@@ -977,28 +977,28 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
d->refs.clear();
- QDomElement content = doc.documentElement();
- QDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
+ TQDomElement content = doc.documentElement();
+ TQDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
if ( realBody.isNull() )
{
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No office:body tag found." ));
deleteLoadingInfo();
return false;
}
- QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
+ TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
if ( body.isNull() )
{
kdError(32001) << "No office:spreadsheet found!" << endl;
- QDomElement childElem;
- QString localName;
+ TQDomElement childElem;
+ TQString localName;
forEachElement( childElem, realBody ) {
localName = childElem.localName();
}
if ( localName.isEmpty() )
setErrorMessage( i18n( "Invalid OASIS OpenDocument file. No tag found inside office:body." ) );
else
- setErrorMessage( i18n( "This document is not a spreadsheet, but %1. Please try opening it with the appropriate application." ).arg( KoDocument::tagNameToDocumentType( localName ) ) );
+ setErrorMessage( i18n( "This document is not a spreadsheet, but %1. Please try opening it with the appropriate application." ).tqarg( KoDocument::tagNameToDocumentType( localName ) ) );
deleteLoadingInfo();
return false;
}
@@ -1009,7 +1009,7 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
styleManager()->loadOasisStyleTemplate( oasisStyles );
// load default column style
- const QDomElement* defaultColumnStyle = oasisStyles.defaultStyle( "table-column" );
+ const TQDomElement* defaultColumnStyle = oasisStyles.defaultStyle( "table-column" );
if ( defaultColumnStyle )
{
// kDebug() << "style:default-style style:family=\"table-column\"" << endl;
@@ -1028,7 +1028,7 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
}
// load default row style
- const QDomElement* defaultRowStyle = oasisStyles.defaultStyle( "table-row" );
+ const TQDomElement* defaultRowStyle = oasisStyles.defaultStyle( "table-row" );
if ( defaultRowStyle )
{
// kDebug() << "style:default-style style:family=\"table-row\"" << endl;
@@ -1072,21 +1072,21 @@ bool Doc::loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const
return true;
}
-bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
+bool Doc::loadXML( TQIODevice *, const TQDomDocument& doc )
{
- QTime dt;
+ TQTime dt;
dt.start();
emit sigProgress( 0 );
d->isLoading = true;
d->spellListIgnoreAll.clear();
// <spreadsheet>
- QDomElement spread = doc.documentElement();
+ TQDomElement spread = doc.documentElement();
if ( spread.attribute( "mime" ) != "application/x-kspread" && spread.attribute( "mime" ) != "application/vnd.kde.kspread" )
{
d->isLoading = false;
- setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kspread or application/vnd.kde.kspread, got %1" ).arg( spread.attribute("mime") ) );
+ setErrorMessage( i18n( "Invalid document. Expected mimetype application/x-kspread or application/vnd.kde.kspread, got %1" ).tqarg( spread.attribute("mime") ) );
return false;
}
@@ -1095,7 +1095,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
{
int ret = KMessageBox::warningContinueCancel(
0, i18n("This document was created with a newer version of KSpread (syntax version: %1)\n"
- "When you open it with this version of KSpread, some information may be lost.").arg(d->syntaxVersion),
+ "When you open it with this version of KSpread, some information may be lost.").tqarg(d->syntaxVersion),
i18n("File Format Mismatch"), KStdGuiItem::cont() );
if ( ret == KMessageBox::Cancel )
{
@@ -1105,13 +1105,13 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
}
// <locale>
- QDomElement loc = spread.namedItem( "locale" ).toElement();
+ TQDomElement loc = spread.namedItem( "locale" ).toElement();
if ( !loc.isNull() )
((Locale *) locale())->load( loc );
emit sigProgress( 5 );
- QDomElement defaults = spread.namedItem( "defaults" ).toElement();
+ TQDomElement defaults = spread.namedItem( "defaults" ).toElement();
if ( !defaults.isNull() )
{
bool ok = false;
@@ -1130,14 +1130,14 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
d->refs.clear();
//<areaname >
- QDomElement areaname = spread.namedItem( "areaname" ).toElement();
+ TQDomElement areaname = spread.namedItem( "areaname" ).toElement();
if ( !areaname.isNull())
loadAreaName(areaname);
- QDomElement ignoreAll = spread.namedItem( "SPELLCHECKIGNORELIST").toElement();
+ TQDomElement ignoreAll = spread.namedItem( "SPELLCHECKIGNORELIST").toElement();
if ( !ignoreAll.isNull())
{
- QDomElement spellWord=spread.namedItem("SPELLCHECKIGNORELIST").toElement();
+ TQDomElement spellWord=spread.namedItem("SPELLCHECKIGNORELIST").toElement();
spellWord=spellWord.firstChild().toElement();
while ( !spellWord.isNull() )
@@ -1154,7 +1154,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
// In case of reload (e.g. from konqueror)
map()->sheetList().clear(); // it's set to autoDelete
- QDomElement styles = spread.namedItem( "styles" ).toElement();
+ TQDomElement styles = spread.namedItem( "styles" ).toElement();
if ( !styles.isNull() )
{
if ( !styleManager()->loadXML( styles ) )
@@ -1166,7 +1166,7 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
}
// <map>
- QDomElement mymap = spread.namedItem( "map" ).toElement();
+ TQDomElement mymap = spread.namedItem( "map" ).toElement();
if ( mymap.isNull() )
{
setErrorMessage( i18n("Invalid document. No map tag.") );
@@ -1179,10 +1179,10 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
return false;
}
- //Backwards compatibility with older versions for paper layout
+ //Backwards compatibility with older versions for paper tqlayout
if ( d->syntaxVersion < 1 )
{
- QDomElement paper = spread.namedItem( "paper" ).toElement();
+ TQDomElement paper = spread.namedItem( "paper" ).toElement();
if ( !paper.isNull() )
{
loadPaper( paper );
@@ -1191,10 +1191,10 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
emit sigProgress( 85 );
- QDomElement element( spread.firstChild().toElement() );
+ TQDomElement element( spread.firstChild().toElement() );
while ( !element.isNull() )
{
- QString tagName( element.tagName() );
+ TQString tagName( element.tagName() );
if ( tagName != "locale" && tagName != "map" && tagName != "styles"
&& tagName != "SPELLCHECKIGNORELIST" && tagName != "areaname"
@@ -1218,14 +1218,14 @@ bool Doc::loadXML( QIODevice *, const QDomDocument& doc )
return true;
}
-void Doc::loadPaper( QDomElement const & paper )
+void Doc::loadPaper( TQDomElement const & paper )
{
// <paper>
- QString format = paper.attribute( "format" );
- QString orientation = paper.attribute( "orientation" );
+ TQString format = paper.attribute( "format" );
+ TQString orientation = paper.attribute( "orientation" );
// <borders>
- QDomElement borders = paper.namedItem( "borders" ).toElement();
+ TQDomElement borders = paper.namedItem( "borders" ).toElement();
if ( !borders.isNull() )
{
float left = borders.attribute( "left" ).toFloat();
@@ -1234,7 +1234,7 @@ void Doc::loadPaper( QDomElement const & paper )
float bottom = borders.attribute( "bottom" ).toFloat();
//apply to all sheet
- QPtrListIterator<Sheet> it ( map()->sheetList() );
+ TQPtrListIterator<Sheet> it ( map()->sheetList() );
for( ; it.current(); ++it )
{
it.current()->print()->setPaperLayout( left, top, right, bottom,
@@ -1242,45 +1242,45 @@ void Doc::loadPaper( QDomElement const & paper )
}
}
- QString hleft, hright, hcenter;
- QString fleft, fright, fcenter;
+ TQString hleft, hright, hcenter;
+ TQString fleft, fright, fcenter;
// <head>
- QDomElement head = paper.namedItem( "head" ).toElement();
+ TQDomElement head = paper.namedItem( "head" ).toElement();
if ( !head.isNull() )
{
- QDomElement left = head.namedItem( "left" ).toElement();
+ TQDomElement left = head.namedItem( "left" ).toElement();
if ( !left.isNull() )
hleft = left.text();
- QDomElement center = head.namedItem( "center" ).toElement();
+ TQDomElement center = head.namedItem( "center" ).toElement();
if ( !center.isNull() )
hcenter = center.text();
- QDomElement right = head.namedItem( "right" ).toElement();
+ TQDomElement right = head.namedItem( "right" ).toElement();
if ( !right.isNull() )
hright = right.text();
}
// <foot>
- QDomElement foot = paper.namedItem( "foot" ).toElement();
+ TQDomElement foot = paper.namedItem( "foot" ).toElement();
if ( !foot.isNull() )
{
- QDomElement left = foot.namedItem( "left" ).toElement();
+ TQDomElement left = foot.namedItem( "left" ).toElement();
if ( !left.isNull() )
fleft = left.text();
- QDomElement center = foot.namedItem( "center" ).toElement();
+ TQDomElement center = foot.namedItem( "center" ).toElement();
if ( !center.isNull() )
fcenter = center.text();
- QDomElement right = foot.namedItem( "right" ).toElement();
+ TQDomElement right = foot.namedItem( "right" ).toElement();
if ( !right.isNull() )
fright = right.text();
}
//The macro "<sheet>" formerly was typed as "<table>"
- hleft = hleft.replace( "<table>", "<sheet>" );
- hcenter = hcenter.replace( "<table>", "<sheet>" );
- hright = hright.replace( "<table>", "<sheet>" );
- fleft = fleft.replace( "<table>", "<sheet>" );
- fcenter = fcenter.replace( "<table>", "<sheet>" );
- fright = fright.replace( "<table>", "<sheet>" );
-
- QPtrListIterator<Sheet> it ( map()->sheetList() );
+ hleft = hleft.tqreplace( "<table>", "<sheet>" );
+ hcenter = hcenter.tqreplace( "<table>", "<sheet>" );
+ hright = hright.tqreplace( "<table>", "<sheet>" );
+ fleft = fleft.tqreplace( "<table>", "<sheet>" );
+ fcenter = fcenter.tqreplace( "<table>", "<sheet>" );
+ fright = fright.tqreplace( "<table>", "<sheet>" );
+
+ TQPtrListIterator<Sheet> it ( map()->sheetList() );
for( ; it.current(); ++it )
{
it.current()->print()->setHeadFootLine( hleft, hcenter, hright,
@@ -1296,7 +1296,7 @@ bool Doc::completeLoading( KoStore* /* _store */ )
// map()->update();
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->initialPosition();
@@ -1317,9 +1317,9 @@ void Doc::deregisterPlugin( Plugin * plugin )
d->plugins.remove( plugin );
}
-bool Doc::docData( QString const & xmlTag, QDomElement & data )
+bool Doc::docData( TQString const & xmlTag, TQDomElement & data )
{
- SavedDocParts::iterator iter = m_savedDocParts.find( xmlTag );
+ SavedDocParts::iterator iter = m_savedDocParts.tqfind( xmlTag );
if ( iter == m_savedDocParts.end() )
return false;
@@ -1374,12 +1374,12 @@ bool Doc::showRowHeader() const
return d->rowHeader;
}
-void Doc::setGridColor( const QColor& color )
+void Doc::setGridColor( const TQColor& color )
{
d->gridColor = color;
}
-QColor Doc::gridColor() const
+TQColor Doc::gridColor() const
{
return d->gridColor;
}
@@ -1517,7 +1517,7 @@ void Doc::setDontCheckTitleCase( bool b )
d->dontCheckTitleCase = b;
}
-QString Doc::unitName() const
+TQString Doc::unitName() const
{
return KoUnit::unitName( unit() );
}
@@ -1532,12 +1532,12 @@ void Doc::decreaseNumOperation()
--d->numOperations;
}
-void Doc::addIgnoreWordAllList( const QStringList & _lst)
+void Doc::addIgnoreWordAllList( const TQStringList & _lst)
{
d->spellListIgnoreAll = _lst;
}
-QStringList Doc::spellListIgnoreAll() const
+TQStringList Doc::spellListIgnoreAll() const
{
return d->spellListIgnoreAll;
}
@@ -1549,7 +1549,7 @@ void Doc::setZoomAndResolution( int zoom, int dpiX, int dpiY )
void Doc::newZoomAndResolution( bool updateViews, bool /*forPrint*/ )
{
-/* layout();
+/* tqlayout();
updateAllFrames();*/
if ( updateViews )
{
@@ -1618,19 +1618,19 @@ KoCommandHistory* Doc::commandHistory()
void Doc::enableUndo( bool _b )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->enableUndo( _b );
}
void Doc::enableRedo( bool _b )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->enableRedo( _b );
}
-void Doc::paintContent( QPainter& painter, const QRect& rect,
+void Doc::paintContent( TQPainter& painter, const TQRect& rect,
bool transparent, double zoomX, double /*zoomY*/ )
{
kdDebug(36001) << "paintContent() called on " << rect << endl;
@@ -1656,12 +1656,12 @@ void Doc::paintContent( QPainter& painter, const QRect& rect,
if ( m_zoomedResolutionX != zoomX )
d_zoom *= ( zoomX / m_zoomedResolutionX );
- // KSpread support zoom, therefore no need to scale with worldMatrix
- QWMatrix matrix = painter.worldMatrix();
+ // KSpread support zoom, therefore no need to scale with tqworldMatrix
+ TQWMatrix matrix = painter.tqworldMatrix();
matrix.setMatrix( 1, 0, 0, 1, matrix.dx(), matrix.dy() );
- QRect prect = rect;
- prect.setWidth( (int) (prect.width() * painter.worldMatrix().m11()) );
- prect.setHeight( (int) (prect.height() * painter.worldMatrix().m22()) );
+ TQRect prect = rect;
+ prect.setWidth( (int) (prect.width() * painter.tqworldMatrix().m11()) );
+ prect.setHeight( (int) (prect.height() * painter.tqworldMatrix().m22()) );
setZoomAndResolution( (int) ( d_zoom * 100 ), KoGlobal::dpiX(), KoGlobal::dpiY() );
// paint the content, now zoom is correctly set
kdDebug(36001)<<"paintContent-------------------------------------\n";
@@ -1675,7 +1675,7 @@ void Doc::paintContent( QPainter& painter, const QRect& rect,
setZoomAndResolution( oldZoom, KoGlobal::dpiX(), KoGlobal::dpiY() );
}
-void Doc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/, Sheet* sheet, bool drawCursor )
+void Doc::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/, Sheet* sheet, bool drawCursor )
{
if ( isLoading() )
return;
@@ -1690,13 +1690,13 @@ void Doc::paintContent( QPainter& painter, const QRect& rect, bool /*transparent
int right_col = sheet->rightColumn( unzoomItX( rect.right() ) );
int top_row = sheet->topRow( unzoomItY( rect.y() ), ypos );
int bottom_row = sheet->bottomRow( unzoomItY( rect.bottom() ) );
- QPen pen;
+ TQPen pen;
pen.setWidth( 1 );
painter.setPen( pen );
/* Update the entire visible area. */
- QValueList<QRect> cellAreaList;
- cellAreaList.append( QRect( left_col,
+ TQValueList<TQRect> cellAreaList;
+ cellAreaList.append( TQRect( left_col,
top_row,
right_col - left_col + 1,
bottom_row - top_row + 1) );
@@ -1708,7 +1708,7 @@ void Doc::paintUpdates()
{
// ElapsedTime et( "Doc::paintUpdates" );
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
View * view = NULL;
Sheet * sheet = NULL;
@@ -1725,20 +1725,20 @@ void Doc::paintUpdates()
}
}
-void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
+void Doc::paintCellRegions(TQPainter& painter, const TQRect &viewRect,
View* view,
- QValueList<QRect> cellRegions,
+ TQValueList<TQRect> cellRegions,
const Sheet* sheet, bool /*drawCursor*/)
{
//
- // Clip away children
+ // Clip away tqchildren
//
- QRegion rgn = painter.clipRegion();
+ TQRegion rgn = painter.clipRegion();
if ( rgn.isEmpty() )
- rgn = QRegion( QRect( 0, 0, viewRect.width(), viewRect.height() ) );
+ rgn = TQRegion( TQRect( 0, 0, viewRect.width(), viewRect.height() ) );
- QWMatrix matrix;
+ TQWMatrix matrix;
if ( view ) {
matrix.scale( zoomedResolutionX(),
zoomedResolutionY() );
@@ -1746,10 +1746,10 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
- view->canvasWidget()->yOffset() );
}
else {
- matrix = painter.worldMatrix();
+ matrix = painter.tqworldMatrix();
}
-// QPtrListIterator<KoDocumentChild> it( children() );
+// TQPtrListIterator<KoDocumentChild> it( tqchildren() );
// for( ; it.current(); ++it ) {
// // if ( ((Child*)it.current())->sheet() == sheet &&
// // !m_pView->hasDocumentInWindow( it.current()->document() ) )
@@ -1758,11 +1758,11 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
// }
painter.setClipRegion( rgn );
- QPen pen;
+ TQPen pen;
pen.setWidth( 1 );
painter.setPen( pen );
- QRect cellRegion;
+ TQRect cellRegion;
KoRect unzoomedViewRect = unzoomRect( viewRect );
for (unsigned int i=0; i < cellRegions.size(); i++) {
@@ -1773,8 +1773,8 @@ void Doc::paintCellRegions(QPainter& painter, const QRect &viewRect,
}
-void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
- View* view, const QRect &paintRegion,
+void Doc::PaintRegion(TQPainter &painter, const KoRect &viewRegion,
+ View* view, const TQRect &paintRegion,
const Sheet* sheet)
{
// Paint region has cell coordinates (col,row) while viewRegion has
@@ -1807,7 +1807,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
int regionLeft = paintRegion.left();
int regionTop = paintRegion.top();
- QValueList<QPoint> mergedCellsPainted;
+ TQValueList<TQPoint> mergedCellsPainted;
for ( int y = regionTop;
y <= regionBottom && dblCurrentCellPos.y() <= viewRegion.bottom();
++y )
@@ -1822,7 +1822,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
const ColumnFormat *col_lay = sheet->columnFormat( x );
Cell* cell = sheet->cellAt( x, y );
- QPoint cellRef( x, y );
+ TQPoint cellRef( x, y );
#if 0
bool paintBordersBottom = false;
@@ -1832,10 +1832,10 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
#endif
int paintBorder = Cell::Border_None;
- QPen rightPen( cell->effRightBorderPen( x, y ) );
- QPen leftPen( cell->effLeftBorderPen( x, y ) );
- QPen topPen( cell->effTopBorderPen( x, y ) );
- QPen bottomPen( cell->effBottomBorderPen( x, y ) );
+ TQPen rightPen( cell->effRightBorderPen( x, y ) );
+ TQPen leftPen( cell->effLeftBorderPen( x, y ) );
+ TQPen topPen( cell->effTopBorderPen( x, y ) );
+ TQPen bottomPen( cell->effBottomBorderPen( x, y ) );
// Paint border if outermost cell or if the pen is more "worth"
// than the border pen of the cell on the other side of the
@@ -1916,7 +1916,7 @@ void Doc::PaintRegion(QPainter &painter, const KoRect &viewRegion,
mergedCellsPainted, false );
Cell::BorderSides highlightBorder=Cell::Border_None;
- QPen highlightPen;
+ TQPen highlightPen;
#endif
cell->paintCell( viewRegion, painter, view, dblCurrentCellPos, cellRef,
@@ -1940,7 +1940,7 @@ DCOPObject* Doc::dcopObject()
return d->dcop;
}
-void Doc::addAreaName(const QRect &_rect,const QString & name,const QString & sheetName)
+void Doc::addAreaName(const TQRect &_rect,const TQString & name,const TQString & sheetName)
{
setModified( true );
Reference tmp;
@@ -1951,9 +1951,9 @@ void Doc::addAreaName(const QRect &_rect,const QString & name,const QString & sh
emit sig_addAreaName( name );
}
-void Doc::removeArea( const QString & name)
+void Doc::removeArea( const TQString & name)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).ref_name==name)
@@ -1965,9 +1965,9 @@ void Doc::removeArea( const QString & name)
}
}
-void Doc::changeAreaSheetName(const QString & oldName,const QString & sheetName)
+void Doc::changeAreaSheetName(const TQString & oldName,const TQString & sheetName)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).sheet_name==oldName)
@@ -1975,9 +1975,9 @@ void Doc::changeAreaSheetName(const QString & oldName,const QString & sheetName)
}
}
-QRect Doc::getRectArea(const QString &_sheetName)
+TQRect Doc::getRectArea(const TQString &_sheetName)
{
- QValueList<Reference>::Iterator it2;
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
if((*it2).ref_name==_sheetName)
@@ -1985,25 +1985,25 @@ QRect Doc::getRectArea(const QString &_sheetName)
return (*it2).rect;
}
}
- return QRect(-1,-1,-1,-1);
+ return TQRect(-1,-1,-1,-1);
}
-QDomElement Doc::saveAreaName( QDomDocument& doc )
+TQDomElement Doc::saveAreaName( TQDomDocument& doc )
{
- QDomElement element = doc.createElement( "areaname" );
- QValueList<Reference>::Iterator it2;
+ TQDomElement element = doc.createElement( "areaname" );
+ TQValueList<Reference>::Iterator it2;
for ( it2 = d->refs.begin(); it2 != d->refs.end(); ++it2 )
{
- QDomElement e = doc.createElement("reference");
- QDomElement tabname = doc.createElement( "tabname" );
+ TQDomElement e = doc.createElement("reference");
+ TQDomElement tabname = doc.createElement( "tabname" );
tabname.appendChild( doc.createTextNode( (*it2).sheet_name ) );
e.appendChild( tabname );
- QDomElement refname = doc.createElement( "refname" );
+ TQDomElement refname = doc.createElement( "refname" );
refname.appendChild( doc.createTextNode( (*it2).ref_name ) );
e.appendChild( refname );
- QDomElement rect = doc.createElement( "rect" );
+ TQDomElement rect = doc.createElement( "rect" );
rect.setAttribute( "left-rect", ((*it2).rect).left() );
rect.setAttribute( "right-rect",((*it2).rect).right() );
rect.setAttribute( "top-rect", ((*it2).rect).top() );
@@ -2014,23 +2014,23 @@ QDomElement Doc::saveAreaName( QDomDocument& doc )
return element;
}
-void Doc::loadOasisCellValidation( const QDomElement&body )
+void Doc::loadOasisCellValidation( const TQDomElement&body )
{
- QDomNode validation = KoDom::namedItemNS( body, KoXmlNS::table, "content-validations" );
- kdDebug()<<"void Doc::loadOasisCellValidation( const QDomElement&body ) \n";
+ TQDomNode validation = KoDom::namedItemNS( body, KoXmlNS::table, "content-validations" );
+ kdDebug()<<"void Doc::loadOasisCellValidation( const TQDomElement&body ) \n";
kdDebug()<<"validation.isNull ? "<<validation.isNull()<<endl;
if ( !validation.isNull() )
{
- QDomNode n = validation.firstChild();
+ TQDomNode n = validation.firstChild();
for( ; !n.isNull(); n = n.nextSibling() )
{
if ( n.isElement() )
{
- QDomElement element = n.toElement();
+ TQDomElement element = n.toElement();
//kdDebug()<<" loadOasisCellValidation element.tagName() :"<<element.tagName()<<endl;
if ( element.tagName() == "content-validation" && element.namespaceURI() == KoXmlNS::table ) {
- d->m_loadingInfo->appendValidation(element.attributeNS( KoXmlNS::table, "name", QString::null ), element );
- kdDebug()<<" validation found :"<<element.attributeNS( KoXmlNS::table, "name", QString::null )<<endl;
+ d->m_loadingInfo->appendValidation(element.attributeNS( KoXmlNS::table, "name", TQString() ), element );
+ kdDebug()<<" validation found :"<<element.attributeNS( KoXmlNS::table, "name", TQString() )<<endl;
}
else {
kdDebug()<<" Tag not recognize :"<<element.tagName()<<endl;
@@ -2045,7 +2045,7 @@ void Doc::saveOasisAreaName( KoXmlWriter & xmlWriter )
if ( listArea().count()>0 )
{
xmlWriter.startElement( "table:named-expressions" );
- QValueList<Reference>::Iterator it;
+ TQValueList<Reference>::Iterator it;
for ( it = d->refs.begin(); it != d->refs.end(); ++it )
{
xmlWriter.startElement( "table:named-range" );
@@ -2060,17 +2060,17 @@ void Doc::saveOasisAreaName( KoXmlWriter & xmlWriter )
}
}
-void Doc::loadOasisAreaName( const QDomElement& body )
+void Doc::loadOasisAreaName( const TQDomElement& body )
{
- kdDebug()<<"void Doc::loadOasisAreaName( const QDomElement& body ) \n";
- QDomNode namedAreas = KoDom::namedItemNS( body, KoXmlNS::table, "named-expressions" );
+ kdDebug()<<"void Doc::loadOasisAreaName( const TQDomElement& body ) \n";
+ TQDomNode namedAreas = KoDom::namedItemNS( body, KoXmlNS::table, "named-expressions" );
if ( !namedAreas.isNull() )
{
kdDebug()<<" area name exist \n";
- QDomNode area = namedAreas.firstChild();
+ TQDomNode area = namedAreas.firstChild();
while ( !area.isNull() )
{
- QDomElement e = area.toElement();
+ TQDomElement e = area.toElement();
if ( e.localName() == "named-range" )
{
@@ -2082,26 +2082,26 @@ void Doc::loadOasisAreaName( const QDomElement& body )
}
// TODO: what is: sheet:base-cell-address
- QString name = e.attributeNS( KoXmlNS::table, "name", QString::null );
- QString range = e.attributeNS( KoXmlNS::table, "cell-range-address", QString::null );
+ TQString name = e.attributeNS( KoXmlNS::table, "name", TQString() );
+ TQString range = e.attributeNS( KoXmlNS::table, "cell-range-address", TQString() );
kdDebug()<<"area name : "<<name<<" range :"<<range<<endl;
d->m_loadingInfo->addWordInAreaList( name );
kdDebug() << "Reading in named area, name: " << name << ", area: " << range << endl;
range = Oasis::decodeFormula( range );
- if ( range.find( ':' ) == -1 )
+ if ( range.tqfind( ':' ) == -1 )
{
Point p( range );
- int n = range.find( '!' );
+ int n = range.tqfind( '!' );
if ( n > 0 )
range = range + ":" + range.right( range.length() - n - 1);
kdDebug() << "=> Area: " << range << endl;
}
- if ( range.contains( '!' ) && range[0] == '$' )
+ if ( range.tqcontains( '!' ) && range[0] == '$' )
{
// cut absolute sheet indicator
range.remove( 0, 1 );
@@ -2123,30 +2123,30 @@ void Doc::loadOasisAreaName( const QDomElement& body )
}
}
-void Doc::loadAreaName( const QDomElement& element )
+void Doc::loadAreaName( const TQDomElement& element )
{
- QDomElement tmp=element.firstChild().toElement();
+ TQDomElement tmp=element.firstChild().toElement();
for( ; !tmp.isNull(); tmp=tmp.nextSibling().toElement() )
{
if ( tmp.tagName() == "reference" )
{
- QString tabname;
- QString refname;
+ TQString tabname;
+ TQString refname;
int left=0;
int right=0;
int top=0;
int bottom=0;
- QDomElement sheetName = tmp.namedItem( "tabname" ).toElement();
+ TQDomElement sheetName = tmp.namedItem( "tabname" ).toElement();
if ( !sheetName.isNull() )
{
tabname=sheetName.text();
}
- QDomElement referenceName = tmp.namedItem( "refname" ).toElement();
+ TQDomElement referenceName = tmp.namedItem( "refname" ).toElement();
if ( !referenceName.isNull() )
{
refname=referenceName.text();
}
- QDomElement rect =tmp.namedItem( "rect" ).toElement();
+ TQDomElement rect =tmp.namedItem( "rect" ).toElement();
if (!rect.isNull())
{
bool ok;
@@ -2159,16 +2159,16 @@ void Doc::loadAreaName( const QDomElement& element )
if ( rect.hasAttribute( "bottom-rect" ) )
bottom=rect.attribute("bottom-rect").toInt( &ok );
}
- QRect _rect;
+ TQRect _rect;
_rect.setCoords(left,top,right,bottom);
addAreaName(_rect,refname,tabname);
}
}
}
-void Doc::addStringCompletion(const QString &stringCompletion)
+void Doc::addStringCompletion(const TQString &stringCompletion)
{
- if ( d->listCompletion.items().contains(stringCompletion) == 0 )
+ if ( d->listCompletion.items().tqcontains(stringCompletion) == 0 )
d->listCompletion.addItem( stringCompletion );
}
@@ -2190,17 +2190,17 @@ void Doc::emitBeginOperation(bool waitCursor)
//
//The reason being that any operations started before the first one with waitCursor set
//are expected to be completed in a short time anyway.
- QCursor* activeOverride = QApplication::overrideCursor();
+ TQCursor* activeOverride = static_cast<TQCursor*>(TQApplication::overrideCursor());
- if (waitCursor && ( (!activeOverride) || (activeOverride->shape() != Qt::waitCursor.shape()) ) )
+ if (waitCursor && ( (!activeOverride) || (activeOverride->tqshape() != TQt::waitCursor.tqshape()) ) )
{
- QApplication::setOverrideCursor(Qt::waitCursor);
+ TQApplication::setOverrideCursor(TQt::waitCursor);
}
// /* just duplicate the current cursor on the stack, then */
-// else if (QApplication::overrideCursor() != NULL)
+// else if (TQApplication::overrideCursor() != NULL)
// {
-// QApplication::setOverrideCursor(QApplication::overrideCursor()->shape());
+// TQApplication::setOverrideCursor(TQApplication::overrideCursor()->tqshape());
// }
KoDocument::emitBeginOperation();
@@ -2228,9 +2228,9 @@ void Doc::emitEndOperation()
if (d->numOperations == 0)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- /* do this after the parent class emitEndOperation because that allows updates
+ /* do this after the tqparent class emitEndOperation because that allows updates
on the view again
*/
paintUpdates();
@@ -2252,9 +2252,9 @@ void Doc::emitEndOperation( const Region& /*region*/ )
KoDocument::emitEndOperation();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- /* do this after the parent class emitEndOperation because that allows updates
+ /* do this after the tqparent class emitEndOperation because that allows updates
on the view again
*/
paintUpdates();
@@ -2267,28 +2267,28 @@ bool Doc::delayCalculation() const
void Doc::updateBorderButton()
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
static_cast<View *>( it.current() )->updateBorderButton();
}
void Doc::insertSheet( Sheet * sheet )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->insertSheet( sheet );
}
void Doc::takeSheet( Sheet * sheet )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->removeSheet( sheet );
}
-void Doc::addIgnoreWordAll( const QString & word)
+void Doc::addIgnoreWordAll( const TQString & word)
{
- if( d->spellListIgnoreAll.findIndex( word )==-1)
+ if( d->spellListIgnoreAll.tqfindIndex( word )==-1)
d->spellListIgnoreAll.append( word );
}
@@ -2321,7 +2321,7 @@ Sheet * Doc::displaySheet() const
void Doc::addView( KoView *_view )
{
KoDocument::addView( _view );
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for (; it.current(); ++it )
((View*)it.current())->closeEditor();
}
@@ -2331,13 +2331,13 @@ void Doc::addDamage( Damage* damage )
d->damages.append( damage );
if( d->damages.count() == 1 )
- QTimer::singleShot( 0, this, SLOT( flushDamages() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( flushDamages() ) );
}
void Doc::flushDamages()
{
emit damagesFlushed( d->damages );
- QValueList<Damage*>::Iterator it;
+ TQValueList<Damage*>::Iterator it;
for( it = d->damages.begin(); it != d->damages.end(); ++it )
delete *it;
d->damages.clear();
@@ -2369,7 +2369,7 @@ void Doc::insertObject( EmbeddedObject * obj )
d->m_embeddedObjects.append( obj );
}
-QPtrList<EmbeddedObject>& Doc::embeddedObjects()
+TQPtrList<EmbeddedObject>& Doc::embeddedObjects()
{
return d->m_embeddedObjects;
}
@@ -2379,35 +2379,35 @@ KoPictureCollection *Doc::pictureCollection()
return &d->m_pictureCollection;
}
-void Doc::repaint( const QRect& rect )
+void Doc::tqrepaint( const TQRect& rect )
{
- QRect r;
- QPtrListIterator<KoView> it( views() );
+ TQRect r;
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
r = rect;
Canvas* canvas = ((View*)it.current())->canvasWidget();
- r.moveTopLeft( QPoint( r.x() - (int) canvas->xOffset(),
+ r.moveTopLeft( TQPoint( r.x() - (int) canvas->xOffset(),
r.y() - (int) canvas->yOffset() ) );
canvas->update( r );
}
}
-void Doc::repaint( EmbeddedObject *obj )
+void Doc::tqrepaint( EmbeddedObject *obj )
{
- QPtrListIterator<KoView> it( views() );
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
Canvas* canvas = ((View*)it.current())->canvasWidget();
if ( obj->sheet() == canvas->activeSheet() )
- canvas->repaintObject( obj );
+ canvas->tqrepaintObject( obj );
}
}
-void Doc::repaint( const KoRect& rect )
+void Doc::tqrepaint( const KoRect& rect )
{
- QRect r;
- QPtrListIterator<KoView> it( views() );
+ TQRect r;
+ TQPtrListIterator<KoView> it( views() );
for( ; it.current(); ++it )
{
Canvas* canvas = ((View*)it.current())->canvasWidget();
@@ -2421,7 +2421,7 @@ void Doc::repaint( const KoRect& rect )
void Doc::addShell( KoMainWindow *shell )
{
- connect( shell, SIGNAL( documentSaved() ), d->commandHistory, SLOT( documentSaved() ) );
+ connect( shell, TQT_SIGNAL( documentSaved() ), d->commandHistory, TQT_SLOT( documentSaved() ) );
KoDocument::addShell( shell );
}
@@ -2438,14 +2438,14 @@ void Doc::setUndoRedoLimit(int val)
void Doc::insertPixmapKey( KoPictureKey key )
{
- if ( !d->usedPictures.contains( key ) )
+ if ( !d->usedPictures.tqcontains( key ) )
d->usedPictures.append( key );
}
void Doc::makeUsedPixmapList()
{
d->usedPictures.clear();
- QPtrListIterator<EmbeddedObject> it( d->m_embeddedObjects );
+ TQPtrListIterator<EmbeddedObject> it( d->m_embeddedObjects );
for ( ; it.current() ; ++it )
{
if( it.current()->getType() == OBJECT_PICTURE && ( d->m_savingWholeDocument || it.current()->isSelected() ) )
diff --git a/kspread/kspread_doc.h b/kspread/kspread_doc.h
index e1bd50e4..f4cca795 100644
--- a/kspread/kspread_doc.h
+++ b/kspread/kspread_doc.h
@@ -28,12 +28,12 @@
#ifndef KSPREAD_DOC
#define KSPREAD_DOC
-#include <qmap.h>
-#include <qobject.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kcompletion.h>
@@ -54,7 +54,7 @@ class KoStore;
class KoXmlWriter;
class DCOPObject;
-class QDomDocument;
+class TQDomDocument;
class KSpellConfig;
#define MIME_TYPE "application/x-kspread"
@@ -78,9 +78,9 @@ class EmbeddedObject;
struct Reference
{
- QString sheet_name;
- QString ref_name;
- QRect rect;
+ TQString sheet_name;
+ TQString ref_name;
+ TQRect rect;
};
class Plugin
@@ -88,7 +88,7 @@ class Plugin
public:
Plugin() {}
virtual ~Plugin() {}
- virtual QDomElement saveXML( QDomDocument & doc ) const = 0;
+ virtual TQDomElement saveXML( TQDomDocument & doc ) const = 0;
};
/**
@@ -97,29 +97,30 @@ class Plugin
class KSPREAD_EXPORT Doc : public KoDocument, public KoZoomHandler
{
Q_OBJECT
- Q_PROPERTY( bool getShowRowHeader READ getShowRowHeader )
- Q_PROPERTY( bool getShowColHeader READ getShowColHeader )
- Q_PROPERTY( double getIndentValue READ getIndentValue WRITE setIndentValue )
- Q_PROPERTY( bool getShowMessageError READ getShowMessageError WRITE setShowMessageError)
- Q_PROPERTY( bool dontCheckUpperWord READ dontCheckUpperWord WRITE setDontCheckUpperWord)
- Q_PROPERTY( bool dontCheckTitleCase READ dontCheckTitleCase WRITE setDontCheckTitleCase)
-
- Q_PROPERTY( int syntaxVersion READ syntaxVersion )
- Q_PROPERTY( bool showVerticalScrollBar READ showVerticalScrollBar WRITE setShowVerticalScrollBar )
- Q_PROPERTY( bool showHorizontalScrollBar READ showHorizontalScrollBar WRITE setShowHorizontalScrollBar )
- Q_PROPERTY( bool showColumnHeader READ showColumnHeader WRITE setShowColumnHeader )
- Q_PROPERTY( bool showRowHeader READ showRowHeader WRITE setShowRowHeader )
- Q_PROPERTY( bool showStatusBar READ showStatusBar WRITE setShowStatusBar )
- Q_PROPERTY( bool showFormulaBar READ showFormulaBar WRITE setShowFormulaBar )
- Q_PROPERTY( bool showTabBar READ showTabBar WRITE setShowTabBar )
- Q_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
+ TQ_OBJECT
+ TQ_PROPERTY( bool getShowRowHeader READ getShowRowHeader )
+ TQ_PROPERTY( bool getShowColHeader READ getShowColHeader )
+ TQ_PROPERTY( double getIndentValue READ getIndentValue WRITE setIndentValue )
+ TQ_PROPERTY( bool getShowMessageError READ getShowMessageError WRITE setShowMessageError)
+ TQ_PROPERTY( bool dontCheckUpperWord READ dontCheckUpperWord WRITE setDontCheckUpperWord)
+ TQ_PROPERTY( bool dontCheckTitleCase READ dontCheckTitleCase WRITE setDontCheckTitleCase)
+
+ TQ_PROPERTY( int syntaxVersion READ syntaxVersion )
+ TQ_PROPERTY( bool showVerticalScrollBar READ showVerticalScrollBar WRITE setShowVerticalScrollBar )
+ TQ_PROPERTY( bool showHorizontalScrollBar READ showHorizontalScrollBar WRITE setShowHorizontalScrollBar )
+ TQ_PROPERTY( bool showColumnHeader READ showColumnHeader WRITE setShowColumnHeader )
+ TQ_PROPERTY( bool showRowHeader READ showRowHeader WRITE setShowRowHeader )
+ TQ_PROPERTY( bool showStatusBar READ showStatusBar WRITE setShowStatusBar )
+ TQ_PROPERTY( bool showFormulaBar READ showFormulaBar WRITE setShowFormulaBar )
+ TQ_PROPERTY( bool showTabBar READ showTabBar WRITE setShowTabBar )
+ TQ_PROPERTY( int undoRedoLimit READ undoRedoLimit WRITE setUndoRedoLimit )
public:
/**
* Creates a new document.
*/
- Doc( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0,
+ Doc( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0,
const char* name = 0, bool singleViewMode = false );
/**
@@ -143,12 +144,12 @@ public:
/**
* Returns list of all documents.
*/
- static QValueList<Doc*> documents();
+ static TQValueList<Doc*> documents();
/**
* Returns the MIME type of KSpread document.
*/
- virtual QCString mimeType() const { return MIME_TYPE; }
+ virtual TQCString mimeType() const { return MIME_TYPE; }
KLocale *locale () const;
Map *map () const;
@@ -208,7 +209,7 @@ public:
* For example, if unit() returns KoUnit::U_MM, then
* this functions return "mm".
*/
- QString unitName() const;
+ TQString unitName() const;
/**
* Returns the syntax version of the currently opened file
@@ -287,12 +288,12 @@ public:
/**
* Sets the color of the grid.
*/
- void setGridColor( const QColor& color );
+ void setGridColor( const TQColor& color );
/**
* Returns the color of the grid.
*/
- QColor gridColor() const;
+ TQColor gridColor() const;
/**
* Sets the indentation value.
@@ -401,12 +402,12 @@ public:
bool dontCheckTitleCase() const;
void setDontCheckTitleCase(bool _b);
- QColor pageBorderColor() const;
- void changePageBorderColor( const QColor & _color);
+ TQColor pageBorderColor() const;
+ void changePageBorderColor( const TQColor & _color);
virtual bool completeSaving( KoStore* _store );
- virtual QDomDocument saveXML();
+ virtual TQDomDocument saveXML();
enum SaveFlag { SaveAll, SaveSelected }; // kpresenter and kword have have SavePage too
@@ -426,25 +427,25 @@ public:
* It returns the selected picture, when exactly one picture was selected.
*/
bool saveOasisHelper( KoStore* store, KoXmlWriter* manifestWriter, SaveFlag saveFlag,
- QString* plainText = 0, KoPicture* picture = 0 );
+ TQString* plainText = 0, KoPicture* picture = 0 );
virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
void saveOasisDocumentStyles( KoStore* store, KoGenStyles& mainStyles ) const;
virtual int supportedSpecialFormats() const;
- virtual bool loadXML( QIODevice *, const QDomDocument& doc );
- virtual bool loadOasis( const QDomDocument& doc, KoOasisStyles& oasisStyles, const QDomDocument& settings, KoStore* );
+ virtual bool loadXML( TQIODevice *, const TQDomDocument& doc );
+ virtual bool loadOasis( const TQDomDocument& doc, KoOasisStyles& oasisStyles, const TQDomDocument& settings, KoStore* );
virtual bool loadChildren( KoStore* _store );
- QDomElement saveAreaName( QDomDocument& doc ) ;
+ TQDomElement saveAreaName( TQDomDocument& doc ) ;
void saveOasisAreaName( KoXmlWriter & xmlWriter );
- void loadAreaName( const QDomElement& element );
- void loadOasisAreaName( const QDomElement& element );
- void loadOasisCellValidation( const QDomElement&body );
+ void loadAreaName( const TQDomElement& element );
+ void loadOasisAreaName( const TQDomElement& element );
+ void loadOasisCellValidation( const TQDomElement&body );
virtual void addView( KoView *_view );
- virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
+ virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0);
/**
* Change the zoom factor to @p z (e.g. 150 for 150%)
@@ -460,7 +461,7 @@ public:
*/
void newZoomAndResolution( bool updateViews, bool forPrint );
- // virtual void printMap( QPainter & _painter );
+ // virtual void printMap( TQPainter & _painter );
void enableUndo( bool _b );
void enableRedo( bool _b );
@@ -476,12 +477,12 @@ public:
*/
void doNotPaint(bool status);
- virtual void paintContent( QPainter & painter, const QRect & rect, bool transparent = false,
+ virtual void paintContent( TQPainter & painter, const TQRect & rect, bool transparent = false,
double zoomX = 1.0, double zoomY = 1.0 );
- void paintContent( QPainter & painter, const QRect & rect, bool transparent,
+ void paintContent( TQPainter & painter, const TQRect & rect, bool transparent,
Sheet * sheet, bool drawCursor = true );
- bool docData( QString const & xmlTag, QDomElement & data );
+ bool docData( TQString const & xmlTag, TQDomElement & data );
void deregisterPlugin( Plugin * plugin );
void registerPlugin( Plugin * plugin );
@@ -506,23 +507,23 @@ public:
* @param drawCursor whether or not to draw the selection rectangle and the choose
* marker
*/
- void paintCellRegions(QPainter& painter, const QRect &viewRect,
+ void paintCellRegions(TQPainter& painter, const TQRect &viewRect,
View* view,
- QValueList<QRect> cellRegions,
+ TQValueList<TQRect> cellRegions,
const Sheet* sheet, bool drawCursor);
virtual DCOPObject* dcopObject();
- void addAreaName(const QRect &_rect,const QString & name,const QString & sheetName);
- const QValueList<Reference> & listArea();
- void removeArea( const QString &name);
+ void addAreaName(const TQRect &_rect,const TQString & name,const TQString & sheetName);
+ const TQValueList<Reference> & listArea();
+ void removeArea( const TQString &name);
KCompletion & completion();
- void addStringCompletion(const QString & stringCompletion);
+ void addStringCompletion(const TQString & stringCompletion);
- void changeAreaSheetName(const QString & oldName,const QString &sheetName);
+ void changeAreaSheetName(const TQString & oldName,const TQString &sheetName);
- QRect getRectArea(const QString & _sheetName);
+ TQRect getRectArea(const TQString & _sheetName);
/**
* Inserts an object to the object list.
@@ -531,7 +532,7 @@ public:
/**
* @return the list of all embedded objects (charts, pictures and koffice objects) Use insertObject to add an object to the list.
*/
- QPtrList<EmbeddedObject>& embeddedObjects();
+ TQPtrList<EmbeddedObject>& embeddedObjects();
KoPictureCollection *pictureCollection();
void initConfig();
@@ -546,7 +547,7 @@ public:
* - No cell calculation will be done (maybe there are exceptions, such
* as the goalseek operation needs to calculate values)
* During an operation, calls to Sheet::setRegionPaintDirty mark
- * regions as needing repainted. Once the emitEndOperation function is
+ * regions as needing tqrepainted. Once the emitEndOperation function is
* called, those regions will be painted all at once, values being calculated
* as necessary.
* Calls to begin/endOperation may be nested. Calcualation/painting will
@@ -564,7 +565,7 @@ public:
virtual void emitBeginOperation();
/**
- * Mark the end of an operation and triggers a repaint of any cells or regions of cells which
+ * Mark the end of an operation and triggers a tqrepaint of any cells or regions of cells which
* have been marked as 'dirty' via calls to Sheet::setRegionPaintDirty
* See above comment to emitBeginOperation(bool).
*/
@@ -589,33 +590,33 @@ public:
// The user-chosen global unit
- static QString getAttribute(const QDomElement &element, const char *attributeName, const QString &defaultValue)
+ static TQString getAttribute(const TQDomElement &element, const char *attributeName, const TQString &defaultValue)
{
return element.attribute( attributeName, defaultValue );
}
- static int getAttribute(const QDomElement &element, const char *attributeName, int defaultValue)
+ static int getAttribute(const TQDomElement &element, const char *attributeName, int defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toInt();
else
return defaultValue;
}
- static double getAttribute(const QDomElement &element, const char *attributeName, double defaultValue)
+ static double getAttribute(const TQDomElement &element, const char *attributeName, double defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toDouble();
else
return defaultValue;
}
- void addIgnoreWordAll( const QString & word);
+ void addIgnoreWordAll( const TQString & word);
void clearIgnoreWordAll( );
- void addIgnoreWordAllList( const QStringList & _lst);
- QStringList spellListIgnoreAll() const ;
+ void addIgnoreWordAllList( const TQStringList & _lst);
+ TQStringList spellListIgnoreAll() const ;
void setDisplaySheet(Sheet *_Sheet );
Sheet * displaySheet() const;
@@ -639,10 +640,10 @@ public:
void loadConfigFromFile();
bool configLoadFromFile() const;
- // repaint (update) all views
- void repaint( const QRect& );
- void repaint( EmbeddedObject* );
- void repaint( const KoRect& );
+ // tqrepaint (update) all views
+ void tqrepaint( const TQRect& );
+ void tqrepaint( EmbeddedObject* );
+ void tqrepaint( const KoRect& );
virtual void addShell( KoMainWindow *shell );
@@ -672,20 +673,20 @@ signals:
*/
void sig_refreshLocale();
- void sig_addAreaName( const QString & );
- void sig_removeAreaName( const QString & );
+ void sig_addAreaName( const TQString & );
+ void sig_removeAreaName( const TQString & );
- void damagesFlushed( const QValueList<Damage*>& damages );
+ void damagesFlushed( const TQValueList<Damage*>& damages );
protected slots:
void commandExecuted();
void documentRestored();
- virtual void openTemplate( const QString& file );
+ virtual void openTemplate( const TQString& file );
virtual void initEmpty();
protected:
- KoView* createViewInstance( QWidget* parent, const char* name );
+ KoView* createViewInstance( TQWidget* tqparent, const char* name );
void makeUsedPixmapList();
void insertPixmapKey( KoPictureKey key );
@@ -700,7 +701,7 @@ protected:
*/
virtual bool saveChildren( KoStore* _store );
- class SavedDocParts : public QMap<QString, QDomElement> {};
+ class SavedDocParts : public TQMap<TQString, TQDomElement> {};
SavedDocParts m_savedDocParts;
private:
@@ -719,14 +720,14 @@ private:
*/
void paintUpdates();
- void PaintRegion(QPainter& painter, const KoRect &viewRegion,
- View* view, const QRect &paintRegion,
+ void PaintRegion(TQPainter& painter, const KoRect &viewRegion,
+ View* view, const TQRect &paintRegion,
const Sheet* sheet);
- void loadPaper( QDomElement const & paper );
+ void loadPaper( TQDomElement const & paper );
void saveOasisSettings( KoXmlWriter &settingsWriter );
- void loadOasisSettings( const QDomDocument&settingsDoc );
+ void loadOasisSettings( const TQDomDocument&settingsDoc );
void loadOasisIgnoreList( const KoOasisSettings& settings );
KSPLoadingInfo *m_loadingInfo;
};
diff --git a/kspread/kspread_editors.cc b/kspread/kspread_editors.cc
index 49a592a0..24df68ed 100644
--- a/kspread/kspread_editors.cc
+++ b/kspread/kspread_editors.cc
@@ -31,21 +31,21 @@
#include <klistbox.h>
-#include <qapplication.h>
-#include <qlistbox.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qvaluelist.h>
-#include <private/qrichtext_p.h>
+#include <tqapplication.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqvaluelist.h>
+#include <private/tqrichtext_p.h>
//#include <klineedit.h>
#include <ktextedit.h>
-#include <qapplication.h>
-#include <qbutton.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqbutton.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqregexp.h>
#include <kdebug.h>
using namespace KSpread;
@@ -80,8 +80,8 @@ public:
};
-FormulaEditorHighlighter::FormulaEditorHighlighter(QTextEdit* textEdit, Canvas* canvas)
- : QSyntaxHighlighter(textEdit)
+FormulaEditorHighlighter::FormulaEditorHighlighter(TQTextEdit* textEdit, Canvas* canvas)
+ : TQSyntaxHighlighter(textEdit)
{
d = new Private();
d->canvas = canvas;
@@ -97,10 +97,10 @@ const Tokens& FormulaEditorHighlighter::formulaTokens() const
return d->tokens;
}
-int FormulaEditorHighlighter::highlightParagraph(const QString& text, int /* endStateOfLastPara */)
+int FormulaEditorHighlighter::highlightParagraph(const TQString& text, int /* endStateOfLastPara */)
{
// reset syntax highlighting
- setFormat(0, text.length(), Qt::black);
+ setFormat(0, text.length(), TQt::black);
// save the old ones to identify range changes
Tokens oldTokens = d->tokens;
@@ -110,14 +110,14 @@ int FormulaEditorHighlighter::highlightParagraph(const QString& text, int /* end
Formula f;
d->tokens = f.scan(text);
- QFont editorFont = textEdit()->currentFont();
- QFont font;
+ TQFont editorFont = textEdit()->currentFont();
+ TQFont font;
uint oldRangeCount = d->rangeCount;
d->rangeCount = 0;
- QValueList<QColor> colors = d->canvas->choice()->colors();
- QValueList<Range> alreadyFoundRanges;
+ TQValueList<TQColor> colors = d->canvas->choice()->colors();
+ TQValueList<Range> alreadyFoundRanges;
for (uint i = 0; i < d->tokens.count(); ++i)
{
@@ -137,21 +137,21 @@ int FormulaEditorHighlighter::highlightParagraph(const QString& text, int /* end
Range newRange( token.text() );
- if (!alreadyFoundRanges.contains(newRange))
+ if (!alreadyFoundRanges.tqcontains(newRange))
{
alreadyFoundRanges.append(newRange);
d->rangeCount++;
}
- setFormat(token.pos() + 1, token.text().length(), colors[ alreadyFoundRanges.findIndex(newRange) % colors.size()] );
+ setFormat(token.pos() + 1, token.text().length(), colors[ alreadyFoundRanges.tqfindIndex(newRange) % colors.size()] );
}
break;
case Token::Boolean: // True, False (also i18n-ized)
-/* font = QFont(editorFont);
+/* font = TQFont(editorFont);
font.setBold(true);
setFormat(token.pos() + 1, token.text().length(), font);*/
break;
case Token::Identifier: // function name or named area*/
-/* font = QFont(editorFont);
+/* font = TQFont(editorFont);
font.setBold(true);
setFormat(token.pos() + 1, token.text().length(), font);*/
break;
@@ -195,7 +195,7 @@ void FormulaEditorHighlighter::handleBrace( uint index )
int opType = token.asOperator();
bool highlightBrace=false;
- //Check where the cursor is in relation to this left or right parenthesis token.
+ //Check where the cursor is in relation to this left or right tqparenthesis token.
//Only one pair of braces should be highlighted at a time, and if the cursor
//is between two braces, the inner-most pair should be highlighted.
@@ -229,7 +229,7 @@ void FormulaEditorHighlighter::handleBrace( uint index )
if (highlightBrace)
{
- QFont font = QFont( textEdit()->currentFont() );
+ TQFont font = TQFont( textEdit()->currentFont() );
font.setBold(true);
setFormat(token.pos() + 1, token.text().length(), font);
@@ -303,38 +303,38 @@ class FunctionCompletion::Private
{
public:
CellEditor* editor;
- QVBox *completionPopup;
+ TQVBox *completionPopup;
KListBox *completionListBox;
- QLabel* hintLabel;
+ TQLabel* hintLabel;
};
FunctionCompletion::FunctionCompletion( CellEditor* editor ):
-QObject( editor )
+TQObject( editor )
{
d = new Private;
d->editor = editor;
d->hintLabel = 0;
- d->completionPopup = new QVBox( editor->topLevelWidget(), 0, WType_Popup );
- d->completionPopup->setFrameStyle( QFrame::Box | QFrame::Plain );
+ d->completionPopup = new TQVBox( editor->tqtopLevelWidget(), 0, WType_Popup );
+ d->completionPopup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
d->completionPopup->setLineWidth( 1 );
d->completionPopup->installEventFilter( this );
- d->completionPopup->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum);
+ d->completionPopup->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum);
d->completionListBox = new KListBox( d->completionPopup );
d->completionPopup->setFocusProxy( d->completionListBox );
- d->completionListBox->setFrameStyle( QFrame::NoFrame );
+ d->completionListBox->setFrameStyle( TQFrame::NoFrame );
d->completionListBox->setVariableWidth( true );
d->completionListBox->installEventFilter( this );
- connect( d->completionListBox, SIGNAL(selected(const QString&)), this,
- SLOT(itemSelected(const QString&)) );
- connect( d->completionListBox, SIGNAL(highlighted(const QString&)), this,
- SLOT(itemSelected(const QString&)) );
-
- d->hintLabel = new QLabel( 0, "autocalc", Qt::WStyle_StaysOnTop |
- Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool | Qt::WX11BypassWM );
- d->hintLabel->setFrameStyle( QFrame::Plain | QFrame::Box );
- d->hintLabel->setPalette( QToolTip::palette() );
+ connect( d->completionListBox, TQT_SIGNAL(selected(const TQString&)), this,
+ TQT_SLOT(itemSelected(const TQString&)) );
+ connect( d->completionListBox, TQT_SIGNAL(highlighted(const TQString&)), this,
+ TQT_SLOT(itemSelected(const TQString&)) );
+
+ d->hintLabel = new TQLabel( 0, "autocalc", TQt::WStyle_StaysOnTop |
+ TQt::WStyle_Customize | TQt::WStyle_NoBorder | TQt::WStyle_Tool | TQt::WX11BypassWM );
+ d->hintLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
+ d->hintLabel->setPalette( TQToolTip::palette() );
d->hintLabel->hide();
}
@@ -344,7 +344,7 @@ FunctionCompletion::~FunctionCompletion()
delete d;
}
-void FunctionCompletion::itemSelected( const QString& item )
+void FunctionCompletion::itemSelected( const TQString& item )
{
KSpread::FunctionDescription* desc;
desc = KSpread::FunctionRepository::self()->functionInfo(item);
@@ -354,7 +354,7 @@ void FunctionCompletion::itemSelected( const QString& item )
return;
}
- QString helpText = desc->helpText()[0];
+ TQString helpText = desc->helpText()[0];
if( helpText.isEmpty() )
{
d->hintLabel->hide();
@@ -366,23 +366,23 @@ void FunctionCompletion::itemSelected( const QString& item )
d->hintLabel->adjustSize();
// reposition nicely
- QPoint pos = d->editor->mapToGlobal( QPoint( d->editor->width(), 0 ) );
+ TQPoint pos = d->editor->mapToGlobal( TQPoint( d->editor->width(), 0 ) );
pos.setY( pos.y() - d->hintLabel->height() - 1 );
d->hintLabel->move( pos );
d->hintLabel->show();
d->hintLabel->raise();
// do not show it forever
- //QTimer::singleShot( 5000, d->hintLabel, SLOT( hide()) );
+ //TQTimer::singleShot( 5000, d->hintLabel, TQT_SLOT( hide()) );
}
-bool FunctionCompletion::eventFilter( QObject *obj, QEvent *ev )
+bool FunctionCompletion::eventFilter( TQObject *obj, TQEvent *ev )
{
- if ( obj == d->completionPopup || obj == d->completionListBox )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->completionPopup) || TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(d->completionListBox) )
{
- if ( ev->type() == QEvent::KeyPress )
+ if ( ev->type() == TQEvent::KeyPress )
{
- QKeyEvent *ke = (QKeyEvent*)ev;
+ TQKeyEvent *ke = (TQKeyEvent*)ev;
if ( ke->key() == Key_Enter || ke->key() == Key_Return )
{
doneCompletion();
@@ -397,11 +397,11 @@ bool FunctionCompletion::eventFilter( QObject *obj, QEvent *ev )
d->hintLabel->hide();
d->completionPopup->close();
d->editor->setFocus();
- QApplication::sendEvent( d->editor, ev );
+ TQApplication::sendEvent( d->editor, ev );
return true;
}
- if ( ev->type() == QEvent::MouseButtonDblClick )
+ if ( ev->type() == TQEvent::MouseButtonDblClick )
{
doneCompletion();
return true;
@@ -419,29 +419,29 @@ void FunctionCompletion::doneCompletion()
emit selectedCompletion( d->completionListBox->currentText() );
}
-void FunctionCompletion::showCompletion( const QStringList &choices )
+void FunctionCompletion::showCompletion( const TQStringList &choices )
{
if( !choices.count() ) return;
d->completionListBox->clear();
for( unsigned i = 0; i < choices.count(); i++ )
- new QListBoxText( (QListBox*)d->completionListBox, choices[i] );
+ new TQListBoxText( (TQListBox*)d->completionListBox, choices[i] );
d->completionListBox->setCurrentItem( 0 );
// size of the pop-up
d->completionPopup->setMaximumHeight( 100 );
- d->completionPopup->resize( d->completionListBox->sizeHint() +
- QSize( d->completionListBox->verticalScrollBar()->width() + 4,
+ d->completionPopup->resize( d->completionListBox->tqsizeHint() +
+ TQSize( d->completionListBox->verticalScrollBar()->width() + 4,
d->completionListBox->horizontalScrollBar()->height() + 4 ) );
int h = d->completionListBox->height();
int w = d->completionListBox->width();
- QPoint pos = d->editor->globalCursorPosition();
+ TQPoint pos = d->editor->globalCursorPosition();
// if popup is partially invisible, move to other position
// FIXME check it if it works in Xinerama multihead
- int screen_num = QApplication::desktop()->screenNumber( d->completionPopup );
- QRect screen = QApplication::desktop()->screenGeometry( screen_num );
+ int screen_num = TQApplication::desktop()->screenNumber( d->completionPopup );
+ TQRect screen = TQApplication::desktop()->screenGeometry( screen_num );
if( pos.y() + h > screen.y()+screen.height() )
pos.setY( pos.y() - h - d->editor->height() );
if( pos.x() + w > screen.x()+screen.width() )
@@ -468,9 +468,9 @@ public:
KTextEdit* textEdit;
FormulaEditorHighlighter* highlighter;
FunctionCompletion* functionCompletion;
- QTimer* functionCompletionTimer;
+ TQTimer* functionCompletionTimer;
- QPoint globalCursorPos;
+ TQPoint globalCursorPos;
bool captureAllKeyEvents : 1;
bool checkChoice : 1;
@@ -487,13 +487,13 @@ public:
CellEditor::CellEditor( Cell* _cell, Canvas* _parent, bool captureAllKeyEvents, const char* _name )
- : QWidget( _parent, _name )
+ : TQWidget( _parent, _name )
{
d = new Private();
d->cell = _cell;
d->canvas = _parent;
d->textEdit = new KTextEdit(this);
- d->globalCursorPos = QPoint();
+ d->globalCursorPos = TQPoint();
d->captureAllKeyEvents = captureAllKeyEvents;
d->checkChoice = true;
d->updateChoice = true;
@@ -505,28 +505,28 @@ CellEditor::CellEditor( Cell* _cell, Canvas* _parent, bool captureAllKeyEvents,
d->currentToken = 0;
d->rangeCount = 0;
-//TODO - Get rid of QTextEdit margins, this doesn't seem easily possible in Qt 3.3, so a job for Qt 4 porting.
+//TODO - Get rid of TQTextEdit margins, this doesn't seem easily possible in TQt 3.3, so a job for TQt 4 porting.
- d->textEdit->setHScrollBarMode(QScrollView::AlwaysOff);
- d->textEdit->setVScrollBarMode(QScrollView::AlwaysOff);
- d->textEdit->setFrameStyle(QFrame::NoFrame);
+ d->textEdit->setHScrollBarMode(TQScrollView::AlwaysOff);
+ d->textEdit->setVScrollBarMode(TQScrollView::AlwaysOff);
+ d->textEdit->setFrameStyle(TQFrame::NoFrame);
d->textEdit->setLineWidth(0);
d->textEdit->installEventFilter( this );
d->highlighter = new FormulaEditorHighlighter(d->textEdit, _parent);
d->functionCompletion = new FunctionCompletion( this );
- d->functionCompletionTimer = new QTimer( this );
- connect( d->functionCompletion, SIGNAL( selectedCompletion( const QString& ) ),
- SLOT( functionAutoComplete( const QString& ) ) );
- connect( d->textEdit, SIGNAL( textChanged() ), SLOT( checkFunctionAutoComplete() ) );
- connect( d->functionCompletionTimer, SIGNAL( timeout() ),
- SLOT( triggerFunctionAutoComplete() ) );
+ d->functionCompletionTimer = new TQTimer( this );
+ connect( d->functionCompletion, TQT_SIGNAL( selectedCompletion( const TQString& ) ),
+ TQT_SLOT( functionAutoComplete( const TQString& ) ) );
+ connect( d->textEdit, TQT_SIGNAL( textChanged() ), TQT_SLOT( checkFunctionAutoComplete() ) );
+ connect( d->functionCompletionTimer, TQT_SIGNAL( timeout() ),
+ TQT_SLOT( triggerFunctionAutoComplete() ) );
if (!cell()->format()->multiRow(cell()->column(),cell()->row()))
- d->textEdit->setWordWrap(QTextEdit::NoWrap);
+ d->textEdit->setWordWrap(TQTextEdit::NoWrap);
else
- d->textEdit->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
+ d->textEdit->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
//TODO - Custom KTextEdit class which supports text completion
/*
@@ -536,24 +536,24 @@ CellEditor::CellEditor( Cell* _cell, Canvas* _parent, bool captureAllKeyEvents,
*/
setFocusProxy( d->textEdit );
- connect( d->textEdit, SIGNAL( cursorPositionChanged(int,int) ), this, SLOT (slotCursorPositionChanged(int,int)));
- connect( d->textEdit, SIGNAL( cursorPositionChanged(QTextCursor*) ), this, SLOT (slotTextCursorChanged(QTextCursor*)));
- connect( d->textEdit, SIGNAL( textChanged() ), this, SLOT( slotTextChanged() ) );
+ connect( d->textEdit, TQT_SIGNAL( cursorPositionChanged(int,int) ), this, TQT_SLOT (slotCursorPositionChanged(int,int)));
+ connect( d->textEdit, TQT_SIGNAL( cursorPositionChanged(TQTextCursor*) ), this, TQT_SLOT (slotTextCursorChanged(TQTextCursor*)));
+ connect( d->textEdit, TQT_SIGNAL( textChanged() ), this, TQT_SLOT( slotTextChanged() ) );
-// connect( d->textEdit, SIGNAL(completionModeChanged( KGlobalSettings::Completion )),this,SLOT (slotCompletionModeChanged(KGlobalSettings::Completion)));
+// connect( d->textEdit, TQT_SIGNAL(completionModeChanged( KGlobalSettings::Completion )),this,TQT_SLOT (slotCompletionModeChanged(KGlobalSettings::Completion)));
// A choose should always start at the edited cell
// canvas()->setChooseMarkerRow( canvas()->markerRow() );
// canvas()->setChooseMarkerColumn( canvas()->markerColumn() );
// set font size according to zoom factor
- QFont font( _cell->format()->font() );
+ TQFont font( _cell->format()->font() );
font.setPointSizeFloat( 0.01 * _parent->doc()->zoom() * font.pointSizeFloat() );
d->textEdit->setFont( font );
if (d->fontLength == 0)
{
- QFontMetrics fm( d->textEdit->font() );
+ TQFontMetrics fm( d->textEdit->font() );
d->fontLength = fm.width('x');
}
}
@@ -578,7 +578,7 @@ Canvas* CellEditor::canvas() const
return d->canvas;
}
-QPoint CellEditor::globalCursorPosition() const
+TQPoint CellEditor::globalCursorPosition() const
{
return d->globalCursorPos;
}
@@ -594,7 +594,7 @@ void CellEditor::triggerFunctionAutoComplete()
// tokenize the expression (don't worry, this is very fast)
int para = 0, curPos = 0;
d->textEdit->getCursorPosition( &para, &curPos );
- QString subtext = d->textEdit->text().left( curPos );
+ TQString subtext = d->textEdit->text().left( curPos );
KSpread::Formula f;
KSpread::Tokens tokens = f.scan( subtext );
@@ -605,14 +605,14 @@ void CellEditor::triggerFunctionAutoComplete()
// last token must be an identifier
if( !lastToken.isIdentifier() ) return;
- QString id = lastToken.text();
+ TQString id = lastToken.text();
if( id.length() < 1 ) return;
// find matches in function names
- QStringList fnames = KSpread::FunctionRepository::self()->functionNames();
- QStringList choices;
+ TQStringList fnames = KSpread::FunctionRepository::self()->functionNames();
+ TQStringList choices;
for( unsigned i=0; i<fnames.count(); i++ )
- if( fnames[i].startsWith( id, false ) )
+ if( fnames[i].tqstartsWith( id, false ) )
choices.append( fnames[i] );
choices.sort();
@@ -628,13 +628,13 @@ void CellEditor::triggerFunctionAutoComplete()
d->functionCompletion->showCompletion( choices );
}
-void CellEditor::functionAutoComplete( const QString& item )
+void CellEditor::functionAutoComplete( const TQString& item )
{
if( item.isEmpty() ) return;
int para = 0, curPos = 0;
d->textEdit->getCursorPosition( &para, &curPos );
- QString subtext = text().left( curPos );
+ TQString subtext = text().left( curPos );
KSpread::Formula f;
KSpread::Tokens tokens = f.scan( subtext );
@@ -743,8 +743,8 @@ void CellEditor::slotCursorPositionChanged(int /* para */, int pos)
{
d->highlighter->resetRangeChanged();
- disconnect( d->canvas->choice(), SIGNAL(changed(const Region&)),
- d->canvas->view(), SLOT(slotScrollChoice(const Region&)) );
+ disconnect( d->canvas->choice(), TQT_SIGNAL(changed(const Region&)),
+ d->canvas->view(), TQT_SLOT(slotScrollChoice(const Region&)) );
d->canvas->doc()->emitBeginOperation();
setUpdateChoice(false);
@@ -757,7 +757,7 @@ void CellEditor::slotCursorPositionChanged(int /* para */, int pos)
//A list of regions which have already been highlighted on the spreadsheet.
//This is so that we don't end up highlighting the same region twice in two different
//colours.
- QValueList<Region> alreadyUsedRegions;
+ TQValueList<Region> alreadyUsedRegions;
for (uint i = 0; i < tokens.count(); ++i)
{
@@ -768,9 +768,9 @@ void CellEditor::slotCursorPositionChanged(int /* para */, int pos)
Region region(d->canvas->view(), token.text());
it = region.constBegin();
- if (!alreadyUsedRegions.contains(region))
+ if (!alreadyUsedRegions.tqcontains(region))
{
- QRect r=(*it)->rect();
+ TQRect r=(*it)->rect();
if (d->canvas->choice()->isEmpty())
d->canvas->choice()->initialize((*it)->rect(), (*it)->sheet());
@@ -783,22 +783,22 @@ void CellEditor::slotCursorPositionChanged(int /* para */, int pos)
}
setUpdateChoice(true);
d->canvas->doc()->emitEndOperation(*d->canvas->choice());
- connect( d->canvas->choice(), SIGNAL(changed(const Region&)),
- d->canvas->view(), SLOT(slotScrollChoice(const Region&)) );
+ connect( d->canvas->choice(), TQT_SIGNAL(changed(const Region&)),
+ d->canvas->view(), TQT_SLOT(slotScrollChoice(const Region&)) );
}
}
}
-void CellEditor::slotTextCursorChanged(QTextCursor* cursor)
+void CellEditor::slotTextCursorChanged(TQTextCursor* cursor)
{
- QTextStringChar *chr = cursor->paragraph()->at( cursor->index() );
+ TQTextStringChar *chr = cursor->paragraph()->at( cursor->index() );
int h = cursor->paragraph()->lineHeightOfChar( cursor->index() );
int x = cursor->paragraph()->rect().x() + chr->x;
int y, dummy;
cursor->paragraph()->lineHeightOfChar( cursor->index(), &dummy, &y );
y += cursor->paragraph()->rect().y();
- d->globalCursorPos = d->textEdit->mapToGlobal( d->textEdit-> contentsToViewport( QPoint( x, y + h ) ) );
+ d->globalCursorPos = d->textEdit->mapToGlobal( d->textEdit-> contentsToViewport( TQPoint( x, y + h ) ) );
}
void CellEditor::cut()
@@ -816,19 +816,19 @@ void CellEditor::copy()
d->textEdit->copy();
}
-void CellEditor::setEditorFont(QFont const & font, bool updateSize)
+void CellEditor::setEditorFont(TQFont const & font, bool updateSize)
{
- QFont tmpFont( font );
+ TQFont tmpFont( font );
tmpFont.setPointSizeFloat( 0.01 * canvas()->doc()->zoom() * tmpFont.pointSizeFloat() );
d->textEdit->setFont( tmpFont );
if (updateSize)
{
- QFontMetrics fm( d->textEdit->font() );
+ TQFontMetrics fm( d->textEdit->font() );
d->fontLength = fm.width('x');
int mw = fm.width( d->textEdit->text() ) + d->fontLength;
- // don't make it smaller: then we would have to repaint the obscured cells
+ // don't make it smaller: then we would have to tqrepaint the obscured cells
if (mw < width())
mw = width();
@@ -850,13 +850,13 @@ void CellEditor::slotTextChanged()
// kdDebug() << k_funcinfo << endl;
//FIXME - text() may return richtext?
- QString t = text();
+ TQString t = text();
if (t.length() > d->length)
{
d->length = t.length();
- QFontMetrics fm(d->textEdit->font());
+ TQFontMetrics fm(d->textEdit->font());
// - requiredWidth = width of text plus some spacer characters
int requiredWidth = fm.width(t) + (2*fm.width('x'));
@@ -864,7 +864,7 @@ void CellEditor::slotTextChanged()
//allow the text to fit if the new text is too wide
//For multi-row (word-wrap enabled) cells, the text editor must expand vertically to
//allow for new rows of text & the width of the text editor is not affected
- if (d->textEdit->wordWrap() == QTextEdit::NoWrap)
+ if (d->textEdit->wordWrap() == TQTextEdit::NoWrap)
{
if (requiredWidth > width())
{
@@ -892,7 +892,7 @@ void CellEditor::slotTextChanged()
d->length = t.length();
// Too slow for long texts
- // QFontMetrics fm( d->textEdit->font() );
+ // TQFontMetrics fm( d->textEdit->font() );
// int mw = fm.width( t ) + fm.width('x');
int mw = d->fontLength * d->length;
@@ -911,7 +911,7 @@ void CellEditor::slotTextChanged()
{
if ( (t.length() == 1) && t[0].isDigit() )
{
- QString tmp = t + " %";
+ TQString tmp = t + " %";
d->textEdit->setText(tmp);
d->textEdit->setCursorPosition(0,1);
return;
@@ -938,7 +938,7 @@ bool CellEditor::checkChoice()
d->length_namecell = 0;
d->currentToken = 0;
- QString text = d->textEdit->text();
+ TQString text = d->textEdit->text();
if ( text[0] != '=' )
{
canvas()->setChooseMode(false);
@@ -1019,7 +1019,7 @@ void CellEditor::updateChoice()
{
}
- QString name_cell = choice->activeSubRegionName();
+ TQString name_cell = choice->activeSubRegionName();
Tokens tokens = d->highlighter->formulaTokens();
uint start = 1;
@@ -1043,8 +1043,8 @@ void CellEditor::updateChoice()
d->length_text = text().length();
//kdDebug(36001) << "updateChooseMarker2 len=" << d->length_namecell << endl;
- QString oldText = text();
- QString newText = oldText.left(start) + name_cell + oldText.right(d->length_text - start - length);
+ TQString oldText = text();
+ TQString newText = oldText.left(start) + name_cell + oldText.right(d->length_text - start - length);
setCheckChoice( false );
setText( newText );
@@ -1058,27 +1058,27 @@ void CellEditor::updateChoice()
d->updatingChoice = false;
}
-void CellEditor::resizeEvent( QResizeEvent* )
+void CellEditor::resizeEvent( TQResizeEvent* )
{
d->textEdit->setGeometry( 0, 0, width(), height() );
}
-void CellEditor::handleKeyPressEvent( QKeyEvent * _ev )
+void CellEditor::handleKeyPressEvent( TQKeyEvent * _ev )
{
- if (_ev->key() == Qt::Key_F4)
+ if (_ev->key() == TQt::Key_F4)
{
if (d->textEdit == 0)
{
- QApplication::sendEvent( d->textEdit, _ev );
+ TQApplication::sendEvent( d->textEdit, _ev );
return;
}
- QRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
+ TQRegExp exp("(\\$?)([a-zA-Z]+)(\\$?)([0-9]+)$");
int para,cur;
d->textEdit->getCursorPosition(&para,&cur);
// int cur = d->textEdit->cursorPosition();
- QString tmp, tmp2;
+ TQString tmp, tmp2;
int n = -1;
// this is ugly, and sort of hack
@@ -1095,7 +1095,7 @@ void CellEditor::handleKeyPressEvent( QKeyEvent * _ev )
if (n == -1) return;
- QString newPart;
+ TQString newPart;
if ((exp.cap(1) == "$") && (exp.cap(3) == "$"))
newPart = "$" + exp.cap(2) + exp.cap(4);
else if ((exp.cap(1) != "$") && (exp.cap(3) != "$"))
@@ -1105,7 +1105,7 @@ void CellEditor::handleKeyPressEvent( QKeyEvent * _ev )
else if ((exp.cap(1) != "$") && (exp.cap(3) == "$"))
newPart = exp.cap(2) + exp.cap(4);
- QString newString = tmp.left(n);
+ TQString newString = tmp.left(n);
newString += newPart;
cur = newString.length() - i;
newString += tmp2;
@@ -1119,21 +1119,21 @@ void CellEditor::handleKeyPressEvent( QKeyEvent * _ev )
}
// Send the key event to the KLineEdit
- QApplication::sendEvent( d->textEdit, _ev );
+ TQApplication::sendEvent( d->textEdit, _ev );
}
-void CellEditor::handleIMEvent( QIMEvent * _ev )
+void CellEditor::handleIMEvent( TQIMEvent * _ev )
{
// send the IM event to the KLineEdit
- QApplication::sendEvent( d->textEdit, _ev );
+ TQApplication::sendEvent( d->textEdit, _ev );
}
-QString CellEditor::text() const
+TQString CellEditor::text() const
{
return d->textEdit->text();
}
-void CellEditor::setText(QString text)
+void CellEditor::setText(TQString text)
{
d->textEdit->setText(text);
//Usability : It is usually more convenient if the cursor is positioned at the end of the text so it can
@@ -1144,7 +1144,7 @@ void CellEditor::setText(QString text)
if (d->fontLength == 0)
{
- QFontMetrics fm( d->textEdit->font() );
+ TQFontMetrics fm( d->textEdit->font() );
d->fontLength = fm.width('x');
}
}
@@ -1163,21 +1163,21 @@ void CellEditor::setCursorPosition( int pos )
canvas()->view()->editWidget()->setCursorPosition( pos );
}
-bool CellEditor::eventFilter( QObject* o, QEvent* e )
+bool CellEditor::eventFilter( TQObject* o, TQEvent* e )
{
// Only interested in KTextEdit
- if ( o != d->textEdit )
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(d->textEdit) )
return false;
- if ( e->type() == QEvent::FocusOut )
+ if ( e->type() == TQEvent::FocusOut )
{
canvas()->setLastEditorWithFocus( Canvas::CellEditor );
return false;
}
- if ( e->type() == QEvent::KeyPress || e->type() == QEvent::KeyRelease )
+ if ( e->type() == TQEvent::KeyPress || e->type() == TQEvent::KeyRelease )
{
- QKeyEvent* k = (QKeyEvent*)e;
- if (!(k->state() & Qt::ShiftButton) || canvas()->chooseMode())
+ TQKeyEvent* k = (TQKeyEvent*)e;
+ if (!(k->state() & TQt::ShiftButton) || canvas()->chooseMode())
{
//If the user presses the return key to finish editing this cell, choose mode must be turned off first
//otherwise it will merely select a different cell
@@ -1195,17 +1195,17 @@ bool CellEditor::eventFilter( QObject* o, QEvent* e )
k->key() == Key_Return || k->key() == Key_Enter)
{
// Send directly to canvas
- QApplication::sendEvent( parent(), e );
+ TQApplication::sendEvent( tqparent(), e );
return true;
}
}
- else if ( k->state() & Qt::ShiftButton && ( k->key() == Key_Return || k->key() == Key_Enter ) )
+ else if ( k->state() & TQt::ShiftButton && ( k->key() == Key_Return || k->key() == Key_Enter ) )
{
// enable content wrapping
d->cell->format()->setMultiRow( true );
}
// End choosing. May be restarted by CellEditor::slotTextChanged
- if ( e->type() == QEvent::KeyPress && !k->text().isEmpty() )
+ if ( e->type() == TQEvent::KeyPress && !k->text().isEmpty() )
{
canvas()->setChooseMode(false);
}
@@ -1213,10 +1213,10 @@ bool CellEditor::eventFilter( QObject* o, QEvent* e )
// editor leaves editing mode ... otherwise editing is annoying
// left/right arrows still work with the F2-editor.
- // Forward left & right arrows to parent, unless this editor has been set to capture arrow key events
+ // Forward left & right arrows to tqparent, unless this editor has been set to capture arrow key events
// Changed to this behaviour for consistancy with OO Calc & MS Office.
- if ( ((k->key() == Qt::Key_Left) || (k->key() == Qt::Key_Right)) && (!d->captureAllKeyEvents)) {
- QApplication::sendEvent (parent(), e);
+ if ( ((k->key() == TQt::Key_Left) || (k->key() == TQt::Key_Right)) && (!d->captureAllKeyEvents)) {
+ TQApplication::sendEvent (tqparent(), e);
return true;
}
}
@@ -1255,7 +1255,7 @@ void CellEditor::setCursorToRange(uint pos)
*
****************************************************************************/
-ComboboxLocationEditWidget::ComboboxLocationEditWidget( QWidget * _parent,
+ComboboxLocationEditWidget::ComboboxLocationEditWidget( TQWidget * _parent,
View * _view )
: KComboBox( _parent, "ComboboxLocationEditWidget" )
{
@@ -1263,21 +1263,21 @@ ComboboxLocationEditWidget::ComboboxLocationEditWidget( QWidget * _parent,
setLineEdit( m_locationWidget );
insertItem( "" );
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area = _view->doc()->listArea();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area = _view->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
slotAddAreaName( (*it).ref_name);
- connect( this, SIGNAL( activated ( const QString & ) ), m_locationWidget, SLOT( slotActivateItem() ) );
+ connect( this, TQT_SIGNAL( activated ( const TQString & ) ), m_locationWidget, TQT_SLOT( slotActivateItem() ) );
}
-void ComboboxLocationEditWidget::slotAddAreaName( const QString &_name)
+void ComboboxLocationEditWidget::slotAddAreaName( const TQString &_name)
{
insertItem( _name );
m_locationWidget->addCompletionItem( _name );
}
-void ComboboxLocationEditWidget::slotRemoveAreaName( const QString &_name )
+void ComboboxLocationEditWidget::slotRemoveAreaName( const TQString &_name )
{
for ( int i = 0; i<count(); i++ )
{
@@ -1298,7 +1298,7 @@ void ComboboxLocationEditWidget::slotRemoveAreaName( const QString &_name )
*
****************************************************************************/
-LocationEditWidget::LocationEditWidget( QWidget * _parent,
+LocationEditWidget::LocationEditWidget( TQWidget * _parent,
View * _view )
: KLineEdit( _parent, "LocationEditWidget" ),
m_pView(_view)
@@ -1307,10 +1307,10 @@ LocationEditWidget::LocationEditWidget( QWidget * _parent,
setCompletionMode(KGlobalSettings::CompletionAuto );
}
-void LocationEditWidget::addCompletionItem( const QString &_item )
+void LocationEditWidget::addCompletionItem( const TQString &_item )
{
kdDebug()<<" LocationEditWidget::addCompletionItem add :"<<_item<<endl;
- if ( completionList.items().contains( _item) == 0 )
+ if ( completionList.items().tqcontains( _item) == 0 )
{
completionList.addItem( _item );
kdDebug()<<" _utem :"<<_item<<endl;
@@ -1318,7 +1318,7 @@ void LocationEditWidget::addCompletionItem( const QString &_item )
}
}
-void LocationEditWidget::removeCompletionItem( const QString &_item )
+void LocationEditWidget::removeCompletionItem( const TQString &_item )
{
completionList.removeItem( _item );
}
@@ -1330,15 +1330,15 @@ void LocationEditWidget::slotActivateItem()
bool LocationEditWidget::activateItem()
{
- QString ltext = text();
- QString tmp = ltext.lower();
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area = m_pView->doc()->listArea();
+ TQString ltext = text();
+ TQString tmp = ltext.lower();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area = m_pView->doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
if ((*it).ref_name == tmp)
{
- QString tmp = (*it).sheet_name;
+ TQString tmp = (*it).sheet_name;
tmp += "!";
tmp += util_rangeName((*it).rect);
m_pView->selectionInfo()->initialize( Region(m_pView,tmp) );
@@ -1348,14 +1348,14 @@ bool LocationEditWidget::activateItem()
// Set the cell component to uppercase:
// Sheet1!a1 -> Sheet1!A2
- int pos = ltext.find('!');
+ int pos = ltext.tqfind('!');
if ( pos !=- 1 )
tmp = ltext.left(pos)+ltext.mid(pos).upper();
else
tmp = ltext.upper();
// Selection entered in location widget
- if ( ltext.contains( ':' ) )
+ if ( ltext.tqcontains( ':' ) )
m_pView->selectionInfo()->initialize( Region(m_pView,tmp) );
// Location entered in location widget
else
@@ -1372,7 +1372,7 @@ bool LocationEditWidget::activateItem()
}
if ( !region.isValid() && validName)
{
- QRect rect( m_pView->selectionInfo()->selection() );
+ TQRect rect( m_pView->selectionInfo()->selection() );
Sheet * t = m_pView->activeSheet();
// set area name on current selection/cell
@@ -1391,14 +1391,14 @@ bool LocationEditWidget::activateItem()
}
-void LocationEditWidget::keyPressEvent( QKeyEvent * _ev )
+void LocationEditWidget::keyPressEvent( TQKeyEvent * _ev )
{
// Do not handle special keys and accelerators. This is
- // done by QLineEdit.
- if ( _ev->state() & ( Qt::AltButton | Qt::ControlButton ) )
+ // done by TQLineEdit.
+ if ( _ev->state() & ( TQt::AltButton | TQt::ControlButton ) )
{
- QLineEdit::keyPressEvent( _ev );
- // Never allow that keys are passed on to the parent.
+ TQLineEdit::keyPressEvent( _ev );
+ // Never allow that keys are passed on to the tqparent.
_ev->accept();
return;
@@ -1420,20 +1420,20 @@ void LocationEditWidget::keyPressEvent( QKeyEvent * _ev )
// #### Torben says: This is duplicated code. Bad.
if ( m_pView->selectionInfo()->isSingular() ) {
setText( Cell::columnName( m_pView->canvasWidget()->markerColumn() )
- + QString::number( m_pView->canvasWidget()->markerRow() ) );
+ + TQString::number( m_pView->canvasWidget()->markerRow() ) );
} else {
setText( Cell::columnName( m_pView->selectionInfo()->lastRange().left() )
- + QString::number( m_pView->selectionInfo()->lastRange().top() )
+ + TQString::number( m_pView->selectionInfo()->lastRange().top() )
+ ":"
+ Cell::columnName( m_pView->selectionInfo()->lastRange().right() )
- + QString::number( m_pView->selectionInfo()->lastRange().bottom() ) );
+ + TQString::number( m_pView->selectionInfo()->lastRange().bottom() ) );
}
m_pView->canvasWidget()->setFocus();
_ev->accept();
break;
default:
- QLineEdit::keyPressEvent( _ev );
- // Never allow that keys are passed on to the parent.
+ TQLineEdit::keyPressEvent( _ev );
+ // Never allow that keys are passed on to the tqparent.
_ev->accept();
}
}
@@ -1448,14 +1448,14 @@ void LocationEditWidget::keyPressEvent( QKeyEvent * _ev )
*
****************************************************************/
-EditWidget::EditWidget( QWidget *_parent, Canvas *_canvas,
- QButton *cancelButton, QButton *okButton )
- : QLineEdit( _parent, "EditWidget" )
+EditWidget::EditWidget( TQWidget *_parent, Canvas *_canvas,
+ TQButton *cancelButton, TQButton *okButton )
+ : TQLineEdit( _parent, "EditWidget" )
{
m_pCanvas = _canvas;
Q_ASSERT(m_pCanvas != NULL);
// Those buttons are created by the caller, so that they are inserted
- // properly in the layout - but they are then managed here.
+ // properly in the tqlayout - but they are then managed here.
m_pCancelButton = cancelButton;
m_pOkButton = okButton;
isArray = false;
@@ -1465,10 +1465,10 @@ EditWidget::EditWidget( QWidget *_parent, Canvas *_canvas,
if ( !m_pCanvas->doc()->isReadWrite() || !m_pCanvas->activeSheet() )
setEnabled( false );
- QObject::connect( m_pCancelButton, SIGNAL( clicked() ),
- this, SLOT( slotAbortEdit() ) );
- QObject::connect( m_pOkButton, SIGNAL( clicked() ),
- this, SLOT( slotDoneEdit() ) );
+ TQObject::connect( m_pCancelButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotAbortEdit() ) );
+ TQObject::connect( m_pOkButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( slotDoneEdit() ) );
setEditMode( false ); // disable buttons
}
@@ -1502,16 +1502,16 @@ void EditWidget::slotDoneEdit()
// will take care of the buttons
}
-void EditWidget::keyPressEvent ( QKeyEvent* _ev )
+void EditWidget::keyPressEvent ( TQKeyEvent* _ev )
{
// Dont handle special keys and accelerators, except Enter ones
- if (( ( _ev->state() & ( Qt::AltButton | Qt::ControlButton ) )
- || ( _ev->state() & Qt::ShiftButton )
+ if (( ( _ev->state() & ( TQt::AltButton | TQt::ControlButton ) )
+ || ( _ev->state() & TQt::ShiftButton )
|| ( _ev->key() == Key_Shift )
|| ( _ev->key() == Key_Control ) )
&& (_ev->key() != Key_Return) && (_ev->key() != Key_Enter))
{
- QLineEdit::keyPressEvent( _ev );
+ TQLineEdit::keyPressEvent( _ev );
_ev->accept();
return;
}
@@ -1537,9 +1537,9 @@ void EditWidget::keyPressEvent ( QKeyEvent* _ev )
// in this widget, since only up and down would work anyway.
// This is why we call slotDoneEdit now, instead of sending
// to the canvas.
- //QApplication::sendEvent( m_pCanvas, _ev );
- isArray = (_ev->state() & Qt::AltButton) &&
- (_ev->state() & Qt::ControlButton);
+ //TQApplication::sendEvent( m_pCanvas, _ev );
+ isArray = (_ev->state() & TQt::AltButton) &&
+ (_ev->state() & TQt::ControlButton);
slotDoneEdit();
m_pCanvas->view()->updateEditWidget();
_ev->accept();
@@ -1551,7 +1551,7 @@ void EditWidget::keyPressEvent ( QKeyEvent* _ev )
break;
default:
- QLineEdit::keyPressEvent( _ev );
+ TQLineEdit::keyPressEvent( _ev );
setFocus();
cellEditor->setCheckChoice( false );
@@ -1567,21 +1567,21 @@ void EditWidget::setEditMode( bool mode )
m_pOkButton->setEnabled(mode);
}
-void EditWidget::focusOutEvent( QFocusEvent* ev )
+void EditWidget::focusOutEvent( TQFocusEvent* ev )
{
//kdDebug(36001) << "EditWidget lost focus" << endl;
// See comment about setLastEditorWithFocus
m_pCanvas->setLastEditorWithFocus( Canvas::EditWidget );
- QLineEdit::focusOutEvent( ev );
+ TQLineEdit::focusOutEvent( ev );
}
-void EditWidget::setText( const QString& t )
+void EditWidget::setText( const TQString& t )
{
if ( t == text() ) // Why this? (David)
return;
- QLineEdit::setText( t );
+ TQLineEdit::setText( t );
}
diff --git a/kspread/kspread_editors.h b/kspread/kspread_editors.h
index b5c73da3..63651717 100644
--- a/kspread/kspread_editors.h
+++ b/kspread/kspread_editors.h
@@ -24,17 +24,17 @@
#include <vector>
-#include <qsyntaxhighlighter.h>
-#include <qwidget.h>
+#include <tqsyntaxhighlighter.h>
+#include <tqwidget.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <ksharedptr.h>
class KTextEdit;
-class QFont;
-class QButton;
-class QTextCursor;
+class TQFont;
+class TQButton;
+class TQTextCursor;
namespace KSpread
{
@@ -52,23 +52,23 @@ class View;
* Colours cell references in formulas. Installed by CellEditor instances in
* the constructor.
*/
-class FormulaEditorHighlighter : public QSyntaxHighlighter
+class FormulaEditorHighlighter : public TQSyntaxHighlighter
{
public:
/**
- * Constructs a FormulaHighlighter to colour-code cell references in a QTextEdit.
+ * Constructs a FormulaHighlighter to colour-code cell references in a TQTextEdit.
*
- * @param textEdit The QTextEdit widget which the highlighter should operate on
+ * @param textEdit The TQTextEdit widget which the highlighter should operate on
* @param canvas The Canvas object
*/
- FormulaEditorHighlighter(QTextEdit* textEdit, Canvas* canvas);
+ FormulaEditorHighlighter(TQTextEdit* textEdit, Canvas* canvas);
virtual ~FormulaEditorHighlighter();
/**
* Called automatically by KTextEditor to highlight text when modified.
*/
- virtual int highlightParagraph(const QString& text, int endStateOfLastPara);
+ virtual int highlightParagraph(const TQString& text, int endStateOfLastPara);
/**
*
*/
@@ -117,9 +117,10 @@ private:
* can select from. If the user selects a function name from the list,
* the @ref FunctionCompletion::selectedCompletion() signal is emitted
*/
-class FunctionCompletion : public QObject
+class FunctionCompletion : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -129,7 +130,7 @@ public:
/**
* Handles various keyboard and mouse actions which may occur on the autocompletion popup list
*/
- bool eventFilter( QObject *o, QEvent *e );
+ bool eventFilter( TQObject *o, TQEvent *e );
/**
* Hides the autocompletion list box if it is visible and emits the @ref selectedCompletion signal.
@@ -140,16 +141,16 @@ public:
* Populates the autocompletion list box with the specified choices and shows it so that the user can view and select a function name.
* @param choices A list of possible function names which match the characters that the user has already entered.
*/
- void showCompletion( const QStringList &choices );
+ void showCompletion( const TQStringList &choices );
private slots:
- void itemSelected( const QString& item );
+ void itemSelected( const TQString& item );
signals:
/**
* Emitted, if the user selects a function name from the list.
*/
- void selectedCompletion( const QString& item );
+ void selectedCompletion( const TQString& item );
private:
class Private;
@@ -163,17 +164,18 @@ private:
/**
* class CellEditor
*/
-class CellEditor : public QWidget
+class CellEditor : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Creates a new CellEditor.
* @param cell The spreadsheet cell to associate the cell text editor with
* @param _parent The @ref Canvas object to associate this cell text editor with
- * @param captureAllKeyEvents Controls whether or not the text editor swallows arrow key events or sends them to the parent canvas instead. If this is set to true, pressing the arrow keys will navigate backwards and forwards through the text in the editor. If it is false, the key events will be sent to the parent canvas which will change the cell being edited (depending on the direction of the arrow pressed). Generally this should be set to true if the user double clicks on the cell to edit it, and false if the user initiates editing by typing whilst the cell is selected.
- * @param _name This parameter is sent to the QObject constructor
+ * @param captureAllKeyEvents Controls whether or not the text editor swallows arrow key events or sends them to the tqparent canvas instead. If this is set to true, pressing the arrow keys will navigate backwards and forwards through the text in the editor. If it is false, the key events will be sent to the tqparent canvas which will change the cell being edited (depending on the direction of the arrow pressed). Generally this should be set to true if the user double clicks on the cell to edit it, and false if the user initiates editing by typing whilst the cell is selected.
+ * @param _name This parameter is sent to the TQObject constructor
*/
CellEditor( Cell* cell, Canvas* _parent = 0, bool captureAllKeyEvents = false, const char* _name = 0 );
~CellEditor();
@@ -181,17 +183,17 @@ public:
Cell* cell() const;
Canvas* canvas() const;
- void handleKeyPressEvent( QKeyEvent* _ev );
- void handleIMEvent( QIMEvent * _ev );
- void setEditorFont(QFont const & font, bool updateSize);
+ void handleKeyPressEvent( TQKeyEvent* _ev );
+ void handleIMEvent( TQIMEvent * _ev );
+ void setEditorFont(TQFont const & font, bool updateSize);
int cursorPosition() const;
void setCursorPosition(int pos);
- void setText(QString text);
+ void setText(TQString text);
/** wrapper to KTextEdit::text() */
- QString text() const;
+ TQString text() const;
/** wrapper to KTextEdit::cut() */
void cut();
@@ -200,7 +202,7 @@ public:
/** wrapper to KTextEdit::copy() */
void copy();
- QPoint globalCursorPosition() const;
+ TQPoint globalCursorPosition() const;
bool checkChoice();
void setCheckChoice(bool b);
@@ -214,20 +216,20 @@ private slots:
void slotTextChanged();
void slotCompletionModeChanged(KGlobalSettings::Completion _completion);
void slotCursorPositionChanged(int para,int pos);
- void slotTextCursorChanged(QTextCursor*);
+ void slotTextCursorChanged(TQTextCursor*);
protected:
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
/**
- * Steals some key events from the QLineEdit and sends
- * it to the @ref Canvas ( its parent ) instead.
+ * Steals some key events from the TQLineEdit and sends
+ * it to the @ref Canvas ( its tqparent ) instead.
*/
- bool eventFilter( QObject* o, QEvent* e );
+ bool eventFilter( TQObject* o, TQEvent* e );
protected slots:
void checkFunctionAutoComplete();
void triggerFunctionAutoComplete();
- void functionAutoComplete( const QString& item );
+ void functionAutoComplete( const TQString& item );
private:
class Private;
@@ -242,12 +244,13 @@ private:
class ComboboxLocationEditWidget : public KComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ComboboxLocationEditWidget( QWidget *_parent, View * _canvas );
+ ComboboxLocationEditWidget( TQWidget *_parent, View * _canvas );
public slots:
- void slotAddAreaName( const QString & );
- void slotRemoveAreaName( const QString & );
+ void slotAddAreaName( const TQString & );
+ void slotRemoveAreaName( const TQString & );
private:
LocationEditWidget *m_locationWidget;
};
@@ -261,18 +264,19 @@ private:
class LocationEditWidget : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- LocationEditWidget( QWidget *_parent, View * _canvas );
+ LocationEditWidget( TQWidget *_parent, View * _canvas );
View * view() const { return m_pView;}
- void addCompletionItem( const QString &_item );
- void removeCompletionItem( const QString &_item );
+ void addCompletionItem( const TQString &_item );
+ void removeCompletionItem( const TQString &_item );
private slots:
void slotActivateItem();
protected:
- virtual void keyPressEvent( QKeyEvent * _ev );
+ virtual void keyPressEvent( TQKeyEvent * _ev );
private:
View * m_pView;
KCompletion completionList;
@@ -285,14 +289,15 @@ private:
* The widget that appears above the sheet and allows to
* edit the cells content.
*/
-class EditWidget : public QLineEdit
+class EditWidget : public TQLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditWidget( QWidget *parent, Canvas *canvas,
- QButton *cancelButton, QButton *okButton);
+ EditWidget( TQWidget *tqparent, Canvas *canvas,
+ TQButton *cancelButton, TQButton *okButton);
- virtual void setText( const QString& t );
+ virtual void setText( const TQString& t );
// Go into edit mode (enable the buttons)
void setEditMode( bool mode );
@@ -303,12 +308,12 @@ public slots:
void slotDoneEdit();
protected:
- virtual void keyPressEvent ( QKeyEvent* _ev );
- virtual void focusOutEvent( QFocusEvent* ev );
+ virtual void keyPressEvent ( TQKeyEvent* _ev );
+ virtual void focusOutEvent( TQFocusEvent* ev );
private:
- QButton* m_pCancelButton;
- QButton* m_pOkButton;
+ TQButton* m_pCancelButton;
+ TQButton* m_pOkButton;
Canvas* m_pCanvas;
bool isArray;
};
diff --git a/kspread/kspread_events.cc b/kspread/kspread_events.cc
index fa02a412..7026be1d 100644
--- a/kspread/kspread_events.cc
+++ b/kspread/kspread_events.cc
@@ -6,7 +6,7 @@ using namespace KSpread;
const char *SelectionChanged::s_strSelectionChanged = "KSpread/View/SelectionChanged";
-SelectionChanged::SelectionChanged( const Region& region, const QString& sheet )
+SelectionChanged::SelectionChanged( const Region& region, const TQString& sheet )
: KParts::Event( s_strSelectionChanged )
{
m_region = region;
diff --git a/kspread/kspread_events.h b/kspread/kspread_events.h
index f573d843..1a240fdb 100644
--- a/kspread/kspread_events.h
+++ b/kspread/kspread_events.h
@@ -1,9 +1,9 @@
#ifndef KSPREAD_EVENTS
#define KSPREAD_EVENTS
-#include <qevent.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqevent.h>
+#include <tqrect.h>
+#include <tqstring.h>
#include <string.h>
@@ -17,18 +17,18 @@ namespace KSpread
class KSPREAD_EXPORT SelectionChanged : public KParts::Event
{
public:
- SelectionChanged( const Region&, const QString& sheet );
+ SelectionChanged( const Region&, const TQString& sheet );
~SelectionChanged();
Region region() const { return m_region; }
- QString sheet() const { return m_sheet; }
+ TQString sheet() const { return m_sheet; }
- static bool test( const QEvent* e ) { return KParts::Event::test( e, s_strSelectionChanged ); }
+ static bool test( const TQEvent* e ) { return KParts::Event::test( e, s_strSelectionChanged ); }
private:
static const char *s_strSelectionChanged;
Region m_region;
- QString m_sheet;
+ TQString m_sheet;
};
} // namespace KSpread
diff --git a/kspread/kspread_factory.cc b/kspread/kspread_factory.cc
index 53a9e3c7..dd000d2e 100644
--- a/kspread/kspread_factory.cc
+++ b/kspread/kspread_factory.cc
@@ -32,8 +32,8 @@ KInstance* Factory::s_global = 0;
DCOPObject* Factory::s_dcopObject = 0;
KAboutData* Factory::s_aboutData = 0;
-Factory::Factory( QObject* parent, const char* name )
- : KoFactory( parent, name )
+Factory::Factory( TQObject* tqparent, const char* name )
+ : KoFactory( tqparent, name )
{
//kdDebug(36001) << "Factory::Factory()" << endl;
// Create our instance, so that it becomes KGlobal::instance if the
@@ -53,11 +53,11 @@ Factory::~Factory()
s_dcopObject = 0L;
}
-KParts::Part* Factory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & )
+KParts::Part* Factory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & )
{
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- Doc *doc = new Doc( parentWidget, widgetName, parent, name, !bWantKoDocument );
+ Doc *doc = new Doc( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
if ( !bWantKoDocument )
doc->setReadWrite( false );
diff --git a/kspread/kspread_factory.h b/kspread/kspread_factory.h
index b31b4a56..bd2c896a 100644
--- a/kspread/kspread_factory.h
+++ b/kspread/kspread_factory.h
@@ -31,11 +31,12 @@ namespace KSpread
class Factory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- Factory( QObject* parent = 0, const char* name = 0 );
+ Factory( TQObject* tqparent = 0, const char* name = 0 );
~Factory();
- virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", 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 = "KoDocument", const TQStringList &args = TQStringList() );
static KInstance* global();
diff --git a/kspread/kspread_format.cc b/kspread/kspread_format.cc
index 13663f52..1b0e6d7a 100644
--- a/kspread/kspread_format.cc
+++ b/kspread/kspread_format.cc
@@ -1,5 +1,4 @@
-/* This file is part of the KDE project
- Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
+/* This file is part of the KDE project Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
Copyright (C) 2000 - 2005 The KSpread Team
www.koffice.org/kspread
@@ -65,7 +64,7 @@ double Format::s_rowHeight = 20.0;
Format::Format( Sheet * _sheet, Style * _style )
: m_pSheet( _sheet ),
m_pStyle( _style ),
- m_mask( 0 ),
+ m_tqmask( 0 ),
m_bNoFallBack( 0 ),
m_flagsMask( 0 ),
m_strComment( 0 ),
@@ -117,7 +116,7 @@ void Format::copy( const Format & _l )
setStyle( _l.m_pStyle );
- m_mask = _l.m_mask;
+ m_tqmask = _l.m_tqmask;
m_flagsMask = _l.m_flagsMask;
m_bNoFallBack = _l.m_bNoFallBack;
@@ -125,7 +124,7 @@ void Format::copy( const Format & _l )
{
if (m_strComment)
delete m_strComment;
- m_strComment = new QString( *_l.m_strComment );
+ m_strComment = new TQString( *_l.m_strComment );
}
}
@@ -148,29 +147,29 @@ void Format::setStyle( Style * style )
void Format::clearFlag( FormatFlags flag )
{
- m_flagsMask &= ~(Q_UINT32)flag;
+ m_flagsMask &= ~(TQ_UINT32)flag;
}
void Format::setFlag( FormatFlags flag )
{
- m_flagsMask |= (Q_UINT32)flag;
+ m_flagsMask |= (TQ_UINT32)flag;
}
bool Format::testFlag( FormatFlags flag ) const
{
- return ( m_flagsMask & (Q_UINT32)flag );
+ return ( m_flagsMask & (TQ_UINT32)flag );
}
void Format::clearProperties()
{
- m_mask = 0;
+ m_tqmask = 0;
m_pStyle->clearFeature( (Style::FlagsSet) ~(uint)0 );
formatChanged();
}
void Format::clearProperty( Properties p )
{
- m_mask &= ~(uint)p;
+ m_tqmask &= ~(uint)p;
m_pStyle->clearFeature( (Style::FlagsSet) p );
formatChanged();
}
@@ -182,12 +181,12 @@ bool Format::hasProperty( Properties p, bool withoutParent ) const
if ( m_pStyle->hasFeature( (Style::FlagsSet) p, withoutParent ) )
return true;
- return ( m_mask & (uint)p );
+ return ( m_tqmask & (uint)p );
}
void Format::setProperty( Properties p )
{
- m_mask |= (uint)p;
+ m_tqmask |= (uint)p;
}
void Format::clearNoFallBackProperties()
@@ -222,9 +221,9 @@ void Format::setNoFallBackProperties( Properties p )
/////////////
-QString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
+TQString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyles )
{
- QString styleName;
+ TQString styleName;
styleName = m_pStyle->saveOasis( currentCellStyle, mainStyles );
// user styles are already stored
@@ -236,9 +235,9 @@ QString Format::saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &m
return styleName;
}
-QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool force, bool copy ) const
+TQDomElement Format::saveFormat( TQDomDocument & doc, int _col, int _row, bool force, bool copy ) const
{
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
if ( m_pStyle->type() == Style::BUILTIN || m_pStyle->type() == Style::CUSTOM )
{
@@ -249,8 +248,8 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
else
{
- if ( m_pStyle->parent() && m_pStyle->parent()->name().length() > 0 )
- format.setAttribute( "parent", m_pStyle->parent()->name() );
+ if ( m_pStyle->tqparent() && m_pStyle->tqparent()->name().length() > 0 )
+ format.setAttribute( "tqparent", m_pStyle->tqparent()->name() );
}
if ( hasProperty( PAlign, true ) || hasNoFallBackProperties( PAlign ) || force )
@@ -282,7 +281,7 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
format.setAttribute( "format", (int)getFormatType( _col, _row ));
if ( hasProperty( PCustomFormat, true ) || hasNoFallBackProperties( PCustomFormat ) || force )
{
- QString s( getFormatString( _col, _row ) );
+ TQString s( getFormatString( _col, _row ) );
if ( s.length() > 0 )
format.setAttribute( "custom", s );
}
@@ -319,37 +318,37 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
if ( hasProperty( PLeftBorder, true ) || hasNoFallBackProperties( PLeftBorder ) || force )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", leftBorderPen( _col, _row ), doc ) );
format.appendChild( left );
}
if ( hasProperty( PTopBorder, true ) || hasNoFallBackProperties( PTopBorder ) || force )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", topBorderPen( _col, _row ), doc ) );
format.appendChild( top );
}
if ( hasProperty( PRightBorder, true ) || hasNoFallBackProperties( PRightBorder ) || force )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", rightBorderPen( _col, _row ), doc ) );
format.appendChild( right );
}
if ( hasProperty( PBottomBorder, true ) || hasNoFallBackProperties( PBottomBorder ) || force )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", bottomBorderPen( _col, _row ), doc ) );
format.appendChild( bottom );
}
if ( hasProperty( PFallDiagonal, true ) || hasNoFallBackProperties( PFallDiagonal ) || force )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", fallDiagonalPen( _col, _row ), doc ) );
format.appendChild( fallDiagonal );
}
if ( hasProperty( PGoUpDiagonal, true ) || hasNoFallBackProperties( PGoUpDiagonal ) || force )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", goUpDiagonalPen( _col, _row ), doc ) );
format.appendChild( goUpDiagonal );
}
@@ -357,9 +356,9 @@ QDomElement Format::saveFormat( QDomDocument & doc, int _col, int _row, bool for
}
-QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
+TQDomElement Format::saveFormat( TQDomDocument& doc, bool force, bool copy ) const
{
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
if ( m_pStyle->type() == Style::BUILTIN || m_pStyle->type() == Style::CUSTOM )
{
@@ -370,8 +369,8 @@ QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
}
else
{
- if ( m_pStyle->parent() && m_pStyle->parentName().length() > 0 )
- format.setAttribute( "parent", m_pStyle->parentName() );
+ if ( m_pStyle->tqparent() && m_pStyle->tqparentName().length() > 0 )
+ format.setAttribute( "tqparent", m_pStyle->tqparentName() );
}
if ( hasProperty( PAlign, true ) || hasNoFallBackProperties( PAlign ) || force )
@@ -440,50 +439,50 @@ QDomElement Format::saveFormat( QDomDocument& doc, bool force, bool copy ) const
}
if ( hasProperty( PLeftBorder, true ) || hasNoFallBackProperties( PLeftBorder ) || force )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", m_pStyle->leftBorderPen(), doc ) );
format.appendChild( left );
}
if ( hasProperty( PTopBorder, true ) || hasNoFallBackProperties( PTopBorder ) || force )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", m_pStyle->topBorderPen(), doc ) );
format.appendChild( top );
}
if ( hasProperty( PRightBorder, true ) || hasNoFallBackProperties( PRightBorder ) || force )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", m_pStyle->rightBorderPen(), doc ) );
format.appendChild( right );
}
if ( hasProperty( PBottomBorder, true ) || hasNoFallBackProperties( PBottomBorder ) || force )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", m_pStyle->bottomBorderPen(), doc ) );
format.appendChild( bottom );
}
if ( hasProperty( PFallDiagonal, true ) || hasNoFallBackProperties( PFallDiagonal ) || force )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", m_pStyle->fallDiagonalPen(), doc ) );
format.appendChild( fallDiagonal );
}
if ( hasProperty( PGoUpDiagonal, true ) || hasNoFallBackProperties( PGoUpDiagonal ) || force )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", m_pStyle->goUpDiagonalPen(), doc ) );
format.appendChild( goUpDiagonal );
}
return format;
}
-QDomElement Format::save( QDomDocument & doc, int _col, int _row, bool force, bool copy ) const
+TQDomElement Format::save( TQDomDocument & doc, int _col, int _row, bool force, bool copy ) const
{
- QDomElement format = saveFormat( doc, _col, _row, force, copy );
+ TQDomElement format = saveFormat( doc, _col, _row, force, copy );
return format;
}
-bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
+bool Format::loadFormat( const TQDomElement & f, Paste::Mode pm, bool paste )
{
if ( f.hasAttribute( "style-name" ) )
{
@@ -500,10 +499,10 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
return false;
}
else
- if ( f.hasAttribute( "parent" ) )
+ if ( f.hasAttribute( "tqparent" ) )
{
- CustomStyle* s = static_cast<CustomStyle*>( m_pSheet->doc()->styleManager()->style( f.attribute( "parent" ) ) );
- //kdDebug() << "Loading Style, parent: " << s->name() << ": " << s << endl;
+ CustomStyle* s = static_cast<CustomStyle*>( m_pSheet->doc()->styleManager()->style( f.attribute( "tqparent" ) ) );
+ //kdDebug() << "Loading Style, tqparent: " << s->name() << ": " << s << endl;
if ( s )
{
@@ -540,8 +539,8 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
}
if ( f.hasAttribute( "bgcolor" ) ) {
- QColor col( f.attribute( "bgcolor" ) );
- if ( col != Qt::white )
+ TQColor col( f.attribute( "bgcolor" ) );
+ if ( col != TQt::white )
setBgColor( col );
}
@@ -643,62 +642,62 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
}
if ( f.hasAttribute( "brushcolor" ) )
- setBackGroundBrushColor( QColor( f.attribute( "brushcolor" ) ) );
+ setBackGroundBrushColor( TQColor( f.attribute( "brushcolor" ) ) );
- QDomElement pen( f.namedItem( "pen" ).toElement() );
+ TQDomElement pen( f.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setTextPen( util_toPen( pen ) );
- QDomElement font( f.namedItem( "font" ).toElement() );
+ TQDomElement font( f.namedItem( "font" ).toElement() );
if ( !font.isNull() )
setTextFont( util_toFont( font ) );
if ( ( pm != Paste::NoBorder ) && ( pm != Paste::Text ) && ( pm != Paste::Comment ) )
{
- QDomElement left( f.namedItem( "left-border" ).toElement() );
+ TQDomElement left( f.namedItem( "left-border" ).toElement() );
if ( !left.isNull() )
{
- QDomElement pen( left.namedItem( "pen" ).toElement() );
+ TQDomElement pen( left.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setLeftBorderPen( util_toPen( pen ) );
}
- QDomElement top( f.namedItem( "top-border" ).toElement() );
+ TQDomElement top( f.namedItem( "top-border" ).toElement() );
if ( !top.isNull() )
{
- QDomElement pen( top.namedItem( "pen" ).toElement() );
+ TQDomElement pen( top.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setTopBorderPen( util_toPen( pen ) );
}
- QDomElement right( f.namedItem( "right-border" ).toElement() );
+ TQDomElement right( f.namedItem( "right-border" ).toElement() );
if ( !right.isNull() )
{
- QDomElement pen( right.namedItem( "pen" ).toElement() );
+ TQDomElement pen( right.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setRightBorderPen( util_toPen( pen ) );
}
- QDomElement bottom( f.namedItem( "bottom-border" ).toElement() );
+ TQDomElement bottom( f.namedItem( "bottom-border" ).toElement() );
if ( !bottom.isNull() )
{
- QDomElement pen( bottom.namedItem( "pen" ).toElement() );
+ TQDomElement pen( bottom.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setBottomBorderPen( util_toPen( pen ) );
}
- QDomElement fallDiagonal( f.namedItem( "fall-diagonal" ).toElement() );
+ TQDomElement fallDiagonal( f.namedItem( "fall-diagonal" ).toElement() );
if ( !fallDiagonal.isNull() )
{
- QDomElement pen( fallDiagonal.namedItem( "pen" ).toElement() );
+ TQDomElement pen( fallDiagonal.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setFallDiagonalPen( util_toPen( pen ) );
}
- QDomElement goUpDiagonal( f.namedItem( "up-diagonal" ).toElement() );
+ TQDomElement goUpDiagonal( f.namedItem( "up-diagonal" ).toElement() );
if ( !goUpDiagonal.isNull() )
{
- QDomElement pen( goUpDiagonal.namedItem( "pen" ).toElement() );
+ TQDomElement pen( goUpDiagonal.namedItem( "pen" ).toElement() );
if ( !pen.isNull() )
setGoUpDiagonalPen( util_toPen( pen ) );
}
@@ -712,7 +711,7 @@ bool Format::loadFormat( const QDomElement & f, Paste::Mode pm, bool paste )
return true;
}
-bool Format::load( const QDomElement & f, Paste::Mode pm, bool paste )
+bool Format::load( const TQDomElement & f, Paste::Mode pm, bool paste )
{
if ( !loadFormat( f, pm, paste ) )
return false;
@@ -730,7 +729,7 @@ bool Format::loadFontOasisStyle( KoStyleStack & font )
setTextFontFamily( font.attributeNS( KoXmlNS::fo, "font-family" ) );
if ( font.hasAttributeNS( KoXmlNS::fo, "color" ) )
- setTextColor( QColor( font.attributeNS( KoXmlNS::fo, "color" ) ) );
+ setTextColor( TQColor( font.attributeNS( KoXmlNS::fo, "color" ) ) );
if ( font.hasAttributeNS( KoXmlNS::fo, "font-size" ) )
setTextFontSize( (int) KoUnit::parseValue( font.attributeNS( KoXmlNS::fo, "font-size" ), 10.0 ) );
@@ -764,9 +763,9 @@ bool Format::loadFontOasisStyle( KoStyleStack & font )
return true;
}
-void Format::loadOasisStyle( /*const QDomElement& style,*/ KoOasisLoadingContext& context )
+void Format::loadOasisStyle( /*const TQDomElement& style,*/ KoOasisLoadingContext& context )
{
- QString str; // multi purpose string
+ TQString str; // multi purpose string
KoOasisStyles& oasisStyles = context.oasisStyles();
/* context.styleStack().save();
@@ -789,7 +788,7 @@ void Format::loadOasisStyle( /*const QDomElement& style,*/ KoOasisLoadingContext
if ( !str.isEmpty() )
{
- QString tmp = oasisStyles.dataFormats()[str].prefix;
+ TQString tmp = oasisStyles.dataFormats()[str].prefix;
if ( !tmp.isEmpty() )
{
setPrefix( tmp );
@@ -836,10 +835,10 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
return false;
}
else
- if ( f.hasAttribute( "parent" ) )
+ if ( f.hasAttribute( "tqparent" ) )
{
- CustomStyle * s = (CustomStyle *) m_pSheet->doc()->styleManager()->style( f.attribute( "parent" ) );
- //kdDebug() << "Loading Style, parent: " << s->name() << ": " << s << endl;
+ CustomStyle * s = (CustomStyle *) m_pSheet->doc()->styleManager()->style( f.attribute( "tqparent" ) );
+ //kdDebug() << "Loading Style, tqparent: " << s->name() << ": " << s << endl;
if ( s )
{
@@ -851,9 +850,9 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
}
#endif
- if ( styleStack.hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
+ if ( styleStack.hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
{
- Style * s = m_pSheet->doc()->styleManager()->style( styleStack.attributeNS( KoXmlNS::style, "parent-style-name" ) );
+ Style * s = m_pSheet->doc()->styleManager()->style( styleStack.attributeNS( KoXmlNS::style, "tqparent-style-name" ) );
//kdDebug() << "Using style: " << f.attribute( "style-name" ) << ", s: " << s << endl;
if ( s )
@@ -869,7 +868,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::style, "font-name" ) )
{
- const QDomElement * font = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::style, "font-name" ) );
+ const TQDomElement * font = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::style, "font-name" ) );
if ( font )
{
styleStack.save();
@@ -895,7 +894,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
//kdDebug()<<"property.hasAttribute( fo:text-align ) :"<<styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" )<<endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" ) )
{
- QString s = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
+ TQString s = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
if ( s == "center" )
setAlign( Format::Center );
else if ( s == "end" )
@@ -929,7 +928,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "direction" ) )
{
- QString dir = styleStack.attributeNS( KoXmlNS::fo, "direction" );
+ TQString dir = styleStack.attributeNS( KoXmlNS::fo, "direction" );
if ( dir == "ttb" )
setVerticalText( true );
else if ( dir == "ltr" )
@@ -939,7 +938,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
kdDebug()<<"property.hasAttribute( fo:background-color ) :"<<styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" )<<endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) )
- setBgColor( QColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) ) );
+ setBgColor( TQColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) ) );
if ( styleStack.hasAttributeNS( KoXmlNS::style, "print-content" ) )
{
@@ -948,7 +947,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "cell-protect" ) )
{
- QString prot( styleStack.attributeNS( KoXmlNS::style, "cell-protect" ) );
+ TQString prot( styleStack.attributeNS( KoXmlNS::style, "cell-protect" ) );
if ( prot == "none" )
{
setNotProtected( true );
@@ -989,7 +988,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::style, "vertical-align" ) )
{
- QString s = styleStack.attributeNS( KoXmlNS::style, "vertical-align" );
+ TQString s = styleStack.attributeNS( KoXmlNS::style, "vertical-align" );
if ( s == "middle" )
setAlignY( Format::Middle );
else if ( s == "bottom" )
@@ -1001,7 +1000,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "wrap-option" ) )
{
// we do not support anything else yet
- QString wrapOpt = styleStack.attributeNS( KoXmlNS::fo, "wrap-option" );
+ TQString wrapOpt = styleStack.attributeNS( KoXmlNS::fo, "wrap-option" );
if ( wrapOpt == "wrap" )
setMultiRow( true );
else if ( wrapOpt == "no-wrap" )
@@ -1033,7 +1032,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "border" ) )
{
- QPen pen = convertOasisStringToPen( styleStack.attributeNS( KoXmlNS::fo, "border" ) );
+ TQPen pen = convertOasisStringToPen( styleStack.attributeNS( KoXmlNS::fo, "border" ) );
setLeftBorderPen( pen );
setRightBorderPen( pen );
setTopBorderPen( pen );
@@ -1054,7 +1053,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
{
//kdDebug()<<" style name :"<<styleStack.attributeNS( KoXmlNS::draw, "style-name" )<<endl;
- const QDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
+ const TQDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
if ( style )
{
//kdDebug()<<" style :"<<style<<endl;
@@ -1063,12 +1062,12 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
drawStyleStack.setTypeProperties( "graphic" );
if ( drawStyleStack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
{
- const QString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
+ const TQString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
kdDebug()<<" load object gradient fill type :"<<fill<<endl;
if ( fill == "solid" || fill == "hatch" )
{
- QBrush brush=KoOasisStyles::loadOasisFillStyle( drawStyleStack, fill, oasisStyles );
+ TQBrush brush=KoOasisStyles::loadOasisFillStyle( drawStyleStack, fill, oasisStyles );
setBackGroundBrushStyle( brush.style() );
setBackGroundBrushColor( brush.color() );
}
@@ -1089,7 +1088,7 @@ bool Format::loadOasisStyleProperties( KoStyleStack & styleStack, const KoOasisS
//
/////////////
-void Format::setFormatString( QString const & format )
+void Format::setFormatString( TQString const & format )
{
if ( format.isEmpty() )
{
@@ -1154,7 +1153,7 @@ void Format::setAlignY( AlignY _alignY)
formatChanged();
}
-void Format::setPrefix( const QString& _prefix )
+void Format::setPrefix( const TQString& _prefix )
{
if ( _prefix.isEmpty() )
{
@@ -1171,7 +1170,7 @@ void Format::setPrefix( const QString& _prefix )
formatChanged();
}
-void Format::setPostfix( const QString& _postfix )
+void Format::setPostfix( const TQString& _postfix )
{
if ( _postfix.isEmpty() )
{
@@ -1205,9 +1204,9 @@ void Format::setPrecision( int _p )
formatChanged();
}
-void Format::setLeftBorderPen( const QPen & _p )
+void Format::setLeftBorderPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PLeftBorder );
setNoFallBackProperties( PLeftBorder );
@@ -1224,28 +1223,28 @@ void Format::setLeftBorderPen( const QPen & _p )
void Format::setLeftBorderStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setStyle( s );
setLeftBorderPen( p );
}
-void Format::setLeftBorderColor( const QColor & c )
+void Format::setLeftBorderColor( const TQColor & c )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setColor( c );
setLeftBorderPen( p );
}
void Format::setLeftBorderWidth( int _w )
{
- QPen p( m_pStyle->leftBorderPen() );
+ TQPen p( m_pStyle->leftBorderPen() );
p.setWidth( _w );
setLeftBorderPen( p );
}
-void Format::setTopBorderPen( const QPen & _p )
+void Format::setTopBorderPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PTopBorder );
setNoFallBackProperties( PTopBorder );
@@ -1262,28 +1261,28 @@ void Format::setTopBorderPen( const QPen & _p )
void Format::setTopBorderStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setStyle( s );
setTopBorderPen( p );
}
-void Format::setTopBorderColor( const QColor& c )
+void Format::setTopBorderColor( const TQColor& c )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setColor( c );
setTopBorderPen( p );
}
void Format::setTopBorderWidth( int _w )
{
- QPen p( m_pStyle->topBorderPen() );
+ TQPen p( m_pStyle->topBorderPen() );
p.setWidth( _w );
setTopBorderPen( p );
}
-void Format::setRightBorderPen( const QPen& p )
+void Format::setRightBorderPen( const TQPen& p )
{
- if ( p.style() == Qt::NoPen )
+ if ( p.style() == TQt::NoPen )
{
clearProperty( PRightBorder );
setNoFallBackProperties( PRightBorder );
@@ -1300,28 +1299,28 @@ void Format::setRightBorderPen( const QPen& p )
void Format::setRightBorderStyle( Qt::PenStyle _s )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setStyle( _s );
setRightBorderPen( p );
}
-void Format::setRightBorderColor( const QColor & _c )
+void Format::setRightBorderColor( const TQColor & _c )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setColor( _c );
setRightBorderPen( p );
}
void Format::setRightBorderWidth( int _w )
{
- QPen p( m_pStyle->rightBorderPen() );
+ TQPen p( m_pStyle->rightBorderPen() );
p.setWidth( _w );
setRightBorderPen( p );
}
-void Format::setBottomBorderPen( const QPen& p )
+void Format::setBottomBorderPen( const TQPen& p )
{
- if ( p.style() == Qt::NoPen )
+ if ( p.style() == TQt::NoPen )
{
clearProperty( PBottomBorder );
setNoFallBackProperties( PBottomBorder );
@@ -1338,28 +1337,28 @@ void Format::setBottomBorderPen( const QPen& p )
void Format::setBottomBorderStyle( Qt::PenStyle _s )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setStyle( _s );
setBottomBorderPen( p );
}
-void Format::setBottomBorderColor( const QColor & _c )
+void Format::setBottomBorderColor( const TQColor & _c )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setColor( _c );
setBottomBorderPen( p );
}
void Format::setBottomBorderWidth( int _w )
{
- QPen p( m_pStyle->bottomBorderPen() );
+ TQPen p( m_pStyle->bottomBorderPen() );
p.setWidth( _w );
setBottomBorderPen( p );
}
-void Format::setFallDiagonalPen( const QPen & _p )
+void Format::setFallDiagonalPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PFallDiagonal );
setNoFallBackProperties( PFallDiagonal );
@@ -1376,28 +1375,28 @@ void Format::setFallDiagonalPen( const QPen & _p )
void Format::setFallDiagonalStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setStyle( s );
setFallDiagonalPen( p );
}
-void Format::setFallDiagonalColor( const QColor& c )
+void Format::setFallDiagonalColor( const TQColor& c )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setColor( c );
setFallDiagonalPen( p );
}
void Format::setFallDiagonalWidth( int _w )
{
- QPen p( m_pStyle->fallDiagonalPen() );
+ TQPen p( m_pStyle->fallDiagonalPen() );
p.setWidth( _w );
setFallDiagonalPen( p );
}
-void Format::setGoUpDiagonalPen( const QPen & _p )
+void Format::setGoUpDiagonalPen( const TQPen & _p )
{
- if ( _p.style() == Qt::NoPen )
+ if ( _p.style() == TQt::NoPen )
{
clearProperty( PGoUpDiagonal );
setNoFallBackProperties( PGoUpDiagonal );
@@ -1414,28 +1413,28 @@ void Format::setGoUpDiagonalPen( const QPen & _p )
void Format::setGoUpDiagonalStyle( Qt::PenStyle s )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setStyle( s );
setGoUpDiagonalPen( p );
}
-void Format::setGoUpDiagonalColor( const QColor& c )
+void Format::setGoUpDiagonalColor( const TQColor& c )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setColor( c );
setGoUpDiagonalPen( p );
}
void Format::setGoUpDiagonalWidth( int _w )
{
- QPen p( m_pStyle->goUpDiagonalPen() );
+ TQPen p( m_pStyle->goUpDiagonalPen() );
p.setWidth( _w );
setGoUpDiagonalPen( p );
}
-void Format::setBackGroundBrush( const QBrush & _p)
+void Format::setBackGroundBrush( const TQBrush & _p)
{
- if ( _p.style() == Qt::NoBrush )
+ if ( _p.style() == TQt::NoBrush )
{
clearProperty( PBackgroundBrush );
setNoFallBackProperties( PBackgroundBrush );
@@ -1452,26 +1451,26 @@ void Format::setBackGroundBrush( const QBrush & _p)
void Format::setBackGroundBrushStyle( Qt::BrushStyle s )
{
- QBrush b( m_pStyle->backGroundBrush() );
+ TQBrush b( m_pStyle->backGroundBrush() );
b.setStyle( s );
setBackGroundBrush( b );
}
-void Format::setBackGroundBrushColor( const QColor & c )
+void Format::setBackGroundBrushColor( const TQColor & c )
{
- QBrush b( m_pStyle->backGroundBrush() );
+ TQBrush b( m_pStyle->backGroundBrush() );
b.setColor( c );
setBackGroundBrush( b );
}
-void Format::setTextFont( const QFont & _f )
+void Format::setTextFont( const TQFont & _f )
{
- if( m_pStyle->parent() && _f == m_pStyle->parent()->font())
+ if( m_pStyle->tqparent() && _f == m_pStyle->tqparent()->font())
{
clearProperty( PFont );
setNoFallBackProperties( PFont );
}
- else if( !m_pStyle->parent() && _f == KoGlobal::defaultFont() )
+ else if( !m_pStyle->tqparent() && _f == KoGlobal::defaultFont() )
{
clearProperty( PFont );
setNoFallBackProperties( PFont );
@@ -1489,47 +1488,47 @@ void Format::setTextFont( const QFont & _f )
void Format::setTextFontSize( int _s )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setPointSize( _s );
setTextFont( f );
}
-void Format::setTextFontFamily( const QString & _f )
+void Format::setTextFontFamily( const TQString & _f )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setFamily( _f );
setTextFont( f );
}
void Format::setTextFontBold( bool _b )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setBold( _b );
setTextFont( f );
}
void Format::setTextFontItalic( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setItalic( _i );
setTextFont( f );
}
void Format::setTextFontUnderline( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setUnderline( _i );
setTextFont( f );
}
void Format::setTextFontStrike( bool _i )
{
- QFont f( m_pStyle->font() );
+ TQFont f( m_pStyle->font() );
f.setStrikeOut( _i );
setTextFont( f );
}
-void Format::setTextPen( const QPen & _p )
+void Format::setTextPen( const TQPen & _p )
{
// An invalid color means "the default text color, from the color scheme"
// It doesn't mean "no setting here, look at fallback"
@@ -1551,14 +1550,14 @@ void Format::setTextPen( const QPen & _p )
formatChanged();
}
-void Format::setTextColor( const QColor & _c )
+void Format::setTextColor( const TQColor & _c )
{
- QPen p( m_pStyle->pen() );
+ TQPen p( m_pStyle->pen() );
p.setColor( _c );
setTextPen( p );
}
-void Format::setBgColor( const QColor & _c )
+void Format::setBgColor( const TQColor & _c )
{
if ( !_c.isValid() )
{
@@ -1676,7 +1675,7 @@ void Format::setIndent( double _indent )
formatChanged();
}
-void Format::setComment( const QString & _comment )
+void Format::setComment( const TQString & _comment )
{
if ( _comment.isEmpty() )
{
@@ -1692,7 +1691,7 @@ void Format::setComment( const QString & _comment )
// not part of the style
delete m_strComment;
if ( !_comment.isEmpty() )
- m_strComment = new QString( _comment );
+ m_strComment = new TQString( _comment );
else
m_strComment = 0;
formatChanged();
@@ -1771,7 +1770,7 @@ void Format::setCurrency( Currency const & c )
m_pStyle = m_pStyle->setCurrency( c );
}
-void Format::setCurrency( int type, QString const & symbol )
+void Format::setCurrency( int type, TQString const & symbol )
{
Currency c;
@@ -1793,7 +1792,7 @@ void Format::setCurrency( int type, QString const & symbol )
//
/////////////
-QString const & Format::getFormatString( int col, int row ) const
+TQString const & Format::getFormatString( int col, int row ) const
{
if ( !hasProperty( PCustomFormat, false ) && !hasNoFallBackProperties( PCustomFormat ))
{
@@ -1804,7 +1803,7 @@ QString const & Format::getFormatString( int col, int row ) const
return m_pStyle->strFormat();
}
-QString Format::prefix( int col, int row ) const
+TQString Format::prefix( int col, int row ) const
{
if ( !hasProperty( PPrefix, false ) && !hasNoFallBackProperties(PPrefix ))
{
@@ -1815,7 +1814,7 @@ QString Format::prefix( int col, int row ) const
return m_pStyle->prefix();
}
-QString Format::postfix( int col, int row ) const
+TQString Format::postfix( int col, int row ) const
{
if ( !hasProperty( PPostfix, false ) && !hasNoFallBackProperties(PPostfix ))
{
@@ -1826,7 +1825,7 @@ QString Format::postfix( int col, int row ) const
return m_pStyle->postfix();
}
-const QPen& Format::fallDiagonalPen( int col, int row ) const
+const TQPen& Format::fallDiagonalPen( int col, int row ) const
{
if ( !hasProperty( PFallDiagonal, false ) && !hasNoFallBackProperties(PFallDiagonal ))
{
@@ -1847,12 +1846,12 @@ Qt::PenStyle Format::fallDiagonalStyle( int col, int row ) const
return fallDiagonalPen( col, row ).style();
}
-const QColor & Format::fallDiagonalColor( int col, int row ) const
+const TQColor & Format::fallDiagonalColor( int col, int row ) const
{
return fallDiagonalPen( col, row ).color();
}
-const QPen & Format::goUpDiagonalPen( int col, int row ) const
+const TQPen & Format::goUpDiagonalPen( int col, int row ) const
{
if ( !hasProperty( PGoUpDiagonal, false ) && !hasNoFallBackProperties( PGoUpDiagonal ) )
{
@@ -1873,7 +1872,7 @@ Qt::PenStyle Format::goUpDiagonalStyle( int col, int row ) const
return goUpDiagonalPen( col, row ).style();
}
-const QColor& Format::goUpDiagonalColor( int col, int row ) const
+const TQColor& Format::goUpDiagonalColor( int col, int row ) const
{
return goUpDiagonalPen( col, row ).color();
}
@@ -1934,7 +1933,7 @@ uint Format::topBorderValue( int col, int row ) const
return m_pStyle->topPenValue();
}
-const QPen& Format::leftBorderPen( int col, int row ) const
+const TQPen& Format::leftBorderPen( int col, int row ) const
{
if ( !hasProperty( PLeftBorder, false ) && !hasNoFallBackProperties( PLeftBorder ) )
{
@@ -1952,7 +1951,7 @@ Qt::PenStyle Format::leftBorderStyle( int col, int row ) const
return leftBorderPen( col, row ).style();
}
-const QColor& Format::leftBorderColor( int col, int row ) const
+const TQColor& Format::leftBorderColor( int col, int row ) const
{
return leftBorderPen( col, row ).color();
}
@@ -1962,7 +1961,7 @@ int Format::leftBorderWidth( int col, int row ) const
return leftBorderPen( col, row ).width();
}
-const QPen& Format::topBorderPen( int col, int row ) const
+const TQPen& Format::topBorderPen( int col, int row ) const
{
if ( !hasProperty( PTopBorder, false ) && !hasNoFallBackProperties( PTopBorder ) )
{
@@ -1975,7 +1974,7 @@ const QPen& Format::topBorderPen( int col, int row ) const
return m_pStyle->topBorderPen();
}
-const QColor& Format::topBorderColor( int col, int row ) const
+const TQColor& Format::topBorderColor( int col, int row ) const
{
return topBorderPen( col, row ).color();
}
@@ -1990,7 +1989,7 @@ int Format::topBorderWidth( int col, int row ) const
return topBorderPen( col, row ).width();
}
-const QPen& Format::rightBorderPen( int col, int row ) const
+const TQPen& Format::rightBorderPen( int col, int row ) const
{
if ( !hasProperty( PRightBorder, false ) && !hasNoFallBackProperties( PRightBorder ) )
{
@@ -2013,12 +2012,12 @@ Qt::PenStyle Format::rightBorderStyle( int col, int row ) const
return rightBorderPen( col, row ).style();
}
-const QColor& Format::rightBorderColor( int col, int row ) const
+const TQColor& Format::rightBorderColor( int col, int row ) const
{
return rightBorderPen( col, row ).color();
}
-const QPen& Format::bottomBorderPen( int col, int row ) const
+const TQPen& Format::bottomBorderPen( int col, int row ) const
{
if ( !hasProperty( PBottomBorder, false )&& !hasNoFallBackProperties( PBottomBorder ) )
{
@@ -2041,12 +2040,12 @@ Qt::PenStyle Format::bottomBorderStyle( int col, int row ) const
return bottomBorderPen( col, row ).style();
}
-const QColor& Format::bottomBorderColor( int col, int row ) const
+const TQColor& Format::bottomBorderColor( int col, int row ) const
{
return bottomBorderPen( col, row ).color();
}
-const QBrush& Format::backGroundBrush( int col, int row ) const
+const TQBrush& Format::backGroundBrush( int col, int row ) const
{
if ( !hasProperty( PBackgroundBrush, false ) && !hasNoFallBackProperties(PBackgroundBrush ))
{
@@ -2062,7 +2061,7 @@ Qt::BrushStyle Format::backGroundBrushStyle( int col, int row ) const
return backGroundBrush( col, row ).style();
}
-const QColor& Format::backGroundBrushColor( int col, int row ) const
+const TQColor& Format::backGroundBrushColor( int col, int row ) const
{
return backGroundBrush( col, row ).color();
}
@@ -2100,7 +2099,7 @@ Format::FloatColor Format::floatColor( int col, int row ) const
return m_pStyle->floatColor();
}
-const QColor& Format::bgColor( int col, int row ) const
+const TQColor& Format::bgColor( int col, int row ) const
{
if ( !hasProperty( PBackgroundColor, false ) && !hasNoFallBackProperties( PBackgroundColor ) )
{
@@ -2112,7 +2111,7 @@ const QColor& Format::bgColor( int col, int row ) const
return m_pStyle->bgColor();
}
-const QPen& Format::textPen( int col, int row ) const
+const TQPen& Format::textPen( int col, int row ) const
{
if ( !hasProperty( PTextPen, false ) && !hasNoFallBackProperties( PTextPen ) )
{
@@ -2123,12 +2122,12 @@ const QPen& Format::textPen( int col, int row ) const
return m_pStyle->pen();
}
-const QColor& Format::textColor( int col, int row ) const
+const TQColor& Format::textColor( int col, int row ) const
{
return textPen( col, row ).color();
}
-const QFont Format::textFont( int col, int row ) const
+const TQFont Format::textFont( int col, int row ) const
{
if ( !hasProperty( PFont, false ) && !hasNoFallBackProperties( PFont ) )
{
@@ -2152,7 +2151,7 @@ int Format::textFontSize( int col, int row ) const
return m_pStyle->fontSize();
}
-QString const & Format::textFontFamily( int col, int row ) const
+TQString const & Format::textFontFamily( int col, int row ) const
{
if ( !hasProperty( PFont, false ) && !hasNoFallBackProperties( PFont ) )
{
@@ -2284,7 +2283,7 @@ int Format::getAngle( int col, int row ) const
return m_pStyle->rotateAngle();
}
-QString Format::comment( int col, int row ) const
+TQString Format::comment( int col, int row ) const
{
if ( !hasProperty( PComment, false ) && !hasNoFallBackProperties( PComment ))
{
@@ -2294,13 +2293,13 @@ QString Format::comment( int col, int row ) const
}
if ( !m_strComment )
- return QString::null;
+ return TQString();
// not part of the style
return *m_strComment;
}
-QString * Format::commentP( int col, int row ) const
+TQString * Format::commentP( int col, int row ) const
{
if ( !hasProperty( PComment, false ) && !hasNoFallBackProperties( PComment ))
{
@@ -2390,13 +2389,13 @@ bool Format::currencyInfo( Currency & currency) const
return true;
}
-QString Format::getCurrencySymbol() const
+TQString Format::getCurrencySymbol() const
{
// TODO: fallback ?
return m_pStyle->currency().symbol;
}
-QFont Format::font() const
+TQFont Format::font() const
{
return m_pStyle->font();
}
@@ -2408,47 +2407,47 @@ QFont Format::font() const
//
/////////////
-const QPen & Format::leftBorderPen() const
+const TQPen & Format::leftBorderPen() const
{
return m_pStyle->leftBorderPen();
}
-const QPen & Format::topBorderPen() const
+const TQPen & Format::topBorderPen() const
{
return m_pStyle->topBorderPen();
}
-const QPen & Format::rightBorderPen() const
+const TQPen & Format::rightBorderPen() const
{
return m_pStyle->rightBorderPen();
}
-const QPen & Format::bottomBorderPen() const
+const TQPen & Format::bottomBorderPen() const
{
return m_pStyle->bottomBorderPen();
}
-const QPen & Format::fallDiagonalPen() const
+const TQPen & Format::fallDiagonalPen() const
{
return m_pStyle->fallDiagonalPen();
}
-const QPen & Format::goUpDiagonalPen() const
+const TQPen & Format::goUpDiagonalPen() const
{
return m_pStyle->goUpDiagonalPen();
}
-const QBrush & Format::backGroundBrush() const
+const TQBrush & Format::backGroundBrush() const
{
return m_pStyle->backGroundBrush();
}
-const QFont Format::textFont() const
+const TQFont Format::textFont() const
{
return m_pStyle->font();
}
-const QPen & Format::textPen() const
+const TQPen & Format::textPen() const
{
return m_pStyle->pen();
}
@@ -2481,11 +2480,11 @@ const Format* Format::fallbackFormat( int, int row ) const
bool Format::isDefault() const
{
// NOTE Stefan: Don't compare sheet and cell.
- // Because of the comment we have to check m_mask.
- if ( ( m_mask & PComment ) && m_strComment != 0 )
+ // Because of the comment we have to check m_tqmask.
+ if ( ( m_tqmask & PComment ) && m_strComment != 0 )
return false;
#if 0 // These are copied in Style.
- if ( m_mask ) // Properties
+ if ( m_tqmask ) // Properties
return false;
if ( m_flagsMask != 0 ) // FormatFlags
return false;
@@ -2498,11 +2497,11 @@ bool Format::isDefault() const
bool Format::operator==( const Format& other ) const
{
// NOTE Stefan: Don't compare sheet and cell.
- // Because of the comment we have to check m_mask.
- if ( ( m_mask & other.m_mask & PComment ) && m_strComment != other.m_strComment )
+ // Because of the comment we have to check m_tqmask.
+ if ( ( m_tqmask & other.m_tqmask & PComment ) && m_strComment != other.m_strComment )
return false;
#if 0 // These are copied in Style.
- if ( m_mask != other.m_mask ) // Properties
+ if ( m_tqmask != other.m_tqmask ) // Properties
return false;
if ( m_flagsMask != other.m_flagsMask ) // FormatFlags
return false;
@@ -2610,27 +2609,27 @@ double RowFormat::mmHeight() const
return POINT_TO_MM ( dblHeight() );
}
-QDomElement RowFormat::save( QDomDocument& doc, int yshift, bool copy ) const
+TQDomElement RowFormat::save( TQDomDocument& doc, int yshift, bool copy ) const
{
- QDomElement row = doc.createElement( "row" );
+ TQDomElement row = doc.createElement( "row" );
row.setAttribute( "height", m_fHeight );
row.setAttribute( "row", m_iRow - yshift );
if( m_bHide )
row.setAttribute( "hide", (int) m_bHide );
- QDomElement format( saveFormat( doc, false, copy ) );
+ TQDomElement format( saveFormat( doc, false, copy ) );
row.appendChild( format );
return row;
}
#if 0
-bool RowFormat::loadOasis( const QDomElement& /*row*/, QDomElement * /*rowStyle*/ )
+bool RowFormat::loadOasis( const TQDomElement& /*row*/, TQDomElement * /*rowStyle*/ )
{
return true;
}
#endif
-bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool paste )
+bool RowFormat::load( const TQDomElement & row, int yshift, Paste::Mode sp, bool paste )
{
bool ok;
@@ -2641,7 +2640,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
if ( row.hasAttribute( "height" ) )
{
if ( m_pSheet->doc()->syntaxVersion() < 1 ) //compatibility with old format - was in millimeter
- m_fHeight = qRound( MM_TO_POINT( row.attribute( "height" ).toDouble( &ok ) ) );
+ m_fHeight = tqRound( MM_TO_POINT( row.attribute( "height" ).toDouble( &ok ) ) );
else
m_fHeight = row.attribute( "height" ).toDouble( &ok );
@@ -2667,7 +2666,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
return false;
}
- QDomElement f( row.namedItem( "format" ).toElement() );
+ TQDomElement f( row.namedItem( "format" ).toElement() );
if ( !f.isNull() && ( sp == Paste::Normal || sp == Paste::Format || sp == Paste::NoBorder ) )
{
@@ -2679,7 +2678,7 @@ bool RowFormat::load( const QDomElement & row, int yshift, Paste::Mode sp, bool
return true;
}
-const QPen & RowFormat::topBorderPen( int _col, int _row ) const
+const TQPen & RowFormat::topBorderPen( int _col, int _row ) const
{
// First look at the row above us
if ( !hasProperty( PTopBorder, false ) )
@@ -2692,7 +2691,7 @@ const QPen & RowFormat::topBorderPen( int _col, int _row ) const
return Format::topBorderPen( _col, _row );
}
-void RowFormat::setTopBorderPen( const QPen & p )
+void RowFormat::setTopBorderPen( const TQPen & p )
{
RowFormat * cl = sheet()->nonDefaultRowFormat( row() - 1, false );
if ( cl )
@@ -2701,7 +2700,7 @@ void RowFormat::setTopBorderPen( const QPen & p )
Format::setTopBorderPen( p );
}
-const QPen & RowFormat::bottomBorderPen( int _col, int _row ) const
+const TQPen & RowFormat::bottomBorderPen( int _col, int _row ) const
{
// First look at the row below of us
if ( !hasProperty( PBottomBorder, false ) && ( _row < KS_rowMax ) )
@@ -2714,7 +2713,7 @@ const QPen & RowFormat::bottomBorderPen( int _col, int _row ) const
return Format::bottomBorderPen( _col, _row );
}
-void RowFormat::setBottomBorderPen( const QPen & p )
+void RowFormat::setBottomBorderPen( const TQPen & p )
{
if ( row() < KS_rowMax )
{
@@ -2726,7 +2725,7 @@ void RowFormat::setBottomBorderPen( const QPen & p )
Format::setBottomBorderPen( p );
}
-void RowFormat::setHide( bool _hide, bool repaint )
+void RowFormat::setHide( bool _hide, bool tqrepaint )
{
if ( _hide != m_bHide ) // only if we change the status
{
@@ -2735,14 +2734,14 @@ void RowFormat::setHide( bool _hide, bool repaint )
// Lower maximum size by height of row
m_pSheet->adjustSizeMaxY ( - dblHeight() );
m_bHide = _hide; //hide must be set after we requested the height
- m_pSheet->emit_updateRow( this, m_iRow, repaint );
+ m_pSheet->emit_updateRow( this, m_iRow, tqrepaint );
}
else
{
// Rise maximum size by height of row
m_bHide = _hide; //unhide must be set before we request the height
m_pSheet->adjustSizeMaxY ( dblHeight() );
- m_pSheet->emit_updateRow( this, m_iRow, repaint );
+ m_pSheet->emit_updateRow( this, m_iRow, tqrepaint );
}
}
}
@@ -2876,28 +2875,28 @@ double ColumnFormat::mmWidth() const
}
-QDomElement ColumnFormat::save( QDomDocument& doc, int xshift, bool copy ) const
+TQDomElement ColumnFormat::save( TQDomDocument& doc, int xshift, bool copy ) const
{
- QDomElement col( doc.createElement( "column" ) );
+ TQDomElement col( doc.createElement( "column" ) );
col.setAttribute( "width", m_fWidth );
col.setAttribute( "column", m_iColumn - xshift );
if ( m_bHide )
col.setAttribute( "hide", (int) m_bHide );
- QDomElement format( saveFormat( doc, false, copy ) );
+ TQDomElement format( saveFormat( doc, false, copy ) );
col.appendChild( format );
return col;
}
-bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bool paste )
+bool ColumnFormat::load( const TQDomElement & col, int xshift, Paste::Mode sp, bool paste )
{
bool ok;
if ( col.hasAttribute( "width" ) )
{
if ( m_pSheet->doc()->syntaxVersion() < 1 ) //combatibility to old format - was in millimeter
- m_fWidth = qRound( MM_TO_POINT ( col.attribute( "width" ).toDouble( &ok ) ) );
+ m_fWidth = tqRound( MM_TO_POINT ( col.attribute( "width" ).toDouble( &ok ) ) );
else
m_fWidth = col.attribute( "width" ).toDouble( &ok );
@@ -2928,7 +2927,7 @@ bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bo
return false;
}
- QDomElement f( col.namedItem( "format" ).toElement() );
+ TQDomElement f( col.namedItem( "format" ).toElement() );
if ( !f.isNull() && ( sp == Paste::Normal || sp == Paste::Format || sp == Paste::NoBorder ))
{
@@ -2940,7 +2939,7 @@ bool ColumnFormat::load( const QDomElement & col, int xshift, Paste::Mode sp, bo
return true;
}
-const QPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
+const TQPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
{
// First look ar the right column at the right
if ( !hasProperty( PLeftBorder, false ) )
@@ -2953,7 +2952,7 @@ const QPen & ColumnFormat::leftBorderPen( int _col, int _row ) const
return Format::leftBorderPen( _col, _row );
}
-void ColumnFormat::setLeftBorderPen( const QPen & p )
+void ColumnFormat::setLeftBorderPen( const TQPen & p )
{
ColumnFormat * cl = sheet()->nonDefaultColumnFormat( column() - 1, false );
if ( cl )
@@ -2962,7 +2961,7 @@ void ColumnFormat::setLeftBorderPen( const QPen & p )
Format::setLeftBorderPen( p );
}
-const QPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
+const TQPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
{
// First look ar the right column at the right
if ( !hasProperty( PRightBorder, false ) && ( _col < KS_colMax ) )
@@ -2975,7 +2974,7 @@ const QPen & ColumnFormat::rightBorderPen( int _col, int _row ) const
return Format::rightBorderPen( _col, _row );
}
-void ColumnFormat::setRightBorderPen( const QPen & p )
+void ColumnFormat::setRightBorderPen( const TQPen & p )
{
if ( column() < KS_colMax )
{
@@ -3141,7 +3140,7 @@ namespace Currency_LNS
{ "COP", I18N_NOOP("Colombia"), I18N_NOOP("Colombian Peso"), I18N_NOOP("C$") },
{ "KMF", I18N_NOOP("Comoros"), I18N_NOOP("Comoro Franc"), I18N_NOOP("KMF") },
{ "XAF", I18N_NOOP("Congo"), I18N_NOOP("CFA Franc BEAC"), I18N_NOOP("XAF") },
- { "CDF", I18N_NOOP("Congo, The Democratic Republic Of"), I18N_NOOP("Franc Congolais"), I18N_NOOP("CDF") },
+ { "CDF", I18N_NOOP("Congo, The Detqmocratic Republic Of"), I18N_NOOP("Franc Congolais"), I18N_NOOP("CDF") },
{ "NZD", I18N_NOOP("Cook Islands"), I18N_NOOP("New Zealand Dollar"), I18N_NOOP("NZD") },
{ "CRC", I18N_NOOP("Costa Rica"), I18N_NOOP("Costa Rican Colon"), I18N_NOOP("C") },
{ "XOF", I18N_NOOP("Cote D'Ivoire"), I18N_NOOP("CFA Franc BCEAO"), I18N_NOOP("XOF") },
@@ -3215,11 +3214,11 @@ namespace Currency_LNS
{ "KZT", I18N_NOOP("Kazakhstan"), I18N_NOOP("Tenge"), I18N_NOOP("KZT") },
{ "KES", I18N_NOOP("Kenya"), I18N_NOOP("Kenyan Shilling"), I18N_NOOP("KES") },
{ "AUD", I18N_NOOP("Kiribati"), I18N_NOOP("Australian Dollar"), I18N_NOOP("AUD") },
- { "KPW", I18N_NOOP("Korea, Democratic People's Republic Of"), I18N_NOOP("North Korean Won"), I18N_NOOP("KPW") },
+ { "KPW", I18N_NOOP("Korea, Detqmocratic People's Republic Of"), I18N_NOOP("North Korean Won"), I18N_NOOP("KPW") },
{ "KRW", I18N_NOOP("Korea, Republic Of"), I18N_NOOP("Won"), I18N_NOOP("KRW") },
{ "KWD", I18N_NOOP("Kuwait"), I18N_NOOP("Kuwaiti Dinar"), I18N_NOOP("KWD") },
{ "KGS", I18N_NOOP("Kyrgyzstan"), I18N_NOOP("Som"), I18N_NOOP("KGS") },
- { "LAK", I18N_NOOP("Lao People's Democratic Republic"), I18N_NOOP("Kip"), I18N_NOOP("LAK") },
+ { "LAK", I18N_NOOP("Lao People's Detqmocratic Republic"), I18N_NOOP("Kip"), I18N_NOOP("LAK") },
{ "LVL", I18N_NOOP("Latvia"), I18N_NOOP("Latvian Lats"), I18N_NOOP("Ls") },
{ "LBP", I18N_NOOP("Lebanon"), I18N_NOOP("Lebanese Pound"), I18N_NOOP("LBP") },
{ "ZAR", I18N_NOOP("Lesotho"), I18N_NOOP("Rand"), I18N_NOOP("ZAR") },
@@ -3283,7 +3282,7 @@ namespace Currency_LNS
{ "EUR", I18N_NOOP("Portugal"), I18N_NOOP("Euro"), I18N_NOOP("EUR") },
{ "PTE", I18N_NOOP("Portugal"), I18N_NOOP("Escudo"), I18N_NOOP("Esc.") },
{ "USD", I18N_NOOP("Puerto Rico"), I18N_NOOP("US Dollar"), I18N_NOOP("USD") },
- { "QAR", I18N_NOOP("Qatar"), I18N_NOOP("Qatari Rial"), I18N_NOOP("QAR") },
+ { "TQAR", I18N_NOOP("Qatar"), I18N_NOOP("Qatari Rial"), I18N_NOOP("TQAR") },
{ "ROL", I18N_NOOP("Romania"), I18N_NOOP("Leu"), I18N_NOOP("LEI") },
{ "RUR", I18N_NOOP("Russian Federation"), I18N_NOOP("Russian Ruble"), I18N_NOOP("RUR") },
{ "RUB", I18N_NOOP("Russian Federation"), I18N_NOOP("Russian Ruble"), I18N_NOOP("RUB") },
@@ -3361,27 +3360,27 @@ namespace Currency_LNS
}
// Those return the _untranslated_ strings from the above array
- QString getCode(int t) const
+ TQString getCode(int t) const
{
- return QString::fromUtf8( m_List[t].code );
+ return TQString::fromUtf8( m_List[t].code );
}
- QString getCountry(int t) const
+ TQString getCountry(int t) const
{
- return QString::fromUtf8( m_List[t].country );
+ return TQString::fromUtf8( m_List[t].country );
}
- QString getName(int t) const
+ TQString getName(int t) const
{
- return QString::fromUtf8( m_List[t].name );
+ return TQString::fromUtf8( m_List[t].name );
}
- QString getDisplayCode(int t) const
+ TQString getDisplayCode(int t) const
{
- return QString::fromUtf8( m_List[t].display );
+ return TQString::fromUtf8( m_List[t].display );
}
- int getIndex(const QString& code) const
+ int getIndex(const TQString& code) const
{
int index = 0;
while (m_List[index].code != 0 && m_List[index].code != code)
@@ -3415,7 +3414,7 @@ Currency::Currency(int index)
{
}
-Currency::Currency(int index, QString const & code)
+Currency::Currency(int index, TQString const & code)
: m_type ( 1 ), // unspec
m_code( code )
{
@@ -3423,22 +3422,22 @@ Currency::Currency(int index, QString const & code)
m_type = index;
}
-Currency::Currency(QString const & code, currencyFormat format)
+Currency::Currency(TQString const & code, currencyFormat format)
: m_type( 1 ), // unspec
m_code( code )
{
if ( format == Gnumeric )
{
- // I use QChar(c,r) here so that this file can be opened in any encoding...
- if ( code.find( QChar( 172, 32 ) ) != -1 ) // Euro sign
- m_code = QChar( 172, 32 );
- else if ( code.find( QChar( 163, 0 ) ) != -1 ) // Pound sign
- m_code = QChar( 163, 0 );
- else if ( code.find( QChar( 165, 0 ) ) != -1 ) // Yen sign
- m_code = QChar( 165, 0 );
+ // I use TQChar(c,r) here so that this file can be opened in any encoding...
+ if ( code.tqfind( TQChar( 172, 32 ) ) != -1 ) // Euro sign
+ m_code = TQChar( 172, 32 );
+ else if ( code.tqfind( TQChar( 163, 0 ) ) != -1 ) // Pound sign
+ m_code = TQChar( 163, 0 );
+ else if ( code.tqfind( TQChar( 165, 0 ) ) != -1 ) // Yen sign
+ m_code = TQChar( 165, 0 );
else if ( code[0] == '[' && code[1] == '$' )
{
- int n = code.find(']');
+ int n = code.tqfind(']');
if (n != -1)
{
m_code = code.mid( 2, n - 2 );
@@ -3448,7 +3447,7 @@ Currency::Currency(QString const & code, currencyFormat format)
m_type = 0;
}
}
- else if ( code.find( '$' ) != -1 )
+ else if ( code.tqfind( '$' ) != -1 )
m_code = "$";
} // end gnumeric
m_type = gCurrencyMap.getIndex( m_code );
@@ -3494,22 +3493,22 @@ Currency::operator int() const
return m_type;
}
-QString Currency::getCode() const
+TQString Currency::getCode() const
{
return m_code;
}
-QString Currency::getCountry() const
+TQString Currency::getCountry() const
{
return gCurrencyMap.getCountry( m_type );
}
-QString Currency::getName() const
+TQString Currency::getName() const
{
return gCurrencyMap.getName( m_type );
}
-QString Currency::getDisplayCode() const
+TQString Currency::getDisplayCode() const
{
return gMoneyList[m_type].display;
}
@@ -3519,14 +3518,14 @@ int Currency::getIndex() const
return m_type;
}
-QString Currency::getExportCode( currencyFormat format ) const
+TQString Currency::getExportCode( currencyFormat format ) const
{
if ( format == Gnumeric )
{
if ( m_code.length() == 1 ) // symbol
return m_code;
- QString ret( "[$");
+ TQString ret( "[$");
ret += m_code;
ret += "]";
@@ -3536,16 +3535,16 @@ QString Currency::getExportCode( currencyFormat format ) const
return m_code;
}
-QString Currency::getChooseString( int type, bool & ok )
+TQString Currency::getChooseString( int type, bool & ok )
{
if ( !gMoneyList[type].country )
{
ok = false;
- return QString::null;
+ return TQString();
}
if ( type < 24 )
{
- QString ret( i18n( gMoneyList[type].name ) );
+ TQString ret( i18n( gMoneyList[type].name ) );
if ( gMoneyList[type].country[0] )
{
ret += " (";
@@ -3556,7 +3555,7 @@ QString Currency::getChooseString( int type, bool & ok )
}
else
{
- QString ret( i18n( gMoneyList[type].country ) );
+ TQString ret( i18n( gMoneyList[type].country ) );
if ( gMoneyList[type].name[0] )
{
ret += " (";
@@ -3567,15 +3566,15 @@ QString Currency::getChooseString( int type, bool & ok )
}
}
-QString Currency::getDisplaySymbol( int type )
+TQString Currency::getDisplaySymbol( int type )
{
return i18n( gMoneyList[type].display );
}
// Currently unused
-QString Currency::getCurrencyCode( int type )
+TQString Currency::getCurrencyCode( int type )
{
- return QString::fromUtf8( gMoneyList[type].code );
+ return TQString::fromUtf8( gMoneyList[type].code );
}
#undef UPDATE_BEGIN
diff --git a/kspread/kspread_format.h b/kspread/kspread_format.h
index f46d0bb1..8c3e9bc3 100644
--- a/kspread/kspread_format.h
+++ b/kspread/kspread_format.h
@@ -22,17 +22,17 @@
#ifndef __kspread_format_h__
#define __kspread_format_h__
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qpen.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqpen.h>
#include <koffice_export.h>
#include "kspread_global.h"
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
class DCOPObject;
class KLocale;
class KoGenStyle;
@@ -93,7 +93,7 @@ public:
struct Currency
{
int type;
- QString symbol;
+ TQString symbol;
};
/**
@@ -123,26 +123,26 @@ public:
//
////////////////////////////////
- bool load( const QDomElement & f, Paste::Mode pm, bool paste = false );
- bool loadFormat( const QDomElement & f, Paste::Mode pm = Paste::Normal, bool paste = false );
- QDomElement save( QDomDocument& doc,int _col, int _row,bool force = false, bool copy = false ) const;
- QDomElement saveFormat( QDomDocument& doc, bool force = false, bool copy = false ) const;
- QDomElement saveFormat( QDomDocument& doc, int _col, int _row, bool force = false, bool copy = false ) const;
+ bool load( const TQDomElement & f, Paste::Mode pm, bool paste = false );
+ bool loadFormat( const TQDomElement & f, Paste::Mode pm = Paste::Normal, bool paste = false );
+ TQDomElement save( TQDomDocument& doc,int _col, int _row,bool force = false, bool copy = false ) const;
+ TQDomElement saveFormat( TQDomDocument& doc, bool force = false, bool copy = false ) const;
+ TQDomElement saveFormat( TQDomDocument& doc, int _col, int _row, bool force = false, bool copy = false ) const;
- void loadOasisStyle(/* const QDomElement& element,*/ KoOasisLoadingContext& context );
+ void loadOasisStyle(/* const TQDomElement& element,*/ KoOasisLoadingContext& context );
bool loadOasisStyleProperties(KoStyleStack & styleStack, const KoOasisStyles& oasisStyles );
bool loadFontOasisStyle( KoStyleStack & font );
/**
- * @return the OASIS style's name, if it was created. QString::null otherwise.
+ * @return the OASIS style's name, if it was created. TQString() otherwise.
*/
- QString saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyle );
+ TQString saveOasisCellStyle( KoGenStyle &currentCellStyle, KoGenStyles &mainStyle );
////////////////////////////////
//
// Properties
//
////////////////////////////////
- uint propertiesMask() { return m_mask; } // For the cell inspector only.
+ uint propertiesMask() { return m_tqmask; } // For the cell inspector only.
void clearProperties();
void clearProperty( Properties p );
@@ -187,60 +187,60 @@ public:
/**
* sets the format of the content, e.g. #.##0.00, dd/mmm/yyyy,...
*/
- void setFormatString( QString const & format );
+ void setFormatString( TQString const & format );
void setAlign( Align _align );
void setAlignY( AlignY _alignY );
- void setPrefix( const QString& _prefix );
- void setPostfix( const QString& _postfix );
+ void setPrefix( const TQString& _prefix );
+ void setPostfix( const TQString& _postfix );
void setPrecision( int _p );
- virtual void setLeftBorderPen( const QPen& _p );
+ virtual void setLeftBorderPen( const TQPen& _p );
void setLeftBorderStyle( Qt::PenStyle s );
- void setLeftBorderColor( const QColor & _c );
+ void setLeftBorderColor( const TQColor & _c );
void setLeftBorderWidth( int _w );
- virtual void setTopBorderPen( const QPen& _p );
+ virtual void setTopBorderPen( const TQPen& _p );
void setTopBorderStyle( Qt::PenStyle s );
- void setTopBorderColor( const QColor & _c );
+ void setTopBorderColor( const TQColor & _c );
void setTopBorderWidth( int _w );
- virtual void setRightBorderPen( const QPen& p );
+ virtual void setRightBorderPen( const TQPen& p );
void setRightBorderStyle( Qt::PenStyle _s );
- void setRightBorderColor( const QColor & _c );
+ void setRightBorderColor( const TQColor & _c );
void setRightBorderWidth( int _w );
- virtual void setBottomBorderPen( const QPen& p );
+ virtual void setBottomBorderPen( const TQPen& p );
void setBottomBorderStyle( Qt::PenStyle _s );
- void setBottomBorderColor( const QColor & _c );
+ void setBottomBorderColor( const TQColor & _c );
void setBottomBorderWidth( int _w );
- void setFallDiagonalPen( const QPen& _p );
+ void setFallDiagonalPen( const TQPen& _p );
void setFallDiagonalStyle( Qt::PenStyle s );
- void setFallDiagonalColor( const QColor & _c );
+ void setFallDiagonalColor( const TQColor & _c );
void setFallDiagonalWidth( int _w );
- void setGoUpDiagonalPen( const QPen& _p );
+ void setGoUpDiagonalPen( const TQPen& _p );
void setGoUpDiagonalStyle( Qt::PenStyle s );
- void setGoUpDiagonalColor( const QColor & _c );
+ void setGoUpDiagonalColor( const TQColor & _c );
void setGoUpDiagonalWidth( int _w );
- void setBackGroundBrush( const QBrush& _p);
+ void setBackGroundBrush( const TQBrush& _p);
void setBackGroundBrushStyle( Qt::BrushStyle s);
- void setBackGroundBrushColor( const QColor & _c);
+ void setBackGroundBrushColor( const TQColor & _c);
- void setTextFont( const QFont& _f );
+ void setTextFont( const TQFont& _f );
void setTextFontSize( int _s );
- void setTextFontFamily( const QString& _f );
+ void setTextFontFamily( const TQString& _f );
void setTextFontBold( bool _b );
void setTextFontItalic( bool _i );
void setTextFontUnderline( bool _i );
void setTextFontStrike( bool _i );
- void setTextPen( const QPen& _p );
- void setTextColor( const QColor & _c );
+ void setTextPen( const TQPen& _p );
+ void setTextColor( const TQColor & _c );
- void setBgColor( const QColor & _c );
+ void setBgColor( const TQColor & _c );
void setFloatFormat( FloatFormat _f );
void setFloatColor( FloatColor _c );
@@ -253,7 +253,7 @@ public:
void setAngle(int _angle);
- void setComment( const QString& c );
+ void setComment( const TQString& c );
void setIndent( double _indent );
@@ -263,7 +263,7 @@ public:
void setHideFormula( bool _b );
void setCurrency( Currency const & c );
- void setCurrency( int type, QString const & symbol );
+ void setCurrency( int type, TQString const & symbol );
////////////////////////////////
//
@@ -271,41 +271,41 @@ public:
//
////////////////////////////////
- QString const & getFormatString( int col, int row ) const;
+ TQString const & getFormatString( int col, int row ) const;
- virtual const QPen& leftBorderPen( int col, int row ) const;
+ virtual const TQPen& leftBorderPen( int col, int row ) const;
int leftBorderWidth( int col, int row ) const;
Qt::PenStyle leftBorderStyle( int col, int row ) const;
- const QColor& leftBorderColor( int col, int row ) const;
+ const TQColor& leftBorderColor( int col, int row ) const;
- virtual const QPen& topBorderPen( int col, int row ) const;
+ virtual const TQPen& topBorderPen( int col, int row ) const;
int topBorderWidth( int col, int row ) const;
Qt::PenStyle topBorderStyle( int col, int row ) const;
- const QColor& topBorderColor( int col, int row ) const;
+ const TQColor& topBorderColor( int col, int row ) const;
- virtual const QPen& rightBorderPen( int col, int row ) const;
+ virtual const TQPen& rightBorderPen( int col, int row ) const;
int rightBorderWidth( int col, int row ) const;
Qt::PenStyle rightBorderStyle( int col, int row ) const;
- const QColor& rightBorderColor( int col, int row ) const;
+ const TQColor& rightBorderColor( int col, int row ) const;
- virtual const QPen& bottomBorderPen( int col, int row ) const;
+ virtual const TQPen& bottomBorderPen( int col, int row ) const;
int bottomBorderWidth( int col, int row ) const;
Qt::PenStyle bottomBorderStyle( int col, int row ) const;
- const QColor& bottomBorderColor( int col, int row ) const;
+ const TQColor& bottomBorderColor( int col, int row ) const;
- const QPen& fallDiagonalPen( int col, int row ) const;
+ const TQPen& fallDiagonalPen( int col, int row ) const;
int fallDiagonalWidth( int col, int row ) const;
Qt::PenStyle fallDiagonalStyle( int col, int row ) const;
- const QColor& fallDiagonalColor( int col, int row ) const;
+ const TQColor& fallDiagonalColor( int col, int row ) const;
- const QPen& goUpDiagonalPen( int col, int row ) const;
+ const TQPen& goUpDiagonalPen( int col, int row ) const;
int goUpDiagonalWidth( int col, int row ) const;
Qt::PenStyle goUpDiagonalStyle( int col, int row ) const;
- const QColor& goUpDiagonalColor( int col, int row ) const;
+ const TQColor& goUpDiagonalColor( int col, int row ) const;
- const QBrush& backGroundBrush( int col, int row ) const;
+ const TQBrush& backGroundBrush( int col, int row ) const;
Qt::BrushStyle backGroundBrushStyle( int col, int row ) const;
- const QColor& backGroundBrushColor(int col, int row ) const;
+ const TQColor& backGroundBrushColor(int col, int row ) const;
uint bottomBorderValue( int col, int row ) const;
uint rightBorderValue( int col, int row ) const;
@@ -319,11 +319,11 @@ public:
/**
* @return the prefix of a numeric value ( for example "$" )
*/
- QString prefix( int col, int row ) const;
+ TQString prefix( int col, int row ) const;
/**
* @return the postfix of a numeric value ( for example "DM" )
*/
- QString postfix( int col, int row ) const;
+ TQString postfix( int col, int row ) const;
/**
* @return the way of formatting a floating point value
*/
@@ -333,11 +333,11 @@ public:
*/
FloatColor floatColor( int col, int row ) const;
- const QPen& textPen( int col, int row ) const;
+ const TQPen& textPen( int col, int row ) const;
/**
* @return the text color.
*/
- const QColor& textColor( int col, int row ) const;
+ const TQColor& textColor( int col, int row ) const;
/**
* @param _col the column this cell is assumed to be in
@@ -345,11 +345,11 @@ public:
*
* @return the background color.
*/
- const QColor& bgColor( int col, int row ) const;
+ const TQColor& bgColor( int col, int row ) const;
- const QFont textFont( int col, int row ) const;
+ const TQFont textFont( int col, int row ) const;
int textFontSize( int col, int row ) const;
- QString const & textFontFamily( int col, int row ) const;
+ TQString const & textFontFamily( int col, int row ) const;
bool textFontBold( int col, int row ) const;
bool textFontItalic( int col, int row ) const;
bool textFontUnderline( int col, int row ) const;
@@ -366,9 +366,9 @@ public:
int getAngle(int col, int row) const;
- const QString* comment() const { return m_strComment; };
- QString comment(int col, int row) const;
- QString * commentP( int col, int row ) const;
+ const TQString* comment() const { return m_strComment; };
+ TQString comment(int col, int row) const;
+ TQString * commentP( int col, int row ) const;
double getIndent(int col, int row) const;
@@ -390,15 +390,15 @@ public:
*/
bool currencyInfo( Currency & currency) const;
- QString getCurrencySymbol() const;
- QFont font() const;
+ TQString getCurrencySymbol() const;
+ TQFont font() const;
bool operator==( const Format& other ) const;
inline bool operator!=( const Format& other ) const { return !operator==( other ); }
protected:
- const QPen& rightBorderPen() const;
- const QPen& bottomBorderPen() const;
+ const TQPen& rightBorderPen() const;
+ const TQPen& bottomBorderPen() const;
/**
* If a cell is set, marks its Layout and TextFormat as dirty.
@@ -422,7 +422,7 @@ protected:
Sheet * m_pSheet;
Style * m_pStyle;
- uint m_mask;
+ uint m_tqmask;
/**
* used m_bNoFallBack when you put default value in a cell and
@@ -430,12 +430,12 @@ protected:
*/
uint m_bNoFallBack;
- Q_UINT32 m_flagsMask;
+ TQ_UINT32 m_flagsMask;
/**
* Stores a comment string.
*/
- QString * m_strComment;
+ TQString * m_strComment;
// default column width and row height
static double s_columnWidth;
@@ -447,13 +447,13 @@ private:
/**
* Currently just used for better abstraction.
*/
- const QPen & leftBorderPen() const;
- const QPen & topBorderPen() const;
- const QPen & fallDiagonalPen() const;
- const QPen & goUpDiagonalPen() const;
- const QBrush & backGroundBrush() const;
- const QFont textFont() const;
- const QPen & textPen() const;
+ const TQPen & leftBorderPen() const;
+ const TQPen & topBorderPen() const;
+ const TQPen & fallDiagonalPen() const;
+ const TQPen & goUpDiagonalPen() const;
+ const TQBrush & backGroundBrush() const;
+ const TQFont textFont() const;
+ const TQPen & textPen() const;
Cell* m_pCell;
};
@@ -468,9 +468,9 @@ public:
DCOPObject* dcopObject();
- QDomElement save( QDomDocument&, int yshift = 0, bool copy = false ) const;
- bool load( const QDomElement& row, int yshift = 0, Paste::Mode sp = Paste::Normal, bool paste = false );
- bool loadOasis( const QDomElement& row, QDomElement * rowStyle );
+ TQDomElement save( TQDomDocument&, int yshift = 0, bool copy = false ) const;
+ bool load( const TQDomElement& row, int yshift = 0, Paste::Mode sp = Paste::Normal, bool paste = false );
+ bool loadOasis( const TQDomElement& row, TQDomElement * rowStyle );
/**
* @param _canvas is needed to get information about the zooming factor.
@@ -540,24 +540,24 @@ public:
/**
* @reimp
*/
- const QPen& bottomBorderPen( int col, int row ) const;
+ const TQPen& bottomBorderPen( int col, int row ) const;
/**
* @reimp
*/
- void setBottomBorderPen( const QPen& p );
+ void setBottomBorderPen( const TQPen& p );
/**
* @reimp
*/
- const QPen& topBorderPen( int col, int row ) const;
+ const TQPen& topBorderPen( int col, int row ) const;
/**
* @reimp
*/
- void setTopBorderPen( const QPen& p );
+ void setTopBorderPen( const TQPen& p );
/**
* Sets the hide flag
*/
- void setHide( bool _hide, bool repaint = true );
+ void setHide( bool _hide, bool tqrepaint = true );
bool isHide()const { return m_bHide;}
bool operator==( const RowFormat& other ) const;
@@ -608,8 +608,8 @@ public:
ColumnFormat( Sheet *_sheet, int _column );
~ColumnFormat();
- QDomElement save( QDomDocument&, int xshift = 0, bool copy = false ) const;
- bool load( const QDomElement& row, int xshift = 0,Paste::Mode sp = Paste::Normal, bool paste = false );
+ TQDomElement save( TQDomDocument&, int xshift = 0, bool copy = false ) const;
+ bool load( const TQDomElement& row, int xshift = 0,Paste::Mode sp = Paste::Normal, bool paste = false );
DCOPObject* dcopObject();
/**
@@ -683,19 +683,19 @@ public:
/**
* @reimp
*/
- virtual const QPen& rightBorderPen( int col, int row ) const;
+ virtual const TQPen& rightBorderPen( int col, int row ) const;
/**
* @reimp
*/
- virtual void setRightBorderPen( const QPen& p );
+ virtual void setRightBorderPen( const TQPen& p );
/**
* @reimp
*/
- virtual const QPen& leftBorderPen( int col, int row ) const;
+ virtual const TQPen& leftBorderPen( int col, int row ) const;
/**
* @reimp
*/
- virtual void setLeftBorderPen( const QPen& p );
+ virtual void setLeftBorderPen( const TQPen& p );
void setHide( bool _hide );
bool isHide()const { return m_bHide;}
@@ -757,7 +757,7 @@ class KSPREAD_EXPORT Currency
/**
* If code doesn't fit to index the index gets ignored
*/
- Currency(int index, QString const & code);
+ Currency(int index, TQString const & code);
/**
* code: e.g. EUR, USD,..
@@ -765,31 +765,31 @@ class KSPREAD_EXPORT Currency
* currencyFormat: in Gnumeric the code is: [$EUR]
* saves some work in the filter...
*/
- Currency(QString const & code, currencyFormat format = Native);
+ Currency(TQString const & code, currencyFormat format = Native);
Currency & operator=(int type);
Currency & operator=(char const * code);
bool operator==(Currency const & cur) const;
bool operator==(int type) const;
operator int() const;
- QString getCode() const;
- QString getCountry() const;
- QString getName() const;
- QString getDisplayCode() const;
+ TQString getCode() const;
+ TQString getCountry() const;
+ TQString getName() const;
+ TQString getDisplayCode() const;
int getIndex() const;
- static QString getChooseString(int type, bool & ok);
- static QString getDisplaySymbol(int type);
- static QString getCurrencyCode( int type);
+ static TQString getChooseString(int type, bool & ok);
+ static TQString getDisplaySymbol(int type);
+ static TQString getCurrencyCode( int type);
/**
* Code for use in Gnumeric export filter
*/
- QString getExportCode(currencyFormat format) const;
+ TQString getExportCode(currencyFormat format) const;
private:
int m_type;
- QString m_code;
+ TQString m_code;
};
} // namespace KSpread
diff --git a/kspread/kspread_functions_conversion.cc b/kspread/kspread_functions_conversion.cc
index 902033ac..42246838 100644
--- a/kspread/kspread_functions_conversion.cc
+++ b/kspread/kspread_functions_conversion.cc
@@ -158,17 +158,17 @@ Value func_sexdec (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ROMAN
Value func_roman (valVector args, ValueCalc *calc, FuncExtra *)
{
- const QCString RNUnits[] = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
- const QCString RNTens[] = {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"};
- const QCString RNHundreds[] = {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"};
- const QCString RNThousands[] = {"", "M", "MM", "MMM"};
+ const TQCString RNUnits[] = {"", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX"};
+ const TQCString RNTens[] = {"", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC"};
+ const TQCString RNHundreds[] = {"", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM"};
+ const TQCString RNThousands[] = {"", "M", "MM", "MMM"};
// precision loss is not a problem here, as we only use the 0-3999 range
long value = calc->conv()->asInteger (args[0]).asInteger ();
if ((value < 0) || (value > 3999))
return Value::errorNA();
- QString result;
- result = QString::fromLatin1 (RNThousands[(value / 1000)] +
+ TQString result;
+ result = TQString::tqfromLatin1 (RNThousands[(value / 1000)] +
RNHundreds[(value / 100) % 10] +
RNTens[(value / 10 ) % 10] +
RNUnits[(value) % 10]);
@@ -177,9 +177,9 @@ Value func_roman (valVector args, ValueCalc *calc, FuncExtra *)
// convert single roman character to decimal
// return < 0 if invalid
-int func_arabic_helper (QChar c)
+int func_arabic_helper (TQChar c)
{
- switch (c.upper().unicode())
+ switch (c.upper().tqunicode())
{
case 'M': return 1000;
case 'D': return 500;
@@ -195,7 +195,7 @@ int func_arabic_helper (QChar c)
// Function: ARABIC
Value func_arabic (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString roman = calc->conv()->asString (args[0]).asString();
+ TQString roman = calc->conv()->asString (args[0]).asString();
if( roman.isEmpty() ) return Value::errorVALUE();
int val = 0, lastd = 0, d = 0;
@@ -215,7 +215,7 @@ Value func_arabic (valVector args, ValueCalc *calc, FuncExtra *)
}
// helper for AsciiToChar
-void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
+void func_a2c_helper (ValueCalc *calc, TQString &s, Value val)
{
if (val.isArray()) {
for (unsigned int row = 0; row < val.rows(); ++row)
@@ -224,7 +224,7 @@ void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
} else {
int v = calc->conv()->asInteger (val).asInteger();
if (v == 0) return;
- QChar c (v);
+ TQChar c (v);
s = s + c;
}
}
@@ -232,7 +232,7 @@ void func_a2c_helper (ValueCalc *calc, QString &s, Value val)
// Function: AsciiToChar
Value func_AsciiToChar (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str;
+ TQString str;
for (unsigned int i = 0; i < args.count(); i++)
func_a2c_helper (calc, str, args[i]);
return Value (str);
@@ -241,9 +241,9 @@ Value func_AsciiToChar (valVector args, ValueCalc *calc, FuncExtra *)
// Function: CharToAscii
Value func_CharToAscii (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString val = calc->conv()->asString (args[0]).asString ();
+ TQString val = calc->conv()->asString (args[0]).asString ();
if (val.length() == 1)
- return Value (QString (val[0]));
+ return Value (TQString (val[0]));
return Value::errorVALUE();
}
diff --git a/kspread/kspread_functions_database.cc b/kspread/kspread_functions_database.cc
index e59b9b7e..a294914d 100644
--- a/kspread/kspread_functions_database.cc
+++ b/kspread/kspread_functions_database.cc
@@ -110,7 +110,7 @@ int getFieldIndex (ValueCalc *calc, Value fieldName,
if (!fieldName.isString ())
return -1;
- QString fn = fieldName.asString();
+ TQString fn = fieldName.asString();
int cols = database.columns ();
for (int i = 0; i < cols; ++i)
if (fn.lower() ==
diff --git a/kspread/kspread_functions_datetime.cc b/kspread/kspread_functions_datetime.cc
index 35b13d6c..b139057d 100644
--- a/kspread/kspread_functions_datetime.cc
+++ b/kspread/kspread_functions_datetime.cc
@@ -32,8 +32,8 @@
using namespace KSpread;
// prototypes, sorted
-Value func_currentDate (valVector args, ValueCalc *calc, FuncExtra *);
-Value func_currentDateTime (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_tqcurrentDate (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_tqcurrentDateTime (valVector args, ValueCalc *calc, FuncExtra *);
Value func_currentTime (valVector args, ValueCalc *calc, FuncExtra *);
Value func_date (valVector args, ValueCalc *calc, FuncExtra *);
Value func_datevalue (valVector args, ValueCalc *calc, FuncExtra *);
@@ -77,10 +77,10 @@ void RegisterDateTimeFunctions()
FunctionRepository* repo = FunctionRepository::self();
Function *f;
- f = new Function ("CURRENTDATE", func_currentDate);
+ f = new Function ("CURRENTDATE", func_tqcurrentDate);
f->setParamCount (0);
repo->add (f);
- f = new Function ("CURRENTDATETIME", func_currentDateTime);
+ f = new Function ("CURRENTDATETIME", func_tqcurrentDateTime);
f->setParamCount (0);
repo->add (f);
f = new Function ("CURRENTTIME", func_currentTime);
@@ -140,7 +140,7 @@ void RegisterDateTimeFunctions()
f = new Function ("MONTHS", func_months);
f->setParamCount (3);
repo->add (f);
- f = new Function ("NOW", func_currentDateTime);
+ f = new Function ("NOW", func_tqcurrentDateTime);
f->setParamCount (0);
repo->add (f);
f = new Function ("SECOND", func_second);
@@ -154,7 +154,7 @@ void RegisterDateTimeFunctions()
repo->add (f);
f = new Function ("TIMEVALUE", func_timevalue);
repo->add (f);
- f = new Function ("TODAY", func_currentDate);
+ f = new Function ("TODAY", func_tqcurrentDate);
f->setParamCount (0);
repo->add (f);
f = new Function ("WEEKDAY", func_weekday);
@@ -175,7 +175,7 @@ void RegisterDateTimeFunctions()
// Function: EDATE
Value func_edate (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date = calc->conv()->asDate (args[0]).asDate();
+ TQDate date = calc->conv()->asDate (args[0]).asDate();
int months = calc->conv()->asInteger (args[1]).asInteger();
date = calc->conv()->locale()->calendar()->addMonths (date, months);
@@ -194,7 +194,7 @@ Value func_eomonth (valVector args, ValueCalc *calc, FuncExtra *)
if (modDate.isError()) return modDate;
// modDate is currently in Date format
- QDate date = modDate.asDate();
+ TQDate date = modDate.asDate();
date.setYMD (date.year(), date.month(), date.daysInMonth());
return Value (date);
@@ -204,8 +204,8 @@ Value func_eomonth (valVector args, ValueCalc *calc, FuncExtra *)
// algorithm adapted from gnumeric
Value func_days360 (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date1 = calc->conv()->asDate (args[0]).asDate();
- QDate date2 = calc->conv()->asDate (args[1]).asDate();
+ TQDate date1 = calc->conv()->asDate (args[0]).asDate();
+ TQDate date2 = calc->conv()->asDate (args[1]).asDate();
bool european = false;
if (args.count() == 3)
european = calc->conv()->asBoolean (args[2]).asBoolean();
@@ -217,7 +217,7 @@ Value func_days360 (valVector args, ValueCalc *calc, FuncExtra *)
if (date1.daysTo( date2 ) < 0)
{
- QDate tmp( date1 );
+ TQDate tmp( date1 );
date1 = date2;
date2 = tmp;
negative = true;
@@ -266,7 +266,7 @@ Value func_year (valVector args, ValueCalc *calc, FuncExtra *)
{
Value v = calc->conv()->asDate (args[0]);
if (v.isError()) return v;
- QDate date = v.asDate();
+ TQDate date = v.asDate();
return Value (date.year ());
}
@@ -275,7 +275,7 @@ Value func_month (valVector args, ValueCalc *calc, FuncExtra *)
{
Value v = calc->conv()->asDate (args[0]);
if (v.isError()) return v;
- QDate date = v.asDate();
+ TQDate date = v.asDate();
return Value (date.month ());
}
@@ -284,14 +284,14 @@ Value func_day (valVector args, ValueCalc *calc, FuncExtra *)
{
Value v = calc->conv()->asDate (args[0]);
if (v.isError()) return v;
- QDate date = v.asDate();
+ TQDate date = v.asDate();
return Value (date.day ());
}
// Function: HOUR
Value func_hour (valVector args, ValueCalc *calc, FuncExtra *)
{
- QTime time;
+ TQTime time;
if (args.count() == 1)
{
Value v = calc->conv()->asTime (args[0]);
@@ -299,14 +299,14 @@ Value func_hour (valVector args, ValueCalc *calc, FuncExtra *)
time = v.asTime();
}
else
- time = QTime::currentTime ();
+ time = TQTime::currentTime ();
return Value (time.hour ());
}
// Function: MINUTE
Value func_minute (valVector args, ValueCalc *calc, FuncExtra *)
{
- QTime time;
+ TQTime time;
if (args.count() == 1)
{
Value v = calc->conv()->asTime (args[0]);
@@ -314,14 +314,14 @@ Value func_minute (valVector args, ValueCalc *calc, FuncExtra *)
time = v.asTime();
}
else
- time = QTime::currentTime ();
+ time = TQTime::currentTime ();
return Value (time.minute ());
}
// Function: SECOND
Value func_second (valVector args, ValueCalc *calc, FuncExtra *)
{
- QTime time;
+ TQTime time;
if (args.count() == 1)
{
Value v = calc->conv()->asTime (args[0]);
@@ -329,7 +329,7 @@ Value func_second (valVector args, ValueCalc *calc, FuncExtra *)
time = v.asTime();
}
else
- time = QTime::currentTime ();
+ time = TQTime::currentTime ();
return Value (time.second ());
}
@@ -338,7 +338,7 @@ Value func_weekday (valVector args, ValueCalc *calc, FuncExtra *)
{
Value v = calc->conv()->asDate (args[0]).asDate();
if (v.isError()) return v;
- QDate date = v.asDate();
+ TQDate date = v.asDate();
int method = 1;
if (args.count() == 2)
method = calc->conv()->asInteger (args[1]).asInteger();
@@ -386,8 +386,8 @@ Value func_timevalue (valVector args, ValueCalc *calc, FuncExtra *)
// Function: years
Value func_years (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date1 = calc->conv()->asDate (args[0]).asDate();
- QDate date2 = calc->conv()->asDate (args[1]).asDate();
+ TQDate date1 = calc->conv()->asDate (args[0]).asDate();
+ TQDate date2 = calc->conv()->asDate (args[1]).asDate();
if (!date1.isValid() || !date2.isValid())
return Value::errorVALUE();
@@ -420,8 +420,8 @@ Value func_years (valVector args, ValueCalc *calc, FuncExtra *)
// Function: months
Value func_months (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date1 = calc->conv()->asDate (args[0]).asDate();
- QDate date2 = calc->conv()->asDate (args[1]).asDate();
+ TQDate date1 = calc->conv()->asDate (args[0]).asDate();
+ TQDate date2 = calc->conv()->asDate (args[1]).asDate();
if (!date1.isValid() || !date2.isValid())
return Value::errorVALUE();
@@ -455,8 +455,8 @@ Value func_months (valVector args, ValueCalc *calc, FuncExtra *)
// Function: weeks
Value func_weeks (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date1 = calc->conv()->asDate (args[0]).asDate();
- QDate date2 = calc->conv()->asDate (args[1]).asDate();
+ TQDate date1 = calc->conv()->asDate (args[0]).asDate();
+ TQDate date2 = calc->conv()->asDate (args[1]).asDate();
if (!date1.isValid() || !date2.isValid())
return Value::errorVALUE();
@@ -481,8 +481,8 @@ Value func_weeks (valVector args, ValueCalc *calc, FuncExtra *)
// Function: days
Value func_days (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date1 = calc->conv()->asDate (args[0]).asDate();
- QDate date2 = calc->conv()->asDate (args[1]).asDate();
+ TQDate date1 = calc->conv()->asDate (args[0]).asDate();
+ TQDate date2 = calc->conv()->asDate (args[1]).asDate();
if (!date1.isValid() || !date2.isValid())
return Value::errorVALUE();
@@ -496,7 +496,7 @@ Value func_date (valVector args, ValueCalc *calc, FuncExtra *)
int m = calc->conv()->asInteger (args[1]).asInteger();
int d = calc->conv()->asInteger (args[2]).asInteger();
- QDate _date;
+ TQDate _date;
if( _date.setYMD (y, m, d))
return Value (_date);
return Value::errorVALUE();
@@ -507,7 +507,7 @@ Value func_dayname (valVector args, ValueCalc *calc, FuncExtra *)
{
int number = calc->conv()->asInteger (args[0]).asInteger();
- QString weekName = calc->conv()->locale()->calendar()->weekDayName (number);
+ TQString weekName = calc->conv()->locale()->calendar()->weekDayName (number);
if (weekName.isNull())
return Value::errorVALUE();
return Value (weekName);
@@ -518,8 +518,8 @@ Value func_monthname (valVector args, ValueCalc *calc, FuncExtra *)
{
int number = calc->conv()->asInteger (args[0]).asInteger();
- QString monthName = calc->conv()->locale()->calendar()->monthName (number,
- QDate::currentDate().year());
+ TQString monthName = calc->conv()->locale()->calendar()->monthName (number,
+ TQDate::tqcurrentDate().year());
if (monthName.isNull())
return Value::errorVALUE();
return Value (monthName);
@@ -552,25 +552,25 @@ Value func_time (valVector args, ValueCalc *calc, FuncExtra *)
if (h < 0)
h += 24;
- return Value (QTime (h, m, s));
+ return Value (TQTime (h, m, s));
}
-// Function: currentDate
-Value func_currentDate (valVector, ValueCalc *, FuncExtra *)
+// Function: tqcurrentDate
+Value func_tqcurrentDate (valVector, ValueCalc *, FuncExtra *)
{
- return Value (QDate::currentDate ());
+ return Value (TQDate::tqcurrentDate ());
}
// Function: currentTime
Value func_currentTime (valVector, ValueCalc *, FuncExtra *)
{
- return Value (QTime::currentTime ());
+ return Value (TQTime::currentTime ());
}
-// Function: currentDateTime
-Value func_currentDateTime (valVector, ValueCalc *, FuncExtra *)
+// Function: tqcurrentDateTime
+Value func_tqcurrentDateTime (valVector, ValueCalc *, FuncExtra *)
{
- return Value (QDateTime::currentDateTime ());
+ return Value (TQDateTime::tqcurrentDateTime ());
}
// Function: dayOfYear
@@ -586,7 +586,7 @@ Value func_daysInMonth (valVector args, ValueCalc *calc, FuncExtra *)
{
int y = calc->conv()->asInteger (args[0]).asInteger();
int m = calc->conv()->asInteger (args[1]).asInteger();
- QDate date (y, m, 1);
+ TQDate date (y, m, 1);
return Value (date.daysInMonth());
}
@@ -594,21 +594,21 @@ Value func_daysInMonth (valVector args, ValueCalc *calc, FuncExtra *)
Value func_isLeapYear (valVector args, ValueCalc *calc, FuncExtra *)
{
int y = calc->conv()->asInteger (args[0]).asInteger();
- return Value (QDate::leapYear (y));
+ return Value (TQDate::leapYear (y));
}
// Function: daysInYear
Value func_daysInYear (valVector args, ValueCalc *calc, FuncExtra *)
{
int y = calc->conv()->asInteger (args[0]).asInteger();
- return Value (QDate::leapYear (y) ? 366 : 365);
+ return Value (TQDate::leapYear (y) ? 366 : 365);
}
// Function: weeksInYear
Value func_weeksInYear (valVector args, ValueCalc *calc, FuncExtra *)
{
int y = calc->conv()->asInteger (args[0]).asInteger();
- QDate date (y, 12, 31); // last day of the year
+ TQDate date (y, 12, 31); // last day of the year
return Value (date.weekNumber ());
}
@@ -636,13 +636,13 @@ Value func_easterSunday (valVector args, ValueCalc *calc, FuncExtra *)
nDay = O % 31 + 1;
nMonth = int(O / 31);
- return Value (QDate (nYear, nMonth, nDay));
+ return Value (TQDate (nYear, nMonth, nDay));
}
// Function: isoWeekNum
Value func_isoWeekNum (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate date = calc->conv()->asDate (args[0]).asDate();
+ TQDate date = calc->conv()->asDate (args[0]).asDate();
if (!date.isValid())
return Value::errorVALUE();
diff --git a/kspread/kspread_functions_engineering.cc b/kspread/kspread_functions_engineering.cc
index 3f2e8bd2..8e2a47d9 100644
--- a/kspread/kspread_functions_engineering.cc
+++ b/kspread/kspread_functions_engineering.cc
@@ -26,7 +26,7 @@
#include "valueconverter.h"
// used by the CONVERT function
-#include <qmap.h>
+#include <tqmap.h>
// these are needed for complex functions, while we handle them in the old way
#include <kglobal.h>
@@ -305,13 +305,13 @@ Value func_hex2oct (valVector args, ValueCalc *calc, FuncExtra *)
// return prefix factor found in unit, or 1.0 for no prefix
// also modify the unit, i.e stripping the prefix from it
// example: "kPa" will return 1e3 and change unit into "Pa"
-static double kspread_convert_prefix( QMap<QString,double> map, QString& unit )
+static double kspread_convert_prefix( TQMap<TQString,double> map, TQString& unit )
{
- if( map.contains( unit ) )
+ if( map.tqcontains( unit ) )
return 1.0;
// initialize prefix mapping if necessary
- static QMap<char,double> prefixMap;
+ static TQMap<char,double> prefixMap;
if( prefixMap.isEmpty() )
{
prefixMap[ 'E' ] = 1e18; // exa
@@ -334,7 +334,7 @@ static double kspread_convert_prefix( QMap<QString,double> map, QString& unit )
// check for possible prefix
char prefix = unit[0].latin1();
- if( prefixMap.contains( prefix ) )
+ if( prefixMap.tqcontains( prefix ) )
{
unit.remove( 0, 1 );
return prefixMap[ prefix ];
@@ -344,10 +344,10 @@ static double kspread_convert_prefix( QMap<QString,double> map, QString& unit )
return 0.0;
}
-static bool kspread_convert_mass( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_mass( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> massMap;
+ static TQMap<TQString, double> massMap;
// first-time initialization
if( massMap.isEmpty() )
@@ -366,14 +366,14 @@ static bool kspread_convert_mass( const QString& fromUnit,
massMap[ "brton" ] = 9.842065E-07; // Gross Registered Ton
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( massMap, fromU );
double toPrefix = kspread_convert_prefix( massMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !massMap.contains( fromU ) ) return false;
- if( !massMap.contains( toU ) ) return false;
+ if( !massMap.tqcontains( fromU ) ) return false;
+ if( !massMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * massMap[toU] / (massMap[fromU] * toPrefix);
@@ -381,10 +381,10 @@ static bool kspread_convert_mass( const QString& fromUnit,
}
-static bool kspread_convert_distance( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_distance( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> distanceMap;
+ static TQMap<TQString, double> distanceMap;
// first-time initialization
if( distanceMap.isEmpty() )
@@ -400,24 +400,24 @@ static bool kspread_convert_distance( const QString& fromUnit,
distanceMap[ "lightyear" ] = 1.057023455773293e-16; // lightyear
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( distanceMap, fromU );
double toPrefix = kspread_convert_prefix( distanceMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !distanceMap.contains( fromU ) ) return false;
- if( !distanceMap.contains( toU ) ) return false;
+ if( !distanceMap.tqcontains( fromU ) ) return false;
+ if( !distanceMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * distanceMap[toU] / (distanceMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_pressure( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_pressure( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> pressureMap;
+ static TQMap<TQString, double> pressureMap;
// first-time initialization
if( pressureMap.isEmpty() )
@@ -429,24 +429,24 @@ static bool kspread_convert_pressure( const QString& fromUnit,
pressureMap[ "Torr" ] = 1 / 133.32237;
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( pressureMap, fromU );
double toPrefix = kspread_convert_prefix( pressureMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !pressureMap.contains( fromU ) ) return false;
- if( !pressureMap.contains( toU ) ) return false;
+ if( !pressureMap.tqcontains( fromU ) ) return false;
+ if( !pressureMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * pressureMap[toU] / (pressureMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_force( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_force( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> forceMap;
+ static TQMap<TQString, double> forceMap;
// first-time initialization
if( forceMap.isEmpty() )
@@ -456,24 +456,24 @@ static bool kspread_convert_force( const QString& fromUnit,
forceMap[ "pond" ] = 1.019716e2; // pond
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( forceMap, fromU );
double toPrefix = kspread_convert_prefix( forceMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !forceMap.contains( fromU ) ) return false;
- if( !forceMap.contains( toU ) ) return false;
+ if( !forceMap.tqcontains( fromU ) ) return false;
+ if( !forceMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * forceMap[toU] / (forceMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_energy( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_energy( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> energyMap;
+ static TQMap<TQString, double> energyMap;
// first-time initialization
if( energyMap.isEmpty() )
@@ -489,24 +489,24 @@ static bool kspread_convert_energy( const QString& fromUnit,
energyMap[ "BTU" ] = 9.47815067349015e-4; // British Thermal Unit
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( energyMap, fromU );
double toPrefix = kspread_convert_prefix( energyMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !energyMap.contains( fromU ) ) return false;
- if( !energyMap.contains( toU ) ) return false;
+ if( !energyMap.tqcontains( fromU ) ) return false;
+ if( !energyMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * energyMap[toU] / (energyMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_power( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_power( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> powerMap;
+ static TQMap<TQString, double> powerMap;
// first-time initialization
if( powerMap.isEmpty() )
@@ -516,24 +516,24 @@ static bool kspread_convert_power( const QString& fromUnit,
powerMap[ "PS" ] = 1.359622e-3; // Pferdestärke (German)
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( powerMap, fromU );
double toPrefix = kspread_convert_prefix( powerMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !powerMap.contains( fromU ) ) return false;
- if( !powerMap.contains( toU ) ) return false;
+ if( !powerMap.tqcontains( fromU ) ) return false;
+ if( !powerMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * powerMap[toU] / (powerMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_magnetism( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_magnetism( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> magnetismMap;
+ static TQMap<TQString, double> magnetismMap;
// first-time initialization
if( magnetismMap.isEmpty() )
@@ -542,25 +542,25 @@ static bool kspread_convert_magnetism( const QString& fromUnit,
magnetismMap[ "ga" ] = 1.0e4; // Gauss
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( magnetismMap, fromU );
double toPrefix = kspread_convert_prefix( magnetismMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !magnetismMap.contains( fromU ) ) return false;
- if( !magnetismMap.contains( toU ) ) return false;
+ if( !magnetismMap.tqcontains( fromU ) ) return false;
+ if( !magnetismMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * magnetismMap[toU] / (magnetismMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_temperature( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_temperature( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> tempFactorMap;
- static QMap<QString, double> tempOffsetMap;
+ static TQMap<TQString, double> tempFactorMap;
+ static TQMap<TQString, double> tempOffsetMap;
// first-time initialization
if( tempFactorMap.isEmpty() || tempOffsetMap.isEmpty() )
@@ -570,10 +570,10 @@ static bool kspread_convert_temperature( const QString& fromUnit,
tempFactorMap[ "K" ] = 1.0; tempOffsetMap[ "K" ] = -273.15;
}
- if( !tempFactorMap.contains( fromUnit ) ) return false;
- if( !tempOffsetMap.contains( fromUnit ) ) return false;
- if( !tempFactorMap.contains( toUnit ) ) return false;
- if( !tempOffsetMap.contains( toUnit ) ) return false;
+ if( !tempFactorMap.tqcontains( fromUnit ) ) return false;
+ if( !tempOffsetMap.tqcontains( fromUnit ) ) return false;
+ if( !tempFactorMap.tqcontains( toUnit ) ) return false;
+ if( !tempOffsetMap.tqcontains( toUnit ) ) return false;
result = ( value + tempOffsetMap[ fromUnit ] )* tempFactorMap[ fromUnit ];
result = ( result / tempFactorMap[ toUnit ] ) - tempOffsetMap[ toUnit ];
@@ -581,10 +581,10 @@ static bool kspread_convert_temperature( const QString& fromUnit,
return true;
}
-static bool kspread_convert_volume( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_volume( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> volumeMap;
+ static TQMap<TQString, double> volumeMap;
// first-time initialization
if( volumeMap.isEmpty() )
@@ -606,24 +606,24 @@ static bool kspread_convert_volume( const QString& fromUnit,
volumeMap[ "barrel" ] = 6.289811E-03; // barrel
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( volumeMap, fromU );
double toPrefix = kspread_convert_prefix( volumeMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !volumeMap.contains( fromU ) ) return false;
- if( !volumeMap.contains( toU ) ) return false;
+ if( !volumeMap.tqcontains( fromU ) ) return false;
+ if( !volumeMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * volumeMap[toU] / (volumeMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_area( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_area( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> areaMap;
+ static TQMap<TQString, double> areaMap;
// first-time initialization
if( areaMap.isEmpty() )
@@ -638,24 +638,24 @@ static bool kspread_convert_area( const QString& fromUnit,
areaMap[ "ha" ] = 1.0e4; // hectare
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( areaMap, fromU );
double toPrefix = kspread_convert_prefix( areaMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !areaMap.contains( fromU ) ) return false;
- if( !areaMap.contains( toU ) ) return false;
+ if( !areaMap.tqcontains( fromU ) ) return false;
+ if( !areaMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * areaMap[toU] / (areaMap[fromU] * toPrefix);
return true;
}
-static bool kspread_convert_speed( const QString& fromUnit,
- const QString& toUnit, double value, double& result )
+static bool kspread_convert_speed( const TQString& fromUnit,
+ const TQString& toUnit, double value, double& result )
{
- static QMap<QString, double> speedMap;
+ static TQMap<TQString, double> speedMap;
// first-time initialization
if( speedMap.isEmpty() )
@@ -666,14 +666,14 @@ static bool kspread_convert_speed( const QString& fromUnit,
speedMap[ "kn" ] = 1.9438444924406048; // knot
}
- QString fromU = fromUnit;
- QString toU = toUnit;
+ TQString fromU = fromUnit;
+ TQString toU = toUnit;
double fromPrefix = kspread_convert_prefix( speedMap, fromU );
double toPrefix = kspread_convert_prefix( speedMap, toU );
if( fromPrefix == 0.0 ) return false;
if( toPrefix == 0.0 ) return false;
- if( !speedMap.contains( fromU ) ) return false;
- if( !speedMap.contains( toU ) ) return false;
+ if( !speedMap.tqcontains( fromU ) ) return false;
+ if( !speedMap.tqcontains( toU ) ) return false;
result = value * fromPrefix * speedMap[toU] / (speedMap[fromU] * toPrefix);
@@ -687,8 +687,8 @@ Value func_convert (valVector args, ValueCalc *calc, FuncExtra *)
// This function won't support arbitrary precision.
double value = calc->conv()->asFloat (args[0]).asFloat ();
- QString fromUnit = calc->conv()->asString (args[1]).asString();
- QString toUnit = calc->conv()->asString (args[2]).asString();
+ TQString fromUnit = calc->conv()->asString (args[1]).asString();
+ TQString toUnit = calc->conv()->asString (args[2]).asString();
double result = value;
@@ -713,9 +713,9 @@ Value func_convert (valVector args, ValueCalc *calc, FuncExtra *)
// these may eventually end up being merged into ValueCalc and friends
// then complex numbers will be handled transparently in most functions
-static QString func_create_complex( double real,double imag )
+static TQString func_create_complex( double real,double imag )
{
- QString tmp,tmp2;
+ TQString tmp,tmp2;
if(imag ==0)
{
return KGlobal::locale()->formatNumber( real);
@@ -739,7 +739,7 @@ Value func_complex (valVector args, ValueCalc *calc, FuncExtra *)
return args[0];
double re = calc->conv()->asFloat (args[0]).asFloat ();
double im = calc->conv()->asFloat (args[1]).asFloat ();
- QString tmp=func_create_complex (re, im);
+ TQString tmp=func_create_complex (re, im);
bool ok;
double result = KGlobal::locale()->readNumber(tmp, &ok);
if (ok)
@@ -748,10 +748,10 @@ Value func_complex (valVector args, ValueCalc *calc, FuncExtra *)
}
-static double imag_complexe(QString str, bool &ok)
+static double imag_complexe(TQString str, bool &ok)
{
-QString tmp=str;
-if(tmp.find('i')==-1)
+TQString tmp=str;
+if(tmp.tqfind('i')==-1)
{ //not a complex
ok=true;
return 0;
@@ -766,12 +766,12 @@ else if( tmp.length()==2 )
{
//-i,+i,
int pos1;
- if((pos1=tmp.find('+'))!=-1&& pos1==0)
+ if((pos1=tmp.tqfind('+'))!=-1&& pos1==0)
{
ok=true;
return 1;
}
- else if( (pos1=tmp.find('-'))!=-1 && pos1==0 )
+ else if( (pos1=tmp.tqfind('-'))!=-1 && pos1==0 )
{
ok=true;
return -1;
@@ -790,12 +790,12 @@ else if( tmp.length()==2 )
else
{//12+12i
int pos1,pos2;
- if((pos1=tmp.find('i'))!=-1)
+ if((pos1=tmp.tqfind('i'))!=-1)
{
double val;
- QString tmpStr;
+ TQString tmpStr;
- if((pos2=tmp.findRev('+'))!=-1 && pos2!=0)
+ if((pos2=tmp.tqfindRev('+'))!=-1 && pos2!=0)
{
if((pos1-pos2)==1)
{
@@ -811,7 +811,7 @@ else
return val;
}
}
- else if( (pos2=tmp.findRev('-'))!=-1&& pos2!=0)
+ else if( (pos2=tmp.tqfindRev('-'))!=-1&& pos2!=0)
{
if((pos1-pos2)==1)
{
@@ -844,7 +844,7 @@ return 0;
// Function: IMAGINARY
Value func_complex_imag (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString ();
+ TQString tmp = calc->conv()->asString (args[0]).asString ();
bool good;
double result=imag_complexe(tmp, good);
if (good)
@@ -853,13 +853,13 @@ Value func_complex_imag (valVector args, ValueCalc *calc, FuncExtra *)
}
-static double real_complexe(QString str, bool &ok)
+static double real_complexe(TQString str, bool &ok)
{
double val;
int pos1,pos2;
-QString tmp=str;
-QString tmpStr;
-if((pos1=tmp.find('i'))==-1)
+TQString tmp=str;
+TQString tmpStr;
+if((pos1=tmp.tqfind('i'))==-1)
{ //12.5
val=KGlobal::locale()->readNumber(tmp, &ok);
if(!ok)
@@ -868,7 +868,7 @@ if((pos1=tmp.find('i'))==-1)
}
else
{ //15-xi
- if((pos2=tmp.findRev('-'))!=-1 && pos2!=0)
+ if((pos2=tmp.tqfindRev('-'))!=-1 && pos2!=0)
{
tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok);
@@ -876,7 +876,7 @@ else
val=0;
return val;
} //15+xi
- else if((pos2=tmp.findRev('+'))!=-1)
+ else if((pos2=tmp.tqfindRev('+'))!=-1)
{
tmpStr=tmp.left(pos2);
val=KGlobal::locale()->readNumber(tmpStr, &ok);
@@ -898,7 +898,7 @@ return 0;
// Function: IMREAL
Value func_complex_real (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString ();
+ TQString tmp = calc->conv()->asString (args[0]).asString ();
bool good;
double result=real_complexe(tmp, good);
if (good)
@@ -958,7 +958,7 @@ Value func_imsum (valVector args, ValueCalc *calc, FuncExtra *)
calc->arrayWalk (args, result, awImSum, 0);
bool ok;
- QString res = calc->conv()->asString (result).asString();
+ TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok);
if (ok)
return Value (val);
@@ -972,7 +972,7 @@ Value func_imsub (valVector args, ValueCalc *calc, FuncExtra *)
calc->arrayWalk (args, result, awImSub, 0);
bool ok;
- QString res = calc->conv()->asString (result).asString();
+ TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok);
if (ok)
return Value (val);
@@ -986,7 +986,7 @@ Value func_improduct (valVector args, ValueCalc *calc, FuncExtra *)
calc->arrayWalk (args, result, awImMul, 0);
bool ok;
- QString res = calc->conv()->asString (result).asString();
+ TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok);
if (ok)
return Value (val);
@@ -1000,7 +1000,7 @@ Value func_imdiv (valVector args, ValueCalc *calc, FuncExtra *)
calc->arrayWalk (args, result, awImDiv, 0);
bool ok;
- QString res = calc->conv()->asString (result).asString();
+ TQString res = calc->conv()->asString (result).asString();
double val=KGlobal::locale()->readNumber(res, &ok);
if (ok)
return Value (val);
@@ -1010,7 +1010,7 @@ Value func_imdiv (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMCONJUGATE
Value func_imconjugate (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if (!ok)
@@ -1031,7 +1031,7 @@ Value func_imconjugate (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMARGUMENT
Value func_imargument (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if (!ok)
@@ -1049,7 +1049,7 @@ Value func_imargument (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMABS
Value func_imabs (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1065,7 +1065,7 @@ Value func_imabs (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMCOS
Value func_imcos (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1089,7 +1089,7 @@ Value func_imcos (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMSIN
Value func_imsin (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1113,7 +1113,7 @@ Value func_imsin (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMLN
Value func_imln (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1137,7 +1137,7 @@ Value func_imln (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMEXP
Value func_imexp (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1161,7 +1161,7 @@ Value func_imexp (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMSQRT
Value func_imsqrt (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
bool ok;
double real=real_complexe(tmp,ok);
if(!ok)
@@ -1187,7 +1187,7 @@ Value func_imsqrt (valVector args, ValueCalc *calc, FuncExtra *)
// Function: IMPOWER
Value func_impower (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp = calc->conv()->asString (args[0]).asString();
+ TQString tmp = calc->conv()->asString (args[0]).asString();
double val2 = calc->conv()->asFloat (args[1]).asFloat();
bool ok;
double real=real_complexe(tmp,ok);
diff --git a/kspread/kspread_functions_financial.cc b/kspread/kspread_functions_financial.cc
index 3f90d2fc..a9479efc 100644
--- a/kspread/kspread_functions_financial.cc
+++ b/kspread/kspread_functions_financial.cc
@@ -210,8 +210,8 @@ static Value getPrinc (ValueCalc *calc, Value start,
Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
{
// dates and integers only - don't need high-precision for this
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
int frequency = calc->conv()->asInteger (args[2]).asInteger();
int basis = 0;
bool eom = true;
@@ -225,7 +225,7 @@ Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
return Value::errorVALUE();
double result;
- QDate cDate( maturity );
+ TQDate cDate( maturity );
int months = maturity.month() - settlement.month()
+ 12 * ( maturity.year() - settlement.year() );
@@ -249,9 +249,9 @@ Value func_coupnum (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ACCRINT
Value func_accrint (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate maturity = calc->conv()->asDate (args[0]).asDate();
- QDate firstInterest = calc->conv()->asDate (args[1]).asDate();
- QDate settlement = calc->conv()->asDate (args[2]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[0]).asDate();
+ TQDate firstInterest = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[2]).asDate();
Value rate = args[3];
Value par = args[4];
@@ -285,8 +285,8 @@ Value func_accrint (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ACCRINTM
Value func_accrintm (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate issue = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate issue = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value rate = args[2];
Value par = 1000;
@@ -310,8 +310,8 @@ Value func_accrintm (valVector args, ValueCalc *calc, FuncExtra *)
// Function: DISC
Value func_disc (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value par = args[2];
Value redemp = args[3];
@@ -334,8 +334,8 @@ Value func_disc (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLPRICE
Value func_tbillprice (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value discount = args[2];
@@ -353,8 +353,8 @@ Value func_tbillprice (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLYIELD
Value func_tbillyield (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value rate = args[2];
@@ -371,8 +371,8 @@ Value func_tbillyield (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TBILLEQ
Value func_tbilleq (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value discount = args[2];
@@ -394,8 +394,8 @@ Value func_tbilleq (valVector args, ValueCalc *calc, FuncExtra *)
Value func_received (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value investment = args[2];
Value discount = args[3];
@@ -471,8 +471,8 @@ Value func_dollarfr (valVector args, ValueCalc *calc, FuncExtra *)
// Function: INTRATE
Value func_intrate (valVector args, ValueCalc *calc, FuncExtra *)
{
- QDate settlement = calc->conv()->asDate (args[0]).asDate();
- QDate maturity = calc->conv()->asDate (args[1]).asDate();
+ TQDate settlement = calc->conv()->asDate (args[0]).asDate();
+ TQDate maturity = calc->conv()->asDate (args[1]).asDate();
Value invest = args[2];
Value redemption = args[3];
@@ -885,7 +885,7 @@ Value func_ddb (valVector args, ValueCalc *calc, FuncExtra *)
// Function: EURO
Value func_euro (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString currency = calc->conv()->asString (args[0]).asString().upper();
+ TQString currency = calc->conv()->asString (args[0]).asString().upper();
double result = -1;
if( currency == "ATS" ) result = 13.7603; // Austria
diff --git a/kspread/kspread_functions_helper.cc b/kspread/kspread_functions_helper.cc
index 733deab2..92f7b1ae 100644
--- a/kspread/kspread_functions_helper.cc
+++ b/kspread/kspread_functions_helper.cc
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kspread_functions_helper.h"
/* DISABLED - we use KCalendarSystem instead
-void addMonths( QDate & date, int months )
+void addMonths( TQDate & date, int months )
{
int d = date.day();
int m = date.month() + months;
@@ -36,13 +36,13 @@ void addMonths( QDate & date, int months )
}
// e.g. 31 Feb: decrease day...
- while ( !QDate::isValid( y, m, d ) && d > 0 )
+ while ( !TQDate::isValid( y, m, d ) && d > 0 )
--d;
date.setYMD( y, m, d );
}
-void subMonths( QDate & date, int months )
+void subMonths( TQDate & date, int months )
{
int d = date.day();
int m = date.month() - months;
@@ -55,7 +55,7 @@ void subMonths( QDate & date, int months )
}
// e.g. 31 Feb: decrease day
- while ( !QDate::isValid( y, m, d ) && d > 0 )
+ while ( !TQDate::isValid( y, m, d ) && d > 0 )
--d;
date.setYMD( y, m, d );
@@ -63,7 +63,7 @@ void subMonths( QDate & date, int months )
*/
-int KSpread::daysPerYear(QDate const & date, int basis)
+int KSpread::daysPerYear(TQDate const & date, int basis)
{
switch( basis )
{
@@ -71,7 +71,7 @@ int KSpread::daysPerYear(QDate const & date, int basis)
return 360;
case 1:
- if ( QDate::leapYear( date.year() ) )
+ if ( TQDate::leapYear( date.year() ) )
return 366;
return 365;
@@ -86,7 +86,7 @@ int KSpread::daysPerYear(QDate const & date, int basis)
return -1;
}
-int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basis)
+int KSpread::daysBetweenDates(TQDate const & date1, TQDate const & date2, int basis)
{
int day1, day2, month1, month2, year1, year2;
bool isLeapYear = false;
@@ -103,7 +103,7 @@ int KSpread::daysBetweenDates(QDate const & date1, QDate const & date2, int basi
months = month2 - month1 + years * 12;
days = day2 - day1;
- isLeapYear = QDate::leapYear( year1 );
+ isLeapYear = TQDate::leapYear( year1 );
switch (basis)
{
diff --git a/kspread/kspread_functions_helper.h b/kspread/kspread_functions_helper.h
index cce87c33..6a855e83 100644
--- a/kspread/kspread_functions_helper.h
+++ b/kspread/kspread_functions_helper.h
@@ -21,7 +21,7 @@
#define kspread_functions_helper_h_
// helper functions for other functions
-class QDate;
+class TQDate;
namespace KSpread
{
@@ -32,7 +32,7 @@ namespace KSpread
* 3: real days / 365
* 4: European 30 / 360
*/
-int daysPerYear( QDate const & date, int basis );
+int daysPerYear( TQDate const & date, int basis );
/* 0: US 30 / 360
* 1: real days
@@ -40,7 +40,7 @@ int daysPerYear( QDate const & date, int basis );
* 3: real days / 365
* 4: European 30 / 360
*/
-int daysBetweenDates( QDate const & date1, QDate const & date2, int basis );
+int daysBetweenDates( TQDate const & date1, TQDate const & date2, int basis );
} //namespace KSpread
diff --git a/kspread/kspread_functions_information.cc b/kspread/kspread_functions_information.cc
index d64266a7..52ae0f99 100644
--- a/kspread/kspread_functions_information.cc
+++ b/kspread/kspread_functions_information.cc
@@ -25,7 +25,7 @@
#include <config.h>
#include <sys/utsname.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <klocale.h>
@@ -110,20 +110,20 @@ void RegisterInformationFunctions()
// Function: INFO
Value func_info (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString type = calc->conv()->asString (args[0]).asString().lower();
+ TQString type = calc->conv()->asString (args[0]).asString().lower();
if (type == "directory")
- return Value (QDir::currentDirPath());
+ return Value (TQDir::currentDirPath());
if (type == "release")
- return Value (QString (VERSION));
+ return Value (TQString (VERSION));
if ( type == "numfile" )
return Value ((int) Doc::documents().count());
if (type == "recalc")
{
- QString result;
+ TQString result;
if (calc->doc()) {
if (calc->doc()->delayCalculation())
result = i18n ("Manual");
@@ -146,7 +146,7 @@ Value func_info (valVector args, ValueCalc *calc, FuncExtra *)
if (type == "system") {
struct utsname name;
if (uname (&name) >= 0)
- return Value (QString (name.sysname));
+ return Value (TQString (name.sysname));
}
if (type == "totmem")
@@ -158,8 +158,8 @@ Value func_info (valVector args, ValueCalc *calc, FuncExtra *)
struct utsname name;
if (uname (&name) >= 0)
{
- QString os = QString("%1 %2 (%3)").arg( name.sysname ).
- arg( name.release ).arg( name.machine );
+ TQString os = TQString("%1 %2 (%3)").tqarg( name.sysname ).
+ tqarg( name.release ).tqarg( name.machine );
return Value (os);
}
}
diff --git a/kspread/kspread_functions_math.cc b/kspread/kspread_functions_math.cc
index b1133b1c..702160bc 100644
--- a/kspread/kspread_functions_math.cc
+++ b/kspread/kspread_functions_math.cc
@@ -172,7 +172,7 @@ void RegisterMathFunctions()
f = new Function ("POWER", func_pow);
f->setParamCount (2);
repo->add (f);
- f = new Function ("QUOTIENT", func_quotient);
+ f = new Function ("TQUOTIENT", func_quotient);
f->setParamCount (2);
repo->add (f);
f = new Function ("RAND", func_rand);
@@ -424,7 +424,7 @@ Value func_suma (valVector args, ValueCalc *calc, FuncExtra *)
Value func_sumif (valVector args, ValueCalc *calc, FuncExtra *)
{
Value checkRange = args[0];
- QString condition = calc->conv()->asString (args[1]).asString();
+ TQString condition = calc->conv()->asString (args[1]).asString();
Value sumRange = checkRange;
if (args.count() == 3)
sumRange = args[2];
@@ -502,7 +502,7 @@ Value func_int (valVector args, ValueCalc *calc, FuncExtra *)
return calc->conv()->asInteger (args[0]);
}
-// Function: QUOTIENT
+// Function: TQUOTIENT
Value func_quotient (valVector args, ValueCalc *calc, FuncExtra *)
{
if (calc->isZero (args[1]))
@@ -811,7 +811,7 @@ Value func_countblank (valVector args, ValueCalc *, FuncExtra *)
Value func_countif (valVector args, ValueCalc *calc, FuncExtra *)
{
Value range = args[0];
- QString condition = calc->conv()->asString (args[1]).asString();
+ TQString condition = calc->conv()->asString (args[1]).asString();
Condition cond;
calc->getCond (cond, condition);
@@ -994,7 +994,7 @@ Value func_subtotal (valVector args, ValueCalc *calc, FuncExtra *e)
Cell *cell = e->sheet->cellAt (c, r);
if (cell->isDefault())
continue;
- if (cell->isFormula() && cell->text().find ("SUBTOTAL", 0, false) != -1)
+ if (cell->isFormula() && cell->text().tqfind ("SUBTOTAL", 0, false) != -1)
// cell contains the word SUBTOTAL - replace value with empty
range.setElement (c-c1, r-r1, empty);
}
@@ -1069,8 +1069,8 @@ Value func_multipleOP (valVector args, ValueCalc *calc, FuncExtra *)
gCell = ((Interpreter *) context.interpreter() )->cell();
- QValueList<KSValue::Ptr>& args = context.value()->listValue();
- QValueList<KSValue::Ptr>& extra = context.extraData()->listValue();
+ TQValueList<KSValue::Ptr>& args = context.value()->listValue();
+ TQValueList<KSValue::Ptr>& extra = context.extraData()->listValue();
if ( !KSUtil::checkArgumentsCount( context, 5, "MULTIPLEOPERATIONS", true ) )
{
diff --git a/kspread/kspread_functions_reference.cc b/kspread/kspread_functions_reference.cc
index d3400c37..7dacb054 100644
--- a/kspread/kspread_functions_reference.cc
+++ b/kspread/kspread_functions_reference.cc
@@ -95,7 +95,7 @@ void RegisterReferenceFunctions()
Value func_address (valVector args, ValueCalc *calc, FuncExtra *)
{
bool r1c1 = false;
- QString sheetName;
+ TQString sheetName;
int absNum = 1;
if (args.count() > 2)
absNum = calc->conv()->asInteger (args[2]).asInteger();
@@ -104,7 +104,7 @@ Value func_address (valVector args, ValueCalc *calc, FuncExtra *)
if (args.count() == 5)
sheetName = calc->conv()->asString (args[4]).asString();
- QString result;
+ TQString result;
int row = calc->conv()->asInteger (args[0]).asInteger();
int col = calc->conv()->asInteger (args[1]).asInteger();
@@ -124,7 +124,7 @@ Value func_address (valVector args, ValueCalc *calc, FuncExtra *)
result += 'R';
if ( !abs )
result += '[';
- result += QString::number( row );
+ result += TQString::number( row );
if ( !abs )
result += ']';
@@ -137,7 +137,7 @@ Value func_address (valVector args, ValueCalc *calc, FuncExtra *)
result += 'C';
if ( !abs )
result += '[';
- result += QString::number( col );
+ result += TQString::number( col );
if ( !abs )
result += ']';
@@ -160,13 +160,13 @@ Value func_address (valVector args, ValueCalc *calc, FuncExtra *)
if ( abs )
result += '$';
- result += QString::number( row );
+ result += TQString::number( row );
}
return Value (result);
}
-bool checkRef( QString const & ref )
+bool checkRef( TQString const & ref )
{
Range r( ref );
if ( !r.isValid() )
@@ -188,14 +188,14 @@ Value func_areas (valVector args, ValueCalc *calc, FuncExtra *e)
return 1;
}
- QString s = calc->conv()->asString (args[0]).asString();
+ TQString s = calc->conv()->asString (args[0]).asString();
if ( s[0] != '(' || s[s.length() - 1] != ')' )
return Value::errorVALUE();
int l = s.length();
int num = 0;
- QString ref;
+ TQString ref;
for ( int i = 1; i < l; ++i )
{
if ( s[i] == ',' || s[i] == ')' )
@@ -316,7 +316,7 @@ Value func_rows (valVector, ValueCalc *, FuncExtra *e)
Value func_indirect (valVector args, ValueCalc *calc, FuncExtra *e)
{
bool r1c1 = false;
- QString ref = calc->conv()->asString (args[0]).asString();
+ TQString ref = calc->conv()->asString (args[0]).asString();
if (args.count() == 2)
r1c1 = !(calc->conv()->asBoolean (args[1]).asBoolean());
diff --git a/kspread/kspread_functions_statistical.cc b/kspread/kspread_functions_statistical.cc
index 9c294eb5..26c9d483 100644
--- a/kspread/kspread_functions_statistical.cc
+++ b/kspread/kspread_functions_statistical.cc
@@ -26,7 +26,7 @@
#include "valueconverter.h"
// needed for MODE
-#include <qmap.h>
+#include <tqmap.h>
using namespace KSpread;
@@ -87,7 +87,7 @@ Value func_variancep (valVector args, ValueCalc *calc, FuncExtra *);
Value func_variancepa (valVector args, ValueCalc *calc, FuncExtra *);
Value func_weibull (valVector args, ValueCalc *calc, FuncExtra *);
-typedef QValueList<double> List;
+typedef TQValueList<double> List;
// registers all statistical functions
void RegisterStatisticalFunctions()
@@ -373,7 +373,7 @@ Value func_skew_pop (valVector args, ValueCalc *calc, FuncExtra *)
return calc->div (tskew, number);
}
-class ContentSheet : public QMap<double, int> {};
+class ContentSheet : public TQMap<double, int> {};
void func_mode_helper (Value range, ValueCalc *calc, ContentSheet &sh)
{
diff --git a/kspread/kspread_functions_text.cc b/kspread/kspread_functions_text.cc
index 9bb7095e..966ac56c 100644
--- a/kspread/kspread_functions_text.cc
+++ b/kspread/kspread_functions_text.cc
@@ -23,7 +23,7 @@
// built-in text functions
// please keep it in alphabetical order
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
#include <math.h>
@@ -45,7 +45,7 @@ Value func_compare (valVector args, ValueCalc *calc, FuncExtra *);
Value func_concatenate (valVector args, ValueCalc *calc, FuncExtra *);
Value func_dollar (valVector args, ValueCalc *calc, FuncExtra *);
Value func_exact (valVector args, ValueCalc *calc, FuncExtra *);
-Value func_find (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_tqfind (valVector args, ValueCalc *calc, FuncExtra *);
Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *);
Value func_left (valVector args, ValueCalc *calc, FuncExtra *);
Value func_len (valVector args, ValueCalc *calc, FuncExtra *);
@@ -54,7 +54,7 @@ Value func_mid (valVector args, ValueCalc *calc, FuncExtra *);
Value func_proper (valVector args, ValueCalc *calc, FuncExtra *);
Value func_regexp (valVector args, ValueCalc *calc, FuncExtra *);
Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *);
-Value func_replace (valVector args, ValueCalc *calc, FuncExtra *);
+Value func_tqreplace (valVector args, ValueCalc *calc, FuncExtra *);
Value func_rept (valVector args, ValueCalc *calc, FuncExtra *);
Value func_rot (valVector args, ValueCalc *calc, FuncExtra *);
Value func_right (valVector args, ValueCalc *calc, FuncExtra *);
@@ -116,7 +116,7 @@ void RegisterTextFunctions()
f = new Function ("EXACT", func_exact);
f->setParamCount (2);
repo->add (f);
- f = new Function ("FIND", func_find);
+ f = new Function ("FIND", func_tqfind);
f->setParamCount (2, 3);
repo->add (f);
f = new Function ("FIXED", func_fixed);
@@ -134,7 +134,7 @@ void RegisterTextFunctions()
f = new Function ("REGEXPRE", func_regexpre);
f->setParamCount (3);
repo->add (f);
- f = new Function ("REPLACE", func_replace);
+ f = new Function ("REPLACE", func_tqreplace);
f->setParamCount (4);
repo->add (f);
f = new Function ("REPT", func_rept);
@@ -159,15 +159,15 @@ void RegisterTextFunctions()
Value func_char (valVector args, ValueCalc *calc, FuncExtra *)
{
int val = calc->conv()->asInteger (args[0]).asInteger ();
- return Value (QString (QChar (val)));
+ return Value (TQString (TQChar (val)));
}
// Function: CLEAN
Value func_clean (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str (calc->conv()->asString (args[0]).asString());
- QString result;
- QChar c;
+ TQString str (calc->conv()->asString (args[0]).asString());
+ TQString result;
+ TQChar c;
int i;
int l = str.length();
@@ -184,11 +184,11 @@ Value func_clean (valVector args, ValueCalc *calc, FuncExtra *)
// Function: CODE
Value func_code (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str (calc->conv()->asString (args[0]).asString());
+ TQString str (calc->conv()->asString (args[0]).asString());
if (str.length() <= 0)
return Value::errorVALUE();
- return Value (str[0].unicode());
+ return Value (str[0].tqunicode());
}
// Function: COMPARE
@@ -197,8 +197,8 @@ Value func_compare (valVector args, ValueCalc *calc, FuncExtra *)
int result = 0;
bool exact = calc->conv()->asBoolean (args[2]).asBoolean();
- QString s1 = calc->conv()->asString (args[0]).asString();
- QString s2 = calc->conv()->asString (args[1]).asString();
+ TQString s1 = calc->conv()->asString (args[0]).asString();
+ TQString s2 = calc->conv()->asString (args[1]).asString();
if (!exact)
result = s1.lower().localeAwareCompare(s2.lower());
@@ -214,7 +214,7 @@ Value func_compare (valVector args, ValueCalc *calc, FuncExtra *)
}
void func_concatenate_helper (Value val, ValueCalc *calc,
- QString& tmp)
+ TQString& tmp)
{
if (val.isArray()) {
for (unsigned int row = 0; row < val.rows(); ++row)
@@ -227,7 +227,7 @@ void func_concatenate_helper (Value val, ValueCalc *calc,
// Function: CONCATENATE
Value func_concatenate (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString tmp;
+ TQString tmp;
for (unsigned int i = 0; i < args.count(); ++i)
func_concatenate_helper (args[i], calc, tmp);
@@ -253,7 +253,7 @@ Value func_dollar (valVector args, ValueCalc *calc, FuncExtra *)
value = floor (value * pow (10.0, precision) + 0.5) / pow (10.0, precision);
KLocale *locale = calc->conv()->locale();
- QString s = locale->formatMoney (value, locale->currencySymbol(), precision);
+ TQString s = locale->formatMoney (value, locale->currencySymbol(), precision);
return Value (s);
}
@@ -261,16 +261,16 @@ Value func_dollar (valVector args, ValueCalc *calc, FuncExtra *)
// Function: EXACT
Value func_exact (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString s1 = calc->conv()->asString (args[0]).asString();
- QString s2 = calc->conv()->asString (args[1]).asString();
+ TQString s1 = calc->conv()->asString (args[0]).asString();
+ TQString s2 = calc->conv()->asString (args[1]).asString();
bool exact = (s1 == s2);
return Value (exact);
}
// Function: FIND
-Value func_find (valVector args, ValueCalc *calc, FuncExtra *)
+Value func_tqfind (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString find_text, within_text;
+ TQString find_text, within_text;
int start_num = 1;
find_text = calc->conv()->asString (args[0]).asString();
@@ -282,7 +282,7 @@ Value func_find (valVector args, ValueCalc *calc, FuncExtra *)
if (start_num <= 0) return Value::errorVALUE();
if (start_num > (int)within_text.length()) return Value::errorVALUE();
- int pos = within_text.find (find_text, start_num - 1);
+ int pos = within_text.tqfind (find_text, start_num - 1);
if( pos < 0 ) return Value::errorNA();
return Value (pos + 1);
@@ -302,7 +302,7 @@ Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *)
if (args.count() == 3)
no_commas = calc->conv()->asBoolean (args[2]).asBoolean();
- QString result;
+ TQString result;
KLocale *locale = calc->conv()->locale();
// unfortunately, we can't just use KLocale::formatNumber because
@@ -317,11 +317,11 @@ Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *)
}
bool neg = number < 0;
- result = QString::number( neg ? -number:number, 'f', decimals );
+ result = TQString::number( neg ? -number:number, 'f', decimals );
- int pos = result.find('.');
+ int pos = result.tqfind('.');
if (pos == -1) pos = result.length();
- else result.replace(pos, 1, locale->decimalSymbol());
+ else result.tqreplace(pos, 1, locale->decimalSymbol());
if( !no_commas )
while (0 < (pos -= 3))
result.insert(pos, locale->thousandsSeparator());
@@ -335,7 +335,7 @@ Value func_fixed (valVector args, ValueCalc *calc, FuncExtra *)
// Function: LEFT
Value func_left (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString();
+ TQString str = calc->conv()->asString (args[0]).asString();
int nb = 1;
if (args.count() == 2)
nb = calc->conv()->asInteger (args[1]).asInteger();
@@ -359,7 +359,7 @@ Value func_lower (valVector args, ValueCalc *calc, FuncExtra *)
// Function: MID
Value func_mid (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString();
+ TQString str = calc->conv()->asString (args[0]).asString();
int pos = calc->conv()->asInteger (args[1]).asInteger();
uint len = 0xffffffff;
if (args.count() == 3)
@@ -374,9 +374,9 @@ Value func_mid (valVector args, ValueCalc *calc, FuncExtra *)
// Function: PROPER
Value func_proper (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString().lower();
+ TQString str = calc->conv()->asString (args[0]).asString().lower();
- QChar f;
+ TQChar f;
bool first = true;
for (unsigned int i = 0; i < str.length(); ++i)
@@ -406,12 +406,12 @@ Value func_proper (valVector args, ValueCalc *calc, FuncExtra *)
Value func_regexp (valVector args, ValueCalc *calc, FuncExtra *)
{
// ensure that we got a valid regular expression
- QRegExp exp (calc->conv()->asString (args[1]).asString());
+ TQRegExp exp (calc->conv()->asString (args[1]).asString());
if (!exp.isValid ())
return Value::errorVALUE();
- QString s = calc->conv()->asString (args[0]).asString();
- QString defText;
+ TQString s = calc->conv()->asString (args[0]).asString();
+ TQString defText;
if (args.count() > 2)
defText = calc->conv()->asString (args[2]).asString();
int bkref = 0;
@@ -420,7 +420,7 @@ Value func_regexp (valVector args, ValueCalc *calc, FuncExtra *)
if (bkref < 0) // strange back-reference
return Value::errorVALUE();
- QString returnValue;
+ TQString returnValue;
int pos = exp.search (s);
if (pos == -1)
@@ -435,18 +435,18 @@ Value func_regexp (valVector args, ValueCalc *calc, FuncExtra *)
Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *)
{
// ensure that we got a valid regular expression
- QRegExp exp (calc->conv()->asString (args[1]).asString());
+ TQRegExp exp (calc->conv()->asString (args[1]).asString());
if (!exp.isValid ())
return Value::errorVALUE();
- QString s = calc->conv()->asString (args[0]).asString();
- QString str = calc->conv()->asString (args[2]).asString();
+ TQString s = calc->conv()->asString (args[0]).asString();
+ TQString str = calc->conv()->asString (args[2]).asString();
int pos = 0;
while ((pos = exp.search (s, pos)) != -1)
{
int i = exp.matchedLength();
- s = s.replace (pos, i, str);
+ s = s.tqreplace (pos, i, str);
pos += str.length();
}
@@ -454,26 +454,26 @@ Value func_regexpre (valVector args, ValueCalc *calc, FuncExtra *)
}
// Function: REPLACE
-Value func_replace (valVector args, ValueCalc *calc, FuncExtra *)
+Value func_tqreplace (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString text = calc->conv()->asString (args[0]).asString();
+ TQString text = calc->conv()->asString (args[0]).asString();
int pos = calc->conv()->asInteger (args[1]).asInteger();
int len = calc->conv()->asInteger (args[2]).asInteger();
- QString new_text = calc->conv()->asString (args[3]).asString();
+ TQString new_text = calc->conv()->asString (args[3]).asString();
if (pos < 0) pos = 0;
- QString result = text.replace (pos-1, len, new_text);
+ TQString result = text.tqreplace (pos-1, len, new_text);
return Value (result);
}
// Function: REPT
Value func_rept (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString s = calc->conv()->asString (args[0]).asString();
+ TQString s = calc->conv()->asString (args[0]).asString();
int nb = calc->conv()->asInteger (args[1]).asInteger();
- QString result;
+ TQString result;
for (int i = 0; i < nb; i++) result += s;
return Value (result);
}
@@ -481,7 +481,7 @@ Value func_rept (valVector args, ValueCalc *calc, FuncExtra *)
// Function: RIGHT
Value func_right (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString();
+ TQString str = calc->conv()->asString (args[0]).asString();
int nb = 1;
if (args.count() == 2)
nb = calc->conv()->asInteger (args[1]).asInteger();
@@ -492,15 +492,15 @@ Value func_right (valVector args, ValueCalc *calc, FuncExtra *)
// Function: ROT
Value func_rot (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString text = calc->conv()->asString (args[0]).asString();
+ TQString text = calc->conv()->asString (args[0]).asString();
for( unsigned i=0; i<text.length(); i++ )
{
- unsigned c = text[i].upper().unicode();
+ unsigned c = text[i].upper().tqunicode();
if( ( c >= 'A' ) && ( c <= 'M' ) )
- text[i] = QChar( text[i].unicode() + 13);
+ text[i] = TQChar( text[i].tqunicode() + 13);
if( ( c >= 'N' ) && ( c <= 'Z' ) )
- text[i] = QChar( text[i].unicode() - 13);
+ text[i] = TQChar( text[i].tqunicode() - 13);
}
return Value (text);
@@ -509,8 +509,8 @@ Value func_rot (valVector args, ValueCalc *calc, FuncExtra *)
// Function: SEARCH
Value func_search (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString find_text = calc->conv()->asString (args[0]).asString();
- QString within_text = calc->conv()->asString (args[1]).asString();
+ TQString find_text = calc->conv()->asString (args[0]).asString();
+ TQString within_text = calc->conv()->asString (args[1]).asString();
int start_num = 1;
if (args.count() == 3)
start_num = calc->conv()->asInteger (args[2]).asInteger();
@@ -519,9 +519,9 @@ Value func_search (valVector args, ValueCalc *calc, FuncExtra *)
if (start_num <= 0) return Value::errorVALUE();
if (start_num > (int)within_text.length()) return Value::errorVALUE();
- // use globbing feature of QRegExp
- QRegExp regex( find_text, false, true );
- int pos = within_text.find( regex, start_num-1 );
+ // use globbing feature of TQRegExp
+ TQRegExp regex( find_text, false, true );
+ int pos = within_text.tqfind( regex, start_num-1 );
if( pos < 0 ) return Value::errorNA();
return Value (pos + 1);
@@ -530,9 +530,9 @@ Value func_search (valVector args, ValueCalc *calc, FuncExtra *)
// Function: SLEEK
Value func_sleek (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString();
- QString result;
- QChar c;
+ TQString str = calc->conv()->asString (args[0]).asString();
+ TQString result;
+ TQChar c;
int i;
int l = str.length();
@@ -558,21 +558,21 @@ Value func_substitute (valVector args, ValueCalc *calc, FuncExtra *)
all = false;
}
- QString text = calc->conv()->asString (args[0]).asString();
- QString old_text = calc->conv()->asString (args[1]).asString();
- QString new_text = calc->conv()->asString (args[2]).asString();
+ TQString text = calc->conv()->asString (args[0]).asString();
+ TQString old_text = calc->conv()->asString (args[1]).asString();
+ TQString new_text = calc->conv()->asString (args[2]).asString();
if( num <= 0 ) return Value::errorVALUE();
if (old_text.length() == 0) return Value (text);
- QString result = text;
+ TQString result = text;
- int p = result.find (old_text);
+ int p = result.tqfind (old_text);
while ((p != -1) && (num > 0))
{
- result.replace( p, old_text.length(), new_text );
+ result.tqreplace( p, old_text.length(), new_text );
// find another location, starting straight after the replaced text
- p = result.find (old_text, p + new_text.length());
+ p = result.tqfind (old_text, p + new_text.length());
if( !all ) num--;
}
@@ -596,15 +596,15 @@ Value func_text (valVector args, ValueCalc *calc, FuncExtra *)
// Function: TOGGLE
Value func_toggle (valVector args, ValueCalc *calc, FuncExtra *)
{
- QString str = calc->conv()->asString (args[0]).asString();
+ TQString str = calc->conv()->asString (args[0]).asString();
int i;
int l = str.length();
for (i = 0; i < l; ++i)
{
- QChar c = str[i];
- QChar lc = c.lower();
- QChar uc = c.upper();
+ TQChar c = str[i];
+ TQChar lc = c.lower();
+ TQChar uc = c.upper();
if (c == lc) // it is in lowercase
str[i] = c.upper();
diff --git a/kspread/kspread_generalProperty.cpp b/kspread/kspread_generalProperty.cpp
index 574fd196..2e470e32 100644
--- a/kspread/kspread_generalProperty.cpp
+++ b/kspread/kspread_generalProperty.cpp
@@ -19,11 +19,11 @@
*/
#include "kspread_generalProperty.h"
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
#include <knuminput.h>
#include <klocale.h>
@@ -32,17 +32,17 @@
using namespace KSpread;
-GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit )
-: QWidget( parent, name )
+GeneralProperty::GeneralProperty( TQWidget *tqparent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit )
+: TQWidget( tqparent, name )
, m_ratio( 1.0 )
, m_generalValue( generalValue )
, m_unit( unit )
{
- QVBoxLayout *layout = new QVBoxLayout( this );
- layout->addWidget( m_ui = new KoGeneralPropertyUI( this ) );
+ TQVBoxLayout *tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( m_ui = new KoGeneralPropertyUI( this ) );
- QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
- layout->addItem( spacer );
+ TQSpacerItem* spacer = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
+ tqlayout->addItem( spacer );
if ( m_generalValue.m_name.isNull() )
{
@@ -56,8 +56,8 @@ GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValu
m_ui->positionGroup->setTitle( i18n( "Position" ) );
- connect( m_ui->protect, SIGNAL( toggled( bool ) ), this, SLOT( slotProtectToggled( bool ) ) );
- connect( m_ui->keepRatio, SIGNAL( toggled( bool ) ), this, SLOT( slotKeepRatioToggled( bool ) ) );
+ connect( m_ui->protect, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotProtectToggled( bool ) ) );
+ connect( m_ui->keepRatio, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( slotKeepRatioToggled( bool ) ) );
double dStep = KoUnit::fromUserValue( 0.5, m_unit );
double dMax = KoUnit::fromUserValue( 9999, m_unit );
@@ -69,11 +69,11 @@ GeneralProperty::GeneralProperty( QWidget *parent, const char *name, GeneralValu
m_ui->widthInput->setUnit( m_unit );
m_ui->widthInput->setMinMaxStep( 0, dMax, dStep );
- connect( m_ui->widthInput, SIGNAL( valueChanged( double ) ), this, SLOT( slotWidthChanged( double ) ) );
+ connect( m_ui->widthInput, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotWidthChanged( double ) ) );
m_ui->heightInput->setUnit( m_unit );
m_ui->heightInput->setMinMaxStep( 0, dMax, dStep );
- connect( m_ui->heightInput, SIGNAL( valueChanged( double ) ), this, SLOT( slotHeightChanged( double ) ) );
+ connect( m_ui->heightInput, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotHeightChanged( double ) ) );
slotReset();
}
@@ -90,7 +90,7 @@ int GeneralProperty::getGeneralPropertyChange() const
if ( !m_generalValue.m_name.isNull() && m_generalValue.m_name != m_ui->nameInput->text() )
flags |= Name;
- if ( m_ui->protect->state() != QButton::NoChange )
+ if ( m_ui->protect->state() != TQButton::NoChange )
{
if ( ( m_ui->protect->isOn() ? STATE_ON : STATE_OFF ) != m_generalValue.m_protect )
flags |= Protect;
@@ -103,14 +103,14 @@ int GeneralProperty::getGeneralPropertyChange() const
if ( m_generalValue.m_rect.top() != rect.top() )
flags |= Top;
// this has to be done as the rect cahnges width/hight if left or top is changed
- if ( QABS( m_generalValue.m_rect.width() - rect.width() ) > 1e-6 )
+ if ( TQABS( m_generalValue.m_rect.width() - rect.width() ) > 1e-6 )
flags |= Width;
- if ( QABS( m_generalValue.m_rect.height() - rect.height() ) > 1e-6 )
+ if ( TQABS( m_generalValue.m_rect.height() - rect.height() ) > 1e-6 )
flags |= Height;
}
}
- if ( m_ui->keepRatio->state() != QButton::NoChange
+ if ( m_ui->keepRatio->state() != TQButton::NoChange
&& ( m_ui->keepRatio->isOn() ? STATE_ON : STATE_OFF ) != m_generalValue.m_keepRatio )
{
flags |= KeepRatio;
@@ -123,7 +123,7 @@ int GeneralProperty::getGeneralPropertyChange() const
GeneralProperty::GeneralValue GeneralProperty::getGeneralValue() const
{
GeneralValue generalValue;
- generalValue.m_name = m_ui->nameInput->isEnabled() ? m_ui->nameInput->text() : QString();
+ generalValue.m_name = m_ui->nameInput->isEnabled() ? m_ui->nameInput->text() : TQString();
generalValue.m_protect = m_ui->protect->isOn() ? STATE_ON : STATE_OFF;
generalValue.m_keepRatio = m_ui->keepRatio->isOn() ? STATE_ON : STATE_OFF;
generalValue.m_rect = getRect();
@@ -151,10 +151,10 @@ void GeneralProperty::apply()
KoRect GeneralProperty::getRect() const
{
- double x = QMAX( 0, m_ui->xInput->value() );
- double y = QMAX( 0, m_ui->yInput->value() );
- double w = QMAX( 0, m_ui->widthInput->value() );
- double h = QMAX( 0, m_ui->heightInput->value() );
+ double x = TQMAX( 0, m_ui->xInput->value() );
+ double y = TQMAX( 0, m_ui->yInput->value() );
+ double w = TQMAX( 0, m_ui->widthInput->value() );
+ double h = TQMAX( 0, m_ui->heightInput->value() );
KoRect rect( x, y, w, h );
return rect;
@@ -163,10 +163,10 @@ KoRect GeneralProperty::getRect() const
void GeneralProperty::setRect( KoRect &rect )
{
- m_ui->xInput->changeValue( QMAX( 0.00, rect.left() ) );
- m_ui->yInput->changeValue( QMAX( 0.00, rect.top() ) );
- m_ui->widthInput->changeValue( QMAX( 0.00, rect.width() ) );
- m_ui->heightInput->changeValue( QMAX( 0.00, rect.height() ) );
+ m_ui->xInput->changeValue( TQMAX( 0.00, rect.left() ) );
+ m_ui->yInput->changeValue( TQMAX( 0.00, rect.top() ) );
+ m_ui->widthInput->changeValue( TQMAX( 0.00, rect.width() ) );
+ m_ui->heightInput->changeValue( TQMAX( 0.00, rect.height() ) );
}
diff --git a/kspread/kspread_generalProperty.h b/kspread/kspread_generalProperty.h
index fa6d15e1..43effc52 100644
--- a/kspread/kspread_generalProperty.h
+++ b/kspread/kspread_generalProperty.h
@@ -20,7 +20,7 @@
#ifndef GENERALPROPERTY_H
#define GENERALPROPERTY_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "kspread_global.h"
#include <KoRect.h>
@@ -31,15 +31,16 @@ class KoGeneralPropertyUI;
namespace KSpread
{
-class GeneralProperty : public QWidget
+class GeneralProperty : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
struct GeneralValue
{
GeneralValue()
{}
- QString m_name;
+ TQString m_name;
PropValue m_keepRatio;
PropValue m_protect;
KoRect m_rect;
@@ -56,7 +57,7 @@ public:
Height = 64
};
- GeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit );
+ GeneralProperty( TQWidget *tqparent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit );
~GeneralProperty();
int getGeneralPropertyChange() const;
diff --git a/kspread/kspread_genvalidationstyle.cc b/kspread/kspread_genvalidationstyle.cc
index 13e5c0e4..f886836a 100644
--- a/kspread/kspread_genvalidationstyle.cc
+++ b/kspread/kspread_genvalidationstyle.cc
@@ -34,12 +34,12 @@ GenValidationStyles::~GenValidationStyles()
}
-QString GenValidationStyles::lookup( const GenValidationStyle& style )
+TQString GenValidationStyles::lookup( const GenValidationStyle& style )
{
- StyleMap::iterator it = m_styles.find( style );
+ StyleMap::iterator it = m_styles.tqfind( style );
if ( it == m_styles.end() ) {
- QString styleName( "val" );
+ TQString styleName( "val" );
styleName = makeUniqueName( styleName );
m_names.insert( styleName, true );
it = m_styles.insert( style, styleName );
@@ -47,14 +47,14 @@ QString GenValidationStyles::lookup( const GenValidationStyle& style )
return it.data();
}
-QString GenValidationStyles::makeUniqueName( const QString& base ) const
+TQString GenValidationStyles::makeUniqueName( const TQString& base ) const
{
int num = 1;
- QString name;
+ TQString name;
do {
name = base;
- name += QString::number( num++ );
- } while ( m_names.find( name ) != m_names.end() );
+ name += TQString::number( num++ );
+ } while ( m_names.tqfind( name ) != m_names.end() );
return name;
}
@@ -75,8 +75,8 @@ void GenValidationStyles::writeStyle( KoXmlWriter& writer )
writer.addAttribute( "table:title", it.key().title );
writer.addAttribute( "table:display", it.key().displayValidationInformation );
- QStringList text = QStringList::split( "\n", it.key().messageInfo );
- for ( QStringList::Iterator it2 = text.begin(); it2 != text.end(); ++it2 ) {
+ TQStringList text = TQStringList::split( "\n", it.key().messageInfo );
+ for ( TQStringList::Iterator it2 = text.begin(); it2 != text.end(); ++it2 ) {
writer.startElement( "text:p" );
writer.addTextNode( *it2 );
writer.endElement();
@@ -88,8 +88,8 @@ void GenValidationStyles::writeStyle( KoXmlWriter& writer )
writer.addAttribute("table:title", it.key().titleInfo);
writer.addAttribute("table:display", it.key().displayMessage);
- text = QStringList::split( "\n", it.key().message );
- for ( QStringList::Iterator it3 = text.begin(); it3 != text.end(); ++it3 ) {
+ text = TQStringList::split( "\n", it.key().message );
+ for ( TQStringList::Iterator it3 = text.begin(); it3 != text.end(); ++it3 ) {
writer.startElement( "text:p" );
writer.addTextNode( *it3 );
writer.endElement();
@@ -131,9 +131,9 @@ void GenValidationStyle::initVal( Validity *_val )
}
}
-QString GenValidationStyle::createValidationCondition( Validity* _val )
+TQString GenValidationStyle::createValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
switch( _val->m_restriction )
{
case Restriction::None:
@@ -163,17 +163,17 @@ QString GenValidationStyle::createValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createListValidationCondition( Validity* _val )
+TQString GenValidationStyle::createListValidationCondition( Validity* _val )
{
- QString result = "oooc:cell-content-is-in-list(";
+ TQString result = "oooc:cell-content-is-in-list(";
result = _val->listValidity.join( ";" );
result +=")";
return result;
}
-QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
+TQString GenValidationStyle::createNumberValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
if ( _val->m_restriction == Restriction::Number )
result = "oooc:cell-content-is-whole-number() and ";
else if ( _val->m_restriction == Restriction::Integer )
@@ -186,45 +186,45 @@ QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
case Conditional::Equal:
result+="cell-content()";
result+="=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Superior:
result+="cell-content()";
result+=">";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Inferior:
result+="cell-content()";
result+="<";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::SuperiorEqual:
result+="cell-content()";
result+=">=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::InferiorEqual:
result+="cell-content()";
result+="<=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Different:
result+="cell-content()";
result+="!=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Between:
result+="cell-content-is-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
case Conditional::DifferentTo:
result+="cell-content-is-not-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
}
@@ -232,9 +232,9 @@ QString GenValidationStyle::createNumberValidationCondition( Validity* _val )
}
-QString GenValidationStyle::createTimeValidationCondition( Validity* _val )
+TQString GenValidationStyle::createTimeValidationCondition( Validity* _val )
{
- QString result( "oooc:cell-content-is-time() and " );
+ TQString result( "oooc:cell-content-is-time() and " );
switch( _val->m_cond )
{
case Conditional::None:
@@ -288,9 +288,9 @@ QString GenValidationStyle::createTimeValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createDateValidationCondition( Validity* _val )
+TQString GenValidationStyle::createDateValidationCondition( Validity* _val )
{
- QString result( "oooc:cell-content-is-date() and " );
+ TQString result( "oooc:cell-content-is-date() and " );
switch( _val->m_cond )
{
case Conditional::None:
@@ -344,9 +344,9 @@ QString GenValidationStyle::createDateValidationCondition( Validity* _val )
return result;
}
-QString GenValidationStyle::createTextValidationCondition( Validity* _val )
+TQString GenValidationStyle::createTextValidationCondition( Validity* _val )
{
- QString result;
+ TQString result;
switch( _val->m_cond )
{
case Conditional::None:
@@ -355,45 +355,45 @@ QString GenValidationStyle::createTextValidationCondition( Validity* _val )
case Conditional::Equal:
result+="oooc:cell-content-text-length()";
result+="=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Superior:
result+="oooc:cell-content-text-length()";
result+=">";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Inferior:
result+="oooc:cell-content-text-length()";
result+="<";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::SuperiorEqual:
result+="oooc:cell-content-text-length()";
result+=">=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::InferiorEqual:
result+="oooc:cell-content-text-length()";
result+="<=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Different:
result+="oooc:cell-content-text-length()";
result+="!=";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
break;
case Conditional::Between:
result+="oooc:cell-content-text-length-is-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
case Conditional::DifferentTo:
result+="oooc:cell-content-text-length-is-not-between(";
- result+=QString::number( _val->valMin );
+ result+=TQString::number( _val->valMin );
result+=",";
- result+=QString::number( _val->valMax );
+ result+=TQString::number( _val->valMax );
result+=")";
break;
}
diff --git a/kspread/kspread_genvalidationstyle.h b/kspread/kspread_genvalidationstyle.h
index 31c6a652..abc25d6f 100644
--- a/kspread/kspread_genvalidationstyle.h
+++ b/kspread/kspread_genvalidationstyle.h
@@ -22,8 +22,8 @@
#ifndef KSPREAD_GENVALIDATIONSTYLE
#define KSPREAD_GENVALIDATIONSTYLE
-#include <qdict.h>
-#include <qmap.h>
+#include <tqdict.h>
+#include <tqmap.h>
class KoXmlWriter;
@@ -37,18 +37,18 @@ class GenValidationStyles
public:
GenValidationStyles();
~GenValidationStyles();
- QString lookup( const GenValidationStyle& style );
+ TQString lookup( const GenValidationStyle& style );
- typedef QMap<GenValidationStyle, QString> StyleMap;
+ typedef TQMap<GenValidationStyle, TQString> StyleMap;
void writeStyle( KoXmlWriter& writer );
private:
- QString makeUniqueName( const QString& base ) const;
+ TQString makeUniqueName( const TQString& base ) const;
/// style definition -> name
StyleMap m_styles;
/// name -> style (used to check for name uniqueness)
- typedef QMap<QString, bool> NameMap;
+ typedef TQMap<TQString, bool> NameMap;
NameMap m_names;
};
@@ -73,24 +73,24 @@ public:
return false;
}
private:
- QString createValidationCondition( Validity* _val );
- QString createTextValidationCondition( Validity* _val );
- QString createTimeValidationCondition( Validity* _val );
- QString createDateValidationCondition( Validity* _val );
- QString createNumberValidationCondition( Validity* _val );
- QString createListValidationCondition( Validity* _val );
+ TQString createValidationCondition( Validity* _val );
+ TQString createTextValidationCondition( Validity* _val );
+ TQString createTimeValidationCondition( Validity* _val );
+ TQString createDateValidationCondition( Validity* _val );
+ TQString createNumberValidationCondition( Validity* _val );
+ TQString createListValidationCondition( Validity* _val );
void initVal( Validity *_val );
- QString allowEmptyCell;
- QString condition;
- QString titleInfo;
- QString displayValidationInformation;
- QString messageInfo;
- QString messageType;
- QString displayMessage;
- QString message;
- QString title;
+ TQString allowEmptyCell;
+ TQString condition;
+ TQString titleInfo;
+ TQString displayValidationInformation;
+ TQString messageInfo;
+ TQString messageType;
+ TQString displayMessage;
+ TQString message;
+ TQString title;
friend class GenValidationStyles;
};
diff --git a/kspread/kspread_global.h b/kspread/kspread_global.h
index a4b6d715..6ec5f836 100644
--- a/kspread/kspread_global.h
+++ b/kspread/kspread_global.h
@@ -1,7 +1,7 @@
#ifndef KSPREAD_GLOBAL_H
#define KSPREAD_GLOBAL_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -29,7 +29,7 @@ class ElapsedTime
m_time.start();
}
- ElapsedTime( QString const & name, OutputMode mode = Default )
+ ElapsedTime( TQString const & name, OutputMode mode = Default )
: m_name( name )
{
m_time.start();
@@ -52,8 +52,8 @@ class ElapsedTime
}
private:
- QTime m_time;
- QString m_name;
+ TQTime m_time;
+ TQString m_name;
};
/**
@@ -124,7 +124,7 @@ namespace Action
}
enum Series { Column,Row,Linear,Geometric };
-// necessary due to QDock* enums (Werner)
+// necessary due to TQDock* enums (Werner)
enum MoveTo { Bottom, Left, Top, Right, BottomFirst };
enum MethodOfCalc { SumOfNumber, Min, Max, Average, Count, NoneCalc, CountA };
@@ -183,7 +183,7 @@ enum ToolEditMode {
//INS_AUTOFORM = 10,
//INS_FREEHAND = 11,
//INS_POLYLINE = 12,
- //INS_QUADRICBEZIERCURVE = 13,
+ //INS_TQUADRICBEZIERCURVE = 13,
//INS_CUBICBEZIERCURVE = 14,
//INS_POLYGON = 15,
INS_PICTURE = 16
@@ -192,7 +192,7 @@ enum ToolEditMode {
//TEM_ZOOM = 19,
//INS_CLOSED_FREEHAND = 20,
//INS_CLOSED_POLYLINE = 21,
- //INS_CLOSED_QUADRICBEZIERCURVE = 22,
+ //INS_CLOSED_TQUADRICBEZIERCURVE = 22,
//INS_CLOSED_CUBICBEZIERCURVE = 23
};
diff --git a/kspread/kspread_handler.cc b/kspread/kspread_handler.cc
index 4e74958f..5adedbfd 100644
--- a/kspread/kspread_handler.cc
+++ b/kspread/kspread_handler.cc
@@ -2,7 +2,7 @@
// TODO: insert copyright header
//
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kspread_view.h"
@@ -12,8 +12,8 @@
using namespace KSpread;
-InsertHandler::InsertHandler( View* view, QWidget* widget )
- : KoEventHandler( widget )
+InsertHandler::InsertHandler( View* view, TQWidget* widget )
+ : KoEventHandler( TQT_TQOBJECT(widget) )
{
m_view = view;
m_started = false;
@@ -24,49 +24,49 @@ InsertHandler::InsertHandler( View* view, QWidget* widget )
InsertHandler::~InsertHandler()
{
- ((QWidget*)target())->setCursor( arrowCursor );
+ ((TQWidget*)target())->setCursor( arrowCursor );
m_view->resetInsertHandle();
}
-bool InsertHandler::eventFilter( QObject*, QEvent* ev )
+bool InsertHandler::eventFilter( TQObject*, TQEvent* ev )
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
{
- QMouseEvent* e = (QMouseEvent*)ev;
+ TQMouseEvent* e = (TQMouseEvent*)ev;
- m_geometryStart = e->pos();
- m_geometryEnd = e->pos();
+ m_tqgeometryStart = e->pos();
+ m_tqgeometryEnd = e->pos();
m_started = false;
m_clicked = true;
return true;
}
- else if ( ev->type() == QEvent::MouseMove )
+ else if ( ev->type() == TQEvent::MouseMove )
{
if ( !m_clicked )
return true;
- QMouseEvent* e = (QMouseEvent*)ev;
+ TQMouseEvent* e = (TQMouseEvent*)ev;
- QPainter painter;
- painter.begin( (QWidget*)target() );
+ TQPainter painter;
+ painter.begin( (TQWidget*)target() );
painter.setRasterOp( NotROP );
- QPen pen;
- pen.setStyle( DashLine );
+ TQPen pen;
+ pen.setStyle( Qt::DashLine );
painter.setPen( pen );
if ( m_started )
{
- int x = m_geometryStart.x();
- int y = m_geometryStart.y();
- if ( x > m_geometryEnd.x() )
- x = m_geometryEnd.x();
- if ( y > m_geometryEnd.y() )
- y = m_geometryEnd.y();
- int w = m_geometryEnd.x() - m_geometryStart.x();
+ int x = m_tqgeometryStart.x();
+ int y = m_tqgeometryStart.y();
+ if ( x > m_tqgeometryEnd.x() )
+ x = m_tqgeometryEnd.x();
+ if ( y > m_tqgeometryEnd.y() )
+ y = m_tqgeometryEnd.y();
+ int w = m_tqgeometryEnd.x() - m_tqgeometryStart.x();
if ( w < 0 ) w *= -1;
- int h = m_geometryEnd.y() - m_geometryStart.y();
+ int h = m_tqgeometryEnd.y() - m_tqgeometryStart.y();
if ( h < 0 ) h *= -1;
if ( w < KS_MIN_RECTSIZE ) w = KS_MIN_RECTSIZE;
@@ -77,17 +77,17 @@ bool InsertHandler::eventFilter( QObject*, QEvent* ev )
else
m_started = true;
- m_geometryEnd = e->pos();
+ m_tqgeometryEnd = e->pos();
- int x = m_geometryStart.x();
- int y = m_geometryStart.y();
- if ( x > m_geometryEnd.x() )
- x = m_geometryEnd.x();
- if ( y > m_geometryEnd.y() )
- y = m_geometryEnd.y();
- int w = m_geometryEnd.x() - m_geometryStart.x();
+ int x = m_tqgeometryStart.x();
+ int y = m_tqgeometryStart.y();
+ if ( x > m_tqgeometryEnd.x() )
+ x = m_tqgeometryEnd.x();
+ if ( y > m_tqgeometryEnd.y() )
+ y = m_tqgeometryEnd.y();
+ int w = m_tqgeometryEnd.x() - m_tqgeometryStart.x();
if ( w < 0 ) w *= -1;
- int h = m_geometryEnd.y() - m_geometryStart.y();
+ int h = m_tqgeometryEnd.y() - m_tqgeometryStart.y();
if ( h < 0 ) h *= -1;
if ( w < KS_MIN_RECTSIZE ) w = KS_MIN_RECTSIZE;
@@ -98,9 +98,9 @@ bool InsertHandler::eventFilter( QObject*, QEvent* ev )
return true;
}
- else if ( ev->type() == QEvent::MouseButtonRelease )
+ else if ( ev->type() == TQEvent::MouseButtonRelease )
{
- QMouseEvent* e = (QMouseEvent*)ev;
+ TQMouseEvent* e = (TQMouseEvent*)ev;
if ( !m_started )
{
@@ -108,41 +108,41 @@ bool InsertHandler::eventFilter( QObject*, QEvent* ev )
return true;
}
- m_geometryEnd = e->pos();
-
- int x = m_geometryStart.x();
- int y = m_geometryStart.y();
- if ( x > m_geometryEnd.x() )
- x = m_geometryEnd.x();
- if ( y > m_geometryEnd.y() )
- y = m_geometryEnd.y();
- int w = m_geometryEnd.x() - m_geometryStart.x();
+ m_tqgeometryEnd = e->pos();
+
+ int x = m_tqgeometryStart.x();
+ int y = m_tqgeometryStart.y();
+ if ( x > m_tqgeometryEnd.x() )
+ x = m_tqgeometryEnd.x();
+ if ( y > m_tqgeometryEnd.y() )
+ y = m_tqgeometryEnd.y();
+ int w = m_tqgeometryEnd.x() - m_tqgeometryStart.x();
if ( w < 0 ) w *= -1;
- int h = m_geometryEnd.y() - m_geometryStart.y();
+ int h = m_tqgeometryEnd.y() - m_tqgeometryStart.y();
if ( h < 0 ) h *= -1;
if ( w < KS_MIN_RECTSIZE ) w = KS_MIN_RECTSIZE;
if ( h < KS_MIN_RECTSIZE ) h = KS_MIN_RECTSIZE;
- QPainter painter;
- painter.begin( (QWidget*)target() );
+ TQPainter painter;
+ painter.begin( (TQWidget*)target() );
- QPen pen;
- pen.setStyle( DashLine );
+ TQPen pen;
+ pen.setStyle( Qt::DashLine );
painter.setPen( pen );
painter.setRasterOp( NotROP );
painter.drawRect( x, y, w, h );
painter.end();
- insertObject( QRect( x, y, w, h) );
+ insertObject( TQRect( x, y, w, h) );
delete this;
return true;
}
- else if ( ev->type() == QEvent::KeyPress )
+ else if ( ev->type() == TQEvent::KeyPress )
{
- QKeyEvent* e = (QKeyEvent*)ev;
+ TQKeyEvent* e = (TQKeyEvent*)ev;
if ( e->key() != Key_Escape )
return false;
@@ -153,32 +153,32 @@ bool InsertHandler::eventFilter( QObject*, QEvent* ev )
return false;
}
-InsertPartHandler::InsertPartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry )
+InsertPartHandler::InsertPartHandler( View* view, TQWidget* widget, const KoDocumentEntry& entry )
: InsertHandler( view, widget ), m_entry( entry )
{
}
InsertPartHandler::~InsertPartHandler()
{
}
-void InsertPartHandler::insertObject( QRect r)
+void InsertPartHandler::insertObject( TQRect r)
{
m_view->insertChild( r, m_entry );
}
-InsertChartHandler::InsertChartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry )
+InsertChartHandler::InsertChartHandler( View* view, TQWidget* widget, const KoDocumentEntry& entry )
: InsertHandler( view, widget ), m_entry( entry )
{
}
InsertChartHandler::~InsertChartHandler()
{
}
-void InsertChartHandler::insertObject( QRect r)
+void InsertChartHandler::insertObject( TQRect r)
{
m_view->insertChart( r, m_entry );
}
-InsertPictureHandler::InsertPictureHandler( View* view, QWidget* widget, const KURL &file )
+InsertPictureHandler::InsertPictureHandler( View* view, TQWidget* widget, const KURL &file )
: InsertHandler( view, widget )
{
m_file = file;
@@ -186,7 +186,7 @@ InsertPictureHandler::InsertPictureHandler( View* view, QWidget* widget, const K
InsertPictureHandler::~InsertPictureHandler()
{
}
-void InsertPictureHandler::insertObject( QRect r)
+void InsertPictureHandler::insertObject( TQRect r)
{
//m_view->insertPicture(/* r,*/ m_file );
}
diff --git a/kspread/kspread_handler.h b/kspread/kspread_handler.h
index b14b1212..5a54736b 100644
--- a/kspread/kspread_handler.h
+++ b/kspread/kspread_handler.h
@@ -3,11 +3,11 @@
#include <KoContainerHandler.h>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <KoQueryTrader.h>
-class QWidget;
+class TQWidget;
enum HandlerType
{
@@ -28,19 +28,20 @@ class View;
class InsertHandler : public KoEventHandler
{
Q_OBJECT
+ TQ_OBJECT
public:
- InsertHandler( View* view, QWidget* widget );
+ InsertHandler( View* view, TQWidget* widget );
~InsertHandler();
virtual HandlerType getType() = 0;
protected:
- bool eventFilter( QObject*, QEvent* );
- virtual void insertObject( QRect ) = 0;
+ bool eventFilter( TQObject*, TQEvent* );
+ virtual void insertObject( TQRect ) = 0;
View* m_view;
- QPoint m_geometryStart;
- QPoint m_geometryEnd;
+ TQPoint m_tqgeometryStart;
+ TQPoint m_tqgeometryEnd;
bool m_started;
bool m_clicked;
};
@@ -48,12 +49,12 @@ protected:
class InsertPartHandler : public InsertHandler
{
public:
- InsertPartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry );
+ InsertPartHandler( View* view, TQWidget* widget, const KoDocumentEntry& entry );
virtual ~InsertPartHandler();
HandlerType getType() { return Part; }
private:
- void insertObject( QRect );
+ void insertObject( TQRect );
KoDocumentEntry m_entry;
};
@@ -62,12 +63,12 @@ class InsertPartHandler : public InsertHandler
class InsertChartHandler : public InsertHandler
{
public:
- InsertChartHandler( View* view, QWidget* widget, const KoDocumentEntry& entry );
+ InsertChartHandler( View* view, TQWidget* widget, const KoDocumentEntry& entry );
virtual ~InsertChartHandler();
HandlerType getType() { return Chart; }
private:
- void insertObject( QRect );
+ void insertObject( TQRect );
KoDocumentEntry m_entry;
};
@@ -75,12 +76,12 @@ class InsertChartHandler : public InsertHandler
class InsertPictureHandler : public InsertHandler
{
public:
- InsertPictureHandler( View* view, QWidget* widget, const KURL &);
+ InsertPictureHandler( View* view, TQWidget* widget, const KURL &);
virtual ~InsertPictureHandler();
HandlerType getType() { return Picture; }
private:
- void insertObject( QRect );
+ void insertObject( TQRect );
KURL m_file;
};
diff --git a/kspread/kspread_locale.cc b/kspread/kspread_locale.cc
index 578274fa..fbbfbfbf 100644
--- a/kspread/kspread_locale.cc
+++ b/kspread/kspread_locale.cc
@@ -1,6 +1,6 @@
#include "kspread_locale.h"
-#include <qdom.h>
+#include <tqdom.h>
using namespace KSpread;
@@ -10,11 +10,11 @@ Locale::Locale()
insertCatalogue("koffice");
}
-void Locale::load( const QDomElement& element )
+void Locale::load( const TQDomElement& element )
{
if ( element.hasAttribute( "weekStartsMonday" ) )
{
- QString c = element.attribute( "weekStartsMonday" );
+ TQString c = element.attribute( "weekStartsMonday" );
if ( c != "False")
{
setWeekStartDay( 1 /*Monday*/ );
@@ -38,12 +38,12 @@ void Locale::load( const QDomElement& element )
setFracDigits( element.attribute( "fracDigits" ).toInt() );
if ( element.hasAttribute( "positivePrefixCurrencySymbol" ) )
{
- QString c = element.attribute( "positivePrefixCurrencySymbol" );
+ TQString c = element.attribute( "positivePrefixCurrencySymbol" );
setPositivePrefixCurrencySymbol( c == "True" );
}
if ( element.hasAttribute( "negativePrefixCurrencySymbol" ) )
{
- QString c = element.attribute( "negativePrefixCurrencySymbol" );
+ TQString c = element.attribute( "negativePrefixCurrencySymbol" );
setNegativePrefixCurrencySymbol( c == "True" );
}
if ( element.hasAttribute( "positiveMonetarySignPosition" ) )
@@ -58,9 +58,9 @@ void Locale::load( const QDomElement& element )
setDateFormatShort( element.attribute( "dateFormatShort" ) );
}
-QDomElement Locale::save( QDomDocument& doc ) const
+TQDomElement Locale::save( TQDomDocument& doc ) const
{
- QDomElement element = doc.createElement( "locale" );
+ TQDomElement element = doc.createElement( "locale" );
element.setAttribute( "weekStartsMonday", (weekStartDay() == 1) ? "True" : "False" );
element.setAttribute( "decimalSymbol", decimalSymbol() );
diff --git a/kspread/kspread_locale.h b/kspread/kspread_locale.h
index 1d94a289..7b3041e7 100644
--- a/kspread/kspread_locale.h
+++ b/kspread/kspread_locale.h
@@ -3,8 +3,8 @@
#include <klocale.h>
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
namespace KSpread
{
@@ -14,8 +14,8 @@ class Locale : public KLocale
public:
Locale();
- void load( const QDomElement& element );
- QDomElement save( QDomDocument& doc ) const;
+ void load( const TQDomElement& element );
+ TQDomElement save( TQDomDocument& doc ) const;
void defaultSystemConfig();
};
diff --git a/kspread/kspread_map.cc b/kspread/kspread_map.cc
index 6b7d89d5..032fd13c 100644
--- a/kspread/kspread_map.cc
+++ b/kspread/kspread_map.cc
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <time.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kmdcodec.h>
#include <ktempfile.h>
@@ -49,7 +49,7 @@ using namespace KSpread;
bool Map::respectCase = true;
Map::Map ( Doc* doc, const char* name)
- : QObject( doc, name ),
+ : TQObject( doc, name ),
m_doc( doc ),
m_initialActiveSheet( 0 ),
m_initialMarkerColumn( 0 ),
@@ -72,15 +72,15 @@ Doc* Map::doc() const
return m_doc;
}
-void Map::setProtected( QCString const & passwd )
+void Map::setProtected( TQCString const & passwd )
{
m_strPassword = passwd;
}
Sheet* Map::createSheet()
{
- QString s( i18n("Sheet%1") );
- s = s.arg( tableId++ );
+ TQString s( i18n("Sheet%1") );
+ s = s.tqarg( tableId++ );
Sheet *t = new Sheet ( this, s , s.utf8());
t->setSheetName( s, true ); // huh? (Werner)
return t;
@@ -102,13 +102,13 @@ Sheet *Map::addNewSheet ()
return t;
}
-void Map::moveSheet( const QString & _from, const QString & _to, bool _before )
+void Map::moveSheet( const TQString & _from, const TQString & _to, bool _before )
{
Sheet* sheetfrom = findSheet( _from );
Sheet* sheetto = findSheet( _to );
- int from = m_lstSheets.find( sheetfrom ) ;
- int to = m_lstSheets.find( sheetto ) ;
+ int from = m_lstSheets.tqfind( sheetfrom ) ;
+ int to = m_lstSheets.tqfind( sheetto ) ;
if ( !_before )
++to;
@@ -139,14 +139,14 @@ void Map::loadOasisSettings( KoOasisSettings &settings )
kdDebug()<<" loadOasisSettings( KoOasisSettings &settings ) exist : "<< !sheetsMap.isNull() <<endl;
if ( !sheetsMap.isNull() )
{
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
{
it.current()->loadOasisSettings( sheetsMap );
}
}
- QString activeSheet = firstView.parseConfigItemString( "ActiveTable" );
+ TQString activeSheet = firstView.parseConfigItemString( "ActiveTable" );
kdDebug()<<" loadOasisSettings( KoOasisSettings &settings ) activeSheet :"<<activeSheet<<endl;
if (!activeSheet.isEmpty())
@@ -159,7 +159,7 @@ void Map::loadOasisSettings( KoOasisSettings &settings )
void Map::saveOasisSettings( KoXmlWriter &settingsWriter )
{
- settingsWriter.addConfigItem( "ViewId", QString::fromLatin1( "View1" ) );
+ settingsWriter.addConfigItem( "ViewId", TQString::tqfromLatin1( "View1" ) );
// Save visual info for the first view, such as active sheet and active cell
// It looks like a hack, but reopening a document creates only one view anyway (David)
View * view = m_doc->views().isEmpty() ? 0 : dynamic_cast<View*>(m_doc->views().getFirst());
@@ -174,14 +174,14 @@ void Map::saveOasisSettings( KoXmlWriter &settingsWriter )
//<config:config-item-map-named config:name="Tables">
settingsWriter.startElement("config:config-item-map-named" );
settingsWriter.addAttribute("config:name","Tables" );
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
{
settingsWriter.startElement( "config:config-item-map-entry" );
settingsWriter.addAttribute( "config:name", ( *it )->sheetName() );
if ( view )
{
- QPoint marker = view->markerFromSheet( *it );
+ TQPoint marker = view->markerFromSheet( *it );
KoPoint offset = view->offsetFromSheet( *it );
settingsWriter.addConfigItem( "CursorPositionX", marker.x() );
settingsWriter.addConfigItem( "CursorPositionY", marker.y() );
@@ -200,8 +200,8 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
if ( !m_strPassword.isEmpty() )
{
xmlWriter.addAttribute("table:structure-protected", "true" );
- QCString str = KCodecs::base64Encode( m_strPassword );
- xmlWriter.addAttribute("table:protection-key", QString( str.data() ) );/* FIXME !!!!*/
+ TQCString str = KCodecs::base64Encode( m_strPassword );
+ xmlWriter.addAttribute("table:protection-key", TQString( str.data() ) );/* FIXME !!!!*/
}
GenValidationStyles valStyle;
@@ -215,11 +215,11 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
}
bodyTmpFile.setAutoDelete( true );
- QFile* tmpFile = bodyTmpFile.file();
- KoXmlWriter bodyTmpWriter( tmpFile );
+ TQFile* tmpFile = bodyTmpFile.file();
+ KoXmlWriter bodyTmpWriter( TQT_TQIODEVICE(tmpFile) );
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
{
it.current()->saveOasis( bodyTmpWriter, mainStyles, valStyle, store, manifestWriter, _indexObj, _partIndexObj );
@@ -229,15 +229,15 @@ bool Map::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore
tmpFile->close();
- xmlWriter.addCompleteElement( tmpFile );
+ xmlWriter.addCompleteElement( TQT_TQIODEVICE(tmpFile) );
bodyTmpFile.close();
return true;
}
-QDomElement Map::save( QDomDocument& doc )
+TQDomElement Map::save( TQDomDocument& doc )
{
- QDomElement mymap = doc.createElement( "map" );
+ TQDomElement mymap = doc.createElement( "map" );
// Save visual info for the first view, such as active sheet and active cell
// It looks like a hack, but reopening a document creates only one view anyway (David)
View * view = static_cast<View*>(m_doc->views().getFirst());
@@ -255,17 +255,17 @@ QDomElement Map::save( QDomDocument& doc )
{
if ( m_strPassword.size() > 0 )
{
- QCString str = KCodecs::base64Encode( m_strPassword );
- mymap.setAttribute( "protected", QString( str.data() ) );
+ TQCString str = KCodecs::base64Encode( m_strPassword );
+ mymap.setAttribute( "protected", TQString( str.data() ) );
}
else
mymap.setAttribute( "protected", "" );
}
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
{
- QDomElement e = it.current()->saveXML( doc );
+ TQDomElement e = it.current()->saveXML( doc );
if ( e.isNull() )
return e;
mymap.appendChild( e );
@@ -273,37 +273,37 @@ QDomElement Map::save( QDomDocument& doc )
return mymap;
}
-bool Map::loadOasis( const QDomElement& body, KoOasisLoadingContext& oasisContext )
+bool Map::loadOasis( const TQDomElement& body, KoOasisLoadingContext& oasisContext )
{
if ( body.hasAttributeNS( KoXmlNS::table, "structure-protected" ) )
{
- QCString passwd( "" );
+ TQCString passwd( "" );
if ( body.hasAttributeNS( KoXmlNS::table, "protection-key" ) )
{
- QString p = body.attributeNS( KoXmlNS::table, "protection-key", QString::null );
- QCString str( p.latin1() );
+ TQString p = body.attributeNS( KoXmlNS::table, "protection-key", TQString() );
+ TQCString str( p.latin1() );
passwd = KCodecs::base64Decode( str );
}
m_strPassword = passwd;
}
- QDomNode sheetNode = KoDom::namedItemNS( body, KoXmlNS::table, "table" );
+ TQDomNode sheetNode = KoDom::namedItemNS( body, KoXmlNS::table, "table" );
// sanity check
if ( sheetNode.isNull() ) return false;
while ( !sheetNode.isNull() )
{
- QDomElement sheetElement = sheetNode.toElement();
+ TQDomElement sheetElement = sheetNode.toElement();
if( !sheetElement.isNull() )
{
//kdDebug()<<" Map::loadOasis tableElement is not null \n";
//kdDebug()<<"tableElement.nodeName() :"<<sheetElement.nodeName()<<endl;
if( sheetElement.nodeName() == "table:table" )
{
- if( !sheetElement.attributeNS( KoXmlNS::table, "name", QString::null ).isEmpty() )
+ if( !sheetElement.attributeNS( KoXmlNS::table, "name", TQString() ).isEmpty() )
{
Sheet* sheet = addNewSheet();
- sheet->setSheetName( sheetElement.attributeNS( KoXmlNS::table, "name", QString::null ), true, false );
+ sheet->setSheetName( sheetElement.attributeNS( KoXmlNS::table, "name", TQString() ), true, false );
}
}
}
@@ -311,21 +311,21 @@ bool Map::loadOasis( const QDomElement& body, KoOasisLoadingContext& oasisContex
}
//pre-load auto styles
- QDict<Style> autoStyles = doc()->styleManager()->loadOasisAutoStyles( oasisContext.oasisStyles() );
+ TQDict<Style> autoStyles = doc()->styleManager()->loadOasisAutoStyles( oasisContext.oasisStyles() );
// load the sheet
sheetNode = body.firstChild();
while ( !sheetNode.isNull() )
{
- QDomElement sheetElement = sheetNode.toElement();
+ TQDomElement sheetElement = sheetNode.toElement();
if( !sheetElement.isNull() )
{
//kdDebug()<<"tableElement.nodeName() bis :"<<sheetElement.nodeName()<<endl;
if( sheetElement.nodeName() == "table:table" )
{
- if( !sheetElement.attributeNS( KoXmlNS::table, "name", QString::null ).isEmpty() )
+ if( !sheetElement.attributeNS( KoXmlNS::table, "name", TQString() ).isEmpty() )
{
- QString name = sheetElement.attributeNS( KoXmlNS::table, "name", QString::null );
+ TQString name = sheetElement.attributeNS( KoXmlNS::table, "name", TQString() );
Sheet* sheet = findSheet( name );
if( sheet )
sheet->loadOasis( sheetElement, oasisContext, autoStyles );
@@ -342,15 +342,15 @@ bool Map::loadOasis( const QDomElement& body, KoOasisLoadingContext& oasisContex
}
-bool Map::loadXML( const QDomElement& mymap )
+bool Map::loadXML( const TQDomElement& mymap )
{
- QString activeSheet = mymap.attribute( "activeTable" );
+ TQString activeSheet = mymap.attribute( "activeTable" );
m_initialMarkerColumn = mymap.attribute( "markerColumn" ).toInt();
m_initialMarkerRow = mymap.attribute( "markerRow" ).toInt();
m_initialXOffset = mymap.attribute( "xOffset" ).toDouble();
m_initialYOffset = mymap.attribute( "yOffset" ).toDouble();
- QDomNode n = mymap.firstChild();
+ TQDomNode n = mymap.firstChild();
if ( n.isNull() )
{
// We need at least one sheet !
@@ -359,7 +359,7 @@ bool Map::loadXML( const QDomElement& mymap )
}
while( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() && e.tagName() == "table" )
{
Sheet *t = addNewSheet();
@@ -371,15 +371,15 @@ bool Map::loadXML( const QDomElement& mymap )
if ( mymap.hasAttribute( "protected" ) )
{
- QString passwd = mymap.attribute( "protected" );
+ TQString passwd = mymap.attribute( "protected" );
if ( passwd.length() > 0 )
{
- QCString str( passwd.latin1() );
+ TQCString str( passwd.latin1() );
m_strPassword = KCodecs::base64Decode( str );
}
else
- m_strPassword = QCString( "" );
+ m_strPassword = TQCString( "" );
}
if (!activeSheet.isEmpty())
@@ -393,12 +393,12 @@ bool Map::loadXML( const QDomElement& mymap )
void Map::update()
{
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
it.current()->recalc();
}
-Sheet* Map::findSheet( const QString & _name )
+Sheet* Map::findSheet( const TQString & _name )
{
Sheet * t;
@@ -445,7 +445,7 @@ Sheet * Map::previousSheet( Sheet * currentSheet )
bool Map::saveChildren( KoStore * _store )
{
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
{
// set the child document's url to an internal url (ex: "tar:/0/1")
@@ -457,7 +457,7 @@ bool Map::saveChildren( KoStore * _store )
bool Map::loadChildren( KoStore * _store )
{
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it.current(); ++it )
if ( !it.current()->loadChildren( _store ) )
return false;
@@ -475,25 +475,25 @@ DCOPObject * Map::dcopObject()
void Map::takeSheet( Sheet * sheet )
{
- int pos = m_lstSheets.findRef( sheet );
+ int pos = m_lstSheets.tqfindRef( sheet );
m_lstSheets.take( pos );
m_lstDeletedSheets.append( sheet );
}
void Map::insertSheet( Sheet * sheet )
{
- int pos = m_lstDeletedSheets.findRef( sheet );
+ int pos = m_lstDeletedSheets.tqfindRef( sheet );
if ( pos != -1 )
m_lstDeletedSheets.take( pos );
m_lstSheets.append(sheet);
}
// FIXME cache this for faster operation
-QStringList Map::visibleSheets() const
+TQStringList Map::visibleSheets() const
{
- QStringList result;
+ TQStringList result;
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it; ++it )
{
Sheet* sheet = it.current();
@@ -505,11 +505,11 @@ QStringList Map::visibleSheets() const
}
// FIXME cache this for faster operation
-QStringList Map::hiddenSheets() const
+TQStringList Map::hiddenSheets() const
{
- QStringList result;
+ TQStringList result;
- QPtrListIterator<Sheet> it( m_lstSheets );
+ TQPtrListIterator<Sheet> it( m_lstSheets );
for( ; it; ++it )
{
Sheet* sheet = it.current();
diff --git a/kspread/kspread_map.h b/kspread/kspread_map.h
index dfc268d2..d2a07627 100644
--- a/kspread/kspread_map.h
+++ b/kspread/kspread_map.h
@@ -20,13 +20,13 @@
#ifndef __kspread_map_h__
#define __kspread_map_h__
-#include <qcstring.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qintdict.h>
-#include <qobject.h>
-#include <qdict.h>
+#include <tqcstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqintdict.h>
+#include <tqobject.h>
+#include <tqdict.h>
#include <koffice_export.h>
@@ -36,8 +36,8 @@ class KoOasisStyles;
class DCOPObject;
-class QDomElement;
-class QDomDocument;
+class TQDomElement;
+class TQDomDocument;
class KoXmlWriter;
class KoGenStyles;
class KoOasisSettings;
@@ -55,9 +55,10 @@ class Style;
A map is a simple container for all sheets. Usually a complete map
is saved in one file.
*/
-class KSPREAD_EXPORT Map : public QObject
+class KSPREAD_EXPORT Map : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Created an empty map.
@@ -70,36 +71,36 @@ public:
Doc* doc() const;
- QDomElement save( QDomDocument& doc );
+ TQDomElement save( TQDomDocument& doc );
void saveOasisSettings( KoXmlWriter &settingsWriter );
void loadOasisSettings( KoOasisSettings &settings );
bool saveOasis( KoXmlWriter & xmlWriter, KoGenStyles & mainStyles, KoStore *store, KoXmlWriter* manifestWriter, int &_indexObj, int &_partIndexObj );
- bool loadOasis( const QDomElement& mymap, KoOasisLoadingContext& oasisContext );
- bool loadXML( const QDomElement& mymap );
+ bool loadOasis( const TQDomElement& mymap, KoOasisLoadingContext& oasisContext );
+ bool loadXML( const TQDomElement& mymap );
bool loadChildren( KoStore* _store );
bool saveChildren( KoStore* _store );
- void password( QCString & passwd ) const { passwd = m_strPassword; }
+ void password( TQCString & passwd ) const { passwd = m_strPassword; }
bool isProtected() const { return !m_strPassword.isNull(); }
- void setProtected( QCString const & passwd );
- bool checkPassword( QCString const & passwd ) const { return ( passwd == m_strPassword ); }
+ void setProtected( TQCString const & passwd );
+ bool checkPassword( TQCString const & passwd ) const { return ( passwd == m_strPassword ); }
/**
* The sheet named @p _from is being moved to the sheet @p _to.
* If @p _before is true @p _from is inserted before (after otherwise)
* @p _to.
*/
- void moveSheet( const QString & _from, const QString & _to, bool _before = true );
+ void moveSheet( const TQString & _from, const TQString & _to, bool _before = true );
/**
* searches for a sheet named @p _name
* @return a pointer to the searched sheet, @c 0 if nothing was found
*/
- Sheet* findSheet( const QString & _name );
+ Sheet* findSheet( const TQString & _name );
Sheet* nextSheet( Sheet* );
Sheet* previousSheet( Sheet* );
@@ -145,7 +146,7 @@ public:
*/
Sheet* nextSheet() { return m_lstSheets.next(); }
- QPtrList<Sheet>& sheetList() { return m_lstSheets; }
+ TQPtrList<Sheet>& sheetList() { return m_lstSheets; }
/**
* @return amount of sheets in this map.
@@ -157,7 +158,7 @@ public:
/**
* Needed for the printing Extension KOffice::Print
*/
- // void draw( QPaintDevice* _dev, long int _width, long int _height,
+ // void draw( TQPaintDevice* _dev, long int _width, long int _height,
// float _scale );
virtual DCOPObject* dcopObject();
@@ -165,8 +166,8 @@ public:
void takeSheet( Sheet * sheet );
void insertSheet( Sheet * sheet );
- QStringList visibleSheets() const;
- QStringList hiddenSheets() const;
+ TQStringList visibleSheets() const;
+ TQStringList hiddenSheets() const;
static bool respectCase;
@@ -183,13 +184,13 @@ private:
/**
* List of all sheets in this map. The list has autodelete turned on.
*/
- QPtrList<Sheet> m_lstSheets;
- QPtrList<Sheet> m_lstDeletedSheets;
+ TQPtrList<Sheet> m_lstSheets;
+ TQPtrList<Sheet> m_lstDeletedSheets;
/**
* Password to protect the map from being changed.
*/
- QCString m_strPassword;
+ TQCString m_strPassword;
/**
* Set from the XML
*/
diff --git a/kspread/kspread_numformat.cc b/kspread/kspread_numformat.cc
index e57d01b9..ed118ec1 100644
--- a/kspread/kspread_numformat.cc
+++ b/kspread/kspread_numformat.cc
@@ -29,9 +29,9 @@ Tomas
#include <ctype.h>
#include <math.h>
-#include <qdatetime.h>
-#include <qmap.h>
-#include <qstring.h>
+#include <tqdatetime.h>
+#include <tqmap.h>
+#include <tqstring.h>
#include <kcalendarsystem.h>
#include <klocale.h>
@@ -43,44 +43,44 @@ namespace NumFormat_Local
{
enum { Unknown, TimeDate, Number, Scientific, Fraction } Type;
- QString g_Monday;
- QString g_Tuesday;
- QString g_Wednesday;
- QString g_Thursday;
- QString g_Friday;
- QString g_Saturday;
- QString g_Sunday;
- QString g_Mon;
- QString g_Tue;
- QString g_Wed;
- QString g_Thu;
- QString g_Fri;
- QString g_Sat;
- QString g_Sun;
- QString g_January;
- QString g_February;
- QString g_March;
- QString g_April;
- QString g_MayL;
- QString g_June;
- QString g_July;
- QString g_August;
- QString g_September;
- QString g_October;
- QString g_November;
- QString g_December;
- QString g_Jan;
- QString g_Feb;
- QString g_Mar;
- QString g_Apr;
- QString g_May;
- QString g_Jun;
- QString g_Jul;
- QString g_Aug;
- QString g_Sep;
- QString g_Oct;
- QString g_Nov;
- QString g_Dec;
+ TQString g_Monday;
+ TQString g_Tuesday;
+ TQString g_Wednesday;
+ TQString g_Thursday;
+ TQString g_Friday;
+ TQString g_Saturday;
+ TQString g_Sunday;
+ TQString g_Mon;
+ TQString g_Tue;
+ TQString g_Wed;
+ TQString g_Thu;
+ TQString g_Fri;
+ TQString g_Sat;
+ TQString g_Sun;
+ TQString g_January;
+ TQString g_February;
+ TQString g_March;
+ TQString g_April;
+ TQString g_MayL;
+ TQString g_June;
+ TQString g_July;
+ TQString g_August;
+ TQString g_September;
+ TQString g_October;
+ TQString g_November;
+ TQString g_December;
+ TQString g_Jan;
+ TQString g_Feb;
+ TQString g_Mar;
+ TQString g_Apr;
+ TQString g_May;
+ TQString g_Jun;
+ TQString g_Jul;
+ TQString g_Aug;
+ TQString g_Sep;
+ TQString g_Oct;
+ TQString g_Nov;
+ TQString g_Dec;
struct DateTime
{
@@ -103,7 +103,7 @@ namespace NumFormat_Local
int leftSpace;
int upReq;
- int reqCounter;
+ int retqCounter;
int reqFirst;
int optFirst;
@@ -113,8 +113,8 @@ namespace NumFormat_Local
bool showMinus;
bool negRed;
bool negBr;
- QString postfix;
- QString prefix;
+ TQString postfix;
+ TQString prefix;
};
class BaseFormat
@@ -122,8 +122,8 @@ namespace NumFormat_Local
public:
int type;
- QString postfix;
- QString prefix;
+ TQString postfix;
+ TQString prefix;
};
class NumberFormat : public BaseFormat
@@ -149,7 +149,7 @@ namespace NumFormat_Local
bool negBr;
int optFirst;
int reqFirst;
- int reqCounter;
+ int retqCounter;
int fraction;
int fractionDigists;
};
@@ -158,7 +158,7 @@ namespace NumFormat_Local
{
public:
bool ampm;
- QString format;
+ TQString format;
};
class ScientificFormat : public BaseFormat
@@ -180,9 +180,9 @@ namespace NumFormat_Local
{
public:
- int getType( QString const & format, BaseFormat * f ) const
+ int getType( TQString const & format, BaseFormat * f ) const
{
- FormatMap::const_iterator iter = m_formats.find( format );
+ FormatMap::const_iterator iter = m_formats.tqfind( format );
if ( iter == m_formats.end() )
{
f = 0;
@@ -193,35 +193,35 @@ namespace NumFormat_Local
return f->type;
}
- void addFraction( QString const & format, FractionFormat * f )
+ void addFraction( TQString const & format, FractionFormat * f )
{
m_formats.insert( format, f );
}
- void addNumber( QString const & format, NumberFormat * n )
+ void addNumber( TQString const & format, NumberFormat * n )
{
m_formats.insert( format, n );
}
- void addDateTime( QString const & format, DateTimeFormat * d )
+ void addDateTime( TQString const & format, DateTimeFormat * d )
{
m_formats.insert( format, d );
}
- void addScientific( QString const & format, ScientificFormat * d )
+ void addScientific( TQString const & format, ScientificFormat * d )
{
m_formats.insert( format, d );
}
private:
- class FormatMap : public QMap<QString, BaseFormat *> {};
+ class FormatMap : public TQMap<TQString, BaseFormat *> {};
FormatMap m_formats;
};
- QChar g_dcSymbol;
- QChar g_thSymbol;
- QChar g_posSymbol;
- QChar g_negSymbol;
+ TQChar g_dcSymbol;
+ TQChar g_thSymbol;
+ TQChar g_posSymbol;
+ TQChar g_negSymbol;
DateTime g_dateTime;
ConvertionInfo g_convertionInfo;
bool g_init = false;
@@ -239,7 +239,7 @@ void resetGlobals()
g_convertionInfo.showMinus = true;
g_convertionInfo.negRed = false;
g_convertionInfo.negBr = false;
- g_convertionInfo.reqCounter = 0;
+ g_convertionInfo.retqCounter = 0;
g_convertionInfo.reqFirst = 0;
g_convertionInfo.prefix = "";
g_convertionInfo.postfix = "";
@@ -304,9 +304,9 @@ void initGlobals( KLocale const * const locale )
void convertDateTime( Value const & value )
{
- QDateTime dt( value.asDateTime() );
- QDate d( dt.date() );
- QTime t( dt.time() );
+ TQDateTime dt( value.asDateTime() );
+ TQDate d( dt.date() );
+ TQTime t( dt.time() );
g_dateTime.year = d.year();
g_dateTime.month = d.month();
@@ -318,7 +318,7 @@ void convertDateTime( Value const & value )
g_convertionInfo.dt = &g_dateTime;
}
-void parseNegativePart( QString & format, int i,
+void parseNegativePart( TQString & format, int i,
int l, bool acceptDigits )
{
g_convertionInfo.showMinus = false;
@@ -328,7 +328,7 @@ void parseNegativePart( QString & format, int i,
while ( i < l && !end)
{
- QChar c( format[i] );
+ TQChar c( format[i] );
switch( c )
{
case '-':
@@ -338,7 +338,7 @@ void parseNegativePart( QString & format, int i,
g_convertionInfo.negBr = true;
break;
case '[':
- if ( format.find( "[red]", i, false ) == i )
+ if ( format.tqfind( "[red]", i, false ) == i )
{
g_convertionInfo.negRed = true;
i += 5;
@@ -370,16 +370,16 @@ void parseNegativePart( QString & format, int i,
}
}
- int p = g_convertionInfo.postfix.find( '"' );
+ int p = g_convertionInfo.postfix.tqfind( '"' );
while ( p != -1 )
{
g_convertionInfo.postfix.remove( p, 1 );
- p = g_convertionInfo.postfix.find( '"', p );
+ p = g_convertionInfo.postfix.tqfind( '"', p );
}
}
-void createNumberStruct( BaseFormat * data, QString const & format, bool insert )
+void createNumberStruct( BaseFormat * data, TQString const & format, bool insert )
{
NumberFormat * d = new NumberFormat();
d->type = Number;
@@ -400,8 +400,8 @@ void createNumberStruct( BaseFormat * data, QString const & format, bool insert
data = d;
}
-void createDateTimeStruct( BaseFormat * data, QString const & format,
- QString const & optFormat, bool insert )
+void createDateTimeStruct( BaseFormat * data, TQString const & format,
+ TQString const & optFormat, bool insert )
{
DateTimeFormat * d = new DateTimeFormat();
d->type = TimeDate;
@@ -415,7 +415,7 @@ void createDateTimeStruct( BaseFormat * data, QString const & format,
data = d;
}
-void createScientificStruct( BaseFormat * data, QString const & format, bool insert )
+void createScientificStruct( BaseFormat * data, TQString const & format, bool insert )
{
ScientificFormat * d = new ScientificFormat();
d->type = Scientific;
@@ -438,7 +438,7 @@ void createScientificStruct( BaseFormat * data, QString const & format, bool ins
}
-int doPreScan( QString & format, QString const & formatBack, KLocale const * const /* locale */,
+int doPreScan( TQString & format, TQString const & formatBack, KLocale const * const /* locale */,
bool insert, BaseFormat * data )
{
int type = g_formatStore.getType( format, data );
@@ -463,18 +463,18 @@ int doPreScan( QString & format, QString const & formatBack, KLocale const * con
int len = 0;
int n = 0;
bool ok = false;
- QString frac;
+ TQString frac;
while ( i < l )
{
- QString s;
+ TQString s;
if ( endFixed )
{
g_convertionInfo.postfix += format.mid( i );
format.remove( i, l - i );
break;
}
- QChar ch( format[i] );
+ TQChar ch( format[i] );
switch( ch )
{
case '[':
@@ -527,7 +527,7 @@ int doPreScan( QString & format, QString const & formatBack, KLocale const * con
{
type = TimeDate;
++i;
- QChar c( format[i] );
+ TQChar c( format[i] );
++i;
while ( i < l && format[i] != ']' )
{
@@ -575,7 +575,7 @@ int doPreScan( QString & format, QString const & formatBack, KLocale const * con
case '0':
if ( spaceInNum > 0 )
{ // for fractions
- ++g_convertionInfo.reqCounter;
+ ++g_convertionInfo.retqCounter;
break;
}
type = Number;
@@ -640,7 +640,7 @@ int doPreScan( QString & format, QString const & formatBack, KLocale const * con
df->negRed = g_convertionInfo.negRed;
df->negBr = g_convertionInfo.negBr;
df->fractionDigists = d;
- df->reqCounter = g_convertionInfo.reqCounter;
+ df->retqCounter = g_convertionInfo.retqCounter;
df->reqFirst = g_convertionInfo.reqFirst;
df->prefix = g_convertionInfo.prefix;
df->postfix = g_convertionInfo.postfix;
@@ -919,8 +919,8 @@ int doPreScan( QString & format, QString const & formatBack, KLocale const * con
return type;
}
-void createNumber( QString & result, Value const & value,
- QString const & /*format*/, bool & setRed,
+void createNumber( TQString & result, Value const & value,
+ TQString const & /*format*/, bool & setRed,
NumberFormat const * const data )
{
int prec = data->rightReq + data->rightOpt;
@@ -933,12 +933,12 @@ void createNumber( QString & result, Value const & value,
bool negative = ( num < 0 ? true : false );
double nnum = ( negative ? -num : num );
- result = QString::number( nnum, 'f', prec );
+ result = TQString::number( nnum, 'f', prec );
- int pos = result.find( '.' );
+ int pos = result.tqfind( '.' );
if ( pos >= 0 )
{
- result = result.replace( pos, 1, g_dcSymbol );
+ result = result.tqreplace( pos, 1, g_dcSymbol );
// remove '0' from the end if not required
if ( data->rightOpt > 0 )
@@ -1006,8 +1006,8 @@ void createNumber( QString & result, Value const & value,
result.append( data->postfix );
}
-void createFraction( QString & result, Value const & value,
- QString const & /*format*/, bool & setRed,
+void createFraction( TQString & result, Value const & value,
+ TQString const & /*format*/, bool & setRed,
FractionFormat const * const data )
{
double num = value.asFloat();
@@ -1088,21 +1088,21 @@ void createFraction( QString & result, Value const & value,
if ( data->optFirst == 0 && data->reqFirst == 0 && fnum > 0 )
index += (int) (fnum * fraction);
- QString frac;
- QString left;
+ TQString frac;
+ TQString left;
if ( index > 0 )
{
- QString numerator;
- QString denominator;
+ TQString numerator;
+ TQString denominator;
- numerator = QString::number( index );
- int n = numerator.length() - data->reqCounter;
+ numerator = TQString::number( index );
+ int n = numerator.length() - data->retqCounter;
for ( int i = 0; i < n; ++i )
{
numerator.prepend( '0' );
}
- denominator = QString::number( fraction );
+ denominator = TQString::number( fraction );
frac = numerator + '/' + denominator;
}
@@ -1115,7 +1115,7 @@ void createFraction( QString & result, Value const & value,
}
else if ( fnum > 0 )
{
- left = QString::number( fnum );
+ left = TQString::number( fnum );
int n = data->reqFirst - left.length();
if ( n > 0 )
{
@@ -1157,8 +1157,8 @@ void createFraction( QString & result, Value const & value,
result = left;
}
-void createScientific( QString & result, Value const & value,
- QString const & /*format*/, bool & setRed,
+void createScientific( TQString & result, Value const & value,
+ TQString const & /*format*/, bool & setRed,
ScientificFormat const * const data )
{
double num = value.asFloat();
@@ -1166,15 +1166,15 @@ void createScientific( QString & result, Value const & value,
bool negative = ( num < 0 ? true : false );
double nnum = ( negative ? -num : num );
- result = QString::number( nnum, 'E', data->rightReq + data->rightOpt );
+ result = TQString::number( nnum, 'E', data->rightReq + data->rightOpt );
- int pos = result.find( '.' );
+ int pos = result.tqfind( '.' );
if ( pos >= 0 )
{
- result = result.replace( pos, 1, g_dcSymbol );
+ result = result.tqreplace( pos, 1, g_dcSymbol );
if ( data->rightOpt > 0 )
{
- int i = result.find( 'E', pos, false ) - 1;
+ int i = result.tqfind( 'E', pos, false ) - 1;
int n = result.length() - data->rightOpt;
if ( i > 0 )
@@ -1227,7 +1227,7 @@ void createScientific( QString & result, Value const & value,
result.append( data->postfix );
}
-void appendAMPM( QString & result, Value const & value )
+void appendAMPM( TQString & result, Value const & value )
{
if ( !g_convertionInfo.dt )
convertDateTime( value );
@@ -1239,7 +1239,7 @@ void appendAMPM( QString & result, Value const & value )
result.append( i18n("AM") );
}
-void appendHour( QString & result, Value const & value,
+void appendHour( TQString & result, Value const & value,
int digits, bool elapsed, bool ampm )
{
if ( !g_convertionInfo.dt )
@@ -1248,8 +1248,8 @@ void appendHour( QString & result, Value const & value,
int hour = g_convertionInfo.dt->hour;
if ( elapsed )
{
- QDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
- QDate d2( 1900, 1, 1 );
+ TQDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
+ TQDate d2( 1900, 1, 1 );
hour += ( d2.daysTo( d1 ) * 24 );
}
if ( hour < 10 && digits == 2 )
@@ -1262,10 +1262,10 @@ void appendHour( QString & result, Value const & value,
result += '0';
}
- result += QString::number( hour );
+ result += TQString::number( hour );
}
-void appendMinutes( QString & result, Value const & value,
+void appendMinutes( TQString & result, Value const & value,
int digits, bool elapsed )
{
if ( !g_convertionInfo.dt )
@@ -1274,17 +1274,17 @@ void appendMinutes( QString & result, Value const & value,
int minute = g_convertionInfo.dt->minute;
if ( elapsed )
{
- QDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
- QDate d2( 1900, 1, 1 );
+ TQDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
+ TQDate d2( 1900, 1, 1 );
minute += ( d2.daysTo( d1 ) * 24 * 60 );
}
if ( minute < 10 && digits == 2 )
result += '0';
- result += QString::number( minute );
+ result += TQString::number( minute );
}
-void appendSecond( QString & result, Value const & value,
+void appendSecond( TQString & result, Value const & value,
int digits, bool elapsed )
{
if ( !g_convertionInfo.dt )
@@ -1293,17 +1293,17 @@ void appendSecond( QString & result, Value const & value,
int second = g_convertionInfo.dt->second;
if ( elapsed )
{
- QDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
- QDate d2( 1900, 1, 1 );
+ TQDate d1( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
+ TQDate d2( 1900, 1, 1 );
second += ( d2.daysTo( d1 ) * 24 * 60 * 60 );
}
if ( second < 10 && digits == 2 )
result += '0';
- result += QString::number( second );
+ result += TQString::number( second );
}
-void appendYear( QString & result, Value const & value,
+void appendYear( TQString & result, Value const & value,
int digits )
{
if ( !g_convertionInfo.dt )
@@ -1311,12 +1311,12 @@ void appendYear( QString & result, Value const & value,
int year = g_convertionInfo.dt->year;
if ( digits <= 2 )
- result += QString::number( year ).right( 2 );
+ result += TQString::number( year ).right( 2 );
else
- result += QString::number( year );
+ result += TQString::number( year );
}
-void appendMonth( QString & result, Value const & value,
+void appendMonth( TQString & result, Value const & value,
int digits )
{
if ( !g_convertionInfo.dt )
@@ -1324,14 +1324,14 @@ void appendMonth( QString & result, Value const & value,
int month = g_convertionInfo.dt->month;
if ( digits == 1 )
- result += QString::number( month );
+ result += TQString::number( month );
else
if ( digits == 2 )
{
if ( month < 10 )
result += '0';
- result += QString::number( month );
+ result += TQString::number( month );
}
else
{
@@ -1388,7 +1388,7 @@ void appendMonth( QString & result, Value const & value,
}
}
-void appendDays( QString & result, Value const & value,
+void appendDays( TQString & result, Value const & value,
int digits )
{
if ( !g_convertionInfo.dt )
@@ -1396,18 +1396,18 @@ void appendDays( QString & result, Value const & value,
int day = g_convertionInfo.dt->day;
if ( digits == 1 )
- result += QString::number( day );
+ result += TQString::number( day );
else
if ( digits == 2 )
{
if ( day < 10 )
result += '0';
- result += QString::number( day );
+ result += TQString::number( day );
}
else
{
- QDate date( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
+ TQDate date( g_convertionInfo.dt->year, g_convertionInfo.dt->month, g_convertionInfo.dt->day );
int weekDay = date.dayOfWeek();
switch ( weekDay )
{
@@ -1442,8 +1442,8 @@ void appendDays( QString & result, Value const & value,
}
}
-void createDateTime( QString & result, Value const & value,
- QString const & /*format*/,
+void createDateTime( TQString & result, Value const & value,
+ TQString const & /*format*/,
DateTimeFormat const * const data )
{
result = data->prefix;
@@ -1570,15 +1570,15 @@ void createDateTime( QString & result, Value const & value,
result += data->postfix;
}
-QString formatNumber( Value const & value, QString format, bool & setRed,
+TQString formatNumber( Value const & value, TQString format, bool & setRed,
KLocale const * const locale, bool insert )
{
// need delocalized strings: dcSymbol: '.', thSymbol = ','
if ( !g_init )
initGlobals( locale );
- QString backup( format );
- QString result;
+ TQString backup( format );
+ TQString result;
BaseFormat * data = 0;
setRed = false;
diff --git a/kspread/kspread_object.cc b/kspread/kspread_object.cc
index 29a5162a..71cbbd75 100644
--- a/kspread/kspread_object.cc
+++ b/kspread/kspread_object.cc
@@ -29,15 +29,15 @@
#include <kparts/partmanager.h>
#include <koChart.h>
-#include <qbitmap.h>
-#include <qbuffer.h>
-#include <qcursor.h>
-#include <qdom.h>
-#include <qfileinfo.h>
-#include <qimage.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qwmatrix.h>
+#include <tqbitmap.h>
+#include <tqbuffer.h>
+#include <tqcursor.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqwmatrix.h>
#include <KoDocument.h>
#include <KoDocumentChild.h>
@@ -55,8 +55,8 @@ class View;
* EmbeddedObject
*
**********************************************************/
-EmbeddedObject::EmbeddedObject( Sheet *_sheet, const KoRect& _geometry )
- : m_geometry( _geometry), m_sheet(_sheet), m_objectName(""), m_selected(false), m_protect(false), m_keepRatio(false), pen( Qt::black, 1, QPen::SolidLine )
+EmbeddedObject::EmbeddedObject( Sheet *_sheet, const KoRect& _tqgeometry )
+ : m_tqgeometry( _tqgeometry), m_sheet(_sheet), m_objectName(""), m_selected(false), m_protect(false), m_keepRatio(false), pen( TQt::black, 1, Qt::SolidLine )
{
angle = 0.0;
inObjList = true;
@@ -66,23 +66,23 @@ EmbeddedObject::EmbeddedObject( Sheet *_sheet, const KoRect& _geometry )
EmbeddedObject::~EmbeddedObject()
{
}
-KoRect EmbeddedObject::geometry()
+KoRect EmbeddedObject::tqgeometry()
{
- return m_geometry;
+ return m_tqgeometry;
}
void EmbeddedObject::setGeometry( const KoRect &rect )
{
- m_geometry = rect;
+ m_tqgeometry = rect;
}
void EmbeddedObject::moveBy( const KoPoint &_point )
{
- m_geometry.moveTopLeft( m_geometry.topLeft() + _point );
+ m_tqgeometry.moveTopLeft( m_tqgeometry.topLeft() + _point );
}
void EmbeddedObject::moveBy( double _dx, double _dy )
{
- m_geometry.moveTopLeft( m_geometry.topLeft() + KoPoint( _dx, _dy ) );
+ m_tqgeometry.moveTopLeft( m_tqgeometry.topLeft() + KoPoint( _dx, _dy ) );
}
void EmbeddedObject::resizeBy( const KoSize & _size )
@@ -92,23 +92,23 @@ void EmbeddedObject::resizeBy( const KoSize & _size )
void EmbeddedObject::resizeBy( double _dx, double _dy)
{
- m_geometry.setSize( KoSize( m_geometry.width()+_dx, m_geometry.height()+_dy) );
+ m_tqgeometry.setSize( KoSize( m_tqgeometry.width()+_dx, m_tqgeometry.height()+_dy) );
} // call (possibly reimplemented) setSize
-bool EmbeddedObject::load( const QDomElement& /*element*/ )
+bool EmbeddedObject::load( const TQDomElement& /*element*/ )
{
kdDebug() << "Loading EmbeddedObject" << endl;
return false;
}
-void EmbeddedObject::loadOasis(const QDomElement &element, KoOasisLoadingContext & context )
+void EmbeddedObject::loadOasis(const TQDomElement &element, KoOasisLoadingContext & context )
{
if(element.hasAttributeNS( KoXmlNS::draw, "name" ))
- m_objectName = element.attributeNS( KoXmlNS::draw, "name", QString::null);
- m_geometry.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) ) );
- m_geometry.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) ) );
- m_geometry.setWidth(KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null )) );
- m_geometry.setHeight(KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ) ) );
+ m_objectName = element.attributeNS( KoXmlNS::draw, "name", TQString());
+ m_tqgeometry.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) ) );
+ m_tqgeometry.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) ) );
+ m_tqgeometry.setWidth(KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() )) );
+ m_tqgeometry.setHeight(KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ) ) );
//kdDebug()<<" orig.x() :"<<orig.x() <<" orig.y() :"<<orig.y() <<"ext.width() :"<<ext.width()<<" ext.height(): "<<ext.height()<<endl;
KoStyleStack &styleStack = context.styleStack();
@@ -116,25 +116,25 @@ void EmbeddedObject::loadOasis(const QDomElement &element, KoOasisLoadingContext
}
-QDomElement EmbeddedObject::save( QDomDocument& /*doc*/ )
+TQDomElement EmbeddedObject::save( TQDomDocument& /*doc*/ )
{
kdDebug() << "Saving EmbeddedObject..." << endl;
- return QDomElement();
+ return TQDomElement();
}
void EmbeddedObject::saveOasisPosObject( KoXmlWriter &xmlWriter, int indexObj ) const
{
- xmlWriter.addAttribute( "draw:id", "object" + QString::number( indexObj ) );
+ xmlWriter.addAttribute( "draw:id", "object" + TQString::number( indexObj ) );
//save all into pt
- xmlWriter.addAttributePt( "svg:x", sheet()->doc()->savingWholeDocument() ? m_geometry.x() : m_geometry.x() + 20.0 );
- xmlWriter.addAttributePt( "svg:y", sheet()->doc()->savingWholeDocument() ? m_geometry.y() : m_geometry.y() + 20.0 );
- xmlWriter.addAttributePt( "svg:width", m_geometry.width() );
- xmlWriter.addAttributePt( "svg:height", m_geometry.height() );
+ xmlWriter.addAttributePt( "svg:x", sheet()->doc()->savingWholeDocument() ? m_tqgeometry.x() : m_tqgeometry.x() + 20.0 );
+ xmlWriter.addAttributePt( "svg:y", sheet()->doc()->savingWholeDocument() ? m_tqgeometry.y() : m_tqgeometry.y() + 20.0 );
+ xmlWriter.addAttributePt( "svg:width", m_tqgeometry.width() );
+ xmlWriter.addAttributePt( "svg:height", m_tqgeometry.height() );
// if ( kAbs( angle ) > 1E-6 )
// {
// double value = -1 * ( ( double )angle* M_PI )/180.0;
-// QString str=QString( "rotate (%1)" ).arg( value );
+// TQString str=TQString( "rotate (%1)" ).tqarg( value );
// xmlWriter.addAttribute( "draw:transform", str );
// }
}
@@ -159,17 +159,17 @@ bool EmbeddedObject::saveOasisObject( KSpreadOasisSaveContext &sc ) const
return true;
}
-void EmbeddedObject::draw( QPainter *_painter )
+void EmbeddedObject::draw( TQPainter *_painter )
{
paintSelection(_painter, SM_MOVERESIZE );
}
-QPixmap EmbeddedObject::toPixmap()
+TQPixmap EmbeddedObject::toPixmap()
{
return toPixmap( 1.0 , 1.0 );
}
-QPixmap EmbeddedObject::toPixmap(QSize size)
+TQPixmap EmbeddedObject::toPixmap(TQSize size)
{
double xZoom;
double yZoom;
@@ -179,36 +179,36 @@ QPixmap EmbeddedObject::toPixmap(QSize size)
return toPixmap(xZoom,yZoom);
}
-QPixmap EmbeddedObject::toPixmap(double /*xZoom*/ , double /*yZoom*/)
+TQPixmap EmbeddedObject::toPixmap(double /*xZoom*/ , double /*yZoom*/)
{
- return QPixmap();
+ return TQPixmap();
}
-void EmbeddedObject::calculateRequiredZoom( QSize desiredSize, double& xZoom, double& yZoom)
+void EmbeddedObject::calculateRequiredZoom( TQSize desiredSize, double& xZoom, double& yZoom)
{
- QSize actualSize = geometry().size().toQSize();
+ TQSize actualSize = tqgeometry().size().toTQSize();
xZoom = (double) desiredSize.width() / (double)actualSize.width();
yZoom = (double) desiredSize.height() / (double)actualSize.height();
}
-void EmbeddedObject::paintSelection( QPainter *_painter, SelectionMode mode )
+void EmbeddedObject::paintSelection( TQPainter *_painter, SelectionMode mode )
{
if ( !m_selected || mode == SM_NONE )
return;
_painter->save();
- KoRect bound( geometry().left(), geometry().top(),
- geometry().width() , geometry().height() );
- QRect zoomedBound = sheet()->doc()->zoomRect( bound ) ;
+ KoRect bound( tqgeometry().left(), tqgeometry().top(),
+ tqgeometry().width() , tqgeometry().height() );
+ TQRect zoomedBound = sheet()->doc()->zoomRect( bound ) ;
- //_painter->setPen( QPen( Qt::black, 1, QPen::SolidLine ) );
+ //_painter->setPen( TQPen( TQt::black, 1, TQPen::SolidLine ) );
_painter->setPen( pen );
- _painter->setBrush( kapp->palette().color( QPalette::Active, QColorGroup::Highlight ) );
+ _painter->setBrush( kapp->palette().color( TQPalette::Active, TQColorGroup::Highlight ) );
//KoRect r = rotateRectObject(); // TODO: rotation
- KoRect r = /*KoRect::fromQRect*/( bound );
+ KoRect r = /*KoRect::fromTQRect*/( bound );
int x = sheet()->doc()->zoomItX( r.left() /*- orig.x()*/);
int y = sheet()->doc()->zoomItY( r.top() /*- orig.y()*/);
int zX6 = /*sheet()->doc()->zoomItX*/( 6 );
@@ -241,7 +241,7 @@ void EmbeddedObject::paintSelection( QPainter *_painter, SelectionMode mode )
zX6=zX6-2;
zY6=zY6-2;
- QBrush brush=kapp->palette().color( QPalette::Active,QColorGroup::Base );
+ TQBrush brush=kapp->palette().color( TQPalette::Active,TQColorGroup::Base );
_painter->fillRect( x, y, zX6, zY6, brush );
_painter->fillRect( x, y + h / 2, zX6, zY6, brush);
_painter->fillRect( x, y + h, zX6, zY6, brush );
@@ -261,18 +261,18 @@ void EmbeddedObject::paintSelection( QPainter *_painter, SelectionMode mode )
_painter->restore();
}
-QCursor EmbeddedObject::getCursor( const QPoint &_point, ModifyType &_modType, QRect &geometry) const
+TQCursor EmbeddedObject::getCursor( const TQPoint &_point, ModifyType &_modType, TQRect &tqgeometry) const
{
int px = /*sheet()->doc()->zoomItX*/(_point.x());
int py = /*sheet()->doc()->zoomItY*/(_point.y());
- int ox = /*sheet()->doc()->zoomItX*/(/*orig*/geometry.x());
- int oy = /*sheet()->doc()->zoomItY*/(/*orig*/geometry.y());
- int ow = /*sheet()->doc()->zoomItX*/(/*ext*/geometry.width());
- int oh = /*sheet()->doc()->zoomItY*/(/*ext*/geometry.height());
+ int ox = /*sheet()->doc()->zoomItX*/(/*orig*/tqgeometry.x());
+ int oy = /*sheet()->doc()->zoomItY*/(/*orig*/tqgeometry.y());
+ int ow = /*sheet()->doc()->zoomItX*/(/*ext*/tqgeometry.width());
+ int oh = /*sheet()->doc()->zoomItY*/(/*ext*/tqgeometry.height());
// if ( angle != 0.0 )
// {
-// QRect rr = sheet()->doc()->zoomRect( rotateRectObject() );
+// TQRect rr = sheet()->doc()->zoomRect( rotateRectObject() );
// ox = rr.x();
// oy = rr.y();
// ow = rr.width();
@@ -280,79 +280,79 @@ QCursor EmbeddedObject::getCursor( const QPoint &_point, ModifyType &_modType, Q
// }
int sz = 4;
- if ( px >= ox && py >= oy && px <= ox + QMIN( ow / 3, sz ) && py <= oy + QMIN( oh / 3, sz ) )
+ if ( px >= ox && py >= oy && px <= ox + TQMIN( ow / 3, sz ) && py <= oy + TQMIN( oh / 3, sz ) )
{
_modType = MT_RESIZE_LU;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeFDiagCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeFDiagCursor;
}
- if ( px >= ox && py >= oy + oh / 2 - QMIN( oh / 6, sz / 2 )
- && px <= ox + QMIN( ow / 3, sz)
- && py <= oy + oh / 2 + QMIN( oh / 6, sz / 2 ) )
+ if ( px >= ox && py >= oy + oh / 2 - TQMIN( oh / 6, sz / 2 )
+ && px <= ox + TQMIN( ow / 3, sz)
+ && py <= oy + oh / 2 + TQMIN( oh / 6, sz / 2 ) )
{
_modType = MT_RESIZE_LF;
if ( m_protect)
- return Qt::ForbiddenCursor;
- return Qt::sizeHorCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeHorCursor;
}
- if ( px >= ox && py >= oy + oh - QMIN( oh / 3, sz ) && px <= ox + QMIN( ow / 3, sz ) && py <= oy + oh )
+ if ( px >= ox && py >= oy + oh - TQMIN( oh / 3, sz ) && px <= ox + TQMIN( ow / 3, sz ) && py <= oy + oh )
{
_modType = MT_RESIZE_LD;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeBDiagCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeBDiagCursor;
}
- if ( px >= ox + ow / 2 - QMIN( ow / 6, sz / 2 ) && py >= oy
- && px <= ox + ow / 2 + QMIN( ow / 6, sz / 2 )
- && py <= oy + QMIN( oh / 3, sz ) )
+ if ( px >= ox + ow / 2 - TQMIN( ow / 6, sz / 2 ) && py >= oy
+ && px <= ox + ow / 2 + TQMIN( ow / 6, sz / 2 )
+ && py <= oy + TQMIN( oh / 3, sz ) )
{
_modType = MT_RESIZE_UP;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeVerCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeVerCursor;
}
- if ( px >= ox + ow / 2 - QMIN( ow / 6, sz / 2 ) && py >= oy + oh - QMIN( oh / 3, sz )
- && px <= ox + ow / 2 + QMIN( ow / 6, sz / 2 ) && py <= oy + oh )
+ if ( px >= ox + ow / 2 - TQMIN( ow / 6, sz / 2 ) && py >= oy + oh - TQMIN( oh / 3, sz )
+ && px <= ox + ow / 2 + TQMIN( ow / 6, sz / 2 ) && py <= oy + oh )
{
_modType = MT_RESIZE_DN;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeVerCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeVerCursor;
}
- if ( px >= ox + ow - QMIN( ow / 3, sz ) && py >= oy && px <= ox + ow && py <= oy + QMIN( oh / 3, sz) )
+ if ( px >= ox + ow - TQMIN( ow / 3, sz ) && py >= oy && px <= ox + ow && py <= oy + TQMIN( oh / 3, sz) )
{
_modType = MT_RESIZE_RU;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeBDiagCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeBDiagCursor;
}
- if ( px >= ox + ow - QMIN( ow / 3, sz ) && py >= oy + oh / 2 - QMIN( oh / 6, sz / 2 )
- && px <= ox + ow && py <= oy + oh / 2 + QMIN( oh / 6, sz / 2) )
+ if ( px >= ox + ow - TQMIN( ow / 3, sz ) && py >= oy + oh / 2 - TQMIN( oh / 6, sz / 2 )
+ && px <= ox + ow && py <= oy + oh / 2 + TQMIN( oh / 6, sz / 2) )
{
_modType = MT_RESIZE_RT;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeHorCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeHorCursor;
}
- if ( px >= ox + ow - QMIN( ow / 3, sz ) && py >= oy + oh - QMIN( oh / 3, sz)
+ if ( px >= ox + ow - TQMIN( ow / 3, sz ) && py >= oy + oh - TQMIN( oh / 3, sz)
&& px <= ox + ow && py <= oy + oh )
{
_modType = MT_RESIZE_RD;
if ( m_protect )
- return Qt::ForbiddenCursor;
- return Qt::sizeFDiagCursor;
+ return TQt::ForbiddenCursor;
+ return TQt::sizeFDiagCursor;
}
_modType = MT_MOVE;
- return Qt::sizeAllCursor;
+ return TQt::sizeAllCursor;
}
@@ -367,16 +367,16 @@ void EmbeddedObject::doDelete()
* EmbeddedKOfficeObject
*
**********************************************************/
-EmbeddedKOfficeObject::EmbeddedKOfficeObject( Doc *parent, Sheet *_sheet, KoDocument* doc, const KoRect& geometry )
- : EmbeddedObject( _sheet, geometry ), m_parent(parent)
+EmbeddedKOfficeObject::EmbeddedKOfficeObject( Doc *tqparent, Sheet *_sheet, KoDocument* doc, const KoRect& tqgeometry )
+ : EmbeddedObject( _sheet, tqgeometry ), m_parent(tqparent)
{
- m_embeddedObject = new KoDocumentChild(parent, doc, geometry.toQRect() );
+ m_embeddedObject = new KoDocumentChild(tqparent, doc, tqgeometry.toTQRect() );
}
-EmbeddedKOfficeObject::EmbeddedKOfficeObject( Doc *parent, Sheet *_sheet )
- : EmbeddedObject( _sheet, KoRect() ), m_parent(parent)
+EmbeddedKOfficeObject::EmbeddedKOfficeObject( Doc *tqparent, Sheet *_sheet )
+ : EmbeddedObject( _sheet, KoRect() ), m_parent(tqparent)
{
- m_embeddedObject = new KoDocumentChild( parent );
+ m_embeddedObject = new KoDocumentChild( tqparent );
}
EmbeddedKOfficeObject::~EmbeddedKOfficeObject()
@@ -384,7 +384,7 @@ EmbeddedKOfficeObject::~EmbeddedKOfficeObject()
delete m_embeddedObject;
}
-Doc* EmbeddedKOfficeObject::parent()
+Doc* EmbeddedKOfficeObject::tqparent()
{
return m_parent;
}
@@ -399,7 +399,7 @@ bool EmbeddedKOfficeObject::saveOasisObjectAttributes( KSpreadOasisSaveContext &
kdDebug() << "EmbeddedKOfficeObject::saveOasisPart " << sc.partIndexObj << endl;
sc.xmlWriter.startElement( "draw:object" );
- const QString name = QString( "Object_%1" ).arg( sc.partIndexObj + 1 );
+ const TQString name = TQString( "Object_%1" ).tqarg( sc.partIndexObj + 1 );
++sc.partIndexObj;
m_embeddedObject->saveOasisAttributes( sc.xmlWriter, name );
@@ -413,57 +413,57 @@ const char * EmbeddedKOfficeObject::getOasisElementName() const
return "draw:frame";
}
-bool EmbeddedKOfficeObject::load( const QDomElement& element )
+bool EmbeddedKOfficeObject::load( const TQDomElement& element )
{
kdDebug() << "Loading EmbeddedKOfficeObject" << endl;
bool result = embeddedObject()->load( element );
- setGeometry( KoRect::fromQRect( embeddedObject()->geometry() ) );
+ setGeometry( KoRect::fromTQRect( embeddedObject()->tqgeometry() ) );
return result;
}
-void EmbeddedKOfficeObject::loadOasis(const QDomElement &element, KoOasisLoadingContext &context/*, KPRLoadingInfo *info*/)
+void EmbeddedKOfficeObject::loadOasis(const TQDomElement &element, KoOasisLoadingContext &context/*, KPRLoadingInfo *info*/)
{
- kdDebug()<<"void EmbeddedKOfficeObject::loadOasis(const QDomElement &element)******************\n";
+ kdDebug()<<"void EmbeddedKOfficeObject::loadOasis(const TQDomElement &element)******************\n";
EmbeddedObject::loadOasis( element, context );
- QDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
+ TQDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
m_embeddedObject->loadOasis( element, objectElement );
if( element.hasAttributeNS( KoXmlNS::draw, "name" ) )
- m_objectName = element.attributeNS( KoXmlNS::draw, "name", QString::null);
+ m_objectName = element.attributeNS( KoXmlNS::draw, "name", TQString());
(void)m_embeddedObject->loadOasisDocument( context.store(), context.manifestDocument() );
}
-QDomElement EmbeddedKOfficeObject::save( QDomDocument& doc )
+TQDomElement EmbeddedKOfficeObject::save( TQDomDocument& doc )
{
kdDebug() << "Saving EmbeddedKOfficeObject" << endl;
- embeddedObject()->setGeometry( geometry().toQRect() );
+ embeddedObject()->setGeometry( tqgeometry().toTQRect() );
return m_embeddedObject->save( doc );
}
-void EmbeddedKOfficeObject::draw( QPainter *_painter )
+void EmbeddedKOfficeObject::draw( TQPainter *_painter )
{
kdDebug() << "Painting..." << endl;
int const penw = pen.width() ;
KoRect bound( 0, 0,
- geometry().width() - ( 2 * penw ), geometry().height() - ( 2 * penw ) );
- QRect const zoomedBound = sheet()->doc()->zoomRect( bound );
+ tqgeometry().width() - ( 2 * penw ), tqgeometry().height() - ( 2 * penw ) );
+ TQRect const zoomedBound = sheet()->doc()->zoomRect( bound );
_painter->save();
- int const xOffset = sheet()->doc()->zoomItX( geometry().left() + penw);
- int const yOffset = sheet()->doc()->zoomItY( geometry().top() + penw );
+ int const xOffset = sheet()->doc()->zoomItX( tqgeometry().left() + penw);
+ int const yOffset = sheet()->doc()->zoomItY( tqgeometry().top() + penw );
- QRect new_geometry = zoomedBound;
+ TQRect new_tqgeometry = zoomedBound;
//if ( translate )
//{
_painter->translate( xOffset , yOffset );
- new_geometry.moveBy( xOffset , yOffset );
- new_geometry.moveBy( -_painter->window().x(), -_painter->window().y() );
+ new_tqgeometry.moveBy( xOffset , yOffset );
+ new_tqgeometry.moveBy( -_painter->window().x(), -_painter->window().y() );
//}
- _painter->setClipRect( zoomedBound, QPainter::CoordPainter );
+ _painter->setClipRect( zoomedBound, TQPainter::CoordPainter );
assert( embeddedObject()->document() != 0 );
@@ -477,18 +477,18 @@ void EmbeddedKOfficeObject::draw( QPainter *_painter )
zoomY );
- embeddedObject()->setGeometry( new_geometry );
+ embeddedObject()->setGeometry( new_tqgeometry );
_painter->restore();
EmbeddedObject::draw( _painter );
}
-QPixmap EmbeddedKOfficeObject::toPixmap( double xZoom , double yZoom )
+TQPixmap EmbeddedKOfficeObject::toPixmap( double xZoom , double yZoom )
{
- QPixmap pixmap( (int)( geometry().width()*xZoom ), (int)( geometry().height()*yZoom ) );
+ TQPixmap pixmap( (int)( tqgeometry().width()*xZoom ), (int)( tqgeometry().height()*yZoom ) );
- QPainter painter(&pixmap);
- QRect bound( 0,0,(int)( geometry().width()*xZoom ), (int)(geometry().height()*yZoom) );
+ TQPainter painter(&pixmap);
+ TQRect bound( 0,0,(int)( tqgeometry().width()*xZoom ), (int)(tqgeometry().height()*yZoom) );
embeddedObject()->document()->paintEverything(painter,bound,
embeddedObject()->isTransparent(),
0,
@@ -516,10 +516,10 @@ void EmbeddedKOfficeObject::deactivate()
void EmbeddedKOfficeObject::updateChildGeometry()
{
// KoZoomHandler* zh = m_sheet->doc();
-// embeddedObject()->setGeometry( zh->zoomRect( geometry() ), true );
+// embeddedObject()->setGeometry( zh->zoomRect( tqgeometry() ), true );
// return;
-// QRect r = sheet()->doc()->zoomRect( geometry() );
+// TQRect r = sheet()->doc()->zoomRect( tqgeometry() );
// if ( _canvas )
// {
// kdDebug() << "_canvas->xOffset():" << _canvas->xOffset() << endl;
@@ -537,8 +537,8 @@ void EmbeddedKOfficeObject::updateChildGeometry()
*
**********************************************************/
-EmbeddedChart::EmbeddedChart( Doc *_spread, Sheet *_sheet, KoDocument* doc, const KoRect& geometry )
- : EmbeddedKOfficeObject( _spread, _sheet, doc, geometry )
+EmbeddedChart::EmbeddedChart( Doc *_spread, Sheet *_sheet, KoDocument* doc, const KoRect& tqgeometry )
+ : EmbeddedKOfficeObject( _spread, _sheet, doc, tqgeometry )
{
m_pBinding = 0;
}
@@ -555,7 +555,7 @@ EmbeddedChart::~EmbeddedChart()
delete m_pBinding;
}
-void EmbeddedChart::setDataArea( const QRect& _data )
+void EmbeddedChart::setDataArea( const TQRect& _data )
{
if ( m_pBinding == 0L )
m_pBinding = new ChartBinding( m_sheet, _data, this );
@@ -574,7 +574,7 @@ const char * EmbeddedChart::getOasisElementName() const
return "draw:frame";
}
-bool EmbeddedChart::load( const QDomElement& element )
+bool EmbeddedChart::load( const TQDomElement& element )
{
kdDebug() << "Loading EmbeddedChart" << endl;
if ( !EmbeddedKOfficeObject::load( element ) )
@@ -585,7 +585,7 @@ bool EmbeddedChart::load( const QDomElement& element )
element.hasAttribute( "right-cell" ) &&
element.hasAttribute( "bottom-cell" ) )
{
- QRect r;
+ TQRect r;
r.setCoords( element.attribute( "left-cell" ).toInt(),
element.attribute( "top-cell" ).toInt(),
element.attribute( "right-cell" ).toInt(),
@@ -597,13 +597,13 @@ bool EmbeddedChart::load( const QDomElement& element )
return true;
}
-void EmbeddedChart::loadOasis(const QDomElement &element, KoOasisLoadingContext &context/*, KPRLoadingInfo *info*/)
+void EmbeddedChart::loadOasis(const TQDomElement &element, KoOasisLoadingContext &context/*, KPRLoadingInfo *info*/)
{
- kdDebug()<<"void EmbeddedChart::loadOasis(const QDomElement &element)******************\n";
+ kdDebug()<<"void EmbeddedChart::loadOasis(const TQDomElement &element)******************\n";
EmbeddedKOfficeObject::loadOasis( element, context );
- QDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
- QString str_range = objectElement.attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", QString::null);
+ TQDomElement objectElement = KoDom::namedItemNS( element, KoXmlNS::draw, "object" );
+ TQString str_range = objectElement.attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", TQString());
if ( !str_range.isNull() )
{
@@ -626,9 +626,9 @@ bool EmbeddedChart::saveOasisObjectAttributes( KSpreadOasisSaveContext &sc ) con
EmbeddedKOfficeObject::saveOasisObjectAttributes( sc );
if(m_pBinding) { // see http://bugs.kde.org/show_bug.cgi?id=120395
- QRect dataArea = m_pBinding->dataArea();
- QString rangeName = util_rangeName( dataArea);
- rangeName.insert( rangeName.find(':') +1, sheet()->sheetName() + "." );
+ TQRect dataArea = m_pBinding->dataArea();
+ TQString rangeName = util_rangeName( dataArea);
+ rangeName.insert( rangeName.tqfind(':') +1, sheet()->sheetName() + "." );
rangeName.prepend( sheet()->sheetName() + "." );
sc.xmlWriter.addAttribute( "draw:notify-on-update-of-ranges", rangeName );
}
@@ -640,10 +640,10 @@ bool EmbeddedChart::saveOasisObjectAttributes( KSpreadOasisSaveContext &sc ) con
return true;
}
-QDomElement EmbeddedChart::save( QDomDocument& doc )
+TQDomElement EmbeddedChart::save( TQDomDocument& doc )
{
kdDebug() << "Saving EmbeddedChart" << endl;
- QDomElement element = EmbeddedKOfficeObject::save( doc );
+ TQDomElement element = EmbeddedKOfficeObject::save( doc );
element.setTagName( "chart" );
element.setAttribute( "left-cell", m_pBinding->dataArea().left() );
@@ -653,7 +653,7 @@ QDomElement EmbeddedChart::save( QDomDocument& doc )
return element;
}
-void EmbeddedChart::draw( QPainter *_painter )
+void EmbeddedChart::draw( TQPainter *_painter )
{
EmbeddedKOfficeObject::draw( _painter );
}
@@ -679,7 +679,7 @@ bool EmbeddedChart::loadDocument( KoStore* _store )
KoChart::Part* EmbeddedChart::chart()
{
// Returns 0 when the chart couldn't be loaded and we get KoUnavailPart instead.
- return qt_cast<KoChart::Part *>( m_embeddedObject->document() );
+ return ::tqqt_cast<KoChart::Part *>( m_embeddedObject->document() );
}
/**********************************************************
@@ -687,43 +687,43 @@ KoChart::Part* EmbeddedChart::chart()
* EmbeddedPictureObject
*
**********************************************************/
-EmbeddedPictureObject::EmbeddedPictureObject( Sheet *_sheet, const KoRect& _geometry, KoPictureCollection *_imageCollection )
- : EmbeddedObject( _sheet, _geometry )
+EmbeddedPictureObject::EmbeddedPictureObject( Sheet *_sheet, const KoRect& _tqgeometry, KoPictureCollection *_imageCollection )
+ : EmbeddedObject( _sheet, _tqgeometry )
{
imageCollection = _imageCollection;
- pen = KoPen( Qt::black, 1.0, Qt::NoPen );
+ pen = KoPen( TQt::black, 1.0, Qt::NoPen );
mirrorType = PM_NORMAL;
depth = 0;
swapRGB = false;
grayscal = false;
bright = 0;
m_effect = IE_NONE;
- m_ie_par1 = QVariant();
- m_ie_par2 = QVariant();
- m_ie_par3 = QVariant();
- // Forbid QPixmap to cache the X-Window resources (Yes, it is slower!)
- m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
+ m_ie_par1 = TQVariant();
+ m_ie_par2 = TQVariant();
+ m_ie_par3 = TQVariant();
+ // Forbid TQPixmap to cache the X-Window resources (Yes, it is slower!)
+ m_cachedPixmap.setOptimization(TQPixmap::MemoryOptim);
}
-EmbeddedPictureObject::EmbeddedPictureObject( Sheet *_sheet, const KoRect& _geometry, KoPictureCollection *_imageCollection, const KoPictureKey & key )
- : EmbeddedObject( _sheet, _geometry )
+EmbeddedPictureObject::EmbeddedPictureObject( Sheet *_sheet, const KoRect& _tqgeometry, KoPictureCollection *_imageCollection, const KoPictureKey & key )
+ : EmbeddedObject( _sheet, _tqgeometry )
{
imageCollection = _imageCollection;
//ext = KoSize(); // invalid size means unset
- pen = KoPen( Qt::black, 1.0, Qt::NoPen );
+ pen = KoPen( TQt::black, 1.0, Qt::NoPen );
mirrorType = PM_NORMAL;
depth = 0;
swapRGB = false;
grayscal = false;
bright = 0;
m_effect = IE_NONE;
- m_ie_par1 = QVariant();
- m_ie_par2 = QVariant();
- m_ie_par3 = QVariant();
- // Forbid QPixmap to cache the X-Window resources (Yes, it is slower!)
- m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
+ m_ie_par1 = TQVariant();
+ m_ie_par2 = TQVariant();
+ m_ie_par3 = TQVariant();
+ // Forbid TQPixmap to cache the X-Window resources (Yes, it is slower!)
+ m_cachedPixmap.setOptimization(TQPixmap::MemoryOptim);
setPicture( key );
}
@@ -734,38 +734,38 @@ EmbeddedPictureObject::EmbeddedPictureObject( Sheet *_sheet, KoPictureCollection
imageCollection = _imageCollection;
//ext = KoSize(); // invalid size means unset
- pen = KoPen( Qt::black, 1.0, Qt::NoPen );
+ pen = KoPen( TQt::black, 1.0, Qt::NoPen );
mirrorType = PM_NORMAL;
depth = 0;
swapRGB = false;
grayscal = false;
bright = 0;
m_effect = IE_NONE;
- m_ie_par1 = QVariant();
- m_ie_par2 = QVariant();
- m_ie_par3 = QVariant();
- // Forbid QPixmap to cache the X-Window resources (Yes, it is slower!)
- m_cachedPixmap.setOptimization(QPixmap::MemoryOptim);
+ m_ie_par1 = TQVariant();
+ m_ie_par2 = TQVariant();
+ m_ie_par3 = TQVariant();
+ // Forbid TQPixmap to cache the X-Window resources (Yes, it is slower!)
+ m_cachedPixmap.setOptimization(TQPixmap::MemoryOptim);
}
EmbeddedPictureObject::~EmbeddedPictureObject()
{
}
-bool EmbeddedPictureObject::load( const QDomElement& /*element*/ )
+bool EmbeddedPictureObject::load( const TQDomElement& /*element*/ )
{
return false;
}
-QDomElement EmbeddedPictureObject::save( QDomDocument& /*doc*/ )
+TQDomElement EmbeddedPictureObject::save( TQDomDocument& /*doc*/ )
{
kdDebug() << "Saving EmbeddedPictureObject" << endl;
- return QDomElement();
+ return TQDomElement();
}
-QString EmbeddedPictureObject::convertValueToPercent( int val ) const
+TQString EmbeddedPictureObject::convertValueToPercent( int val ) const
{
- return QString::number( val )+"%";
+ return TQString::number( val )+"%";
}
void EmbeddedPictureObject::saveOasisPictureElement( KoGenStyle &styleobjectauto ) const
@@ -788,7 +788,7 @@ void EmbeddedPictureObject::saveOasisPictureElement( KoGenStyle &styleobjectauto
case IE_CHANNEL_INTENSITY:
{
//for the moment kpresenter support just one channel
- QString percent = convertValueToPercent( m_ie_par1.toInt() );
+ TQString percent = convertValueToPercent( m_ie_par1.toInt() );
KImageEffect::RGBComponent channel = static_cast<KImageEffect::RGBComponent>( m_ie_par2.toInt() );
switch( channel )
{
@@ -886,7 +886,7 @@ const char * EmbeddedPictureObject::getOasisElementName() const
}
-void EmbeddedPictureObject::loadPicture( const QString & fileName )
+void EmbeddedPictureObject::loadPicture( const TQString & fileName )
{
image = imageCollection->loadPicture( fileName );
}
@@ -908,14 +908,14 @@ void EmbeddedPictureObject::reload( void )
}
// KSpread doesn't support pictures in it's old XML file format.
-// QDomDocumentFragment EmbeddedPictureObject::save( QDomDocument& doc, double offset )
+// TQDomDocumentFragment EmbeddedPictureObject::save( TQDomDocument& doc, double offset )
// {
-// QDomDocumentFragment fragment=KP2DObject::save(doc, offset);
-// QDomElement elem=doc.createElement("KEY");
+// TQDomDocumentFragment fragment=KP2DObject::save(doc, offset);
+// TQDomElement elem=doc.createElement("KEY");
// image.getKey().saveAttributes(elem);
// fragment.appendChild(elem);
//
-// QDomElement elemSettings = doc.createElement( "PICTURESETTINGS" );
+// TQDomElement elemSettings = doc.createElement( "PICTURESETTINGS" );
//
// elemSettings.setAttribute( "mirrorType", static_cast<int>( mirrorType ) );
// elemSettings.setAttribute( "depth", depth );
@@ -925,7 +925,7 @@ void EmbeddedPictureObject::reload( void )
// fragment.appendChild( elemSettings );
//
// if (m_effect!=IE_NONE) {
-// QDomElement imageEffects = doc.createElement("EFFECTS");
+// TQDomElement imageEffects = doc.createElement("EFFECTS");
// imageEffects.setAttribute("type", static_cast<int>(m_effect));
// if (m_ie_par1.isValid())
// imageEffects.setAttribute("param1", m_ie_par1.toString());
@@ -950,43 +950,43 @@ void EmbeddedPictureObject::loadOasisPictureEffect(KoOasisLoadingContext & conte
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "contrast" ) )
{
- QString str( styleStack.attributeNS( KoXmlNS::draw, "contrast" ) );
+ TQString str( styleStack.attributeNS( KoXmlNS::draw, "contrast" ) );
str = str.remove( '%' );
int val = str.toInt();
m_effect = IE_CONTRAST;
val = ( int )( 255.0 *val/100.0 );
- m_ie_par1 = QVariant(val);
+ m_ie_par1 = TQVariant(val);
}
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "red" ) && styleStack.attributeNS( KoXmlNS::draw, "red" ) != "0%" )
{
- QString str( styleStack.attributeNS( KoXmlNS::draw, "red" ) );
+ TQString str( styleStack.attributeNS( KoXmlNS::draw, "red" ) );
str = str.remove( '%' );
int val = str.toInt();
m_effect = IE_CHANNEL_INTENSITY;
- m_ie_par1 = QVariant(val);
- m_ie_par2 = QVariant( ( int )KImageEffect::Red );
+ m_ie_par1 = TQVariant(val);
+ m_ie_par2 = TQVariant( ( int )KImageEffect::Red );
}
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "green" ) && styleStack.attributeNS( KoXmlNS::draw, "green" ) != "0%" )
{
- QString str( styleStack.attributeNS( KoXmlNS::draw, "green" ) );
+ TQString str( styleStack.attributeNS( KoXmlNS::draw, "green" ) );
str = str.remove( '%' );
int val = str.toInt();
m_effect = IE_CHANNEL_INTENSITY;
- m_ie_par1 = QVariant(val);
- m_ie_par2 = QVariant( ( int )KImageEffect::Green );
+ m_ie_par1 = TQVariant(val);
+ m_ie_par2 = TQVariant( ( int )KImageEffect::Green );
}
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "blue" ) && styleStack.attributeNS( KoXmlNS::draw, "blue" ) != "0%" )
{
- QString str( styleStack.attributeNS( KoXmlNS::draw, "blue" ) );
+ TQString str( styleStack.attributeNS( KoXmlNS::draw, "blue" ) );
str = str.remove( '%' );
int val = str.toInt();
m_effect = IE_CHANNEL_INTENSITY;
- m_ie_par1 = QVariant(val);
- m_ie_par2 = QVariant( ( int )KImageEffect::Blue );
+ m_ie_par1 = TQVariant(val);
+ m_ie_par2 = TQVariant( ( int )KImageEffect::Blue );
}
if ( styleStack.hasAttributeNS( KoXmlNS::draw, "luminance" ) )
{
- QString str( styleStack.attributeNS( KoXmlNS::draw, "luminance" ) );
+ TQString str( styleStack.attributeNS( KoXmlNS::draw, "luminance" ) );
str = str.remove( '%' );
bright = str.toInt();
}
@@ -998,24 +998,24 @@ void EmbeddedPictureObject::fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles&
saveOasisPictureElement( styleObjectAuto );
}
-void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoadingContext & context/*, KPRLoadingInfo *info*/)
+void EmbeddedPictureObject::loadOasis(const TQDomElement &element, KoOasisLoadingContext & context/*, KPRLoadingInfo *info*/)
{
//load it into kpresenter_doc
EmbeddedObject::loadOasis( element, context );
loadOasisPictureEffect( context );
- QDomNode imageBox = KoDom::namedItemNS( element, KoXmlNS::draw, "image" );
- const QString href( imageBox.toElement().attributeNS( KoXmlNS::xlink, "href", QString::null) );
+ TQDomNode imageBox = KoDom::namedItemNS( element, KoXmlNS::draw, "image" );
+ const TQString href( imageBox.toElement().attributeNS( KoXmlNS::xlink, "href", TQString()) );
kdDebug()<<" href: "<<href<<endl;
if ( !href.isEmpty() /*&& href[0] == '#'*/ )
{
- QString strExtension;
- const int result=href.findRev(".");
+ TQString strExtension;
+ const int result=href.tqfindRev(".");
if (result>=0)
{
strExtension=href.mid(result+1); // As we are using KoPicture, the extension should be without the dot.
}
- QString filename(href/*.mid(1)*/);
- const KoPictureKey key(filename, QDateTime::currentDateTime(Qt::UTC));
+ TQString filename(href/*.mid(1)*/);
+ const KoPictureKey key(filename, TQDateTime::tqcurrentDateTime(Qt::UTC));
image.setKey(key);
KoStore* store = context.store();
@@ -1032,10 +1032,10 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
}
-// double EmbeddedPictureObject::load(const QDomElement &element)
+// double EmbeddedPictureObject::load(const TQDomElement &element)
// {
// double offset=KP2DObject::load(element);
-// QDomElement e=element.namedItem("KEY").toElement();
+// TQDomElement e=element.namedItem("KEY").toElement();
// if(!e.isNull()) {
// KoPictureKey key;
// key.loadAttributes( e );
@@ -1054,8 +1054,8 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
// }
// } else {
// bool openPic = true;
-// QString _data;
-// QString _fileName;
+// TQString _data;
+// TQString _fileName;
// if(e.hasAttribute("data"))
// _data=e.attribute("data");
// if ( _data.isEmpty() )
@@ -1066,12 +1066,12 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
// _fileName=e.attribute("filename");
// if ( !_fileName.isEmpty() )
// {
-// if ( int _envVarB = _fileName.find( '$' ) >= 0 )
+// if ( int _envVarB = _fileName.tqfind( '$' ) >= 0 )
// {
-// int _envVarE = _fileName.find( '/', _envVarB );
-// // ### FIXME: it should be QString::local8Bit instead of QFile::encodeName, shouldn't it?
-// QString path = getenv( QFile::encodeName(_fileName.mid( _envVarB, _envVarE-_envVarB )) );
-// _fileName.replace( _envVarB-1, _envVarE-_envVarB+1, path );
+// int _envVarE = _fileName.tqfind( '/', _envVarB );
+// // ### FIXME: it should be TQString::local8Bit instead of TQFile::encodeName, shouldn't it?
+// TQString path = getenv( TQFile::encodeName(_fileName.mid( _envVarB, _envVarE-_envVarB )) );
+// _fileName.tqreplace( _envVarB-1, _envVarE-_envVarB+1, path );
// }
// }
//
@@ -1083,9 +1083,9 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
// KoPictureKey key( _fileName );
// image.clear();
// image.setKey(key);
-// QByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
+// TQByteArray rawData=_data.utf8(); // XPM is normally ASCII, therefore UTF-8
// rawData[rawData.size()-1]=char(10); // Replace the NULL character by a LINE FEED
-// QBuffer buffer(rawData); // ### TODO: open?
+// TQBuffer buffer(rawData); // ### TODO: open?
// image.loadXpm(&buffer);
// }
// }
@@ -1129,17 +1129,17 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
// if (e.hasAttribute("type"))
// m_effect = static_cast<ImageEffect>(e.attribute("type").toInt());
// if (e.hasAttribute("param1"))
-// m_ie_par1 = QVariant(e.attribute("param1"));
+// m_ie_par1 = TQVariant(e.attribute("param1"));
// else
-// m_ie_par1 = QVariant();
+// m_ie_par1 = TQVariant();
// if (e.hasAttribute("param2"))
-// m_ie_par2 = QVariant(e.attribute("param2"));
+// m_ie_par2 = TQVariant(e.attribute("param2"));
// else
-// m_ie_par2 = QVariant();
+// m_ie_par2 = TQVariant();
// if (e.hasAttribute("param3"))
-// m_ie_par3 = QVariant(e.attribute("param3"));
+// m_ie_par3 = TQVariant(e.attribute("param3"));
// else
-// m_ie_par3 = QVariant();
+// m_ie_par3 = TQVariant();
// }
// else
// m_effect = IE_NONE;
@@ -1147,16 +1147,16 @@ void EmbeddedPictureObject::loadOasis(const QDomElement &element, KoOasisLoading
// return offset;
// }
-void EmbeddedPictureObject::drawShadow( QPainter* /*_painter*/, KoZoomHandler* /*_zoomHandler*/)
+void EmbeddedPictureObject::drawShadow( TQPainter* /*_painter*/, KoZoomHandler* /*_zoomHandler*/)
{
-// const double ox = /*orig*/m_geometry.x();
-// const double oy = /*orig*/m_geometry.y();
-// const double ow = /*ext*/m_geometry.width();
-// const double oh = /*ext*/m_geometry.height();
+// const double ox = /*orig*/m_tqgeometry.x();
+// const double oy = /*orig*/m_tqgeometry.y();
+// const double ow = /*ext*/m_tqgeometry.width();
+// const double oh = /*ext*/m_tqgeometry.height();
//
// _painter->save();
//
-// QPen pen2 = pen.zoomedPen( _zoomHandler );
+// TQPen pen2 = pen.zoomedPen( _zoomHandler );
// _painter->setPen( pen2 );
// _painter->setBrush( getBrush() );
//
@@ -1166,24 +1166,24 @@ void EmbeddedPictureObject::drawShadow( QPainter* /*_painter*/, KoZoomHandler*
// getShadowCoords( sx, sy );
//
// _painter->translate( _zoomHandler->zoomItX( ox ), _zoomHandler->zoomItY( oy ) );
-// _painter->setPen( QPen( shadowColor ) );
+// _painter->setPen( TQPen( shadowColor ) );
// _painter->setBrush( shadowColor );
// if ( kAbs(angle) <= DBL_EPSILON )
// _painter->drawRect( _zoomHandler->zoomItX( sx ), _zoomHandler->zoomItY( sy ),
// _zoomHandler->zoomItX( ext.width() ), _zoomHandler->zoomItY( ext.height() ) );
// else
// {
-// QSize bs = QSize( _zoomHandler->zoomItX( ow ), _zoomHandler->zoomItY( oh ) );
-// QRect br = QRect( 0, 0, bs.width(), bs.height() );
+// TQSize bs = TQSize( _zoomHandler->zoomItX( ow ), _zoomHandler->zoomItY( oh ) );
+// TQRect br = TQRect( 0, 0, bs.width(), bs.height() );
// int pw = br.width();
// int ph = br.height();
-// QRect rr = br;
+// TQRect rr = br;
// int pixYPos = -rr.y();
// int pixXPos = -rr.x();
-// br.moveTopLeft( QPoint( -br.width() / 2, -br.height() / 2 ) );
-// rr.moveTopLeft( QPoint( -rr.width() / 2, -rr.height() / 2 ) );
+// br.moveTopLeft( TQPoint( -br.width() / 2, -br.height() / 2 ) );
+// rr.moveTopLeft( TQPoint( -rr.width() / 2, -rr.height() / 2 ) );
//
-// QWMatrix m;
+// TQWMatrix m;
// m.translate( pw / 2, ph / 2 );
// m.rotate( angle );
// m.translate( rr.left() + pixXPos + _zoomHandler->zoomItX( sx ),
@@ -1197,32 +1197,32 @@ void EmbeddedPictureObject::drawShadow( QPainter* /*_painter*/, KoZoomHandler*
// _painter->restore();
}
-QPixmap EmbeddedPictureObject::toPixmap( double xZoom , double yZoom )
+TQPixmap EmbeddedPictureObject::toPixmap( double xZoom , double yZoom )
{
KoZoomHandler zoomHandler;
zoomHandler.setZoomedResolution( xZoom /* *zoomHandler.resolutionX()*/ , yZoom /* *zoomHandler.resolutionY()*/ );
return generatePixmap( &zoomHandler );
}
-QPixmap EmbeddedPictureObject::generatePixmap(KoZoomHandler*_zoomHandler)
+TQPixmap EmbeddedPictureObject::generatePixmap(KoZoomHandler*_zoomHandler)
{
const double penw = _zoomHandler->zoomItX( ( ( pen.style() == Qt::NoPen ) ? 1 : pen.width() ) / 2.0 );
- QSize size( _zoomHandler->zoomSize( m_geometry.size() /*ext*/ ) );
+ TQSize size( _zoomHandler->zoomSize( m_tqgeometry.size() /*ext*/ ) );
//kdDebug(33001) << "EmbeddedPictureObject::generatePixmap size= " << size << endl;
- QPixmap pixmap(size);
- QPainter paint;
+ TQPixmap pixmap(size);
+ TQPainter paint;
paint.begin( &pixmap );
- pixmap.fill( Qt::white );
+ pixmap.fill( TQt::white );
// Draw background
paint.setPen( Qt::NoPen );
paint.setBrush( getBrush() );
- QRect rect( (int)( penw ), (int)( penw ),
- (int)( _zoomHandler->zoomItX( /*ext*/m_geometry.width() ) - 2.0 * penw ),
- (int)( _zoomHandler->zoomItY( /*ext*/m_geometry.height() ) - 2.0 * penw ) );
+ TQRect rect( (int)( penw ), (int)( penw ),
+ (int)( _zoomHandler->zoomItX( /*ext*/m_tqgeometry.width() ) - 2.0 * penw ),
+ (int)( _zoomHandler->zoomItY( /*ext*/m_tqgeometry.height() ) - 2.0 * penw ) );
// if ( getFillType() == FT_BRUSH || !gradient )
paint.drawRect( rect );
@@ -1231,8 +1231,8 @@ QPixmap EmbeddedPictureObject::generatePixmap(KoZoomHandler*_zoomHandler)
// gradient->setSize( size );
// paint.drawPixmap( (int)( penw ), (int)( penw ),
// gradient->pixmap(), 0, 0,
-// (int)( _zoomHandler->zoomItX( m_geometry/*ext*/.width() ) - 2 * penw ),
-// (int)( _zoomHandler->zoomItY( m_geometry/*ext*/.height() ) - 2 * penw ) );
+// (int)( _zoomHandler->zoomItX( m_tqgeometry/*ext*/.width() ) - 2 * penw ),
+// (int)( _zoomHandler->zoomItY( m_tqgeometry/*ext*/.height() ) - 2 * penw ) );
// }
@@ -1240,7 +1240,7 @@ QPixmap EmbeddedPictureObject::generatePixmap(KoZoomHandler*_zoomHandler)
image.clearCache(); // Release the memoy of the picture cache
// image.setAlphaBuffer(true);
-// QBitmap tmpMask;
+// TQBitmap tmpMask;
// tmpMask = image.createAlphaMask().scale(size);
// pixmap.setMask(tmpMask);
@@ -1248,7 +1248,7 @@ QPixmap EmbeddedPictureObject::generatePixmap(KoZoomHandler*_zoomHandler)
return pixmap;
}
-void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandler,
+void EmbeddedPictureObject::draw( TQPainter *_painter/*, KoZoomHandler*_zoomHandler,
int pageNum, SelectionMode selectionMode, bool drawContour*/ )
{
bool drawContour = false;
@@ -1260,10 +1260,10 @@ void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandl
// if ( shadowDistance > 0 && !drawContour )
// drawShadow(_painter, _zoomHandler);
- const double ox = /*orig*/m_geometry.x();
- const double oy = /*orig*/m_geometry.y();
- const double ow = /*ext*/m_geometry.width();
- const double oh = /*ext*/m_geometry.height();
+ const double ox = /*orig*/m_tqgeometry.x();
+ const double oy = /*orig*/m_tqgeometry.y();
+ const double ow = /*ext*/m_tqgeometry.width();
+ const double oh = /*ext*/m_tqgeometry.height();
//const double penw = _zoomHandler->zoomItX( ( ( pen.style() == Qt::NoPen ) ? 1.0 : pen.width() ) / 2.0 );
_painter->save();
@@ -1271,17 +1271,17 @@ void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandl
_painter->translate( _zoomHandler->zoomItX( ox ), _zoomHandler->zoomItY( oy ) );
if ( kAbs(angle)> DBL_EPSILON ) {
- QSize bs = QSize( _zoomHandler->zoomItX( ow ), _zoomHandler->zoomItY( oh ) );
- QRect br = QRect( 0, 0, bs.width(), bs.height() );
+ TQSize bs = TQSize( _zoomHandler->zoomItX( ow ), _zoomHandler->zoomItY( oh ) );
+ TQRect br = TQRect( 0, 0, bs.width(), bs.height() );
int pw = br.width();
int ph = br.height();
- QRect rr = br;
+ TQRect rr = br;
int pixYPos = -rr.y();
int pixXPos = -rr.x();
- br.moveTopLeft( QPoint( -br.width() / 2, -br.height() / 2 ) );
- rr.moveTopLeft( QPoint( -rr.width() / 2, -rr.height() / 2 ) );
+ br.moveTopLeft( TQPoint( -br.width() / 2, -br.height() / 2 ) );
+ rr.moveTopLeft( TQPoint( -rr.width() / 2, -rr.height() / 2 ) );
- QWMatrix m;
+ TQWMatrix m;
m.translate( pw / 2, ph / 2 );
m.rotate( angle );
m.translate( rr.left() + pixXPos, rr.top() + pixYPos );
@@ -1290,9 +1290,9 @@ void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandl
if ( !drawContour )
{
- QRect rect( 0, 0, (int)( _zoomHandler->zoomItX( ow ) ),
+ TQRect rect( 0, 0, (int)( _zoomHandler->zoomItX( ow ) ),
(int)( _zoomHandler->zoomItY( oh ) ) );
- // ### HACK QT seems not to be able to correctly compare QVariant
+ // ### HACK QT seems not to be able to correctly compare TQVariant
bool variants1;
if (m_ie_par1.isNull())
variants1=m_cachedPar1.isNull();
@@ -1348,17 +1348,17 @@ void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandl
// Draw border
// ### TODO port to KoBorder::drawBorders() (after writing a simplified version of it, that takes the same border on each size)
-// QPen pen2;
+// TQPen pen2;
// if ( drawContour ) {
-// pen2 = QPen( Qt::black, 1, Qt::DotLine );
-// _painter->setRasterOp( Qt::NotXorROP );
+// pen2 = TQPen( TQt::black, 1, TQt::DotLine );
+// _painter->setRasterOp( TQt::NotXorROP );
// }
// else {
// pen2 = pen;
// pen2.setWidth( _zoomHandler->zoomItX( ( pen.style() == Qt::NoPen ) ? 1.0 : (double)pen.width() ) );
// }
// _painter->setPen( pen2 );
-// _painter->setBrush( Qt::NoBrush );
+// _painter->setBrush( TQt::NoBrush );
// _painter->drawRect( (int)( penw ), (int)( penw ),
// (int)( _zoomHandler->zoomItX( ow ) - 2.0 * penw ),
// (int)( _zoomHandler->zoomItY( oh ) - 2.0 * penw ) );
@@ -1370,19 +1370,19 @@ void EmbeddedPictureObject::draw( QPainter *_painter/*, KoZoomHandler*_zoomHandl
EmbeddedObject::draw( _painter );
}
-QPixmap EmbeddedPictureObject::getOriginalPixmap()
+TQPixmap EmbeddedPictureObject::getOriginalPixmap()
{
- QSize _pixSize = image.getOriginalSize();
+ TQSize _pixSize = image.getOriginalSize();
kdDebug(33001) << "EmbeddedPictureObject::getOriginalPixmap size= " << _pixSize << endl;
- QPixmap _pixmap = image.generatePixmap( _pixSize, true );
+ TQPixmap _pixmap = image.generatePixmap( _pixSize, true );
image.clearCache(); // Release the memoy of the picture cache
return _pixmap;
}
-QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
+TQPixmap EmbeddedPictureObject::changePictureSettings( TQPixmap _tmpPixmap )
{
- QImage _tmpImage = _tmpPixmap.convertToImage();
+ TQImage _tmpImage = _tmpPixmap.convertToImage();
if (_tmpImage.isNull())
return _tmpPixmap;
@@ -1401,7 +1401,7 @@ QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
_tmpImage = _tmpImage.mirror( _horizontal, _vertical );
if ( depth != 0 ) {
- QImage tmpImg = _tmpImage.convertDepth( depth );
+ TQImage tmpImg = _tmpImage.convertDepth( depth );
if ( !tmpImg.isNull() )
_tmpImage = tmpImg;
}
@@ -1412,9 +1412,9 @@ QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
if ( grayscal ) {
if ( depth == 1 || depth == 8 ) {
for ( int i = 0; i < _tmpImage.numColors(); ++i ) {
- QRgb rgb = _tmpImage.color( i );
- int gray = qGray( rgb );
- rgb = qRgb( gray, gray, gray );
+ TQRgb rgb = _tmpImage.color( i );
+ int gray = tqGray( rgb );
+ rgb = tqRgb( gray, gray, gray );
_tmpImage.setColor( i, rgb );
}
}
@@ -1427,9 +1427,9 @@ QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
for ( _x = 0; _x < _width; ++_x ) {
for ( _y = 0; _y < _height; ++_y ) {
if ( _tmpImage.valid( _x, _y ) ) {
- QRgb rgb = _tmpImage.pixel( _x, _y );
- int gray = qGray( rgb );
- rgb = qRgb( gray, gray, gray );
+ TQRgb rgb = _tmpImage.pixel( _x, _y );
+ int gray = tqGray( rgb );
+ rgb = tqRgb( gray, gray, gray );
_tmpImage.setPixel( _x, _y, rgb );
}
}
@@ -1440,8 +1440,8 @@ QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
if ( bright != 0 ) {
if ( depth == 1 || depth == 8 ) {
for ( int i = 0; i < _tmpImage.numColors(); ++i ) {
- QRgb rgb = _tmpImage.color( i );
- QColor c( rgb );
+ TQRgb rgb = _tmpImage.color( i );
+ TQColor c( rgb );
if ( bright > 0 )
rgb = c.light( 100 + bright ).rgb();
@@ -1460,8 +1460,8 @@ QPixmap EmbeddedPictureObject::changePictureSettings( QPixmap _tmpPixmap )
for ( _x = 0; _x < _width; ++_x ) {
for ( _y = 0; _y < _height; ++_y ) {
if ( _tmpImage.valid( _x, _y ) ) {
- QRgb rgb = _tmpImage.pixel( _x, _y );
- QColor c( rgb );
+ TQRgb rgb = _tmpImage.pixel( _x, _y );
+ TQColor c( rgb );
if ( bright > 0 )
rgb = c.light( 100 + bright ).rgb();
diff --git a/kspread/kspread_object.h b/kspread/kspread_object.h
index dba2e90c..c111490e 100644
--- a/kspread/kspread_object.h
+++ b/kspread/kspread_object.h
@@ -108,13 +108,13 @@ enum AlignType {
class EmbeddedObject
{
public:
- EmbeddedObject( Sheet *_sheet, const KoRect& _geometry );
+ EmbeddedObject( Sheet *_sheet, const KoRect& _tqgeometry );
virtual ~EmbeddedObject();
virtual ObjType getType() const { return OBJECT_GENERAL; }
- virtual QString getTypeString() const
- { return QString(); }
+ virtual TQString getTypeString() const
+ { return TQString(); }
- KoRect geometry();
+ KoRect tqgeometry();
void setGeometry( const KoRect &rect );
virtual void moveBy( const KoPoint &_point );
virtual void moveBy( double _dx, double _dy );
@@ -126,9 +126,9 @@ class EmbeddedObject
void setSelected(bool s) { m_selected = s; }
bool isSelected() const { return m_selected; }
- void setObjectName( const QString &_objectName )
+ void setObjectName( const TQString &_objectName )
{ m_objectName = _objectName; }
- QString getObjectName() const
+ TQString getObjectName() const
{ return m_objectName; }
virtual void setProtect( bool b ) { m_protect = b; }
@@ -156,11 +156,11 @@ class EmbeddedObject
int &partIndexObj;
};
- virtual bool load( const QDomElement& element );
- virtual void loadOasis(const QDomElement &element, KoOasisLoadingContext & context );
- virtual QDomElement save( QDomDocument& doc );
+ virtual bool load( const TQDomElement& element );
+ virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context );
+ virtual TQDomElement save( TQDomDocument& doc );
virtual bool saveOasisObject( KSpreadOasisSaveContext &sc ) const;
- virtual void draw( QPainter *_painter );
+ virtual void draw( TQPainter *_painter );
/**
* Renders the embedded object to a pixmap and returns the result.
@@ -169,21 +169,21 @@ class EmbeddedObject
*
* @param size Specifies the desired size of the returned pixmap.
*/
- QPixmap toPixmap( QSize size );
+ TQPixmap toPixmap( TQSize size );
/**
* Renders the embedded object to a pixmap at 100% scale. Equivalent to calling toPixmap( 1.0, 1.0 )
*/
- QPixmap toPixmap();
+ TQPixmap toPixmap();
/**
* Renders the embedded object to a pixmap at the specified x and y scale and returns the result.
*/
- virtual QPixmap toPixmap( double xZoom , double yZoom );
+ virtual TQPixmap toPixmap( double xZoom , double yZoom );
- void paintSelection( QPainter *_painter, SelectionMode selectionMode );
- virtual QCursor getCursor( const QPoint &_point, ModifyType &_modType, QRect &geometry ) const;
+ void paintSelection( TQPainter *_painter, SelectionMode selectionMode );
+ virtual TQCursor getCursor( const TQPoint &_point, ModifyType &_modType, TQRect &tqgeometry ) const;
virtual void removeFromObjList()
{ inObjList = false; }
@@ -195,7 +195,7 @@ class EmbeddedObject
{ cmds--; doDelete(); }
//TEMP:
- virtual QBrush getBrush() const { return m_brush.getBrush(); }
+ virtual TQBrush getBrush() const { return m_brush.getBrush(); }
protected:
@@ -215,12 +215,12 @@ class EmbeddedObject
* @param xZoom This will be set to the required X zoom factor
* @param yZoom This will be set to the required Y zoom factor
*/
- void calculateRequiredZoom( QSize desiredSize , double& xZoom, double& yZoom );
+ void calculateRequiredZoom( TQSize desiredSize , double& xZoom, double& yZoom );
- KoRect m_geometry;
+ KoRect m_tqgeometry;
Sheet *m_sheet;
Canvas *m_canvas;
- QString m_objectName;
+ TQString m_objectName;
bool m_selected:1;
bool m_protect:1;
bool m_keepRatio:1;
@@ -238,25 +238,25 @@ class EmbeddedObject
class EmbeddedKOfficeObject : public EmbeddedObject
{
public:
- EmbeddedKOfficeObject( Doc *parent, Sheet *_sheet, KoDocument* doc, const KoRect& geometry );
- EmbeddedKOfficeObject( Doc *parent, Sheet *_sheet );
+ EmbeddedKOfficeObject( Doc *tqparent, Sheet *_sheet, KoDocument* doc, const KoRect& tqgeometry );
+ EmbeddedKOfficeObject( Doc *tqparent, Sheet *_sheet );
virtual ~EmbeddedKOfficeObject();
virtual ObjType getType() const { return OBJECT_KOFFICE_PART; }
- virtual QString getTypeString() const
+ virtual TQString getTypeString() const
{ return i18n("Embedded Object"); }
- Doc* parent();
+ Doc* tqparent();
KoDocumentChild *embeddedObject();
- bool load( const QDomElement& element );
- virtual void loadOasis(const QDomElement &element, KoOasisLoadingContext & context );
- QDomElement save( QDomDocument& doc );
- virtual void draw( QPainter *_painter );
+ bool load( const TQDomElement& element );
+ virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context );
+ TQDomElement save( TQDomDocument& doc );
+ virtual void draw( TQPainter *_painter );
/**
* See EmbeddedObject::toPixmap(double,double)
*/
- virtual QPixmap toPixmap(double xZoom , double yZoom);
+ virtual TQPixmap toPixmap(double xZoom , double yZoom);
void activate( View *_view, Canvas *_canvas );
void deactivate();
@@ -281,16 +281,16 @@ class EmbeddedChart : public EmbeddedKOfficeObject
EmbeddedChart( Doc *_spread, Sheet *_sheet );
virtual ~EmbeddedChart();
virtual ObjType getType() const { return OBJECT_CHART; }
- virtual QString getTypeString() const
+ virtual TQString getTypeString() const
{ return i18n("Chart"); }
- void setDataArea( const QRect& _data );
+ void setDataArea( const TQRect& _data );
void update();
- bool load( const QDomElement& element );
- virtual void loadOasis(const QDomElement &element, KoOasisLoadingContext & context );
- QDomElement save( QDomDocument& doc );
- virtual void draw( QPainter *_painter );
+ bool load( const TQDomElement& element );
+ virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context );
+ TQDomElement save( TQDomDocument& doc );
+ virtual void draw( TQPainter *_painter );
/**
* @reimp
@@ -314,51 +314,51 @@ class EmbeddedChart : public EmbeddedKOfficeObject
class EmbeddedPictureObject : public EmbeddedObject
{
public:
- EmbeddedPictureObject(Sheet *_sheet, const KoRect& _geometry, KoPictureCollection *_imageCollection );
- EmbeddedPictureObject(Sheet *_sheet, const KoRect& _geometry, KoPictureCollection *_imageCollection, const KoPictureKey & key );
+ EmbeddedPictureObject(Sheet *_sheet, const KoRect& _tqgeometry, KoPictureCollection *_imageCollection );
+ EmbeddedPictureObject(Sheet *_sheet, const KoRect& _tqgeometry, KoPictureCollection *_imageCollection, const KoPictureKey & key );
EmbeddedPictureObject( Sheet *_sheet, KoPictureCollection *_imageCollection );
virtual ~EmbeddedPictureObject();
EmbeddedPictureObject &operator=( const EmbeddedPictureObject & );
virtual ObjType getType() const { return OBJECT_PICTURE; }
- virtual QString getTypeString() const
+ virtual TQString getTypeString() const
{ return i18n("Picture"); }
- bool load( const QDomElement& element );
- virtual void loadOasis(const QDomElement &element, KoOasisLoadingContext & context );
- QDomElement save( QDomDocument& doc );
- virtual void draw( QPainter *_painter );
+ bool load( const TQDomElement& element );
+ virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context );
+ TQDomElement save( TQDomDocument& doc );
+ virtual void draw( TQPainter *_painter );
/**
* See EmbeddedObject::toPixmap(double,double)
*/
- virtual QPixmap toPixmap(double xZoom , double yZoom);
+ virtual TQPixmap toPixmap(double xZoom , double yZoom);
/**
* Only used as a default value in the filedialog, in changePicture
* \warning Do not use for anything else
*/
- QString getFileName() const
+ TQString getFileName() const
{ return image.getKey().filename(); }
KoPictureKey getKey() const
{ return image.getKey(); }
- QSize originalSize() const
+ TQSize originalSize() const
{ return image.getOriginalSize(); }
void setPicture( const KoPictureKey & key );
void reload( void );
- //virtual QDomDocumentFragment save( QDomDocument& doc, double offset );
+ //virtual TQDomDocumentFragment save( TQDomDocument& doc, double offset );
- //virtual double load(const QDomElement &element);
- //virtual void loadOasis(const QDomElement &element, KoOasisLoadingContext & context, KPRLoadingInfo *info);
+ //virtual double load(const TQDomElement &element);
+ //virtual void loadOasis(const TQDomElement &element, KoOasisLoadingContext & context, KPRLoadingInfo *info);
-// virtual void draw( QPainter *_painter, KoZoomHandler*_zoomHandler,
+// virtual void draw( TQPainter *_painter, KoZoomHandler*_zoomHandler,
// int /* page */, SelectionMode selectionMode, bool drawContour = FALSE );
- QPixmap getOriginalPixmap();
+ TQPixmap getOriginalPixmap();
PictureMirrorType getPictureMirrorType() const { return mirrorType; }
int getPictureDepth() const { return depth; }
bool getPictureSwapRGB() const { return swapRGB; }
@@ -366,11 +366,11 @@ class EmbeddedPictureObject : public EmbeddedObject
int getPictureBright() const { return bright; }
ImageEffect getImageEffect() const {return m_effect;}
- QVariant getIEParam1() const {return m_ie_par1;}
- QVariant getIEParam2() const {return m_ie_par2;}
- QVariant getIEParam3() const {return m_ie_par3;}
+ TQVariant getIEParam1() const {return m_ie_par1;}
+ TQVariant getIEParam2() const {return m_ie_par2;}
+ TQVariant getIEParam3() const {return m_ie_par3;}
void setImageEffect(ImageEffect eff) { m_effect = eff; }
- void setIEParams(QVariant p1, QVariant p2, QVariant p3) {
+ void setIEParams(TQVariant p1, TQVariant p2, TQVariant p3) {
m_ie_par1=p1;
m_ie_par2=p2;
m_ie_par3=p3;
@@ -384,7 +384,7 @@ class EmbeddedPictureObject : public EmbeddedObject
KoPicture picture() const { return image;}
- void loadPicture( const QString & fileName );
+ void loadPicture( const TQString & fileName );
virtual void flip(bool horizontal );
@@ -392,7 +392,7 @@ class EmbeddedPictureObject : public EmbeddedObject
virtual const char * getOasisElementName() const;
virtual bool saveOasisObjectAttributes( KSpreadOasisSaveContext &sc ) const;
- QPixmap changePictureSettings( QPixmap _tmpPixmap );
+ TQPixmap changePictureSettings( TQPixmap _tmpPixmap );
virtual void saveOasisPictureElement( KoGenStyle &styleobjectauto ) const;
void loadOasisPictureEffect(KoOasisLoadingContext & context );
virtual void fillStyle( KoGenStyle& styleObjectAuto, KoGenStyles& mainStyles ) const;
@@ -401,10 +401,10 @@ class EmbeddedPictureObject : public EmbeddedObject
* @internal
* Draws the shadow
*/
- void drawShadow( QPainter* _painter, KoZoomHandler* _zoomHandler);
+ void drawShadow( TQPainter* _painter, KoZoomHandler* _zoomHandler);
- QPixmap generatePixmap(KoZoomHandler*_zoomHandler);
- QString convertValueToPercent( int val ) const;
+ TQPixmap generatePixmap(KoZoomHandler*_zoomHandler);
+ TQString convertValueToPercent( int val ) const;
KoPictureCollection *imageCollection;
KoPicture image;
@@ -417,12 +417,12 @@ class EmbeddedPictureObject : public EmbeddedObject
//image effect and its params
ImageEffect m_effect, m_cachedEffect;
- QVariant m_ie_par1, m_cachedPar1;
- QVariant m_ie_par2, m_cachedPar2;
- QVariant m_ie_par3, m_cachedPar3;
+ TQVariant m_ie_par1, m_cachedPar1;
+ TQVariant m_ie_par2, m_cachedPar2;
+ TQVariant m_ie_par3, m_cachedPar3;
- QPixmap m_cachedPixmap;
- QRect m_cachedRect;
+ TQPixmap m_cachedPixmap;
+ TQRect m_cachedRect;
};
} // namespace KSpread
diff --git a/kspread/kspread_pen.cc b/kspread/kspread_pen.cc
index b34d9b98..52a0ada6 100644
--- a/kspread/kspread_pen.cc
+++ b/kspread/kspread_pen.cc
@@ -22,21 +22,21 @@
#include <KoTextZoomHandler.h>
KSpreadPen::KSpreadPen()
- : QPen()
+ : TQPen()
{
m_pointWidth = 1.0;
}
-KSpreadPen::KSpreadPen(const QColor& _color, double _pointWidth, Qt::PenStyle _style)
- : QPen()
+KSpreadPen::KSpreadPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style)
+ : TQPen()
{
setColor(_color);
setPointWidth(_pointWidth);
setStyle(_style);
}
-KSpreadPen::KSpreadPen(const QColor& _color)
- : QPen(_color)
+KSpreadPen::KSpreadPen(const TQColor& _color)
+ : TQPen(_color)
{
m_pointWidth = 1.0;
}
@@ -60,9 +60,9 @@ void KSpreadPen::setPointWidth(double w)
m_pointWidth = w;
}
-QPen KSpreadPen::zoomedPen(KoZoomHandler* zoomHandler)
+TQPen KSpreadPen::zoomedPen(KoZoomHandler* zoomHandler)
{
- QPen pen = *this;
+ TQPen pen = *this;
pen.setWidth(zoomHandler->zoomItY(m_pointWidth));
return pen;
diff --git a/kspread/kspread_pen.h b/kspread/kspread_pen.h
index 81bc0229..23de5877 100644
--- a/kspread/kspread_pen.h
+++ b/kspread/kspread_pen.h
@@ -20,19 +20,19 @@
#ifndef KSPREADPEN_H
#define KSPREADPEN_H
-#include <qpen.h>
+#include <tqpen.h>
class KoZoomHandler;
/**
* Pen that handles line widths in points
*/
-class KSpreadPen : public QPen
+class KSpreadPen : public TQPen
{
public:
KSpreadPen();
- KSpreadPen(const QColor& _color, double _pointWidth, Qt::PenStyle _style);
- KSpreadPen(const QColor& _color);
+ KSpreadPen(const TQColor& _color, double _pointWidth, Qt::PenStyle _style);
+ KSpreadPen(const TQColor& _color);
~KSpreadPen();
/**
@@ -58,8 +58,8 @@ class KSpreadPen : public QPen
/// KSpreadPen width in points
double pointWidth() const { return m_pointWidth; }
- /// Returns a zoomed QPen
- QPen zoomedPen(KoZoomHandler* zoomHandler);
+ /// Returns a zoomed TQPen
+ TQPen zoomedPen(KoZoomHandler* zoomHandler);
private:
double m_pointWidth;
diff --git a/kspread/kspread_propertyEditor.cpp b/kspread/kspread_propertyEditor.cpp
index 234cb2a7..857af71c 100644
--- a/kspread/kspread_propertyEditor.cpp
+++ b/kspread/kspread_propertyEditor.cpp
@@ -38,8 +38,8 @@
using namespace KSpread;
-PropertyEditor::PropertyEditor( QWidget *parent, const char *name, Sheet *page, Doc *doc )
- : QTabDialog( parent, name, true )
+PropertyEditor::PropertyEditor( TQWidget *tqparent, const char *name, Sheet *page, Doc *doc )
+ : TQTabDialog( tqparent, name, true )
, m_page( page )
, m_doc( doc )
, m_objects( page->getSelectedObjects() )
@@ -57,7 +57,7 @@ PropertyEditor::PropertyEditor( QWidget *parent, const char *name, Sheet *page,
setOkButton( KStdGuiItem::ok().text() );
setApplyButton( KStdGuiItem::apply().text() );
- connect( this, SIGNAL( applyButtonPressed() ), this, SLOT( slotDone() ) );
+ connect( this, TQT_SIGNAL( applyButtonPressed() ), this, TQT_SLOT( slotDone() ) );
//m_objectProperties = new KPrObjectProperties( m_objects );
@@ -277,10 +277,10 @@ KCommand * PropertyEditor::getCommand()
macro = new KMacroCommand( i18n( "Apply Properties" ) );
}
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
for ( ; it.current(); ++it )
{
- KoRect oldRect = it.current()->geometry()/*getRect()*/;
+ KoRect oldRect = it.current()->tqgeometry()/*getRect()*/;
KoRect newRect = oldRect;
if ( change & GeneralProperty::Left )
@@ -439,14 +439,14 @@ GeneralProperty::GeneralValue PropertyEditor::getGeneralValue()
bool keepRatio = false;
generalValue.m_keepRatio = STATE_OFF;
- QPtrListIterator<EmbeddedObject> it( m_objects );
+ TQPtrListIterator<EmbeddedObject> it( m_objects );
if ( it.current() )
{
protect = it.current()->isProtect();
generalValue.m_protect = protect ? STATE_ON : STATE_OFF;
keepRatio = it.current()->isKeepRatio();
generalValue.m_keepRatio = keepRatio ? STATE_ON : STATE_OFF;
- generalValue.m_rect = it.current()->geometry()/*getRect()*/;
+ generalValue.m_rect = it.current()->tqgeometry()/*getRect()*/;
++it;
}
diff --git a/kspread/kspread_propertyEditor.h b/kspread/kspread_propertyEditor.h
index 907f40e0..a8a32013 100644
--- a/kspread/kspread_propertyEditor.h
+++ b/kspread/kspread_propertyEditor.h
@@ -20,7 +20,7 @@
#ifndef PROPERTYEDITOR_H
#define PROPERTYEDITOR_H
-#include <qtabdialog.h>
+#include <tqtabdialog.h>
#include <kspread_generalProperty.h>
class KCommand;
@@ -40,12 +40,13 @@ class Doc;
// class KPrTextProperty;
// class KPrObjectProperties;
-class PropertyEditor : public QTabDialog
+class PropertyEditor : public TQTabDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- PropertyEditor( QWidget *parent = 0, const char *name = 0, Sheet *page = 0, Doc *doc = 0 );
+ PropertyEditor( TQWidget *tqparent = 0, const char *name = 0, Sheet *page = 0, Doc *doc = 0 );
~PropertyEditor();
KCommand * getCommand();
@@ -68,7 +69,7 @@ private:
Sheet *m_page;
Doc *m_doc;
- QPtrList<EmbeddedObject> m_objects;
+ TQPtrList<EmbeddedObject> m_objects;
// KPrPenStyleWidget *m_penProperty;
// KPrBrushProperty *m_brushProperty;
diff --git a/kspread/kspread_sheet.cc b/kspread/kspread_sheet.cc
index 6b8d23ee..ca69af15 100644
--- a/kspread/kspread_sheet.cc
+++ b/kspread/kspread_sheet.cc
@@ -27,16 +27,16 @@
#include <stdlib.h>
#include <unistd.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qclipboard.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpicture.h>
-#include <qregexp.h>
-#include <qvbox.h>
-#include <qmap.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqclipboard.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpicture.h>
+#include <tqregexp.h>
+#include <tqvbox.h>
+#include <tqmap.h>
#include <kdebug.h>
#include <kmdcodec.h>
@@ -99,7 +99,7 @@ namespace KSpread {
*
*****************************************************************************/
-CellBinding::CellBinding( Sheet *_sheet, const QRect& _area )
+CellBinding::CellBinding( Sheet *_sheet, const TQRect& _area )
{
m_rctDataArea = _area;
@@ -122,9 +122,9 @@ void CellBinding::cellChanged( Cell *_cell )
emit changed( _cell );
}
-bool CellBinding::contains( int _x, int _y )
+bool CellBinding::tqcontains( int _x, int _y )
{
- return m_rctDataArea.contains( QPoint( _x, _y ) );
+ return m_rctDataArea.tqcontains( TQPoint( _x, _y ) );
}
/*****************************************************************************
@@ -133,7 +133,7 @@ bool CellBinding::contains( int _x, int _y )
*
*****************************************************************************/
-ChartBinding::ChartBinding( Sheet *_sheet, const QRect& _area, EmbeddedChart *_child )
+ChartBinding::ChartBinding( Sheet *_sheet, const TQRect& _area, EmbeddedChart *_child )
: CellBinding( _sheet, _area )
{
m_child = _child;
@@ -151,7 +151,7 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
//Ensure display gets updated by marking all cells underneath the chart as
//dirty
- const QRect chartGeometry = m_child->geometry().toQRect();
+ const TQRect chartGeometry = m_child->tqgeometry().toTQRect();
double tmp;
int left = sheet()->leftColumn( chartGeometry.left() , tmp );
@@ -159,7 +159,7 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
int right = sheet()->rightColumn( chartGeometry.right() );
int bottom = sheet()->bottomRow( chartGeometry.bottom() );
- sheet()->setRegionPaintDirty( QRect(left,top,right-left,bottom-top) );
+ sheet()->setRegionPaintDirty( TQRect(left,top,right-left,bottom-top) );
//kdDebug(36001) << m_rctDataArea << endl;
@@ -201,7 +201,7 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
// Force a redraw of the chart on all views
- /** TODO - replace the call below with something that will repaint this chart */
+ /** TODO - replace the call below with something that will tqrepaint this chart */
#endif
// sheet()->emit_polygonInvalidated( m_child->framePointArray() );
}
@@ -212,8 +212,8 @@ void ChartBinding::cellChanged( Cell* /*changedCell*/ )
/******************************************************************/
-TextDrag::TextDrag( QWidget * dragSource, const char * name )
- : QTextDrag( dragSource, name )
+TextDrag::TextDrag( TQWidget * dragSource, const char * name )
+ : TQTextDrag( dragSource, name )
{
}
@@ -222,25 +222,25 @@ TextDrag::~TextDrag()
}
-QByteArray TextDrag::encodedData( const char * mime ) const
+TQByteArray TextDrag::tqencodedData( const char * mime ) const
{
if ( strcmp( selectionMimeType(), mime ) == 0)
return m_kspread;
else
- return QTextDrag::encodedData( mime );
+ return TQTextDrag::tqencodedData( mime );
}
-bool TextDrag::canDecode( QMimeSource* e )
+bool TextDrag::canDecode( TQMimeSource* e )
{
if ( e->provides( selectionMimeType() ) )
return true;
- return QTextDrag::canDecode(e);
+ return TQTextDrag::canDecode(e);
}
const char * TextDrag::format( int i ) const
{
if ( i < 4 ) // HACK, but how to do otherwise ??
- return QTextDrag::format(i);
+ return TQTextDrag::format(i);
else if ( i == 4 )
return selectionMimeType();
else return 0;
@@ -265,16 +265,16 @@ public:
DCOPObject* dcop;
- QString name;
+ TQString name;
int id;
- Sheet::LayoutDirection layoutDirection;
+ Sheet::LayoutDirection tqlayoutDirection;
// true if sheet is hidden
bool hide;
// password of protected sheet
- QCString password;
+ TQCString password;
bool showGrid;
@@ -305,19 +305,19 @@ public:
Region paintDirtyList;
// to get font metrics
- QPainter *painter;
- QWidget *widget;
+ TQPainter *painter;
+ TQWidget *widget;
// List of all cell bindings. For example charts use bindings to get
// informed about changing cell contents.
- QPtrList<CellBinding> cellBindings;
+ TQPtrList<CellBinding> cellBindings;
// Indicates whether the sheet should paint the page breaks.
// Doing so costs some time, so by default it should be turned off.
bool showPageBorders;
// List of all embedded objects. FIXME unused ??
- // QPtrList<Child> m_lstChildren;
+ // TQPtrList<Child> m_lstChildren;
// The highest row and column ever accessed by the user.
int maxRow;
@@ -331,9 +331,9 @@ public:
bool scrollBarUpdates;
- QPen emptyPen;
- QBrush emptyBrush;
- QColor emptyColor;
+ TQPen emptyPen;
+ TQBrush emptyBrush;
+ TQColor emptyColor;
int scrollPosX;
int scrollPosY;
@@ -342,9 +342,9 @@ public:
};
int Sheet::s_id = 0L;
-QIntDict<Sheet>* Sheet::s_mapSheets;
+TQIntDict<Sheet>* Sheet::s_mapSheets;
-Sheet* Sheet::find( int _id )
+Sheet* Sheet::tqfind( int _id )
{
if ( !s_mapSheets )
return 0L;
@@ -353,11 +353,11 @@ Sheet* Sheet::find( int _id )
}
Sheet::Sheet (Map* map,
- const QString &sheetName, const char *_name )
- : QObject( map, _name )
+ const TQString &sheetName, const char *_name )
+ : TQObject( map, _name )
{
if ( s_mapSheets == 0L )
- s_mapSheets = new QIntDict<Sheet>;
+ s_mapSheets = new TQIntDict<Sheet>;
d = new Private;
d->workbook = map;
@@ -365,7 +365,7 @@ Sheet::Sheet (Map* map,
d->id = s_id++;
s_mapSheets->insert( d->id, this );
- d->layoutDirection = LeftToRight;
+ d->tqlayoutDirection = LeftToRight;
d->defaultFormat = new Format (this, d->workbook->doc()->styleManager()->defaultStyle());
d->emptyPen.setStyle( Qt::NoPen );
@@ -387,8 +387,8 @@ Sheet::Sheet (Map* map,
d->defaultColumnFormat = new ColumnFormat( this, 0 );
d->defaultColumnFormat->setDefault();
- d->widget = new QWidget();
- d->painter = new QPainter;
+ d->widget = new TQWidget();
+ d->painter = new TQPainter;
d->painter->begin( d->widget );
d->maxColumn = 256;
@@ -413,9 +413,9 @@ Sheet::Sheet (Map* map,
// Get a unique name so that we can offer scripting
if ( !_name )
{
- QCString s;
+ TQCString s;
s.sprintf("Sheet%i", s_id );
- QObject::setName( s.data() );
+ TQObject::setName( s.data() );
}
d->print = new SheetPrint( this );
@@ -423,16 +423,16 @@ Sheet::Sheet (Map* map,
d->dependencies = new KSpread::DependencyManager (this);
// connect to named area slots
- QObject::connect( doc(), SIGNAL( sig_addAreaName( const QString & ) ),
- this, SLOT( slotAreaModified( const QString & ) ) );
+ TQObject::connect( doc(), TQT_SIGNAL( sig_addAreaName( const TQString & ) ),
+ this, TQT_SLOT( slotAreaModified( const TQString & ) ) );
- QObject::connect( doc(), SIGNAL( sig_removeAreaName( const QString & ) ),
- this, SLOT( slotAreaModified( const QString & ) ) );
+ TQObject::connect( doc(), TQT_SIGNAL( sig_removeAreaName( const TQString & ) ),
+ this, TQT_SLOT( slotAreaModified( const TQString & ) ) );
}
-QString Sheet::sheetName() const
+TQString Sheet::sheetName() const
{
return d->name;
}
@@ -452,19 +452,19 @@ int Sheet::id() const
return d->id;
}
-Sheet::LayoutDirection Sheet::layoutDirection() const
+Sheet::LayoutDirection Sheet::tqlayoutDirection() const
{
- return d->layoutDirection;
+ return d->tqlayoutDirection;
}
void Sheet::setLayoutDirection( LayoutDirection dir )
{
- d->layoutDirection = dir;
+ d->tqlayoutDirection = dir;
}
bool Sheet::isRightToLeft() const
{
- return d->layoutDirection == RightToLeft;
+ return d->tqlayoutDirection == RightToLeft;
}
bool Sheet::isHidden() const
@@ -660,7 +660,7 @@ Value Sheet::valueRange (int col1, int row1,
return d->cells.valueRange (col1, row1, col2, row2);
}
-void Sheet::password( QCString & passwd ) const
+void Sheet::password( TQCString & passwd ) const
{
passwd = d->password;
}
@@ -670,12 +670,12 @@ bool Sheet::isProtected() const
return !d->password.isNull();
}
-void Sheet::setProtected( QCString const & passwd )
+void Sheet::setProtected( TQCString const & passwd )
{
d->password = passwd;
}
-bool Sheet::checkPassword( QCString const & passwd ) const
+bool Sheet::checkPassword( TQCString const & passwd ) const
{
return ( passwd == d->password );
}
@@ -685,12 +685,12 @@ SheetPrint* Sheet::print() const
return d->print;
}
-QPainter& Sheet::painter()
+TQPainter& Sheet::painter()
{
return *d->painter;
}
-QWidget* Sheet::widget()const
+TQWidget* Sheet::widget()const
{
return d->widget;
}
@@ -741,17 +741,17 @@ int Sheet::maxRow() const
return d->maxRow;
}
-const QPen& Sheet::emptyPen() const
+const TQPen& Sheet::emptyPen() const
{
return d->emptyPen;
}
-const QBrush& Sheet::emptyBrush() const
+const TQBrush& Sheet::emptyBrush() const
{
return d->emptyBrush;
}
-const QColor& Sheet::emptyColor() const
+const TQColor& Sheet::emptyColor() const
{
return d->emptyColor;
}
@@ -765,7 +765,7 @@ int Sheet::numSelected() const
{
int num = 0;
- QPtrListIterator<EmbeddedObject> it( d->workbook->doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( d->workbook->doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
{
if( it.current()->sheet() == this && it.current()->isSelected() )
@@ -826,7 +826,7 @@ int Sheet::rightColumn( double _xpos, const Canvas *_canvas ) const
return col - 1;
}
-QRect Sheet::visibleRect( Canvas const * const _canvas ) const
+TQRect Sheet::visibleRect( Canvas const * const _canvas ) const
{
int top = 0;
int left = 0;
@@ -889,7 +889,7 @@ QRect Sheet::visibleRect( Canvas const * const _canvas ) const
}
x += width;
- return QRect( left, top, right - left + 1, bottom - top + 1 );
+ return TQRect( left, top, right - left + 1, bottom - top + 1 );
}
int Sheet::topRow( double _ypos, double & _top,
@@ -1113,11 +1113,11 @@ Cell* Sheet::nonDefaultCell( int _column, int _row,
return cell;
}
-void Sheet::setText( int _row, int _column, const QString& _text, bool asString )
+void Sheet::setText( int _row, int _column, const TQString& _text, bool asString )
{
ProtectedCheck prot;
prot.setSheet (this);
- prot.add (QPoint (_column, _row));
+ prot.add (TQPoint (_column, _row));
if (prot.check())
NO_MODIFICATION_POSSIBLE;
@@ -1125,7 +1125,7 @@ void Sheet::setText( int _row, int _column, const QString& _text, bool asString
dm->setSheet (this);
dm->setValue (_text);
dm->setParsing (!asString);
- dm->add (QPoint (_column, _row));
+ dm->add (TQPoint (_column, _row));
dm->execute ();
/* PRE-MANIPULATOR CODE looked like this:
@@ -1145,7 +1145,7 @@ void Sheet::setText( int _row, int _column, const QString& _text, bool asString
emit sig_updateView( this, Region(_column,_row,_column,_row) );
}
-void Sheet::setArrayFormula (Selection *selectionInfo, const QString &_text)
+void Sheet::setArrayFormula (Selection *selectionInfo, const TQString &_text)
{
// check protection
ProtectedCheck prot;
@@ -1168,7 +1168,7 @@ void Sheet::setArrayFormula (Selection *selectionInfo, const QString &_text)
{
UndoChangeAreaTextCell *undo =
new UndoChangeAreaTextCell (doc(), this,
- QRect (_column, _row, cols, rows));
+ TQRect (_column, _row, cols, rows));
doc()->addCommand( undo );
}
@@ -1176,14 +1176,14 @@ void Sheet::setArrayFormula (Selection *selectionInfo, const QString &_text)
// TODO: also fill in information about cells being a part of a range
Cell *cell = nonDefaultCell (_column, _row);
cell->setCellText (_text, false);
- QString cellRef = cell->name();
+ TQString cellRef = cell->name();
for (int row = 0; row < rows; ++row)
for (int col = 0; col < cols; col++)
if (col || row)
{
Cell *cell = nonDefaultCell (_column + col, _row + row);
- cell->setCellText ("=INDEX(" + cellRef + ";" + QString::number (row+1)
- + ";" + QString::number (col+1) + ")", false);
+ cell->setCellText ("=INDEX(" + cellRef + ";" + TQString::number (row+1)
+ + ";" + TQString::number (col+1) + ")", false);
}
*/
}
@@ -1226,7 +1226,7 @@ void Sheet::recalc( bool force )
{
ElapsedTime et( "Recalculating " + d->name, ElapsedTime::PrintOnlyTime );
// emitBeginOperation(true);
- // setRegionPaintDirty(QRect(QPoint(1,1), QPoint(KS_colMax, KS_rowMax)));
+ // setRegionPaintDirty(TQRect(TQPoint(1,1), TQPoint(KS_colMax, KS_rowMax)));
setCalcDirtyFlag();
//If automatic calculation is disabled, don't recalculate unless the force flag has been
@@ -1388,16 +1388,16 @@ void Sheet::valueChanged (Cell *cell)
class UndoAction* Sheet::CellWorkerTypeA::createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region )
{
- QString title = getUndoTitle();
+ TQString title = getUndoTitle();
return new UndoCellFormat( doc, sheet, region, title );
}
/*
-Sheet::SelectionType Sheet::workOnCells( const QPoint& _marker, CellWorker& worker )
+Sheet::SelectionType Sheet::workOnCells( const TQPoint& _marker, CellWorker& worker )
{
// see what is selected; if nothing, take marker position
bool selected = ( m_rctSelection.left() != 0 );
- QRect r( m_rctSelection );
+ TQRect r( m_rctSelection );
if ( !selected )
r.setCoords( _marker.x(), _marker.y(), _marker.x(), _marker.y() );
@@ -1563,7 +1563,7 @@ Sheet::SelectionType Sheet::workOnCells( Selection* selectionInfo, CellWorker &
for (Region::ConstIterator it = selectionInfo->constBegin(); it != endOfList; ++it)
{
// see what is selected; if nothing, take marker position
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int top = range.top();
int left = range.left();
@@ -1751,7 +1751,7 @@ void Sheet::setSelectionSize(Selection* selectionInfo,
// TODO Stefan: Increase/Decrease font size still used?
int size;
Cell* c;
- QPoint marker(selectionInfo->marker());
+ TQPoint marker(selectionInfo->marker());
c = cellAt(marker);
size = c->format()->textFontSize(marker.x(), marker.y());
@@ -1817,9 +1817,9 @@ struct SetSelectionFirstLetterUpperWorker : public Sheet::CellWorker
{
cell->setDisplayDirtyFlag();
- QString tmp = cell->text();
+ TQString tmp = cell->text();
int len = tmp.length();
- cell->setCellText( (tmp.at(0).upper()+tmp.right(len-1)) );
+ cell->setCellText( (tmp.tqat(0).upper()+tmp.right(len-1)) );
cell->clearDisplayDirtyFlag();
}
};
@@ -1836,7 +1836,7 @@ struct SetSelectionVerticalTextWorker : public Sheet::CellWorker {
SetSelectionVerticalTextWorker( bool b ) : Sheet::CellWorker( ), _b( b ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Vertical Text");
+ TQString title=i18n("Vertical Text");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* cell ) {
@@ -1860,11 +1860,11 @@ void Sheet::setSelectionVerticalText( Selection* selectionInfo,
struct SetSelectionCommentWorker : public Sheet::CellWorker {
- QString _comment;
- SetSelectionCommentWorker( QString comment ) : Sheet::CellWorker( ), _comment( comment ) { }
+ TQString _comment;
+ SetSelectionCommentWorker( TQString comment ) : Sheet::CellWorker( ), _comment( comment ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Add Comment");
+ TQString title=i18n("Add Comment");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* cell ) {
@@ -1878,7 +1878,7 @@ struct SetSelectionCommentWorker : public Sheet::CellWorker {
};
void Sheet::setSelectionComment( Selection* selectionInfo,
- const QString &_comment)
+ const TQString &_comment)
{
SetSelectionCommentWorker w( _comment );
workOnCells( selectionInfo, w );
@@ -1900,7 +1900,7 @@ struct SetSelectionRemoveCommentWorker : public Sheet::CellWorker {
SetSelectionRemoveCommentWorker( ) : Sheet::CellWorker( false ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Remove Comment");
+ TQString title=i18n("Remove Comment");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* cell ) {
@@ -1924,7 +1924,7 @@ void Sheet::setSelectionRemoveComment( Selection* selectionInfo )
void Sheet::setSelectionTextColor( Selection* selectionInfo,
- const QColor &tb_Color )
+ const TQColor &tb_Color )
{
FontColorManipulator* manipulator = new FontColorManipulator();
manipulator->setSheet(this);
@@ -1935,7 +1935,7 @@ void Sheet::setSelectionTextColor( Selection* selectionInfo,
}
void Sheet::setSelectionbgColor( Selection* selectionInfo,
- const QColor &bg_Color )
+ const TQColor &bg_Color )
{
BackgroundColorManipulator* manipulator = new BackgroundColorManipulator();
manipulator->setSheet(this);
@@ -1947,11 +1947,11 @@ void Sheet::setSelectionbgColor( Selection* selectionInfo,
struct SetSelectionBorderColorWorker : public Sheet::CellWorker {
- const QColor& bd_Color;
- SetSelectionBorderColorWorker( const QColor& _bd_Color ) : Sheet::CellWorker( false ), bd_Color( _bd_Color ) { }
+ const TQColor& bd_Color;
+ SetSelectionBorderColorWorker( const TQColor& _bd_Color ) : Sheet::CellWorker( false ), bd_Color( _bd_Color ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Change Border Color");
+ TQString title=i18n("Change Border Color");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* cell ) {
@@ -1961,35 +1961,35 @@ struct SetSelectionBorderColorWorker : public Sheet::CellWorker {
cell->setDisplayDirtyFlag();
int it_Row = cell->row();
int it_Col = cell->column();
- if ( cell->format()->topBorderStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->topBorderStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setTopBorderColor( bd_Color );
- if ( cell->format()->leftBorderStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->leftBorderStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setLeftBorderColor( bd_Color );
- if ( cell->format()->fallDiagonalStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->fallDiagonalStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setFallDiagonalColor( bd_Color );
- if ( cell->format()->goUpDiagonalStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->goUpDiagonalStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setGoUpDiagonalColor( bd_Color );
- if ( cell->format()->bottomBorderStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->bottomBorderStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setBottomBorderColor( bd_Color );
- if ( cell->format()->rightBorderStyle( it_Row, it_Col )!=Qt::NoPen )
+ if ( cell->format()->rightBorderStyle( it_Row, it_Col )!=TQt::NoPen )
cell->format()->setRightBorderColor( bd_Color );
cell->clearDisplayDirtyFlag();
}
};
void Sheet::setSelectionBorderColor( Selection* selectionInfo,
- const QColor &bd_Color )
+ const TQColor &bd_Color )
{
SetSelectionBorderColorWorker w( bd_Color );
workOnCells( selectionInfo, w );
}
-void Sheet::setSeries( const QPoint &_marker, double start, double end, double step, Series mode, Series type)
+void Sheet::setSeries( const TQPoint &_marker, double start, double end, double step, Series mode, Series type)
{
doc()->emitBeginOperation();
- QString cellText;
+ TQString cellText;
int x,y; /* just some loop counters */
@@ -2018,7 +2018,7 @@ void Sheet::setSeries( const QPoint &_marker, double start, double end, double s
/* markers for the top-left corner of the undo region. It'll probably
* be the top left corner of where the series is, but if something in front
* is obscuring the cell, then it needs to be part of the undo region */
- QRect undoRegion;
+ TQRect undoRegion;
undoRegion.setLeft(_marker.x());
undoRegion.setTop(_marker.y());
@@ -2044,7 +2044,7 @@ void Sheet::setSeries( const QPoint &_marker, double start, double end, double s
{
/* case 2. */
cell = cell->obscuringCells().first();
- undoRegion.setLeft(QMIN(undoRegion.left(), cell->column()));
+ undoRegion.setLeft(TQMIN(undoRegion.left(), cell->column()));
}
/* case 1. Add the extra space to numberOfCells and then skip
over the region. Note that because of the above if block 'cell'
@@ -2070,7 +2070,7 @@ void Sheet::setSeries( const QPoint &_marker, double start, double end, double s
if ( cell->isPartOfMerged() )
{
cell = cell->obscuringCells().first();
- undoRegion.setTop(QMIN(undoRegion.top(), cell->row()));
+ undoRegion.setTop(TQMIN(undoRegion.top(), cell->row()));
}
numberOfCells += cell->extraXCells();
x += cell->extraXCells();
@@ -2283,7 +2283,7 @@ struct SetSelectionPercentWorker : public Sheet::CellWorkerTypeA
bool b;
SetSelectionPercentWorker( bool _b ) : b( _b ) { }
- QString getUndoTitle() { return i18n("Format Percent"); }
+ TQString getUndoTitle() { return i18n("Format Percent"); }
bool testCondition( RowFormat* ) {
//TODO: no idea what to put here, now that factor's gone :(
return ( true );
@@ -2317,21 +2317,21 @@ void Sheet::setSelectionPercent( Selection* selectionInfo, bool b )
workOnCells( selectionInfo, w );
}
-void Sheet::slotAreaModified (const QString &name)
+void Sheet::slotAreaModified (const TQString &name)
{
d->dependencies->areaModified (name);
}
-void Sheet::refreshRemoveAreaName(const QString & _areaName)
+void Sheet::refreshRemoveAreaName(const TQString & _areaName)
{
Cell * c = d->cells.firstCell();
- QString tmp = "'" + _areaName + "'";
+ TQString tmp = "'" + _areaName + "'";
for( ;c ; c = c->nextCell() )
{
if ( c->isFormula() )
{
- if (c->text().find(tmp) != -1)
+ if (c->text().tqfind(tmp) != -1)
{
if ( !c->makeFormula() )
kdError(36001) << "ERROR: Syntax ERROR" << endl;
@@ -2340,15 +2340,15 @@ void Sheet::refreshRemoveAreaName(const QString & _areaName)
}
}
-void Sheet::refreshChangeAreaName(const QString & _areaName)
+void Sheet::refreshChangeAreaName(const TQString & _areaName)
{
Cell * c = d->cells.firstCell();
- QString tmp = "'" + _areaName + "'";
+ TQString tmp = "'" + _areaName + "'";
for( ;c ; c = c->nextCell() )
{
if ( c->isFormula() )
{
- if (c->text().find(tmp) != -1)
+ if (c->text().tqfind(tmp) != -1)
{
if ( !c->makeFormula() )
kdError(36001) << "ERROR: Syntax ERROR" << endl;
@@ -2362,24 +2362,24 @@ void Sheet::refreshChangeAreaName(const QString & _areaName)
}
}
-void Sheet::changeCellTabName( QString const & old_name, QString const & new_name )
+void Sheet::changeCellTabName( TQString const & old_name, TQString const & new_name )
{
Cell* c = d->cells.firstCell();
for( ;c; c = c->nextCell() )
{
if( c->isFormula() )
{
- if(c->text().find(old_name)!=-1)
+ if(c->text().tqfind(old_name)!=-1)
{
- int nb = c->text().contains(old_name+"!");
- QString tmp=old_name+"!";
+ int nb = c->text().tqcontains(old_name+"!");
+ TQString tmp=old_name+"!";
int len = tmp.length();
tmp=c->text();
for( int i=0; i<nb; i++ )
{
- int pos = tmp.find( old_name+"!" );
- tmp.replace( pos, len, new_name+"!" );
+ int pos = tmp.tqfind( old_name+"!" );
+ tmp.tqreplace( pos, len, new_name+"!" );
}
c->setCellText(tmp);
}
@@ -2387,7 +2387,7 @@ void Sheet::changeCellTabName( QString const & old_name, QString const & new_nam
}
}
-bool Sheet::shiftRow( const QRect &rect,bool makeUndo )
+bool Sheet::shiftRow( const TQRect &rect,bool makeUndo )
{
UndoInsertCellRow * undo = 0;
if ( !doc()->undoLocked() &&makeUndo)
@@ -2402,21 +2402,21 @@ bool Sheet::shiftRow( const QRect &rect,bool makeUndo )
{
for( int j=0; j<=(rect.right()-rect.left()); j++ )
{
- result = d->cells.shiftRow( QPoint(rect.left(),i) );
+ result = d->cells.shiftRow( TQPoint(rect.left(),i) );
if( !result )
res=false;
}
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
{
for(int i = rect.top(); i <= rect.bottom(); i++ )
- it.current()->changeNameCellRef( QPoint( rect.left(), i ), false,
+ it.current()->changeNameCellRef( TQPoint( rect.left(), i ), false,
Sheet::ColumnInsert, name(),
( rect.right() - rect.left() + 1),
undo);
}
- refreshChart(QPoint(rect.left(),rect.top()), false, Sheet::ColumnInsert);
+ refreshChart(TQPoint(rect.left(),rect.top()), false, Sheet::ColumnInsert);
refreshMergedCell();
recalc();
emit sig_updateView( this );
@@ -2424,7 +2424,7 @@ bool Sheet::shiftRow( const QRect &rect,bool makeUndo )
return res;
}
-bool Sheet::shiftColumn( const QRect& rect,bool makeUndo )
+bool Sheet::shiftColumn( const TQRect& rect,bool makeUndo )
{
UndoInsertCellCol * undo = 0;
if ( !doc()->undoLocked() &&makeUndo)
@@ -2439,22 +2439,22 @@ bool Sheet::shiftColumn( const QRect& rect,bool makeUndo )
{
for( int j=0; j<=(rect.bottom()-rect.top()); j++ )
{
- result = d->cells.shiftColumn( QPoint(i,rect.top()) );
+ result = d->cells.shiftColumn( TQPoint(i,rect.top()) );
if(!result)
res=false;
}
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
{
for(int i=rect.left();i<=rect.right();i++)
- it.current()->changeNameCellRef( QPoint( i, rect.top() ), false,
+ it.current()->changeNameCellRef( TQPoint( i, rect.top() ), false,
Sheet::RowInsert, name(),
( rect.bottom() - rect.top() + 1 ),
undo );
}
- refreshChart(/*marker*/QPoint(rect.left(),rect.top()), false, Sheet::RowInsert);
+ refreshChart(/*marker*/TQPoint(rect.left(),rect.top()), false, Sheet::RowInsert);
refreshMergedCell();
recalc();
emit sig_updateView( this );
@@ -2462,7 +2462,7 @@ bool Sheet::shiftColumn( const QRect& rect,bool makeUndo )
return res;
}
-void Sheet::unshiftColumn( const QRect & rect,bool makeUndo )
+void Sheet::unshiftColumn( const TQRect & rect,bool makeUndo )
{
UndoRemoveCellCol * undo = 0;
if ( !doc()->undoLocked() && makeUndo )
@@ -2477,23 +2477,23 @@ void Sheet::unshiftColumn( const QRect & rect,bool makeUndo )
for(int i =rect.left();i<=rect.right();i++)
for(int j=0;j<=(rect.bottom()-rect.top());j++)
- d->cells.unshiftColumn( QPoint(i,rect.top()) );
+ d->cells.unshiftColumn( TQPoint(i,rect.top()) );
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
for(int i=rect.left();i<=rect.right();i++)
- it.current()->changeNameCellRef( QPoint( i, rect.top() ), false,
+ it.current()->changeNameCellRef( TQPoint( i, rect.top() ), false,
Sheet::RowRemove, name(),
( rect.bottom() - rect.top() + 1 ),
undo );
- refreshChart( QPoint(rect.left(),rect.top()), false, Sheet::RowRemove );
+ refreshChart( TQPoint(rect.left(),rect.top()), false, Sheet::RowRemove );
refreshMergedCell();
recalc();
emit sig_updateView( this );
}
-void Sheet::unshiftRow( const QRect & rect,bool makeUndo )
+void Sheet::unshiftRow( const TQRect & rect,bool makeUndo )
{
UndoRemoveCellRow * undo = 0;
if ( !doc()->undoLocked() && makeUndo )
@@ -2507,17 +2507,17 @@ void Sheet::unshiftRow( const QRect & rect,bool makeUndo )
for(int i =rect.top();i<=rect.bottom();i++)
for(int j=0;j<=(rect.right()-rect.left());j++)
- d->cells.unshiftRow( QPoint(rect.left(),i) );
+ d->cells.unshiftRow( TQPoint(rect.left(),i) );
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
for(int i=rect.top();i<=rect.bottom();i++)
- it.current()->changeNameCellRef( QPoint( rect.left(), i ), false,
+ it.current()->changeNameCellRef( TQPoint( rect.left(), i ), false,
Sheet::ColumnRemove, name(),
( rect.right() - rect.left() + 1 ),
undo);
- refreshChart(QPoint(rect.left(),rect.top()), false, Sheet::ColumnRemove );
+ refreshChart(TQPoint(rect.left(),rect.top()), false, Sheet::ColumnRemove );
refreshMergedCell();
recalc();
emit sig_updateView( this );
@@ -2548,16 +2548,16 @@ bool Sheet::insertColumn( int col, int nbCol, bool makeUndo )
d->sizeMaxX += columnFormat( col+i )->dblWidth();
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
- it.current()->changeNameCellRef( QPoint( col, 1 ), true,
+ it.current()->changeNameCellRef( TQPoint( col, 1 ), true,
Sheet::ColumnInsert, name(),
nbCol + 1, undo );
//update print settings
d->print->insertColumn( col, nbCol );
- refreshChart( QPoint( col, 1 ), true, Sheet::ColumnInsert );
+ refreshChart( TQPoint( col, 1 ), true, Sheet::ColumnInsert );
refreshMergedCell();
recalc();
emit sig_updateHBorder( this );
@@ -2591,16 +2591,16 @@ bool Sheet::insertRow( int row, int nbRow, bool makeUndo )
d->sizeMaxY += rowFormat( row )->dblHeight();
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
- it.current()->changeNameCellRef( QPoint( 1, row ), true,
+ it.current()->changeNameCellRef( TQPoint( 1, row ), true,
Sheet::RowInsert, name(),
nbRow + 1, undo );
//update print settings
d->print->insertRow( row, nbRow );
- refreshChart( QPoint( 1, row ), true, Sheet::RowInsert );
+ refreshChart( TQPoint( 1, row ), true, Sheet::RowInsert );
refreshMergedCell();
recalc();
emit sig_updateVBorder( this );
@@ -2630,16 +2630,16 @@ void Sheet::removeColumn( int col, int nbCol, bool makeUndo )
d->sizeMaxX += columnFormat( KS_colMax )->dblWidth();
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
- it.current()->changeNameCellRef( QPoint( col, 1 ), true,
+ it.current()->changeNameCellRef( TQPoint( col, 1 ), true,
Sheet::ColumnRemove, name(),
nbCol + 1, undo );
//update print settings
d->print->removeColumn( col, nbCol );
- refreshChart( QPoint( col, 1 ), true, Sheet::ColumnRemove );
+ refreshChart( TQPoint( col, 1 ), true, Sheet::ColumnRemove );
refreshMergedCell();
recalc();
emit sig_updateHBorder( this );
@@ -2667,16 +2667,16 @@ void Sheet::removeRow( int row, int nbRow, bool makeUndo )
d->sizeMaxY += rowFormat( KS_rowMax )->dblHeight();
}
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for( ; it.current(); ++it )
- it.current()->changeNameCellRef( QPoint( 1, row ), true,
+ it.current()->changeNameCellRef( TQPoint( 1, row ), true,
Sheet::RowRemove, name(),
nbRow + 1, undo );
//update print settings
d->print->removeRow( row, nbRow );
- refreshChart( QPoint( 1, row ), true, Sheet::RowRemove );
+ refreshChart( TQPoint( 1, row ), true, Sheet::RowRemove );
refreshMergedCell();
recalc();
emit sig_updateVBorder( this );
@@ -2735,7 +2735,7 @@ void Sheet::showColumn(const Region& region)
}
-void Sheet::refreshChart(const QPoint & pos, bool fullRowOrColumn, ChangeRef ref)
+void Sheet::refreshChart(const TQPoint & pos, bool fullRowOrColumn, ChangeRef ref)
{
Cell * c = d->cells.firstCell();
for( ;c; c = c->nextCell() )
@@ -2793,8 +2793,8 @@ void Sheet::refreshMergedCell()
}
-void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
- ChangeRef ref, QString tabname, int nbCol,
+void Sheet::changeNameCellRef( const TQPoint & pos, bool fullRowOrColumn,
+ ChangeRef ref, TQString tabname, int nbCol,
UndoInsertRemoveAction * undo )
{
bool correctDefaultSheetName = (tabname == name()); // for cells without sheet ref (eg "A1")
@@ -2803,14 +2803,14 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
{
if( c->isFormula() )
{
- QString origText = c->text();
+ TQString origText = c->text();
unsigned int i = 0;
bool error = false;
- QString newText;
+ TQString newText;
bool correctSheetName = correctDefaultSheetName;
//bool previousCorrectSheetName = false;
- QChar origCh;
+ TQChar origCh;
for ( ; i < origText.length(); ++i )
{
origCh = origText[i];
@@ -2824,7 +2824,7 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
// (or even ':', like in a range - note that correctSheet is kept in this case)
{
// Collect everything that forms a name (cell name or sheet name)
- QString str;
+ TQString str;
bool sheetNameFound = false; //Sheet names need spaces
for( ; ( i < origText.length() ) && // until the end
( ( origText[i].isLetter() || origText[i].isDigit() || origText[i] == '$' ) || // all text and numbers are welcome
@@ -2850,7 +2850,7 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
{
int col = point.pos().x();
int row = point.pos().y();
- QString newPoint;
+ TQString newPoint;
// Update column
if ( point.columnFixed() )
@@ -2884,17 +2884,17 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
&& row >= pos.y() // Row after the new one : +1
&& ( fullRowOrColumn || col == pos.x() ) ) // All columns or just one
{
- newPoint += QString::number( row + nbCol );
+ newPoint += TQString::number( row + nbCol );
}
else if( ref == RowRemove
&& correctSheetName
&& row > pos.y() // Row after the deleted one : -1
&& ( fullRowOrColumn || col == pos.x() ) ) // All columns or just one
{
- newPoint += QString::number( row - nbCol );
+ newPoint += TQString::number( row - nbCol );
}
else
- newPoint += QString::number( row );
+ newPoint += TQString::number( row );
if( correctSheetName &&
( ( ref == ColumnRemove
@@ -2935,7 +2935,7 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
if ( error && undo != 0 ) //Save the original formula, as we cannot calculate the undo of broken formulas
{
- QString formulaText = c->text();
+ TQString formulaText = c->text();
int origCol = c->column();
int origRow = c->row();
@@ -2958,14 +2958,14 @@ void Sheet::changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
}
#if 0
-void Sheet::replace( const QString &_find, const QString &_replace, long options,
+void Sheet::tqreplace( const TQString &_tqfind, const TQString &_tqreplace, long options,
Canvas *canvas )
{
Selection* selectionInfo = canvas->view()->selectionInfo();
// Identify the region of interest.
- QRect region( selectionInfo->selection() );
- QPoint marker( selectionInfo->marker() );
+ TQRect region( selectionInfo->selection() );
+ TQPoint marker( selectionInfo->marker() );
if (options & KReplaceDialog::SelectedText)
{
@@ -2987,13 +2987,13 @@ void Sheet::replace( const QString &_find, const QString &_replace, long options
// Create the class that handles all the actual replace stuff, and connect it to its
// local slots.
- KReplace dialog( _find, _replace, options );
- QObject::connect(
- &dialog, SIGNAL( highlight( const QString &, int, int, const QRect & ) ),
- canvas, SLOT( highlight( const QString &, int, int, const QRect & ) ) );
- QObject::connect(
- &dialog, SIGNAL( replace( const QString &, int, int,int, const QRect & ) ),
- canvas, SLOT( replace( const QString &, int, int,int, const QRect & ) ) );
+ KReplace dialog( _tqfind, _tqreplace, options );
+ TQObject::connect(
+ &dialog, TQT_SIGNAL( highlight( const TQString &, int, int, const TQRect & ) ),
+ canvas, TQT_SLOT( highlight( const TQString &, int, int, const TQRect & ) ) );
+ TQObject::connect(
+ &dialog, TQT_SIGNAL( tqreplace( const TQString &, int, int,int, const TQRect & ) ),
+ canvas, TQT_SLOT( tqreplace( const TQString &, int, int,int, const TQRect & ) ) );
// Now do the replacing...
if ( !doc()->undoLocked() )
@@ -3002,7 +3002,7 @@ void Sheet::replace( const QString &_find, const QString &_replace, long options
doc()->addCommand( undo );
}
- QRect cellRegion( 0, 0, 0, 0 );
+ TQRect cellRegion( 0, 0, 0, 0 );
bool bck = options & KFindDialog::FindBackwards;
int colStart = !bck ? region.left() : region.right();
@@ -3021,10 +3021,10 @@ void Sheet::replace( const QString &_find, const QString &_replace, long options
cell = cellAt( col, row );
if ( !cell->isDefault() && !cell->isObscured() && !cell->isFormula() )
{
- QString text = cell->text();
+ TQString text = cell->text();
cellRegion.setTop( row );
cellRegion.setLeft( col );
- if (!dialog.replace( text, cellRegion ))
+ if (!dialog.tqreplace( text, cellRegion ))
return;
}
}
@@ -3032,65 +3032,65 @@ void Sheet::replace( const QString &_find, const QString &_replace, long options
}
#endif
-void Sheet::borderBottom( Selection* selectionInfo, const QColor &_color )
+void Sheet::borderBottom( Selection* selectionInfo, const TQColor &_color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setBottomBorderPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setBottomBorderPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
-void Sheet::borderRight( Selection* selectionInfo, const QColor &_color )
+void Sheet::borderRight( Selection* selectionInfo, const TQColor &_color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setRightBorderPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setRightBorderPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
-void Sheet::borderLeft( Selection* selectionInfo, const QColor &_color )
+void Sheet::borderLeft( Selection* selectionInfo, const TQColor &_color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setLeftBorderPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setLeftBorderPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
-void Sheet::borderTop( Selection* selectionInfo, const QColor &_color )
+void Sheet::borderTop( Selection* selectionInfo, const TQColor &_color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setTopBorderPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setTopBorderPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
-void Sheet::borderOutline( Selection* selectionInfo, const QColor &_color )
+void Sheet::borderOutline( Selection* selectionInfo, const TQColor &_color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setTopBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setBottomBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setLeftBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setRightBorderPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setTopBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setBottomBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setLeftBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setRightBorderPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
void Sheet::borderAll( Selection * selectionInfo,
- const QColor & _color )
+ const TQColor & _color )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setTopBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setBottomBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setLeftBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setRightBorderPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setHorizontalPen(QPen(_color, 1, Qt::SolidLine));
- manipulator->setVerticalPen(QPen(_color, 1, Qt::SolidLine));
+ manipulator->setTopBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setBottomBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setLeftBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setRightBorderPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setHorizontalPen(TQPen(_color, 1, TQt::SolidLine));
+ manipulator->setVerticalPen(TQPen(_color, 1, TQt::SolidLine));
manipulator->add(*selectionInfo);
manipulator->execute();
}
@@ -3099,18 +3099,18 @@ void Sheet::borderRemove( Selection* selectionInfo )
{
BorderManipulator* manipulator = new BorderManipulator();
manipulator->setSheet(this);
- manipulator->setTopBorderPen(QPen(Qt::NoPen));
- manipulator->setBottomBorderPen(QPen(Qt::NoPen));
- manipulator->setLeftBorderPen(QPen(Qt::NoPen));
- manipulator->setRightBorderPen(QPen(Qt::NoPen));
- manipulator->setHorizontalPen(QPen(Qt::NoPen));
- manipulator->setVerticalPen(QPen(Qt::NoPen));
+ manipulator->setTopBorderPen(TQPen(TQt::NoPen));
+ manipulator->setBottomBorderPen(TQPen(TQt::NoPen));
+ manipulator->setLeftBorderPen(TQPen(TQt::NoPen));
+ manipulator->setRightBorderPen(TQPen(TQt::NoPen));
+ manipulator->setHorizontalPen(TQPen(TQt::NoPen));
+ manipulator->setVerticalPen(TQPen(TQt::NoPen));
manipulator->add(*selectionInfo);
manipulator->execute();
}
-void Sheet::sortByRow( const QRect &area, int ref_row, SortingOrder mode )
+void Sheet::sortByRow( const TQRect &area, int ref_row, SortingOrder mode )
{
Point point;
point.setSheet(this);
@@ -3122,7 +3122,7 @@ void Sheet::sortByRow( const QRect &area, int ref_row, SortingOrder mode )
sortByRow( area, ref_row, 0, 0, mode, mode, mode, 0, false, false, point,true );
}
-void Sheet::sortByColumn( const QRect &area, int ref_column, SortingOrder mode )
+void Sheet::sortByColumn( const TQRect &area, int ref_column, SortingOrder mode )
{
Point point;
point.setSheet(this);
@@ -3155,13 +3155,13 @@ void Sheet::checkCellContent(Cell * cell1, Cell * cell2, int & ret)
ret = 0;
}
-void Sheet::sortByRow( const QRect &area, int key1, int key2, int key3,
+void Sheet::sortByRow( const TQRect &area, int key1, int key2, int key3,
SortingOrder order1, SortingOrder order2,
SortingOrder order3,
- QStringList const * firstKey, bool copyFormat,
+ TQStringList const * firstKey, bool copyFormat,
bool headerRow, Point const & outputPoint, bool respectCase )
{
- QRect r( area );
+ TQRect r( area );
Map::respectCase = respectCase;
Q_ASSERT( order1 == Increase || order1 == Decrease );
@@ -3203,7 +3203,7 @@ void Sheet::sortByRow( const QRect &area, int key1, int key2, int key3,
}
}
- QRect target( outputPoint.pos().x(), outputPoint.pos().y(), r.width(), r.height() );
+ TQRect target( outputPoint.pos().x(), outputPoint.pos().y(), r.width(), r.height() );
doc()->emitBeginOperation();
@@ -3276,8 +3276,8 @@ void Sheet::sortByRow( const QRect &area, int key1, int key2, int key3,
if ( firstKey )
{
- int i1 = firstKey->findIndex( cell2->text() );
- int i2 = firstKey->findIndex( bestCell->text() );
+ int i1 = firstKey->tqfindIndex( cell2->text() );
+ int i2 = firstKey->tqfindIndex( bestCell->text() );
if ( i1 != -1 && i2 != -1 )
{
@@ -3496,14 +3496,14 @@ void Sheet::sortByRow( const QRect &area, int key1, int key2, int key3,
emit sig_updateView( this );
}
-void Sheet::sortByColumn( const QRect &area, int key1, int key2, int key3,
+void Sheet::sortByColumn( const TQRect &area, int key1, int key2, int key3,
SortingOrder order1, SortingOrder order2,
SortingOrder order3,
- QStringList const * firstKey, bool copyFormat,
+ TQStringList const * firstKey, bool copyFormat,
bool headerRow,
Point const & outputPoint, bool respectCase )
{
- QRect r( area );
+ TQRect r( area );
Map::respectCase = respectCase;
Q_ASSERT( order1 == Increase || order1 == Decrease );
@@ -3545,7 +3545,7 @@ void Sheet::sortByColumn( const QRect &area, int key1, int key2, int key3,
return;
}
}
- QRect target( outputPoint.pos().x(), outputPoint.pos().y(), r.width(), r.height() );
+ TQRect target( outputPoint.pos().x(), outputPoint.pos().y(), r.width(), r.height() );
if ( !doc()->undoLocked() )
{
@@ -3632,8 +3632,8 @@ void Sheet::sortByColumn( const QRect &area, int key1, int key2, int key3,
if ( firstKey )
{
- int i1 = firstKey->findIndex( cell2->text() );
- int i2 = firstKey->findIndex( bestCell->text() );
+ int i1 = firstKey->tqfindIndex( cell2->text() );
+ int i2 = firstKey->tqfindIndex( bestCell->text() );
if ( i1 != -1 && i2 != -1 )
{
@@ -3940,7 +3940,7 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
}
// Dummy cell used for swapping cells.
- // In fact we copy only content and no layout
+ // In fact we copy only content and no tqlayout
// information. Imagine sorting in a sheet. Swapping
// the format while sorting is not what you would expect
// as a user.
@@ -3957,7 +3957,7 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
else
if ( ref1->isFormula() && ref2->isFormula() )
{
- QString d = ref1->encodeFormula();
+ TQString d = ref1->encodeFormula();
ref1->setCellText( ref1->decodeFormula( ref2->encodeFormula( ) ) );
ref1->setCalcDirtyFlag();
ref1->calc(false);
@@ -3968,7 +3968,7 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
else
if (ref1->isFormula() && !ref2->isFormula() )
{
- QString d = ref1->encodeFormula();
+ TQString d = ref1->encodeFormula();
ref1->setCellText(ref2->text());
ref2->setCellText(ref2->decodeFormula(d));
ref2->setCalcDirtyFlag();
@@ -3977,7 +3977,7 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
else
if (!ref1->isFormula() && ref2->isFormula() )
{
- QString d = ref2->encodeFormula();
+ TQString d = ref2->encodeFormula();
ref2->setCellText(ref1->text());
ref1->setCellText(ref1->decodeFormula(d));
ref1->setCalcDirtyFlag();
@@ -3994,43 +3994,43 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
ref1->format()->setAlignY( ref2->format()->alignY( ref2->column(), ref2->row() ) );
ref2->format()->setAlignY(ay);
- QFont textFont = ref1->format()->textFont( ref1->column(), ref1->row() );
+ TQFont textFont = ref1->format()->textFont( ref1->column(), ref1->row() );
ref1->format()->setTextFont( ref2->format()->textFont( ref2->column(), ref2->row() ) );
ref2->format()->setTextFont(textFont);
- QColor textColor = ref1->format()->textColor( ref1->column(), ref1->row() );
+ TQColor textColor = ref1->format()->textColor( ref1->column(), ref1->row() );
ref1->format()->setTextColor( ref2->format()->textColor( ref2->column(), ref2->row() ) );
ref2->format()->setTextColor(textColor);
- QColor bgColor = ref1->bgColor( ref1->column(), ref1->row() );
+ TQColor bgColor = ref1->bgColor( ref1->column(), ref1->row() );
ref1->format()->setBgColor( ref2->bgColor( ref2->column(), ref2->row() ) );
ref2->format()->setBgColor(bgColor);
- QPen lbp = ref1->leftBorderPen( ref1->column(), ref1->row() );
+ TQPen lbp = ref1->leftBorderPen( ref1->column(), ref1->row() );
ref1->setLeftBorderPen( ref2->leftBorderPen( ref2->column(), ref2->row() ) );
ref2->setLeftBorderPen(lbp);
- QPen tbp = ref1->topBorderPen( ref1->column(), ref1->row() );
+ TQPen tbp = ref1->topBorderPen( ref1->column(), ref1->row() );
ref1->setTopBorderPen( ref2->topBorderPen( ref2->column(), ref2->row() ) );
ref2->setTopBorderPen(tbp);
- QPen bbp = ref1->bottomBorderPen( ref1->column(), ref1->row() );
+ TQPen bbp = ref1->bottomBorderPen( ref1->column(), ref1->row() );
ref1->setBottomBorderPen( ref2->bottomBorderPen( ref2->column(), ref2->row() ) );
ref2->setBottomBorderPen(bbp);
- QPen rbp = ref1->rightBorderPen( ref1->column(), ref1->row() );
+ TQPen rbp = ref1->rightBorderPen( ref1->column(), ref1->row() );
ref1->setRightBorderPen( ref2->rightBorderPen( ref2->column(), ref2->row() ) );
ref2->setRightBorderPen(rbp);
- QPen fdp = ref1->format()->fallDiagonalPen( ref1->column(), ref1->row() );
+ TQPen fdp = ref1->format()->fallDiagonalPen( ref1->column(), ref1->row() );
ref1->format()->setFallDiagonalPen( ref2->format()->fallDiagonalPen( ref2->column(), ref2->row() ) );
ref2->format()->setFallDiagonalPen(fdp);
- QPen udp = ref1->format()->goUpDiagonalPen( ref1->column(), ref1->row() );
+ TQPen udp = ref1->format()->goUpDiagonalPen( ref1->column(), ref1->row() );
ref1->format()->setGoUpDiagonalPen( ref2->format()->goUpDiagonalPen( ref2->column(), ref2->row() ) );
ref2->format()->setGoUpDiagonalPen(udp);
- QBrush bgBrush = ref1->backGroundBrush( ref1->column(), ref1->row() );
+ TQBrush bgBrush = ref1->backGroundBrush( ref1->column(), ref1->row() );
ref1->format()->setBackGroundBrush( ref2->backGroundBrush( ref2->column(), ref2->row() ) );
ref2->format()->setBackGroundBrush(bgBrush);
@@ -4038,11 +4038,11 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
ref1->format()->setPrecision( ref2->format()->precision( ref2->column(), ref2->row() ) );
ref2->format()->setPrecision(pre);
- QString prefix = ref1->format()->prefix( ref1->column(), ref1->row() );
+ TQString prefix = ref1->format()->prefix( ref1->column(), ref1->row() );
ref1->format()->setPrefix( ref2->format()->prefix( ref2->column(), ref2->row() ) );
ref2->format()->setPrefix(prefix);
- QString postfix = ref1->format()->postfix( ref1->column(), ref1->row() );
+ TQString postfix = ref1->format()->postfix( ref1->column(), ref1->row() );
ref1->format()->setPostfix( ref2->format()->postfix( ref2->column(), ref2->row() ) );
ref2->format()->setPostfix(postfix);
@@ -4070,11 +4070,11 @@ void Sheet::swapCells( int x1, int y1, int x2, int y2, bool cpFormat )
ref1->format()->setIndent( ref2->format()->getIndent( ref2->column(), ref2->row() ) );
ref2->format()->setIndent( ind );
- QValueList<Conditional> conditionList = ref1->conditionList();
+ TQValueList<Conditional> conditionList = ref1->conditionList();
ref1->setConditionList(ref2->conditionList());
ref2->setConditionList(conditionList);
- QString com = ref1->format()->comment( ref1->column(), ref1->row() );
+ TQString com = ref1->format()->comment( ref1->column(), ref1->row() );
ref1->format()->setComment( ref2->format()->comment( ref2->column(), ref2->row() ) );
ref2->format()->setComment(com);
@@ -4103,7 +4103,7 @@ bool Sheet::areaIsEmpty(const Region& region, TestType _type)
Region::ConstIterator endOfList = region.constEnd();
for (Region::ConstIterator it = region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
// Complete rows selected ?
if ((*it)->isRow())
{
@@ -4220,7 +4220,7 @@ struct SetSelectionMultiRowWorker : public Sheet::CellWorker
class UndoAction* createUndoAction( Doc * doc, Sheet * sheet, const KSpread::Region& region )
{
- QString title = i18n("Multirow");
+ TQString title = i18n("Multirow");
return new UndoCellFormat( doc, sheet, region, title );
}
@@ -4246,7 +4246,7 @@ void Sheet::setSelectionMultiRow( Selection* selectionInfo,
workOnCells( selectionInfo, w );
}
-QString Sheet::guessColumnTitle(QRect& area, int col)
+TQString Sheet::guessColumnTitle(TQRect& area, int col)
{
//Verify range
Range rg;
@@ -4254,7 +4254,7 @@ QString Sheet::guessColumnTitle(QRect& area, int col)
rg.setSheet(this);
if ( (!rg.isValid()) || (col < area.left()) || (col > area.right()))
- return QString();
+ return TQString();
//The current guess logic is fairly simple - if the top row of the given area
//appears to contain headers (ie. there is text in each column) the text in the column at
@@ -4265,14 +4265,14 @@ QString Sheet::guessColumnTitle(QRect& area, int col)
Value cellValue=value(i,area.top());
if (!cellValue.isString())
- return QString();
+ return TQString();
}*/
Value cellValue=value(col,area.top());
return cellValue.asString();
}
-QString Sheet::guessRowTitle(QRect& area, int row)
+TQString Sheet::guessRowTitle(TQRect& area, int row)
{
//Verify range
Range rg;
@@ -4280,7 +4280,7 @@ QString Sheet::guessRowTitle(QRect& area, int row)
rg.setSheet(this);
if ( (!rg.isValid()) || (row < area.top()) || (row > area.bottom()) )
- return QString();
+ return TQString();
//The current guess logic is fairly simple - if the leftmost column of the given area
//appears to contain headers (ie. there is text in each row) the text in the row at
@@ -4290,7 +4290,7 @@ QString Sheet::guessRowTitle(QRect& area, int row)
Value cellValue=value(area.left(),i);
if (!cellValue.isString())
- return QString();
+ return TQString();
}*/
Value cellValue=value(area.left(),row);
@@ -4325,7 +4325,7 @@ struct SetSelectionPrecisionWorker : public Sheet::CellWorker {
SetSelectionPrecisionWorker( int delta ) : Sheet::CellWorker( ), _delta( delta ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Change Precision");
+ TQString title=i18n("Change Precision");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* cell ) {
@@ -4356,7 +4356,7 @@ struct SetSelectionStyleWorker : public Sheet::CellWorkerTypeA
{
}
- QString getUndoTitle()
+ TQString getUndoTitle()
{
return i18n("Apply Style");
}
@@ -4400,7 +4400,7 @@ struct SetSelectionMoneyFormatWorker : public Sheet::CellWorkerTypeA
bool b;
Doc *m_pDoc;
SetSelectionMoneyFormatWorker( bool _b,Doc* _doc ) : b( _b ), m_pDoc(_doc) { }
- QString getUndoTitle() { return i18n("Format Money"); }
+ TQString getUndoTitle() { return i18n("Format Money"); }
bool testCondition( RowFormat* rw ) {
return ( rw->hasProperty( Format::PFormatType )
|| rw->hasProperty( Format::PPrecision ) );
@@ -4448,7 +4448,7 @@ struct IncreaseIndentWorker : public Sheet::CellWorkerTypeA {
IncreaseIndentWorker( double _tmpIndent, double _valIndent )
: tmpIndent( _tmpIndent ), valIndent( _valIndent ) { }
- QString getUndoTitle() { return i18n("Increase Indent"); }
+ TQString getUndoTitle() { return i18n("Increase Indent"); }
bool testCondition( RowFormat* rw ) {
return ( rw->hasProperty( Format::PIndent ) );
}
@@ -4490,7 +4490,7 @@ struct IncreaseIndentWorker : public Sheet::CellWorkerTypeA {
void Sheet::increaseIndent(Selection* selectionInfo)
{
- QPoint marker(selectionInfo->marker());
+ TQPoint marker(selectionInfo->marker());
double valIndent = doc()->getIndentValue();
Cell *c = cellAt( marker );
double tmpIndent = c->format()->getIndent( marker.x(), marker.y() );
@@ -4503,15 +4503,15 @@ void Sheet::increaseIndent(Selection* selectionInfo)
struct DecreaseIndentWorker : public Sheet::CellWorkerTypeA {
double tmpIndent, valIndent;
DecreaseIndentWorker( double _tmpIndent, double _valIndent ) : tmpIndent( _tmpIndent ), valIndent( _valIndent ) { }
- QString getUndoTitle() { return i18n("Decrease Indent"); }
+ TQString getUndoTitle() { return i18n("Decrease Indent"); }
bool testCondition( RowFormat* rw ) {
return ( rw->hasProperty( Format::PIndent ) );
}
void doWork( RowFormat* rw ) {
- rw->setIndent( QMAX( 0.0, tmpIndent - valIndent ) );
+ rw->setIndent( TQMAX( 0.0, tmpIndent - valIndent ) );
}
void doWork( ColumnFormat* cl ) {
- cl->setIndent( QMAX( 0.0, tmpIndent - valIndent ) );
+ cl->setIndent( TQMAX( 0.0, tmpIndent - valIndent ) );
}
void prepareCell( Cell* c ) {
c->format()->clearProperty( Format::PIndent );
@@ -4523,10 +4523,10 @@ struct DecreaseIndentWorker : public Sheet::CellWorkerTypeA {
void doWork( Cell* cell, bool cellRegion, int x, int y ) {
if ( cellRegion ) {
cell->setDisplayDirtyFlag();
- cell->format()->setIndent( QMAX( 0.0, cell->format()->getIndent( x, y ) - valIndent ) );
+ cell->format()->setIndent( TQMAX( 0.0, cell->format()->getIndent( x, y ) - valIndent ) );
cell->clearDisplayDirtyFlag();
} else {
- cell->format()->setIndent( QMAX( 0.0, tmpIndent - valIndent ) );
+ cell->format()->setIndent( TQMAX( 0.0, tmpIndent - valIndent ) );
}
}
};
@@ -4535,7 +4535,7 @@ struct DecreaseIndentWorker : public Sheet::CellWorkerTypeA {
void Sheet::decreaseIndent( Selection* selectionInfo )
{
double valIndent = doc()->getIndentValue();
- QPoint marker(selectionInfo->marker());
+ TQPoint marker(selectionInfo->marker());
Cell* c = cellAt( marker );
double tmpIndent = c->format()->getIndent( marker.x(), marker.y() );
@@ -4665,7 +4665,7 @@ struct ClearConditionalSelectionWorker : public Sheet::CellWorker
}
void doWork( Cell* cell, bool, int, int )
{
- QValueList<Conditional> emptyList;
+ TQValueList<Conditional> emptyList;
cell->setConditionList(emptyList);
}
};
@@ -4678,7 +4678,7 @@ void Sheet::clearConditionalSelection( Selection* selectionInfo )
void Sheet::fillSelection( Selection * selectionInfo, int direction )
{
- QRect rct( selectionInfo->selection() );
+ TQRect rct( selectionInfo->selection() );
int right = rct.right();
int bottom = rct.bottom();
int left = rct.left();
@@ -4686,35 +4686,35 @@ void Sheet::fillSelection( Selection * selectionInfo, int direction )
int width = rct.width();
int height = rct.height();
- QDomDocument undoDoc = saveCellRegion( rct );
+ TQDomDocument undoDoc = saveCellRegion( rct );
loadSelectionUndo( undoDoc, rct, left - 1, top - 1, false, 0 );
- QDomDocument doc;
+ TQDomDocument doc;
switch( direction )
{
case Right:
- doc = saveCellRegion( QRect( left, top, 1, height ) );
+ doc = saveCellRegion( TQRect( left, top, 1, height ) );
break;
case Up:
- doc = saveCellRegion( QRect( left, bottom, width, 1 ) );
+ doc = saveCellRegion( TQRect( left, bottom, width, 1 ) );
break;
case Left:
- doc = saveCellRegion( QRect( right, top, 1, height ) );
+ doc = saveCellRegion( TQRect( right, top, 1, height ) );
break;
case Down:
- doc = saveCellRegion( QRect( left, top, width, 1 ) );
+ doc = saveCellRegion( TQRect( left, top, width, 1 ) );
break;
};
// Save to buffer
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &buffer );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc;
buffer.close();
@@ -4724,28 +4724,28 @@ void Sheet::fillSelection( Selection * selectionInfo, int direction )
case Right:
for ( i = left + 1; i <= right; ++i )
{
- paste( buffer.buffer(), QRect( i, top, 1, 1 ), false );
+ paste( buffer.buffer(), TQRect( i, top, 1, 1 ), false );
}
break;
case Up:
for ( i = bottom + 1; i >= top; --i )
{
- paste( buffer.buffer(), QRect( left, i, 1, 1 ), false );
+ paste( buffer.buffer(), TQRect( left, i, 1, 1 ), false );
}
break;
case Left:
for ( i = right - 1; i >= left; --i )
{
- paste( buffer.buffer(), QRect( i, top, 1, 1 ), false );
+ paste( buffer.buffer(), TQRect( i, top, 1, 1 ), false );
}
break;
case Down:
for ( i = top + 1; i <= bottom; ++i )
{
- paste( buffer.buffer(), QRect( left, i, 1, 1 ), false );
+ paste( buffer.buffer(), TQRect( left, i, 1, 1 ), false );
}
break;
}
@@ -4758,7 +4758,7 @@ struct DefaultSelectionWorker : public Sheet::CellWorker {
DefaultSelectionWorker( ) : Sheet::CellWorker( true, false, true ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
- QString title=i18n("Default Parameters");
+ TQString title=i18n("Default Parameters");
return new UndoCellFormat( doc, sheet, region, title );
}
bool testCondition( Cell* ) {
@@ -4771,7 +4771,7 @@ struct DefaultSelectionWorker : public Sheet::CellWorker {
void Sheet::defaultSelection( Selection* selectionInfo )
{
- QRect selection(selectionInfo->selection());
+ TQRect selection(selectionInfo->selection());
DefaultSelectionWorker w;
SelectionType st = workOnCells( selectionInfo, w );
switch ( st ) {
@@ -4800,8 +4800,8 @@ void Sheet::defaultSelection( Selection* selectionInfo )
struct SetConditionalWorker : public Sheet::CellWorker
{
- QValueList<Conditional> conditionList;
- SetConditionalWorker( QValueList<Conditional> _tmp ) :
+ TQValueList<Conditional> conditionList;
+ SetConditionalWorker( TQValueList<Conditional> _tmp ) :
Sheet::CellWorker( ), conditionList( _tmp ) { }
class UndoAction* createUndoAction( Doc* doc,
@@ -4826,7 +4826,7 @@ struct SetConditionalWorker : public Sheet::CellWorker
};
void Sheet::setConditional( Selection* selectionInfo,
- QValueList<Conditional> const & newConditions)
+ TQValueList<Conditional> const & newConditions)
{
if ( !doc()->undoLocked() )
{
@@ -4837,7 +4837,7 @@ void Sheet::setConditional( Selection* selectionInfo,
Region::ConstIterator endOfList = selectionInfo->constEnd();
for (Region::ConstIterator it = selectionInfo->constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int l = range.left();
int r = range.right();
@@ -4911,8 +4911,8 @@ void Sheet::setValidity(Selection* selectionInfo,
struct GetWordSpellingWorker : public Sheet::CellWorker {
- QString& listWord;
- GetWordSpellingWorker( QString& _listWord ) : Sheet::CellWorker( false, false, true ), listWord( _listWord ) { }
+ TQString& listWord;
+ GetWordSpellingWorker( TQString& _listWord ) : Sheet::CellWorker( false, false, true ), listWord( _listWord ) { }
class UndoAction* createUndoAction( Doc*, Sheet*, const KSpread::Region& ) {
return 0;
@@ -4932,9 +4932,9 @@ struct GetWordSpellingWorker : public Sheet::CellWorker {
}
};
-QString Sheet::getWordSpelling(Selection* selectionInfo )
+TQString Sheet::getWordSpelling(Selection* selectionInfo )
{
- QString listWord;
+ TQString listWord;
GetWordSpellingWorker w( listWord );
workOnCells( selectionInfo, w );
return listWord;
@@ -4942,10 +4942,10 @@ QString Sheet::getWordSpelling(Selection* selectionInfo )
struct SetWordSpellingWorker : public Sheet::CellWorker {
- QStringList& list;
+ TQStringList& list;
int pos;
Sheet * sheet;
- SetWordSpellingWorker( QStringList & _list,Sheet * s )
+ SetWordSpellingWorker( TQStringList & _list,Sheet * s )
: Sheet::CellWorker( false, false, true ), list( _list ), pos( 0 ), sheet( s ) { }
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const KSpread::Region& region ) {
@@ -4971,16 +4971,16 @@ struct SetWordSpellingWorker : public Sheet::CellWorker {
};
void Sheet::setWordSpelling(Selection* selectionInfo,
- const QString _listWord )
+ const TQString _listWord )
{
- QStringList list = QStringList::split ( '\n', _listWord );
+ TQStringList list = TQStringList::split ( '\n', _listWord );
SetWordSpellingWorker w( list, this );
workOnCells( selectionInfo, w );
}
-static QString cellAsText( Cell* cell, unsigned int max )
+static TQString cellAsText( Cell* cell, unsigned int max )
{
- QString result;
+ TQString result;
if( !cell->isDefault() )
{
int l = max - cell->strOutText().length();
@@ -5018,7 +5018,7 @@ static QString cellAsText( Cell* cell, unsigned int max )
return result;
}
-QString Sheet::copyAsText( Selection* selectionInfo )
+TQString Sheet::copyAsText( Selection* selectionInfo )
{
// Only one cell selected? => copy active cell
if ( selectionInfo->isSingular() )
@@ -5029,7 +5029,7 @@ QString Sheet::copyAsText( Selection* selectionInfo )
return "";
}
- QRect selection(selectionInfo->selection());
+ TQRect selection(selectionInfo->selection());
// Find area
unsigned top = selection.bottom();
@@ -5042,13 +5042,13 @@ QString Sheet::copyAsText( Selection* selectionInfo )
{
if ( !c->isDefault() )
{
- QPoint p( c->column(), c->row() );
- if ( selection.contains( p ) )
+ TQPoint p( c->column(), c->row() );
+ if ( selection.tqcontains( p ) )
{
- top = QMIN( top, (unsigned) c->row() );
- left = QMIN( left, (unsigned) c->column() );
- bottom = QMAX( bottom, (unsigned) c->row() );
- right = QMAX( right, (unsigned) c->column() );
+ top = TQMIN( top, (unsigned) c->row() );
+ left = TQMIN( left, (unsigned) c->column() );
+ bottom = TQMAX( bottom, (unsigned) c->row() );
+ right = TQMAX( right, (unsigned) c->column() );
if ( c->strOutText().length() > max )
max = c->strOutText().length();
@@ -5058,7 +5058,7 @@ QString Sheet::copyAsText( Selection* selectionInfo )
++max;
- QString result;
+ TQString result;
for ( unsigned y = top; y <= bottom; ++y)
{
for ( unsigned x = left; x <= right; ++x)
@@ -5074,13 +5074,13 @@ QString Sheet::copyAsText( Selection* selectionInfo )
void Sheet::copySelection( Selection* selectionInfo )
{
- QDomDocument doc = saveCellRegion( *selectionInfo, true );
+ TQDomDocument doc = saveCellRegion( *selectionInfo, true );
// Save to buffer
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &buffer );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc;
buffer.close();
@@ -5088,18 +5088,18 @@ void Sheet::copySelection( Selection* selectionInfo )
kd->setPlain( copyAsText(selectionInfo) );
kd->setKSpread( buffer.buffer() );
- QApplication::clipboard()->setData( kd );
+ TQApplication::tqclipboard()->setData( kd );
}
void Sheet::cutSelection( Selection* selectionInfo )
{
- QDomDocument doc = saveCellRegion(*selectionInfo, true, true);
+ TQDomDocument doc = saveCellRegion(*selectionInfo, true, true);
// Save to buffer
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- QTextStream str( &buffer );
- str.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream str( &buffer );
+ str.setEncoding( TQTextStream::UnicodeUTF8 );
str << doc;
buffer.close();
@@ -5107,31 +5107,31 @@ void Sheet::cutSelection( Selection* selectionInfo )
kd->setPlain( copyAsText(selectionInfo) );
kd->setKSpread( buffer.buffer() );
- QApplication::clipboard()->setData( kd );
+ TQApplication::tqclipboard()->setData( kd );
deleteSelection( selectionInfo, true );
}
-void Sheet::paste( const QRect& pasteArea, bool makeUndo,
+void Sheet::paste( const TQRect& pasteArea, bool makeUndo,
Paste::Mode mode, Paste::Operation operation,
bool insert, int insertTo, bool pasteFC,
- QClipboard::Mode clipboardMode )
+ TQClipboard::Mode clipboardMode )
{
- QMimeSource * mime = QApplication::clipboard()->data( clipboardMode );
+ TQMimeSource * mime = TQApplication::tqclipboard()->data( clipboardMode );
if ( !mime )
return;
- QByteArray b;
+ TQByteArray b;
if ( mime->provides( TextDrag::selectionMimeType() ) )
{
- b = mime->encodedData( TextDrag::selectionMimeType() );
+ b = mime->tqencodedData( TextDrag::selectionMimeType() );
}
else if( mime->provides( "text/plain" ) )
{
- // Note: QClipboard::text() seems to do a better job than encodedData( "text/plain" )
+ // Note: TQClipboard::text() seems to do a better job than tqencodedData( "text/plain" )
// In particular it handles charsets (in the mimetype). Copied from KPresenter ;-)
- QString _text = QApplication::clipboard()->text( clipboardMode );
+ TQString _text = TQApplication::tqclipboard()->text( clipboardMode );
doc()->emitBeginOperation();
pasteTextPlain( _text, pasteArea );
emit sig_updateView( this );
@@ -5149,14 +5149,14 @@ void Sheet::paste( const QRect& pasteArea, bool makeUndo,
}
-void Sheet::pasteTextPlain( QString &_text, QRect pasteArea)
+void Sheet::pasteTextPlain( TQString &_text, TQRect pasteArea)
{
-// QString tmp;
-// tmp= QString::fromLocal8Bit(_mime->encodedData( "text/plain" ));
+// TQString tmp;
+// tmp= TQString::fromLocal8Bit(_mime->tqencodedData( "text/plain" ));
if( _text.isEmpty() )
return;
- QString tmp = _text;
+ TQString tmp = _text;
int i;
int mx = pasteArea.left();
int my = pasteArea.top();
@@ -5181,19 +5181,19 @@ void Sheet::pasteTextPlain( QString &_text, QRect pasteArea)
}
else
{
- QRect rect(mx, my, mx, my + rows - 1);
+ TQRect rect(mx, my, mx, my + rows - 1);
UndoChangeAreaTextCell * undo = new UndoChangeAreaTextCell( doc(), this , rect );
doc()->addCommand( undo );
}
i = 0;
- QString rowtext;
+ TQString rowtext;
while ( i < rows )
{
int p = 0;
- p = tmp.find('\n');
+ p = tmp.tqfind('\n');
if (p < 0)
p = tmp.length();
@@ -5225,15 +5225,15 @@ void Sheet::pasteTextPlain( QString &_text, QRect pasteArea)
emit sig_updateVBorder( this );
}
-void Sheet::paste( const QByteArray& b, const QRect& pasteArea, bool makeUndo,
+void Sheet::paste( const TQByteArray& b, const TQRect& pasteArea, bool makeUndo,
Paste::Mode mode, Paste::Operation operation,
bool insert, int insertTo, bool pasteFC )
{
kdDebug(36001) << "Parsing " << b.size() << " bytes" << endl;
- QBuffer buffer( b );
+ TQBuffer buffer( b );
buffer.open( IO_ReadOnly );
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent( &buffer );
buffer.close();
@@ -5246,7 +5246,7 @@ void Sheet::paste( const QByteArray& b, const QRect& pasteArea, bool makeUndo,
mode, operation, insert, insertTo, pasteFC );
}
-bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
+bool Sheet::loadSelection(const TQDomDocument& doc, const TQRect& pasteArea,
int _xshift, int _yshift, bool makeUndo,
Paste::Mode mode, Paste::Operation operation, bool insert,
int insertTo, bool pasteFC)
@@ -5258,7 +5258,7 @@ bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
loadSelectionUndo( doc, pasteArea, _xshift, _yshift, insert, insertTo );
}
- QDomElement root = doc.documentElement(); // "spreadsheet-snippet"
+ TQDomElement root = doc.documentElement(); // "spreadsheet-snippet"
int rowsInClpbrd = root.attribute( "rows" ).toInt();
int columnsInClpbrd = root.attribute( "columns" ).toInt();
@@ -5280,7 +5280,7 @@ bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
// << columnsInClpbrd << " columns in clipboard." << endl;
// kdDebug() << "xshift: " << _xshift << " _yshift: " << _yshift << endl;
- QDomElement e = root.firstChild().toElement(); // "columns", "rows" or "cell"
+ TQDomElement e = root.firstChild().toElement(); // "columns", "rows" or "cell"
for (; !e.isNull(); e = e.nextSibling().toElement())
{
// entire columns given
@@ -5301,7 +5301,7 @@ bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
}
// Insert column formats
- QDomElement c = e.firstChild().toElement();
+ TQDomElement c = e.firstChild().toElement();
for ( ; !c.isNull(); c = c.nextSibling().toElement() )
{
if ( c.tagName() == "column" )
@@ -5333,7 +5333,7 @@ bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
}
// Insert row formats
- QDomElement c = e.firstChild().toElement();
+ TQDomElement c = e.firstChild().toElement();
for( ; !c.isNull(); c = c.nextSibling().toElement() )
{
if ( c.tagName() == "row" )
@@ -5420,11 +5420,11 @@ bool Sheet::loadSelection(const QDomDocument& doc, const QRect& pasteArea,
return true;
}
-void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
+void Sheet::loadSelectionUndo(const TQDomDocument& d, const TQRect& loadArea,
int _xshift, int _yshift,
bool insert, int insertTo)
{
- QDomElement root = d.documentElement(); // "spreadsheet-snippet"
+ TQDomElement root = d.documentElement(); // "spreadsheet-snippet"
int rowsInClpbrd = root.attribute( "rows" ).toInt();
int columnsInClpbrd = root.attribute( "columns" ).toInt();
@@ -5443,9 +5443,9 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
uint numRows = 0;
Region region;
- for (QDomNode n = root.firstChild(); !n.isNull(); n = n.nextSibling())
+ for (TQDomNode n = root.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement e = n.toElement(); // "columns", "rows" or "cell"
+ TQDomElement e = n.toElement(); // "columns", "rows" or "cell"
if (e.tagName() == "columns")
{
_yshift = 0;
@@ -5453,9 +5453,9 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
int width = e.attribute("count").toInt();
for (int coff = 0; col + coff <= pasteWidth; coff += columnsInClpbrd)
{
- uint overlap = QMAX(0, (col - 1 + coff + width) - pasteWidth);
+ uint overlap = TQMAX(0, (col - 1 + coff + width) - pasteWidth);
uint effWidth = width - overlap;
- region.add(QRect(_xshift + col + coff, 1, effWidth, KS_rowMax));
+ region.add(TQRect(_xshift + col + coff, 1, effWidth, KS_rowMax));
numCols += effWidth;
}
}
@@ -5466,9 +5466,9 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
int height = e.attribute("count").toInt();
for (int roff = 0; row + roff <= pasteHeight; roff += rowsInClpbrd)
{
- uint overlap = QMAX(0, (row - 1 + roff + height) - pasteHeight);
+ uint overlap = TQMAX(0, (row - 1 + roff + height) - pasteHeight);
uint effHeight = height - overlap;
- region.add(QRect(1, _yshift + row + roff, KS_colMax, effHeight));
+ region.add(TQRect(1, _yshift + row + roff, KS_colMax, effHeight));
numRows += effHeight;
}
}
@@ -5481,7 +5481,7 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
{
for (int roff = 0; row + roff <= pasteHeight; roff += rowsInClpbrd)
{
- region.add(QPoint(_xshift + col + coff, _yshift + row + roff));
+ region.add(TQPoint(_xshift + col + coff, _yshift + row + roff));
}
}
}
@@ -5495,7 +5495,7 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
if (insert)
{
- QRect rect = region.boundingRect();
+ TQRect rect = region.boundingRect();
// shift cells to the right
if (insertTo == -1 && numCols == 0 && numRows == 0)
{
@@ -5523,31 +5523,31 @@ void Sheet::loadSelectionUndo(const QDomDocument& d, const QRect& loadArea,
bool Sheet::testAreaPasteInsert()const
{
- QMimeSource* mime = QApplication::clipboard()->data( QClipboard::Clipboard );
+ TQMimeSource* mime = TQApplication::tqclipboard()->data( TQClipboard::Clipboard );
if ( !mime )
return false;
- QByteArray b;
+ TQByteArray b;
if ( mime->provides( "application/x-kspread-snippet" ) )
- b = mime->encodedData( "application/x-kspread-snippet" );
+ b = mime->tqencodedData( "application/x-kspread-snippet" );
else
return false;
- QBuffer buffer( b );
+ TQBuffer buffer( b );
buffer.open( IO_ReadOnly );
- QDomDocument d;
+ TQDomDocument d;
d.setContent( &buffer );
buffer.close();
- QDomElement e = d.documentElement();
+ TQDomElement e = d.documentElement();
if ( !e.namedItem( "columns" ).toElement().isNull() )
return false;
if ( !e.namedItem( "rows" ).toElement().isNull() )
return false;
- QDomElement c = e.firstChild().toElement();
+ TQDomElement c = e.firstChild().toElement();
for( ; !c.isNull(); c = c.nextSibling().toElement() )
{
if ( c.tagName() == "cell" )
@@ -5559,12 +5559,12 @@ bool Sheet::testAreaPasteInsert()const
void Sheet::deleteCells(const Region& region)
{
// A list of all cells we want to delete.
- QPtrStack<Cell> cellStack;
+ TQPtrStack<Cell> cellStack;
Region::ConstIterator endOfList = region.constEnd();
for (Region::ConstIterator it = region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int right = range.right();
int left = range.left();
@@ -5634,7 +5634,7 @@ void Sheet::deleteSelection( Selection* selectionInfo, bool undo )
Region::ConstIterator endOfList = selectionInfo->constEnd();
for (Region::ConstIterator it = selectionInfo->constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
// Entire rows selected ?
if ( util_isRowSelected(range) )
@@ -5673,7 +5673,7 @@ void Sheet::updateView()
emit sig_updateView( this );
}
-void Sheet::updateView( QRect const & rect )
+void Sheet::updateView( TQRect const & rect )
{
emit sig_updateView( this, rect );
}
@@ -5689,9 +5689,9 @@ void Sheet::refreshView( const Region& region )
Region::ConstIterator endOfList = region.constEnd();
for (Region::ConstIterator it = region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
// TODO: don't go through all cells when refreshing!
- QRect tmp(range);
+ TQRect tmp(range);
Cell * c = d->cells.firstCell();
for( ;c; c = c->nextCell() )
{
@@ -5701,8 +5701,8 @@ void Sheet::refreshView( const Region& region )
{
if (c->doesMergeCells())
{
- int right=QMAX(tmp.right(),c->column()+c->extraXCells());
- int bottom=QMAX(tmp.bottom(),c->row()+c->extraYCells());
+ int right=TQMAX(tmp.right(),c->column()+c->extraXCells());
+ int bottom=TQMAX(tmp.bottom(),c->row()+c->extraYCells());
tmp.setRight(right);
tmp.setBottom(bottom);
@@ -5749,11 +5749,11 @@ void Sheet::dissociateCells(const Region& region)
bool Sheet::testListChoose(Selection* selectionInfo)
{
- QRect selection( selectionInfo->selection() );
- QPoint marker( selectionInfo->marker() );
+ TQRect selection( selectionInfo->selection() );
+ TQPoint marker( selectionInfo->marker() );
Cell *cell = cellAt( marker.x(), marker.y() );
- QString tmp=cell->text();
+ TQString tmp=cell->text();
Cell* c = firstCell();
bool different=false;
@@ -5779,15 +5779,15 @@ bool Sheet::testListChoose(Selection* selectionInfo)
-QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
+TQDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
{
- QDomDocument dd( "spreadsheet-snippet" );
+ TQDomDocument dd( "spreadsheet-snippet" );
dd.appendChild( dd.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement root = dd.createElement( "spreadsheet-snippet" );
+ TQDomElement root = dd.createElement( "spreadsheet-snippet" );
dd.appendChild(root);
// find the upper left corner of the selection
- QRect boundingRect = region.boundingRect();
+ TQRect boundingRect = region.boundingRect();
int left = boundingRect.left();
int top = boundingRect.top();
@@ -5798,14 +5798,14 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
Region::ConstIterator endOfList = region.constEnd();
for (Region::ConstIterator it = region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
//
// Entire rows selected?
//
if ((*it)->isRow())
{
- QDomElement rows = dd.createElement("rows");
+ TQDomElement rows = dd.createElement("rows");
rows.setAttribute( "count", range.height() );
rows.setAttribute( "row", range.top() - top + 1 );
root.appendChild( rows );
@@ -5815,8 +5815,8 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
{
if (!cell->isDefault() && !cell->isPartOfMerged())
{
- QPoint point(cell->column(), cell->row());
- if (range.contains(point))
+ TQPoint point(cell->column(), cell->row());
+ if (range.tqcontains(point))
{
root.appendChild(cell->save( dd, 0, top - 1, copy, copy, era));
}
@@ -5831,7 +5831,7 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
format = rowFormat( row );
if (format && !format->isDefault())
{
- QDomElement e = format->save(dd, top - 1, copy);
+ TQDomElement e = format->save(dd, top - 1, copy);
if (!e.isNull())
{
rows.appendChild( e );
@@ -5846,7 +5846,7 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
//
if ((*it)->isColumn())
{
- QDomElement columns = dd.createElement("columns");
+ TQDomElement columns = dd.createElement("columns");
columns.setAttribute( "count", range.width() );
columns.setAttribute( "column", range.left() - left + 1 );
root.appendChild( columns );
@@ -5856,8 +5856,8 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
{
if (!cell->isDefault() && !cell->isPartOfMerged())
{
- QPoint point(cell->column(), cell->row());
- if (range.contains(point))
+ TQPoint point(cell->column(), cell->row());
+ if (range.tqcontains(point))
{
root.appendChild(cell->save( dd, left - 1, 0, copy, copy, era));
}
@@ -5872,7 +5872,7 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
format = columnFormat(col);
if (format && !format->isDefault())
{
- QDomElement e = format->save(dd, left - 1, copy);
+ TQDomElement e = format->save(dd, left - 1, copy);
if (!e.isNull())
{
columns.appendChild(e);
@@ -5914,14 +5914,14 @@ QDomDocument Sheet::saveCellRegion(const Region& region, bool copy, bool era)
return dd;
}
-QDomElement Sheet::saveXML( QDomDocument& dd )
+TQDomElement Sheet::saveXML( TQDomDocument& dd )
{
- QDomElement sheet = dd.createElement( "table" );
+ TQDomElement sheet = dd.createElement( "table" );
sheet.setAttribute( "name", d->name );
//Laurent: for oasis format I think that we must use style:direction...
- sheet.setAttribute( "layoutDirection", (d->layoutDirection == RightToLeft) ? "rtl" : "ltr" );
+ sheet.setAttribute( "tqlayoutDirection", (d->tqlayoutDirection == RightToLeft) ? "rtl" : "ltr" );
sheet.setAttribute( "columnnumber", (int)d->showColumnNumber);
sheet.setAttribute( "borders", (int)d->showPageBorders);
sheet.setAttribute( "hide", (int)d->hide);
@@ -5941,70 +5941,70 @@ QDomElement Sheet::saveXML( QDomDocument& dd )
{
if ( d->password.size() > 0 )
{
- QCString str = KCodecs::base64Encode( d->password );
- sheet.setAttribute( "protected", QString( str.data() ) );
+ TQCString str = KCodecs::base64Encode( d->password );
+ sheet.setAttribute( "protected", TQString( str.data() ) );
}
else
sheet.setAttribute( "protected", "" );
}
// paper parameters
- QDomElement paper = dd.createElement( "paper" );
+ TQDomElement paper = dd.createElement( "paper" );
paper.setAttribute( "format", d->print->paperFormatString() );
paper.setAttribute( "orientation", d->print->orientationString() );
sheet.appendChild( paper );
- QDomElement borders = dd.createElement( "borders" );
+ TQDomElement borders = dd.createElement( "borders" );
borders.setAttribute( "left", d->print->leftBorder() );
borders.setAttribute( "top", d->print->topBorder() );
borders.setAttribute( "right", d->print->rightBorder() );
borders.setAttribute( "bottom", d->print->bottomBorder() );
paper.appendChild( borders );
- QDomElement head = dd.createElement( "head" );
+ TQDomElement head = dd.createElement( "head" );
paper.appendChild( head );
if ( !d->print->headLeft().isEmpty() )
{
- QDomElement left = dd.createElement( "left" );
+ TQDomElement left = dd.createElement( "left" );
head.appendChild( left );
left.appendChild( dd.createTextNode( d->print->headLeft() ) );
}
if ( !d->print->headMid().isEmpty() )
{
- QDomElement center = dd.createElement( "center" );
+ TQDomElement center = dd.createElement( "center" );
head.appendChild( center );
center.appendChild( dd.createTextNode( d->print->headMid() ) );
}
if ( !d->print->headRight().isEmpty() )
{
- QDomElement right = dd.createElement( "right" );
+ TQDomElement right = dd.createElement( "right" );
head.appendChild( right );
right.appendChild( dd.createTextNode( d->print->headRight() ) );
}
- QDomElement foot = dd.createElement( "foot" );
+ TQDomElement foot = dd.createElement( "foot" );
paper.appendChild( foot );
if ( !d->print->footLeft().isEmpty() )
{
- QDomElement left = dd.createElement( "left" );
+ TQDomElement left = dd.createElement( "left" );
foot.appendChild( left );
left.appendChild( dd.createTextNode( d->print->footLeft() ) );
}
if ( !d->print->footMid().isEmpty() )
{
- QDomElement center = dd.createElement( "center" );
+ TQDomElement center = dd.createElement( "center" );
foot.appendChild( center );
center.appendChild( dd.createTextNode( d->print->footMid() ) );
}
if ( !d->print->footRight().isEmpty() )
{
- QDomElement right = dd.createElement( "right" );
+ TQDomElement right = dd.createElement( "right" );
foot.appendChild( right );
right.appendChild( dd.createTextNode( d->print->footRight() ) );
}
// print range
- QDomElement printrange = dd.createElement( "printrange-rect" );
- QRect _printRange = d->print->printRange();
+ TQDomElement printrange = dd.createElement( "printrange-rect" );
+ TQRect _printRange = d->print->printRange();
int left = _printRange.left();
int right = _printRange.right();
int top = _printRange.top();
@@ -6028,13 +6028,13 @@ QDomElement Sheet::saveXML( QDomDocument& dd )
sheet.appendChild( printrange );
// Print repeat columns
- QDomElement printRepeatColumns = dd.createElement( "printrepeatcolumns" );
+ TQDomElement printRepeatColumns = dd.createElement( "printrepeatcolumns" );
printRepeatColumns.setAttribute( "left", d->print->printRepeatColumns().first );
printRepeatColumns.setAttribute( "right", d->print->printRepeatColumns().second );
sheet.appendChild( printRepeatColumns );
// Print repeat rows
- QDomElement printRepeatRows = dd.createElement( "printrepeatrows" );
+ TQDomElement printRepeatRows = dd.createElement( "printrepeatrows" );
printRepeatRows.setAttribute( "top", d->print->printRepeatRows().first );
printRepeatRows.setAttribute( "bottom", d->print->printRepeatRows().second );
sheet.appendChild( printRepeatRows );
@@ -6052,7 +6052,7 @@ QDomElement Sheet::saveXML( QDomDocument& dd )
{
if ( !c->isDefault() )
{
- QDomElement e = c->save( dd );
+ TQDomElement e = c->save( dd );
if ( !e.isNull() )
sheet.appendChild( e );
}
@@ -6064,9 +6064,9 @@ QDomElement Sheet::saveXML( QDomDocument& dd )
{
if ( !rl->isDefault() )
{
- QDomElement e = rl->save( dd );
+ TQDomElement e = rl->save( dd );
if ( e.isNull() )
- return QDomElement();
+ return TQDomElement();
sheet.appendChild( e );
}
}
@@ -6077,22 +6077,22 @@ QDomElement Sheet::saveXML( QDomDocument& dd )
{
if ( !cl->isDefault() )
{
- QDomElement e = cl->save( dd );
+ TQDomElement e = cl->save( dd );
if ( e.isNull() )
- return QDomElement();
+ return TQDomElement();
sheet.appendChild( e );
}
}
- QPtrListIterator<EmbeddedObject> chl = doc()->embeddedObjects();
+ TQPtrListIterator<EmbeddedObject> chl = doc()->embeddedObjects();
for( ; chl.current(); ++chl )
{
if ( chl.current()->sheet() == this )
{
- QDomElement e = chl.current()->save( dd );
+ TQDomElement e = chl.current()->save( dd );
if ( e.isNull() )
- return QDomElement();
+ return TQDomElement();
sheet.appendChild( e );
}
}
@@ -6105,10 +6105,10 @@ bool Sheet::isLoading()
}
-QPtrList<EmbeddedObject> Sheet::getSelectedObjects()
+TQPtrList<EmbeddedObject> Sheet::getSelectedObjects()
{
- QPtrList<EmbeddedObject> objects;
- QPtrListIterator<EmbeddedObject> it = doc()->embeddedObjects();
+ TQPtrList<EmbeddedObject> objects;
+ TQPtrListIterator<EmbeddedObject> it = doc()->embeddedObjects();
for ( ; it.current() ; ++it )
{
if( it.current()->isSelected()
@@ -6124,12 +6124,12 @@ KoRect Sheet::getRealRect( bool all )
{
KoRect rect;
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
{
if ( all || ( it.current()->isSelected() && ! it.current()->isProtect() ) )
- rect |= it.current()->geometry();
+ rect |= it.current()->tqgeometry();
}
return rect;
@@ -6141,21 +6141,21 @@ KCommand *Sheet::moveObject(View *_view, double diffx, double diffy)
bool createCommand=false;
MoveObjectByCmd *moveByCmd=0L;
Canvas * canvas = _view->canvasWidget();
- QPtrList<EmbeddedObject> _objects;
+ TQPtrList<EmbeddedObject> _objects;
_objects.setAutoDelete( false );
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects()/*m_objectList*/ );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects()/*m_objectList*/ );
for ( ; it.current() ; ++it )
{
if ( it.current()->isSelected() && !it.current()->isProtect())
{
_objects.append( it.current() );
- KoRect geometry = it.current()->geometry();
- geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- QRect br = doc()->zoomRect( geometry/*it.current()->geometry()*/ );
+ KoRect tqgeometry = it.current()->tqgeometry();
+ tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect br = doc()->zoomRect( tqgeometry/*it.current()->tqgeometry()*/ );
br.moveBy( doc()->zoomItX( diffx ), doc()->zoomItY( diffy ) );
br.moveBy( doc()->zoomItX( -canvas->xOffset() ), doc()->zoomItY( -canvas->yOffset() ) );
- canvas->repaint( br ); // Previous position
- canvas->repaintObject( it.current() ); // New position
+ canvas->tqrepaint( br ); // Previous position
+ canvas->tqrepaintObject( it.current() ); // New position
createCommand=true;
}
}
@@ -6170,28 +6170,28 @@ KCommand *Sheet::moveObject(View *_view, double diffx, double diffy)
KCommand *Sheet::moveObject(View *_view,const KoPoint &_move,bool key)
{
- QPtrList<EmbeddedObject> _objects;
+ TQPtrList<EmbeddedObject> _objects;
_objects.setAutoDelete( false );
MoveObjectByCmd *moveByCmd=0L;
Canvas * canvas = _view->canvasWidget();
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects()/*m_objectList*/ );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects()/*m_objectList*/ );
for ( ; it.current() ; ++it )
{
if ( it.current()->isSelected() && !it.current()->isProtect()) {
- KoRect geometry = it.current()->geometry();
- geometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
- QRect oldBoundingRect = doc()->zoomRect( geometry );
+ KoRect tqgeometry = it.current()->tqgeometry();
+ tqgeometry.moveBy( -canvas->xOffset(), -canvas->yOffset() );
+ TQRect oldBoundingRect = doc()->zoomRect( tqgeometry );
- KoRect r = it.current()->geometry();
+ KoRect r = it.current()->tqgeometry();
r.moveBy( _move.x(), _move.y() );
it.current()->setGeometry( r );
_objects.append( it.current() );
- canvas->repaint( oldBoundingRect );
- canvas->repaintObject( it.current() );
+ canvas->tqrepaint( oldBoundingRect );
+ canvas->tqrepaintObject( it.current() );
}
}
@@ -6206,8 +6206,8 @@ KCommand *Sheet::moveObject(View *_view,const KoPoint &_move,bool key)
/*
* Check if object name already exists.
*/
-bool Sheet::objectNameExists( EmbeddedObject *object, QPtrList<EmbeddedObject> &list ) {
- QPtrListIterator<EmbeddedObject> it( list );
+bool Sheet::objectNameExists( EmbeddedObject *object, TQPtrList<EmbeddedObject> &list ) {
+ TQPtrListIterator<EmbeddedObject> it( list );
for ( it.toFirst(); it.current(); ++it ) {
// object name can exist in current object.
@@ -6223,25 +6223,25 @@ void Sheet::unifyObjectName( EmbeddedObject *object ) {
if ( object->getObjectName().isEmpty() ) {
object->setObjectName( object->getTypeString() );
}
- QString objectName( object->getObjectName() );
+ TQString objectName( object->getObjectName() );
- QPtrList<EmbeddedObject> list( doc()->embeddedObjects() );
+ TQPtrList<EmbeddedObject> list( doc()->embeddedObjects() );
int count = 1;
while ( objectNameExists( object, list ) ) {
count++;
- QRegExp rx( " \\(\\d{1,3}\\)$" );
+ TQRegExp rx( " \\(\\d{1,3}\\)$" );
if ( rx.search( objectName ) != -1 ) {
objectName.remove( rx );
}
- objectName += QString(" (%1)").arg( count );
+ objectName += TQString(" (%1)").tqarg( count );
object->setObjectName( objectName );
}
}
-void Sheet::checkContentDirection( QString const & name )
+void Sheet::checkContentDirection( TQString const & name )
{
/* set sheet's direction to RTL if sheet name is an RTL string */
if ( (name.isRightToLeft()) )
@@ -6252,16 +6252,16 @@ void Sheet::checkContentDirection( QString const & name )
emit sig_refreshView();
}
-bool Sheet::loadSheetStyleFormat( QDomElement *style )
+bool Sheet::loadSheetStyleFormat( TQDomElement *style )
{
- QString hleft, hmiddle, hright;
- QString fleft, fmiddle, fright;
- QDomNode header = KoDom::namedItemNS( *style, KoXmlNS::style, "header" );
+ TQString hleft, hmiddle, hright;
+ TQString fleft, fmiddle, fright;
+ TQDomNode header = KoDom::namedItemNS( *style, KoXmlNS::style, "header" );
if ( !header.isNull() )
{
kdDebug() << "Header exists" << endl;
- QDomNode part = KoDom::namedItemNS( header, KoXmlNS::style, "region-left" );
+ TQDomNode part = KoDom::namedItemNS( header, KoXmlNS::style, "region-left" );
if ( !part.isNull() )
{
hleft = getPart( part );
@@ -6283,31 +6283,31 @@ bool Sheet::loadSheetStyleFormat( QDomElement *style )
}
}
//TODO implement it under kspread
- QDomNode headerleft = KoDom::namedItemNS( *style, KoXmlNS::style, "header-left" );
+ TQDomNode headerleft = KoDom::namedItemNS( *style, KoXmlNS::style, "header-left" );
if ( !headerleft.isNull() )
{
- QDomElement e = headerleft.toElement();
+ TQDomElement e = headerleft.toElement();
if ( e.hasAttributeNS( KoXmlNS::style, "display" ) )
kdDebug()<<"header.hasAttribute( style:display ) :"<<e.hasAttributeNS( KoXmlNS::style, "display" )<<endl;
else
kdDebug()<<"header left doesn't has attribute style:display \n";
}
//TODO implement it under kspread
- QDomNode footerleft = KoDom::namedItemNS( *style, KoXmlNS::style, "footer-left" );
+ TQDomNode footerleft = KoDom::namedItemNS( *style, KoXmlNS::style, "footer-left" );
if ( !footerleft.isNull() )
{
- QDomElement e = footerleft.toElement();
+ TQDomElement e = footerleft.toElement();
if ( e.hasAttributeNS( KoXmlNS::style, "display" ) )
kdDebug()<<"footer.hasAttribute( style:display ) :"<<e.hasAttributeNS( KoXmlNS::style, "display" )<<endl;
else
kdDebug()<<"footer left doesn't has attribute style:display \n";
}
- QDomNode footer = KoDom::namedItemNS( *style, KoXmlNS::style, "footer" );
+ TQDomNode footer = KoDom::namedItemNS( *style, KoXmlNS::style, "footer" );
if ( !footer.isNull() )
{
- QDomNode part = KoDom::namedItemNS( footer, KoXmlNS::style, "region-left" );
+ TQDomNode part = KoDom::namedItemNS( footer, KoXmlNS::style, "region-left" );
if ( !part.isNull() )
{
fleft = getPart( part );
@@ -6332,24 +6332,24 @@ bool Sheet::loadSheetStyleFormat( QDomElement *style )
return true;
}
-void Sheet::replaceMacro( QString & text, const QString & old, const QString & newS )
+void Sheet::replaceMacro( TQString & text, const TQString & old, const TQString & newS )
{
- int n = text.find( old );
+ int n = text.tqfind( old );
if ( n != -1 )
- text = text.replace( n, old.length(), newS );
+ text = text.tqreplace( n, old.length(), newS );
}
-QString Sheet::getPart( const QDomNode & part )
+TQString Sheet::getPart( const TQDomNode & part )
{
- QString result;
- QDomElement e = KoDom::namedItemNS( part, KoXmlNS::text, "p" );
+ TQString result;
+ TQDomElement e = KoDom::namedItemNS( part, KoXmlNS::text, "p" );
while ( !e.isNull() )
{
- QString text = e.text();
+ TQString text = e.text();
kdDebug() << "PART: " << text << endl;
- QDomElement macro = KoDom::namedItemNS( e, KoXmlNS::text, "time" );
+ TQDomElement macro = KoDom::namedItemNS( e, KoXmlNS::text, "time" );
if ( !macro.isNull() )
replaceMacro( text, macro.text(), "<time>" );
@@ -6388,46 +6388,46 @@ QString Sheet::getPart( const QDomNode & part )
}
-bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& oasisContext, QDict<Style>& styleMap )
+bool Sheet::loadOasis( const TQDomElement& sheetElement, KoOasisLoadingContext& oasisContext, TQDict<Style>& styleMap )
{
- d->layoutDirection = LeftToRight;
+ d->tqlayoutDirection = LeftToRight;
if ( sheetElement.hasAttributeNS( KoXmlNS::table, "style-name" ) )
{
- QString stylename = sheetElement.attributeNS( KoXmlNS::table, "style-name", QString::null );
+ TQString stylename = sheetElement.attributeNS( KoXmlNS::table, "style-name", TQString() );
//kdDebug()<<" style of table :"<<stylename<<endl;
- const QDomElement *style = oasisContext.oasisStyles().findStyle( stylename, "table" );
+ const TQDomElement *style = oasisContext.oasisStyles().findStyle( stylename, "table" );
Q_ASSERT( style );
//kdDebug()<<" style :"<<style<<endl;
if ( style )
{
- QDomElement properties( KoDom::namedItemNS( *style, KoXmlNS::style, "table-properties" ) );
+ TQDomElement properties( KoDom::namedItemNS( *style, KoXmlNS::style, "table-properties" ) );
if ( !properties.isNull() )
{
if ( properties.hasAttributeNS( KoXmlNS::table, "display" ) )
{
- bool visible = (properties.attributeNS( KoXmlNS::table, "display", QString::null ) == "true" ? true : false );
+ bool visible = (properties.attributeNS( KoXmlNS::table, "display", TQString() ) == "true" ? true : false );
d->hide = !visible;
}
}
if ( style->hasAttributeNS( KoXmlNS::style, "master-page-name" ) )
{
- QString masterPageStyleName = style->attributeNS( KoXmlNS::style, "master-page-name", QString::null );
+ TQString masterPageStyleName = style->attributeNS( KoXmlNS::style, "master-page-name", TQString() );
//kdDebug()<<"style->attribute( style:master-page-name ) :"<<masterPageStyleName <<endl;
- QDomElement *masterStyle = oasisContext.oasisStyles().masterPages()[masterPageStyleName];
+ TQDomElement *masterStyle = oasisContext.oasisStyles().masterPages()[masterPageStyleName];
//kdDebug()<<"oasisStyles.styles()[masterPageStyleName] :"<<masterStyle<<endl;
if ( masterStyle )
{
loadSheetStyleFormat( masterStyle );
- if ( masterStyle->hasAttributeNS( KoXmlNS::style, "page-layout-name" ) )
+ if ( masterStyle->hasAttributeNS( KoXmlNS::style, "page-tqlayout-name" ) )
{
- QString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-layout-name", QString::null );
+ TQString masterPageLayoutStyleName = masterStyle->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() );
//kdDebug()<<"masterPageLayoutStyleName :"<<masterPageLayoutStyleName<<endl;
- const QDomElement *masterLayoutStyle = oasisContext.oasisStyles().findStyle( masterPageLayoutStyleName );
+ const TQDomElement *masterLayoutStyle = oasisContext.oasisStyles().findStyle( masterPageLayoutStyleName );
if ( masterLayoutStyle )
{
//kdDebug()<<"masterLayoutStyle :"<<masterLayoutStyle<<endl;
KoStyleStack styleStack;
- styleStack.setTypeProperties( "page-layout" );
+ styleStack.setTypeProperties( "page-tqlayout" );
styleStack.push( *masterLayoutStyle );
loadOasisMasterLayoutPage( styleStack );
}
@@ -6438,18 +6438,18 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
}
//Maps from a column index to the name of the default cell style for that column
- QMap<int,QString> defaultColumnCellStyles;
+ TQMap<int,TQString> defaultColumnCellStyles;
int rowIndex = 1;
int indexCol = 1;
- QDomNode rowNode = sheetElement.firstChild();
+ TQDomNode rowNode = sheetElement.firstChild();
// Some spreadsheet programs may support more rows than
// KSpread so limit the number of repeated rows.
// FIXME POSSIBLE DATA LOSS!
while( !rowNode.isNull() && rowIndex <= KS_rowMax )
{
kdDebug()<<" rowIndex :"<<rowIndex<<" indexCol :"<<indexCol<<endl;
- QDomElement rowElement = rowNode.toElement();
+ TQDomElement rowElement = rowNode.toElement();
if( !rowElement.isNull() )
{
kdDebug()<<" Sheet::loadOasis rowElement.tagName() :"<<rowElement.localName()<<endl;
@@ -6463,7 +6463,7 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
}
else if ( rowElement.localName() == "table-header-rows" )
{
- QDomNode headerRowNode = rowElement.firstChild();
+ TQDomNode headerRowNode = rowElement.firstChild();
while ( !headerRowNode.isNull() )
{
// NOTE Handle header rows as ordinary ones
@@ -6479,7 +6479,7 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
loadRowFormat( rowElement, rowIndex, oasisContext, /*rowNode.isNull() ,*/ styleMap );
kdDebug()<<" table-row found :index row after "<<rowIndex<<endl;
}
- else if ( rowElement.localName() == "shapes" )
+ else if ( rowElement.localName() == "tqshapes" )
loadOasisObjects( rowElement, oasisContext );
}
}
@@ -6489,7 +6489,7 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
if ( sheetElement.hasAttributeNS( KoXmlNS::table, "print-ranges" ) )
{
// e.g.: Sheet4.A1:Sheet4.E28
- QString range = sheetElement.attributeNS( KoXmlNS::table, "print-ranges", QString::null );
+ TQString range = sheetElement.attributeNS( KoXmlNS::table, "print-ranges", TQString() );
range = Oasis::decodeFormula( range );
Range p( range );
if ( sheetName() == p.sheetName() )
@@ -6497,13 +6497,13 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
}
- if ( sheetElement.attributeNS( KoXmlNS::table, "protected", QString::null ) == "true" )
+ if ( sheetElement.attributeNS( KoXmlNS::table, "protected", TQString() ) == "true" )
{
- QCString passwd( "" );
+ TQCString passwd( "" );
if ( sheetElement.hasAttributeNS( KoXmlNS::table, "protection-key" ) )
{
- QString p = sheetElement.attributeNS( KoXmlNS::table, "protection-key", QString::null );
- QCString str( p.latin1() );
+ TQString p = sheetElement.attributeNS( KoXmlNS::table, "protection-key", TQString() );
+ TQCString str( p.latin1() );
kdDebug(30518) << "Decoding password: " << str << endl;
passwd = KCodecs::base64Decode( str );
}
@@ -6514,27 +6514,27 @@ bool Sheet::loadOasis( const QDomElement& sheetElement, KoOasisLoadingContext& o
}
-void Sheet::loadOasisObjects( const QDomElement &parent, KoOasisLoadingContext& oasisContext )
+void Sheet::loadOasisObjects( const TQDomElement &tqparent, KoOasisLoadingContext& oasisContext )
{
- QDomElement e;
- QDomNode n = parent.firstChild();
+ TQDomElement e;
+ TQDomNode n = tqparent.firstChild();
while( !n.isNull() )
{
e = n.toElement();
if ( e.localName() == "frame" && e.namespaceURI() == KoXmlNS::draw )
{
EmbeddedObject *obj = 0;
- QDomNode object = KoDom::namedItemNS( e, KoXmlNS::draw, "object" );
+ TQDomNode object = KoDom::namedItemNS( e, KoXmlNS::draw, "object" );
if ( !object.isNull() )
{
- if ( !object.toElement().attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", QString::null).isNull() )
+ if ( !object.toElement().attributeNS( KoXmlNS::draw, "notify-on-update-of-ranges", TQString()).isNull() )
obj = new EmbeddedChart( doc(), this );
else
obj = new EmbeddedKOfficeObject( doc(), this );
}
else
{
- QDomNode image = KoDom::namedItemNS( e, KoXmlNS::draw, "image" );
+ TQDomNode image = KoDom::namedItemNS( e, KoXmlNS::draw, "image" );
if ( !image.isNull() )
obj = new EmbeddedPictureObject( this, doc()->pictureCollection() );
else
@@ -6561,10 +6561,10 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
float bottom = 20.0;
float width = 210.0;
float height = 297.0;
- QString orientation = "Portrait";
- QString format;
+ TQString orientation = "Portrait";
+ TQString format;
- // Laurent : Why we stored layout information as Millimeter ?!!!!!
+ // Laurent : Why we stored tqlayout information as Millimeter ?!!!!!
// kspread used point for all other attribute
// I don't understand :(
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "page-width" ) )
@@ -6594,7 +6594,7 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
if ( styleStack.hasAttributeNS( KoXmlNS::style, "writing-mode" ) )
{
kdDebug()<<"styleStack.hasAttribute( style:writing-mode ) :"<<styleStack.hasAttributeNS( KoXmlNS::style, "writing-mode" )<<endl;
- d->layoutDirection = ( styleStack.attributeNS( KoXmlNS::style, "writing-mode" )=="lr-tb" ) ? LeftToRight : RightToLeft;
+ d->tqlayoutDirection = ( styleStack.attributeNS( KoXmlNS::style, "writing-mode" )=="lr-tb" ) ? LeftToRight : RightToLeft;
//TODO
//<value>lr-tb</value>
//<value>rl-tb</value>
@@ -6627,45 +6627,45 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
if ( styleStack.hasAttributeNS( KoXmlNS::style, "print" ) )
{
//todo parsing
- QString str = styleStack.attributeNS( KoXmlNS::style, "print" );
+ TQString str = styleStack.attributeNS( KoXmlNS::style, "print" );
kdDebug()<<" style:print :"<<str<<endl;
- if (str.contains( "headers" ) )
+ if (str.tqcontains( "headers" ) )
{
//TODO implement it into kspread
}
- if ( str.contains( "grid" ) )
+ if ( str.tqcontains( "grid" ) )
{
d->print->setPrintGrid( true );
}
- if ( str.contains( "annotations" ) )
+ if ( str.tqcontains( "annotations" ) )
{
//TODO it's not implemented
}
- if ( str.contains( "objects" ) )
+ if ( str.tqcontains( "objects" ) )
{
//TODO it's not implemented
}
- if ( str.contains( "charts" ) )
+ if ( str.tqcontains( "charts" ) )
{
//TODO it's not implemented
}
- if ( str.contains( "drawings" ) )
+ if ( str.tqcontains( "drawings" ) )
{
//TODO it's not implemented
}
- if ( str.contains( "formulas" ) )
+ if ( str.tqcontains( "formulas" ) )
{
d->showFormula = true;
}
- if ( str.contains( "zero-values" ) )
+ if ( str.tqcontains( "zero-values" ) )
{
//TODO it's not implemented
}
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "table-centering" ) )
{
- QString str = styleStack.attributeNS( KoXmlNS::style, "table-centering" );
+ TQString str = styleStack.attributeNS( KoXmlNS::style, "table-centering" );
//TODO not implemented into kspread
kdDebug()<<" styleStack.attribute( style:table-centering ) :"<<str<<endl;
#if 0
@@ -6685,22 +6685,22 @@ void Sheet::loadOasisMasterLayoutPage( KoStyleStack &styleStack )
kdDebug()<<" table-centering unknown :"<<str<<endl;
#endif
}
- format = QString( "%1x%2" ).arg( width ).arg( height );
+ format = TQString( "%1x%2" ).tqarg( width ).tqarg( height );
kdDebug()<<" format : "<<format<<endl;
d->print->setPaperLayout( left, top, right, bottom, format, orientation );
kdDebug()<<" left margin :"<<left<<" right :"<<right<<" top :"<<top<<" bottom :"<<bottom<<endl;
//<style:properties fo:page-width="21.8cm" fo:page-height="28.801cm" fo:margin-top="2cm" fo:margin-bottom="2.799cm" fo:margin-left="1.3cm" fo:margin-right="1.3cm" style:writing-mode="lr-tb"/>
-// QString format = paper.attribute( "format" );
-// QString orientation = paper.attribute( "orientation" );
+// TQString format = paper.attribute( "format" );
+// TQString orientation = paper.attribute( "orientation" );
// d->print->setPaperLayout( left, top, right, bottom, format, orientation );
// }
}
-bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oasisStyles, int & indexCol, const QDict<Style>& styleMap)
+bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oasisStyles, int & indexCol, const TQDict<Style>& styleMap)
{
- kdDebug()<<"bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oasisStyles, unsigned int & indexCol ) index Col :"<<indexCol<<endl;
+ kdDebug()<<"bool Sheet::loadColumnFormat(const TQDomElement& column, const KoOasisStyles& oasisStyles, unsigned int & indexCol ) index Col :"<<indexCol<<endl;
bool isNonDefaultColumn = false;
@@ -6708,25 +6708,25 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
if ( column.hasAttributeNS( KoXmlNS::table, "number-columns-repeated" ) )
{
bool ok = true;
- int n = column.attributeNS( KoXmlNS::table, "number-columns-repeated", QString::null ).toInt( &ok );
+ int n = column.attributeNS( KoXmlNS::table, "number-columns-repeated", TQString() ).toInt( &ok );
if ( ok )
// Some spreadsheet programs may support more rows than KSpread so
// limit the number of repeated rows.
// FIXME POSSIBLE DATA LOSS!
- number = QMIN( n, KS_colMax - indexCol + 1 );
+ number = TQMIN( n, KS_colMax - indexCol + 1 );
kdDebug() << "Repeated: " << number << endl;
}
- Format layout( this , doc()->styleManager()->defaultStyle() );
+ Format tqlayout( this , doc()->styleManager()->defaultStyle() );
if ( column.hasAttributeNS( KoXmlNS::table, "default-cell-style-name" ) )
{
- const QString styleName = column.attributeNS( KoXmlNS::table, "default-cell-style-name", QString::null );
+ const TQString styleName = column.attributeNS( KoXmlNS::table, "default-cell-style-name", TQString() );
if ( !styleName.isEmpty() )
{
Style* const style = styleMap[ styleName ];
if ( style )
{
- layout.setStyle( style );
+ tqlayout.setStyle( style );
isNonDefaultColumn = true;
}
}
@@ -6735,7 +6735,7 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
bool collapsed = false;
if ( column.hasAttributeNS( KoXmlNS::table, "visibility" ) )
{
- const QString visibility = column.attributeNS( KoXmlNS::table, "visibility", QString::null );
+ const TQString visibility = column.attributeNS( KoXmlNS::table, "visibility", TQString() );
if ( visibility == "visible" )
collapsed = false;
else if ( visibility == "collapse" )
@@ -6748,8 +6748,8 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
KoStyleStack styleStack;
if ( column.hasAttributeNS( KoXmlNS::table, "style-name" ) )
{
- QString str = column.attributeNS( KoXmlNS::table, "style-name", QString::null );
- const QDomElement *style = oasisStyles.findStyle( str, "table-column" );
+ TQString str = column.attributeNS( KoXmlNS::table, "style-name", TQString() );
+ const TQDomElement *style = oasisStyles.findStyle( str, "table-column" );
if ( style )
{
styleStack.push( *style );
@@ -6769,7 +6769,7 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
bool insertPageBreak = false;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "break-before" ) )
{
- QString str = styleStack.attributeNS( KoXmlNS::fo, "break-before" );
+ TQString str = styleStack.attributeNS( KoXmlNS::fo, "break-before" );
if ( str == "page" )
{
insertPageBreak = true;
@@ -6799,7 +6799,7 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
{
columnFormat = this->columnFormat( indexCol );
}
- columnFormat->copy( layout );
+ columnFormat->copy( tqlayout );
++indexCol;
}
@@ -6808,9 +6808,9 @@ bool Sheet::loadColumnFormat(const QDomElement& column, const KoOasisStyles& oas
}
-bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoadingContext& oasisContext, QDict<Style>& styleMap )
+bool Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadingContext& oasisContext, TQDict<Style>& styleMap )
{
-// kdDebug()<<"Sheet::loadRowFormat( const QDomElement& row, int &rowIndex,const KoOasisStyles& oasisStyles, bool isLast )***********\n";
+// kdDebug()<<"Sheet::loadRowFormat( const TQDomElement& row, int &rowIndex,const KoOasisStyles& oasisStyles, bool isLast )***********\n";
int backupRow = rowIndex;
bool isNonDefaultRow = false;
@@ -6818,8 +6818,8 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
KoStyleStack styleStack;
if ( row.hasAttributeNS( KoXmlNS::table, "style-name" ) )
{
- QString str = row.attributeNS( KoXmlNS::table, "style-name", QString::null );
- const QDomElement *style = oasisContext.oasisStyles().findStyle( str, "table-row" );
+ TQString str = row.attributeNS( KoXmlNS::table, "style-name", TQString() );
+ const TQDomElement *style = oasisContext.oasisStyles().findStyle( str, "table-row" );
if ( style )
{
styleStack.push( *style );
@@ -6828,16 +6828,16 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
}
styleStack.setTypeProperties( "table-row" );
- Format layout( this , doc()->styleManager()->defaultStyle() );
+ Format tqlayout( this , doc()->styleManager()->defaultStyle() );
if ( row.hasAttributeNS( KoXmlNS::table,"default-cell-style-name" ) )
{
- const QString styleName = row.attributeNS( KoXmlNS::table, "default-cell-style-name", QString::null );
+ const TQString styleName = row.attributeNS( KoXmlNS::table, "default-cell-style-name", TQString() );
if ( !styleName.isEmpty() )
{
Style* const style = styleMap[ styleName ];
if ( style )
{
- layout.setStyle( style );
+ tqlayout.setStyle( style );
isNonDefaultRow = true;
}
}
@@ -6855,18 +6855,18 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
if ( row.hasAttributeNS( KoXmlNS::table, "number-rows-repeated" ) )
{
bool ok = true;
- int n = row.attributeNS( KoXmlNS::table, "number-rows-repeated", QString::null ).toInt( &ok );
+ int n = row.attributeNS( KoXmlNS::table, "number-rows-repeated", TQString() ).toInt( &ok );
if ( ok )
// Some spreadsheet programs may support more rows than KSpread so
// limit the number of repeated rows.
// FIXME POSSIBLE DATA LOSS!
- number = QMIN( n, KS_rowMax - rowIndex + 1 );
+ number = TQMIN( n, KS_rowMax - rowIndex + 1 );
}
bool collapse = false;
if ( row.hasAttributeNS( KoXmlNS::table, "visibility" ) )
{
- const QString visibility = row.attributeNS( KoXmlNS::table, "visibility", QString::null );
+ const TQString visibility = row.attributeNS( KoXmlNS::table, "visibility", TQString() );
if ( visibility == "visible" )
collapse = false;
else if ( visibility == "collapse" )
@@ -6879,7 +6879,7 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
bool insertPageBreak = false;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "break-before" ) )
{
- QString str = styleStack.attributeNS( KoXmlNS::fo, "break-before" );
+ TQString str = styleStack.attributeNS( KoXmlNS::fo, "break-before" );
if ( str == "page" )
{
insertPageBreak = true;
@@ -6908,23 +6908,23 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
{
rowFormat = this->rowFormat( rowIndex );
}
- rowFormat->copy( layout );
+ rowFormat->copy( tqlayout );
++rowIndex;
}
int columnIndex = 0;
- QDomNode cellNode = row.firstChild();
+ TQDomNode cellNode = row.firstChild();
int endRow = min(backupRow+number,KS_rowMax);
while ( !cellNode.isNull() )
{
- QDomElement cellElement = cellNode.toElement();
+ TQDomElement cellElement = cellNode.toElement();
if ( !cellElement.isNull() )
{
columnIndex++;
- QString localName = cellElement.localName();
+ TQString localName = cellElement.localName();
if ( ((localName == "table-cell") || (localName == "covered-table-cell")) && cellElement.namespaceURI() == KoXmlNS::table)
{
@@ -6934,7 +6934,7 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
const bool cellHasStyle = cellElement.hasAttributeNS( KoXmlNS::table, "style-name" );
if ( cellHasStyle )
{
- style = styleMap[ cellElement.attributeNS( KoXmlNS::table , "style-name" , QString::null ) ];
+ style = styleMap[ cellElement.attributeNS( KoXmlNS::table , "style-name" , TQString() ) ];
}
Cell* const cell = nonDefaultCell( columnIndex, backupRow ); // FIXME Stefan: if empty, delete afterwards
@@ -6947,13 +6947,13 @@ bool Sheet::loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoading
if ( (number > 1) || cellElement.hasAttributeNS( KoXmlNS::table, "number-columns-repeated" ) )
{
bool ok = false;
- int n = cellElement.attributeNS( KoXmlNS::table, "number-columns-repeated", QString::null ).toInt( &ok );
+ int n = cellElement.attributeNS( KoXmlNS::table, "number-columns-repeated", TQString() ).toInt( &ok );
if (ok)
// Some spreadsheet programs may support more columns than
// KSpread so limit the number of repeated columns.
// FIXME POSSIBLE DATA LOSS!
- cols = QMIN( n, KS_colMax - columnIndex + 1 );
+ cols = TQMIN( n, KS_colMax - columnIndex + 1 );
if ( !cellHasStyle && ( cell->isEmpty() && cell->format()->comment( columnIndex, backupRow ).isEmpty() ) )
{
@@ -7040,13 +7040,13 @@ bool Sheet::compareRows( int row1, int row2, int& maxCols ) const
void Sheet::saveOasisHeaderFooter( KoXmlWriter &xmlWriter ) const
{
- QString headerLeft = print()->headLeft();
- QString headerCenter= print()->headMid();
- QString headerRight = print()->headRight();
+ TQString headerLeft = print()->headLeft();
+ TQString headerCenter= print()->headMid();
+ TQString headerRight = print()->headRight();
- QString footerLeft = print()->footLeft();
- QString footerCenter= print()->footMid();
- QString footerRight = print()->footRight();
+ TQString footerLeft = print()->footLeft();
+ TQString footerCenter= print()->footMid();
+ TQString footerRight = print()->footRight();
xmlWriter.startElement( "style:header");
if ( ( !headerLeft.isEmpty() )
@@ -7126,16 +7126,16 @@ void Sheet::saveOasisHeaderFooter( KoXmlWriter &xmlWriter ) const
}
-void Sheet::addText( const QString & text, KoXmlWriter & writer ) const
+void Sheet::addText( const TQString & text, KoXmlWriter & writer ) const
{
if ( !text.isEmpty() )
writer.addTextNode( text );
}
-void Sheet::convertPart( const QString & part, KoXmlWriter & xmlWriter ) const
+void Sheet::convertPart( const TQString & part, KoXmlWriter & xmlWriter ) const
{
- QString text;
- QString var;
+ TQString text;
+ TQString var;
bool inVar = false;
uint i = 0;
@@ -7168,11 +7168,11 @@ void Sheet::convertPart( const QString & part, KoXmlWriter & xmlWriter ) const
addText( text, xmlWriter );
//text:p><text:date style:data-style-name="N2" text:date-value="2005-10-02">02/10/2005</text:date>, <text:time>10:20:12</text:time></text:p> "add style" => create new style
#if 0 //FIXME
- QDomElement t = dd.createElement( "text:date" );
+ TQDomElement t = dd.createElement( "text:date" );
t.setAttribute( "text:date-value", "0-00-00" );
// todo: "style:data-style-name", "N2"
- t.appendChild( dd.createTextNode( QDate::currentDate().toString() ) );
- parent.appendChild( t );
+ t.appendChild( dd.createTextNode( TQDate::tqcurrentDate().toString() ) );
+ tqparent.appendChild( t );
#endif
}
else if ( var == "<time>" )
@@ -7180,7 +7180,7 @@ void Sheet::convertPart( const QString & part, KoXmlWriter & xmlWriter ) const
addText( text, xmlWriter );
xmlWriter.startElement( "text:time" );
- xmlWriter.addTextNode( QTime::currentTime().toString() );
+ xmlWriter.addTextNode( TQTime::currentTime().toString() );
xmlWriter.endElement();
}
else if ( var == "<file>" ) // filepath + name
@@ -7275,7 +7275,7 @@ void Sheet::loadOasisSettings( const KoOasisSettings::NamedMap &settings )
int cursorX = items.parseConfigItemInt( "CursorPositionX" );
int cursorY = items.parseConfigItemInt( "CursorPositionY" );
- doc()->loadingInfo()->setCursorPosition( this, QPoint( cursorX, cursorY ) );
+ doc()->loadingInfo()->setCursorPosition( this, TQPoint( cursorX, cursorY ) );
double offsetX = items.parseConfigItemDouble( "xOffset" );
double offsetY = items.parseConfigItemDouble( "yOffset" );
@@ -7314,13 +7314,13 @@ bool Sheet::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles &mainStyles, GenVali
if ( !d->password.isEmpty() )
{
xmlWriter.addAttribute("table:protected", "true" );
- QCString str = KCodecs::base64Encode( d->password );
- xmlWriter.addAttribute("table:protection-key", QString( str.data() ) );/* FIXME !!!!*/
+ TQCString str = KCodecs::base64Encode( d->password );
+ xmlWriter.addAttribute("table:protection-key", TQString( str.data() ) );/* FIXME !!!!*/
}
- QRect _printRange = d->print->printRange();
- if ( _printRange != ( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) ) )
+ TQRect _printRange = d->print->printRange();
+ if ( _printRange != ( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) ) )
{
- QString range= convertRangeToRef( d->name, _printRange );
+ TQString range= convertRangeToRef( d->name, _printRange );
kdDebug()<<" range : "<<range<<endl;
xmlWriter.addAttribute( "table:print-ranges", range );
}
@@ -7334,7 +7334,7 @@ bool Sheet::saveOasis( KoXmlWriter & xmlWriter, KoGenStyles &mainStyles, GenVali
void Sheet::saveOasisPrintStyleLayout( KoGenStyle &style ) const
{
- QString printParameter;
+ TQString printParameter;
if ( d->print->printGrid() )
printParameter="grid ";
if ( d->print->printObjects() )
@@ -7350,19 +7350,19 @@ void Sheet::saveOasisPrintStyleLayout( KoGenStyle &style ) const
}
}
-QString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles )
+TQString Sheet::saveOasisSheetStyleName( KoGenStyles &mainStyles )
{
KoGenStyle pageStyle( Doc::STYLE_PAGE, "table"/*FIXME I don't know if name is sheet*/ );
KoGenStyle pageMaster( Doc::STYLE_PAGEMASTER );
- pageMaster.addAttribute( "style:page-layout-name", d->print->saveOasisSheetStyleLayout( mainStyles ) );
+ pageMaster.addAttribute( "style:page-tqlayout-name", d->print->saveOasisSheetStyleLayout( mainStyles ) );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
saveOasisHeaderFooter(elementWriter);
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
pageMaster.addChildElement( "headerfooter", elementContents );
pageStyle.addAttribute( "style:master-page-name", mainStyles.lookup( pageMaster, "Standard" ) );
@@ -7391,9 +7391,9 @@ void Sheet::saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles
currentColumnStyle.addPropertyPt( "style:column-width", column->dblWidth() );
currentColumnStyle.addProperty( "fo:break-before", "auto" );/*FIXME auto or not ?*/
- //style default layout for column
+ //style default tqlayout for column
KoGenStyle currentDefaultCellStyle; // the type is determined in saveOasisCellStyle
- QString currentDefaultCellStyleName = column->saveOasisCellStyle( currentDefaultCellStyle, mainStyles );
+ TQString currentDefaultCellStyleName = column->saveOasisCellStyle( currentDefaultCellStyle, mainStyles );
bool hide = column->isHide();
@@ -7434,7 +7434,7 @@ void Sheet::saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles
nextColumnStyle.addProperty( "fo:break-before", "auto" );/*FIXME auto or not ?*/
KoGenStyle nextDefaultCellStyle; // the type is determined in saveOasisCellStyle
- QString nextDefaultCellStyleName = nextColumn->saveOasisCellStyle( nextDefaultCellStyle, mainStyles );
+ TQString nextDefaultCellStyleName = nextColumn->saveOasisCellStyle( nextDefaultCellStyle, mainStyles );
if ( hide != nextColumn->isHide() ||
nextDefaultCellStyleName != currentDefaultCellStyleName ||
@@ -7484,7 +7484,7 @@ void Sheet::saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles
// default cell style for row
KoGenStyle currentDefaultCellStyle; // the type is determined in saveOasisCellStyle
- QString currentDefaultCellStyleName = row->saveOasisCellStyle( currentDefaultCellStyle, mainStyles );
+ TQString currentDefaultCellStyleName = row->saveOasisCellStyle( currentDefaultCellStyle, mainStyles );
xmlWriter.startElement( "table:table-row" );
@@ -7532,7 +7532,7 @@ void Sheet::saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles
// default cell style name for next row
KoGenStyle nextDefaultCellStyle; // the type is determined in saveOasisCellStyle
- QString nextDefaultCellStyleName = nextRow->saveOasisCellStyle( nextDefaultCellStyle, mainStyles );
+ TQString nextDefaultCellStyleName = nextRow->saveOasisCellStyle( nextDefaultCellStyle, mainStyles );
// if the formats differ, stop here
if ( isHidden != nextRow->isHide() ||
@@ -7624,7 +7624,7 @@ void Sheet::saveOasisCells( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles, int
}
}
-bool Sheet::loadXML( const QDomElement& sheet )
+bool Sheet::loadXML( const TQDomElement& sheet )
{
bool ok = false;
if ( !doc()->loadingInfo() || !doc()->loadingInfo()->loadTemplate() )
@@ -7638,22 +7638,22 @@ bool Sheet::loadXML( const QDomElement& sheet )
}
bool detectDirection = true;
- d->layoutDirection = LeftToRight;
- QString layoutDir = sheet.attribute( "layoutDirection" );
- if( !layoutDir.isEmpty() )
+ d->tqlayoutDirection = LeftToRight;
+ TQString tqlayoutDir = sheet.attribute( "tqlayoutDirection" );
+ if( !tqlayoutDir.isEmpty() )
{
- if( layoutDir == "rtl" )
+ if( tqlayoutDir == "rtl" )
{
detectDirection = false;
- d->layoutDirection = RightToLeft;
+ d->tqlayoutDirection = RightToLeft;
}
- else if( layoutDir == "ltr" )
+ else if( tqlayoutDir == "ltr" )
{
detectDirection = false;
- d->layoutDirection = LeftToRight;
+ d->tqlayoutDirection = LeftToRight;
}
else
- kdDebug()<<" Direction not implemented : "<<layoutDir<<endl;
+ kdDebug()<<" Direction not implemented : "<<tqlayoutDir<<endl;
}
if( detectDirection )
checkContentDirection( d->name );
@@ -7677,8 +7677,8 @@ bool Sheet::loadXML( const QDomElement& sheet )
}
/* make sure there are no name collisions with the altered name */
- QString testName;
- QString baseName;
+ TQString testName;
+ TQString baseName;
int nameSuffix = 0;
testName = d->name;
@@ -7689,7 +7689,7 @@ bool Sheet::loadXML( const QDomElement& sheet )
while (workbook()->findSheet(testName) != NULL)
{
nameSuffix++;
- testName = baseName + '_' + QString::number(nameSuffix);
+ testName = baseName + '_' + TQString::number(nameSuffix);
}
d->name = testName;
@@ -7774,15 +7774,15 @@ bool Sheet::loadXML( const QDomElement& sheet )
// we just ignore 'ok' - if it didn't work, go on
}
- // Load the paper layout
- QDomElement paper = sheet.namedItem( "paper" ).toElement();
+ // Load the paper tqlayout
+ TQDomElement paper = sheet.namedItem( "paper" ).toElement();
if ( !paper.isNull() )
{
- QString format = paper.attribute( "format" );
- QString orientation = paper.attribute( "orientation" );
+ TQString format = paper.attribute( "format" );
+ TQString orientation = paper.attribute( "orientation" );
// <borders>
- QDomElement borders = paper.namedItem( "borders" ).toElement();
+ TQDomElement borders = paper.namedItem( "borders" ).toElement();
if ( !borders.isNull() )
{
float left = borders.attribute( "left" ).toFloat();
@@ -7791,33 +7791,33 @@ bool Sheet::loadXML( const QDomElement& sheet )
float bottom = borders.attribute( "bottom" ).toFloat();
d->print->setPaperLayout( left, top, right, bottom, format, orientation );
}
- QString hleft, hright, hcenter;
- QString fleft, fright, fcenter;
+ TQString hleft, hright, hcenter;
+ TQString fleft, fright, fcenter;
// <head>
- QDomElement head = paper.namedItem( "head" ).toElement();
+ TQDomElement head = paper.namedItem( "head" ).toElement();
if ( !head.isNull() )
{
- QDomElement left = head.namedItem( "left" ).toElement();
+ TQDomElement left = head.namedItem( "left" ).toElement();
if ( !left.isNull() )
hleft = left.text();
- QDomElement center = head.namedItem( "center" ).toElement();
+ TQDomElement center = head.namedItem( "center" ).toElement();
if ( !center.isNull() )
hcenter = center.text();
- QDomElement right = head.namedItem( "right" ).toElement();
+ TQDomElement right = head.namedItem( "right" ).toElement();
if ( !right.isNull() )
hright = right.text();
}
// <foot>
- QDomElement foot = paper.namedItem( "foot" ).toElement();
+ TQDomElement foot = paper.namedItem( "foot" ).toElement();
if ( !foot.isNull() )
{
- QDomElement left = foot.namedItem( "left" ).toElement();
+ TQDomElement left = foot.namedItem( "left" ).toElement();
if ( !left.isNull() )
fleft = left.text();
- QDomElement center = foot.namedItem( "center" ).toElement();
+ TQDomElement center = foot.namedItem( "center" ).toElement();
if ( !center.isNull() )
fcenter = center.text();
- QDomElement right = foot.namedItem( "right" ).toElement();
+ TQDomElement right = foot.namedItem( "right" ).toElement();
if ( !right.isNull() )
fright = right.text();
}
@@ -7825,7 +7825,7 @@ bool Sheet::loadXML( const QDomElement& sheet )
}
// load print range
- QDomElement printrange = sheet.namedItem( "printrange-rect" ).toElement();
+ TQDomElement printrange = sheet.namedItem( "printrange-rect" ).toElement();
if ( !printrange.isNull() )
{
int left = printrange.attribute( "left-rect" ).toInt();
@@ -7842,7 +7842,7 @@ bool Sheet::loadXML( const QDomElement& sheet )
top = 1;
bottom = KS_rowMax;
}
- d->print->setPrintRange( QRect( QPoint( left, top ), QPoint( right, bottom ) ) );
+ d->print->setPrintRange( TQRect( TQPoint( left, top ), TQPoint( right, bottom ) ) );
}
// load print zoom
@@ -7876,13 +7876,13 @@ bool Sheet::loadXML( const QDomElement& sheet )
}
// Load the cells
- QDomNode n = sheet.firstChild();
+ TQDomNode n = sheet.firstChild();
while( !n.isNull() )
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if ( !e.isNull() )
{
- QString tagName=e.tagName();
+ TQString tagName=e.tagName();
if ( tagName == "cell" )
{
Cell *cell = new Cell( this, 0, 0 );
@@ -7936,21 +7936,21 @@ bool Sheet::loadXML( const QDomElement& sheet )
// load print repeat columns
- QDomElement printrepeatcolumns = sheet.namedItem( "printrepeatcolumns" ).toElement();
+ TQDomElement printrepeatcolumns = sheet.namedItem( "printrepeatcolumns" ).toElement();
if ( !printrepeatcolumns.isNull() )
{
int left = printrepeatcolumns.attribute( "left" ).toInt();
int right = printrepeatcolumns.attribute( "right" ).toInt();
- d->print->setPrintRepeatColumns( qMakePair( left, right ) );
+ d->print->setPrintRepeatColumns( tqMakePair( left, right ) );
}
// load print repeat rows
- QDomElement printrepeatrows = sheet.namedItem( "printrepeatrows" ).toElement();
+ TQDomElement printrepeatrows = sheet.namedItem( "printrepeatrows" ).toElement();
if ( !printrepeatrows.isNull() )
{
int top = printrepeatrows.attribute( "top" ).toInt();
int bottom = printrepeatrows.attribute( "bottom" ).toInt();
- d->print->setPrintRepeatRows( qMakePair( top, bottom ) );
+ d->print->setPrintRepeatRows( tqMakePair( top, bottom ) );
}
if( !sheet.hasAttribute( "borders1.2" ) )
@@ -7960,15 +7960,15 @@ bool Sheet::loadXML( const QDomElement& sheet )
if ( sheet.hasAttribute( "protected" ) )
{
- QString passwd = sheet.attribute( "protected" );
+ TQString passwd = sheet.attribute( "protected" );
if ( passwd.length() > 0 )
{
- QCString str( passwd.latin1() );
+ TQCString str( passwd.latin1() );
d->password = KCodecs::base64Decode( str );
}
else
- d->password = QCString( "" );
+ d->password = TQCString( "" );
}
return true;
@@ -7977,7 +7977,7 @@ bool Sheet::loadXML( const QDomElement& sheet )
bool Sheet::loadChildren( KoStore* _store )
{
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for( ; it.current(); ++it )
{
if ( it.current()->sheet() == this && ( it.current()->getType() == OBJECT_KOFFICE_PART || it.current()->getType() == OBJECT_CHART ) )
@@ -8015,7 +8015,7 @@ void Sheet::removeCellBinding( CellBinding *_bind )
doc()->setModified( true );
}
-Sheet* Sheet::findSheet( const QString & _name )
+Sheet* Sheet::findSheet( const TQString & _name )
{
if ( !workbook() )
return 0L;
@@ -8066,12 +8066,12 @@ void Sheet::updateCellArea(const Region& cellArea)
void Sheet::updateCell( Cell */*cell*/, int _column, int _row )
{
- QRect cellArea(QPoint(_column, _row), QPoint(_column, _row));
+ TQRect cellArea(TQPoint(_column, _row), TQPoint(_column, _row));
updateCellArea(cellArea);
}
-void Sheet::emit_updateRow( RowFormat *_format, int _row, bool repaint )
+void Sheet::emit_updateRow( RowFormat *_format, int _row, bool tqrepaint )
{
if ( doc()->isLoading() )
return;
@@ -8081,11 +8081,11 @@ void Sheet::emit_updateRow( RowFormat *_format, int _row, bool repaint )
if ( c->row() == _row )
c->setLayoutDirtyFlag( true );
- if ( repaint )
+ if ( tqrepaint )
{
- //All the cells in this row, or below this row will need to be repainted
+ //All the cells in this row, or below this row will need to be tqrepainted
//So add that region of the sheet to the paint dirty list.
- setRegionPaintDirty( QRect( 0 , _row , KS_colMax , KS_rowMax) );
+ setRegionPaintDirty( TQRect( 0 , _row , KS_colMax , KS_rowMax) );
emit sig_updateVBorder( this );
emit sig_updateView( this );
@@ -8104,9 +8104,9 @@ void Sheet::emit_updateColumn( ColumnFormat *_format, int _column )
if ( c->column() == _column )
c->setLayoutDirtyFlag( true );
- //All the cells in this column or to the right of it will need to be repainted if the column
+ //All the cells in this column or to the right of it will need to be tqrepainted if the column
//has been resized or hidden, so add that region of the sheet to the paint dirty list.
- setRegionPaintDirty( QRect( _column , 0 , KS_colMax , KS_rowMax) );
+ setRegionPaintDirty( TQRect( _column , 0 , KS_colMax , KS_rowMax) );
emit sig_updateHBorder( this );
emit sig_updateView( this );
@@ -8117,7 +8117,7 @@ void Sheet::emit_updateColumn( ColumnFormat *_format, int _column )
_format->clearDisplayDirtyFlag();
}
-bool Sheet::insertChart( const KoRect& _rect, KoDocumentEntry& _e, const QRect& _data )
+bool Sheet::insertChart( const KoRect& _rect, KoDocumentEntry& _e, const TQRect& _data )
{
kdDebug(36001) << "Creating document" << endl;
KoDocument* dd = _e.createDoc();
@@ -8142,7 +8142,7 @@ bool Sheet::insertChart( const KoRect& _rect, KoDocumentEntry& _e, const QRect&
dataRange.setRange( _data );
dataRange.setSheet( this );
- QString rangeString=dataRange.toString();
+ TQString rangeString=dataRange.toString();
if ( wiz )
wiz->show( rangeString );
@@ -8214,20 +8214,20 @@ bool Sheet::insertPicture( const KoPoint& point , KoPicture& picture )
return true;
}
-bool Sheet::insertPicture( const KoPoint& point, const QPixmap& pixmap )
+bool Sheet::insertPicture( const KoPoint& point, const TQPixmap& pixmap )
{
- QByteArray data;
- QBuffer buffer(data);
+ TQByteArray data;
+ TQBuffer buffer(data);
buffer.open( IO_ReadWrite );
- pixmap.save( &buffer , "PNG" );
+ pixmap.save( TQT_TQIODEVICE(&buffer) , "PNG" );
//Reset the buffer so that KoPicture reads the whole file from the beginning
//(at the moment the read/write position is at the end)
buffer.reset();
KoPicture picture;
- picture.load( &buffer , "PNG" );
+ picture.load( TQT_TQIODEVICE(&buffer) , "PNG" );
doc()->pictureCollection()->insertPicture(picture);
@@ -8247,16 +8247,16 @@ void Sheet::changeChildGeometry( EmbeddedKOfficeObject *_child, const KoRect& _r
emit sig_updateChildGeometry( _child );
}
-bool Sheet::saveChildren( KoStore* _store, const QString &_path )
+bool Sheet::saveChildren( KoStore* _store, const TQString &_path )
{
int i = 0;
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for( ; it.current(); ++it )
{
if ( it.current()->sheet() == this && ( it.current()->getType() == OBJECT_KOFFICE_PART || it.current()->getType() == OBJECT_CHART ) )
{
- QString path = QString( "%1/%2" ).arg( _path ).arg( i++ );
+ TQString path = TQString( "%1/%2" ).tqarg( _path ).tqarg( i++ );
if ( !dynamic_cast<EmbeddedKOfficeObject*>( it.current() )->embeddedObject()->document()->saveToStore( _store, path ) )
return false;
}
@@ -8272,14 +8272,14 @@ bool Sheet::saveOasisObjects( KoStore */*store*/, KoXmlWriter &xmlWriter, KoGenS
bool objectFound = false; // object on this sheet?
EmbeddedObject::KSpreadOasisSaveContext sc( xmlWriter, mainStyles, indexObj, partIndexObj );
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for( ; it.current(); ++it )
{
if ( it.current()->sheet() == this && ( doc()->savingWholeDocument() || it.current()->isSelected() ) )
{
if ( !objectFound )
{
- xmlWriter.startElement( "table:shapes" );
+ xmlWriter.startElement( "table:tqshapes" );
objectFound = true;
}
if ( !it.current()->saveOasisObject(sc) )
@@ -8386,7 +8386,7 @@ void Sheet::removeSheet()
emit sig_SheetRemoved(this);
}
-bool Sheet::setSheetName( const QString& name, bool init, bool /*makeUndo*/ )
+bool Sheet::setSheetName( const TQString& name, bool init, bool /*makeUndo*/ )
{
if ( workbook()->findSheet( name ) )
return false;
@@ -8397,13 +8397,13 @@ bool Sheet::setSheetName( const QString& name, bool init, bool /*makeUndo*/ )
if ( d->name == name )
return true;
- QString old_name = d->name;
+ TQString old_name = d->name;
d->name = name;
if ( init )
return true;
- QPtrListIterator<Sheet> it( workbook()->sheetList() );
+ TQPtrListIterator<Sheet> it( workbook()->sheetList() );
for ( ; it.current(); ++it )
it.current()->changeCellTabName( old_name, name );
@@ -8420,12 +8420,12 @@ bool Sheet::setSheetName( const QString& name, bool init, bool /*makeUndo*/ )
void Sheet::updateLocale()
{
doc()->emitBeginOperation(true);
- setRegionPaintDirty(QRect(QPoint(1,1), QPoint(KS_colMax, KS_rowMax)));
+ setRegionPaintDirty(TQRect(TQPoint(1,1), TQPoint(KS_colMax, KS_rowMax)));
Cell* c = d->cells.firstCell();
for( ;c; c = c->nextCell() )
{
- QString _text = c->text();
+ TQString _text = c->text();
c->setCellText( _text );
}
emit sig_updateView( this );
@@ -8472,7 +8472,7 @@ void Sheet::convertObscuringBorders()
bad of a hack.:-)
*/
Cell* c = d->cells.firstCell();
- QPen topPen, bottomPen, leftPen, rightPen;
+ TQPen topPen, bottomPen, leftPen, rightPen;
for( ;c; c = c->nextCell() )
{
if (c->extraXCells() > 0 || c->extraYCells() > 0)
@@ -8519,7 +8519,7 @@ void Sheet::setRegionPaintDirty( Region const & region )
//kdDebug() << "setRegionPaintDirty "<< static_cast<Region*>(&manipulator)->name(this) << endl;
}
-void Sheet::setRegionPaintDirty( QRect const & range )
+void Sheet::setRegionPaintDirty( TQRect const & range )
{
DilationManipulator manipulator;
manipulator.setSheet(this);
@@ -8535,9 +8535,9 @@ void Sheet::clearPaintDirtyData()
d->paintDirtyList.clear();
}
-bool Sheet::cellIsPaintDirty( QPoint const & cell ) const
+bool Sheet::cellIsPaintDirty( TQPoint const & cell ) const
{
- return d->paintDirtyList.contains(cell);
+ return d->paintDirtyList.tqcontains(cell);
}
#ifndef NDEBUG
@@ -8555,17 +8555,17 @@ void Sheet::printDebug()
cell = cellAt( currentcolumn, currentrow );
if ( !cell->isDefault() && !cell->isEmpty() )
{
- QString cellDescr = Cell::name( currentcolumn, currentrow );
+ TQString cellDescr = Cell::name( currentcolumn, currentrow );
cellDescr = cellDescr.rightJustify( 4,' ' );
- //QString cellDescr = "Cell ";
- //cellDescr += QString::number(currentrow).rightJustify(3,'0') + ',';
- //cellDescr += QString::number(currentcolumn).rightJustify(3,'0') + ' ';
+ //TQString cellDescr = "Cell ";
+ //cellDescr += TQString::number(currentrow).rightJustify(3,'0') + ',';
+ //cellDescr += TQString::number(currentcolumn).rightJustify(3,'0') + ' ';
cellDescr += " | ";
cellDescr += cell->value().type();
cellDescr += " | ";
cellDescr += cell->text();
if ( cell->isFormula() )
- cellDescr += QString(" [result: %1]").arg( cell->value().asString() );
+ cellDescr += TQString(" [result: %1]").tqarg( cell->value().asString() );
kdDebug(36001) << cellDescr << endl;
}
}
diff --git a/kspread/kspread_sheet.h b/kspread/kspread_sheet.h
index 435603ea..08fc0fe0 100644
--- a/kspread/kspread_sheet.h
+++ b/kspread/kspread_sheet.h
@@ -22,14 +22,14 @@
#ifndef KSPREAD_SHEET
#define KSPREAD_SHEET
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qintdict.h>
-#include <qmemarray.h>
-#include <qpen.h>
-#include <qptrlist.h>
-#include <qrect.h>
-#include <qwidget.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqintdict.h>
+#include <tqmemarray.h>
+#include <tqpen.h>
+#include <tqptrlist.h>
+#include <tqrect.h>
+#include <tqwidget.h>
#include <KoDocument.h>
#include <KoDocumentChild.h>
@@ -41,9 +41,9 @@
#include "kspread_global.h"
#include "kspread_object.h"
-class QWidget;
-class QPainter;
-class QDomElement;
+class TQWidget;
+class TQPainter;
+class TQDomElement;
class DCOPObject;
class KPrinter;
class KoDocumentEntry;
@@ -90,14 +90,15 @@ class EmbeddedObject;
/**
* @short This is an abstract base class only.
*/
-class CellBinding : public QObject
+class CellBinding : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- CellBinding( Sheet *_sheet, const QRect& _area );
+ CellBinding( Sheet *_sheet, const TQRect& _area );
virtual ~CellBinding();
- bool contains( int _x, int _y );
+ bool tqcontains( int _x, int _y );
/**
* Call this function if one of the cells covered by this binding ( @see #rect )
* has changed. This will in turn force for example a chart to update.
@@ -108,8 +109,8 @@ public:
virtual void setIgnoreChanges( bool _ignore ) { m_bIgnoreChanges = _ignore; }
- virtual QRect& dataArea() { return m_rctDataArea; }
- virtual void setDataArea( const QRect _rect ) { m_rctDataArea = _rect; }
+ virtual TQRect& dataArea() { return m_rctDataArea; }
+ virtual void setDataArea( const TQRect _rect ) { m_rctDataArea = _rect; }
Sheet* sheet()const { return m_pSheet; }
@@ -117,7 +118,7 @@ signals:
void changed( Cell *_obj );
protected:
- QRect m_rctDataArea;
+ TQRect m_rctDataArea;
Sheet *m_pSheet;
bool m_bIgnoreChanges;
};
@@ -125,9 +126,10 @@ protected:
class ChartBinding : public CellBinding
{
Q_OBJECT
+ TQ_OBJECT
public:
- ChartBinding( Sheet *_sheet, const QRect& _area, EmbeddedChart *_child );
+ ChartBinding( Sheet *_sheet, const TQRect& _area, EmbeddedChart *_child );
virtual ~ChartBinding();
virtual void cellChanged( Cell *_obj );
@@ -146,26 +148,27 @@ private:
* @short This is a class for handling clipboard data
*/
-class TextDrag : public QTextDrag
+class TextDrag : public TQTextDrag
{
Q_OBJECT
+ TQ_OBJECT
public:
- TextDrag( QWidget * dragSource = 0L, const char * name = 0L );
+ TextDrag( TQWidget * dragSource = 0L, const char * name = 0L );
virtual ~TextDrag();
- void setPlain( QString const & _plain ) { setText( _plain ); }
- void setKSpread( QByteArray const & _kspread ) { m_kspread = _kspread; }
+ void setPlain( TQString const & _plain ) { setText( _plain ); }
+ void setKSpread( TQByteArray const & _kspread ) { m_kspread = _kspread; }
- virtual QByteArray encodedData( const char * mime ) const;
+ virtual TQByteArray tqencodedData( const char * mime ) const;
virtual const char* format( int i ) const;
- static bool canDecode( QMimeSource * e );
+ static bool canDecode( TQMimeSource * e );
static const char * selectionMimeType();
protected:
- QByteArray m_kspread;
+ TQByteArray m_kspread;
};
@@ -177,16 +180,17 @@ protected:
/**
*/
-class KSPREAD_EXPORT Sheet : public QObject
+class KSPREAD_EXPORT Sheet : public TQObject
{
friend class Cell;
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( QString sheetName READ sheetName )
- Q_PROPERTY( bool autoCalc READ getAutoCalc WRITE setAutoCalc )
- Q_PROPERTY( bool showGrid READ getShowGrid WRITE setShowGrid )
+ TQ_PROPERTY( TQString sheetName READ sheetName )
+ TQ_PROPERTY( bool autoCalc READ getAutoCalc WRITE setAutoCalc )
+ TQ_PROPERTY( bool showGrid READ getShowGrid WRITE setShowGrid )
public:
enum Direction { Right, Left, Up, Down };
@@ -196,7 +200,7 @@ public:
enum LayoutDirection { LeftToRight, RightToLeft };
- Sheet ( Map* map, const QString &sheetName, const char *_name=0L );
+ Sheet ( Map* map, const TQString &sheetName, const char *_name=0L );
~Sheet();
virtual bool isEmpty( unsigned long int x, unsigned long int y ) const;
@@ -204,12 +208,12 @@ public:
/**
* Return the name of this sheet.
*/
- QString sheetName() const;
+ TQString sheetName() const;
/**
* \deprecated Use sheetName().
*/
- QString tableName() const { return sheetName(); }
+ TQString tableName() const { return sheetName(); }
/**
* Renames a sheet. This will automatically adapt all formulas
@@ -230,37 +234,37 @@ public:
* @see TabBar::renameTab
* @see #sheetName
*/
- bool setSheetName( const QString& name, bool init = false, bool makeUndo=true );
+ bool setSheetName( const TQString& name, bool init = false, bool makeUndo=true );
Map* workbook() const;
Doc* doc() const;
/**
- * Saves the sheet and all it's children in XML format
+ * Saves the sheet and all it's tqchildren in XML format
*/
- virtual QDomElement saveXML( QDomDocument& );
+ virtual TQDomElement saveXML( TQDomDocument& );
/**
- * Loads the sheet and all it's children in XML format
+ * Loads the sheet and all it's tqchildren in XML format
*/
- virtual bool loadXML( const QDomElement& );
+ virtual bool loadXML( const TQDomElement& );
- virtual bool loadOasis( const QDomElement& sheet, KoOasisLoadingContext& oasisContext, QDict<Style>& styleMap );
+ virtual bool loadOasis( const TQDomElement& sheet, KoOasisLoadingContext& oasisContext, TQDict<Style>& styleMap );
virtual bool saveOasis( KoXmlWriter & xmlWriter, KoGenStyles &mainStyles, GenValidationStyles &valStyle, KoStore *store, KoXmlWriter* manifestWriter, int & indexObj, int &partIndexObj );
void saveOasisHeaderFooter( KoXmlWriter &xmlWriter ) const;
- void loadOasisObjects( const QDomElement& e, KoOasisLoadingContext& oasisContext );
+ void loadOasisObjects( const TQDomElement& e, KoOasisLoadingContext& oasisContext );
void loadOasisSettings( const KoOasisSettings::NamedMap &settings );
void saveOasisSettings( KoXmlWriter &settingsWriter ) const;
void saveOasisPrintStyleLayout( KoGenStyle &style ) const;
/**
- * Saves a children
+ * Saves a tqchildren
*/
- virtual bool saveChildren( KoStore* _store, const QString &_path );
+ virtual bool saveChildren( KoStore* _store, const TQString &_path );
bool saveOasisObjects( KoStore *store, KoXmlWriter &xmlWriter, KoGenStyles& mainStyles, int & indexObj, int &partIndexObj );
/**
- * Loads a children
+ * Loads a tqchildren
*/
virtual bool loadChildren( KoStore* _store );
@@ -272,7 +276,7 @@ public:
*
* @return list of selected objets.
*/
- QPtrList<EmbeddedObject> getSelectedObjects();
+ TQPtrList<EmbeddedObject> getSelectedObjects();
/**
@@ -301,13 +305,13 @@ public:
void unifyObjectName( EmbeddedObject *object );
/**
- * Returns the layout direction of the sheet.
+ * Returns the tqlayout direction of the sheet.
*/
- LayoutDirection layoutDirection() const;
+ LayoutDirection tqlayoutDirection() const;
/**
- * Sets the layout direction of the sheet. For example, for Arabic or Hebrew
- * documents, it is possibly to layout the sheet from right to left.
+ * Sets the tqlayout direction of the sheet. For example, for Arabic or Hebrew
+ * documents, it is possibly to tqlayout the sheet from right to left.
*/
void setLayoutDirection( LayoutDirection dir );
@@ -316,10 +320,10 @@ public:
*/
bool isRightToLeft() const;
- void password( QCString & passwd ) const ;
+ void password( TQCString & passwd ) const ;
bool isProtected() const;
- void setProtected( QCString const & passwd );
- bool checkPassword( QCString const & passwd ) const;
+ void setProtected( TQCString const & passwd );
+ bool checkPassword( TQCString const & passwd ) const;
void setDefaultHeight( double height );
void setDefaultWidth( double width );
@@ -363,7 +367,7 @@ public:
/**
* A convenience function.
*/
- Cell* cellAt( const QPoint& _point, bool _scrollbar_update = false )
+ Cell* cellAt( const TQPoint& _point, bool _scrollbar_update = false )
{ return cellAt( _point.x(), _point.y(), _scrollbar_update ); }
/**
* @returns the pointer to the cell that is visible at a certain position. That means If the cell
@@ -386,7 +390,7 @@ public:
* @return a non default Cell for the position.
*/
Cell* nonDefaultCell( int _column, int _row, bool _scrollbar_update = false, Style * _style = 0 );
- Cell* nonDefaultCell( QPoint const & cellRef, bool scroll = false )
+ Cell* nonDefaultCell( TQPoint const & cellRef, bool scroll = false )
{ return nonDefaultCell( cellRef.x(), cellRef.y(), scroll ); }
Cell* defaultCell() const;
@@ -399,7 +403,7 @@ public:
/** retrieve a range of values */
Value valueRange (int col1, int row1, int col2, int row2) const;
- QRect visibleRect( Canvas const * const _canvas ) const;
+ TQRect visibleRect( Canvas const * const _canvas ) const;
int topRow( double _ypos, double &_top, const Canvas *_canvas = 0L ) const;
int bottomRow( double _ypos, const Canvas *_canvas = 0L ) const;
int leftColumn( double _xpos, double &_left, const Canvas *_canvas = 0L ) const;
@@ -464,7 +468,7 @@ public:
void adjustSizeMaxY ( double _y );
/**
- * Sets the @ref Cell::layoutDirtyFlag in all cells.
+ * Sets the @ref Cell::tqlayoutDirtyFlag in all cells.
*/
void setLayoutDirtyFlag();
/**
@@ -511,7 +515,7 @@ public:
* @param area The area within the sheet to guess from
* @param col The column to find the title (or 'header') for.
*/
- QString guessColumnTitle(QRect& area, int col);
+ TQString guessColumnTitle(TQRect& area, int col);
/**
* Attempts to guess the title (or 'header') of a row, within a given area of the sheet
@@ -520,14 +524,14 @@ public:
* @param area The area within the sheet to guess from
* @param row The row to find the title (or 'header') for.
*/
- QString guessRowTitle(QRect& area, int row);
+ TQString guessRowTitle(TQRect& area, int row);
/**
* Sets the contents of the cell at row,column to text
*/
- void setText( int row, int column, const QString& text,
+ void setText( int row, int column, const TQString& text,
bool asString = false );
- void setArrayFormula (Selection *selectionInfo, const QString &_text);
+ void setArrayFormula (Selection *selectionInfo, const TQString &_text);
void setSelectionFont( Selection* selectionInfo,
@@ -562,17 +566,17 @@ public:
void setSelectionVerticalText( Selection* selectionInfo, bool _b);
void setSelectionComment( Selection* selectionInfo,
- const QString &_comment);
+ const TQString &_comment);
void setSelectionRemoveComment(Selection* selectionInfo);
void setSelectionAngle(Selection* selectionInfo, int _value );
void setSelectionTextColor( Selection* selectionInfo,
- const QColor &tbColor );
+ const TQColor &tbColor );
void setSelectionbgColor( Selection* selectionInfo,
- const QColor &bg_Color );
+ const TQColor &bg_Color );
void setSelectionBorderColor( Selection* selectionInfo,
- const QColor &bd_Color );
+ const TQColor &bd_Color );
/**
* @param _marker is used if there is no selection currently.
@@ -607,19 +611,19 @@ public:
void fillSelection( Selection * selectionInfo, int direction );
- void setWordSpelling(Selection* selectionInfo,const QString _listWord );
+ void setWordSpelling(Selection* selectionInfo,const TQString _listWord );
- QString getWordSpelling(Selection* selectionInfo );
+ TQString getWordSpelling(Selection* selectionInfo );
/**
* A convenience function which retrieves the data to be pasted
* from the clipboard.
*/
- void paste( const QRect & pasteArea, bool makeUndo = true,
+ void paste( const TQRect & pasteArea, bool makeUndo = true,
Paste::Mode = Paste::Normal, Paste::Operation = Paste::OverWrite,
bool insert = false, int insertTo = 0, bool pasteFC = false,
- QClipboard::Mode clipboardMode = QClipboard::Clipboard );
- void paste( const QByteArray & data, const QRect & pasteArea,
+ TQClipboard::Mode clipboardMode = TQClipboard::Clipboard );
+ void paste( const TQByteArray & data, const TQRect & pasteArea,
bool makeUndo = false, Paste::Mode= Paste::Normal, Paste::Operation = Paste::OverWrite,
bool insert = false, int insertTo = 0, bool pasteFC = false );
void defaultSelection( Selection* selectionInfo );
@@ -627,17 +631,17 @@ public:
/**
* A function which allows to paste a text plain from the clipboard
*/
- void pasteTextPlain( QString &_text, QRect pasteArea);
+ void pasteTextPlain( TQString &_text, TQRect pasteArea);
- void sortByRow( const QRect &area, int ref_row, SortingOrder );
- void sortByRow( const QRect &area, int key1, int key2, int key3,
+ void sortByRow( const TQRect &area, int ref_row, SortingOrder );
+ void sortByRow( const TQRect &area, int key1, int key2, int key3,
SortingOrder order1, SortingOrder order2, SortingOrder order3,
- QStringList const * firstKey, bool copyFormat, bool headerRow,
+ TQStringList const * firstKey, bool copyFormat, bool headerRow,
Point const & outputPoint, bool respectCase );
- void sortByColumn( const QRect &area, int ref_column, SortingOrder );
- void sortByColumn( const QRect &area, int key1, int key2, int key3,
+ void sortByColumn( const TQRect &area, int ref_column, SortingOrder );
+ void sortByColumn( const TQRect &area, int key1, int key2, int key3,
SortingOrder order1, SortingOrder order2, SortingOrder order3,
- QStringList const * firstKey, bool copyFormat, bool headerCol,
+ TQStringList const * firstKey, bool copyFormat, bool headerCol,
Point const & outputPoint, bool respectCase );
void swapCells( int x1, int y1, int x2, int y2, bool cpFormat );
@@ -647,7 +651,7 @@ public:
* @param cpFormat: if true: cell format gets copied, too
*/
void copyCells( int x1, int y1, int x2, int y2, bool cpFormat );
- void setSeries( const QPoint &_marker, double start, double end, double step, Series mode, Series type );
+ void setSeries( const TQPoint &_marker, double start, double end, double step, Series mode, Series type );
/**
* Moves all cells of the row _marker.y() which are in
@@ -658,11 +662,11 @@ public:
* A reason for returning false is that there was a cell
* in the right most position.
*/
- bool shiftRow( const QRect &_rect, bool makeUndo=true );
- bool shiftColumn( const QRect& rect, bool makeUndo=true );
+ bool shiftRow( const TQRect &_rect, bool makeUndo=true );
+ bool shiftColumn( const TQRect& rect, bool makeUndo=true );
- void unshiftColumn( const QRect& rect, bool makeUndo=true );
- void unshiftRow( const QRect& rect, bool makeUndo=true );
+ void unshiftColumn( const TQRect& rect, bool makeUndo=true );
+ void unshiftRow( const TQRect& rect, bool makeUndo=true );
/**
* Moves all columns which are >= @p col one position to the right and
@@ -715,16 +719,16 @@ public:
/**
* Install borders
*/
- void borderLeft( Selection* selectionInfo, const QColor &_color );
- void borderTop( Selection* selectionInfo, const QColor &_color );
- void borderOutline( Selection* selectionInfo, const QColor &_color );
- void borderAll( Selection* selectionInfo, const QColor &_color );
+ void borderLeft( Selection* selectionInfo, const TQColor &_color );
+ void borderTop( Selection* selectionInfo, const TQColor &_color );
+ void borderOutline( Selection* selectionInfo, const TQColor &_color );
+ void borderAll( Selection* selectionInfo, const TQColor &_color );
void borderRemove( Selection* selectionInfo );
- void borderBottom( Selection* selectionInfo, const QColor &_color );
- void borderRight( Selection* selectionInfo, const QColor &_color );
+ void borderBottom( Selection* selectionInfo, const TQColor &_color );
+ void borderRight( Selection* selectionInfo, const TQColor &_color );
void setConditional( Selection* selectionInfo,
- QValueList<Conditional> const & newConditions );
+ TQValueList<Conditional> const & newConditions );
void setValidity( Selection* selectionInfo, KSpread::Validity tmp );
@@ -805,7 +809,7 @@ public:
void removeSheet();
- QRect selectionCellMerged(const QRect &_sel);
+ TQRect selectionCellMerged(const TQRect &_sel);
/**
* Change name of reference when the user inserts or removes a column,
* a row or a cell (= insertion of a row [or column] on a single column [or row]).
@@ -820,13 +824,13 @@ public:
* @param tabname completes the pos specification by giving the sheet name
* @param undo is the handler of the undo class in case of lost cell references
*/
- void changeNameCellRef( const QPoint & pos, bool fullRowOrColumn,
- ChangeRef ref, QString tabname, int NbCol = 1,
+ void changeNameCellRef( const TQPoint & pos, bool fullRowOrColumn,
+ ChangeRef ref, TQString tabname, int NbCol = 1,
UndoInsertRemoveAction * undo = 0 );
- void refreshRemoveAreaName(const QString &_areaName);
- void refreshChangeAreaName(const QString &_areaName);
+ void refreshRemoveAreaName(const TQString &_areaName);
+ void refreshChangeAreaName(const TQString &_areaName);
/**
@@ -839,7 +843,7 @@ public:
* @param ref see ChangeRef
* @param tabname completes the pos specification by giving the sheet name
*/
- void refreshChart(const QPoint & pos, bool fullRowOrColumn, ChangeRef ref);
+ void refreshChart(const TQPoint & pos, bool fullRowOrColumn, ChangeRef ref);
/**
* Refresh merged cell when you insert or remove row or column
*/
@@ -858,15 +862,15 @@ public:
* @return a painter for the hidden widget ( @ref #widget ).
*
* This function is useful while making formats where you
- * need some QPainter related functions.
+ * need some TQPainter related functions.
*/
- QPainter& painter();
+ TQPainter& painter();
/**
* @return a hidden widget.
*
* @see #painter
*/
- QWidget* widget()const;
+ TQWidget* widget()const;
/**
* @return a flag that indicates whether the sheet should paint the page breaks.
@@ -894,12 +898,12 @@ public:
* The cells we are interested in are in the rectangle '_range'.
* The cells are stored row after row in '_list'.
*/
- bool getCellRectangle( const QRect &_range, QPtrList<Cell> &_list );
+ bool getCellRectangle( const TQRect &_range, TQPtrList<Cell> &_list );
/**
* A convenience function that finds a sheet by its name.
*/
- Sheet *findSheet( const QString & _name );
+ Sheet *findSheet( const TQString & _name );
/**
* Inserts the @p _cell into the sheet.
@@ -926,7 +930,7 @@ public:
* @param era set this to true if you want to encode relative references absolutely (they will
* be switched back to relative references during decoding) - used for cut to clipboard
*/
- QDomDocument saveCellRegion(const Region&, bool copy = false, bool era = false);
+ TQDomDocument saveCellRegion(const Region&, bool copy = false, bool era = false);
/**
* insertTo defined if you insert to the bottom or right
@@ -935,12 +939,12 @@ public:
* insertTo used just for insert/paste an area
* @see #paste
*/
- bool loadSelection( const QDomDocument& doc, const QRect &pasteArea,
+ bool loadSelection( const TQDomDocument& doc, const TQRect &pasteArea,
int _xshift, int _yshift, bool makeUndo,
Paste::Mode = Paste::Normal, Paste::Operation = Paste::OverWrite,
bool insert = false, int insertTo = 0, bool paste = false );
- void loadSelectionUndo( const QDomDocument & doc, const QRect &loadArea,
+ void loadSelectionUndo( const TQDomDocument & doc, const TQRect &loadArea,
int _xshift, int _yshift,bool insert,int insertTo);
/**
@@ -974,7 +978,7 @@ public:
/**
* returns the text to be copied to the clipboard
*/
- QString copyAsText(Selection* selection);
+ TQString copyAsText(Selection* selection);
/**
* Assume that the retangle 'src' was already selected. Then the user clicked on the
@@ -984,12 +988,12 @@ public:
*
* @see #mouseReleaseEvent
*/
- void autofill( QRect &src, QRect &dest );
+ void autofill( TQRect &src, TQRect &dest );
- bool insertChild( const KoRect& _geometry, KoDocumentEntry& );
+ bool insertChild( const KoRect& _tqgeometry, KoDocumentEntry& );
- bool insertChart( const KoRect& _geometry, KoDocumentEntry&, const QRect& _data );
+ bool insertChart( const KoRect& _tqgeometry, KoDocumentEntry&, const TQRect& _data );
/**
@@ -1010,11 +1014,11 @@ public:
* @param point The top-left position for the new picture object in the sheet
* @param pixmap The source pixmap for the new picture
*/
- bool insertPicture( const KoPoint& point, const QPixmap& pixmap );
+ bool insertPicture( const KoPoint& point, const TQPixmap& pixmap );
- void changeChildGeometry( EmbeddedKOfficeObject *_child, const KoRect& _geometry );
+ void changeChildGeometry( EmbeddedKOfficeObject *_child, const KoRect& _tqgeometry );
- const QColorGroup& colorGroup() { return widget()->colorGroup(); }
+ const TQColorGroup& tqcolorGroup() { return widget()->tqcolorGroup(); }
int id() const;
@@ -1029,7 +1033,7 @@ public:
* Checks if the argument _column is out of the current maximum range of the vertical border
* If this is the case, the current maximum value m_iMaxColumn is adjusted and the vertical border
* is resized.
- * Use this function with care, as it involves a repaint of the border, when it is out of range.
+ * Use this function with care, as it involves a tqrepaint of the border, when it is out of range.
*/
void checkRangeHBorder ( int _column );
@@ -1044,7 +1048,7 @@ public:
* Checks if the argument _row is out of the current maximum range of the horizontal border
* If this is the case, the current maximum value m_iMaxRow is adjusted and the horizontal border
* is resized.
- * Use this function with care, as it involves a repaint of the border, when it is out of range.
+ * Use this function with care, as it involves a tqrepaint of the border, when it is out of range.
*/
void checkRangeVBorder ( int _row );
@@ -1053,14 +1057,14 @@ public:
virtual DCOPObject* dcopObject();
- static Sheet* find( int _id );
+ static Sheet* tqfind( int _id );
#ifndef NDEBUG
void printDebug();
#endif
/**
- * Calculates the cell if necessary, makes its layout if necessary,
+ * Calculates the cell if necessary, makes its tqlayout if necessary,
* and force redraw.
* Then it sets the cell's @ref Cell::m_bDisplayDirtyFlag to false.
*/
@@ -1079,17 +1083,17 @@ public:
void update();
/**
- * repaints all visible cells
+ * tqrepaints all visible cells
*/
void updateView();
/**
- * repaints all visible cells in the given rect
+ * tqrepaints all visible cells in the given rect
*/
- void updateView( QRect const & rect );
+ void updateView( TQRect const & rect );
/**
- * repaints all visible cells in the given rect
+ * tqrepaints all visible cells in the given rect
*/
void updateView(Region*);
@@ -1098,7 +1102,7 @@ public:
*/
void refreshView(const Region& region);
- void emit_updateRow( RowFormat *_format, int _row, bool repaint = true );
+ void emit_updateRow( RowFormat *_format, int _row, bool tqrepaint = true );
void emit_updateColumn( ColumnFormat *_format, int _column );
/**
@@ -1107,19 +1111,19 @@ public:
*
* The returned pen has pen style NoPen set.
*/
- const QPen& emptyPen() const ;
- const QBrush& emptyBrush() const;
- const QColor& emptyColor() const;
+ const TQPen& emptyPen() const ;
+ const TQBrush& emptyBrush() const;
+ const TQColor& emptyColor() const;
void updateLocale();
/**
* set a region of the spreadsheet to be 'paint dirty' meaning it
- * needs repainted. This is not a flag on the cell itself since quite
+ * needs tqrepainted. This is not a flag on the cell itself since quite
* often this needs set on a default cell
*/
- void setRegionPaintDirty(QRect const & range);
+ void setRegionPaintDirty(TQRect const & range);
void setRegionPaintDirty(Region const & region);
/**
@@ -1128,9 +1132,9 @@ public:
void clearPaintDirtyData();
/**
- * Test whether a cell needs repainted
+ * Test whether a cell needs tqrepainted
*/
- bool cellIsPaintDirty(QPoint const & cell) const;
+ bool cellIsPaintDirty(TQPoint const & cell) const;
/**
* Retrieve the first used cell in a given column. Can be used in conjunction
@@ -1252,12 +1256,12 @@ signals:
/**
* @see #setSheetName
*/
- void sig_nameChanged( Sheet* sheet, const QString& old_name );
+ void sig_nameChanged( Sheet* sheet, const TQString& old_name );
/**
* Emitted if a certain area of some sheet has to be redrawn.
* That is for example the case when a new child is inserted.
*/
- void sig_polygonInvalidated( const QPointArray& );
+ void sig_polygonInvalidated( const TQPointArray& );
void sig_SheetHidden( Sheet* sheet);
void sig_SheetShown( Sheet* sheet);
@@ -1267,7 +1271,7 @@ signals:
protected slots:
/** react on modification (add/remove) of a named area */
- void slotAreaModified (const QString &name);
+ void slotAreaModified (const TQString &name);
protected:
/** Updates dependencies for all cells on this sheet */
@@ -1278,39 +1282,39 @@ protected:
* When you change name sheet Sheet1 -> Price
* for all cell which refere to Sheet1, this function changes the name.
*/
- void changeCellTabName( QString const & old_name,QString const & new_name );
+ void changeCellTabName( TQString const & old_name,TQString const & new_name );
- bool loadRowFormat( const QDomElement& row, int &rowIndex, KoOasisLoadingContext& oasisContext, QDict<Style>& styleMap );
+ bool loadRowFormat( const TQDomElement& row, int &rowIndex, KoOasisLoadingContext& oasisContext, TQDict<Style>& styleMap );
/**
* Loads the properties of a column from a table:table-column element in an OASIS XML file
* defaultColumnCellStyles is a map from column indicies to the default cell style for that column
*/
- bool loadColumnFormat(const QDomElement& row, const KoOasisStyles& oasisStyles, int & indexCol, const QDict<Style>& styleMap);
- bool loadSheetStyleFormat( QDomElement *style );
+ bool loadColumnFormat(const TQDomElement& row, const KoOasisStyles& oasisStyles, int & indexCol, const TQDict<Style>& styleMap);
+ bool loadSheetStyleFormat( TQDomElement *style );
void loadOasisMasterLayoutPage( KoStyleStack &styleStack );
- QString saveOasisSheetStyleName( KoGenStyles &mainStyles );
+ TQString saveOasisSheetStyleName( KoGenStyles &mainStyles );
void saveOasisColRowCell( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles, int maxCols, int maxRows, GenValidationStyles &valStyle );
void saveOasisCells( KoXmlWriter& xmlWriter, KoGenStyles &mainStyles, int row, int maxCols, GenValidationStyles &valStyle );
- void convertPart( const QString & part, KoXmlWriter & writer ) const;
- void addText( const QString & text, KoXmlWriter & writer ) const;
+ void convertPart( const TQString & part, KoXmlWriter & writer ) const;
+ void addText( const TQString & text, KoXmlWriter & writer ) const;
void maxRowCols( int & maxCols, int & maxRows );
bool compareRows( int row1, int row2, int & maxCols ) const;
- QString getPart( const QDomNode & part );
- void replaceMacro( QString & text, const QString & old, const QString & newS );
+ TQString getPart( const TQDomNode & part );
+ void replaceMacro( TQString & text, const TQString & old, const TQString & newS );
void insertObject( EmbeddedObject *_obj );
/**
* @see #autofill
*/
- void fillSequence( QPtrList<Cell>& _srcList, QPtrList<Cell>& _destList, QPtrList<AutoFillSequence>& _seqList, bool down = true );
+ void fillSequence( TQPtrList<Cell>& _srcList, TQPtrList<Cell>& _destList, TQPtrList<AutoFillSequence>& _seqList, bool down = true );
static int s_id;
- static QIntDict<Sheet>* s_mapSheets;
+ static TQIntDict<Sheet>* s_mapSheets;
public:
// see kspread_sheet.cc for an explanation of this
@@ -1341,7 +1345,7 @@ public:
struct CellWorkerTypeA : public CellWorker
{
CellWorkerTypeA( ) : CellWorker( true, true, false ) { }
- virtual QString getUndoTitle( ) =0;
+ virtual TQString getUndoTitle( ) =0;
class UndoAction* createUndoAction( Doc* doc, Sheet* sheet, const Region& region );
};
@@ -1357,20 +1361,20 @@ private:
*/
bool insertPicture( const KoPoint& point, KoPicture& picture );
- bool FillSequenceWithInterval (QPtrList<Cell>& _srcList,
- QPtrList<Cell>& _destList,
- QPtrList<AutoFillSequence>& _seqList,
+ bool FillSequenceWithInterval (TQPtrList<Cell>& _srcList,
+ TQPtrList<Cell>& _destList,
+ TQPtrList<AutoFillSequence>& _seqList,
bool down);
- void FillSequenceWithCopy (QPtrList<Cell>& _srcList,
- QPtrList<Cell>& _destList,
+ void FillSequenceWithCopy (TQPtrList<Cell>& _srcList,
+ TQPtrList<Cell>& _destList,
bool down);
void convertObscuringBorders();
void checkCellContent(Cell * cell1, Cell * cell2, int & ret);
int adjustColumnHelper(Cell * c, int _col, int _row);
- void checkContentDirection( QString const & name );
- bool objectNameExists( EmbeddedObject *object, QPtrList<EmbeddedObject> &list );
+ void checkContentDirection( TQString const & name );
+ bool objectNameExists( EmbeddedObject *object, TQPtrList<EmbeddedObject> &list );
class Private;
Private* d;
diff --git a/kspread/kspread_sheetprint.cc b/kspread/kspread_sheetprint.cc
index 8b4ce0cc..e66e7b2f 100644
--- a/kspread/kspread_sheetprint.cc
+++ b/kspread/kspread_sheetprint.cc
@@ -34,7 +34,7 @@
#include <kprinter.h>
#include <kdebug.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <pwd.h>
#include <unistd.h>
@@ -69,15 +69,15 @@ SheetPrint::SheetPrint( Sheet* sheet )
m_orientation = PG_PORTRAIT;
m_paperWidth = MM_TO_POINT( KoPageFormat::width( m_paperFormat, m_orientation ) );
m_paperHeight = MM_TO_POINT( KoPageFormat::height( m_paperFormat, m_orientation ) );
- m_printRange = QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) );
+ m_printRange = TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) );
m_lnewPageListX.append( 1 );
m_lnewPageListY.append( 1 );
m_maxCheckedNewPageX = 1;
m_maxCheckedNewPageY = 1;
m_dPrintRepeatColumnsWidth = 0.0;
m_dPrintRepeatRowsHeight = 0.0;
- m_printRepeatColumns = qMakePair( 0, 0 );
- m_printRepeatRows = qMakePair( 0, 0 );
+ m_printRepeatColumns = tqMakePair( 0, 0 );
+ m_printRepeatRows = tqMakePair( 0, 0 );
m_dZoom = 1.0;
m_iPageLimitX = 0;
m_iPageLimitY = 0;
@@ -90,7 +90,7 @@ SheetPrint::~SheetPrint()
// nothing todo yet
}
-QString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
+TQString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
{
KoGenStyle pageLayout( KoGenStyle::STYLE_PAGELAYOUT );
//pageLayout.addAttribute( "style:page-usage", "all" ); FIXME
@@ -108,10 +108,10 @@ QString SheetPrint::saveOasisSheetStyleLayout( KoGenStyles &mainStyles )
}
-QRect SheetPrint::cellsPrintRange()
+TQRect SheetPrint::cellsPrintRange()
{
// Find maximum right/bottom cell with content
- QRect cell_range;
+ TQRect cell_range;
cell_range.setCoords( 1, 1, 1, 1 );
Cell* c = m_pSheet->firstCell();
@@ -126,14 +126,14 @@ QRect SheetPrint::cellsPrintRange()
}
}
- // Now look at the children
- QPtrListIterator<KoDocumentChild> cit( m_pDoc->children() );
+ // Now look at the tqchildren
+ TQPtrListIterator<KoDocumentChild> cit( m_pDoc->tqchildren() );
double dummy;
int i;
for( ; cit.current(); ++cit )
{
- //QRect, because KoChild doesn't use KoRect yet
- QRect bound = cit.current()->boundingRect();
+ //TQRect, because KoChild doesn't use KoRect yet
+ TQRect bound = cit.current()->boundingRect();
i = m_pSheet->leftColumn( bound.right(), dummy );
if ( i > cell_range.right() )
@@ -148,7 +148,7 @@ QRect SheetPrint::cellsPrintRange()
return cell_range;
}
-int SheetPrint::pagesX( const QRect& cellsPrintRange )
+int SheetPrint::pagesX( const TQRect& cellsPrintRange )
{
int pages = 0;
@@ -162,7 +162,7 @@ int SheetPrint::pagesX( const QRect& cellsPrintRange )
return pages;
}
-int SheetPrint::pagesY( const QRect& cellsPrintRange )
+int SheetPrint::pagesY( const TQRect& cellsPrintRange )
{
int pages = 0;
@@ -177,7 +177,7 @@ int SheetPrint::pagesY( const QRect& cellsPrintRange )
}
-bool SheetPrint::pageNeedsPrinting( QRect& page_range )
+bool SheetPrint::pageNeedsPrinting( TQRect& page_range )
{
// bool filled = false;
@@ -190,19 +190,19 @@ bool SheetPrint::pageNeedsPrinting( QRect& page_range )
}
// filled = true;
- //Page empty, but maybe children on it?
+ //Page empty, but maybe tqchildren on it?
- QRect intView = QRect( QPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.left() ) ),
+ TQRect intView = TQRect( TQPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.left() ) ),
m_pDoc->zoomItY( m_pSheet->dblRowPos( page_range.top() ) ) ),
- QPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.right() ) +
+ TQPoint( m_pDoc->zoomItX( m_pSheet->dblColumnPos( page_range.right() ) +
m_pSheet->columnFormat( page_range.right() )->dblWidth() ),
m_pDoc->zoomItY( m_pSheet->dblRowPos( page_range.bottom() ) +
m_pSheet->rowFormat( page_range.bottom() )->dblHeight() ) ) );
- QPtrListIterator<KoDocumentChild> it( m_pDoc->children() );
+ TQPtrListIterator<KoDocumentChild> it( m_pDoc->tqchildren() );
for( ;it.current(); ++it )
{
- QRect bound = it.current()->boundingRect();
+ TQRect bound = it.current()->boundingRect();
if ( bound.intersects( intView ) )
{
return true;
@@ -215,20 +215,20 @@ bool SheetPrint::pageNeedsPrinting( QRect& page_range )
return false;
}
-bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
+bool SheetPrint::print( TQPainter &painter, KPrinter *_printer )
{
kdDebug(36001)<<"PRINTING ...."<<endl;
// Override the current grid pen setting, when set to disable
- QPen gridPen;
+ TQPen gridPen;
bool oldShowGrid = m_pSheet->getShowGrid();
m_pSheet->setShowGrid( m_bPrintGrid );
if ( !m_bPrintGrid )
{
- gridPen = QPen( m_pDoc->gridColor(), 1, Qt::SolidLine );
- QPen nopen;
- nopen.setStyle( NoPen );
- m_pDoc->setGridColor( Qt::white );
+ gridPen = TQPen( m_pDoc->gridColor(), 1, TQt::SolidLine );
+ TQPen nopen;
+ nopen.setStyle( Qt::NoPen );
+ m_pDoc->setGridColor( TQt::white );
}
//Update m_dPrintRepeatColumnsWidth for repeated columns
@@ -242,7 +242,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
updatePrintRepeatRowsHeight();
//Calculate the range to be printed
- QRect cell_range = cellsPrintRange();
+ TQRect cell_range = cellsPrintRange();
kdDebug()<<"cellsPrintRange() :"<<cellsPrintRange()<<endl;
//Ensure, that our newPage lists are generated for the whole sheet to print
//For this we add to the lists the width/height of 1 page
@@ -251,18 +251,18 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
// Find out how many pages need printing
// and which cells to print on which page.
- QValueList<QRect> page_list; //contains the cols and rows of a page
- QValueList<KoRect> page_frame_list; //contains the coordinate range of a page
- QValueList<KoPoint> page_frame_list_offset; //contains the offset of the not repeated area
+ TQValueList<TQRect> page_list; //contains the cols and rows of a page
+ TQValueList<KoRect> page_frame_list; //contains the coordinate range of a page
+ TQValueList<KoPoint> page_frame_list_offset; //contains the offset of the not repeated area
- QValueList<PrintNewPageEntry>::iterator itX;
- QValueList<PrintNewPageEntry>::iterator itY;
+ TQValueList<PrintNewPageEntry>::iterator itX;
+ TQValueList<PrintNewPageEntry>::iterator itY;
for( itX = m_lnewPageListX.begin(); itX != m_lnewPageListX.end(); ++itX )
{
for( itY = m_lnewPageListY.begin(); itY != m_lnewPageListY.end(); ++itY )
{
- QRect page_range( QPoint( (*itX).startItem(), (*itY).startItem() ),
- QPoint( (*itX).endItem(), (*itY).endItem() ) );
+ TQRect page_range( TQPoint( (*itX).startItem(), (*itY).startItem() ),
+ TQPoint( (*itX).endItem(), (*itY).endItem() ) );
kdDebug()<<" page_range :"<<page_range<<endl;
//Append page when there is something to print
if ( pageNeedsPrinting( page_range ) )
@@ -285,8 +285,8 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
m_uprintPages = page_list.count();
- //Cache all object so they only need to be repainted once.
- QPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
+ //Cache all object so they only need to be tqrepainted once.
+ TQPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
for ( ; itObject.current(); ++itObject )
{
EmbeddedObject *obj = itObject.current();
@@ -295,10 +295,10 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
( obj->getType() == OBJECT_CHART && m_bPrintCharts ) ) )
continue;
- QRect zoomRect = m_pDoc->zoomRect( itObject.current()->geometry() );
- QPixmap *p = new QPixmap( zoomRect.size() );
- QPainter painter(p);
- painter.fillRect( p->rect(), QColor("white") );
+ TQRect zoomRect = m_pDoc->zoomRect( itObject.current()->tqgeometry() );
+ TQPixmap *p = new TQPixmap( zoomRect.size() );
+ TQPainter painter(p);
+ painter.fillRect( p->rect(), TQColor("white") );
painter.translate( -zoomRect.x(), -zoomRect.y() ); //we cant to paint at (0,0)
bool const isSelected = itObject.current()->isSelected();
itObject.current()->setSelected( false );
@@ -315,7 +315,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
if ( page_list.count() == 0 )
{
// nothing to print
- painter.setPen( QPen( Qt::black, 1 ) );
+ painter.setPen( TQPen( TQt::black, 1 ) );
painter.drawPoint( 1, 1 );
}
else
@@ -326,9 +326,9 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
//
// Print all pages in the list
//
- QValueList<QRect>::Iterator it = page_list.begin();
- QValueList<KoRect>::Iterator fit = page_frame_list.begin();
- QValueList<KoPoint>::Iterator fito = page_frame_list_offset.begin();
+ TQValueList<TQRect>::Iterator it = page_list.begin();
+ TQValueList<KoRect>::Iterator fit = page_frame_list.begin();
+ TQValueList<KoPoint>::Iterator fito = page_frame_list_offset.begin();
for( ; it != page_list.end(); ++it, ++fit, ++fito, ++pageNo )
{
@@ -357,7 +357,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
}
m_pSheet->setShowGrid( oldShowGrid );
- QValueList<PrintObject *>::iterator it;
+ TQValueList<PrintObject *>::iterator it;
for ( it = m_printObjects.begin(); it != m_printObjects.end(); ++it )
delete (*it)->p;
m_printObjects.clear();
@@ -365,7 +365,7 @@ bool SheetPrint::print( QPainter &painter, KPrinter *_printer )
return ( page_list.count() > 0 );
}
-void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
+void SheetPrint::printPage( TQPainter &_painter, const TQRect& page_range,
const KoRect& view, const KoPoint _childOffset )
{
kdDebug(36001) << "Rect x=" << page_range.left() << " y=" << page_range.top() << ", r="
@@ -373,7 +373,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
<< " offsety: " << _childOffset.y() <<" view-x: "<<view.x()<< endl;
//Don't paint on the page borders
- QRegion clipRegion( m_pDoc->zoomItX( leftBorderPts() ),
+ TQRegion clipRegion( m_pDoc->zoomItX( leftBorderPts() ),
m_pDoc->zoomItY( topBorderPts() ),
m_pDoc->zoomItX( view.width() + _childOffset.x() ),
m_pDoc->zoomItY( view.height() + _childOffset.y() ) );
@@ -385,8 +385,8 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some rows and columns (top left rect)
if ( ( _childOffset.x() != 0.0 ) && ( _childOffset.y() != 0.0 ) )
{
- //QRect(left,top,width,height) <<<< WIDTH AND HEIGHT!!!
- QRect _printRect( m_printRepeatColumns.first, m_printRepeatRows.first,
+ //TQRect(left,top,width,height) <<<< WIDTH AND HEIGHT!!!
+ TQRect _printRect( m_printRepeatColumns.first, m_printRepeatRows.first,
m_printRepeatColumns.second - m_printRepeatColumns.first + 1,
m_printRepeatRows.second - m_printRepeatRows.first + 1);
KoPoint _topLeft( 0.0, 0.0 );
@@ -397,7 +397,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some rows (left rect)
if ( _childOffset.y() != 0 )
{
- QRect _printRect( page_range.left(), m_printRepeatRows.first,
+ TQRect _printRect( page_range.left(), m_printRepeatRows.first,
page_range.right() - page_range.left() + 1,
m_printRepeatRows.second - m_printRepeatRows.first + 1);
KoPoint _topLeft( _childOffset.x(), 0.0 );
@@ -408,7 +408,7 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
//Check if we have to repeat some columns (top right rect)
if ( _childOffset.x() != 0 )
{
- QRect _printRect( m_printRepeatColumns.first, page_range.top(),
+ TQRect _printRect( m_printRepeatColumns.first, page_range.top(),
m_printRepeatColumns.second - m_printRepeatColumns.first + 1,
page_range.bottom() - page_range.top() + 1);
KoPoint _topLeft( 0.0, _childOffset.y() );
@@ -424,9 +424,9 @@ void SheetPrint::printPage( QPainter &_painter, const QRect& page_range,
}
-void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
- const QRect& printRect, const KoRect& view,
- QRegion &clipRegion )
+void SheetPrint::printRect( TQPainter& painter, const KoPoint& topLeft,
+ const TQRect& printRect, const KoRect& view,
+ TQRegion &clipRegion )
{
//
// Draw the cells.
@@ -453,7 +453,7 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
+ m_pSheet->rowFormat( y )->dblHeight() );
KoRect rect( topLeft, bottomRight );
- QValueList<QPoint> mergedCellsPainted;
+ TQValueList<TQPoint> mergedCellsPainted;
for ( int y = regionTop; y <= regionBottom; ++y )
{
row_lay = m_pSheet->rowFormat( y );
@@ -470,10 +470,10 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
bool paintBordersLeft = false;
bool paintBordersTop = false;
- QPen rightPen = cell->effRightBorderPen( x, y );
- QPen leftPen = cell->effLeftBorderPen( x, y );
- QPen bottomPen = cell->effBottomBorderPen( x, y );
- QPen topPen = cell->effTopBorderPen( x, y );
+ TQPen rightPen = cell->effRightBorderPen( x, y );
+ TQPen leftPen = cell->effLeftBorderPen( x, y );
+ TQPen bottomPen = cell->effBottomBorderPen( x, y );
+ TQPen topPen = cell->effTopBorderPen( x, y );
// paint right border if rightmost cell or if the pen is more "worth" than the left border pen
// of the cell on the left or if the cell on the right is not painted. In the latter case get
@@ -552,18 +552,18 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
if (paintBordersTop) paintBorder |= Cell::Border_Top;
if (paintBordersBottom) paintBorder |= Cell::Border_Bottom;
- QPen highlightPen;
+ TQPen highlightPen;
- if ( m_pSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( m_pSheet->tqlayoutDirection()==Sheet::RightToLeft )
cell->paintCell( rect, painter, NULL,
KoPoint( view.width() - xpos -
- col_lay->dblWidth(), ypos ), QPoint( x, y ),
+ col_lay->dblWidth(), ypos ), TQPoint( x, y ),
paintBorder,
rightPen, bottomPen, leftPen, topPen,
mergedCellsPainted);
else
cell->paintCell( rect, painter, NULL,
- KoPoint( xpos, ypos ), QPoint( x, y ),
+ KoPoint( xpos, ypos ), TQPoint( x, y ),
paintBorder,
rightPen, bottomPen, leftPen, topPen,
mergedCellsPainted);
@@ -575,25 +575,25 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
}
//
- // Draw the children
+ // Draw the tqchildren
//
- QRect zoomedView = m_pDoc->zoomRect( view );
- //QPtrListIterator<KoDocumentChild> it( m_pDoc->children() );
- //QPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
+ TQRect zoomedView = m_pDoc->zoomRect( view );
+ //TQPtrListIterator<KoDocumentChild> it( m_pDoc->tqchildren() );
+ //TQPtrListIterator<EmbeddedObject> itObject( m_pDoc->embeddedObjects() );
- QValueList<PrintObject *>::iterator itObject;
+ TQValueList<PrintObject *>::iterator itObject;
for ( itObject = m_printObjects.begin(); itObject != m_printObjects.end(); ++itObject ) {
EmbeddedObject *obj = (*itObject)->obj;
-// QString tmp=QString("Testing child %1/%2 %3/%4 against view %5/%6 %7/%8")
-// .arg(it.current()->contentRect().left())
-// .arg(it.current()->contentRect().top())
-// .arg(it.current()->contentRect().right())
-// .arg(it.current()->contentRect().bottom())
-// .arg(view.left()).arg(view.top()).arg(zoomedView.right()).arg(zoomedView.bottom());
+// TQString tmp=TQString("Testing child %1/%2 %3/%4 against view %5/%6 %7/%8")
+// .tqarg(it.current()->contentRect().left())
+// .tqarg(it.current()->contentRect().top())
+// .tqarg(it.current()->contentRect().right())
+// .tqarg(it.current()->contentRect().bottom())
+// .tqarg(view.left()).tqarg(view.top()).tqarg(zoomedView.right()).tqarg(zoomedView.bottom());
// kdDebug(36001)<<tmp<<" offset "<<_childOffset.x()<<"/"<<_childOffset.y()<<endl;
- KoRect const bound = obj->geometry();
- QRect zoomedBound = m_pDoc->zoomRect( KoRect(bound.left(), bound.top(),
+ KoRect const bound = obj->tqgeometry();
+ TQRect zoomedBound = m_pDoc->zoomRect( KoRect(bound.left(), bound.top(),
bound.width(),
bound.height() ) );
#if 1
@@ -614,15 +614,15 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
-zoomedView.top() + m_pDoc->zoomItY( topLeft.y() ) );
//obj->draw( &painter );
- painter.drawPixmap( m_pDoc->zoomRect( obj->geometry() ).topLeft(), *(*itObject)->p ); //draw the cached object
+ painter.drawPixmap( m_pDoc->zoomRect( obj->tqgeometry() ).topLeft(), *(*itObject)->p ); //draw the cached object
- //painter.fillRect(zoomedBound, QBrush("red")); //for debug purpose
+ //painter.fillRect(zoomedBound, TQBrush("red")); //for debug purpose
painter.restore();
}
}
- //Don't let obscuring cells and children overpaint this area
- clipRegion -= QRegion ( m_pDoc->zoomItX( leftBorderPts() + topLeft.x() ),
+ //Don't let obscuring cells and tqchildren overpaint this area
+ clipRegion -= TQRegion ( m_pDoc->zoomItX( leftBorderPts() + topLeft.x() ),
m_pDoc->zoomItY( topBorderPts() + topLeft.y() ),
m_pDoc->zoomItX( xpos ),
m_pDoc->zoomItY( ypos ) );
@@ -630,15 +630,15 @@ void SheetPrint::printRect( QPainter& painter, const KoPoint& topLeft,
}
-void SheetPrint::printHeaderFooter( QPainter &painter, int pageNo )
+void SheetPrint::printHeaderFooter( TQPainter &painter, int pageNo )
{
double w;
double headFootDistance = MM_TO_POINT( 10.0 /*mm*/ ) / m_dZoom;
- QFont font( "Times" );
+ TQFont font( "Times" );
font.setPointSizeFloat( 0.01 * m_pDoc->zoom() *
/* Font size of 10 */ 10.0 / m_dZoom );
painter.setFont( font );
- QFontMetrics fm = painter.fontMetrics();
+ TQFontMetrics fm = painter.fontMetrics();
// print head line left
w = fm.width( headLeft( pageNo, m_pSheet->sheetName() ) ) / m_dZoom;
@@ -705,7 +705,7 @@ bool SheetPrint::isOnNewPageX( int _column )
}
//Now check if we find the column already in the list
- if ( m_lnewPageListX.findIndex( _column ) != -1 )
+ if ( m_lnewPageListX.tqfindIndex( _column ) != -1 )
{
if( _column > m_maxCheckedNewPageX )
m_maxCheckedNewPageX = _column;
@@ -767,7 +767,7 @@ void SheetPrint::updateNewPageX( int _column )
m_lnewPageListX.append( col );
//Now store into the previous entry the enditem and the width
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
it = findNewPageColumn( startCol );
(*it).setEndItem( col - 1 );
(*it).setSize( x - m_pSheet->columnFormat( col )->dblWidth() );
@@ -820,7 +820,7 @@ bool SheetPrint::isOnNewPageY( int _row )
}
//Now check if we find the row already in the list
- if ( m_lnewPageListY.findIndex( _row ) != -1 )
+ if ( m_lnewPageListY.tqfindIndex( _row ) != -1 )
{
if( _row > m_maxCheckedNewPageY )
m_maxCheckedNewPageY = _row;
@@ -883,7 +883,7 @@ void SheetPrint::updateNewPageY( int _row )
m_lnewPageListY.append( row );
//Now store into the previous entry the enditem and the width
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
it = findNewPageRow( startRow );
(*it).setEndItem( row - 1 );
(*it).setSize( y - m_pSheet->rowFormat( row )->dblHeight() );
@@ -933,12 +933,12 @@ void SheetPrint::updateNewPageListX( int _col )
if ( _col < m_lnewPageListX.last().startItem() )
{
//Find the page entry for this column
- QValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListX.find( _col );
+ TQValueList<PrintNewPageEntry>::iterator it;
+ it = m_lnewPageListX.tqfind( _col );
while ( ( it == m_lnewPageListX.end() ) && _col > 0 )
{
_col--;
- it = m_lnewPageListX.find( _col );
+ it = m_lnewPageListX.tqfind( _col );
}
//Remove later pages
@@ -968,12 +968,12 @@ void SheetPrint::updateNewPageListY( int _row )
if ( _row < m_lnewPageListY.last().startItem() )
{
//Find the page entry for this row
- QValueList<PrintNewPageEntry>::iterator it;
- it = m_lnewPageListY.find( _row );
+ TQValueList<PrintNewPageEntry>::iterator it;
+ it = m_lnewPageListY.tqfind( _row );
while ( ( it == m_lnewPageListY.end() ) && _row > 0 )
{
_row--;
- it = m_lnewPageListY.find( _row );
+ it = m_lnewPageListY.tqfind( _row );
}
//Remove later pages
@@ -1002,18 +1002,18 @@ void SheetPrint::resetPrintRange ()
{
KCommand* command = new DefinePrintRangeCommand( m_pSheet );
m_pDoc->addCommand( command );
- setPrintRange( QRect( QPoint( 1, 1 ), QPoint( KS_colMax, KS_rowMax ) ) );
+ setPrintRange( TQRect( TQPoint( 1, 1 ), TQPoint( KS_colMax, KS_rowMax ) ) );
}
-void SheetPrint::replaceHeadFootLineMacro ( QString &_text, const QString &_search, const QString &_replace )
+void SheetPrint::replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_tqreplace )
{
- if ( _search != _replace )
- _text.replace ( QString( "<" + _search + ">" ), "<" + _replace + ">" );
+ if ( _search != _tqreplace )
+ _text.tqreplace ( TQString( "<" + _search + ">" ), "<" + _tqreplace + ">" );
}
-QString SheetPrint::localizeHeadFootLine ( const QString &_text )
+TQString SheetPrint::localizeHeadFootLine ( const TQString &_text )
{
- QString tmp = _text;
+ TQString tmp = _text;
/*
i18n:
@@ -1035,9 +1035,9 @@ QString SheetPrint::localizeHeadFootLine ( const QString &_text )
}
-QString SheetPrint::delocalizeHeadFootLine ( const QString &_text )
+TQString SheetPrint::delocalizeHeadFootLine ( const TQString &_text )
{
- QString tmp = _text;
+ TQString tmp = _text;
/*
i18n:
@@ -1073,8 +1073,8 @@ KoHeadFoot SheetPrint::headFootLine() const
}
-void SheetPrint::setHeadFootLine( const QString &_headl, const QString &_headm, const QString &_headr,
- const QString &_footl, const QString &_footm, const QString &_footr )
+void SheetPrint::setHeadFootLine( const TQString &_headl, const TQString &_headm, const TQString &_headr,
+ const TQString &_footl, const TQString &_footm, const TQString &_footr )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1137,11 +1137,11 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
setPaperOrientation( _orientation ); //calcPaperSize() is done here already
-// QPtrListIterator<KoView> it( views() );
+// TQPtrListIterator<KoView> it( views() );
// for( ;it.current(); ++it )
// {
// View *v = static_cast<View *>( it.current() );
- // We need to trigger the appropriate repaintings in the cells near the
+ // We need to trigger the appropriate tqrepaintings in the cells near the
// border of the page. The easiest way for this is to turn the borders
// off and on (or on and off if they were off).
// bool bBorderWasShown = v->activeSheet()->isShowPageBorders();
@@ -1154,8 +1154,8 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
float _rightBorder, float _bottomBorder,
- const QString& _paper,
- const QString& _orientation )
+ const TQString& _paper,
+ const TQString& _orientation )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1169,10 +1169,10 @@ void SheetPrint::setPaperLayout( float _leftBorder, float _topBorder,
newOrientation = PG_LANDSCAPE;
- QString paper( _paper );
+ TQString paper( _paper );
if ( paper[0].isDigit() ) // Custom format
{
- const int i = paper.find( 'x' );
+ const int i = paper.tqfind( 'x' );
if ( i < 0 )
{
// We have nothing useful, so assume ISO A4
@@ -1208,22 +1208,22 @@ void SheetPrint::calcPaperSize()
}
}
-QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageColumn( int col )
+TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageColumn( int col )
{
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
for( it = m_lnewPageListX.begin(); it != m_lnewPageListX.end(); ++it )
{
if( (*it).startItem() == col )
return it;
}
return it;
-// QValueList<PrintNewPageEntry>::iterator it;
-// it = m_lnewPageListX.find( startCol );
+// TQValueList<PrintNewPageEntry>::iterator it;
+// it = m_lnewPageListX.tqfind( startCol );
}
-QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
+TQValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
{
- QValueList<PrintNewPageEntry>::iterator it;
+ TQValueList<PrintNewPageEntry>::iterator it;
for( it = m_lnewPageListY.begin(); it != m_lnewPageListY.end(); ++it )
{
if( (*it).startItem() == row )
@@ -1233,11 +1233,11 @@ QValueList<PrintNewPageEntry>::iterator SheetPrint::findNewPageRow( int row )
}
-QString SheetPrint::paperFormatString()const
+TQString SheetPrint::paperFormatString()const
{
if ( m_paperFormat == PG_CUSTOM )
{
- QString tmp;
+ TQString tmp;
tmp.sprintf( "%fx%f", m_paperWidth, m_paperHeight );
return tmp;
}
@@ -1259,31 +1259,31 @@ const char* SheetPrint::orientationString() const
return 0;
}
-QString SheetPrint::completeHeading( const QString &_data, int _page, const QString &_sheet ) const
+TQString SheetPrint::completeHeading( const TQString &_data, int _page, const TQString &_sheet ) const
{
- QString page( QString::number( _page) );
- QString pages( QString::number( m_uprintPages ) );
+ TQString page( TQString::number( _page) );
+ TQString pages( TQString::number( m_uprintPages ) );
- QString pathFileName(m_pDoc->url().path());
+ TQString pathFileName(m_pDoc->url().path());
if ( pathFileName.isNull() )
pathFileName="";
- QString fileName(m_pDoc->url().fileName());
+ TQString fileName(m_pDoc->url().fileName());
if( fileName.isNull())
fileName="";
- QString t(QTime::currentTime().toString());
- QString d(QDate::currentDate().toString());
- QString ta;
+ TQString t(TQTime::currentTime().toString());
+ TQString d(TQDate::tqcurrentDate().toString());
+ TQString ta;
if ( !_sheet.isEmpty() )
ta = _sheet;
KoDocumentInfo * info = m_pDoc->documentInfo();
KoDocumentInfoAuthor * authorPage = static_cast<KoDocumentInfoAuthor *>(info->page( "author" ));
- QString full_name;
- QString email_addr;
- QString organization;
- QString tmp;
+ TQString full_name;
+ TQString email_addr;
+ TQString organization;
+ TQString tmp;
if ( !authorPage )
kdWarning() << "Author information not found in Document Info !" << endl;
else
@@ -1303,44 +1303,44 @@ QString SheetPrint::completeHeading( const QString &_data, int _page, const QStr
full_name=p->pw_gecos;
if( email_addr.isEmpty())
- email_addr = QString("%1@%2").arg(p->pw_name).arg(hostname);
+ email_addr = TQString("%1@%2").tqarg(p->pw_name).tqarg(hostname);
tmp = _data;
int pos = 0;
- while ( ( pos = tmp.find( "<page>", pos ) ) != -1 )
- tmp.replace( pos, 6, page );
+ while ( ( pos = tmp.tqfind( "<page>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, page );
pos = 0;
- while ( ( pos = tmp.find( "<pages>", pos ) ) != -1 )
- tmp.replace( pos, 7, pages );
+ while ( ( pos = tmp.tqfind( "<pages>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, pages );
pos = 0;
- while ( ( pos = tmp.find( "<file>", pos ) ) != -1 )
- tmp.replace( pos, 6, pathFileName );
+ while ( ( pos = tmp.tqfind( "<file>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, pathFileName );
pos = 0;
- while ( ( pos = tmp.find( "<name>", pos ) ) != -1 )
- tmp.replace( pos, 6, fileName );
+ while ( ( pos = tmp.tqfind( "<name>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, fileName );
pos = 0;
- while ( ( pos = tmp.find( "<time>", pos ) ) != -1 )
- tmp.replace( pos, 6, t );
+ while ( ( pos = tmp.tqfind( "<time>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, t );
pos = 0;
- while ( ( pos = tmp.find( "<date>", pos ) ) != -1 )
- tmp.replace( pos, 6, d );
+ while ( ( pos = tmp.tqfind( "<date>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 6, d );
pos = 0;
- while ( ( pos = tmp.find( "<author>", pos ) ) != -1 )
- tmp.replace( pos, 8, full_name );
+ while ( ( pos = tmp.tqfind( "<author>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 8, full_name );
pos = 0;
- while ( ( pos = tmp.find( "<email>", pos ) ) != -1 )
- tmp.replace( pos, 7, email_addr );
+ while ( ( pos = tmp.tqfind( "<email>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, email_addr );
pos = 0;
- while ( ( pos = tmp.find( "<org>", pos ) ) != -1 )
- tmp.replace( pos, 5, organization );
+ while ( ( pos = tmp.tqfind( "<org>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 5, organization );
pos = 0;
- while ( ( pos = tmp.find( "<sheet>", pos ) ) != -1 )
- tmp.replace( pos, 7, ta );
+ while ( ( pos = tmp.tqfind( "<sheet>", pos ) ) != -1 )
+ tmp.tqreplace( pos, 7, ta );
return tmp;
}
-void SheetPrint::setPrintRange( const QRect &_printRange )
+void SheetPrint::setPrintRange( const TQRect &_printRange )
{
if ( m_pSheet->isProtected() )
NO_MODIFICATION_POSSIBLE;
@@ -1355,9 +1355,9 @@ void SheetPrint::setPrintRange( const QRect &_printRange )
//Refresh calculation of stored page breaks, the lower one of old and new
if ( oldLeft != _printRange.left() )
- updateNewPageListX( QMIN( oldLeft, _printRange.left() ) );
+ updateNewPageListX( TQMIN( oldLeft, _printRange.left() ) );
if ( oldTop != _printRange.top() )
- updateNewPageListY( QMIN( oldTop, _printRange.top() ) );
+ updateNewPageListY( TQMIN( oldTop, _printRange.top() ) );
m_pDoc->setModified( true );
@@ -1408,7 +1408,7 @@ void SheetPrint::calculateZoomForPageLimitX()
if( m_dZoom < 1.0 )
m_dZoom = 1.0;
- QRect printRange = cellsPrintRange();
+ TQRect printRange = cellsPrintRange();
updateNewPageX( m_pSheet->rightColumn( m_pSheet->dblColumnPos( printRange.right() ) + prinsheetWidthPts() ) );
int currentPages = pagesX( printRange );
@@ -1470,7 +1470,7 @@ void SheetPrint::calculateZoomForPageLimitY()
if( m_dZoom < 1.0 )
m_dZoom = 1.0;
- QRect printRange = cellsPrintRange();
+ TQRect printRange = cellsPrintRange();
updateNewPageY( m_pSheet->bottomRow( m_pSheet->dblRowPos( printRange.bottom() ) + prinsheetHeightPts() ) );
int currentPages = pagesY( printRange );
@@ -1598,7 +1598,7 @@ void SheetPrint::updatePrintRepeatRowsHeight()
}
-void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
+void SheetPrint::setPrintRepeatColumns( TQPair<int, int> _printRepeatColumns )
{
//Bring arguments in order
if ( _printRepeatColumns.first > _printRepeatColumns.second )
@@ -1619,7 +1619,7 @@ void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
updatePrintRepeatColumnsWidth();
//Refresh calculation of stored page breaks, the lower one of old and new
- updateNewPageListX( QMIN( oldFirst, _printRepeatColumns.first ) );
+ updateNewPageListX( TQMIN( oldFirst, _printRepeatColumns.first ) );
//Refresh view, if page borders are shown
if ( m_pSheet->isShowPageBorders() )
@@ -1628,7 +1628,7 @@ void SheetPrint::setPrintRepeatColumns( QPair<int, int> _printRepeatColumns )
m_pDoc->setModified( true );
}
-void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
+void SheetPrint::setPrintRepeatRows( TQPair<int, int> _printRepeatRows )
{
//Bring arguments in order
if ( _printRepeatRows.first > _printRepeatRows.second )
@@ -1649,7 +1649,7 @@ void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
updatePrintRepeatRowsHeight();
//Refresh calculation of stored page breaks, the lower one of old and new
- updateNewPageListY( QMIN( oldFirst, _printRepeatRows.first ) );
+ updateNewPageListY( TQMIN( oldFirst, _printRepeatRows.first ) );
//Refresh view, if page borders are shown
if ( m_pSheet->isShowPageBorders() )
@@ -1661,7 +1661,7 @@ void SheetPrint::setPrintRepeatRows( QPair<int, int> _printRepeatRows )
void SheetPrint::insertColumn( int col, int nbCol )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int left = m_printRange.left();
int right = m_printRange.right();
@@ -1674,15 +1674,15 @@ void SheetPrint::insertColumn( int col, int nbCol )
//Validity checks
if ( left > KS_colMax ) left = KS_colMax;
if ( right > KS_colMax ) right = KS_colMax;
- setPrintRange( QRect( QPoint( left, m_printRange.top() ),
- QPoint( right, m_printRange.bottom() ) ) );
+ setPrintRange( TQRect( TQPoint( left, m_printRange.top() ),
+ TQPoint( right, m_printRange.bottom() ) ) );
}
}
void SheetPrint::insertRow( int row, int nbRow )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int top = m_printRange.top();
int bottom = m_printRange.bottom();
@@ -1695,15 +1695,15 @@ void SheetPrint::insertRow( int row, int nbRow )
//Validity checks
if ( top > KS_rowMax ) top = KS_rowMax;
if ( bottom > KS_rowMax ) bottom = KS_rowMax;
- setPrintRange( QRect( QPoint( m_printRange.left(), top ),
- QPoint( m_printRange.right(), bottom ) ) );
+ setPrintRange( TQRect( TQPoint( m_printRange.left(), top ),
+ TQPoint( m_printRange.right(), bottom ) ) );
}
}
void SheetPrint::removeColumn( int col, int nbCol )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int left = m_printRange.left();
int right = m_printRange.right();
@@ -1716,8 +1716,8 @@ void SheetPrint::removeColumn( int col, int nbCol )
//Validity checks
if ( left < 1 ) left = 1;
if ( right < 1 ) right = 1;
- setPrintRange( QRect( QPoint( left, m_printRange.top() ),
- QPoint( right, m_printRange.bottom() ) ) );
+ setPrintRange( TQRect( TQPoint( left, m_printRange.top() ),
+ TQPoint( right, m_printRange.bottom() ) ) );
}
//update repeat columns, when it has been defined
@@ -1734,14 +1734,14 @@ void SheetPrint::removeColumn( int col, int nbCol )
//Validity checks
if ( left < 1 ) left = 1;
if ( right < 1 ) right = 1;
- setPrintRepeatColumns ( qMakePair( left, right ) );
+ setPrintRepeatColumns ( tqMakePair( left, right ) );
}
}
void SheetPrint::removeRow( int row, int nbRow )
{
//update print range, when it has been defined
- if ( m_printRange != QRect( QPoint(1, 1), QPoint(KS_colMax, KS_rowMax) ) )
+ if ( m_printRange != TQRect( TQPoint(1, 1), TQPoint(KS_colMax, KS_rowMax) ) )
{
int top = m_printRange.top();
int bottom = m_printRange.bottom();
@@ -1754,8 +1754,8 @@ void SheetPrint::removeRow( int row, int nbRow )
//Validity checks
if ( top < 1 ) top = 1;
if ( bottom < 1 ) bottom = 1;
- setPrintRange( QRect( QPoint( m_printRange.left(), top ),
- QPoint( m_printRange.right(), bottom ) ) );
+ setPrintRange( TQRect( TQPoint( m_printRange.left(), top ),
+ TQPoint( m_printRange.right(), bottom ) ) );
}
//update repeat rows, when it has been defined
@@ -1772,7 +1772,7 @@ void SheetPrint::removeRow( int row, int nbRow )
//Validity checks
if ( top < 1 ) top = 1;
if ( bottom < 1 ) bottom = 1;
- setPrintRepeatRows( qMakePair( top, bottom ) );
+ setPrintRepeatRows( tqMakePair( top, bottom ) );
}
}
diff --git a/kspread/kspread_sheetprint.h b/kspread/kspread_sheetprint.h
index b9b8fa94..99991f75 100644
--- a/kspread/kspread_sheetprint.h
+++ b/kspread/kspread_sheetprint.h
@@ -21,7 +21,7 @@
#ifndef __kspread_sheetprint_h__
#define __kspread_sheetprint_h__
-#include <qobject.h>
+#include <tqobject.h>
#include <koffice_export.h>
#include <KoUnit.h>
@@ -35,21 +35,22 @@ class Selection;
class PrintNewPageEntry;
class PrintObject;
-class KSPREAD_EXPORT SheetPrint : public QObject
+class KSPREAD_EXPORT SheetPrint : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
SheetPrint( Sheet *sheet );
~SheetPrint();
- QString saveOasisSheetStyleLayout( KoGenStyles &mainStyles );
+ TQString saveOasisSheetStyleLayout( KoGenStyles &mainStyles );
/**
* @return false if nothing to print.
*/
- bool print( QPainter &painter, KPrinter *_printer );
+ bool print( TQPainter &painter, KPrinter *_printer );
/**
* @return the prinsheet width of the paper in millimeters.
@@ -140,58 +141,58 @@ public:
/**
* @return the ascii name of the paper format ( like A4, Letter etc. )
*/
- QString paperFormatString()const;
+ TQString paperFormatString()const;
void setPaperFormat(KoFormat _format) {m_paperFormat=_format;}
void setPaperOrientation(KoOrientation _orient);
/**
- * Returns the page layout
+ * Returns the page tqlayout
*/
KoPageLayout paperLayout() const;
/**
- * Changes the paper layout and repaints the currently displayed Sheet.
+ * Changes the paper tqlayout and tqrepaints the currently displayed Sheet.
*/
void setPaperLayout( float _leftBorder, float _topBorder, float _rightBorder, float _bottomBoder,
KoFormat _paper, KoOrientation orientation );
/**
- * A convenience function using a QString as paper format and orientation.
+ * A convenience function using a TQString as paper format and orientation.
*/
void setPaperLayout( float _leftBorder, float _topBorder, float _rightBorder, float _bottomBoder,
- const QString& _paper, const QString& _orientation );
+ const TQString& _paper, const TQString& _orientation );
- QString headLeft( int _p, const QString &_t )const { if ( m_headLeft.isNull() ) return "";
+ TQString headLeft( int _p, const TQString &_t )const { if ( m_headLeft.isNull() ) return "";
return completeHeading( m_headLeft, _p, _t ); }
- QString headMid( int _p, const QString &_t )const { if ( m_headMid.isNull() ) return "";
+ TQString headMid( int _p, const TQString &_t )const { if ( m_headMid.isNull() ) return "";
return completeHeading( m_headMid, _p, _t ); }
- QString headRight( int _p, const QString &_t )const { if ( m_headRight.isNull() ) return "";
+ TQString headRight( int _p, const TQString &_t )const { if ( m_headRight.isNull() ) return "";
return completeHeading( m_headRight, _p, _t ); }
- QString footLeft( int _p, const QString &_t )const { if ( m_footLeft.isNull() ) return "";
+ TQString footLeft( int _p, const TQString &_t )const { if ( m_footLeft.isNull() ) return "";
return completeHeading( m_footLeft, _p, _t ); }
- QString footMid( int _p, const QString &_t )const { if ( m_footMid.isNull() ) return "";
+ TQString footMid( int _p, const TQString &_t )const { if ( m_footMid.isNull() ) return "";
return completeHeading( m_footMid, _p, _t ); }
- QString footRight( int _p, const QString &_t )const { if ( m_footRight.isNull() ) return "";
+ TQString footRight( int _p, const TQString &_t )const { if ( m_footRight.isNull() ) return "";
return completeHeading( m_footRight, _p, _t ); }
- QString headLeft()const { if ( m_headLeft.isNull() ) return ""; return m_headLeft; }
- QString headMid()const { if ( m_headMid.isNull() ) return ""; return m_headMid; }
- QString headRight()const { if ( m_headRight.isNull() ) return ""; return m_headRight; }
- QString footLeft()const { if ( m_footLeft.isNull() ) return ""; return m_footLeft; }
- QString footMid()const { if ( m_footMid.isNull() ) return ""; return m_footMid; }
- QString footRight()const { if ( m_footRight.isNull() ) return ""; return m_footRight; }
+ TQString headLeft()const { if ( m_headLeft.isNull() ) return ""; return m_headLeft; }
+ TQString headMid()const { if ( m_headMid.isNull() ) return ""; return m_headMid; }
+ TQString headRight()const { if ( m_headRight.isNull() ) return ""; return m_headRight; }
+ TQString footLeft()const { if ( m_footLeft.isNull() ) return ""; return m_footLeft; }
+ TQString footMid()const { if ( m_footMid.isNull() ) return ""; return m_footMid; }
+ TQString footRight()const { if ( m_footRight.isNull() ) return ""; return m_footRight; }
/**
* Returns the print range.
- * Returns ( QPoint (1, 1), QPoint(KS_colMax, KS_rowMax) ) if nothing is defined
+ * Returns ( TQPoint (1, 1), TQPoint(KS_colMax, KS_rowMax) ) if nothing is defined
*/
- QRect printRange() const { return m_printRange; }
+ TQRect printRange() const { return m_printRange; }
/**
* Sets the print range.
- * Set it to ( QPoint (1, 1), QPoint(KS_colMax, KS_rowMax) ) to undefine it
+ * Set it to ( TQPoint (1, 1), TQPoint(KS_colMax, KS_rowMax) ) to undefine it
*/
- void setPrintRange( const QRect &_printRange );
+ void setPrintRange( const TQRect &_printRange );
/**
* Return the page limit in X direction.
@@ -231,27 +232,27 @@ public:
/**
* Returns the columns, which are printed on each page.
- * Returns QPair (0, 0) if nothing is defined
+ * Returns TQPair (0, 0) if nothing is defined
*/
- QPair<int, int> printRepeatColumns() const { return m_printRepeatColumns; }
+ TQPair<int, int> printRepeatColumns() const { return m_printRepeatColumns; }
/**
* Sets the columns to be printed on each page.
* Only the x-values of the points are used
- * Set it to QPair (0, 0) to undefine it
+ * Set it to TQPair (0, 0) to undefine it
*/
- void setPrintRepeatColumns( QPair<int, int> _printRepeatColumns );
+ void setPrintRepeatColumns( TQPair<int, int> _printRepeatColumns );
/**
* Returns the rows, which are printed on each page.
- * Returns QPair (0, 0) if nothing is defined
+ * Returns TQPair (0, 0) if nothing is defined
*/
- QPair<int, int> printRepeatRows() const { return m_printRepeatRows; }
+ TQPair<int, int> printRepeatRows() const { return m_printRepeatRows; }
/**
* Sets the rows to be printed on each page.
* Only the y-values of the points are used
- * Set it to QPair (0, 0) to undefine it
+ * Set it to TQPair (0, 0) to undefine it
*/
- void setPrintRepeatRows( QPair<int, int> _printRepeatRows );
+ void setPrintRepeatRows( TQPair<int, int> _printRepeatRows );
/**
* Tests whether _column is the first column of a new page. In this
@@ -289,19 +290,19 @@ public:
/**
* Replaces in _text all _search text parts by _replace text parts.
- * Included is a test to not change if _search == _replace.
+ * Included is a test to not change if _search == _tqreplace.
* The arguments should not include neither the beginning "<" nor the leading ">", this is already
* included internally.
*/
- void replaceHeadFootLineMacro ( QString &_text, const QString &_search, const QString &_replace );
+ void replaceHeadFootLineMacro ( TQString &_text, const TQString &_search, const TQString &_tqreplace );
/**
* Replaces in _text all page macros by the i18n-version of the macros
*/
- QString localizeHeadFootLine ( const QString &_text );
+ TQString localizeHeadFootLine ( const TQString &_text );
/**
* Replaces in _text all i18n-versions of the page macros by the internal version of the macros
*/
- QString delocalizeHeadFootLine ( const QString &_text );
+ TQString delocalizeHeadFootLine ( const TQString &_text );
/**
* Returns the head and foot line of the print out
@@ -311,8 +312,8 @@ public:
/**
* Sets the head and foot line of the print out
*/
- void setHeadFootLine( const QString &_headl, const QString &_headm, const QString &_headr,
- const QString &_footl, const QString &_footm, const QString &_footr );
+ void setHeadFootLine( const TQString &_headl, const TQString &_headm, const TQString &_headr,
+ const TQString &_footl, const TQString &_footm, const TQString &_footr );
/**
* Returns, if the grid shall be shown on printouts
@@ -425,7 +426,7 @@ public:
/**
* Checks wether the page has content to print
*/
- bool pageNeedsPrinting( QRect& page_range );
+ bool pageNeedsPrinting( TQRect& page_range );
signals:
void sig_updateView( Sheet *_sheet );
@@ -441,29 +442,29 @@ private:
*
* @return the last vertical line which was printed plus one.
*
- * @param _page_range QRect defines a rectangle of cells which should be
+ * @param _page_range TQRect defines a rectangle of cells which should be
* painted to the device 'prn'.
*
* @param view KoRect defines the sourrounding rectangle which is
* the printing frame.
*
* @param _childOffset KoPoint used to calculate the correct position of
- * children, if there are repeated columns/rows.
+ * tqchildren, if there are repeated columns/rows.
*/
- void printPage( QPainter &_painter, const QRect& page_range,
+ void printPage( TQPainter &_painter, const TQRect& page_range,
const KoRect& view, const KoPoint _childOffset );
/**
* Prints a rect of cells defined by printRect at the position topLeft.
*/
- void printRect( QPainter &painter, const KoPoint& topLeft,
- const QRect& printRect, const KoRect& view,
- QRegion &clipRegion );
+ void printRect( TQPainter &painter, const KoPoint& topLeft,
+ const TQRect& printRect, const KoRect& view,
+ TQRegion &clipRegion );
/**
* Prints the header and footer on a page
*/
- void printHeaderFooter( QPainter &painter, int pageNo );
+ void printHeaderFooter( TQPainter &painter, int pageNo );
/**
* Looks at @ref #m_paperFormat and calculates @ref #m_paperWidth and @ref #m_paperHeight.
@@ -473,12 +474,12 @@ private:
/**
* Returns the iterator for the column in the newPage list for columns
*/
- QValueList<PrintNewPageEntry>::iterator findNewPageColumn( int col );
+ TQValueList<PrintNewPageEntry>::iterator findNewPageColumn( int col );
/**
* Returns the iterator for the row in the newPage list for rows
*/
- QValueList<PrintNewPageEntry>::iterator findNewPageRow( int row );
+ TQValueList<PrintNewPageEntry>::iterator findNewPageRow( int row );
/**
* Replaces macros like <name>, <file>, <date> etc. in the string and
@@ -487,23 +488,23 @@ private:
* @param _page is the page number for which the heading is produced.
* @param _Sheet is the name of the Sheet for which we generate the headings.
*/
- QString completeHeading( const QString &_data, int _page, const QString &_sheet ) const ;
+ TQString completeHeading( const TQString &_data, int _page, const TQString &_sheet ) const ;
/**
* Returns a rect, which contains the cols and rows to be printed.
- * It respects the printrange and the children
+ * It respects the printrange and the tqchildren
*/
- QRect cellsPrintRange();
+ TQRect cellsPrintRange();
/**
* Returns the numbers of pages in x direction
*/
- int pagesX( const QRect& cellsPrintRange );
+ int pagesX( const TQRect& cellsPrintRange );
/**
* Returns the numbers of pages in y direction
*/
- int pagesY( const QRect& cellsPrintRange );
+ int pagesY( const TQRect& cellsPrintRange );
/**
* The orientation of the paper.
@@ -544,32 +545,32 @@ private:
* Header string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_headLeft;
+ TQString m_headLeft;
/**
* Header string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_headRight;
+ TQString m_headRight;
/**
* Header string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_headMid;
+ TQString m_headMid;
/**
* Footer string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_footLeft;
+ TQString m_footLeft;
/**
* Footer string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_footRight;
+ TQString m_footRight;
/**
* Footer string. The string may contains makros. That means
* it has to be processed before printing.
*/
- QString m_footMid;
+ TQString m_footMid;
/**
* Number of total pages, only calculated during printing
@@ -579,17 +580,17 @@ private:
/**
* Defined prinsheet area
*/
- QRect m_printRange;
+ TQRect m_printRange;
/**
* Repeated columns on printout
*/
- QPair<int, int> m_printRepeatColumns;
+ TQPair<int, int> m_printRepeatColumns;
/**
* Repeated rows on printout
*/
- QPair<int, int> m_printRepeatRows;
+ TQPair<int, int> m_printRepeatRows;
/**
* Show the grid when making printout
@@ -633,12 +634,12 @@ private:
/**
* Stores the new page columns
*/
- QValueList<PrintNewPageEntry> m_lnewPageListX;
+ TQValueList<PrintNewPageEntry> m_lnewPageListX;
/**
* Stores the new page columns
*/
- QValueList<PrintNewPageEntry> m_lnewPageListY;
+ TQValueList<PrintNewPageEntry> m_lnewPageListY;
/**
* Stores internally the maximum column that was checked already
@@ -665,7 +666,7 @@ private:
*/
int m_iPageLimitY;
- QValueList<PrintObject*> m_printObjects;
+ TQValueList<PrintObject*> m_printObjects;
};
@@ -709,7 +710,7 @@ class PrintObject
PrintObject() : obj(0), p(0) {}
EmbeddedObject *obj;
- QPixmap *p;
+ TQPixmap *p;
};
} // namespace KSpread
diff --git a/kspread/kspread_style.cc b/kspread/kspread_style.cc
index 79619793..ef3b9158 100644
--- a/kspread/kspread_style.cc
+++ b/kspread/kspread_style.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qbuffer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
using namespace KSpread;
-static uint calculateValue( QPen const & pen )
+static uint calculateValue( TQPen const & pen )
{
uint n = pen.color().red() + pen.color().green() + pen.color().blue();
@@ -58,18 +58,18 @@ Style::Style()
m_floatColor( Format::AllBlack ),
m_formatType( Generic_format ),
m_fontFlags( 0 ),
- m_bgColor( Qt::white ),
- m_backGroundBrush( Qt::red, Qt::NoBrush ),
+ m_bgColor( TQt::white ),
+ m_backGroundBrush( TQt::red, TQt::NoBrush ),
m_rotateAngle( 0 ),
m_indent( 0.0 ),
m_precision( -1 ),
m_properties( 0 )
{
- QFont f( KoGlobal::defaultFont() );
+ TQFont f( KoGlobal::defaultFont() );
m_fontFamily = f.family();
m_fontSize = f.pointSize();
- QPen pen( Qt::black, 1, Qt::NoPen );
+ TQPen pen( TQt::black, 1, TQt::NoPen );
m_textPen = pen;
m_leftBorderPen = pen;
@@ -134,7 +134,7 @@ bool Style::operator == (const Style& style) const
if ( m_type != style.m_type )
return false;
// NOTE Stefan: Only compare the values of the set features.
- if ( // layout (4)
+ if ( // tqlayout (4)
( m_featuresSet & SAlignX ) && ( m_alignX != style.m_alignX ) ||
( m_featuresSet & SAlignY ) && ( m_alignY != style.m_alignY ) ||
( m_featuresSet & SAngle ) && ( m_rotateAngle != style.m_rotateAngle ) ||
@@ -181,9 +181,9 @@ bool Style::operator == (const Style& style) const
return true;
}
-void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const QDomElement & element )
+void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const TQDomElement & element )
{
- // NOTE Stefan: Don't fill the style stack with the parent styles!
+ // NOTE Stefan: Don't fill the style stack with the tqparent styles!
KoStyleStack styleStack;
styleStack.push( element );
styleStack.setTypeProperties( "table-cell" );
@@ -196,22 +196,22 @@ void Style::loadOasisStyle( KoOasisStyles& oasisStyles, const QDomElement & elem
loadOasisDataStyle( oasisStyles, element );
}
-void Style::loadOasisDataStyle( KoOasisStyles& oasisStyles, const QDomElement& element )
+void Style::loadOasisDataStyle( KoOasisStyles& oasisStyles, const TQDomElement& element )
{
- QString str;
+ TQString str;
if ( element.hasAttributeNS( KoXmlNS::style, "data-style-name" ) )
{
-// kdDebug()<<"element.attribute( style:data-style-name ) :"<<element.attributeNS( KoXmlNS::style, "data-style-name", QString::null )<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].formatStr<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] prefix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].prefix<<endl;
-// kdDebug()<< " oasisStyles.dataFormats()[...] suffix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , QString::null)].suffix<<endl;
+// kdDebug()<<"element.attribute( style:data-style-name ) :"<<element.attributeNS( KoXmlNS::style, "data-style-name", TQString() )<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].formatStr<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] prefix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].prefix<<endl;
+// kdDebug()<< " oasisStyles.dataFormats()[...] suffix :"<< oasisStyles.dataFormats()[element.attributeNS( KoXmlNS::style, "data-style-name" , TQString())].suffix<<endl;
- const QString styleName = element.attributeNS( KoXmlNS::style, "data-style-name", QString::null );
- if ( oasisStyles.dataFormats().contains(styleName) )
+ const TQString styleName = element.attributeNS( KoXmlNS::style, "data-style-name", TQString() );
+ if ( oasisStyles.dataFormats().tqcontains(styleName) )
{
const KoOasisStyles::NumericStyleFormat dataStyle = oasisStyles.dataFormats()[styleName];
- QString tmp = dataStyle.prefix;
+ TQString tmp = dataStyle.prefix;
if ( !tmp.isEmpty() )
{
m_prefix = tmp;
@@ -304,7 +304,7 @@ void Style::loadOasisParagraphProperties( KoOasisStyles& oasisStyles, const KoSt
kdDebug() << "\t paragraph-properties" << endl;
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "text-align" ) )
{
- QString str = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
+ TQString str = styleStack.attributeNS( KoXmlNS::fo, "text-align" );
if ( str == "center" )
m_alignX = Format::Center;
else if ( str == "end" )
@@ -320,7 +320,7 @@ void Style::loadOasisParagraphProperties( KoOasisStyles& oasisStyles, const KoSt
void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoStyleStack& styleStack )
{
- QString str;
+ TQString str;
if ( styleStack.hasAttributeNS( KoXmlNS::style, "vertical-align" ) )
{
m_alignY = Format::UndefinedY;
@@ -338,8 +338,8 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
}
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "background-color" ) )
{
- m_bgColor = QColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) );
- if ( m_bgColor.isValid() && m_bgColor != Qt::white )
+ m_bgColor = TQColor( styleStack.attributeNS( KoXmlNS::fo, "background-color" ) );
+ if ( m_bgColor.isValid() && m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
}
@@ -408,7 +408,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "border" ) )
{
str=styleStack.attributeNS( KoXmlNS::fo, "border" );
- QPen pen = convertOasisStringToPen( str );
+ TQPen pen = convertOasisStringToPen( str );
m_featuresSet |= SLeftBorder;
m_featuresSet |= SRightBorder;
m_featuresSet |= STopBorder;
@@ -459,7 +459,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
{
kdDebug()<<" style name :"<<styleStack.attributeNS( KoXmlNS::draw, "style-name" )<<endl;
- const QDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
+ const TQDomElement * style = oasisStyles.findStyle( styleStack.attributeNS( KoXmlNS::draw, "style-name" ), "graphic" );
kdDebug()<<" style :"<<style<<endl;
if ( style )
{
@@ -468,7 +468,7 @@ void Style::loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoSt
drawStyleStack.setTypeProperties( "graphic" );
if ( drawStyleStack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
{
- const QString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
+ const TQString fill = drawStyleStack.attributeNS( KoXmlNS::draw, "fill" );
kdDebug()<<" load object gradient fill type :"<<fill<<endl;
if ( fill == "solid" || fill == "hatch" )
@@ -547,12 +547,12 @@ void Style::loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleSt
}
if ( styleStack.hasAttributeNS( KoXmlNS::fo, "color" ) )
{
- QColor color = QColor( styleStack.attributeNS( KoXmlNS::fo, "color" ) );
+ TQColor color = TQColor( styleStack.attributeNS( KoXmlNS::fo, "color" ) );
if ( color.isValid() )
{
m_featuresSet |= STextPen;
- m_textPen = QPen( color );
- kdDebug() << "\t\t fo:color: " << color.name() << endl;
+ m_textPen = TQPen( color );
+ kdDebug() << "\t\t fo:color: " << TQString(color.name()) << endl;
}
}
if ( styleStack.hasAttributeNS( KoXmlNS::style, "text-line-through-style" ) )
@@ -568,26 +568,26 @@ void Style::loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleSt
}
}
-static QString convertDateFormat( const QString& date )
+static TQString convertDateFormat( const TQString& date )
{
- QString result = date;
- result.replace( "%Y", "yyyy" );
- result.replace( "%y", "yy" );
- result.replace( "%n", "M" );
- result.replace( "%m", "MM" );
- result.replace( "%e", "d" );
- result.replace( "%d", "dd" );
- result.replace( "%b", "MMM" );
- result.replace( "%B", "MMMM" );
- result.replace( "%a", "ddd" );
- result.replace( "%A", "dddd" );
+ TQString result = date;
+ result.tqreplace( "%Y", "yyyy" );
+ result.tqreplace( "%y", "yy" );
+ result.tqreplace( "%n", "M" );
+ result.tqreplace( "%m", "MM" );
+ result.tqreplace( "%e", "d" );
+ result.tqreplace( "%d", "dd" );
+ result.tqreplace( "%b", "MMM" );
+ result.tqreplace( "%B", "MMMM" );
+ result.tqreplace( "%a", "ddd" );
+ result.tqreplace( "%A", "dddd" );
return result;
}
-FormatType Style::dateType( const QString &_format )
+FormatType Style::dateType( const TQString &_format )
{
- const QString dateFormatShort = convertDateFormat( KGlobal::locale()->dateFormatShort() );
- const QString dateFormat = convertDateFormat( KGlobal::locale()->dateFormat() );
+ const TQString dateFormatShort = convertDateFormat( KGlobal::locale()->dateFormatShort() );
+ const TQString dateFormat = convertDateFormat( KGlobal::locale()->dateFormat() );
if ( _format == "dd-MMM-yy" )
return date_format1;
@@ -647,7 +647,7 @@ FormatType Style::dateType( const QString &_format )
return ShortDate_format;
}
-FormatType Style::timeType( const QString &_format )
+FormatType Style::timeType( const TQString &_format )
{
if ( _format == "h:mm AP" )
return Time_format1;
@@ -669,7 +669,7 @@ FormatType Style::timeType( const QString &_format )
return Time_format;
}
-FormatType Style::fractionType( const QString &_format )
+FormatType Style::fractionType( const TQString &_format )
{
if ( _format == "# ?/2" )
return fraction_half;
@@ -693,14 +693,14 @@ FormatType Style::fractionType( const QString &_format )
return fraction_half;
}
-QString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles,
+TQString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles,
FormatType _style,
- const QString &_prefix, const QString &_postfix,
- int _precision, const QString& symbol )
+ const TQString &_prefix, const TQString &_postfix,
+ int _precision, const TQString& symbol )
{
// kdDebug() << k_funcinfo << endl;
- QString styleName;
- QString valueType;
+ TQString styleName;
+ TQString valueType;
switch( _style )
{
case Number_format:
@@ -801,15 +801,15 @@ QString Style::saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles
return styleName;
}
-QString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType /*_style*/, int _precision,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType /*_style*/, int _precision,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -819,22 +819,22 @@ QString Style::saveOasisStyleNumericNumber( KoGenStyles& mainStyles, FormatType
return KoOasisStyles::saveOasisNumberStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericText( KoGenStyles& /*mainStyles*/, FormatType /*_style*/, int /*_precision*/,
- const QString &/*_prefix*/, const QString &/*_suffix*/ )
+TQString Style::saveOasisStyleNumericText( KoGenStyles& /*mainStyles*/, FormatType /*_style*/, int /*_precision*/,
+ const TQString &/*_prefix*/, const TQString &/*_suffix*/ )
{
return "";
}
-QString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /*_style*/,
- const QString& symbol, int _precision,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /*_style*/,
+ const TQString& symbol, int _precision,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -844,21 +844,21 @@ QString Style::saveOasisStyleNumericMoney( KoGenStyles& mainStyles, FormatType /
return KoOasisStyles::saveOasisCurrencyStyle( mainStyles, format, symbol, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType /*_style*/,
+TQString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType /*_style*/,
int _precision,
- const QString &_prefix, const QString &_suffix )
+ const TQString &_prefix, const TQString &_suffix )
{
//<number:percentage-style style:name="N106" style:family="data-style">
//<number:number number:decimal-places="6" number:min-integer-digits="1"/>
//<number:text>%</number:text>
//</number:percentage-style>
//TODO add decimal etc.
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -869,18 +869,18 @@ QString Style::saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatTy
}
-QString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType /*_style*/,
- const QString &_prefix, const QString _suffix, int _precision )
+TQString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType /*_style*/,
+ const TQString &_prefix, const TQString _suffix, int _precision )
{
//<number:number-style style:name="N60" style:family="data-style">
// <number:scientific-number number:decimal-places="2" number:min-integer-digits="1" number:min-exponent-digits="3"/>
//</number:number-style>
- QString format;
+ TQString format;
if ( _precision == -1 )
format="0E+00";
else
{
- QString tmp;
+ TQString tmp;
for ( int i = 0; i <_precision; i++ )
{
tmp+="0";
@@ -890,10 +890,10 @@ QString Style::saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatTy
return KoOasisStyles::saveOasisScientificStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix )
{
- QString format;
+ TQString format;
bool locale = false;
switch( _style )
{
@@ -991,8 +991,8 @@ QString Style::saveOasisStyleNumericDate( KoGenStyles&mainStyles, FormatType _st
return KoOasisStyles::saveOasisDateStyle( mainStyles, format, locale, _prefix, _suffix );
}
-QString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatType /*_style*/,
- const QString &/*_prefix*/, const QString &/*_suffix*/ )
+TQString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatType /*_style*/,
+ const TQString &/*_prefix*/, const TQString &/*_suffix*/ )
{
//TODO
//<number:date-style style:name="N50" style:family="data-style" number:automatic-order="true" number:format-source="language">
@@ -1011,8 +1011,8 @@ QString Style::saveOasisStyleNumericCustom( KoGenStyles& /*mainStyles*/, FormatT
return "";
}
-QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix )
+TQString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix )
{
//<number:time-style style:name="N42" style:family="data-style">
//<number:hours number:style="long"/>
@@ -1022,7 +1022,7 @@ QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _s
//<number:am-pm/>
//</number:time-style>
- QString format;
+ TQString format;
bool locale = false;
//TODO use format
switch( _style )
@@ -1065,13 +1065,13 @@ QString Style::saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _s
}
-QString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
- const QString &_prefix, const QString _suffix )
+TQString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString _suffix )
{
//<number:number-style style:name="N71" style:family="data-style">
//<number:fraction number:min-integer-digits="0" number:min-numerator-digits="2" number:min-denominator-digits="2"/>
//</number:number-style>
- QString format;
+ TQString format;
switch( _style )
{
case fraction_half:
@@ -1109,7 +1109,7 @@ QString Style::saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatTyp
return KoOasisStyles::saveOasisFractionStyle( mainStyles, format, _prefix, _suffix );
}
-QString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
+TQString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
{
// KSpread::Style is definitly an OASIS auto style,
// but don't overwrite it, if it already exists
@@ -1117,7 +1117,7 @@ QString Style::saveOasis( KoGenStyle& style, KoGenStyles& mainStyles )
style = KoGenStyle( Doc::STYLE_CELL_AUTO, "table-cell" );
// doing the real work
saveOasisStyle( style, mainStyles );
- return QString::null;
+ return TQString();
}
void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
@@ -1131,14 +1131,14 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
// kdDebug() << "AUTO" << endl;
#endif
- // don't store parent, if it's the default style
+ // don't store tqparent, if it's the default style
if ( m_parent && (m_parent->type() != BUILTIN || m_parent->name() != "Default") )
- // FIXME this is not the OASIS parent style's name. it's its display name!
- style.addAttribute( "style:parent-style-name", m_parent->name() );
+ // FIXME this is not the OASIS tqparent style's name. it's its display name!
+ style.addAttribute( "style:tqparent-style-name", m_parent->name() );
if ( featureSet( SAlignX ) && alignX() != Format::Undefined )
{
- QString value;
+ TQString value;
switch( alignX() )
{
case Format::Center:
@@ -1162,7 +1162,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SAlignY ) )
{
- QString value;
+ TQString value;
switch( alignY() )
{
case Format::Top:
@@ -1182,7 +1182,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
style.addProperty( "style:vertical-align", value );
}
- if ( featureSet( SBackgroundColor ) && m_bgColor != QColor() && m_bgColor.isValid() )
+ if ( featureSet( SBackgroundColor ) && m_bgColor != TQColor() && m_bgColor.isValid() )
style.addProperty( "fo:background-color", colorName(m_bgColor) );
if ( featureSet( SMultiRow ) && hasProperty( PMultiRow ) )
@@ -1213,7 +1213,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SAngle ) && m_rotateAngle != 0 )
{
style.addProperty( "style:rotation-align", "none" );
- style.addProperty( "style:rotation-angle", QString::number( -1.0 *m_rotateAngle ) );
+ style.addProperty( "style:rotation-angle", TQString::number( -1.0 *m_rotateAngle ) );
}
if ( featureSet( SIndent ) && m_indent != 0.0 )
@@ -1257,7 +1257,7 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
}
// borders
- // NOTE Stefan: QPen api docs:
+ // NOTE Stefan: TQPen api docs:
// For horizontal and vertical lines a line width of 0 is
// the same as a line width of 1.
// A line width of 0 will produce a 1 pixel wide line using
@@ -1270,28 +1270,28 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
( m_leftBorderPen == m_rightBorderPen ) &&
( m_leftBorderPen == m_bottomBorderPen ) )
{
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
style.addProperty("fo:border", convertOasisPenToString( m_leftBorderPen ) );
}
else
{
- if ( featureSet( SLeftBorder ) && ( m_leftBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SLeftBorder ) && ( m_leftBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-left", convertOasisPenToString( m_leftBorderPen ) );
- if ( featureSet( SRightBorder ) && ( m_rightBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SRightBorder ) && ( m_rightBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-right", convertOasisPenToString( m_rightBorderPen ) );
- if ( featureSet( STopBorder ) && ( m_topBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( STopBorder ) && ( m_topBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-top", convertOasisPenToString( m_topBorderPen ) );
- if ( featureSet( SBottomBorder ) && ( m_bottomBorderPen.style() != Qt::NoPen ) )
+ if ( featureSet( SBottomBorder ) && ( m_bottomBorderPen.style() != TQt::NoPen ) )
style.addProperty( "fo:border-bottom", convertOasisPenToString( m_bottomBorderPen ) );
}
- if ( featureSet( SFallDiagonal ) && ( m_fallDiagonalPen.style() != Qt::NoPen ) )
+ if ( featureSet( SFallDiagonal ) && ( m_fallDiagonalPen.style() != TQt::NoPen ) )
{
style.addProperty("style:diagonal-tl-br", convertOasisPenToString( m_fallDiagonalPen ) );
}
- if ( featureSet( SGoUpDiagonal ) && ( m_goUpDiagonalPen.style() != Qt::NoPen ) )
+ if ( featureSet( SGoUpDiagonal ) && ( m_goUpDiagonalPen.style() != TQt::NoPen ) )
{
style.addProperty("style:diagonal-bl-tr", convertOasisPenToString(m_goUpDiagonalPen ) );
}
@@ -1324,22 +1324,22 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SFontFlag ) && m_fontFlags & (uint) FStrike )
style.addProperty( "style:text-line-through-style", "solid", KoGenStyle::TextType );
- if ( featureSet( STextPen ) && m_textPen.color().isValid() ) // always save; default: m_textPen.style() == Qt::NoPen
+ if ( featureSet( STextPen ) && m_textPen.color().isValid() ) // always save; default: m_textPen.style() == TQt::NoPen
{
style.addProperty("fo:color", colorName(m_textPen.color()), KoGenStyle::TextType );
}
//I don't think there is a reason why the background brush should be saved if it is null,
//but remove the check if it causes problems. -- Robert Knight <robertknight@gmail.com>
- if ( featureSet( SBackgroundBrush ) && (m_backGroundBrush.style() != Qt::NoBrush) )
+ if ( featureSet( SBackgroundBrush ) && (m_backGroundBrush.style() != TQt::NoBrush) )
{
- QString tmp = saveOasisBackgroundStyle( mainStyles, m_backGroundBrush );
+ TQString tmp = saveOasisBackgroundStyle( mainStyles, m_backGroundBrush );
if ( !tmp.isEmpty() )
style.addProperty("draw:style-name", tmp );
}
- QString _prefix;
- QString _postfix;
+ TQString _prefix;
+ TQString _postfix;
int _precision = -1;
if ( featureSet( SPrefix ) && !prefix().isEmpty() )
_prefix = m_prefix;
@@ -1348,27 +1348,27 @@ void Style::saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles )
if ( featureSet( SPrecision ) && m_precision != -1 )
_precision = m_precision;
- QString symbol;
+ TQString symbol;
if ( featureSet( SFormatType ) && m_formatType == Money_format )
{
symbol = Currency::getCurrencyCode(m_currency.type);
}
- QString numericStyle = saveOasisStyleNumeric( style, mainStyles, m_formatType,
+ TQString numericStyle = saveOasisStyleNumeric( style, mainStyles, m_formatType,
_prefix, _postfix, _precision,
symbol );
if ( !numericStyle.isEmpty() )
style.addAttribute( "style:data-style-name", numericStyle );
}
-QString Style::saveOasisBackgroundStyle( KoGenStyles &mainStyles, const QBrush &brush )
+TQString Style::saveOasisBackgroundStyle( KoGenStyles &mainStyles, const TQBrush &brush )
{
KoGenStyle styleobjectauto = KoGenStyle( KoGenStyle::STYLE_GRAPHICAUTO, "graphic" );
KoOasisStyles::saveOasisFillStyle( styleobjectauto, mainStyles, brush );
return mainStyles.lookup( styleobjectauto, "gr" );
}
-void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
+void Style::saveXML( TQDomDocument & doc, TQDomElement & format ) const
{
if ( featureSet( SAlignX ) && alignX() != Format::Undefined )
format.setAttribute( "alignX", (int) m_alignX );
@@ -1376,7 +1376,7 @@ void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
if ( featureSet( SAlignY ) && alignY() != Format::Middle )
format.setAttribute( "alignY", (int) m_alignY );
- if ( featureSet( SBackgroundColor ) && m_bgColor != QColor() && m_bgColor.isValid() )
+ if ( featureSet( SBackgroundColor ) && m_bgColor != TQColor() && m_bgColor.isValid() )
format.setAttribute( "bgcolor", m_bgColor.name() );
if ( featureSet( SMultiRow ) && hasProperty( PMultiRow ) )
@@ -1451,48 +1451,48 @@ void Style::saveXML( QDomDocument & doc, QDomElement & format ) const
if ( featureSet( SLeftBorder ) )
{
- QDomElement left = doc.createElement( "left-border" );
+ TQDomElement left = doc.createElement( "left-border" );
left.appendChild( util_createElement( "pen", m_leftBorderPen, doc ) );
format.appendChild( left );
}
if ( featureSet( STopBorder ) )
{
- QDomElement top = doc.createElement( "top-border" );
+ TQDomElement top = doc.createElement( "top-border" );
top.appendChild( util_createElement( "pen", m_topBorderPen, doc ) );
format.appendChild( top );
}
if ( featureSet( SRightBorder ) )
{
- QDomElement right = doc.createElement( "right-border" );
+ TQDomElement right = doc.createElement( "right-border" );
right.appendChild( util_createElement( "pen", m_rightBorderPen, doc ) );
format.appendChild( right );
}
if ( featureSet( SBottomBorder ) )
{
- QDomElement bottom = doc.createElement( "bottom-border" );
+ TQDomElement bottom = doc.createElement( "bottom-border" );
bottom.appendChild( util_createElement( "pen", m_bottomBorderPen, doc ) );
format.appendChild( bottom );
}
if ( featureSet( SFallDiagonal ) )
{
- QDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
+ TQDomElement fallDiagonal = doc.createElement( "fall-diagonal" );
fallDiagonal.appendChild( util_createElement( "pen", m_fallDiagonalPen, doc ) );
format.appendChild( fallDiagonal );
}
if ( featureSet( SGoUpDiagonal ) )
{
- QDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
+ TQDomElement goUpDiagonal = doc.createElement( "up-diagonal" );
goUpDiagonal.appendChild( util_createElement( "pen", m_goUpDiagonalPen, doc ) );
format.appendChild( goUpDiagonal );
}
}
-bool Style::loadXML( QDomElement & format )
+bool Style::loadXML( TQDomElement & format )
{
bool ok;
if ( format.hasAttribute( "type" ) )
@@ -1527,9 +1527,9 @@ bool Style::loadXML( QDomElement & format )
if ( format.hasAttribute( "bgcolor" ) )
{
- m_bgColor = QColor( format.attribute( "bgcolor" ) );
+ m_bgColor = TQColor( format.attribute( "bgcolor" ) );
// FIXME: Is white always correct here?
- if ( m_bgColor != Qt::white )
+ if ( m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
}
@@ -1646,10 +1646,10 @@ bool Style::loadXML( QDomElement & format )
}
// TODO: remove that...
- QDomElement font = format.namedItem( "font" ).toElement();
+ TQDomElement font = format.namedItem( "font" ).toElement();
if ( !font.isNull() )
{
- QFont f( util_toFont( font ) );
+ TQFont f( util_toFont( font ) );
m_fontFamily = f.family();
m_fontSize = f.pointSize();
if ( f.italic() )
@@ -1693,7 +1693,7 @@ bool Style::loadXML( QDomElement & format )
if ( format.hasAttribute( "brushcolor" ) )
{
- m_backGroundBrush.setColor( QColor( format.attribute( "brushcolor" ) ) );
+ m_backGroundBrush.setColor( TQColor( format.attribute( "brushcolor" ) ) );
// It is not necessary to set this feature just because the color changes.
// FIXME: Or is it?
//m_featuresSet |= SBackgroundBrush;
@@ -1705,86 +1705,86 @@ bool Style::loadXML( QDomElement & format )
if ( !ok )
return false;
- if ( m_backGroundBrush.style() != Qt::NoBrush )
+ if ( m_backGroundBrush.style() != TQt::NoBrush )
m_featuresSet |= SBackgroundBrush;
}
- QDomElement pen = format.namedItem( "pen" ).toElement();
+ TQDomElement pen = format.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_textPen = util_toPen( pen );
- if ( m_textPen.style() != Qt::NoPen )
+ if ( m_textPen.style() != TQt::NoPen )
m_featuresSet |= STextPen;
}
- QDomElement left = format.namedItem( "left-border" ).toElement();
+ TQDomElement left = format.namedItem( "left-border" ).toElement();
if ( !left.isNull() )
{
- QDomElement pen = left.namedItem( "pen" ).toElement();
+ TQDomElement pen = left.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_leftBorderPen = util_toPen( pen );
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
m_featuresSet |= SLeftBorder;
}
}
- QDomElement top = format.namedItem( "top-border" ).toElement();
+ TQDomElement top = format.namedItem( "top-border" ).toElement();
if ( !top.isNull() )
{
- QDomElement pen = top.namedItem( "pen" ).toElement();
+ TQDomElement pen = top.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_topBorderPen = util_toPen( pen );
- if ( m_topBorderPen.style() != Qt::NoPen )
+ if ( m_topBorderPen.style() != TQt::NoPen )
m_featuresSet |= STopBorder;
}
}
- QDomElement right = format.namedItem( "right-border" ).toElement();
+ TQDomElement right = format.namedItem( "right-border" ).toElement();
if ( !right.isNull() )
{
- QDomElement pen = right.namedItem( "pen" ).toElement();
+ TQDomElement pen = right.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_rightBorderPen = util_toPen( pen );
- if ( m_rightBorderPen.style() != Qt::NoPen )
+ if ( m_rightBorderPen.style() != TQt::NoPen )
m_featuresSet |= SRightBorder;
}
}
- QDomElement bottom = format.namedItem( "bottom-border" ).toElement();
+ TQDomElement bottom = format.namedItem( "bottom-border" ).toElement();
if ( !bottom.isNull() )
{
- QDomElement pen = bottom.namedItem( "pen" ).toElement();
+ TQDomElement pen = bottom.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_bottomBorderPen = util_toPen( pen );
- if ( m_bottomBorderPen.style() != Qt::NoPen )
+ if ( m_bottomBorderPen.style() != TQt::NoPen )
m_featuresSet |= SBottomBorder;
}
}
- QDomElement fallDiagonal = format.namedItem( "fall-diagonal" ).toElement();
+ TQDomElement fallDiagonal = format.namedItem( "fall-diagonal" ).toElement();
if ( !fallDiagonal.isNull() )
{
- QDomElement pen = fallDiagonal.namedItem( "pen" ).toElement();
+ TQDomElement pen = fallDiagonal.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_fallDiagonalPen = util_toPen( pen );
- if ( m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( m_fallDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SFallDiagonal;
}
}
- QDomElement goUpDiagonal = format.namedItem( "up-diagonal" ).toElement();
+ TQDomElement goUpDiagonal = format.namedItem( "up-diagonal" ).toElement();
if ( !goUpDiagonal.isNull() )
{
- QDomElement pen = goUpDiagonal.namedItem( "pen" ).toElement();
+ TQDomElement pen = goUpDiagonal.namedItem( "pen" ).toElement();
if ( !pen.isNull() )
{
m_goUpDiagonalPen = util_toPen( pen );
- if ( m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( m_goUpDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SGoUpDiagonal;
}
}
@@ -1803,14 +1803,14 @@ bool Style::loadXML( QDomElement & format )
return true;
}
-void Style::setParent( CustomStyle * parent )
+void Style::setParent( CustomStyle * tqparent )
{
- m_parent = parent;
+ m_parent = tqparent;
if ( m_parent )
m_parentName = m_parent->name();
}
-CustomStyle * Style::parent() const
+CustomStyle * Style::tqparent() const
{
return m_parent;
}
@@ -1871,7 +1871,7 @@ bool Style::hasFeature( FlagsSet f, bool withoutParent ) const
{
bool b = ( m_featuresSet & (uint) f );
- // check if feature is defined here or at parent level
+ // check if feature is defined here or at tqparent level
if ( m_parent && !withoutParent )
b = ( m_parent->hasFeature( f, withoutParent ) ? true : b );
@@ -1883,13 +1883,13 @@ void Style::clearFeature( FlagsSet f )
m_featuresSet &= ~(uint)f;
}
-QFont Style::font() const
+TQFont Style::font() const
{
- QString family = fontFamily();
+ TQString family = fontFamily();
int size = fontSize();
uint ff = fontFlags();
- QFont f( family, size );
+ TQFont f( family, size );
if ( ff & (uint) FBold )
f.setBold( true );
if ( ff & (uint) FItalic )
@@ -1902,7 +1902,7 @@ QFont Style::font() const
return f;
}
-QString const & Style::fontFamily() const
+TQString const & Style::fontFamily() const
{
return ( !m_parent || featureSet( SFontFamily ) ? m_fontFamily : m_parent->fontFamily() );
}
@@ -1917,42 +1917,42 @@ int Style::fontSize() const
return ( !m_parent || featureSet( SFontSize ) ? m_fontSize : m_parent->fontSize() );
}
-QPen const & Style::pen() const
+TQPen const & Style::pen() const
{
return ( !m_parent || featureSet( STextPen ) ? m_textPen : m_parent->pen() );
}
-QColor const & Style::bgColor() const
+TQColor const & Style::bgColor() const
{
return ( !m_parent || featureSet( SBackgroundColor ) ? m_bgColor : m_parent->bgColor() );
}
-QPen const & Style::rightBorderPen() const
+TQPen const & Style::rightBorderPen() const
{
return ( !m_parent || featureSet( SRightBorder ) ? m_rightBorderPen : m_parent->rightBorderPen() );
}
-QPen const & Style::bottomBorderPen() const
+TQPen const & Style::bottomBorderPen() const
{
return ( !m_parent || featureSet( SBottomBorder ) ? m_bottomBorderPen : m_parent->bottomBorderPen() );
}
-QPen const & Style::leftBorderPen() const
+TQPen const & Style::leftBorderPen() const
{
return ( !m_parent || featureSet( SLeftBorder ) ? m_leftBorderPen : m_parent->leftBorderPen() );
}
-QPen const & Style::topBorderPen() const
+TQPen const & Style::topBorderPen() const
{
return ( !m_parent || featureSet( STopBorder ) ? m_topBorderPen : m_parent->topBorderPen() );
}
-QPen const & Style::fallDiagonalPen() const
+TQPen const & Style::fallDiagonalPen() const
{
return ( !m_parent || featureSet( SFallDiagonal ) ? m_fallDiagonalPen : m_parent->fallDiagonalPen() );
}
-QPen const & Style::goUpDiagonalPen() const
+TQPen const & Style::goUpDiagonalPen() const
{
return ( !m_parent || featureSet( SGoUpDiagonal ) ? m_goUpDiagonalPen : m_parent->goUpDiagonalPen() );
}
@@ -1972,7 +1972,7 @@ double Style::indent() const
return ( !m_parent || featureSet( SIndent ) ? m_indent : m_parent->indent() );
}
-QBrush const & Style::backGroundBrush() const
+TQBrush const & Style::backGroundBrush() const
{
return ( !m_parent || featureSet( SBackgroundBrush ) ? m_backGroundBrush : m_parent->backGroundBrush() );
}
@@ -2007,17 +2007,17 @@ Format::Currency const & Style::currency() const
return ( !m_parent || featureSet( SFormatType ) ? m_currency : m_parent->currency() );
}
-QString const & Style::strFormat() const
+TQString const & Style::strFormat() const
{
return ( !m_parent || featureSet( SCustomFormat ) ? m_strFormat : m_parent->strFormat() );
}
-QString const & Style::prefix() const
+TQString const & Style::prefix() const
{
return ( !m_parent || featureSet( SPrefix ) ? m_prefix : m_parent->prefix() );
}
-QString const & Style::postfix() const
+TQString const & Style::postfix() const
{
return ( !m_parent || featureSet( SPostfix ) ? m_postfix : m_parent->postfix() );
}
@@ -2054,7 +2054,7 @@ Style * Style::setAlignY( Format::AlignY alignY )
return this;
}
-Style * Style::setFont( QFont const & f )
+Style * Style::setFont( TQFont const & f )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2163,7 +2163,7 @@ Style * Style::setFont( QFont const & f )
return this;
}
-Style * Style::setFontFamily( QString const & fam )
+Style * Style::setFontFamily( TQString const & fam )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2226,146 +2226,146 @@ Style * Style::setFontSize( int size )
return this;
}
-Style * Style::setPen( QPen const & pen )
+Style * Style::setPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_textPen = pen;
- if ( style->m_textPen.style() != Qt::NoPen )
+ if ( style->m_textPen.style() != TQt::NoPen )
style->m_featuresSet |= STextPen;
return style;
}
m_textPen = pen;
- if ( m_textPen.style() != Qt::NoPen )
+ if ( m_textPen.style() != TQt::NoPen )
m_featuresSet |= STextPen;
return this;
}
-Style * Style::setBgColor( QColor const & color )
+Style * Style::setBgColor( TQColor const & color )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_bgColor = color;
- if ( style->m_bgColor != Qt::white )
+ if ( style->m_bgColor != TQt::white )
style->m_featuresSet |= SBackgroundColor;
return style;
}
m_bgColor = color;
- if ( m_bgColor != Qt::white )
+ if ( m_bgColor != TQt::white )
m_featuresSet |= SBackgroundColor;
return this;
}
-Style * Style::setRightBorderPen( QPen const & pen )
+Style * Style::setRightBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_rightBorderPen = pen;
style->m_rightPenValue = calculateValue( pen );
- if ( style->m_rightBorderPen.style() != Qt::NoPen )
+ if ( style->m_rightBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SRightBorder;
return style;
}
m_rightBorderPen = pen;
m_rightPenValue = calculateValue( pen );
- if ( m_rightBorderPen.style() != Qt::NoPen )
+ if ( m_rightBorderPen.style() != TQt::NoPen )
m_featuresSet |= SRightBorder;
return this;
}
-Style * Style::setBottomBorderPen( QPen const & pen )
+Style * Style::setBottomBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_bottomBorderPen = pen;
style->m_bottomPenValue = calculateValue( pen );
- if ( style->m_bottomBorderPen.style() != Qt::NoPen )
+ if ( style->m_bottomBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SBottomBorder;
return style;
}
m_bottomBorderPen = pen;
m_bottomPenValue = calculateValue( pen );
- if ( m_bottomBorderPen.style() != Qt::NoPen )
+ if ( m_bottomBorderPen.style() != TQt::NoPen )
m_featuresSet |= SBottomBorder;
return this;
}
-Style * Style::setLeftBorderPen( QPen const & pen )
+Style * Style::setLeftBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_leftBorderPen = pen;
style->m_leftPenValue = calculateValue( pen );
- if ( style->m_leftBorderPen.style() != Qt::NoPen )
+ if ( style->m_leftBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= SLeftBorder;
return style;
}
m_leftBorderPen = pen;
m_leftPenValue = calculateValue( pen );
- if ( m_leftBorderPen.style() != Qt::NoPen )
+ if ( m_leftBorderPen.style() != TQt::NoPen )
m_featuresSet |= SLeftBorder;
return this;
}
-Style * Style::setTopBorderPen( QPen const & pen )
+Style * Style::setTopBorderPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_topBorderPen = pen;
style->m_topPenValue = calculateValue( pen );
- if ( style->m_topBorderPen.style() != Qt::NoPen )
+ if ( style->m_topBorderPen.style() != TQt::NoPen )
style->m_featuresSet |= STopBorder;
return style;
}
m_topBorderPen = pen;
m_topPenValue = calculateValue( pen );
- if ( m_topBorderPen.style() != Qt::NoPen )
+ if ( m_topBorderPen.style() != TQt::NoPen )
m_featuresSet |= STopBorder;
return this;
}
-Style * Style::setFallDiagonalPen( QPen const & pen )
+Style * Style::setFallDiagonalPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_fallDiagonalPen = pen;
- if ( style->m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( style->m_fallDiagonalPen.style() != TQt::NoPen )
style->m_featuresSet |= SFallDiagonal;
return style;
}
m_fallDiagonalPen = pen;
- if ( m_fallDiagonalPen.style() != Qt::NoPen )
+ if ( m_fallDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SFallDiagonal;
return this;
}
-Style * Style::setGoUpDiagonalPen( QPen const & pen )
+Style * Style::setGoUpDiagonalPen( TQPen const & pen )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_goUpDiagonalPen = pen;
- if ( style->m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( style->m_goUpDiagonalPen.style() != TQt::NoPen )
style->m_featuresSet |= SGoUpDiagonal;
return style;
}
m_goUpDiagonalPen = pen;
- if ( m_goUpDiagonalPen.style() != Qt::NoPen )
+ if ( m_goUpDiagonalPen.style() != TQt::NoPen )
m_featuresSet |= SGoUpDiagonal;
return this;
}
@@ -2400,19 +2400,19 @@ Style * Style::setIndent( double indent )
return this;
}
-Style * Style::setBackGroundBrush( QBrush const & brush )
+Style * Style::setBackGroundBrush( TQBrush const & brush )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
Style * style = new Style( this );
style->m_backGroundBrush = brush;
- if ( style->m_backGroundBrush.style() != Qt::NoBrush )
+ if ( style->m_backGroundBrush.style() != TQt::NoBrush )
style->m_featuresSet |= SBackgroundBrush;
return style;
}
m_backGroundBrush = brush;
- if ( m_backGroundBrush.style() != Qt::NoBrush )
+ if ( m_backGroundBrush.style() != TQt::NoBrush )
m_featuresSet |= SBackgroundBrush;
return this;
}
@@ -2447,7 +2447,7 @@ Style * Style::setFloatColor( Format::FloatColor color )
return this;
}
-Style * Style::setStrFormat( QString const & strFormat )
+Style * Style::setStrFormat( TQString const & strFormat )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2477,7 +2477,7 @@ Style * Style::setPrecision( int precision )
return this;
}
-Style * Style::setPrefix( QString const & prefix )
+Style * Style::setPrefix( TQString const & prefix )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2492,7 +2492,7 @@ Style * Style::setPrefix( QString const & prefix )
return this;
}
-Style * Style::setPostfix( QString const & postfix )
+Style * Style::setPostfix( TQString const & postfix )
{
if ( m_type != AUTO || m_usageCount > 1 )
{
@@ -2668,13 +2668,13 @@ Style * Style::setFormatType( FormatType format )
return this;
}
-QString Style::colorName( const QColor& color )
+TQString Style::colorName( const TQColor& color )
{
- static QMap<QRgb , QString> map;
+ static TQMap<TQRgb , TQString> map;
- QRgb rgb = color.rgb();
+ TQRgb rgb = color.rgb();
- if (!map.contains( rgb ))
+ if (!map.tqcontains( rgb ))
{
map[rgb] = color.name();
return map[rgb];
@@ -2699,7 +2699,7 @@ CustomStyle::CustomStyle()
m_parent = 0;
}
-CustomStyle::CustomStyle( Style * parent, QString const & name )
+CustomStyle::CustomStyle( Style * tqparent, TQString const & name )
: Style(),
m_name( name )
{
@@ -2707,52 +2707,52 @@ CustomStyle::CustomStyle( Style * parent, QString const & name )
m_parent = 0;
// one to one copy
- if ( parent->hasProperty( PDontPrintText ) )
+ if ( tqparent->hasProperty( PDontPrintText ) )
addProperty( PDontPrintText );
- if ( parent->hasProperty( PCustomFormat ) )
+ if ( tqparent->hasProperty( PCustomFormat ) )
addProperty( PCustomFormat );
- if ( parent->hasProperty( PNotProtected ) )
+ if ( tqparent->hasProperty( PNotProtected ) )
addProperty( PNotProtected );
- if ( parent->hasProperty( PHideAll ) )
+ if ( tqparent->hasProperty( PHideAll ) )
addProperty( PHideAll );
- if ( parent->hasProperty( PHideFormula ) )
+ if ( tqparent->hasProperty( PHideFormula ) )
addProperty( PHideFormula );
- if ( parent->hasProperty( PMultiRow ) )
+ if ( tqparent->hasProperty( PMultiRow ) )
addProperty( PMultiRow );
- if ( parent->hasProperty( PVerticalText ) )
+ if ( tqparent->hasProperty( PVerticalText ) )
addProperty( PVerticalText );
- changeAlignX( parent->alignX() );
- changeAlignY( parent->alignY() );
- changeFloatFormat( parent->floatFormat() );
- changeFloatColor( parent->floatColor() );
- changeFormatType( parent->formatType() );
- changeFontFamily( parent->fontFamily() );
- changeFontSize( parent->fontSize() );
- changeFontFlags( parent->fontFlags() );
- changePen( parent->pen() );
- changeBgColor( parent->bgColor() );
- changeRightBorderPen( parent->rightBorderPen() );
- changeBottomBorderPen( parent->bottomBorderPen() );
- changeLeftBorderPen( parent->leftBorderPen() );
- changeTopBorderPen( parent->topBorderPen() );
- changeFallBorderPen( parent->fallDiagonalPen() );
- changeGoUpBorderPen( parent->goUpDiagonalPen() );
- changeBackGroundBrush( parent->backGroundBrush() );
- changeRotateAngle( parent->rotateAngle() );
- changeIndent( parent->indent() );
- changeStrFormat( parent->strFormat() );
- changePrecision( parent->precision() );
- changePrefix( parent->prefix() );
- changePostfix( parent->postfix() );
- changeCurrency( parent->currency() );
-}
-
-CustomStyle::CustomStyle( QString const & name, CustomStyle * parent )
+ changeAlignX( tqparent->alignX() );
+ changeAlignY( tqparent->alignY() );
+ changeFloatFormat( tqparent->floatFormat() );
+ changeFloatColor( tqparent->floatColor() );
+ changeFormatType( tqparent->formatType() );
+ changeFontFamily( tqparent->fontFamily() );
+ changeFontSize( tqparent->fontSize() );
+ changeFontFlags( tqparent->fontFlags() );
+ changePen( tqparent->pen() );
+ changeBgColor( tqparent->bgColor() );
+ changeRightBorderPen( tqparent->rightBorderPen() );
+ changeBottomBorderPen( tqparent->bottomBorderPen() );
+ changeLeftBorderPen( tqparent->leftBorderPen() );
+ changeTopBorderPen( tqparent->topBorderPen() );
+ changeFallBorderPen( tqparent->fallDiagonalPen() );
+ changeGoUpBorderPen( tqparent->goUpDiagonalPen() );
+ changeBackGroundBrush( tqparent->backGroundBrush() );
+ changeRotateAngle( tqparent->rotateAngle() );
+ changeIndent( tqparent->indent() );
+ changeStrFormat( tqparent->strFormat() );
+ changePrecision( tqparent->precision() );
+ changePrefix( tqparent->prefix() );
+ changePostfix( tqparent->postfix() );
+ changeCurrency( tqparent->currency() );
+}
+
+CustomStyle::CustomStyle( TQString const & name, CustomStyle * tqparent )
: Style(),
m_name( name )
{
- m_parent = parent;
+ m_parent = tqparent;
if ( m_parent )
m_parentName = m_parent->name();
}
@@ -2761,7 +2761,7 @@ CustomStyle::~CustomStyle()
{
}
-QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
+TQString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
{
// If the type is undefined, we're called from Format
// and the OASIS style is not an automatic style.
@@ -2773,7 +2773,7 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
style = KoGenStyle( Doc::STYLE_CELL_USER, "table-cell" );
if ( m_name.isEmpty() )
- return QString::null; // TODO fallback to Style::saveOasis() ???
+ return TQString(); // TODO fallback to Style::saveOasis() ???
// default style does not need display name
if( type() != BUILTIN || m_name != "Default" )
@@ -2784,7 +2784,7 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
// The lookup is done in the calling object (Format).
if ( style.type() == Doc::STYLE_CELL_AUTO )
- return QString::null;
+ return TQString();
if( ( m_type == BUILTIN ) && ( m_name == "Default" ) )
{
@@ -2797,11 +2797,11 @@ QString CustomStyle::saveOasis( KoGenStyle& style, KoGenStyles &mainStyles )
return mainStyles.lookup( style, "custom-style" );
}
-void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const QDomElement& style, const QString & name )
+void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const TQDomElement& style, const TQString & name )
{
m_name = name;
- if ( style.hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
- m_parentName = style.attributeNS( KoXmlNS::style, "parent-style-name", QString::null );
+ if ( style.hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
+ m_parentName = style.attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
else if ( m_name != "Default" )
m_parentName = "Default";
@@ -2810,30 +2810,30 @@ void CustomStyle::loadOasis( KoOasisStyles& oasisStyles, const QDomElement& styl
Style::loadOasisStyle( oasisStyles, style );
}
-void CustomStyle::save( QDomDocument & doc, QDomElement & styles )
+void CustomStyle::save( TQDomDocument & doc, TQDomElement & styles )
{
if ( m_name.isEmpty() )
return;
- QDomElement style( doc.createElement( "style" ) );
+ TQDomElement style( doc.createElement( "style" ) );
style.setAttribute( "type", (int) m_type );
if ( m_parent )
- style.setAttribute( "parent", m_parent->name() );
+ style.setAttribute( "tqparent", m_parent->name() );
style.setAttribute( "name", m_name );
- QDomElement format( doc.createElement( "format" ) );
+ TQDomElement format( doc.createElement( "format" ) );
saveXML( doc, format );
style.appendChild( format );
styles.appendChild( style );
}
-bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
+bool CustomStyle::loadXML( TQDomElement const & style, TQString const & name )
{
m_name = name;
- if ( style.hasAttribute( "parent" ) )
- m_parentName = style.attribute( "parent" );
+ if ( style.hasAttribute( "tqparent" ) )
+ m_parentName = style.attribute( "tqparent" );
if ( !style.hasAttribute( "type" ) )
return false;
@@ -2843,7 +2843,7 @@ bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
if ( !ok )
return false;
- QDomElement f( style.namedItem( "format" ).toElement() );
+ TQDomElement f( style.namedItem( "format" ).toElement() );
if ( !f.isNull() )
if ( !Style::loadXML( f ) )
return false;
@@ -2851,7 +2851,7 @@ bool CustomStyle::loadXML( QDomElement const & style, QString const & name )
return true;
}
-void CustomStyle::setName( QString const & name )
+void CustomStyle::setName( TQString const & name )
{
m_name = name;
}
@@ -2938,7 +2938,7 @@ void CustomStyle::changeAlignY( Format::AlignY alignY )
m_featuresSet |= SAlignY;
}
-void CustomStyle::changeFont( QFont const & f )
+void CustomStyle::changeFont( TQFont const & f )
{
if ( m_fontFamily != f.family() )
{
@@ -2991,7 +2991,7 @@ void CustomStyle::changeFont( QFont const & f )
}
}
-void CustomStyle::changeFontFamily( QString const & fam )
+void CustomStyle::changeFontFamily( TQString const & fam )
{
if ( m_fontFamily != fam )
{
@@ -3021,59 +3021,59 @@ void CustomStyle::changeFontFlags( uint flags )
}
}
-void CustomStyle::changeTextColor( QColor const & color )
+void CustomStyle::changeTextColor( TQColor const & color )
{
m_textPen.setColor( color );
m_featuresSet |= STextPen;
}
-void CustomStyle::changePen( QPen const & pen )
+void CustomStyle::changePen( TQPen const & pen )
{
m_textPen = pen;
m_featuresSet |= STextPen;
}
-void CustomStyle::changeBgColor( QColor const & color )
+void CustomStyle::changeBgColor( TQColor const & color )
{
m_bgColor = color;
m_featuresSet |= SBackgroundColor;
}
-void CustomStyle::changeRightBorderPen( QPen const & pen )
+void CustomStyle::changeRightBorderPen( TQPen const & pen )
{
m_rightBorderPen = pen;
m_rightPenValue = calculateValue( pen );
m_featuresSet |= SRightBorder;
}
-void CustomStyle::changeBottomBorderPen( QPen const & pen )
+void CustomStyle::changeBottomBorderPen( TQPen const & pen )
{
m_bottomBorderPen = pen;
m_bottomPenValue = calculateValue( pen );
m_featuresSet |= SBottomBorder;
}
-void CustomStyle::changeLeftBorderPen( QPen const & pen )
+void CustomStyle::changeLeftBorderPen( TQPen const & pen )
{
m_leftBorderPen = pen;
m_leftPenValue = calculateValue( pen );
m_featuresSet |= SLeftBorder;
}
-void CustomStyle::changeTopBorderPen( QPen const & pen )
+void CustomStyle::changeTopBorderPen( TQPen const & pen )
{
m_topBorderPen = pen;
m_topPenValue = calculateValue( pen );
m_featuresSet |= STopBorder;
}
-void CustomStyle::changeFallBorderPen( QPen const & pen )
+void CustomStyle::changeFallBorderPen( TQPen const & pen )
{
m_fallDiagonalPen = pen;
m_featuresSet |= SFallDiagonal;
}
-void CustomStyle::changeGoUpBorderPen( QPen const & pen )
+void CustomStyle::changeGoUpBorderPen( TQPen const & pen )
{
m_goUpDiagonalPen = pen;
m_featuresSet |= SGoUpDiagonal;
@@ -3091,7 +3091,7 @@ void CustomStyle::changeIndent( double indent )
m_featuresSet |= SIndent;
}
-void CustomStyle::changeBackGroundBrush( QBrush const & brush )
+void CustomStyle::changeBackGroundBrush( TQBrush const & brush )
{
m_backGroundBrush = brush;
m_featuresSet |= SBackgroundBrush;
@@ -3115,7 +3115,7 @@ void CustomStyle::changeFormatType( FormatType format )
m_featuresSet |= SFormatType;
}
-void CustomStyle::changeStrFormat( QString const & strFormat )
+void CustomStyle::changeStrFormat( TQString const & strFormat )
{
m_strFormat = strFormat;
m_featuresSet |= SCustomFormat;
@@ -3127,13 +3127,13 @@ void CustomStyle::changePrecision( int precision )
m_featuresSet |= SPrecision;
}
-void CustomStyle::changePrefix( QString const & prefix )
+void CustomStyle::changePrefix( TQString const & prefix )
{
m_prefix = prefix;
m_featuresSet |= SPrefix;
}
-void CustomStyle::changePostfix( QString const & postfix )
+void CustomStyle::changePostfix( TQString const & postfix )
{
m_postfix = postfix;
m_featuresSet |= SPostfix;
diff --git a/kspread/kspread_style.h b/kspread/kspread_style.h
index 9b808c2c..df1ed131 100644
--- a/kspread/kspread_style.h
+++ b/kspread/kspread_style.h
@@ -20,15 +20,15 @@
#ifndef __kspread_style__
#define __kspread_style__
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qpen.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqpen.h>
#include "kspread_format.h"
-class QDomDocument;
-class QDomElement;
+class TQDomDocument;
+class TQDomElement;
class KoGenStyles;
class KoOasisStyles;
@@ -121,7 +121,7 @@ public:
* Constructor.
* Creates an automatic style.
* If @p style is a custom or built-in style (e.g. the default style),
- * @p style becomes the parent style. In this case, features are NOT SET.
+ * @p style becomes the tqparent style. In this case, features are NOT SET.
* @param style The style which features are copied.
*/
Style( Style* style );
@@ -135,50 +135,50 @@ public:
bool operator == (const Style& style) const;
inline bool operator!=( const Style& other ) const { return !operator==( other ); }
- static FormatType dateType( const QString &_format );
- static FormatType timeType( const QString &_format );
- static FormatType fractionType( const QString &_format );
+ static FormatType dateType( const TQString &_format );
+ static FormatType timeType( const TQString &_format );
+ static FormatType fractionType( const TQString &_format );
/**
* @return the name of the data style (number, currency, percentage, date,
* boolean, text)
*/
- static QString saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles, FormatType _style,
- const QString &_prefix, const QString &_postfix, int _precision, const QString& symbol );
- static QString saveOasisStyleNumericDate( KoGenStyles &mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
- const QString &_prefix, const QString _suffix );
- static QString saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericCustom( KoGenStyles&mainStyles, FormatType _style,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType _style,
- const QString &_prefix, const QString _suffix, int _precision );
- static QString saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType _style, int _precision,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericMoney( KoGenStyles&mainStyles, FormatType _style,
- const QString& symbol, int _precision,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericText( KoGenStyles&mainStyles, FormatType _style, int _precision,
- const QString &_prefix, const QString &_suffix );
- static QString saveOasisStyleNumericNumber( KoGenStyles&mainStyles, FormatType _style, int _precision,
- const QString &_prefix, const QString &_suffix );
+ static TQString saveOasisStyleNumeric( KoGenStyle &style, KoGenStyles &mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_postfix, int _precision, const TQString& symbol );
+ static TQString saveOasisStyleNumericDate( KoGenStyles &mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericFraction( KoGenStyles &mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString _suffix );
+ static TQString saveOasisStyleNumericTime( KoGenStyles& mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericCustom( KoGenStyles&mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericScientific( KoGenStyles&mainStyles, FormatType _style,
+ const TQString &_prefix, const TQString _suffix, int _precision );
+ static TQString saveOasisStyleNumericPercentage( KoGenStyles&mainStyles, FormatType _style, int _precision,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericMoney( KoGenStyles&mainStyles, FormatType _style,
+ const TQString& symbol, int _precision,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericText( KoGenStyles&mainStyles, FormatType _style, int _precision,
+ const TQString &_prefix, const TQString &_suffix );
+ static TQString saveOasisStyleNumericNumber( KoGenStyles&mainStyles, FormatType _style, int _precision,
+ const TQString &_prefix, const TQString &_suffix );
StyleType type() const { return m_type; }
- void saveXML( QDomDocument & doc, QDomElement & format ) const;
- bool loadXML( QDomElement & format );
+ void saveXML( TQDomDocument & doc, TQDomElement & format ) const;
+ bool loadXML( TQDomElement & format );
/**
* Saves an OASIS automatic style.
* Reimplemented by CustomStyle for OASIS user styles.
- * @return always QString::null
+ * @return always TQString()
*/
- virtual QString saveOasis( KoGenStyle& style, KoGenStyles& mainStyles);
- void loadOasisStyle( KoOasisStyles& oasisStyles, const QDomElement & element );
- static QString saveOasisBackgroundStyle( KoGenStyles &mainStyles, const QBrush &brush );
+ virtual TQString saveOasis( KoGenStyle& style, KoGenStyles& mainStyles);
+ void loadOasisStyle( KoOasisStyles& oasisStyles, const TQDomElement & element );
+ static TQString saveOasisBackgroundStyle( KoGenStyles &mainStyles, const TQBrush &brush );
/**
* Releases this style. The internal reference counter is decremented.
@@ -204,19 +204,19 @@ public:
uint leftPenValue() const { return m_leftPenValue; }
uint topPenValue() const { return m_topPenValue; }
- QPen const & pen() const;
- QColor const & bgColor() const;
- QPen const & rightBorderPen() const;
- QPen const & bottomBorderPen() const;
- QPen const & leftBorderPen() const;
- QPen const & topBorderPen() const;
- QPen const & fallDiagonalPen() const;
- QPen const & goUpDiagonalPen() const;
- QBrush const & backGroundBrush() const;
- QString const & strFormat() const;
- QString const & prefix() const;
- QString const & postfix() const;
- QString const & fontFamily() const;
+ TQPen const & pen() const;
+ TQColor const & bgColor() const;
+ TQPen const & rightBorderPen() const;
+ TQPen const & bottomBorderPen() const;
+ TQPen const & leftBorderPen() const;
+ TQPen const & topBorderPen() const;
+ TQPen const & fallDiagonalPen() const;
+ TQPen const & goUpDiagonalPen() const;
+ TQBrush const & backGroundBrush() const;
+ TQString const & strFormat() const;
+ TQString const & prefix() const;
+ TQString const & postfix() const;
+ TQString const & fontFamily() const;
Format::Align alignX() const;
Format::AlignY alignY() const;
@@ -226,7 +226,7 @@ public:
Format::Currency const & currency() const;
- QFont font() const;
+ TQFont font() const;
uint fontFlags() const;
int fontSize() const;
int precision() const;
@@ -235,41 +235,41 @@ public:
Style * setAlignX( Format::Align alignX );
Style * setAlignY( Format::AlignY alignY );
- Style * setFont( QFont const & f );
- Style * setFontFamily( QString const & fam );
+ Style * setFont( TQFont const & f );
+ Style * setFontFamily( TQString const & fam );
Style * setFontFlags( uint flags );
Style * setFontSize( int size );
- Style * setPen( QPen const & pen );
- Style * setBgColor( QColor const & color );
- Style * setRightBorderPen( QPen const & pen );
- Style * setBottomBorderPen( QPen const & pen );
- Style * setLeftBorderPen( QPen const & pen );
- Style * setTopBorderPen( QPen const & pen );
- Style * setFallDiagonalPen( QPen const & pen );
- Style * setGoUpDiagonalPen( QPen const & pen );
+ Style * setPen( TQPen const & pen );
+ Style * setBgColor( TQColor const & color );
+ Style * setRightBorderPen( TQPen const & pen );
+ Style * setBottomBorderPen( TQPen const & pen );
+ Style * setLeftBorderPen( TQPen const & pen );
+ Style * setTopBorderPen( TQPen const & pen );
+ Style * setFallDiagonalPen( TQPen const & pen );
+ Style * setGoUpDiagonalPen( TQPen const & pen );
Style * setRotateAngle( int angle );
Style * setIndent( double indent );
- Style * setBackGroundBrush( QBrush const & brush );
+ Style * setBackGroundBrush( TQBrush const & brush );
Style * setFloatFormat( Format::FloatFormat format );
Style * setFloatColor( Format::FloatColor color );
Style * setFormatType( FormatType format );
- Style * setStrFormat( QString const & strFormat );
+ Style * setStrFormat( TQString const & strFormat );
Style * setPrecision( int precision );
- Style * setPrefix( QString const & prefix );
- Style * setPostfix( QString const & postfix );
+ Style * setPrefix( TQString const & prefix );
+ Style * setPostfix( TQString const & postfix );
Style * setCurrency( Format::Currency const & currency );
Style * setProperty( Properties p );
Style * clearProperty( Properties p );
- CustomStyle * parent() const;
- QString const & parentName() const { return m_parentName; }
- void setParent( CustomStyle * parent );
+ CustomStyle * tqparent() const;
+ TQString const & tqparentName() const { return m_parentName; }
+ void setParent( CustomStyle * tqparent );
/**
- * Returns the name of a colour. This is the same as returned by QColor::name, but an internal cache
+ * Returns the name of a colour. This is the same as returned by TQColor::name, but an internal cache
* is used to reduce the overhead when asking for the name of the same colour.
*/
- static QString colorName( const QColor& color );
+ static TQString colorName( const TQColor& color );
protected:
/**
@@ -278,13 +278,13 @@ protected:
*/
void saveOasisStyle( KoGenStyle &style, KoGenStyles &mainStyles );
- void loadOasisDataStyle( KoOasisStyles& oasisStyles, const QDomElement& styleStack );
+ void loadOasisDataStyle( KoOasisStyles& oasisStyles, const TQDomElement& styleStack );
void loadOasisParagraphProperties( KoOasisStyles& oasisStyles, const KoStyleStack& styleStack );
void loadOasisTableCellProperties( KoOasisStyles& oasisStyles, const KoStyleStack& styleStack );
void loadOasisTextProperties( KoOasisStyles& oasisStyles, const KoStyleStack& styleStack );
CustomStyle * m_parent;
- QString m_parentName;
+ TQString m_parentName;
StyleType m_type;
uint m_usageCount;
uint m_featuresSet;
@@ -309,52 +309,52 @@ protected:
/**
* The font used to draw the text
*/
- QString m_fontFamily;
+ TQString m_fontFamily;
uint m_fontFlags;
int m_fontSize;
/**
* The pen used to draw the text
*/
- QPen m_textPen;
+ TQPen m_textPen;
/**
* The background color
*/
- QColor m_bgColor;
+ TQColor m_bgColor;
/**
* The pen used to draw the right border
*/
- QPen m_rightBorderPen;
+ TQPen m_rightBorderPen;
/**
* The pen used to draw the bottom border
*/
- QPen m_bottomBorderPen;
+ TQPen m_bottomBorderPen;
/**
* The pen used to draw the left border
*/
- QPen m_leftBorderPen;
+ TQPen m_leftBorderPen;
/**
* The pen used to draw the top border
*/
- QPen m_topBorderPen;
+ TQPen m_topBorderPen;
/**
* The pen used to draw the diagonal
*/
- QPen m_fallDiagonalPen;
+ TQPen m_fallDiagonalPen;
/**
* The pen used to draw the the diagonal which go up
*/
- QPen m_goUpDiagonalPen;
+ TQPen m_goUpDiagonalPen;
/**
* The brush used to draw the background.
*/
- QBrush m_backGroundBrush;
+ TQBrush m_backGroundBrush;
int m_rotateAngle;
/**
@@ -364,7 +364,7 @@ protected:
/**
* Format of the content, e.g. #.##0.00, dd/mmm/yyyy,...
*/
- QString m_strFormat;
+ TQString m_strFormat;
/**
* The precision of the floating point representation
* If precision is -1, this means that no precision is specified.
@@ -374,12 +374,12 @@ protected:
* The prefix of a numeric value ( for example "$" )
* May be empty.
*/
- QString m_prefix;
+ TQString m_prefix;
/**
* The postfix of a numeric value ( for example "DM" )
* May be empty.
*/
- QString m_postfix;
+ TQString m_postfix;
/**
* Currency information:
* about which currency from which country
@@ -411,61 +411,61 @@ public:
* @param style The style which's features are copied.
* @param name The name of this style.
*/
- CustomStyle( Style * style, QString const & name );
- CustomStyle( QString const & name, CustomStyle * parent );
+ CustomStyle( Style * style, TQString const & name );
+ CustomStyle( TQString const & name, CustomStyle * tqparent );
~CustomStyle();
- QString const & name() const { return m_name; }
+ TQString const & name() const { return m_name; }
- void save( QDomDocument & doc, QDomElement & styles );
+ void save( TQDomDocument & doc, TQDomElement & styles );
/**
* @reimp
* Stores an OASIS user style.
* @return the OASIS style's name
*/
- virtual QString saveOasis( KoGenStyle& style, KoGenStyles &mainStyles );
+ virtual TQString saveOasis( KoGenStyle& style, KoGenStyles &mainStyles );
/**
* Loads the style properties from @p style .
- * Determines also the parent's name.
+ * Determines also the tqparent's name.
* @param oasisStyles map of all styles
* @param style the DOM element defining the style
* @param name the style's new name
*/
- void loadOasis( KoOasisStyles& oasisStyles, const QDomElement & style, const QString & name );
+ void loadOasis( KoOasisStyles& oasisStyles, const TQDomElement & style, const TQString & name );
- bool loadXML( QDomElement const & style, QString const & name );
+ bool loadXML( TQDomElement const & style, TQString const & name );
void setType( StyleType type ) { m_type = type; }
- void setName( QString const & name );
+ void setName( TQString const & name );
void refreshParentName();
bool definesAll() const;
void changeAlignX( Format::Align alignX );
void changeAlignY( Format::AlignY alignY );
- void changeFont( QFont const & f );
- void changeFontFamily( QString const & fam );
+ void changeFont( TQFont const & f );
+ void changeFontFamily( TQString const & fam );
void changeFontSize( int size );
void changeFontFlags( uint flags );
- void changePen( QPen const & pen );
- void changeTextColor( QColor const & color );
- void changeBgColor( QColor const & color );
- void changeRightBorderPen( QPen const & pen );
- void changeBottomBorderPen( QPen const & pen );
- void changeLeftBorderPen( QPen const & pen );
- void changeTopBorderPen( QPen const & pen );
- void changeFallBorderPen( QPen const & pen );
- void changeGoUpBorderPen( QPen const & pen );
+ void changePen( TQPen const & pen );
+ void changeTextColor( TQColor const & color );
+ void changeBgColor( TQColor const & color );
+ void changeRightBorderPen( TQPen const & pen );
+ void changeBottomBorderPen( TQPen const & pen );
+ void changeLeftBorderPen( TQPen const & pen );
+ void changeTopBorderPen( TQPen const & pen );
+ void changeFallBorderPen( TQPen const & pen );
+ void changeGoUpBorderPen( TQPen const & pen );
void changeRotateAngle( int angle );
void changeIndent( double indent );
- void changeBackGroundBrush( QBrush const & brush );
+ void changeBackGroundBrush( TQBrush const & brush );
void changeFloatFormat( Format::FloatFormat format );
void changeFloatColor( Format::FloatColor color );
void changeFormatType( FormatType format );
- void changeStrFormat( QString const & strFormat );
+ void changeStrFormat( TQString const & strFormat );
void changePrecision( int precision );
- void changePrefix( QString const & prefix );
- void changePostfix( QString const & postfix );
+ void changePrefix( TQString const & prefix );
+ void changePostfix( TQString const & postfix );
void changeCurrency( Format::Currency const & currency );
void addProperty( Properties p );
@@ -477,7 +477,7 @@ public:
private:
friend class StyleManager;
- QString m_name;
+ TQString m_name;
/**
* Constructor.
diff --git a/kspread/kspread_style_manager.cc b/kspread/kspread_style_manager.cc
index 7a68c02a..8c4d86f5 100644
--- a/kspread/kspread_style_manager.cc
+++ b/kspread/kspread_style_manager.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -79,7 +79,7 @@ void StyleManager::loadOasisStyleTemplate( KoOasisStyles& oasisStyles )
m_oasisStyles.clear();
// loading default style first
- const QDomElement* defaultStyle = oasisStyles.defaultStyle( "table-cell" );
+ const TQDomElement* defaultStyle = oasisStyles.defaultStyle( "table-cell" );
if ( defaultStyle )
{
kdDebug() << "StyleManager: Loading default cell style" << endl;
@@ -96,21 +96,21 @@ void StyleManager::loadOasisStyleTemplate( KoOasisStyles& oasisStyles )
uint nStyles = oasisStyles.userStyles().count();
for (unsigned int item = 0; item < nStyles; item++) {
- QDomElement styleElem = oasisStyles.userStyles()[item];
+ TQDomElement styleElem = oasisStyles.userStyles()[item];
// assume the name assigned by the application
- const QString oasisName = styleElem.attributeNS( KoXmlNS::style, "name", QString::null );
+ const TQString oasisName = styleElem.attributeNS( KoXmlNS::style, "name", TQString() );
// then replace by user-visible one (if any)
- const QString name = styleElem.attributeNS( KoXmlNS::style, "display-name", oasisName );
+ const TQString name = styleElem.attributeNS( KoXmlNS::style, "display-name", oasisName );
kdDebug() << " StyleManager: Loading common cell style: " << oasisName << " (display name: " << name << ")" << endl;
if ( !name.isEmpty() )
{
CustomStyle * style = 0;
- if ( styleElem.hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
- // The style's parent name will be set in Style::loadOasis(..).
- // After all styles are loaded the pointer to the parent is set.
+ if ( styleElem.hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
+ // The style's tqparent name will be set in Style::loadOasis(..).
+ // After all styles are loaded the pointer to the tqparent is set.
style = new CustomStyle( name, 0 );
else
style = new CustomStyle( name, m_defaultStyle );
@@ -124,7 +124,7 @@ void StyleManager::loadOasisStyleTemplate( KoOasisStyles& oasisStyles )
}
}
- // set the parent pointers after we loaded all styles
+ // set the tqparent pointers after we loaded all styles
Styles::iterator iter = m_styles.begin();
Styles::iterator end = m_styles.end();
while ( iter != end )
@@ -132,17 +132,17 @@ void StyleManager::loadOasisStyleTemplate( KoOasisStyles& oasisStyles )
CustomStyle * styleData = iter.data();
if ( styleData->name() != "Default" )
- if ( !styleData->parent() && !styleData->parentName().isNull() )
- styleData->setParent( m_oasisStyles[ styleData->parentName() ] );
+ if ( !styleData->tqparent() && !styleData->tqparentName().isNull() )
+ styleData->setParent( m_oasisStyles[ styleData->tqparentName() ] );
++iter;
}
}
-QDomElement StyleManager::save( QDomDocument & doc )
+TQDomElement StyleManager::save( TQDomDocument & doc )
{
kdDebug() << "Saving styles" << endl;
- QDomElement styles = doc.createElement( "styles" );
+ TQDomElement styles = doc.createElement( "styles" );
kdDebug() << "Saving default style" << endl;
m_defaultStyle->save( doc, styles );
@@ -164,12 +164,12 @@ QDomElement StyleManager::save( QDomDocument & doc )
return styles;
}
-bool StyleManager::loadXML( QDomElement const & styles )
+bool StyleManager::loadXML( TQDomElement const & styles )
{
- QDomElement e = styles.firstChild().toElement();
+ TQDomElement e = styles.firstChild().toElement();
while ( !e.isNull() )
{
- QString name;
+ TQString name;
if ( e.hasAttribute( "name" ) )
name = e.attribute( "name" );
@@ -182,7 +182,7 @@ bool StyleManager::loadXML( QDomElement const & styles )
else if ( !name.isNull() )
{
CustomStyle * style = 0;
- if ( e.hasAttribute( "parent" ) && e.attribute( "parent" ) == "Default" )
+ if ( e.hasAttribute( "tqparent" ) && e.attribute( "tqparent" ) == "Default" )
style = new CustomStyle( name, m_defaultStyle );
else
style = new CustomStyle( name, 0 );
@@ -209,8 +209,8 @@ bool StyleManager::loadXML( QDomElement const & styles )
{
CustomStyle * styleData = iter.data();
- if ( !styleData->parent() && !styleData->parentName().isNull() )
- styleData->setParent( m_styles[ styleData->parentName() ] );
+ if ( !styleData->tqparent() && !styleData->tqparentName().isNull() )
+ styleData->setParent( m_styles[ styleData->tqparentName() ] );
++iter;
}
@@ -224,7 +224,7 @@ bool StyleManager::loadXML( QDomElement const & styles )
void StyleManager::createBuiltinStyles()
{
CustomStyle * header1 = new CustomStyle( i18n( "Header" ), m_defaultStyle );
- QFont f( header1->font() );
+ TQFont f( header1->font() );
f.setItalic( true );
f.setPointSize( f.pointSize() + 2 );
f.setBold( true );
@@ -233,18 +233,18 @@ void StyleManager::createBuiltinStyles()
m_styles[ header1->name() ] = header1;
CustomStyle * header2 = new CustomStyle( i18n( "Header1" ), header1 );
- QColor color( "#F0F0FF" );
+ TQColor color( "#F0F0FF" );
header2->changeBgColor( color );
- QPen pen( Qt::black, 1, Qt::SolidLine );
+ TQPen pen( TQt::black, 1, TQt::SolidLine );
header2->changeBottomBorderPen( pen );
header2->setType( Style::BUILTIN );
m_styles[ header2->name() ] = header2;
}
-CustomStyle * StyleManager::style( QString const & name ) const
+CustomStyle * StyleManager::style( TQString const & name ) const
{
- Styles::const_iterator iter( m_styles.find( name ) );
+ Styles::const_iterator iter( m_styles.tqfind( name ) );
if ( iter != m_styles.end() )
return iter.data();
@@ -257,20 +257,20 @@ CustomStyle * StyleManager::style( QString const & name ) const
void StyleManager::takeStyle( CustomStyle * style )
{
- CustomStyle * parent = style->parent();
+ CustomStyle * tqparent = style->tqparent();
Styles::iterator iter = m_styles.begin();
Styles::iterator end = m_styles.end();
while ( iter != end )
{
- if ( iter.data()->parent() == style )
- iter.data()->setParent( parent );
+ if ( iter.data()->tqparent() == style )
+ iter.data()->setParent( tqparent );
++iter;
}
- Styles::iterator i( m_styles.find( style->name() ) );
+ Styles::iterator i( m_styles.tqfind( style->name() ) );
if ( i != m_styles.end() )
{
@@ -279,18 +279,18 @@ void StyleManager::takeStyle( CustomStyle * style )
}
}
-bool StyleManager::checkCircle( QString const & name, QString const & parent )
+bool StyleManager::checkCircle( TQString const & name, TQString const & tqparent )
{
- CustomStyle * s = style( parent );
- if ( !s || s->parent() == 0 )
+ CustomStyle * s = style( tqparent );
+ if ( !s || s->tqparent() == 0 )
return true;
- if ( s->parentName() == name )
+ if ( s->tqparentName() == name )
return false;
else
- return checkCircle( name, s->parentName() );
+ return checkCircle( name, s->tqparentName() );
}
-bool StyleManager::validateStyleName( QString const & name, CustomStyle * style )
+bool StyleManager::validateStyleName( TQString const & name, CustomStyle * style )
{
if ( m_defaultStyle->name() == name || name == "Default" )
return false;
@@ -309,20 +309,20 @@ bool StyleManager::validateStyleName( QString const & name, CustomStyle * style
return true;
}
-void StyleManager::changeName( QString const & oldName, QString const & newName )
+void StyleManager::changeName( TQString const & oldName, TQString const & newName )
{
Styles::iterator iter = m_styles.begin();
Styles::iterator end = m_styles.end();
while ( iter != end )
{
- if ( iter.data()->parentName() == oldName )
+ if ( iter.data()->tqparentName() == oldName )
iter.data()->refreshParentName();
++iter;
}
- iter = m_styles.find( oldName );
+ iter = m_styles.tqfind( oldName );
if ( iter != end )
{
CustomStyle * s = iter.data();
@@ -331,9 +331,9 @@ void StyleManager::changeName( QString const & oldName, QString const & newName
}
}
-QStringList StyleManager::styleNames() const
+TQStringList StyleManager::styleNames() const
{
- QStringList list;
+ TQStringList list;
list.push_back( i18n("Default") );
@@ -350,27 +350,27 @@ QStringList StyleManager::styleNames() const
return list;
}
-QDict<Style> StyleManager::loadOasisAutoStyles( KoOasisStyles& oasisStyles )
+TQDict<Style> StyleManager::loadOasisAutoStyles( KoOasisStyles& oasisStyles )
{
- QDictIterator<QDomElement> it( oasisStyles.styles("table-cell") );
- QDict<Style> autoStyles;
+ TQDictIterator<TQDomElement> it( oasisStyles.styles("table-cell") );
+ TQDict<Style> autoStyles;
for (;it.current();++it)
{
if ( it.current()->hasAttributeNS( KoXmlNS::style , "name" ) )
{
- QString name = it.current()->attributeNS( KoXmlNS::style , "name" , QString::null );
+ TQString name = it.current()->attributeNS( KoXmlNS::style , "name" , TQString() );
kdDebug() << "StyleManager: Preloading automatic cell style: " << name << endl;
autoStyles.insert( name , new Style());
autoStyles[name]->loadOasisStyle( oasisStyles , *(it.current()) );
- if ( it.current()->hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
+ if ( it.current()->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
{
- QString parentStyleName = it.current()->attributeNS( KoXmlNS::style, "parent-style-name", QString::null );
- if ( m_oasisStyles.contains( parentStyleName ) )
+ TQString tqparentStyleName = it.current()->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() );
+ if ( m_oasisStyles.tqcontains( tqparentStyleName ) )
{
- autoStyles[name]->setParent( m_oasisStyles[parentStyleName] );
+ autoStyles[name]->setParent( m_oasisStyles[tqparentStyleName] );
}
- kdDebug() << "\t parent-style-name:" << parentStyleName << endl;
+ kdDebug() << "\t tqparent-style-name:" << tqparentStyleName << endl;
}
else
{
@@ -381,9 +381,9 @@ QDict<Style> StyleManager::loadOasisAutoStyles( KoOasisStyles& oasisStyles )
return autoStyles;
}
-void StyleManager::releaseUnusedAutoStyles( QDict<Style> autoStyles )
+void StyleManager::releaseUnusedAutoStyles( TQDict<Style> autoStyles )
{
- QDictIterator<Style> styleIt( autoStyles );
+ TQDictIterator<Style> styleIt( autoStyles );
for (;styleIt.current();++styleIt)
{
Style* style = styleIt.current();
diff --git a/kspread/kspread_style_manager.h b/kspread/kspread_style_manager.h
index 58667691..d4bf10bb 100644
--- a/kspread/kspread_style_manager.h
+++ b/kspread/kspread_style_manager.h
@@ -20,13 +20,13 @@
#ifndef __kspread_style_manager__
#define __kspread_style_manager__
-#include <qmap.h>
+#include <tqmap.h>
#include <koffice_export.h>
-class QDomElement;
-class QDomDocument;
-class QStringList;
+class TQDomElement;
+class TQDomDocument;
+class TQStringList;
class KoGenStyles;
class KoOasisStyles;
@@ -44,23 +44,23 @@ class KSPREAD_EXPORT StyleManager
StyleManager();
~StyleManager();
- QDomElement save( QDomDocument & doc );
- bool loadXML( QDomElement const & styles );
+ TQDomElement save( TQDomDocument & doc );
+ bool loadXML( TQDomElement const & styles );
void saveOasis( KoGenStyles &mainStyles );
void loadOasisStyleTemplate( KoOasisStyles& oasisStyles );
CustomStyle * defaultStyle() const { return m_defaultStyle; }
- CustomStyle * style( QString const & name ) const;
+ CustomStyle * style( TQString const & name ) const;
- bool checkCircle( QString const & name, QString const & parent );
- bool validateStyleName( QString const & name, CustomStyle * style );
- void changeName( QString const & oldName, QString const & newName );
+ bool checkCircle( TQString const & name, TQString const & tqparent );
+ bool validateStyleName( TQString const & name, CustomStyle * style );
+ void changeName( TQString const & oldName, TQString const & newName );
void takeStyle( CustomStyle * style );
void createBuiltinStyles();
- QStringList styleNames() const;
+ TQStringList styleNames() const;
int count() const { return m_styles.count(); }
/**
@@ -72,7 +72,7 @@ class KSPREAD_EXPORT StyleManager
* @param oasisStyles repository of styles
* @return a hash of styles with the OpenDocument internal name as key
*/
- QDict<Style> loadOasisAutoStyles( KoOasisStyles& oasisStyles );
+ TQDict<Style> loadOasisAutoStyles( KoOasisStyles& oasisStyles );
/**
* Releases unused auto styles.
@@ -83,12 +83,12 @@ class KSPREAD_EXPORT StyleManager
* key
* @see loadOasisAutoStyles
*/
- void releaseUnusedAutoStyles( QDict<Style> autoStyles );
+ void releaseUnusedAutoStyles( TQDict<Style> autoStyles );
private:
friend class StyleDlg;
friend class View;
- class Styles : public QMap<QString, CustomStyle *> {};
+ class Styles : public TQMap<TQString, CustomStyle *> {};
CustomStyle * m_defaultStyle;
Styles m_styles; // builtin and custom made styles
diff --git a/kspread/kspread_toolbox.cc b/kspread/kspread_toolbox.cc
index e7ddd632..a22be5bb 100644
--- a/kspread/kspread_toolbox.cc
+++ b/kspread/kspread_toolbox.cc
@@ -22,21 +22,21 @@
#include <kwin.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qobjectlist.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqobjectlist.h>
using namespace KSpread;
-ToolBox::ToolBox( QWidget* parent, const char* name )
- : QFrame( parent, name, WType_TopLevel | WStyle_Tool )
+ToolBox::ToolBox( TQWidget* tqparent, const char* name )
+ : TQFrame( tqparent, name, WType_TopLevel | WStyle_Tool )
{
KWin::setType( winId(), NET::Tool );
setFrameShape( Panel );
setFrameShadow( Raised );
- m_layout = new QVBoxLayout( this, 2, 2 );
+ m_layout = new TQVBoxLayout( this, 2, 2 );
// m_layout->addSpacing( 12 );
}
@@ -44,11 +44,12 @@ void ToolBox::setEnabled( bool enable )
{
if ( enable )
{
- if ( children() )
+ TQObjectList clo = childrenListObject();
+ if ( !clo.isEmpty() )
{
- QObjectListIt it( *children() );
- QWidget *w;
- while( (w=(QWidget *)it.current()) != 0 )
+ TQObjectListIt it( clo );
+ TQWidget *w;
+ while( (w=(TQWidget *)it.current()) != 0 )
{
++it;
if ( w->isWidgetType() )
@@ -58,13 +59,14 @@ void ToolBox::setEnabled( bool enable )
}
else
{
- if ( focusWidget() == this )
+ if ( tqfocusWidget() == this )
focusNextPrevChild( TRUE );
- if ( children() )
+ TQObjectList clo = childrenListObject();
+ if ( !clo.isEmpty() )
{
- QObjectListIt it( *children() );
- QWidget *w;
- while( (w=(QWidget *)it.current()) != 0 )
+ TQObjectListIt it( clo );
+ TQWidget *w;
+ while( (w=(TQWidget *)it.current()) != 0 )
{
++it;
if ( w->isWidgetType() )
@@ -78,33 +80,33 @@ void ToolBox::setEnabled( bool enable )
}
/*
-void ToolBox::paintEvent( QPaintEvent* ev )
+void ToolBox::paintEvent( TQPaintEvent* ev )
{
- QPainter painter;
+ TQPainter painter;
painter.begin( this );
painter.fillRect( 0, 0, width(), 12, darkBlue );
painter.end();
- QFrame::paintEvent( ev );
+ TQFrame::paintEvent( ev );
}
*/
-void ToolBox::childEvent( QChildEvent* ev )
+void ToolBox::childEvent( TQChildEvent* ev )
{
if ( ev->inserted() && ev->child()->isWidgetType() )
- m_layout->addWidget( (QWidget*)ev->child() );
- resize( sizeHint() );
+ m_layout->addWidget( (TQWidget*)ev->child() );
+ resize( tqsizeHint() );
}
-void ToolBox::mousePressEvent( QMouseEvent* ev )
+void ToolBox::mousePressEvent( TQMouseEvent* ev )
{
- m_startPos = geometry().topLeft();
+ m_startPos = tqgeometry().topLeft();
m_mousePos = ev->globalPos();
}
-void ToolBox::mouseMoveEvent( QMouseEvent* ev )
+void ToolBox::mouseMoveEvent( TQMouseEvent* ev )
{
setGeometry( m_startPos.x() - m_mousePos.x() + ev->globalPos().x(),
m_startPos.y() - m_mousePos.y() + ev->globalPos().y(),
@@ -113,30 +115,30 @@ void ToolBox::mouseMoveEvent( QMouseEvent* ev )
// ---------------------------------------------
-KoTransformToolBox::KoTransformToolBox( KoDocumentChild* ch, QWidget* parent, const char* name )
- : ToolBox( parent, name )
+KoTransformToolBox::KoTransformToolBox( KoDocumentChild* ch, TQWidget* tqparent, const char* name )
+ : ToolBox( tqparent, name )
{
m_child = 0;
- m_rotation = new QSpinBox( 0, 360, 5, this );
+ m_rotation = new TQSpinBox( 0, 360, 5, this );
m_rotation->setSuffix( " deg" );
- m_scale = new QSpinBox( 10, 400, 10, this );
+ m_scale = new TQSpinBox( 10, 400, 10, this );
m_scale->setSuffix( "%" );
- m_shearX = new QSpinBox( -100, 100, 1, this );
+ m_shearX = new TQSpinBox( -100, 100, 1, this );
m_shearX->setSuffix( " px" );
- m_shearY = new QSpinBox( -100, 100, 1, this );
+ m_shearY = new TQSpinBox( -100, 100, 1, this );
m_shearY->setSuffix( " px" );
setDocumentChild( ch );
- connect( m_rotation, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotRotationChanged( int ) ) );
- connect( m_scale, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotScalingChanged( int ) ) );
- connect( m_shearX, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotXShearingChanged( int ) ) );
- connect( m_shearY, SIGNAL( valueChanged( int ) ),
- this, SLOT( slotYShearingChanged( int ) ) );
+ connect( m_rotation, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotRotationChanged( int ) ) );
+ connect( m_scale, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotScalingChanged( int ) ) );
+ connect( m_shearX, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotXShearingChanged( int ) ) );
+ connect( m_shearY, TQT_SIGNAL( valueChanged( int ) ),
+ this, TQT_SLOT( slotYShearingChanged( int ) ) );
}
void KoTransformToolBox::setDocumentChild( KoDocumentChild* ch )
diff --git a/kspread/kspread_toolbox.h b/kspread/kspread_toolbox.h
index 0cec3dd2..ef5a2c89 100644
--- a/kspread/kspread_toolbox.h
+++ b/kspread/kspread_toolbox.h
@@ -20,43 +20,45 @@
#ifndef TOOLBOX_H
#define TOOLBOX_H
-#include <qframe.h>
-#include <qpoint.h>
+#include <tqframe.h>
+#include <tqpoint.h>
#include <koffice_export.h>
-class QVBoxLayout;
-class QSpinBox;
+class TQVBoxLayout;
+class TQSpinBox;
class KoDocumentChild;
namespace KSpread
{
-class KOFFICEUI_EXPORT ToolBox : public QFrame
+class KOFFICEUI_EXPORT ToolBox : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- ToolBox( QWidget* parent = 0, const char* name = 0 );
+ ToolBox( TQWidget* tqparent = 0, const char* name = 0 );
public slots:
void setEnabled( bool enable );
protected:
- // void paintEvent( QPaintEvent* );
- void childEvent( QChildEvent* ev );
- void mousePressEvent( QMouseEvent* ev );
- void mouseMoveEvent( QMouseEvent* ev );
+ // void paintEvent( TQPaintEvent* );
+ void childEvent( TQChildEvent* ev );
+ void mousePressEvent( TQMouseEvent* ev );
+ void mouseMoveEvent( TQMouseEvent* ev );
private:
- QVBoxLayout* m_layout;
- QPoint m_mousePos;
- QPoint m_startPos;
+ TQVBoxLayout* m_layout;
+ TQPoint m_mousePos;
+ TQPoint m_startPos;
};
class KOFFICEUI_EXPORT KoTransformToolBox : public ToolBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- KoTransformToolBox( KoDocumentChild* child, QWidget* parent = 0, const char* name = 0 );
+ KoTransformToolBox( KoDocumentChild* child, TQWidget* tqparent = 0, const char* name = 0 );
double rotation() const;
double scaling() const;
@@ -84,10 +86,10 @@ private slots:
void slotYShearingChanged( int );
private:
- QSpinBox* m_rotation;
- QSpinBox* m_scale;
- QSpinBox* m_shearX;
- QSpinBox* m_shearY;
+ TQSpinBox* m_rotation;
+ TQSpinBox* m_scale;
+ TQSpinBox* m_shearX;
+ TQSpinBox* m_shearY;
KoDocumentChild* m_child;
class Private;
Private *d;
diff --git a/kspread/kspread_undo.cc b/kspread/kspread_undo.cc
index a8518b0f..ae075fe6 100644
--- a/kspread/kspread_undo.cc
+++ b/kspread/kspread_undo.cc
@@ -33,7 +33,7 @@
using namespace KSpread;
-bool operator < (const QPoint& pointA , const QPoint& pointB)
+bool operator < (const TQPoint& pointA , const TQPoint& pointB)
{
if (pointA.y() == pointB.y())
return ( pointA.x() < pointB.x() );
@@ -149,18 +149,18 @@ bool Undo::isLocked() const
return m_pDoc->undoLocked();
}
-QString Undo::getRedoName()
+TQString Undo::getRedoName()
{
if ( m_stckRedo.isEmpty() )
- return QString("");
+ return TQString("");
return m_stckRedo.current()->getName();
}
-QString Undo::getUndoName()
+TQString Undo::getUndoName()
{
if ( m_stckUndo.isEmpty() )
- return QString("");
+ return TQString("");
return m_stckUndo.current()->getName();
}
@@ -169,7 +169,7 @@ QString Undo::getUndoName()
* MacroUndoAction
*
***************************************************************************/
-MacroUndoAction::MacroUndoAction( Doc *_doc, const QString& _name ):
+MacroUndoAction::MacroUndoAction( Doc *_doc, const TQString& _name ):
UndoAction( _doc )
{
name=_name;
@@ -187,14 +187,14 @@ void MacroUndoAction::addCommand(UndoAction *command)
void MacroUndoAction::undo()
{
- QPtrListIterator<UndoAction> it(m_commands);
+ TQPtrListIterator<UndoAction> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->undo();
}
void MacroUndoAction::redo()
{
- QPtrListIterator<UndoAction> it(m_commands);
+ TQPtrListIterator<UndoAction> it(m_commands);
for ( ; it.current() ; ++it )
it.current()->redo();
}
@@ -216,18 +216,18 @@ UndoInsertRemoveAction::~UndoInsertRemoveAction()
}
void UndoInsertRemoveAction::saveFormulaReference( Sheet *_sheet,
- int col, int row, QString & formula )
+ int col, int row, TQString & formula )
{
if ( _sheet == 0 )
return;
- QString sheetName = _sheet->sheetName();
+ TQString sheetName = _sheet->sheetName();
m_lstFormulaCells.append( FormulaOfCell( sheetName, col, row, formula ) );
}
void UndoInsertRemoveAction::undoFormulaReference()
{
- QValueList<FormulaOfCell>::iterator it;
+ TQValueList<FormulaOfCell>::iterator it;
for ( it = m_lstFormulaCells.begin(); it != m_lstFormulaCells.end(); ++it )
{
Sheet* sheet = doc()->map()->findSheet( (*it).sheetName() );
@@ -257,19 +257,19 @@ UndoRemoveColumn::UndoRemoveColumn( Doc *_doc, Sheet *_sheet, int _column,int _n
m_iNbCol = _nbCol;
m_printRange = _sheet->print()->printRange();
m_printRepeatColumns = _sheet->print()->printRepeatColumns();
- QRect selection;
+ TQRect selection;
selection.setCoords( _column, 1, _column+m_iNbCol, KS_rowMax );
- QDomDocument doc = _sheet->saveCellRegion( selection );
+ TQDomDocument doc = _sheet->saveCellRegion( selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -291,8 +291,8 @@ void UndoRemoveColumn::undo()
sheet->insertColumn( m_iColumn,m_iNbCol);
- QPoint pastePoint( m_iColumn, 1 );
- sheet->paste( m_data, QRect( pastePoint, pastePoint ) );
+ TQPoint pastePoint( m_iColumn, 1 );
+ sheet->paste( m_data, TQRect( pastePoint, pastePoint ) );
if(sheet->getAutoCalc()) sheet->recalc();
sheet->print()->setPrintRange( m_printRange );
@@ -376,19 +376,19 @@ UndoRemoveRow::UndoRemoveRow( Doc *_doc, Sheet *_sheet, int _row,int _nbRow) :
m_printRange=_sheet->print()->printRange();
m_printRepeatRows = _sheet->print()->printRepeatRows();
- QRect selection;
+ TQRect selection;
selection.setCoords( 1, _row, KS_colMax, _row+m_iNbRow );
- QDomDocument doc = _sheet->saveCellRegion( selection );
+ TQDomDocument doc = _sheet->saveCellRegion( selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -416,8 +416,8 @@ void UndoRemoveRow::undo()
sheet->insertRow( m_iRow,m_iNbRow );
- QPoint pastePoint( 1, m_iRow );
- sheet->paste( m_data, QRect(pastePoint, pastePoint) );
+ TQPoint pastePoint( 1, m_iRow );
+ sheet->paste( m_data, TQRect(pastePoint, pastePoint) );
sheet->print()->setPrintRange( m_printRange );
sheet->print()->setPrintRepeatRows( m_printRepeatRows );
@@ -492,7 +492,7 @@ void UndoInsertRow::redo()
*
***************************************************************************/
-/*UndoHideRow::UndoHideRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow , QValueList<int>_listRow) :
+/*UndoHideRow::UndoHideRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow , TQValueList<int>_listRow) :
UndoAction( _doc )
{
name=i18n("Hide Rows");
@@ -502,14 +502,14 @@ void UndoInsertRow::redo()
if(m_iNbRow!=-1)
createList( listRow ,_sheet );
else
- listRow=QValueList<int>(_listRow);
+ listRow=TQValueList<int>(_listRow);
}
UndoHideRow::~UndoHideRow()
{
}
-void UndoHideRow::createList( QValueList<int>&list,Sheet *tab )
+void UndoHideRow::createList( TQValueList<int>&list,Sheet *tab )
{
RowFormat *rl;
for(int i=m_iRow;i<=(m_iRow+m_iNbRow);i++)
@@ -548,7 +548,7 @@ void UndoHideRow::redo()
*
***************************************************************************/
-/*UndoHideColumn::UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol, QValueList<int>_listCol ) :
+/*UndoHideColumn::UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol, TQValueList<int>_listCol ) :
UndoAction( _doc )
{
name=i18n("Hide Columns");
@@ -559,14 +559,14 @@ void UndoHideRow::redo()
if(m_iNbCol!=-1)
createList( listCol ,_sheet );
else
- listCol=QValueList<int>(_listCol);
+ listCol=TQValueList<int>(_listCol);
}
UndoHideColumn::~UndoHideColumn()
{
}
-void UndoHideColumn::createList( QValueList<int>&list,Sheet *tab )
+void UndoHideColumn::createList( TQValueList<int>&list,Sheet *tab )
{
ColumnFormat *cl;
for(int i=m_iColumn;i<=(m_iColumn+m_iNbCol);i++)
@@ -605,7 +605,7 @@ void UndoHideColumn::redo()
*
***************************************************************************/
-/*UndoShowRow::UndoShowRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow, QValueList<int>_listRow ) :
+/*UndoShowRow::UndoShowRow( Doc *_doc, Sheet *_sheet, int _row, int _nbRow, TQValueList<int>_listRow ) :
UndoAction( _doc )
{
name=i18n("Show Rows");
@@ -616,14 +616,14 @@ void UndoHideColumn::redo()
if(m_iNbRow!=-1)
createList( listRow ,_sheet );
else
- listRow=QValueList<int>(_listRow);
+ listRow=TQValueList<int>(_listRow);
}
UndoShowRow::~UndoShowRow()
{
}
-void UndoShowRow::createList( QValueList<int>&list,Sheet *tab )
+void UndoShowRow::createList( TQValueList<int>&list,Sheet *tab )
{
RowFormat *rl;
for(int i=m_iRow;i<=(m_iRow+m_iNbRow);i++)
@@ -662,7 +662,7 @@ void UndoShowRow::redo()
*
***************************************************************************/
-/*UndoShowColumn::UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol,QValueList<int>_listCol ) :
+/*UndoShowColumn::UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column, int _nbCol,TQValueList<int>_listCol ) :
UndoAction( _doc )
{
name=i18n("Show Columns");
@@ -673,14 +673,14 @@ void UndoShowRow::redo()
if(m_iNbCol!=-1)
createList( listCol ,_sheet );
else
- listCol=QValueList<int>(_listCol);
+ listCol=TQValueList<int>(_listCol);
}
UndoShowColumn::~UndoShowColumn()
{
}
-void UndoShowColumn::createList( QValueList<int>&list,Sheet *tab )
+void UndoShowColumn::createList( TQValueList<int>&list,Sheet *tab )
{
ColumnFormat *cl;
for(int i=m_iColumn;i<=(m_iColumn+m_iNbCol);i++)
@@ -838,7 +838,7 @@ void UndoPaperLayout::redo()
*
***************************************************************************/
-UndoSetText::UndoSetText( Doc *_doc, Sheet *_sheet, const QString& _text, int _column, int _row,FormatType _formatType ) :
+UndoSetText::UndoSetText( Doc *_doc, Sheet *_sheet, const TQString& _text, int _column, int _row,FormatType _formatType ) :
UndoAction( _doc )
{
name=i18n("Change Text");
@@ -871,7 +871,7 @@ void UndoSetText::undo()
cell->setCellText( "" );
else
cell->setCellText( m_strText );
- sheet->updateView( QRect( m_iColumn, m_iRow, 1, 1 ) );
+ sheet->updateView( TQRect( m_iColumn, m_iRow, 1, 1 ) );
doc()->undoUnlock();
}
@@ -891,7 +891,7 @@ void UndoSetText::redo()
else
cell->setCellText( m_strRedoText );
cell->format()->setFormatType(m_eFormatTypeRedo);
- sheet->updateView( QRect( m_iColumn, m_iRow, 1, 1 ) );
+ sheet->updateView( TQRect( m_iColumn, m_iRow, 1, 1 ) );
doc()->undoUnlock();
}
@@ -904,7 +904,7 @@ void UndoSetText::redo()
UndoCellFormat::UndoCellFormat( Doc * _doc,
Sheet * _sheet,
const Region & _selection,
- const QString & _name ) :
+ const TQString & _name ) :
UndoAction( _doc )
{
if ( _name.isEmpty())
@@ -917,12 +917,12 @@ UndoCellFormat::UndoCellFormat( Doc * _doc,
copyFormat( m_lstFormats, m_lstColFormats, m_lstRowFormats, _sheet );
}
-void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
- QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow,
+void UndoCellFormat::copyFormat(TQValueList<tqlayoutCell> & list,
+ TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow,
Sheet * sheet )
{
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = list.begin(); it2 != list.end(); ++it2 )
{
delete (*it2).l;
@@ -933,7 +933,7 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int bottom = range.bottom();
int right = range.right();
@@ -942,20 +942,20 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
/* Don't need to go through the loop twice...
for (int i = range.left(); i <= right; ++i)
{
- layoutColumn tmplayout;
- tmplayout.col = i;
- tmplayout.l = new ColumnFormat( sheet, i );
- tmplayout.l->copy( *(sheet->columnFormat( i )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = i;
+ tmptqlayout.l = new ColumnFormat( sheet, i );
+ tmptqlayout.l->copy( *(sheet->columnFormat( i )) );
+ listCol.append(tmptqlayout);
}
*/
for ( int c = range.left(); c <= right; ++c )
{
- layoutColumn tmplayout;
- tmplayout.col = c;
- tmplayout.l = new ColumnFormat( sheet, c );
- tmplayout.l->copy( *(sheet->columnFormat( c )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = c;
+ tmptqlayout.l = new ColumnFormat( sheet, c );
+ tmptqlayout.l->copy( *(sheet->columnFormat( c )) );
+ listCol.append(tmptqlayout);
cell = sheet->getFirstCellColumn( c );
while ( cell )
@@ -966,12 +966,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
continue;
}
- layoutCell tmplayout;
- tmplayout.col = c;
- tmplayout.row = cell->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c;
+ tmptqlayout.row = cell->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ list.append(tmptqlayout);
cell = sheet->getNextCellDown( c, cell->row() );
}
@@ -984,12 +984,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
if ( range.left() <= col && right >= col
&& !c->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -998,11 +998,11 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
{
for ( int row = range.top(); row <= bottom; ++row )
{
- layoutRow tmplayout;
- tmplayout.row = row;
- tmplayout.l = new RowFormat( sheet, row );
- tmplayout.l->copy( *(sheet->rowFormat( row )) );
- listRow.append(tmplayout);
+ tqlayoutRow tmptqlayout;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new RowFormat( sheet, row );
+ tmptqlayout.l->copy( *(sheet->rowFormat( row )) );
+ listRow.append(tmptqlayout);
cell = sheet->getFirstCellRow( row );
while ( cell )
@@ -1012,12 +1012,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
cell = sheet->getNextCellRight( cell->column(), row );
continue;
}
- layoutCell tmplayout;
- tmplayout.col = cell->column();
- tmplayout.row = row;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( cell->column(), row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = cell->column();
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( cell->column(), row )->format()) );
+ list.append(tmptqlayout);
cell = sheet->getNextCellRight( cell->column(), row );
}
@@ -1030,12 +1030,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
if ( range.top() <= row && bottom >= row
&& !c->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -1048,12 +1048,12 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
Cell * cell = sheet->nonDefaultCell( x, y );
if ( !cell->isPartOfMerged() )
{
- layoutCell tmplayout;
- tmplayout.col = x;
- tmplayout.row = y;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( x, y )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = x;
+ tmptqlayout.row = y;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( x, y )->format()) );
+ list.append(tmptqlayout);
}
}
}
@@ -1062,7 +1062,7 @@ void UndoCellFormat::copyFormat(QValueList<layoutCell> & list,
UndoCellFormat::~UndoCellFormat()
{
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
delete (*it2).l;
@@ -1075,7 +1075,7 @@ UndoCellFormat::~UndoCellFormat()
}
m_lstRedoFormats.clear();
- QValueList<layoutColumn>::Iterator it3;
+ TQValueList<tqlayoutColumn>::Iterator it3;
for ( it3 = m_lstColFormats.begin(); it3 != m_lstColFormats.end(); ++it3 )
{
delete (*it3).l;
@@ -1088,7 +1088,7 @@ UndoCellFormat::~UndoCellFormat()
}
m_lstRedoColFormats.clear();
- QValueList<layoutRow>::Iterator it4;
+ TQValueList<tqlayoutRow>::Iterator it4;
for ( it4 = m_lstRowFormats.begin(); it4 != m_lstRowFormats.end(); ++it4 )
{
delete (*it4).l;
@@ -1116,10 +1116,10 @@ void UndoCellFormat::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if( util_isColumnSelected( range ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstColFormats.begin(); it2 != m_lstColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1128,7 +1128,7 @@ void UndoCellFormat::undo()
}
else if( util_isRowSelected( range ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRowFormats.begin(); it2 != m_lstRowFormats.end(); ++it2 )
{
RowFormat * row = sheet->nonDefaultRowFormat( (*it2).row );
@@ -1136,7 +1136,7 @@ void UndoCellFormat::undo()
}
}
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1164,10 +1164,10 @@ void UndoCellFormat::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ( util_isColumnSelected( range ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstRedoColFormats.begin(); it2 != m_lstRedoColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1176,7 +1176,7 @@ void UndoCellFormat::redo()
}
else if( util_isRowSelected( range ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRedoRowFormats.begin(); it2 != m_lstRedoRowFormats.end(); ++it2 )
{
RowFormat * row = sheet->nonDefaultRowFormat( (*it2).row );
@@ -1184,7 +1184,7 @@ void UndoCellFormat::redo()
}
}
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstRedoFormats.begin(); it2 != m_lstRedoFormats.end(); ++it2 )
{
Cell * cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1212,7 +1212,7 @@ UndoChangeAngle::UndoChangeAngle( Doc * _doc,
UndoAction( _doc )
{
name = i18n("Change Angle");
- m_layoutUndo = new UndoCellFormat( _doc, _sheet, _selection, QString::null );
+ m_layoutUndo = new UndoCellFormat( _doc, _sheet, _selection, TQString() );
m_resizeUndo = new UndoResizeColRow( _doc, _sheet, _selection );
}
@@ -1240,7 +1240,7 @@ void UndoChangeAngle::redo()
*
***************************************************************************/
-UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const QRect & _selection ) :
+UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const TQRect & _selection ) :
UndoAction( _doc )
{
name = i18n("Sort");
@@ -1250,10 +1250,10 @@ UndoSort::UndoSort( Doc * _doc, Sheet * _sheet, const QRect & _selection ) :
copyAll( m_lstFormats, m_lstColFormats, m_lstRowFormats, _sheet );
}
-void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow, Sheet * sheet )
+void UndoSort::copyAll(TQValueList<tqlayoutTextCell> & list, TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow, Sheet * sheet )
{
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = list.begin(); it2 != list.end(); ++it2 )
{
delete (*it2).l;
@@ -1265,24 +1265,24 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
Cell * c;
for (int col = m_rctRect.left(); col <= m_rctRect.right(); ++col)
{
- layoutColumn tmplayout;
- tmplayout.col = col;
- tmplayout.l = new ColumnFormat( sheet, col );
- tmplayout.l->copy( *(sheet->columnFormat( col )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.l = new ColumnFormat( sheet, col );
+ tmptqlayout.l->copy( *(sheet->columnFormat( col )) );
+ listCol.append(tmptqlayout);
c = sheet->getFirstCellColumn( col );
while ( c )
{
if ( !c->isPartOfMerged() )
{
- layoutTextCell tmplayout;
- tmplayout.col = col;
- tmplayout.row = c->row();
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- tmplayout.text = c->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.row = c->row();
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ tmptqlayout.text = c->text();
+ list.append(tmptqlayout);
}
c = sheet->getNextCellDown( col, c->row() );
@@ -1294,24 +1294,24 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
Cell * c;
for ( int row = m_rctRect.top(); row <= m_rctRect.bottom(); ++row)
{
- layoutRow tmplayout;
- tmplayout.row = row;
- tmplayout.l = new RowFormat( sheet, row );
- tmplayout.l->copy( *(sheet->rowFormat( row )) );
- listRow.append(tmplayout);
+ tqlayoutRow tmptqlayout;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new RowFormat( sheet, row );
+ tmptqlayout.l->copy( *(sheet->rowFormat( row )) );
+ listRow.append(tmptqlayout);
c = sheet->getFirstCellRow( row );
while ( c )
{
if ( !c->isPartOfMerged() )
{
- layoutTextCell tmplayout;
- tmplayout.col = c->column();
- tmplayout.row = row;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- tmplayout.text = c->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = c->column();
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ tmptqlayout.text = c->text();
+ list.append(tmptqlayout);
}
c = sheet->getNextCellRight( c->column(), row );
}
@@ -1328,13 +1328,13 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
cell = sheet->nonDefaultCell( x, y );
if (!cell->isPartOfMerged())
{
- layoutTextCell tmplayout;
- tmplayout.col = x;
- tmplayout.row = y;
- tmplayout.l = new Format( sheet, 0 );
- tmplayout.l->copy( *(sheet->cellAt( x, y )->format()) );
- tmplayout.text = cell->text();
- list.append(tmplayout);
+ tqlayoutTextCell tmptqlayout;
+ tmptqlayout.col = x;
+ tmptqlayout.row = y;
+ tmptqlayout.l = new Format( sheet, 0 );
+ tmptqlayout.l->copy( *(sheet->cellAt( x, y )->format()) );
+ tmptqlayout.text = cell->text();
+ list.append(tmptqlayout);
}
}
}
@@ -1342,7 +1342,7 @@ void UndoSort::copyAll(QValueList<layoutTextCell> & list, QValueList<layoutColum
UndoSort::~UndoSort()
{
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
delete (*it2).l;
@@ -1355,7 +1355,7 @@ UndoSort::~UndoSort()
}
m_lstRedoFormats.clear();
- QValueList<layoutColumn>::Iterator it3;
+ TQValueList<tqlayoutColumn>::Iterator it3;
for ( it3 = m_lstColFormats.begin(); it3 != m_lstColFormats.end(); ++it3 )
{
delete (*it3).l;
@@ -1368,7 +1368,7 @@ UndoSort::~UndoSort()
}
m_lstRedoColFormats.clear();
- QValueList<layoutRow>::Iterator it4;
+ TQValueList<tqlayoutRow>::Iterator it4;
for ( it4 = m_lstRowFormats.begin(); it4 != m_lstRowFormats.end(); ++it4 )
{
delete (*it4).l;
@@ -1397,7 +1397,7 @@ void UndoSort::undo()
if ( util_isColumnSelected( m_rctRect ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstColFormats.begin(); it2 != m_lstColFormats.end(); ++it2 )
{
ColumnFormat * col = sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1406,7 +1406,7 @@ void UndoSort::undo()
}
else if( util_isRowSelected( m_rctRect ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRowFormats.begin(); it2 != m_lstRowFormats.end(); ++it2 )
{
RowFormat *row= sheet->nonDefaultRowFormat( (*it2).row );
@@ -1414,7 +1414,7 @@ void UndoSort::undo()
}
}
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1449,7 +1449,7 @@ void UndoSort::redo()
if( util_isColumnSelected( m_rctRect ) )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstRedoColFormats.begin(); it2 != m_lstRedoColFormats.end(); ++it2 )
{
ColumnFormat *col= sheet->nonDefaultColumnFormat( (*it2).col );
@@ -1458,7 +1458,7 @@ void UndoSort::redo()
}
else if( util_isRowSelected( m_rctRect ) )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRedoRowFormats.begin(); it2 != m_lstRedoRowFormats.end(); ++it2 )
{
RowFormat *row= sheet->nonDefaultRowFormat( (*it2).row );
@@ -1466,7 +1466,7 @@ void UndoSort::redo()
}
}
- QValueList<layoutTextCell>::Iterator it2;
+ TQValueList<tqlayoutTextCell>::Iterator it2;
for ( it2 = m_lstRedoFormats.begin(); it2 != m_lstRedoFormats.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -1508,14 +1508,14 @@ UndoDelete::~UndoDelete()
{
}
-void UndoDelete::createListCell( QCString &listCell,QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet )
+void UndoDelete::createListCell( TQCString &listCell,TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet )
{
listRow.clear();
listCol.clear();
Region::ConstIterator endOfList = m_region.constEnd();
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
// copy column(s)
if ((*it)->isColumn())
{
@@ -1551,16 +1551,16 @@ void UndoDelete::createListCell( QCString &listCell,QValueList<columnSize> &list
}
//save all cells in area
- QDomDocument doc = sheet->saveCellRegion( m_region );
+ TQDomDocument doc = sheet->saveCellRegion( m_region );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
listCell = buffer.utf8();
int len = listCell.length();
char tmp = listCell[ len - 1 ];
@@ -1580,7 +1580,7 @@ void UndoDelete::undo()
doc()->emitBeginOperation();
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -1589,7 +1589,7 @@ void UndoDelete::undo()
}
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -1616,7 +1616,7 @@ void UndoDelete::redo()
doc()->emitBeginOperation();
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -1625,7 +1625,7 @@ void UndoDelete::redo()
}
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -1669,13 +1669,13 @@ UndoDragDrop::~UndoDragDrop()
{
}
-void UndoDragDrop::saveCellRect( QCString & cells, Sheet * sheet,
+void UndoDragDrop::saveCellRect( TQCString & cells, Sheet * sheet,
const Region& region )
{
- QDomDocument doc = sheet->saveCellRegion(region);
+ TQDomDocument doc = sheet->saveCellRegion(region);
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
cells = buffer.utf8();
@@ -1754,14 +1754,14 @@ UndoResizeColRow::UndoResizeColRow( Doc *_doc, Sheet *_sheet, const Region &_sel
createList( m_lstColumn,m_lstRow, _sheet );
}
-void UndoResizeColRow::createList( QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet )
+void UndoResizeColRow::createList( TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet )
{
listCol.clear();
listRow.clear();
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // entire column(s)
{
@@ -1837,11 +1837,11 @@ void UndoResizeColRow::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // complete column(s)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
@@ -1850,7 +1850,7 @@ void UndoResizeColRow::undo()
}
else if( util_isRowSelected( m_rctRect ) ) // complete row(s)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->rowFormat((*it2).rowNumber);
@@ -1859,13 +1859,13 @@ void UndoResizeColRow::undo()
}
else // row and column
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
cl->setDblWidth((*it2).columnWidth);
}
- QValueList<rowSize>::Iterator it1;
+ TQValueList<rowSize>::Iterator it1;
for ( it1 = m_lstRow.begin(); it1 != m_lstRow.end(); ++it1 )
{
RowFormat *rw=sheet->rowFormat((*it1).rowNumber);
@@ -1888,11 +1888,11 @@ void UndoResizeColRow::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if( util_isColumnSelected( m_rctRect ) ) // complete column(s)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
@@ -1901,7 +1901,7 @@ void UndoResizeColRow::redo()
}
else if( util_isRowSelected( m_rctRect ) ) // complete row(s)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->rowFormat((*it2).rowNumber);
@@ -1910,13 +1910,13 @@ void UndoResizeColRow::redo()
}
else // row and column
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->columnFormat((*it2).columnNumber);
cl->setDblWidth((*it2).columnWidth);
}
- QValueList<rowSize>::Iterator it1;
+ TQValueList<rowSize>::Iterator it1;
for ( it1 = m_lstRedoRow.begin(); it1 != m_lstRedoRow.end(); ++it1 )
{
RowFormat *rw=sheet->rowFormat((*it1).rowNumber);
@@ -1946,14 +1946,14 @@ UndoChangeAreaTextCell::UndoChangeAreaTextCell( Doc *_doc, Sheet *_sheet, const
createList( m_lstTextCell, _sheet );
}
-void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet )
+void UndoChangeAreaTextCell::createList( TQMap<TQPoint,TQString> &map, Sheet* sheet )
{
map.clear();
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
int bottom = m_rctRect.bottom();
int right = m_rctRect.right();
@@ -1971,7 +1971,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = col;
//tmpText.row = c->row();
//tmpText.text = c->text();
- map.insert( QPoint(col,c->row()) , c->text() );
+ map.insert( TQPoint(col,c->row()) , c->text() );
}
c = sheet->getNextCellDown( col, c->row() );
}
@@ -1991,7 +1991,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = c->column();
//tmpText.row = row;
//tmpText.text = c->text();
- map.insert( QPoint(c->column(),row) , c->text() );
+ map.insert( TQPoint(c->column(),row) , c->text() );
}
c = sheet->getNextCellRight( c->column(), row );
}
@@ -2013,7 +2013,7 @@ void UndoChangeAreaTextCell::createList( QMap<QPoint,QString> &map, Sheet* sheet
//tmpText.col = x;
//tmpText.row = cell->row();
//tmpText.text = cell->text();
- map.insert( QPoint(x,cell->row()) , cell->text());
+ map.insert( TQPoint(x,cell->row()) , cell->text());
}
cell = sheet->getNextCellDown( x, cell->row() );
}
@@ -2043,7 +2043,7 @@ void UndoChangeAreaTextCell::undo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if ( !util_isRowSelected( m_rctRect )
&& !util_isColumnSelected( m_rctRect ) )
@@ -2053,15 +2053,15 @@ void UndoChangeAreaTextCell::undo()
{
Cell* cell = sheet->nonDefaultCell( x, y );
- const QPoint location(x,y);
+ const TQPoint location(x,y);
- if ( m_lstTextCell.contains(location) )
+ if ( m_lstTextCell.tqcontains(location) )
cell->setCellText( m_lstTextCell[location] );
else
cell->setCellText( "",true );
/*bool found = false;
- QValueList<textOfCell>::Iterator it;
+ TQValueList<textOfCell>::Iterator it;
for( it = m_lstTextCell.begin(); it != m_lstTextCell.end(); ++it )
if ( (*it).col == x && (*it).row == y && !found )
{
@@ -2075,7 +2075,7 @@ void UndoChangeAreaTextCell::undo()
}
else
{
- QMap<QPoint,QString>::Iterator it2;
+ TQMap<TQPoint,TQString>::Iterator it2;
for ( it2 = m_lstTextCell.begin(); it2 != m_lstTextCell.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( it2.key().x(), it2.key().y() );
@@ -2109,7 +2109,7 @@ void UndoChangeAreaTextCell::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect m_rctRect = (*it)->rect().normalize();
+ TQRect m_rctRect = (*it)->rect().normalize();
if ( !util_isRowSelected( m_rctRect )
&& !util_isColumnSelected( m_rctRect ) )
@@ -2119,14 +2119,14 @@ void UndoChangeAreaTextCell::redo()
{
Cell* cell = sheet->nonDefaultCell( x, y );
- const QPoint location(x,y);
+ const TQPoint location(x,y);
- if (m_lstRedoTextCell.contains(location))
+ if (m_lstRedoTextCell.tqcontains(location))
cell->setCellText( m_lstRedoTextCell[location] );
else
cell->setCellText( "" , true );
/*bool found = false;
- QValueList<textOfCell>::Iterator it;
+ TQValueList<textOfCell>::Iterator it;
for( it = m_lstRedoTextCell.begin(); it != m_lstRedoTextCell.end(); ++it )
if ( (*it).col == x && (*it).row == y && !found )
{
@@ -2140,7 +2140,7 @@ void UndoChangeAreaTextCell::redo()
}
else
{
- QMap<QPoint,QString>::Iterator it2;
+ TQMap<TQPoint,TQString>::Iterator it2;
for ( it2 = m_lstRedoTextCell.begin(); it2 != m_lstRedoTextCell.end(); ++it2 )
{
Cell *cell = sheet->nonDefaultCell( it2.key().x(), it2.key().y() );
@@ -2220,7 +2220,7 @@ void UndoMergedCell::redo()
*
***************************************************************************/
-UndoAutofill::UndoAutofill( Doc *_doc, Sheet* sheet, const QRect & _selection)
+UndoAutofill::UndoAutofill( Doc *_doc, Sheet* sheet, const TQRect & _selection)
: UndoAction( _doc )
{
name=i18n("Autofill");
@@ -2235,18 +2235,18 @@ UndoAutofill::~UndoAutofill()
{
}
-void UndoAutofill::createListCell( QCString &list, Sheet* sheet )
+void UndoAutofill::createListCell( TQCString &list, Sheet* sheet )
{
- QDomDocument doc = sheet->saveCellRegion( m_selection );
+ TQDomDocument doc = sheet->saveCellRegion( m_selection );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
list = buffer.utf8();
int len = list.length();
char tmp = list[ len - 1 ];
@@ -2300,7 +2300,7 @@ void UndoAutofill::redo()
*
***************************************************************************/
-UndoInsertCellRow::UndoInsertCellRow( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoInsertCellRow::UndoInsertCellRow( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Insert Cell");
@@ -2344,7 +2344,7 @@ void UndoInsertCellRow::redo()
***************************************************************************/
-UndoInsertCellCol::UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoInsertCellCol::UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Insert Cell");
@@ -2387,23 +2387,23 @@ void UndoInsertCellCol::redo()
*
***************************************************************************/
-UndoRemoveCellRow::UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const QRect &rect ) :
+UndoRemoveCellRow::UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const TQRect &rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Remove Cell");
m_sheetName = _sheet->sheetName();
m_rect=rect;
- QDomDocument doc = _sheet->saveCellRegion( m_rect );
+ TQDomDocument doc = _sheet->saveCellRegion( m_rect );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -2446,23 +2446,23 @@ void UndoRemoveCellRow::redo()
*
***************************************************************************/
-UndoRemoveCellCol::UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect ) :
+UndoRemoveCellCol::UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect ) :
UndoInsertRemoveAction( _doc )
{
name=i18n("Remove Cell");
m_sheetName = _sheet->sheetName();
m_rect=_rect;
- QDomDocument doc = _sheet->saveCellRegion( m_rect );
+ TQDomDocument doc = _sheet->saveCellRegion( m_rect );
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
m_data = buffer.utf8();
int len = m_data.length();
char tmp = m_data[ len - 1 ];
@@ -2520,19 +2520,19 @@ UndoConditional::~UndoConditional()
{
}
-void UndoConditional::createListCell( QCString &list, Sheet* sheet )
+void UndoConditional::createListCell( TQCString &list, Sheet* sheet )
{
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
- QDomDocument doc = sheet->saveCellRegion( m_region );
+ TQDomDocument doc = sheet->saveCellRegion( m_region );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
list = buffer.utf8();
int len = list.length();
char tmp = list[ len - 1 ];
@@ -2608,9 +2608,9 @@ UndoCellPaste::~UndoCellPaste()
{
}
-void UndoCellPaste::createListCell(QCString& listCell,
- QValueList<columnSize>& listCol,
- QValueList<rowSize>& listRow,
+void UndoCellPaste::createListCell(TQCString& listCell,
+ TQValueList<columnSize>& listCol,
+ TQValueList<rowSize>& listRow,
Sheet* sheet)
{
listCol.clear();
@@ -2621,7 +2621,7 @@ void UndoCellPaste::createListCell(QCString& listCell,
{
int nbCol = 0;
int nbRow = 0;
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
nbCol = range.width();
@@ -2665,16 +2665,16 @@ void UndoCellPaste::createListCell(QCString& listCell,
}
}
//save all cells in area
- QDomDocument doc = sheet->saveCellRegion(m_region);
+ TQDomDocument doc = sheet->saveCellRegion(m_region);
// Save to buffer
- QString buffer;
- QTextStream str( &buffer, IO_WriteOnly );
+ TQString buffer;
+ TQTextStream str( &buffer, IO_WriteOnly );
str << doc;
- // This is a terrible hack to store unicode
- // data in a QCString in a way that
- // QCString::length() == QCString().size().
- // This allows us to treat the QCString like a QByteArray later on.
+ // This is a terrible hack to store tqunicode
+ // data in a TQCString in a way that
+ // TQCString::length() == TQCString().size().
+ // This allows us to treat the TQCString like a TQByteArray later on.
listCell = buffer.utf8();
int len = listCell.length();
char tmp = listCell[ len - 1 ];
@@ -2699,13 +2699,13 @@ void UndoCellPaste::undo()
Region::ConstIterator endOfList = m_region.constEnd();
for (Region::ConstIterator it = --m_region.constEnd(); it != endOfList; --it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
if (!b_insert)
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstColumn.begin(); it2 != m_lstColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -2721,7 +2721,7 @@ void UndoCellPaste::undo()
{
if (!b_insert)
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRow.begin(); it2 != m_lstRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -2742,7 +2742,7 @@ void UndoCellPaste::undo()
if (b_insert) // with insertion
{
- QRect rect = m_region.boundingRect();
+ TQRect rect = m_region.boundingRect();
if (m_iInsertTo == -1 && numCols == 0 && numRows == 0)
{
// substract already removed columns
@@ -2794,7 +2794,7 @@ void UndoCellPaste::redo()
Region::ConstIterator endOfList(m_region.constEnd());
for (Region::ConstIterator it = m_region.constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if ((*it)->isColumn())
{
@@ -2815,7 +2815,7 @@ void UndoCellPaste::redo()
if (b_insert)
{
- QRect rect = m_region.boundingRect();
+ TQRect rect = m_region.boundingRect();
if (m_iInsertTo == -1 && numCols == 0 && numRows == 0)
{
rect.setWidth(rect.width());
@@ -2842,7 +2842,7 @@ void UndoCellPaste::redo()
{
if ((*it)->isColumn())
{
- QValueList<columnSize>::Iterator it2;
+ TQValueList<columnSize>::Iterator it2;
for ( it2 = m_lstRedoColumn.begin(); it2 != m_lstRedoColumn.end(); ++it2 )
{
ColumnFormat *cl=sheet->nonDefaultColumnFormat((*it2).columnNumber);
@@ -2851,7 +2851,7 @@ void UndoCellPaste::redo()
}
else if ((*it)->isRow())
{
- QValueList<rowSize>::Iterator it2;
+ TQValueList<rowSize>::Iterator it2;
for ( it2 = m_lstRedoRow.begin(); it2 != m_lstRedoRow.end(); ++it2 )
{
RowFormat *rw=sheet->nonDefaultRowFormat((*it2).rowNumber);
@@ -2878,7 +2878,7 @@ void UndoCellPaste::redo()
*
***************************************************************************/
-UndoStyleCell::UndoStyleCell( Doc *_doc, Sheet* sheet, const QRect & _selection)
+UndoStyleCell::UndoStyleCell( Doc *_doc, Sheet* sheet, const TQRect & _selection)
: UndoAction( _doc )
{
name=i18n("Style of Cell");
@@ -2893,7 +2893,7 @@ UndoStyleCell::~UndoStyleCell()
{
}
-void UndoStyleCell::createListCell( QValueList<styleCell> &listCell, Sheet* sheet )
+void UndoStyleCell::createListCell( TQValueList<styleCell> &listCell, Sheet* sheet )
{
int bottom = m_selection.bottom();
int right = m_selection.right();
@@ -2962,7 +2962,7 @@ void UndoStyleCell::undo()
doc()->emitBeginOperation();
- QValueList<styleCell>::Iterator it2;
+ TQValueList<styleCell>::Iterator it2;
for ( it2 = m_lstStyleCell.begin(); it2 != m_lstStyleCell.end(); ++it2 )
{
sheet->nonDefaultCell( (*it2).col, (*it2).row);
@@ -2983,7 +2983,7 @@ void UndoStyleCell::redo()
doc()->undoLock();
doc()->emitBeginOperation();
- QValueList<styleCell>::Iterator it2;
+ TQValueList<styleCell>::Iterator it2;
for ( it2 = m_lstRedoStyleCell.begin(); it2 != m_lstRedoStyleCell.end(); ++it2 )
{
sheet->nonDefaultCell( (*it2).col, (*it2).row);
@@ -2994,7 +2994,7 @@ void UndoStyleCell::redo()
doc()->undoUnlock();
}
-UndoInsertData::UndoInsertData( Doc * _doc, Sheet * _sheet, QRect & _selection )
+UndoInsertData::UndoInsertData( Doc * _doc, Sheet * _sheet, TQRect & _selection )
: UndoChangeAreaTextCell( _doc, _sheet, _selection )
{
name = i18n("Insert Data From Database");
diff --git a/kspread/kspread_undo.h b/kspread/kspread_undo.h
index 130b1a80..bb68a43f 100644
--- a/kspread/kspread_undo.h
+++ b/kspread/kspread_undo.h
@@ -20,12 +20,12 @@
#ifndef __kspread_undo_h__
#define __kspread_undo_h__
-#include <qptrstack.h>
-#include <qstring.h>
-#include <qrect.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqptrstack.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include <KoUnit.h>
#include <KoPageLayout.h>
@@ -57,28 +57,28 @@ double columnWidth;
struct textOfCell {
int row;
int col;
-QString text;
+TQString text;
};
-struct layoutTextCell {
+struct tqlayoutTextCell {
int row;
int col;
Format * l;
-QString text;
+TQString text;
};
-struct layoutCell {
+struct tqlayoutCell {
int row;
int col;
Format *l;
};
-struct layoutColumn {
+struct tqlayoutColumn {
int col;
ColumnFormat *l;
};
-struct layoutRow {
+struct tqlayoutRow {
int row;
RowFormat *l;
};
@@ -86,27 +86,27 @@ RowFormat *l;
struct styleCell {
int row;
int col;
- QString action;
+ TQString action;
};
class FormulaOfCell
{
public:
FormulaOfCell(): m_sheetName(0) {}
- FormulaOfCell( QString & sheetName, int col, int row, QString & formula )
+ FormulaOfCell( TQString & sheetName, int col, int row, TQString & formula )
: m_sheetName( sheetName ), m_col( col ), m_row( row ), m_formula( formula )
{}
- QString sheetName() const { return m_sheetName; }
- QString formula() const { return m_formula; }
+ TQString sheetName() const { return m_sheetName; }
+ TQString formula() const { return m_formula; }
int col() const { return m_col; }
int row() const { return m_row; }
private:
- QString m_sheetName;
+ TQString m_sheetName;
int m_col;
int m_row;
- QString m_formula;
+ TQString m_formula;
};
/**
@@ -124,17 +124,17 @@ public:
Doc* doc()const { return m_pDoc; }
- QString getName()const {return name ;}
+ TQString getName()const {return name ;}
protected:
Doc *m_pDoc;
- QString name;
+ TQString name;
};
class MacroUndoAction : public UndoAction
{
public:
- MacroUndoAction( Doc * _doc, const QString & _name );
+ MacroUndoAction( Doc * _doc, const TQString & _name );
virtual ~MacroUndoAction();
void addCommand(UndoAction *command);
@@ -143,7 +143,7 @@ public:
virtual void redo();
protected:
- QPtrList<UndoAction> m_commands;
+ TQPtrList<UndoAction> m_commands;
};
class UndoInsertRemoveAction : public UndoAction
@@ -152,11 +152,11 @@ public:
UndoInsertRemoveAction( Doc *_doc );
virtual ~UndoInsertRemoveAction();
- void saveFormulaReference( Sheet *_sheet, int col, int row, QString & formula );
+ void saveFormulaReference( Sheet *_sheet, int col, int row, TQString & formula );
protected:
void undoFormulaReference();
- QValueList<FormulaOfCell> m_lstFormulaCells;
+ TQValueList<FormulaOfCell> m_lstFormulaCells;
};
class UndoRemoveColumn : public UndoInsertRemoveAction
@@ -169,12 +169,12 @@ public:
virtual void redo();
protected:
- QString m_sheetName;
- QCString m_data;
+ TQString m_sheetName;
+ TQCString m_data;
int m_iColumn;
int m_iNbCol;
- QRect m_printRange;
- QPair<int, int> m_printRepeatColumns;
+ TQRect m_printRange;
+ TQPair<int, int> m_printRepeatColumns;
};
class UndoInsertColumn : public UndoInsertRemoveAction
@@ -187,7 +187,7 @@ public:
virtual void redo();
protected:
- QString m_sheetName;
+ TQString m_sheetName;
int m_iColumn;
int m_iNbCol;
};
@@ -202,12 +202,12 @@ public:
virtual void redo();
protected:
- QString m_sheetName;
- QCString m_data;
+ TQString m_sheetName;
+ TQCString m_data;
int m_iRow;
int m_iNbRow;
- QRect m_printRange;
- QPair<int, int> m_printRepeatRows;
+ TQRect m_printRange;
+ TQPair<int, int> m_printRepeatRows;
};
class UndoInsertRow : public UndoInsertRemoveAction
@@ -220,7 +220,7 @@ public:
virtual void redo();
protected:
- QString m_sheetName;
+ TQString m_sheetName;
int m_iRow;
int m_iNbRow;
};
@@ -229,69 +229,69 @@ protected:
class UndoHideColumn : public UndoAction
{
public:
- UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, QValueList<int>listCol=QValueList<int>() );
+ UndoHideColumn( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, TQValueList<int>listCol=TQValueList<int>() );
virtual ~UndoHideColumn();
virtual void undo();
virtual void redo();
- void createList( QValueList<int>&list,Sheet *_tab );
+ void createList( TQValueList<int>&list,Sheet *_tab );
protected:
- QString m_sheetName;
+ TQString m_sheetName;
int m_iColumn;
int m_iNbCol;
- QValueList<int> listCol;
+ TQValueList<int> listCol;
};
class UndoHideRow : public UndoAction
{
public:
- UndoHideRow( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, QValueList<int>_listRow=QValueList<int>() );
+ UndoHideRow( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, TQValueList<int>_listRow=TQValueList<int>() );
virtual ~UndoHideRow();
virtual void undo();
virtual void redo();
protected:
- void createList( QValueList<int>&list,Sheet *_tab );
+ void createList( TQValueList<int>&list,Sheet *_tab );
- QString m_sheetName;
+ TQString m_sheetName;
int m_iRow;
int m_iNbRow;
- QValueList<int> listRow;
+ TQValueList<int> listRow;
};
class UndoShowColumn : public UndoAction
{
public:
- UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, QValueList<int>_list=QValueList<int>() );
+ UndoShowColumn( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, TQValueList<int>_list=TQValueList<int>() );
virtual ~UndoShowColumn();
virtual void undo();
virtual void redo();
protected:
- void createList( QValueList<int>&list,Sheet *_tab );
+ void createList( TQValueList<int>&list,Sheet *_tab );
- QString m_sheetName;
+ TQString m_sheetName;
int m_iColumn;
int m_iNbCol;
- QValueList<int> listCol;
+ TQValueList<int> listCol;
};
class UndoShowRow : public UndoAction
{
public:
- UndoShowRow( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, QValueList<int>list=QValueList<int>() );
+ UndoShowRow( Doc *_doc, Sheet *_sheet, int _column,int _nbCol=0, TQValueList<int>list=TQValueList<int>() );
virtual ~UndoShowRow();
virtual void undo();
virtual void redo();
protected:
- void createList( QValueList<int>&list,Sheet *_tab );
- QString m_sheetName;
+ void createList( TQValueList<int>&list,Sheet *_tab );
+ TQString m_sheetName;
int m_iRow;
int m_iNbRow;
- QValueList<int> listRow;
+ TQValueList<int> listRow;
};
@@ -305,7 +305,7 @@ public:
virtual void redo();
protected:
- QString m_sheetName;
+ TQString m_sheetName;
KoPageLayout m_pl;
KoPageLayout m_plRedo;
KoHeadFoot m_hf;
@@ -318,12 +318,12 @@ protected:
bool m_printCommentIndicatorRedo;
bool m_printFormulaIndicator;
bool m_printFormulaIndicatorRedo;
- QRect m_printRange;
- QRect m_printRangeRedo;
- QPair<int, int> m_printRepeatColumns;
- QPair<int, int> m_printRepeatColumnsRedo;
- QPair<int, int> m_printRepeatRows;
- QPair<int, int> m_printRepeatRowsRedo;
+ TQRect m_printRange;
+ TQRect m_printRangeRedo;
+ TQPair<int, int> m_printRepeatColumns;
+ TQPair<int, int> m_printRepeatColumnsRedo;
+ TQPair<int, int> m_printRepeatRows;
+ TQPair<int, int> m_printRepeatRowsRedo;
double m_dZoom;
double m_dZoomRedo;
int m_iPageLimitX;
@@ -336,18 +336,18 @@ protected:
class UndoSetText : public UndoAction
{
public:
- UndoSetText( Doc *_doc, Sheet *_sheet, const QString& _text, int _column, int _row, FormatType _formatType );
+ UndoSetText( Doc *_doc, Sheet *_sheet, const TQString& _text, int _column, int _row, FormatType _formatType );
virtual ~UndoSetText();
virtual void undo();
virtual void redo();
protected:
- QString m_sheetName;
+ TQString m_sheetName;
int m_iRow;
int m_iColumn;
- QString m_strText;
- QString m_strRedoText;
+ TQString m_strText;
+ TQString m_strRedoText;
FormatType m_eFormatType;
FormatType m_eFormatTypeRedo;
};
@@ -355,24 +355,24 @@ protected:
class UndoCellFormat : public UndoAction
{
public:
- UndoCellFormat( Doc *_doc, Sheet *_sheet, const Region &_selection, const QString &_title );
+ UndoCellFormat( Doc *_doc, Sheet *_sheet, const Region &_selection, const TQString &_title );
virtual ~UndoCellFormat();
virtual void undo();
virtual void redo();
protected:
- void copyFormat( QValueList<layoutCell> &list,QValueList<layoutColumn> &listCol,QValueList<layoutRow> &listRow, Sheet* sheet );
+ void copyFormat( TQValueList<tqlayoutCell> &list,TQValueList<tqlayoutColumn> &listCol,TQValueList<tqlayoutRow> &listRow, Sheet* sheet );
Region m_region;
- QValueList<layoutCell> m_lstFormats;
- QValueList<layoutCell> m_lstRedoFormats;
- QValueList<layoutColumn> m_lstColFormats;
- QValueList<layoutColumn> m_lstRedoColFormats;
- QValueList<layoutRow> m_lstRowFormats;
- QValueList<layoutRow> m_lstRedoRowFormats;
+ TQValueList<tqlayoutCell> m_lstFormats;
+ TQValueList<tqlayoutCell> m_lstRedoFormats;
+ TQValueList<tqlayoutColumn> m_lstColFormats;
+ TQValueList<tqlayoutColumn> m_lstRedoColFormats;
+ TQValueList<tqlayoutRow> m_lstRowFormats;
+ TQValueList<tqlayoutRow> m_lstRedoRowFormats;
- QString m_sheetName;
+ TQString m_sheetName;
};
class UndoChangeAngle : public UndoAction
@@ -401,16 +401,16 @@ public:
virtual void redo();
protected:
- void createListCell( QCString &listCell,QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet );
+ void createListCell( TQCString &listCell,TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet );
Region m_region;
- QCString m_data;
- QCString m_dataRedo;
- QValueList<columnSize> m_lstColumn;
- QValueList<columnSize> m_lstRedoColumn;
- QValueList<rowSize> m_lstRow;
- QValueList<rowSize> m_lstRedoRow;
- QString m_sheetName;
+ TQCString m_data;
+ TQCString m_dataRedo;
+ TQValueList<columnSize> m_lstColumn;
+ TQValueList<columnSize> m_lstRedoColumn;
+ TQValueList<rowSize> m_lstRow;
+ TQValueList<rowSize> m_lstRedoRow;
+ TQString m_sheetName;
};
class UndoDragDrop : public UndoAction
@@ -425,13 +425,13 @@ public:
protected:
Region m_selectionSource;
Region m_selectionTarget;
- QCString m_dataSource;
- QCString m_dataTarget;
- QCString m_dataRedoSource;
- QCString m_dataRedoTarget;
- QString m_sheetName;
+ TQCString m_dataSource;
+ TQCString m_dataTarget;
+ TQCString m_dataRedoSource;
+ TQCString m_dataRedoTarget;
+ TQString m_sheetName;
- void saveCellRect( QCString & cells, Sheet * sheet,
+ void saveCellRect( TQCString & cells, Sheet * sheet,
const Region& region );
};
@@ -445,14 +445,14 @@ public:
virtual void redo();
protected:
- void createList( QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet );
+ void createList( TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet );
Region m_region;
- QValueList<columnSize> m_lstColumn;
- QValueList<columnSize> m_lstRedoColumn;
- QValueList<rowSize> m_lstRow;
- QValueList<rowSize> m_lstRedoRow;
- QString m_sheetName;
+ TQValueList<columnSize> m_lstColumn;
+ TQValueList<columnSize> m_lstRedoColumn;
+ TQValueList<rowSize> m_lstRow;
+ TQValueList<rowSize> m_lstRedoRow;
+ TQString m_sheetName;
};
class UndoChangeAreaTextCell : public UndoAction
@@ -465,36 +465,36 @@ public:
virtual void redo();
protected:
- void createList( QMap<QPoint,QString> &list, Sheet* sheet );
+ void createList( TQMap<TQPoint,TQString> &list, Sheet* sheet );
Region m_region;
- QMap<QPoint,QString> m_lstTextCell;
- QMap<QPoint,QString> m_lstRedoTextCell;
- QString m_sheetName;
+ TQMap<TQPoint,TQString> m_lstTextCell;
+ TQMap<TQPoint,TQString> m_lstRedoTextCell;
+ TQString m_sheetName;
};
class UndoSort : public UndoAction
{
public:
- UndoSort( Doc *_doc, Sheet *_sheet, const QRect &_selection);
+ UndoSort( Doc *_doc, Sheet *_sheet, const TQRect &_selection);
virtual ~UndoSort();
virtual void undo();
virtual void redo();
protected:
- void copyAll( QValueList<layoutTextCell> & list, QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow, Sheet * sheet );
+ void copyAll( TQValueList<tqlayoutTextCell> & list, TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow, Sheet * sheet );
- QRect m_rctRect;
- QValueList<layoutTextCell> m_lstFormats;
- QValueList<layoutTextCell> m_lstRedoFormats;
- QValueList<layoutColumn> m_lstColFormats;
- QValueList<layoutColumn> m_lstRedoColFormats;
- QValueList<layoutRow> m_lstRowFormats;
- QValueList<layoutRow> m_lstRedoRowFormats;
+ TQRect m_rctRect;
+ TQValueList<tqlayoutTextCell> m_lstFormats;
+ TQValueList<tqlayoutTextCell> m_lstRedoFormats;
+ TQValueList<tqlayoutColumn> m_lstColFormats;
+ TQValueList<tqlayoutColumn> m_lstRedoColFormats;
+ TQValueList<tqlayoutRow> m_lstRowFormats;
+ TQValueList<tqlayoutRow> m_lstRedoRowFormats;
- QString m_sheetName;
+ TQString m_sheetName;
};
class UndoMergedCell : public UndoAction
@@ -513,82 +513,82 @@ protected:
int m_iExtraY;
int m_iExtraRedoX;
int m_iExtraRedoY;
- QString m_sheetName;
+ TQString m_sheetName;
};
class UndoAutofill : public UndoAction
{
public:
- UndoAutofill( Doc *_doc, Sheet *_sheet, const QRect &_rect );
+ UndoAutofill( Doc *_doc, Sheet *_sheet, const TQRect &_rect );
virtual ~UndoAutofill();
virtual void undo();
virtual void redo();
protected:
- void createListCell( QCString &list, Sheet* sheet );
- QRect m_selection;
- QCString m_data;
- QCString m_dataRedo;
- QString m_sheetName;
+ void createListCell( TQCString &list, Sheet* sheet );
+ TQRect m_selection;
+ TQCString m_data;
+ TQCString m_dataRedo;
+ TQString m_sheetName;
};
class UndoInsertCellCol : public UndoInsertRemoveAction
{
public:
- UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect );
+ UndoInsertCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect );
virtual ~UndoInsertCellCol();
virtual void undo();
virtual void redo();
protected:
- QString m_sheetName;
- QRect m_rect;
+ TQString m_sheetName;
+ TQRect m_rect;
};
class UndoInsertCellRow : public UndoInsertRemoveAction
{
public:
- UndoInsertCellRow( Doc *_doc, Sheet *_sheet,const QRect &_rect );
+ UndoInsertCellRow( Doc *_doc, Sheet *_sheet,const TQRect &_rect );
virtual ~UndoInsertCellRow();
virtual void undo();
virtual void redo();
protected:
- QString m_sheetName;
- QRect m_rect;
+ TQString m_sheetName;
+ TQRect m_rect;
};
class UndoRemoveCellCol : public UndoInsertRemoveAction
{
public:
- UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const QRect &_rect );
+ UndoRemoveCellCol( Doc *_doc, Sheet *_sheet, const TQRect &_rect );
virtual ~UndoRemoveCellCol();
virtual void undo();
virtual void redo();
protected:
- QString m_sheetName;
- QRect m_rect;
- QCString m_data;
+ TQString m_sheetName;
+ TQRect m_rect;
+ TQCString m_data;
};
class UndoRemoveCellRow : public UndoInsertRemoveAction
{
public:
- UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const QRect &_rect );
+ UndoRemoveCellRow( Doc *_doc, Sheet *_sheet, const TQRect &_rect );
virtual ~UndoRemoveCellRow();
virtual void undo();
virtual void redo();
protected:
- QString m_sheetName;
- QRect m_rect;
- QCString m_data;
+ TQString m_sheetName;
+ TQRect m_rect;
+ TQCString m_data;
};
class UndoConditional : public UndoAction
@@ -600,11 +600,11 @@ public:
virtual void undo();
virtual void redo();
protected:
- void createListCell( QCString &list, Sheet* sheet );
+ void createListCell( TQCString &list, Sheet* sheet );
Region m_region;
- QCString m_data;
- QCString m_dataRedo;
- QString m_sheetName;
+ TQCString m_data;
+ TQCString m_dataRedo;
+ TQString m_sheetName;
};
class UndoCellPaste : public UndoAction
@@ -619,44 +619,44 @@ public:
virtual void redo();
protected:
- void createListCell( QCString &listCell,QValueList<columnSize> &listCol,QValueList<rowSize> &listRow, Sheet* sheet );
+ void createListCell( TQCString &listCell,TQValueList<columnSize> &listCol,TQValueList<rowSize> &listRow, Sheet* sheet );
Region m_region;
- QCString m_data;
- QCString m_dataRedo;
- QValueList<columnSize> m_lstColumn;
- QValueList<columnSize> m_lstRedoColumn;
- QValueList<rowSize> m_lstRow;
- QValueList<rowSize> m_lstRedoRow;
+ TQCString m_data;
+ TQCString m_dataRedo;
+ TQValueList<columnSize> m_lstColumn;
+ TQValueList<columnSize> m_lstRedoColumn;
+ TQValueList<rowSize> m_lstRow;
+ TQValueList<rowSize> m_lstRedoRow;
int xshift;
int yshift;
bool b_insert;
int m_iInsertTo;
- QString m_sheetName;
+ TQString m_sheetName;
};
class UndoStyleCell : public UndoAction
{
public:
- UndoStyleCell( Doc *_doc, Sheet *_sheet, const QRect &_rect );
+ UndoStyleCell( Doc *_doc, Sheet *_sheet, const TQRect &_rect );
virtual ~UndoStyleCell();
virtual void undo();
virtual void redo();
protected:
- void createListCell( QValueList<styleCell> &listCell, Sheet* sheet );
- QRect m_selection;
- QValueList<styleCell> m_lstStyleCell;
- QValueList<styleCell> m_lstRedoStyleCell;
- QString m_sheetName;
+ void createListCell( TQValueList<styleCell> &listCell, Sheet* sheet );
+ TQRect m_selection;
+ TQValueList<styleCell> m_lstStyleCell;
+ TQValueList<styleCell> m_lstRedoStyleCell;
+ TQString m_sheetName;
};
class UndoInsertData : public UndoChangeAreaTextCell
{
public:
- UndoInsertData( Doc * _doc, Sheet * _sheet, QRect & _selection );
+ UndoInsertData( Doc * _doc, Sheet * _sheet, TQRect & _selection );
};
@@ -679,12 +679,12 @@ public:
void appendUndo( UndoAction *_action );
- QString getUndoName();
- QString getRedoName();
+ TQString getUndoName();
+ TQString getRedoName();
protected:
- QPtrStack<UndoAction> m_stckUndo;
- QPtrStack<UndoAction> m_stckRedo;
+ TQPtrStack<UndoAction> m_stckUndo;
+ TQPtrStack<UndoAction> m_stckRedo;
Doc *m_pDoc;
};
diff --git a/kspread/kspread_util.cc b/kspread/kspread_util.cc
index 47d1a215..43c2581b 100644
--- a/kspread/kspread_util.cc
+++ b/kspread/kspread_util.cc
@@ -20,7 +20,7 @@
#include <ctype.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -53,8 +53,8 @@ bool KSpread::formatIsFraction (FormatType fmt)
//used in Point::init, Cell::encodeFormula and
-// dialogs/kspread_dlg_paperlayout.cc
-int KSpread::util_decodeColumnLabelText( const QString &_col )
+// dialogs/kspread_dlg_papertqlayout.cc
+int KSpread::util_decodeColumnLabelText( const TQString &_col )
{
int col = 0;
int offset='a'-'A';
@@ -62,9 +62,9 @@ int KSpread::util_decodeColumnLabelText( const QString &_col )
for ( uint i=0; i < _col.length(); i++ )
{
counterColumn = (int) pow(26.0 , static_cast<int>(_col.length() - i - 1));
- if( _col[i] >= 'A' && _col[i] <= 'Z' )
+ if( (int)(_col[i]) >= 'A' && (int)(_col[i]) <= 'Z' )
col += counterColumn * ( _col[i].latin1() - 'A' + 1); // okay here (Werner)
- else if( _col[i] >= 'a' && _col[i] <= 'z' )
+ else if( (int)(_col[i]) >= 'a' && (int)(_col[i]) <= 'z' )
col += counterColumn * ( _col[i].latin1() - 'A' - offset + 1 );
else
kdDebug(36001) << "util_decodeColumnLabelText: Wrong characters in label text for col:'" << _col << "'" << endl;
@@ -72,36 +72,36 @@ int KSpread::util_decodeColumnLabelText( const QString &_col )
return col;
}
-//used in dialogs/kspread_dlg_paperlayout.cc
-QString KSpread::util_rangeColumnName( const QRect &_area)
+//used in dialogs/kspread_dlg_papertqlayout.cc
+TQString KSpread::util_rangeColumnName( const TQRect &_area)
{
- return QString("%1:%2")
- .arg( Cell::columnName( _area.left()))
- .arg( Cell::columnName(_area.right()));
+ return TQString("%1:%2")
+ .tqarg( Cell::columnName( _area.left()))
+ .tqarg( Cell::columnName(_area.right()));
}
-//used in dialogs/kspread_dlg_paperlayout.cc
-QString KSpread::util_rangeRowName( const QRect &_area)
+//used in dialogs/kspread_dlg_papertqlayout.cc
+TQString KSpread::util_rangeRowName( const TQRect &_area)
{
- return QString("%1:%2")
- .arg( _area.top())
- .arg(_area.bottom());
+ return TQString("%1:%2")
+ .tqarg( _area.top())
+ .tqarg(_area.bottom());
}
-QString KSpread::util_rangeName(const QRect &_area)
+TQString KSpread::util_rangeName(const TQRect &_area)
{
return Cell::name( _area.left(), _area.top() ) + ":" +
Cell::name( _area.right(), _area.bottom() );
}
-QString KSpread::util_rangeName(Sheet * _sheet, const QRect &_area)
+TQString KSpread::util_rangeName(Sheet * _sheet, const TQRect &_area)
{
return _sheet->sheetName() + "!" + util_rangeName(_area);
}
-QDomElement KSpread::util_createElement( const QString & tagName, const QFont & font, QDomDocument & doc )
+TQDomElement KSpread::util_createElement( const TQString & tagName, const TQFont & font, TQDomDocument & doc )
{
- QDomElement e( doc.createElement( tagName ) );
+ TQDomElement e( doc.createElement( tagName ) );
e.setAttribute( "family", font.family() );
e.setAttribute( "size", font.pointSize() );
@@ -119,28 +119,28 @@ QDomElement KSpread::util_createElement( const QString & tagName, const QFont &
return e;
}
-QDomElement KSpread::util_createElement( const QString & tagname, const QPen & pen, QDomDocument & doc )
+TQDomElement KSpread::util_createElement( const TQString & tagname, const TQPen & pen, TQDomDocument & doc )
{
- QDomElement e( doc.createElement( tagname ) );
+ TQDomElement e( doc.createElement( tagname ) );
e.setAttribute( "color", pen.color().name() );
e.setAttribute( "style", (int)pen.style() );
e.setAttribute( "width", (int)pen.width() );
return e;
}
-QFont KSpread::util_toFont( QDomElement & element )
+TQFont KSpread::util_toFont( TQDomElement & element )
{
- QFont f;
+ TQFont f;
f.setFamily( element.attribute( "family" ) );
bool ok;
f.setPointSize( element.attribute("size").toInt( &ok ) );
if ( !ok )
- return QFont();
+ return TQFont();
f.setWeight( element.attribute("weight").toInt( &ok ) );
if ( !ok )
- return QFont();
+ return TQFont();
if ( element.hasAttribute( "italic" ) && element.attribute("italic") == "yes" )
f.setItalic( true );
@@ -157,44 +157,44 @@ QFont KSpread::util_toFont( QDomElement & element )
/* Uncomment when charset is added to kspread_dlg_layout
+ save a document-global charset
if ( element.hasAttribute( "charset" ) )
- KGlobal::charsets()->setQFont( f, element.attribute("charset") );
+ KGlobal::charsets()->setTQFont( f, element.attribute("charset") );
else
*/
// ######## Not needed anymore in 3.0?
- //KGlobal::charsets()->setQFont( f, KGlobal::locale()->charset() );
+ //KGlobal::charsets()->setTQFont( f, KGlobal::locale()->charset() );
return f;
}
-QPen KSpread::util_toPen( QDomElement & element )
+TQPen KSpread::util_toPen( TQDomElement & element )
{
bool ok;
- QPen p;
+ TQPen p;
p.setStyle( (Qt::PenStyle)element.attribute("style").toInt( &ok ) );
if ( !ok )
- return QPen();
+ return TQPen();
p.setWidth( element.attribute("width").toInt( &ok ) );
if ( !ok )
- return QPen();
+ return TQPen();
- p.setColor( QColor( element.attribute("color") ) );
+ p.setColor( TQColor( element.attribute("color") ) );
return p;
}
-Point::Point(const QString & _str)
+Point::Point(const TQString & _str)
{
_sheet = 0;
init(_str);
}
-void Point::setPos(QPoint pos)
+void Point::setPos(TQPoint pos)
{
_pos=pos;
}
-QPoint Point::pos() const
+TQPoint Point::pos() const
{
return _pos;
}
@@ -206,11 +206,11 @@ KSpread::Sheet* Point::sheet() const
{
return _sheet;
}
-void Point::setSheetName(QString name)
+void Point::setSheetName(TQString name)
{
_sheetName=name;
}
-QString Point::sheetName() const
+TQString Point::sheetName() const
{
return _sheetName;
}
@@ -232,7 +232,7 @@ bool Point::rowFixed() const
}
-void Point::init(const QString & _str)
+void Point::init(const TQString & _str)
{
_columnFixed=false;
_rowFixed=false;
@@ -247,8 +247,8 @@ void Point::init(const QString & _str)
return;
}
- QString str( _str );
- int n = _str.find( '!' );
+ TQString str( _str );
+ int n = _str.tqfind( '!' );
if ( n != -1 )
{
_sheetName = _str.left( n );
@@ -284,7 +284,7 @@ void Point::init(const QString & _str)
//default is error
int x = -1;
//search for the first character != text
- int result = str.find( QRegExp("[^A-Za-z]+"), p );
+ int result = str.tqfind( TQRegExp("[^A-Za-z]+"), p );
//get the colomn number for the character between actual position and the first non text charakter
if ( result != -1 )
@@ -327,7 +327,7 @@ void Point::init(const QString & _str)
uint p2 = p;
while ( p < len )
{
- if ( !isdigit( QChar(str[p++]) ) )
+ if ( !isdigit( TQChar(str[p++]) ) )
{
kdDebug(36001) << "Point::init: no number" << endl;
return;
@@ -351,10 +351,10 @@ void Point::init(const QString & _str)
kdDebug(36001) << "Point::init: y <= 0" << endl;
return;
}
- _pos = QPoint( x, y );
+ _pos = TQPoint( x, y );
}
-bool util_isPointValid( QPoint point )
+bool util_isPointValid( TQPoint point )
{
if ( point.x() >= 1
&& point.y() >= 1
@@ -366,7 +366,7 @@ bool util_isPointValid( QPoint point )
return false;
}
-bool util_isRectValid( QRect rect )
+bool util_isRectValid( TQRect rect )
{
if ( util_isPointValid( rect.topLeft() )
&& util_isPointValid( rect.bottomRight() )
@@ -376,12 +376,12 @@ bool util_isRectValid( QRect rect )
return false;
}
-Point::Point( const QString & str, Map * map,
+Point::Point( const TQString & str, Map * map,
Sheet * sheet )
{
uint p = 0;
- int p2 = str.find( '!' );
+ int p2 = str.tqfind( '!' );
if ( p2 != -1 )
{
_sheetName = str.left( p2++ );
@@ -459,12 +459,12 @@ Range::Range()
_topFixed=false;
_bottomFixed=false;
}
-Range::Range(const QString & _str)
+Range::Range(const TQString & _str)
{
_range.setLeft(-1);
_sheet = 0;
- int p = _str.find(':');
+ int p = _str.tqfind(':');
// if (p == -1)
// return;
@@ -482,7 +482,7 @@ Range::Range(const QString & _str)
lr = ul;
}
- _range = QRect(ul.pos(), lr.pos());
+ _range = TQRect(ul.pos(), lr.pos());
_sheetName = ul.sheetName();
_leftFixed = ul.columnFixed();
@@ -506,7 +506,7 @@ Range::Range(const QString & _str)
Range::Range( const Point& ul, const Point& lr )
{
- _range = QRect( ul.pos(), lr.pos() );
+ _range = TQRect( ul.pos(), lr.pos() );
if ( ul.sheetName() != lr.sheetName() )
{
_range.setLeft( -1 );
@@ -520,7 +520,7 @@ Range::Range(const QString & _str)
_bottomFixed = lr.rowFixed();
}
-Range::Range(const QString & str, Map * map,
+Range::Range(const TQString & str, Map * map,
Sheet * sheet)
{
_range.setLeft(-1);
@@ -528,9 +528,9 @@ Range::Range(const QString & str, Map * map,
//try to parse as named area
bool gotNamed = false;
- QString tmp = str.lower();
- QValueList < Reference >::Iterator it;
- QValueList < Reference > area = map->doc()->listArea();
+ TQString tmp = str.lower();
+ TQValueList < Reference >::Iterator it;
+ TQValueList < Reference > area = map->doc()->listArea();
for (it = area.begin(); it != area.end(); ++it) {
if ((*it).ref_name.lower() == tmp) {
// success - such named area exists
@@ -554,7 +554,7 @@ Range::Range(const QString & str, Map * map,
_sheet = 0;
int p = 0;
- int p2 = str.find('!');
+ int p2 = str.tqfind('!');
if (p2 != -1)
{
_sheetName = str.left(p2++);
@@ -574,13 +574,13 @@ Range::Range(const QString & str, Map * map,
_sheet = sheet;
- int p3 = str.find(':', p);
+ int p3 = str.tqfind(':', p);
if (p3 == -1)
return;
Point ul(str.mid(p, p3 - p));
Point lr(str.mid(p3 + 1));
- _range = QRect(ul.pos(), lr.pos());
+ _range = TQRect(ul.pos(), lr.pos());
_leftFixed = ul.columnFixed();
_rightFixed = lr.columnFixed();
@@ -588,9 +588,9 @@ Range::Range(const QString & str, Map * map,
_bottomFixed = lr.rowFixed();
}
-QString Range::toString() const
+TQString Range::toString() const
{
- QString result;
+ TQString result;
if (_sheet)
{
@@ -603,7 +603,7 @@ QString Range::toString() const
//Insert $ characters to show fixed parts of range
- int pos=result.find("!")+1;
+ int pos=result.tqfind("!")+1;
Q_ASSERT(pos != -1);
if (_leftFixed)
@@ -616,7 +616,7 @@ QString Range::toString() const
result.insert(pos+Cell::columnName(_range.left()).length(),'$');
}
- pos=result.find(":")+1;
+ pos=result.tqfind(":")+1;
Q_ASSERT(pos != -1);
if (_rightFixed)
@@ -657,9 +657,9 @@ void Range::getEndPoint(Point* pt)
pt->setSheetName(_sheetName);
}
-bool Range::contains (const Point &cell) const
+bool Range::tqcontains (const Point &cell) const
{
- return _range.contains (cell.pos());
+ return _range.tqcontains (cell.pos());
}
bool Range::intersects (const Range &r) const
@@ -675,7 +675,7 @@ bool Range::isValid() const
( _range.isValid() ) ;
}
-QRect Range::range() const
+TQRect Range::range() const
{
return _range;
}
@@ -720,44 +720,44 @@ KSpread::Sheet* Range::sheet() const
{
return _sheet;
}
-void Range::setSheetName(QString sheetName)
+void Range::setSheetName(TQString sheetName)
{
_sheetName=sheetName;
}
-QString Range::sheetName() const
+TQString Range::sheetName() const
{
return _sheetName;
}
-QString Range::namedArea() const
+TQString Range::namedArea() const
{
return _namedArea;
}
-bool KSpread::util_isAllSelected(const QRect &selection)
+bool KSpread::util_isAllSelected(const TQRect &selection)
{
return ( selection.top() == 1 && selection.bottom() == KS_rowMax
&& selection.left() == 1 && selection.right() == KS_colMax);
}
-bool KSpread::util_isColumnSelected(const QRect &selection)
+bool KSpread::util_isColumnSelected(const TQRect &selection)
{
return ( (selection.top() == 1) && (selection.bottom() == KS_rowMax) );
}
-bool KSpread::util_isRowSelected(const QRect &selection)
+bool KSpread::util_isRowSelected(const TQRect &selection)
{
return ( (selection.left() == 1) && (selection.right() == KS_colMax) );
}
-bool KSpread::util_isRowOrColumnSelected(const QRect &selection)
+bool KSpread::util_isRowOrColumnSelected(const TQRect &selection)
{
return ( (selection.left() == 1) && (selection.right() == KS_colMax)
|| (selection.top() == 1) && (selection.bottom() == KS_rowMax) );
}
//used in View::slotRename
-bool KSpread::util_validateSheetName(const QString &name)
+bool KSpread::util_validateSheetName(const TQString &name)
{
if (name[0] == ' ')
{
@@ -776,11 +776,11 @@ bool KSpread::util_validateSheetName(const QString &name)
}
-RangeIterator::RangeIterator(QRect _range, Sheet* _sheet)
+RangeIterator::RangeIterator(TQRect _range, Sheet* _sheet)
{
range = _range;
sheet = _sheet;
- current = QPoint(0,0);
+ current = TQPoint(0,0);
}
RangeIterator::~RangeIterator()
@@ -826,15 +826,15 @@ Cell* RangeIterator::next()
}
//not used anywhere
-int KSpread::util_penCompare( QPen const & pen1, QPen const & pen2 )
+int KSpread::util_penCompare( TQPen const & pen1, TQPen const & pen2 )
{
- if ( pen1.style() == Qt::NoPen && pen2.style() == Qt::NoPen )
+ if ( pen1.style() == TQt::NoPen && pen2.style() == TQt::NoPen )
return 0;
- if ( pen1.style() == Qt::NoPen )
+ if ( pen1.style() == TQt::NoPen )
return -1;
- if ( pen2.style() == Qt::NoPen )
+ if ( pen2.style() == TQt::NoPen )
return 1;
if ( pen1.width() < pen2.width() )
@@ -859,46 +859,46 @@ int KSpread::util_penCompare( QPen const & pen1, QPen const & pen2 )
}
-QString KSpread::convertRefToBase( const QString & sheet, const QRect & rect )
+TQString KSpread::convertRefToBase( const TQString & sheet, const TQRect & rect )
{
- QPoint bottomRight( rect.bottomRight() );
+ TQPoint bottomRight( rect.bottomRight() );
- QString s( "$" );
+ TQString s( "$" );
s += sheet;
s += ".$";
s += Cell::columnName( bottomRight.x() );
s += '$';
- s += QString::number( bottomRight.y() );
+ s += TQString::number( bottomRight.y() );
return s;
}
-QString KSpread::convertRefToRange( const QString & sheet, const QRect & rect )
+TQString KSpread::convertRefToRange( const TQString & sheet, const TQRect & rect )
{
- QPoint topLeft( rect.topLeft() );
- QPoint bottomRight( rect.bottomRight() );
+ TQPoint topLeft( rect.topLeft() );
+ TQPoint bottomRight( rect.bottomRight() );
if ( topLeft == bottomRight )
return convertRefToBase( sheet, rect );
- QString s( "$" );
+ TQString s( "$" );
s += sheet;
s += ".$";
s += /*util_encodeColumnLabelText*/Cell::columnName( topLeft.x() );
s += '$';
- s += QString::number( topLeft.y() );
+ s += TQString::number( topLeft.y() );
s += ":.$";
s += /*util_encodeColumnLabelText*/Cell::columnName( bottomRight.x() );
s += '$';
- s += QString::number( bottomRight.y() );
+ s += TQString::number( bottomRight.y() );
return s;
}
//used in Cell::convertFormulaToOasisFormat
-void KSpread::insertBracket( QString & s )
+void KSpread::insertBracket( TQString & s )
{
- QChar c;
+ TQChar c;
int i = (int) s.length() - 1;
while ( i >= 0 )
@@ -918,39 +918,39 @@ void KSpread::insertBracket( QString & s )
// e.g.: Sheet4.A1:Sheet4.E28
//used in Sheet::saveOasis
-QString KSpread::convertRangeToRef( const QString & sheetName, const QRect & _area )
+TQString KSpread::convertRangeToRef( const TQString & sheetName, const TQRect & _area )
{
return sheetName + "." + Cell::name( _area.left(), _area.top() ) + ":" + sheetName + "."+ Cell::name( _area.right(), _area.bottom() );
}
-QString KSpread::convertOasisPenToString( const QPen & pen )
+TQString KSpread::convertOasisPenToString( const TQPen & pen )
{
-// kdDebug()<<"convertOasisPenToString( const QPen & pen ) :"<<pen<<endl;
- // NOTE Stefan: QPen api docs:
+// kdDebug()<<"convertOasisPenToString( const TQPen & pen ) :"<<pen<<endl;
+ // NOTE Stefan: TQPen api docs:
// For horizontal and vertical lines a line width of 0 is
// the same as a line width of 1.
// A line width of 0 will produce a 1 pixel wide line using
// a fast algorithm for diagonals. A line width of 1 will
// also produce a 1 pixel wide line, but uses a slower more
// accurate algorithm for diagonals.
- QString s = QString( "%1pt " ).arg( (pen.width() == 0) ? 1 : pen.width() );
+ TQString s = TQString( "%1pt " ).tqarg( (pen.width() == 0) ? 1 : pen.width() );
switch( pen.style() )
{
- case Qt::NoPen:
+ case TQt::NoPen:
return "none";
- case Qt::SolidLine:
+ case TQt::SolidLine:
s+="solid";
break;
- case Qt::DashLine:
+ case TQt::DashLine:
s+="dashed";
break;
- case Qt::DotLine:
+ case TQt::DotLine:
s+="dotted";
break;
- case Qt::DashDotLine:
+ case TQt::DashDotLine:
s+="dot-dash";
break;
- case Qt::DashDotDotLine:
+ case TQt::DashDotDotLine:
s+="dot-dot-dash";
break;
default: break;
@@ -964,9 +964,9 @@ QString KSpread::convertOasisPenToString( const QPen & pen )
return s;
}
-QPen KSpread::convertOasisStringToPen( const QString &border )
+TQPen KSpread::convertOasisStringToPen( const TQString &border )
{
- QPen pen;
+ TQPen pen;
//string like "0.088cm solid #800000"
if (border.isEmpty() || border=="none" || border=="hidden") // in fact no border
{
@@ -974,10 +974,10 @@ QPen KSpread::convertOasisStringToPen( const QString &border )
return pen;
}
//code from koborder, for the moment kspread doesn't use koborder
- // ## isn't it faster to use QStringList::split than parse it 3 times?
- QString _width = border.section(' ', 0, 0);
- QCString _style = border.section(' ', 1, 1).latin1();
- QString _color = border.section(' ', 2, 2);
+ // ## isn't it faster to use TQStringList::split than parse it 3 times?
+ TQString _width = border.section(' ', 0, 0);
+ TQCString _style = border.section(' ', 1, 1).latin1();
+ TQString _color = border.section(' ', 2, 2);
pen.setWidth( ( int )( KoUnit::parseValue( _width, 1.0 ) ) );
@@ -997,37 +997,37 @@ QPen KSpread::convertOasisStringToPen( const QString &border )
kdDebug()<<" style undefined : "<<_style<<endl;
if ( _color.isEmpty() )
- pen.setColor( QColor() );
+ pen.setColor( TQColor() );
else
- pen.setColor( QColor( _color ) );
+ pen.setColor( TQColor( _color ) );
return pen;
}
//Return true when it's a reference to cell from sheet.
-bool KSpread::localReferenceAnchor( const QString &_ref )
+bool KSpread::localReferenceAnchor( const TQString &_ref )
{
- bool isLocalRef = (_ref.find("http://") != 0 &&
- _ref.find("mailto:") != 0 &&
- _ref.find("ftp://") != 0 &&
- _ref.find("file:") != 0 );
+ bool isLocalRef = (_ref.tqfind("http://") != 0 &&
+ _ref.tqfind("mailto:") != 0 &&
+ _ref.tqfind("ftp://") != 0 &&
+ _ref.tqfind("file:") != 0 );
return isLocalRef;
}
-QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale)
+TQString KSpread::Oasis::decodeFormula(const TQString& expr, const KLocale* locale)
{
// parsing state
enum { Start, InNumber, InString, InIdentifier, InReference, InSheetName } state;
// use locale settings
- QString decimal = locale ? locale->decimalSymbol() : ".";
+ TQString decimal = locale ? locale->decimalSymbol() : ".";
// initialize variables
state = Start;
unsigned int i = 0;
- const QString ex = expr;
- QString result;
+ const TQString ex = expr;
+ TQString result;
if (ex[0] == '=')
{
@@ -1038,7 +1038,7 @@ QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale
// main loop
while( i < ex.length() )
{
- QChar ch = ex[i];
+ TQChar ch = ex[i];
switch( state )
{
@@ -1065,7 +1065,7 @@ QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale
}
// [ marks sheet name for 3-d cell, e.g ['Sales Q3'.A4]
- else if ( ch.unicode() == '[' )
+ else if ( ch.tqunicode() == '[' )
{
++i;
state = InReference;
@@ -1086,7 +1086,7 @@ QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale
else
{
int op;
- QString s;
+ TQString s;
// check for two-chars operator, such as '<=', '>=', etc
s.append( ch ).append( ex[i+1] );
@@ -1095,7 +1095,7 @@ QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale
// check for one-char operator, such as '+', ';', etc
if( op == Token::InvalidOp )
{
- s = QString( ch );
+ s = TQString( ch );
op = matchOperator( s );
}
@@ -1208,7 +1208,7 @@ QString KSpread::Oasis::decodeFormula(const QString& expr, const KLocale* locale
return result;
}
-/*QString KSpread::Oasis::encodeFormula(const QString& expr, const KLocale* locale)
+/*TQString KSpread::Oasis::encodeFormula(const TQString& expr, const KLocale* locale)
{
// TODO move Cell::convertFormulaToOasisFormat to this point
//expr = "not here yet";
diff --git a/kspread/kspread_util.h b/kspread/kspread_util.h
index ff07f061..5418f118 100644
--- a/kspread/kspread_util.h
+++ b/kspread/kspread_util.h
@@ -21,24 +21,24 @@
#ifndef __kspread_util_h__
#define __kspread_util_h__
-#include <qstring.h>
-#include <qrect.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqrect.h>
+#include <tqdatetime.h>
#include <koffice_export.h>
#include "kspread_global.h"
#include "kspread_value.h"
-class QFont;
-class QPen;
-class QDomElement;
-class QDomDocument;
+class TQFont;
+class TQPen;
+class TQDomElement;
+class TQDomDocument;
class KLocale;
-bool util_isPointValid(QPoint point);
-bool util_isRectValid(QRect rect);
+bool util_isPointValid(TQPoint point);
+bool util_isRectValid(TQRect rect);
namespace KSpread
{
@@ -55,8 +55,8 @@ class KSPREAD_EXPORT Point
{
public:
Point() { _pos.setX( -1 ); _sheet = 0; _columnFixed = false; _rowFixed = false; }
- Point( const QString& );
- Point( const QString&, Map*, Sheet* default_sheet = 0 );
+ Point( const TQString& );
+ Point( const TQString&, Map*, Sheet* default_sheet = 0 );
Point( const Point& c ) {
_pos = c._pos;
_sheet = c._sheet;
@@ -87,14 +87,14 @@ public:
/**
* Sets the name of the sheet which this point lies on.
*/
- void setSheetName(QString name);
- QString sheetName() const;
+ void setSheetName(TQString name);
+ TQString sheetName() const;
/**
* Sets the position of this point (in rows and columns)
*/
- void setPos(QPoint pos);
- QPoint pos() const;
+ void setPos(TQPoint pos);
+ TQPoint pos() const;
/**
* Sets whether or not the column (x coordinate) of this point is fixed (ie. it represents an absolute
@@ -112,13 +112,13 @@ public:
private:
Sheet* _sheet;
- QString _sheetName;
- QPoint _pos;
+ TQString _sheetName;
+ TQPoint _pos;
bool _columnFixed;
bool _rowFixed;
private:
- void init( const QString& );
+ void init( const TQString& );
};
/**
@@ -132,8 +132,8 @@ class KSPREAD_EXPORT Range
public:
Range();
- Range( const QString& );
- Range( const QString&, Map*, Sheet* default_sheet = 0 );
+ Range( const TQString& );
+ Range( const TQString&, Map*, Sheet* default_sheet = 0 );
Range( const Range& r );
Range( const Point& ul, const Point& lr );
@@ -164,16 +164,16 @@ public:
* Changes the area on the spreadsheet represented by this range
* @param newRange The new area for this range.
*/
- virtual void setRange(const QRect& newRange) {_range=newRange;}
+ virtual void setRange(const TQRect& newRange) {_range=newRange;}
void setRange(int newStartCol, int newStartRow, int newEndCol, int newEndRow)
- { _range=QRect(newStartCol,newStartRow,newEndCol-newStartCol,newEndRow-newStartRow); }
+ { _range=TQRect(newStartCol,newStartRow,newEndCol-newStartCol,newEndRow-newStartRow); }
/** Returns the area on the spreadsheet occupied by this range. */
- QRect range() const;
+ TQRect range() const;
/** Returns true if this range includes the specified cell */
- bool contains (const Point &cell) const;
+ bool tqcontains (const Point &cell) const;
/**
* Returns true if this range intersects Range @p r (ie. there is at least one cell
* which is common to both Ranges )
@@ -185,7 +185,7 @@ public:
* ie. In the format " SheetName! [StartCell] : [EndCell] "
* The string representation uses $ characters to mark fixed parts of the range, eg. Sheet1!$A1:$A20
*/
- QString toString() const;
+ TQString toString() const;
/** Sets whether or not the left column is fixed . */
void setLeftFixed(bool fixed);
@@ -208,14 +208,14 @@ public:
Sheet* sheet() const;
/** Sets the name of the sheet associated with this range. */
- void setSheetName(QString sheetName);
- QString sheetName() const;
+ void setSheetName(TQString sheetName);
+ TQString sheetName() const;
/**
* Returns the named area represented by this range or an empty string otherwise.
- * This is the name of the area which was passed as a QString to the Range constructor
+ * This is the name of the area which was passed as a TQString to the Range constructor
*/
- QString namedArea() const;
+ TQString namedArea() const;
/**
* Returns true if the other range occupies the same area on the same sheet as this range.
@@ -225,9 +225,9 @@ public:
private:
Sheet* _sheet;
- QString _sheetName;
- QString _namedArea;
- QRect _range;
+ TQString _sheetName;
+ TQString _namedArea;
+ TQRect _range;
bool _leftFixed;
bool _rightFixed;
bool _topFixed;
@@ -242,8 +242,8 @@ TODO: use this as selection
TODO: anything I forgot ;)
*/
struct RangeList {
- QValueList<Point> cells;
- QValueList<Range> ranges;
+ TQValueList<Point> cells;
+ TQValueList<Range> ranges;
};
@@ -260,7 +260,7 @@ public:
* Contstruct the iterator with the rectangular cell area and which
* sheet the area is on
*/
- RangeIterator(QRect _range, Sheet* _sheet);
+ RangeIterator(TQRect _range, Sheet* _sheet);
~RangeIterator();
/**
@@ -275,9 +275,9 @@ public:
Cell* next();
private:
- QRect range;
+ TQRect range;
Sheet* sheet;
- QPoint current;
+ TQPoint current;
};
//helper functions for the formatting
@@ -287,47 +287,47 @@ bool formatIsFraction (FormatType fmt);
-KSPREAD_EXPORT QString util_rangeName( const QRect &_area );
-KSPREAD_EXPORT QString util_rangeName( Sheet *_sheet, const QRect &_area );
-QString util_rangeColumnName( const QRect &_area);
-QString util_rangeRowName( const QRect &_area);
+KSPREAD_EXPORT TQString util_rangeName( const TQRect &_area );
+KSPREAD_EXPORT TQString util_rangeName( Sheet *_sheet, const TQRect &_area );
+TQString util_rangeColumnName( const TQRect &_area);
+TQString util_rangeRowName( const TQRect &_area);
/**
* Call this function to decode the text of a column label to an integer
* i.e. AA->27
*/
-KSPREAD_EXPORT int util_decodeColumnLabelText( const QString &_col );
+KSPREAD_EXPORT int util_decodeColumnLabelText( const TQString &_col );
/**
* Call this function to encode an integer to the text of the column label
* i.e. 27->AA
*/
-KSPREAD_EXPORT QString util_encodeColumnLabelText( int column );
+KSPREAD_EXPORT TQString util_encodeColumnLabelText( int column );
-bool util_isAllSelected(const QRect &selection);
-bool util_isColumnSelected(const QRect &selection);
-bool util_isRowSelected(const QRect &selection);
-bool util_isRowOrColumnSelected( const QRect &selection );
+bool util_isAllSelected(const TQRect &selection);
+bool util_isColumnSelected(const TQRect &selection);
+bool util_isRowSelected(const TQRect &selection);
+bool util_isRowOrColumnSelected( const TQRect &selection );
-bool util_validateSheetName(const QString &name);
+bool util_validateSheetName(const TQString &name);
-QDomElement util_createElement( const QString & tagName, const QFont & font, QDomDocument & doc );
-QDomElement util_createElement( const QString & tagname, const QPen & pen, QDomDocument & doc );
-QFont util_toFont( QDomElement & element );
-QPen util_toPen( QDomElement & element );
-int util_penCompare( QPen const & pen1, QPen const & pen2 );
+TQDomElement util_createElement( const TQString & tagName, const TQFont & font, TQDomDocument & doc );
+TQDomElement util_createElement( const TQString & tagname, const TQPen & pen, TQDomDocument & doc );
+TQFont util_toFont( TQDomElement & element );
+TQPen util_toPen( TQDomElement & element );
+int util_penCompare( TQPen const & pen1, TQPen const & pen2 );
-QString convertRefToRange( const QString & sheet, const QRect & rect );
-QString convertRefToBase( const QString & sheet, const QRect & rect );
-QString convertRangeToRef( const QString & sheetName, const QRect & _area );
+TQString convertRefToRange( const TQString & sheet, const TQRect & rect );
+TQString convertRefToBase( const TQString & sheet, const TQRect & rect );
+TQString convertRangeToRef( const TQString & sheetName, const TQRect & _area );
-void insertBracket( QString & s );
-QString convertOasisPenToString( const QPen & pen );
-QPen convertOasisStringToPen( const QString &str );
+void insertBracket( TQString & s );
+TQString convertOasisPenToString( const TQPen & pen );
+TQPen convertOasisStringToPen( const TQString &str );
//Return true when it's a reference to cell from sheet.
-KSPREAD_EXPORT bool localReferenceAnchor( const QString &_ref );
+KSPREAD_EXPORT bool localReferenceAnchor( const TQString &_ref );
@@ -340,14 +340,14 @@ namespace Oasis
* @param locale The locale to which the expression should be converted.
*/
// TODO check visibility
- KSPREAD_EXPORT QString decodeFormula(const QString& expr, const KLocale* locale = 0);
+ KSPREAD_EXPORT TQString decodeFormula(const TQString& expr, const KLocale* locale = 0);
/**
* Converts a localized formula/cell reference to an OpenDocument
* representation of a formula/cell reference.
* @param expr The expression to convert to OpenDocument format.
* @param locale The locale from which the expression should be converted.
*/
- KSPREAD_EXPORT QString encodeFormula(const QString& expr, const KLocale* locale = 0);
+ KSPREAD_EXPORT TQString encodeFormula(const TQString& expr, const KLocale* locale = 0);
}
} // namespace KSpread
diff --git a/kspread/kspread_value.cc b/kspread/kspread_value.cc
index c8f739e6..898abd11 100644
--- a/kspread/kspread_value.cc
+++ b/kspread/kspread_value.cc
@@ -21,8 +21,8 @@
#include <kdebug.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#include <float.h>
#include <math.h>
@@ -208,7 +208,7 @@ class KSpread::ValueData
bool b;
long i;
double f;
- QString* ps;
+ TQString* ps;
ValueArray* pa;
};
@@ -371,7 +371,7 @@ Value::Value( double f )
}
// create a string value
-Value::Value( const QString& s )
+Value::Value( const TQString& s )
{
d = ValueData::null();
setValue( s );
@@ -381,25 +381,25 @@ Value::Value( const QString& s )
Value::Value (const char *s)
{
d = ValueData::null();
- setValue (QString (s));
+ setValue (TQString (s));
}
// create a floating-point value from date/time
-Value::Value( const QDateTime& dt )
+Value::Value( const TQDateTime& dt )
{
d = ValueData::null();
setValue( dt );
}
// create a floating-point value from time
-Value::Value( const QTime& dt )
+Value::Value( const TQTime& dt )
{
d = ValueData::null();
setValue( dt );
}
// create a floating-point value from date
-Value::Value( const QDate& dt )
+Value::Value( const TQDate& dt )
{
d = ValueData::null();
setValue( dt );
@@ -512,42 +512,42 @@ double Value::asFloat() const
}
// set the value as string
-void Value::setValue( const QString& s )
+void Value::setValue( const TQString& s )
{
detach();
d->type = String;
- d->ps = new QString( s );
+ d->ps = new TQString( s );
d->format = fmt_String;
}
// get the value as string
-QString Value::asString() const
+TQString Value::asString() const
{
- QString result;
+ TQString result;
if( type() == Value::String )
if( d->ps )
- result = QString( *d->ps );
+ result = TQString( *d->ps );
return result;
}
// set error message
-void Value::setError( const QString& msg )
+void Value::setError( const TQString& msg )
{
detach();
d->type = Error;
- d->ps = new QString( msg );
+ d->ps = new TQString( msg );
}
// get error message
-QString Value::errorMessage() const
+TQString Value::errorMessage() const
{
- QString result;
+ TQString result;
if( type() == Value::Error )
if( d->ps )
- result = QString( *d->ps );
+ result = TQString( *d->ps );
return result;
}
@@ -555,11 +555,11 @@ QString Value::errorMessage() const
// set the value as date/time
// NOTE: date/time is stored as serial number
// Day 61 means 1st of March, 1900
-void Value::setValue( const QDateTime& dt )
+void Value::setValue( const TQDateTime& dt )
{
// reference is 31 Dec, 1899 midnight
- QDate refDate( 1899, 12, 31 );
- QTime refTime( 0, 0 );
+ TQDate refDate( 1899, 12, 31 );
+ TQTime refTime( 0, 0 );
int i = refDate.daysTo( dt.date() ) + 1;
i += refTime.secsTo( dt.time() ) / 86400;
@@ -568,20 +568,20 @@ void Value::setValue( const QDateTime& dt )
d->format = fmt_DateTime;
}
-void Value::setValue( const QTime& time )
+void Value::setValue( const TQTime& time )
{
// reference time is midnight
- QTime refTime( 0, 0 );
+ TQTime refTime( 0, 0 );
int i = refTime.msecsTo( time ) /* / 86400000 */;
setValue( i );
d->format = fmt_Time;
}
-void Value::setValue( const QDate& date )
+void Value::setValue( const TQDate& date )
{
// reference date is 31 Dec, 1899
- QDate refDate = QDate( 1899, 12, 31 );
+ TQDate refDate = TQDate( 1899, 12, 31 );
int i = refDate.daysTo( date ) + 1;
setValue( i );
@@ -589,15 +589,15 @@ void Value::setValue( const QDate& date )
}
// get the value as date/time
-QDateTime Value::asDateTime() const
+TQDateTime Value::asDateTime() const
{
- return QDateTime( asDate(), asTime() );
+ return TQDateTime( asDate(), asTime() );
}
// get the value as date
-QDate Value::asDate() const
+TQDate Value::asDate() const
{
- QDate dt( 1899, 12, 30 );
+ TQDate dt( 1899, 12, 30 );
int i = asInteger();
dt = dt.addDays( i );
@@ -606,9 +606,9 @@ QDate Value::asDate() const
}
// get the value as time
-QTime Value::asTime() const
+TQTime Value::asTime() const
{
- QTime dt;
+ TQTime dt;
int i = asInteger();
dt = dt.addMSecs(i) /*( f * 86400 * 1000 )*/;
@@ -734,9 +734,9 @@ void Value::detach()
case Boolean: n->b = d->b; break;
case Integer: n->i = d->i; break;
case Float: n->f = d->f; break;
- case String: n->ps = new QString( *d->ps ); break;
+ case String: n->ps = new TQString( *d->ps ); break;
case Array: n->pa = new ValueArray; *n->pa = (*d->pa); break;
- case Error: n->ps = new QString( *d->ps ); break;
+ case Error: n->ps = new TQString( *d->ps ); break;
default: break;
}
@@ -924,7 +924,7 @@ bool Value::greater( const Value& v ) const
return compare( v ) > 0;
}
-QTextStream& operator<<( QTextStream& ts, Value::Type type )
+TQTextStream& operator<<( TQTextStream& ts, Value::Type type )
{
switch( type )
{
@@ -940,7 +940,7 @@ QTextStream& operator<<( QTextStream& ts, Value::Type type )
return ts;
}
-QTextStream& operator<<( QTextStream& ts, Value value )
+TQTextStream& operator<<( TQTextStream& ts, Value value )
{
ts << value.type();
switch( value.type() )
diff --git a/kspread/kspread_value.h b/kspread/kspread_value.h
index 3dbfab5b..0c76e40f 100644
--- a/kspread/kspread_value.h
+++ b/kspread/kspread_value.h
@@ -20,9 +20,9 @@
#ifndef KSPREAD_VALUE_H
#define KSPREAD_VALUE_H
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
#include <koffice_export.h>
@@ -121,7 +121,7 @@ class KSPREAD_EXPORT Value
/**
* Create a string value.
*/
- Value( const QString& s );
+ Value( const TQString& s );
Value (const char *s);
/**
@@ -130,19 +130,19 @@ class KSPREAD_EXPORT Value
* Internally date/time is represented as serial-number, i.e number of
* elapsed day since reference date. Day 61 is defined as March 1, 1900.
*/
- Value( const QDateTime& dt );
+ Value( const TQDateTime& dt );
/**
* Create a floating-point value from time.
* See also note above.
*/
- Value( const QTime& time );
+ Value( const TQTime& time );
/**
* Create a floating-point value from date.
* See also note above.
*/
- Value( const QDate& date );
+ Value( const TQDate& date );
/**
* Create an array of values.
@@ -226,27 +226,27 @@ class KSPREAD_EXPORT Value
/**
* Sets this value to string value.
*/
- void setValue( const QString& s );
+ void setValue( const TQString& s );
/**
* Sets this value to hold error message.
*/
- void setError( const QString& msg );
+ void setError( const TQString& msg );
/**
* Sets this value to floating-point number representing the date/time.
*/
- void setValue( const QDateTime& dt );
+ void setValue( const TQDateTime& dt );
/**
* Sets this value to floating-point number representing the date.
*/
- void setValue( const QTime& dt );
+ void setValue( const TQTime& dt );
/**
* Sets this value to floating-point number representing the time.
*/
- void setValue( const QDate& dt );
+ void setValue( const TQDate& dt );
/** Sets format information for this value. */
void setFormat (Format fmt);
@@ -277,22 +277,22 @@ class KSPREAD_EXPORT Value
*
* Call this function only if isString() returns true.
*/
- QString asString() const;
+ TQString asString() const;
/**
* Returns the date/time representation of this value.
*/
- QDateTime asDateTime() const;
+ TQDateTime asDateTime() const;
/**
* Returns the date representation of this value.
*/
- QDate asDate() const;
+ TQDate asDate() const;
/**
* Returns the time representation of this value.
*/
- QTime asTime() const;
+ TQTime asTime() const;
/**
* Return an element in the array value.
@@ -321,7 +321,7 @@ class KSPREAD_EXPORT Value
*
* Call this function only if isError() returns true.
*/
- QString errorMessage() const;
+ TQString errorMessage() const;
/**
* Detaches itself from shared value data, i.e make a private, deep copy
@@ -431,7 +431,7 @@ class KSPREAD_EXPORT Value
} // namespace KSpread
-QTextStream& operator<<( QTextStream& ts, KSpread::Value::Type type );
-QTextStream& operator<<( QTextStream& ts, KSpread::Value value );
+TQTextStream& operator<<( TQTextStream& ts, KSpread::Value::Type type );
+TQTextStream& operator<<( TQTextStream& ts, KSpread::Value value );
#endif // KSPREAD_VALUE_H
diff --git a/kspread/kspread_view.cc b/kspread/kspread_view.cc
index 74c68545..c0c21005 100644
--- a/kspread/kspread_view.cc
+++ b/kspread/kspread_view.cc
@@ -33,18 +33,18 @@
#include <stdlib.h>
#include <time.h>
-// Qt includes
-#include <qbuffer.h>
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qpaintdevicemetrics.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
-#include <qsqldatabase.h>
-#include <qlistview.h>
-#include <qsizepolicy.h>
+// TQt includes
+#include <tqbuffer.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
+#include <tqsqldatabase.h>
+#include <tqlistview.h>
+#include <tqsizepolicy.h>
// KDE includes
#include <dcopclient.h>
@@ -167,25 +167,25 @@ public:
Sheet* activeSheet;
// GUI elements
- QWidget *frame;
- QFrame *toolWidget;
+ TQWidget *frame;
+ TQFrame *toolWidget;
Canvas *canvas;
VBorder *vBorderWidget;
HBorder *hBorderWidget;
- QScrollBar *horzScrollBar;
- QScrollBar *vertScrollBar;
+ TQScrollBar *horzScrollBar;
+ TQScrollBar *vertScrollBar;
KoTabBar *tabBar;
KStatusBarLabel* calcLabel;
// formulabar, consists of:
- QHBoxLayout* formulaBarLayout;
+ TQHBoxLayout* formulaBarLayout;
ComboboxLocationEditWidget *posWidget;
- QButton* formulaButton;
- QButton *okButton;
- QButton *cancelButton;
+ TQButton* formulaButton;
+ TQButton *okButton;
+ TQButton *cancelButton;
KSpread::EditWidget *editWidget;
- QGridLayout* viewLayout;
- QHBoxLayout* tabScrollBarLayout;
+ TQGridLayout* viewLayout;
+ TQHBoxLayout* tabScrollBarLayout;
// all UI actions
ViewActions* actions;
@@ -202,24 +202,24 @@ public:
// selection/marker
Selection* selection;
Selection* choice;
- QMap<Sheet*, QPoint> savedAnchors;
- QMap<Sheet*, QPoint> savedMarkers;
- QMap<Sheet*, KoPoint> savedOffsets;
+ TQMap<Sheet*, TQPoint> savedAnchors;
+ TQMap<Sheet*, TQPoint> savedMarkers;
+ TQMap<Sheet*, KoPoint> savedOffsets;
// Find and Replace context. We remember the options and
// the strings used previously.
long findOptions;
- QStringList findStrings;
- QStringList replaceStrings;
+ TQStringList findStrings;
+ TQStringList replaceStrings;
FindOption::searchTypeValue typeValue;
FindOption::searchDirectionValue directionValue;
- // Current "find" operation
- KFind* find;
- KReplace* replace;
+ // Current "tqfind" operation
+ KFind* tqfind;
+ KReplace* tqreplace;
int findLeftColumn;
int findRightColumn;
- QPoint findPos;
- QPoint findEnd;
+ TQPoint findPos;
+ TQPoint findEnd;
InsertHandler* insertHandler;
@@ -227,18 +227,18 @@ public:
KoCharSelectDia* specialCharDlg;
// Holds a guarded pointer to the transformation toolbox.
- QGuardedPtr<KoTransformToolBox> transformToolBox;
+ TQGuardedPtr<KoTransformToolBox> transformToolBox;
// the last popup menu (may be 0).
// Since only one popup menu can be opened at once, its pointer is stored here.
// Delete the old one before you store a pointer to anotheron here.
- QPopupMenu *popupMenu;
+ TQPopupMenu *popupMenu;
int popupMenuFirstToolId;
- QPopupMenu *popupRow;
- QPopupMenu *popupColumn;
- QPopupMenu* popupChild; // for embedded children
- QPopupMenu* popupListChoose; // for list of choose
+ TQPopupMenu *popupRow;
+ TQPopupMenu *popupColumn;
+ TQPopupMenu* popupChild; // for embedded tqchildren
+ TQPopupMenu* popupListChoose; // for list of choose
// the child for which the popup menu has been opened.
Child* popupChildObject;
@@ -258,7 +258,7 @@ public:
unsigned int spellEndCellX;
unsigned int spellEndCellY;
bool spellCheckSelection;
- QStringList replaceAll;
+ TQStringList replaceAll;
} spell;
struct
@@ -270,23 +270,23 @@ public:
// the tools
struct ToolEntry
{
- QString command;
+ TQString command;
KDataToolInfo info;
};
- QPtrList<ToolEntry> toolList;
+ TQPtrList<ToolEntry> toolList;
void initActions();
void adjustActions( bool mode );
void adjustActions( Sheet* sheet, Cell* cell );
void adjustWorkbookActions( bool mode );
void updateButton( Cell *cell, int column, int row);
- QButton* newIconButton( const char *_file, bool _kbutton = false, QWidget *_parent = 0L );
+ TQButton* newIconButton( const char *_file, bool _kbutton = false, TQWidget *_parent = 0L );
PropertyEditor *m_propertyEditor;
// On timeout this will execute the status bar operation (e.g. SUM).
// This is delayed to speed up the selection.
- QTimer statusBarOpTimer;
+ TQTimer statusBarOpTimer;
};
class ViewActions
@@ -411,8 +411,8 @@ public:
KAction* paste;
KAction* specialPaste;
KAction* insertCellCopy;
- KAction* find;
- KAction* replace;
+ KAction* tqfind;
+ KAction* tqreplace;
// navigation
KAction* gotoCell;
@@ -468,541 +468,541 @@ void View::Private::initActions()
// -- cell formatting actions --
actions->cellLayout = new KAction( i18n("Cell Format..."), "cell_layout",
- Qt::CTRL+ Qt::ALT+ Qt::Key_F, view, SLOT( layoutDlg() ), ac, "cellLayout" );
+ TQt::CTRL+ TQt::ALT+ TQt::Key_F, TQT_TQOBJECT(view), TQT_SLOT( tqlayoutDlg() ), ac, "cellLayout" );
actions->cellLayout->setToolTip( i18n("Set the cell formatting.") );
actions->actionExtraProperties = new KAction( i18n( "&Properties" ), "penbrush", 0,
- view, SLOT( extraProperties() ), ac, "extra_properties" );
+ TQT_TQOBJECT(view), TQT_SLOT( extraProperties() ), ac, "extra_properties" );
actions->defaultFormat = new KAction( i18n("Default"),
- 0, view, SLOT( defaultSelection() ), ac, "default" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( defaultSelection() ), ac, "default" );
actions->defaultFormat->setToolTip( i18n("Resets to the default format.") );
actions->bold = new KToggleAction( i18n("Bold"), "text_bold",
- Qt::CTRL+Qt::Key_B, ac, "bold");
- QObject::connect( actions->bold, SIGNAL( toggled( bool) ),
- view, SLOT( bold( bool ) ) );
+ TQt::CTRL+TQt::Key_B, ac, "bold");
+ TQT_BASE_OBJECT_NAME::connect( actions->bold, TQT_SIGNAL( toggled( bool) ),
+ TQT_TQOBJECT(view), TQT_SLOT( bold( bool ) ) );
actions->italic = new KToggleAction( i18n("Italic"), "text_italic",
- Qt::CTRL+Qt::Key_I, ac, "italic");
- QObject::connect( actions->italic, SIGNAL( toggled( bool) ),
- view, SLOT( italic( bool ) ) );
+ TQt::CTRL+TQt::Key_I, ac, "italic");
+ TQT_BASE_OBJECT_NAME::connect( actions->italic, TQT_SIGNAL( toggled( bool) ),
+ TQT_TQOBJECT(view), TQT_SLOT( italic( bool ) ) );
actions->underline = new KToggleAction( i18n("Underline"), "text_under",
- Qt::CTRL+Qt::Key_U, ac, "underline");
- QObject::connect( actions->underline, SIGNAL( toggled( bool) ),
- view, SLOT( underline( bool ) ) );
+ TQt::CTRL+TQt::Key_U, ac, "underline");
+ TQT_BASE_OBJECT_NAME::connect( actions->underline, TQT_SIGNAL( toggled( bool) ),
+ TQT_TQOBJECT(view), TQT_SLOT( underline( bool ) ) );
actions->strikeOut = new KToggleAction( i18n("Strike Out"), "text_strike",
0, ac, "strikeout");
- QObject::connect( actions->strikeOut, SIGNAL( toggled( bool) ),
- view, SLOT( strikeOut( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->strikeOut, TQT_SIGNAL( toggled( bool) ),
+ TQT_TQOBJECT(view), TQT_SLOT( strikeOut( bool ) ) );
actions->selectFont = new KFontAction( i18n("Select Font..."),
0, ac, "selectFont" );
- QObject::connect( actions->selectFont, SIGNAL( activated( const QString& ) ),
- view, SLOT( fontSelected( const QString& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->selectFont, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( fontSelected( const TQString& ) ) );
actions->selectFontSize = new KFontSizeAction( i18n("Select Font Size"),
0, ac, "selectFontSize" );
- QObject::connect( actions->selectFontSize, SIGNAL( fontSizeChanged( int ) ),
- view, SLOT( fontSizeSelected( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->selectFontSize, TQT_SIGNAL( fontSizeChanged( int ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( fontSizeSelected( int ) ) );
actions->fontSizeUp = new KAction( i18n("Increase Font Size"), "fontsizeup",
- 0, view, SLOT( increaseFontSize() ), ac, "increaseFontSize" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( increaseFontSize() ), ac, "increaseFontSize" );
actions->fontSizeDown = new KAction( i18n("Decrease Font Size"), "fontsizedown",
- 0, view, SLOT( decreaseFontSize() ), ac, "decreaseFontSize" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( decreaseFontSize() ), ac, "decreaseFontSize" );
actions->textColor = new TKSelectColorAction( i18n("Text Color"),
- TKSelectColorAction::TextColor, view, SLOT( changeTextColor() ),
+ TKSelectColorAction::TextColor, TQT_TQOBJECT(view), TQT_SLOT( changeTextColor() ),
ac, "textColor",true );
- actions->textColor->setDefaultColor(QColor());
+ actions->textColor->setDefaultColor(TQColor());
actions->alignLeft = new KToggleAction( i18n("Align Left"), "text_left",
0, ac, "left");
- QObject::connect( actions->alignLeft, SIGNAL( toggled( bool ) ),
- view, SLOT( alignLeft( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignLeft, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignLeft( bool ) ) );
actions->alignLeft->setExclusiveGroup( "Align" );
actions->alignLeft->setToolTip(i18n("Left justify the cell contents."));
actions->alignCenter = new KToggleAction( i18n("Align Center"), "text_center",
0, ac, "center");
- QObject::connect( actions->alignCenter, SIGNAL( toggled( bool ) ),
- view, SLOT( alignCenter( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignCenter, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignCenter( bool ) ) );
actions->alignCenter->setExclusiveGroup( "Align" );
actions->alignCenter->setToolTip(i18n("Center the cell contents."));
actions->alignRight = new KToggleAction( i18n("Align Right"), "text_right",
0, ac, "right");
- QObject::connect( actions->alignRight, SIGNAL( toggled( bool ) ),
- view, SLOT( alignRight( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignRight, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignRight( bool ) ) );
actions->alignRight->setExclusiveGroup( "Align" );
actions->alignRight->setToolTip(i18n("Right justify the cell contents."));
actions->alignTop = new KToggleAction( i18n("Align Top"), "text_top",
0, ac, "top");
- QObject::connect( actions->alignTop, SIGNAL( toggled( bool ) ),
- view, SLOT( alignTop( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignTop, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignTop( bool ) ) );
actions->alignTop->setExclusiveGroup( "Pos" );
actions->alignTop->setToolTip(i18n("Align cell contents along the top of the cell."));
actions->alignMiddle = new KToggleAction( i18n("Align Middle"), "middle",
0, ac, "middle");
- QObject::connect( actions->alignMiddle, SIGNAL( toggled( bool ) ),
- view, SLOT( alignMiddle( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignMiddle, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignMiddle( bool ) ) );
actions->alignMiddle->setExclusiveGroup( "Pos" );
actions->alignMiddle->setToolTip(i18n("Align cell contents centered in the cell."));
actions->alignBottom = new KToggleAction( i18n("Align Bottom"), "text_bottom",
0, ac, "bottom");
- QObject::connect( actions->alignBottom, SIGNAL( toggled( bool ) ),
- view, SLOT( alignBottom( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->alignBottom, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( alignBottom( bool ) ) );
actions->alignBottom->setExclusiveGroup( "Pos" );
actions->alignBottom->setToolTip(i18n("Align cell contents along the bottom of the cell."));
actions->wrapText = new KToggleAction( i18n("Wrap Text"), "multirow",
0, ac, "multiRow" );
- QObject::connect( actions->wrapText, SIGNAL( toggled( bool ) ),
- view, SLOT( wrapText( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->wrapText, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( wrapText( bool ) ) );
actions->wrapText->setToolTip(i18n("Make the cell text wrap onto multiple lines."));
actions->verticalText = new KToggleAction( i18n("Vertical Text"),"vertical_text" ,
0 ,ac, "verticaltext" );
- QObject::connect( actions->verticalText, SIGNAL( toggled( bool ) ),
- view, SLOT( verticalText( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->verticalText, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( verticalText( bool ) ) );
actions->verticalText->setToolTip(i18n("Print cell contents vertically."));
actions->increaseIndent = new KAction( i18n("Increase Indent"),
- QApplication::reverseLayout() ? "format_decreaseindent":"format_increaseindent",
- 0, view, SLOT( increaseIndent() ), ac, "increaseindent" );
+ TQApplication::reverseLayout() ? "format_decreaseindent":"format_increaseindent",
+ 0, TQT_TQOBJECT(view), TQT_SLOT( increaseIndent() ), ac, "increaseindent" );
actions->increaseIndent->setToolTip(i18n("Increase the indentation."));
actions->decreaseIndent = new KAction( i18n("Decrease Indent"),
- QApplication::reverseLayout() ? "format_increaseindent" : "format_decreaseindent",
- 0, view, SLOT( decreaseIndent() ), ac, "decreaseindent");
+ TQApplication::reverseLayout() ? "format_increaseindent" : "format_decreaseindent",
+ 0, TQT_TQOBJECT(view), TQT_SLOT( decreaseIndent() ), ac, "decreaseindent");
actions->decreaseIndent->setToolTip(i18n("Decrease the indentation."));
actions->changeAngle = new KAction( i18n("Change Angle..."),
- 0, view, SLOT( changeAngle() ), ac, "changeangle" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( changeAngle() ), ac, "changeangle" );
actions->changeAngle->setToolTip(i18n("Change the angle that cell contents are printed."));
actions->percent = new KToggleAction( i18n("Percent Format"), "percent",
0, ac, "percent");
- QObject::connect( actions->percent, SIGNAL( toggled( bool ) ),
- view, SLOT( percent( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->percent, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( percent( bool ) ) );
actions->percent->setToolTip(i18n("Set the cell formatting to look like a percentage."));
actions->precplus = new KAction( i18n("Increase Precision"), "prec_plus",
- 0, view, SLOT( precisionPlus() ), ac, "precplus");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( precisionPlus() ), ac, "precplus");
actions->precplus->setToolTip(i18n("Increase the decimal precision shown onscreen."));
actions->precminus = new KAction( i18n("Decrease Precision"), "prec_minus",
- 0, view, SLOT( precisionMinus() ), ac, "precminus");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( precisionMinus() ), ac, "precminus");
actions->precminus->setToolTip(i18n("Decrease the decimal precision shown onscreen."));
actions->money = new KToggleAction( i18n("Money Format"), "money",
0, ac, "money");
- QObject::connect( actions->money, SIGNAL( toggled( bool ) ),
- view, SLOT( moneyFormat( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->money, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( moneyFormat( bool ) ) );
actions->money->setToolTip(i18n("Set the cell formatting to look like your local currency."));
actions->upper = new KAction( i18n("Upper Case"), "fontsizeup",
- 0, view, SLOT( upper() ), ac, "upper" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( upper() ), ac, "upper" );
actions->upper->setToolTip(i18n("Convert all letters to upper case."));
actions->lower = new KAction( i18n("Lower Case"), "fontsizedown",
- 0, view, SLOT( lower() ), ac, "lower" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( lower() ), ac, "lower" );
actions->lower->setToolTip(i18n("Convert all letters to lower case."));
actions->firstLetterUpper = new KAction( i18n("Convert First Letter to Upper Case"), "first_letter_upper",
- 0, view, SLOT( firstLetterUpper() ),ac, "firstletterupper" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( firstLetterUpper() ),ac, "firstletterupper" );
actions->firstLetterUpper->setToolTip(i18n("Capitalize the first letter."));
actions->bgColor = new TKSelectColorAction( i18n("Background Color"),
TKSelectColorAction::FillColor, ac, "backgroundColor", true );
- QObject::connect(actions->bgColor, SIGNAL( activated() ),
- view, SLOT( changeBackgroundColor() ) );
- actions->bgColor->setDefaultColor(QColor());
+ TQT_BASE_OBJECT_NAME::connect(actions->bgColor, TQT_SIGNAL( activated() ),
+ TQT_TQOBJECT(view), TQT_SLOT( changeBackgroundColor() ) );
+ actions->bgColor->setDefaultColor(TQColor());
actions->bgColor->setToolTip(i18n("Set the background color."));
actions->borderLeft = new KAction( i18n("Border Left"), "border_left",
- 0, view, SLOT( borderLeft() ), ac, "borderLeft" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderLeft() ), ac, "borderLeft" );
actions->borderLeft->setToolTip(i18n("Set a left border to the selected area."));
actions->borderRight = new KAction( i18n("Border Right"), "border_right",
- 0, view, SLOT( borderRight() ), ac, "borderRight" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderRight() ), ac, "borderRight" );
actions->borderRight->setToolTip(i18n("Set a right border to the selected area."));
actions->borderTop = new KAction( i18n("Border Top"), "border_top",
- 0, view, SLOT( borderTop() ), ac, "borderTop" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderTop() ), ac, "borderTop" );
actions->borderTop->setToolTip(i18n("Set a top border to the selected area."));
actions->borderBottom = new KAction( i18n("Border Bottom"), "border_bottom",
- 0, view, SLOT( borderBottom() ), ac, "borderBottom" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderBottom() ), ac, "borderBottom" );
actions->borderBottom->setToolTip(i18n("Set a bottom border to the selected area."));
actions->borderAll = new KAction( i18n("All Borders"), "border_all",
- 0, view, SLOT( borderAll() ), ac, "borderAll" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderAll() ), ac, "borderAll" );
actions->borderAll->setToolTip(i18n("Set a border around all cells in the selected area."));
actions->borderRemove = new KAction( i18n("Remove Borders"), "border_remove",
- 0, view, SLOT( borderRemove() ), ac, "borderRemove" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderRemove() ), ac, "borderRemove" );
actions->borderRemove->setToolTip(i18n("Remove all borders in the selected area."));
actions->borderOutline = new KAction( i18n("Border Outline"), ("border_outline"),
- 0, view, SLOT( borderOutline() ), ac, "borderOutline" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( borderOutline() ), ac, "borderOutline" );
actions->borderOutline->setToolTip(i18n("Set a border to the outline of the selected area."));
actions->borderColor = new TKSelectColorAction( i18n("Border Color"),
TKSelectColorAction::LineColor, ac, "borderColor" );
- QObject::connect( actions->borderColor, SIGNAL( activated() ),
- view, SLOT( changeBorderColor() ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->borderColor, TQT_SIGNAL( activated() ),
+ TQT_TQOBJECT(view), TQT_SLOT( changeBorderColor() ) );
actions->borderColor->setToolTip( i18n( "Select a new border color." ) );
actions->selectStyle = new KSelectAction( i18n( "St&yle" ),
0, ac, "stylemenu" );
actions->selectStyle->setToolTip( i18n( "Apply a predefined style to the selected cells." ) );
- QObject::connect( actions->selectStyle, SIGNAL( activated( const QString & ) ),
- view, SLOT( styleSelected( const QString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->selectStyle, TQT_SIGNAL( activated( const TQString & ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( styleSelected( const TQString & ) ) );
actions->createStyle = new KAction( i18n( "Create Style From Cell..." ),
- 0, view, SLOT( createStyleFromCell()), ac, "createStyle" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( createStyleFromCell()), ac, "createStyle" );
actions->createStyle->setToolTip( i18n( "Create a new style based on the currently selected cell." ) );
// -- cell operation actions --
actions->editCell = new KAction( i18n("Modify Cell"),"cell_edit",
- Qt::CTRL+Qt::Key_M, view, SLOT( editCell() ), ac, "editCell" );
+ TQt::CTRL+TQt::Key_M, TQT_TQOBJECT(view), TQT_SLOT( editCell() ), ac, "editCell" );
actions->editCell->setToolTip(i18n("Edit the highlighted cell."));
actions->insertCell = new KAction( i18n("Insert Cells..."), "insertcell",
- 0, view, SLOT( slotInsert() ), ac, "insertCell" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( slotInsert() ), ac, "insertCell" );
actions->insertCell->setToolTip(i18n("Insert a blank cell into the spreadsheet."));
actions->removeCell = new KAction( i18n("Remove Cells..."), "removecell",
- 0, view, SLOT( slotRemove() ), ac, "removeCell" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( slotRemove() ), ac, "removeCell" );
actions->removeCell->setToolTip(i18n("Removes the current cell from the spreadsheet."));
actions->deleteCell = new KAction( i18n("Delete"), "deletecell",
- 0, view, SLOT( deleteSelection() ), ac, "delete" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( deleteSelection() ), ac, "delete" );
actions->deleteCell->setToolTip(i18n("Delete all contents and formatting of the current cell."));
actions->mergeCell = new KToolBarPopupAction( i18n("Merge Cells"),"mergecell",
- 0, view, SLOT( mergeCell() ), ac, "mergecell" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( mergeCell() ), ac, "mergecell" );
actions->mergeCell->setToolTip(i18n("Merge the selected region."));
actions->mergeCell->plug( actions->mergeCell->popupMenu() );
- actions->mergeCellHorizontal = new KAction( i18n("Merge Cells Horizontally"),"mergecell-horizontal",
- 0, view, SLOT( mergeCellHorizontal() ), ac, "mergecellHorizontal" );
+ actions->mergeCellHorizontal = new KAction( i18n("Merge CellsQt::Horizontally"),"mergecell-horizontal",
+ 0, TQT_TQOBJECT(view), TQT_SLOT( mergeCellHorizontal() ), ac, "mergecellHorizontal" );
actions->mergeCellHorizontal->setToolTip(i18n("Merge the selected region horizontally."));
actions->mergeCellHorizontal->plug( actions->mergeCell->popupMenu() );
- actions->mergeCellVertical = new KAction( i18n("Merge Cells Vertically"),"mergecell-vertical",
- 0, view, SLOT( mergeCellVertical() ), ac, "mergecellVertical" );
+ actions->mergeCellVertical = new KAction( i18n("Merge CellsQt::Vertically"),"mergecell-vertical",
+ 0, TQT_TQOBJECT(view), TQT_SLOT( mergeCellVertical() ), ac, "mergecellVertical" );
actions->mergeCellVertical->setToolTip(i18n("Merge the selected region vertically."));
actions->mergeCellVertical->plug( actions->mergeCell->popupMenu() );
actions->dissociateCell = new KAction( i18n("Dissociate Cells"),"dissociatecell",
- 0, view, SLOT( dissociateCell() ), ac, "dissociatecell" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( dissociateCell() ), ac, "dissociatecell" );
actions->dissociateCell->setToolTip(i18n("Unmerge the selected region."));
actions->clearText = new KAction( i18n("Text"),
- 0, view, SLOT( clearTextSelection() ), ac, "cleartext" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( clearTextSelection() ), ac, "cleartext" );
actions->clearText->setToolTip(i18n("Remove the contents of the current cell."));
actions->conditional = new KAction( i18n("Conditional Cell Attributes..."),
- 0, view, SLOT( conditional() ), ac, "conditional" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( conditional() ), ac, "conditional" );
actions->conditional->setToolTip(i18n("Set cell format based on certain conditions."));
actions->clearConditional = new KAction( i18n("Conditional Cell Attributes"),
- 0, view, SLOT( clearConditionalSelection() ), ac, "clearconditional" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( clearConditionalSelection() ), ac, "clearconditional" );
actions->clearConditional->setToolTip(i18n("Remove the conditional cell formatting."));
actions->validity = new KAction( i18n("Validity..."),
- 0, view, SLOT( validity() ), ac, "validity" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( validity() ), ac, "validity" );
actions->validity->setToolTip(i18n("Set tests to confirm cell data is valid."));
actions->clearValidity = new KAction( i18n("Validity"),
- 0, view, SLOT( clearValiditySelection() ), ac, "clearvalidity" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( clearValiditySelection() ), ac, "clearvalidity" );
actions->clearValidity->setToolTip(i18n("Remove the validity tests on this cell."));
actions->addModifyComment = new KAction( i18n("&Add/Modify Comment..."),"comment",
- 0, view, SLOT( addModifyComment() ), ac, "addmodifycomment" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( addModifyComment() ), ac, "addmodifycomment" );
actions->addModifyComment->setToolTip(i18n("Edit a comment for this cell."));
actions->removeComment = new KAction( i18n("&Remove Comment"),"removecomment",
- 0, view, SLOT( removeComment() ), ac, "removecomment" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( removeComment() ), ac, "removecomment" );
actions->removeComment->setToolTip(i18n("Remove this cell's comment."));
actions->clearComment = new KAction( i18n("Comment"),
- 0, view, SLOT( clearCommentSelection() ), ac, "clearcomment" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( clearCommentSelection() ), ac, "clearcomment" );
actions->clearComment->setToolTip(i18n("Remove this cell's comment."));
// -- column & row actions --
actions->resizeColumn = new KAction( i18n("Resize Column..."), "resizecol",
- 0, view, SLOT( resizeColumn() ), ac, "resizeCol" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( resizeColumn() ), ac, "resizeCol" );
actions->resizeColumn->setToolTip(i18n("Change the width of a column."));
actions->insertColumn = new KAction( i18n("Insert Columns"), "insert_table_col",
- 0, view, SLOT( insertColumn() ), ac, "insertColumn" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertColumn() ), ac, "insertColumn" );
actions->insertColumn->setToolTip(i18n("Inserts a new column into the spreadsheet."));
actions->deleteColumn = new KAction( i18n("Delete Columns"), "delete_table_col",
- 0, view, SLOT( deleteColumn() ), ac, "deleteColumn" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( deleteColumn() ), ac, "deleteColumn" );
actions->deleteColumn->setToolTip(i18n("Removes a column from the spreadsheet."));
actions->hideColumn = new KAction( i18n("Hide Columns"), "hide_table_column",
- 0, view, SLOT( hideColumn() ), ac, "hideColumn" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( hideColumn() ), ac, "hideColumn" );
actions->hideColumn->setToolTip(i18n("Hide the column from view."));
actions->showColumn = new KAction( i18n("Show Columns..."), "show_table_column",
- 0, view, SLOT( showColumn() ), ac, "showColumn" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showColumn() ), ac, "showColumn" );
actions->showColumn->setToolTip(i18n("Show hidden columns."));
actions->equalizeColumn = new KAction( i18n("Equalize Column"), "adjustcol",
- 0, view, SLOT( equalizeColumn() ), ac, "equalizeCol" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( equalizeColumn() ), ac, "equalizeCol" );
actions->equalizeColumn->setToolTip(i18n("Resizes selected columns to be the same size."));
actions->showSelColumns = new KAction( i18n("Show Columns"), "show_sheet_column",
- 0, view, SLOT( showSelColumns() ), ac, "showSelColumns" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showSelColumns() ), ac, "showSelColumns" );
actions->showSelColumns->setToolTip(i18n("Show hidden columns in the selection."));
actions->showSelColumns->setEnabled(false);
actions->resizeRow = new KAction( i18n("Resize Row..."), "resizerow",
- 0, view, SLOT( resizeRow() ), ac, "resizeRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( resizeRow() ), ac, "resizeRow" );
actions->resizeRow->setToolTip(i18n("Change the height of a row."));
actions->insertRow = new KAction( i18n("Insert Rows"), "insert_table_row",
- 0, view, SLOT( insertRow() ), ac, "insertRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertRow() ), ac, "insertRow" );
actions->insertRow->setToolTip(i18n("Inserts a new row into the spreadsheet."));
actions->deleteRow = new KAction( i18n("Delete Rows"), "delete_table_row",
- 0, view, SLOT( deleteRow() ), ac, "deleteRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( deleteRow() ), ac, "deleteRow" );
actions->deleteRow->setToolTip(i18n("Removes a row from the spreadsheet."));
actions->hideRow = new KAction( i18n("Hide Rows"), "hide_table_row",
- 0, view, SLOT( hideRow() ), ac, "hideRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( hideRow() ), ac, "hideRow" );
actions->hideRow->setToolTip(i18n("Hide a row from view."));
actions->showRow = new KAction( i18n("Show Rows..."), "show_table_row",
- 0, view, SLOT( showRow() ), ac, "showRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showRow() ), ac, "showRow" );
actions->showRow->setToolTip(i18n("Show hidden rows."));
actions->equalizeRow = new KAction( i18n("Equalize Row"), "adjustrow",
- 0, view, SLOT( equalizeRow() ), ac, "equalizeRow" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( equalizeRow() ), ac, "equalizeRow" );
actions->equalizeRow->setToolTip(i18n("Resizes selected rows to be the same size."));
actions->showSelRows = new KAction( i18n("Show Rows"), "show_table_row",
- 0, view, SLOT( showSelRows() ), ac, "showSelRows" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showSelRows() ), ac, "showSelRows" );
actions->showSelRows->setEnabled(false);
actions->showSelRows->setToolTip(i18n("Show hidden rows in the selection."));
actions->adjust = new KAction( i18n("Adjust Row && Column"),
- 0, view, SLOT( adjust() ), ac, "adjust" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( adjust() ), ac, "adjust" );
actions->adjust->setToolTip(i18n("Adjusts row/column size so that the contents will fit."));
// -- sheet/workbook actions --
actions->sheetProperties = new KAction( i18n("Sheet Properties"),
- 0, view, SLOT( sheetProperties() ), ac, "sheetProperties" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sheetProperties() ), ac, "sheetProperties" );
actions->sheetProperties->setToolTip(i18n("Modify current sheet's properties."));
actions->insertSheet = new KAction( i18n("Insert Sheet"),"inserttable",
- 0, view, SLOT( insertSheet() ), ac, "insertSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertSheet() ), ac, "insertSheet" );
actions->insertSheet->setToolTip(i18n("Insert a new sheet."));
// same action as insertSheet, but without 'insert' in the caption
actions->menuInsertSheet = new KAction( i18n("&Sheet"),"inserttable",
- 0, view, SLOT( insertSheet() ), ac, "menuInsertSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertSheet() ), ac, "menuInsertSheet" );
actions->menuInsertSheet->setToolTip(i18n("Insert a new sheet."));
actions->removeSheet = new KAction( i18n("Remove Sheet"), "delete_table",
- 0, view, SLOT( removeSheet() ), ac, "removeSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( removeSheet() ), ac, "removeSheet" );
actions->removeSheet->setToolTip(i18n("Remove the active sheet."));
actions->renameSheet=new KAction( i18n("Rename Sheet..."),
- 0, view, SLOT( slotRename() ), ac, "renameSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( slotRename() ), ac, "renameSheet" );
actions->renameSheet->setToolTip(i18n("Rename the active sheet."));
actions->showSheet = new KAction(i18n("Show Sheet..."),
- 0, view, SLOT( showSheet()), ac, "showSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showSheet()), ac, "showSheet" );
actions->showSheet->setToolTip(i18n("Show a hidden sheet."));
actions->hideSheet = new KAction(i18n("Hide Sheet"),
- 0, view, SLOT( hideSheet() ), ac, "hideSheet" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( hideSheet() ), ac, "hideSheet" );
actions->hideSheet->setToolTip(i18n("Hide the active sheet."));
actions->autoFormat = new KAction( i18n("AutoFormat..."),
- 0, view, SLOT( sheetFormat() ), ac, "sheetFormat" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sheetFormat() ), ac, "sheetFormat" );
actions->autoFormat->setToolTip(i18n("Set the worksheet formatting."));
actions->areaName = new KAction( i18n("Area Name..."),
- 0, view, SLOT( setAreaName() ), ac, "areaname" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( setAreaName() ), ac, "areaname" );
actions->areaName->setToolTip(i18n("Set a name for a region of the spreadsheet."));
actions->showArea = new KAction( i18n("Show Area..."),
- 0, view, SLOT( showAreaName() ), ac, "showArea" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( showAreaName() ), ac, "showArea" );
actions->showArea->setToolTip(i18n("Display a named area."));
actions->insertFunction = new KAction( i18n("&Function..."), "funct",
- 0, view, SLOT( insertMathExpr() ), ac, "insertMathExpr" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertMathExpr() ), ac, "insertMathExpr" );
actions->insertFunction->setToolTip(i18n("Insert math expression."));
actions->insertSeries = new KAction( i18n("&Series..."),"series",
- 0, view, SLOT( insertSeries() ), ac, "series");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertSeries() ), ac, "series");
actions->insertSeries ->setToolTip(i18n("Insert a series."));
actions->insertLink = new KAction( i18n("&Link..."), "insert_link",
- 0, view, SLOT( insertHyperlink() ), ac, "insertHyperlink" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertHyperlink() ), ac, "insertHyperlink" );
actions->insertLink->setToolTip(i18n("Insert an Internet hyperlink."));
actions->removeLink = new KAction( i18n("&Remove Link"),
- 0, view, SLOT( removeHyperlink() ), ac, "removeHyperlink" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( removeHyperlink() ), ac, "removeHyperlink" );
actions->removeLink->setToolTip(i18n("Remove a link."));
actions->insertSpecialChar = new KAction( i18n( "S&pecial Character..." ), "char",
- view, SLOT( insertSpecialChar() ), ac, "insertSpecialChar" );
+ TQT_TQOBJECT(view), TQT_SLOT( insertSpecialChar() ), ac, "insertSpecialChar" );
actions->insertSpecialChar->setToolTip( i18n( "Insert one or more symbols or letters not found on the keyboard." ) );
actions->insertPart = new KoPartSelectAction( i18n("&Object"), "frame_query",
- view, SLOT( insertObject() ), ac, "insertPart");
+ TQT_TQOBJECT(view), TQT_SLOT( insertObject() ), ac, "insertPart");
actions->insertPart->setToolTip(i18n("Insert an object from another program."));
actions->insertChartFrame = new KToggleAction( i18n("&Chart"), "insert_chart",
- 0, view, SLOT( insertChart() ), ac, "insertChart" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertChart() ), ac, "insertChart" );
actions->insertChartFrame->setToolTip(i18n("Insert a chart."));
actions->insertPicture = new KAction( i18n("&Picture"),
- 0, view, SLOT( insertPicture() ), ac, "insertPicture" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertPicture() ), ac, "insertPicture" );
actions->insertPicture->setToolTip(i18n("Insert a picture."));
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
actions->insertFromDatabase = new KAction( i18n("From &Database..."),
- 0, view, SLOT( insertFromDatabase() ), ac, "insertFromDatabase");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertFromDatabase() ), ac, "insertFromDatabase");
actions->insertFromDatabase->setToolTip(i18n("Insert data from a SQL database."));
#endif
actions->insertFromTextfile = new KAction( i18n("From &Text File..."),
- 0, view, SLOT( insertFromTextfile() ), ac, "insertFromTextfile");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertFromTextfile() ), ac, "insertFromTextfile");
actions->insertFromTextfile->setToolTip(i18n("Insert data from a text file to the current cursor position/selection."));
actions->insertFromClipboard = new KAction( i18n("From &Clipboard..."),
- 0, view, SLOT( insertFromClipboard() ), ac, "insertFromClipboard");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( insertFromClipboard() ), ac, "insertFromClipboard");
actions->insertFromClipboard->setToolTip(i18n("Insert CSV data from the clipboard to the current cursor position/selection."));
// actions->transform = new KAction( i18n("Transform Object..."), "rotate",
-// 0, view, SLOT( transformPart() ), ac, "transform" );
+// 0, TQT_TQOBJECT(view), TQT_SLOT( transformPart() ), ac, "transform" );
// actions->transform->setToolTip(i18n("Rotate the contents of the cell."));
// actions->transform->setEnabled( false );
actions->sort = new KAction( i18n("&Sort..."),
- 0, view, SLOT( sort() ), ac, "sort" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sort() ), ac, "sort" );
actions->sort->setToolTip(i18n("Sort a group of cells."));
actions->sortDec = new KAction( i18n("Sort &Decreasing"), "sort_decrease",
- 0, view, SLOT( sortDec() ), ac, "sortDec" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sortDec() ), ac, "sortDec" );
actions->sortDec->setToolTip(i18n("Sort a group of cells in decreasing (last to first) order."));
actions->sortInc = new KAction( i18n("Sort &Increasing"), "sort_incr",
- 0, view, SLOT( sortInc() ), ac, "sortInc" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sortInc() ), ac, "sortInc" );
actions->sortInc->setToolTip(i18n("Sort a group of cells in ascending (first to last) order."));
actions->paperLayout = new KAction( i18n("Page Layout..."),
- 0, view, SLOT( paperLayoutDlg() ), ac, "paperLayout" );
- actions->paperLayout->setToolTip(i18n("Specify the layout of the spreadsheet for a printout."));
+ 0, TQT_TQOBJECT(view), TQT_SLOT( paperLayoutDlg() ), ac, "paperLayout" );
+ actions->paperLayout->setToolTip(i18n("Specify the tqlayout of the spreadsheet for a printout."));
actions->definePrintRange = new KAction( i18n("Define Print Range"),
- 0, view, SLOT( definePrintRange() ), ac, "definePrintRange" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( definePrintRange() ), ac, "definePrintRange" );
actions->definePrintRange->setToolTip(i18n("Define the print range in the current sheet."));
actions->resetPrintRange = new KAction( i18n("Reset Print Range"),
- 0, view, SLOT( resetPrintRange() ), ac, "resetPrintRange" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( resetPrintRange() ), ac, "resetPrintRange" );
actions->definePrintRange->setToolTip(i18n("Define the print range in the current sheet."));
actions->showPageBorders = new KToggleAction( i18n("Show Page Borders"),
0, ac, "showPageBorders");
actions->showPageBorders->setCheckedState(i18n("Hide Page Borders"));
- QObject::connect( actions->showPageBorders, SIGNAL( toggled( bool ) ),
- view, SLOT( togglePageBorders( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->showPageBorders, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( togglePageBorders( bool ) ) );
actions->showPageBorders->setToolTip( i18n( "Show on the spreadsheet where the page borders will be." ) );
actions->recalcWorksheet = new KAction( i18n("Recalculate Sheet"),
- Qt::SHIFT + Qt::Key_F9, view, SLOT( recalcWorkSheet() ), ac, "RecalcWorkSheet" );
+ TQt::SHIFT + TQt::Key_F9, TQT_TQOBJECT(view), TQT_SLOT( recalcWorkSheet() ), ac, "RecalcWorkSheet" );
actions->recalcWorksheet->setToolTip(i18n("Recalculate the value of every cell in the current worksheet."));
actions->recalcWorkbook = new KAction( i18n("Recalculate Document"),
- Qt::Key_F9, view, SLOT( recalcWorkBook() ), ac, "RecalcWorkBook" );
+ TQt::Key_F9, TQT_TQOBJECT(view), TQT_SLOT( recalcWorkBook() ), ac, "RecalcWorkBook" );
actions->recalcWorkbook->setToolTip(i18n("Recalculate the value of every cell in all worksheets."));
actions->protectSheet = new KToggleAction( i18n( "Protect &Sheet..." ),
0, ac, "protectSheet" );
actions->protectSheet->setToolTip( i18n( "Protect the sheet from being modified." ) );
- QObject::connect( actions->protectSheet, SIGNAL( toggled( bool ) ),
- view, SLOT( toggleProtectSheet( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->protectSheet, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( toggleProtectSheet( bool ) ) );
actions->protectDoc = new KToggleAction( i18n( "Protect &Document..." ),
0, ac, "protectDoc" );
actions->protectDoc->setToolTip( i18n( "Protect the document from being modified." ) );
- QObject::connect( actions->protectDoc, SIGNAL( toggled( bool ) ),
- view, SLOT( toggleProtectDoc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->protectDoc, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( toggleProtectDoc( bool ) ) );
// -- editing actions --
- actions->copy = KStdAction::copy( view, SLOT( copySelection() ), ac, "copy" );
+ actions->copy = KStdAction::copy( TQT_TQOBJECT(view), TQT_SLOT( copySelection() ), ac, "copy" );
actions->copy->setToolTip(i18n("Copy the cell object to the clipboard."));
- actions->paste = KStdAction::paste( view, SLOT( paste() ), ac, "paste" );
+ actions->paste = KStdAction::paste( TQT_TQOBJECT(view), TQT_SLOT( paste() ), ac, "paste" );
actions->paste->setToolTip(i18n("Paste the contents of the clipboard at the cursor."));
- actions->cut = KStdAction::cut( view, SLOT( cutSelection() ), ac, "cut" );
+ actions->cut = KStdAction::cut( TQT_TQOBJECT(view), TQT_SLOT( cutSelection() ), ac, "cut" );
actions->cut->setToolTip(i18n("Move the cell object to the clipboard."));
actions->specialPaste = new KAction( i18n("Special Paste..."), "special_paste",
- 0, view, SLOT( specialPaste() ), ac, "specialPaste" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( specialPaste() ), ac, "specialPaste" );
actions->specialPaste->setToolTip(i18n("Paste the contents of the clipboard with special options."));
actions->insertCellCopy = new KAction( i18n("Paste with Insertion"), "insertcellcopy",
- 0, view, SLOT( slotInsertCellCopy() ), ac, "insertCellCopy" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( slotInsertCellCopy() ), ac, "insertCellCopy" );
actions->insertCellCopy->setToolTip(i18n("Inserts a cell from the clipboard into the spreadsheet."));
- actions->find = KStdAction::find( view, SLOT(find()), ac );
- /*actions->findNext =*/ KStdAction::findNext( view, SLOT( findNext() ), ac );
- /*actions->findPrevious =*/ KStdAction::findPrev( view, SLOT( findPrevious() ), ac );
+ actions->tqfind = KStdAction::find( TQT_TQOBJECT(view), TQT_SLOT(tqfind()), ac );
+ /*actions->findNext =*/ KStdAction::findNext( TQT_TQOBJECT(view), TQT_SLOT( findNext() ), ac );
+ /*actions->findPrevious =*/ KStdAction::findPrev( TQT_TQOBJECT(view), TQT_SLOT( findPrevious() ), ac );
- actions->replace = KStdAction::replace( view, SLOT(replace()), ac );
+ actions->tqreplace = KStdAction::replace( TQT_TQOBJECT(view), TQT_SLOT(tqreplace()), ac );
actions->fillRight = new KAction( i18n( "&Right" ), 0,
- 0, view, SLOT( fillRight() ), ac, "fillRight" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( fillRight() ), ac, "fillRight" );
actions->fillLeft = new KAction( i18n( "&Left" ), 0,
- 0, view, SLOT( fillLeft() ), ac, "fillLeft" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( fillLeft() ), ac, "fillLeft" );
actions->fillDown = new KAction( i18n( "&Down" ), 0,
- 0, view, SLOT( fillDown() ), ac, "fillDown" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( fillDown() ), ac, "fillDown" );
actions->fillUp = new KAction( i18n( "&Up" ), 0,
- 0, view, SLOT( fillUp() ), ac, "fillUp" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( fillUp() ), ac, "fillUp" );
// -- misc actions --
actions->styleDialog = new KAction( i18n( "Style Manager" ),
- 0, view, SLOT( styleDialog() ), ac, "styles" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( styleDialog() ), ac, "styles" );
actions->styleDialog->setToolTip( i18n( "Edit and organize cell styles." ) );
actions->autoSum = new KAction( i18n("Autosum"), "black_sum",
- 0, view, SLOT( autoSum() ), ac, "autoSum" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( autoSum() ), ac, "autoSum" );
actions->autoSum->setToolTip(i18n("Insert the 'sum' function"));
- actions->spellChecking = KStdAction::spelling( view, SLOT( extraSpelling() ),
+ actions->spellChecking = KStdAction::spelling( TQT_TQOBJECT(view), TQT_SLOT( extraSpelling() ),
ac, "spelling" );
actions->spellChecking->setToolTip(i18n("Check the spelling."));
actions->formulaSelection = new KSelectAction(i18n("Formula Selection"),
0, ac, "formulaSelection");
actions->formulaSelection->setToolTip(i18n("Insert a function."));
- QStringList lst;
+ TQStringList lst;
lst.append( "SUM");
lst.append( "AVERAGE");
lst.append( "IF");
@@ -1013,146 +1013,146 @@ void View::Private::initActions()
((KSelectAction*) actions->formulaSelection)->setItems( lst );
actions->formulaSelection->setComboWidth( 80 );
actions->formulaSelection->setCurrentItem(0);
- QObject::connect( actions->formulaSelection, SIGNAL( activated( const QString& ) ),
- view, SLOT( formulaSelection( const QString& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->formulaSelection, TQT_SIGNAL( activated( const TQString& ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( formulaSelection( const TQString& ) ) );
actions->viewZoom = new KoZoomAction( i18n( "Zoom" ), "viewmag", 0, ac, "view_zoom" );
- QObject::connect( actions->viewZoom, SIGNAL( zoomChanged( const QString & ) ),
- view, SLOT( viewZoom( const QString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->viewZoom, TQT_SIGNAL( zoomChanged( const TQString & ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( viewZoom( const TQString & ) ) );
actions->consolidate = new KAction( i18n("&Consolidate..."),
- 0, view, SLOT( consolidate() ), ac, "consolidate" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( consolidate() ), ac, "consolidate" );
actions->consolidate->setToolTip(i18n("Create a region of summary data from a group of similar regions."));
actions->goalSeek = new KAction( i18n("&Goal Seek..."),
- 0, view, SLOT( goalSeek() ), ac, "goalSeek" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( goalSeek() ), ac, "goalSeek" );
actions->goalSeek->setToolTip( i18n("Repeating calculation to find a specific value.") );
actions->subTotals = new KAction( i18n("&Subtotals..."),
- 0, view, SLOT( subtotals() ), ac, "subtotals" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( subtotals() ), ac, "subtotals" );
actions->subTotals->setToolTip( i18n("Create different kind of subtotals to a list or database.") );
actions->textToColumns = new KAction( i18n("&Text to Columns..."),
- 0, view, SLOT( textToColumns() ), ac, "textToColumns" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( textToColumns() ), ac, "textToColumns" );
actions->textToColumns->setToolTip( i18n("Expand the content of cells to multiple columns.") );
actions->multipleOperations = new KAction( i18n("&Multiple Operations..."),
- 0, view, SLOT( multipleOperations() ), ac, "multipleOperations" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( multipleOperations() ), ac, "multipleOperations" );
actions->multipleOperations->setToolTip( i18n("Apply the same formula to various cells using different values for the parameter.") );
actions->createTemplate = new KAction( i18n( "&Create Template From Document..." ),
- 0, view, SLOT( createTemplate() ), ac, "createTemplate" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( createTemplate() ), ac, "createTemplate" );
actions->customList = new KAction( i18n("Custom Lists..."),
- 0, view, SLOT( sortList() ), ac, "sortlist" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( sortList() ), ac, "sortlist" );
actions->customList->setToolTip(i18n("Create custom lists for sorting or autofill."));
// -- navigation actions --
actions->gotoCell = new KAction( i18n("Goto Cell..."),"goto",
- 0, view, SLOT( gotoCell() ), ac, "gotoCell" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( gotoCell() ), ac, "gotoCell" );
actions->gotoCell->setToolTip(i18n("Move to a particular cell."));
actions->nextSheet = new KAction( i18n("Next Sheet"), "forward",
- Qt::CTRL+Qt::Key_PageDown, view, SLOT( nextSheet() ), ac, "nextSheet");
+ TQt::CTRL+TQt::Key_PageDown, TQT_TQOBJECT(view), TQT_SLOT( nextSheet() ), ac, "nextSheet");
actions->nextSheet->setToolTip(i18n("Move to the next sheet."));
actions->prevSheet = new KAction( i18n("Previous Sheet"), "back",
- Qt::CTRL+Qt::Key_PageUp, view, SLOT( previousSheet() ), ac, "previousSheet");
+ TQt::CTRL+TQt::Key_PageUp, TQT_TQOBJECT(view), TQT_SLOT( previousSheet() ), ac, "previousSheet");
actions->prevSheet->setToolTip(i18n("Move to the previous sheet."));
actions->firstSheet = new KAction( i18n("First Sheet"), "start",
- 0, view, SLOT( firstSheet() ), ac, "firstSheet");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( firstSheet() ), ac, "firstSheet");
actions->firstSheet->setToolTip(i18n("Move to the first sheet."));
actions->lastSheet = new KAction( i18n("Last Sheet"), "finish",
- 0, view, SLOT( lastSheet() ), ac, "lastSheet");
+ 0, TQT_TQOBJECT(view), TQT_SLOT( lastSheet() ), ac, "lastSheet");
actions->lastSheet->setToolTip(i18n("Move to the last sheet."));
// -- settings actions --
- actions->showStatusBar = new KToggleAction( i18n("Show Status Bar"),
+ actions->showStatusBar = new KToggleAction( i18n("Show tqStatus Bar"),
0, ac, "showStatusBar" );
- actions->showStatusBar->setCheckedState(i18n("Hide Status Bar"));
- QObject::connect( actions->showStatusBar, SIGNAL( toggled( bool ) ),
- view, SLOT( showStatusBar( bool ) ) );
+ actions->showStatusBar->setCheckedState(i18n("Hide tqStatus Bar"));
+ TQT_BASE_OBJECT_NAME::connect( actions->showStatusBar, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( showStatusBar( bool ) ) );
actions->showStatusBar->setToolTip(i18n("Show the status bar."));
actions->showTabBar = new KToggleAction( i18n("Show Tab Bar"),
0, ac, "showTabBar" );
actions->showTabBar->setCheckedState(i18n("Hide Tab Bar"));
- QObject::connect( actions->showTabBar, SIGNAL( toggled( bool ) ),
- view, SLOT( showTabBar( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->showTabBar, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( showTabBar( bool ) ) );
actions->showTabBar->setToolTip(i18n("Show the tab bar."));
actions->showFormulaBar = new KToggleAction( i18n("Show Formula Bar"),
0, ac, "showFormulaBar" );
actions->showFormulaBar->setCheckedState(i18n("Hide Formula Bar"));
- QObject::connect( actions->showFormulaBar, SIGNAL( toggled( bool ) ),
- view, SLOT( showFormulaBar( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->showFormulaBar, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( showFormulaBar( bool ) ) );
actions->showFormulaBar->setToolTip(i18n("Show the formula bar."));
actions->preference = new KAction( i18n("Configure KSpread..."),"configure",
- 0, view, SLOT( preference() ), ac, "preference" );
+ 0, TQT_TQOBJECT(view), TQT_SLOT( preference() ), ac, "preference" );
actions->preference->setToolTip(i18n("Set various KSpread options."));
// -- running calculation actions --
actions->calcNone = new KToggleAction( i18n("None"), 0, ac, "menu_none");
- QObject::connect( actions->calcNone, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcNone, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcNone->setExclusiveGroup( "Calc" );
actions->calcNone->setToolTip(i18n("No calculation"));
actions->calcSum = new KToggleAction( i18n("Sum"), 0, ac, "menu_sum");
- QObject::connect( actions->calcSum, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcSum, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcSum->setExclusiveGroup( "Calc" );
actions->calcSum->setToolTip(i18n("Calculate using sum."));
actions->calcMin = new KToggleAction( i18n("Min"), 0, ac, "menu_min");
- QObject::connect( actions->calcMin, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcMin, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcMin->setExclusiveGroup( "Calc" );
actions->calcMin->setToolTip(i18n("Calculate using minimum."));
actions->calcMax = new KToggleAction( i18n("Max"), 0, ac, "menu_max");
- QObject::connect( actions->calcMax, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcMax, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcMax->setExclusiveGroup( "Calc" );
actions->calcMax->setToolTip(i18n("Calculate using maximum."));
actions->calcAverage = new KToggleAction( i18n("Average"), 0, ac, "menu_average");
- QObject::connect( actions->calcAverage, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcAverage, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcAverage->setExclusiveGroup( "Calc" );
actions->calcAverage->setToolTip(i18n("Calculate using average."));
actions->calcCount = new KToggleAction( i18n("Count"), 0, ac, "menu_count");
- QObject::connect( actions->calcCount, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcCount, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcCount->setExclusiveGroup( "Calc" );
actions->calcCount->setToolTip(i18n("Calculate using the count."));
actions->calcCountA = new KToggleAction( i18n("CountA"), 0, ac, "menu_counta");
- QObject::connect( actions->calcCountA, SIGNAL( toggled( bool ) ),
- view, SLOT( menuCalc( bool ) ) );
+ TQT_BASE_OBJECT_NAME::connect( actions->calcCountA, TQT_SIGNAL( toggled( bool ) ),
+ TQT_TQOBJECT(view), TQT_SLOT( menuCalc( bool ) ) );
actions->calcCountA->setExclusiveGroup( "Calc" );
actions->calcCountA->setToolTip(i18n("Calculate using the countA."));
// -- special action, only for developers --
actions->internalTests = new KAction( i18n("Run Internal Tests..."), "internalTests",
- Qt::CTRL+ Qt::SHIFT + Qt::Key_T, view, SLOT( runInternalTests() ), ac, "internalTests" );
+ TQt::CTRL+ TQt::SHIFT + TQt::Key_T, TQT_TQOBJECT(view), TQT_SLOT( runInternalTests() ), ac, "internalTests" );
actions->inspector = new KAction( i18n("Run Inspector..."), "inspector",
- Qt::CTRL+ Qt::SHIFT + Qt::Key_I, view, SLOT( runInspector() ), ac, "inspector" );
+ TQt::CTRL+ TQt::SHIFT + TQt::Key_I, TQT_TQOBJECT(view), TQT_SLOT( runInspector() ), ac, "inspector" );
m_propertyEditor = 0;
}
void View::Private::adjustActions( bool mode )
{
- actions->replace->setEnabled( mode );
+ actions->tqreplace->setEnabled( mode );
actions->insertSeries->setEnabled( mode );
actions->insertLink->setEnabled( mode );
actions->insertSpecialChar->setEnabled( mode );
@@ -1342,12 +1342,12 @@ void View::Private::updateButton( Cell *cell, int column, int row)
toolbarLock = true;
// workaround for bug #59291 (crash upon starting from template)
- // certain Qt and Fontconfig combination fail miserably if can not
+ // certain TQt and Fontconfig combination fail miserably if can not
// find the font name (e.g. not installed in the system)
- QStringList fontList;
+ TQStringList fontList;
KFontChooser::getFontList( fontList, 0 );
- QString fontFamily = cell->format()->textFontFamily( column,row );
- for ( QStringList::Iterator it = fontList.begin(); it != fontList.end(); ++it )
+ TQString fontFamily = cell->format()->textFontFamily( column,row );
+ for ( TQStringList::Iterator it = fontList.begin(); it != fontList.end(); ++it )
if ((*it).lower() == fontFamily.lower())
{
actions->selectFont->setFont( fontFamily );
@@ -1387,24 +1387,24 @@ void View::Private::updateButton( Cell *cell, int column, int row)
adjustActions( activeSheet, cell );
}
-QButton* View::Private::newIconButton( const char *_file, bool _kbutton, QWidget *_parent )
+TQButton* View::Private::newIconButton( const char *_file, bool _kbutton, TQWidget *_parent )
{
if ( _parent == 0L )
_parent = view;
if ( !_kbutton ) {
- QPushButton* pb = new QPushButton( _parent );
+ TQPushButton* pb = new TQPushButton( _parent );
pb->setIconSet( SmallIconSet(_file) );
return pb;
} else {
- QToolButton* pb = new QToolButton( _parent );
+ TQToolButton* pb = new TQToolButton( _parent );
pb->setIconSet( SmallIconSet(_file) );
return pb;
}
}
-KPSheetSelectPage::KPSheetSelectPage( QWidget *parent )
-: KPrintDialogPage(parent),
+KPSheetSelectPage::KPSheetSelectPage( TQWidget *tqparent )
+: KPrintDialogPage(tqparent),
gui(new SheetSelectWidget(this))
{
setTitle(gui->caption());
@@ -1414,25 +1414,25 @@ KPSheetSelectPage::KPSheetSelectPage( QWidget *parent )
gui->ListViewSelected->setSorting(-1);
//connect buttons
- connect(gui->ButtonSelectAll,SIGNAL(clicked()),this,SLOT(selectAll()));
- connect(gui->ButtonSelect,SIGNAL(clicked()),this,SLOT(select()));
- connect(gui->ButtonRemove,SIGNAL(clicked()),this,SLOT(remove()));
- connect(gui->ButtonRemoveAll,SIGNAL(clicked()),this,SLOT(removeAll()));
+ connect(gui->ButtonSelectAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(selectAll()));
+ connect(gui->ButtonSelect,TQT_SIGNAL(clicked()),this,TQT_SLOT(select()));
+ connect(gui->ButtonRemove,TQT_SIGNAL(clicked()),this,TQT_SLOT(remove()));
+ connect(gui->ButtonRemoveAll,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeAll()));
- connect(gui->ButtonMoveTop,SIGNAL(clicked()),this,SLOT(moveTop()));
- connect(gui->ButtonMoveUp,SIGNAL(clicked()),this,SLOT(moveUp()));
- connect(gui->ButtonMoveDown,SIGNAL(clicked()),this,SLOT(moveDown()));
- connect(gui->ButtonMoveBottom,SIGNAL(clicked()),this,SLOT(moveBottom()));
+ connect(gui->ButtonMoveTop,TQT_SIGNAL(clicked()),this,TQT_SLOT(moveTop()));
+ connect(gui->ButtonMoveUp,TQT_SIGNAL(clicked()),this,TQT_SLOT(moveUp()));
+ connect(gui->ButtonMoveDown,TQT_SIGNAL(clicked()),this,TQT_SLOT(moveDown()));
+ connect(gui->ButtonMoveBottom,TQT_SIGNAL(clicked()),this,TQT_SLOT(moveBottom()));
}
// KPSheetSelectPage::~KPSheetSelectPage()
// {
// }
-void KPSheetSelectPage::getOptions( QMap<QString,QString>& opts, bool /*incldef*/ )
+void KPSheetSelectPage::getOptions( TQMap<TQString,TQString>& opts, bool /*incldef*/ )
{
- QStringList sheetlist = this->selectedSheets();
- QStringList::iterator it;
+ TQStringList sheetlist = this->selectedSheets();
+ TQStringList::iterator it;
unsigned int i = 0;
for (it = sheetlist.begin(); it != sheetlist.end(); ++it, i++)
{
@@ -1440,16 +1440,16 @@ void KPSheetSelectPage::getOptions( QMap<QString,QString>& opts, bool /*incldef*
}
}
-void KPSheetSelectPage::setOptions( const QMap<QString,QString>& opts )
+void KPSheetSelectPage::setOptions( const TQMap<TQString,TQString>& opts )
{
unsigned int i = 0;
- QStringList sheetlist;
- while (opts.contains(printOptionForIndex(i)))
+ TQStringList sheetlist;
+ while (opts.tqcontains(printOptionForIndex(i)))
{
sheetlist.prepend(opts[printOptionForIndex(i++)]);
}
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = sheetlist.begin(); it != sheetlist.end(); ++it)
{
kdDebug() << " adding sheet to list of printed sheets: " << *it << endl;
@@ -1457,7 +1457,7 @@ void KPSheetSelectPage::setOptions( const QMap<QString,QString>& opts )
}
}
-bool KPSheetSelectPage::isValid(QString& /*msg*/)
+bool KPSheetSelectPage::isValid(TQString& /*msg*/)
{
// we print the activeSheet() by default if no sheet is selected,
// so we return true in any case
@@ -1471,28 +1471,28 @@ bool KPSheetSelectPage::isValid(QString& /*msg*/)
return true;
}
-QString KPSheetSelectPage::printOptionForIndex(unsigned int index)
+TQString KPSheetSelectPage::printOptionForIndex(unsigned int index)
{
- return QString("sheetprintorder%1").arg(index);
+ return TQString("sheetprintorder%1").tqarg(index);
}
-void KPSheetSelectPage::prependAvailableSheet(const QString& sheetname)
+void KPSheetSelectPage::prependAvailableSheet(const TQString& sheetname)
{
Q_ASSERT(gui);
- new QListViewItem(gui->ListViewAvailable,sheetname);
+ new TQListViewItem(gui->ListViewAvailable,sheetname);
}
-void KPSheetSelectPage::prependSelectedSheet(const QString& sheetname)
+void KPSheetSelectPage::prependSelectedSheet(const TQString& sheetname)
{
Q_ASSERT(gui);
- new QListViewItem(gui->ListViewSelected,sheetname);
+ new TQListViewItem(gui->ListViewSelected,sheetname);
}
-QStringList KPSheetSelectPage::selectedSheets()
+TQStringList KPSheetSelectPage::selectedSheets()
{
Q_ASSERT(gui);
- QStringList list;
- QListViewItem* item = gui->ListViewSelected->firstChild();
+ TQStringList list;
+ TQListViewItem* item = gui->ListViewSelected->firstChild();
while (item)
{
list.append(item->text(0));
@@ -1501,12 +1501,12 @@ QStringList KPSheetSelectPage::selectedSheets()
return list;
}
-QStringList KPSheetSelectPage::selectedSheets(KPrinter &prt)
+TQStringList KPSheetSelectPage::selectedSheets(KPrinter &prt)
{
- QStringList list;
+ TQStringList list;
unsigned int index;
- const QMap<QString,QString>& options = prt.options();
- for (index = 0; options.contains(KPSheetSelectPage::printOptionForIndex(index)); index++)
+ const TQMap<TQString,TQString>& options = prt.options();
+ for (index = 0; options.tqcontains(KPSheetSelectPage::printOptionForIndex(index)); index++)
{
list.append(options[KPSheetSelectPage::printOptionForIndex(index)]);
}
@@ -1522,14 +1522,14 @@ void KPSheetSelectPage::selectAll()
{
//we have to add all the stuff in reverse order
// because inserted items (prependSelectedSheet) are prepended
- QStringList list;
- QListViewItem* item = gui->ListViewAvailable->firstChild();
+ TQStringList list;
+ TQListViewItem* item = gui->ListViewAvailable->firstChild();
while (item)
{
list.prepend(item->text(0));
item = item->nextSibling();
}
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = list.begin(); it != list.end(); ++it)
{
this->prependSelectedSheet(*it);
@@ -1540,15 +1540,15 @@ void KPSheetSelectPage::select()
{
//we have to add all the stuff in reverse order
// because inserted items (prependSelectedSheet) are prepended
- QStringList list;
- QListViewItem* item = gui->ListViewAvailable->firstChild();
+ TQStringList list;
+ TQListViewItem* item = gui->ListViewAvailable->firstChild();
while (item)
{
if (item->isSelected())
list.prepend(item->text(0));
item = item->nextSibling();
}
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = list.begin(); it != list.end(); ++it)
{
this->prependSelectedSheet(*it);
@@ -1557,8 +1557,8 @@ void KPSheetSelectPage::select()
void KPSheetSelectPage::remove()
{
- QListViewItem* item = gui->ListViewSelected->firstChild();
- QListViewItem* nextitem = NULL;
+ TQListViewItem* item = gui->ListViewSelected->firstChild();
+ TQListViewItem* nextitem = NULL;
while (item)
{
nextitem = item->nextSibling();
@@ -1579,9 +1579,9 @@ void KPSheetSelectPage::moveTop()
//this creates a temporary new list (selected first, then rest)
// which replaces the existing one, to avoid the need of an additional sort column
- QValueList<QListViewItem*> newlist;
- QListViewItem* item = gui->ListViewSelected->firstChild();
- QListViewItem* nextitem = NULL;
+ TQValueList<TQListViewItem*> newlist;
+ TQListViewItem* item = gui->ListViewSelected->firstChild();
+ TQListViewItem* nextitem = NULL;
// kdDebug() << "Filling new list with selected items first" << endl;
while (item)
{
@@ -1609,7 +1609,7 @@ void KPSheetSelectPage::moveTop()
// kdDebug() << "Refill the view with the correctly ordered list" << endl;
//the view is empty now, refill in correct order (reversed!!)
- QValueList<QListViewItem*>::iterator it;
+ TQValueList<TQListViewItem*>::iterator it;
for (it = newlist.begin(); it != newlist.end(); ++it)
{
// kdDebug() << " adding " << (*it)->text(0) << endl;
@@ -1622,9 +1622,9 @@ void KPSheetSelectPage::moveUp()
//this creates a temporary new list
// which replaces the existing one, to avoid the need of an additional sort column
- QValueList<QListViewItem*> newlist;
- QListViewItem* item = gui->ListViewSelected->firstChild();
- QListViewItem* nextitem = NULL;
+ TQValueList<TQListViewItem*> newlist;
+ TQListViewItem* item = gui->ListViewSelected->firstChild();
+ TQListViewItem* nextitem = NULL;
while (item)
{
nextitem = item->nextSibling();
@@ -1632,7 +1632,7 @@ void KPSheetSelectPage::moveUp()
{
while (nextitem && nextitem->isSelected())
{
- QListViewItem* nextnextitem = nextitem->nextSibling();
+ TQListViewItem* nextnextitem = nextitem->nextSibling();
newlist.prepend(nextitem);
gui->ListViewSelected->takeItem(nextitem);
nextitem = nextnextitem;
@@ -1646,7 +1646,7 @@ void KPSheetSelectPage::moveUp()
// kdDebug() << "Refill the view with the correctly ordered list" << endl;
//the view is empty now, refill in correct order (reversed!!)
- QValueList<QListViewItem*>::iterator it;
+ TQValueList<TQListViewItem*>::iterator it;
for (it = newlist.begin(); it != newlist.end(); ++it)
{
// kdDebug() << " adding " << (*it)->text(0) << endl;
@@ -1656,7 +1656,7 @@ void KPSheetSelectPage::moveUp()
void KPSheetSelectPage::moveDown()
{
- QListViewItem* item = gui->ListViewSelected->lastItem();
+ TQListViewItem* item = gui->ListViewSelected->lastItem();
// while (item)
// {
// nextitem = item->nextSibling();
@@ -1671,7 +1671,7 @@ void KPSheetSelectPage::moveDown()
{
while (item && !item->isSelected() && item->itemAbove() && item->itemAbove()->isSelected())
{
- QListViewItem* tempitem = item->itemAbove();
+ TQListViewItem* tempitem = item->itemAbove();
tempitem->moveItem(item);
}
if (item)
@@ -1684,9 +1684,9 @@ void KPSheetSelectPage::moveBottom()
//this creates a temporary new list (unselected first, then rest)
// which replaces the existing one, to avoid the need of an additional sort column
- QValueList<QListViewItem*> newlist;
- QListViewItem* item = gui->ListViewSelected->firstChild();
- QListViewItem* nextitem = NULL;
+ TQValueList<TQListViewItem*> newlist;
+ TQListViewItem* item = gui->ListViewSelected->firstChild();
+ TQListViewItem* nextitem = NULL;
// kdDebug() << "Filling new list with unselected items first" << endl;
while (item)
{
@@ -1714,7 +1714,7 @@ void KPSheetSelectPage::moveBottom()
// kdDebug() << "Refill the view with the correctly ordered list" << endl;
//the view is empty now, refill in correct order (reversed!!)
- QValueList<QListViewItem*>::iterator it;
+ TQValueList<TQListViewItem*>::iterator it;
for (it = newlist.begin(); it != newlist.end(); ++it)
{
// kdDebug() << " adding " << (*it)->text(0) << endl;
@@ -1729,7 +1729,7 @@ void KPSheetSelectPage::moveBottom()
*
*****************************************************************************/
-View::View( QWidget *_parent, const char *_name,
+View::View( TQWidget *_parent, const char *_name,
Doc *_doc )
: KoView( _doc, _parent, _name )
{
@@ -1750,17 +1750,17 @@ View::View( QWidget *_parent, const char *_name,
d->selection = new Selection( this );
d->choice = new Selection( this );
d->choice->setMultipleSelection(true);
- connect(d->selection, SIGNAL(changed(const Region&)), this, SLOT(slotChangeSelection(const Region&)));
- connect(d->choice, SIGNAL(changed(const Region&)), this, SLOT(slotChangeChoice(const Region&)));
- connect(d->choice, SIGNAL(changed(const Region&)), this, SLOT(slotScrollChoice(const Region&)));
+ connect(d->selection, TQT_SIGNAL(changed(const Region&)), this, TQT_SLOT(slotChangeSelection(const Region&)));
+ connect(d->choice, TQT_SIGNAL(changed(const Region&)), this, TQT_SLOT(slotChangeChoice(const Region&)));
+ connect(d->choice, TQT_SIGNAL(changed(const Region&)), this, TQT_SLOT(slotScrollChoice(const Region&)));
d->findOptions = 0;
d->findLeftColumn = 0;
d->findRightColumn = 0;
d->typeValue = FindOption::Value;
d->directionValue = FindOption::Row;
- d->find = 0;
- d->replace = 0;
+ d->tqfind = 0;
+ d->tqreplace = 0;
d->popupMenuFirstToolId = 0;
d->popupMenu = 0;
@@ -1797,8 +1797,8 @@ View::View( QWidget *_parent, const char *_name,
// build the DCOP object
dcopObject();
- connect( doc()->commandHistory(), SIGNAL( commandExecuted() ),
- this, SLOT( commandExecuted() ) );
+ connect( doc()->commandHistory(), TQT_SIGNAL( commandExecuted() ),
+ this, TQT_SLOT( commandExecuted() ) );
// GUI Initializations
initView();
@@ -1808,33 +1808,33 @@ View::View( QWidget *_parent, const char *_name,
// Handler for moving and resizing embedded parts
KoContainerHandler* h = new KoContainerHandler( this, d->canvas );
- connect( h, SIGNAL( popupMenu( KoChild*, const QPoint& ) ), this, SLOT( popupChildMenu( KoChild*, const QPoint& ) ) );
+ connect( h, TQT_SIGNAL( popupMenu( KoChild*, const TQPoint& ) ), this, TQT_SLOT( popupChildMenu( KoChild*, const TQPoint& ) ) );
- connect( this, SIGNAL( childSelected( KoDocumentChild* ) ),
- this, SLOT( slotChildSelected( KoDocumentChild* ) ) );
- connect( this, SIGNAL( childUnselected( KoDocumentChild* ) ),
- this, SLOT( slotChildUnselected( KoDocumentChild* ) ) );
+ connect( this, TQT_SIGNAL( childSelected( KoDocumentChild* ) ),
+ this, TQT_SLOT( slotChildSelected( KoDocumentChild* ) ) );
+ connect( this, TQT_SIGNAL( childUnselected( KoDocumentChild* ) ),
+ this, TQT_SLOT( slotChildUnselected( KoDocumentChild* ) ) );
// If a selected part becomes active this is like it is deselected
// just before.
- connect( this, SIGNAL( childActivated( KoDocumentChild* ) ),
- this, SLOT( slotChildUnselected( KoDocumentChild* ) ) );
+ connect( this, TQT_SIGNAL( childActivated( KoDocumentChild* ) ),
+ this, TQT_SLOT( slotChildUnselected( KoDocumentChild* ) ) );
- connect( d->canvas, SIGNAL( objectSelectedChanged() ),
- this, SLOT( objectSelectedChanged() ) );
+ connect( d->canvas, TQT_SIGNAL( objectSelectedChanged() ),
+ this, TQT_SLOT( objectSelectedChanged() ) );
- QObject::connect( doc()->map(), SIGNAL( sig_addSheet( Sheet* ) ), SLOT( slotAddSheet( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( doc()->map(), TQT_SIGNAL( sig_addSheet( Sheet* ) ), TQT_SLOT( slotAddSheet( Sheet* ) ) );
- QObject::connect( doc(), SIGNAL( sig_refreshView( ) ), this, SLOT( slotRefreshView() ) );
+ TQT_BASE_OBJECT_NAME::connect( doc(), TQT_SIGNAL( sig_refreshView( ) ), this, TQT_SLOT( slotRefreshView() ) );
- QObject::connect( doc(), SIGNAL( sig_refreshLocale() ), this, SLOT( refreshLocale()));
+ TQT_BASE_OBJECT_NAME::connect( doc(), TQT_SIGNAL( sig_refreshLocale() ), this, TQT_SLOT( refreshLocale()));
- QObject::connect( doc(), SIGNAL( sig_addAreaName( const QString & ) ), d->posWidget, SLOT( slotAddAreaName( const QString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( doc(), TQT_SIGNAL( sig_addAreaName( const TQString & ) ), d->posWidget, TQT_SLOT( slotAddAreaName( const TQString & ) ) );
- QObject::connect( doc(), SIGNAL( sig_removeAreaName( const QString & ) ), d->posWidget, SLOT( slotRemoveAreaName( const QString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( doc(), TQT_SIGNAL( sig_removeAreaName( const TQString & ) ), d->posWidget, TQT_SLOT( slotRemoveAreaName( const TQString & ) ) );
- QObject::connect( doc(), SIGNAL( damagesFlushed( const QValueList<Damage*>& ) ),
- this, SLOT( handleDamages( const QValueList<Damage*>& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( doc(), TQT_SIGNAL( damagesFlushed( const TQValueList<Damage*>& ) ),
+ this, TQT_SLOT( handleDamages( const TQValueList<Damage*>& ) ) );
//KoView::setZoom( doc()->zoomedResolutionY() /* KoView only supports one zoom */ ); // initial value
//when kspread is embedded into konqueror apply a zoom=100
@@ -1844,7 +1844,7 @@ View::View( QWidget *_parent, const char *_name,
setZoom( 100, true );
}
- viewZoom( QString::number( doc()->zoom() ) );
+ viewZoom( TQString::number( doc()->zoom() ) );
// ## Might be wrong, if doc isn't loaded yet
d->actions->selectStyle->setItems( d->doc->styleManager()->styleNames() );
@@ -1855,9 +1855,9 @@ View::View( QWidget *_parent, const char *_name,
// This is the last operation for the "View loading" process.
// The loading flag will be unset at its end.
if ( !doc()->map()->sheetList().isEmpty() )
- QTimer::singleShot(50, this, SLOT(initialPosition()));
+ TQTimer::singleShot(50, this, TQT_SLOT(initialPosition()));
- connect (&d->statusBarOpTimer, SIGNAL(timeout()), this, SLOT(calcStatusBarOp()));
+ connect (&d->statusBarOpTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(calcStatusBarOp()));
}
View::~View()
@@ -1869,7 +1869,7 @@ View::~View()
delete (&*d->transformToolBox);
/*if (d->calcLabel)
{
- disconnect(d->calcLabel,SIGNAL(pressed( int )),this,SLOT(statusBarClicked(int)));
+ disconnect(d->calcLabel,TQT_SIGNAL(pressed( int )),this,TQT_SLOT(statusBarClicked(int)));
}*/
@@ -1877,10 +1877,10 @@ View::~View()
d->canvas->endChoose();
d->activeSheet = 0; // set the active sheet to 0L so that when during destruction
- // of embedded child documents possible repaints in Sheet are not
+ // of embedded child documents possible tqrepaints in Sheet are not
// performed. The repains can happen if you delete an embedded document,
// which leads to an regionInvalidated() signal emission in KoView, which calls
- // repaint, etc.etc. :-) (Simon)
+ // tqrepaint, etc.etc. :-) (Simon)
delete d->selection;
delete d->choice;
@@ -1898,7 +1898,7 @@ View::~View()
delete d->actions;
// NOTE Stefan: Delete the Canvas explicitly, even if it has this view as
- // parent. Otherwise, it leads to crashes, because it tries to
+ // tqparent. Otherwise, it leads to crashes, because it tries to
// access this View in some events (Bug #126492).
delete d->canvas;
delete d;
@@ -1921,20 +1921,20 @@ Doc* View::doc() const
void View::initView()
{
- d->viewLayout = new QGridLayout( this, 3, 4 );
+ d->viewLayout = new TQGridLayout( this, 3, 4 );
// Vert. Scroll Bar
d->calcLabel = 0;
- d->vertScrollBar = new QScrollBar( this, "ScrollBar_2" );
+ d->vertScrollBar = new TQScrollBar( this, "ScrollBar_2" );
d->vertScrollBar->setRange( 0, 4096 );
- d->vertScrollBar->setOrientation( QScrollBar::Vertical );
+ d->vertScrollBar->setOrientation( Qt::Vertical );
d->vertScrollBar->setLineStep(60); //just random guess based on what feels okay
d->vertScrollBar->setPageStep(60); //This should be controlled dynamically, depending on how many rows are shown
// Edit Bar
- d->toolWidget = new QFrame( this );
+ d->toolWidget = new TQFrame( this );
- d->formulaBarLayout = new QHBoxLayout( d->toolWidget );
+ d->formulaBarLayout = new TQHBoxLayout( d->toolWidget );
d->formulaBarLayout->setMargin( 4 );
d->formulaBarLayout->addSpacing( 2 );
@@ -1946,7 +1946,7 @@ void View::initView()
d->formulaButton = d->newIconButton( "funct", true, d->toolWidget );
d->formulaBarLayout->addWidget( d->formulaButton );
d->formulaBarLayout->addSpacing( 2 );
- connect( d->formulaButton, SIGNAL( clicked() ), SLOT( insertMathExpr() ) );
+ connect( d->formulaButton, TQT_SIGNAL( clicked() ), TQT_SLOT( insertMathExpr() ) );
d->cancelButton = d->newIconButton( "cancel", true, d->toolWidget );
d->formulaBarLayout->addWidget( d->cancelButton );
@@ -1960,7 +1960,7 @@ void View::initView()
// The line-editor that appears above the sheet and allows to
// edit the cells content. It knows about the two buttons.
d->editWidget = new EditWidget( d->toolWidget, d->canvas, d->cancelButton, d->okButton );
- d->editWidget->setFocusPolicy( QWidget::StrongFocus );
+ d->editWidget->setFocusPolicy( TQ_StrongFocus );
d->formulaBarLayout->addWidget( d->editWidget, 2 );
d->formulaBarLayout->addSpacing( 2 );
@@ -1968,34 +1968,34 @@ void View::initView()
d->hBorderWidget = new HBorder( this, d->canvas,this );
d->vBorderWidget = new VBorder( this, d->canvas ,this );
- d->hBorderWidget->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Minimum );
- d->vBorderWidget->setSizePolicy( QSizePolicy::Minimum, QSizePolicy::Expanding );
+ d->hBorderWidget->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ d->vBorderWidget->tqsetSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding );
- d->canvas->setFocusPolicy( QWidget::StrongFocus );
- QWidget::setFocusPolicy( QWidget::StrongFocus );
+ d->canvas->setFocusPolicy( TQ_StrongFocus );
+ TQWidget::setFocusPolicy( TQ_StrongFocus );
setFocusProxy( d->canvas );
- connect( this, SIGNAL( invalidated() ), d->canvas, SLOT( update() ) );
+ connect( this, TQT_SIGNAL( tqinvalidated() ), d->canvas, TQT_SLOT( update() ) );
- QWidget* bottomPart = new QWidget( this );
- d->tabScrollBarLayout = new QHBoxLayout( bottomPart );
+ TQWidget* bottomPart = new TQWidget( this );
+ d->tabScrollBarLayout = new TQHBoxLayout( bottomPart );
d->tabScrollBarLayout->setAutoAdd( true );
d->tabBar = new KoTabBar( bottomPart );
- d->horzScrollBar = new QScrollBar( bottomPart, "ScrollBar_1" );
+ d->horzScrollBar = new TQScrollBar( bottomPart, "ScrollBar_1" );
d->horzScrollBar->setRange( 0, 4096 );
- d->horzScrollBar->setOrientation( QScrollBar::Horizontal );
+ d->horzScrollBar->setOrientation( Qt::Horizontal );
d->horzScrollBar->setLineStep(60); //just random guess based on what feels okay
d->horzScrollBar->setPageStep(60);
- QObject::connect( d->tabBar, SIGNAL( tabChanged( const QString& ) ), this, SLOT( changeSheet( const QString& ) ) );
- QObject::connect( d->tabBar, SIGNAL( tabMoved( unsigned, unsigned ) ),
- this, SLOT( moveSheet( unsigned, unsigned ) ) );
- QObject::connect( d->tabBar, SIGNAL( contextMenu( const QPoint& ) ),
- this, SLOT( popupTabBarMenu( const QPoint& ) ) );
- QObject::connect( d->tabBar, SIGNAL( doubleClicked() ),
- this, SLOT( slotRename() ) );
+ TQT_BASE_OBJECT_NAME::connect( d->tabBar, TQT_SIGNAL( tabChanged( const TQString& ) ), this, TQT_SLOT( changeSheet( const TQString& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->tabBar, TQT_SIGNAL( tabMoved( unsigned, unsigned ) ),
+ this, TQT_SLOT( moveSheet( unsigned, unsigned ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->tabBar, TQT_SIGNAL( contextMenu( const TQPoint& ) ),
+ this, TQT_SLOT( popupTabBarMenu( const TQPoint& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->tabBar, TQT_SIGNAL( doubleClicked() ),
+ this, TQT_SLOT( slotRename() ) );
d->viewLayout->setColStretch( 1, 10 );
d->viewLayout->setRowStretch( 2, 10 );
@@ -2008,14 +2008,14 @@ void View::initView()
KStatusBar * sb = statusBar();
Q_ASSERT(sb);
- d->calcLabel = sb ? new KStatusBarLabel( QString::null, 0, sb ) : 0;
+ d->calcLabel = sb ? new KStatusBarLabel( TQString(), 0, sb ) : 0;
addStatusBarItem( d->calcLabel, 0 );
if (d->calcLabel)
- connect(d->calcLabel ,SIGNAL(itemPressed( int )),this,SLOT(statusBarClicked(int)));
+ connect(d->calcLabel ,TQT_SIGNAL(itemPressed( int )),this,TQT_SLOT(statusBarClicked(int)));
// signal slot
- QObject::connect( d->vertScrollBar, SIGNAL( valueChanged(int) ), d->canvas, SLOT( slotScrollVert(int) ) );
- QObject::connect( d->horzScrollBar, SIGNAL( valueChanged(int) ), d->canvas, SLOT( slotScrollHorz(int) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->vertScrollBar, TQT_SIGNAL( valueChanged(int) ), d->canvas, TQT_SLOT( slotScrollVert(int) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->horzScrollBar, TQT_SIGNAL( valueChanged(int) ), d->canvas, TQT_SLOT( slotScrollHorz(int) ) );
}
@@ -2034,12 +2034,12 @@ VBorder* View::vBorderWidget()const
return d->vBorderWidget;
}
-QScrollBar* View::horzScrollBar()const
+TQScrollBar* View::horzScrollBar()const
{
return d->horzScrollBar;
}
-QScrollBar* View::vertScrollBar()const
+TQScrollBar* View::vertScrollBar()const
{
return d->vertScrollBar;
}
@@ -2120,7 +2120,7 @@ void View::initConfig()
doc()->setShowMessageError(config->readBoolEntry( "Msg error" ,false) );
doc()->setShowFormulaBar(config->readBoolEntry("Formula bar",true));
- doc()->setShowStatusBar(config->readBoolEntry("Status bar",true));
+ doc()->setShowStatusBar(config->readBoolEntry("tqStatus bar",true));
changeNbOfRecentFiles(config->readNumEntry("NbRecentFile",10));
//autosave value is stored as a minute.
@@ -2132,11 +2132,11 @@ void View::initConfig()
if ( config->hasGroup("KSpread Color" ) )
{
config->setGroup( "KSpread Color" );
- QColor _col(Qt::lightGray);
+ TQColor _col(TQt::lightGray);
_col = config->readColorEntry("GridColor", &_col);
doc()->setGridColor(_col);
- QColor _pbCol(Qt::red);
+ TQColor _pbCol(TQt::red);
_pbCol = config->readColorEntry("PageBorderColor", &_pbCol);
doc()->changePageBorderColor(_pbCol);
}
@@ -2150,7 +2150,7 @@ if ( config->hasGroup("KSpread Page Layout" ) )
{
d->activeSheet->setPaperFormat((KoFormat)config->readNumEntry("Default size page",1));
- d->activeSheet->setPaperOrientation((KoOrientation)config->readNumEntry("Default orientation page",0));
+ d->activeSheet->setPaperQt::Orientation((KoOrientation)config->readNumEntry("Default orientation page",0));
d->activeSheet->setPaperUnit((KoUnit::Unit)config->readNumEntry("Default unit page",0));
}
}
@@ -2258,7 +2258,7 @@ void View::extraSpelling()
d->spell.firstSpellSheet = d->activeSheet;
d->spell.currentSpellSheet = d->spell.firstSpellSheet;
- QRect selection = d->selection->selection();
+ TQRect selection = d->selection->selection();
// if nothing is selected, check every cell
if (d->selection->isSingular())
@@ -2296,44 +2296,44 @@ void View::startKSpell()
doc()->getKSpellConfig()->setReplaceAllList( d->spell.replaceAll );
}
- d->spell.kspell = new KSpell( this, i18n( "Spell Checking" ), this,
- SLOT( spellCheckerReady() ),
+ d->spell.kspell = new KSpell( this, i18n( "Spell Checking" ), TQT_TQOBJECT(this),
+ TQT_SLOT( spellCheckerReady() ),
doc()->getKSpellConfig() );
d->spell.kspell->setIgnoreUpperWords( doc()->dontCheckUpperWord() );
d->spell.kspell->setIgnoreTitleCase( doc()->dontCheckTitleCase() );
- QObject::connect( d->spell.kspell, SIGNAL( death() ),
- this, SLOT( spellCheckerFinished() ) );
- QObject::connect( d->spell.kspell, SIGNAL( misspelling( const QString &,
- const QStringList &,
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( death() ),
+ this, TQT_SLOT( spellCheckerFinished() ) );
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( misspelling( const TQString &,
+ const TQStringList &,
unsigned int) ),
- this, SLOT( spellCheckerMisspelling( const QString &,
- const QStringList &,
+ this, TQT_SLOT( spellCheckerMisspelling( const TQString &,
+ const TQStringList &,
unsigned int) ) );
- QObject::connect( d->spell.kspell, SIGNAL( corrected( const QString &,
- const QString &,
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( corrected( const TQString &,
+ const TQString &,
unsigned int) ),
- this, SLOT( spellCheckerCorrected( const QString &,
- const QString &,
+ this, TQT_SLOT( spellCheckerCorrected( const TQString &,
+ const TQString &,
unsigned int ) ) );
- QObject::connect( d->spell.kspell, SIGNAL( done( const QString & ) ),
- this, SLOT( spellCheckerDone( const QString & ) ) );
- QObject::connect( d->spell.kspell, SIGNAL( ignoreall (const QString & ) ),
- this, SLOT( spellCheckerIgnoreAll( const QString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( done( const TQString & ) ),
+ this, TQT_SLOT( spellCheckerDone( const TQString & ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( ignoreall (const TQString & ) ),
+ this, TQT_SLOT( spellCheckerIgnoreAll( const TQString & ) ) );
- QObject::connect( d->spell.kspell, SIGNAL( replaceall( const QString & , const QString & )), this, SLOT( spellCheckerReplaceAll( const QString & , const QString & )));
+ TQT_BASE_OBJECT_NAME::connect( d->spell.kspell, TQT_SIGNAL( replaceall( const TQString & , const TQString & )), this, TQT_SLOT( spellCheckerReplaceAll( const TQString & , const TQString & )));
}
-void View::spellCheckerReplaceAll( const QString &orig, const QString & replacement)
+void View::spellCheckerReplaceAll( const TQString &orig, const TQString & replacement)
{
d->spell.replaceAll.append( orig);
d->spell.replaceAll.append( replacement);
}
-void View::spellCheckerIgnoreAll( const QString & word)
+void View::spellCheckerIgnoreAll( const TQString & word)
{
doc()->addIgnoreWordAll( word );
}
@@ -2450,9 +2450,9 @@ bool View::spellSwitchToOtherSheet()
return false;
// for optimization
- QPtrList<Sheet> sheetList = doc()->map()->sheetList();
+ TQPtrList<Sheet> sheetList = doc()->map()->sheetList();
- unsigned int curIndex = sheetList.findRef(d->spell.currentSpellSheet);
+ unsigned int curIndex = sheetList.tqfindRef(d->spell.currentSpellSheet);
++curIndex;
// last sheet? then start at the beginning
@@ -2492,8 +2492,8 @@ bool View::spellSwitchToOtherSheet()
}
-void View::spellCheckerMisspelling( const QString &,
- const QStringList &,
+void View::spellCheckerMisspelling( const TQString &,
+ const TQStringList &,
unsigned int )
{
// scroll to the cell
@@ -2503,11 +2503,11 @@ void View::spellCheckerMisspelling( const QString &,
d->spell.spellCurrCellY = d->spell.currentCell->row();
}
- d->selection->initialize(QPoint(d->spell.spellCurrCellX, d->spell.spellCurrCellY));
+ d->selection->initialize(TQPoint(d->spell.spellCurrCellX, d->spell.spellCurrCellY));
}
-void View::spellCheckerCorrected( const QString & old, const QString & corr,
+void View::spellCheckerCorrected( const TQString & old, const TQString & corr,
unsigned int pos )
{
Cell * cell;
@@ -2529,14 +2529,14 @@ void View::spellCheckerCorrected( const QString & old, const QString & corr,
return;
doc()->emitBeginOperation(false);
- QString content( cell->text() );
+ TQString content( cell->text() );
UndoSetText* undo = new UndoSetText( doc(), d->activeSheet,
content,
d->spell.spellCurrCellX,
d->spell.spellCurrCellY,
cell->formatType());
- content.replace( pos, old.length(), corr );
+ content.tqreplace( pos, old.length(), corr );
cell->setCellText( content );
d->editWidget->setText( content );
@@ -2546,7 +2546,7 @@ void View::spellCheckerCorrected( const QString & old, const QString & corr,
doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
}
-void View::spellCheckerDone( const QString & )
+void View::spellCheckerDone( const TQString & )
{
int result = d->spell.kspell->dlgResult();
@@ -2628,7 +2628,7 @@ void View::spellCheckerFinished()
void View::initialPosition()
{
// Loading completed, pick initial worksheet
- QPtrListIterator<Sheet> it( doc()->map()->sheetList() );
+ TQPtrListIterator<Sheet> it( doc()->map()->sheetList() );
for( ; it.current(); ++it )
addSheet( it.current() );
@@ -2660,7 +2660,7 @@ void View::initialPosition()
if ( tbl )
{
tbl->setHidden( false );
- QString tabName = tbl->sheetName();
+ TQString tabName = tbl->sheetName();
d->tabBar->addTab( tabName );
}
}
@@ -2686,7 +2686,7 @@ void View::initialPosition()
d->canvas->setYOffset( offsetY );
d->horzScrollBar->setValue( (int)offsetX );
d->vertScrollBar->setValue( (int)offsetY );
- d->selection->initialize( QPoint(col, row) );
+ d->selection->initialize( TQPoint(col, row) );
}
updateBorderButton();
@@ -2707,7 +2707,7 @@ void View::initialPosition()
// make paint effective:
doc()->decreaseNumOperation();
- QRect vr( activeSheet()->visibleRect( d->canvas ) );
+ TQRect vr( activeSheet()->visibleRect( d->canvas ) );
doc()->emitBeginOperation( false );
activeSheet()->setRegionPaintDirty( vr );
@@ -2818,9 +2818,9 @@ void View::updateReadWrite( bool readwrite )
// d->okButton->setEnabled( readwrite );
d->editWidget->setEnabled( readwrite );
- QValueList<KAction*> actions = actionCollection()->actions();
- QValueList<KAction*>::ConstIterator aIt = actions.begin();
- QValueList<KAction*>::ConstIterator aEnd = actions.end();
+ TQValueList<KAction*> actions = actionCollection()->actions();
+ TQValueList<KAction*>::ConstIterator aIt = actions.begin();
+ TQValueList<KAction*>::ConstIterator aEnd = actions.end();
for (; aIt != aEnd; ++aIt )
(*aIt)->setEnabled( readwrite );
@@ -2838,8 +2838,8 @@ void View::updateReadWrite( bool readwrite )
d->actions->gotoCell->setEnabled( true );
d->actions->viewZoom->setEnabled( true );
d->actions->showPageBorders->setEnabled( true );
- d->actions->find->setEnabled( true);
- d->actions->replace->setEnabled( readwrite );
+ d->actions->tqfind->setEnabled( true);
+ d->actions->tqreplace->setEnabled( readwrite );
if ( !doc()->isReadWrite())
d->actions->copy->setEnabled( true );
// d->actions->newView->setEnabled( true );
@@ -2850,9 +2850,9 @@ void View::createTemplate()
{
int width = 60;
int height = 60;
- QPixmap pix = doc()->generatePreview(QSize(width, height));
+ TQPixmap pix = doc()->generatePreview(TQSize(width, height));
- KTempFile tempFile( QString::null, ".kst" );
+ KTempFile tempFile( TQString(), ".kst" );
//Check that creation of temp file was successful
if (tempFile.status() != 0)
{
@@ -2893,7 +2893,7 @@ void View::autoSum()
//this behaviour??)
Range rg;
//rg.sheet=activeSheet();
- QRect sel = d->selection->selection(false);
+ TQRect sel = d->selection->selection(false);
if (sel.height() > 1)
{
@@ -2914,7 +2914,7 @@ void View::autoSum()
}
else
{
- sel=QRect();
+ sel=TQRect();
// only 1 cell selected
// try to automagically find cells the user wants to sum up
@@ -2933,7 +2933,7 @@ void View::autoSum()
endPoint.setRow(end);
endPoint.setColumn(d->selection->marker().x());
- QString str = Range(startPoint, endPoint).toString();
+ TQString str = Range(startPoint, endPoint).toString();
d->canvas->createEditor( Canvas::CellEditor , true , true );
d->canvas->editor()->setText("=SUM(" + str + ")");
@@ -2952,7 +2952,7 @@ void View::autoSum()
endPoint.setColumn(end);
endPoint.setRow(d->selection->marker().y());
- QString str = Range(startPoint, endPoint).toString();
+ TQString str = Range(startPoint, endPoint).toString();
d->canvas->createEditor( Canvas::CellEditor , true , true );
d->canvas->editor()->setText("=SUM(" + str + ")");
@@ -2963,7 +2963,7 @@ void View::autoSum()
}
if ( (sel.width() > 1) && (sel.height() > 1) )
- sel=QRect();
+ sel=TQRect();
rg.setRange(sel);
@@ -2986,7 +2986,7 @@ void View::autoSum()
/*
void View::oszilloscope()
{
- QDialog* dlg = new OsziDlg( this );
+ TQDialog* dlg = new OsziDlg( this );
dlg->show();
}
*/
@@ -3001,7 +3001,7 @@ void View::changeTextColor()
}
}
-void View::setSelectionTextColor(const QColor &txtColor)
+void View::setSelectionTextColor(const TQColor &txtColor)
{
if (d->activeSheet != 0L)
{
@@ -3023,7 +3023,7 @@ void View::changeBackgroundColor()
}
}
-void View::setSelectionBackgroundColor(const QColor &bgColor)
+void View::setSelectionBackgroundColor(const TQColor &bgColor)
{
if (d->activeSheet != 0L)
{
@@ -3043,7 +3043,7 @@ void View::changeBorderColor()
}
}
-void View::setSelectionBorderColor(const QColor &bdColor)
+void View::setSelectionBorderColor(const TQColor &bdColor)
{
if (d->activeSheet != 0L)
{
@@ -3089,7 +3089,7 @@ void View::deleteColumn()
doc()->emitBeginOperation( false );
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
d->activeSheet->removeColumn( r.left(), ( r.right()-r.left() ) );
@@ -3097,7 +3097,7 @@ void View::deleteColumn()
// Stefan: update the selection after deleting (a) column(s)
d->selection->update();
- QRect vr( d->activeSheet->visibleRect( d->canvas ) );
+ TQRect vr( d->activeSheet->visibleRect( d->canvas ) );
vr.setLeft( r.left() );
doc()->emitEndOperation( vr );
@@ -3109,14 +3109,14 @@ void View::deleteRow()
return;
doc()->emitBeginOperation( false );
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
d->activeSheet->removeRow( r.top(),(r.bottom()-r.top()) );
updateEditWidget();
// Stefan: update the selection after deleting (a) column(s)
d->selection->update();
- QRect vr( d->activeSheet->visibleRect( d->canvas ) );
+ TQRect vr( d->activeSheet->visibleRect( d->canvas ) );
vr.setTop( r.top() );
doc()->emitEndOperation( vr );
@@ -3128,12 +3128,12 @@ void View::insertColumn()
return;
doc()->emitBeginOperation( false );
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
d->activeSheet->insertColumn( r.left(), ( r.right()-r.left() ) );
updateEditWidget();
- QRect vr( d->activeSheet->visibleRect( d->canvas ) );
+ TQRect vr( d->activeSheet->visibleRect( d->canvas ) );
vr.setLeft( r.left() - 1 );
doc()->emitEndOperation( vr );
@@ -3175,11 +3175,11 @@ void View::insertRow()
if ( !d->activeSheet )
return;
doc()->emitBeginOperation( false );
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
d->activeSheet->insertRow( r.top(), ( r.bottom() - r.top() ) );
updateEditWidget();
- QRect vr( d->activeSheet->visibleRect( d->canvas ) );
+ TQRect vr( d->activeSheet->visibleRect( d->canvas ) );
vr.setTop( r.top() - 1 );
doc()->emitEndOperation( vr );
@@ -3216,7 +3216,7 @@ void View::showSelRows()
d->activeSheet->showRow(*selectionInfo());
}
-void View::fontSelected( const QString & _font )
+void View::fontSelected( const TQString & _font )
{
if ( d->toolbarLock )
return;
@@ -3313,16 +3313,16 @@ void View::verticalText(bool b)
void View::insertSpecialChar()
{
- QString f( d->actions->selectFont->font() );
- QChar c = ' ';
+ TQString f( d->actions->selectFont->font() );
+ TQChar c = ' ';
if ( d->specialCharDlg == 0 )
{
d->specialCharDlg = new KoCharSelectDia( this, "insert special char", f, c, false );
- connect( d->specialCharDlg, SIGNAL( insertChar( QChar, const QString & ) ),
- this, SLOT( slotSpecialChar( QChar, const QString & ) ) );
- connect( d->specialCharDlg, SIGNAL( finished() ),
- this, SLOT( slotSpecialCharDlgClosed() ) );
+ connect( d->specialCharDlg, TQT_SIGNAL( insertChar( TQChar, const TQString & ) ),
+ this, TQT_SLOT( slotSpecialChar( TQChar, const TQString & ) ) );
+ connect( d->specialCharDlg, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( slotSpecialCharDlgClosed() ) );
}
d->specialCharDlg->show();
}
@@ -3331,28 +3331,28 @@ void View::slotSpecialCharDlgClosed()
{
if ( d->specialCharDlg )
{
- disconnect( d->specialCharDlg, SIGNAL(insertChar(QChar,const QString &)),
- this, SLOT(slotSpecialChar(QChar,const QString &)));
- disconnect( d->specialCharDlg, SIGNAL( finished() ),
- this, SLOT( slotSpecialCharDlgClosed() ) );
+ disconnect( d->specialCharDlg, TQT_SIGNAL(insertChar(TQChar,const TQString &)),
+ this, TQT_SLOT(slotSpecialChar(TQChar,const TQString &)));
+ disconnect( d->specialCharDlg, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( slotSpecialCharDlgClosed() ) );
d->specialCharDlg->deleteLater();
d->specialCharDlg = 0L;
}
}
-void View::slotSpecialChar( QChar c, const QString & _font )
+void View::slotSpecialChar( TQChar c, const TQString & _font )
{
if ( d->activeSheet )
{
- QPoint marker( d->selection->marker() );
+ TQPoint marker( d->selection->marker() );
Cell * cell = d->activeSheet->nonDefaultCell( marker );
if ( cell->format()->textFont( marker.x(), marker.y() ).family() != _font )
{
cell->format()->setTextFontFamily( _font );
}
EditWidget * edit = d->editWidget;
- QKeyEvent ev( QEvent::KeyPress, 0, 0, 0, QString( c ) );
- QApplication::sendEvent( edit, &ev );
+ TQKeyEvent ev( TQEvent::KeyPress, 0, 0, 0, TQString( c ) );
+ TQApplication::sendEvent( edit, &ev );
}
}
@@ -3369,7 +3369,7 @@ void View::insertMathExpr()
// Torben thinks that not.
}
-void View::formulaSelection( const QString &_math )
+void View::formulaSelection( const TQString &_math )
{
if ( d->activeSheet == 0 )
return;
@@ -3507,7 +3507,7 @@ void View::sortInc()
if (!activeSheet())
return;
- QRect range = d->selection->selection();
+ TQRect range = d->selection->selection();
if ( d->selection->isSingular() )
{
KMessageBox::error( this, i18n( "You must select multiple cells." ) );
@@ -3529,7 +3529,7 @@ void View::sortInc()
void View::sortDec()
{
- QRect range = d->selection->selection();
+ TQRect range = d->selection->selection();
if ( d->selection->isSingular() )
{
KMessageBox::error( this, i18n( "You must select multiple cells." ) );
@@ -3563,7 +3563,7 @@ void View::borderBottom()
}
}
-void View::setSelectionBottomBorderColor( const QColor & color )
+void View::setSelectionBottomBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
@@ -3580,7 +3580,7 @@ void View::borderRight()
if ( d->activeSheet != 0L )
{
doc()->emitBeginOperation( false );
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
d->activeSheet->borderLeft( d->selection, d->actions->borderColor->color() );
else
d->activeSheet->borderRight( d->selection, d->actions->borderColor->color() );
@@ -3590,12 +3590,12 @@ void View::borderRight()
}
}
-void View::setSelectionRightBorderColor( const QColor & color )
+void View::setSelectionRightBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
doc()->emitBeginOperation( false );
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
d->activeSheet->borderLeft( selectionInfo(), color );
else
d->activeSheet->borderRight( selectionInfo(), color );
@@ -3610,7 +3610,7 @@ void View::borderLeft()
if ( d->activeSheet != 0L )
{
doc()->emitBeginOperation( false );
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
d->activeSheet->borderRight( d->selection, d->actions->borderColor->color() );
else
d->activeSheet->borderLeft( d->selection, d->actions->borderColor->color() );
@@ -3620,12 +3620,12 @@ void View::borderLeft()
}
}
-void View::setSelectionLeftBorderColor( const QColor & color )
+void View::setSelectionLeftBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
doc()->emitBeginOperation( false );
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
d->activeSheet->borderRight( selectionInfo(), color );
else
d->activeSheet->borderLeft( selectionInfo(), color );
@@ -3647,7 +3647,7 @@ void View::borderTop()
}
}
-void View::setSelectionTopBorderColor( const QColor & color )
+void View::setSelectionTopBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
@@ -3671,7 +3671,7 @@ void View::borderOutline()
}
}
-void View::setSelectionOutlineBorderColor( const QColor & color )
+void View::setSelectionOutlineBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
@@ -3695,7 +3695,7 @@ void View::borderAll()
}
}
-void View::setSelectionAllBorderColor( const QColor & color )
+void View::setSelectionAllBorderColor( const TQColor & color )
{
if ( d->activeSheet != 0L )
{
@@ -3726,31 +3726,31 @@ void View::addSheet( Sheet * _t )
insertSheet( _t );
// Connect some signals
- QObject::connect( _t, SIGNAL( sig_refreshView() ), SLOT( slotRefreshView() ) );
- QObject::connect( _t, SIGNAL( sig_updateView( Sheet* ) ), SLOT( slotUpdateView( Sheet* ) ) );
- QObject::connect( _t->print(), SIGNAL( sig_updateView( Sheet* ) ), SLOT( slotUpdateView( Sheet* ) ) );
- QObject::connect( _t, SIGNAL( sig_updateView( Sheet *, const Region& ) ),
- SLOT( slotUpdateView( Sheet*, const Region& ) ) );
- QObject::connect( _t, SIGNAL( sig_updateView( EmbeddedObject* )), SLOT( slotUpdateView( EmbeddedObject* ) ) );
-
- QObject::connect( _t, SIGNAL( sig_updateHBorder( Sheet * ) ),
- SLOT( slotUpdateHBorder( Sheet * ) ) );
- QObject::connect( _t, SIGNAL( sig_updateVBorder( Sheet * ) ),
- SLOT( slotUpdateVBorder( Sheet * ) ) );
- QObject::connect( _t, SIGNAL( sig_nameChanged( Sheet*, const QString& ) ),
- this, SLOT( slotSheetRenamed( Sheet*, const QString& ) ) );
- QObject::connect( _t, SIGNAL( sig_SheetHidden( Sheet* ) ),
- this, SLOT( slotSheetHidden( Sheet* ) ) );
- QObject::connect( _t, SIGNAL( sig_SheetShown( Sheet* ) ),
- this, SLOT( slotSheetShown( Sheet* ) ) );
- QObject::connect( _t, SIGNAL( sig_SheetRemoved( Sheet* ) ),
- this, SLOT( slotSheetRemoved( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_refreshView() ), TQT_SLOT( slotRefreshView() ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateView( Sheet* ) ), TQT_SLOT( slotUpdateView( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t->print(), TQT_SIGNAL( sig_updateView( Sheet* ) ), TQT_SLOT( slotUpdateView( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateView( Sheet *, const Region& ) ),
+ TQT_SLOT( slotUpdateView( Sheet*, const Region& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateView( EmbeddedObject* )), TQT_SLOT( slotUpdateView( EmbeddedObject* ) ) );
+
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateHBorder( Sheet * ) ),
+ TQT_SLOT( slotUpdateHBorder( Sheet * ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateVBorder( Sheet * ) ),
+ TQT_SLOT( slotUpdateVBorder( Sheet * ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_nameChanged( Sheet*, const TQString& ) ),
+ this, TQT_SLOT( slotSheetRenamed( Sheet*, const TQString& ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_SheetHidden( Sheet* ) ),
+ this, TQT_SLOT( slotSheetHidden( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_SheetShown( Sheet* ) ),
+ this, TQT_SLOT( slotSheetShown( Sheet* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_SheetRemoved( Sheet* ) ),
+ this, TQT_SLOT( slotSheetRemoved( Sheet* ) ) );
// ########### Why do these signals not send a pointer to the sheet?
// This will lead to bugs.
- QObject::connect( _t, SIGNAL( sig_updateChildGeometry( EmbeddedKOfficeObject* ) ),
- SLOT( slotUpdateChildGeometry( EmbeddedKOfficeObject* ) ) );
- QObject::connect( _t, SIGNAL( sig_maxColumn( int ) ), d->canvas, SLOT( slotMaxColumn( int ) ) );
- QObject::connect( _t, SIGNAL( sig_maxRow( int ) ), d->canvas, SLOT( slotMaxRow( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_updateChildGeometry( EmbeddedKOfficeObject* ) ),
+ TQT_SLOT( slotUpdateChildGeometry( EmbeddedKOfficeObject* ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_maxColumn( int ) ), d->canvas, TQT_SLOT( slotMaxColumn( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( _t, TQT_SIGNAL( sig_maxRow( int ) ), d->canvas, TQT_SLOT( slotMaxRow( int ) ) );
if ( !d->loading )
updateBorderButton();
@@ -3767,15 +3767,15 @@ void View::slotSheetRemoved( Sheet *_t )
{
doc()->emitBeginOperation( false );
- QString m_sheetName=_t->sheetName();
+ TQString m_sheetName=_t->sheetName();
d->tabBar->removeTab( _t->sheetName() );
if (doc()->map()->findSheet( doc()->map()->visibleSheets().first()))
setActiveSheet( doc()->map()->findSheet( doc()->map()->visibleSheets().first() ));
else
d->activeSheet = 0L;
- QValueList<Reference>::Iterator it;
- QValueList<Reference> area=doc()->listArea();
+ TQValueList<Reference>::Iterator it;
+ TQValueList<Reference> area=doc()->listArea();
for ( it = area.begin(); it != area.end(); ++it )
{
//remove Area Name when sheet target is removed
@@ -3825,16 +3825,16 @@ void View::setActiveSheet( Sheet * _t, bool updateSheet )
return;
}
- if ( oldSheet && oldSheet->layoutDirection()==Sheet::RightToLeft != d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( oldSheet && oldSheet->tqlayoutDirection()==Sheet::RightToLeft != d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
refreshView();
doc()->setDisplaySheet( d->activeSheet );
if ( updateSheet )
{
d->tabBar->setActiveTab( _t->sheetName() );
- d->vBorderWidget->repaint();
- d->hBorderWidget->repaint();
- d->activeSheet->setRegionPaintDirty(QRect(QPoint(0,0), QPoint(KS_colMax, KS_rowMax)));
+ d->vBorderWidget->tqrepaint();
+ d->hBorderWidget->tqrepaint();
+ d->activeSheet->setRegionPaintDirty(TQRect(TQPoint(0,0), TQPoint(KS_colMax, KS_rowMax)));
d->canvas->slotMaxColumn( d->activeSheet->maxColumn() );
d->canvas->slotMaxRow( d->activeSheet->maxRow() );
}
@@ -3846,17 +3846,17 @@ void View::setActiveSheet( Sheet * _t, bool updateSheet )
d->adjustWorkbookActions( !doc()->map()->isProtected() );
/* see if there was a previous selection on this other sheet */
- QMapIterator<Sheet*, QPoint> it = d->savedAnchors.find(d->activeSheet);
- QMapIterator<Sheet*, QPoint> it2 = d->savedMarkers.find(d->activeSheet);
- QMapIterator<Sheet*, KoPoint> it3 = d->savedOffsets.find(d->activeSheet);
+ TQMapIterator<Sheet*, TQPoint> it = d->savedAnchors.tqfind(d->activeSheet);
+ TQMapIterator<Sheet*, TQPoint> it2 = d->savedMarkers.tqfind(d->activeSheet);
+ TQMapIterator<Sheet*, KoPoint> it3 = d->savedOffsets.tqfind(d->activeSheet);
// TODO Stefan: store the save markers/anchors in the Selection?
- QPoint newAnchor = (it == d->savedAnchors.end()) ? QPoint(1,1) : *it;
- QPoint newMarker = (it2 == d->savedMarkers.end()) ? QPoint(1,1) : *it2;
+ TQPoint newAnchor = (it == d->savedAnchors.end()) ? TQPoint(1,1) : *it;
+ TQPoint newMarker = (it2 == d->savedMarkers.end()) ? TQPoint(1,1) : *it2;
d->selection->clear();
d->selection->setSheet( d->activeSheet );
- d->selection->initialize(QRect(newMarker, newAnchor));
+ d->selection->initialize(TQRect(newMarker, newAnchor));
d->canvas->scrollToCell(newMarker);
if (it3 != d->savedOffsets.end())
@@ -3871,7 +3871,7 @@ void View::setActiveSheet( Sheet * _t, bool updateSheet )
doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
}
-void View::slotSheetRenamed( Sheet* sheet, const QString& old_name )
+void View::slotSheetRenamed( Sheet* sheet, const TQString& old_name )
{
doc()->emitBeginOperation( false );
d->tabBar->renameTab( old_name, sheet->sheetName() );
@@ -3893,7 +3893,7 @@ void View::slotSheetShown( Sheet* )
doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
}
-void View::changeSheet( const QString& _name )
+void View::changeSheet( const TQString& _name )
{
if ( activeSheet()->sheetName() == _name )
return;
@@ -3914,8 +3914,8 @@ void View::changeSheet( const QString& _name )
updateBorderButton();
//update visible area
- d->vBorderWidget->repaint();
- d->hBorderWidget->repaint();
+ d->vBorderWidget->tqrepaint();
+ d->hBorderWidget->tqrepaint();
d->canvas->slotMaxColumn( d->activeSheet->maxColumn() );
d->canvas->slotMaxRow( d->activeSheet->maxRow() );
t->setRegionPaintDirty( t->visibleRect( d->canvas ) );
@@ -3926,7 +3926,7 @@ void View::moveSheet( unsigned sheet, unsigned target )
{
if( doc()->map()->isProtected() ) return;
- QStringList vs = doc()->map()->visibleSheets();
+ TQStringList vs = doc()->map()->visibleSheets();
if( target >= vs.count() )
doc()->map()->moveSheet( vs[ sheet ], vs[ vs.count()-1 ], false );
@@ -3945,7 +3945,7 @@ void View::sheetProperties()
bool directionChanged = false;
SheetPropertiesDialog* dlg = new SheetPropertiesDialog( this );
- dlg->setLayoutDirection( d->activeSheet->layoutDirection() );
+ dlg->setLayoutDirection( d->activeSheet->tqlayoutDirection() );
dlg->setAutoCalc( d->activeSheet->getAutoCalc() );
dlg->setShowGrid( d->activeSheet->getShowGrid() );
dlg->setShowPageBorders( d->activeSheet->isShowPageBorders() );
@@ -3961,10 +3961,10 @@ void View::sheetProperties()
{
SheetPropertiesCommand* command = new SheetPropertiesCommand( doc(), d->activeSheet );
- if ( d->activeSheet->layoutDirection() != dlg->layoutDirection() )
+ if ( d->activeSheet->tqlayoutDirection() != dlg->tqlayoutDirection() )
directionChanged = true;
- command->setLayoutDirection( dlg->layoutDirection() );
+ command->setLayoutDirection( dlg->tqlayoutDirection() );
command->setAutoCalc( dlg->autoCalc() );
command->setShowGrid( dlg->showGrid() );
command->setShowPageBorders( dlg->showPageBorders() );
@@ -4026,10 +4026,10 @@ void View::hideSheet()
return;
}
- QStringList vs = doc()->map()->visibleSheets();
- int i = vs.findIndex( d->activeSheet->tableName() ) - 1;
+ TQStringList vs = doc()->map()->visibleSheets();
+ int i = vs.tqfindIndex( d->activeSheet->tableName() ) - 1;
if( i < 0 ) i = 1;
- QString sn = vs[i];
+ TQString sn = vs[i];
doc()->emitBeginOperation(false);
@@ -4094,7 +4094,7 @@ void View::cutSelection()
doc()->emitEndOperation();
KMacroCommand * macroCommand = 0L;
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
{
if ( it.current()->sheet() == canvasWidget()->activeSheet() && it.current()->isSelected() )
@@ -4135,23 +4135,23 @@ void View::paste()
if (!koDocument()->isReadWrite()) // don't paste into a read only document
return;
- QMimeSource *data = QApplication::clipboard()->data( QClipboard::Clipboard );
+ TQMimeSource *data = TQApplication::tqclipboard()->data( TQClipboard::Clipboard );
for ( int i=0; data->format(i) != 0; i++ )
kdDebug() << "format:" << data->format(i) << endl;
if ( data->provides( KoStoreDrag::mimeType("application/vnd.oasis.opendocument.spreadsheet" ) ))
{
canvasWidget()->deselectAllObjects();
- QCString returnedTypeMime = "application/vnd.oasis.opendocument.spreadsheet";
- const QByteArray arr = data->encodedData( returnedTypeMime );
+ TQCString returnedTypeMime = "application/vnd.oasis.opendocument.spreadsheet";
+ const TQByteArray arr = data->tqencodedData( returnedTypeMime );
if( arr.isEmpty() )
return;
- QBuffer buffer( arr );
- KoStore * store = KoStore::createStore( &buffer, KoStore::Read );
+ TQBuffer buffer( arr );
+ KoStore * store = KoStore::createStore( TQT_TQIODEVICE(&buffer), KoStore::Read );
KoOasisStore oasisStore( store );
- QDomDocument doc;
- QString errorMessage;
+ TQDomDocument doc;
+ TQString errorMessage;
bool ok = oasisStore.loadAndParse( "content.xml", doc, errorMessage );
if ( !ok ) {
kdError(32001) << "Error parsing content.xml: " << errorMessage << endl;
@@ -4159,7 +4159,7 @@ void View::paste()
}
KoOasisStyles oasisStyles;
- QDomDocument stylesDoc;
+ TQDomDocument stylesDoc;
(void)oasisStore.loadAndParse( "styles.xml", stylesDoc, errorMessage );
// Load styles from style.xml
oasisStyles.createStyleMap( stylesDoc, true );
@@ -4167,20 +4167,20 @@ void View::paste()
oasisStyles.createStyleMap( doc, false );
// from KSpreadDoc::loadOasis:
- QDomElement content = doc.documentElement();
- QDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
+ TQDomElement content = doc.documentElement();
+ TQDomElement realBody ( KoDom::namedItemNS( content, KoXmlNS::office, "body" ) );
if ( realBody.isNull() )
{
kdDebug() << "Invalid OASIS OpenDocument file. No office:body tag found." << endl;
return;
}
- QDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
+ TQDomElement body = KoDom::namedItemNS( realBody, KoXmlNS::office, "spreadsheet" );
if ( body.isNull() )
{
kdError(32001) << "No office:spreadsheet found!" << endl;
- QDomElement childElem;
- QString localName;
+ TQDomElement childElem;
+ TQString localName;
forEachElement( childElem, realBody ) {
localName = childElem.localName();
}
@@ -4206,7 +4206,7 @@ void View::paste()
else
{
//TODO: What if the clipboard data is available in both pixmap and OASIS format? (ie. for embedded parts)
- QPixmap clipboardPixmap = QApplication::clipboard()->pixmap( QClipboard::Clipboard );
+ TQPixmap clipboardPixmap = TQApplication::tqclipboard()->pixmap( TQClipboard::Clipboard );
if (!clipboardPixmap.isNull())
{
d->activeSheet->insertPicture( markerDocumentPosition() , clipboardPixmap );
@@ -4269,7 +4269,7 @@ void View::changeAngle()
return;
AngleDialog dlg( this, "Angle" ,
- QPoint( d->canvas->markerColumn(), d->canvas->markerRow() ));
+ TQPoint( d->canvas->markerColumn(), d->canvas->markerRow() ));
if ( dlg.exec() )
{
//TODO Stefan: where is the angle operation?
@@ -4364,7 +4364,7 @@ void View::goalSeek()
}
GoalSeekDialog * dlg
- = new GoalSeekDialog( this, QPoint( d->canvas->markerColumn(),
+ = new GoalSeekDialog( this, TQPoint( d->canvas->markerColumn(),
d->canvas->markerRow() ),
"GoalSeekDialog" );
dlg->show();
@@ -4376,7 +4376,7 @@ void View::subtotals()
if (!activeSheet())
return;
- QRect selection( d->selection->selection() );
+ TQRect selection( d->selection->selection() );
if ( ( selection.width() < 2 ) || ( selection.height() < 2 ) )
{
KMessageBox::error( this, i18n("You must select multiple cells.") );
@@ -4388,7 +4388,7 @@ void View::subtotals()
{
doc()->emitBeginOperation( false );
- d->selection->initialize( QRect(dlg.selection().topLeft(), dlg.selection().bottomRight()));//, dlg.sheet() );
+ d->selection->initialize( TQRect(dlg.selection().topLeft(), dlg.selection().bottomRight()));//, dlg.sheet() );
doc()->emitEndOperation( selection );
}
}
@@ -4410,7 +4410,7 @@ void View::textToColumns()
d->canvas->closeEditor();
- QRect area=d->selection->selection();
+ TQRect area=d->selection->selection();
//Only use the first column
area.setRight(area.left());
@@ -4452,7 +4452,7 @@ void View::gotoCell()
dlg.exec();
}
-void View::find()
+void View::tqfind()
{
if (!activeSheet()) return;
@@ -4469,10 +4469,10 @@ void View::find()
d->directionValue = dlg.searchDirection();
// Create the KFind object
- delete d->find;
- delete d->replace;
- d->find = new KFind( dlg.pattern(), dlg.options(), this );
- d->replace = 0L;
+ delete d->tqfind;
+ delete d->tqreplace;
+ d->tqfind = new KFind( dlg.pattern(), dlg.options(), this );
+ d->tqreplace = 0L;
d->searchInSheets.currentSheet = activeSheet();
d->searchInSheets.firstSheet = d->searchInSheets.currentSheet;
@@ -4481,46 +4481,46 @@ void View::find()
findNext();
}
-// Initialize a find or replace operation, using d->find or d->replace,
+// Initialize a find or replace operation, using d->find or d->tqreplace,
// and d->findOptions.
void View::initFindReplace()
{
- KFind* findObj = d->find ? d->find : d->replace;
+ KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
Q_ASSERT( findObj );
- connect(findObj, SIGNAL( highlight( const QString &, int, int ) ),
- this, SLOT( slotHighlight( const QString &, int, int ) ) );
- connect(findObj, SIGNAL( findNext() ),
- this, SLOT( findNext() ) );
+ connect(findObj, TQT_SIGNAL( highlight( const TQString &, int, int ) ),
+ this, TQT_SLOT( slotHighlight( const TQString &, int, int ) ) );
+ connect(findObj, TQT_SIGNAL( findNext() ),
+ this, TQT_SLOT( findNext() ) );
bool bck = d->findOptions & KFindDialog::FindBackwards;
Sheet* currentSheet = d->searchInSheets.currentSheet;
- QRect region = ( d->findOptions & KFindDialog::SelectedText )
+ TQRect region = ( d->findOptions & KFindDialog::SelectedText )
? d->selection->selection()
- : QRect( 1, 1, currentSheet->maxColumn(), currentSheet->maxRow() ); // All cells
+ : TQRect( 1, 1, currentSheet->maxColumn(), currentSheet->maxRow() ); // All cells
int colStart = !bck ? region.left() : region.right();
int colEnd = !bck ? region.right() : region.left();
int rowStart = !bck ? region.top() :region.bottom();
int rowEnd = !bck ? region.bottom() : region.top();
if ( d->findOptions & KFindDialog::FromCursor ) {
- QPoint marker( d->selection->marker() );
+ TQPoint marker( d->selection->marker() );
colStart = marker.x();
rowStart = marker.y();
}
d->findLeftColumn = region.left();
d->findRightColumn = region.right();
- d->findPos = QPoint( colStart, rowStart );
- d->findEnd = QPoint( colEnd, rowEnd );
+ d->findPos = TQPoint( colStart, rowStart );
+ d->findEnd = TQPoint( colEnd, rowEnd );
//kdDebug() << k_funcinfo << d->findPos << " to " << d->findEnd << endl;
//kdDebug() << k_funcinfo << "leftcol=" << d->findLeftColumn << " rightcol=" << d->findRightColumn << endl;
}
void View::findNext()
{
- KFind* findObj = d->find ? d->find : d->replace;
+ KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
if ( !findObj ) {
- find();
+ tqfind();
return;
}
KFind::Result res = KFind::NoMatch;
@@ -4534,15 +4534,15 @@ void View::findNext()
findObj->setData( cell->format()->comment( cell->column(), cell->row() ) );
else
findObj->setData( cell->text() );
- d->findPos = QPoint( cell->column(), cell->row() );
+ d->findPos = TQPoint( cell->column(), cell->row() );
//kdDebug() << "setData(cell " << d->findPos << ")" << endl;
}
// Let KFind inspect the text fragment, and display a dialog if a match is found
- if ( d->find )
- res = d->find->find();
+ if ( d->tqfind )
+ res = d->tqfind->find();
else
- res = d->replace->replace();
+ res = d->tqreplace->replace();
if ( res == KFind::NoMatch ) {
// Go to next cell, skipping unwanted cells
@@ -4574,10 +4574,10 @@ void View::findNext()
findNext();
}
else { // done, close the 'find next' dialog
- if ( d->find )
- d->find->closeFindNextDialog();
+ if ( d->tqfind )
+ d->tqfind->closeFindNextDialog();
else
- d->replace->closeReplaceNextDialog();
+ d->tqreplace->closeReplaceNextDialog();
}
}
}
@@ -4660,9 +4660,9 @@ Cell* View::findNextCell()
void View::findPrevious()
{
- KFind* findObj = d->find ? d->find : d->replace;
+ KFind* findObj = d->tqfind ? d->tqfind : d->tqreplace;
if ( !findObj ) {
- find();
+ tqfind();
return;
}
//kdDebug() << "findPrevious" << endl;
@@ -4678,7 +4678,7 @@ void View::findPrevious()
d->findOptions = opt; // restore initial options
}
-void View::replace()
+void View::tqreplace()
{
if (!d->activeSheet)
return;
@@ -4694,26 +4694,26 @@ void View::replace()
d->replaceStrings = dlg.replacementHistory();
d->typeValue = dlg.searchType();
- delete d->find;
- delete d->replace;
- d->find = 0L;
+ delete d->tqfind;
+ delete d->tqreplace;
+ d->tqfind = 0L;
// NOTE Stefan: Avoid beginning of line replacements with nothing which
// will lead to an infinite loop (Bug #125535). The reason
// for this is unclear to me, but who cares and who would
// want to do something like this, häh?!
if (dlg.pattern() == "^" && dlg.replacement().isEmpty())
return;
- d->replace = new KReplace( dlg.pattern(), dlg.replacement(), dlg.options() );
+ d->tqreplace = new KReplace( dlg.pattern(), dlg.replacement(), dlg.options() );
d->searchInSheets.currentSheet = activeSheet();
d->searchInSheets.firstSheet = d->searchInSheets.currentSheet;
initFindReplace();
- connect( d->replace, SIGNAL( replace( const QString &, int, int, int ) ),
- this, SLOT( slotReplace( const QString &, int, int, int ) ) );
+ connect( d->tqreplace, TQT_SIGNAL( tqreplace( const TQString &, int, int, int ) ),
+ this, TQT_SLOT( slotReplace( const TQString &, int, int, int ) ) );
if ( !doc()->undoLocked() )
{
- QRect region( d->findPos, d->findEnd );
+ TQRect region( d->findPos, d->findEnd );
//TODO create undo/redo for comment
UndoChangeAreaTextCell *undo = new UndoChangeAreaTextCell( doc(), d->searchInSheets.currentSheet, region );
doc()->addCommand( undo );
@@ -4733,21 +4733,21 @@ void View::replace()
#endif
}
-void View::slotHighlight( const QString &/*text*/, int /*matchingIndex*/, int /*matchedLength*/ )
+void View::slotHighlight( const TQString &/*text*/, int /*matchingIndex*/, int /*matchedLength*/ )
{
d->selection->initialize( d->findPos );
KDialogBase *baseDialog=0L;
- if ( d->find )
- baseDialog = d->find->findNextDialog();
+ if ( d->tqfind )
+ baseDialog = d->tqfind->findNextDialog();
else
- baseDialog = d->replace->replaceNextDialog();
+ baseDialog = d->tqreplace->replaceNextDialog();
kdDebug()<<" baseDialog :"<<baseDialog<<endl;
- QRect globalRect( d->findPos, d->findEnd );
+ TQRect globalRect( d->findPos, d->findEnd );
globalRect.moveTopLeft( canvasWidget()->mapToGlobal( globalRect.topLeft() ) );
- KDialog::avoidArea( baseDialog, QRect( d->findPos, d->findEnd ));
+ KDialog::avoidArea( baseDialog, TQRect( d->findPos, d->findEnd ));
}
-void View::slotReplace( const QString &newText, int, int, int )
+void View::slotReplace( const TQString &newText, int, int, int )
{
// Which cell was this again?
Cell *cell = d->searchInSheets.currentSheet->cellAt( d->findPos );
@@ -4763,7 +4763,7 @@ void View::slotReplace( const QString &newText, int, int, int )
void View::conditional()
{
- QRect rect( d->selection->selection() );
+ TQRect rect( d->selection->selection() );
if ( util_isRowOrColumnSelected(rect))
{
@@ -4778,7 +4778,7 @@ void View::conditional()
void View::validity()
{
- QRect rect( d->selection->selection() );
+ TQRect rect( d->selection->selection() );
if (d->selection->isColumnOrRowSelected())
{
@@ -4795,7 +4795,7 @@ void View::validity()
void View::insertSeries()
{
d->canvas->closeEditor();
- SeriesDlg dlg( this, "Series", QPoint( d->canvas->markerColumn(), d->canvas->markerRow() ) );
+ SeriesDlg dlg( this, "Series", TQPoint( d->canvas->markerColumn(), d->canvas->markerRow() ) );
dlg.exec();
}
@@ -4813,12 +4813,12 @@ void View::sort()
void View::removeHyperlink()
{
- QPoint marker( d->selection->marker() );
+ TQPoint marker( d->selection->marker() );
Cell * cell = d->activeSheet->cellAt( marker );
if( !cell ) return;
if( cell->link().isEmpty() ) return;
- LinkCommand* command = new LinkCommand( cell, QString::null, QString::null );
+ LinkCommand* command = new LinkCommand( cell, TQString(), TQString() );
doc()->addCommand( command );
command->execute();
@@ -4833,7 +4833,7 @@ void View::insertHyperlink()
d->canvas->closeEditor();
- QPoint marker( d->selection->marker() );
+ TQPoint marker( d->selection->marker() );
Cell* cell = d->activeSheet->cellAt( marker );
LinkDialog* dlg = new LinkDialog( this );
@@ -4865,16 +4865,16 @@ void View::insertHyperlink()
void View::insertFromDatabase()
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
d->canvas->closeEditor();
- QRect rect = d->selection->selection();
+ TQRect rect = d->selection->selection();
- QStringList str = QSqlDatabase::drivers();
+ TQStringList str = TQSqlDatabase::drivers();
if ( str.isEmpty() )
{
KMessageBox::error( this, i18n("No database drivers available. To use this feature you need "
- "to install the necessary Qt 3 database drivers.") );
+ "to install the necessary TQt 3 database drivers.") );
return;
}
@@ -4914,7 +4914,7 @@ void View::setupPrinter( KPrinter &prt )
SheetPrint* print = d->activeSheet->print();
- //apply page layout parameters
+ //apply page tqlayout parameters
KoFormat pageFormat = print->paperFormat();
prt.setPageSize( static_cast<KPrinter::PageSize>( KoPageFormat::printerPageSize( pageFormat ) ) );
@@ -4932,7 +4932,7 @@ void View::setupPrinter( KPrinter &prt )
prt.addDialogPage(sheetpage);
// kdDebug() << "Iterating through available sheets and initializing list of available sheets." << endl;
- QPtrList<Sheet> sheetlist = doc()->map()->sheetList();
+ TQPtrList<Sheet> sheetlist = doc()->map()->sheetList();
Sheet* sheet = sheetlist.last();
while ( sheet )
{
@@ -4951,7 +4951,7 @@ void View::print( KPrinter &prt )
Sheet* selectedsheet = this->activeSheet();
//print all sheets in the order given by the print dialog (Sheet Selection)
- QStringList sheetlist = KPSheetSelectPage::selectedSheets(prt);
+ TQStringList sheetlist = KPSheetSelectPage::selectedSheets(prt);
if (sheetlist.empty())
{
@@ -4959,19 +4959,19 @@ void View::print( KPrinter &prt )
sheetlist.append(d->activeSheet->sheetName());
}
- QPainter painter;
+ TQPainter painter;
painter.begin( &prt );
bool firstpage = true;
- QStringList::iterator sheetlistiterator;
+ TQStringList::iterator sheetlistiterator;
for (sheetlistiterator = sheetlist.begin(); sheetlistiterator != sheetlist.end(); ++sheetlistiterator)
{
kdDebug() << " printing sheet " << *sheetlistiterator << endl;
Sheet* sheet = doc()->map()->findSheet(*sheetlistiterator);
if (sheet == NULL)
{
- kdWarning() << i18n("Sheet %1 could not be found for printing").arg(*sheetlistiterator) << endl;
+ kdWarning() << i18n("Sheet %1 could not be found for printing").tqarg(*sheetlistiterator) << endl;
continue;
}
@@ -4999,7 +4999,7 @@ void View::print( KPrinter &prt )
// anyway (it's the PS driver that takes care of the printer resolution).
//But KSpread uses fixed 300 dpis, so we can use it.
- QPaintDeviceMetrics metrics( &prt );
+ TQPaintDeviceMetrics metrics( &prt );
int dpiX = metrics.logicalDpiX();
int dpiY = metrics.logicalDpiY();
@@ -5038,7 +5038,7 @@ void View::print( KPrinter &prt )
if( !prt.previewOnly() )
{
KMessageBox::information( 0,
- i18n("Nothing to print for sheet %1.").arg(
+ i18n("Nothing to print for sheet %1.").tqarg(
d->activeSheet->sheetName()) );
//@todo: make sure we really can comment this out,
// what to do with partially broken printouts?
@@ -5051,13 +5051,13 @@ void View::print( KPrinter &prt )
this->setActiveSheet(selectedsheet);
}
-void View::insertChart( const QRect& _geometry, KoDocumentEntry& _e )
+void View::insertChart( const TQRect& _tqgeometry, KoDocumentEntry& _e )
{
if ( !d->activeSheet )
return;
// Transform the view coordinates to document coordinates
- KoRect unzoomedRect = doc()->unzoomRect( _geometry );
+ KoRect unzoomedRect = doc()->unzoomRect( _tqgeometry );
unzoomedRect.moveBy( d->canvas->xOffset(), d->canvas->yOffset() );
InsertObjectCommand *cmd = 0;
@@ -5073,13 +5073,13 @@ void View::insertChart( const QRect& _geometry, KoDocumentEntry& _e )
cmd->execute();
}
-void View::insertChild( const QRect& _geometry, KoDocumentEntry& _e )
+void View::insertChild( const TQRect& _tqgeometry, KoDocumentEntry& _e )
{
if ( !d->activeSheet )
return;
// Transform the view coordinates to document coordinates
- KoRect unzoomedRect = doc()->unzoomRect( _geometry );
+ KoRect unzoomedRect = doc()->unzoomRect( _tqgeometry );
unzoomedRect.moveBy( d->canvas->xOffset(), d->canvas->yOffset() );
InsertObjectCommand *cmd = new InsertObjectCommand( unzoomedRect, _e, d->canvas );
@@ -5089,7 +5089,7 @@ void View::insertChild( const QRect& _geometry, KoDocumentEntry& _e )
KoPoint View::markerDocumentPosition()
{
- QPoint marker=selectionInfo()->marker();
+ TQPoint marker=selectionInfo()->marker();
return KoPoint( d->activeSheet->dblColumnPos(marker.x()),
d->activeSheet->dblRowPos(marker.y()) );
@@ -5104,7 +5104,7 @@ void View::insertPicture()
//This behaviour can be seen in other spreadsheets.
//-- Robert Knight 12/02/06 <robertknight@gmail.com>
- KURL file = KFileDialog::getImageOpenURL( QString::null, d->canvas );
+ KURL file = KFileDialog::getImageOpenURL( TQString(), d->canvas );
if (file.isEmpty())
return;
@@ -5127,7 +5127,7 @@ void View::slotUpdateChildGeometry( EmbeddedKOfficeObject */*_child*/ )
// Find frame for child
ChildFrame *f = 0L;
- QPtrListIterator<ChildFrame> it( m_lstFrames );
+ TQPtrListIterator<ChildFrame> it( m_lstFrames );
for ( ; it.current() && !f; ++it )
if ( it.current()->child() == _child )
f = it.current();
@@ -5135,11 +5135,11 @@ void View::slotUpdateChildGeometry( EmbeddedKOfficeObject */*_child*/ )
assert( f != 0L );
// Are we already up to date ?
- if ( _child->geometry() == f->partGeometry() )
+ if ( _child->tqgeometry() == f->partGeometry() )
return;
// TODO zooming
- f->setPartGeometry( _child->geometry() );
+ f->setPartGeometry( _child->tqgeometry() );
*/
}
@@ -5148,7 +5148,7 @@ void View::toggleProtectDoc( bool mode )
if ( !doc() || !doc()->map() )
return;
- QCString passwd;
+ TQCString passwd;
if ( mode )
{
int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Document" ) );
@@ -5158,8 +5158,8 @@ void View::toggleProtectDoc( bool mode )
return;
}
- QCString hash( "" );
- QString password( passwd );
+ TQCString hash( "" );
+ TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
doc()->map()->setProtected( hash );
@@ -5173,8 +5173,8 @@ void View::toggleProtectDoc( bool mode )
return;
}
- QCString hash( "" );
- QString password( passwd );
+ TQCString hash( "" );
+ TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
if ( !doc()->map()->checkPassword( hash ) )
@@ -5184,7 +5184,7 @@ void View::toggleProtectDoc( bool mode )
return;
}
- doc()->map()->setProtected( QCString() );
+ doc()->map()->setProtected( TQCString() );
}
doc()->setModified( true );
@@ -5196,7 +5196,7 @@ void View::toggleProtectSheet( bool mode )
if ( !d->activeSheet )
return;
- QCString passwd;
+ TQCString passwd;
if ( mode )
{
int result = KPasswordDialog::getNewPassword( passwd, i18n( "Protect Sheet" ) );
@@ -5206,8 +5206,8 @@ void View::toggleProtectSheet( bool mode )
return;
}
- QCString hash( "" );
- QString password( passwd );
+ TQCString hash( "" );
+ TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
@@ -5222,8 +5222,8 @@ void View::toggleProtectSheet( bool mode )
return;
}
- QCString hash( "" );
- QString password( passwd );
+ TQCString hash( "" );
+ TQString password( passwd );
if ( password.length() > 0 )
SHA1::getHash( password, hash );
@@ -5234,12 +5234,12 @@ void View::toggleProtectSheet( bool mode )
return;
}
- d->activeSheet->setProtected( QCString() );
+ d->activeSheet->setProtected( TQCString() );
}
doc()->setModified( true );
d->adjustActions( !mode );
doc()->emitBeginOperation();
- // d->activeSheet->setRegionPaintDirty( QRect(QPoint( 0, 0 ), QPoint( KS_colMax, KS_rowMax ) ) );
+ // d->activeSheet->setRegionPaintDirty( TQRect(TQPoint( 0, 0 ), TQPoint( KS_colMax, KS_rowMax ) ) );
refreshView();
updateEditWidget();
doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
@@ -5255,13 +5255,13 @@ void View::togglePageBorders( bool mode )
doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
}
-void View::viewZoom( const QString & s )
+void View::viewZoom( const TQString & s )
{
int oldZoom = doc()->zoom();
bool ok = false;
- QRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
+ TQRegExp regexp("(\\d+)"); // "Captured" non-empty sequence of digits
regexp.search(s);
int newZoom=regexp.cap(1).toInt(&ok);
if ( !ok || newZoom < 10 ) //zoom should be valid and >10
@@ -5277,7 +5277,7 @@ void View::viewZoom( const QString & s )
if (activeSheet())
{
- QRect r( d->activeSheet->visibleRect( d->canvas ) );
+ TQRect r( d->activeSheet->visibleRect( d->canvas ) );
r.setWidth( r.width() + 2 );
doc()->emitEndOperation( r );
}
@@ -5297,7 +5297,7 @@ void View::setZoom( int zoom, bool /*updateViews*/ )
Q_ASSERT(d->activeSheet);
if (d->activeSheet) //this is 0 when viewing a document in konqueror!? (see Q_ASSERT above)
- d->activeSheet->setRegionPaintDirty(QRect(QPoint(0,0), QPoint(KS_colMax, KS_rowMax)));
+ d->activeSheet->setRegionPaintDirty(TQRect(TQPoint(0,0), TQPoint(KS_colMax, KS_rowMax)));
doc()->refreshInterface();
doc()->emitEndOperation();
@@ -5341,13 +5341,13 @@ void View::addModifyComment()
return;
CommentDialog dlg( this, "comment",
- QPoint( d->canvas->markerColumn(),
+ TQPoint( d->canvas->markerColumn(),
d->canvas->markerRow() ) );
if ( dlg.exec() )
updateEditWidget();
}
-void View::setSelectionComment( QString comment )
+void View::setSelectionComment( TQString comment )
{
if ( d->activeSheet != NULL )
{
@@ -5369,7 +5369,7 @@ void View::editCell()
d->canvas->createEditor(true);
}
-bool View::showSheet(const QString& sheetName) {
+bool View::showSheet(const TQString& sheetName) {
Sheet *t=doc()->map()->findSheet(sheetName);
if ( !t )
{
@@ -5438,37 +5438,37 @@ void View::lastSheet()
d->tabBar->ensureVisible( t->sheetName() );
}
-void View::keyPressEvent ( QKeyEvent* _ev )
+void View::keyPressEvent ( TQKeyEvent* _ev )
{
// Dont eat accelerators
- if ( _ev->state() & ( Qt::AltButton | Qt::ControlButton ) )
+ if ( _ev->state() & ( TQt::AltButton | TQt::ControlButton ) )
{
- if ( _ev->state() & ( Qt::ControlButton ) )
+ if ( _ev->state() & ( TQt::ControlButton ) )
{
switch( _ev->key() )
{
#ifndef NDEBUG
- case Qt::Key_V: // Ctrl+Shift+V to show debug (similar to KWord)
- if ( _ev->state() & Qt::ShiftButton )
+ case TQt::Key_V: // Ctrl+Shift+V to show debug (similar to KWord)
+ if ( _ev->state() & TQt::ShiftButton )
d->activeSheet->printDebug();
#endif
default:
- QWidget::keyPressEvent( _ev );
+ TQWidget::keyPressEvent( _ev );
return;
}
}
- QWidget::keyPressEvent( _ev );
+ TQWidget::keyPressEvent( _ev );
}
else
- QApplication::sendEvent( d->canvas, _ev );
+ TQApplication::sendEvent( d->canvas, _ev );
}
-KoDocument * View::hitTest( const QPoint& /*pos*/ )
+KoDocument * View::hitTest( const TQPoint& /*pos*/ )
{
// // Code copied from KoView::hitTest
// KoViewChild *viewChild;
//
-// QWMatrix m = matrix();
+// TQWMatrix m = matrix();
// m.translate( d->canvas->xOffset() / doc()->zoomedResolutionX(),
// d->canvas->yOffset() / doc()->zoomedResolutionY() );
//
@@ -5477,11 +5477,11 @@ KoDocument * View::hitTest( const QPoint& /*pos*/ )
// {
// if ( ( viewChild = child( docChild->document() ) ) )
// {
-// if ( viewChild->frameRegion( m ).contains( pos ) )
+// if ( viewChild->frameRegion( m ).tqcontains( pos ) )
// return 0;
// }
// else
-// if ( docChild->frameRegion( m ).contains( pos ) )
+// if ( docChild->frameRegion( m ).tqcontains( pos ) )
// return 0;
// }
//
@@ -5490,15 +5490,15 @@ KoDocument * View::hitTest( const QPoint& /*pos*/ )
// {
// if ( ( viewChild = child( docChild->document() ) ) )
// {
-// if ( viewChild->frameRegion( m ).contains( pos ) )
+// if ( viewChild->frameRegion( m ).tqcontains( pos ) )
// return 0;
// }
// else
-// if ( docChild->frameRegion( m ).contains( pos ) )
+// if ( docChild->frameRegion( m ).tqcontains( pos ) )
// return 0;
// }
//
-// QPtrListIterator<KoDocumentChild> it( doc()->children() );
+// TQPtrListIterator<KoDocumentChild> it( doc()->tqchildren() );
// for (; it.current(); ++it )
// {
// // Is the child document on the visible sheet ?
@@ -5568,32 +5568,32 @@ void View::refreshView()
d->hBorderWidget->setMinimumHeight( doc()->zoomItY( KoGlobal::defaultFont().pointSizeFloat() + 5 ) );
d->vBorderWidget->setMinimumWidth( doc()->zoomItX( YBORDER_WIDTH ) );
- Sheet::LayoutDirection sheetDir = sheet->layoutDirection();
- bool interfaceIsRTL = QApplication::reverseLayout();
+ Sheet::LayoutDirection sheetDir = sheet->tqlayoutDirection();
+ bool interfaceIsRTL = TQApplication::reverseLayout();
kdDebug()<<" sheetDir == Sheet::LeftToRight :"<<( sheetDir == Sheet::LeftToRight )<<endl;
if ((sheetDir == Sheet::LeftToRight && !interfaceIsRTL) ||
(sheetDir == Sheet::RightToLeft && interfaceIsRTL))
{
- d->formulaBarLayout->setDirection( QBoxLayout::LeftToRight );
- d->viewLayout->setOrigin( QGridLayout::TopLeft );
- d->tabScrollBarLayout->setDirection( QBoxLayout::LeftToRight );
+ d->formulaBarLayout->setDirection( TQBoxLayout::LeftToRight );
+ d->viewLayout->setOrigin( TQGridLayout::TopLeft );
+ d->tabScrollBarLayout->setDirection( TQBoxLayout::LeftToRight );
d->tabBar->setReverseLayout( interfaceIsRTL );
}
else
{
- d->formulaBarLayout->setDirection( QBoxLayout::RightToLeft );
- d->viewLayout->setOrigin( QGridLayout::TopRight );
- d->tabScrollBarLayout->setDirection( QBoxLayout::RightToLeft );
+ d->formulaBarLayout->setDirection( TQBoxLayout::RightToLeft );
+ d->viewLayout->setOrigin( TQGridLayout::TopRight );
+ d->tabScrollBarLayout->setDirection( TQBoxLayout::RightToLeft );
d->tabBar->setReverseLayout( !interfaceIsRTL );
}
}
-void View::resizeEvent( QResizeEvent * )
+void View::resizeEvent( TQResizeEvent * )
{
}
-void View::popupChildMenu( KoChild* child, const QPoint& /*global_pos*/ )
+void View::popupChildMenu( KoChild* child, const TQPoint& /*global_pos*/ )
{
if ( !child )
return;
@@ -5602,9 +5602,9 @@ void View::popupChildMenu( KoChild* child, const QPoint& /*global_pos*/ )
// d->popupChildObject = static_cast<EmbeddedKOfficeObject*>(child);
//
-// d->popupChild = new QPopupMenu( this );
+// d->popupChild = new TQPopupMenu( this );
//
-// d->popupChild->insertItem( i18n("Delete Embedded Document"), this, SLOT( slotPopupDeleteChild() ) );
+// d->popupChild->insertItem( i18n("Delete Embedded Document"), this, TQT_SLOT( slotPopupDeleteChild() ) );
//
// d->popupChild->popup( global_pos );
@@ -5630,7 +5630,7 @@ void View::slotPopupDeleteChild()
// doc()->emitEndOperation( d->activeSheet->visibleRect( d->canvas ) );
}
-void View::popupColumnMenu( const QPoint & _point )
+void View::popupColumnMenu( const TQPoint & _point )
{
assert( d->activeSheet );
@@ -5639,7 +5639,7 @@ void View::popupColumnMenu( const QPoint & _point )
delete d->popupColumn ;
- d->popupColumn = new QPopupMenu( this );
+ d->popupColumn = new TQPopupMenu( this );
bool isProtected = d->activeSheet->isProtected();
@@ -5664,7 +5664,7 @@ void View::popupColumnMenu( const QPoint & _point )
}
d->actions->resizeColumn->plug( d->popupColumn );
- d->popupColumn->insertItem( i18n("Adjust Column"), this, SLOT(slotPopupAdjustColumn() ) );
+ d->popupColumn->insertItem( i18n("Adjust Column"), this, TQT_SLOT(slotPopupAdjustColumn() ) );
d->popupColumn->insertSeparator();
d->actions->insertColumn->plug( d->popupColumn );
d->actions->deleteColumn->plug( d->popupColumn );
@@ -5677,7 +5677,7 @@ void View::popupColumnMenu( const QPoint & _point )
Region::ConstIterator endOfList = d->selection->constEnd();
for (Region::ConstIterator it = d->selection->constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int col;
for (col = range.left(); col < range.right(); ++col)
{
@@ -5713,7 +5713,7 @@ void View::popupColumnMenu( const QPoint & _point )
}
}
- QObject::connect( d->popupColumn, SIGNAL(activated( int ) ), this, SLOT( slotActivateTool( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->popupColumn, TQT_SIGNAL(activated( int ) ), this, TQT_SLOT( slotActivateTool( int ) ) );
d->popupColumn->popup( _point );
}
@@ -5726,7 +5726,7 @@ void View::slotPopupAdjustColumn()
d->activeSheet->adjustColumn(*selectionInfo());
}
-void View::popupRowMenu( const QPoint & _point )
+void View::popupRowMenu( const TQPoint & _point )
{
assert( d->activeSheet );
@@ -5735,7 +5735,7 @@ void View::popupRowMenu( const QPoint & _point )
delete d->popupRow ;
- d->popupRow= new QPopupMenu();
+ d->popupRow= new TQPopupMenu();
bool isProtected = d->activeSheet->isProtected();
@@ -5760,7 +5760,7 @@ void View::popupRowMenu( const QPoint & _point )
}
d->actions->resizeRow->plug( d->popupRow );
- d->popupRow->insertItem( i18n("Adjust Row"), this, SLOT( slotPopupAdjustRow() ) );
+ d->popupRow->insertItem( i18n("Adjust Row"), this, TQT_SLOT( slotPopupAdjustRow() ) );
d->popupRow->insertSeparator();
d->actions->insertRow->plug( d->popupRow );
d->actions->deleteRow->plug( d->popupRow );
@@ -5772,7 +5772,7 @@ void View::popupRowMenu( const QPoint & _point )
Region::ConstIterator endOfList = d->selection->constEnd();
for (Region::ConstIterator it = d->selection->constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int row;
for (row = range.top(); row < range.bottom(); ++row)
{
@@ -5808,7 +5808,7 @@ void View::popupRowMenu( const QPoint & _point )
}
}
- QObject::connect( d->popupRow, SIGNAL( activated( int ) ), this, SLOT( slotActivateTool( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->popupRow, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivateTool( int ) ) );
d->popupRow->popup( _point );
}
@@ -5829,12 +5829,12 @@ void View::slotListChoosePopupMenu( )
assert( d->activeSheet );
delete d->popupListChoose;
- d->popupListChoose = new QPopupMenu();
+ d->popupListChoose = new TQPopupMenu();
int id = 0;
- QRect selection( d->selection->selection() );
+ TQRect selection( d->selection->selection() );
Cell * cell = d->activeSheet->cellAt( d->canvas->markerColumn(), d->canvas->markerRow() );
- QString tmp = cell->text();
- QStringList itemList;
+ TQString tmp = cell->text();
+ TQStringList itemList;
for ( int col = selection.left(); col <= selection.right(); ++col )
{
@@ -5847,7 +5847,7 @@ void View::slotListChoosePopupMenu( )
{
if ( c->value().isString() && c->text() != tmp && !c->text().isEmpty() )
{
- if ( itemList.findIndex( c->text() ) == -1 )
+ if ( itemList.tqfindIndex( c->text() ) == -1 )
itemList.append(c->text());
}
}
@@ -5873,7 +5873,7 @@ void View::slotListChoosePopupMenu( )
}
*/
- for ( QStringList::Iterator it = itemList.begin(); it != itemList.end();++it )
+ for ( TQStringList::Iterator it = itemList.begin(); it != itemList.end();++it )
d->popupListChoose->insertItem( (*it), id++ );
if ( id == 0 )
@@ -5886,28 +5886,28 @@ void View::slotListChoosePopupMenu( )
h = cell->extraHeight();
ty += h;
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
{
tx = canvasWidget()->width() - tx;
}
- QPoint p( (int)tx, (int)ty );
- QPoint p2 = d->canvas->mapToGlobal( p );
+ TQPoint p( (int)tx, (int)ty );
+ TQPoint p2 = d->canvas->mapToGlobal( p );
- if ( d->activeSheet->layoutDirection()==Sheet::RightToLeft )
+ if ( d->activeSheet->tqlayoutDirection()==Sheet::RightToLeft )
{
- p2.setX( p2.x() - d->popupListChoose->sizeHint().width() + 1 );
+ p2.setX( p2.x() - d->popupListChoose->tqsizeHint().width() + 1 );
}
d->popupListChoose->popup( p2 );
- QObject::connect( d->popupListChoose, SIGNAL( activated( int ) ),
- this, SLOT( slotItemSelected( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->popupListChoose, TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( slotItemSelected( int ) ) );
}
void View::slotItemSelected( int id )
{
- QString tmp = d->popupListChoose->text( id );
+ TQString tmp = d->popupListChoose->text( id );
int x = d->canvas->markerColumn();
int y = d->canvas->markerRow();
Cell * cell = d->activeSheet->nonDefaultCell( x, y );
@@ -5927,10 +5927,10 @@ void View::slotItemSelected( int id )
cell->setCellText( tmp );
d->editWidget->setText( tmp );
- doc()->emitEndOperation( QRect( x, y, 1, 1 ) );
+ doc()->emitEndOperation( TQRect( x, y, 1, 1 ) );
}
-void View::openPopupMenu( const QPoint & _point )
+void View::openPopupMenu( const TQPoint & _point )
{
assert( d->activeSheet );
delete d->popupMenu;
@@ -5938,7 +5938,7 @@ void View::openPopupMenu( const QPoint & _point )
if ( !koDocument()->isReadWrite() )
return;
- d->popupMenu = new QPopupMenu();
+ d->popupMenu = new TQPopupMenu();
EmbeddedObject *obj;
if ( d->canvas->isObjectSelected() && ( obj = d->canvas->getObject( d->canvas->mapFromGlobal( _point ), d->activeSheet ) ) && obj->isSelected() )
@@ -5999,7 +5999,7 @@ void View::openPopupMenu( const QPoint & _point )
if (activeSheet()->testListChoose(selectionInfo()))
{
d->popupMenu->insertSeparator();
- d->popupMenu->insertItem( i18n("Selection List..."), this, SLOT( slotListChoosePopupMenu() ) );
+ d->popupMenu->insertItem( i18n("Selection List..."), this, TQT_SLOT( slotListChoosePopupMenu() ) );
}
}
@@ -6011,15 +6011,15 @@ void View::openPopupMenu( const QPoint & _point )
{
d->popupMenuFirstToolId = 10;
int i = 0;
- QValueList<KDataToolInfo> tools = KDataToolInfo::query( "QString", "text/plain", doc()->instance() );
+ TQValueList<KDataToolInfo> tools = KDataToolInfo::query( TQSTRING_OBJECT_NAME_STRING, "text/plain", doc()->instance() );
if ( tools.count() > 0 )
{
d->popupMenu->insertSeparator();
- QValueList<KDataToolInfo>::Iterator entry = tools.begin();
+ TQValueList<KDataToolInfo>::Iterator entry = tools.begin();
for( ; entry != tools.end(); ++entry )
{
- QStringList lst = (*entry).userCommands();
- QStringList::ConstIterator it = lst.begin();
+ TQStringList lst = (*entry).userCommands();
+ TQStringList::ConstIterator it = lst.begin();
// ### Torben: Insert pixmaps here, too
for (; it != lst.end(); ++it )
@@ -6036,7 +6036,7 @@ void View::openPopupMenu( const QPoint & _point )
}
}
- QObject::connect( d->popupMenu, SIGNAL( activated( int ) ), this, SLOT( slotActivateTool( int ) ) );
+ TQT_BASE_OBJECT_NAME::connect( d->popupMenu, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( slotActivateTool( int ) ) );
}
}
@@ -6060,9 +6060,9 @@ void View::slotActivateTool( int _id )
return;
}
- QString text = activeSheet()->getWordSpelling( selectionInfo() );
+ TQString text = activeSheet()->getWordSpelling( selectionInfo() );
- if ( tool->run( entry->command, &text, "QString", "text/plain") )
+ if ( tool->run( entry->command, &text, TQSTRING_OBJECT_NAME_STRING, "text/plain") )
{
doc()->emitBeginOperation(false);
@@ -6097,7 +6097,7 @@ void View::deleteSelection()
void View::deleteSelectedObjects()
{
KMacroCommand * macroCommand = 0L;
- QPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
+ TQPtrListIterator<EmbeddedObject> it( doc()->embeddedObjects() );
for ( ; it.current() ; ++it )
{
if ( it.current()->sheet() == canvasWidget()->activeSheet() && it.current()->isSelected() )
@@ -6245,14 +6245,14 @@ void View::defaultSelection()
void View::slotInsert()
{
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
InsertDialog dlg( this, "InsertDialog", r, InsertDialog::Insert );
dlg.exec();
}
void View::slotRemove()
{
- QRect r( d->selection->selection() );
+ TQRect r( d->selection->selection() );
InsertDialog dlg( this, "Remove", r, InsertDialog::Remove );
dlg.exec();
}
@@ -6286,7 +6286,7 @@ void View::slotInsertCellCopy()
void View::setAreaName()
{
- AreaDialog dlg( this, "Area Name",QPoint(d->canvas->markerColumn(), d->canvas->markerRow()) );
+ AreaDialog dlg( this, "Area Name",TQPoint(d->canvas->markerColumn(), d->canvas->markerRow()) );
dlg.exec();
}
@@ -6353,7 +6353,7 @@ void View::equalizeColumn()
}
-void View::layoutDlg()
+void View::tqlayoutDlg()
{
if (!activeSheet())
return;
@@ -6370,9 +6370,9 @@ void View::extraProperties()
d->m_propertyEditor = new PropertyEditor( this, "KPrPropertyEditor", d->activeSheet, doc() );
d->m_propertyEditor->setCaption( i18n( "Properties" ) );
- connect( d->m_propertyEditor, SIGNAL( propertiesOk() ), this, SLOT( propertiesOk() ) );
+ connect( d->m_propertyEditor, TQT_SIGNAL( propertiesOk() ), this, TQT_SLOT( propertiesOk() ) );
d->m_propertyEditor->exec();
- disconnect( d->m_propertyEditor, SIGNAL( propertiesOk() ), this, SLOT( propertiesOk() ) );
+ disconnect( d->m_propertyEditor, TQT_SIGNAL( propertiesOk() ), this, TQT_SLOT( propertiesOk() ) );
delete d->m_propertyEditor;
d->m_propertyEditor = 0;
@@ -6401,7 +6401,7 @@ void View::styleDialog()
d->activeSheet->setRegionPaintDirty( d->activeSheet->visibleRect( d->canvas ) );
}
if ( d->canvas )
- d->canvas->repaint();
+ d->canvas->tqrepaint();
}
void View::paperLayoutDlg()
@@ -6593,11 +6593,11 @@ void View::createStyleFromCell()
if ( !d->activeSheet )
return;
- QPoint p( d->selection->selection().topLeft() );
+ TQPoint p( d->selection->selection().topLeft() );
Cell * cell = d->activeSheet->nonDefaultCell( p.x(), p.y() );
bool ok = false;
- QString styleName( "" );
+ TQString styleName( "" );
while( true )
{
@@ -6629,12 +6629,12 @@ void View::createStyleFromCell()
doc()->styleManager()->m_styles[ styleName ] = style;
cell->format()->setStyle( style );
- QStringList lst( d->actions->selectStyle->items() );
+ TQStringList lst( d->actions->selectStyle->items() );
lst.push_back( styleName );
d->actions->selectStyle->setItems( lst );
}
-void View::styleSelected( const QString & style )
+void View::styleSelected( const TQString & style )
{
if (d->activeSheet )
{
@@ -6718,7 +6718,7 @@ void View::insertChart()
KMessageBox::error( this, i18n("Area too large."));
return;
}
- QValueList<KoDocumentEntry> vec = KoDocumentEntry::query( true, "'KOfficeChart' in ServiceTypes" );
+ TQValueList<KoDocumentEntry> vec = KoDocumentEntry::query( true, "'KOfficeChart' in ServiceTypes" );
if ( vec.isEmpty() )
{
KMessageBox::error( this, i18n("No charting component registered.") );
@@ -6748,9 +6748,9 @@ void View::zoomMinus()
if ( d->activeSheet != 0L )
d->activeSheet->setLayoutDirtyFlag();
- d->canvas->repaint();
- d->vBorderWidget->repaint();
- d->hBorderWidget->repaint();
+ d->canvas->tqrepaint();
+ d->vBorderWidget->tqrepaint();
+ d->hBorderWidget->tqrepaint();
}
void View::zoomPlus()
@@ -6763,9 +6763,9 @@ void View::zoomPlus()
if ( d->activeSheet != 0L )
d->activeSheet->setLayoutDirtyFlag();
- d->canvas->repaint();
- d->vBorderWidget->repaint();
- d->hBorderWidget->repaint();
+ d->canvas->tqrepaint();
+ d->vBorderWidget->tqrepaint();
+ d->hBorderWidget->tqrepaint();
}
*/
@@ -6818,8 +6818,8 @@ void View::slotRename()
}
bool ok;
- QString activeName = sheet->sheetName();
- QString newName = KInputDialog::getText( i18n("Rename Sheet"),i18n("Enter name:"), activeName, &ok, this );
+ TQString activeName = sheet->sheetName();
+ TQString newName = KInputDialog::getText( i18n("Rename Sheet"),i18n("Enter name:"), activeName, &ok, this );
if( !ok ) return;
@@ -6830,11 +6830,11 @@ void View::slotRename()
i18n("Change Sheet Name") );
newName = newName.simplifyWhiteSpace();
- int n = newName.find('-');
+ int n = newName.tqfind('-');
if ( n > -1 ) newName[n] = '_';
- n = newName.find('!');
+ n = newName.tqfind('!');
if ( n > -1 ) newName[n] = '_';
- n = newName.find('$');
+ n = newName.tqfind('$');
if ( n > -1 ) newName[n] = '_';
newName = KInputDialog::getText( i18n("Rename Sheet"),i18n("Enter name:"), newName, &ok, this );
@@ -6874,7 +6874,7 @@ void View::slotRename()
}
}
-void View::setText (const QString & _text, bool array)
+void View::setText (const TQString & _text, bool array)
{
if ( d->activeSheet == 0L )
return;
@@ -6911,9 +6911,9 @@ void View::slotAddSheet( Sheet *_sheet )
void View::slotRefreshView()
{
refreshView();
- d->canvas->repaint();
- d->vBorderWidget->repaint();
- d->hBorderWidget->repaint();
+ d->canvas->tqrepaint();
+ d->vBorderWidget->tqrepaint();
+ d->hBorderWidget->tqrepaint();
}
void View::slotUpdateView( Sheet *_sheet )
@@ -6928,7 +6928,7 @@ void View::slotUpdateView( Sheet *_sheet )
void View::slotUpdateView( Sheet * _sheet, const Region& region )
{
- // qDebug("void View::slotUpdateView( Sheet *_sheet, const QRect& %i %i|%i %i )\n",_rect.left(),_rect.top(),_rect.right(),_rect.bottom());
+ // qDebug("void View::slotUpdateView( Sheet *_sheet, const TQRect& %i %i|%i %i )\n",_rect.left(),_rect.top(),_rect.right(),_rect.bottom());
// Do we display this sheet ?
if ( _sheet != d->activeSheet )
@@ -6941,7 +6941,7 @@ void View::slotUpdateView( Sheet * _sheet, const Region& region )
void View::slotUpdateView( EmbeddedObject *obj )
{
- d->canvas->repaintObject( obj );
+ d->canvas->tqrepaintObject( obj );
}
void View::slotUpdateHBorder( Sheet * _sheet )
@@ -7023,7 +7023,7 @@ void View::slotChangeSelection(const KSpread::Region& changedRegion)
// Send some event around. This is read for example
// by the calculator plugin.
// SelectionChanged ev(*selectionInfo(), activeSheet()->name());
-// QApplication::sendEvent( this, &ev );
+// TQApplication::sendEvent( this, &ev );
d->canvas->setSelectionChangePaintDirty( d->activeSheet, changedRegion );
d->vBorderWidget->update();
@@ -7080,7 +7080,7 @@ void View::calcStatusBarOp()
Sheet * sheet = activeSheet();
ValueCalc* calc = d->doc->calc();
Value val;
- QRect tmpRect(d->selection->selection());
+ TQRect tmpRect(d->selection->selection());
MethodOfCalc tmpMethod = doc()->getTypeOfCalc();
if ( tmpMethod != NoneCalc )
{
@@ -7114,8 +7114,8 @@ void View::calcStatusBarOp()
}
- QString res = d->doc->converter()->asString (val).asString ();
- QString tmp;
+ TQString res = d->doc->converter()->asString (val).asString ();
+ TQString tmp;
switch(tmpMethod )
{
case SumOfNumber:
@@ -7143,7 +7143,7 @@ void View::calcStatusBarOp()
//doc()->emitBeginOperation();
if ( d->calcLabel )
- d->calcLabel->setText(QString(" ") + tmp + ' ');
+ d->calcLabel->setText(TQString(" ") + tmp + ' ');
//doc()->emitEndOperation();
}
@@ -7153,8 +7153,8 @@ void View::statusBarClicked(int _id)
return;
if ( _id == 0 ) //menu calc
{
- QPoint mousepos = QCursor::pos();
- ((QPopupMenu*)factory()->container( "calc_popup" , this ) )->popup( mousepos );
+ TQPoint mousepos = TQCursor::pos();
+ ((TQPopupMenu*)factory()->container( "calc_popup" , this ) )->popup( mousepos );
}
}
@@ -7194,9 +7194,9 @@ void View::menuCalc( bool )
}
-QWMatrix View::matrix() const
+TQWMatrix View::matrix() const
{
- QWMatrix m;
+ TQWMatrix m;
m.scale( d->doc->zoomedResolutionX(),
d->doc->zoomedResolutionY() );
m.translate( - d->canvas->xOffset(), - d->canvas->yOffset() );
@@ -7209,7 +7209,7 @@ void View::transformPart()
if ( d->transformToolBox.isNull() )
{
- d->transformToolBox = new KoTransformToolBox( selectedChild(), topLevelWidget() );
+ d->transformToolBox = new KoTransformToolBox( selectedChild(), tqtopLevelWidget() );
d->transformToolBox->show();
d->transformToolBox->setDocumentChild( selectedChild() );
@@ -7236,7 +7236,7 @@ void View::slotChildSelected( KoDocumentChild* /*ch*/ )
doc()->emitBeginOperation( false );
- d->activeSheet->setRegionPaintDirty(QRect(QPoint(0,0), QPoint(KS_colMax, KS_rowMax)));
+ d->activeSheet->setRegionPaintDirty(TQRect(TQPoint(0,0), TQPoint(KS_colMax, KS_rowMax)));
doc()->emitEndOperation();
paintUpdates();
@@ -7257,7 +7257,7 @@ void View::slotChildUnselected( KoDocumentChild* )
doc()->emitBeginOperation( false );
- d->activeSheet->setRegionPaintDirty(QRect(QPoint(0,0), QPoint(KS_colMax, KS_rowMax)));
+ d->activeSheet->setRegionPaintDirty(TQRect(TQPoint(0,0), TQPoint(KS_colMax, KS_rowMax)));
doc()->emitEndOperation();
paintUpdates();
}
@@ -7280,7 +7280,7 @@ DCOPObject * View::dcopObject()
return d->dcop;
}
-QWidget * View::canvas() const
+TQWidget * View::canvas() const
{
return canvasWidget();
}
@@ -7319,7 +7319,7 @@ void View::guiActivateEvent( KParts::GUIActivateEvent *ev )
{
/*if (d->calcLabel)
{
- disconnect(d->calcLabel,SIGNAL(pressed( int )),this,SLOT(statusBarClicked(int)));
+ disconnect(d->calcLabel,TQT_SIGNAL(pressed( int )),this,TQT_SLOT(statusBarClicked(int)));
}*/
}
}
@@ -7327,7 +7327,7 @@ void View::guiActivateEvent( KParts::GUIActivateEvent *ev )
KoView::guiActivateEvent( ev );
}
-void View::popupTabBarMenu( const QPoint & _point )
+void View::popupTabBarMenu( const TQPoint & _point )
{
if ( !koDocument()->isReadWrite() || !factory() )
return;
@@ -7354,7 +7354,7 @@ void View::popupTabBarMenu( const QPoint & _point )
d->actions->hideSheet->setEnabled( false );
d->actions->removeSheet->setEnabled( false );
}
- static_cast<QPopupMenu*>(factory()->container("menupage_popup",this))->popup(_point);
+ static_cast<TQPopupMenu*>(factory()->container("menupage_popup",this))->popup(_point);
}
}
@@ -7369,7 +7369,7 @@ void View::updateBorderButton()
void View::removeSheet( Sheet *_t )
{
doc()->emitBeginOperation(false);
- QString m_tablName=_t->sheetName();
+ TQString m_tablName=_t->sheetName();
d->tabBar->removeTab( m_tablName );
setActiveSheet( doc()->map()->findSheet( doc()->map()->visibleSheets().first() ));
@@ -7382,7 +7382,7 @@ void View::removeSheet( Sheet *_t )
void View::insertSheet( Sheet* sheet )
{
doc()->emitBeginOperation( false );
- QString tabName = sheet->sheetName();
+ TQString tabName = sheet->sheetName();
if ( !sheet->isHidden() )
{
d->tabBar->addTab( tabName );
@@ -7394,7 +7394,7 @@ void View::insertSheet( Sheet* sheet )
doc()->emitEndOperation( sheet->visibleRect( d->canvas ) );
}
-QColor View::borderColor() const
+TQColor View::borderColor() const
{
return d->actions->borderColor->color();
}
@@ -7442,21 +7442,21 @@ void View::commandExecuted()
calcStatusBarOp();
}
-void View::initialiseMarkerFromSheet( Sheet *_sheet, const QPoint &point )
+void View::initialiseMarkerFromSheet( Sheet *_sheet, const TQPoint &point )
{
- d->savedMarkers.replace( _sheet, point);
+ d->savedMarkers.tqreplace( _sheet, point);
}
-QPoint View::markerFromSheet( Sheet* sheet ) const
+TQPoint View::markerFromSheet( Sheet* sheet ) const
{
- QMapIterator<Sheet*, QPoint> it = d->savedMarkers.find(sheet);
- QPoint newMarker = (it == d->savedMarkers.end()) ? QPoint(1,1) : *it;
+ TQMapIterator<Sheet*, TQPoint> it = d->savedMarkers.tqfind(sheet);
+ TQPoint newMarker = (it == d->savedMarkers.end()) ? TQPoint(1,1) : *it;
return newMarker;
}
KoPoint View::offsetFromSheet( Sheet* sheet ) const
{
- QMapIterator<Sheet*, KoPoint> it = d->savedOffsets.find(sheet);
+ TQMapIterator<Sheet*, KoPoint> it = d->savedOffsets.tqfind(sheet);
KoPoint offset = (it == d->savedOffsets.end()) ? KoPoint() : *it;
return offset;
}
@@ -7466,18 +7466,18 @@ void View::saveCurrentSheetSelection()
/* save the current selection on this sheet */
if (d->activeSheet != NULL)
{
- d->savedAnchors.replace(d->activeSheet, d->selection->anchor());
+ d->savedAnchors.tqreplace(d->activeSheet, d->selection->anchor());
kdDebug() << " Current scrollbar vert value: " << d->canvas->vertScrollBar()->value() << endl;
kdDebug() << "Saving marker pos: " << d->selection->marker() << endl;
- d->savedMarkers.replace(d->activeSheet, d->selection->marker());
- d->savedOffsets.replace(d->activeSheet, KoPoint(d->canvas->xOffset(),
+ d->savedMarkers.tqreplace(d->activeSheet, d->selection->marker());
+ d->savedOffsets.tqreplace(d->activeSheet, KoPoint(d->canvas->xOffset(),
d->canvas->yOffset()));
}
}
-void View::handleDamages( const QValueList<Damage*>& damages )
+void View::handleDamages( const TQValueList<Damage*>& damages )
{
- QValueList<Damage*>::ConstIterator it;
+ TQValueList<Damage*>::ConstIterator it;
for( it = damages.begin(); it != damages.end(); ++it )
{
Damage* damage = *it;
@@ -7488,7 +7488,7 @@ void View::handleDamages( const QValueList<Damage*>& damages )
CellDamage* cd = static_cast<CellDamage*>( damage );
Cell* damagedCell = cd->cell();
Sheet* damagedSheet = damagedCell->sheet();
- QRect drect( damagedCell->column(), damagedCell->row(), 1, 1 );
+ TQRect drect( damagedCell->column(), damagedCell->row(), 1, 1 );
damagedSheet->setRegionPaintDirty( drect );
paintUpdates();
}
@@ -7505,8 +7505,8 @@ void View::handleDamages( const QValueList<Damage*>& damages )
b = damagedSheet->nextCellBinding() )
b->cellChanged( 0 );
- d->activeSheet->setRegionPaintDirty( QRect(QPoint(0,0),
- QPoint(KS_colMax, KS_rowMax)));
+ d->activeSheet->setRegionPaintDirty( TQRect(TQPoint(0,0),
+ TQPoint(KS_colMax, KS_rowMax)));
paintUpdates();
refreshView();
@@ -7535,9 +7535,9 @@ void View::runInspector()
delete ins;
}
-QColor View::highlightColor()
+TQColor View::highlightColor()
{
- return QApplication::palette().active().highlight().light( 175 );
+ return TQApplication::tqpalette().active().highlight().light( 175 );
}
} // namespace KSpread
diff --git a/kspread/kspread_view.h b/kspread/kspread_view.h
index 52794a32..04efd164 100644
--- a/kspread/kspread_view.h
+++ b/kspread/kspread_view.h
@@ -28,10 +28,10 @@
#ifndef KSPREAD_VIEW
#define KSPREAD_VIEW
-#include <qpoint.h>
-#include <qptrlist.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqpoint.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
#include <kprinter.h>
#include <kdeprint/kprintdialogpage.h>
@@ -40,7 +40,7 @@
#include <KoView.h>
-class QScrollBar;
+class TQScrollBar;
class KoDocumentEntry;
class KoTabBar;
@@ -80,30 +80,31 @@ class EmbeddedObject;
class KPSheetSelectPage : public KPrintDialogPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- KPSheetSelectPage( QWidget *parent = 0 );
+ KPSheetSelectPage( TQWidget *tqparent = 0 );
// ~KPSheetSelectPage();
// //reimplement virtual functions
/**
* @see printOptionPrefix()
*/
- void getOptions( QMap<QString,QString>& opts, bool incldef = false );
+ void getOptions( TQMap<TQString,TQString>& opts, bool incldef = false );
/**
* @see printOptionPrefix()
*/
- void setOptions( const QMap<QString,QString>& opts );
+ void setOptions( const TQMap<TQString,TQString>& opts );
/**
* @return false if no sheet is selected for printing.
*/
- bool isValid( QString& msg );
+ bool isValid( TQString& msg );
/**
* @return list of sheets that will be printed, in correct order.
*/
- QStringList selectedSheets();
+ TQStringList selectedSheets();
/**
* Removes all sheets from the list of selected sheets.
@@ -121,25 +122,25 @@ class KPSheetSelectPage : public KPrintDialogPage
* @param index the index of the print order, starting at 0
* @return the string that is used in the printoption for given index
*/
- static QString printOptionForIndex(unsigned int index);
+ static TQString printOptionForIndex(unsigned int index);
/**
* @param prt the printer from which the options should be read.
* @return list of sheets to print in correct order configured for given printer.
*/
- static QStringList selectedSheets(KPrinter &prt);
+ static TQStringList selectedSheets(KPrinter &prt);
public slots:
/**
* Inserts given sheet to the list of available sheets.
*/
- void prependAvailableSheet(const QString& sheetname);
+ void prependAvailableSheet(const TQString& sheetname);
/**
* Inserts given sheet to the list of sheets for printing at the top.
*/
- void prependSelectedSheet(const QString& sheetname);
+ void prependSelectedSheet(const TQString& sheetname);
protected slots:
@@ -188,10 +189,11 @@ class KSPREAD_EXPORT View : public KoView
friend class Canvas;
Q_OBJECT
+ TQ_OBJECT
public:
/** Creates a new view */
- View( QWidget *_parent, const char *_name,
+ View( TQWidget *_parent, const char *_name,
Doc *doc );
/** Destroys the view */
@@ -209,10 +211,10 @@ public:
VBorder* vBorderWidget() const;
/** Returns the horizontal scrollbar */
- QScrollBar* horzScrollBar() const;
+ TQScrollBar* horzScrollBar() const;
/** Returns the vertical scrollbar */
- QScrollBar* vertScrollBar() const;
+ TQScrollBar* vertScrollBar() const;
/** Returns the editor widget */
KSpread::EditWidget* editWidget() const;
@@ -233,16 +235,16 @@ public:
const Sheet* activeSheet() const;
Sheet* activeSheet();
- void openPopupMenu( const QPoint &_global );
- void popupRowMenu(const QPoint & _point ) ;
- void popupColumnMenu( const QPoint & _point);
+ void openPopupMenu( const TQPoint &_global );
+ void popupRowMenu(const TQPoint & _point ) ;
+ void popupColumnMenu( const TQPoint & _point);
// void showFormulaToolBar( bool show );
/**
* Used by @ref EditWidget. Sets the text of the active cell(s).
*/
- void setText( const QString& _text, bool array = false );
+ void setText( const TQString& _text, bool array = false );
void enableUndo( bool _b );
void enableRedo( bool _b );
@@ -251,22 +253,22 @@ public:
/**
*
- * @param _geometry is the zoomed geometry of the new child.
+ * @param _tqgeometry is the zoomed tqgeometry of the new child.
* @param _entry is the entry to insert.
*
* @todo check validity of @p _entry docs.
*/
- void insertChart( const QRect& _geometry, KoDocumentEntry& _entry );
+ void insertChart( const TQRect& _tqgeometry, KoDocumentEntry& _entry );
/**
*
- * @param _geometry is the geometry of the new child.
+ * @param _tqgeometry is the tqgeometry of the new child.
* @param _entry is the entry to insert.
*
* @todo check validity of @p _entry docs.
*/
- void insertChild( const QRect& _geometry, KoDocumentEntry& _entry );
+ void insertChild( const TQRect& _tqgeometry, KoDocumentEntry& _entry );
- // void insertPicture( const QRect& _geometry, KURL& _file );
+ // void insertPicture( const TQRect& _tqgeometry, KURL& _file );
virtual void print( KPrinter &printer );
virtual void setupPrinter( KPrinter &printer );
@@ -290,14 +292,14 @@ public:
void closeEditor();
virtual DCOPObject* dcopObject();
- virtual QWidget *canvas() const;
+ virtual TQWidget *canvas() const;
virtual int canvasXOffset() const;
virtual int canvasYOffset() const;
/**
* @reimp
*/
- KoDocument *hitTest( const QPoint &pos );
+ KoDocument *hitTest( const TQPoint &pos );
void initConfig();
@@ -311,7 +313,7 @@ public:
void removeSheet( Sheet *_t );
void insertSheet( Sheet* sheet );
- QColor borderColor() const;
+ TQColor borderColor() const;
Selection* selectionInfo() const;
Selection* choice() const;
@@ -319,8 +321,8 @@ public:
void updateShowSheetMenu();
/**
- * Mark all selected cells / regions of cells as 'dirty' (ie. requiring a repaint)
- * They will be repainted on the next call to paintUpdates()
+ * Mark all selected cells / regions of cells as 'dirty' (ie. requiring a tqrepaint)
+ * They will be tqrepainted on the next call to paintUpdates()
*/
void markSelectionAsDirty();
@@ -336,12 +338,12 @@ public:
bool isInsertingObject();
- bool showSheet(const QString& sheetName);
+ bool showSheet(const TQString& sheetName);
/**
* @return marker for @p sheet
*/
- QPoint markerFromSheet( Sheet* sheet ) const;
+ TQPoint markerFromSheet( Sheet* sheet ) const;
/**
* @return scroll offset for @p sheet
@@ -359,7 +361,7 @@ public:
/**
* Returns the default color for highlighting cells and column / row headers
*/
- static QColor highlightColor();
+ static TQColor highlightColor();
public slots:
/**
@@ -404,11 +406,11 @@ public slots:
void togglePageBorders( bool );
void toggleProtectSheet( bool );
void toggleProtectDoc( bool );
- void viewZoom( const QString & );
- void find();
+ void viewZoom( const TQString & );
+ void tqfind();
void findNext();
void findPrevious();
- void replace();
+ void tqreplace();
void conditional();
void validity();
void insertSeries();
@@ -438,10 +440,10 @@ public slots:
void precisionMinus();
void precisionPlus();
void createStyleFromCell();
- void styleSelected( const QString & );
+ void styleSelected( const TQString & );
void setSelectionPrecision(int delta);
void percent(bool b);
- void fontSelected( const QString &_font );
+ void fontSelected( const TQString &_font );
void fontSizeSelected( int size );
void bold( bool b );
void italic( bool b );
@@ -458,12 +460,12 @@ public slots:
void showColumn();
void showSelColumns();
void insertMathExpr();
- void formulaSelection( const QString &_math );
+ void formulaSelection( const TQString &_math );
void changeTextColor();
void changeBackgroundColor();
void sortInc();
void sortDec();
- void layoutDlg();
+ void tqlayoutDlg();
void extraProperties();
void borderBottom();
void borderRight();
@@ -481,16 +483,16 @@ public slots:
void decreaseFontSize();
void setSelectionFontSize(int size);
- void setSelectionTextColor(const QColor &txtColor);
- void setSelectionBackgroundColor(const QColor &bgColor);
- void setSelectionBorderColor(const QColor &bdColor);
+ void setSelectionTextColor(const TQColor &txtColor);
+ void setSelectionBackgroundColor(const TQColor &bgColor);
+ void setSelectionBorderColor(const TQColor &bdColor);
- void setSelectionLeftBorderColor(const QColor &color);
- void setSelectionRightBorderColor(const QColor &color);
- void setSelectionTopBorderColor(const QColor &color);
- void setSelectionBottomBorderColor(const QColor &color);
- void setSelectionAllBorderColor(const QColor &color);
- void setSelectionOutlineBorderColor(const QColor &color);
+ void setSelectionLeftBorderColor(const TQColor &color);
+ void setSelectionRightBorderColor(const TQColor &color);
+ void setSelectionTopBorderColor(const TQColor &color);
+ void setSelectionBottomBorderColor(const TQColor &color);
+ void setSelectionAllBorderColor(const TQColor &color);
+ void setSelectionOutlineBorderColor(const TQColor &color);
void upper();
void lower();
@@ -500,7 +502,7 @@ public slots:
void firstLetterUpper();
void verticalText(bool );
void addModifyComment();
- void setSelectionComment(QString comment);
+ void setSelectionComment(TQString comment);
void removeComment();
void changeAngle();
void setSelectionAngle(int angle);
@@ -539,7 +541,7 @@ public slots:
* Switch the active sheet to the name. This slot is connected to the tab bar
* and activated when the user selects a new sheet in the tab bar.
*/
- void changeSheet( const QString& _name );
+ void changeSheet( const TQString& _name );
/**
* Switch the active sheet to the next visible sheet. Does nothing if the current
@@ -588,14 +590,14 @@ public slots:
/**
* Shows context menu when tabbar is double-clicked.
*/
- void popupTabBarMenu( const QPoint& );
+ void popupTabBarMenu( const TQPoint& );
- void handleDamages( const QValueList<Damage*>& damages );
+ void handleDamages( const TQValueList<Damage*>& damages );
void runInternalTests();
void runInspector();
- void initialiseMarkerFromSheet( Sheet *_sheet, const QPoint &point );
+ void initialiseMarkerFromSheet( Sheet *_sheet, const TQPoint &point );
/**
* write in statusBar result of calc (Min, or Max, average, sum, count)
@@ -615,7 +617,7 @@ protected slots:
/**
* Invoked if the popup menu for an embedded document should be opened.
*/
- void popupChildMenu( KoChild*, const QPoint& global_pos );
+ void popupChildMenu( KoChild*, const TQPoint& global_pos );
/**
* Invoked when the "Delete Embedded Document" option from an embedded document's
@@ -636,15 +638,15 @@ protected slots:
void slotListChoosePopupMenu( );
/**
- * Called by find/replace (findNext) when it found a match
+ * Called by tqfind/tqreplace (findNext) when it found a match
*/
- void slotHighlight( const QString &text, int matchingIndex, int matchedLength );
+ void slotHighlight( const TQString &text, int matchingIndex, int matchedLength );
/**
* Called when replacing text in a cell
*/
- void slotReplace( const QString &newText, int, int, int );
+ void slotReplace( const TQString &newText, int, int, int );
- void slotSpecialChar( QChar c, const QString & _font );
+ void slotSpecialChar( TQChar c, const TQString & _font );
void slotSpecialCharDlgClosed();
void propertiesOk();
@@ -668,7 +670,7 @@ public slots:
void slotScrollChoice(const Region&);
void slotAddSheet( Sheet *_sheet );
void slotUpdateChildGeometry( EmbeddedKOfficeObject *_child );
- void slotSheetRenamed( Sheet* sheet, const QString& old_name );
+ void slotSheetRenamed( Sheet* sheet, const TQString& old_name );
void slotSheetHidden( Sheet*_sheet );
void slotSheetShown( Sheet*_sheet );
void slotSheetRemoved( Sheet*_sheet );
@@ -676,12 +678,12 @@ public slots:
void extraSpelling();
void spellCheckerReady();
- void spellCheckerMisspelling( const QString &, const QStringList &, unsigned int);
- void spellCheckerCorrected( const QString &, const QString &, unsigned int);
- void spellCheckerDone( const QString & );
+ void spellCheckerMisspelling( const TQString &, const TQStringList &, unsigned int);
+ void spellCheckerCorrected( const TQString &, const TQString &, unsigned int);
+ void spellCheckerDone( const TQString & );
void spellCheckerFinished( );
- void spellCheckerIgnoreAll( const QString & word);
- void spellCheckerReplaceAll( const QString &, const QString &);
+ void spellCheckerIgnoreAll( const TQString & word);
+ void spellCheckerReplaceAll( const TQString &, const TQString &);
void startKSpell();
/**
@@ -697,10 +699,10 @@ public slots:
protected:
- virtual void keyPressEvent ( QKeyEvent * _ev );
- virtual void resizeEvent( QResizeEvent *_ev );
+ virtual void keyPressEvent ( TQKeyEvent * _ev );
+ virtual void resizeEvent( TQResizeEvent *_ev );
- virtual QWMatrix matrix() const;
+ virtual TQWMatrix matrix() const;
/**
* Returns the position of the top-left point of the currently selected cell in document coordinates.
diff --git a/kspread/ksprsavinginfo.h b/kspread/ksprsavinginfo.h
index 58e069a0..0dff20e2 100644
--- a/kspread/ksprsavinginfo.h
+++ b/kspread/ksprsavinginfo.h
@@ -31,21 +31,21 @@ public:
KSPRSavingInfo() {styleNumber = 0;}
~KSPRSavingInfo() {}
struct sheetDef {
- QString sheetName;
+ TQString sheetName;
Sheet *sheetIndex;
};
- typedef QMap<QString, sheetDef> StylePageMap;
+ typedef TQMap<TQString, sheetDef> StylePageMap;
- void appendMasterPage( const QString &styleName, const sheetDef &_def ){ m_masterPageStyle.insert( styleName,_def );}
+ void appendMasterPage( const TQString &styleName, const sheetDef &_def ){ m_masterPageStyle.insert( styleName,_def );}
- QString masterPageName( const QString &name) {
+ TQString masterPageName( const TQString &name) {
sheetDef _def = m_masterPageStyle[name];
return _def.sheetName;}
- sheetDef pageDef( const QString &name) { return m_masterPageStyle[name]; }
+ sheetDef pageDef( const TQString &name) { return m_masterPageStyle[name]; }
- bool findStyleName(const QString & name) const { return (m_masterPageStyle.find( name ) != m_masterPageStyle.end());}
+ bool findStyleName(const TQString & name) const { return (m_masterPageStyle.tqfind( name ) != m_masterPageStyle.end());}
StylePageMap stylePageMap() const { return m_masterPageStyle;}
diff --git a/kspread/manipulator.cc b/kspread/manipulator.cc
index 0bca8c81..31a33a0f 100644
--- a/kspread/manipulator.cc
+++ b/kspread/manipulator.cc
@@ -19,7 +19,7 @@
#include <float.h>
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <klocale.h>
@@ -169,7 +169,7 @@ bool Manipulator::process(Element* element)
return true;
}
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
if (m_format && element->isColumn())
{
for (int col = range.left(); col <= range.right(); ++col)
@@ -238,19 +238,19 @@ FormatManipulator::FormatManipulator()
{
m_properties = 0;
// initialize pens with invalid color
- m_topBorderPen = QPen(QColor(), 0, Qt::NoPen);
- m_bottomBorderPen = QPen(QColor(), 0, Qt::NoPen);
- m_leftBorderPen = QPen(QColor(), 0, Qt::NoPen);
- m_rightBorderPen = QPen(QColor(), 0, Qt::NoPen);
- m_horizontalPen = QPen(QColor(), 0, Qt::NoPen);
- m_verticalPen = QPen(QColor(), 0, Qt::NoPen);
- m_fallDiagonalPen = QPen(QColor(), 0, Qt::NoPen);
- m_goUpDiagonalPen = QPen(QColor(), 0, Qt::NoPen);
+ m_topBorderPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_bottomBorderPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_leftBorderPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_rightBorderPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_horizontalPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_verticalPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_fallDiagonalPen = TQPen(TQColor(), 0, TQt::NoPen);
+ m_goUpDiagonalPen = TQPen(TQColor(), 0, TQt::NoPen);
}
FormatManipulator::~FormatManipulator()
{
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
delete (*it2).l;
@@ -263,7 +263,7 @@ FormatManipulator::~FormatManipulator()
}
m_lstRedoFormats.clear();
- QValueList<layoutColumn>::Iterator it3;
+ TQValueList<tqlayoutColumn>::Iterator it3;
for ( it3 = m_lstColFormats.begin(); it3 != m_lstColFormats.end(); ++it3 )
{
delete (*it3).l;
@@ -276,7 +276,7 @@ FormatManipulator::~FormatManipulator()
}
m_lstRedoColFormats.clear();
- QValueList<layoutRow>::Iterator it4;
+ TQValueList<tqlayoutRow>::Iterator it4;
for ( it4 = m_lstRowFormats.begin(); it4 != m_lstRowFormats.end(); ++it4 )
{
delete (*it4).l;
@@ -302,7 +302,7 @@ bool FormatManipulator::preProcessing ()
bool FormatManipulator::process (Element *element)
{
// see what is selected; if nothing, take marker position
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
if (!m_reverse) {
@@ -391,7 +391,7 @@ bool FormatManipulator::process (Element *element)
{ // undoing
if( element->isColumn() )
{
- QValueList<layoutColumn>::Iterator it2;
+ TQValueList<tqlayoutColumn>::Iterator it2;
for ( it2 = m_lstColFormats.begin(); it2 != m_lstColFormats.end(); ++it2 )
{
ColumnFormat * col = m_sheet->nonDefaultColumnFormat( (*it2).col );
@@ -400,7 +400,7 @@ bool FormatManipulator::process (Element *element)
}
else if( element->isRow() )
{
- QValueList<layoutRow>::Iterator it2;
+ TQValueList<tqlayoutRow>::Iterator it2;
for ( it2 = m_lstRowFormats.begin(); it2 != m_lstRowFormats.end(); ++it2 )
{
RowFormat * row = m_sheet->nonDefaultRowFormat( (*it2).row );
@@ -408,7 +408,7 @@ bool FormatManipulator::process (Element *element)
}
}
- QValueList<layoutCell>::Iterator it2;
+ TQValueList<tqlayoutCell>::Iterator it2;
for ( it2 = m_lstFormats.begin(); it2 != m_lstFormats.end(); ++it2 )
{
Cell *cell = m_sheet->nonDefaultCell( (*it2).col,(*it2).row );
@@ -421,12 +421,12 @@ bool FormatManipulator::process (Element *element)
return true;
}
-void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
- QValueList<layoutColumn> & listCol,
- QValueList<layoutRow> & listRow)
+void FormatManipulator::copyFormat(TQValueList<tqlayoutCell> & list,
+ TQValueList<tqlayoutColumn> & listCol,
+ TQValueList<tqlayoutRow> & listRow)
{
- QValueList<layoutCell>::Iterator end = list.end();
- for (QValueList<layoutCell>::Iterator it2 = list.begin(); it2 != end; ++it2)
+ TQValueList<tqlayoutCell>::Iterator end = list.end();
+ for (TQValueList<tqlayoutCell>::Iterator it2 = list.begin(); it2 != end; ++it2)
{
delete (*it2).l;
}
@@ -436,7 +436,7 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
Region::ConstIterator endOfList(cells().constEnd());
for (Region::ConstIterator it = cells().constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
int bottom = range.bottom();
int right = range.right();
@@ -445,20 +445,20 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
/* Don't need to go through the loop twice...
for (int i = range.left(); i <= right; ++i)
{
- layoutColumn tmplayout;
- tmplayout.col = i;
- tmplayout.l = new ColumnFormat( m_sheet, i );
- tmplayout.l->copy( *(m_sheet->columnFormat( i )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = i;
+ tmptqlayout.l = new ColumnFormat( m_sheet, i );
+ tmptqlayout.l->copy( *(m_sheet->columnFormat( i )) );
+ listCol.append(tmptqlayout);
}
*/
for ( int col = range.left(); col <= right; ++col )
{
- layoutColumn tmplayout;
- tmplayout.col = col;
- tmplayout.l = new ColumnFormat( m_sheet, col );
- tmplayout.l->copy( *(m_sheet->columnFormat( col )) );
- listCol.append(tmplayout);
+ tqlayoutColumn tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.l = new ColumnFormat( m_sheet, col );
+ tmptqlayout.l->copy( *(m_sheet->columnFormat( col )) );
+ listCol.append(tmptqlayout);
cell = m_sheet->getFirstCellColumn( col );
while ( cell )
@@ -469,12 +469,12 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
continue;
}
- layoutCell tmplayout;
- tmplayout.col = col;
- tmplayout.row = cell->row();
- tmplayout.l = new Format( m_sheet, 0 );
- tmplayout.l->copy( *(m_sheet->cellAt( tmplayout.col, tmplayout.row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.row = cell->row();
+ tmptqlayout.l = new Format( m_sheet, 0 );
+ tmptqlayout.l->copy( *(m_sheet->cellAt( tmptqlayout.col, tmptqlayout.row )->format()) );
+ list.append(tmptqlayout);
cell = m_sheet->getNextCellDown( col, cell->row() );
}
@@ -487,12 +487,12 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
if ( range.left() <= col && right >= col
&& !cell->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = cell->column();
- tmplayout.row = cell->row();
- tmplayout.l = new Format( m_sheet, 0 );
- tmplayout.l->copy( *(m_sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = cell->column();
+ tmptqlayout.row = cell->row();
+ tmptqlayout.l = new Format( m_sheet, 0 );
+ tmptqlayout.l->copy( *(m_sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -501,11 +501,11 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
{
for ( int row = range.top(); row <= bottom; ++row )
{
- layoutRow tmplayout;
- tmplayout.row = row;
- tmplayout.l = new RowFormat( m_sheet, row );
- tmplayout.l->copy( *(m_sheet->rowFormat( row )) );
- listRow.append(tmplayout);
+ tqlayoutRow tmptqlayout;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new RowFormat( m_sheet, row );
+ tmptqlayout.l->copy( *(m_sheet->rowFormat( row )) );
+ listRow.append(tmptqlayout);
cell = m_sheet->getFirstCellRow( row );
while ( cell )
@@ -515,12 +515,12 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
cell = m_sheet->getNextCellRight( cell->column(), row );
continue;
}
- layoutCell tmplayout;
- tmplayout.col = cell->column();
- tmplayout.row = row;
- tmplayout.l = new Format( m_sheet, 0 );
- tmplayout.l->copy( *(m_sheet->cellAt( cell->column(), row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = cell->column();
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( m_sheet, 0 );
+ tmptqlayout.l->copy( *(m_sheet->cellAt( cell->column(), row )->format()) );
+ list.append(tmptqlayout);
cell = m_sheet->getNextCellRight( cell->column(), row );
}
@@ -533,12 +533,12 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
if ( range.top() <= row && bottom >= row
&& !cell->isPartOfMerged())
{
- layoutCell tmplayout;
- tmplayout.col = cell->column();
- tmplayout.row = cell->row();
- tmplayout.l = new Format( m_sheet, 0 );
- tmplayout.l->copy( *(m_sheet->cellAt( tmplayout.col, tmplayout.row )) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = cell->column();
+ tmptqlayout.row = cell->row();
+ tmptqlayout.l = new Format( m_sheet, 0 );
+ tmptqlayout.l->copy( *(m_sheet->cellAt( tmptqlayout.col, tmptqlayout.row )) );
+ list.append(tmptqlayout);
}
}
*/
@@ -551,12 +551,12 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
Cell * cell = m_sheet->nonDefaultCell( col, row );
if ( !cell->isPartOfMerged() )
{
- layoutCell tmplayout;
- tmplayout.col = col;
- tmplayout.row = row;
- tmplayout.l = new Format( m_sheet, 0 );
- tmplayout.l->copy( *(m_sheet->cellAt( col, row )->format()) );
- list.append(tmplayout);
+ tqlayoutCell tmptqlayout;
+ tmptqlayout.col = col;
+ tmptqlayout.row = row;
+ tmptqlayout.l = new Format( m_sheet, 0 );
+ tmptqlayout.l->copy( *(m_sheet->cellAt( col, row )->format()) );
+ list.append(tmptqlayout);
}
}
}
@@ -565,7 +565,7 @@ void FormatManipulator::copyFormat(QValueList<layoutCell> & list,
bool FormatManipulator::testCondition(RowFormat* row)
{
- for (Q_UINT32 property = Format::PAlign;
+ for (TQ_UINT32 property = Format::PAlign;
property <= Format::PHideFormula;
property *= 2)
{
@@ -772,7 +772,7 @@ void FormatManipulator::doWork(Format* format,
void FormatManipulator::prepareCell(Cell* cell)
{
- for (Q_UINT32 property = Format::PAlign;
+ for (TQ_UINT32 property = Format::PAlign;
property <= Format::PHideFormula;
property *= 2)
{
@@ -818,7 +818,7 @@ bool MergeManipulator::process(Element* element)
return false;
}
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
int left = range.left();
int right = range.right();
int top = range.top();
@@ -840,7 +840,7 @@ bool MergeManipulator::process(Element* element)
Cell *cell = m_sheet->cellAt( col, row );
if (cell->doesMergeCells())
{
- rows = QMAX(rows, cell->mergedYCells());
+ rows = TQMAX(rows, cell->mergedYCells());
cell->mergeCells( col, row, 0, 0 );
}
}
@@ -861,7 +861,7 @@ bool MergeManipulator::process(Element* element)
Cell *cell = m_sheet->cellAt( col, row );
if (cell->doesMergeCells())
{
- cols = QMAX(cols, cell->mergedXCells());
+ cols = TQMAX(cols, cell->mergedXCells());
cell->mergeCells( col, row, 0, 0 );
}
}
@@ -897,17 +897,17 @@ bool MergeManipulator::process(Element* element)
return true;
}
-QString MergeManipulator::name() const
+TQString MergeManipulator::name() const
{
if (m_merge) // MergeManipulator
{
if (m_mergeHorizontal)
{
- return i18n("Merge Cells Horizontally");
+ return i18n("Merge CellsQt::Horizontally");
}
else if (m_mergeVertical)
{
- return i18n("Merge Cells Vertically");
+ return i18n("Merge CellsQt::Vertically");
}
else
{
@@ -933,7 +933,7 @@ bool MergeManipulator::preProcessing()
for (ConstIterator it = constBegin(); it != endOfList; ++it)
{
Element* element = *it;
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
int right = range.right();
int bottom = range.bottom();
for (int row = range.top(); row <= bottom; ++row)
@@ -943,7 +943,7 @@ bool MergeManipulator::preProcessing()
Cell *cell = m_sheet->cellAt(col, row);
if (cell->doesMergeCells())
{
- QRect rect(col, row, cell->mergedXCells() + 1, cell->mergedYCells() + 1);
+ TQRect rect(col, row, cell->mergedXCells() + 1, cell->mergedYCells() + 1);
mergedCells.add(rect);
}
}
@@ -1047,7 +1047,7 @@ void DilationManipulator::execute()
for (ConstIterator it = cells().constBegin(); it != end; ++it)
{
Element* element = *it;
- QRect area = element->rect().normalize();
+ TQRect area = element->rect().normalize();
ColumnFormat *col;
RowFormat *rl;
@@ -1139,11 +1139,11 @@ ResizeColumnManipulator::~ResizeColumnManipulator()
bool ResizeColumnManipulator::process(Element* element)
{
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
for (int col = range.right(); col >= range.left(); --col)
{
ColumnFormat *format = m_sheet->nonDefaultColumnFormat( col );
- format->setDblWidth( QMAX( 2.0, m_reverse ? m_oldSize : m_newSize ) );
+ format->setDblWidth( TQMAX( 2.0, m_reverse ? m_oldSize : m_newSize ) );
}
return true;
}
@@ -1164,11 +1164,11 @@ ResizeRowManipulator::~ResizeRowManipulator()
bool ResizeRowManipulator::process(Element* element)
{
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
for (int row = range.bottom(); row >= range.top(); --row)
{
RowFormat* rl = m_sheet->nonDefaultRowFormat( row );
- rl->setDblHeight( QMAX( 2.0, m_reverse ? m_oldSize : m_newSize ) );
+ rl->setDblHeight( TQMAX( 2.0, m_reverse ? m_oldSize : m_newSize ) );
}
return true;
}
@@ -1198,8 +1198,8 @@ bool AdjustColumnRowManipulator::process(Element* element)
return true;
}
- QMap<int,double> heights;
- QMap<int,double> widths;
+ TQMap<int,double> heights;
+ TQMap<int,double> widths;
if (m_reverse)
{
heights = m_oldHeights;
@@ -1211,7 +1211,7 @@ bool AdjustColumnRowManipulator::process(Element* element)
widths = m_newWidths;
}
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
if (m_adjustColumn)
{
if (element->isRow())
@@ -1224,12 +1224,12 @@ bool AdjustColumnRowManipulator::process(Element* element)
int col = cell->column();
if ( !cell->isEmpty() && !cell->isObscured())
{
- if (widths.contains(col) && widths[col] != -1.0)
+ if (widths.tqcontains(col) && widths[col] != -1.0)
{
ColumnFormat* format = sheet->nonDefaultColumnFormat(col);
if ( kAbs(format->dblWidth() - widths[col] ) > DBL_EPSILON )
{
- format->setDblWidth( QMAX( 2.0, widths[col] ) );
+ format->setDblWidth( TQMAX( 2.0, widths[col] ) );
}
}
}
@@ -1241,12 +1241,12 @@ bool AdjustColumnRowManipulator::process(Element* element)
{
for (int col = range.left(); col <= range.right(); ++col)
{
- if (widths.contains(col) && widths[col] != -1.0)
+ if (widths.tqcontains(col) && widths[col] != -1.0)
{
ColumnFormat* format = sheet->nonDefaultColumnFormat(col);
if ( kAbs(format->dblWidth() - widths[col] ) > DBL_EPSILON )
{
- format->setDblWidth( QMAX( 2.0, widths[col] ) );
+ format->setDblWidth( TQMAX( 2.0, widths[col] ) );
}
}
}
@@ -1264,12 +1264,12 @@ bool AdjustColumnRowManipulator::process(Element* element)
int row = cell->row();
if ( !cell->isEmpty() && !cell->isObscured())
{
- if (heights.contains(row) && heights[row] != -1.0)
+ if (heights.tqcontains(row) && heights[row] != -1.0)
{
RowFormat* format = sheet->nonDefaultRowFormat(row);
if ( kAbs(format->dblHeight() - heights[row] ) > DBL_EPSILON )
{
- format->setDblHeight( QMAX( 2.0, heights[row] ) );
+ format->setDblHeight( TQMAX( 2.0, heights[row] ) );
}
}
}
@@ -1281,12 +1281,12 @@ bool AdjustColumnRowManipulator::process(Element* element)
{
for (int row = range.top(); row <= range.bottom(); ++row)
{
- if (heights.contains(row) && heights[row] != -1.0)
+ if (heights.tqcontains(row) && heights[row] != -1.0)
{
RowFormat* format = sheet->nonDefaultRowFormat(row);
if ( kAbs(format->dblHeight() - heights[row] ) > DBL_EPSILON )
{
- format->setDblHeight( QMAX( 2.0, heights[row] ) );
+ format->setDblHeight( TQMAX( 2.0, heights[row] ) );
}
}
}
@@ -1312,7 +1312,7 @@ bool AdjustColumnRowManipulator::preProcessing()
for (ConstIterator it = cells().begin(); it != endOfList; ++it)
{
Element* element = *it;
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
if (element->isColumn())
{
for (int col = range.left(); col <= range.right(); ++col)
@@ -1323,7 +1323,7 @@ bool AdjustColumnRowManipulator::preProcessing()
int row = cell->row();
if (m_adjustColumn)
{
- if (!m_newWidths.contains(col))
+ if (!m_newWidths.tqcontains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1331,13 +1331,13 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (!cell->isEmpty() && !cell->isObscured())
{
- m_newWidths[col] = QMAX(adjustColumnHelper(cell, col, row),
+ m_newWidths[col] = TQMAX(adjustColumnHelper(cell, col, row),
m_newWidths[col] );
}
}
if (m_adjustRow)
{
- if (!m_newHeights.contains(row))
+ if (!m_newHeights.tqcontains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
@@ -1345,7 +1345,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (!cell->isEmpty() && !cell->isObscured())
{
- m_newHeights[row] = QMAX(adjustRowHelper(cell, col, row),
+ m_newHeights[row] = TQMAX(adjustRowHelper(cell, col, row),
m_newHeights[row]);
}
}
@@ -1363,7 +1363,7 @@ bool AdjustColumnRowManipulator::preProcessing()
int col = cell->column();
if (m_adjustColumn)
{
- if (!m_newWidths.contains(col))
+ if (!m_newWidths.tqcontains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1371,13 +1371,13 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (cell != m_sheet->defaultCell() && !cell->isEmpty() && !cell->isObscured())
{
- m_newWidths[col] = QMAX(adjustColumnHelper(cell, col, row),
+ m_newWidths[col] = TQMAX(adjustColumnHelper(cell, col, row),
m_newWidths[col] );
}
}
if (m_adjustRow)
{
- if (!m_newHeights.contains(row))
+ if (!m_newHeights.tqcontains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
@@ -1385,7 +1385,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (cell != m_sheet->defaultCell() && !cell->isEmpty() && !cell->isObscured())
{
- m_newHeights[row] = QMAX(adjustRowHelper(cell, col, row),
+ m_newHeights[row] = TQMAX(adjustRowHelper(cell, col, row),
m_newHeights[row]);
}
}
@@ -1403,7 +1403,7 @@ bool AdjustColumnRowManipulator::preProcessing()
cell = m_sheet->cellAt( col, row );
if (m_adjustColumn)
{
- if (!m_newWidths.contains(col))
+ if (!m_newWidths.tqcontains(col))
{
m_newWidths[col] = -1.0;
ColumnFormat* format = m_sheet->columnFormat(col);
@@ -1411,13 +1411,13 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (cell != m_sheet->defaultCell() && !cell->isEmpty() && !cell->isObscured())
{
- m_newWidths[col] = QMAX(adjustColumnHelper(cell, col, row),
+ m_newWidths[col] = TQMAX(adjustColumnHelper(cell, col, row),
m_newWidths[col] );
}
}
if (m_adjustRow)
{
- if (!m_newHeights.contains(row))
+ if (!m_newHeights.tqcontains(row))
{
m_newHeights[row] = -1.0;
RowFormat* format = m_sheet->rowFormat(row);
@@ -1425,7 +1425,7 @@ bool AdjustColumnRowManipulator::preProcessing()
}
if (cell != m_sheet->defaultCell() && !cell->isEmpty() && !cell->isObscured())
{
- m_newHeights[row] = QMAX(adjustRowHelper(cell, col, row),
+ m_newHeights[row] = TQMAX(adjustRowHelper(cell, col, row),
m_newHeights[row]);
}
}
@@ -1444,20 +1444,20 @@ double AdjustColumnRowManipulator::adjustColumnHelper(Cell* cell, int col, int r
if ( cell->textWidth() > long_max )
{
double indent = 0.0;
- Format::Align alignment = cell->format()->align(cell->column(), cell->row());
- if (alignment == Format::Undefined)
+ Format::Align tqalignment = cell->format()->align(cell->column(), cell->row());
+ if (tqalignment == Format::Undefined)
{
if (cell->value().isNumber() || cell->isDate() || cell->isTime())
{
- alignment = Format::Right;
+ tqalignment = Format::Right;
}
else
{
- alignment = Format::Left;
+ tqalignment = Format::Left;
}
}
- if (alignment == Format::Left)
+ if (tqalignment == Format::Left)
{
indent = cell->format()->getIndent( cell->column(), cell->row() );
}
@@ -1501,7 +1501,7 @@ double AdjustColumnRowManipulator::adjustRowHelper(Cell* cell, int col, int row)
}
}
-QString AdjustColumnRowManipulator::name() const
+TQString AdjustColumnRowManipulator::name() const
{
if (m_adjustColumn && m_adjustRow)
{
@@ -1535,7 +1535,7 @@ HideShowManipulator::~HideShowManipulator()
bool HideShowManipulator::process(Element* element)
{
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
if (m_manipulateColumns)
{
for (int col = range.left(); col <= range.right(); ++col)
@@ -1563,7 +1563,7 @@ bool HideShowManipulator::preProcessing()
{
if (m_reverse)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if (m_manipulateColumns)
{
if (range.left() > 1)
@@ -1579,7 +1579,7 @@ bool HideShowManipulator::preProcessing()
}
if (col == range.left())
{
- region.add(QRect(1, 1, range.left()-1, KS_rowMax));
+ region.add(TQRect(1, 1, range.left()-1, KS_rowMax));
}
}
for (int col = range.left(); col <= range.right(); ++col)
@@ -1587,7 +1587,7 @@ bool HideShowManipulator::preProcessing()
ColumnFormat* format = m_sheet->columnFormat(col);
if (format->isHide())
{
- region.add(QRect(col, 1, 1, KS_rowMax));
+ region.add(TQRect(col, 1, 1, KS_rowMax));
}
}
}
@@ -1606,7 +1606,7 @@ bool HideShowManipulator::preProcessing()
}
if (row == range.top())
{
- region.add(QRect(1, 1, KS_colMax, range.top()-1));
+ region.add(TQRect(1, 1, KS_colMax, range.top()-1));
}
}
for (int row = range.top(); row <= range.bottom(); ++row)
@@ -1614,7 +1614,7 @@ bool HideShowManipulator::preProcessing()
RowFormat* format = m_sheet->rowFormat(row);
if (format->isHide())
{
- region.add(QRect(1, row, KS_colMax, 1));
+ region.add(TQRect(1, row, KS_colMax, 1));
}
}
}
@@ -1651,9 +1651,9 @@ bool HideShowManipulator::postProcessing()
return true;
}
-QString HideShowManipulator::name() const
+TQString HideShowManipulator::name() const
{
- QString name;
+ TQString name;
if (m_reverse)
{
name = "Show ";
@@ -1704,7 +1704,7 @@ ManipulatorManager::~ManipulatorManager()
{
}
-Manipulator* ManipulatorManager::create(const QString& type)
+Manipulator* ManipulatorManager::create(const TQString& type)
{
if (type == "bgcolor")
{
diff --git a/kspread/manipulator.h b/kspread/manipulator.h
index 84cb1451..9af94032 100644
--- a/kspread/manipulator.h
+++ b/kspread/manipulator.h
@@ -21,9 +21,9 @@
#ifndef KSPREAD_MANIPULATOR
#define KSPREAD_MANIPULATOR
-#include <qrect.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kcommand.h>
#include <klocale.h>
@@ -42,18 +42,18 @@ class RowFormat;
class Sheet;
-// struct layoutCell {
+// struct tqlayoutCell {
// int row;
// int col;
// Format *l;
// };
//
-// struct layoutColumn {
+// struct tqlayoutColumn {
// int col;
// ColumnFormat *l;
// };
//
-// struct layoutRow {
+// struct tqlayoutRow {
// int row;
// RowFormat *l;
// };
@@ -84,13 +84,13 @@ public:
virtual void execute();
virtual void unexecute();
- virtual void setArgument(const QString& /*arg*/, const QString& /*val*/) {};
+ virtual void setArgument(const TQString& /*arg*/, const TQString& /*val*/) {};
virtual void setReverse(bool reverse) { m_reverse = reverse; }
void setRegisterUndo(bool registerUndo) { m_register = registerUndo; }
- virtual void setName (const QString &n) { m_name = n; }
- virtual QString name() const { return m_name; };
+ virtual void setName (const TQString &n) { m_name = n; }
+ virtual TQString name() const { return m_name; };
protected:
virtual bool process(Element*);
@@ -102,7 +102,7 @@ protected:
Sheet* m_sheet;
- QString m_name;
+ TQString m_name;
bool m_creation : 1;
bool m_reverse : 1;
bool m_firstrun : 1;
@@ -127,7 +127,7 @@ public:
// SetSelectionFontWorker
// SetSelectionSizeWorker
- void setFontFamily(const QString& font) { m_properties |= Format::PFont; m_font = font; }
+ void setFontFamily(const TQString& font) { m_properties |= Format::PFont; m_font = font; }
void setFontSize(int size) { m_properties |= Format::PFont; m_size = size; }
void setFontBold(uint bold) { m_properties |= Format::PFont; m_bold = bold; }
void setFontItalic(uint italic) { m_properties |= Format::PFont; m_italic = italic; }
@@ -136,24 +136,24 @@ public:
// SetSelectionAngleWorker
void setAngle(int angle) { m_properties |= Format::PAngle; m_angle = angle; }
// SetSelectionTextColorWorker
- void setTextColor(const QColor& textColor) { m_properties |= Format::PTextPen; m_textColor = textColor; }
+ void setTextColor(const TQColor& textColor) { m_properties |= Format::PTextPen; m_textColor = textColor; }
// SetSelectionBgColorWorker
- void setBackgroundColor(const QColor& bgColor) { m_properties |= Format::PBackgroundColor; m_backgroundColor = bgColor; }
+ void setBackgroundColor(const TQColor& bgColor) { m_properties |= Format::PBackgroundColor; m_backgroundColor = bgColor; }
// SetSelectionBorderAllWorker
- void setTopBorderPen(const QPen& pen) { m_properties |= Format::PTopBorder; m_topBorderPen = pen; }
- void setBottomBorderPen(const QPen& pen) { m_properties |= Format::PBottomBorder; m_bottomBorderPen = pen; }
- void setLeftBorderPen(const QPen& pen) { m_properties |= Format::PLeftBorder; m_leftBorderPen = pen; }
- void setRightBorderPen(const QPen& pen) { m_properties |= Format::PRightBorder; m_rightBorderPen = pen; }
- void setHorizontalPen(const QPen& pen) { m_properties |= Format::PTopBorder | Format::PBottomBorder; m_horizontalPen = pen; }
- void setVerticalPen(const QPen& pen) { m_properties |= Format::PLeftBorder | Format::PRightBorder; m_verticalPen = pen; }
- void setFallDiagonalPen(const QPen& pen) { m_properties |= Format::PFallDiagonal; m_fallDiagonalPen = pen; }
- void setGoUpDiagonalPen(const QPen& pen) { m_properties |= Format::PGoUpDiagonal; m_goUpDiagonalPen = pen; }
+ void setTopBorderPen(const TQPen& pen) { m_properties |= Format::PTopBorder; m_topBorderPen = pen; }
+ void setBottomBorderPen(const TQPen& pen) { m_properties |= Format::PBottomBorder; m_bottomBorderPen = pen; }
+ void setLeftBorderPen(const TQPen& pen) { m_properties |= Format::PLeftBorder; m_leftBorderPen = pen; }
+ void setRightBorderPen(const TQPen& pen) { m_properties |= Format::PRightBorder; m_rightBorderPen = pen; }
+ void setHorizontalPen(const TQPen& pen) { m_properties |= Format::PTopBorder | Format::PBottomBorder; m_horizontalPen = pen; }
+ void setVerticalPen(const TQPen& pen) { m_properties |= Format::PLeftBorder | Format::PRightBorder; m_verticalPen = pen; }
+ void setFallDiagonalPen(const TQPen& pen) { m_properties |= Format::PFallDiagonal; m_fallDiagonalPen = pen; }
+ void setGoUpDiagonalPen(const TQPen& pen) { m_properties |= Format::PGoUpDiagonal; m_goUpDiagonalPen = pen; }
// SetSelectionAlignWorker
void setHorizontalAlignment(Format::Align align) { m_properties |= Format::PAlign; m_horAlign = align; }
// SetSelectionAlignWorker
void setVerticalAlignment(Format::AlignY align) { m_properties |= Format::PAlignY; m_verAlign = align; }
- void setBackgroundBrush(const QBrush& brush) { m_properties |= Format::PBackgroundBrush; m_backgroundBrush = brush; }
+ void setBackgroundBrush(const TQBrush& brush) { m_properties |= Format::PBackgroundBrush; m_backgroundBrush = brush; }
void setIndent(double indent) { m_properties |= Format::PIndent; m_indent = indent; }
void setMultiRow(bool multiRow) { m_properties |= Format::PMultiRow; m_multiRow = multiRow; }
void setVerticalText(bool verticalText) { m_properties |= Format::PVerticalText; m_verticalText = verticalText; }
@@ -161,42 +161,42 @@ public:
void setNotProtected(bool notProtected) { m_properties |= Format::PNotProtected; m_notProtected = notProtected; }
void setHideAll(bool hideAll) { m_properties |= Format::PHideAll; m_hideAll = hideAll; }
void setHideFormula(bool hideFormula) { m_properties |= Format::PHideFormula; m_hideFormula = hideFormula; }
- void setComment(const QString& comment) { m_properties |= Format::PComment; m_comment = comment; }
- void setPrefix(const QString& prefix) { m_properties |= Format::PPrefix; m_prefix = prefix; }
- void setPostfix(const QString& postfix) { m_properties |= Format::PPostfix; m_postfix = postfix; }
+ void setComment(const TQString& comment) { m_properties |= Format::PComment; m_comment = comment; }
+ void setPrefix(const TQString& prefix) { m_properties |= Format::PPrefix; m_prefix = prefix; }
+ void setPostfix(const TQString& postfix) { m_properties |= Format::PPostfix; m_postfix = postfix; }
void setPrecision(int precision) { m_properties |= Format::PPrecision; m_precision = precision; }
void setFloatFormat(Format::FloatFormat floatFormat) { m_properties |= Format::PFloatFormat; m_floatFormat = floatFormat; }
void setFloatColor(Format::FloatColor floatColor) { m_properties |= Format::PFloatColor; m_floatColor = floatColor; }
void setFormatType(FormatType formatType) { m_properties |= Format::PFormatType; m_formatType = formatType; }
- void setCurrency(int type, const QString& symbol) { m_currencyType = type; m_currencySymbol = symbol; }
+ void setCurrency(int type, const TQString& symbol) { m_currencyType = type; m_currencySymbol = symbol; }
protected:
- virtual QString name() const { return i18n("Format Change"); }
+ virtual TQString name() const { return i18n("Format Change"); }
virtual bool preProcessing();
virtual bool process(Element*);
- void copyFormat(QValueList<layoutCell> &list,
- QValueList<layoutColumn> &listCol,
- QValueList<layoutRow> &listRow);
+ void copyFormat(TQValueList<tqlayoutCell> &list,
+ TQValueList<tqlayoutColumn> &listCol,
+ TQValueList<tqlayoutRow> &listRow);
bool testCondition(RowFormat*);
void doWork(Format*, bool isTop, bool isBottom, bool isLeft, bool isRight);
void prepareCell(Cell*);
private:
- Q_UINT32 m_properties;
+ TQ_UINT32 m_properties;
// TODO Stefan: find a more elegant way to store the format
- QValueList<layoutCell> m_lstFormats;
- QValueList<layoutCell> m_lstRedoFormats;
- QValueList<layoutColumn> m_lstColFormats;
- QValueList<layoutColumn> m_lstRedoColFormats;
- QValueList<layoutRow> m_lstRowFormats;
- QValueList<layoutRow> m_lstRedoRowFormats;
+ TQValueList<tqlayoutCell> m_lstFormats;
+ TQValueList<tqlayoutCell> m_lstRedoFormats;
+ TQValueList<tqlayoutColumn> m_lstColFormats;
+ TQValueList<tqlayoutColumn> m_lstRedoColFormats;
+ TQValueList<tqlayoutRow> m_lstRowFormats;
+ TQValueList<tqlayoutRow> m_lstRedoRowFormats;
// SetSelectionFontWorker
// SetSelectionSizeWorker
- QString m_font;
+ TQString m_font;
int m_size;
signed char m_bold;
signed char m_italic;
@@ -215,24 +215,24 @@ private:
bool m_hideFormula;
// SetSelectionTextColorWorker
- QColor m_textColor;
+ TQColor m_textColor;
// SetSelectionBgColorWorker
- QColor m_backgroundColor;
+ TQColor m_backgroundColor;
// SetSelectionBorderAllWorker
- QPen m_topBorderPen;
- QPen m_bottomBorderPen;
- QPen m_leftBorderPen;
- QPen m_rightBorderPen;
- QPen m_horizontalPen;
- QPen m_verticalPen;
- QPen m_fallDiagonalPen;
- QPen m_goUpDiagonalPen;
-
- QBrush m_backgroundBrush;
- QString m_comment;
- QString m_prefix;
- QString m_postfix;
- QString m_currencySymbol;
+ TQPen m_topBorderPen;
+ TQPen m_bottomBorderPen;
+ TQPen m_leftBorderPen;
+ TQPen m_rightBorderPen;
+ TQPen m_horizontalPen;
+ TQPen m_verticalPen;
+ TQPen m_fallDiagonalPen;
+ TQPen m_goUpDiagonalPen;
+
+ TQBrush m_backgroundBrush;
+ TQString m_comment;
+ TQString m_prefix;
+ TQString m_postfix;
+ TQString m_currencySymbol;
// SetSelectionAlignWorker
Format::Align m_horAlign;
@@ -260,7 +260,7 @@ public:
protected:
virtual bool process(Element*);
- virtual QString name() const { return i18n("Resize Column"); }
+ virtual TQString name() const { return i18n("Resize Column"); }
private:
double m_newSize;
@@ -284,7 +284,7 @@ public:
protected:
virtual bool process(Element*);
- virtual QString name() const { return i18n("Resize Row"); }
+ virtual TQString name() const { return i18n("Resize Row"); }
private:
double m_newSize;
@@ -303,7 +303,7 @@ public:
~BorderManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Border"); }
+ virtual TQString name() const { return i18n("Change Border"); }
private:
};
@@ -320,7 +320,7 @@ public:
~BackgroundColorManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Background Color"); }
+ virtual TQString name() const { return i18n("Change Background Color"); }
private:
};
@@ -337,7 +337,7 @@ public:
~FontColorManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Text Color"); }
+ virtual TQString name() const { return i18n("Change Text Color"); }
private:
};
@@ -354,7 +354,7 @@ public:
~FontManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Font"); }
+ virtual TQString name() const { return i18n("Change Font"); }
private:
};
@@ -371,7 +371,7 @@ class AngleManipulator : public FormatManipulator
~AngleManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Angle"); }
+ virtual TQString name() const { return i18n("Change Angle"); }
private:
};
@@ -388,7 +388,7 @@ class HorAlignManipulator : public FormatManipulator
~HorAlignManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Horizontal Alignment"); }
+ virtual TQString name() const { return i18n("ChangeQt::Horizontal Alignment"); }
private:
};
@@ -405,7 +405,7 @@ class VerAlignManipulator : public FormatManipulator
~VerAlignManipulator() {}
protected:
- virtual QString name() const { return i18n("Change Vertical Alignment"); }
+ virtual TQString name() const { return i18n("ChangeQt::Vertical Alignment"); }
private:
};
@@ -433,7 +433,7 @@ protected:
virtual bool postProcessing();
- virtual QString name() const;
+ virtual TQString name() const;
bool m_merge;
private:
@@ -457,7 +457,7 @@ public:
virtual void unexecute();
protected:
- virtual QString name() const { return i18n("Dilate Region"); }
+ virtual TQString name() const { return i18n("Dilate Region"); }
private:
};
@@ -480,7 +480,7 @@ public:
void setAdjustRow(bool state) { m_adjustRow = state; }
protected:
- virtual QString name() const;
+ virtual TQString name() const;
double adjustColumnHelper( Cell * c, int _col, int _row );
double adjustRowHelper( Cell * c, int _col, int _row );
@@ -488,10 +488,10 @@ protected:
private:
bool m_adjustColumn : 1;
bool m_adjustRow : 1;
- QMap<int, double> m_newWidths;
- QMap<int, double> m_oldWidths;
- QMap<int, double> m_newHeights;
- QMap<int, double> m_oldHeights;
+ TQMap<int, double> m_newWidths;
+ TQMap<int, double> m_oldWidths;
+ TQMap<int, double> m_newHeights;
+ TQMap<int, double> m_oldHeights;
};
@@ -513,7 +513,7 @@ public:
void setManipulateRows(bool state) { m_manipulateRows = state; }
protected:
- virtual QString name() const;
+ virtual TQString name() const;
private:
bool m_manipulateColumns : 1;
@@ -550,7 +550,7 @@ class ManipulatorManager
public:
static ManipulatorManager* self();
~ManipulatorManager();
- Manipulator* create(const QString&);
+ Manipulator* create(const TQString&);
private:
ManipulatorManager();
diff --git a/kspread/manipulator_data.cc b/kspread/manipulator_data.cc
index 101f8616..827c610a 100644
--- a/kspread/manipulator_data.cc
+++ b/kspread/manipulator_data.cc
@@ -39,16 +39,16 @@ AbstractDataManipulator::~AbstractDataManipulator ()
bool AbstractDataManipulator::process (Element* element)
{
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
for (int col = range.left(); col <= range.right(); ++col)
for (int row = range.top(); row <= range.bottom(); ++row) {
Value val;
- QString text;
+ TQString text;
bool parse = false;
FormatType fmtType = No_format;
if (m_reverse) {
// reverse - use the stored value
- if (oldData.contains (col) && oldData[col].contains (row)) {
+ if (oldData.tqcontains (col) && oldData[col].tqcontains (row)) {
val = oldData[col][row].val;
text = oldData[col][row].text;
fmtType = oldData[col][row].format;
@@ -85,7 +85,7 @@ bool AbstractDataManipulator::preProcessing ()
Region::Iterator endOfList(cells().end());
for (Region::Iterator it = cells().begin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
for (int col = range.left(); col <= range.right(); ++col)
for (int row = range.top(); row <= range.bottom(); ++row)
{
@@ -123,7 +123,7 @@ Value DataManipulator::newValue (Element *element, int col, int row,
*parsing = m_parsing;
if (m_format != No_format)
*formatType = m_format;
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
int colidx = range.left() - col;
int rowidx = range.top() - row;
return data.element (colidx, rowidx);
@@ -142,15 +142,15 @@ Value ArrayFormulaManipulator::newValue (Element *element, int col, int row,
bool *parsing, FormatType *)
{
*parsing = true;
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
int colidx = col - range.left();
int rowidx = row - range.top();
// fill in the cells ... top-left one gets the formula, the rest gets =INDEX
// TODO: also fill in information about cells being a part of a range for GUI
if (colidx || rowidx) {
- return (cellRef + QString::number (rowidx+1) + ";" +
- QString::number (colidx+1) + ")");
+ return (cellRef + TQString::number (rowidx+1) + ";" +
+ TQString::number (colidx+1) + ")");
} else {
Cell *cell = m_sheet->nonDefaultCell (col, row);
cellRef = "=INDEX(" + cell->name() + ";";
@@ -176,7 +176,7 @@ bool ProtectedCheck::check ()
for (Region::Iterator it = cells().begin(); it != endOfList; ++it)
{
Region::Element *element = *it;
- QRect range = element->rect().normalize();
+ TQRect range = element->rect().normalize();
for (int col = range.left(); col <= range.right(); ++col)
{
diff --git a/kspread/manipulator_data.h b/kspread/manipulator_data.h
index eea16842..1c926484 100644
--- a/kspread/manipulator_data.h
+++ b/kspread/manipulator_data.h
@@ -35,7 +35,7 @@ namespace KSpread {
struct ADMStorage {
Value val;
- QString text;
+ TQString text;
FormatType format;
};
@@ -54,7 +54,7 @@ class AbstractDataManipulator : public Manipulator {
bool *parse, FormatType *fmtType) = 0;
/** preProcessing will store the old cell's data */
virtual bool preProcessing ();
- QMap<int, QMap<int, ADMStorage> > oldData;
+ TQMap<int, TQMap<int, ADMStorage> > oldData;
};
@@ -87,11 +87,11 @@ class ArrayFormulaManipulator : public AbstractDataManipulator {
public:
ArrayFormulaManipulator ();
virtual ~ArrayFormulaManipulator ();
- void setText (const QString text) { m_text = text; };
+ void setText (const TQString text) { m_text = text; };
protected:
virtual Value newValue (Element *element, int col, int row, bool *,
FormatType *);
- QString cellRef, m_text;
+ TQString cellRef, m_text;
};
diff --git a/kspread/plugins/calculator/configdlg.cpp b/kspread/plugins/calculator/configdlg.cpp
index 9273b91a..545ddcb5 100644
--- a/kspread/plugins/calculator/configdlg.cpp
+++ b/kspread/plugins/calculator/configdlg.cpp
@@ -29,7 +29,7 @@
#include <klocale.h>
#include <kdialog.h>
-#include <qlayout.h>
+#include <tqlayout.h>
// Undefine HAVE_LONG_DOUBLE for Beta 4 since RedHat 5.0 comes with a borken
// glibc
@@ -38,21 +38,21 @@
#undef HAVE_LONG_DOUBLE
#endif
-ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
- : QDialog(parent, name)
+ConfigDlg::ConfigDlg(TQWidget *tqparent, const char *name, DefStruct *defstruct)
+ : TQDialog(tqparent, name)
{
defst = defstruct;
- QVBoxLayout *lay1 = new QVBoxLayout( this );
+ TQVBoxLayout *lay1 = new TQVBoxLayout( this );
lay1->setMargin( KDialog::marginHint() );
lay1->setSpacing( KDialog::spacingHint() );
- box = new QGroupBox(0, Qt::Vertical, i18n("Defaults"), this, "box");
- box->layout()->setSpacing(KDialog::spacingHint());
- box->layout()->setMargin(KDialog::marginHint());
+ box = new TQGroupBox(0, Qt::Vertical, i18n("Defaults"), this, "box");
+ box->tqlayout()->setSpacing(KDialog::spacingHint());
+ box->tqlayout()->setMargin(KDialog::marginHint());
- QGridLayout *grid1 = new QGridLayout(box->layout(),8,2);
- label1 = new QLabel(box);
+ TQGridLayout *grid1 = new TQGridLayout(box->tqlayout(),8,2);
+ label1 = new TQLabel(box);
label1->setText(i18n("Foreground color:"));
grid1->addWidget(label1,0,0);
@@ -60,10 +60,10 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
grid1->addWidget(button1,0,1);
button1->setColor( defst->forecolor );
- connect(button1 , SIGNAL( changed( const QColor & ) ),
- this, SLOT( set_fore_color( const QColor & ) ) );
+ connect(button1 , TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( set_fore_color( const TQColor & ) ) );
- label2 = new QLabel(box);
+ label2 = new TQLabel(box);
grid1->addWidget(label2,1,0);
label2->setText(i18n("Background color:"));
@@ -71,14 +71,14 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
grid1->addWidget(button2,1,1);
button2->setColor( defst->backcolor );
- connect(button2 , SIGNAL( changed( const QColor & ) ),
- this, SLOT( set_background_color( const QColor & ) ) );
+ connect(button2 , TQT_SIGNAL( changed( const TQColor & ) ),
+ this, TQT_SLOT( set_background_color( const TQColor & ) ) );
- // connect(button2,SIGNAL(clicked()),this,SLOT(set_background_color()));
+ // connect(button2,TQT_SIGNAL(clicked()),this,TQT_SLOT(set_background_color()));
- label5 = new QLabel(box);
+ label5 = new TQLabel(box);
grid1->addWidget(label5,2,0);
label5->setText(i18n("Precision:"));
@@ -89,7 +89,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
maxprec = 12 ;
#endif
- precspin = new QSpinBox( box );
+ precspin = new TQSpinBox( box );
precspin->setRange( 0, maxprec );
grid1->addWidget(precspin,2,1);
@@ -99,7 +99,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
precspin->setValue(maxprec);
- cb = new QCheckBox(box);
+ cb = new TQCheckBox(box);
grid1->addWidget(cb,3,0);
cb->setText(i18n("Set fixed precision at:"));
if(defst->fixed)
@@ -112,7 +112,7 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
fixprec = 10 ;
#endif
- precspin2 = new QSpinBox( box );
+ precspin2 = new TQSpinBox( box );
precspin2->setRange(0,fixprec);
grid1->addWidget(precspin2,3,1);
@@ -123,42 +123,42 @@ ConfigDlg::ConfigDlg(QWidget *parent, const char *name, DefStruct *defstruct)
- cb2 = new QCheckBox(box);
+ cb2 = new TQCheckBox(box);
grid1->addWidget(cb2,4,0);
cb2->setText(i18n("Beep on error"));
if(defst->beep)
cb2->setChecked(true);
- stylegroup = new QButtonGroup(box,"stylegroup");
+ stylegroup = new TQButtonGroup(box,"stylegroup");
grid1->addMultiCellWidget(stylegroup,5,7,0,1);
- stylegroup->setFrameStyle(QFrame::NoFrame);
+ stylegroup->setFrameStyle(TQFrame::NoFrame);
- QGridLayout *grid2 = new QGridLayout(stylegroup,2,2,KDialog::marginHint(), KDialog::spacingHint());
+ TQGridLayout *grid2 = new TQGridLayout(stylegroup,2,2,KDialog::marginHint(), KDialog::spacingHint());
- trigstyle = new QRadioButton(i18n("Trigonometry mode"),stylegroup,"trigstyle");
+ trigstyle = new TQRadioButton(i18n("Trigonometry mode"),stylegroup,"trigstyle");
grid2->addWidget(trigstyle,0,0);
trigstyle->adjustSize();
trigstyle->setChecked(defst->style == 0 );
- statstyle = new QRadioButton(i18n("Statistical mode"),stylegroup,"Stats");
+ statstyle = new TQRadioButton(i18n("Statistical mode"),stylegroup,"Stats");
grid2->addWidget(statstyle,1,0);
statstyle->adjustSize();
statstyle->setChecked(defst->style == 1 );
- sheetstyle = new QRadioButton(i18n("Sheet mode"),stylegroup,"Sheet");
+ sheetstyle = new TQRadioButton(i18n("Sheet mode"),stylegroup,"Sheet");
grid2->addWidget(sheetstyle,2,0);
sheetstyle->adjustSize();
sheetstyle->setChecked(defst->style == 2 );
- button3 = new QPushButton(stylegroup);
+ button3 = new TQPushButton(stylegroup);
grid2->addWidget(button3,0,1);
button3->setText(i18n("Help"));
- connect(button3,SIGNAL(clicked()),this,SLOT(help()));
+ connect(button3,TQT_SIGNAL(clicked()),this,TQT_SLOT(help()));
lay1->addWidget(box);
- connect(parent,SIGNAL(applyButtonPressed()),SLOT(okButton()));
+ connect(tqparent,TQT_SIGNAL(applyButtonPressed()),TQT_SLOT(okButton()));
}
void ConfigDlg::help()
@@ -186,12 +186,12 @@ void ConfigDlg::cancelbutton()
reject();
}
-void ConfigDlg::set_fore_color(const QColor &_color)
+void ConfigDlg::set_fore_color(const TQColor &_color)
{
defst->forecolor=_color;
}
-void ConfigDlg::set_background_color( const QColor &_color )
+void ConfigDlg::set_background_color( const TQColor &_color )
{
defst->backcolor=_color;
}
diff --git a/kspread/plugins/calculator/configdlg.h b/kspread/plugins/calculator/configdlg.h
index 0de8262e..7462f028 100644
--- a/kspread/plugins/calculator/configdlg.h
+++ b/kspread/plugins/calculator/configdlg.h
@@ -31,42 +31,43 @@
#ifndef _CONFIG_DLG_H_
#define _CONFIG_DLG_H_
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qframe.h>
-#include <qspinbox.h>
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqspinbox.h>
#include <kcolorbutton.h>
#include "kcalc.h"
-class ConfigDlg : public QDialog {
+class ConfigDlg : public TQDialog {
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigDlg(QWidget *parent=0, const char *name=0, DefStruct *defstruct=NULL);
+ ConfigDlg(TQWidget *tqparent=0, const char *name=0, DefStruct *defstruct=NULL);
~ConfigDlg() {}
DefStruct *defst ;
- QLineEdit *mail;
- QLineEdit *print;
+ TQLineEdit *mail;
+ TQLineEdit *print;
private slots:
void okButton();
void cancelbutton();
- void set_fore_color(const QColor &);
- void set_background_color(const QColor &);
+ void set_fore_color(const TQColor &);
+ void set_background_color(const TQColor &);
void help();
signals:
@@ -78,34 +79,34 @@ public:
private:
- QGroupBox *box;
+ TQGroupBox *box;
- QPushButton *ok;
- QPushButton *cancel;
+ TQPushButton *ok;
+ TQPushButton *cancel;
- QLabel *label1;
+ TQLabel *label1;
KColorButton *button1;
- QLabel *label2;
+ TQLabel *label2;
KColorButton *button2;
- QLabel *label3;
- QPushButton *button3;
- QLabel *label5;
-
- QGroupBox *gbox;
- QCheckBox *cb;
- QCheckBox *cb2;
- QSpinBox* precspin;
- QSpinBox* precspin2;
- QCheckBox *mybox;
- QCheckBox *frame3d;
-
- QButtonGroup *stylegroup;
- QLabel *stylelabel;
- QRadioButton *trigstyle;
- QRadioButton *statstyle;
- QRadioButton *sheetstyle;
+ TQLabel *label3;
+ TQPushButton *button3;
+ TQLabel *label5;
+
+ TQGroupBox *gbox;
+ TQCheckBox *cb;
+ TQCheckBox *cb2;
+ TQSpinBox* precspin;
+ TQSpinBox* precspin2;
+ TQCheckBox *mybox;
+ TQCheckBox *frame3d;
+
+ TQButtonGroup *stylegroup;
+ TQLabel *stylelabel;
+ TQRadioButton *trigstyle;
+ TQRadioButton *statstyle;
+ TQRadioButton *sheetstyle;
};
#endif
diff --git a/kspread/plugins/calculator/dlabel.cpp b/kspread/plugins/calculator/dlabel.cpp
index b35f2666..011642c5 100644
--- a/kspread/plugins/calculator/dlabel.cpp
+++ b/kspread/plugins/calculator/dlabel.cpp
@@ -2,7 +2,7 @@
$Id: dlabel.cpp 466447 2005-10-02 17:54:10Z zander $
KCalc, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
Copyright (C) 1996 Bernd Johannes Wuebben
wuebben@math.cornell.edu
@@ -26,14 +26,14 @@
#include "dlabel.h"
-DLabel::DLabel(QWidget *parent, const char *name)
- :QLabel(parent,name){
+DLabel::DLabel(TQWidget *tqparent, const char *name)
+ :TQLabel(tqparent,name){
button = 0;
lit = false;
}
-void DLabel::mousePressEvent(QMouseEvent *e){
+void DLabel::mousePressEvent(TQMouseEvent *e){
if(e->button() == LeftButton){
lit = !lit;
diff --git a/kspread/plugins/calculator/dlabel.h b/kspread/plugins/calculator/dlabel.h
index 9222e990..1ed80096 100644
--- a/kspread/plugins/calculator/dlabel.h
+++ b/kspread/plugins/calculator/dlabel.h
@@ -29,22 +29,23 @@
#ifndef _D_LABEL_H_
#define _D_LABEL_H_
-#include <qlabel.h>
+#include <tqlabel.h>
-class DLabel : public QLabel {
+class DLabel : public TQLabel {
Q_OBJECT
+ TQ_OBJECT
public:
-DLabel(QWidget *parent=0, const char *name=0);
+DLabel(TQWidget *tqparent=0, const char *name=0);
~DLabel() {}
protected:
- void mousePressEvent ( QMouseEvent *);
+ void mousePressEvent ( TQMouseEvent *);
public:
bool isLit();
diff --git a/kspread/plugins/calculator/kcalc.cpp b/kspread/plugins/calculator/kcalc.cpp
index 1726653b..a8cdc22a 100644
--- a/kspread/plugins/calculator/kcalc.cpp
+++ b/kspread/plugins/calculator/kcalc.cpp
@@ -26,12 +26,12 @@
#include "version.h"
#include <klocale.h>
#include <knotifyclient.h>
-#include <qlayout.h>
-#include <qobjectlist.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqobjectlist.h>
+#include <tqpushbutton.h>
#include <kapplication.h>
#include <kglobalsettings.h>
-#include <qstyle.h>
+#include <tqstyle.h>
#include <kdialog.h>
#include <kconfig.h>
#include <kglobal.h>
@@ -41,91 +41,91 @@ extern last_input_type last_input;
extern item_contents display_data;
extern num_base current_base;
-QPtrList<CALCAMNT> temp_stack;
+TQPtrList<CALCAMNT> temp_stack;
-QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *name )
- : QDialog( parent, name )
+TQtCalculator :: TQtCalculator( Calculator *_corba, TQWidget *tqparent, const char *name )
+ : TQDialog( tqparent, name )
{
corba = _corba;
mInternalSpacing=4;
key_pressed = false;
- selection_timer = new QTimer;
- status_timer = new QTimer;
+ selection_timer = new TQTimer;
+ status_timer = new TQTimer;
- connect(status_timer,SIGNAL(timeout()),this,SLOT(clear_status_label()));
- connect(selection_timer,SIGNAL(timeout()),this,SLOT(selection_timed_out()));
+ connect(status_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(clear_status_label()));
+ connect(selection_timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(selection_timed_out()));
readSettings();
- QFont buttonfont( KGlobalSettings::generalFont() );
- buttonfont.setStyleStrategy( QFont::PreferAntialias );
+ TQFont buttonfont( KGlobalSettings::generalFont() );
+ buttonfont.setStyleStrategy( TQFont::PreferAntialias );
// Set the window caption/title
- // connect(kapp,SIGNAL(kdisplayPaletteChanged()),this,SLOT(set_colors()));
+ // connect(kapp,TQT_SIGNAL(kdisplayPaletteChanged()),this,TQT_SLOT(set_colors()));
// setCaption( kapp->caption() );
// create help button
- QPushButton *pb;
+ TQPushButton *pb;
- pb = new QPushButton( this, "helpbutton" );
+ pb = new TQPushButton( this, "helpbutton" );
pb->setText( "kCalc" );
- pb->setFont( QFont("times",12,QFont::Bold,FALSE) );
- QToolTip::add( pb, i18n("KCalc Setup/Help") );
+ pb->setFont( TQFont("times",12,TQFont::Bold,FALSE) );
+ TQToolTip::add( pb, i18n("KCalc Setup/Help") );
- connect( pb, SIGNAL(clicked()), SLOT(configclicked()) );
+ connect( pb, TQT_SIGNAL(clicked()), TQT_SLOT(configclicked()) );
// Create the display
calc_display = new DLabel( this, "display" );
- calc_display->setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
- calc_display->setAlignment( AlignRight|AlignVCenter );
+ calc_display->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+ calc_display->tqsetAlignment( AlignRight|AlignVCenter );
calc_display->setFocus();
- calc_display->setFocusPolicy( QWidget::StrongFocus );
+ calc_display->setFocusPolicy( TQ_StrongFocus );
- connect(calc_display,SIGNAL(clicked()),this,SLOT(display_selected()));
+ connect(calc_display,TQT_SIGNAL(clicked()),this,TQT_SLOT(display_selected()));
- statusINVLabel = new QLabel( this, "INV" );
+ statusINVLabel = new TQLabel( this, "INV" );
Q_CHECK_PTR( statusINVLabel );
- statusINVLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- statusINVLabel->setAlignment( AlignCenter );
+ statusINVLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ statusINVLabel->tqsetAlignment( AlignCenter );
statusINVLabel->setText("NORM");
- statusHYPLabel = new QLabel( this, "HYP" );
+ statusHYPLabel = new TQLabel( this, "HYP" );
Q_CHECK_PTR( statusHYPLabel );
- statusHYPLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- statusHYPLabel->setAlignment( AlignCenter );
+ statusHYPLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ statusHYPLabel->tqsetAlignment( AlignCenter );
- statusERRORLabel = new QLabel( this, "ERROR" );
+ statusERRORLabel = new TQLabel( this, "ERROR" );
Q_CHECK_PTR( statusERRORLabel );
- statusERRORLabel->setFrameStyle( QFrame::Panel | QFrame::Sunken );
- statusERRORLabel->setAlignment( AlignLeft|AlignVCenter );
+ statusERRORLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
+ statusERRORLabel->tqsetAlignment( AlignLeft|AlignVCenter );
// create angle button group
- QAccel *accel = new QAccel( this );
+ TQAccel *accel = new TQAccel( this );
- QButtonGroup *angle_group = new QButtonGroup( 3, Horizontal,this, "AngleButtons" );
+ TQButtonGroup *angle_group = new TQButtonGroup( 3,Qt::Horizontal,this, "AngleButtons" );
angle_group->setTitle(i18n( "Angle") );
- anglebutton[0] = new QRadioButton( angle_group );
+ anglebutton[0] = new TQRadioButton( angle_group );
anglebutton[0]->setText( "&Deg" ) ;
anglebutton[0]->setChecked( TRUE);
accel->connectItem( accel->insertItem(Key_D + ALT), this ,
- SLOT(Deg_Selected()) );
+ TQT_SLOT(Deg_Selected()) );
- anglebutton[1] = new QRadioButton( angle_group );
+ anglebutton[1] = new TQRadioButton( angle_group );
anglebutton[1]->setText( "&Rad" );
accel->connectItem( accel->insertItem(Key_R + ALT), this ,
- SLOT(Rad_Selected()) );
+ TQT_SLOT(Rad_Selected()) );
- anglebutton[2] = new QRadioButton( angle_group );
+ anglebutton[2] = new TQRadioButton( angle_group );
anglebutton[2]->setText( "&Gra" );
accel->connectItem( accel->insertItem(Key_G + ALT), this ,
- SLOT(Gra_Selected()) );
+ TQT_SLOT(Gra_Selected()) );
- connect( angle_group, SIGNAL(clicked(int)), SLOT(angle_selected(int)) );
+ connect( angle_group, TQT_SIGNAL(clicked(int)), TQT_SLOT(angle_selected(int)) );
//////////////////////////////////////////////////////////////////////
@@ -135,31 +135,31 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
- QButtonGroup *base_group = new QButtonGroup( 4, Horizontal,this, "BaseButtons" );
+ TQButtonGroup *base_group = new TQButtonGroup( 4,Qt::Horizontal,this, "BaseButtons" );
base_group->setTitle( i18n("Base") );
- basebutton[0] = new QRadioButton( base_group );
+ basebutton[0] = new TQRadioButton( base_group );
basebutton[0]->setText( "&Hex" );
accel->connectItem( accel->insertItem(Key_H + ALT), this ,
- SLOT(Hex_Selected()) );
+ TQT_SLOT(Hex_Selected()) );
- basebutton[1] = new QRadioButton( base_group );
+ basebutton[1] = new TQRadioButton( base_group );
basebutton[1]->setText( "D&ec" );
basebutton[1]->setChecked(TRUE);
accel->connectItem( accel->insertItem(Key_E + ALT), this ,
- SLOT(Dec_Selected()) );
+ TQT_SLOT(Dec_Selected()) );
- basebutton[2] = new QRadioButton( base_group );
+ basebutton[2] = new TQRadioButton( base_group );
basebutton[2]->setText( "&Oct" );
accel->connectItem( accel->insertItem(Key_O + ALT), this ,
- SLOT(Oct_Selected()) );
+ TQT_SLOT(Oct_Selected()) );
- basebutton[3] = new QRadioButton( base_group);
+ basebutton[3] = new TQRadioButton( base_group);
basebutton[3]->setText( "&Bin" );
accel->connectItem( accel->insertItem(Key_B + ALT), this ,
- SLOT(Bin_Selected()) );
+ TQT_SLOT(Bin_Selected()) );
- connect( base_group, SIGNAL(clicked(int)), SLOT(base_selected(int)) );
+ connect( base_group, TQT_SIGNAL(clicked(int)), TQT_SLOT(base_selected(int)) );
////////////////////////////////////////////////////////////////////////
//
@@ -167,222 +167,222 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
//
- // First the widgets that are the parents of the buttons
- mSmallPage = new QWidget(this);
- mLargePage = new QWidget(this);
+ // First the widgets that are the tqparents of the buttons
+ mSmallPage = new TQWidget(this);
+ mLargePage = new TQWidget(this);
- pbhyp = new QPushButton("Hyp", mSmallPage, "hypbutton" );
- connect( pbhyp, SIGNAL(toggled(bool)), SLOT(pbhyptoggled(bool)));
+ pbhyp = new TQPushButton("Hyp", mSmallPage, "hypbutton" );
+ connect( pbhyp, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbhyptoggled(bool)));
pbhyp->setToggleButton(TRUE);
- pbinv = new QPushButton( "Inv", mSmallPage, "InverseButton" );
- connect( pbinv, SIGNAL(toggled(bool)), SLOT(pbinvtoggled(bool)));
+ pbinv = new TQPushButton( "Inv", mSmallPage, "InverseButton" );
+ connect( pbinv, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbinvtoggled(bool)));
pbinv->setToggleButton(TRUE);
- pbA = new QPushButton("A",mSmallPage, "Abutton" );
- connect( pbA, SIGNAL(toggled(bool)), SLOT(pbAtoggled(bool)));
+ pbA = new TQPushButton("A",mSmallPage, "Abutton" );
+ connect( pbA, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbAtoggled(bool)));
pbA->setToggleButton(TRUE);
- pbSin = new QPushButton("Sin",mSmallPage, "Sinbutton" );
- connect( pbSin, SIGNAL(toggled(bool)), SLOT(pbSintoggled(bool)));
+ pbSin = new TQPushButton("Sin",mSmallPage, "Sinbutton" );
+ connect( pbSin, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbSintoggled(bool)));
pbSin->setToggleButton(TRUE);
- pbplusminus = new QPushButton( "+/-", mSmallPage, "plusminusbutton" );
- connect( pbplusminus, SIGNAL(toggled(bool)), SLOT(pbplusminustoggled(bool)));
+ pbplusminus = new TQPushButton( "+/-", mSmallPage, "plusminusbutton" );
+ connect( pbplusminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbplusminustoggled(bool)));
pbplusminus->setToggleButton(TRUE);
pbplusminus->setFont(buttonfont);
- pbB = new QPushButton("B", mSmallPage, "Bbutton" );
- connect( pbB, SIGNAL(toggled(bool)), SLOT(pbBtoggled(bool)));
+ pbB = new TQPushButton("B", mSmallPage, "Bbutton" );
+ connect( pbB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbBtoggled(bool)));
pbB->setToggleButton(TRUE);
- pbCos = new QPushButton("Cos",mSmallPage, "Cosbutton" );
+ pbCos = new TQPushButton("Cos",mSmallPage, "Cosbutton" );
pbCos->setText( "Cos" );
- connect( pbCos, SIGNAL(toggled(bool)), SLOT(pbCostoggled(bool)));
+ connect( pbCos, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCostoggled(bool)));
pbCos->setToggleButton(TRUE);
- pbreci = new QPushButton("1/x",mSmallPage, "recibutton" );
- connect( pbreci, SIGNAL(toggled(bool)), SLOT(pbrecitoggled(bool)));
+ pbreci = new TQPushButton("1/x",mSmallPage, "recibutton" );
+ connect( pbreci, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbrecitoggled(bool)));
pbreci->setToggleButton(TRUE);
- pbC = new QPushButton( "C", mSmallPage, "Cbutton" );
- connect( pbC, SIGNAL(toggled(bool)), SLOT(pbCtoggled(bool)));
+ pbC = new TQPushButton( "C", mSmallPage, "Cbutton" );
+ connect( pbC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCtoggled(bool)));
pbC->setToggleButton(TRUE);
- pbTan = new QPushButton("Tan" ,mSmallPage, "Tanbutton" );
- connect( pbTan, SIGNAL(toggled(bool)), SLOT(pbTantoggled(bool)));
+ pbTan = new TQPushButton("Tan" ,mSmallPage, "Tanbutton" );
+ connect( pbTan, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbTantoggled(bool)));
pbTan->setToggleButton(TRUE);
- pbfactorial = new QPushButton("x!",mSmallPage, "factorialbutton" );
- connect( pbfactorial, SIGNAL(toggled(bool)), SLOT(pbfactorialtoggled(bool)));
+ pbfactorial = new TQPushButton("x!",mSmallPage, "factorialbutton" );
+ connect( pbfactorial, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbfactorialtoggled(bool)));
pbfactorial->setToggleButton(TRUE);
- pbD = new QPushButton("D",mSmallPage, "Dbutton" );
- connect( pbD, SIGNAL(toggled(bool)), SLOT(pbDtoggled(bool)));
+ pbD = new TQPushButton("D",mSmallPage, "Dbutton" );
+ connect( pbD, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbDtoggled(bool)));
pbD->setToggleButton(TRUE);
- pblog = new QPushButton("Log",mSmallPage, "logbutton" );
- connect( pblog, SIGNAL(toggled(bool)), SLOT(pblogtoggled(bool)));
+ pblog = new TQPushButton("Log",mSmallPage, "logbutton" );
+ connect( pblog, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pblogtoggled(bool)));
pblog->setToggleButton(TRUE);
- pbsquare = new QPushButton( "x^2", mSmallPage, "squarebutton" );
- connect( pbsquare, SIGNAL(toggled(bool)), SLOT(pbsquaretoggled(bool)));
+ pbsquare = new TQPushButton( "x^2", mSmallPage, "squarebutton" );
+ connect( pbsquare, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbsquaretoggled(bool)));
pbsquare->setToggleButton(TRUE);
- pbE = new QPushButton("E",mSmallPage, "Ebutton" );
- connect( pbE, SIGNAL(toggled(bool)), SLOT(pbEtoggled(bool)));
+ pbE = new TQPushButton("E",mSmallPage, "Ebutton" );
+ connect( pbE, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbEtoggled(bool)));
pbE->setToggleButton(TRUE);
- pbln = new QPushButton( "Ln", mSmallPage, "lnbutton" );
- connect( pbln, SIGNAL(toggled(bool)), SLOT(pblntoggled(bool)));
+ pbln = new TQPushButton( "Ln", mSmallPage, "lnbutton" );
+ connect( pbln, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pblntoggled(bool)));
pbln->setToggleButton(TRUE);
- pbpower = new QPushButton("x^y",mSmallPage, "powerbutton" );
- connect( pbpower, SIGNAL(toggled(bool)), SLOT(pbpowertoggled(bool)));
+ pbpower = new TQPushButton("x^y",mSmallPage, "powerbutton" );
+ connect( pbpower, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbpowertoggled(bool)));
pbpower->setToggleButton(TRUE);
- pbF = new QPushButton("F",mSmallPage, "Fbutton" );
- connect( pbF, SIGNAL(toggled(bool)), SLOT(pbFtoggled(bool)));
+ pbF = new TQPushButton("F",mSmallPage, "Fbutton" );
+ connect( pbF, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbFtoggled(bool)));
pbF->setToggleButton(TRUE);
- pbEE = new QPushButton("EE",mLargePage, "EEbutton" );
+ pbEE = new TQPushButton("EE",mLargePage, "EEbutton" );
pbEE->setToggleButton(TRUE);
- connect( pbEE, SIGNAL(toggled(bool)), SLOT(EEtoggled(bool)));
+ connect( pbEE, TQT_SIGNAL(toggled(bool)), TQT_SLOT(EEtoggled(bool)));
- pbMR = new QPushButton("MR",mLargePage, "MRbutton" );
- connect( pbMR, SIGNAL(toggled(bool)), SLOT(pbMRtoggled(bool)));
+ pbMR = new TQPushButton("MR",mLargePage, "MRbutton" );
+ connect( pbMR, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMRtoggled(bool)));
pbMR->setToggleButton(TRUE);
pbMR->setFont(buttonfont);
- pbMplusminus = new QPushButton("M+-",mLargePage, "Mplusminusbutton" );
- connect( pbMplusminus, SIGNAL(toggled(bool)), SLOT(pbMplusminustoggled(bool)));
+ pbMplusminus = new TQPushButton("M+-",mLargePage, "Mplusminusbutton" );
+ connect( pbMplusminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMplusminustoggled(bool)));
pbMplusminus->setToggleButton(TRUE);
- pbMC = new QPushButton("MC",mLargePage, "MCbutton" );
- connect( pbMC, SIGNAL(toggled(bool)), SLOT(pbMCtoggled(bool)));
+ pbMC = new TQPushButton("MC",mLargePage, "MCbutton" );
+ connect( pbMC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbMCtoggled(bool)));
pbMC->setToggleButton(TRUE);
- pbClear = new QPushButton("C",mLargePage, "Clearbutton" );
- connect( pbClear, SIGNAL(toggled(bool)), SLOT(pbCleartoggled(bool)));
+ pbClear = new TQPushButton("C",mLargePage, "Clearbutton" );
+ connect( pbClear, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbCleartoggled(bool)));
pbClear->setToggleButton(TRUE);
- pbAC = new QPushButton("AC", mLargePage, "ACbutton" );
- connect( pbAC, SIGNAL(toggled(bool)), SLOT(pbACtoggled(bool)));
+ pbAC = new TQPushButton("AC", mLargePage, "ACbutton" );
+ connect( pbAC, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbACtoggled(bool)));
pbAC->setToggleButton(TRUE);
- pb7 = new QPushButton("7",mLargePage, "7button" );
- connect( pb7, SIGNAL(toggled(bool)), SLOT(pb7toggled(bool)));
+ pb7 = new TQPushButton("7",mLargePage, "7button" );
+ connect( pb7, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb7toggled(bool)));
pb7->setToggleButton(TRUE);
- pb8 = new QPushButton("8",mLargePage, "8button" );
- connect( pb8, SIGNAL(toggled(bool)), SLOT(pb8toggled(bool)));
+ pb8 = new TQPushButton("8",mLargePage, "8button" );
+ connect( pb8, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb8toggled(bool)));
pb8->setToggleButton(TRUE);
- pb9 = new QPushButton("9",mLargePage,"9button" );
- connect( pb9, SIGNAL(toggled(bool)), SLOT(pb9toggled(bool)));
+ pb9 = new TQPushButton("9",mLargePage,"9button" );
+ connect( pb9, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb9toggled(bool)));
pb9->setToggleButton(TRUE);
- pbparenopen = new QPushButton("(",mLargePage, "parenopenbutton" );
- connect( pbparenopen, SIGNAL(toggled(bool)), SLOT(pbparenopentoggled(bool)));
+ pbparenopen = new TQPushButton("(",mLargePage, "parenopenbutton" );
+ connect( pbparenopen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbparenopentoggled(bool)));
pbparenopen->setToggleButton(TRUE);
- pbparenclose = new QPushButton(")",mLargePage, "parenclosebutton" );
- connect( pbparenclose, SIGNAL(toggled(bool)), SLOT(pbparenclosetoggled(bool)));
+ pbparenclose = new TQPushButton(")",mLargePage, "parenclosebutton" );
+ connect( pbparenclose, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbparenclosetoggled(bool)));
pbparenclose->setToggleButton(TRUE);
- pband = new QPushButton("And",mLargePage, "andbutton" );
- connect( pband, SIGNAL(toggled(bool)), SLOT(pbandtoggled(bool)));
+ pband = new TQPushButton("And",mLargePage, "andbutton" );
+ connect( pband, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbandtoggled(bool)));
pband->setToggleButton(TRUE);
pband->setFont(buttonfont);
- pb4 = new QPushButton("4",mLargePage, "4button" );
- connect( pb4, SIGNAL(toggled(bool)), SLOT(pb4toggled(bool)));
+ pb4 = new TQPushButton("4",mLargePage, "4button" );
+ connect( pb4, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb4toggled(bool)));
pb4->setToggleButton(TRUE);
- pb5 = new QPushButton("5",mLargePage, "5button" );
- connect( pb5, SIGNAL(toggled(bool)), SLOT(pb5toggled(bool)));
+ pb5 = new TQPushButton("5",mLargePage, "5button" );
+ connect( pb5, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb5toggled(bool)));
pb5->setToggleButton(TRUE);
- pb6 = new QPushButton("6",mLargePage, "6button" );
- connect( pb6, SIGNAL(toggled(bool)), SLOT(pb6toggled(bool)));
+ pb6 = new TQPushButton("6",mLargePage, "6button" );
+ connect( pb6, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb6toggled(bool)));
pb6->setToggleButton(TRUE);
- pbX = new QPushButton("X",mLargePage, "Multiplybutton" );
- connect( pbX, SIGNAL(toggled(bool)), SLOT(pbXtoggled(bool)));
+ pbX = new TQPushButton("X",mLargePage, "Multiplybutton" );
+ connect( pbX, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbXtoggled(bool)));
pbX->setToggleButton(TRUE);
- pbdivision = new QPushButton("/",mLargePage, "divisionbutton" );
- connect( pbdivision, SIGNAL(toggled(bool)), SLOT(pbdivisiontoggled(bool)));
+ pbdivision = new TQPushButton("/",mLargePage, "divisionbutton" );
+ connect( pbdivision, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbdivisiontoggled(bool)));
pbdivision->setToggleButton(TRUE);
- pbor = new QPushButton("Or",mLargePage, "orbutton" );
- connect( pbor, SIGNAL(toggled(bool)), SLOT(pbortoggled(bool)));
+ pbor = new TQPushButton("Or",mLargePage, "orbutton" );
+ connect( pbor, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbortoggled(bool)));
pbor->setToggleButton(TRUE);
- pb1 = new QPushButton("1",mLargePage, "1button" );
- connect( pb1, SIGNAL(toggled(bool)), SLOT(pb1toggled(bool)));
+ pb1 = new TQPushButton("1",mLargePage, "1button" );
+ connect( pb1, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb1toggled(bool)));
pb1->setToggleButton(TRUE);
- pb2 = new QPushButton("2",mLargePage, "2button" );
+ pb2 = new TQPushButton("2",mLargePage, "2button" );
- connect( pb2, SIGNAL(toggled(bool)), SLOT(pb2toggled(bool)));
+ connect( pb2, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb2toggled(bool)));
pb2->setToggleButton(TRUE);
- pb3 = new QPushButton("3",mLargePage, "3button" );
- connect( pb3, SIGNAL(toggled(bool)), SLOT(pb3toggled(bool)));
+ pb3 = new TQPushButton("3",mLargePage, "3button" );
+ connect( pb3, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb3toggled(bool)));
pb3->setToggleButton(TRUE);
- pbplus = new QPushButton("+",mLargePage, "plusbutton" );
- connect( pbplus, SIGNAL(toggled(bool)), SLOT(pbplustoggled(bool)));
+ pbplus = new TQPushButton("+",mLargePage, "plusbutton" );
+ connect( pbplus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbplustoggled(bool)));
pbplus->setToggleButton(TRUE);
- pbminus = new QPushButton("-",mLargePage, "minusbutton" );
- connect( pbminus, SIGNAL(toggled(bool)), SLOT(pbminustoggled(bool)));
+ pbminus = new TQPushButton("-",mLargePage, "minusbutton" );
+ connect( pbminus, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbminustoggled(bool)));
pbminus->setToggleButton(TRUE);
- pbshift = new QPushButton("Lsh",mLargePage, "shiftbutton" );
- connect( pbshift, SIGNAL(toggled(bool)), SLOT(pbshifttoggled(bool)));
+ pbshift = new TQPushButton("Lsh",mLargePage, "shiftbutton" );
+ connect( pbshift, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbshifttoggled(bool)));
pbshift->setToggleButton(TRUE);
- pbperiod = new QPushButton(".",mLargePage, "periodbutton" );
- connect( pbperiod, SIGNAL(toggled(bool)), SLOT(pbperiodtoggled(bool)));
+ pbperiod = new TQPushButton(".",mLargePage, "periodbutton" );
+ connect( pbperiod, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbperiodtoggled(bool)));
pbperiod->setToggleButton(TRUE);
- pb0 = new QPushButton("0",mLargePage, "0button" );
- connect( pb0, SIGNAL(toggled(bool)), SLOT(pb0toggled(bool)));
+ pb0 = new TQPushButton("0",mLargePage, "0button" );
+ connect( pb0, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pb0toggled(bool)));
pb0->setToggleButton(TRUE);
- pbequal = new QPushButton("=",mLargePage, "equalbutton" );
- connect( pbequal, SIGNAL(toggled(bool)), SLOT(pbequaltoggled(bool)));
+ pbequal = new TQPushButton("=",mLargePage, "equalbutton" );
+ connect( pbequal, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbequaltoggled(bool)));
pbequal->setToggleButton(TRUE);
- pbpercent = new QPushButton("%",mLargePage, "percentbutton" );
- connect( pbpercent, SIGNAL(toggled(bool)), SLOT(pbpercenttoggled(bool)));
+ pbpercent = new TQPushButton("%",mLargePage, "percentbutton" );
+ connect( pbpercent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbpercenttoggled(bool)));
pbpercent->setToggleButton(TRUE);
- pbnegate = new QPushButton("Cmp",mLargePage, "OneComplementbutton" );
- connect( pbnegate, SIGNAL(toggled(bool)), SLOT(pbnegatetoggled(bool)));
+ pbnegate = new TQPushButton("Cmp",mLargePage, "OneComplementbutton" );
+ connect( pbnegate, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbnegatetoggled(bool)));
pbnegate->setToggleButton(TRUE);
- pbmod = new QPushButton("Mod",mLargePage, "modbutton" );
- connect( pbmod, SIGNAL(toggled(bool)), SLOT(pbmodtoggled(bool)));
+ pbmod = new TQPushButton("Mod",mLargePage, "modbutton" );
+ connect( pbmod, TQT_SIGNAL(toggled(bool)), TQT_SLOT(pbmodtoggled(bool)));
pbmod->setToggleButton(TRUE);
- QGridLayout *smallBtnLayout = new QGridLayout(mSmallPage, 6, 3, 0,
+ TQGridLayout *smallBtnLayout = new TQGridLayout(mSmallPage, 6, 3, 0,
mInternalSpacing);
- QGridLayout *largeBtnLayout = new QGridLayout(mLargePage, 5, 6, 0,
+ TQGridLayout *largeBtnLayout = new TQGridLayout(mLargePage, 5, 6, 0,
mInternalSpacing);
- QHBoxLayout *topLayout = new QHBoxLayout();
- QHBoxLayout *radioLayout = new QHBoxLayout();
- QHBoxLayout *btnLayout = new QHBoxLayout();
- QHBoxLayout *statusLayout = new QHBoxLayout();
+ TQHBoxLayout *topLayout = new TQHBoxLayout();
+ TQHBoxLayout *radioLayout = new TQHBoxLayout();
+ TQHBoxLayout *btnLayout = new TQHBoxLayout();
+ TQHBoxLayout *statusLayout = new TQHBoxLayout();
// bring them all together
- QVBoxLayout *mainLayout = new QVBoxLayout(this, mInternalSpacing,
+ TQVBoxLayout *mainLayout = new TQVBoxLayout(this, mInternalSpacing,
mInternalSpacing );
mainLayout->addLayout(topLayout );
@@ -390,12 +390,12 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
mainLayout->addLayout(btnLayout);
mainLayout->addLayout(statusLayout);
- // button layout
+ // button tqlayout
btnLayout->addWidget(mSmallPage,0,AlignTop);
btnLayout->addSpacing(mInternalSpacing);
btnLayout->addWidget(mLargePage,0,AlignTop);
- // small button layout
+ // small button tqlayout
smallBtnLayout->addWidget(pbhyp, 0, 0);
smallBtnLayout->addWidget(pbinv, 0, 1);
smallBtnLayout->addWidget(pbA, 0, 2);
@@ -427,7 +427,7 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
smallBtnLayout->setRowStretch(4, 0);
smallBtnLayout->setRowStretch(5, 0);
- // large button layout
+ // large button tqlayout
largeBtnLayout->addWidget(pbEE, 0, 0);
largeBtnLayout->addWidget(pbMR, 0, 1);
largeBtnLayout->addWidget(pbMplusminus, 0, 2);
@@ -472,11 +472,11 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
topLayout->addWidget(calc_display, 10);
- // radiobutton layout
+ // radiobutton tqlayout
radioLayout->addWidget(base_group);
radioLayout->addWidget(angle_group);
- // status layout
+ // status tqlayout
statusLayout->addWidget(statusINVLabel);
statusLayout->addWidget(statusHYPLabel);
statusLayout->addWidget(statusERRORLabel, 10);
@@ -542,22 +542,22 @@ QtCalculator :: QtCalculator( Calculator *_corba, QWidget *parent, const char *n
InitializeCalculator();
}
-QtCalculator::~QtCalculator()
+TQtCalculator::~TQtCalculator()
{
delete selection_timer;
delete status_timer;
}
-void QtCalculator::set_display_font()
+void TQtCalculator::set_display_font()
{
calc_display->setFont(kcalcdefaults.font);
}
-void QtCalculator::updateGeometry()
+void TQtCalculator::updateGeometry()
{
- QObjectList *l;
- QSize s;
+ TQObjectList *l;
+ TQSize s;
int margin;
//
@@ -568,9 +568,9 @@ void QtCalculator::updateGeometry()
//
// Button groups (base and angle)
//
- //QButtonGroup *g;
- //g = (QButtonGroup*)(anglebutton[0]->parentWidget());
- //g = (QButtonGroup*)(basebutton[0]->parentWidget());
+ //TQButtonGroup *g;
+ //g = (TQButtonGroup*)(anglebutton[0]->tqparentWidget());
+ //g = (TQButtonGroup*)(basebutton[0]->tqparentWidget());
//
// Calculator buttons
@@ -578,38 +578,38 @@ void QtCalculator::updateGeometry()
s.setWidth(mSmallPage->fontMetrics().width("MMM"));
s.setHeight(mSmallPage->fontMetrics().lineSpacing());
- l = (QObjectList*)mSmallPage->children(); // silence please
+ l = (TQObjectList*)mSmallPage->tqchildren(); // silence please
for(uint i=0; i < l->count(); i++)
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if( o->isWidgetType() )
{
- margin = QApplication::style().
- pixelMetric(QStyle::PM_ButtonMargin, ((QWidget *)o))*2;
- ((QWidget*)o)->setMinimumSize(s.width()+margin, s.height()+margin);
- ((QWidget*)o)->installEventFilter( this );
- ((QWidget*)o)->setAcceptDrops(true);
+ margin = TQApplication::style().
+ tqpixelMetric(TQStyle::PM_ButtonMargin, ((TQWidget *)o))*2;
+ ((TQWidget*)o)->setMinimumSize(s.width()+margin, s.height()+margin);
+ ((TQWidget*)o)->installEventFilter( this );
+ ((TQWidget*)o)->setAcceptDrops(true);
}
}
- l = (QObjectList*)mLargePage->children(); // silence please
+ l = (TQObjectList*)mLargePage->tqchildren(); // silence please
- int h1 = pbF->minimumSize().height();
+ int h1 = pbF->tqminimumSize().height();
int h2 = (int)((((float)h1 + 4.0) / 5.0));
s.setWidth(mLargePage->fontMetrics().width("MMM") +
- QApplication::style().
- pixelMetric(QStyle::PM_ButtonMargin, pbF)*2);
+ TQApplication::style().
+ tqpixelMetric(TQStyle::PM_ButtonMargin, pbF)*2);
s.setHeight(h1 + h2);
for(uint i = 0; i < l->count(); i++)
{
- QObject *o = l->at(i);
+ TQObject *o = l->at(i);
if(o->isWidgetType())
{
- ((QWidget*)o)->setFixedSize(s);
- ((QWidget*)o)->installEventFilter(this);
- ((QWidget*)o)->setAcceptDrops(true);
+ ((TQWidget*)o)->setFixedSize(s);
+ ((TQWidget*)o)->installEventFilter(this);
+ ((TQWidget*)o)->setAcceptDrops(true);
}
}
@@ -621,15 +621,15 @@ void QtCalculator::updateGeometry()
statusINVLabel->setMinimumWidth(s.width());
statusHYPLabel->setMinimumWidth(s.width());
- //setFixedSize(minimumSize());
+ //setFixedSize(tqminimumSize());
}
-void QtCalculator::exit()
+void TQtCalculator::exit()
{
- // QApplication::exit();
+ // TQApplication::exit();
}
-void QtCalculator::Hex_Selected()
+void TQtCalculator::Hex_Selected()
{
basebutton[0]->setChecked(TRUE);
basebutton[1]->setChecked(FALSE);
@@ -639,7 +639,7 @@ void QtCalculator::Hex_Selected()
}
-void QtCalculator::Dec_Selected()
+void TQtCalculator::Dec_Selected()
{
basebutton[0]->setChecked(FALSE);
basebutton[1]->setChecked(TRUE);
@@ -649,7 +649,7 @@ void QtCalculator::Dec_Selected()
}
-void QtCalculator::Oct_Selected()
+void TQtCalculator::Oct_Selected()
{
basebutton[0]->setChecked(FALSE);
basebutton[1]->setChecked(FALSE);
@@ -660,7 +660,7 @@ void QtCalculator::Oct_Selected()
-void QtCalculator::Bin_Selected()
+void TQtCalculator::Bin_Selected()
{
basebutton[0]->setChecked(FALSE);
basebutton[1]->setChecked(FALSE);
@@ -669,7 +669,7 @@ void QtCalculator::Bin_Selected()
SetBin();
}
-void QtCalculator::Deg_Selected()
+void TQtCalculator::Deg_Selected()
{
anglebutton[0]->setChecked(TRUE);
anglebutton[1]->setChecked(FALSE);
@@ -678,7 +678,7 @@ void QtCalculator::Deg_Selected()
}
-void QtCalculator::Rad_Selected()
+void TQtCalculator::Rad_Selected()
{
anglebutton[0]->setChecked(FALSE);
anglebutton[1]->setChecked(TRUE);
@@ -688,7 +688,7 @@ void QtCalculator::Rad_Selected()
}
-void QtCalculator::Gra_Selected()
+void TQtCalculator::Gra_Selected()
{
anglebutton[0]->setChecked(FALSE);
anglebutton[1]->setChecked(FALSE);
@@ -697,10 +697,10 @@ void QtCalculator::Gra_Selected()
}
-void QtCalculator::helpclicked(){
+void TQtCalculator::helpclicked(){
}
-void QtCalculator::keyPressEvent( QKeyEvent *e ){
+void TQtCalculator::keyPressEvent( TQKeyEvent *e ){
switch (e->key() ){
@@ -936,7 +936,7 @@ void QtCalculator::keyPressEvent( QKeyEvent *e ){
}
}
-void QtCalculator::keyReleaseEvent( QKeyEvent *e ){
+void TQtCalculator::keyReleaseEvent( TQKeyEvent *e ){
switch (e->key() ){
case Key_Next:
@@ -1150,11 +1150,11 @@ void QtCalculator::keyReleaseEvent( QKeyEvent *e ){
clear_buttons();
}
-void QtCalculator::clear_buttons(){
+void TQtCalculator::clear_buttons(){
}
-void QtCalculator::EEtoggled(bool myboolean){
+void TQtCalculator::EEtoggled(bool myboolean){
if(myboolean)
EE();
@@ -1162,327 +1162,327 @@ void QtCalculator::EEtoggled(bool myboolean){
pbEE->setOn(FALSE);
}
-void QtCalculator::pbinvtoggled(bool myboolean){
+void TQtCalculator::pbinvtoggled(bool myboolean){
if(myboolean)
SetInverse();
if(pbinv->isOn() && (!key_pressed))
pbinv->setOn(FALSE);
}
-void QtCalculator::pbhyptoggled(bool myboolean){
+void TQtCalculator::pbhyptoggled(bool myboolean){
if(myboolean)
EnterHyp();
if(pbhyp->isOn() && (!key_pressed))
pbhyp->setOn(FALSE);
}
-void QtCalculator::pbMRtoggled(bool myboolean){
+void TQtCalculator::pbMRtoggled(bool myboolean){
if(myboolean)
MR();
if(pbMR->isOn() && (!key_pressed))
pbMR->setOn(FALSE);
}
-void QtCalculator::pbAtoggled(bool myboolean){
+void TQtCalculator::pbAtoggled(bool myboolean){
if(myboolean)
buttonA();
if(pbA->isOn() && (!key_pressed))
pbA->setOn(FALSE);
}
-void QtCalculator::pbSintoggled(bool myboolean){
+void TQtCalculator::pbSintoggled(bool myboolean){
if(myboolean)
ExecSin();
if(pbSin->isOn() && (!key_pressed))
pbSin->setOn(FALSE);
}
-void QtCalculator::pbplusminustoggled(bool myboolean){
+void TQtCalculator::pbplusminustoggled(bool myboolean){
if(myboolean)
EnterNegate();
if(pbplusminus->isOn() && (!key_pressed))
pbplusminus->setOn(FALSE);
}
-void QtCalculator::pbMplusminustoggled(bool myboolean){
+void TQtCalculator::pbMplusminustoggled(bool myboolean){
if(myboolean)
Mplusminus();
if(pbMplusminus->isOn() && (!key_pressed))
pbMplusminus->setOn(FALSE);
}
-void QtCalculator::pbBtoggled(bool myboolean){
+void TQtCalculator::pbBtoggled(bool myboolean){
if(myboolean)
buttonB();
if(pbB->isOn() && (!key_pressed))
pbB->setOn(FALSE);
}
-void QtCalculator::pbCostoggled(bool myboolean){
+void TQtCalculator::pbCostoggled(bool myboolean){
if(myboolean)
ExecCos();
if(pbCos->isOn() && (!key_pressed))
pbCos->setOn(FALSE);
}
-void QtCalculator::pbrecitoggled(bool myboolean){
+void TQtCalculator::pbrecitoggled(bool myboolean){
if(myboolean)
EnterRecip();
if(pbreci->isOn() && (!key_pressed))
pbreci->setOn(FALSE);
}
-void QtCalculator::pbCtoggled(bool myboolean){
+void TQtCalculator::pbCtoggled(bool myboolean){
if(myboolean)
buttonC();
if(pbC->isOn() && (!key_pressed))
pbC->setOn(FALSE);
}
-void QtCalculator::pbTantoggled(bool myboolean){
+void TQtCalculator::pbTantoggled(bool myboolean){
if(myboolean)
ExecTan();
if(pbTan->isOn() && (!key_pressed))
pbTan->setOn(FALSE);
}
-void QtCalculator::pbfactorialtoggled(bool myboolean){
+void TQtCalculator::pbfactorialtoggled(bool myboolean){
if(myboolean)
EnterFactorial();
if(pbfactorial->isOn() && (!key_pressed))
pbfactorial->setOn(FALSE);
}
-void QtCalculator::pbDtoggled(bool myboolean){
+void TQtCalculator::pbDtoggled(bool myboolean){
if(myboolean)
buttonD();
if(pbD->isOn() && (!key_pressed))
pbD->setOn(FALSE);
}
-void QtCalculator::pblogtoggled(bool myboolean){
+void TQtCalculator::pblogtoggled(bool myboolean){
if(myboolean)
EnterLogr();
if(pblog->isOn() && (!key_pressed))
pblog->setOn(FALSE);
}
-void QtCalculator::pbsquaretoggled(bool myboolean){
+void TQtCalculator::pbsquaretoggled(bool myboolean){
if(myboolean)
EnterSquare();
if(pbsquare->isOn() && (!key_pressed))
pbsquare->setOn(FALSE);
}
-void QtCalculator::pbEtoggled(bool myboolean){
+void TQtCalculator::pbEtoggled(bool myboolean){
if(myboolean)
buttonE();
if(pbE->isOn() && (!key_pressed))
pbE->setOn(FALSE);
}
-void QtCalculator::pblntoggled(bool myboolean){
+void TQtCalculator::pblntoggled(bool myboolean){
if(myboolean)
EnterLogn();
if(pbln->isOn() && (!key_pressed))
pbln->setOn(FALSE);
}
-void QtCalculator::pbpowertoggled(bool myboolean){
+void TQtCalculator::pbpowertoggled(bool myboolean){
if(myboolean)
Power();
if(pbpower->isOn() && (!key_pressed))
pbpower->setOn(FALSE);
}
-void QtCalculator::pbFtoggled(bool myboolean){
+void TQtCalculator::pbFtoggled(bool myboolean){
if(myboolean)
buttonF();
if(pbF->isOn() && (!key_pressed))
pbF->setOn(FALSE);
}
-void QtCalculator::pbMCtoggled(bool myboolean){
+void TQtCalculator::pbMCtoggled(bool myboolean){
if(myboolean)
MC();
if(pbMC->isOn() && (!key_pressed))
pbMC->setOn(FALSE);
}
-void QtCalculator::pbCleartoggled(bool myboolean){
+void TQtCalculator::pbCleartoggled(bool myboolean){
if(myboolean)
Clear();
if(pbClear->isOn() && (!key_pressed))
pbClear->setOn(FALSE);
}
-void QtCalculator::pbACtoggled(bool myboolean){
+void TQtCalculator::pbACtoggled(bool myboolean){
if(myboolean)
ClearAll();
if(pbAC->isOn() && (!key_pressed))
pbAC->setOn(FALSE);
}
-void QtCalculator::pb7toggled(bool myboolean){
+void TQtCalculator::pb7toggled(bool myboolean){
if(myboolean)
button7();
if(pb7->isOn() && (!key_pressed))
pb7->setOn(FALSE);
}
-void QtCalculator::pb8toggled(bool myboolean){
+void TQtCalculator::pb8toggled(bool myboolean){
if(myboolean)
button8();
if(pb8->isOn() && (!key_pressed))
pb8->setOn(FALSE);
}
-void QtCalculator::pb9toggled(bool myboolean){
+void TQtCalculator::pb9toggled(bool myboolean){
if(myboolean)
button9();
if(pb9->isOn() && (!key_pressed))
pb9->setOn(FALSE);
}
-void QtCalculator::pbparenopentoggled(bool myboolean){
+void TQtCalculator::pbparenopentoggled(bool myboolean){
if(myboolean)
EnterOpenParen();
if(pbparenopen->isOn() && (!key_pressed))
pbparenopen->setOn(FALSE);
}
-void QtCalculator::pbparenclosetoggled(bool myboolean){
+void TQtCalculator::pbparenclosetoggled(bool myboolean){
if(myboolean)
EnterCloseParen();
if(pbparenclose->isOn() && (!key_pressed))
pbparenclose->setOn(FALSE);
}
-void QtCalculator::pbandtoggled(bool myboolean){
+void TQtCalculator::pbandtoggled(bool myboolean){
if(myboolean)
And();
if(pband->isOn() && (!key_pressed))
pband->setOn(FALSE);
}
-void QtCalculator::pb4toggled(bool myboolean){
+void TQtCalculator::pb4toggled(bool myboolean){
if(myboolean)
button4();
if(pb4->isOn() && (!key_pressed))
pb4->setOn(FALSE);
}
-void QtCalculator::pb5toggled(bool myboolean){
+void TQtCalculator::pb5toggled(bool myboolean){
if(myboolean)
button5();
if(pb5->isOn() && (!key_pressed))
pb5->setOn(FALSE);
}
-void QtCalculator::pb6toggled(bool myboolean){
+void TQtCalculator::pb6toggled(bool myboolean){
if(myboolean)
button6();
if(pb6->isOn() && (!key_pressed))
pb6->setOn(FALSE);
}
-void QtCalculator::pbXtoggled(bool myboolean){
+void TQtCalculator::pbXtoggled(bool myboolean){
if(myboolean)
Multiply();
if(pbX->isOn() && (!key_pressed))
pbX->setOn(FALSE);
}
-void QtCalculator::pbdivisiontoggled(bool myboolean){
+void TQtCalculator::pbdivisiontoggled(bool myboolean){
if(myboolean)
Divide();
if(pbdivision->isOn() && (!key_pressed))
pbdivision->setOn(FALSE);
}
-void QtCalculator::pbortoggled(bool myboolean){
+void TQtCalculator::pbortoggled(bool myboolean){
if(myboolean)
Or();
if(pbor->isOn() && (!key_pressed))
pbor->setOn(FALSE);
}
-void QtCalculator::pb1toggled(bool myboolean){
+void TQtCalculator::pb1toggled(bool myboolean){
if(myboolean)
button1();
if(pb1->isOn() && (!key_pressed))
pb1->setOn(FALSE);
}
-void QtCalculator::pb2toggled(bool myboolean){
+void TQtCalculator::pb2toggled(bool myboolean){
if(myboolean)
button2();
if(pb2->isOn() && (!key_pressed))
pb2->setOn(FALSE);
}
-void QtCalculator::pb3toggled(bool myboolean){
+void TQtCalculator::pb3toggled(bool myboolean){
if(myboolean)
button3();
if(pb3->isOn() && (!key_pressed))
pb3->setOn(FALSE);
}
-void QtCalculator::pbplustoggled(bool myboolean){
+void TQtCalculator::pbplustoggled(bool myboolean){
if(myboolean)
Plus();
if(pbplus->isOn() && (!key_pressed))
pbplus->setOn(FALSE);
}
-void QtCalculator::pbminustoggled(bool myboolean){
+void TQtCalculator::pbminustoggled(bool myboolean){
if(myboolean)
Minus();
if(pbminus->isOn() && (!key_pressed))
pbminus->setOn(FALSE);
}
-void QtCalculator::pbshifttoggled(bool myboolean){
+void TQtCalculator::pbshifttoggled(bool myboolean){
if(myboolean)
Shift();
if(pbshift->isOn() && (!key_pressed))
pbshift->setOn(FALSE);
}
-void QtCalculator::pbperiodtoggled(bool myboolean){
+void TQtCalculator::pbperiodtoggled(bool myboolean){
if(myboolean)
EnterDecimal();
if(pbperiod->isOn() && (!key_pressed))
pbperiod->setOn(FALSE);
}
-void QtCalculator::pb0toggled(bool myboolean){
+void TQtCalculator::pb0toggled(bool myboolean){
if(myboolean)
button0();
if(pb0->isOn() && (!key_pressed))
pb0->setOn(FALSE);
}
-void QtCalculator::pbequaltoggled(bool myboolean){
+void TQtCalculator::pbequaltoggled(bool myboolean){
if(myboolean)
EnterEqual();
if(pbequal->isOn() && (!key_pressed))
pbequal->setOn(FALSE);
}
-void QtCalculator::pbpercenttoggled(bool myboolean){
+void TQtCalculator::pbpercenttoggled(bool myboolean){
if(myboolean)
EnterPercent();
if(pbpercent->isOn() && (!key_pressed))
pbpercent->setOn(FALSE);
}
-void QtCalculator::pbnegatetoggled(bool myboolean){
+void TQtCalculator::pbnegatetoggled(bool myboolean){
if(myboolean)
EnterNotCmp();
if(pbnegate->isOn() && (!key_pressed))
pbnegate->setOn(FALSE);
}
-void QtCalculator::pbmodtoggled(bool myboolean) {
+void TQtCalculator::pbmodtoggled(bool myboolean) {
if(myboolean)
Mod();
if(pbmod->isOn() && (!key_pressed))
pbmod->setOn(FALSE);
}
-void QtCalculator::configclicked(){
+void TQtCalculator::configclicked(){
- QTabDialog * tabdialog;
- tabdialog = new QTabDialog(0,"tabdialog",TRUE);
+ TQTabDialog * tabdialog;
+ tabdialog = new TQTabDialog(0,"tabdialog",TRUE);
tabdialog->setCaption( i18n("KCalc Configuration") );
tabdialog->resize( 360, 390 );
tabdialog->setCancelButton( i18n("&Cancel") );
tabdialog->setOKButton(i18n("&OK"));
- QWidget *about = new QWidget(tabdialog,"about");
- QVBoxLayout *lay1 = new QVBoxLayout( about );
+ TQWidget *about = new TQWidget(tabdialog,"about");
+ TQVBoxLayout *lay1 = new TQVBoxLayout( about );
lay1->setMargin( KDialog::marginHint() );
lay1->setSpacing( KDialog::spacingHint() );
- QGroupBox *box = new QGroupBox(0,Qt::Vertical,about,"box");
- box->layout()->setSpacing(KDialog::spacingHint());
- box->layout()->setMargin(KDialog::marginHint());
- QGridLayout *grid1 = new QGridLayout(box->layout(),2,2);
- QLabel *label = new QLabel(box,"label");
- QLabel *label2 = new QLabel(box,"label2");
+ TQGroupBox *box = new TQGroupBox(0,Qt::Vertical,about,"box");
+ box->tqlayout()->setSpacing(KDialog::spacingHint());
+ box->tqlayout()->setMargin(KDialog::marginHint());
+ TQGridLayout *grid1 = new TQGridLayout(box->tqlayout(),2,2);
+ TQLabel *label = new TQLabel(box,"label");
+ TQLabel *label2 = new TQLabel(box,"label2");
box->setTitle(i18n("About"));
grid1->addWidget(label,0,1);
grid1->addMultiCellWidget(label2,2,2,0,1);
- QString labelstring = "KCalc "KCALCVERSION"\n"\
+ TQString labelstring = "KCalc "KCALCVERSION"\n"\
"Bernd Johannes Wuebben\n"\
"wuebben@math.cornell.edu\n"\
"wuebben@kde.org\n"\
"Copyright (C) 1996-98\n"\
"\n\n";
- QString labelstring2 =
+ TQString labelstring2 =
#ifdef HAVE_LONG_DOUBLE
i18n( "Base type: long double\n");
#else
@@ -1494,16 +1494,16 @@ void QtCalculator::configclicked(){
"enabled. See the README for details.");
#endif
- label->setAlignment(AlignLeft|WordBreak|ExpandTabs);
+ label->tqsetAlignment(AlignLeft|WordBreak|ExpandTabs);
label->setText(labelstring);
- label2->setAlignment(AlignLeft|WordBreak|ExpandTabs);
+ label2->tqsetAlignment(AlignLeft|WordBreak|ExpandTabs);
label2->setText(labelstring2);
// HACK
- // QPixmap pm( BarIcon( "kcalclogo" ) );
- QPixmap pm;
- QLabel *logo = new QLabel(box);
+ // TQPixmap pm( BarIcon( "kcalclogo" ) );
+ TQPixmap pm;
+ TQLabel *logo = new TQLabel(box);
logo->setPixmap(pm);
grid1->addWidget(logo,0,0);
lay1->addWidget(box);
@@ -1525,7 +1525,7 @@ void QtCalculator::configclicked(){
tabdialog->addTab(about,i18n("About"));
- if(tabdialog->exec() == QDialog::Accepted){
+ if(tabdialog->exec() == TQDialog::Accepted){
kcalcdefaults.forecolor = newdefstruct.forecolor;
@@ -1540,13 +1540,13 @@ void QtCalculator::configclicked(){
set_precision();
set_style();
updateGeometry();
- resize(minimumSize());
+ resize(tqminimumSize());
}
delete configdlg;
}
-void QtCalculator::set_style(){
+void TQtCalculator::set_style(){
switch(kcalcdefaults.style){
case 0:{
@@ -1582,10 +1582,10 @@ void QtCalculator::set_style(){
}
}
-void QtCalculator::readSettings()
+void TQtCalculator::readSettings()
{
- QColor tmpC(189, 255, 180);
- QColor blackC(0,0,0);
+ TQColor tmpC(189, 255, 180);
+ TQColor blackC(0,0,0);
KConfig *config = KGlobal::config();
config->setGroup("CalcPlugin");
@@ -1604,7 +1604,7 @@ void QtCalculator::readSettings()
kcalcdefaults.beep = config->readBoolEntry("beep", true);
}
-void QtCalculator::writeSettings()
+void TQtCalculator::writeSettings()
{
KConfig *config = KGlobal::config();
@@ -1622,13 +1622,13 @@ void QtCalculator::writeSettings()
config->sync();
}
-void QtCalculator::display_selected(){
+void TQtCalculator::display_selected(){
if(calc_display->Button() == LeftButton){
if(calc_display->isLit()){
- QClipboard *cb = QApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
cb->setText(calc_display->text());
selection_timer->start(100);
@@ -1643,7 +1643,7 @@ void QtCalculator::display_selected(){
}
else{
- QClipboard *cb = QApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
CALCAMNT result;
result = (CALCAMNT) cb->text().toDouble();
@@ -1655,7 +1655,7 @@ void QtCalculator::display_selected(){
}
-void QtCalculator::selection_timed_out(){
+void TQtCalculator::selection_timed_out(){
// printf("selection timed out\n");
selection_timer->stop();
@@ -1666,13 +1666,13 @@ void QtCalculator::selection_timed_out(){
}
-void QtCalculator::clear_status_label(){
+void TQtCalculator::clear_status_label(){
statusERRORLabel->setText("");
status_timer->stop();
}
-void QtCalculator::setStatusLabel(const QString& string){
+void TQtCalculator::setStatusLabel(const TQString& string){
statusERRORLabel->setText(string);
status_timer->start(3000,TRUE);
@@ -1680,9 +1680,9 @@ void QtCalculator::setStatusLabel(const QString& string){
}
-void QtCalculator::invertColors(){
+void TQtCalculator::invertColors(){
- QColor tmpcolor;
+ TQColor tmpcolor;
if(calc_display->isLit()){
tmpcolor = kcalcdefaults.backcolor;
@@ -1699,19 +1699,19 @@ void QtCalculator::invertColors(){
}
}
-void QtCalculator::closeEvent( QCloseEvent*e )
+void TQtCalculator::closeEvent( TQCloseEvent*e )
{
writeSettings();
e->accept();
}
-void QtCalculator::set_colors(){
+void TQtCalculator::set_colors(){
- QPalette mypalette = (calc_display->palette()).copy();
+ TQPalette mypalette = (calc_display->palette()).copy();
- QColorGroup cgrp = mypalette.active();
- QColorGroup ncgrp(kcalcdefaults.forecolor,
+ TQColorGroup cgrp = mypalette.active();
+ TQColorGroup ncgrp(kcalcdefaults.forecolor,
cgrp.background(),
cgrp.light(),
cgrp.dark(),
@@ -1728,12 +1728,12 @@ void QtCalculator::set_colors(){
}
-void QtCalculator::set_precision(){
+void TQtCalculator::set_precision(){
UpdateDisplay();
}
-void QtCalculator::temp_stack_next(){
+void TQtCalculator::temp_stack_next(){
CALCAMNT *number;
@@ -1759,7 +1759,7 @@ void QtCalculator::temp_stack_next(){
}
-void QtCalculator::temp_stack_prev(){
+void TQtCalculator::temp_stack_prev(){
CALCAMNT *number;
diff --git a/kspread/plugins/calculator/kcalc.h b/kspread/plugins/calculator/kcalc.h
index 752ae96e..7e665e6c 100644
--- a/kspread/plugins/calculator/kcalc.h
+++ b/kspread/plugins/calculator/kcalc.h
@@ -2,7 +2,7 @@
$Id: kcalc.h 466447 2005-10-02 17:54:10Z zander $
KCalc, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
Copyright (C) 1996 Bernd Johannes Wuebben
wuebben@math.cornell.edu
@@ -24,8 +24,8 @@
*/
-#ifndef QTCALC_H
-#define QTCALC_H
+#ifndef TQTCALC_H
+#define TQTCALC_H
#include <queue>
using std::queue;
@@ -34,28 +34,28 @@ using std::queue;
#include <stdlib.h>
#include <ctype.h>
-#include <qlistbox.h>
-#include <qclipboard.h>
-#include <qptrlist.h>
-#include <qaccel.h>
-#include <qtabdialog.h>
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qapplication.h>
-#include <qfont.h>
-#include <qlabel.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
-#include <qstring.h>
-#include <qrect.h>
+#include <tqlistbox.h>
+#include <tqclipboard.h>
+#include <tqptrlist.h>
+#include <tqaccel.h>
+#include <tqtabdialog.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
+#include <tqapplication.h>
+#include <tqfont.h>
+#include <tqlabel.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
+#include <tqrect.h>
#include "dlabel.h"
@@ -184,30 +184,31 @@ item_contents *TopTypeStack(item_type rqstd_type);
typedef struct _DefStruct{
- QColor forecolor;
- QColor backcolor;
+ TQColor forecolor;
+ TQColor backcolor;
int precision;
int fixedprecision;
int style;
bool fixed;
bool beep;
- QFont font;
+ TQFont font;
}DefStruct;
class Calculator;
-class QtCalculator : public QDialog
+class TQtCalculator : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- QtCalculator( Calculator* _corba, QWidget *parent=0, const char *name=0 );
- ~QtCalculator();
+ TQtCalculator( Calculator* _corba, TQWidget *tqparent=0, const char *name=0 );
+ ~TQtCalculator();
- void keyPressEvent( QKeyEvent *e );
- void keyReleaseEvent( QKeyEvent *e );
- void closeEvent( QCloseEvent *e );
+ void keyPressEvent( TQKeyEvent *e );
+ void keyReleaseEvent( TQKeyEvent *e );
+ void closeEvent( TQCloseEvent *e );
void readSettings();
void writeSettings();
void set_precision();
@@ -228,7 +229,7 @@ public:
void setLabel( const char *_text );
void setValue( double _value );
- void setData( const QRect& _range, const char *_sheet );
+ void setData( const TQRect& _range, const char *_sheet );
void useData();
public slots:
@@ -240,7 +241,7 @@ public slots:
void selection_timed_out();
void clear_buttons();
void clear_status_label();
- void setStatusLabel(const QString&);
+ void setStatusLabel(const TQString&);
void EnterDigit(int data);
void EnterDecimal();
void EnterStackFunction(int data);
@@ -369,79 +370,79 @@ public:
private:
void updateGeometry();
- QTimer* selection_timer;
- QLabel* statusINVLabel;
- QLabel* statusHYPLabel;
- QLabel* statusERRORLabel;
+ TQTimer* selection_timer;
+ TQLabel* statusINVLabel;
+ TQLabel* statusHYPLabel;
+ TQLabel* statusERRORLabel;
DLabel* calc_display;
- QRadioButton* anglebutton[3];
- QRadioButton* basebutton[4];
- QPushButton* pbhyp;
- QPushButton* pbEE;
- QPushButton* pbinv;
- QPushButton* pbMR;
- QPushButton* pbA;
- QPushButton* pbSin;
- QPushButton* pbplusminus;
- QPushButton* pbMplusminus;
- QPushButton* pbB;
- QPushButton* pbCos;
- QPushButton* pbreci;
- QPushButton* pbC;
- QPushButton* pbTan;
- QPushButton* pbfactorial;
- QPushButton* pbD;
- QPushButton* pblog;
- QPushButton* pbsquare;
- QPushButton* pbE;
- QPushButton* pbln;
- QPushButton* pbpower;
- QPushButton* pbF;
- QPushButton* pbMC;
- QPushButton* pbClear;
- QPushButton* pbAC;
- QPushButton* pb7;
- QPushButton* pb8;
- QPushButton* pb9;
- QPushButton* pbparenopen;
- QPushButton* pbparenclose;
- QPushButton* pband;
- QPushButton* pb4;
- QPushButton* pb5;
- QPushButton* pb6;
- QPushButton* pbX;
- QPushButton* pbdivision;
- QPushButton* pbor;
- QPushButton* pb1;
- QPushButton* pb2;
- QPushButton* pb3;
- QPushButton* pbplus;
- QPushButton* pbminus;
- QPushButton* pbshift;
- QPushButton* pbperiod;
- QPushButton* pb0;
- QPushButton* pbequal;
- QPushButton* pbpercent;
- QPushButton* pbnegate;
- QPushButton* pbmod;
-
- QPtrList<QPushButton> mNumButtonList;
- QPtrList<QPushButton> mFunctionButtonList;
- QPtrList<QPushButton> mHexButtonList;
- QPtrList<QPushButton> mMemButtonList;
- QPtrList<QPushButton> mOperationButtonList;
+ TQRadioButton* anglebutton[3];
+ TQRadioButton* basebutton[4];
+ TQPushButton* pbhyp;
+ TQPushButton* pbEE;
+ TQPushButton* pbinv;
+ TQPushButton* pbMR;
+ TQPushButton* pbA;
+ TQPushButton* pbSin;
+ TQPushButton* pbplusminus;
+ TQPushButton* pbMplusminus;
+ TQPushButton* pbB;
+ TQPushButton* pbCos;
+ TQPushButton* pbreci;
+ TQPushButton* pbC;
+ TQPushButton* pbTan;
+ TQPushButton* pbfactorial;
+ TQPushButton* pbD;
+ TQPushButton* pblog;
+ TQPushButton* pbsquare;
+ TQPushButton* pbE;
+ TQPushButton* pbln;
+ TQPushButton* pbpower;
+ TQPushButton* pbF;
+ TQPushButton* pbMC;
+ TQPushButton* pbClear;
+ TQPushButton* pbAC;
+ TQPushButton* pb7;
+ TQPushButton* pb8;
+ TQPushButton* pb9;
+ TQPushButton* pbparenopen;
+ TQPushButton* pbparenclose;
+ TQPushButton* pband;
+ TQPushButton* pb4;
+ TQPushButton* pb5;
+ TQPushButton* pb6;
+ TQPushButton* pbX;
+ TQPushButton* pbdivision;
+ TQPushButton* pbor;
+ TQPushButton* pb1;
+ TQPushButton* pb2;
+ TQPushButton* pb3;
+ TQPushButton* pbplus;
+ TQPushButton* pbminus;
+ TQPushButton* pbshift;
+ TQPushButton* pbperiod;
+ TQPushButton* pb0;
+ TQPushButton* pbequal;
+ TQPushButton* pbpercent;
+ TQPushButton* pbnegate;
+ TQPushButton* pbmod;
+
+ TQPtrList<TQPushButton> mNumButtonList;
+ TQPtrList<TQPushButton> mFunctionButtonList;
+ TQPtrList<TQPushButton> mHexButtonList;
+ TQPtrList<TQPushButton> mMemButtonList;
+ TQPtrList<TQPushButton> mOperationButtonList;
bool key_pressed;
KStats stats;
- QListBox *paper;
- QTimer *status_timer;
+ TQListBox *paper;
+ TQTimer *status_timer;
- QRect sheet_range;
- QString sheet_name;
+ TQRect sheet_range;
+ TQString sheet_name;
Calculator* corba;
- QWidget *mSmallPage;
- QWidget *mLargePage;
+ TQWidget *mSmallPage;
+ TQWidget *mLargePage;
int mInternalSpacing;
};
-#endif //QTCLAC_H
+#endif //TQTCLAC_H
diff --git a/kspread/plugins/calculator/kcalc_core.cpp b/kspread/plugins/calculator/kcalc_core.cpp
index 43221b21..e82e56c9 100644
--- a/kspread/plugins/calculator/kcalc_core.cpp
+++ b/kspread/plugins/calculator/kcalc_core.cpp
@@ -2,7 +2,7 @@
$Id: kcalc_core.cpp 541875 2006-05-17 14:42:51Z zander $
kCalculator, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
The stack engine conatined in this file was take from
Martin Bartlett's xfrmcalc
@@ -62,7 +62,7 @@
int isinf(double x) { return !finite(x) && x==x; }
#endif
-extern QPtrList<CALCAMNT> temp_stack;
+extern TQPtrList<CALCAMNT> temp_stack;
last_input_type last_input;
char display_str[DSP_SIZE+1];
@@ -157,7 +157,7 @@ int precedence[14] = { 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 6 };
};
-void QtCalculator::InitializeCalculator(void) {
+void TQtCalculator::InitializeCalculator(void) {
//
// Basic initialization involves initializing the calcultion
@@ -196,13 +196,13 @@ void fpe_handler(int fpe_parm)
}
-void QtCalculator::setData( const QRect& _range, const char *_sheet )
+void TQtCalculator::setData( const TQRect& _range, const char *_sheet )
{
sheet_range = _range;
sheet_name = _sheet;
}
-void QtCalculator::setValue( double _value )
+void TQtCalculator::setValue( double _value )
{
last_input = DIGIT;
DISPLAY_AMOUNT = _value;
@@ -213,7 +213,7 @@ void QtCalculator::setValue( double _value )
UpdateDisplay();
}
-void QtCalculator::setLabel( const char *_text )
+void TQtCalculator::setLabel( const char *_text )
{
last_input = DIGIT;
DISPLAY_AMOUNT = 0L;
@@ -224,7 +224,7 @@ void QtCalculator::setLabel( const char *_text )
calc_display->setText( _text );
}
-void QtCalculator::RefreshCalculator(void)
+void TQtCalculator::RefreshCalculator(void)
{
InitStack();
display_error = 0;
@@ -237,12 +237,12 @@ void QtCalculator::RefreshCalculator(void)
decimal_point = 0;
}
-void QtCalculator::EnterDigit(int data)
+void TQtCalculator::EnterDigit(int data)
{
if(eestate){
- QString string;
+ TQString string;
string.setNum(data);
strcat(display_str, string.latin1());
DISPLAY_AMOUNT = (CALCAMNT) strtod(display_str,0);
@@ -282,66 +282,66 @@ void QtCalculator::EnterDigit(int data)
UpdateDisplay();
}
-void QtCalculator::button0()
+void TQtCalculator::button0()
{
EnterDigit(0);
}
-void QtCalculator::button1()
+void TQtCalculator::button1()
{
EnterDigit(1);
}
-void QtCalculator::button2()
+void TQtCalculator::button2()
{
if (current_base == NB_BINARY)
return;
EnterDigit(2);
}
-void QtCalculator::button3()
+void TQtCalculator::button3()
{
if (current_base == NB_BINARY)
return;
EnterDigit(3);
}
-void QtCalculator::button4()
+void TQtCalculator::button4()
{
if (current_base == NB_BINARY)
return;
EnterDigit(4);
}
-void QtCalculator::button5()
+void TQtCalculator::button5()
{
if (current_base == NB_BINARY)
return;
EnterDigit(5);
}
-void QtCalculator::button6()
+void TQtCalculator::button6()
{
if (current_base == NB_BINARY)
return;
EnterDigit(6);
}
-void QtCalculator::button7()
+void TQtCalculator::button7()
{
if (current_base == NB_BINARY)
return;
EnterDigit(7);
}
-void QtCalculator::button8()
+void TQtCalculator::button8()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL))
return;
EnterDigit(8);
}
-void QtCalculator::button9()
+void TQtCalculator::button9()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL))
return;
@@ -349,7 +349,7 @@ void QtCalculator::button9()
}
-void QtCalculator::buttonA()
+void TQtCalculator::buttonA()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -358,7 +358,7 @@ void QtCalculator::buttonA()
}
-void QtCalculator::buttonB()
+void TQtCalculator::buttonB()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -367,7 +367,7 @@ void QtCalculator::buttonB()
}
-void QtCalculator::buttonC()
+void TQtCalculator::buttonC()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -376,7 +376,7 @@ void QtCalculator::buttonC()
}
-void QtCalculator::buttonD()
+void TQtCalculator::buttonD()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -385,7 +385,7 @@ void QtCalculator::buttonD()
}
-void QtCalculator::buttonE()
+void TQtCalculator::buttonE()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -393,7 +393,7 @@ void QtCalculator::buttonE()
EnterDigit(14);
}
-void QtCalculator::buttonF()
+void TQtCalculator::buttonF()
{
if ((current_base == NB_BINARY) || (current_base == NB_OCTAL)
|| (current_base == NB_DECIMAL))
@@ -403,7 +403,7 @@ void QtCalculator::buttonF()
-void QtCalculator::EnterDecimal()
+void TQtCalculator::EnterDecimal()
{
if(eestate){
@@ -440,7 +440,7 @@ void QtCalculator::EnterDecimal()
}
-void QtCalculator::Or()
+void TQtCalculator::Or()
{
eestate = false;
if (inverse){
@@ -453,7 +453,7 @@ void QtCalculator::Or()
last_input = OPERATION;
}
-void QtCalculator::And()
+void TQtCalculator::And()
{
eestate = false;
last_input = OPERATION;
@@ -461,7 +461,7 @@ void QtCalculator::And()
}
-void QtCalculator::Shift()
+void TQtCalculator::Shift()
{
eestate = false;
last_input = OPERATION;
@@ -475,14 +475,14 @@ void QtCalculator::Shift()
}
-void QtCalculator::Plus()
+void TQtCalculator::Plus()
{
eestate = false;
last_input = OPERATION;
EnterStackFunction(6);
}
-void QtCalculator::Minus()
+void TQtCalculator::Minus()
{
eestate = false;
last_input = OPERATION;
@@ -490,21 +490,21 @@ void QtCalculator::Minus()
}
-void QtCalculator::Multiply()
+void TQtCalculator::Multiply()
{
eestate = false;
last_input = OPERATION;
EnterStackFunction(8);
}
-void QtCalculator::Divide()
+void TQtCalculator::Divide()
{
eestate = false;
last_input = OPERATION;
EnterStackFunction(9);
}
-void QtCalculator::Mod()
+void TQtCalculator::Mod()
{
eestate = false;
last_input = OPERATION;
@@ -517,7 +517,7 @@ void QtCalculator::Mod()
}
}
-void QtCalculator::Power()
+void TQtCalculator::Power()
{
eestate = false;
last_input = OPERATION;
@@ -533,7 +533,7 @@ void QtCalculator::Power()
-void QtCalculator::EnterStackFunction(int data)
+void TQtCalculator::EnterStackFunction(int data)
{
item_contents new_item;
int new_precedence;
@@ -568,14 +568,14 @@ void QtCalculator::EnterStackFunction(int data)
PushStack(&new_item);
}
-void QtCalculator::EnterNegate()
+void TQtCalculator::EnterNegate()
{
if(eestate){
- QString string;
+ TQString string;
string = display_str;
int pos;
- pos = string.findRev('e',-1,false);
+ pos = string.tqfindRev('e',-1,false);
if(pos == -1)
return;
@@ -602,7 +602,7 @@ void QtCalculator::EnterNegate()
last_input = DIGIT;
}
-void QtCalculator::EnterOpenParen()
+void TQtCalculator::EnterOpenParen()
{
eestate = false;
last_input = OPERATION;
@@ -611,7 +611,7 @@ void QtCalculator::EnterOpenParen()
}
-void QtCalculator::EnterCloseParen()
+void TQtCalculator::EnterCloseParen()
{
eestate = false;
last_input = OPERATION;
@@ -624,7 +624,7 @@ void QtCalculator::EnterCloseParen()
}
-void QtCalculator::EnterRecip()
+void TQtCalculator::EnterRecip()
{
eestate = false;
last_input = OPERATION;
@@ -633,7 +633,7 @@ void QtCalculator::EnterRecip()
UpdateDisplay();
}
-void QtCalculator::EnterInt()
+void TQtCalculator::EnterInt()
{
eestate = false;
CALCAMNT work_amount1 = 0.0, work_amount2 = 0.0;
@@ -653,7 +653,7 @@ void QtCalculator::EnterInt()
}
-void QtCalculator::EnterFactorial()
+void TQtCalculator::EnterFactorial()
{
eestate = false;
CALCAMNT work_amount1, work_amount2;
@@ -682,7 +682,7 @@ void QtCalculator::EnterFactorial()
}
-void QtCalculator::EnterSquare()
+void TQtCalculator::EnterSquare()
{
eestate = false;
if (!inverse){
@@ -699,7 +699,7 @@ void QtCalculator::EnterSquare()
}
-void QtCalculator::EnterNotCmp()
+void TQtCalculator::EnterNotCmp()
{
eestate = false;
CALCAMNT boh_work_d;
@@ -718,7 +718,7 @@ void QtCalculator::EnterNotCmp()
}
-void QtCalculator::EnterHyp()
+void TQtCalculator::EnterHyp()
{
switch(kcalcdefaults.style){
@@ -762,7 +762,7 @@ void QtCalculator::EnterHyp()
}
-void QtCalculator::ExecSin(){
+void TQtCalculator::ExecSin(){
switch(kcalcdefaults.style){
@@ -792,7 +792,7 @@ void QtCalculator::ExecSin(){
}
-void QtCalculator::ComputeSum()
+void TQtCalculator::ComputeSum()
{
inverse = false;
eestate = false;
@@ -805,7 +805,7 @@ void QtCalculator::ComputeSum()
UpdateDisplay();
}
-void QtCalculator::ComputeMul()
+void TQtCalculator::ComputeMul()
{
inverse = false;
eestate = false;
@@ -818,7 +818,7 @@ void QtCalculator::ComputeMul()
UpdateDisplay();
}
-void QtCalculator::ComputeMin()
+void TQtCalculator::ComputeMin()
{
inverse = false;
eestate = false;
@@ -831,7 +831,7 @@ void QtCalculator::ComputeMin()
UpdateDisplay();
}
-void QtCalculator::ComputeMax()
+void TQtCalculator::ComputeMax()
{
inverse = false;
eestate = false;
@@ -844,7 +844,7 @@ void QtCalculator::ComputeMax()
UpdateDisplay();
}
-void QtCalculator::ComputeMean(){
+void TQtCalculator::ComputeMean(){
if(!inverse){
eestate = false;
@@ -870,7 +870,7 @@ void QtCalculator::ComputeMean(){
}
-void QtCalculator::ComputeSin()
+void TQtCalculator::ComputeSin()
{
CALCAMNT work_amount;
eestate = false;
@@ -936,7 +936,7 @@ void QtCalculator::ComputeSin()
}
-void QtCalculator::ExecCos(){
+void TQtCalculator::ExecCos(){
switch(kcalcdefaults.style){
@@ -966,7 +966,7 @@ void QtCalculator::ExecCos(){
}
-void QtCalculator::ComputeStd(){
+void TQtCalculator::ComputeStd(){
if(!inverse){ // std (n-1)
inverse = false;
@@ -1000,7 +1000,7 @@ void QtCalculator::ComputeStd(){
}
-void QtCalculator::ComputeCos()
+void TQtCalculator::ComputeCos()
{
CALCAMNT work_amount;
eestate = false;
@@ -1069,7 +1069,7 @@ void QtCalculator::ComputeCos()
}
-void QtCalculator::ExecTan(){
+void TQtCalculator::ExecTan(){
switch(kcalcdefaults.style){
@@ -1093,7 +1093,7 @@ void QtCalculator::ExecTan(){
}
-void QtCalculator::ComputeMedean(){
+void TQtCalculator::ComputeMedean(){
if(!inverse){ // std (n-1)
inverse = false;
@@ -1125,7 +1125,7 @@ void QtCalculator::ComputeMedean(){
}
-void QtCalculator::ComputeTan()
+void TQtCalculator::ComputeTan()
{
CALCAMNT work_amount;
eestate = false;
@@ -1196,7 +1196,7 @@ void QtCalculator::ComputeTan()
}
-void QtCalculator::EnterPercent()
+void TQtCalculator::EnterPercent()
{
eestate = false;
last_input = OPERATION;
@@ -1206,7 +1206,7 @@ void QtCalculator::EnterPercent()
}
-void QtCalculator::EnterLogr()
+void TQtCalculator::EnterLogr()
{
switch(kcalcdefaults.style){
@@ -1267,7 +1267,7 @@ void QtCalculator::EnterLogr()
}
}
-void QtCalculator::EnterLogn()
+void TQtCalculator::EnterLogn()
{
switch(kcalcdefaults.style){
@@ -1321,7 +1321,7 @@ void QtCalculator::EnterLogn()
}
-void QtCalculator::base_selected(int number){
+void TQtCalculator::base_selected(int number){
switch(number){
case 0:
@@ -1342,7 +1342,7 @@ void QtCalculator::base_selected(int number){
}
-void QtCalculator::angle_selected(int number){
+void TQtCalculator::angle_selected(int number){
switch(number){
case 0:
@@ -1359,7 +1359,7 @@ void QtCalculator::angle_selected(int number){
}
}
-void QtCalculator::SetInverse(){
+void TQtCalculator::SetInverse(){
inverse = ! inverse;
if (inverse){
@@ -1371,20 +1371,20 @@ void QtCalculator::SetInverse(){
}
-void QtCalculator::SetDeg() {
+void TQtCalculator::SetDeg() {
angle_mode = ANG_DEGREE;
}
-void QtCalculator::SetGra() {
+void TQtCalculator::SetGra() {
angle_mode = ANG_GRADIENT;
}
-void QtCalculator::SetRad() {
+void TQtCalculator::SetRad() {
angle_mode = ANG_RADIAN;
}
-void QtCalculator::SetHex() {
+void TQtCalculator::SetHex() {
/*
* Set Hex Mode
*/
@@ -1397,7 +1397,7 @@ void QtCalculator::SetHex() {
UpdateDisplay();
}
-void QtCalculator::SetOct() {
+void TQtCalculator::SetOct() {
/*
* Set Oct Mode
*/
@@ -1410,7 +1410,7 @@ void QtCalculator::SetOct() {
UpdateDisplay();
}
-void QtCalculator::SetBin() {
+void TQtCalculator::SetBin() {
/*
* Set Bin Mode
*/
@@ -1423,7 +1423,7 @@ void QtCalculator::SetBin() {
UpdateDisplay();
}
-void QtCalculator::SetDec()
+void TQtCalculator::SetDec()
{
/*
* Set Dec Mode
@@ -1438,7 +1438,7 @@ void QtCalculator::SetDec()
}
-void QtCalculator::EE()
+void TQtCalculator::EE()
{
if(inverse){
DISPLAY_AMOUNT = pi;
@@ -1458,7 +1458,7 @@ void QtCalculator::EE()
}
-void QtCalculator::MR()
+void TQtCalculator::MR()
{
eestate = false;
last_input = OPERATION;
@@ -1468,7 +1468,7 @@ void QtCalculator::MR()
}
-void QtCalculator::Mplusminus()
+void TQtCalculator::Mplusminus()
{
eestate = false;
@@ -1481,14 +1481,14 @@ void QtCalculator::Mplusminus()
}
}
-void QtCalculator::MC()
+void TQtCalculator::MC()
{
memory_num = 0;
refresh_display = 1;
}
-void QtCalculator::EnterEqual()
+void TQtCalculator::EnterEqual()
{
eestate = false;
last_input = OPERATION;
@@ -1522,7 +1522,7 @@ void QtCalculator::EnterEqual()
}
-void QtCalculator::Clear(){
+void TQtCalculator::Clear(){
eestate = false;
@@ -1552,7 +1552,7 @@ void QtCalculator::Clear(){
}
-void QtCalculator::ClearAll()
+void TQtCalculator::ClearAll()
{
eestate = false;
@@ -1565,7 +1565,7 @@ void QtCalculator::ClearAll()
-void QtCalculator::UpdateDisplay()
+void TQtCalculator::UpdateDisplay()
{
// this needs to be rewritten based on whether we are currently
@@ -1720,11 +1720,11 @@ int cvb(char *out_str, long amount, int max_digits)
lead_one = 1,
lead_one_count = 0,
work_size = sizeof(amount) * CHAR_BIT;
- unsigned long bit_mask = (1 << ((sizeof(amount) * CHAR_BIT) - 1));
+ unsigned long bit_tqmask = (1 << ((sizeof(amount) * CHAR_BIT) - 1));
- while (bit_mask) {
+ while (bit_tqmask) {
- if (amount & bit_mask) {
+ if (amount & bit_tqmask) {
if (lead_one)
lead_one_count++;
lead_zero = 0;
@@ -1734,7 +1734,7 @@ int cvb(char *out_str, long amount, int max_digits)
if (!lead_zero)
work_str[work_char++] = '0';
}
- bit_mask >>= 1;
+ bit_tqmask >>= 1;
}
if (!work_char)
work_str[work_char++] = '0';
diff --git a/kspread/plugins/calculator/kcalctype.h b/kspread/plugins/calculator/kcalctype.h
index b051f107..b4c0b4ff 100644
--- a/kspread/plugins/calculator/kcalctype.h
+++ b/kspread/plugins/calculator/kcalctype.h
@@ -2,7 +2,7 @@
$Id: kcalctype.h 466447 2005-10-02 17:54:10Z zander $
KCalc, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
Copyright (C) 1996 Bernd Johannes Wuebben
wuebben@math.cornell.edu
diff --git a/kspread/plugins/calculator/main.cpp b/kspread/plugins/calculator/main.cpp
index 35887547..c6efb99f 100644
--- a/kspread/plugins/calculator/main.cpp
+++ b/kspread/plugins/calculator/main.cpp
@@ -43,8 +43,8 @@ K_EXPORT_COMPONENT_FACTORY( libkspreadcalc, CalcFactory )
KInstance* CalcFactory::s_global = 0;
-CalcFactory::CalcFactory( QObject* parent, const char* name )
- : KLibFactory( parent, name )
+CalcFactory::CalcFactory( TQObject* tqparent, const char* name )
+ : KLibFactory( tqparent, name )
{
s_global = new KInstance( "kspreadcalc" );
}
@@ -54,15 +54,15 @@ CalcFactory::~CalcFactory()
delete s_global;
}
-QObject* CalcFactory::createObject( QObject* parent, const char* name, const char* /*classname*/, const QStringList & )
+TQObject* CalcFactory::createObject( TQObject* tqparent, const char* name, const char* /*classname*/, const TQStringList & )
{
- if ( !parent->inherits("KSpread::View") )
+ if ( !tqparent->inherits("KSpread::View") )
{
- kdError() << "CalcFactory: KSpread::View expected. Parent is " << parent->className() << endl;
+ kdError() << "CalcFactory: KSpread::View expected. Parent is " << tqparent->className() << endl;
return 0;
}
- QObject *obj = new Calculator( (View*)parent, name );
+ TQObject *obj = new Calculator( (View*)tqparent, name );
return obj;
}
@@ -77,17 +77,17 @@ KInstance* CalcFactory::global()
*
***************************************************/
-Calculator::Calculator( View* parent, const char* name )
- : KParts::Plugin( parent, name )
+Calculator::Calculator( View* tqparent, const char* name )
+ : KParts::Plugin( tqparent, name )
{
m_calc = 0;
- m_view = parent;
+ m_view = tqparent;
KGlobal::locale()->insertCatalogue("kspreadcalc_calc");
- parent->installEventFilter( this );
+ tqparent->installEventFilter( this );
(void)new KAction( i18n("Calculator"), SmallIcon("kcalc", CalcFactory::global()),
- 0, this, SLOT( showCalculator() ), actionCollection(), "kspreadcalc");
+ 0, this, TQT_SLOT( showCalculator() ), actionCollection(), "kspreadcalc");
}
void Calculator::showCalculator()
@@ -99,7 +99,7 @@ void Calculator::showCalculator()
return;
}
- m_calc = new QtCalculator( this, (View*)parent() );
+ m_calc = new TQtCalculator( this, (View*)tqparent() );
m_calc->setFixedSize( 9 + 100 + 9 + 233 + 9, 239);
m_calc->show();
m_calc->raise();
@@ -109,7 +109,7 @@ Calculator::~Calculator()
{
}
-bool Calculator::eventFilter( QObject*, QEvent* ev )
+bool Calculator::eventFilter( TQObject*, TQEvent* ev )
{
if ( !m_calc )
return FALSE;
@@ -145,7 +145,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev )
// Multiple cells selected ?
m_calc->setData( event->rect(), event->sheet().latin1() );
- QString str = util_rangeName( sheet, event->rect() );
+ TQString str = util_rangeName( sheet, event->rect() );
m_calc->setLabel( str.latin1() );
return FALSE;
@@ -156,7 +156,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev )
/***************************************************
*
- * QtCalculator
+ * TQtCalculator
*
***************************************************/
@@ -164,7 +164,7 @@ bool Calculator::eventFilter( QObject*, QEvent* ev )
* This is a hook that makes the calculator to
* ask KSpread for the values of the selected cells.
*/
-void QtCalculator::useData()
+void TQtCalculator::useData()
{
stats.clearAll();
@@ -193,7 +193,7 @@ void QtCalculator::useData()
delete []v;
- sheet_name = QString::null;
+ sheet_name = TQString();
}
#include "main.moc"
diff --git a/kspread/plugins/calculator/main.h b/kspread/plugins/calculator/main.h
index 08e9b5c9..dc5eb3a5 100644
--- a/kspread/plugins/calculator/main.h
+++ b/kspread/plugins/calculator/main.h
@@ -20,16 +20,16 @@
#ifndef __my_app_h__
#define __my_app_h__
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <klibloader.h>
#include <kparts/plugin.h>
#include <koffice_export.h>
-class QtCalculator;
+class TQtCalculator;
class KInstance;
namespace KSpread
@@ -40,12 +40,13 @@ class View;
class CalcFactory : public KLibFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- CalcFactory( QObject* parent = 0, const char* name = 0 );
+ CalcFactory( TQObject* tqparent = 0, const char* name = 0 );
~CalcFactory();
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject", const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0,
+ const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() );
static KInstance* global();
@@ -56,8 +57,9 @@ private:
class KSPREAD_EXPORT Calculator : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- Calculator( View* parent, const char* name = 0 );
+ Calculator( View* tqparent, const char* name = 0 );
~Calculator();
View* view() { return m_view; }
@@ -66,10 +68,10 @@ protected slots:
void showCalculator();
protected:
- bool eventFilter( QObject*, QEvent* );
+ bool eventFilter( TQObject*, TQEvent* );
private:
- QtCalculator* m_calc;
+ TQtCalculator* m_calc;
View* m_view;
};
diff --git a/kspread/plugins/calculator/stats.cpp b/kspread/plugins/calculator/stats.cpp
index 14ce24b9..5413701b 100644
--- a/kspread/plugins/calculator/stats.cpp
+++ b/kspread/plugins/calculator/stats.cpp
@@ -2,7 +2,7 @@
$Id: stats.cpp 466447 2005-10-02 17:54:10Z zander $
KCalc, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
Copyright (C) 1996 Bernd Johannes Wuebben
wuebben@math.cornell.edu
diff --git a/kspread/plugins/calculator/stats.h b/kspread/plugins/calculator/stats.h
index 1f325a20..3c20881f 100644
--- a/kspread/plugins/calculator/stats.h
+++ b/kspread/plugins/calculator/stats.h
@@ -2,7 +2,7 @@
$Id: stats.h 466447 2005-10-02 17:54:10Z zander $
KCalc, a scientific calculator for the X window system using the
- Qt widget libraries, available at no cost at http://www.troll.no
+ TQt widget libraries, available at no cost at http://www.troll.no
Copyright (C) 1996 Bernd Johannes Wuebben
wuebben@math.cornell.edu
@@ -27,7 +27,7 @@
#ifndef KSTATS_H
#define KSTATS_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <math.h>
#include "kcalctype.h"
@@ -59,17 +59,17 @@ public:
private:
- QPtrList<CALCAMNT> data;
+ TQPtrList<CALCAMNT> data;
bool error_flag;
};
-class MyList : public QPtrList<CALCAMNT>
+class MyList : public TQPtrList<CALCAMNT>
{
public:
- MyList() : QPtrList<CALCAMNT>() {};
+ MyList() : TQPtrList<CALCAMNT>() {};
protected:
int compareItems(Item item1,Item item2);
diff --git a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
index 541783b8..4a465eed 100644
--- a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
+++ b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.cc
@@ -28,31 +28,31 @@
#include <kdatewidget.h>
#include <kdebug.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
namespace KSpread
{
-InsertCalendarDialog::InsertCalendarDialog(QWidget* parent, const char* name)
-: InsertCalendarDialogBase(parent,name)
+InsertCalendarDialog::InsertCalendarDialog(TQWidget* tqparent, const char* name)
+: InsertCalendarDialogBase(tqparent,name)
{
this->m_datePicker = NULL;
//we start with a default calendar for the current month;
- QDate first_day_in_month = QDate::currentDate();
+ TQDate first_day_in_month = TQDate::tqcurrentDate();
first_day_in_month.setYMD(first_day_in_month.year(),first_day_in_month.month(),1);
- QDate last_day_in_month(first_day_in_month.year(),first_day_in_month.month(),first_day_in_month.daysInMonth());
+ TQDate last_day_in_month(first_day_in_month.year(),first_day_in_month.month(),first_day_in_month.daysInMonth());
this->m_startDateWidget->setDate(first_day_in_month);
this->m_endDateWidget->setDate(last_day_in_month);
- connect(this->m_selectStartDateButton,SIGNAL(clicked()),this,SLOT(showStartDatePicker()));
- connect(this->m_selectEndDateButton,SIGNAL(clicked()),this,SLOT(showEndDatePicker()));
+ connect(this->m_selectStartDateButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showStartDatePicker()));
+ connect(this->m_selectEndDateButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(showEndDatePicker()));
- connect(this->m_insertButton,SIGNAL(clicked()),this,SLOT(accept()));
- connect(this->m_cancelButton,SIGNAL(clicked()),this,SLOT(reject()));
+ connect(this->m_insertButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(accept()));
+ connect(this->m_cancelButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject()));
}
InsertCalendarDialog::~InsertCalendarDialog()
@@ -73,7 +73,7 @@ bool InsertCalendarDialog::buildDatePickerFrame()
if (!m_datePicker)
return false;
- connect(m_datePicker,SIGNAL(destroyed()),this,SLOT(datePickerDeleted()));
+ connect(m_datePicker,TQT_SIGNAL(destroyed()),this,TQT_SLOT(datePickerDeleted()));
m_datePicker->setCloseButton(true);
m_datePicker->move(this->x()+this->width(),this->y());
@@ -93,7 +93,7 @@ void InsertCalendarDialog::accept()
if (m_datePicker)
m_datePicker->deleteLater();
kdDebug() << "insert calendar dialog accepted (insert button clicked)" << endl;
- done(QDialog::Accepted);
+ done(TQDialog::Accepted);
emit insertCalendar(startDate(),endDate());
}
@@ -102,15 +102,15 @@ void InsertCalendarDialog::reject()
if (m_datePicker)
m_datePicker->deleteLater();
kdDebug() << "insert calendar dialog rejected (cancel button clicked)" << endl;
- done(QDialog::Rejected);
+ done(TQDialog::Rejected);
}
void InsertCalendarDialog::showStartDatePicker()
{
if (buildDatePickerFrame())
{
- connect(m_datePicker,SIGNAL(dateSelected(QDate)),this,SLOT(setStartDate(QDate)));
- connect(m_datePicker,SIGNAL(dateEntered(QDate)),this,SLOT(setStartDate(QDate)));
+ connect(m_datePicker,TQT_SIGNAL(dateSelected(TQDate)),this,TQT_SLOT(setStartDate(TQDate)));
+ connect(m_datePicker,TQT_SIGNAL(dateEntered(TQDate)),this,TQT_SLOT(setStartDate(TQDate)));
m_datePicker->setDate(startDate());
}
}
@@ -119,28 +119,28 @@ void InsertCalendarDialog::showEndDatePicker()
{
if (buildDatePickerFrame())
{
- connect(m_datePicker,SIGNAL(dateSelected(QDate)),this,SLOT(setEndDate(QDate)));
- connect(m_datePicker,SIGNAL(dateEntered(QDate)),this,SLOT(setEndDate(QDate)));
+ connect(m_datePicker,TQT_SIGNAL(dateSelected(TQDate)),this,TQT_SLOT(setEndDate(TQDate)));
+ connect(m_datePicker,TQT_SIGNAL(dateEntered(TQDate)),this,TQT_SLOT(setEndDate(TQDate)));
m_datePicker->setDate(endDate());
}
}
-void InsertCalendarDialog::setStartDate(QDate date)
+void InsertCalendarDialog::setStartDate(TQDate date)
{
this->m_startDateWidget->setDate(date);
}
-void InsertCalendarDialog::setEndDate(QDate date)
+void InsertCalendarDialog::setEndDate(TQDate date)
{
this->m_endDateWidget->setDate(date);
}
-QDate InsertCalendarDialog::startDate() const
+TQDate InsertCalendarDialog::startDate() const
{
return this->m_startDateWidget->date();
}
-QDate InsertCalendarDialog::endDate() const
+TQDate InsertCalendarDialog::endDate() const
{
return this->m_endDateWidget->date();
}
diff --git a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
index f52c2e93..f68ab4c6 100644
--- a/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
+++ b/kspread/plugins/insertcalendar/kspread_insertcalendardialog.h
@@ -28,7 +28,7 @@
#include <kspread_insertcalendardialogbase.h>
#include <koffice_export.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KDatePicker;
@@ -38,6 +38,7 @@ namespace KSpread
class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
{
Q_OBJECT
+ TQ_OBJECT
private:
@@ -55,7 +56,7 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
* The dates in the dialog initialize to a complete calendar for the
* current month.
*/
- InsertCalendarDialog(QWidget* parent = 0, const char* name = 0);
+ InsertCalendarDialog(TQWidget* tqparent = 0, const char* name = 0);
/**
* Virtual destructor.
@@ -85,25 +86,25 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
void datePickerDeleted();
/**
- * This slot is reimplemented from QDialog and
+ * This slot is reimplemented from TQDialog and
* is connected to the insert button.
* It also emits a insertCalendar signal.
*
* The dialog is closed (not deleted) when
* this slot is called.
*
- * @see insertCalendar, reject, QDialog::done
+ * @see insertCalendar, reject, TQDialog::done
*/
virtual void accept();
/**
- * This slot is reimplemented from QDialog and
+ * This slot is reimplemented from TQDialog and
* is connected to the cancel button.
*
* The dialog is closed (not deleted) when
* this slot is called.
*
- * @see accept, QDialog::done
+ * @see accept, TQDialog::done
*/
virtual void reject();
@@ -125,13 +126,13 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
* Slot for setting the start date in the KDateWidget.
* Normally this slot is activated by a KDatePicker widget.
*/
- void setStartDate(QDate);
+ void setStartDate(TQDate);
/**
* Slot for setting the end date in the KDateWidget.
* Normally this slot is activated by a KDatePicker widget.
*/
- void setEndDate(QDate);
+ void setEndDate(TQDate);
public:
@@ -140,12 +141,12 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
/**
* @returns the selected start date.
*/
- QDate startDate() const;
+ TQDate startDate() const;
/**
* @returns the selected end date.
*/
- QDate endDate() const;
+ TQDate endDate() const;
signals:
@@ -157,7 +158,7 @@ class KSPREAD_EXPORT InsertCalendarDialog : public InsertCalendarDialogBase
* insert calendar plugin to actually insert
* the calendar with the selected dates.
*/
- void insertCalendar(const QDate &from, const QDate &to);
+ void insertCalendar(const TQDate &from, const TQDate &to);
};
}
diff --git a/kspread/plugins/insertcalendar/kspread_insertcalendardialogbase.ui b/kspread/plugins/insertcalendar/kspread_insertcalendardialogbase.ui
index 9315c38c..b2c82866 100644
--- a/kspread/plugins/insertcalendar/kspread_insertcalendardialogbase.ui
+++ b/kspread/plugins/insertcalendar/kspread_insertcalendardialogbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KSpread::InsertCalendarDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>KSpread::InsertCalendarDialogBase</cstring>
</property>
@@ -26,7 +26,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_startDateGroupBox</cstring>
</property>
@@ -56,7 +56,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>m_selectStartDateButton</cstring>
</property>
@@ -77,7 +77,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_endDateGroupBox</cstring>
</property>
@@ -113,7 +113,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>m_selectEndDateButton</cstring>
</property>
@@ -144,14 +144,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>400</width>
<height>19</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="3" column="0">
+ <widget class="TQPushButton" row="3" column="0">
<property name="name">
<cstring>m_insertButton</cstring>
</property>
@@ -175,7 +175,7 @@
<comment>What's this for the insert button of the insert calendar plugin</comment>
</property>
</widget>
- <widget class="QPushButton" row="3" column="1">
+ <widget class="TQPushButton" row="3" column="1">
<property name="name">
<cstring>m_cancelButton</cstring>
</property>
@@ -199,7 +199,7 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kdatewidget.h</includehint>
<includehint>kdatewidget.h</includehint>
diff --git a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
index 56388af8..558f59cb 100644
--- a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
+++ b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.cc
@@ -39,8 +39,8 @@
#include <kofficeversion.h>
#include <kmessagebox.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqpoint.h>
+#include <tqrect.h>
namespace KSpread
{
@@ -50,15 +50,15 @@ typedef KGenericFactory<PluginInsertCalendar> InsertCalendarFactory;
K_EXPORT_COMPONENT_FACTORY( libkspreadinsertcalendar, InsertCalendarFactory("kspreadinsertcalendar"))
-PluginInsertCalendar::PluginInsertCalendar( QObject *parent, const char *name, const QStringList& /*args*/ )
-: Plugin(parent,name)
+PluginInsertCalendar::PluginInsertCalendar( TQObject *tqparent, const char *name, const TQStringList& /*args*/ )
+: Plugin(tqparent,name)
{
this->m_kspreadView = NULL;
- if (parent)
+ if (tqparent)
{
- if (parent->inherits("KSpread::View"))
+ if (tqparent->inherits("KSpread::View"))
{
- this->m_kspreadView = (View*)parent;
+ this->m_kspreadView = (View*)tqparent;
}
else
{
@@ -67,14 +67,14 @@ PluginInsertCalendar::PluginInsertCalendar( QObject *parent, const char *name, c
}
else
{
- kdWarning() << "Plugin created without a parent!!!" << endl;
+ kdWarning() << "Plugin created without a tqparent!!!" << endl;
}
this->m_dialog = NULL;
(void)new KAction( i18n("Insert Calendar..."), KShortcut::null(),
- this, SLOT( slotShowDialog() ), actionCollection(), "kspreadinsertcalendar");
+ this, TQT_SLOT( slotShowDialog() ), actionCollection(), "kspreadinsertcalendar");
}
PluginInsertCalendar::~PluginInsertCalendar()
@@ -107,8 +107,8 @@ void PluginInsertCalendar::slotShowDialog()
Q_ASSERT(m_dialog);
- connect(m_dialog,SIGNAL(insertCalendar(const QDate&, const QDate&)),
- this,SLOT(slotInsertCalendar(const QDate&, const QDate&)));
+ connect(m_dialog,TQT_SIGNAL(insertCalendar(const TQDate&, const TQDate&)),
+ this,TQT_SLOT(slotInsertCalendar(const TQDate&, const TQDate&)));
}
//@todo if anyone knows a better way to get a background window to foreground, please change this...
@@ -117,7 +117,7 @@ void PluginInsertCalendar::slotShowDialog()
}
-void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &end)
+void PluginInsertCalendar::slotInsertCalendar(const TQDate &start, const TQDate &end)
{
//@todo implement
kdDebug() << "slotInsert... still to be implemented" << endl;
@@ -158,7 +158,7 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
Q_ASSERT(selection_info);
- QPoint selection = selection_info->selection().topLeft();
+ TQPoint selection = selection_info->selection().topLeft();
Sheet* sheet = m_kspreadView->activeSheet();
@@ -175,12 +175,12 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
//@todo improve calendar size prediction!
int sizeY = 4 + (int)(0.5*(float)(start.daysTo(end)));
- if (!sheet->areaIsEmpty(QRect(selection,QSize(sizeX,sizeY))))
+ if (!sheet->areaIsEmpty(TQRect(selection,TQSize(sizeX,sizeY))))
{
if (KMessageBox::No == KMessageBox::warningYesNo(NULL,i18n("The area where the calendar is inserted is NOT empty, are you sure you want to continue, overwriting existing data? If you choose No the area that would be required for the desired calendar will be selected so you can see what data would be overwritten."),i18n("Warning")))
{
//select the area so the user knows what's in the way
- selection_info->initialize(QRect(selection.x(),selection.y(),sizeX,sizeY));//,sheet);
+ selection_info->initialize(TQRect(selection.x(),selection.y(),sizeX,sizeY));//,sheet);
return;
}
}
@@ -194,16 +194,16 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
int row = selection.y();
int col = selection.x();
int colstart = col; //this is where we get back after each week
- sheet->setText(row,colstart,i18n("Calendar from %1 to %2").arg(start.toString()).arg(end.toString()));
+ sheet->setText(row,colstart,i18n("Calendar from %1 to %2").tqarg(start.toString()).tqarg(end.toString()));
- QDate current(start);
-// QDate previous(current);
+ TQDate current(start);
+// TQDate previous(current);
bool yearheader = true;
bool monthheader = true;
bool weekheader = true;
//this loop creates the actual calendar
- //@todo formatting of cells - each day occupies QRect(row,col,row,col+1)
+ //@todo formatting of cells - each day occupies TQRect(row,col,row,col+1)
while (current <= end)
{
@@ -229,7 +229,7 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
if (yearheader)
{
- kdDebug() << "inserting year " + QString::number(current.year()) << endl;
+ kdDebug() << "inserting year " + TQString::number(current.year()) << endl;
sheet->setText(row,colstart+6,cs->yearString(current,false));
row+=2;
@@ -237,7 +237,7 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
}
if (monthheader)
{
- kdDebug() << "inserting month " + QString::number(current.month()) << endl;
+ kdDebug() << "inserting month " + TQString::number(current.month()) << endl;
sheet->setText(row,colstart+6,cs->monthName(current,false));
row+=2;
//we always have the week number in the first column
@@ -251,7 +251,7 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
}
if (weekheader)
{
- sheet->setText(row,colstart,QString::number(cs->weekNumber(current)));
+ sheet->setText(row,colstart,TQString::number(cs->weekNumber(current)));
col++;
weekheader=false;
@@ -262,10 +262,10 @@ void PluginInsertCalendar::slotInsertCalendar(const QDate &start, const QDate &e
}
}
- sheet->setText(row,col,QString::number(cs->day(current)));
+ sheet->setText(row,col,TQString::number(cs->day(current)));
//go to the next date
//@todo isn't there a better way, like current++ or something??
- QDate next = current.addDays(1);
+ TQDate next = current.addDays(1);
current.setYMD(next.year(),next.month(),next.day());
col+=2;
diff --git a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
index 9eb6060d..be93fea5 100644
--- a/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
+++ b/kspread/plugins/insertcalendar/kspread_plugininsertcalendar.h
@@ -29,7 +29,7 @@
#include <koffice_export.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class KAboutData;
@@ -52,11 +52,12 @@ class InsertCalendarDialog;
class KSPREAD_EXPORT PluginInsertCalendar : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
protected:
/**
- * This is the parent part of the plugin. It is used
+ * This is the tqparent part of the plugin. It is used
* to access the spreadsheet and actually insert the
* calendar.
*
@@ -77,7 +78,7 @@ class KSPREAD_EXPORT PluginInsertCalendar : public KParts::Plugin
/**
* Constructor. This constructor is usable with KGenericFactory.
*/
- PluginInsertCalendar( QObject *parent, const char *name, const QStringList& args );
+ PluginInsertCalendar( TQObject *tqparent, const char *name, const TQStringList& args );
/**
* Virtual destructor.
@@ -105,7 +106,7 @@ class KSPREAD_EXPORT PluginInsertCalendar : public KParts::Plugin
* from the insert calendar dialog and builds an calendar in the
* spreadsheet accordingly.
*/
- void slotInsertCalendar(const QDate &start, const QDate &end);
+ void slotInsertCalendar(const TQDate &start, const TQDate &end);
};
}
diff --git a/kspread/plugins/scripting/kspreadcore/krs_cell.cpp b/kspread/plugins/scripting/kspreadcore/krs_cell.cpp
index cabf0c50..46ee1389 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_cell.cpp
+++ b/kspread/plugins/scripting/kspreadcore/krs_cell.cpp
@@ -59,30 +59,30 @@ Cell::Cell(KSpread::Cell* cell, KSpread::Sheet* sheet, uint col, uint row)
Cell::~Cell() {
}
-const QString Cell::getClassName() const {
+const TQString Cell::getClassName() const {
return "Kross::KSpreadCore::KSpreadCell";
}
-QVariant Cell::toVariant(const KSpread::Value& value) const
+TQVariant Cell::toVariant(const KSpread::Value& value) const
{
//Should we use following value-format enums here?
//fmt_None, fmt_Boolean, fmt_Number, fmt_Percent, fmt_Money, fmt_DateTime, fmt_Date, fmt_Time, fmt_String
switch(value.type()) {
case KSpread::Value::Empty:
- return QVariant();
+ return TQVariant();
case KSpread::Value::Boolean:
- return QVariant( value.asBoolean() );
+ return TQVariant( value.asBoolean() );
case KSpread::Value::Integer:
- return static_cast<Q_LLONG>(value.asInteger());
+ return static_cast<TQ_LLONG>(value.asInteger());
case KSpread::Value::Float:
return (float)value.asFloat();
case KSpread::Value::String:
return value.asString();
case KSpread::Value::Array: {
- QValueList<QVariant> colarray;
+ TQValueList<TQVariant> colarray;
for(uint j = 0; j < value.rows(); j++) {
- QValueList<QVariant> rowarray;
+ TQValueList<TQVariant> rowarray;
for( uint i = 0; i < value.columns(); i++) {
KSpread::Value v = value.element(i,j);
rowarray.append( toVariant(v) );
@@ -93,28 +93,28 @@ QVariant Cell::toVariant(const KSpread::Value& value) const
} break;
case KSpread::Value::CellRange:
//FIXME: not yet used
- return QVariant();
+ return TQVariant();
case KSpread::Value::Error:
- return QVariant();
+ return TQVariant();
}
- return QVariant();
+ return TQVariant();
}
-QVariant Cell::value() const {
+TQVariant Cell::value() const {
return toVariant( m_cell->value() );
}
-bool Cell::setValue(const QVariant& value) {
+bool Cell::setValue(const TQVariant& value) {
KSpread::Value v = m_cell->value();
switch(value.type()) {
- case QVariant::Bool: v.setValue( value.toBool() ); break;
- case QVariant::ULongLong: v.setValue( (long)value.toLongLong() ); break;
- case QVariant::Int: v.setValue( value.toInt() ); break;
- case QVariant::Double: v.setValue( value.toDouble() ); break;
- case QVariant::String: v.setValue( value.toString() ); break;
- case QVariant::Date: v.setValue( value.toDate() ); break;
- case QVariant::Time: v.setValue( value.toTime() ); break;
- case QVariant::DateTime: v.setValue( value.toDateTime() ); break;
+ case TQVariant::Bool: v.setValue( value.toBool() ); break;
+ case TQVariant::ULongLong: v.setValue( (long)value.toLongLong() ); break;
+ case TQVariant::Int: v.setValue( value.toInt() ); break;
+ case TQVariant::Double: v.setValue( value.toDouble() ); break;
+ case TQVariant::String: v.setValue( value.toString() ); break;
+ case TQVariant::Date: v.setValue( value.toDate() ); break;
+ case TQVariant::Time: v.setValue( value.toTime() ); break;
+ case TQVariant::DateTime: v.setValue( value.toDateTime() ); break;
default: return false;
}
return true;
@@ -146,38 +146,38 @@ void Cell::setNextCell(Cell* c) {
return m_cell->setNextCell(c->m_cell);
}
-const QString Cell::name() const {
+const TQString Cell::name() const {
return m_cell->name();
}
-const QString Cell::fullName() const {
+const TQString Cell::fullName() const {
return m_cell->fullName();
}
-const QString Cell::comment() const {
+const TQString Cell::comment() const {
return m_cell->format()->comment(m_col, m_row);
}
-void Cell::setComment(const QString& c) {
+void Cell::setComment(const TQString& c) {
return m_cell->format()->setComment(c);
}
-const QString Cell::getFormatString() const {
+const TQString Cell::getFormatString() const {
return m_cell->format()->getFormatString(m_col, m_row);
}
-void Cell::setFormatString(const QString& format) {
+void Cell::setFormatString(const TQString& format) {
m_cell->format()->setFormatString(format);
}
-const QString Cell::text() const {
+const TQString Cell::text() const {
return m_cell->text();
}
-bool Cell::setText(const QString& text) {
+bool Cell::setText(const TQString& text) {
KSpread::ProtectedCheck prot;
prot.setSheet (m_sheet);
- prot.add (QPoint (m_col, m_row));
+ prot.add (TQPoint (m_col, m_row));
if (prot.check())
return false;
@@ -185,26 +185,26 @@ bool Cell::setText(const QString& text) {
dm->setSheet (m_sheet);
dm->setValue (text);
dm->setParsing (true);
- dm->add (QPoint (m_col, m_row));
+ dm->add (TQPoint (m_col, m_row));
dm->execute ();
return true;
}
-const QString Cell::textColor() {
+const TQString Cell::textColor() {
return m_cell->format()->textColor(m_col, m_row).name();
}
-void Cell::setTextColor(const QString& textcolor) {
- m_cell->format()->setTextColor( QColor(textcolor) );
+void Cell::setTextColor(const TQString& textcolor) {
+ m_cell->format()->setTextColor( TQColor(textcolor) );
}
-const QString Cell::backgroundColor() {
+const TQString Cell::backgroundColor() {
return m_cell->format()->bgColor(m_col, m_row).name();
}
-void Cell::setBackgroundColor(const QString& backgroundcolor) {
- m_cell->format()->setBgColor( QColor(backgroundcolor) );
+void Cell::setBackgroundColor(const TQString& backgroundcolor) {
+ m_cell->format()->setBgColor( TQColor(backgroundcolor) );
}
}
diff --git a/kspread/plugins/scripting/kspreadcore/krs_cell.h b/kspread/plugins/scripting/kspreadcore/krs_cell.h
index 5f3f221d..c69b831d 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_cell.h
+++ b/kspread/plugins/scripting/kspreadcore/krs_cell.h
@@ -26,8 +26,8 @@
#include <api/class.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
namespace Kross { namespace KSpreadCore {
@@ -52,17 +52,17 @@ class Cell : public Kross::Api::Class<Cell>
public:
Cell(KSpread::Cell* cell, KSpread::Sheet* sheet, uint col, uint row);
virtual ~Cell();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* Return the value of the cell.
*/
- QVariant value() const;
+ TQVariant value() const;
/**
* Set the value the cell has.
*/
- bool setValue(const QVariant& value);
+ bool setValue(const TQVariant& value);
/**
* Return the column number.
@@ -94,21 +94,21 @@ class Cell : public Kross::Api::Class<Cell>
* Returns the name of the cell. For example, the cell in first column
* and first row is "A1".
*/
- const QString name() const;
+ const TQString name() const;
/**
* Returns the full name of the cell, i.e. including the worksheet name.
* Example: "Sheet1!A1"
*/
- const QString fullName() const;
+ const TQString fullName() const;
/**
* Returns the comment for the cell.
*/
- const QString comment() const;
+ const TQString comment() const;
/**
* Set the comment for the cell.
*/
- void setComment(const QString& c);
+ void setComment(const TQString& c);
#if 0
bool isFormula() const;
@@ -118,50 +118,50 @@ class Cell : public Kross::Api::Class<Cell>
/**
* Returns the format of the cell, e.g. #.##0.00, dd/mmm/yyyy,...
*/
- const QString getFormatString() const;
+ const TQString getFormatString() const;
/**
* Sets the format of the cell, e.g. #.##0.00, dd/mmm/yyyy,...
*/
- void setFormatString(const QString& format);
+ void setFormatString(const TQString& format);
/**
* Return the text of the cell (the formula if there is one,
* the value otherwise). This could be a value (e.g. "14.03")
* or a formula (e.g. "=SUM(A1:A10)")
*/
- const QString text() const;
+ const TQString text() const;
/**
* Set the text of the cell. the text
* will be handled as string
*/
- bool setText(const QString& text);
+ bool setText(const TQString& text);
/**
* Return the textcolor as RGB-value in the format "#RRGGBB".
*/
- const QString textColor();
+ const TQString textColor();
/**
* Set the textcolor to the RGB-value in the format "#RRGGBB"
* where each of R, G, and B is a single hex digit.
*/
- void setTextColor(const QString& textcolor);
+ void setTextColor(const TQString& textcolor);
/**
* Return the backgroundcolor as RGB-value in the format "#RRGGBB".
*/
- const QString backgroundColor();
+ const TQString backgroundColor();
/**
* Set the backgroundcolor to the RGB-value in the format "#RRGGBB"
* where each of R, G, and B is a single hex digit.
*/
- void setBackgroundColor(const QString& backgroundcolor);
+ void setBackgroundColor(const TQString& backgroundcolor);
private:
KSpread::Cell* m_cell;
KSpread::Sheet* m_sheet;
uint m_col, m_row;
- QVariant toVariant(const KSpread::Value& value) const;
+ TQVariant toVariant(const KSpread::Value& value) const;
};
}
}
diff --git a/kspread/plugins/scripting/kspreadcore/krs_doc.cpp b/kspread/plugins/scripting/kspreadcore/krs_doc.cpp
index 37c87efd..0372d83f 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_doc.cpp
+++ b/kspread/plugins/scripting/kspreadcore/krs_doc.cpp
@@ -49,7 +49,7 @@ Doc::~Doc() {
}
-const QString Doc::getClassName() const {
+const TQString Doc::getClassName() const {
return "Kross::KSpreadCore::Doc";
}
@@ -58,25 +58,25 @@ Sheet* Doc::currentSheet()
return new Sheet(m_doc->displaySheet(), m_doc);
}
-Sheet* Doc::sheetByName(const QString& name)
+Sheet* Doc::sheetByName(const TQString& name)
{
- QPtrListIterator<KSpread::Sheet> it (m_doc->map()->sheetList());
+ TQPtrListIterator<KSpread::Sheet> it (m_doc->map()->sheetList());
for( ; it.current(); ++it )
if(it.current()->sheetName() == name)
return new Sheet(it.current(), m_doc);
return 0;
}
-QStringList Doc::sheetNames()
+TQStringList Doc::sheetNames()
{
- QStringList names;
- QPtrListIterator<KSpread::Sheet> it (m_doc->map()->sheetList());
+ TQStringList names;
+ TQPtrListIterator<KSpread::Sheet> it (m_doc->map()->sheetList());
for( ; it.current(); ++it )
names.append( it.current()->sheetName() );
return names;
}
-bool Doc::addSheet(const QString& sheetname)
+bool Doc::addSheet(const TQString& sheetname)
{
KSpread::Sheet* sheet = m_doc->map()->createSheet();
if(sheet) {
@@ -90,7 +90,7 @@ bool Doc::addSheet(const QString& sheetname)
return false;
}
-bool Doc::removeSheet(const QString& sheetname)
+bool Doc::removeSheet(const TQString& sheetname)
{
KSpread::Sheet* sheet = m_doc->map()->findSheet(sheetname);
if(sheet) {
@@ -100,33 +100,33 @@ bool Doc::removeSheet(const QString& sheetname)
return false;
}
-bool Doc::loadNativeXML(const QString& xml) {
- QDomDocument doc;
+bool Doc::loadNativeXML(const TQString& xml) {
+ TQDomDocument doc;
if(! doc.setContent(xml, true))
return false;
return m_doc->loadXML(0, doc);
}
-QString Doc::saveNativeXML() {
+TQString Doc::saveNativeXML() {
return m_doc->saveXML().toString(2);
}
-bool Doc::openUrl(const QString& url)
+bool Doc::openUrl(const TQString& url)
{
return m_doc->openURL(url);
}
-bool Doc::saveUrl(const QString& url)
+bool Doc::saveUrl(const TQString& url)
{
return m_doc->saveAs(url);
}
-bool Doc::import(const QString& url)
+bool Doc::import(const TQString& url)
{
return m_doc->import(url);
}
-bool Doc::exp0rt(const QString& url)
+bool Doc::exp0rt(const TQString& url)
{
return m_doc->exp0rt(url);
}
diff --git a/kspread/plugins/scripting/kspreadcore/krs_doc.h b/kspread/plugins/scripting/kspreadcore/krs_doc.h
index 28c69845..dd3df4d6 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_doc.h
+++ b/kspread/plugins/scripting/kspreadcore/krs_doc.h
@@ -24,9 +24,9 @@
#include <api/class.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
namespace Kross { namespace KSpreadCore {
@@ -45,7 +45,7 @@ class Doc : public Kross::Api::Class<Doc>
public:
explicit Doc(KSpread::Doc* doc);
virtual ~Doc();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
@@ -69,7 +69,7 @@ class Doc : public Kross::Api::Class<Doc>
* sheet = doc.sheetByName("foosheet")
* @endcode
*/
- Sheet* sheetByName(const QString& name);
+ Sheet* sheetByName(const TQString& name);
/**
* This function returns an array with the sheet names
@@ -81,36 +81,36 @@ class Doc : public Kross::Api::Class<Doc>
* sheet = doc.sheetByName( sheetnames[0] )
* @endcode
*/
- QStringList sheetNames();
+ TQStringList sheetNames();
/**
* Add a new sheet named @p sheetname to the document.
*/
- bool addSheet(const QString& sheetname);
+ bool addSheet(const TQString& sheetname);
/**
* Remove the sheet named @p sheetname from the document.
*/
- bool removeSheet(const QString& sheetname);
+ bool removeSheet(const TQString& sheetname);
/**
* Loads the native XML document.
*/
- bool loadNativeXML(const QString& xml);
+ bool loadNativeXML(const TQString& xml);
/**
* Save and return the to a native document saved XML.
*/
- QString saveNativeXML();
+ TQString saveNativeXML();
#if 0
- bool loadOpenDocXML(const QString& xml);
- QString saveOpenDocXML();
+ bool loadOpenDocXML(const TQString& xml);
+ TQString saveOpenDocXML();
#endif
- bool openUrl(const QString& url);
- bool saveUrl(const QString& url);
- bool import(const QString& url);
- bool exp0rt(const QString& url);
+ bool openUrl(const TQString& url);
+ bool saveUrl(const TQString& url);
+ bool import(const TQString& url);
+ bool exp0rt(const TQString& url);
private:
KSpread::Doc* m_doc;
diff --git a/kspread/plugins/scripting/kspreadcore/krs_sheet.cpp b/kspread/plugins/scripting/kspreadcore/krs_sheet.cpp
index 694037ed..790c2131 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_sheet.cpp
+++ b/kspread/plugins/scripting/kspreadcore/krs_sheet.cpp
@@ -50,16 +50,16 @@ Sheet::Sheet(KSpread::Sheet* sheet, KSpread::Doc *doc) : Kross::Api::Class<Sheet
Sheet::~Sheet() {
}
-const QString Sheet::getClassName() const {
+const TQString Sheet::getClassName() const {
return "Kross::KSpreadCore::Sheet";
}
-const QString Sheet::name() const
+const TQString Sheet::name() const
{
return m_sheet->sheetName();
}
-void Sheet::setName(const QString& name)
+void Sheet::setName(const TQString& name)
{
m_sheet->setSheetName(name);
}
@@ -78,8 +78,8 @@ Cell* Sheet::firstCell() const {
}
Cell* Sheet::cell(uint col, uint row) {
- uint c = QMAX(uint(1), col);
- uint r = QMAX(uint(1), row);
+ uint c = TQMAX(uint(1), col);
+ uint r = TQMAX(uint(1), row);
return new Cell(m_sheet->cellAt(c,r),m_sheet,c,r);
}
@@ -92,11 +92,11 @@ bool Sheet::insertColumn(uint col) {
}
void Sheet::removeRow(uint row) {
- m_sheet->removeRow( QMAX(uint(1), row) );
+ m_sheet->removeRow( TQMAX(uint(1), row) );
}
void Sheet::removeColumn(uint col) {
- m_sheet->removeColumn( QMAX(uint(1), col) );
+ m_sheet->removeColumn( TQMAX(uint(1), col) );
}
}
diff --git a/kspread/plugins/scripting/kspreadcore/krs_sheet.h b/kspread/plugins/scripting/kspreadcore/krs_sheet.h
index a96e758e..bd83b6a8 100644
--- a/kspread/plugins/scripting/kspreadcore/krs_sheet.h
+++ b/kspread/plugins/scripting/kspreadcore/krs_sheet.h
@@ -52,17 +52,17 @@ class Sheet : public Kross::Api::Class<Sheet>
public:
Sheet(KSpread::Sheet* sheet, KSpread::Doc* doc = 0);
virtual ~Sheet();
- virtual const QString getClassName() const;
+ virtual const TQString getClassName() const;
private:
/**
* Return the name of the sheet.
*/
- const QString name() const;
+ const TQString name() const;
/**
* Set the name of the sheet.
*/
- void setName(const QString& name);
+ void setName(const TQString& name);
/**
* Return the currently maximum defined number of columns.
diff --git a/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.cpp b/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.cpp
index acfd0b2b..108516dc 100644
--- a/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.cpp
+++ b/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.cpp
@@ -45,9 +45,9 @@ using namespace Kross::KSpreadCore;
KSpreadCoreModule::KSpreadCoreModule(Kross::Api::Manager* manager)
: Kross::Api::Module("kspreadcore") , m_manager(manager)
{
- QMap<QString, Object::Ptr> children = manager->getChildren();
- kdDebug() << " there are " << children.size() << endl;
- for(QMap<QString, Object::Ptr>::const_iterator it = children.begin(); it != children.end(); it++)
+ TQMap<TQString, Object::Ptr> tqchildren = manager->getChildren();
+ kdDebug() << " there are " << tqchildren.size() << endl;
+ for(TQMap<TQString, Object::Ptr>::const_iterator it = tqchildren.begin(); it != tqchildren.end(); it++)
{
kdDebug() << it.key() << " " << it.data() << endl;
}
@@ -76,7 +76,7 @@ KSpreadCoreModule::~KSpreadCoreModule()
}
-const QString KSpreadCoreModule::getClassName() const
+const TQString KSpreadCoreModule::getClassName() const
{
return "Kross::KSpreadCore::KSpreadCoreModule";
}
diff --git a/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.h b/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.h
index ffc998cc..03bde5fc 100644
--- a/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.h
+++ b/kspread/plugins/scripting/kspreadcore/kspreadcoremodule.h
@@ -20,8 +20,8 @@
#ifndef KSPREAD_KROSS_KSPREADCOREMODULE_H
#define KSPREAD_KROSS_KSPREADCOREMODULE_H
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
#define KROSS_MAIN_EXPORT KDE_EXPORT
@@ -51,8 +51,8 @@ namespace Kross { namespace KSpreadCore {
public:
KSpreadCoreModule(Kross::Api::Manager* manager);
virtual ~KSpreadCoreModule();
- virtual const QString getClassName() const;
- //virtual Kross::Api::Object::Ptr call(const QString& name, Kross::Api::List::Ptr arguments);
+ virtual const TQString getClassName() const;
+ //virtual Kross::Api::Object::Ptr call(const TQString& name, Kross::Api::List::Ptr arguments);
private:
#if 0
diff --git a/kspread/plugins/scripting/scripting.cc b/kspread/plugins/scripting/scripting.cc
index 96cd1baf..e4299e26 100644
--- a/kspread/plugins/scripting/scripting.cc
+++ b/kspread/plugins/scripting/scripting.cc
@@ -20,7 +20,7 @@
*/
#include "scripting.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -37,37 +37,37 @@
typedef KGenericFactory<Scripting> KSpreadScriptingFactory;
K_EXPORT_COMPONENT_FACTORY( kspreadscripting, KSpreadScriptingFactory( "kspreadscripting" ) )
-Scripting::Scripting(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+Scripting::Scripting(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(KSpreadScriptingFactory::instance());
kdDebug() << "Scripting plugin. Class: "
- << metaObject()->className()
+ << tqmetaObject()->className()
<< ", Parent: "
- << parent->metaObject()->className()
+ << tqparent->tqmetaObject()->className()
<< "\n";
- if ( parent->inherits("KSpread::View") )
+ if ( tqparent->inherits("KSpread::View") )
{
setInstance(Scripting::instance());
- m_view = (KSpread::View*) parent;
+ m_view = (KSpread::View*) tqparent;
m_scriptguiclient = new Kross::Api::ScriptGUIClient( m_view, m_view );
// m_scriptguiclient ->setXMLFile(locate("data","kspreadplugins/scripting.rc"), true);
kdDebug() << "Setup actions for scripting !" << endl;
setXMLFile(locate("data","kspread/kpartplugins/scripting.rc"), true);
- new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
- new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, SLOT(showScriptManager()), actionCollection(), "configurescripts");
+ new KAction(i18n("Execute Script File..."), 0, 0, m_scriptguiclient, TQT_SLOT(executeScriptFile()), actionCollection(), "executescriptfile");
+ new KAction(i18n("Script Manager..."), 0, 0, m_scriptguiclient, TQT_SLOT(showScriptManager()), actionCollection(), "configurescripts");
KAction* scriptmenuaction = m_scriptguiclient->action("installedscripts");
actionCollection()->insert(scriptmenuaction);
- connect(m_scriptguiclient, SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, SLOT(executionFinished(const Kross::Api::ScriptAction*)));
+ connect(m_scriptguiclient, TQT_SIGNAL(executionFinished( const Kross::Api::ScriptAction* )), this, TQT_SLOT(executionFinished(const Kross::Api::ScriptAction*)));
- Kross::Api::Manager::scriptManager()->addQObject(m_view->doc(), "KSpreadDocument");
- Kross::Api::Manager::scriptManager()->addQObject(m_view, "KSpreadView");
+ Kross::Api::Manager::scriptManager()->addTQObject(m_view->doc(), "KSpreadDocument");
+ Kross::Api::Manager::scriptManager()->addTQObject(TQT_TQOBJECT(m_view), "KSpreadView");
}
}
@@ -78,7 +78,7 @@ Scripting::~Scripting()
void Scripting::executionFinished(const Kross::Api::ScriptAction*)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
#include "scripting.moc"
diff --git a/kspread/plugins/scripting/scripting.h b/kspread/plugins/scripting/scripting.h
index 1d08bd9f..b8bd3a55 100644
--- a/kspread/plugins/scripting/scripting.h
+++ b/kspread/plugins/scripting/scripting.h
@@ -35,8 +35,9 @@ namespace Kross {
class Scripting : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- Scripting(QObject *parent, const char *name, const QStringList &);
+ Scripting(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~Scripting();
private slots:
void executionFinished(const Kross::Api::ScriptAction*);
diff --git a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
index 2e2dfc31..d4ab99ed 100755
--- a/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
+++ b/kspread/plugins/scripting/scripts/exporthtml/ExportHtml.py
@@ -21,20 +21,20 @@ except (ImportError):
raise "Failed to import the required PyQt python module."
class Dialog(qt.QDialog):
- def __init__(self, scriptpath, parent):
+ def __init__(self, scriptpath, tqparent):
self.scriptpath = scriptpath
import krosskspreadcore
self.doc = krosskspreadcore.get("KSpreadDocument")
import qt
- qt.QDialog.__init__(self, parent, "Dialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, tqparent, "Dialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Export to HTML File")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(10)
box.setSpacing(10)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
sheetbox = qt.QHBox(box)
sheetbox.setSpacing(6)
@@ -173,7 +173,7 @@ if __name__ == "__main__":
qtapp = qt.QApplication(sys.argv)
else:
scriptpath = os.path.dirname(__name__)
- qtapp = qt.qApp
+ qtapp = qt.tqApp
dialog = Dialog(scriptpath, qtapp.mainWidget())
dialog.exec_loop()
diff --git a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
index f015a5f1..cedc82cc 100755
--- a/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
+++ b/kspread/plugins/scripting/scripts/scripteditor/ScriptEditor.py
@@ -22,10 +22,10 @@ except (ImportError):
# Samples.
class Widget(qt.QHBox):
- def __init__(self, parentwidget, label = None):
- self.parentwidget = parentwidget
+ def __init__(self, tqparentwidget, label = None):
+ self.tqparentwidget = tqparentwidget
import qt
- qt.QHBox.__init__(self, parentwidget)
+ qt.QHBox.__init__(self, tqparentwidget)
self.setMargin(4)
self.setSpacing(4)
if label != None: qt.QLabel(label, self)
@@ -33,10 +33,10 @@ class Widget(qt.QHBox):
return None
class ListWidget(Widget):
- def __init__(self, parentwidget, label):
+ def __init__(self, tqparentwidget, label):
import qt
global Widget
- Widget.__init__(self, parentwidget, label)
+ Widget.__init__(self, tqparentwidget, label)
self.combo = qt.QComboBox(self)
self.combo.setEditable(True)
self.setStretchFactor(self.combo,1)
@@ -44,22 +44,22 @@ class ListWidget(Widget):
return self.combo.currentText()
class EditWidget(Widget):
- def __init__(self, parentwidget, label):
+ def __init__(self, tqparentwidget, label):
import qt
global Widget
- Widget.__init__(self, parentwidget, label)
+ Widget.__init__(self, tqparentwidget, label)
self.edit = qt.QLineEdit(self)
self.setStretchFactor(self.edit,1)
def value(self):
return self.edit.text()
class FileWidget(Widget):
- def __init__(self, parentwidget, label, filtermask, openfiledialog = True):
- self.filtermask = filtermask
+ def __init__(self, tqparentwidget, label, filtertqmask, openfiledialog = True):
+ self.filtertqmask = filtertqmask
self.openfiledialog = openfiledialog
import qt
global Widget
- Widget.__init__(self, parentwidget, label)
+ Widget.__init__(self, tqparentwidget, label)
self.edit = qt.QLineEdit(self)
self.setStretchFactor(self.edit,1)
btn = qt.QPushButton("...",self)
@@ -68,9 +68,9 @@ class FileWidget(Widget):
import qt
text = str( self.edit.text() )
if self.openfiledialog:
- filename = str( qt.QFileDialog.getOpenFileName(text, self.filtermask, self.parentwidget) )
+ filename = str( qt.QFileDialog.getOpenFileName(text, self.filtertqmask, self.tqparentwidget) )
else:
- filename = qt.QFileDialog.getSaveFileName(text, self.filtermask, self.parentwidget)
+ filename = qt.QFileDialog.getSaveFileName(text, self.filtertqmask, self.tqparentwidget)
if filename != "": self.edit.setText( filename )
def value(self):
return self.edit.text()
@@ -81,33 +81,33 @@ class Samples:
# KexiDB
class KexiDB:
- def __init__(self, parentwidget):
- self.parentwidget = parentwidget
+ def __init__(self, tqparentwidget):
+ self.tqparentwidget = tqparentwidget
class _ProjectWidget(FileWidget):
- def __init__(self, parentwidget):
+ def __init__(self, tqparentwidget):
global FileWidget
- FileWidget.__init__(self, parentwidget, "Project File:", "*.kexi *.kexis *.kexic;;*")
+ FileWidget.__init__(self, tqparentwidget, "Project File:", "*.kexi *.kexis *.kexic;;*")
class _DriverWidget(ListWidget):
- def __init__(self, parentwidget):
+ def __init__(self, tqparentwidget):
global ListWidget
- ListWidget.__init__(self, parentwidget, "Driver:")
+ ListWidget.__init__(self, tqparentwidget, "Driver:")
import krosskexidb
for driver in krosskexidb.DriverManager().driverNames():
self.combo.insertItem(driver)
class _TableWidget(ListWidget):
- def __init__(self, parentwidget):
+ def __init__(self, tqparentwidget):
global ListWidget
- ListWidget.__init__(self, parentwidget, "Table:")
+ ListWidget.__init__(self, tqparentwidget, "Table:")
class PrintDriverDetails:
""" Print a the list of available KexiDB drivers and print details about one of them. """
name = "Details about a driver"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "DriverName" : Samples.KexiDB._DriverWidget( parent.parentwidget ),
+ "DriverName" : Samples.KexiDB._DriverWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -125,9 +125,9 @@ class Samples:
class ConnectWithFile:
""" Connect with a KexiDB database by using a Kexi Connection Project File. """
name = "Connect with file"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "ProjectFile" : Samples.KexiDB._ProjectWidget( parent.parentwidget ),
+ "ProjectFile" : Samples.KexiDB._ProjectWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -164,10 +164,10 @@ class Samples:
class IterateThroughTable:
""" Iterate through a table within a connected KexiDB database. """
name = "Iterate through table"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "ProjectFile" : Samples.KexiDB._ProjectWidget( parent.parentwidget ),
- "TableName" : Samples.KexiDB._TableWidget( parent.parentwidget ),
+ "ProjectFile" : Samples.KexiDB._ProjectWidget( tqparent.tqparentwidget ),
+ "TableName" : Samples.KexiDB._TableWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -216,13 +216,13 @@ class Samples:
# KSpread
class KSpread:
- def __init__(self, parentwidget):
- self.parentwidget = parentwidget
+ def __init__(self, tqparentwidget):
+ self.tqparentwidget = tqparentwidget
class _SheetWidget(ListWidget):
- def __init__(self, parentwidget, label = "Sheet:"):
+ def __init__(self, tqparentwidget, label = "Sheet:"):
global ListWidget
- ListWidget.__init__(self, parentwidget, label)
+ ListWidget.__init__(self, tqparentwidget, label)
try:
import krosskspreadcore
@@ -235,9 +235,9 @@ class Samples:
print trace
class _CellsWidget(ListWidget):
- def __init__(self, parentwidget):
+ def __init__(self, tqparentwidget):
global ListWidget
- ListWidget.__init__(self, parentwidget, "Cells (col1:row1 - col2:row2):")
+ ListWidget.__init__(self, tqparentwidget, "Cells (col1:row1 - col2:row2):")
self.combo.insertItem( "1:1 - %s:%s" % (5,10) )
self.combo.insertItem( "1:1 - %s:%s" % (256,256) )
self.combo.insertItem( "1:1 - %s:%s" % (32767,32767) )
@@ -245,15 +245,15 @@ class Samples:
return [ [ int(i) for i in item.split(':') ] for item in str( ListWidget.value(self) ).split('-') ]
class _ValueWidget(EditWidget):
- def __init__(self, parentwidget):
+ def __init__(self, tqparentwidget):
global EditWidget
- EditWidget.__init__(self, parentwidget, "Value:")
+ EditWidget.__init__(self, tqparentwidget, "Value:")
self.edit.setText("Some text")
class _ColorWidget(EditWidget):
- def __init__(self, parentwidget,label,color):
+ def __init__(self, tqparentwidget,label,color):
global EditWidget
- EditWidget.__init__(self, parentwidget, "%s (RGB):" % label)
+ EditWidget.__init__(self, tqparentwidget, "%s (RGB):" % label)
self.edit.setText(color)
def value(self):
return "#%s" % EditWidget.value(self)
@@ -261,12 +261,12 @@ class Samples:
class SetTextOfCells:
""" Set the text of the defined cells. """
name = "Set text of cells"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
- "Cells" : Samples.KSpread._CellsWidget( parent.parentwidget ),
- "Value" : Samples.KSpread._ValueWidget( parent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget ),
+ "Cells" : Samples.KSpread._CellsWidget( tqparent.tqparentwidget ),
+ "Value" : Samples.KSpread._ValueWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -292,13 +292,13 @@ class Samples:
class SetColorsOfCells:
""" Set the colors of the defined cells. """
name = "Set colors of cells"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget),
- "Cells" : Samples.KSpread._CellsWidget( parent.parentwidget ),
- "TextColor" : Samples.KSpread._ColorWidget( parent.parentwidget, "Textcolor", "ff0000" ),
- "BackgroundColor" : Samples.KSpread._ColorWidget( parent.parentwidget, "Backgroundcolor", "c0c0c0" ),
+ "SheetName" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget),
+ "Cells" : Samples.KSpread._CellsWidget( tqparent.tqparentwidget ),
+ "TextColor" : Samples.KSpread._ColorWidget( tqparent.tqparentwidget, "Textcolor", "ff0000" ),
+ "BackgroundColor" : Samples.KSpread._ColorWidget( tqparent.tqparentwidget, "Backgroundcolor", "c0c0c0" ),
}
def getCode(self):
return (
@@ -324,10 +324,10 @@ class Samples:
class IterateThroughCellsWithContent:
""" Iterate over all cells in a sheet that have content (aka that are not empty). """
name = "Iterate through cells"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -352,9 +352,9 @@ class Samples:
class PrintSheetDetails:
""" Print details about the current sheet. """
name = "Details about a sheet"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "SheetName" : Samples.KSpread._SheetWidget( parent.parentwidget ),
+ "SheetName" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget ),
}
def getCode(self):
return (
@@ -376,10 +376,10 @@ class Samples:
class LoadDocFromNativeXML:
""" Load the document from a native XML file. """
name = "Load document from native XML File"
- def __init__(self, parent):
+ def __init__(self, tqparent):
global FileWidget
self.widgets = {
- "FileName" : FileWidget( parent.parentwidget, "XML File:", "*.xml;;*" ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "XML File:", "*.xml;;*" ),
}
def getCode(self):
return (
@@ -413,10 +413,10 @@ class Samples:
class SaveDocToNativeXML:
""" Save the document to a native XML file. """
name = "Save document to native XML File"
- def __init__(self, parent):
+ def __init__(self, tqparent):
global FileWidget
self.widgets = {
- "FileName" : FileWidget( parent.parentwidget, "XML File:", "*.xml;;*", False ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "XML File:", "*.xml;;*", False ),
}
def getCode(self):
return (
@@ -451,10 +451,10 @@ class Samples:
class CopySheets:
""" Copy the text-content from one sheet to another. """
name = "Copy sheets"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "SourceSheet" : Samples.KSpread._SheetWidget( parent.parentwidget, "Source sheet:" ),
- "TargetSheet" : Samples.KSpread._SheetWidget( parent.parentwidget, "Target sheet:" ),
+ "SourceSheet" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget, "Source sheet:" ),
+ "TargetSheet" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget, "Target sheet:" ),
}
def getCode(self):
return (
@@ -480,10 +480,10 @@ class Samples:
class LoadSheetFromCSV:
""" Load the content of a CSV file into a KSpread sheet. """
name = "Load data from CSV file into sheet"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "Sheet" : Samples.KSpread._SheetWidget( parent.parentwidget ),
- "FileName" : FileWidget( parent.parentwidget, "CSV File:", "*.csv;;*", True ),
+ "Sheet" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "CSV File:", "*.csv;;*", True ),
}
def getCode(self):
return (
@@ -519,10 +519,10 @@ class Samples:
class SaveSheetToCSV:
""" Save the content of a KSpread sheet into a CSV file. """
name = "Save data from a sheet into a CSV file"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
- "Sheet" : Samples.KSpread._SheetWidget( parent.parentwidget ),
- "FileName" : FileWidget( parent.parentwidget, "CSV File:", "*.csv;;*", False ),
+ "Sheet" : Samples.KSpread._SheetWidget( tqparent.tqparentwidget ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "CSV File:", "*.csv;;*", False ),
}
def getCode(self):
return (
@@ -557,16 +557,16 @@ class Samples:
# PyQt
class PyQt:
- def __init__(self, parentwidget):
- self.parentwidget = parentwidget
+ def __init__(self, tqparentwidget):
+ self.tqparentwidget = tqparentwidget
class OpenFileDialog:
""" Show the usage of the openfile dialog with QFileDialog. """
name = "Open File Dialog"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
- "FileName" : FileWidget( parent.parentwidget, "Open File:", "*.txt *.html;;*" ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "Open File:", "*.txt *.html;;*" ),
}
def getCode(self):
return (
@@ -578,10 +578,10 @@ class Samples:
class SaveFileDialog:
""" Show the usage of the savefile dialog with QFileDialog. """
name = "Save File Dialog"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
- "FileName" : FileWidget( parent.parentwidget, "Save File:", "*.txt *.html;;*", False ),
+ "FileName" : FileWidget( tqparent.tqparentwidget, "Save File:", "*.txt *.html;;*", False ),
}
def getCode(self):
return (
@@ -593,7 +593,7 @@ class Samples:
class CustomDialog:
""" Show a custom dialog that inherits a QDialog. """
name = "Custom Dialog"
- def __init__(self, parent):
+ def __init__(self, tqparent):
pass
self.widgets = {
}
@@ -602,9 +602,9 @@ class Samples:
'import qt',
'',
'class MyDialog(qt.QDialog):',
- ' def __init__(self, parent):',
+ ' def __init__(self, tqparent):',
' import qt',
- ' qt.QDialog.__init__(self, parent, "MyDialog", 1, qt.Qt.WDestructiveClose)',
+ ' qt.QDialog.__init__(self, tqparent, "MyDialog", 1, qt.Qt.WDestructiveClose)',
' self.setCaption("My Dialog")',
' btn = qt.QPushButton("Click me",self)',
' qt.QObject.connect(btn, qt.SIGNAL("clicked()"), self.buttonClicked)',
@@ -619,11 +619,11 @@ class Samples:
class InputDialog:
""" Show how to use a QInputDialog. """
name = "Input Dialog"
- def __init__(self, parent):
+ def __init__(self, tqparent):
global EditWidget
self.widgets = {
- "Caption" : EditWidget( parent.parentwidget, "Caption" ),
- "Message" : EditWidget( parent.parentwidget, "Message" ),
+ "Caption" : EditWidget( tqparent.tqparentwidget, "Caption" ),
+ "Message" : EditWidget( tqparent.tqparentwidget, "Message" ),
}
def getCode(self):
return (
@@ -640,13 +640,13 @@ class Samples:
# DCOP
class DCOP:
- def __init__(self, parentwidget):
- self.parentwidget = parentwidget
+ def __init__(self, tqparentwidget):
+ self.tqparentwidget = tqparentwidget
class PrintClipboard:
""" Print the content from the clipper via DCOP. """
name = "Clipboard content"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
}
def getCode(self):
@@ -657,13 +657,13 @@ class Samples:
'd = dcopext.DCOPApp(apps[0], dcopclient)',
'result,typename,data = d.appclient.call(apps[0],"klipper","getClipboardContents()","")',
'ds = qt.QDataStream(data, qt.IO_ReadOnly)',
- 'print "Clipboard content:\\n%s" % kdecore.dcop_next(ds, "QString")',
+ 'print "Clipboard content:\\n%s" % kdecore.dcop_next(ds, TQSTRING_OBJECT_NAME_STRING)',
)
class AmarokCollectionInfos:
""" Fetch some collection informations from the amarok collection via DCOP. """
name = "amarok collection infos"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
}
def getCode(self):
@@ -688,7 +688,7 @@ class Samples:
class KopeteContacts:
""" Print the names of all contacts Kopete knows via DCOP. """
name = "Kopete contacts"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
}
def getCode(self):
@@ -704,14 +704,14 @@ class Samples:
'if not state: raise "Failed to call the kopete contacts-function"',
'',
'ds = qt.QDataStream(rdata.data(), qt.IO_ReadOnly)',
- 'sl = kdecore.dcop_next (ds, "QStringList")',
+ 'sl = kdecore.dcop_next (ds, TQSTRINGLIST_OBJECT_NAME_STRING)',
'print "contacts=%s" % [ str(s) for s in sl ]',
)
class KWordSelectedText:
""" Get the selected text from a KWord instance via DCOP. """
name = "KWord selected text"
- def __init__(self, parent):
+ def __init__(self, tqparent):
self.widgets = {
}
def getCode(self):
@@ -752,22 +752,22 @@ class Samples:
'',
'# Get the selected text.',
'(state,rtype,rdata) = d.appclient.call(appname, frameset.obj(), "selectedText()", "")',
- 'print "Selected Text: %s" % dataToList( rdata,["QString"] )[0]',
+ 'print "Selected Text: %s" % dataToList( rdata,[TQSTRING_OBJECT_NAME_STRING] )[0]',
)
####################################################################################
# Dialog implementations.
class SampleDialog(qt.QDialog):
- def __init__(self, parent, sampleclazz, samplechildclazz):
+ def __init__(self, tqparent, sampleclazz, samplechildclazz):
import qt
- qt.QDialog.__init__(self, parent, "SampleDialog", 1)
+ qt.QDialog.__init__(self, tqparent, "SampleDialog", 1)
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(4)
box.setSpacing(10)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
self.scrollview = qt.QScrollView(box)
self.scrollview.setResizePolicy(qt.QScrollView.AutoOne)
@@ -813,11 +813,11 @@ class SampleDialog(qt.QDialog):
widget = self.samplechild.widgets[widgetname]
value = widget.value()
if value != None:
- code = code.replace("{%s}" % widgetname, str(value))
+ code = code.tqreplace("{%s}" % widgetname, str(value))
return code
class MainDialog(qt.QDialog):
- def __init__(self, scriptpath, parent):
+ def __init__(self, scriptpath, tqparent):
self.scriptpath = scriptpath
if not hasattr(__main__,"scripteditorfilename"):
__main__.scripteditorfilename = self.getFileName("myscript.py")
@@ -826,14 +826,14 @@ class MainDialog(qt.QDialog):
self.doc = krosskspreadcore.get("KSpreadDocument")
import os, qt
- qt.QDialog.__init__(self, parent, "MainDialog", 1, qt.Qt.WDestructiveClose)
+ qt.QDialog.__init__(self, tqparent, "MainDialog", 1, qt.Qt.WDestructiveClose)
self.setCaption("Script Editor")
- layout = qt.QVBoxLayout(self)
+ tqlayout = qt.QVBoxLayout(self)
box = qt.QVBox(self)
box.setMargin(4)
box.setSpacing(10)
- layout.addWidget(box)
+ tqlayout.addWidget(box)
menu = qt.QMenuBar(box)
@@ -1083,7 +1083,7 @@ if __name__ == "__main__":
qtapp = qt.QApplication(sys.argv)
else:
scriptpath = os.path.dirname(__name__)
- qtapp = qt.qApp
+ qtapp = qt.tqApp
dialog = MainDialog(scriptpath, qtapp.mainWidget())
dialog.exec_loop()
diff --git a/kspread/region.cc b/kspread/region.cc
index 84fe3ce3..4b31554c 100644
--- a/kspread/region.cc
+++ b/kspread/region.cc
@@ -16,8 +16,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
#include <kdebug.h>
@@ -43,7 +43,7 @@ public:
}
View* view;
- QValueList<Element*> cells;
+ TQValueList<Element*> cells;
};
@@ -56,7 +56,7 @@ Region::Region()
d = new Private();
}
-Region::Region(View* view, const QString& string, Sheet* sheet)
+Region::Region(View* view, const TQString& string, Sheet* sheet)
{
d = new Private();
d->view = view;
@@ -65,17 +65,17 @@ Region::Region(View* view, const QString& string, Sheet* sheet)
{
return;
}
- QStringList substrings = QStringList::split(';', string);
- QStringList::ConstIterator end = substrings.constEnd();
- for (QStringList::ConstIterator it = substrings.constBegin(); it != end; ++it)
+ TQStringList substrings = TQStringList::split(';', string);
+ TQStringList::ConstIterator end = substrings.constEnd();
+ for (TQStringList::ConstIterator it = substrings.constBegin(); it != end; ++it)
{
- QString sRegion = *it;
+ TQString sRegion = *it;
if (!sheet)
{
sheet = filterSheetName(sRegion);
}
- int delimiterPos = sRegion.find(':');
+ int delimiterPos = sRegion.tqfind(':');
if (delimiterPos > -1)
{
// range
@@ -111,25 +111,25 @@ Region::Region(View* view, const QString& string, Sheet* sheet)
}
}
-Region::Region(const QRect& rect, Sheet* sheet)
+Region::Region(const TQRect& rect, Sheet* sheet)
{
d = new Private();
if (rect.isNull())
{
- kdError(36001) << "Region::Region(const QRect&): QRect is empty!" << endl;
+ kdError(36001) << "Region::Region(const TQRect&): TQRect is empty!" << endl;
return;
}
add(rect, sheet);
}
-Region::Region(const QPoint& point, Sheet* sheet)
+Region::Region(const TQPoint& point, Sheet* sheet)
{
d = new Private();
if (point.isNull())
{
- kdError(36001) << "Region::Region(const QPoint&): QPoint is empty!" << endl;
+ kdError(36001) << "Region::Region(const TQPoint&): TQPoint is empty!" << endl;
return;
}
add(point, sheet);
@@ -166,7 +166,7 @@ Region::Region(int x, int y, Sheet* sheet)
kdError(36001) << "Region::Region(int x, int y): Coordinates are invalid!" << endl;
return;
}
- add(QPoint(x,y), sheet);
+ add(TQPoint(x,y), sheet);
}
Region::Region(int x, int y, int width, int height, Sheet* sheet)
@@ -178,7 +178,7 @@ Region::Region(int x, int y, int width, int height, Sheet* sheet)
kdError(36001) << "Region::Region(int x, int y, int width, int height): Dimensions are invalid!" << endl;
return;
}
- add(QRect(x,y,width,height), sheet);
+ add(TQRect(x,y,width,height), sheet);
}
@@ -230,9 +230,9 @@ bool Region::isContiguous() const
return true;
}
-QString Region::name(Sheet* originSheet) const
+TQString Region::name(Sheet* originSheet) const
{
- QStringList names;
+ TQStringList names;
ConstIterator endOfList(d->cells.constEnd());
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
@@ -242,7 +242,7 @@ QString Region::name(Sheet* originSheet) const
return names.isEmpty() ? "" : names.join(";");
}
-Region::Element* Region::add(const QPoint& point, Sheet* sheet)
+Region::Element* Region::add(const TQPoint& point, Sheet* sheet)
{
// kdDebug() << k_funcinfo << endl;
if (point.x() < 1 || point.y() < 1)
@@ -253,13 +253,13 @@ Region::Element* Region::add(const QPoint& point, Sheet* sheet)
return (it == d->cells.end()) ? 0 : *it;
}
-Region::Element* Region::add(const QRect& range, Sheet* sheet)
+Region::Element* Region::add(const TQRect& range, Sheet* sheet)
{
if (range.normalize().width() == 0 || range.normalize().height() == 0)
{
return 0;
}
- if (range.size() == QSize(1,1))
+ if (range.size() == TQSize(1,1))
{
return add(range.topLeft(), sheet);
}
@@ -277,14 +277,14 @@ Region::Element* Region::add(const Region& region)
return d->cells.isEmpty() ? 0 : d->cells.last();
}
-void Region::sub(const QPoint& point)
+void Region::sub(const TQPoint& point)
{
// TODO Stefan: Improve!
Iterator endOfList(d->cells.end());
for (Iterator it = d->cells.begin(); it != endOfList; ++it)
{
Element *element = *it;
- if (element->rect() == QRect(point,point))
+ if (element->rect() == TQRect(point,point))
{
delete element;
d->cells.remove(element);
@@ -293,7 +293,7 @@ void Region::sub(const QPoint& point)
}
}
-void Region::sub(const QRect& range)
+void Region::sub(const TQRect& range)
{
// TODO Stefan: Improve!
Iterator endOfList(d->cells.end());
@@ -327,7 +327,7 @@ void Region::sub(const Region& region)
}
}
-Region::Element* Region::eor(const QPoint& point, Sheet* sheet)
+Region::Element* Region::eor(const TQPoint& point, Sheet* sheet)
{
bool containsPoint = false;
@@ -335,7 +335,7 @@ Region::Element* Region::eor(const QPoint& point, Sheet* sheet)
Iterator endOfList = cells().end();
while (it != endOfList)
{
- if (!(*it)->contains(point))
+ if (!(*it)->tqcontains(point))
{
++it;
continue;
@@ -343,7 +343,7 @@ Region::Element* Region::eor(const QPoint& point, Sheet* sheet)
containsPoint = true;
int x = point.x();
int y = point.y();
- QRect fullRange = (*it)->rect().normalize();
+ TQRect fullRange = (*it)->rect().normalize();
delete *it;
it = cells().remove(it);
@@ -354,34 +354,34 @@ Region::Element* Region::eor(const QPoint& point, Sheet* sheet)
int height = y - top;
if (height > 0)
{
- insert(it, QRect(left, top, width, height), sheet);
+ insert(it, TQRect(left, top, width, height), sheet);
}
// left range
left = fullRange.left();
top = y;
- width = QMAX(0, x - left);
+ width = TQMAX(0, x - left);
height = 1;
if (width > 0)
{
- insert(it, QRect(left, top, width, height), sheet);
+ insert(it, TQRect(left, top, width, height), sheet);
}
// right range
- left = QMIN(x+1, fullRange.right());
+ left = TQMIN(x+1, fullRange.right());
top = y;
- width = QMAX(0, fullRange.right() - x);
+ width = TQMAX(0, fullRange.right() - x);
height = 1;
if (width > 0)
{
- insert(it, QRect(left, top, width, height), sheet);
+ insert(it, TQRect(left, top, width, height), sheet);
}
// bottom range
left = fullRange.left();
top = y+1;
width = fullRange.width();
- height = QMAX(0, fullRange.bottom() - y);
+ height = TQMAX(0, fullRange.bottom() - y);
if (height > 0)
{
- insert(it, QRect(left, top, width, height), sheet);
+ insert(it, TQRect(left, top, width, height), sheet);
}
return *it;
}
@@ -393,7 +393,7 @@ Region::Element* Region::eor(const QPoint& point, Sheet* sheet)
return 0;
}
-Region::Iterator Region::insert(Region::Iterator pos, const QPoint& point, Sheet* sheet, bool multi)
+Region::Iterator Region::insert(Region::Iterator pos, const TQPoint& point, Sheet* sheet, bool multi)
{
if (point.x() < 1 || point.y() < 1)
{
@@ -402,7 +402,7 @@ Region::Iterator Region::insert(Region::Iterator pos, const QPoint& point, Sheet
bool containsPoint = false;
// bool adjacentPoint = false;
-// QRect neighbour;
+// TQRect neighbour;
// we don't have to check for occurences?
if (multi)
@@ -420,7 +420,7 @@ Region::Iterator Region::insert(Region::Iterator pos, const QPoint& point, Sheet
{
continue;
}
- if (element->contains(point))
+ if (element->tqcontains(point))
{
containsPoint = true;
break;
@@ -428,9 +428,9 @@ Region::Iterator Region::insert(Region::Iterator pos, const QPoint& point, Sheet
/* else
{
neighbour = element->rect().normalize();
- neighbour.setTopLeft(neighbour.topLeft() - QPoint(1,1));
- neighbour.setBottomRight(neighbour.bottomRight() + QPoint(1,1));
- if (neighbour.contains(point))
+ neighbour.setTopLeft(neighbour.topLeft() - TQPoint(1,1));
+ neighbour.setBottomRight(neighbour.bottomRight() + TQPoint(1,1));
+ if (neighbour.tqcontains(point))
{
adjacentPoint = true; // TODO Stefan: Implement!
break;
@@ -446,9 +446,9 @@ Region::Iterator Region::insert(Region::Iterator pos, const QPoint& point, Sheet
return pos;
}
-Region::Iterator Region::insert(Region::Iterator pos, const QRect& range, Sheet* sheet, bool multi)
+Region::Iterator Region::insert(Region::Iterator pos, const TQRect& range, Sheet* sheet, bool multi)
{
- if (range.size() == QSize(1,1))
+ if (range.size() == TQSize(1,1))
{
return insert(pos, range.topLeft(), sheet);
}
@@ -471,11 +471,11 @@ Region::Iterator Region::insert(Region::Iterator pos, const QRect& range, Sheet*
++it;
continue;
}
- if ((*it)->contains(range))
+ if ((*it)->tqcontains(range))
{
containsRange = true;
}
- else if (range.contains((*it)->rect()))
+ else if (range.tqcontains((*it)->rect()))
{
delete *it;
it = d->cells.remove(it);
@@ -498,7 +498,7 @@ bool Region::isColumnAffected(uint col) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- QRect normalizedRegion = element->rect().normalize();
+ TQRect normalizedRegion = element->rect().normalize();
if ((int)col >= normalizedRegion.left() && (int)col <= normalizedRegion.right())
{
return true;
@@ -513,7 +513,7 @@ bool Region::isRowAffected(uint row) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- QRect normalizedRegion = element->rect().normalize();
+ TQRect normalizedRegion = element->rect().normalize();
if ((int)row >= normalizedRegion.top() && (int)row <= normalizedRegion.bottom())
{
return true;
@@ -528,7 +528,7 @@ bool Region::isColumnSelected(uint col) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- QRect region = element->rect().normalize();
+ TQRect region = element->rect().normalize();
if ((col == 0 || ((int)col >= region.left() && (int)col <= region.right())) &&
region.top() == 1 && region.bottom() == KS_rowMax)
{
@@ -544,7 +544,7 @@ bool Region::isRowSelected(uint row) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- QRect region = element->rect().normalize();
+ TQRect region = element->rect().normalize();
if ((row == 0 || ((int)row >= region.top() && (int)row <= region.bottom())) &&
region.left() == 1 && region.right() == KS_colMax)
{
@@ -560,7 +560,7 @@ bool Region::isColumnOrRowSelected() const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- QRect region = element->rect().normalize();
+ TQRect region = element->rect().normalize();
if ((region.top() == 1 && region.bottom() == KS_rowMax) ||
(region.left() == 1 && region.right() == KS_colMax))
{
@@ -570,7 +570,7 @@ bool Region::isColumnOrRowSelected() const
return false;
}
-bool Region::contains(const QPoint& point, Sheet* sheet) const
+bool Region::tqcontains(const TQPoint& point, Sheet* sheet) const
{
if (d->cells.isEmpty())
{
@@ -580,7 +580,7 @@ bool Region::contains(const QPoint& point, Sheet* sheet) const
for (ConstIterator it = d->cells.constBegin(); it != endOfList; ++it)
{
Element *element = *it;
- if (element->contains(point))
+ if (element->tqcontains(point))
{
if (sheet && element->sheet() != sheet)
{
@@ -606,7 +606,7 @@ void Region::clear()
}
}
-QRect Region::boundingRect() const
+TQRect Region::boundingRect() const
{
int left = KS_colMax;
int right = 1;
@@ -615,7 +615,7 @@ QRect Region::boundingRect() const
Region::ConstIterator endOfList = cells().constEnd();
for (Region::ConstIterator it = cells().constBegin(); it != endOfList; ++it)
{
- QRect range = (*it)->rect().normalize();
+ TQRect range = (*it)->rect().normalize();
if (range.left() < left)
{
left = range.left();
@@ -633,7 +633,7 @@ QRect Region::boundingRect() const
bottom = range.bottom();
}
}
- return QRect(left, top, right-left+1, bottom-top+1);
+ return TQRect(left, top, right-left+1, bottom-top+1);
}
Region::ConstIterator Region::constBegin() const
@@ -646,7 +646,7 @@ Region::ConstIterator Region::constEnd() const
return d->cells.constEnd();
}
-QValueList<Region::Element*>& Region::cells() const
+TQValueList<Region::Element*>& Region::cells() const
{
return d->cells;
}
@@ -688,13 +688,13 @@ void Region::operator=(const Region& other)
}
}
-Sheet* Region::filterSheetName(QString& sRegion)
+Sheet* Region::filterSheetName(TQString& sRegion)
{
Sheet* sheet = 0;
- int delimiterPos = sRegion.find( '!' );
+ int delimiterPos = sRegion.tqfind( '!' );
if (delimiterPos > -1)
{
- QString sheetName = sRegion.left(delimiterPos);
+ TQString sheetName = sRegion.left(delimiterPos);
// remove the '!'
sRegion = sRegion.right(sRegion.length() - delimiterPos - 1);
sheet = d->view->doc()->map()->findSheet(sheetName);
@@ -707,12 +707,12 @@ Sheet* Region::filterSheetName(QString& sRegion)
return sheet;
}
-Region::Point* Region::createPoint(const QPoint& point) const
+Region::Point* Region::createPoint(const TQPoint& point) const
{
return new Point(point);
}
-Region::Point* Region::createPoint(const QString& string) const
+Region::Point* Region::createPoint(const TQString& string) const
{
return new Point(string);
}
@@ -722,12 +722,12 @@ Region::Point* Region::createPoint(const Point& point) const
return new Point(point);
}
-Region::Range* Region::createRange(const QRect& rect) const
+Region::Range* Region::createRange(const TQRect& rect) const
{
return new Range(rect);
}
-Region::Range* Region::createRange(const QString& string) const
+Region::Range* Region::createRange(const TQString& string) const
{
return new Range(string);
}
@@ -755,13 +755,13 @@ Region::Element::~Element()
class Point
****************************************************************************/
-Region::Point::Point(const QPoint& point)
+Region::Point::Point(const TQPoint& point)
: Region::Element(),
m_point(point)
{
}
-Region::Point::Point(const QString& sCell)
+Region::Point::Point(const TQString& sCell)
: Region::Element(),
m_point()
{
@@ -773,7 +773,7 @@ Region::Point::Point(const QString& sCell)
return;
}
- QString string = sCell;//Region::filterSheetName(sCell);
+ TQString string = sCell;//Region::filterSheetName(sCell);
uint p = 0;
@@ -801,7 +801,7 @@ Region::Point::Point(const QString& sCell)
//default is error
int x = -1;
//search for the first character != text
- int result = string.find( QRegExp("[^A-Za-z]+"), p );
+ int result = string.tqfind( TQRegExp("[^A-Za-z]+"), p );
//get the colomn number for the character between actual position and the first non text charakter
if ( result != -1 )
@@ -843,7 +843,7 @@ Region::Point::Point(const QString& sCell)
uint p2 = p;
while ( p < length )
{
- if (!QChar(string[p++]).isDigit())
+ if (!TQChar(string[p++]).isDigit())
{
kdDebug(36001) << "Region::Point::init: no number" << endl;
return;
@@ -868,16 +868,16 @@ Region::Point::Point(const QString& sCell)
return;
}
- m_point = QPoint(x, y);
+ m_point = TQPoint(x, y);
}
Region::Point::~Point()
{
}
-QString Region::Point::name(Sheet* originSheet) const
+TQString Region::Point::name(Sheet* originSheet) const
{
- QString name = "";
+ TQString name = "";
if (m_sheet && m_sheet != originSheet)
{
name = m_sheet->sheetName() + "!";
@@ -885,12 +885,12 @@ QString Region::Point::name(Sheet* originSheet) const
return name + Cell::name(m_point.x(), m_point.y());
}
-bool Region::Point::contains(const QPoint& point) const
+bool Region::Point::tqcontains(const TQPoint& point) const
{
return (m_point == point);
}
-bool Region::Point::contains(const QRect& range) const
+bool Region::Point::tqcontains(const TQRect& range) const
{
return (range.width() == 1) && (range.height() == 1) && (range.topLeft() == m_point);
}
@@ -900,17 +900,17 @@ bool Region::Point::contains(const QRect& range) const
class Range
****************************************************************************/
-Region::Range::Range(const QRect& rect)
+Region::Range::Range(const TQRect& rect)
: Region::Element(),
m_range(rect)
{
}
-Region::Range::Range(const QString& sRange)
+Region::Range::Range(const TQString& sRange)
: Region::Element(),
m_range()
{
- int delimiterPos = sRange.find(':');
+ int delimiterPos = sRange.tqfind(':');
if (delimiterPos == -1)
{
return;
@@ -925,16 +925,16 @@ Region::Range::Range(const QString& sRange)
{
return;
}
- m_range = QRect(ul.pos(), lr.pos());
+ m_range = TQRect(ul.pos(), lr.pos());
}
Region::Range::~Range()
{
}
-QString Region::Range::name(Sheet* originSheet) const
+TQString Region::Range::name(Sheet* originSheet) const
{
- QString name = "";
+ TQString name = "";
if (m_sheet && m_sheet != originSheet)
{
name = m_sheet->sheetName() + "!";
@@ -943,14 +943,14 @@ QString Region::Range::name(Sheet* originSheet) const
Cell::name(m_range.right(), m_range.bottom() );
}
-bool Region::Range::contains(const QPoint& point) const
+bool Region::Range::tqcontains(const TQPoint& point) const
{
- return m_range.normalize().contains(point);
+ return m_range.normalize().tqcontains(point);
}
-bool Region::Range::contains(const QRect& range) const
+bool Region::Range::tqcontains(const TQRect& range) const
{
- return m_range.normalize().contains(range.normalize());
+ return m_range.normalize().tqcontains(range.normalize());
}
} // namespace KSpread
diff --git a/kspread/region.h b/kspread/region.h
index 43d20dad..2459dc8e 100644
--- a/kspread/region.h
+++ b/kspread/region.h
@@ -20,9 +20,9 @@
#ifndef KSPREAD_REGION
#define KSPREAD_REGION
-#include <qrect.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqrect.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
#include <kdebug.h>
@@ -60,7 +60,7 @@ public:
* @param point the point's location
* @param sheet the sheet the point belongs to
*/
- Region(const QPoint& point, Sheet* sheet = 0);
+ Region(const TQPoint& point, Sheet* sheet = 0);
/**
* Constructor.
@@ -68,7 +68,7 @@ public:
* @param range the range's location
* @param sheet the sheet the range belongs to
*/
- Region(const QRect& range, Sheet* sheet = 0);
+ Region(const TQRect& range, Sheet* sheet = 0);
/**
* Constructor.
@@ -77,7 +77,7 @@ public:
* @param strRegion a string representing the region (e.g. "A1:B3")
* @param sheet the sheet the region belongs to
*/
- Region(View* view, const QString& strRegion, Sheet* sheet = 0);
+ Region(View* view, const TQString& strRegion, Sheet* sheet = 0);
/**
* Copy Constructor.
@@ -117,14 +117,14 @@ public:
* @param originSheet The name is created relative to this sheet.
* @return the name of the region (e.g. "A1:A2")
*/
- QString name(Sheet* originSheet = 0) const;
+ TQString name(Sheet* originSheet = 0) const;
/**
* @param sRegion will be modified, if a valid sheet was found. The sheetname
* will be removed
* @return sheet named in the @p sRegion or the active sheet of the view
*/
- Sheet* filterSheetName(QString& sRegion);
+ Sheet* filterSheetName(TQString& sRegion);
@@ -184,7 +184,7 @@ public:
* @param sheet the sheet the point belongs to
* @return @c true, if the region contains the point @p point
*/
- bool contains(const QPoint& point, Sheet* sheet = 0) const;
+ bool tqcontains(const TQPoint& point, Sheet* sheet = 0) const;
@@ -194,13 +194,13 @@ public:
* @param point the point's location
* @param sheet the sheet the point belongs to
*/
- Element* add(const QPoint& point, Sheet* sheet = 0);
+ Element* add(const TQPoint& point, Sheet* sheet = 0);
/**
* Adds the range @p range to this region.
* @param range the range's location
* @param sheet the sheet the range belongs to
*/
- Element* add(const QRect& range, Sheet* sheet = 0);
+ Element* add(const TQRect& range, Sheet* sheet = 0);
/**
* Adds the region @p region to this region.
* @param region the range's location
@@ -212,12 +212,12 @@ public:
* Substracts the point @p point from this region.
* @param point the point's location
*/
- void sub(const QPoint& point);
+ void sub(const TQPoint& point);
/**
* Substracts the range @p range from this region.
* @param range the range's location
*/
- void sub(const QRect& range);
+ void sub(const TQRect& range);
/**
* Substracts the region @p region from this region.
* @param region the region to substract
@@ -228,7 +228,7 @@ public:
* @param point the point's location
* @param sheet the sheet the point belongs to
*/
- virtual Element* eor(const QPoint& point, Sheet* sheet = 0);
+ virtual Element* eor(const TQPoint& point, Sheet* sheet = 0);
/**
* Deletes all elements of the region. The result is an empty region.
@@ -237,7 +237,7 @@ public:
- QRect boundingRect() const;
+ TQRect boundingRect() const;
@@ -265,8 +265,8 @@ public:
void setView(View*);
- typedef QValueList<Element*>::Iterator Iterator;
- typedef QValueList<Element*>::ConstIterator ConstIterator;
+ typedef TQValueList<Element*>::Iterator Iterator;
+ typedef TQValueList<Element*>::ConstIterator ConstIterator;
ConstIterator constBegin() const;
ConstIterator constEnd() const;
@@ -275,7 +275,7 @@ protected:
/**
* @return the list of elements
*/
- QValueList<Element*>& cells() const;
+ TQValueList<Element*>& cells() const;
/**
* @param iterator the iterator to the element in whose front the new point
@@ -285,7 +285,7 @@ protected:
* @return an iterator to the added point or @p iterator, if @p point is not
* valid or the point is already in the list
*/
- Iterator insert(Iterator iterator, const QPoint& point, Sheet*, bool multi = true);
+ Iterator insert(Iterator iterator, const TQPoint& point, Sheet*, bool multi = true);
/**
* @param iterator the iterator to the element in whose front the new range
* is inserted
@@ -294,13 +294,13 @@ protected:
* @return an iterator to the added range or @p iterator, if @p range is not
* valid or the range is already in the list
*/
- Iterator insert(Iterator iterator, const QRect& range, Sheet*, bool multi = true);
+ Iterator insert(Iterator iterator, const TQRect& range, Sheet*, bool multi = true);
- virtual Point* createPoint(const QPoint&) const;
- virtual Point* createPoint(const QString&) const;
+ virtual Point* createPoint(const TQPoint&) const;
+ virtual Point* createPoint(const TQString&) const;
virtual Point* createPoint(const Point&) const;
- virtual Range* createRange(const QRect&) const;
- virtual Range* createRange(const QString&) const;
+ virtual Range* createRange(const TQRect&) const;
+ virtual Range* createRange(const TQString&) const;
virtual Range* createRange(const Range&) const;
private:
@@ -334,19 +334,19 @@ public:
virtual bool isColumn() const { return false; }
virtual bool isRow() const { return false; }
- virtual bool contains(const QPoint&) const { return false; }
- virtual bool contains(const QRect&) const { return false; }
+ virtual bool tqcontains(const TQPoint&) const { return false; }
+ virtual bool tqcontains(const TQRect&) const { return false; }
- virtual QString name(Sheet* = 0) const { return QString(""); }
- virtual QRect rect() const { return QRect(); }
- virtual const QColor& color() const { return Qt::black; }
+ virtual TQString name(Sheet* = 0) const { return TQString(""); }
+ virtual TQRect rect() const { return TQRect(); }
+ virtual const TQColor& color() const { return TQt::black; }
Sheet* sheet() const { return m_sheet; }
void setSheet(Sheet* sheet) { m_sheet = sheet; }
protected:
/* TODO Stefan #6:
- Elaborate, if this pointer could be avoided by QDict or whatever in
+ Elaborate, if this pointer could be avoided by TQDict or whatever in
Region.
*/
Sheet* m_sheet;
@@ -370,8 +370,8 @@ protected:
class Region::Point : public Region::Element
{
public:
- Point(const QPoint&);
- Point(const QString&);
+ Point(const TQPoint&);
+ Point(const TQString&);
virtual ~Point();
virtual Type type() const { return Element::Point; }
@@ -379,17 +379,17 @@ public:
virtual bool isColumn() const { return false; }
virtual bool isRow() const { return false; }
- virtual bool contains(const QPoint&) const;
- virtual bool contains(const QRect&) const;
+ virtual bool tqcontains(const TQPoint&) const;
+ virtual bool tqcontains(const TQRect&) const;
- virtual QString name(Sheet* originSheet = 0) const;
+ virtual TQString name(Sheet* originSheet = 0) const;
- virtual QRect rect() const { return QRect(m_point,m_point); }
+ virtual TQRect rect() const { return TQRect(m_point,m_point); }
- QPoint pos() const { return m_point; }
+ TQPoint pos() const { return m_point; }
private:
- QPoint m_point;
+ TQPoint m_point;
};
@@ -410,8 +410,8 @@ private:
class Region::Range : public Region::Element
{
public:
- Range(const QRect&);
- Range(const QString&);
+ Range(const TQRect&);
+ Range(const TQString&);
virtual ~Range();
virtual Type type() const { return Element::Range; }
@@ -419,18 +419,18 @@ public:
virtual bool isColumn() const { return (m_range.normalize().top() == 1 && m_range.normalize().bottom() == KS_rowMax); }
virtual bool isRow() const { return (m_range.normalize().left() == 1 && m_range.normalize().right() == KS_colMax); }
- virtual bool contains(const QPoint&) const;
- virtual bool contains(const QRect&) const;
+ virtual bool tqcontains(const TQPoint&) const;
+ virtual bool tqcontains(const TQRect&) const;
- virtual QString name(Sheet* originSheet = 0) const;
+ virtual TQString name(Sheet* originSheet = 0) const;
- virtual QRect rect() const { return m_range; }
+ virtual TQRect rect() const { return m_range; }
int width() const;
int height() const;
private:
- QRect m_range;
+ TQRect m_range;
};
} // namespace KSpread
diff --git a/kspread/selection.cc b/kspread/selection.cc
index 177cbafc..3a0346b6 100644
--- a/kspread/selection.cc
+++ b/kspread/selection.cc
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
@@ -48,18 +48,18 @@ public:
{
view = v;
sheet = 0;
- anchor = QPoint(1,1);
- cursor = QPoint(1,1);
- marker = QPoint(1,1);
-
- colors.push_back(Qt::red);
- colors.push_back(Qt::blue);
- colors.push_back(Qt::magenta);
- colors.push_back(Qt::darkRed);
- colors.push_back(Qt::darkGreen);
- colors.push_back(Qt::darkMagenta);
- colors.push_back(Qt::darkCyan);
- colors.push_back(Qt::darkYellow);
+ anchor = TQPoint(1,1);
+ cursor = TQPoint(1,1);
+ marker = TQPoint(1,1);
+
+ colors.push_back(TQt::red);
+ colors.push_back(TQt::blue);
+ colors.push_back(TQt::magenta);
+ colors.push_back(TQt::darkRed);
+ colors.push_back(TQt::darkGreen);
+ colors.push_back(TQt::darkMagenta);
+ colors.push_back(TQt::darkCyan);
+ colors.push_back(TQt::darkYellow);
multipleSelection = false;
@@ -70,10 +70,10 @@ public:
View* view;
Sheet* sheet;
- QPoint anchor;
- QPoint cursor;
- QPoint marker;
- QValueList<QColor> colors;
+ TQPoint anchor;
+ TQPoint cursor;
+ TQPoint marker;
+ TQValueList<TQColor> colors;
bool multipleSelection : 1;
@@ -88,7 +88,7 @@ public:
namespace KSpread {
Selection::Selection(View *view)
- : QObject(view), Region(1,1)
+ : TQObject(view), Region(1,1)
{
d = new Private(view);
d->activeSubRegionStart = 0;
@@ -96,7 +96,7 @@ Selection::Selection(View *view)
}
Selection::Selection(const Selection& selection)
- : QObject(selection.d->view), Region()
+ : TQObject(selection.d->view), Region()
{
/* kdDebug() << k_funcinfo << endl;*/
d = new Private(selection.d->view);
@@ -110,7 +110,7 @@ Selection::~Selection()
delete d;
}
-void Selection::initialize(const QPoint& point, Sheet* sheet)
+void Selection::initialize(const TQPoint& point, Sheet* sheet)
{
if (!util_isPointValid(point))
return;
@@ -131,14 +131,14 @@ void Selection::initialize(const QPoint& point, Sheet* sheet)
}
Region changedRegion(*this);
- changedRegion.add(extendToMergedAreas(QRect(d->anchor,d->marker)));
+ changedRegion.add(extendToMergedAreas(TQRect(d->anchor,d->marker)));
- QPoint topLeft(point);
+ TQPoint topLeft(point);
Cell* cell = d->view->activeSheet()->cellAt(point);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
d->anchor = topLeft;
@@ -178,9 +178,9 @@ void Selection::initialize(const QPoint& point, Sheet* sheet)
emit changed(changedRegion);
}
-void Selection::initialize(const QRect& range, Sheet* sheet)
+void Selection::initialize(const TQRect& range, Sheet* sheet)
{
- if (!util_isRectValid(range) || ( range == QRect(0,0,1,1) ))
+ if (!util_isRectValid(range) || ( range == TQRect(0,0,1,1) ))
return;
if (!sheet)
@@ -196,22 +196,22 @@ void Selection::initialize(const QRect& range, Sheet* sheet)
}
Region changedRegion(*this);
- changedRegion.add(extendToMergedAreas(QRect(d->anchor,d->marker)));
+ changedRegion.add(extendToMergedAreas(TQRect(d->anchor,d->marker)));
- QPoint topLeft(range.topLeft());
+ TQPoint topLeft(range.topLeft());
Cell* cell = d->view->activeSheet()->cellAt(topLeft);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
- QPoint bottomRight(range.bottomRight());
+ TQPoint bottomRight(range.bottomRight());
cell = d->view->activeSheet()->cellAt(bottomRight);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- bottomRight = QPoint(cell->column(), cell->row());
+ bottomRight = TQPoint(cell->column(), cell->row());
}
d->anchor = topLeft;
@@ -220,7 +220,7 @@ void Selection::initialize(const QRect& range, Sheet* sheet)
fixSubRegionDimension(); // TODO remove this sanity check
Iterator it = cells().begin() += d->activeSubRegionStart + d->activeSubRegionLength;
- if (it != insert(it, QRect(topLeft, bottomRight), sheet/*, true*/))
+ if (it != insert(it, TQRect(topLeft, bottomRight), sheet/*, true*/))
{
// if the range was inserted
clearSubRegion();
@@ -246,7 +246,7 @@ void Selection::initialize(const QRect& range, Sheet* sheet)
{
return;
}
- changedRegion.add(QRect(topLeft, bottomRight), sheet);
+ changedRegion.add(TQRect(topLeft, bottomRight), sheet);
emit changed(changedRegion);
}
@@ -269,7 +269,7 @@ void Selection::initialize(const Region& region, Sheet* sheet)
}
Region changedRegion(*this);
- changedRegion.add(extendToMergedAreas(QRect(d->anchor,d->marker)));
+ changedRegion.add(extendToMergedAreas(TQRect(d->anchor,d->marker)));
// TODO Stefan: handle subregion insertion
// TODO Stefan: handle obscured cells correctly
@@ -286,20 +286,20 @@ void Selection::initialize(const Region& region, Sheet* sheet)
range->setColor(d->colors[cells().size() % d->colors.size()]);
}
- QPoint topLeft(cells().last()->rect().normalize().topLeft());
+ TQPoint topLeft(cells().last()->rect().normalize().topLeft());
Cell* cell = d->view->activeSheet()->cellAt(topLeft);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
- QPoint bottomRight(cells().last()->rect().normalize().bottomRight());
+ TQPoint bottomRight(cells().last()->rect().normalize().bottomRight());
cell = d->view->activeSheet()->cellAt(bottomRight);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- bottomRight = QPoint(cell->column(), cell->row());
+ bottomRight = TQPoint(cell->column(), cell->row());
}
d->anchor = topLeft;
@@ -324,7 +324,7 @@ void Selection::update()
emit changed(*this);
}
-void Selection::update(const QPoint& point)
+void Selection::update(const TQPoint& point)
{
uint count = cells().count();
@@ -348,12 +348,12 @@ void Selection::update(const QPoint& point)
return;
}
- QPoint topLeft(point);
+ TQPoint topLeft(point);
Cell* cell = d->view->activeSheet()->cellAt(point);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
if (topLeft == d->marker)
@@ -361,8 +361,8 @@ void Selection::update(const QPoint& point)
return;
}
- QRect area1 = (*d->activeElement)->rect().normalize();
- QRect newRange = extendToMergedAreas(QRect(d->anchor, topLeft));
+ TQRect area1 = (*d->activeElement)->rect().normalize();
+ TQRect newRange = extendToMergedAreas(TQRect(d->anchor, topLeft));
Element* oldElement = *d->activeElement;
// returns iterator to the next element or end
@@ -381,7 +381,7 @@ void Selection::update(const QPoint& point)
d->activeElement--;
}
- QRect area2 = (*d->activeElement)->rect().normalize();
+ TQRect area2 = (*d->activeElement)->rect().normalize();
Region changedRegion;
bool newLeft = area1.left() != area2.left();
@@ -390,60 +390,60 @@ void Selection::update(const QPoint& point)
bool newBottom = area1.bottom() != area2.bottom();
/* first, calculate some numbers that we'll use a few times */
- int farLeft = QMIN(area1.left(), area2.left());
- int innerLeft = QMAX(area1.left(), area2.left());
+ int farLeft = TQMIN(area1.left(), area2.left());
+ int innerLeft = TQMAX(area1.left(), area2.left());
- int farTop = QMIN(area1.top(), area2.top());
- int innerTop = QMAX(area1.top(), area2.top());
+ int farTop = TQMIN(area1.top(), area2.top());
+ int innerTop = TQMAX(area1.top(), area2.top());
- int farRight = QMAX(area1.right(), area2.right());
- int innerRight = QMIN(area1.right(), area2.right());
+ int farRight = TQMAX(area1.right(), area2.right());
+ int innerRight = TQMIN(area1.right(), area2.right());
- int farBottom = QMAX(area1.bottom(), area2.bottom());
- int innerBottom = QMIN(area1.bottom(), area2.bottom());
+ int farBottom = TQMAX(area1.bottom(), area2.bottom());
+ int innerBottom = TQMIN(area1.bottom(), area2.bottom());
if (newLeft)
{
- changedRegion.add(QRect(QPoint(farLeft, innerTop),
- QPoint(innerLeft-1, innerBottom)));
+ changedRegion.add(TQRect(TQPoint(farLeft, innerTop),
+ TQPoint(innerLeft-1, innerBottom)));
if (newTop)
{
- changedRegion.add(QRect(QPoint(farLeft, farTop),
- QPoint(innerLeft-1, innerTop-1)));
+ changedRegion.add(TQRect(TQPoint(farLeft, farTop),
+ TQPoint(innerLeft-1, innerTop-1)));
}
if (newBottom)
{
- changedRegion.add(QRect(QPoint(farLeft, innerBottom+1),
- QPoint(innerLeft-1, farBottom)));
+ changedRegion.add(TQRect(TQPoint(farLeft, innerBottom+1),
+ TQPoint(innerLeft-1, farBottom)));
}
}
if (newTop)
{
- changedRegion.add(QRect(QPoint(innerLeft, farTop),
- QPoint(innerRight, innerTop-1)));
+ changedRegion.add(TQRect(TQPoint(innerLeft, farTop),
+ TQPoint(innerRight, innerTop-1)));
}
if (newRight)
{
- changedRegion.add(QRect(QPoint(innerRight+1, innerTop),
- QPoint(farRight, innerBottom)));
+ changedRegion.add(TQRect(TQPoint(innerRight+1, innerTop),
+ TQPoint(farRight, innerBottom)));
if (newTop)
{
- changedRegion.add(QRect(QPoint(innerRight+1, farTop),
- QPoint(farRight, innerTop-1)));
+ changedRegion.add(TQRect(TQPoint(innerRight+1, farTop),
+ TQPoint(farRight, innerTop-1)));
}
if (newBottom)
{
- changedRegion.add(QRect(QPoint(innerRight+1, innerBottom+1),
- QPoint(farRight, farBottom)));
+ changedRegion.add(TQRect(TQPoint(innerRight+1, innerBottom+1),
+ TQPoint(farRight, farBottom)));
}
}
if (newBottom)
{
- changedRegion.add(QRect(QPoint(innerLeft, innerBottom+1),
- QPoint(innerRight, farBottom)));
+ changedRegion.add(TQRect(TQPoint(innerLeft, innerBottom+1),
+ TQPoint(innerRight, farBottom)));
}
d->marker = topLeft;
@@ -452,7 +452,7 @@ void Selection::update(const QPoint& point)
emit changed(changedRegion);
}
-void Selection::extend(const QPoint& point, Sheet* sheet)
+void Selection::extend(const TQPoint& point, Sheet* sheet)
{
if (!util_isPointValid(point))
return;
@@ -480,14 +480,14 @@ void Selection::extend(const QPoint& point, Sheet* sheet)
}
}
- Region changedRegion = Region(extendToMergedAreas(QRect(d->marker,d->marker)));
+ Region changedRegion = Region(extendToMergedAreas(TQRect(d->marker,d->marker)));
- QPoint topLeft(point);
+ TQPoint topLeft(point);
Cell* cell = d->view->activeSheet()->cellAt(point);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
uint count = cells().count();
@@ -512,10 +512,10 @@ void Selection::extend(const QPoint& point, Sheet* sheet)
emit changed(changedRegion);
}
-void Selection::extend(const QRect& range, Sheet* sheet)
+void Selection::extend(const TQRect& range, Sheet* sheet)
{
- //See comment in Selection::initialize(const QRect& range, Sheet* sheet)
- if (!util_isRectValid(range) || (range == QRect(0,0,1,1)))
+ //See comment in Selection::initialize(const TQRect& range, Sheet* sheet)
+ if (!util_isRectValid(range) || (range == TQRect(0,0,1,1)))
return;
if (isEmpty())
@@ -541,20 +541,20 @@ void Selection::extend(const QRect& range, Sheet* sheet)
}
}
- QPoint topLeft(range.topLeft());
+ TQPoint topLeft(range.topLeft());
Cell* cell = d->view->activeSheet()->cellAt(topLeft);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- topLeft = QPoint(cell->column(), cell->row());
+ topLeft = TQPoint(cell->column(), cell->row());
}
- QPoint bottomRight(range.bottomRight());
+ TQPoint bottomRight(range.bottomRight());
cell = d->view->activeSheet()->cellAt(bottomRight);
if (cell->isObscured() && cell->isPartOfMerged())
{
cell = cell->obscuringCells().first();
- bottomRight = QPoint(cell->column(), cell->row());
+ bottomRight = TQPoint(cell->column(), cell->row());
}
d->anchor = topLeft;
@@ -565,12 +565,12 @@ void Selection::extend(const QRect& range, Sheet* sheet)
Element* element;
if (d->multipleSelection)
{
- d->activeElement = insert(++d->activeElement, extendToMergedAreas(QRect(topLeft, bottomRight)).normalize(), sheet, false);
+ d->activeElement = insert(++d->activeElement, extendToMergedAreas(TQRect(topLeft, bottomRight)).normalize(), sheet, false);
element = (d->activeElement == cells().end()) ? 0 : *d->activeElement;
}
else
{
- element = add(extendToMergedAreas(QRect(topLeft, bottomRight)).normalize(), sheet);
+ element = add(extendToMergedAreas(TQRect(topLeft, bottomRight)).normalize(), sheet);
d->activeElement = --cells().end();
}
if (element && element->type() == Element::Point)
@@ -616,7 +616,7 @@ void Selection::extend(const Region& region)
emit changed(*this);
}
-Selection::Element* Selection::eor(const QPoint& point, Sheet* sheet)
+Selection::Element* Selection::eor(const TQPoint& point, Sheet* sheet)
{
if (isSingular())
{
@@ -625,17 +625,17 @@ Selection::Element* Selection::eor(const QPoint& point, Sheet* sheet)
return Region::eor(point, sheet);
}
-const QPoint& Selection::anchor() const
+const TQPoint& Selection::anchor() const
{
return d->anchor;
}
-const QPoint& Selection::cursor() const
+const TQPoint& Selection::cursor() const
{
return d->cursor;
}
-const QPoint& Selection::marker() const
+const TQPoint& Selection::marker() const
{
return d->marker;
}
@@ -645,7 +645,7 @@ bool Selection::isSingular() const
return Region::isSingular();
}
-QRect Selection::selectionHandleArea() const
+TQRect Selection::selectionHandleArea() const
{
int column, row;
@@ -667,17 +667,17 @@ QRect Selection::selectionHandleArea() const
double width = cell->dblWidth( column );
double height = cell->dblHeight( row );
- QPoint rightBottom( d->view->doc()->zoomItX( xpos + width ),
+ TQPoint rightBottom( d->view->doc()->zoomItX( xpos + width ),
d->view->doc()->zoomItY( ypos + height ) );
- QRect handle( ( rightBottom.x() - 2 ),
+ TQRect handle( ( rightBottom.x() - 2 ),
( rightBottom.y() - 2 ),
( 5 ),
( 5 ) );
return handle;
}
-QString Selection::name(Sheet* sheet) const
+TQString Selection::name(Sheet* sheet) const
{
return Region::name(sheet ? sheet : d->sheet);
}
@@ -692,13 +692,13 @@ Sheet* Selection::sheet() const
return d->sheet;
}
-void Selection::setActiveElement(const QPoint& point)
+void Selection::setActiveElement(const TQPoint& point)
{
uint counter = 0;
Iterator end = cells().end();
for (Iterator it = cells().begin(); it != end; ++it)
{
- QRect range = (*it)->rect();
+ TQRect range = (*it)->rect();
if (range.topLeft() == point || range.bottomRight() == point)
{
d->anchor = range.topLeft();
@@ -726,7 +726,7 @@ void Selection::setActiveElement(uint pos)
}
Iterator it = cells().begin() += pos;
- QRect range = (*it)->rect();
+ TQRect range = (*it)->rect();
d->anchor = range.topLeft();
d->cursor = range.bottomRight();
d->marker = range.bottomRight();
@@ -796,13 +796,13 @@ void Selection::setActiveSubRegion(uint start, uint length)
d->activeElement = cells().begin() += d->activeSubRegionStart;
}
-QString Selection::activeSubRegionName() const
+TQString Selection::activeSubRegionName() const
{
// kdDebug() << k_funcinfo << endl;
// kdDebug() << *this << endl;
// kdDebug() << "start = " << d->activeSubRegionStart << ", len = " << d->activeSubRegionLength << endl;
- QStringList names;
+ TQStringList names;
Iterator it = cells().begin();
it += d->activeSubRegionStart;
Iterator end = it;
@@ -820,24 +820,24 @@ void Selection::setMultipleSelection(bool state)
d->multipleSelection = state;
}
-const QValueList<QColor>& Selection::colors() const
+const TQValueList<TQColor>& Selection::colors() const
{
return d->colors;
}
-QRect Selection::lastRange(bool extend) const
+TQRect Selection::lastRange(bool extend) const
{
- QRect selection = QRect(d->anchor, d->marker).normalize();
+ TQRect selection = TQRect(d->anchor, d->marker).normalize();
return extend ? extendToMergedAreas(selection) : selection;
}
-QRect Selection::selection(bool extend) const
+TQRect Selection::selection(bool extend) const
{
- QRect selection = QRect(d->anchor, d->marker).normalize();
+ TQRect selection = TQRect(d->anchor, d->marker).normalize();
return extend ? extendToMergedAreas(selection) : selection;
}
-QRect Selection::extendToMergedAreas(QRect area) const
+TQRect Selection::extendToMergedAreas(TQRect area) const
{
if (!d->view->activeSheet())
return area;
@@ -873,16 +873,16 @@ QRect Selection::extendToMergedAreas(QRect area) const
cell = d->view->activeSheet()->cellAt( x, y );
if( cell->doesMergeCells())
{
- right=QMAX(right,cell->mergedXCells()+x);
- bottom=QMAX(bottom,cell->mergedYCells()+y);
+ right=TQMAX(right,cell->mergedXCells()+x);
+ bottom=TQMAX(bottom,cell->mergedYCells()+y);
}
else if ( cell->isObscured() && cell->isPartOfMerged() )
{
cell = cell->obscuringCells().first();
- left=QMIN(left,cell->column());
- top=QMIN(top,cell->row());
- bottom=QMAX(bottom,cell->row() + cell->mergedYCells());
- right=QMAX(right,cell->column() + cell->mergedXCells());
+ left=TQMIN(left,cell->column());
+ top=TQMIN(top,cell->row());
+ bottom=TQMAX(bottom,cell->row() + cell->mergedYCells());
+ right=TQMAX(right,cell->column() + cell->mergedXCells());
}
}
@@ -891,12 +891,12 @@ QRect Selection::extendToMergedAreas(QRect area) const
return area;
}
-Selection::Region::Point* Selection::createPoint(const QPoint& point) const
+Selection::Region::Point* Selection::createPoint(const TQPoint& point) const
{
return new Point(point);
}
-Selection::Region::Point* Selection::createPoint(const QString& string) const
+Selection::Region::Point* Selection::createPoint(const TQString& string) const
{
return new Point(string);
}
@@ -906,12 +906,12 @@ Selection::Region::Point* Selection::createPoint(const Point& point) const
return new Point(point);
}
-Selection::Region::Range* Selection::createRange(const QRect& rect) const
+Selection::Region::Range* Selection::createRange(const TQRect& rect) const
{
return new Range(rect);
}
-Selection::Region::Range* Selection::createRange(const QString& string) const
+Selection::Region::Range* Selection::createRange(const TQString& string) const
{
return new Range(string);
}
@@ -925,17 +925,17 @@ Selection::Region::Range* Selection::createRange(const Range& range) const
class Point
****************************************************************************/
-Selection::Point::Point(const QPoint& point)
+Selection::Point::Point(const TQPoint& point)
: Region::Point(point),
- m_color(Qt::black),
+ m_color(TQt::black),
m_columnFixed(false),
m_rowFixed(false)
{
}
-Selection::Point::Point(const QString& string)
+Selection::Point::Point(const TQString& string)
: Region::Point(string),
- m_color(Qt::black),
+ m_color(TQt::black),
m_columnFixed(false),
m_rowFixed(false)
{
@@ -952,7 +952,7 @@ Selection::Point::Point(const QString& string)
}
//search for the first character != text
- int result = string.find( QRegExp("[^A-Za-z]+"), p );
+ int result = string.tqfind( TQRegExp("[^A-Za-z]+"), p );
if (string[result] == '$')
{
m_rowFixed = true;
@@ -963,9 +963,9 @@ Selection::Point::Point(const QString& string)
class Range
****************************************************************************/
-Selection::Range::Range(const QRect& range)
+Selection::Range::Range(const TQRect& range)
: Region::Range(range),
- m_color(Qt::black),
+ m_color(TQt::black),
m_leftFixed(false),
m_rightFixed(false),
m_topFixed(false),
@@ -973,9 +973,9 @@ Selection::Range::Range(const QRect& range)
{
}
-Selection::Range::Range(const QString& string)
+Selection::Range::Range(const TQString& string)
: Region::Range(string),
- m_color(Qt::black),
+ m_color(TQt::black),
m_leftFixed(false),
m_rightFixed(false),
m_topFixed(false),
@@ -986,7 +986,7 @@ Selection::Range::Range(const QString& string)
return;
}
- int delimiterPos = string.find(':');
+ int delimiterPos = string.tqfind(':');
if (delimiterPos == -1)
{
return;
diff --git a/kspread/selection.h b/kspread/selection.h
index 54e661b2..02989009 100644
--- a/kspread/selection.h
+++ b/kspread/selection.h
@@ -21,7 +21,7 @@
#ifndef KSPREAD_SELECTION
#define KSPREAD_SELECTION
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
@@ -31,9 +31,10 @@ namespace KSpread
{
class View;
-class Selection : public QObject, public Region
+class Selection : public TQObject, public Region
{
Q_OBJECT
+ TQ_OBJECT
public:
Selection(View*);
Selection(const Selection&);
@@ -42,11 +43,11 @@ public:
/**
* Sets the selection to the given point
*/
- void initialize(const QPoint&, Sheet* sheet = 0);
+ void initialize(const TQPoint&, Sheet* sheet = 0);
/**
* Sets the selection to the given range
*/
- void initialize(const QRect&, Sheet* sheet = 0);
+ void initialize(const TQRect&, Sheet* sheet = 0);
/**
* Sets the selection to the given region
*/
@@ -59,16 +60,16 @@ public:
/**
* Uses the anchor as starting point
*/
- void update(const QPoint&);
+ void update(const TQPoint&);
/**
* Extends the current selection with an additional point
*/
- void extend(const QPoint&, Sheet* sheet = 0);
+ void extend(const TQPoint&, Sheet* sheet = 0);
/**
* Extends the current selection with an additional range
*/
- void extend(const QRect&, Sheet* sheet = 0);
+ void extend(const TQRect&, Sheet* sheet = 0);
/**
* Extends the current selection with an additional region
*/
@@ -78,20 +79,20 @@ public:
* @param point the point's location
* @param sheet the sheet the point belongs to
*/
- virtual Element* eor(const QPoint& point, Sheet* sheet = 0);
+ virtual Element* eor(const TQPoint& point, Sheet* sheet = 0);
/**
* The anchor is the starting point of a range. For points marker and anchor are the same
*/
- const QPoint& anchor() const;
+ const TQPoint& anchor() const;
/**
* The cursor represents the cursor position. This needed for obscured cells
*/
- const QPoint& cursor() const;
+ const TQPoint& cursor() const;
/**
* The marker is the end point of a range. For points marker and anchor are the same
*/
- const QPoint& marker() const;
+ const TQPoint& marker() const;
/**
* Checks wether the region consists only of one point
@@ -100,12 +101,12 @@ public:
/**
* @return the area that the 'handle' of the selection is located in painting coordinates
*/
- QRect selectionHandleArea() const;
+ TQRect selectionHandleArea() const;
/**
* @return the name of the region (e.g. "A1:A2")
*/
- QString name(Sheet* originSheet = 0) const;
+ TQString name(Sheet* originSheet = 0) const;
/**
* Sets the selection's origin sheet.
@@ -120,7 +121,7 @@ public:
/**
* Sets the element, which has @p point as anchor, as active
*/
- void setActiveElement(const QPoint& point);
+ void setActiveElement(const TQPoint& point);
/**
* Sets the @p number 'th element as active
*/
@@ -137,7 +138,7 @@ public:
/**
*
*/
- QString activeSubRegionName() const;
+ TQString activeSubRegionName() const;
/**
* Clears the elements of the subregion
*/
@@ -157,13 +158,13 @@ public:
*/
void setMultipleSelection(bool state);
- QRect lastRange(bool extend = true) const;
- QRect extendToMergedAreas(QRect area) const;
+ TQRect lastRange(bool extend = true) const;
+ TQRect extendToMergedAreas(TQRect area) const;
- const QValueList<QColor>& colors() const;
+ const TQValueList<TQColor>& colors() const;
// TODO Stefan #2: replace this
- QRect selection(bool extend = true) const;
+ TQRect selection(bool extend = true) const;
signals:
void changed(const Region&);
@@ -172,11 +173,11 @@ protected:
class Point;
class Range;
- virtual Region::Point* createPoint(const QPoint&) const;
- virtual Region::Point* createPoint(const QString&) const;
+ virtual Region::Point* createPoint(const TQPoint&) const;
+ virtual Region::Point* createPoint(const TQString&) const;
virtual Region::Point* createPoint(const Point&) const;
- virtual Region::Range* createRange(const QRect&) const;
- virtual Region::Range* createRange(const QString&) const;
+ virtual Region::Range* createRange(const TQRect&) const;
+ virtual Region::Range* createRange(const TQString&) const;
virtual Region::Range* createRange(const Range&) const;
private:
@@ -191,11 +192,11 @@ private:
class Selection::Point : public Region::Point
{
public:
- Point(const QPoint& point);
- Point(const QString& string);
+ Point(const TQPoint& point);
+ Point(const TQString& string);
- void setColor(const QColor& color) { m_color = color; }
- virtual const QColor& color() const { return m_color; }
+ void setColor(const TQColor& color) { m_color = color; }
+ virtual const TQColor& color() const { return m_color; }
bool columnFixed() const { return m_columnFixed; }
bool rowFixed() const { return m_rowFixed; }
@@ -203,7 +204,7 @@ public:
protected:
private:
- QColor m_color;
+ TQColor m_color;
bool m_columnFixed : 1;
bool m_rowFixed : 1;
};
@@ -215,18 +216,18 @@ private:
class Selection::Range : public Region::Range
{
public:
- Range(const QRect& rect);
- Range(const QString& string);
+ Range(const TQRect& rect);
+ Range(const TQString& string);
virtual bool isColorizable() const { return true; }
- void setColor(const QColor& color) { m_color = color; }
- const QColor& color() const { return m_color; }
+ void setColor(const TQColor& color) { m_color = color; }
+ const TQColor& color() const { return m_color; }
protected:
private:
- QColor m_color;
+ TQColor m_color;
bool m_leftFixed : 1;
bool m_rightFixed : 1;
bool m_topFixed : 1;
diff --git a/kspread/templates/Business/BalanceSheet.kst b/kspread/templates/Business/BalanceSheet.kst
index b0cc5374..d6422024 100644
--- a/kspread/templates/Business/BalanceSheet.kst
+++ b/kspread/templates/Business/BalanceSheet.kst
@@ -38,17 +38,17 @@
<printrepeatcolumns right="0" left="0" />
<printrepeatrows bottom="0" top="0" />
<cell row="20" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="20" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="20" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -67,22 +67,22 @@
<result outStr="0" dataType="Num" >0</result>
</cell>
<cell row="20" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="19" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="19" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="19" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -101,22 +101,22 @@
<result outStr="0" dataType="Num" >0</result>
</cell>
<cell row="19" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="18" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="18" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="18" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -135,150 +135,150 @@
<result outStr="0" dataType="Num" >0</result>
</cell>
<cell row="18" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="17" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="17" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="17" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="17" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="17" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="6" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="6" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="6" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="6" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="6" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="5" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="5" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="5" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="4" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="4" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="3" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="2" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="2" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="2" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="2" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="2" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="1" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="1" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="1" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="20" column="2" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<font size="11" family="Arial" weight="50" />
</format>
<text outStr="Current Balance" dataType="Str" >Current Balance</text>
</cell>
<cell row="19" column="2" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<font size="11" family="Arial" weight="50" />
</format>
<text outStr="Payables" dataType="Str" >Payables</text>
</cell>
<cell row="18" column="2" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<font size="11" family="Arial" weight="50" />
</format>
<text outStr="Receivable" dataType="Str" >Receivable</text>
</cell>
<cell row="16" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -292,7 +292,7 @@
</format>
</cell>
<cell row="15" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -303,7 +303,7 @@
</format>
</cell>
<cell row="14" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -314,7 +314,7 @@
</format>
</cell>
<cell row="13" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -325,7 +325,7 @@
</format>
</cell>
<cell row="12" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -336,7 +336,7 @@
</format>
</cell>
<cell row="11" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -347,7 +347,7 @@
</format>
</cell>
<cell row="10" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -358,7 +358,7 @@
</format>
</cell>
<cell row="9" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -369,7 +369,7 @@
</format>
</cell>
<cell row="8" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -383,7 +383,7 @@
</format>
</cell>
<cell row="16" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -397,7 +397,7 @@
</format>
</cell>
<cell row="15" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -408,7 +408,7 @@
</format>
</cell>
<cell row="14" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -419,7 +419,7 @@
</format>
</cell>
<cell row="13" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -430,7 +430,7 @@
</format>
</cell>
<cell row="12" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -441,7 +441,7 @@
</format>
</cell>
<cell row="11" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -452,7 +452,7 @@
</format>
</cell>
<cell row="10" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -463,7 +463,7 @@
</format>
</cell>
<cell row="9" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -474,7 +474,7 @@
</format>
</cell>
<cell row="8" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -488,7 +488,7 @@
</format>
</cell>
<cell row="16" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -502,7 +502,7 @@
</format>
</cell>
<cell row="15" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -513,7 +513,7 @@
</format>
</cell>
<cell row="14" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -524,7 +524,7 @@
</format>
</cell>
<cell row="13" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -535,7 +535,7 @@
</format>
</cell>
<cell row="12" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -546,7 +546,7 @@
</format>
</cell>
<cell row="11" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -557,7 +557,7 @@
</format>
</cell>
<cell row="10" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -568,7 +568,7 @@
</format>
</cell>
<cell row="9" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -579,7 +579,7 @@
</format>
</cell>
<cell row="8" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -593,7 +593,7 @@
</format>
</cell>
<cell row="16" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -607,7 +607,7 @@
</format>
</cell>
<cell row="15" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -618,7 +618,7 @@
</format>
</cell>
<cell row="14" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -629,7 +629,7 @@
</format>
</cell>
<cell row="13" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -640,7 +640,7 @@
</format>
</cell>
<cell row="12" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -651,7 +651,7 @@
</format>
</cell>
<cell row="11" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -662,7 +662,7 @@
</format>
</cell>
<cell row="10" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -673,7 +673,7 @@
</format>
</cell>
<cell row="9" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -684,7 +684,7 @@
</format>
</cell>
<cell row="8" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -698,7 +698,7 @@
</format>
</cell>
<cell row="16" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -712,7 +712,7 @@
</format>
</cell>
<cell row="15" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -723,7 +723,7 @@
</format>
</cell>
<cell row="14" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -734,7 +734,7 @@
</format>
</cell>
<cell row="13" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -745,7 +745,7 @@
</format>
</cell>
<cell row="12" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -756,7 +756,7 @@
</format>
</cell>
<cell row="11" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -767,7 +767,7 @@
</format>
</cell>
<cell row="10" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -778,7 +778,7 @@
</format>
</cell>
<cell row="9" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -789,7 +789,7 @@
</format>
</cell>
<cell row="8" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -803,7 +803,7 @@
</format>
</cell>
<cell row="5" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<right-border>
<pen width="1" style="1" color="#000000" />
@@ -814,7 +814,7 @@
</format>
</cell>
<cell row="5" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -825,7 +825,7 @@
</format>
</cell>
<cell row="4" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<top-border>
<pen width="1" style="1" color="#000000" />
@@ -836,7 +836,7 @@
</format>
</cell>
<cell row="4" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -847,12 +847,12 @@
</format>
</cell>
<cell row="3" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" italic="yes" />
</format>
</cell>
<cell row="4" column="4" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="11" family="Arial" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -876,7 +876,7 @@
</format>
</cell>
<cell row="3" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Starting Balance" dataType="Str" >Starting Balance</text>
@@ -885,7 +885,7 @@
<format style-name="Default" />
</cell>
<cell row="7" column="5" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -903,7 +903,7 @@
<text outStr="Balance" dataType="Str" >Balance</text>
</cell>
<cell row="7" column="4" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -921,7 +921,7 @@
<text outStr="Payment" dataType="Str" >Payment</text>
</cell>
<cell row="7" column="3" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -939,7 +939,7 @@
<text outStr="Received" dataType="Str" >Received</text>
</cell>
<cell row="7" column="2" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -957,7 +957,7 @@
<text outStr="Items" dataType="Str" >Items</text>
</cell>
<cell row="7" column="1" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -975,23 +975,23 @@
<text outStr="Date" dataType="Str" >Date</text>
</cell>
<cell row="3" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" />
</format>
</cell>
<cell row="3" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="11" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Description" dataType="Str" >Description</text>
</cell>
<cell row="1" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="24" family="Arial" bold="yes" weight="75" />
</format>
</cell>
<cell row="1" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="24" family="Arial" bold="yes" weight="75" />
</format>
<text outStr="Balance Sheet" dataType="Str" >Balance Sheet</text>
diff --git a/kspread/templates/Business/PackingSlip.kst b/kspread/templates/Business/PackingSlip.kst
index fb7d065b..9dc0e404 100644
--- a/kspread/templates/Business/PackingSlip.kst
+++ b/kspread/templates/Business/PackingSlip.kst
@@ -39,7 +39,7 @@
<printrepeatcolumns right="0" left="0" />
<printrepeatrows bottom="0" top="0" />
<cell row="1" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="28" family="Arial" weight="50" italic="yes" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -64,7 +64,7 @@
<text outStr="Your Company" dataType="Str" >Your Company</text>
</cell>
<cell row="1" column="2" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -92,7 +92,7 @@
<text outStr="Order Date" dataType="Str" >Order Date</text>
</cell>
<cell row="6" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -116,7 +116,7 @@
<text outStr="Order Number" dataType="Str" >Order Number</text>
</cell>
<cell row="7" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -132,7 +132,7 @@
</format>
</cell>
<cell row="8" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -152,25 +152,25 @@
<text outStr="SHIP TO" dataType="Str" >SHIP TO</text>
</cell>
<cell row="11" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Name" dataType="Str" >Name</text>
</cell>
<cell row="12" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Address" dataType="Str" >Address</text>
</cell>
<cell row="13" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="City" dataType="Str" >City</text>
</cell>
<cell row="14" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Phone/Fax" dataType="Str" >Phone/Fax</text>
@@ -184,7 +184,7 @@
<text outStr="Customer ID" dataType="Str" >Customer ID</text>
</cell>
<cell row="7" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -207,7 +207,7 @@
<text outStr="BILL TO" dataType="Str" >BILL TO</text>
</cell>
<cell row="11" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" italic="yes" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -232,7 +232,7 @@
<text outStr="Name" dataType="Str" >Name</text>
</cell>
<cell row="12" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" italic="yes" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -257,7 +257,7 @@
<text outStr="Address" dataType="Str" >Address</text>
</cell>
<cell row="13" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" italic="yes" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -282,7 +282,7 @@
<text outStr="City" dataType="Str" >City</text>
</cell>
<cell row="14" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" italic="yes" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -310,7 +310,7 @@
<format style-name="Default" />
</cell>
<cell row="17" column="1" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -328,7 +328,7 @@
<text outStr="Product" dataType="Str" >Product</text>
</cell>
<cell row="17" column="2" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -352,7 +352,7 @@
<text outStr="Description" dataType="Str" >Description</text>
</cell>
<cell row="17" column="4" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -370,7 +370,7 @@
<text outStr="Unit Type" dataType="Str" >Unit Type</text>
</cell>
<cell row="17" column="5" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -388,7 +388,7 @@
<text outStr="Order Qty" dataType="Str" >Order Qty</text>
</cell>
<cell row="17" column="6" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -409,26 +409,26 @@
<format style-name="Default" />
</cell>
<cell row="1" column="3" >
- <format bgcolor="#ffffff" alignY="2" parent="Default" />
+ <format bgcolor="#ffffff" alignY="2" tqparent="Default" />
</cell>
<cell row="1" column="4" >
<format style-name="Default" />
</cell>
<cell row="1" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="26" family="Arial" bold="yes" weight="75" />
<pen width="0" style="1" color="#b2b2b2" />
</format>
<text outStr="PACKING SLIP" dataType="Str" >PACKING SLIP</text>
</cell>
<cell row="1" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="26" family="Arial" bold="yes" weight="75" />
<pen width="0" style="1" color="#b2b2b2" />
</format>
</cell>
<cell row="1" column="7" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" family="Arial" bold="yes" weight="75" />
<pen width="0" style="1" color="#b2b2b2" />
</format>
@@ -437,7 +437,7 @@
<format style-name="Default" />
</cell>
<cell row="17" column="3" >
- <format bgcolor="#ffffff" parent="Default" align="2" >
+ <format bgcolor="#ffffff" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -460,7 +460,7 @@
</format>
</cell>
<cell row="18" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -473,7 +473,7 @@
</format>
</cell>
<cell row="19" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -483,7 +483,7 @@
</format>
</cell>
<cell row="20" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -493,7 +493,7 @@
</format>
</cell>
<cell row="21" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -503,7 +503,7 @@
</format>
</cell>
<cell row="22" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -513,7 +513,7 @@
</format>
</cell>
<cell row="23" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -523,7 +523,7 @@
</format>
</cell>
<cell row="24" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -533,7 +533,7 @@
</format>
</cell>
<cell row="25" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -543,7 +543,7 @@
</format>
</cell>
<cell row="26" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -553,7 +553,7 @@
</format>
</cell>
<cell row="27" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -563,7 +563,7 @@
</format>
</cell>
<cell row="28" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -573,7 +573,7 @@
</format>
</cell>
<cell row="29" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -583,7 +583,7 @@
</format>
</cell>
<cell row="30" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -596,7 +596,7 @@
</format>
</cell>
<cell row="18" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -606,84 +606,84 @@
</format>
</cell>
<cell row="19" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="20" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="21" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="22" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="23" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="24" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="25" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="26" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="27" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="28" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="29" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
</format>
</cell>
<cell row="30" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -693,7 +693,7 @@
</format>
</cell>
<cell row="18" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
@@ -703,84 +703,84 @@
</format>
</cell>
<cell row="19" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="20" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="21" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="22" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="23" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="24" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="25" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="26" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="27" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="28" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="29" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
</format>
</cell>
<cell row="30" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<right-border>
<pen width="1" style="1" color="#000000" />
</right-border>
@@ -790,7 +790,7 @@
</format>
</cell>
<cell row="18" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -803,7 +803,7 @@
</format>
</cell>
<cell row="19" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -813,7 +813,7 @@
</format>
</cell>
<cell row="20" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -823,7 +823,7 @@
</format>
</cell>
<cell row="21" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -833,7 +833,7 @@
</format>
</cell>
<cell row="22" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -843,7 +843,7 @@
</format>
</cell>
<cell row="23" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -853,7 +853,7 @@
</format>
</cell>
<cell row="24" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -863,7 +863,7 @@
</format>
</cell>
<cell row="25" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -873,7 +873,7 @@
</format>
</cell>
<cell row="26" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -883,7 +883,7 @@
</format>
</cell>
<cell row="27" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -893,7 +893,7 @@
</format>
</cell>
<cell row="28" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -903,7 +903,7 @@
</format>
</cell>
<cell row="29" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -913,7 +913,7 @@
</format>
</cell>
<cell row="30" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -926,7 +926,7 @@
</format>
</cell>
<cell row="18" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -939,7 +939,7 @@
</format>
</cell>
<cell row="19" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -949,7 +949,7 @@
</format>
</cell>
<cell row="20" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -959,7 +959,7 @@
</format>
</cell>
<cell row="21" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -969,7 +969,7 @@
</format>
</cell>
<cell row="22" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -979,7 +979,7 @@
</format>
</cell>
<cell row="23" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -989,7 +989,7 @@
</format>
</cell>
<cell row="24" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -999,7 +999,7 @@
</format>
</cell>
<cell row="25" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1009,7 +1009,7 @@
</format>
</cell>
<cell row="26" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1019,7 +1019,7 @@
</format>
</cell>
<cell row="27" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1029,7 +1029,7 @@
</format>
</cell>
<cell row="28" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1039,7 +1039,7 @@
</format>
</cell>
<cell row="29" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1049,7 +1049,7 @@
</format>
</cell>
<cell row="30" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1062,7 +1062,7 @@
</format>
</cell>
<cell row="18" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1075,7 +1075,7 @@
</format>
</cell>
<cell row="19" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1085,7 +1085,7 @@
</format>
</cell>
<cell row="20" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1095,7 +1095,7 @@
</format>
</cell>
<cell row="21" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1105,7 +1105,7 @@
</format>
</cell>
<cell row="22" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1115,7 +1115,7 @@
</format>
</cell>
<cell row="23" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1125,7 +1125,7 @@
</format>
</cell>
<cell row="24" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1135,7 +1135,7 @@
</format>
</cell>
<cell row="25" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1145,7 +1145,7 @@
</format>
</cell>
<cell row="26" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1155,7 +1155,7 @@
</format>
</cell>
<cell row="27" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1165,7 +1165,7 @@
</format>
</cell>
<cell row="28" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1175,7 +1175,7 @@
</format>
</cell>
<cell row="29" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1185,7 +1185,7 @@
</format>
</cell>
<cell row="30" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1202,7 +1202,7 @@
<text outStr="TOTAL" dataType="Str" >TOTAL</text>
</cell>
<cell row="31" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1220,7 +1220,7 @@
<result outStr="0" dataType="Num" >0</result>
</cell>
<cell row="31" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" family="Arial" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1246,7 +1246,7 @@
<result outStr="0" dataType="Num" >0</result>
</cell>
<cell row="6" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1262,7 +1262,7 @@
</format>
</cell>
<cell row="8" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
diff --git a/kspread/templates/Business/PriceQuotation.kst b/kspread/templates/Business/PriceQuotation.kst
index cb36ab13..e4c8d74b 100644
--- a/kspread/templates/Business/PriceQuotation.kst
+++ b/kspread/templates/Business/PriceQuotation.kst
@@ -98,7 +98,7 @@
<format style-name="Default" />
</cell>
<cell row="31" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -116,7 +116,7 @@
<result outStr="$ 0.00" dataType="Num" >0</result>
</cell>
<cell row="30" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -138,7 +138,7 @@
</format>
</cell>
<cell row="29" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -160,7 +160,7 @@
</format>
</cell>
<cell row="28" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -182,7 +182,7 @@
</format>
</cell>
<cell row="27" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -204,7 +204,7 @@
</format>
</cell>
<cell row="26" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -226,7 +226,7 @@
</format>
</cell>
<cell row="25" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -248,7 +248,7 @@
</format>
</cell>
<cell row="24" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -270,7 +270,7 @@
</format>
</cell>
<cell row="23" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -292,7 +292,7 @@
</format>
</cell>
<cell row="22" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -314,7 +314,7 @@
</format>
</cell>
<cell row="21" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -336,7 +336,7 @@
</format>
</cell>
<cell row="20" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -358,7 +358,7 @@
</format>
</cell>
<cell row="19" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -380,7 +380,7 @@
</format>
</cell>
<cell row="18" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -402,7 +402,7 @@
</format>
</cell>
<cell row="17" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -424,7 +424,7 @@
</format>
</cell>
<cell row="16" column="5" >
- <format format="10" faktor="1" symbol="" type="0" parent="Default" precision="2" >
+ <format format="10" faktor="1" symbol="" type="0" tqparent="Default" precision="2" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -446,7 +446,7 @@
</format>
</cell>
<cell row="15" column="5" >
- <format alignY="2" parent="Default" align="2" >
+ <format alignY="2" tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -464,20 +464,20 @@
<text outStr="AMOUNT" dataType="Str" >AMOUNT</text>
</cell>
<cell row="35" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<bottom-border>
<pen width="1" style="1" color="#000000" />
</bottom-border>
</format>
</cell>
<cell row="31" column="4" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
</format>
<text outStr="TOTAL" dataType="Str" >TOTAL</text>
</cell>
<cell row="30" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -499,7 +499,7 @@
</format>
</cell>
<cell row="29" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -521,7 +521,7 @@
</format>
</cell>
<cell row="28" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -543,7 +543,7 @@
</format>
</cell>
<cell row="27" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -565,7 +565,7 @@
</format>
</cell>
<cell row="26" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -587,7 +587,7 @@
</format>
</cell>
<cell row="25" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -609,7 +609,7 @@
</format>
</cell>
<cell row="24" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -631,7 +631,7 @@
</format>
</cell>
<cell row="23" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -653,7 +653,7 @@
</format>
</cell>
<cell row="22" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -675,7 +675,7 @@
</format>
</cell>
<cell row="21" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -697,7 +697,7 @@
</format>
</cell>
<cell row="20" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -719,7 +719,7 @@
</format>
</cell>
<cell row="19" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -741,7 +741,7 @@
</format>
</cell>
<cell row="18" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -763,7 +763,7 @@
</format>
</cell>
<cell row="17" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -785,7 +785,7 @@
</format>
</cell>
<cell row="16" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -807,7 +807,7 @@
</format>
</cell>
<cell row="15" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -826,7 +826,7 @@
<format style-name="Default" />
</cell>
<cell row="30" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -848,7 +848,7 @@
</format>
</cell>
<cell row="29" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -870,7 +870,7 @@
</format>
</cell>
<cell row="28" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -892,7 +892,7 @@
</format>
</cell>
<cell row="27" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -914,7 +914,7 @@
</format>
</cell>
<cell row="26" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -936,7 +936,7 @@
</format>
</cell>
<cell row="25" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -958,7 +958,7 @@
</format>
</cell>
<cell row="24" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -980,7 +980,7 @@
</format>
</cell>
<cell row="23" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1002,7 +1002,7 @@
</format>
</cell>
<cell row="22" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1024,7 +1024,7 @@
</format>
</cell>
<cell row="21" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1046,7 +1046,7 @@
</format>
</cell>
<cell row="20" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1068,7 +1068,7 @@
</format>
</cell>
<cell row="19" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1090,7 +1090,7 @@
</format>
</cell>
<cell row="18" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1112,7 +1112,7 @@
</format>
</cell>
<cell row="17" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1134,7 +1134,7 @@
</format>
</cell>
<cell row="16" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1156,7 +1156,7 @@
</format>
</cell>
<cell row="15" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1175,7 +1175,7 @@
<format style-name="Default" />
</cell>
<cell row="30" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1197,7 +1197,7 @@
</format>
</cell>
<cell row="29" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1219,7 +1219,7 @@
</format>
</cell>
<cell row="28" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1241,7 +1241,7 @@
</format>
</cell>
<cell row="27" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1263,7 +1263,7 @@
</format>
</cell>
<cell row="26" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1285,7 +1285,7 @@
</format>
</cell>
<cell row="25" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1307,7 +1307,7 @@
</format>
</cell>
<cell row="24" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1329,7 +1329,7 @@
</format>
</cell>
<cell row="23" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1351,7 +1351,7 @@
</format>
</cell>
<cell row="22" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1373,7 +1373,7 @@
</format>
</cell>
<cell row="21" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1395,7 +1395,7 @@
</format>
</cell>
<cell row="20" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1417,7 +1417,7 @@
</format>
</cell>
<cell row="19" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1439,7 +1439,7 @@
</format>
</cell>
<cell row="18" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1461,7 +1461,7 @@
</format>
</cell>
<cell row="17" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1483,7 +1483,7 @@
</format>
</cell>
<cell row="16" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -1505,7 +1505,7 @@
</format>
</cell>
<cell row="15" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1525,7 +1525,7 @@
<text outStr="If you have any questions, please contact" dataType="Str" >If you have any questions, please contact</text>
</cell>
<cell row="30" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1547,7 +1547,7 @@
</format>
</cell>
<cell row="29" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1569,7 +1569,7 @@
</format>
</cell>
<cell row="28" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1591,7 +1591,7 @@
</format>
</cell>
<cell row="27" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1613,7 +1613,7 @@
</format>
</cell>
<cell row="26" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1635,7 +1635,7 @@
</format>
</cell>
<cell row="25" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1657,7 +1657,7 @@
</format>
</cell>
<cell row="24" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1679,7 +1679,7 @@
</format>
</cell>
<cell row="23" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1701,7 +1701,7 @@
</format>
</cell>
<cell row="22" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1723,7 +1723,7 @@
</format>
</cell>
<cell row="21" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1745,7 +1745,7 @@
</format>
</cell>
<cell row="20" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1767,7 +1767,7 @@
</format>
</cell>
<cell row="19" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1789,7 +1789,7 @@
</format>
</cell>
<cell row="18" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1811,7 +1811,7 @@
</format>
</cell>
<cell row="17" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1833,7 +1833,7 @@
</format>
</cell>
<cell row="16" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1855,7 +1855,7 @@
</format>
</cell>
<cell row="15" column="1" >
- <format parent="Default" colspan="3" align="2" >
+ <format tqparent="Default" colspan="3" align="2" >
<font size="12" family="Arial" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -1873,7 +1873,7 @@
<text outStr="DESCRIPTION" dataType="Str" >DESCRIPTION</text>
</cell>
<cell row="3" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1889,7 +1889,7 @@
</format>
</cell>
<cell row="2" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<bottom-border>
<pen width="1" style="1" color="#000000" />
</bottom-border>
@@ -1897,13 +1897,13 @@
<text outStr="Valid until" dataType="Str" >Valid until</text>
</cell>
<cell row="1" column="5" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<font size="12" family="Arial" bold="yes" weight="75" />
<pen width="0" style="1" color="#cccccc" />
</format>
</cell>
<cell row="1" column="4" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" colspan="1" align="3" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" colspan="1" align="3" >
<font size="24" family="Arial" bold="yes" weight="75" />
<pen width="0" style="1" color="#cccccc" />
<left-border>
@@ -1928,7 +1928,7 @@
<text outStr="QUOTATION" dataType="Str" >QUOTATION</text>
</cell>
<cell row="13" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1944,7 +1944,7 @@
</format>
</cell>
<cell row="11" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1960,7 +1960,7 @@
</format>
</cell>
<cell row="9" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -1980,7 +1980,7 @@
<text outStr="Fax" dataType="Str" >Fax</text>
</cell>
<cell row="12" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -2004,7 +2004,7 @@
<text outStr="Address" dataType="Str" >Address</text>
</cell>
<cell row="10" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -2032,7 +2032,7 @@
<text outStr="Bill To:" dataType="Str" >Bill To:</text>
</cell>
<cell row="8" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<bottom-border>
<pen width="1" style="1" color="#000000" />
</bottom-border>
@@ -2047,56 +2047,56 @@
<text outStr="Phone" dataType="Str" >Phone</text>
</cell>
<cell row="4" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="14" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="31" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="31" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="31" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="32" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="4" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<top-border>
<pen width="1" style="1" color="#000000" />
</top-border>
</format>
</cell>
<cell row="14" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<bottom-border>
<pen width="1" style="1" color="#000000" />
</bottom-border>
@@ -2111,12 +2111,12 @@
<text outStr="Address" dataType="Str" >Address</text>
</cell>
<cell row="1" column="2" >
- <format alignY="2" parent="Default" >
+ <format alignY="2" tqparent="Default" >
<font size="26" family="Arial" weight="50" italic="yes" />
</format>
</cell>
<cell row="1" column="1" >
- <format alignY="2" parent="Default" >
+ <format alignY="2" tqparent="Default" >
<font size="26" family="Arial" weight="50" italic="yes" />
</format>
<text outStr="Your Company" dataType="Str" >Your Company</text>
diff --git a/kspread/templates/HomeFamily/CreditCardTracker.kst b/kspread/templates/HomeFamily/CreditCardTracker.kst
index 0a0a8fff..196429b7 100644
--- a/kspread/templates/HomeFamily/CreditCardTracker.kst
+++ b/kspread/templates/HomeFamily/CreditCardTracker.kst
@@ -39,7 +39,7 @@
<printrepeatcolumns right="0" left="0" />
<printrepeatrows bottom="0" top="0" />
<cell row="20" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -65,7 +65,7 @@
<result outStr="14-Jun-2003" dataType="Date" >2003/6/14</result>
</cell>
<cell row="19" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -91,7 +91,7 @@
<result outStr="13-Jun-2003" dataType="Date" >2003/6/13</result>
</cell>
<cell row="18" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -117,7 +117,7 @@
<result outStr="12-Jun-2003" dataType="Date" >2003/6/12</result>
</cell>
<cell row="17" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -143,7 +143,7 @@
<result outStr="11-Jun-2003" dataType="Date" >2003/6/11</result>
</cell>
<cell row="16" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -169,7 +169,7 @@
<result outStr="10-Jun-2003" dataType="Date" >2003/6/10</result>
</cell>
<cell row="15" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -195,47 +195,47 @@
<result outStr="09-Jun-2003" dataType="Date" >2003/6/9</result>
</cell>
<cell row="14" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="08-Jun-2003" dataType="Date" >2003/6/8</result>
</cell>
<cell row="13" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="07-Jun-2003" dataType="Date" >2003/6/7</result>
</cell>
<cell row="12" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="06-Jun-2003" dataType="Date" >2003/6/6</result>
</cell>
<cell row="11" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="05-Jun-2003" dataType="Date" >2003/6/5</result>
</cell>
<cell row="10" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="04-Jun-2003" dataType="Date" >2003/6/4</result>
</cell>
<cell row="9" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="03-Jun-2003" dataType="Date" >2003/6/3</result>
</cell>
<cell row="8" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="02-Jun-2003" dataType="Date" >2003/6/2</result>
</cell>
<cell row="7" column="1" >
- <format bgcolor="#ffffff" format="201" faktor="1" parent="Default" />
+ <format bgcolor="#ffffff" format="201" faktor="1" tqparent="Default" />
<text>=#0#-1#+1</text>
<result outStr="01-Jun-2003" dataType="Date" >2003/6/1</result>
</cell>
<cell row="6" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -261,7 +261,7 @@
<result outStr="31-May-2003" dataType="Date" >2003/5/31</result>
</cell>
<cell row="5" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -289,7 +289,7 @@
<format style-name="Default" />
</cell>
<cell row="3" column="1" >
- <format bgcolor="#666666" rowspan="1" parent="Default" >
+ <format bgcolor="#666666" rowspan="1" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -343,7 +343,7 @@
<format style-name="Default" />
</cell>
<cell row="3" column="2" >
- <format bgcolor="#666666" rowspan="1" parent="Default" >
+ <format bgcolor="#666666" rowspan="1" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -362,38 +362,38 @@
<text outStr="Transaction" dataType="Str" >Transaction</text>
</cell>
<cell row="14" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="13" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="12" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="11" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="10" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="9" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="8" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="7" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="6" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="5" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="1,500.00" dataType="Num" >1500</text>
</cell>
<cell row="4" column="3" >
- <format bgcolor="#666666" parent="Default" align="2" >
+ <format bgcolor="#666666" tqparent="Default" align="2" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<bottom-border>
@@ -403,7 +403,7 @@
<text outStr="Balance" dataType="Str" >Balance</text>
</cell>
<cell row="3" column="3" >
- <format bgcolor="#666666" parent="Default" align="2" >
+ <format bgcolor="#666666" tqparent="Default" align="2" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<top-border>
@@ -413,41 +413,41 @@
<text outStr="Beginning" dataType="Str" >Beginning</text>
</cell>
<cell row="14" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="13" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="12" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="11" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="10" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="9" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="8" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="7" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="30.00" dataType="Num" >30</text>
</cell>
<cell row="6" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="5" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="4" column="4" >
<format style-name="Default" />
</cell>
<cell row="3" column="4" >
- <format bgcolor="#666666" rowspan="1" parent="Default" >
+ <format bgcolor="#666666" rowspan="1" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -466,44 +466,44 @@
<text outStr="Payment" dataType="Str" >Payment</text>
</cell>
<cell row="14" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="13" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="12" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="11" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="10" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="9" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="16.00" dataType="Num" >16</text>
</cell>
<cell row="8" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="25.00" dataType="Num" >25</text>
</cell>
<cell row="7" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="6" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="40.00" dataType="Num" >40</text>
</cell>
<cell row="5" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text outStr="1,405.67" dataType="Num" >1405.67</text>
</cell>
<cell row="4" column="5" >
<format style-name="Default" />
</cell>
<cell row="3" column="5" >
- <format bgcolor="#666666" rowspan="1" parent="Default" >
+ <format bgcolor="#666666" rowspan="1" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -522,57 +522,57 @@
<text outStr="Expenses" dataType="Str" >Expenses</text>
</cell>
<cell row="14" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="13" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="12" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="11" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="10" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="9" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="8" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="59.33" dataType="Num" >59.3299999999999</result>
</cell>
<cell row="7" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="84.33" dataType="Num" >84.3299999999999</result>
</cell>
<cell row="6" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#+#0#-1#</text>
<result outStr="54.33" dataType="Num" >54.3299999999999</result>
</cell>
<cell row="5" column="6" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
<text>=#-3#0#+#-2#0#-#-1#0#</text>
<result outStr="94.33" dataType="Num" >94.3299999999999</result>
</cell>
<cell row="4" column="6" >
- <format bgcolor="#666666" parent="Default" align="2" >
+ <format bgcolor="#666666" tqparent="Default" align="2" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -588,7 +588,7 @@
<text outStr="Credit" dataType="Str" >Credit</text>
</cell>
<cell row="3" column="6" >
- <format bgcolor="#666666" parent="Default" align="2" >
+ <format bgcolor="#666666" tqparent="Default" align="2" >
<font size="10" bold="yes" weight="75" />
<pen width="0" style="1" color="#ffffff" />
<left-border>
@@ -604,23 +604,23 @@
<text outStr="Remaining" dataType="Str" >Remaining</text>
</cell>
<cell row="1" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="24" bold="yes" weight="75" />
</format>
<text outStr="Credit Card Tracker" dataType="Str" >Credit Card Tracker</text>
</cell>
<cell row="1" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="24" bold="yes" weight="75" />
</format>
</cell>
<cell row="1" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
</format>
</cell>
<cell row="21" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -646,7 +646,7 @@
<result outStr="15-Jun-2003" dataType="Date" >2003/6/15</result>
</cell>
<cell row="22" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -672,7 +672,7 @@
<result outStr="16-Jun-2003" dataType="Date" >2003/6/16</result>
</cell>
<cell row="23" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -698,7 +698,7 @@
<result outStr="17-Jun-2003" dataType="Date" >2003/6/17</result>
</cell>
<cell row="24" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -724,7 +724,7 @@
<result outStr="18-Jun-2003" dataType="Date" >2003/6/18</result>
</cell>
<cell row="25" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -750,7 +750,7 @@
<result outStr="19-Jun-2003" dataType="Date" >2003/6/19</result>
</cell>
<cell row="26" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -776,7 +776,7 @@
<result outStr="20-Jun-2003" dataType="Date" >2003/6/20</result>
</cell>
<cell row="27" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -802,7 +802,7 @@
<result outStr="21-Jun-2003" dataType="Date" >2003/6/21</result>
</cell>
<cell row="28" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -828,7 +828,7 @@
<result outStr="22-Jun-2003" dataType="Date" >2003/6/22</result>
</cell>
<cell row="29" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -854,7 +854,7 @@
<result outStr="23-Jun-2003" dataType="Date" >2003/6/23</result>
</cell>
<cell row="30" column="1" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="201" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -880,7 +880,7 @@
<result outStr="24-Jun-2003" dataType="Date" >2003/6/24</result>
</cell>
<cell row="15" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -906,7 +906,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="16" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -932,7 +932,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="17" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -958,7 +958,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="18" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -984,7 +984,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="19" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1010,7 +1010,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="20" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1036,7 +1036,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="21" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1062,7 +1062,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="22" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1088,7 +1088,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="23" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1114,7 +1114,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="24" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1140,7 +1140,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="25" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1166,7 +1166,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="26" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1192,7 +1192,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="27" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1218,7 +1218,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="28" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1244,7 +1244,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="29" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1270,7 +1270,7 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="30" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="2" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="2" angle="0" align="4" >
<font size="10" weight="50" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -1296,148 +1296,148 @@
<result outStr="43.33" dataType="Num" >43.3299999999999</result>
</cell>
<cell row="15" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="15" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="15" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="16" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="16" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="16" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="17" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="17" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="17" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="18" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="18" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="18" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="19" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="19" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="19" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="20" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="20" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="20" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="21" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="21" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="21" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="22" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="22" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="22" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="23" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="23" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="23" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="24" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="24" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="24" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="25" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="25" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="25" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="26" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="26" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="26" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="27" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="27" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="27" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="28" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="28" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="28" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="29" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="29" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="29" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="30" column="3" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="30" column="4" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="30" column="5" >
- <format bgcolor="#ffffff" format="0" faktor="1" parent="Default" precision="2" />
+ <format bgcolor="#ffffff" format="0" faktor="1" tqparent="Default" precision="2" />
</cell>
<cell row="5" column="7" >
<format style-name="Default" />
@@ -1533,7 +1533,7 @@
<format style-name="Default" />
</cell>
<cell row="3" column="7" >
- <format bgcolor="#ffffff" parent="Default" align="2" />
+ <format bgcolor="#ffffff" tqparent="Default" align="2" />
</cell>
<cell row="4" column="7" >
<format style-name="Default" />
diff --git a/kspread/templates/HomeFamily/MenuPlan.kst b/kspread/templates/HomeFamily/MenuPlan.kst
index c73e51ff..bfc4a10c 100644
--- a/kspread/templates/HomeFamily/MenuPlan.kst
+++ b/kspread/templates/HomeFamily/MenuPlan.kst
@@ -41,7 +41,7 @@
<format style-name="Default" />
</cell>
<cell row="1" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="10" bold="yes" weight="75" />
</format>
</cell>
@@ -167,7 +167,7 @@
</format>
</cell>
<cell row="7" column="7" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -183,7 +183,7 @@
</format>
</cell>
<cell row="7" column="6" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -199,7 +199,7 @@
</format>
</cell>
<cell row="7" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -215,7 +215,7 @@
</format>
</cell>
<cell row="7" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -231,7 +231,7 @@
</format>
</cell>
<cell row="7" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -247,7 +247,7 @@
</format>
</cell>
<cell row="7" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -263,7 +263,7 @@
</format>
</cell>
<cell row="6" column="7" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -279,7 +279,7 @@
</format>
</cell>
<cell row="6" column="6" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -295,7 +295,7 @@
</format>
</cell>
<cell row="6" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -311,7 +311,7 @@
</format>
</cell>
<cell row="6" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -327,7 +327,7 @@
</format>
</cell>
<cell row="6" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -343,7 +343,7 @@
</format>
</cell>
<cell row="6" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -359,7 +359,7 @@
</format>
</cell>
<cell row="5" column="7" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -375,7 +375,7 @@
</format>
</cell>
<cell row="5" column="6" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -391,7 +391,7 @@
</format>
</cell>
<cell row="5" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -407,7 +407,7 @@
</format>
</cell>
<cell row="5" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -423,7 +423,7 @@
</format>
</cell>
<cell row="5" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -439,7 +439,7 @@
</format>
</cell>
<cell row="5" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -455,7 +455,7 @@
</format>
</cell>
<cell row="4" column="7" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -471,7 +471,7 @@
</format>
</cell>
<cell row="4" column="6" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -487,7 +487,7 @@
</format>
</cell>
<cell row="4" column="5" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -503,7 +503,7 @@
</format>
</cell>
<cell row="4" column="4" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -519,7 +519,7 @@
</format>
</cell>
<cell row="4" column="3" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -535,7 +535,7 @@
</format>
</cell>
<cell row="4" column="2" >
- <format parent="Default" >
+ <format tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -551,7 +551,7 @@
</format>
</cell>
<cell row="3" column="7" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="2" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="2" >
<font size="11" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -576,7 +576,7 @@
<text outStr="Fri" dataType="Str" >Fri</text>
</cell>
<cell row="3" column="6" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="2" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="2" >
<font size="11" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -601,7 +601,7 @@
<text outStr="Thu" dataType="Str" >Thu</text>
</cell>
<cell row="3" column="5" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="2" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="2" >
<font size="11" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -626,7 +626,7 @@
<text outStr="Wed" dataType="Str" >Wed</text>
</cell>
<cell row="3" column="4" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="2" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="2" >
<font size="11" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -651,7 +651,7 @@
<text outStr="Tue" dataType="Str" >Tue</text>
</cell>
<cell row="3" column="3" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -669,7 +669,7 @@
<text outStr="Mon" dataType="Str" >Mon</text>
</cell>
<cell row="3" column="2" >
- <format parent="Default" align="2" >
+ <format tqparent="Default" align="2" >
<font size="11" bold="yes" weight="75" />
<left-border>
<pen width="1" style="1" color="#000000" />
@@ -690,7 +690,7 @@
<format style-name="Default" />
</cell>
<cell row="4" column="1" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -707,7 +707,7 @@
<text outStr="Breakfast" dataType="Str" >Breakfast</text>
</cell>
<cell row="5" column="1" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -724,7 +724,7 @@
<text outStr="Lunch" dataType="Str" >Lunch</text>
</cell>
<cell row="6" column="1" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -741,7 +741,7 @@
<text outStr="Dinner" dataType="Str" >Dinner</text>
</cell>
<cell row="7" column="1" >
- <format parent="Default" align="3" >
+ <format tqparent="Default" align="3" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -825,7 +825,7 @@
<text outStr="Bread" dataType="Str" >Bread</text>
</cell>
<cell row="1" column="1" >
- <format parent="Default" >
+ <format tqparent="Default" >
<font size="22" bold="yes" weight="75" />
</format>
<text outStr="Menu Plan" dataType="Str" >Menu Plan</text>
diff --git a/kspread/templates/HomeFamily/VacationChecklist.kst b/kspread/templates/HomeFamily/VacationChecklist.kst
index 141ff1e4..b6674596 100644
--- a/kspread/templates/HomeFamily/VacationChecklist.kst
+++ b/kspread/templates/HomeFamily/VacationChecklist.kst
@@ -39,7 +39,7 @@
<printrepeatcolumns right="0" left="0" />
<printrepeatrows bottom="0" top="0" />
<cell row="15" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -55,7 +55,7 @@
</format>
</cell>
<cell row="14" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -71,7 +71,7 @@
</format>
</cell>
<cell row="13" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -87,7 +87,7 @@
</format>
</cell>
<cell row="12" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -103,7 +103,7 @@
</format>
</cell>
<cell row="9" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -119,7 +119,7 @@
</format>
</cell>
<cell row="8" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -135,7 +135,7 @@
</format>
</cell>
<cell row="7" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -151,7 +151,7 @@
</format>
</cell>
<cell row="6" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="0" color="#000000" />
</left-border>
@@ -173,28 +173,28 @@
</format>
</cell>
<cell row="1" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="22" bold="yes" weight="75" />
</format>
<text outStr="Vacation Checklist" dataType="Str" >Vacation Checklist</text>
</cell>
<cell row="1" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="22" bold="yes" weight="75" />
</format>
</cell>
<cell row="1" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
</format>
</cell>
<cell row="1" column="4" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" />
</format>
</cell>
<cell row="9" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -210,7 +210,7 @@
</format>
</cell>
<cell row="8" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -226,7 +226,7 @@
</format>
</cell>
<cell row="7" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -242,7 +242,7 @@
</format>
</cell>
<cell row="6" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -258,7 +258,7 @@
</format>
</cell>
<cell row="5" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" bold="yes" weight="75" />
</format>
<text outStr="TRIP" dataType="Str" >TRIP</text>
@@ -280,7 +280,7 @@
<text outStr="Check travel insurance" dataType="Str" >Check travel insurance</text>
</cell>
<cell row="5" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" bold="yes" weight="75" />
</format>
</cell>
@@ -291,7 +291,7 @@
<format style-name="Default" />
</cell>
<cell row="5" column="4" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -328,13 +328,13 @@
<text outStr="House/mortage" dataType="Str" >House/mortage</text>
</cell>
<cell row="6" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
<text outStr="Bills" dataType="Str" >Bills</text>
</cell>
<cell row="5" column="5" >
- <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" parent="Default" precision="-1" angle="0" align="4" >
+ <format brushstyle="0" brushcolor="#ff0000" bgcolor="#ffffff" float="3" alignY="2" format="0" floatcolor="2" faktor="1" indent="0" tqparent="Default" precision="-1" angle="0" align="4" >
<font size="12" bold="yes" weight="75" />
<pen width="0" style="1" color="#000000" />
<left-border>
@@ -369,7 +369,7 @@
<text outStr="Return Date" dataType="Str" >Return Date</text>
</cell>
<cell row="3" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -385,7 +385,7 @@
</format>
</cell>
<cell row="2" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -401,7 +401,7 @@
</format>
</cell>
<cell row="13" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -417,7 +417,7 @@
</format>
</cell>
<cell row="12" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -441,13 +441,13 @@
<text outStr="Hotel" dataType="Str" >Hotel</text>
</cell>
<cell row="11" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
<text outStr="Reservations" dataType="Str" >Reservations</text>
</cell>
<cell row="11" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
</cell>
@@ -460,24 +460,24 @@
<text outStr="Dairy" dataType="Str" >Dairy</text>
</cell>
<cell row="11" column="5" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
<text outStr="Home delivery" dataType="Str" >Home delivery</text>
</cell>
<cell row="11" column="6" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
</cell>
<cell row="20" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" bold="yes" weight="75" />
</format>
<text outStr="OTHERS" dataType="Str" >OTHERS</text>
</cell>
<cell row="18" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -493,7 +493,7 @@
</format>
</cell>
<cell row="17" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -509,7 +509,7 @@
</format>
</cell>
<cell row="16" column="1" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<left-border>
<pen width="1" style="1" color="#000000" />
</left-border>
@@ -533,7 +533,7 @@
<text outStr="Notify police:" dataType="Str" >Notify police:</text>
</cell>
<cell row="20" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="12" bold="yes" weight="75" />
</format>
</cell>
@@ -550,7 +550,7 @@
<text outStr="Tuneup" dataType="Str" >Tuneup</text>
</cell>
<cell row="15" column="2" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" bold="yes" weight="75" italic="yes" />
</format>
<text outStr="Auto check" dataType="Str" >Auto check</text>
@@ -562,7 +562,7 @@
<format style-name="Default" />
</cell>
<cell row="15" column="3" >
- <format bgcolor="#ffffff" parent="Default" >
+ <format bgcolor="#ffffff" tqparent="Default" >
<font size="10" weight="50" italic="yes" />
</format>
</cell>
diff --git a/kspread/tests/formula_tester.cc b/kspread/tests/formula_tester.cc
index 3dad1caa..b7f9f227 100644
--- a/kspread/tests/formula_tester.cc
+++ b/kspread/tests/formula_tester.cc
@@ -37,9 +37,9 @@ FormulaParserTester::FormulaParserTester(): Tester()
{
}
-QString FormulaParserTester::name()
+TQString FormulaParserTester::name()
{
- return QString("Formula (Parser)");
+ return TQString("Formula (Parser)");
}
static char encodeTokenType( const Token& token )
@@ -59,9 +59,9 @@ static char encodeTokenType( const Token& token )
return result;
}
-static QString describeTokenCodes( const QString& tokenCodes )
+static TQString describeTokenCodes( const TQString& tokenCodes )
{
- QString result;
+ TQString result;
if( tokenCodes.isEmpty() )
result = "(invalid)";
@@ -86,24 +86,24 @@ static QString describeTokenCodes( const QString& tokenCodes )
}
void FormulaParserTester::checkParse( const char *file, int line, const char* msg,
- const QString& formula, const QString& tokenCodes )
+ const TQString& formula, const TQString& tokenCodes )
{
testCount++;
Formula f;
- QString expr = formula;
+ TQString expr = formula;
expr.prepend( '=' );
f.setExpression( expr );
Tokens tokens = f.tokens();
- QString resultCodes;
+ TQString resultCodes;
if( tokens.valid() )
for( unsigned i = 0; i < tokens.count(); i++ )
resultCodes.append( encodeTokenType( tokens[i] ) );
if( resultCodes != tokenCodes )
{
- QString message = msg;
+ TQString message = msg;
message.append( " Result: ").append( describeTokenCodes( resultCodes ) );
message.append( " Expected: ").append( describeTokenCodes( tokenCodes ) );
fail( file, line, message );
@@ -177,25 +177,25 @@ void FormulaParserTester::run()
CHECK_PARSE( "SIN A1:A20", "xr" );
// invalid formulas, can't be parsed correctly
- CHECK_PARSE( "+1.23E", QString::null );
+ CHECK_PARSE( "+1.23E", TQString() );
}
FormulaEvalTester::FormulaEvalTester(): Tester()
{
}
-QString FormulaEvalTester::name()
+TQString FormulaEvalTester::name()
{
- return QString("Formula (Eval)");
+ return TQString("Formula (Eval)");
}
void FormulaEvalTester::checkEval( const char *file, int line, const char* msg,
- const QString& formula, const Value& expected )
+ const TQString& formula, const Value& expected )
{
testCount++;
Formula f;
- QString expr = formula;
+ TQString expr = formula;
if ( expr[0] != '=' )
expr.prepend( '=' );
f.setExpression( expr );
@@ -203,8 +203,8 @@ void FormulaEvalTester::checkEval( const char *file, int line, const char* msg,
if( !result.equal( expected ) )
{
- QString message;
- QTextStream ts( &message, IO_WriteOnly );
+ TQString message;
+ TQTextStream ts( &message, IO_WriteOnly );
ts << msg;
ts << " Result: " << result;
ts << " Expected: " << expected;
@@ -252,7 +252,7 @@ void FormulaEvalTester::run()
CHECK_EVAL( "1.2--COS(0)", Value(2.2) );
CHECK_EVAL( "1.3---COS(0)", Value(0.3) );
- // no parentheses, checking operator precendences
+ // no tqparentheses, checking operator precendences
CHECK_EVAL( "14+3*77", Value(245) );
CHECK_EVAL( "14-3*77", Value(-217) );
CHECK_EVAL( "26*4+81", Value(185) );
@@ -372,9 +372,9 @@ FormulaOasisConversionTester::FormulaOasisConversionTester(): Tester()
{
}
-QString FormulaOasisConversionTester::name()
+TQString FormulaOasisConversionTester::name()
{
- return QString("Formula (OpenDocument conversion)");
+ return TQString("Formula (OpenDocument conversion)");
}
void FormulaOasisConversionTester::run()
@@ -410,7 +410,7 @@ void FormulaOasisConversionTester::run()
}
void FormulaOasisConversionTester::checkOasis( const char *file, int line, const char* /*msg*/,
- const QString& localeFormula, const QString& oasisFormula )
+ const TQString& localeFormula, const TQString& oasisFormula )
{
testCount++;
@@ -418,13 +418,13 @@ void FormulaOasisConversionTester::checkOasis( const char *file, int line, const
locale.setDecimalSymbol(",");
// KSpread -> OpenDocument
- QString formula = localeFormula;
+ TQString formula = localeFormula;
#if 0
Oasis::encodeFormula( formula, &locale );
if( formula != oasisFormula )
{
- QString message = "[Locale->Oasis] ";
+ TQString message = "[Locale->Oasis] ";
message.append( "\"" + localeFormula + "\"" );
message.append( " Result: ").append( formula );
message.append( " Expected: ").append( oasisFormula );
@@ -439,7 +439,7 @@ void FormulaOasisConversionTester::checkOasis( const char *file, int line, const
if( formula != localeFormula )
{
- QString message = "[Oasis->Locale] ";
+ TQString message = "[Oasis->Locale] ";
message.append( "\"" + oasisFormula + "\"" );
message.append( " Result: ").append( formula );
message.append( " Expected: ").append( localeFormula );
diff --git a/kspread/tests/formula_tester.h b/kspread/tests/formula_tester.h
index 5efc89ff..65e20705 100644
--- a/kspread/tests/formula_tester.h
+++ b/kspread/tests/formula_tester.h
@@ -20,7 +20,7 @@
#ifndef KSPREAD_FORMULA_TESTER
#define KSPREAD_FORMULA_TESTER
-#include <qstring.h>
+#include <tqstring.h>
#include <kspread_value.h>
#include "tester.h"
@@ -33,30 +33,30 @@ class FormulaParserTester: public Tester
{
public:
FormulaParserTester();
- virtual QString name();
+ virtual TQString name();
virtual void run();
private:
- void checkParse( const char *file, int line, const char* msg, const QString&, const QString& );
+ void checkParse( const char *file, int line, const char* msg, const TQString&, const TQString& );
};
class FormulaEvalTester: public Tester
{
public:
FormulaEvalTester();
- virtual QString name();
+ virtual TQString name();
virtual void run();
private:
- void checkEval( const char *file, int line, const char* msg, const QString&, const Value& );
+ void checkEval( const char *file, int line, const char* msg, const TQString&, const Value& );
};
class FormulaOasisConversionTester : public Tester
{
public:
FormulaOasisConversionTester();
- virtual QString name();
+ virtual TQString name();
virtual void run();
private:
- void checkOasis( const char *file, int line, const char* msg, const QString&, const QString& );
+ void checkOasis( const char *file, int line, const char* msg, const TQString&, const TQString& );
};
} // namespace KSpread
diff --git a/kspread/tests/generate-openformula-tests b/kspread/tests/generate-openformula-tests
index f39ce2aa..39b93811 100755
--- a/kspread/tests/generate-openformula-tests
+++ b/kspread/tests/generate-openformula-tests
@@ -4,7 +4,7 @@
# Requires an open instance of KSpread, with openformula-test.ods loaded.
#
-KSPREAD=`dcopfind 'kspread*'`
+KSPREAD=`dcoptqfind 'kspread*'`
KSPREAD=`echo $KSPREAD | sed s/DCOPRef\(// | sed s/,\)//`
for i in `seq 51 514`
do
diff --git a/kspread/tests/inspector.cc b/kspread/tests/inspector.cc
index 8996d285..ad186817 100644
--- a/kspread/tests/inspector.cc
+++ b/kspread/tests/inspector.cc
@@ -19,9 +19,9 @@
#include "inspector.h"
-#include <qlayout.h>
-#include <qlistview.h>
-#include <qtextstream.h>
+#include <tqlayout.h>
+#include <tqlistview.h>
+#include <tqtextstream.h>
#include <kdialogbase.h>
@@ -40,11 +40,11 @@ public:
Format* format;
Sheet* sheet;
- QListView *cellView;
- QListView *formatView;
- QListView *sheetView;
- QListView *styleView;
- QListView* depView;
+ TQListView *cellView;
+ TQListView *formatView;
+ TQListView *sheetView;
+ TQListView *styleView;
+ TQListView* depView;
void handleCell();
void handleFormat();
@@ -57,20 +57,20 @@ public:
using namespace KSpread;
-static QString boolAsString( bool b )
+static TQString boolAsString( bool b )
{
- if( b ) return QString( "True" );
- else return QString( "False" );
+ if( b ) return TQString( "True" );
+ else return TQString( "False" );
}
-static QString longAsHexstring( long l )
+static TQString longAsHexstring( long l )
{
- return QString("%1").arg(l, 8, 16);
+ return TQString("%1").tqarg(l, 8, 16);
}
-static QString dirAsString( Sheet::LayoutDirection dir )
+static TQString dirAsString( Sheet::LayoutDirection dir )
{
- QString str;
+ TQString str;
switch( dir )
{
case Sheet::LeftToRight: str = "Left to Right"; break;
@@ -82,32 +82,32 @@ static QString dirAsString( Sheet::LayoutDirection dir )
void Inspector::Private::handleCell()
{
- QString str;
+ TQString str;
cellView->clear();
- new QListViewItem( cellView, "Column", QString::number( cell->column() ) );
- new QListViewItem( cellView, "Row", QString::number( cell->row() ) );
- new QListViewItem( cellView, "Name", cell->name() );
- new QListViewItem( cellView, "Full Name", cell->fullName() );
-
- new QListViewItem( cellView, "Default", boolAsString( cell->isDefault() ) );
- new QListViewItem( cellView, "Empty", boolAsString( cell->isEmpty() ) );
- new QListViewItem( cellView, "Formula", boolAsString( cell->isFormula() ) );
- new QListViewItem( cellView, "Format Properties", longAsHexstring( static_cast<long>( cell->format()->propertiesMask() ) ) );
- new QListViewItem( cellView, "Style Properties", longAsHexstring( static_cast<long>( cell->format()->style()->features() ) ) );
- new QListViewItem( cellView, "Text", cell->text() );
- new QListViewItem( cellView, "Text (Displayed)",
- cell->strOutText().replace( QChar('\n'), "\\n" ) );
-
- QTextStream ts( &str, IO_WriteOnly );
+ new TQListViewItem( cellView, "Column", TQString::number( cell->column() ) );
+ new TQListViewItem( cellView, "Row", TQString::number( cell->row() ) );
+ new TQListViewItem( cellView, "Name", cell->name() );
+ new TQListViewItem( cellView, "Full Name", cell->fullName() );
+
+ new TQListViewItem( cellView, "Default", boolAsString( cell->isDefault() ) );
+ new TQListViewItem( cellView, "Empty", boolAsString( cell->isEmpty() ) );
+ new TQListViewItem( cellView, "Formula", boolAsString( cell->isFormula() ) );
+ new TQListViewItem( cellView, "Format Properties", longAsHexstring( static_cast<long>( cell->format()->propertiesMask() ) ) );
+ new TQListViewItem( cellView, "Style Properties", longAsHexstring( static_cast<long>( cell->format()->style()->features() ) ) );
+ new TQListViewItem( cellView, "Text", cell->text() );
+ new TQListViewItem( cellView, "Text (Displayed)",
+ cell->strOutText().tqreplace( TQChar('\n'), "\\n" ) );
+
+ TQTextStream ts( &str, IO_WriteOnly );
ts << cell->value();
- new QListViewItem( cellView, "Value", str );
+ new TQListViewItem( cellView, "Value", str );
- new QListViewItem( cellView, "Link", cell->link() );
+ new TQListViewItem( cellView, "Link", cell->link() );
- new QListViewItem( cellView, "Width", QString::number( cell->dblWidth() ) );
- new QListViewItem( cellView, "Height", QString::number( cell->dblHeight() ) );
+ new TQListViewItem( cellView, "Width", TQString::number( cell->dblWidth() ) );
+ new TQListViewItem( cellView, "Height", TQString::number( cell->dblHeight() ) );
}
void Inspector::Private::handleFormat()
@@ -116,33 +116,33 @@ void Inspector::Private::handleFormat()
int col = cell->column();
int row = cell->row();
- new QListViewItem( formatView, "Angle", QString::number( format->getAngle(col, row) ) );
- new QListViewItem( formatView, "Multirow", boolAsString( format->multiRow(col, row) ) );
- new QListViewItem( formatView, "Protected", format->hasProperty( Format::PVerticalText )
+ new TQListViewItem( formatView, "Angle", TQString::number( format->getAngle(col, row) ) );
+ new TQListViewItem( formatView, "Multirow", boolAsString( format->multiRow(col, row) ) );
+ new TQListViewItem( formatView, "Protected", format->hasProperty( Format::PVerticalText )
? "Not specified" : boolAsString( format->isProtected(col, row) ) );
- new QListViewItem( formatView, "Vertical Text", boolAsString( format->verticalText(col, row ) ) );
+ new TQListViewItem( formatView, "Vertical Text", boolAsString( format->verticalText(col, row ) ) );
Format::Currency currrency;
bool valid = format->currencyInfo(currrency);
- new QListViewItem( formatView, "Currency symbol", valid ? currrency.symbol : "Invalid" );
+ new TQListViewItem( formatView, "Currency symbol", valid ? currrency.symbol : "Invalid" );
bool ok = false;
- QString currencyType;
+ TQString currencyType;
if (valid)
currencyType = Currency::getChooseString(currrency.type, ok);
- new QListViewItem( formatView, "Currency type", valid && ok ? currencyType : "Invalid" );
+ new TQListViewItem( formatView, "Currency type", valid && ok ? currencyType : "Invalid" );
- QListViewItem* flags = new QListViewItem( formatView, "Flags" );
- new QListViewItem( flags, "Border (left)",
+ TQListViewItem* flags = new TQListViewItem( formatView, "Flags" );
+ new TQListViewItem( flags, "Border (left)",
boolAsString( format->hasProperty(Format::PLeftBorder, true) ) );
- new QListViewItem( flags, "Border (right)",
+ new TQListViewItem( flags, "Border (right)",
boolAsString( format->hasProperty(Format::PRightBorder, true) ) );
- new QListViewItem( flags, "Border (top)",
+ new TQListViewItem( flags, "Border (top)",
boolAsString( format->hasProperty(Format::PTopBorder, true) ) );
- new QListViewItem( flags, "Border (bottom)",
+ new TQListViewItem( flags, "Border (bottom)",
boolAsString( format->hasProperty(Format::PBottomBorder, true) ) );
- new QListViewItem( formatView, "Border pen width (bottom)",
- QString::number( format->bottomBorderPen(col,row).width() ) );
+ new TQListViewItem( formatView, "Border pen width (bottom)",
+ TQString::number( format->bottomBorderPen(col,row).width() ) );
}
void Inspector::Private::handleStyle() // direct style access
@@ -150,26 +150,26 @@ void Inspector::Private::handleStyle() // direct style access
styleView->clear();
const Style* style = cell->format()->style();
- QListViewItem* flags = new QListViewItem( styleView, "Flags" );
- new QListViewItem( flags, "Border (left)",
+ TQListViewItem* flags = new TQListViewItem( styleView, "Flags" );
+ new TQListViewItem( flags, "Border (left)",
boolAsString( style->hasFeature(Style::SLeftBorder, true) ) );
- new QListViewItem( flags, "Border (right)",
+ new TQListViewItem( flags, "Border (right)",
boolAsString( style->hasFeature(Style::SRightBorder, true) ) );
- new QListViewItem( flags, "Border (top)",
+ new TQListViewItem( flags, "Border (top)",
boolAsString( style->hasFeature(Style::STopBorder, true) ) );
- new QListViewItem( flags, "Border (bottom)",
+ new TQListViewItem( flags, "Border (bottom)",
boolAsString( style->hasFeature(Style::SBottomBorder, true) ) );
- new QListViewItem( styleView, "Border pen width (bottom)",
- QString::number( style->bottomBorderPen().width() ) );
+ new TQListViewItem( styleView, "Border pen width (bottom)",
+ TQString::number( style->bottomBorderPen().width() ) );
}
void Inspector::Private::handleSheet()
{
sheetView->clear();
- new QListViewItem( sheetView, "Name", sheet->sheetName() ) ;
- new QListViewItem( sheetView, "Layout Direction", dirAsString( sheet->layoutDirection() ) );
+ new TQListViewItem( sheetView, "Name", sheet->sheetName() ) ;
+ new TQListViewItem( sheetView, "Layout Direction", dirAsString( sheet->tqlayoutDirection() ) );
}
void Inspector::Private::handleDep()
@@ -180,19 +180,19 @@ void Inspector::Private::handleDep()
cellPoint.setColumn( cell->column() );
DependencyManager* manager = sheet->dependencies();
- QValueList<Point> deps = manager->getDependants( cellPoint );
+ TQValueList<Point> deps = manager->getDependants( cellPoint );
depView->clear();
for( unsigned i = 0; i < deps.count(); i++ )
{
- QString k1, k2;
+ TQString k1, k2;
Point point = deps[i];
int row = point.row();
int column = point.column();
k1 = Cell::fullName( point.sheet(), column, row );
- new QListViewItem( depView, k1, k2 );
+ new TQListViewItem( depView, k1, k2 );
}
}
@@ -207,37 +207,37 @@ Inspector::Inspector( Cell* cell ):
d->format = cell->format();
d->sheet = cell->sheet();
- QFrame* cellPage = addPage( QString("Cell") );
- QVBoxLayout* cellLayout = new QVBoxLayout( cellPage, 0 );
- d->cellView = new QListView( cellPage );
+ TQFrame* cellPage = addPage( TQString("Cell") );
+ TQVBoxLayout* cellLayout = new TQVBoxLayout( cellPage, 0 );
+ d->cellView = new TQListView( cellPage );
cellLayout->addWidget( d->cellView );
d->cellView->addColumn( "Key", 150 );
d->cellView->addColumn( "Value" );
- QFrame* formatPage = addPage( QString("Format") );
- QVBoxLayout* formatLayout = new QVBoxLayout( formatPage, 0 );
- d->formatView = new QListView( formatPage );
+ TQFrame* formatPage = addPage( TQString("Format") );
+ TQVBoxLayout* formatLayout = new TQVBoxLayout( formatPage, 0 );
+ d->formatView = new TQListView( formatPage );
formatLayout->addWidget( d->formatView );
d->formatView->addColumn( "Key", 150 );
d->formatView->addColumn( "Value" );
- QFrame* stylePage = addPage( QString("Style") );
- QVBoxLayout* styleLayout = new QVBoxLayout( stylePage, 0 );
- d->styleView = new QListView( stylePage );
+ TQFrame* stylePage = addPage( TQString("Style") );
+ TQVBoxLayout* styleLayout = new TQVBoxLayout( stylePage, 0 );
+ d->styleView = new TQListView( stylePage );
styleLayout->addWidget( d->styleView );
d->styleView->addColumn( "Key", 150 );
d->styleView->addColumn( "Value" );
- QFrame* sheetPage = addPage( QString("Sheet") );
- QVBoxLayout* sheetLayout = new QVBoxLayout( sheetPage, 0 );
- d->sheetView = new QListView( sheetPage );
+ TQFrame* sheetPage = addPage( TQString("Sheet") );
+ TQVBoxLayout* sheetLayout = new TQVBoxLayout( sheetPage, 0 );
+ d->sheetView = new TQListView( sheetPage );
sheetLayout->addWidget( d->sheetView );
d->sheetView->addColumn( "Key", 150 );
d->sheetView->addColumn( "Value" );
- QFrame* depPage = addPage( QString("Dependencies") );
- QVBoxLayout* depLayout = new QVBoxLayout( depPage, 0 );
- d->depView = new QListView( depPage );
+ TQFrame* depPage = addPage( TQString("Dependencies") );
+ TQVBoxLayout* depLayout = new TQVBoxLayout( depPage, 0 );
+ d->depView = new TQListView( depPage );
depLayout->addWidget( d->depView );
d->depView->addColumn( "Cell", 150 );
d->depView->addColumn( "Content" );
diff --git a/kspread/tests/inspector.h b/kspread/tests/inspector.h
index dd5d663e..ea4e183a 100644
--- a/kspread/tests/inspector.h
+++ b/kspread/tests/inspector.h
@@ -29,6 +29,7 @@ class Cell;
class Inspector : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
Inspector( Cell* cell );
diff --git a/kspread/tests/test_formula.cc b/kspread/tests/test_formula.cc
index 75aff4b9..93acc86f 100644
--- a/kspread/tests/test_formula.cc
+++ b/kspread/tests/test_formula.cc
@@ -34,9 +34,9 @@ void run( Tester* test )
if ( failed )
{
kdDebug() << test->failed() << " of " << test->count() << " tests failed:" << endl;
- QStringList errors = test->errors();
- QStringList::ConstIterator end = errors.end();
- for (QStringList::ConstIterator it = errors.begin(); it != end; ++it )
+ TQStringList errors = test->errors();
+ TQStringList::ConstIterator end = errors.end();
+ for (TQStringList::ConstIterator it = errors.begin(); it != end; ++it )
{
kdDebug() << (*it) << endl;
}
diff --git a/kspread/tests/tester.cc b/kspread/tests/tester.cc
index 91ce7fd4..05df95d1 100644
--- a/kspread/tests/tester.cc
+++ b/kspread/tests/tester.cc
@@ -19,8 +19,8 @@
#include "tester.h"
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
using namespace KSpread;
@@ -34,7 +34,7 @@ unsigned Tester::count() const
return testCount;
}
-QStringList Tester::errors() const
+TQStringList Tester::errors() const
{
return errorList;
}
@@ -44,10 +44,10 @@ unsigned Tester::failed() const
return errorList.count();
}
-void Tester::fail( const char *file, int line, const QString& msg )
+void Tester::fail( const char *file, int line, const TQString& msg )
{
- QString error;
- QTextStream ts( &error, IO_WriteOnly );
+ TQString error;
+ TQTextStream ts( &error, IO_WriteOnly );
ts << file << "["<< line <<"]: " << msg;
errorList.append( error );
}
diff --git a/kspread/tests/tester.h b/kspread/tests/tester.h
index 614a93e5..f97f3009 100644
--- a/kspread/tests/tester.h
+++ b/kspread/tests/tester.h
@@ -20,8 +20,8 @@
#ifndef KSPREAD_TESTER
#define KSPREAD_TESTER
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
namespace KSpread
{
@@ -33,16 +33,16 @@ public:
virtual ~Tester() {;};
public:
- virtual QString name() = 0;
+ virtual TQString name() = 0;
virtual void run() = 0;
unsigned count() const;
unsigned failed() const;
- QStringList errors() const;
+ TQStringList errors() const;
protected:
- void fail( const char *file, int line, const QString& msg );
+ void fail( const char *file, int line, const TQString& msg );
int testCount;
- QStringList errorList;
+ TQStringList errorList;
};
}
diff --git a/kspread/tests/testrunner.cc b/kspread/tests/testrunner.cc
index a011e527..71d3fcdb 100644
--- a/kspread/tests/testrunner.cc
+++ b/kspread/tests/testrunner.cc
@@ -19,11 +19,11 @@
#include "testrunner.h"
-#include <qapplication.h>
-#include <qdict.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtextedit.h>
+#include <tqapplication.h>
+#include <tqdict.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtextedit.h>
#include <kcombobox.h>
#include <kdialogbase.h>
@@ -40,10 +40,10 @@ namespace KSpread
class TestRunner::Private
{
public:
- QDict<Tester> testers;
+ TQDict<Tester> testers;
KComboBox* testType;
KPushButton* runButton;
- QTextEdit* logView;
+ TQTextEdit* logView;
};
}
@@ -57,27 +57,27 @@ TestRunner::TestRunner():
{
d = new Private;
- QFrame* mainWidget = plainPage();
- QGridLayout* layout = new QGridLayout( mainWidget, 3, 4, marginHint(), spacingHint() );
+ TQFrame* mainWidget = plainPage();
+ TQGridLayout* tqlayout = new TQGridLayout( mainWidget, 3, 4, marginHint(), spacingHint() );
setMinimumSize( 360, 230 );
- QLabel* typeLabel = new QLabel( "Type of Test:", mainWidget );
- layout->addWidget( typeLabel, 0, 0 );
+ TQLabel* typeLabel = new TQLabel( "Type of Test:", mainWidget );
+ tqlayout->addWidget( typeLabel, 0, 0 );
d->testType = new KComboBox( mainWidget );
- layout->addWidget( d->testType, 0, 1 );
+ tqlayout->addWidget( d->testType, 0, 1 );
- QSpacerItem* spacerItem = new QSpacerItem( 10, 10, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout->addItem( spacerItem, 0, 2 );
+ TQSpacerItem* tqspacerItem = new TQSpacerItem( 10, 10, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ tqlayout->addItem( tqspacerItem, 0, 2 );
d->runButton = new KPushButton( "Run", mainWidget );
- layout->addWidget( d->runButton, 0, 3 );
+ tqlayout->addWidget( d->runButton, 0, 3 );
- d->logView = new QTextEdit( mainWidget );
- layout->addMultiCellWidget( d->logView, 2, 2, 0, 3 );
- d->logView->setTextFormat( Qt::LogText );
+ d->logView = new TQTextEdit( mainWidget );
+ tqlayout->addMultiCellWidget( d->logView, 2, 2, 0, 3 );
+ d->logView->setTextFormat( TQt::LogText );
- QObject::connect( d->runButton, SIGNAL( clicked() ), this, SLOT( runTest() ) );
+ TQObject::connect( d->runButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( runTest() ) );
// add all tests here !!
addTester( new ValueTester() );
@@ -89,7 +89,7 @@ TestRunner::TestRunner():
TestRunner::~TestRunner()
{
- QDictIterator<Tester> it( d->testers );
+ TQDictIterator<Tester> it( d->testers );
for( ; it.current(); ++it ) delete it.current();
delete d;
}
@@ -103,27 +103,27 @@ void TestRunner::addTester( Tester* tester )
void TestRunner::runTest()
{
- QString testName = d->testType->currentText();
- Tester* tester = d->testers.find( testName );
+ TQString testName = d->testType->currentText();
+ Tester* tester = d->testers.tqfind( testName );
if( tester )
{
d->logView->clear();
- d->logView->append( QString("Test: %1").arg( testName ) );
+ d->logView->append( TQString("Test: %1").tqarg( testName ) );
- QApplication::setOverrideCursor(Qt::waitCursor);
+ TQApplication::setOverrideCursor(TQt::waitCursor);
tester->run();
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
- QStringList errorList = tester->errors();
+ TQStringList errorList = tester->errors();
if( tester->failed() )
{
- d->logView->append( QString( "%1 tests, <b>%2 failed.</b>").arg( tester->count() ).
+ d->logView->append( TQString( "%1 tests, <b>%2 failed.</b>").tqarg( tester->count() ).
arg( tester->failed() ) );
for( unsigned k = 0; k < errorList.count(); k++ )
d->logView->append( errorList[k] );
}
else
- d->logView->append( QString( "%1 tests, everything is OK. ").arg( tester->count() ) );
+ d->logView->append( TQString( "%1 tests, everything is OK. ").tqarg( tester->count() ) );
d->logView->append( "Test finished." );
}
diff --git a/kspread/tests/testrunner.h b/kspread/tests/testrunner.h
index 0ee3a9e9..fd692af3 100644
--- a/kspread/tests/testrunner.h
+++ b/kspread/tests/testrunner.h
@@ -30,6 +30,7 @@ class Tester;
class TestRunner : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
TestRunner();
diff --git a/kspread/tests/value_tester.cc b/kspread/tests/value_tester.cc
index ce24b8ba..84e9e563 100644
--- a/kspread/tests/value_tester.cc
+++ b/kspread/tests/value_tester.cc
@@ -25,7 +25,7 @@
#include <kspread_value.h>
#define CHECK(x,y) check(__FILE__,__LINE__,#x,x,y)
-#define CHECK_DATE(d,x) check(__FILE__,__LINE__,d->asDate().toString().latin1(),d->asFloat(),x)
+#define CHECK_DATE(d,x) check(__FILE__,__LINE__,TQString(d->asDate().toString()).latin1(),d->asFloat(),x)
using namespace KSpread;
@@ -33,9 +33,9 @@ ValueTester::ValueTester(): Tester()
{
}
-QString ValueTester::name()
+TQString ValueTester::name()
{
- return QString("Value");
+ return TQString("Value");
}
template<typename T>
@@ -45,8 +45,8 @@ void ValueTester::check( const char *file, int line, const char* msg, const T& r
testCount++;
if( result != expected )
{
- QString message;
- QTextStream ts( &message, IO_WriteOnly );
+ TQString message;
+ TQTextStream ts( &message, IO_WriteOnly );
ts << msg;
ts << " Result:";
ts << result;
@@ -62,8 +62,8 @@ void ValueTester::check( const char *file, int line, const char* msg, bool resul
testCount++;
if( result != expected )
{
- QString message;
- QTextStream ts( &message, IO_WriteOnly );
+ TQString message;
+ TQTextStream ts( &message, IO_WriteOnly );
ts << msg;
ts << " Result: ";
if( result ) ts << "True"; else ts << "False";
@@ -136,29 +136,29 @@ void ValueTester::run()
delete v1;
// string value
- v1 = new Value( QString("Ailinon" ) );
+ v1 = new Value( TQString("Ailinon" ) );
CHECK( v1->type(), Value::String );
- CHECK( v1->asString(), QString("Ailinon" ) );
+ CHECK( v1->asString(), TQString("Ailinon" ) );
v1->setValue( 7 ); // dummy
- v1->setValue( QString("spreadsheet" ) );
+ v1->setValue( TQString("spreadsheet" ) );
CHECK( v1->type(), Value::String );
CHECK( v1->isInteger(), false );
CHECK( v1->isFloat(), false );
CHECK( v1->isString(), true );
CHECK( v1->isNumber(), false );
- CHECK( v1->asString(), QString("spreadsheet" ) );
+ CHECK( v1->asString(), TQString("spreadsheet" ) );
delete v1;
// check all (valid) dates from 1900 to 2050
// note: bail on first error immediately
- QDate refDate( 1899, 12, 31 );
+ TQDate refDate( 1899, 12, 31 );
v1 = new Value();
bool date_error = 0;
for( unsigned y = 1900; !date_error && y < 2050; y++ )
for( unsigned m = 1; !date_error && m <= 12; m++ )
for( unsigned d = 1; !date_error && d <= 31; d++ )
{
- QDate dv1 = QDate( y, m, d );
+ TQDate dv1 = TQDate( y, m, d );
if( !dv1.isValid() ) continue;
double serialNo = -dv1.daysTo( refDate ) + 1.0;
v1->setValue( dv1 );
@@ -168,16 +168,16 @@ void ValueTester::run()
// time value
v1 = new Value();
- v1->setValue( QTime( 0, 0, 0 ) );
+ v1->setValue( TQTime( 0, 0, 0 ) );
CHECK( v1->type(), Value::Integer );
int time_error = 0; // used to save time, bail on first error
for( unsigned h = 0; !time_error && h < 24; h++ )
for( unsigned m = 0; !time_error && m < 60; m++ )
for( unsigned s = 0; !time_error && s < 60; s++ )
{
- QTime t1 = QTime( h, m, s );
+ TQTime t1 = TQTime( h, m, s );
v1->setValue( t1 );
- QTime t2 = v1->asTime();
+ TQTime t2 = v1->asTime();
if( t1.hour() != t2.hour() ) time_error++;
if( t1.minute() != t2.minute() ) time_error++;
if( t1.second() != t2.second() ) time_error++;
@@ -188,14 +188,14 @@ void ValueTester::run()
// time value (msec)
v1 = new Value();
- v1->setValue( QTime( 0, 0, 0 ) );
+ v1->setValue( TQTime( 0, 0, 0 ) );
CHECK( v1->type(), Value::Integer );
int msec_error = 0; // used to save time, bail on first error
for( unsigned ms= 0;ms < 1000;ms++ )
{
- QTime t1 = QTime( 1, 14, 2, ms );
+ TQTime t1 = TQTime( 1, 14, 2, ms );
v1->setValue( t1 );
- QTime t2 = v1->asTime();
+ TQTime t2 = v1->asTime();
if( t1.hour() != t2.hour() ) msec_error++;
if( t1.minute() != t2.minute() ) msec_error++;
if( t1.second() != t2.second() ) msec_error++;
diff --git a/kspread/tests/value_tester.h b/kspread/tests/value_tester.h
index bcfd75d0..f7cf6110 100644
--- a/kspread/tests/value_tester.h
+++ b/kspread/tests/value_tester.h
@@ -20,7 +20,7 @@
#ifndef KSPREAD_VALUE_TESTER
#define KSPREAD_VALUE_TESTER
-#include <qstring.h>
+#include <tqstring.h>
#include "tester.h"
@@ -31,7 +31,7 @@ class ValueTester: public KSpread::Tester
{
public:
ValueTester();
- virtual QString name();
+ virtual TQString name();
virtual void run();
private:
template<typename T>
diff --git a/kspread/valuecalc.cc b/kspread/valuecalc.cc
index ab7e6420..3a1182e5 100644
--- a/kspread/valuecalc.cc
+++ b/kspread/valuecalc.cc
@@ -723,7 +723,7 @@ Value ValueCalc::base (const Value &val, int base, int prec)
return Value::errorVALUE();
double value = converter->asFloat (val).asFloat();
- QString result = QString::number ((int)value, base);
+ TQString result = TQString::number ((int)value, base);
if (prec > 0)
{
@@ -743,7 +743,7 @@ Value ValueCalc::base (const Value &val, int base, int prec)
Value ValueCalc::fromBase (const Value &val, int base)
{
- QString str = converter->asString (val).asString();
+ TQString str = converter->asString (val).asString();
bool ok;
double num = str.toLong (&ok, base);
if (ok)
@@ -1557,7 +1557,7 @@ void ValueCalc::arrayWalk (const Value &range,
}
}
-void ValueCalc::arrayWalk (QValueVector<Value> &range,
+void ValueCalc::arrayWalk (TQValueVector<Value> &range,
Value &res, arrayWalkFunc func, Value param)
{
if (res.isError()) return;
@@ -1598,8 +1598,8 @@ void ValueCalc::twoArrayWalk (const Value &a1, const Value &a2,
}
}
-void ValueCalc::twoArrayWalk (QValueVector<Value> &a1,
- QValueVector<Value> &a2, Value &res, arrayWalkFunc func)
+void ValueCalc::twoArrayWalk (TQValueVector<Value> &a1,
+ TQValueVector<Value> &a2, Value &res, arrayWalkFunc func)
{
if (res.isError()) return;
if (a1.count() != a2.count()) {
@@ -1610,14 +1610,14 @@ void ValueCalc::twoArrayWalk (QValueVector<Value> &a1,
twoArrayWalk (a1[i], a2[i], res, func);
}
-arrayWalkFunc ValueCalc::awFunc (const QString &name)
+arrayWalkFunc ValueCalc::awFunc (const TQString &name)
{
if (awFuncs.count(name))
return awFuncs[name];
return 0;
}
-void ValueCalc::registerAwFunc (const QString &name, arrayWalkFunc func)
+void ValueCalc::registerAwFunc (const TQString &name, arrayWalkFunc func)
{
awFuncs[name] = func;
}
@@ -1631,7 +1631,7 @@ Value ValueCalc::sum (const Value &range, bool full)
return res;
}
-Value ValueCalc::sum (QValueVector<Value> range, bool full)
+Value ValueCalc::sum (TQValueVector<Value> range, bool full)
{
Value res;
arrayWalk (range, res, awFunc (full ? "suma" : "sum"), 0);
@@ -1686,7 +1686,7 @@ int ValueCalc::count (const Value &range, bool full)
return converter->asInteger (res).asInteger ();
}
-int ValueCalc::count (QValueVector<Value> range, bool full)
+int ValueCalc::count (TQValueVector<Value> range, bool full)
{
Value res = 0;
arrayWalk (range, res, awFunc (full ? "counta" : "count"), 0);
@@ -1729,7 +1729,7 @@ Value ValueCalc::avg (const Value &range, bool full)
return Value (0.0);
}
-Value ValueCalc::avg (QValueVector<Value> range, bool full)
+Value ValueCalc::avg (TQValueVector<Value> range, bool full)
{
int cnt = count (range, full);
if (cnt)
@@ -1744,7 +1744,7 @@ Value ValueCalc::max (const Value &range, bool full)
return res;
}
-Value ValueCalc::max (QValueVector<Value> range, bool full)
+Value ValueCalc::max (TQValueVector<Value> range, bool full)
{
Value res;
arrayWalk (range, res, awFunc (full ? "maxa" : "max"), 0);
@@ -1758,7 +1758,7 @@ Value ValueCalc::min (const Value &range, bool full)
return res;
}
-Value ValueCalc::min (QValueVector<Value> range, bool full)
+Value ValueCalc::min (TQValueVector<Value> range, bool full)
{
Value res;
arrayWalk (range, res, awFunc (full ? "mina" : "min"), 0);
@@ -1779,7 +1779,7 @@ Value ValueCalc::product (const Value &range, Value init,
return res;
}
-Value ValueCalc::product (QValueVector<Value> range,
+Value ValueCalc::product (TQValueVector<Value> range,
Value init, bool full)
{
Value res = init;
@@ -1807,12 +1807,12 @@ Value ValueCalc::stddev (const Value &range, Value avg,
return sqrt (div (res, cnt-1));
}
-Value ValueCalc::stddev (QValueVector<Value> range, bool full)
+Value ValueCalc::stddev (TQValueVector<Value> range, bool full)
{
return stddev (range, avg (range, full), full);
}
-Value ValueCalc::stddev (QValueVector<Value> range,
+Value ValueCalc::stddev (TQValueVector<Value> range,
Value avg, bool full)
{
Value res;
@@ -1835,12 +1835,12 @@ Value ValueCalc::stddevP (const Value &range, Value avg,
return sqrt (div (res, cnt));
}
-Value ValueCalc::stddevP (QValueVector<Value> range, bool full)
+Value ValueCalc::stddevP (TQValueVector<Value> range, bool full)
{
return stddevP (range, avg (range, full), full);
}
-Value ValueCalc::stddevP (QValueVector<Value> range,
+Value ValueCalc::stddevP (TQValueVector<Value> range,
Value avg, bool full)
{
Value res;
@@ -1870,7 +1870,7 @@ void ValueCalc::getCond (Condition &cond, Value val)
cond.value = converter->asFloat (val).asFloat();
return;
}
- QString text = converter->asString (val).asString();
+ TQString text = converter->asString (val).asString();
cond.comp = isEqual;
text = text.stripWhiteSpace();
@@ -1959,7 +1959,7 @@ bool ValueCalc::matches (const Condition &cond, Value val)
break;
}
} else {
- QString d = converter->asString (val).asString();
+ TQString d = converter->asString (val).asString();
switch ( cond.comp )
{
case isEqual:
diff --git a/kspread/valuecalc.h b/kspread/valuecalc.h
index e62bd2ed..2d78211b 100644
--- a/kspread/valuecalc.h
+++ b/kspread/valuecalc.h
@@ -22,8 +22,8 @@
#include <map>
-#include <qvaluelist.h>
-#include <qvaluevector.h>
+#include <tqvaluelist.h>
+#include <tqvaluevector.h>
#include "kspread_value.h"
@@ -42,11 +42,11 @@ struct Condition
Comp comp;
int index;
double value;
- QString stringValue;
+ TQString stringValue;
Type type;
};
-typedef QValueList<Condition> ConditionList;
+typedef TQValueList<Condition> ConditionList;
typedef void (*arrayWalkFunc) (ValueCalc *, Value &result,
Value val, Value param);
@@ -199,14 +199,14 @@ class ValueCalc {
arrayWalkFunc func, Value param);
/** Walk the array in function-like style.
This method is here to avoid duplication in function handlers. */
- void arrayWalk (QValueVector<Value> &range, Value &res,
+ void arrayWalk (TQValueVector<Value> &range, Value &res,
arrayWalkFunc func, Value param);
void twoArrayWalk (const Value &a1, const Value &a2,
Value &res, arrayWalkFunc func);
- void twoArrayWalk (QValueVector<Value> &a1,
- QValueVector<Value> &a2, Value &res, arrayWalkFunc func);
- arrayWalkFunc awFunc (const QString &name);
- void registerAwFunc (const QString &name, arrayWalkFunc func);
+ void twoArrayWalk (TQValueVector<Value> &a1,
+ TQValueVector<Value> &a2, Value &res, arrayWalkFunc func);
+ arrayWalkFunc awFunc (const TQString &name);
+ void registerAwFunc (const TQString &name, arrayWalkFunc func);
/** basic range functions */
// if full is true, A-version is used (means string/bool values included)
@@ -229,18 +229,18 @@ class ValueCalc {
bool full = true);
/** range functions using value lists */
- Value sum (QValueVector<Value> range, bool full = true);
- int count (QValueVector<Value> range, bool full = true);
- Value avg (QValueVector<Value> range, bool full = true);
- Value max (QValueVector<Value> range, bool full = true);
- Value min (QValueVector<Value> range, bool full = true);
- Value product (QValueVector<Value> range, Value init,
+ Value sum (TQValueVector<Value> range, bool full = true);
+ int count (TQValueVector<Value> range, bool full = true);
+ Value avg (TQValueVector<Value> range, bool full = true);
+ Value max (TQValueVector<Value> range, bool full = true);
+ Value min (TQValueVector<Value> range, bool full = true);
+ Value product (TQValueVector<Value> range, Value init,
bool full = true);
- Value stddev (QValueVector<Value> range, bool full = true);
- Value stddev (QValueVector<Value> range, Value avg,
+ Value stddev (TQValueVector<Value> range, bool full = true);
+ Value stddev (TQValueVector<Value> range, Value avg,
bool full = true);
- Value stddevP (QValueVector<Value> range, bool full = true);
- Value stddevP (QValueVector<Value> range, Value avg,
+ Value stddevP (TQValueVector<Value> range, bool full = true);
+ Value stddevP (TQValueVector<Value> range, Value avg,
bool full = true);
/**
@@ -263,7 +263,7 @@ class ValueCalc {
Doc *_doc;
/** registered array-walk functions */
- std::map<QString, arrayWalkFunc> awFuncs;
+ std::map<TQString, arrayWalkFunc> awFuncs;
};
} //namespace KSpread
diff --git a/kspread/valueconverter.cc b/kspread/valueconverter.cc
index ec60ee05..1aeb25db 100644
--- a/kspread/valueconverter.cc
+++ b/kspread/valueconverter.cc
@@ -157,13 +157,13 @@ Value ValueConverter::asString (const Value &value) const
// as we sometimes want to generate the string differently ...
Value val;
- QString s;
+ TQString s;
Value::Format fmt;
- QChar decimal_point;
+ TQChar decimal_point;
int pos;
switch (value.type()) {
case Value::Empty:
- val = QString::null;
+ val = TQString();
break;
case Value::Boolean:
val.setValue (value.asBoolean() ? parser->locale()->translate ("True") :
@@ -173,7 +173,7 @@ Value ValueConverter::asString (const Value &value) const
{
fmt = value.format();
if (fmt == Value::fmt_Percent)
- val = QString::number (value.asInteger() * 100) + " %";
+ val = TQString::number (value.asInteger() * 100) + " %";
else if (fmt == Value::fmt_DateTime)
val = parser->locale()->formatDateTime (value.asDateTime());
else if (fmt == Value::fmt_Date)
@@ -181,7 +181,7 @@ Value ValueConverter::asString (const Value &value) const
else if (fmt == Value::fmt_Time)
val = parser->locale()->formatTime (value.asTime());
else
- val = QString::number (value.asInteger());
+ val = TQString::number (value.asInteger());
}
break;
case Value::Float:
@@ -195,10 +195,10 @@ Value ValueConverter::asString (const Value &value) const
else
{
//convert the number, change decimal point from English to local
- s = QString::number (value.asFloat(), 'g', 10);
+ s = TQString::number (value.asFloat(), 'g', 10);
decimal_point = parser->locale()->decimalSymbol()[0];
- if (decimal_point && ((pos = s.find ('.')) != -1))
- s = s.replace (pos, 1, decimal_point);
+ if (decimal_point && ((pos = s.tqfind ('.')) != -1))
+ s = s.tqreplace (pos, 1, decimal_point);
if (fmt == Value::fmt_Percent)
s += " %";
val.setValue (s);
@@ -228,11 +228,11 @@ Value ValueConverter::asDateTime (const Value &value) const
switch (value.type()) {
case Value::Empty:
- val.setValue (QDateTime::currentDateTime());
+ val.setValue (TQDateTime::tqcurrentDateTime());
break;
case Value::Boolean:
//ignore the bool value... any better idea? ;)
- val.setValue (QDateTime::currentDateTime());
+ val.setValue (TQDateTime::tqcurrentDateTime());
break;
case Value::Integer:
val.setValue (value.asFloat());
@@ -269,11 +269,11 @@ Value ValueConverter::asDate (const Value &value) const
switch (value.type()) {
case Value::Empty:
- val.setValue (QDate::currentDate());
+ val.setValue (TQDate::tqcurrentDate());
break;
case Value::Boolean:
//ignore the bool value... any better idea? ;)
- val.setValue (QDate::currentDate());
+ val.setValue (TQDate::tqcurrentDate());
break;
case Value::Integer:
val.setValue (value.asFloat());
@@ -308,11 +308,11 @@ Value ValueConverter::asTime (const Value &value) const
switch (value.type()) {
case Value::Empty:
- val.setValue (QTime::currentTime());
+ val.setValue (TQTime::currentTime());
break;
case Value::Boolean:
//ignore the bool value... any better idea? ;)
- val.setValue (QTime::currentTime());
+ val.setValue (TQTime::currentTime());
break;
case Value::Integer:
val.setValue (value.asInteger());
diff --git a/kspread/valueformatter.cc b/kspread/valueformatter.cc
index ac2119f3..1bef11e2 100644
--- a/kspread/valueformatter.cc
+++ b/kspread/valueformatter.cc
@@ -38,36 +38,36 @@ ValueFormatter::ValueFormatter (ValueConverter *conv) : converter( conv )
{
}
-QString ValueFormatter::formatText (Cell *cell, FormatType fmtType)
+TQString ValueFormatter::formatText (Cell *cell, FormatType fmtType)
{
if (cell->hasError ())
return errorFormat (cell);
- QString str;
+ TQString str;
Format::FloatFormat floatFormat =
cell->format()->floatFormat (cell->column(), cell->row());
int precision = cell->format()->precision (cell->column(), cell->row());
- QString prefix = cell->format()->prefix (cell->column(), cell->row());
- QString postfix = cell->format()->postfix (cell->column(), cell->row());
+ TQString prefix = cell->format()->prefix (cell->column(), cell->row());
+ TQString postfix = cell->format()->postfix (cell->column(), cell->row());
Format::Currency currency;
bool valid = cell->format()->currencyInfo(currency);
- QString currencySymbol = valid ? currency.symbol : QString::null;
+ TQString currencySymbol = valid ? currency.symbol : TQString();
return formatText (cell->value(), fmtType, precision,
floatFormat, prefix, postfix, currencySymbol);
}
-QString ValueFormatter::formatText (const Value &value,
+TQString ValueFormatter::formatText (const Value &value,
FormatType fmtType, int precision, Format::FloatFormat floatFormat,
- const QString &prefix, const QString &postfix, const QString &currencySymbol)
+ const TQString &prefix, const TQString &postfix, const TQString &currencySymbol)
{
//if we have an array, use its first element
if (value.isArray())
return formatText (value.element (0, 0), fmtType, precision,
floatFormat, prefix, postfix, currencySymbol);
- QString str;
+ TQString str;
//step 1: determine formatting that will be used
fmtType = determineFormatting (value, fmtType);
@@ -112,7 +112,7 @@ QString ValueFormatter::formatText (const Value &value,
// unless the number has no decimal point
if (precision == -1)
{
- QChar decimal_point = converter->locale()->decimalSymbol()[0];
+ TQChar decimal_point = converter->locale()->decimalSymbol()[0];
if ( decimal_point.isNull() )
decimal_point = '.';
@@ -199,20 +199,20 @@ FormatType ValueFormatter::determineFormatting (const Value &value,
}
-void ValueFormatter::removeTrailingZeros (QString &str, QChar decimal_point)
+void ValueFormatter::removeTrailingZeros (TQString &str, TQChar decimal_point)
{
- if (str.find (decimal_point) < 0)
+ if (str.tqfind (decimal_point) < 0)
//no decimal point -> nothing to do
return;
int start = 0;
int cslen = converter->locale()->currencySymbol().length();
- if (str.find ('%') != -1)
+ if (str.tqfind ('%') != -1)
start = 2;
- else if (str.find (converter->locale()->currencySymbol()) ==
+ else if (str.tqfind (converter->locale()->currencySymbol()) ==
((int) (str.length() - cslen)))
start = cslen + 1;
- else if ((start = str.find ('E')) != -1)
+ else if ((start = str.tqfind ('E')) != -1)
start = str.length() - start;
else
start = 0;
@@ -221,7 +221,7 @@ void ValueFormatter::removeTrailingZeros (QString &str, QChar decimal_point)
bool bFinished = false;
while ( !bFinished && i > 0 )
{
- QChar ch = str[i - 1];
+ TQChar ch = str[i - 1];
if (ch == '0')
str.remove (--i,1);
else
@@ -233,14 +233,14 @@ void ValueFormatter::removeTrailingZeros (QString &str, QChar decimal_point)
}
}
-QString ValueFormatter::createNumberFormat ( double value, int precision,
- FormatType fmt, bool alwaysSigned, const QString& currencySymbol)
+TQString ValueFormatter::createNumberFormat ( double value, int precision,
+ FormatType fmt, bool alwaysSigned, const TQString& currencySymbol)
{
// if precision is -1, ask for a huge number of decimals, we'll remove
// the zeros later. Is 8 ok ?
// Stefan: No. Use maximum possible decimal precision (DBL_DIG) instead.
int p = (precision == -1) ? 8 : precision;
- QString localizedNumber;
+ TQString localizedNumber;
int pos = 0;
//multiply value by 100 for percentage format
@@ -261,7 +261,7 @@ QString ValueFormatter::createNumberFormat ( double value, int precision,
if( neg ) value = -value;
}
- QChar decimal_point;
+ TQChar decimal_point;
switch (fmt)
{
case Number_format:
@@ -276,9 +276,9 @@ QString ValueFormatter::createNumberFormat ( double value, int precision,
break;
case Scientific_format:
decimal_point = converter->locale()->decimalSymbol()[0];
- localizedNumber = QString::number (value, 'E', p);
- if ((pos = localizedNumber.find ('.')) != -1)
- localizedNumber = localizedNumber.replace (pos, 1, decimal_point);
+ localizedNumber = TQString::number (value, 'E', p);
+ if ((pos = localizedNumber.tqfind ('.')) != -1)
+ localizedNumber = localizedNumber.tqreplace (pos, 1, decimal_point);
break;
default :
//other formatting?
@@ -295,7 +295,7 @@ QString ValueFormatter::createNumberFormat ( double value, int precision,
return localizedNumber;
}
-QString ValueFormatter::fractionFormat (double value, FormatType fmtType)
+TQString ValueFormatter::fractionFormat (double value, FormatType fmtType)
{
double result = value - floor(value);
int index;
@@ -303,7 +303,7 @@ QString ValueFormatter::fractionFormat (double value, FormatType fmtType)
/* return w/o fraction part if not necessary */
if (result == 0)
- return QString::number(value);
+ return TQString::number(value);
switch (fmtType) {
case fraction_half:
@@ -338,7 +338,7 @@ QString ValueFormatter::fractionFormat (double value, FormatType fmtType)
break;
default:
kdDebug(36001) << "Error in Fraction format\n";
- return QString::number(value);
+ return TQString::number(value);
break;
} /* switch */
@@ -358,15 +358,15 @@ QString ValueFormatter::fractionFormat (double value, FormatType fmtType)
diff = fabs(result - calc);
}
}
- if( index1 == 0 ) return QString("%1").arg( floor(value) );
- if( index1 == index ) return QString("%1").arg( floor(value)+1 );
+ if( index1 == 0 ) return TQString("%1").tqarg( floor(value) );
+ if( index1 == index ) return TQString("%1").tqarg( floor(value)+1 );
if( floor(value) == 0)
- return QString("%1/%2").arg( index1 ).arg( index );
+ return TQString("%1/%2").tqarg( index1 ).tqarg( index );
- return QString("%1 %2/%3")
- .arg( floor(value) )
- .arg( index1 )
- .arg( index );
+ return TQString("%1 %2/%3")
+ .tqarg( floor(value) )
+ .tqarg( index1 )
+ .tqarg( index );
}
@@ -403,20 +403,20 @@ QString ValueFormatter::fractionFormat (double value, FormatType fmtType)
numerator = fabs(numerator);
if (denominator == numerator)
- return QString().setNum(floor(value + 1));
+ return TQString().setNum(floor(value + 1));
else
{
if ( floor(value) == 0 )
- return QString("%1/%2").arg(numerator).arg(denominator);
+ return TQString("%1/%2").tqarg(numerator).tqarg(denominator);
else
- return QString("%1 %2/%3")
- .arg(floor(value))
- .arg(numerator)
- .arg(denominator);
+ return TQString("%1 %2/%3")
+ .tqarg(floor(value))
+ .tqarg(numerator)
+ .tqarg(denominator);
}
}
-QString ValueFormatter::timeFormat (const QDateTime &dt, FormatType fmtType)
+TQString ValueFormatter::timeFormat (const TQDateTime &dt, FormatType fmtType)
{
if (fmtType == Time_format)
return converter->locale()->formatTime(dt.time(), false);
@@ -428,47 +428,47 @@ QString ValueFormatter::timeFormat (const QDateTime &dt, FormatType fmtType)
int m = dt.time().minute();
int s = dt.time().second();
- QString hour = ( h < 10 ? "0" + QString::number(h) : QString::number(h) );
- QString minute = ( m < 10 ? "0" + QString::number(m) : QString::number(m) );
- QString second = ( s < 10 ? "0" + QString::number(s) : QString::number(s) );
+ TQString hour = ( h < 10 ? "0" + TQString::number(h) : TQString::number(h) );
+ TQString minute = ( m < 10 ? "0" + TQString::number(m) : TQString::number(m) );
+ TQString second = ( s < 10 ? "0" + TQString::number(s) : TQString::number(s) );
bool pm = (h > 12);
- QString AMPM( pm ? i18n("PM"):i18n("AM") );
+ TQString AMPM( pm ? i18n("PM"):i18n("AM") );
if (fmtType == Time_format1) { // 9 : 01 AM
- return QString("%1:%2 %3")
- .arg((pm ? h - 12 : h),2)
- .arg(minute,2)
- .arg(AMPM);
+ return TQString("%1:%2 %3")
+ .tqarg((pm ? h - 12 : h),2)
+ .tqarg(minute,2)
+ .tqarg(AMPM);
}
if (fmtType == Time_format2) { //9:01:05 AM
- return QString("%1:%2:%3 %4")
- .arg((pm ? h-12 : h),2)
- .arg(minute,2)
- .arg(second,2)
- .arg(AMPM);
+ return TQString("%1:%2:%3 %4")
+ .tqarg((pm ? h-12 : h),2)
+ .tqarg(minute,2)
+ .tqarg(second,2)
+ .tqarg(AMPM);
}
if (fmtType == Time_format3) {
- return QString("%1 %2 %3 %4 %5 %6") // 9 h 01 min 28 s
- .arg(hour,2)
- .arg(i18n("h"))
- .arg(minute,2)
- .arg(i18n("min"))
- .arg(second,2)
- .arg(i18n("s"));
+ return TQString("%1 %2 %3 %4 %5 %6") // 9 h 01 min 28 s
+ .tqarg(hour,2)
+ .tqarg(i18n("h"))
+ .tqarg(minute,2)
+ .tqarg(i18n("min"))
+ .tqarg(second,2)
+ .tqarg(i18n("s"));
}
if (fmtType == Time_format4) { // 9:01
- return QString("%1:%2").arg(hour, 2).arg(minute, 2);
+ return TQString("%1:%2").tqarg(hour, 2).tqarg(minute, 2);
}
if (fmtType == Time_format5) { // 9:01:12
- return QString("%1:%2:%3").arg(hour, 2).arg(minute, 2).arg(second, 2);
+ return TQString("%1:%2:%3").tqarg(hour, 2).tqarg(minute, 2).tqarg(second, 2);
}
- QDate d1(dt.date());
- QDate d2( 1899, 12, 31 );
+ TQDate d1(dt.date());
+ TQDate d2( 1899, 12, 31 );
int d = d2.daysTo( d1 ) + 1;
h += d * 24;
@@ -476,23 +476,23 @@ QString ValueFormatter::timeFormat (const QDateTime &dt, FormatType fmtType)
if (fmtType == Time_format6)
{ // [mm]:ss
m += (h * 60);
- return QString("%1:%2").arg(m, 1).arg(second, 2);
+ return TQString("%1:%2").tqarg(m, 1).tqarg(second, 2);
}
if (fmtType == Time_format7) { // [h]:mm:ss
- return QString("%1:%2:%3").arg(h, 1).arg(minute, 2).arg(second, 2);
+ return TQString("%1:%2:%3").tqarg(h, 1).tqarg(minute, 2).tqarg(second, 2);
}
if (fmtType == Time_format8)
{ // [h]:mm
m += (h * 60);
- return QString("%1:%2").arg(h, 1).arg(minute, 2);
+ return TQString("%1:%2").tqarg(h, 1).tqarg(minute, 2);
}
return converter->locale()->formatTime( dt.time(), false );
}
-QString ValueFormatter::dateFormat (const QDate &date, FormatType fmtType)
+TQString ValueFormatter::dateFormat (const TQDate &date, FormatType fmtType)
{
- QString tmp;
+ TQString tmp;
if (fmtType == ShortDate_format) {
tmp = converter->locale()->formatDate(date, true);
}
@@ -500,121 +500,121 @@ QString ValueFormatter::dateFormat (const QDate &date, FormatType fmtType)
tmp = converter->locale()->formatDate(date, false);
}
else if (fmtType == date_format1) { /*18-Feb-99 */
- tmp = QString().sprintf("%02d", date.day());
+ tmp = TQString().sprintf("%02d", date.day());
tmp += "-" + converter->locale()->calendar()->monthString(date, true) + "-";
- tmp += QString::number(date.year()).right(2);
+ tmp += TQString::number(date.year()).right(2);
}
else if (fmtType == date_format2) { /*18-Feb-1999 */
- tmp = QString().sprintf("%02d", date.day());
+ tmp = TQString().sprintf("%02d", date.day());
tmp += "-" + converter->locale()->calendar()->monthString(date, true) + "-";
- tmp += QString::number(date.year());
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format3) { /*18-Feb */
- tmp = QString().sprintf("%02d", date.day());
+ tmp = TQString().sprintf("%02d", date.day());
tmp += "-" + converter->locale()->calendar()->monthString(date, true);
}
else if (fmtType == date_format4) { /*18-05 */
- tmp = QString().sprintf("%02d", date.day());
- tmp += "-" + QString().sprintf("%02d", date.month() );
+ tmp = TQString().sprintf("%02d", date.day());
+ tmp += "-" + TQString().sprintf("%02d", date.month() );
}
else if (fmtType == date_format5) { /*18/05/00 */
- tmp = QString().sprintf("%02d", date.day());
- tmp += "/" + QString().sprintf("%02d", date.month()) + "/";
- tmp += QString::number(date.year()).right(2);
+ tmp = TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString().sprintf("%02d", date.month()) + "/";
+ tmp += TQString::number(date.year()).right(2);
}
else if (fmtType == date_format6) { /*18/05/1999 */
- tmp = QString().sprintf("%02d", date.day());
- tmp += "/" + QString().sprintf("%02d", date.month()) + "/";
- tmp += QString::number(date.year());
+ tmp = TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString().sprintf("%02d", date.month()) + "/";
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format7) { /*Feb-99 */
tmp = converter->locale()->calendar()->monthString(date, true) + "-";
- tmp += QString::number(date.year()).right(2);
+ tmp += TQString::number(date.year()).right(2);
}
else if (fmtType == date_format8) { /*February-99 */
tmp = converter->locale()->calendar()->monthString(date, false) + "-";
- tmp += QString::number(date.year()).right(2);
+ tmp += TQString::number(date.year()).right(2);
}
else if (fmtType == date_format9) { /*February-1999 */
tmp = converter->locale()->calendar()->monthString(date, false) + "-";
- tmp += QString::number(date.year());
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format10) { /*F-99 */
- tmp = converter->locale()->calendar()->monthString(date, false).at(0) + "-";
- tmp += QString::number(date.year()).right(2);
+ tmp = converter->locale()->calendar()->monthString(date, false).tqat(0) + "-";
+ tmp += TQString::number(date.year()).right(2);
}
else if (fmtType == date_format11) { /*18/Feb */
- tmp = QString().sprintf("%02d", date.day()) + "/";
+ tmp = TQString().sprintf("%02d", date.day()) + "/";
tmp += converter->locale()->calendar()->monthString(date, true);
}
else if (fmtType == date_format12) { /*18/02 */
- tmp = QString().sprintf("%02d", date.day()) + "/";
- tmp += QString().sprintf("%02d", date.month());
+ tmp = TQString().sprintf("%02d", date.day()) + "/";
+ tmp += TQString().sprintf("%02d", date.month());
}
else if (fmtType == date_format13) { /*18/Feb/1999 */
- tmp = QString().sprintf("%02d", date.day());
+ tmp = TQString().sprintf("%02d", date.day());
tmp += "/" + converter->locale()->calendar()->monthString(date, true) + "/";
- tmp += QString::number(date.year());
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format14) { /*2000/Feb/18 */
- tmp = QString::number(date.year());
+ tmp = TQString::number(date.year());
tmp += "/" + converter->locale()->calendar()->monthString(date, true) + "/";
- tmp += QString().sprintf("%02d", date.day());
+ tmp += TQString().sprintf("%02d", date.day());
}
else if (fmtType == date_format15) { /*2000-Feb-18 */
- tmp = QString::number(date.year());
+ tmp = TQString::number(date.year());
tmp += "-" + converter->locale()->calendar()->monthString(date, true) + "-";
- tmp += QString().sprintf("%02d", date.day());
+ tmp += TQString().sprintf("%02d", date.day());
}
else if (fmtType == date_format16) { /*2000-02-18 */
- tmp = QString::number(date.year());
- tmp += "-" + QString().sprintf("%02d", date.month()) + "-";
- tmp += QString().sprintf("%02d", date.day());
+ tmp = TQString::number(date.year());
+ tmp += "-" + TQString().sprintf("%02d", date.month()) + "-";
+ tmp += TQString().sprintf("%02d", date.day());
}
else if (fmtType == date_format17) { /*2 february 2000 */
- tmp = QString().sprintf("%d", date.day());
+ tmp = TQString().sprintf("%d", date.day());
tmp += " " + converter->locale()->calendar()->monthString(date, false) + " ";
- tmp += QString::number(date.year());
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format18) { /*02/18/1999 */
- tmp = QString().sprintf("%02d", date.month());
- tmp += "/" + QString().sprintf("%02d", date.day());
- tmp += "/" + QString::number(date.year());
+ tmp = TQString().sprintf("%02d", date.month());
+ tmp += "/" + TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString::number(date.year());
}
else if (fmtType == date_format19) { /*02/18/99 */
- tmp = QString().sprintf("%02d", date.month());
- tmp += "/" + QString().sprintf("%02d", date.day());
- tmp += "/" + QString::number(date.year()).right(2);
+ tmp = TQString().sprintf("%02d", date.month());
+ tmp += "/" + TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString::number(date.year()).right(2);
}
else if (fmtType == date_format20) { /*Feb/18/99 */
tmp = converter->locale()->calendar()->monthString(date, true);
- tmp += "/" + QString().sprintf("%02d", date.day());
- tmp += "/" + QString::number(date.year()).right(2);
+ tmp += "/" + TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString::number(date.year()).right(2);
}
else if (fmtType == date_format21) { /*Feb/18/1999 */
tmp = converter->locale()->calendar()->monthString(date, true);
- tmp += "/" + QString().sprintf("%02d", date.day());
- tmp += "/" + QString::number(date.year());
+ tmp += "/" + TQString().sprintf("%02d", date.day());
+ tmp += "/" + TQString::number(date.year());
}
else if (fmtType == date_format22) { /*Feb-1999 */
tmp = converter->locale()->calendar()->monthString(date, true) + "-";
- tmp += QString::number(date.year());
+ tmp += TQString::number(date.year());
}
else if (fmtType == date_format23) { /*1999 */
- tmp = QString::number(date.year());
+ tmp = TQString::number(date.year());
}
else if (fmtType == date_format24) { /*99 */
- tmp = QString::number(date.year()).right(2);
+ tmp = TQString::number(date.year()).right(2);
}
else if (fmtType == date_format25) { /*2000/02/18 */
- tmp = QString::number(date.year());
- tmp += "/" + QString().sprintf("%02d", date.month());
- tmp += "/" + QString().sprintf("%02d", date.day());
+ tmp = TQString::number(date.year());
+ tmp += "/" + TQString().sprintf("%02d", date.month());
+ tmp += "/" + TQString().sprintf("%02d", date.day());
}
else if (fmtType == date_format26) { /*2000/Feb/18 */
- tmp = QString::number(date.year());
+ tmp = TQString::number(date.year());
tmp += "/" + converter->locale()->calendar()->monthString(date, true);
- tmp += "/" + QString().sprintf("%02d", date.day());
+ tmp += "/" + TQString().sprintf("%02d", date.day());
}
else
tmp = converter->locale()->formatDate(date, true);
@@ -630,9 +630,9 @@ QString ValueFormatter::dateFormat (const QDate &date, FormatType fmtType)
return tmp;
}
-QString ValueFormatter::errorFormat (Cell *cell)
+TQString ValueFormatter::errorFormat (Cell *cell)
{
- QString err;
+ TQString err;
if (cell->testFlag (Cell::Flag_ParseError))
err = "#" + i18n ("Parse") + "!";
else if ( cell->testFlag (Cell::Flag_CircularCalculation))
diff --git a/kspread/valueformatter.h b/kspread/valueformatter.h
index 2be93196..3fee04f8 100644
--- a/kspread/valueformatter.h
+++ b/kspread/valueformatter.h
@@ -22,7 +22,7 @@
#include "kspread_format.h"
-#include <qdatetime.h>
+#include <tqdatetime.h>
namespace KSpread
{
@@ -41,21 +41,21 @@ class ValueFormatter {
ValueFormatter (ValueConverter *converter);
/** create a text representation of data in this cell */
- QString formatText (Cell *cell, FormatType fmtType);
+ TQString formatText (Cell *cell, FormatType fmtType);
/** create a text representation of data in this Value */
- QString formatText (const Value &value,
+ TQString formatText (const Value &value,
FormatType fmtType, int precision = -1,
Format::FloatFormat floatFormat = Format::OnlyNegSigned,
- const QString &prefix = QString::null,
- const QString &postfix = QString::null,
- const QString &currencySymbol = QString::null);
+ const TQString &prefix = TQString(),
+ const TQString &postfix = TQString(),
+ const TQString &currencySymbol = TQString());
/** create a date format */
- QString dateFormat (const QDate &_date, FormatType fmtType);
+ TQString dateFormat (const TQDate &_date, FormatType fmtType);
/** create a time format */
- QString timeFormat (const QDateTime &_time, FormatType fmtType);
+ TQString timeFormat (const TQDateTime &_time, FormatType fmtType);
protected:
@@ -67,17 +67,17 @@ class ValueFormatter {
FormatType fmtType);
/** create a number format */
- QString createNumberFormat (double value, int precision, FormatType fmt,
- bool alwaysSigned, const QString& currencySymbol);
+ TQString createNumberFormat (double value, int precision, FormatType fmt,
+ bool alwaysSigned, const TQString& currencySymbol);
/** create a fraction format */
- QString fractionFormat (double value, FormatType fmtType);
+ TQString fractionFormat (double value, FormatType fmtType);
- QString errorFormat (Cell *cell);
+ TQString errorFormat (Cell *cell);
/** Remove trailing zeros and the decimal point if necessary
unless the number has no decimal point */
- void removeTrailingZeros (QString &str, QChar decimal_point);
+ void removeTrailingZeros (TQString &str, TQChar decimal_point);
};
diff --git a/kspread/valueparser.cc b/kspread/valueparser.cc
index 2d2604a1..9acd3705 100644
--- a/kspread/valueparser.cc
+++ b/kspread/valueparser.cc
@@ -36,7 +36,7 @@ KLocale* ValueParser::locale()
return parserLocale;
}
-void ValueParser::parse (const QString& str, Cell *cell)
+void ValueParser::parse (const TQString& str, Cell *cell)
{
FormatType format = cell->formatType();
@@ -50,7 +50,7 @@ void ValueParser::parse (const QString& str, Cell *cell)
return;
}
- QString strStripped = str.stripWhiteSpace();
+ TQString strStripped = str.stripWhiteSpace();
// Try parsing as various datatypes, to find the type of the cell
@@ -85,7 +85,7 @@ void ValueParser::parse (const QString& str, Cell *cell)
cell->setValue (Value (str));
}
-Value ValueParser::parse (const QString &str)
+Value ValueParser::parse (const TQString &str)
{
Value val;
@@ -101,7 +101,7 @@ Value ValueParser::parse (const QString &str)
bool ok;
- QString strStripped = str.stripWhiteSpace();
+ TQString strStripped = str.stripWhiteSpace();
// Try parsing as various datatypes, to find the type of the string
// First as number
@@ -139,7 +139,7 @@ Value ValueParser::parse (const QString &str)
return val;
}
-bool ValueParser::tryParseBool (const QString& str, Cell *cell)
+bool ValueParser::tryParseBool (const TQString& str, Cell *cell)
{
bool ok;
Value val = tryParseBool (str, &ok);
@@ -148,7 +148,7 @@ bool ValueParser::tryParseBool (const QString& str, Cell *cell)
return ok;
}
-bool ValueParser::tryParseNumber (const QString& str, Cell *cell)
+bool ValueParser::tryParseNumber (const TQString& str, Cell *cell)
{
bool ok;
Value val = tryParseNumber (str, &ok);
@@ -157,7 +157,7 @@ bool ValueParser::tryParseNumber (const QString& str, Cell *cell)
return ok;
}
-bool ValueParser::tryParseDate (const QString& str, Cell *cell)
+bool ValueParser::tryParseDate (const TQString& str, Cell *cell)
{
bool ok;
Value value = tryParseDate (str, &ok);
@@ -166,7 +166,7 @@ bool ValueParser::tryParseDate (const QString& str, Cell *cell)
return ok;
}
-bool ValueParser::tryParseTime (const QString& str, Cell *cell)
+bool ValueParser::tryParseTime (const TQString& str, Cell *cell)
{
bool ok;
Value value = tryParseTime (str, &ok);
@@ -176,12 +176,12 @@ bool ValueParser::tryParseTime (const QString& str, Cell *cell)
}
-Value ValueParser::tryParseBool (const QString& str, bool *ok)
+Value ValueParser::tryParseBool (const TQString& str, bool *ok)
{
Value val;
if (ok) *ok = false;
- const QString& lowerStr = str.lower();
+ const TQString& lowerStr = str.lower();
if ((lowerStr == "true") ||
(lowerStr == parserLocale->translate("true").lower()))
@@ -199,20 +199,20 @@ Value ValueParser::tryParseBool (const QString& str, bool *ok)
return val;
}
-double ValueParser::readNumber(const QString &_str, bool * ok, bool * isInt)
+double ValueParser::readNumber(const TQString &_str, bool * ok, bool * isInt)
{
- QString str = _str.stripWhiteSpace();
- bool neg = str.find(parserLocale->negativeSign()) == 0;
+ TQString str = _str.stripWhiteSpace();
+ bool neg = str.tqfind(parserLocale->negativeSign()) == 0;
if (neg)
str.remove( 0, parserLocale->negativeSign().length() );
/* will hold the scientific notation portion of the number.
Example, with 2.34E+23, exponentialPart == "E+23"
*/
- QString exponentialPart;
+ TQString exponentialPart;
int EPos;
- EPos = str.find('E', 0, false);
+ EPos = str.tqfind('E', 0, false);
if (EPos != -1)
{
@@ -220,9 +220,9 @@ double ValueParser::readNumber(const QString &_str, bool * ok, bool * isInt)
str = str.left(EPos);
}
- int pos = str.find(parserLocale->decimalSymbol());
- QString major;
- QString minor;
+ int pos = str.tqfind(parserLocale->decimalSymbol());
+ TQString major;
+ TQString minor;
if ( pos == -1 )
{
major = str;
@@ -238,7 +238,7 @@ double ValueParser::readNumber(const QString &_str, bool * ok, bool * isInt)
// Remove thousand separators
int thlen = parserLocale->thousandsSeparator().length();
int lastpos = 0;
- while ( ( pos = major.find( parserLocale->thousandsSeparator() ) ) > 0 )
+ while ( ( pos = major.tqfind( parserLocale->thousandsSeparator() ) ) > 0 )
{
// e.g. 12,,345,,678,,922 Acceptable positions (from the end) are 5, 10, 15... i.e. (3+thlen)*N
int fromEnd = major.length() - pos;
@@ -260,7 +260,7 @@ double ValueParser::readNumber(const QString &_str, bool * ok, bool * isInt)
return 0.0;
}
- QString tot;
+ TQString tot;
if (neg) tot = '-';
tot += major + '.' + minor + exponentialPart;
@@ -268,12 +268,12 @@ double ValueParser::readNumber(const QString &_str, bool * ok, bool * isInt)
return tot.toDouble(ok);
}
-Value ValueParser::tryParseNumber (const QString& str, bool *ok)
+Value ValueParser::tryParseNumber (const TQString& str, bool *ok)
{
Value value;
bool percent = false;
- QString str2;
+ TQString str2;
if( str.at(str.length()-1)=='%')
{
str2 = str.left (str.length()-1).stripWhiteSpace();
@@ -290,7 +290,7 @@ Value ValueParser::tryParseNumber (const QString& str, bool *ok)
if (!(*ok))
{
val = str2.toDouble(ok);
- if (str.contains('.'))
+ if (str.tqcontains('.'))
isInt = false;
else
isInt = true;
@@ -315,7 +315,7 @@ Value ValueParser::tryParseNumber (const QString& str, bool *ok)
else
value.setValue (val);
- if ( str2.contains('E') || str2.contains('e') )
+ if ( str2.tqcontains('E') || str2.tqcontains('e') )
fmtType = Scientific_format;
else
{
@@ -330,10 +330,10 @@ Value ValueParser::tryParseNumber (const QString& str, bool *ok)
return value;
}
-Value ValueParser::tryParseDate (const QString& str, bool *ok)
+Value ValueParser::tryParseDate (const TQString& str, bool *ok)
{
bool valid = false;
- QDate tmpDate = parserLocale->readDate (str, &valid);
+ TQDate tmpDate = parserLocale->readDate (str, &valid);
if (!valid)
{
// Try without the year
@@ -341,8 +341,8 @@ Value ValueParser::tryParseDate (const QString& str, bool *ok)
// For instance %Y-%m-%d becomes %m-%d and %d/%m/%Y becomes %d/%m
// If the year is in the middle, say %m-%Y/%d, we'll remove the sep.
// before it (%m/%d).
- QString fmt = parserLocale->dateFormatShort();
- int yearPos = fmt.find ("%Y", 0, false);
+ TQString fmt = parserLocale->dateFormatShort();
+ int yearPos = fmt.tqfind ("%Y", 0, false);
if ( yearPos > -1 )
{
if ( yearPos == 0 )
@@ -369,8 +369,8 @@ Value ValueParser::tryParseDate (const QString& str, bool *ok)
// The following fixes the problem, 3/4/1955 will always be 1955
- QString fmt = parserLocale->dateFormatShort();
- if( ( fmt.contains( "%y" ) == 1 ) && ( tmpDate.year() > 2999 ) )
+ TQString fmt = parserLocale->dateFormatShort();
+ if( ( fmt.tqcontains( "%y" ) == 1 ) && ( tmpDate.year() > 2999 ) )
tmpDate = tmpDate.addYears( -1900 );
// this is another HACK !
@@ -383,13 +383,13 @@ Value ValueParser::tryParseDate (const QString& str, bool *ok)
// (e.g 3/4/45 is Mar 4, 1945 not Mar 4, 2045)
if( ( tmpDate.year() >= 2030 ) && ( tmpDate.year() <= 2069 ) )
{
- QString yearFourDigits = QString::number( tmpDate.year() );
- QString yearTwoDigits = QString::number( tmpDate.year() % 100 );
+ TQString yearFourDigits = TQString::number( tmpDate.year() );
+ TQString yearTwoDigits = TQString::number( tmpDate.year() % 100 );
// if year is 2045, check to see if "2045" isn't there --> actual
// input is "45"
- if( ( str.contains( yearTwoDigits ) >= 1 ) &&
- ( str.contains( yearFourDigits ) == 0 ) )
+ if( ( str.tqcontains( yearTwoDigits ) >= 1 ) &&
+ ( str.tqcontains( yearFourDigits ) == 0 ) )
tmpDate = tmpDate.addYears( -100 );
}
@@ -401,8 +401,8 @@ Value ValueParser::tryParseDate (const QString& str, bool *ok)
}
if (!valid)
{
- //try to use the standard Qt date parsing, using ISO 8601 format
- tmpDate = QDate::fromString(str,Qt::ISODate);
+ //try to use the standard TQt date parsing, using ISO 8601 format
+ tmpDate = TQDate::fromString(str,Qt::ISODate);
if (tmpDate.isValid())
{
valid = true;
@@ -415,7 +415,7 @@ Value ValueParser::tryParseDate (const QString& str, bool *ok)
return Value (tmpDate);
}
-Value ValueParser::tryParseTime (const QString& str, bool *ok)
+Value ValueParser::tryParseTime (const TQString& str, bool *ok)
{
if (ok)
*ok = false;
@@ -424,29 +424,29 @@ Value ValueParser::tryParseTime (const QString& str, bool *ok)
bool duration = false;
Value val;
- QDateTime tmpTime = readTime (str, true, &valid, duration);
+ TQDateTime tmpTime = readTime (str, true, &valid, duration);
if (!tmpTime.isValid())
tmpTime = readTime (str, false, &valid, duration);
if (!valid)
{
- QTime tm;
+ TQTime tm;
if (parserLocale->use12Clock())
{
- QString stringPm = parserLocale->translate("pm");
- QString stringAm = parserLocale->translate("am");
+ TQString stringPm = parserLocale->translate("pm");
+ TQString stringAm = parserLocale->translate("am");
int pos=0;
- if((pos=str.find(stringPm))!=-1)
+ if((pos=str.tqfind(stringPm))!=-1)
{
- QString tmp=str.mid(0,str.length()-stringPm.length());
+ TQString tmp=str.mid(0,str.length()-stringPm.length());
tmp=tmp.simplifyWhiteSpace();
tm = parserLocale->readTime(tmp+" "+stringPm, &valid);
if (!valid)
tm = parserLocale->readTime(tmp+":00 "+stringPm, &valid);
}
- else if((pos=str.find(stringAm))!=-1)
+ else if((pos=str.tqfind(stringAm))!=-1)
{
- QString tmp = str.mid(0,str.length()-stringAm.length());
+ TQString tmp = str.mid(0,str.length()-stringAm.length());
tmp = tmp.simplifyWhiteSpace();
tm = parserLocale->readTime (tmp + " " + stringAm, &valid);
if (!valid)
@@ -474,15 +474,15 @@ Value ValueParser::tryParseTime (const QString& str, bool *ok)
return val;
}
-QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
+TQDateTime ValueParser::readTime (const TQString & intstr, bool withSeconds,
bool *ok, bool & duration)
{
duration = false;
- QString str = intstr.simplifyWhiteSpace().lower();
- QString format = parserLocale->timeFormat().simplifyWhiteSpace();
+ TQString str = intstr.simplifyWhiteSpace().lower();
+ TQString format = parserLocale->timeFormat().simplifyWhiteSpace();
if ( !withSeconds )
{
- int n = format.find("%S");
+ int n = format.tqfind("%S");
format = format.left( n - 1 );
}
@@ -494,7 +494,7 @@ QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
uint strpos = 0;
uint formatpos = 0;
- QDate refDate( 1899, 12, 31 );
+ TQDate refDate( 1899, 12, 31 );
uint l = format.length();
uint sl = str.length();
@@ -504,7 +504,7 @@ QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
if ( !(l > formatpos && sl > strpos) )
goto error;
- QChar c( format.at( formatpos++ ) );
+ TQChar c( format.at( formatpos++ ) );
if (c != '%')
{
@@ -524,7 +524,7 @@ QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
{
case 'p':
{
- QString s;
+ TQString s;
s = parserLocale->translate("pm").lower();
int len = s.length();
if (str.mid(strpos, len) == s)
@@ -600,13 +600,13 @@ QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
if (ok)
*ok = true;
- return QDateTime( refDate, QTime( hour, minute, second ) );
+ return TQDateTime( refDate, TQTime( hour, minute, second ) );
error:
if (ok)
*ok = false;
// return invalid date if it didn't work
- return QDateTime( refDate, QTime( -1, -1, -1 ) );
+ return TQDateTime( refDate, TQTime( -1, -1, -1 ) );
}
/**
@@ -615,7 +615,7 @@ QDateTime ValueParser::readTime (const QString & intstr, bool withSeconds,
* @param pos the position to start at. It will be updated when we parse it.
* @return the integer read in the string, or -1 if no string
*/
-int ValueParser::readInt (const QString &str, uint &pos)
+int ValueParser::readInt (const TQString &str, uint &pos)
{
if (!str.at(pos).isDigit())
return -1;
diff --git a/kspread/valueparser.h b/kspread/valueparser.h
index 4c5e5f07..120c2734 100644
--- a/kspread/valueparser.h
+++ b/kspread/valueparser.h
@@ -21,7 +21,7 @@
#ifndef KSPREAD_VALUEPARSER
#define KSPREAD_VALUEPARSER
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include "kspread_global.h"
@@ -45,34 +45,34 @@ class ValueParser {
KLocale* locale();
/** try to parse the text in a given cell and set value accordingly */
- void parse (const QString& str, Cell *cell);
+ void parse (const TQString& str, Cell *cell);
/** try to parse given text, don't set any cell attributes though */
- Value parse (const QString &str);
+ Value parse (const TQString &str);
- Value tryParseBool (const QString& str, bool *ok = 0);
- Value tryParseNumber (const QString& str, bool *ok = 0);
- Value tryParseDate (const QString& str, bool *ok = 0);
- Value tryParseTime (const QString& str, bool *ok = 0);
+ Value tryParseBool (const TQString& str, bool *ok = 0);
+ Value tryParseNumber (const TQString& str, bool *ok = 0);
+ Value tryParseDate (const TQString& str, bool *ok = 0);
+ Value tryParseTime (const TQString& str, bool *ok = 0);
protected:
KLocale* parserLocale;
// Try to parse the text as a bool/number/date/time/etc.
// Helpers for parse.
- bool tryParseBool (const QString& str, Cell *cell);
- bool tryParseNumber (const QString& str, Cell *cell);
- bool tryParseDate (const QString& str, Cell *cell);
- bool tryParseTime (const QString& str, Cell *cell);
+ bool tryParseBool (const TQString& str, Cell *cell);
+ bool tryParseNumber (const TQString& str, Cell *cell);
+ bool tryParseDate (const TQString& str, Cell *cell);
+ bool tryParseTime (const TQString& str, Cell *cell);
/** converts a string to a date/time value */
- QDateTime readTime (const QString & intstr, bool withSeconds, bool *ok,
+ TQDateTime readTime (const TQString & intstr, bool withSeconds, bool *ok,
bool & duration);
/** a helper function to read numbers and distinguish integers and FPs */
- double readNumber(const QString &_str, bool * ok, bool * isInt);
+ double readNumber(const TQString &_str, bool * ok, bool * isInt);
/** a helper function to read integers */
- int readInt (const QString &str, uint &pos);
+ int readInt (const TQString &str, uint &pos);
FormatType fmtType;
};