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__() {
|
||||
count_++;
|
||||
if (count_ > 1) return;
|
||||
//piCout << "create PIInit";
|
||||
//piCout << "create Core";
|
||||
__instance__ = new Core();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ __Core_Initializer__::__Core_Initializer__() {
|
||||
__Core_Initializer__::~__Core_Initializer__() {
|
||||
count_--;
|
||||
if (count_ > 0) return;
|
||||
//piCout << "delete PIInit";
|
||||
//piCout << "delete Core";
|
||||
if (__instance__ != 0) {
|
||||
delete __instance__;
|
||||
__instance__ = 0;
|
||||
|
||||
@@ -8,6 +8,7 @@ using namespace CDUtils;
|
||||
|
||||
KInterface::KInterface() {
|
||||
core = Core::instance();
|
||||
piCoutObj << core;
|
||||
k_file = PIStringAscii("k.dat");
|
||||
k_file_size = 0;
|
||||
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;
|
||||
for (int i = 0; i < v; ++i) {
|
||||
ret << i;
|
||||
enames << PIString::fromNumber(i);
|
||||
enames << "";//PIString::fromNumber(i);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
@@ -142,13 +142,14 @@ KSection KParser::parse(PIIODevice * d) {
|
||||
//piCout << a << evals;
|
||||
for (int i = 0; i < evals.size_s(); ++i) {
|
||||
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.insert(ibpos, PIString("[") << a << "]");
|
||||
is = ts;
|
||||
ts = KSection();
|
||||
}
|
||||
is.alias = alias;
|
||||
cs.section(aval) = is;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
PIStringList index_names() const;
|
||||
|
||||
PIString name;
|
||||
PIString index_name;
|
||||
PIString alias;
|
||||
|
||||
private:
|
||||
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) {
|
||||
QTreeWidgetItem * ti = new QTreeWidgetItem(pi);
|
||||
const KSection & cs(si.value());
|
||||
QString sn("[%1]");
|
||||
if (cs.index_name.isEmpty()) sn = sn.arg(si.key());
|
||||
else sn = sn.arg(PI2QString(cs.index_name));
|
||||
ti->setText(0, sn);
|
||||
ti->setText(0, QString("[%1]").arg(si.key()));
|
||||
ti->setText(1, PI2QString(cs.alias));
|
||||
ti->setText(2, PI2QString(cs.name));
|
||||
makeTreeSection(const_cast<KSection&>(cs), ti);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user