diff --git a/src/main_window.cpp b/src/main_window.cpp index fd33ab9..ada2cb1 100644 --- a/src/main_window.cpp +++ b/src/main_window.cpp @@ -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); +} diff --git a/src/main_window.h b/src/main_window.h index 59054e8..f1e5010 100644 --- a/src/main_window.h +++ b/src/main_window.h @@ -12,6 +12,7 @@ public: QListWidget *filters, *custom_filters; QPushButton *btn_add, *btn_remove, *btn_moveup, *btn_movedown; + QTextEdit *log_text; public slots: void addClicked(); @@ -19,6 +20,7 @@ public slots: void upClicked(); void downClicked(); + void Log(const QString &s); private: void createControls(); diff --git a/src/qtheaders.h b/src/qtheaders.h index d092656..fb3fe11 100644 --- a/src/qtheaders.h +++ b/src/qtheaders.h @@ -6,6 +6,8 @@ #include #include #include +#include +#include #include"ac.h" #include"fractal.h"