git-svn-id: svn://db.shs.com.ru/libs@565 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -7,18 +7,14 @@
|
|||||||
#include <QAbstractItemModel>
|
#include <QAbstractItemModel>
|
||||||
#include <QStyledItemDelegate>
|
#include <QStyledItemDelegate>
|
||||||
#include "piqt.h"
|
#include "piqt.h"
|
||||||
#ifdef PIP_INTROSPECTION
|
#include "piintrospection_containers_p.h"
|
||||||
# include "piintrospection_containers_p.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class ContainersModel: public QAbstractItemModel {
|
class ContainersModel: public QAbstractItemModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ContainersModel();
|
ContainersModel();
|
||||||
|
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void update(const PIMap<uint, PIIntrospectionContainers::Type> & td, const PIMap<uint, PIString> & tn);
|
void update(const PIMap<uint, PIIntrospectionContainers::Type> & td, const PIMap<uint, PIString> & tn);
|
||||||
#endif
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
int rowCount(const QModelIndex & parent = QModelIndex()) const override;
|
||||||
@@ -31,9 +27,7 @@ public:
|
|||||||
Qt::ItemFlags flags(const QModelIndex & index) const override;
|
Qt::ItemFlags flags(const QModelIndex & index) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
PIMap<uint, PIIntrospectionContainers::Type> typedata, prev_typedata;
|
PIMap<uint, PIIntrospectionContainers::Type> typedata, prev_typedata;
|
||||||
#endif
|
|
||||||
PIMap<uint, PIString> typenames;
|
PIMap<uint, PIString> typenames;
|
||||||
PIVector<uint> typeids;
|
PIVector<uint> typeids;
|
||||||
PIVector<llong> all, prev_all;
|
PIVector<llong> all, prev_all;
|
||||||
@@ -61,9 +55,7 @@ class ContainersView: public QWidget, private Ui::ContainersView
|
|||||||
public:
|
public:
|
||||||
ContainersView(QWidget * parent = 0);
|
ContainersView(QWidget * parent = 0);
|
||||||
~ContainersView();
|
~ContainersView();
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void showContainers(const PIMap<uint, PIIntrospectionContainers::Type> & data, const PIMap<uint, PIString> & typenames);
|
void showContainers(const PIMap<uint, PIIntrospectionContainers::Type> & data, const PIMap<uint, PIString> & typenames);
|
||||||
#endif
|
|
||||||
void clear();
|
void clear();
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent * e);
|
void changeEvent(QEvent * e);
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ void ObjectsView::changeEvent(QEvent * e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void ObjectsView::showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects) {
|
void ObjectsView::showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects) {
|
||||||
QHash<QString, int> stat;
|
QHash<QString, int> stat;
|
||||||
|
|
||||||
@@ -59,4 +58,3 @@ void ObjectsView::showObjects(const PIVector<PIIntrospection::ObjectInfo> & obje
|
|||||||
}
|
}
|
||||||
treeObjectsStat->verticalScrollBar()->setValue(vpos);
|
treeObjectsStat->verticalScrollBar()->setValue(vpos);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ class ObjectsView: public QWidget, private Ui::ObjectsView
|
|||||||
public:
|
public:
|
||||||
ObjectsView(QWidget * parent = 0);
|
ObjectsView(QWidget * parent = 0);
|
||||||
~ObjectsView();
|
~ObjectsView();
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects);
|
void showObjects(const PIVector<PIIntrospection::ObjectInfo> & objects);
|
||||||
#endif
|
|
||||||
protected:
|
protected:
|
||||||
void changeEvent(QEvent * e);
|
void changeEvent(QEvent * e);
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,6 @@ void QPIIntrospector::buildDumpSection(QTreeWidgetItem * pi, PIString & str) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void QPIIntrospector::showInfo(const PIIntrospection::ProcessInfo & info) {
|
void QPIIntrospector::showInfo(const PIIntrospection::ProcessInfo & info) {
|
||||||
PIString s;
|
PIString s;
|
||||||
s << info.execCommand << "\n";
|
s << info.execCommand << "\n";
|
||||||
@@ -100,7 +99,6 @@ void QPIIntrospector::showInfo(const PIIntrospection::ProcessInfo & info) {
|
|||||||
s << info.build_options.join(", ");
|
s << info.build_options.join(", ");
|
||||||
labelInfo->setText(PI2QString(s));
|
labelInfo->setText(PI2QString(s));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void QPIIntrospector::on_listApp_currentRowChanged(int r) {
|
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) {
|
void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & data) {
|
||||||
if (from != cur_server) return;
|
if (from != cur_server) return;
|
||||||
//piCout << "rec" << data.size();
|
//piCout << "rec" << data.size();
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
PIByteArray ba(data);
|
PIByteArray ba(data);
|
||||||
if (ba.size_s() < 4) return;
|
if (ba.size_s() < 4) return;
|
||||||
uint sign(0); ba >> sign;
|
uint sign(0); ba >> sign;
|
||||||
@@ -159,7 +156,6 @@ void QPIIntrospector::peerReceived(const PIString & from, const PIByteArray & da
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -181,7 +177,6 @@ void QPIIntrospector::peersChanged(const PIString & name) {
|
|||||||
|
|
||||||
void QPIIntrospector::on_buttonRequest_clicked() {
|
void QPIIntrospector::on_buttonRequest_clicked() {
|
||||||
if (cur_server.isEmpty()) return;
|
if (cur_server.isEmpty()) return;
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
PIIntrospection::RequiredInfo info;
|
PIIntrospection::RequiredInfo info;
|
||||||
for (int i = 0; i < layoutRequestFlags->count(); ++i) {
|
for (int i = 0; i < layoutRequestFlags->count(); ++i) {
|
||||||
QCheckBox * cb = qobject_cast<QCheckBox*>(layoutRequestFlags->itemAt(i)->widget());
|
QCheckBox * cb = qobject_cast<QCheckBox*>(layoutRequestFlags->itemAt(i)->widget());
|
||||||
@@ -192,5 +187,4 @@ void QPIIntrospector::on_buttonRequest_clicked() {
|
|||||||
PIByteArray ba;
|
PIByteArray ba;
|
||||||
ba << PIIntrospection::sign << info;
|
ba << PIIntrospection::sign << info;
|
||||||
peer.send(cur_server, ba);
|
peer.send(cur_server, ba);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,9 +24,7 @@ protected:
|
|||||||
void timerEvent(QTimerEvent * );
|
void timerEvent(QTimerEvent * );
|
||||||
|
|
||||||
void buildDumpSection(QTreeWidgetItem * pi, PIString & str);
|
void buildDumpSection(QTreeWidgetItem * pi, PIString & str);
|
||||||
#ifdef PIP_INTROSPECTION
|
|
||||||
void showInfo(const PIIntrospection::ProcessInfo & info);
|
void showInfo(const PIIntrospection::ProcessInfo & info);
|
||||||
#endif
|
|
||||||
EVENT_HANDLER(void, reqProcPIEvents) {QMetaObject::invokeMethod(this, "procPIEvents", Qt::QueuedConnection);}
|
EVENT_HANDLER(void, reqProcPIEvents) {QMetaObject::invokeMethod(this, "procPIEvents", Qt::QueuedConnection);}
|
||||||
|
|
||||||
EVENT_HANDLER2(void, peerReceived, const PIString &, from, const PIByteArray &, data);
|
EVENT_HANDLER2(void, peerReceived, const PIString &, from, const PIByteArray &, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user