Commit fe08ef27 by Carwyn

1. 设置 Key 修改; 2. ScrollBar 平滑滚动; 3. 添加版权显示

parent d007d311
#ifndef FMP_SETTINGS_DEF_H
#define FMP_SETTINGS_DEF_H
//! 插件全局属性
#define FMP_PROPKEY_PLUGINPATH "FMPPath"
#define FMP_PROPKEY_CFG "FMPConfig"
......@@ -15,26 +16,6 @@
#define FMP_INIKEY_PLUGINPATH "Plugin/Path"
#define FMP_INIKEY_ANIMATION "Plugin/Animation"
#define FMP_INIKEY_EPAYTIMEOUT "Epay/Timeout"
#define FMP_INIKEY_EPAYURL "Epay/URL"
#define FMP_INIKEY_LOGPATH "Log/Path"
#define FMP_INIKEY_LOGSIZE "Log/Size"
#define FMP_INIKEY_LOGLEVEL "Log/Level"
#define FMP_INIKEY_LOGINSERVER "Home/Server"
#define FMP_INIKEY_LOGINPWD "Home/Pwd"
#define FMP_INIKEY_LOGINSTOREID "Home/StoreId"
#define FMP_INIKEY_LOGINPOSID "Home/PosId"
#define FMP_INIKEY_LOGINBUSINESS "Home/Business"
#define FMP_INIKEY_LOGINCASHIER "Home/CashierId"
#define FMP_INIKEY_LOGINPARTNERID "Home/PartnerId"
#define FMP_INIKEY_HOMEPOSITION "Home/Position"
#define FMP_INIKEY_HOMEAUTOLOGIN "Home/Autologin"
#define FMP_INIKEY_HOMEACCOUNT "Home/Account"
#define FMP_INIKEY_REMEMBERPWD "Home/RememberPwd"
#define FMP_INIKEY_VIPSERVER "Vip/Server"
......@@ -43,9 +24,5 @@
#define FMP_APPNAME "非码POS"
#define FMP_INIKEY_PRINTERNAME "Printer/Printname"
#define FMP_INIKEY_PRINTERSIZE "Printer/Printtype"
#define FMP_INIKEY_PRINTERSIZE "Printer/Printsize"
#endif // FMP_SETTINGS_DEF_H
#ifndef FMP_SETTINGS_I_H
#ifndef FMP_SETTINGS_I_H
#define FMP_SETTINGS_I_H
#include <QVariant>
#include <fmp_plugin_i.h>
#include "fmp_settings_def.h"
/**
......
#include "window.h"
#include "ui_window.h"
#include <QLineEdit>
#include <QLineEdit>
#include <QCheckBox>
#include <QComboBox>
#include "fmp_settings_def.h"
#include <qDebug>
#include <QScrollBar>
#include <QPropertyAnimation>
#include <fmp_home_i.h>
#include <fmp_logger_i.h>
#include <fmp_epay_i.h>
#include <fmp_takeout_i.h>
#include <fmp_printer_i.h>
#include "window.h"
#include "ui_window.h"
FMPSettingsWindow::FMPSettingsWindow(QWidget *parent) :
FMPWindow(parent),
ui(new Ui::FMPSettingsWindow)
......@@ -23,45 +34,47 @@ void FMPSettingsWindow::setsettings(QSettings* set)
{
m_set=set;
ui->edt_posid->setText(m_set->value(FMP_INIKEY_LOGINPOSID).toString());
ui->edt_pwd->setText(m_set->value(FMP_INIKEY_LOGINPWD).toString());
ui->edt_pwd_2->setText(m_set->value(FMP_INIKEY_LOGINPWD).toString());
// ui->edt_pwd->setText(m_set->value(FMP_INIKEY_LOGINPWD).toString());
// ui->edt_pwd_2->setText(m_set->value(FMP_INIKEY_LOGINPWD).toString());
ui->edt_partnerid->setText(m_set->value(FMP_INIKEY_LOGINPARTNERID).toString());
ui->edt_account->setText(m_set->value(FMP_INIKEY_HOMEACCOUNT).toString());
ui->edt_pluginpath->setText(m_set->value(FMP_INIKEY_PLUGINPATH).toString());
// ui->edt_account->setText(m_set->value(FMP_INIKEY_HOMEACCOUNT).toString());
// ui->edt_pluginpath->setText(m_set->value(FMP_INIKEY_PLUGINPATH).toString());
ui->edt_logpath->setText(m_set->value(FMP_INIKEY_LOGPATH).toString());
ui->edt_loginsvr->setText(m_set->value(FMP_INIKEY_LOGINSERVER).toString());
// ui->edt_loginsvr->setText(m_set->value(FMP_INIKEY_LOGINSERVER).toString());
ui->edt_storeid->setText(m_set->value(FMP_INIKEY_LOGINSTOREID).toString());
ui->edt_logsize->setText(m_set->value(FMP_INIKEY_LOGSIZE).toString());
ui->switch_animation->setChecked(m_set->value(FMP_INIKEY_ANIMATION).toBool());
ui->switch_autologin->setChecked(m_set->value(FMP_INIKEY_HOMEAUTOLOGIN).toBool());
// ui->switch_animation->setChecked(m_set->value(FMP_INIKEY_ANIMATION).toBool());
// ui->switch_autologin->setChecked(m_set->value(FMP_INIKEY_HOMEAUTOLOGIN).toBool());
ui->select_loglevel->setCurrentIndex(m_set->value(FMP_INIKEY_LOGLEVEL).toInt());
ui->select_printer->setCurrentText(m_set->value(FMP_INIKEY_PRINTERNAME).toString());
ui->select_printersize->setCurrentText(m_set->value(FMP_INIKEY_PRINTERSIZE).toString());
ui->check_autoconfirm->setChecked(m_set->value(fmp_INIKEY_TAKEOUTAUTO).toBool());
ui->check_customer->setCheckable(m_set->value(FMP_INIKEY_TAKEOUTCUSTOMER).toBool());
ui->check_deliver->setCheckable(m_set->value(fmp_INIKEY_TAKEOUTDELIVER).toBool());
ui->check_store->setCheckable(m_set->value(FMP_INIKEY_TAKEOUTSTORE).toBool());
ui->check_autoconfirm->setChecked(m_set->value(FMP_INIKEY_TAKEOUTAUTO).toBool());
// ui->check_customer->setCheckable(m_set->value(FMP_INIKEY_TAKEOUTCUSTOMER).toBool());
// ui->check_deliver->setCheckable(m_set->value(FMP_INIKEY_TAKEOUTDELIVER).toBool());
// ui->check_store->setCheckable(m_set->value(FMP_INIKEY_TAKEOUTSTORE).toBool());
ui->edt_orderurl->setText(m_set->value(FMP_INIKEY_TAKEOUTSERVER).toString());
ui->edt_entryport->setText(m_set->value(fmp_INIKEY_TAKEOUTENTRYPORT).toString());
ui->edt_entryurl->setText(m_set->value(FMP_INIKEY_TAKEOUTENTRYSERVER).toString());
ui->edt_storeid_2->setText(m_set->value(FMP_INIKEY_TAKEOUTSTOREID).toString());
// ui->edt_entryport->setText(m_set->value(FMP_INIKEY_TAKEOUTENTRYPORT).toString());
// ui->edt_entryurl->setText(m_set->value(FMP_INIKEY_TAKEOUTENTRYSERVER).toString());
// ui->edt_storeid_2->setText(m_set->value(FMP_INIKEY_TAKEOUTSTOREID).toString());
ui->edt_cashierid->setText(m_set->value(FMP_INIKEY_LOGINCASHIER).toString());
ui->edt_epayurl->setText(m_set->value(FMP_INIKEY_EPAYURL).toString());
ui->edt_epaytimeout->setText(m_set->value(FMP_INIKEY_EPAYTIMEOUT).toString());
/*--------------------------------------------------------------*/
ui->edt_posid->home(false);
ui->edt_pwd->home(false);
ui->edt_pwd_2->home(false);
// ui->edt_pwd->home(false);
// ui->edt_pwd_2->home(false);
ui->edt_partnerid->home(false);
ui->edt_account->home(false);
ui->edt_pluginpath->home(false);
// ui->edt_account->home(false);
// ui->edt_pluginpath->home(false);
ui->edt_logpath->home(false);
ui->edt_loginsvr->home(false);
// ui->edt_loginsvr->home(false);
ui->edt_storeid->home(false);
ui->edt_logsize->home(false);
ui->edt_orderurl->home(false);
ui->edt_entryport->home(false);
ui->edt_entryurl->home(false);
ui->edt_storeid_2->home(false);
// ui->edt_entryport->home(false);
// ui->edt_entryurl->home(false);
// ui->edt_storeid_2->home(false);
ui->edt_cashierid->home(false);
}
......@@ -73,11 +86,11 @@ QWidget *FMPSettingsWindow::getwidget(QString widgetname)
}
if(!widgetname.compare("pay"))
{
return ui->pay;
return ui->pay_group;
}
if(!widgetname.compare("takeout"))
{
return ui->takeout;
return ui->takeout_group;
}
}
......@@ -133,5 +146,10 @@ void FMPSettingsWindow::on_btn_showwidget_clicked()
{
QPushButton* btn=(QPushButton*)sender();
QWidget *presentwidget=getwidget(btn->property("widget").toString());
ui->scrollArea->verticalScrollBar()->setValue(presentwidget->y());
QScrollBar * scroll = ui->scrollArea->verticalScrollBar();
QPropertyAnimation *animation = new QPropertyAnimation(scroll, "value");
animation->setStartValue(scroll->value());
animation->setEndValue(scroll->maximum() * 1.0 / ui->scrollAreaWidgetContents->height() * presentwidget->y());
animation->start(QPropertyAnimation::DeleteWhenStopped);
}
......@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 6
#define VER_BUILD 10
//! Convert version numbers to string
#define _STR(S) #S
......
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