Files
seer/src/SeerParallelStacksVisualizerWidget.h
T

103 lines
3.3 KiB
C++
Raw Normal View History

2025-12-24 11:20:29 -06:00
// SPDX-FileCopyrightText: 2021 Ernie Pasveer <epasveer@att.net>
//
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <QtWidgets/QWidget>
#include <QtCore/QVector>
2025-12-24 11:20:29 -06:00
#include "ui_SeerParallelStacksVisualizerWidget.h"
namespace Seer::PSV {
class Frame {
public:
Frame ();
Frame (const QString& text);
~Frame ();
int level () const;
const QString& addr () const;
const QString& function () const;
const QString& arch () const;
const QString& file () const;
const QString& fullname () const;
int line () const;
const QString& type () const;
private:
int _level;
QString _addr;
QString _function;
QString _arch;
QString _file;
QString _fullname;
int _line;
QString _type;
};
typedef QVector<Frame> FramesVector;
class Thread {
public:
Thread ();
Thread (const QString& text);
~Thread ();
int id () const;
const QString& target_id () const;
const QString& name () const;
const QString& state () const;
int current () const;
int frameCount () const;
const Frame& frame (int i) const;
private:
int _id;
QString _target_id;
QString _name;
QString _state;
int _current;
FramesVector _frames;
};
typedef QVector<Thread> ThreadsVector;
};
2025-12-24 11:20:29 -06:00
class SeerParallelStacksVisualizerWidget : public QWidget, protected Ui::SeerParallelStacksVisualizerWidgetForm {
Q_OBJECT
public:
explicit SeerParallelStacksVisualizerWidget (QWidget* parent = 0);
~SeerParallelStacksVisualizerWidget ();
signals:
void refreshParallelStackFrames (int id);
2025-12-24 11:20:29 -06:00
public slots:
void handleText (const QString& text);
2025-12-24 11:20:29 -06:00
protected slots:
void handleRefreshButton ();
void handleHelpButton ();
void handlePrintButton ();
void handleSaveButton ();
2025-12-24 11:20:29 -06:00
protected:
void writeSettings ();
void readSettings ();
void resizeEvent (QResizeEvent* event);
2025-12-24 11:20:29 -06:00
private:
void createDirectedGraph ();
int _id;
Seer::PSV::ThreadsVector _threads;
2025-12-24 11:20:29 -06:00
};