Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_settings
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhenfei.zhang
fmp_settings
Commits
fe08ef27
Commit
fe08ef27
authored
May 04, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 设置 Key 修改; 2. ScrollBar 平滑滚动; 3. 添加版权显示
parent
d007d311
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
55 deletions
+51
-55
fmp_settings_def.h
+1
-24
fmp_settings_i.h
+2
-1
ui/window.cpp
+47
-29
ui/window.ui
+0
-0
version.h
+1
-1
No files found.
fmp_settings_def.h
View file @
fe08ef27
#
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
fmp_settings_i.h
View file @
fe08ef27
#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"
/**
...
...
ui/window.cpp
View file @
fe08ef27
#
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
);
}
ui/window.ui
View file @
fe08ef27
This diff is collapsed.
Click to expand it.
version.h
View file @
fe08ef27
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment