Хранилища Subversion OpenInventory

Сравнить редакции

Не учитывать пробелы Редакция 65 → Редакция 64

/trunk/ClassEditor/classeditor.cpp
215,7 → 215,6
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà"));
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé"));
 
 
//ui->tableView->setModel(model);
ui->tableView->setModel(mymodel);
//tableForDescription = new QTableView();
227,17 → 226,13
 
ui->tableView->setAlternatingRowColors(true);
ui->tableView->resizeColumnsToContents();
 
ui->tableView->hideColumn(0);
ui->tableView->hideColumn(3);
ui->tableView->hideColumn(2);
 
/*
ui->tableView_2->hideColumn(0);
ui->tableView_2->hideColumn(5);
ui->tableView_2->hideColumn(2);
*/
ui->tableView_2->setItemDelegateForColumn(3, &classTableDelegate);
 
currIndexOfClassesTable = modelForDescription->index(0, 1);
QModelIndex index_temp;
259,10 → 254,7
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex)));
connect(mymodel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_myModel_dataChanged(QModelIndex,QModelIndex)));
connect(modelForDescription, SIGNAL(dataChanged(QModelIndex,QModelIndex)), this, SLOT(on_modelForDescription_dataChanged(QModelIndex,QModelIndex)));
connect(ui->newClassAction, SIGNAL(triggered(bool)), this, SLOT(on_pushButton_clicked(bool)));
connect(ui->action_ID, SIGNAL(triggered(bool)), this, SLOT(on_action_ID_triggered(bool)));
connect(ui->action_showAlias, SIGNAL(triggered(bool)), this, SLOT(on_action_showAlias_triggered(bool)));
connect(ui->action_showInstance, SIGNAL(triggered(bool)), this, SLOT(on_action_showInstance_triggered(bool)));
 
}
 
 
465,21 → 457,3
void ClassEditor::on_modelForDescription_dataChanged ( const QModelIndex & topLeft, const QModelIndex & bottomRight ){
ui->tableView_2->resizeColumnsToContents();
}
 
void ClassEditor::on_action_ID_triggered(bool is_checked){ // îáðàáàòûâàåì âûáîð â ìåíþ "Ïîêàçûâàòü ID"
if (is_checked) ui->tableView->showColumn(0);
else ui->tableView->hideColumn(0);
ui->tableView->resizeColumnsToContents();
}
 
void ClassEditor::on_action_showAlias_triggered(bool is_checked){ // îáðàáàòûâàåì âûáîð â ìåíþ "Ïîêàçûâàòü ïñåâäîíèì"
if (is_checked) ui->tableView->showColumn(2);
else ui->tableView->hideColumn(2);
ui->tableView->resizeColumnsToContents();
}
 
void ClassEditor::on_action_showInstance_triggered(bool is_checked){
if (is_checked) ui->tableView->showColumn(3);
else ui->tableView->hideColumn(3);
ui->tableView->resizeColumnsToContents();
}