Initial commit of BudgetPro
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#include "formbaselist.h"
|
||||
#include "ui_formbaselist.h"
|
||||
|
||||
#include <QResizeEvent>
|
||||
|
||||
FormBaseList::FormBaseList(QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui::FormBaseList)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
FormBaseList::~FormBaseList()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void FormBaseList::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QStringList texts = { tr("Nuevo"), tr("Editar"), tr("Clonar"), tr("Borrar"), tr("Actualizar") };
|
||||
QList<QPushButton*> buttons = { ui->buttonNew, ui->buttonEdit, ui->buttonClone, ui->buttonDelete, ui->buttonUpdate };
|
||||
|
||||
for (int i = 0; i < buttons.size(); ++i) {
|
||||
int sz = event->size().width();
|
||||
buttons[i]->setText(sz > 400 ? texts[i] : "");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user