git-svn-id: svn://db.shs.com.ru/libs@565 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-06-26 18:52:10 +00:00
parent 1e08d029e2
commit 92c3e2e0cb
5 changed files with 1 additions and 21 deletions

View File

@@ -7,18 +7,14 @@
#include <QAbstractItemModel>
#include <QStyledItemDelegate>
#include "piqt.h"
#ifdef PIP_INTROSPECTION
# include "piintrospection_containers_p.h"
#endif
#include "piintrospection_containers_p.h"
class ContainersModel: public QAbstractItemModel {
Q_OBJECT
public:
ContainersModel();
#ifdef PIP_INTROSPECTION
void update(const PIMap<uint, PIIntrospectionContainers::Type> & td, const PIMap<uint, PIString> & tn);
#endif
void clear();
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
@@ -31,9 +27,7 @@ public:
Qt::ItemFlags flags(const QModelIndex & index) const override;
protected:
#ifdef PIP_INTROSPECTION
PIMap<uint, PIIntrospectionContainers::Type> typedata, prev_typedata;
#endif
PIMap<uint, PIString> typenames;
PIVector<uint> typeids;
PIVector<llong> all, prev_all;
@@ -61,9 +55,7 @@ class ContainersView: public QWidget, private Ui::ContainersView
public:
ContainersView(QWidget * parent = 0);
~ContainersView();
#ifdef PIP_INTROSPECTION
void showContainers(const PIMap<uint, PIIntrospectionContainers::Type> & data, const PIMap<uint, PIString> & typenames);
#endif
void clear();
protected:
void changeEvent(QEvent * e);

View File

@@ -32,7 +32,6 @@ void ObjectsView::changeEvent(QEvent * e) {
}
#ifdef PIP_INTROSPECTION
void ObjectsView::showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects) {
QHash<QString, int> stat;
@@ -59,4 +58,3 @@ void ObjectsView::showObjects(const PIVector<PIIntrospection::ObjectInfo> & obje
}
treeObjectsStat->verticalScrollBar()->setValue(vpos);
}
#endif

View File

@@ -13,9 +13,7 @@ class ObjectsView: public QWidget, private Ui::ObjectsView
public:
ObjectsView(QWidget * parent = 0);
~ObjectsView();
#ifdef PIP_INTROSPECTION
void showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects);
#endif
protected:
void changeEvent(QEvent * e);

View File

@@ -90,7 +90,6 @@ void QPIIntrospector::buildDumpSection(QTreeWidgetItem * pi, PIString & str) {
}
#ifdef PIP_INTROSPECTION
void QPIIntrospector::showInfo(const PIIntrospection::ProcessInfo & info) {
PIString s;
s << info.execCommand << "\n";
@@ -100,7 +99,6 @@ void QPIIntrospector::showInfo(const PIIntrospection::ProcessInfo & info) {
s << info.build_options.join(", ");
labelInfo->setText(PI2QString(s));
}
#endif
void QPIIntrospector::on_listApp_currentRowChanged(int r) {
@@ -116,7 +114,6 @@ void QPIIntrospector::on_listApp_currentRowChanged(int r) {
void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & data) {
if (from != cur_server) return;
//piCout << "rec" << data.size();
#ifdef PIP_INTROSPECTION
PIByteArray ba(data);
if (ba.size_s() < 4) return;
uint sign(0); ba >> sign;
@@ -159,7 +156,6 @@ void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & da
default: break;
}
}
#endif
}
@@ -181,7 +177,6 @@ void QPIIntrospector::peersChanged(const PIString & name) {
void QPIIntrospector::on_buttonRequest_clicked() {
if (cur_server.isEmpty()) return;
#ifdef PIP_INTROSPECTION
PIIntrospection::RequiredInfo info;
for (int i = 0; i < layoutRequestFlags->count(); ++i) {
QCheckBox * cb = qobject_cast<QCheckBox*>(layoutRequestFlags->itemAt(i)->widget());
@@ -192,5 +187,4 @@ void QPIIntrospector::on_buttonRequest_clicked() {
PIByteArray ba;
ba << PIIntrospection::sign << info;
peer.send(cur_server, ba);
#endif
}

View File

@@ -24,9 +24,7 @@ protected:
void timerEvent(QTimerEvent * );
void buildDumpSection(QTreeWidgetItem * pi, PIString & str);
#ifdef PIP_INTROSPECTION
void showInfo(const PIIntrospection::ProcessInfo & info);
#endif
EVENT_HANDLER(void, reqProcPIEvents) {QMetaObject::invokeMethod(this, "procPIEvents", Qt::QueuedConnection);}
EVENT_HANDLER2(void, peerReceived, const PIString &, from, const PIByteArray &, data);