Commit 9c3ad5fe by LIDINGDA\ldd

1.界面调整

parent a64ce3fc
......@@ -46,8 +46,6 @@ bool FMPDataBase::dlt(QString table, QString condition)
bool flag = query.exec(sql);
FMP_INFO(_logger) << "000000000000000000000 "<< sql;
if(!flag)
FMP_WARN(_logger) << query.lastError();
......
......@@ -9,6 +9,7 @@
#include <fmp_logger_i.h>
#include <QSqlTableModel>
#include <QStyledItemDelegate>
#include <QMouseEvent>
#include <QPropertyAnimation>
......@@ -22,7 +23,9 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, FMPLoggerInterface *logger,
ui->setupUi(this);
ui->label_date->setText(QString::fromLocal8Bit("营业日:") + basicinfo[FMP_EPAY_BUSINESSDATE].toString());
_b_mouse_pressed = false;
ui->label_date->setText(QString::fromLocal8Bit("当前营业日 : ") + basicinfo[FMP_EPAY_BUSINESSDATE].toString());
ui->label_storeid->setText(QString::fromLocal8Bit("门店号:") + basicinfo[FMP_EPAY_STOREID].toString());
ui->label_posno->setText(QString::fromLocal8Bit("POS编号:") + basicinfo[FMP_EPAY_STATIONID].toString());
ui->label_optid->setText(QString::fromLocal8Bit("操作员:") + basicinfo[FMP_EPAY_OPERATORID].toString());
......@@ -258,9 +261,32 @@ void FMPPayDialog::onSelectionChanged(QModelIndex idx)
}
}
void FMPPayDialog::keyPressEvent(QKeyEvent *)
void FMPPayDialog::keyPressEvent(QKeyEvent *e)
{
}
void FMPPayDialog::mousePressEvent(QMouseEvent *event)
{
_b_mouse_pressed = true;
_mMovePosition = event->globalPos() - pos();
return QDialog::mousePressEvent(event);
}
void FMPPayDialog::mouseMoveEvent(QMouseEvent *event)
{
if (_b_mouse_pressed && (event->buttons() && Qt::LeftButton)
&& (event->globalPos()-_mMovePosition).manhattanLength() > QApplication::startDragDistance())
{
move(event->globalPos()-_mMovePosition);
_mMovePosition = event->globalPos() - pos();
}
return QDialog::mouseMoveEvent(event);
}
void FMPPayDialog::mouseReleaseEvent(QMouseEvent *event)
{
_b_mouse_pressed = false;
}
void FMPPayDialog::setPaySuccessView(QJsonObject json)
......
......@@ -49,6 +49,10 @@ public slots:
protected:
void keyPressEvent(QKeyEvent *);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
private slots:
void on_widget_change();
......@@ -117,6 +121,8 @@ private:
bool _success_flag;
bool _is_amt;
bool _b_mouse_pressed;
QPoint _mMovePosition;
};
#endif // DIALOG_H
......@@ -19,7 +19,7 @@ FMPPayWait::FMPPayWait(QWidget *parent) : QDialog(parent), ui(new Ui::FMPPayWait
qRegisterMetaType<FMPPayWait::Type>("FMPPayWait::Type");
setStyleSheet("QWidget#mainWdg{background:rgba(110,110,110,0.5)}");
//setStyleSheet("QWidget#mainWdg{background:rgba(110,110,110,0.5)}");
}
FMPPayWait::~FMPPayWait()
......
......@@ -17,7 +17,7 @@
<string notr="true">#FMPPayWait
{
opacity: 223;
background-color: rgb(148, 148, 148);
background-color: rgb(148, 148, 148, 0);
}
#label_logo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment