Хранилища Subversion OpenInventory

Редакция

Редакция 140 | Редакция 142 | К новейшей редакции | Содержимое файла | Сравнить с предыдущей | Последнее изменение | Открыть журнал | RSS

Редакция Автор № строки Строка
88 pingvin 1
#include "mainwindow.h"
2
#include "ui_mainwindow.h"
3
 
4
MainWindow::MainWindow(QWidget *parent) :
5
    QMainWindow(parent),
6
    ui(new Ui::MainWindow)
7
{
8
    ui->setupUi(this);
106 pingvin 9
   // connect( ui->comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(on_currentIndexChanged(int)));
118 pingvin 10
    model_is_build = false;
89 pingvin 11
   MainWindow::readModel();
12
 
91 pingvin 13
   //QString model_str;
140 pingvin 14
 
15
 
16
   /*
91 pingvin 17
   MainWindow::creatModelString();
18
   int i;
19
   i++;
93 pingvin 20
    QFile file_tmp("./temp.txt");
92 pingvin 21
    bool ok;
22
    ok = file_tmp.open(QIODevice::ReadWrite | QIODevice::Text);
23
    QTextStream out(&file_tmp);
24
    out << MainWindow::modelString;
25
    file_tmp.close();
140 pingvin 26
*/
114 pingvin 27
    ui->treeWidget->setAlternatingRowColors(true);
28
    ui->treeWidget_2->setAlternatingRowColors(true);
132 pingvin 29
 
30
 
31
    MainWindow::readSettings();
32
 
93 pingvin 33
    MainWindow::openDataBase();
136 pingvin 34
 
104 pingvin 35
    MainWindow::initComboBox();
136 pingvin 36
 
141 pingvin 37
    MainWindow::buildPreviewModel(tr(" "), tr("46"));
136 pingvin 38
 
140 pingvin 39
 
40
    MainWindow::creatModelString();
41
    //int i;
42
    //i++;
43
     QFile file_tmp("./modelstring.txt");
44
     bool ok;
45
     file_tmp.remove();
46
     ok = file_tmp.open(QIODevice::ReadWrite | QIODevice::Text);
47
     QTextStream out(&file_tmp);
48
     out.setCodec("cp1251");
49
     out << MainWindow::modelString;
50
     file_tmp.close();
51
 
52
 
53
 
54
 
109 pingvin 55
    getDatabaseData();
127 pingvin 56
    //// sql_mogel = new QSqlTableModel();
57
    sql_mogel = new MyModel();
58
 
59
 
118 pingvin 60
    model_is_build = true;
119 pingvin 61
    connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
62
    ui->pushButton_3->setEnabled(false);
63
    ui->pushButton_4->setEnabled(false);
64
 
132 pingvin 65
   // setFrm.show();
119 pingvin 66
 
132 pingvin 67
    connect(ui->getsettingAct, SIGNAL(triggered()), this, SLOT(getSetting())); //       " "  " "
68
    connect(setFrm.pushButton, SIGNAL(clicked()), this, SLOT(applySetting()));
69
 
138 pingvin 70
picture_delegate = new CPictureDelegate(this);
132 pingvin 71
 
88 pingvin 72
}
73
 
74
MainWindow::~MainWindow()
75
{
117 pingvin 76
    delete sql_mogel;
88 pingvin 77
    delete ui;
78
}
79
 
80
void MainWindow::changeEvent(QEvent *e)
81
{
82
    QMainWindow::changeEvent(e);
83
    switch (e->type()) {
84
    case QEvent::LanguageChange:
85
        ui->retranslateUi(this);
86
        break;
87
    default:
88
        break;
89
    }
90
}
89 pingvin 91
 
92
 
93
bool MainWindow::readModel(){
94
    bool result;
95
    QString model_str;
140 pingvin 96
    QFile file("modelstring.txt");
141 pingvin 97
  //  QFile file("model.txt");
91 pingvin 98
   rootItem1 = new  QTreeWidgetItem(ui->treeWidget);
89 pingvin 99
    rootItem1->setText(0, tr(" 1"));
100
   // rootItem2 = new  QTreeWidgetItem(rootItem1);
101
   // rootItem2->setText(0, tr(" 2"));
102
    rootItem1->setCheckState(0,Qt::Checked);
103
   // rootItem2->setCheckState(0,Qt::Checked);
104
 
105
 
106
 
107
    result = file.open(QIODevice::ReadOnly);
108
    if (result) {
90 pingvin 109
                     model_str = QString(tr(file.readAll()));
89 pingvin 110
                }
111
 
91 pingvin 112
    setupModelData(model_str.split(QString("\n")), rootItem1);
89 pingvin 113
 
114
 
115
    return result;
116
 
117
}
118
 
