git-svn-id: svn://db.shs.com.ru/libs@412 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -983,7 +983,7 @@ void Graphic::drawGrid() {
|
||||
if (!str.second.isEmpty()) {
|
||||
rect = sfm.boundingRect(str.second);
|
||||
painter->setFont(sf);
|
||||
painter->drawText(cx + dx, cy - font_sz.height() / 2.5, str.second);
|
||||
painter->drawText(cx + dx, cy - font_sz.height() / 4., str.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,12 +73,20 @@ QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent) {
|
||||
QAction * a = new QAction(this);
|
||||
a->setShortcut(QKeySequence("Shift+Tab"));
|
||||
a->setShortcutContext(Qt::WidgetShortcut);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(deindent()));
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(deindent()));
|
||||
ui->textCode->addAction(a);
|
||||
a = new QAction(this);
|
||||
a->setShortcut(QKeySequence("Ctrl+D"));
|
||||
a->setShortcutContext(Qt::WidgetShortcut);
|
||||
connect(a, SIGNAL(triggered(bool)), this, SLOT(deleteLine()));
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(deleteLine()));
|
||||
a = new QAction(this);
|
||||
a->setShortcut(QKeySequence("Ctrl+Return"));
|
||||
a->setShortcutContext(Qt::WidgetShortcut);
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(newLine()));
|
||||
a = new QAction(this);
|
||||
a->setShortcut(QKeySequence("Ctrl+Shift+Return"));
|
||||
a->setShortcutContext(Qt::WidgetShortcut);
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(newLineBefore()));
|
||||
ui->textCode->addAction(a);
|
||||
ui->frame->setFocusProxy(ui->textCode);
|
||||
QTextOption to = ui->textLines->document()->defaultTextOption();
|
||||
@@ -916,6 +924,16 @@ void QCodeEdit::scrollToTop() {
|
||||
}
|
||||
|
||||
|
||||
void QCodeEdit::newLine() {
|
||||
/// TODO
|
||||
}
|
||||
|
||||
|
||||
void QCodeEdit::newLineBefore() {
|
||||
/// TODO
|
||||
}
|
||||
|
||||
|
||||
void QCodeEdit::setFocus() {
|
||||
ui->textCode->setFocus();
|
||||
}
|
||||
|
||||
@@ -132,6 +132,8 @@ private slots:
|
||||
public slots:
|
||||
void updateLines();
|
||||
void scrollToTop();
|
||||
void newLine();
|
||||
void newLineBefore();
|
||||
void setFocus();
|
||||
void setText(const QString & t);
|
||||
void setShowSpaces(bool yes);
|
||||
|
||||
Reference in New Issue
Block a user