/trunk/ClassEditor/classeditor.cpp |
---|
7,10 → 7,14 |
ui(new Ui::ClassEditor) |
{ |
ui->setupUi(this); |
// settdialog = new SettingsDialog(this); |
settdialog.show(); |
///////////////////////////////////////////////////// settdialog.show(); |
sql.setDatabaseName(tr("an_db")); |
/* |
field = new TableField(tr("Ñîòðóäíèêè"), this); |
field->setNotNull(true); |
field->setDefaultValue(tr("ñîòðóäíèê")); |
51,7 → 55,7 |
ui->label_4->setText(table->sqlString()); |
////// ui->lineEdit->insert(table->sqlString()); |
*/ |
/********************************************** |
QTextDocument *document; |
108,7 → 112,7 |
} |
/* |
ok = sql.createTable(table); |
if (!ok) { |
QMessageBox::critical( // Äèàëîã ñ ñîîáùåíèåì îá îøèáêå. |
126,8 → 130,8 |
*/ |
ok = sql.createListOfClassesTable(); |
if (!ok) { |
207,6 → 211,7 |
////////////////////////model->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà")); |
mymodel->setHeaderData(2, Qt::Horizontal, tr("Ïñåâäîíèì êëàññà")); |
mymodel->setHeaderData(4, Qt::Horizontal, tr("Êîìåíòàðèé")); |
//ui->tableView->setModel(model); |
ui->tableView->setModel(mymodel); |
219,8 → 224,9 |
ui->tableView->setAlternatingRowColors(true); |
ui->tableView->resizeColumnsToContents(); |
//ui->tableView->hideColumn(0); |
ui->tableView->hideColumn(0); |
ui->tableView->hideColumn(3); |
ui->tableView->hideColumn(2); |
//connect(ui->tableView, SIGNAL(clicked(const QModelIndex)), this, SLOT(on_tableView_clicked(const QModelIndex))); |
339,7 → 345,7 |
QString tmp_str, filter_str; |
index_tmp = ui->tableView->model()->index(row, 0); |
tmp_str = ui->tableView->model()->data(index_tmp).toString(); |
ui->label->setText(tmp_str); |
//ui->label->setText(tmp_str); |
filter_str = tr("ClassIdentifer = "); |
filter_str.append(tmp_str); |
modelForDescription->setFilter(filter_str); |
/trunk/ClassEditor/ClassEditor.pro |
---|
19,12 → 19,14 |
settingsdialog.cpp \ |
tablefield.cpp \ |
sqltable.cpp \ |
mymodel.cpp |
mymodel.cpp \ |
modelfordescriptiontable.cpp |
HEADERS += classeditor.h \ |
mysql.h \ |
settingsdialog.h \ |
tablefield.h \ |
sqltable.h \ |
mymodel.h |
mymodel.h \ |
modelfordescriptiontable.h |
FORMS += classeditor.ui \ |
settingsdialog.ui |
/trunk/ClassEditor/classeditor.ui |
---|
19,59 → 19,27 |
<rect> |
<x>10</x> |
<y>10</y> |
<width>581</width> |
<width>331</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
<string>TextLabel</string> |
<property name="font"> |
<font> |
<pointsize>11</pointsize> |
<weight>75</weight> |
<bold>true</bold> |
</font> |
</property> |
</widget> |
<widget class="QLabel" name="label_2"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>30</y> |
<width>581</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
<string>TextLabel</string> |
<string>Список зарегистрированных классов</string> |
</property> |
</widget> |
<widget class="QLabel" name="label_3"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>50</y> |
<width>581</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
<string>TextLabel</string> |
</property> |
</widget> |
<widget class="QLabel" name="label_4"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>70</y> |
<width>581</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
<string>TextLabel</string> |
</property> |
</widget> |
<widget class="QTableView" name="tableView"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>100</y> |
<width>961</width> |
<y>40</y> |
<width>821</width> |
<height>192</height> |
</rect> |
</property> |
79,10 → 47,10 |
<widget class="QPushButton" name="pushButton"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>300</y> |
<width>130</width> |
<height>30</height> |
<x>840</x> |
<y>49</y> |
<width>111</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
102,10 → 70,10 |
<widget class="QPushButton" name="pushButton_2"> |
<property name="geometry"> |
<rect> |
<x>160</x> |
<y>300</y> |
<width>181</width> |
<height>30</height> |
<x>840</x> |
<y>80</y> |
<width>111</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
115,10 → 83,10 |
<widget class="QPushButton" name="pushButton_3"> |
<property name="geometry"> |
<rect> |
<x>560</x> |
<y>300</y> |
<width>130</width> |
<height>30</height> |
<x>839</x> |
<y>149</y> |
<width>111</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
128,10 → 96,10 |
<widget class="QPushButton" name="pushButton_4"> |
<property name="geometry"> |
<rect> |
<x>700</x> |
<y>300</y> |
<width>181</width> |
<height>30</height> |
<x>840</x> |
<y>180</y> |
<width>111</width> |
<height>21</height> |
</rect> |
</property> |
<property name="text"> |
138,7 → 106,33 |
<string>Удалить поле</string> |
</property> |
</widget> |
<widget class="QCheckBox" name="checkBox"> |
<property name="geometry"> |
<rect> |
<x>10</x> |
<y>240</y> |
<width>131</width> |
<height>20</height> |
</rect> |
</property> |
<property name="text"> |
<string>Идентификатор</string> |
</property> |
</widget> |
<widget class="QCheckBox" name="checkBox_2"> |
<property name="geometry"> |
<rect> |
<x>150</x> |
<y>240</y> |
<width>101</width> |
<height>20</height> |
</rect> |
</property> |
<property name="text"> |
<string>Псевдоним</string> |
</property> |
</widget> |
</widget> |
<widget class="QMenuBar" name="menuBar"> |
<property name="geometry"> |
<rect> |
145,7 → 139,7 |
<x>0</x> |
<y>0</y> |
<width>983</width> |
<height>27</height> |
<height>25</height> |
</rect> |
</property> |
</widget> |