119
 
120
void MainWindow::setupModelData(const QStringList &lines, QTreeWidgetItem *parent)
121
{
122
    QList<QTreeWidgetItem*> parents;
123
    QList<int> indentations;
124
    parents << parent;
125
    indentations << 0;
126
 
127
    int number = 0;
128
 
129
    while (number < lines.count()) {
130
        int position = 0;
131
        while (position < lines[number].length()) {
132
            if (lines[number].mid(position, 1) != " ")
133
                break;
134
            position++;
135
        }
136
 
137
        QString lineData = lines[number].mid(position).trimmed();
138
 
139
        if (!lineData.isEmpty()) {
140
            // Read the column data from the rest of the line.
141
            QStringList columnStrings = lineData.split("\t", QString::SkipEmptyParts);
142
            QList<QVariant> columnData;
143
            for (int column = 0; column < columnStrings.count(); ++column)
144
                columnData << columnStrings[column];
145
 
146
            if (position > indentations.last()) {
147
                // The last child of the current parent is now the new parent
148
                // unless the current parent has no children.
149
 
150
                if (parents.last()->childCount() > 0) {
151
                    parents << parents.last()->child(parents.last()->childCount()-1);
152
                    indentations << position;
153
                }
154
            } else {
155
                while (position < indentations.last() && parents.count() > 0) {
156
                    parents.pop_back();
157
                    indentations.pop_back();
158
                }
159
            }
160
 
161
            // Append a new item to the current parent's list of children.
162
          // // //  parents.last()->appendChild(new QTreeWidgetItem(columnData, parents.last()));
163
            QTreeWidgetItem* itm_tmp;
164
            itm_tmp = new QTreeWidgetItem( parents.last());
165
 
166
            itm_tmp->setText(0, QString(columnData.at(0).toString()));
167
            if (columnData.at(1).toString() == "true") {
168
                                                            itm_tmp->setCheckState(0,Qt::Checked);
169
                                                        }
170
            else itm_tmp->setCheckState(0,Qt::Unchecked);
141 pingvin 171
            if (columnData.count()>2)
172
            {
90 pingvin 173
            itm_tmp->setText(1, QString(columnData.at(2).toString()));
174
            itm_tmp->setText(2, QVariant(number).toString()); //    - 
175
            itm_tmp->setText(3, QVariant(indentations.size()).toString());
141 pingvin 176
            }
89 pingvin 177
        }
178
 
179
        number++;
180
    }
181
}
182
 
183
 
184
/*
185
void MainWindow::openBase()
186
{
187
 
188
        db = QSqlDatabase::addDatabase("QMYSQL");
189
        pdb = &db;
190
        raportFrm.pdb = &db;
191
 
192
        pdb->setHostName(hostName);
193
        pdb->setDatabaseName(baseName);
194
        pdb->setUserName(userName);
195
        pdb->setPassword(password);
196
        bool ok = pdb->open();
197
        if (!ok) {
198
                                QMessageBox::critical( //     .
199
                                                                                this,                      //  .
200
                                                                                QObject::tr("Database Error"),   // .
201
                                                                                pdb->lastError().text());          //  .
202
                         }
203
        if (ok)
204
        {lineEdit-> insert(tr("  "));
205
        }
206
        else {lineEdit-> insert(tr(" .  : "));
207
                  lineEdit-> insert(pdb->lastError().text());
208
                 }
209
 
210
 
211
 
212
        model = new QSqlTableModel(this);
213
        model->setTable(tableName);
214
 
215
        model->setEditStrategy(QSqlTableModel::OnManualSubmit);
216
        model->setSort(0, Qt::AscendingOrder);
217
 
218
        model->select();
219
 
220
 
221
        QSqlField field(tr("age"), QVariant::Int);
222
        field.setValue(QString(tr("123")));
223
 
224
        bool okey;
225
        int index;
226
        QSqlRecord record;
227
 
228
 
229
        tableView->setModel(model);
230
        view.setModel(model);
231
 
232
 
233
        tableView->setAlternatingRowColors(true);
234
        view.setAlternatingRowColors(true);
235
 
236
        tableView->resizeColumnsToContents();
237
 
238
 
239
        view.resizeColumnsToContents();
240
 
241
        tableView->show();
242
 
243
 
244
 
245
        initTreeWidget();
246
}
247
*/
91 pingvin 248
 
