git-svn-id: svn://db.shs.com.ru/libs@111 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -60,7 +60,7 @@ Core * __Core_Initializer__::__instance__(0);
|
|||||||
__Core_Initializer__::__Core_Initializer__() {
|
__Core_Initializer__::__Core_Initializer__() {
|
||||||
count_++;
|
count_++;
|
||||||
if (count_ > 1) return;
|
if (count_ > 1) return;
|
||||||
//piCout << "create PIInit";
|
//piCout << "create Core";
|
||||||
__instance__ = new Core();
|
__instance__ = new Core();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ __Core_Initializer__::__Core_Initializer__() {
|
|||||||
__Core_Initializer__::~__Core_Initializer__() {
|
__Core_Initializer__::~__Core_Initializer__() {
|
||||||
count_--;
|
count_--;
|
||||||
if (count_ > 0) return;
|
if (count_ > 0) return;
|
||||||
//piCout << "delete PIInit";
|
//piCout << "delete Core";
|
||||||
if (__instance__ != 0) {
|
if (__instance__ != 0) {
|
||||||
delete __instance__;
|
delete __instance__;
|
||||||
__instance__ = 0;
|
__instance__ = 0;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using namespace CDUtils;
|
|||||||
|
|
||||||
KInterface::KInterface() {
|
KInterface::KInterface() {
|
||||||
core = Core::instance();
|
core = Core::instance();
|
||||||
|
piCoutObj << core;
|
||||||
k_file = PIStringAscii("k.dat");
|
k_file = PIStringAscii("k.dat");
|
||||||
k_file_size = 0;
|
k_file_size = 0;
|
||||||
CONNECTU(core, K_Sended, this, sended);
|
CONNECTU(core, K_Sended, this, sended);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ PIVector<int> enumValues(const PIString & e, const PIMap<PIString, KSection> & s
|
|||||||
if (v < 2) return ret;
|
if (v < 2) return ret;
|
||||||
for (int i = 0; i < v; ++i) {
|
for (int i = 0; i < v; ++i) {
|
||||||
ret << i;
|
ret << i;
|
||||||
enames << PIString::fromNumber(i);
|
enames << "";//PIString::fromNumber(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -142,13 +142,14 @@ KSection KParser::parse(PIIODevice * d) {
|
|||||||
//piCout << a << evals;
|
//piCout << a << evals;
|
||||||
for (int i = 0; i < evals.size_s(); ++i) {
|
for (int i = 0; i < evals.size_s(); ++i) {
|
||||||
ts.section(evals[i]) = is;
|
ts.section(evals[i]) = is;
|
||||||
ts.section(evals[i]).index_name = enames[i];
|
ts.section(evals[i]).alias = enames[i];
|
||||||
}
|
}
|
||||||
ts.name = is.name;
|
ts.name = is.name;
|
||||||
ts.name.insert(ibpos, PIString("[") << a << "]");
|
ts.name.insert(ibpos, PIString("[") << a << "]");
|
||||||
is = ts;
|
is = ts;
|
||||||
ts = KSection();
|
ts = KSection();
|
||||||
}
|
}
|
||||||
|
is.alias = alias;
|
||||||
cs.section(aval) = is;
|
cs.section(aval) = is;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public:
|
|||||||
PIStringList index_names() const;
|
PIStringList index_names() const;
|
||||||
|
|
||||||
PIString name;
|
PIString name;
|
||||||
PIString index_name;
|
PIString alias;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KSection(PIMap<int, KType> k_, PIMap<int, KSection> s_) {
|
KSection(PIMap<int, KType> k_, PIMap<int, KSection> s_) {
|
||||||
|
|||||||
@@ -219,10 +219,8 @@ void CD_Pult::makeTreeSection(KSection & ks, QTreeWidgetItem * pi) {
|
|||||||
for (si = ks.s.begin(); si != ks.s.end(); ++si) {
|
for (si = ks.s.begin(); si != ks.s.end(); ++si) {
|
||||||
QTreeWidgetItem * ti = new QTreeWidgetItem(pi);
|
QTreeWidgetItem * ti = new QTreeWidgetItem(pi);
|
||||||
const KSection & cs(si.value());
|
const KSection & cs(si.value());
|
||||||
QString sn("[%1]");
|
ti->setText(0, QString("[%1]").arg(si.key()));
|
||||||
if (cs.index_name.isEmpty()) sn = sn.arg(si.key());
|
ti->setText(1, PI2QString(cs.alias));
|
||||||
else sn = sn.arg(PI2QString(cs.index_name));
|
|
||||||
ti->setText(0, sn);
|
|
||||||
ti->setText(2, PI2QString(cs.name));
|
ti->setText(2, PI2QString(cs.name));
|
||||||
makeTreeSection(const_cast<KSection&>(cs), ti);
|
makeTreeSection(const_cast<KSection&>(cs), ti);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user