3
* TOra - An Oracle Toolkit for DBA's and developers
4
* Copyright (C) 2003-2005 Quest Software, Inc
5
* Portions Copyright (C) 2005 Other Contributors
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; only version 2 of
10
* the License is valid for this program.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
* As a special exception, you have permission to link this program
22
* with the Oracle Client libraries and distribute executables, as long
23
* as you follow the requirements of the GNU GPL in regard to all of the
24
* software in the executable aside from Oracle client libraries.
26
* Specifically you are not permitted to link this program with the
27
* Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
28
* And you are not permitted to distribute binaries compiled against
29
* these libraries without written consent from Quest Software, Inc.
30
* Observe that this does not disallow linking to the Qt Free Edition.
32
* You may link this product with any GPL'd Qt library such as Qt/Free
34
* All trademarks belong to their respective owners.
2
/* BEGIN_COMMON_COPYRIGHT_HEADER
4
* TOra - An Oracle Toolkit for DBA's and developers
6
* Shared/mixed copyright is held throughout files in this product
8
* Portions Copyright (C) 2000-2001 Underscore AB
9
* Portions Copyright (C) 2003-2005 Quest Software, Inc.
10
* Portions Copyright (C) 2004-2008 Numerous Other Contributors
12
* This program is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU General Public License
14
* as published by the Free Software Foundation; only version 2 of
15
* the License is valid for this program.
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
* As a special exception, you have permission to link this program
27
* with the Oracle Client libraries and distribute executables, as long
28
* as you follow the requirements of the GNU GPL in regard to all of the
29
* software in the executable aside from Oracle client libraries.
31
* Specifically you are not permitted to link this program with the
32
* Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
33
* And you are not permitted to distribute binaries compiled against
36
* You may link this product with any GPL'd Qt library.
38
* All trademarks belong to their respective owners.
40
* END_COMMON_COPYRIGHT_HEADER */
55
61
int toDebugText::ID = 0;
57
toBreakpointItem::toBreakpointItem(QListView *parent, QListViewItem *after,
63
toBreakpointItem::toBreakpointItem(toTreeWidget *parent, toTreeWidgetItem *after,
58
64
const QString &schema, const QString &type,
59
65
const QString &object, int line)
60
: QListViewItem(parent, after)
66
: toTreeWidgetItem(parent, after)
62
68
if (schema.isNull())
63
69
setText(2, QString::null);
259
toDebugText::toDebugText(QListView *breakpoints,
265
toDebugText::toDebugText(toTreeWidget *breakpoints,
261
267
toDebug *debugger)
262
: toHighlightedText(parent, QString::number(++ID).latin1()),
268
: toHighlightedText(parent, QString::number(++ID).toLatin1()),
263
269
Debugger(debugger),
264
270
Breakpoints(breakpoints)
266
272
//setLeftIgnore(DEBUG_INDENT);
267
273
setMarginWidth(0, 25);
268
274
setMarginWidth(1, 10);
269
setMarginSensitivity(0,true);
270
setMarginSensitivity(1,true);
275
setMarginSensitivity(0, true);
276
setMarginSensitivity(1, true);
271
277
CurrentItem = FirstItem = NULL;
272
278
NoBreakpoints = false;
273
connect(this,SIGNAL(marginClicked(int, int, Qt::ButtonState)),this, SLOT(toggleBreakpoint(int, int, Qt::ButtonState)));
274
breakMarker=markerDefine(new QPixmap(const_cast<const char**>(breakpoint_xpm)));
275
disabledBreakMarker=markerDefine(new QPixmap(const_cast<const char**>(disbreakpoint_xpm)));
276
setMarginMarkerMask(1,2^breakMarker|2^disabledBreakMarker);
280
SIGNAL(marginClicked(int, int, Qt::KeyboardModifiers)),
282
SLOT(toggleBreakpoint(int, int, Qt::KeyboardModifiers)));
283
// breakMarker=markerDefine(new QPixmap(const_cast<const char**>(breakpoint_xpm)));
284
// disabledBreakMarker=markerDefine(new QPixmap(const_cast<const char**>(disbreakpoint_xpm)));
285
breakMarker = markerDefine(QPixmap(breakpoint_xpm));
286
disabledBreakMarker = markerDefine(QPixmap(disbreakpoint_xpm));
287
setMarginMarkerMask(1, (2 ^ breakMarker) | (2 ^ disabledBreakMarker));
279
290
bool toDebugText::checkItem(toBreakpointItem *item)
378
if (CurrentItem->text(4) == qApp->translate("toDebug", "DISABLED")){
389
if (CurrentItem->text(4) == qApp->translate("toDebug", "DISABLED"))
379
391
CurrentItem->setText(4, qApp->translate("toDebug", "DEFERED"));
380
markerDelete(row,disabledBreakMarker);
381
markerAdd(row,breakMarker);
392
markerDelete(row, disabledBreakMarker);
393
markerAdd(row, breakMarker);
383
397
CurrentItem->clearBreakpoint();
384
markerDelete(row,breakMarker);
385
markerAdd(row,disabledBreakMarker);
398
markerDelete(row, breakMarker);
399
markerAdd(row, disabledBreakMarker);
390
404
CurrentItem->clearBreakpoint();
391
405
delete CurrentItem;
392
markerDelete(row,breakMarker);
393
markerDelete(row,disabledBreakMarker);
406
markerDelete(row, breakMarker);
407
markerDelete(row, disabledBreakMarker);
394
408
if (FirstItem == CurrentItem)
396
410
NoBreakpoints = false;
423
void toDebugText::toggleBreakpoint(int margin, int line, Qt::ButtonState state){
425
toggleBreakpoint(line);
437
void toDebugText::toggleBreakpoint(int margin, int line, Qt::KeyboardModifiers state)
440
toggleBreakpoint(line);
429
void toDebugText::exportData(std::map<QCString, QString> &data, const QCString &prefix)
444
void toDebugText::exportData(std::map<QString, QString> &data, const QString &prefix)
431
446
toHighlightedText::exportData(data, prefix);
432
447
data[prefix + ":Schema"] = Schema;