249
 
250
void MainWindow::creatModelString(){
251
 
252
    MainWindow::modelString.clear(); //   
253
 //   for (int i =0; i < rootItem1->childCount(); ++i )
254
 
255
    {MainWindow::addChildsString(rootItem1, 0);}
256
 
257
    int root_item_child_count;
258
    int i;
259
    root_item_child_count = rootItem1->childCount();
260
    i++;
261
 
262
}
263
 
264
 
265
void MainWindow::addChildsString(QTreeWidgetItem *parentItem, int level){
266
    int child_count;
267
    child_count = parentItem->childCount();
268
    for (int i=0; i < child_count; ++i){
269
        for (int m=0; m < level; ++m){
270
        modelString.append(tr("    ")); //   -  ,     
271
    }
272
        modelString.append(parentItem->child(i)->text(0)); //    -  
273
        modelString.append(tr("\t\t\t\t")); //   -   
274
        if (parentItem->child(i)->checkState(0) ==  Qt::Checked) {modelString.append(tr("true"));} //   ,  "true",      
275
            else {modelString.append(tr("false"));} //     -  "false",       
276
        modelString.append(tr("\t\t\t\t")); //   -   
277
        modelString.append(parentItem->child(i)->text(1)); //    - ID 
278
         modelString.append(tr("\n")); //  
279
        if (parentItem->child(i)->childCount() > 0) { MainWindow::addChildsString(parentItem->child(i), level+1);}
280
 
281
    }
282
int i;
283
i++;
284
}
93 pingvin 285
 
286
 
287
bool MainWindow::openDataBase(){
288
    QString errorString;
289
    sql = QSqlDatabase::addDatabase("QMYSQL");
131 pingvin 290
//    sql.setDatabaseName(tr("an_db"));
291
 
132 pingvin 292
    // // // sql.setDatabaseName(tr("inventory"));
131 pingvin 293
 
132 pingvin 294
    sql.setDatabaseName(baseName);
131 pingvin 295
 
296
 
297
 
132 pingvin 298
    // // // sql.setHostName(tr("localhost"));
93 pingvin 299
 
132 pingvin 300
    sql.setHostName(hostName);
301
 
302
 
303
    // // // sql.setUserName(tr("an"));
304
 
305
    sql.setUserName(userName);
306
 
307
 
308
 
309
   // // //  sql.setPassword(tr("393939"));
310
 
311
 
312
    sql.setPassword(password);
313
 
314
 
315
 
93 pingvin 316
    bool ok;
317
    ok = sql.open();
318
 
319
    /*
320
    if (!ok) {
321
                                QMessageBox::critical( //     .
322
                                                                                this,                      //  .
323
                                                                                QObject::tr("Database Error"),   // .
324
                                                                                sql.lastError().text() );         //  .
325
 
326
 
327
                            }
328
 
329
*/
330
    if (!ok) {
331
                            QMessageBox::critical( //     .
332
                                                                            this,                      //  .
333
                                                                            QObject::tr("Database Error"),   // .
334
                                                                            sql.lastError().text());          //  .
335
                     }
336
else {
337
 
338
        QMessageBox::information( //     .
339
                                                        this,                      //  .
340
                                                        QObject::tr("Database Connect"),   // .
341
                                                        QObject::tr("     ."));         //  .
342
 
343
 
344
 
345
 
346
 
347
    }
348
 
349
     return ok;
350
}
94 pingvin 351
 
352
 
