You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.4 KiB
87 lines
2.4 KiB
15 years ago
|
/* This file is part of KCachegrind.
|
||
|
Copyright (C) 2003 Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
|
||
|
|
||
|
KCachegrind is free software; you can redistribute it and/or
|
||
|
modify it under the terms of the GNU General Public
|
||
|
License as published by the Free Software Foundation, version 2.
|
||
|
|
||
|
This program is distributed in the hope that it will be useful,
|
||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
General Public License for more details.
|
||
|
|
||
|
You should have received a copy of the GNU General Public License
|
||
|
along with this program; see the file COPYING. If not, write to
|
||
15 years ago
|
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||
|
Boston, MA 02110-1301, USA.
|
||
15 years ago
|
*/
|
||
|
|
||
|
/*
|
||
|
* Items of instruction view.
|
||
|
*/
|
||
|
|
||
|
#ifndef INSTRITEM_H
|
||
|
#define INSTRITEM_H
|
||
|
|
||
14 years ago
|
#include <tqlistview.h>
|
||
15 years ago
|
#include "tracedata.h"
|
||
|
|
||
|
class InstrView;
|
||
|
|
||
13 years ago
|
class InstrItem: public TQListViewItem
|
||
15 years ago
|
{
|
||
|
|
||
|
public:
|
||
|
// for messages
|
||
13 years ago
|
InstrItem(InstrView* iv, TQListView* parent,
|
||
14 years ago
|
Addr addr, const TQString&);
|
||
15 years ago
|
|
||
|
// for instruction lines
|
||
13 years ago
|
InstrItem(InstrView* iv, TQListView* parent,
|
||
15 years ago
|
Addr addr, bool inside,
|
||
14 years ago
|
const TQString&, const TQString&, const TQString&,
|
||
15 years ago
|
TraceInstr* instr);
|
||
|
|
||
|
// for call instr
|
||
13 years ago
|
InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
|
||
15 years ago
|
TraceInstr* instr, TraceInstrCall* instrCall);
|
||
|
|
||
|
// for jump lines
|
||
13 years ago
|
InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
|
||
15 years ago
|
TraceInstr* instr, TraceInstrJump* instrJump);
|
||
|
|
||
|
Addr addr() const { return _addr; }
|
||
|
TraceInstr* instr() const { return _instr; }
|
||
|
TraceInstrCall* instrCall() const { return _instrCall; }
|
||
|
TraceInstrJump* instrJump() const { return _instrJump; }
|
||
|
|
||
14 years ago
|
int compare(TQListViewItem * i, int col, bool ascending ) const;
|
||
15 years ago
|
|
||
14 years ago
|
void paintCell(TQPainter *p, const TQColorGroup &cg,
|
||
13 years ago
|
int column, int width, int alignment );
|
||
14 years ago
|
int width( const TQFontMetrics& fm,
|
||
|
const TQListView* lv, int c ) const;
|
||
15 years ago
|
|
||
|
void updateGroup();
|
||
|
void updateCost();
|
||
|
|
||
|
// arrow lines
|
||
14 years ago
|
void setJumpArray(const TQMemArray<TraceInstrJump*>& a);
|
||
15 years ago
|
|
||
|
protected:
|
||
14 years ago
|
void paintArrows(TQPainter *p, const TQColorGroup &cg, int width);
|
||
|
TQMemArray<TraceInstrJump*> _jump;
|
||
15 years ago
|
|
||
|
private:
|
||
|
InstrView* _view;
|
||
|
SubCost _pure, _pure2;
|
||
|
Addr _addr;
|
||
|
TraceInstr* _instr;
|
||
|
TraceInstrJump* _instrJump;
|
||
|
TraceInstrCall* _instrCall;
|
||
|
bool _inside;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif
|