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
770b2d40
Commit
770b2d40
authored
Apr 17, 2017
by
Carwyn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.同步基础接口InitService/UninitService
parent
121df1a2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
fmp_settings.cpp
+6
-6
fmp_settings.h
+5
-5
No files found.
fmp_settings.cpp
View file @
770b2d40
...
...
@@ -16,14 +16,14 @@ FMPSettings::FMPSettings(ctkPluginContext *context)
StartService
();
}
int
FMPSettings
::
Star
tService
()
void
FMPSettings
::
Ini
tService
()
{
return
d_func
()
->
DoStartService
();
d_func
()
->
Init
();
}
int
FMPSettings
::
Stop
Service
()
void
FMPSettings
::
Uninit
Service
()
{
return
d_func
()
->
DoStopService
();
d_func
()
->
Uninit
();
}
int
FMPSettings
::
PostEvent
(
const
QString
&
topic
,
const
FMPProps
&
pps
)
...
...
@@ -57,7 +57,7 @@ FMPSettingsPrivate::FMPSettingsPrivate(ctkPluginContext *ctx)
{
}
int
FMPSettingsPrivate
::
DoStartService
()
int
FMPSettingsPrivate
::
Init
()
{
if
(
!
_sets
)
{
_sets
=
new
QSettings
(
_ctx
->
getProperty
(
FMP_PROPKEY_CFG
).
toString
(),
QSettings
::
IniFormat
);
...
...
@@ -66,7 +66,7 @@ int FMPSettingsPrivate::DoStartService()
return
FMP_SUCCESS
;
}
int
FMPSettingsPrivate
::
DoStopService
()
int
FMPSettingsPrivate
::
Uninit
()
{
if
(
_sets
)
{
delete
_sets
;
...
...
fmp_settings.h
View file @
770b2d40
...
...
@@ -19,10 +19,10 @@ class FMPSettings : public QObject, public FMPSettingsInterface
public
:
explicit
FMPSettings
(
ctkPluginContext
*
context
);
//! BaseInterface
int
StartService
();
int
StopService
();
protected
:
//! BaseInterface
void
InitService
();
void
UninitService
();
int
PostEvent
(
const
QString
&
topic
,
const
FMPProps
&
pps
=
FMPProps
());
//! SettingsInterface
...
...
@@ -45,8 +45,8 @@ class FMPSettingsPrivate
public
:
explicit
FMPSettingsPrivate
(
ctkPluginContext
*
ctx
);
int
DoStartService
();
int
DoStopService
();
int
Init
();
int
Uninit
();
QVariant
GetValue
(
const
QString
&
k
,
QVariant
default_val
);
bool
SetValue
(
const
QString
&
k
,
QVariant
v
);
...
...
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