97 pingvin 353
bool MainWindow::buildPreviewModel(QString modelName, QString rootClassID){
94 pingvin 354
QSqlQuery q;
355
QString sql_str;
95 pingvin 356
QString field_name_str;
357
QString root_class_name;
358
bool ok;
94 pingvin 359
int field_name;
95 pingvin 360
 
361
//ui->treeWidget->clear();
362
 
363
root_class_name = MainWindow::ClassName(rootClassID); //   
364
 
365
rootItem1 = new  QTreeWidgetItem(ui->treeWidget);
106 pingvin 366
root_items_list << rootItem1;
97 pingvin 367
 rootItem1->setText(0, modelName);
368
 
95 pingvin 369
 rootItem1->setCheckState(0,Qt::Checked);
104 pingvin 370
 rootItems.append(rootItem1);
95 pingvin 371
 
372
 
104 pingvin 373
 
97 pingvin 374
rootItem2 = new  QTreeWidgetItem(rootItem1);
375
rootItem2->setText(0, root_class_name);
376
rootItem2->setText(1, rootClassID);
377
rootItem2->setCheckState(0,Qt::Checked);
95 pingvin 378
 
98 pingvin 379
addChildsItems(rootItem2);
95 pingvin 380
 
94 pingvin 381
sql_str = tr("select * "
95 pingvin 382
             " from DescriptionOfClasses where  DescriptionOfClasses.DefaultValue = '"       // ,     
94 pingvin 383
             );
384
sql_str.append(rootClassID);
385
 
95 pingvin 386
sql_str.append(tr("' and DescriptionOfClasses.FieldType = 'pointer' "));
94 pingvin 387
 
95 pingvin 388
q.prepare(sql_str);
389
 
390
ok = q.exec();
391
if (!ok) {
392
                        QMessageBox::critical( //     .
393
                                                                        this,                      //  .
394
                                                                        QObject::tr("Database Error"),   // .
395
                                                                        q.lastError().text());          //  .
396
                 }
397
field_name = q.record().indexOf(tr("FieldName"));
398
while(q.next()){
399
 
400
                field_name_str = q.value(field_name).toString();
401
 
402
                }
403
 
100 pingvin 404
 
405
 
406
 
94 pingvin 407
}
95 pingvin 408
 
409
 
107 pingvin 410
bool MainWindow::rebuildPreviewModel(QTreeWidgetItem* root_item, QString rootClassID){
411
QSqlQuery q;
412
QString sql_str;
413
QString field_name_str;
414
QString root_class_name;
415
bool ok;
416
int field_name;
95 pingvin 417
 
107 pingvin 418
//ui->treeWidget->clear();
419
 
420
root_class_name = MainWindow::ClassName(rootClassID); //   
421
 
422
 
423
// rootItem1 = new  QTreeWidgetItem(ui->treeWidget);
424
// root_items_list << rootItem1;
425
// rootItem1->setText(0, modelName);
426
 
427
// rootItem1->setCheckState(0,Qt::Checked);
428
// rootItems.append(rootItem1);
429
 
430
// root_item->removeChild(root_item->child(0)); //    
431
if (root_item->childCount()==1){
432
root_item->child(0)->setText(0, root_class_name);
433
root_item->child(0)->setText(1, rootClassID);
434
root_item->child(0)->setCheckState(0,Qt::Checked);}
435
 
436
//delete rootItem2;
437
 
438
 
439
// rootItem2 = new  QTreeWidgetItem(rootItem1);
440
 
441
 
442
 
443
// rootItem2->setText(0, root_class_name);
444
// rootItem2->setText(1, rootClassID);
445
// rootItem2->setCheckState(0,Qt::Checked);
446
 
447
int child_count = root_item->child(0)->childCount();
448
 
449
 
450
 
451
for (int i=0; i < child_count; i++){
452
    root_item->child(0)->removeChild(root_item->child(0)->child(0));
453
}
454
 
455
child_count = root_item->child(0)->childCount();
456
addChildsItems(root_item->child(0));
457
/*
458
sql_str = tr("select * "
459
             " from DescriptionOfClasses where  DescriptionOfClasses.DefaultValue = '"       // ,     
460
             );
461
sql_str.append(rootClassID);
462
 
463
sql_str.append(tr("' and DescriptionOfClasses.FieldType = 'pointer' "));
464
 
465
q.prepare(sql_str);
466
 
467
ok = q.exec();
468
if (!ok) {
469
                        QMessageBox::critical( //     .
470
                                                                        this,                      //  .
471
                                                                        QObject::tr("Database Error"),   // .
472
                                                                        q.lastError().text());          //  .
473
                 }
474
field_name = q.record().indexOf(tr("FieldName"));
475
while(q.next()){
476
 
477
                field_name_str = q.value(field_name).toString();
478
 
479
                }
480
 
481
*/
482
 
483
 
484
}
485
 
