Редакция 39 | Редакция 41 | К новейшей редакции | Весь файл | Не учитывать пробелы | Содержимое файла | Авторство | Последнее изменение | Открыть журнал | RSS
Редакция 39 | Редакция 40 | ||
---|---|---|---|
Строка 25... | Строка 25... | ||
25 | field = new TableField(tr("Êîìïüþòåðû"), this); |
25 | field = new TableField(tr("Êîìïüþòåðû"), this); |
26 | field->setNotNull(true); |
26 | field->setNotNull(true); |
27 | field->setDefaultValue(tr("êîìïüþòåð")); |
27 | field->setDefaultValue(tr("êîìïüþòåð")); |
28 | table->append(field); |
28 | table->append(field); |
29 | 29 | ||
- | 30 | field = new TableField(tr("Ìîíèòîðû"), this); |
|
- | 31 | field->setNotNull(true); |
|
- | 32 | field->setDefaultValue(tr("ìîíèòîð")); |
|
- | 33 | table->append(field); |
|
- | 34 | ||
- | 35 | field = new TableField(tr("Êîëè÷åñòâî (øòóê)"), this); |
|
- | 36 | field->setNotNull(true); |
|
- | 37 | field->setType(tr("INTEGER")); |
|
- | 38 | field->setDefaultValue(tr("1")); |
|
- | 39 | table->append(field); |
|
- | 40 | ||
- | 41 | field = new TableField(tr("Äåíü ðîæäåíèÿ"), this); |
|
- | 42 | field->setNotNull(false); |
|
- | 43 | field->setType(tr("DATE")); |
|
- | 44 | field->setDefaultValue(tr("NULL")); |
|
- | 45 | table->append(field); |
|
- | 46 | ||
30 | ui->label_2->setText(table->name()); |
47 | ui->label_2->setText(table->name()); |
31 | ui->label->setText(table->fields().at(0)->sqlString()); |
48 | ui->label->setText(table->fields().at(0)->sqlString()); |
32 | ui->label_4->setText(table->sqlString()); |
49 | ui->label_4->setText(table->sqlString()); |
33 | ui->lineEdit->insert(table->sqlString()); |
50 | ////// ui->lineEdit->insert(table->sqlString());
|
- | 51 | ||
- | 52 | QTextDocument *document; |
|
- | 53 | // = ui->textEdit->document();
|
|
- | 54 | QTextCursor *cursor; |
|
- | 55 | document = ui->textEdit->document(); |
|
- | 56 | cursor = new QTextCursor(document); |
|
- | 57 | cursor->movePosition(QTextCursor::Start); |
|
- | 58 | QTextCharFormat format(cursor->charFormat()); |
|
- | 59 | //format.setFontFamily("Courier");
|
|
- | 60 | format.setFontFamily("Arial"); |
|
- | 61 | //format.setFontItalic(false);
|
|
- | 62 | ||
- | 63 | format.setFontWeight(QFont::Normal); |
|
- | 64 | QTextCharFormat boldFormat = format; |
|
- | 65 | boldFormat.setFontWeight(QFont::Bold); |
|
- | 66 | ||
- | 67 | QTextCharFormat italicFormat = format; |
|
- | 68 | //format.setFontFamily("Courier");
|
|
- | 69 | // format.setFontFamily("Arial");
|
|
- | 70 | italicFormat.setFontItalic(true); |
|
34 | 71 | ||
- | 72 | cursor->insertText(table->sqlString(), format); |
|
35 | }
|
73 | }
|
36 | 74 | ||
37 | ClassEditor::~ClassEditor() |
75 | ClassEditor::~ClassEditor() |
38 | {
|
76 | {
|
39 | delete ui; |
77 | delete ui; |