Хранилища Subversion OpenInventory

Редакция

Редакция 188 | Редакция 190 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS

Редакция 188 Редакция 189
Строка 506... Строка 506...
506
506
507
507
508
pointersList = getPointersList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé-óêàçàòåëåé
508
pointersList = getPointersList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé-óêàçàòåëåé
509
dateFieldList = getDataFieldList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé c òèïîì "DATE"
509
dateFieldList = getDataFieldList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé c òèïîì "DATE"
510
boolFieldList = getBoolFieldList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé c òèïîì "BOOL"
510
boolFieldList = getBoolFieldList(class_id); // ïîëó÷àåì ñïèñîê ïîëåé c òèïîì "BOOL"
-
 
511
icon_index = getIconFieldIndex(inctance); //
-
 
512
if (icon_index != -1) ui->tableView->setItemDelegateForColumn(icon_index, iconDelegate);
-
 
513
sql_mogel->setIconIndex(icon_index);
-
 
514
511
QMap <int, QString> pointersToModel;
515
QMap <int, QString> pointersToModel;
512
516
513
517
514
518
515
for (int i=0; i < dateFieldList.count(); i++){ // äëÿ âñåõ ïîëåé ñ òèïîì "DATA"
519
for (int i=0; i < dateFieldList.count(); i++){ // äëÿ âñåõ ïîëåé ñ òèïîì "DATA"
Строка 601... Строка 605...
601
605
602
606
603
connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
607
connect(sql_mogel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_sql_mogel_dataChanged(QModelIndex,QModelIndex)));
604
608
605
ui->tableView->setModel(sql_mogel);
609
ui->tableView->setModel(sql_mogel);
606
-
 
607
ui->tableView->resizeColumnsToContents();
-
 
608
ui->tableView->hideColumn(0);
610
ui->tableView->hideColumn(0);
-
 
611
ui->tableView->resizeColumnsToContents();
-
 
612
ui->tableView->resizeRowsToContents();
-
 
613
-
 
614
-
 
615
609
616
610
617
611
    }
618
    }
612
619
613
}
620
}
Строка 731... Строка 738...
731
}
738
}
732
739
733
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
740
void MainWindow::on_sql_mogel_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){ // èçìåíèëè ñâîéñòâà îáúåêòà èëè äîáàâèëè íîâûé îáúåêò
734
int i;
741
int i;
735
i++;
742
i++;
-
 
743
-
 
744
if (sql_mogel->iconIndex() !=-1) {
-
 
745
                                    ui->tableView->resizeColumnsToContents();
-
 
746
                                    ui->tableView->resizeRowsToContents();
-
 
747
                                    }
-
 
748
736
if ((topLeft == bottomRight) && (boolFieldsIndexes_global.indexOf(topLeft.column()) != -1))
749
if ((topLeft == bottomRight) && (boolFieldsIndexes_global.indexOf(topLeft.column()) != -1))
737
{
750
{
738
    ui->pushButton_3->setEnabled(false);
751
    ui->pushButton_3->setEnabled(false);
739
    ui->pushButton_4->setEnabled(false);
752
    ui->pushButton_4->setEnabled(false);
740
return;
753
return;
Строка 869... Строка 882...
869
    if (!ok) {
882
    if (!ok) {
870
                            QMessageBox::critical( // Äèàëîã ñ ñîîáùåíèåì îá îøèáêå.
883
                            QMessageBox::critical( // Äèàëîã ñ ñîîáùåíèåì îá îøèáêå.
871
                                                                            this,                      // Ðîäèòåëüñêèé âèäæåò.
884
                                                                            this,                      // Ðîäèòåëüñêèé âèäæåò.
872
                                                                            QObject::tr("Database Error"),   // Çàãîëîâîê.
885
                                                                            QObject::tr("Database Error"),   // Çàãîëîâîê.
873
                                                                            q.lastError().text());          // Òåêñò ñîîáùåíèÿ.
886
                                                                            q.lastError().text());          // Òåêñò ñîîáùåíèÿ.
-
 
887
874
                                                                            // return result_str;
888
                                return -1;
875
                     }
889
                     }
876
890
877
    icon_field =  q.record().indexOf(tr("Icon"));
891
    icon_field =  q.record().indexOf(tr("Icon"));
878
-
 
-
 
892
    return icon_field;
879
893
880
894
881
}
895
}
882
896
883
897