486
 
487
 
488
 
95 pingvin 489
QString MainWindow::ClassName(QString class_id){ //     ID
490
    QSqlQuery q;
491
    QString sql_str;
492
    QString class_name_str;
493
    bool ok;
494
    int field_class_name;
495
 
496
    sql_str = tr("select * "
497
                 " from ListOfClasses where ListOfClasses.ID = '"       // ,     
498
                 );
499
 
500
    sql_str.append(class_id);
501
    sql_str.append(tr("' "));
502
 
503
    q.prepare(sql_str);
504
 
505
    ok = q.exec();
506
 
507
 
508
    if (!ok) {
509
                            QMessageBox::critical( //     .
510
                                                                            this,                      //  .
511
                                                                            QObject::tr("Database Error"),   // .
512
                                                                            q.lastError().text());          //  .
513
                     }
514
 
515
    field_class_name = q.record().indexOf(tr("ClassName"));
516
    while(q.next()){
517
 
518
                    class_name_str = q.value(field_class_name).toString();
519
 
520
                    }
521
 
522
    return class_name_str;
523
 
524
}
98 pingvin 525
 
526
void MainWindow::addChildsItems(QTreeWidgetItem *perent_class_item){ //          ,      
100 pingvin 527
QStringList chields_list;
528
QString parent_ID;
529
QTreeWidgetItem *Item_tmp;
530
parent_ID = perent_class_item->text(1);
531
int chields_count, i;
98 pingvin 532
 
100 pingvin 533
chields_list = MainWindow::classChields(parent_ID);
534
if(chields_list.isEmpty()) return;
535
chields_count = chields_list.size();
536
for (int l = 0; l < chields_count; ++l){
537
    QString chield_class_name, chield_id;
538
    chield_id = chields_list.at(l);
539
    chield_class_name = MainWindow::ClassName(chield_id);
540
    Item_tmp = new QTreeWidgetItem(perent_class_item);
541
    Item_tmp->setText(0, chield_class_name);
542
    Item_tmp->setText(1, chield_id);
543
    Item_tmp->setCheckState(0, Qt::Checked);
101 pingvin 544
    MainWindow::addChildsItems(Item_tmp);
98 pingvin 545
}
546
 
100 pingvin 547
i++;
99 pingvin 548
 
100 pingvin 549
}
550
 
551
 
99 pingvin 552
/********************************************************
553
*    "" 
554
*
555
*
556
*
557
********************************************************/
558
 
559
QStringList MainWindow::classChields(QString class_id){
560
   // QMap<QString, QString> map;
561
   // TClass class_tmp;
562
   // QList <TClass> chields_class_list; //   
563
    QStringList result;
564
    QSqlQuery q;
565
    QString sql_str;
566
    QString classIdentifer_str; //      -
567
    QString field_id_str;
568
    bool ok;
569
    int field_classIdentifer;
570
    sql_str = tr("select * "
571
                 " from DescriptionOfClasses where  DescriptionOfClasses.DefaultValue = '"       // ,     
572
                 );
573
    sql_str.append(class_id);
574
 
575
    sql_str.append(tr("' and DescriptionOfClasses.FieldType = 'pointer' "));
576
 
577
    q.prepare(sql_str);
578
 
579
    ok = q.exec();
580
    if (!ok) {
581
                            QMessageBox::critical( //     .
582
                                                                            this,                      //  .
583
                                                                            QObject::tr("Database Error"),   // .
584
                                                                            q.lastError().text());          //  .
585
                     }
586
    field_classIdentifer = q.record().indexOf(tr("ClassIdentifer"));
587
      while(q.next()){
588
 
589
                    classIdentifer_str = q.value(field_classIdentifer).toString();
590
                    result.append(classIdentifer_str);
591
                    }
592
 
593
    return result;
594
 
595
  }
102 pingvin 596
 
597
 
