Mouse detection
This commit is contained in:
parent
e24837649c
commit
bcd01a95b3
5 changed files with 163 additions and 16 deletions
|
|
@ -6,9 +6,32 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
, ui(new Ui::MainWindow)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QObject::connect(ui->gridPreview, &GridPreview::updatedContents,
|
||||
this, &MainWindow::onGridUpdated);
|
||||
ui->gridPreview->updatedContents();
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void MainWindow::onGridUpdated()
|
||||
{
|
||||
ui->textPreview->setPlainText(ui->gridPreview->toLuaTable());
|
||||
|
||||
ui->spinGridWidth->setValue(ui->gridPreview->getWidth());
|
||||
ui->spinGridHeight->setValue(ui->gridPreview->getHeight());
|
||||
}
|
||||
|
||||
void MainWindow::on_spinGridWidth_valueChanged(int arg1)
|
||||
{
|
||||
ui->gridPreview->setSize(arg1, ui->gridPreview->getHeight());
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_spinGridHeight_valueChanged(int arg1)
|
||||
{
|
||||
ui->gridPreview->setSize(ui->gridPreview->getWidth(), arg1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue