working on the interface

This commit is contained in:
lostjared
2017-02-01 09:06:52 -08:00
parent 0222d708ba
commit 61cb3fbf3e
3 changed files with 24 additions and 1 deletions

View File

@@ -23,7 +23,7 @@ void AC_MainWindow::createControls() {
custom_filters->setGeometry(400, 10, 390, 200);
custom_filters->show();
for(int i = 0; i < ac::draw_max; ++i) {
for(int i = 0; i < ac::draw_max-4; ++i) {
filters->addItem(ac::draw_strings[i].c_str());
}
@@ -42,6 +42,15 @@ void AC_MainWindow::createControls() {
connect(btn_moveup, SIGNAL(clicked()), this, SLOT(upClicked()));
connect(btn_movedown, SIGNAL(clicked()), this, SLOT(downClicked()));
log_text = new QTextEdit(this);
log_text->setGeometry(10, 250, 780,310);
log_text->setReadOnly(true);
QString text = "Acid Cam v";
text += ac::version.c_str();
text += " loaded.\n";
log_text->setText(text);
}
void AC_MainWindow::createMenu() {
@@ -64,6 +73,16 @@ void AC_MainWindow::downClicked() {
}
void AC_MainWindow::Log(const QString &s) {
QString text;
text = log_text->toPlainText();
text += "\n";
text += s;
log_text->setText(text);
QTextCursor tmpCursor = log_text->textCursor();
tmpCursor.movePosition(QTextCursor::End, QTextCursor::MoveAnchor);
log_text->setTextCursor(tmpCursor);
}