598
QMap <QString, QString> MainWindow::getClassList(){ //   
599
QMap <QString, QString> result_map;
600
QSqlQuery q;
601
QString sql_str;
103 pingvin 602
QString class_name_str, class_id_str;
603
 
102 pingvin 604
int field_class_id, field_class_name;
605
bool ok;
606
sql_str = tr("select * "
607
             " from ListOfClasses "       // ,     
608
             );
609
 q.prepare(sql_str);
610
 ok = q.exec();
611
 if (!ok) {
612
                         QMessageBox::critical( //     .
613
                                                                         this,                      //  .
614
                                                                         QObject::tr("Database Error"),   // .
615
                                                                         q.lastError().text());          //  .
616
                         return result_map; //   -   
617
                  }
618
field_class_id = q.record().indexOf(tr("ID"));
619
field_class_name = q.record().indexOf(tr("ClassName"));
620
 
103 pingvin 621
while(q.next()){
102 pingvin 622
 
103 pingvin 623
                class_name_str = q.value(field_class_name).toString();
624
                class_id_str = q.value(field_class_id).toString();
625
                result_map[class_id_str] = class_name_str;
626
                }
102 pingvin 627
 return result_map;
628
}
104 pingvin 629
 
630
 
631
 
632
 
633
 
634
void MainWindow::initComboBox(){
635
 
106 pingvin 636
 
104 pingvin 637
    QStringList classesNameList;
638
    QStringList classesID_list;
639
    QStringList tmp_stringList;
640
 
641
 
642
 
643
    QString tmp_str;
644
 
645
    class_list_map = MainWindow::getClassList();
646
    classesID_list = class_list_map.keys();
647
    classesNameList = class_list_map.values();
648
    QMapIterator<QString, QString> interator(class_list_map);
649
//    ui->comboBox->addItems(classesID_list);
650
  //  ui->comboBox->addItems(classesNameList);
651
    while (interator.hasNext()) {
652
         interator.next();
653
         tmp_str =  interator.value();
654
         tmp_str.append(tr(" \t(ID="));
655
         tmp_str.append(interator.key());
656
         tmp_str.append(tr(")"));
657
         tmp_stringList << tmp_str;
658
 
659
     }
132 pingvin 660
//    int count = ui->comboBox->count();
661
 
662
    ui->comboBox->clear();
104 pingvin 663
    ui->comboBox->addItems(tmp_stringList);
664
 
665
 
666
}
105 pingvin 667
 
668
 
106 pingvin 669
void MainWindow::on_comboBox_currentIndexChanged( int index ){
670
QStringList classesNameList;
671
QStringList classesID_list;
672
QString ID_str;
132 pingvin 673
if (index == -1) return;
674
 
106 pingvin 675
classesID_list = class_list_map.keys();
676
classesNameList = class_list_map.values();
677
ID_str =  classesID_list[index];
678
ui->label->setText(ID_str);
107 pingvin 679
if (root_items_list.indexOf(ui->treeWidget->currentItem()) != -1) rebuildPreviewModel(ui->treeWidget->currentItem(), ID_str);
118 pingvin 680
getDatabaseData();
107 pingvin 681
 
682
 
105 pingvin 683
}
684
 
106 pingvin 685
void MainWindow::on_treeWidget_itemChanged ( QTreeWidgetItem * item, int column ){
686
    int i;
687
    i++;
688
 
118 pingvin 689
    if ((column) == 0 && (model_is_build)) getDatabaseData();
690
 
106 pingvin 691
}
692
 
693
 
694
void MainWindow::on_treeWidget_itemClicked ( QTreeWidgetItem * item, int column ){
695
    int i;
696
    i++;
108 pingvin 697
    if (root_items_list.indexOf(item) != -1) {
698
        QStringList classesNameList;
699
        QStringList classesID_list;
106 pingvin 700
 
108 pingvin 701
        int index;
702
        classesID_list = class_list_map.keys();
703
        classesNameList = class_list_map.values();
704
        index = classesID_list.indexOf(item->child(0)->text(1));
132 pingvin 705
        if (index != -1) ui->comboBox->setCurrentIndex(index);
108 pingvin 706
 
707
        ui->comboBox->setEnabled(true);
708
 
709
 
710
    }
106 pingvin 711
  //  if ((rootItem1) == (item) ) ui->comboBox->setEnabled(true);
712
else ( ui->comboBox->setEnabled(false));
713
}
110 pingvin 714
 
125 pingvin 715
QMap <QString, QString> MainWindow::getFieldsList(QString class_id){ //    
110 pingvin 716
 
125 pingvin 717
}