Хранилища Subversion OpenInventory

Редакция

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

Редакция 64 Редакция 65
Строка 213... Строка 213...
213
213
214
////////////////////////model->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
214
////////////////////////model->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
215
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
215
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
216
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé"));
216
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé"));
217
217
-
 
218
218
//ui->tableView->setModel(model);
219
//ui->tableView->setModel(model);
219
ui->tableView->setModel(mymodel);
220
ui->tableView->setModel(mymodel);
220
//tableForDescription = new QTableView();
221
//tableForDescription = new QTableView();
221
ui->tableView_2->setModel(modelForDescription);
222
ui->tableView_2->setModel(modelForDescription);
222
ui->tableView_2->setAlternatingRowColors(true);
223
ui->tableView_2->setAlternatingRowColors(true);
Строка 224... Строка 225...
224
//tableForDescription->show();
225
//tableForDescription->show();
225
226
226
227
227
ui->tableView->setAlternatingRowColors(true);
228
ui->tableView->setAlternatingRowColors(true);
228
ui->tableView->resizeColumnsToContents();
229
ui->tableView->resizeColumnsToContents();
-
 
230
229
ui->tableView->hideColumn(0);
231
ui->tableView->hideColumn(0);
230
ui->tableView->hideColumn(3);
232
ui->tableView->hideColumn(3);
231
ui->tableView->hideColumn(2);
233
ui->tableView->hideColumn(2);
232
234
-
 
235
/*
233
ui->tableView_2->hideColumn(0);
236
ui->tableView_2->hideColumn(0);
234
ui->tableView_2->hideColumn(5);
237
ui->tableView_2->hideColumn(5);
235
ui->tableView_2->hideColumn(2);
238
ui->tableView_2->hideColumn(2);
-
 
239
*/
-
 
240
ui->tableView_2->setItemDelegateForColumn(3, &classTableDelegate);
236
241
237
currIndexOfClassesTable = modelForDescription->index(0, 1);
242
currIndexOfClassesTable = modelForDescription->index(0, 1);
238
QModelIndex index_temp;
243
QModelIndex index_temp;
239
244
240
currClassID = mymodel->data(mymodel->index(0,0)).toString();
245
currClassID = mymodel->data(mymodel->index(0,0)).toString();
Строка 252... Строка 257...
252
257
253
258
254
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex)));
259
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex)));
255
connect(mymodel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_myModel_dataChanged(QModelIndex,QModelIndex)));
260
connect(mymodel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_myModel_dataChanged(QModelIndex,QModelIndex)));
256
connect(modelForDescription, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_modelForDescription_dataChanged(QModelIndex,QModelIndex)));
261
connect(modelForDescription, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_modelForDescription_dataChanged(QModelIndex,QModelIndex)));
257
-
 
-
 
262
connect(ui->newClassAction, SIGNAL(triggered(bool)), this, SLOT(on_pushButton_clicked(bool)));
-
 
263
connect(ui->action_ID, SIGNAL(triggered(bool)), this, SLOT(on_action_ID_triggered(bool)));
-
 
264
connect(ui->action_showAlias, SIGNAL(triggered(bool)), this, SLOT(on_action_showAlias_triggered(bool)));
-
 
265
connect(ui->action_showInstance, SIGNAL(triggered(bool)), this, SLOT(on_action_showInstance_triggered(bool)));
258
}
266
}
259
267
260
268
261
269
262
270
Строка 455... Строка 463...
455
}
463
}
456
464
457
void ClassEditor::on_modelForDescription_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){
465
void ClassEditor::on_modelForDescription_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){
458
    ui->tableView_2->resizeColumnsToContents();
466
    ui->tableView_2->resizeColumnsToContents();
459
}
467
}
-
 
468
-
 
469
void ClassEditor::on_action_ID_triggered(bool is_checked){          // îáðàáàòûâàåì âûáîð â ìåíþ "Ïîêàçûâàòü ID"
-
 
470
if (is_checked) ui->tableView->showColumn(0);
-
 
471
else ui->tableView->hideColumn(0);
-
 
472
ui->tableView->resizeColumnsToContents();
-
 
473
}
-
 
474
-
 
475
void ClassEditor::on_action_showAlias_triggered(bool is_checked){     // îáðàáàòûâàåì âûáîð â ìåíþ "Ïîêàçûâàòü ïñåâäîíèì"
-
 
476
    if (is_checked) ui->tableView->showColumn(2);
-
 
477
    else ui->tableView->hideColumn(2);
-
 
478
    ui->tableView->resizeColumnsToContents();
-
 
479
}
-
 
480
-
 
481
void ClassEditor::on_action_showInstance_triggered(bool is_checked){
-
 
482
    if (is_checked) ui->tableView->showColumn(3);
-
 
483
    else ui->tableView->hideColumn(3);
-
 
484
    ui->tableView->resizeColumnsToContents();
-
 
485
}