mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-18 12:50:07 +01:00
working on the interface
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include<QDialog>
|
||||
#include<QListWidget>
|
||||
#include<QPushButton>
|
||||
#include<QTextEdit>
|
||||
#include<QTextCursor>
|
||||
#include"ac.h"
|
||||
#include"fractal.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user