mirror of
https://github.com/epasveer/seer.git
synced 2026-08-30 17:10:44 +08:00
Move source into a 'src' directory. Update README.md file for build
instructions.
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
#include "SeerThreadManagerWidget.h"
|
||||
#include <QtWidgets/QToolButton>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
SeerThreadManagerWidget::SeerThreadManagerWidget (QWidget* parent) : QWidget(parent) {
|
||||
|
||||
// Initialize private data
|
||||
|
||||
// Setup UI
|
||||
setupUi(this);
|
||||
|
||||
// Setup the widgets
|
||||
tabWidget->setMovable(true);
|
||||
tabWidget->setTabsClosable(false);
|
||||
|
||||
_threadIdsBrowserWidget = new SeerThreadIdsBrowserWidget(this);
|
||||
_threadFramesBrowserWidget = new SeerThreadFramesBrowserWidget(this);
|
||||
|
||||
tabWidget->addTab(_threadIdsBrowserWidget, "Ids");
|
||||
tabWidget->addTab(_threadFramesBrowserWidget, "Frames");
|
||||
|
||||
QToolButton* refreshToolButton = new QToolButton(tabWidget);
|
||||
refreshToolButton->setIcon(QIcon::fromTheme("view-refresh"));
|
||||
refreshToolButton->setToolTip("Refresh the thread information.");
|
||||
tabWidget->setCornerWidget(refreshToolButton, Qt::TopRightCorner);
|
||||
|
||||
// Connect things.
|
||||
QObject::connect(refreshToolButton, &QToolButton::clicked, this, &SeerThreadManagerWidget::handleRefreshToolButtonClicked);
|
||||
}
|
||||
|
||||
SeerThreadManagerWidget::~SeerThreadManagerWidget () {
|
||||
}
|
||||
|
||||
SeerThreadIdsBrowserWidget* SeerThreadManagerWidget::threadIdsBrowserWidget () {
|
||||
return _threadIdsBrowserWidget;
|
||||
}
|
||||
|
||||
SeerThreadFramesBrowserWidget* SeerThreadManagerWidget::threadFramesBrowserWidget () {
|
||||
return _threadFramesBrowserWidget;
|
||||
}
|
||||
|
||||
void SeerThreadManagerWidget::handleRefreshToolButtonClicked () {
|
||||
|
||||
threadIdsBrowserWidget()->refresh();
|
||||
threadFramesBrowserWidget()->refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user