Хранилища Subversion OpenInventory

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

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

/trunk/ClassEditor/tablefield.cpp
92,10 → 92,13
str_tmp.append(characterSet);
}
if (notNull) { str_tmp.append(tr(" NOT NULL")); }
if (defaultValue !="") {
if ((defaultValue !="") && (defaultValue !="NULL")) {
str_tmp.append(tr(" default '"));
str_tmp.append(defaultValue);
str_tmp.append(tr("'"));}
if ((defaultValue =="NULL")) {
str_tmp.append(tr(" default "));
str_tmp.append(defaultValue);}
 
if (TableField::autoIncrement) {
str_tmp.append(tr(" "));
/trunk/ClassEditor/classeditor.cpp
27,11 → 27,49
field->setDefaultValue(tr("êîìïüþòåð"));
table->append(field);
 
field = new TableField(tr("Ìîíèòîðû"), this);
field->setNotNull(true);
field->setDefaultValue(tr("ìîíèòîð"));
table->append(field);
 
field = new TableField(tr("Êîëè÷åñòâî (øòóê)"), this);
field->setNotNull(true);
field->setType(tr("INTEGER"));
field->setDefaultValue(tr("1"));
table->append(field);
 
field = new TableField(tr("Äåíü ðîæäåíèÿ"), this);
field->setNotNull(false);
field->setType(tr("DATE"));
field->setDefaultValue(tr("NULL"));
table->append(field);
 
ui->label_2->setText(table->name());
ui->label->setText(table->fields().at(0)->sqlString());
ui->label_4->setText(table->sqlString());
ui->lineEdit->insert(table->sqlString());
////// ui->lineEdit->insert(table->sqlString());
 
QTextDocument *document;
// = ui->textEdit->document();
QTextCursor *cursor;
document = ui->textEdit->document();
cursor = new QTextCursor(document);
cursor->movePosition(QTextCursor::Start);
QTextCharFormat format(cursor->charFormat());
//format.setFontFamily("Courier");
format.setFontFamily("Arial");
//format.setFontItalic(false);
 
format.setFontWeight(QFont::Normal);
QTextCharFormat boldFormat = format;
boldFormat.setFontWeight(QFont::Bold);
 
QTextCharFormat italicFormat = format;
//format.setFontFamily("Courier");
// format.setFontFamily("Arial");
italicFormat.setFontItalic(true);
 
cursor->insertText(table->sqlString(), format);
}
 
ClassEditor::~ClassEditor()
/trunk/ClassEditor/classeditor.ui
66,13 → 66,13
<string>TextLabel</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit">
<widget class="QTextEdit" name="textEdit">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>581</width>
<height>31</height>
<y>200</y>
<width>411</width>
<height>94</height>
</rect>
</property>
</widget>
83,7 → 83,7
<x>0</x>
<y>0</y>
<width>600</width>
<height>27</height>
<height>25</height>
</rect>
</property>
</widget>