Subversion Repositories OpenInventory

Rev

Rev 200 | Rev 202 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 200 Rev 201
Line 564... Line 564...
564
564
565
QMap <int, QString> pointersToModel;
565
QMap <int, QString> pointersToModel;
566
566
567
567
568
568
-
 
569
-
 
570
-
 
571
for (int i=0; i < fileFieldList.count(); i++){ // äëÿ âñåõ ïîëåé, õðàíÿùèõ ôàéëû
-
 
572
  //  static FileDelegate flDelegate;
-
 
573
   // static TimeEditDelegate dateDelegate("01.10.2010");
-
 
574
    QString fileFieldName; // èìÿ ïîëÿ
-
 
575
    int fileFieldIndex; //
-
 
576
    fileFieldName = fileFieldList.at(i); // îïðåäåëÿåì èìÿ ïîëÿ, õðàíÿùåãî ôàéë
-
 
577
    fileFieldIndex = sql_mogel->record().indexOf(fileFieldName); // îïðåäåëÿåì íîìåð ñòîëáöà â ìîäåëå
-
 
578
    file_colomns_indexes.append(fileFieldIndex);// çàïîìíèì íîìåð ñòîëáöà ñ äåëåãàòîì äëÿ òèïà "àøäó"
-
 
579
    ui->tableView->setItemDelegateForColumn(fileFieldIndex, fileDelegate);
-
 
580
-
 
581
}
-
 
582
-
 
583
-
 
584
-
 
585
-
 
586
569
for (int i=0; i < dateFieldList.count(); i++){ // äëÿ âñåõ ïîëåé ñ òèïîì "DATA"
587
for (int i=0; i < dateFieldList.count(); i++){ // äëÿ âñåõ ïîëåé ñ òèïîì "DATA"
570
     static MyDEDelegate dateDelegate;
588
     static MyDEDelegate dateDelegate;
571
   // static TimeEditDelegate dateDelegate("01.10.2010");
589
   // static TimeEditDelegate dateDelegate("01.10.2010");
572
    QString dateFieldName; // èìÿ ïîëÿ
590
    QString dateFieldName; // èìÿ ïîëÿ
573
    int dataFieldIndex; //
591
    int dataFieldIndex; //
Line 639... Line 657...
639
    ui->tableView->setItemDelegateForColumn(pointerIndex, spin_delegate_tmp);
657
    ui->tableView->setItemDelegateForColumn(pointerIndex, spin_delegate_tmp);
640
658
641
    pointersToModel.insert(pointerIndex, parentInctancesList.at(i)); // ôîðìèðóåì ñïèñîê ñòîëáöîâ ñ óêàçàòåëÿìè
659
    pointersToModel.insert(pointerIndex, parentInctancesList.at(i)); // ôîðìèðóåì ñïèñîê ñòîëáöîâ ñ óêàçàòåëÿìè
642
}
660
}
643
661
644
sql_mogel->setPointers(pointersToModel); // ïåðåäàåì ñïèñîê ìîäåëè
662
sql_mogel->setPointers(pointersToModel); // ïåðåäàåì ñïèñîê óêàçàòåëåé ìîäåëå
645
663
646
pointer_index = sql_mogel->record().indexOf(pointer_name); // ýòî ãëîáàëüíàÿ ïåðåìåííàÿ, íå òðîãàåì, íóæíà! :-)
664
pointer_index = sql_mogel->record().indexOf(pointer_name); // ýòî ãëîáàëüíàÿ ïåðåìåííàÿ, íå òðîãàåì, íóæíà! :-)
647
665
648
666
649
667