CN109284165A - Client skin change method, device, equipment and computer readable storage medium - Google Patents

Client skin change method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN109284165A
CN109284165A CN201811279364.2A CN201811279364A CN109284165A CN 109284165 A CN109284165 A CN 109284165A CN 201811279364 A CN201811279364 A CN 201811279364A CN 109284165 A CN109284165 A CN 109284165A
Authority
CN
China
Prior art keywords
skin
target
base class
skinitembase
changes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811279364.2A
Other languages
Chinese (zh)
Other versions
CN109284165B (en
Inventor
黄浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201811279364.2A priority Critical patent/CN109284165B/en
Publication of CN109284165A publication Critical patent/CN109284165A/en
Application granted granted Critical
Publication of CN109284165B publication Critical patent/CN109284165B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of client skin change method, device, equipment and computer readable storage mediums.This method comprises: calling the switchSkin interface of SkinManager object, the target tabular array of inquiry SkinManager object obtains at least one target and changes skin control;Skin control is changed based at least one described target call change the corresponding SkinItemBase base class of skin control at least one described target, wherein, it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, and the target changes skin subclass and inherits SkinItemBase base class;SetItemColor interface is called, the skin that at least one described target changes skin control is arranged according to the skin attribute that SkinItemBase base class is saved.The technical solution of the embodiment of the present invention reduces programming personnel's workload when client changes skin, increases code reuse, reduces later maintenance cost.

Description

Client skin change method, device, equipment and computer readable storage medium
Technical field
The present embodiments relate to computer application technology more particularly to a kind of client skin change method, device, set Standby and computer readable storage medium.
Background technique
Client would generally include multiple controls, such as control can be client entirety appearance interface and it is some by Button, head portrait etc..In order to meet the individual demand of user, client, which is typically provided with, changes skin function.Skin is changed to generally refer to visitor The change that family end program interface appearance carries out, reaches different visual effects, increases the operation of the aesthetic effect of client-side program. User can be configured control skin according to itself hobby, for example, replace some or several controls background color or Person enters Night, eyeshield mode etc. by setting and changes skin to realize.
In the prior art if the skin that replace control generally require to it is each need to change skin control carry out it is separately encoded. When requiring to change skin if there is multiple controls, then need to carry out for each control separately encoded to realize changing for the control Skin, programming personnel's larger workload, code reuse is low, and due to needing individually to tie up the skin code that changes of each control Shield, is also required to solve one by one, therefore later maintenance cost is larger even if there is common problem, inconvenience unified management.
Summary of the invention
The embodiment of the invention provides a kind of client skin change method, device, equipment and computer readable storage medium, with The fast quick change skin for realizing client, reduces the workload of programming personnel, reduces the customer care cost of client and increases generation The reusability of code.
In a first aspect, the embodiment of the invention provides a kind of client skin change methods, this method comprises:
The switchSkin interface of SkinManager object is called, the target tabular array of SkinManager object is inquired It obtains at least one target and changes skin control;
Skin control, which is changed, based at least one described target calls that at least one described target to change skin control corresponding SkinItemBase base class, wherein it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, and the target changes skin Subclass inherits SkinItemBase base class;
SetItemColor interface is called, at least one is arranged according to the skin attribute that SkinItemBase base class is saved The target changes the skin of skin control.
Second aspect, the embodiment of the invention also provides a kind of clients to change skin device, which includes:
Target changes skin control enquiry module, for calling the switchSkin interface of SkinManager object, inquires The target tabular array of SkinManager object obtains at least one target and changes skin control;
Base class calling module is changed for changing skin control calling based at least one described target at least one described target The corresponding SkinItemBase base class of skin control, wherein it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, The target changes skin subclass and inherits SkinItemBase base class;
Skin setup module, for calling setItemColor interface, the skin that is saved according to SkinItemBase base class The skin that at least one described target changes skin control is arranged in skin attribute.
The third aspect, the embodiment of the invention also provides a kind of terminal, which includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes any client skin change method in the embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program realizes any client skin change method in the embodiment of the present invention when program is executed by processor.
The technical solution of the embodiment of the present invention is inquired by calling the switchSkin interface of SkinManager object The target tabular array of SkinManager object does not need so that obtaining at least one target changes skin control to each control circle Face is encoded, and using the switchSkin interface of global unified management skin switching interface SkinManager object, is reduced big Measure mistake caused by repeated workload.In turn, skin control is changed based on target and calls that with target to change skin control corresponding SkinItemBase base class changes skin subclass due to target and inherits SkinItemBase base class, changes skin by SkinItemBase Base class can manage all targets and change the corresponding skin color of skin subclass;And then by calling setItemColor interface, according to The skin that at least one described target changes skin control is arranged in the skin attribute that SkinItemBase base class is saved, i.e., SkinManager object only needs to be called operation to the base class, can be achieved with changing all inherit to the target of the base class Skin control change the control of skin function.In above-mentioned technical proposal, target changes skin control, and to solve programming personnel's workload huge, The problems such as code reuse is low and later maintenance is difficult is realized when client changes skin, and programming personnel's workload is reduced, and is increased Code reuse facilitates the technical effect of later maintenance.
Detailed description of the invention
Fig. 1 is the flow chart of the client skin change method provided in the embodiment of the present invention one;
Fig. 2 is the flow chart of the client skin change method provided in the embodiment of the present invention two;
Fig. 3 is the structural schematic diagram that the client provided in the embodiment of the present invention three changes skin device;
Fig. 4 is a kind of structural schematic diagram of the terminal provided in the embodiment of the present invention four.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow chart for the client skin change method that the embodiment of the present invention one provides, and the present embodiment is applicable to client The case where skin is changed at end, this method can be changed skin device by client to execute, which can be by hardware and/or software Lai real Existing, which can be integrated in terminal (such as computer), as shown in Figure 1, specifically comprising the following steps:
Step 101, the switchSkin interface for calling SkinManager object inquire the target of SkinManager object Tabular array obtains at least one target and changes skin control.
Wherein, SkinManager object is the global administrative object that client is used to change skin, SkinManager object Effect is that the target that skin is changed in global unified management changes skin control.Global object program at the beginning, constructed fuction just first is held Row (earlier than program entry point);Its destructor function will be performed before program closes to an end.
Target tabular array, which is used to store, is directed toward this pointer that target changes skin control.This pointer of one object is not It is a part of object itself, will not influence the result of sizeof (object).This scope is inside class, when in the non-of class When accessing the non-static member of class in static member function, compiler can be automatically hidden using the address of object itself as one Containing parameter passes to function.The memory address that the corresponding target of the memory address that this pointer is directed toward changes skin control is identical, Therefore target can get by this pointer and changes skin control.
Wherein, it is the control for needing to change skin that target, which changes skin control, can be client end interface or button etc., user can be certainly Row setting target changes skin control and carries out changing skin to it.It is understood that the quantity that target changes skin control can be one, two Or it is multiple.
The target tabular array that the switchSkin interface of SkinManager object can traverse SkinManager object is worked as In target change the pointer of skin control, skin setting is then carried out according to the skin attribute that SkinItemBase base class saves.
Optionally, the target tabular array of the inquiry SkinManager object obtains at least one target and changes skin control, Include:
What is stored in the target tabular array of traversal SkinManager object changes skin control with target described at least one Corresponding target changes skin control pointer, changes skin control pointer based on the target and searches and obtain at least one target and changes skin control Part.
Wherein it is possible to which getting target by this pointer that target changes skin control changes skin control.
When instantiation target changes skin control, the target tabular array of SkinManager object will record target and change skin control This pointer of part changes skin control for being directed toward target, and is stored to the target tabular array of SkinManager object In.Tabular array, that is, ArrayList, ArrayList are a kind of dynamic arrays, are the complex versions of Array, ArrayList is mentioned Supplied the following benefit: dynamically increasing and decreasing element realizes ICollection and IList interface and flexible setting The size of array.The pointer that skin control is changed using ArrayList storage target, can dynamically be increased or decreased just because of it Element, and the size of array can be set.
Step 102, changed based at least one described target skin control call at least one described target change skin control pair The SkinItemBase base class answered, wherein it is the object that target changes the instantiation of skin subclass, the target that the target, which changes skin control, It changes skin subclass and inherits SkinItemBase base class.
Wherein, target changes skin subclass and is inherited from SkinItemBase base class, and SkinItemBase base class includes id attribute, skin Skin color attribute, skin transparency property, skin background attribute, constructed fuction and destructor function etc..Skin color attribute is also It can be further divided into default color attribute, Night color etc., can be further expanded according to demand.Such as: SkinItemBase base class can be illustrated as follows:
SkinItemBase base class can be stated using QML.QML is a kind of declarative language, is allowed according to user The visible component at interface and they how to interact with interrelated and describe user interface.QML is that a kind of height is readable Language, it is intended to enable the components to interconnect in a dynamic fashion, and allow component in the user interface easily reuse and from Definition.Using Qt Quick, developer can construct fluid animation user interface in QML, and can choose these User interface is connected to the library any rear end C++.
Constructed fuction is executed in instance object, and destructor function is executed when object is destroyed.Skin color attribute and Night colors can be further arranged in skin background attribute, default color isotype is convenient for the user to use.For user's operation Simplicity, the mode of some defaults can be set, preset some targets under a default mode and change skin control, skin attribute.Example Such as Night, eyeshield mode.Under Night, client appearance can be set as to black, client text can also be set It is set to the relevant operation such as white.Night can be selected under the submenu for changing skin operation in client, user passes through selection Night changes the skin attribute of client related control, and client receives the request of user, and relevant target is changed Skin control, relevant skin attribute are passed in client-side program, and program changes skin control and skin category according to incoming target Property etc. carry out client skin switching.User can also restore the reset condition of client skin by selecting default mode. The settable a variety of default modes of client.Client may also set up skin color option, skin background color option, skin background The options such as color, client receive the selection of user, change the attribute of client skin.
SkinItemBase base class can have multiple targets to change skin subclass.Succession is the important hand for being multiplexed code One of section and the core concept of Object-oriented Programming Design.Succession refers to that an object directly uses the attribute of another pair elephant And method.The hierarchical structure for presenting Object-oriented Programming Design is inherited, cognitive process from simple to complex is embodied.C++ In inheritance like real-life set membership, primitive class is known as base class, and derived class is known as derived class, they are Similar to the relationship of father and son, so being also parent and subclass respectively.And subclass can treat as parent, by other classes after It holds.
Target changes skin subclass when inheriting SkinItemBase base class, and subclass, can by the skin attribute value of rewriting base class The corresponding skin of skin subclass is changed individually to different skin attributes oneself is arranged, to make SkinItemBase base class record corresponding target Skin attribute.It is understood that target, which changes skin control, can be the instance object that identical target changes skin subclass, it is also possible to Different targets changes the instance object of skin subclass.Such as 2 interfaces are wanted to realize identical effect, and the same target may be implemented Change skin subclass.When 2 interfaces are wanted to realize different effects, different targets may be implemented and change skin subclass.
Skin control, which is changed, based at least one described target calls that at least one described target to change skin control corresponding SkinItemBase base class, expression, which changes skin control according to target, can get its corresponding SkinItemBase base class pointer, To call the interface of base class.
Optionally, definition is for realizing the SkinItemBase base class and SkinManager object for changing skin function;
In the base class constructed fuction of the SkinItemBase base class, the SkinManager object is called At least one described target is changed the target array column that skin control is registered to the SkinManager object by register interface In table.
Wherein, registration indicates to save the pointer that target changes skin control, and client gets at least one target and changes skin control When, pass through, calls the register interface of the SkinManager object that the pointer that corresponding target changes skin control is saved in In the target tabular array of SkinManager object.What register interface was passed to is the pointer that corresponding target changes skin control.
Step 103 calls setItemColor interface, is arranged according to the skin attribute that SkinItemBase base class is saved At least one target changes the skin of skin control.
Wherein, SkinManager object is traversed by the switchSkin interface of SkinManager object in step 101 Target tabular array in target change skin control, then according to SkinItemBase base class save skin attribute, call The corresponding skin of setItemColor interface setting control, that completes that all targets change skin control changes skin function. What setItemColor interface was passed to is that target changes the pointer of skin control and the base class pointer of SkinItemBase base class.
Due to the register interface in step 102, target is changed into the target that skin control is registered to SkinManager object In tabular array, and target changes skin control and corresponds to SkinItemBase base class pointer, that is, SkinItemBase base class refers to Needle has had been saved in SkinManager object, so SkinManager object is also available to arrive all subclass targets The skin of skin control is changed, to arrive the skin attribute setting that SkinItemBase base class saves by setItemColor interface Target is changed on skin control.
Optionally, the subclass constructed fuction of skin subclass is changed based on the target to the skin in the SkinItemBase base class Skin attribute carries out assignment.
Wherein, subclass constructed fuction can be executed when target changes skin control instance, by covering in subclass constructed fuction The skin attribute for writing SkinItemBase base class carries out assignment to the skin attribute of SkinItemBase base class, makes SkinItemBase base class records the skin color of corresponding subclass.
Optionally, the skin attribute includes at least one of skin color, skin background and skin transparency.
Wherein, control can be the instance object that target changes skin subclass, when instantiating control, can first call The constructed fuction of SkinItemBase base class, then invocation target changes the constructed fuction of skin subclass.
Skin color can be divided into color under multiple color attribute, such as default color, Night, font color Deng.
Skin background can be the background picture of control.
The demand that skin transparency can also correspond to different mode or user is modified.
The technical solution of the embodiment of the present invention is inquired by calling the switchSkin interface of SkinManager object The target tabular array of SkinManager object does not need so that obtaining at least one target changes skin control to each control circle Face is encoded, and using the switchSkin interface of global unified management skin switching interface SkinManager object, is reduced big Measure mistake caused by repeated workload.In turn, skin control is changed based on target and calls that with target to change skin control corresponding SkinItemBase base class changes skin subclass due to target and inherits SkinItemBase base class, changes skin by SkinItemBase Base class can manage all targets and change the corresponding skin color of skin subclass;And then by calling setItemColor interface, according to The skin that at least one described target changes skin control is arranged in the skin attribute that SkinItemBase base class is saved, i.e., SkinManager object only needs to be called operation to the base class, can be achieved with changing all inherit to the target of the base class Skin control change the control of skin function.In above-mentioned technical proposal, target changes skin control and solves programming personnel's heavy workload, generation The problems such as code reusability is low and later maintenance is difficult is realized when client changes skin, and programming personnel's workload is reduced, and increases generation Code reusability, facilitates the technical effect of later maintenance.
Embodiment two
Fig. 2 is a kind of flow chart of client skin change method provided by Embodiment 2 of the present invention, and the present embodiment is in above-mentioned reality On the basis of applying example, optional is to change skin control calling based at least one described target to change skin control at least one described target Corresponding SkinItemBase base class, comprising: the determination of skin control and at least one described mesh are changed according at least one described target Mark changes the corresponding SkinItemBase base class of skin control;The target is changed into the corresponding target of skin control and changes the conversion of skin control pointer At the base class pointer of the SkinItemBase base class;It is searched based on the base class pointer and calls the SkinItemBase base Class.As shown in Fig. 2, the method for the present embodiment specifically may include following steps:
Step 201, the switchSkin interface for calling SkinManager object inquire the target of SkinManager object Tabular array obtains at least one target and changes skin control.
Step 202, at least one target according to change the determination of skin control and change skin control pair at least one described target The SkinItemBase base class answered.
Wherein, target changes skin subclass and inherits SkinItemBase base class, and target changes skin control and changes skin control by obtaining target The corresponding target of part changes skin control pointer, can determine that target changes the corresponding SkinItemBase base class of skin control.
Step 203, the target is changed the corresponding target of skin control change skin control pointer be converted into it is described The base class pointer of SkinItemBase base class.
Because it is the instance object that target changes skin subclass that target, which changes skin control, it is to inherit that target, which changes skin subclass, SkinItemBase base class, so the base class that the pointer that target changes skin control can be converted SkinItemBase base class refers to Needle.
Optionally, it the target is changed into the corresponding target of skin control changes skin control pointer and be converted into the SkinItemBase The base class pointer of base class, specifically can include:
It calls dynamic_cast operator the target changed the corresponding target of skin control to change skin control pointer to be converted into The base class pointer of the SkinItemBase base class.
Wherein, dynamic_cast operator is by a base class sub-object pointer (or reference) cast to derived class pointer, Dynamic_cast can do respective handling according to whether base class pointer is really directed toward derived class pointer.Pass through dynamic_cast Target is changed the base class pointer that skin control pointer is converted into the SkinItemBase base class by operator, for calling The building method of SkinItemBase base class.
It is corresponding when being operated by dynamic_cast operator when changing skin control there are multiple targets The pointer of SkinItemBase base class is different.
It includes interface defined in SkinItemBase base class that target, which changes the corresponding target of skin control and changes skin subclass itself, is turned Call dynamic_cast operator that subclass pointer is converted to SkinItemBase base class pointer when changing.
Step 204 is searched based on the base class pointer and calls the SkinItemBase base class.
Wherein, the interface for calling SkinItemBase base class to define with the SkinItemBase base class, expression is called, The building method of SkinItemBase base class is exactly called, realizes the skin attribute for getting the preservation of SkinItemBase base class Purpose.
Step 205 calls setItemColor interface, is arranged according to the skin attribute that SkinItemBase base class is saved At least one target changes the skin of skin control.
The technical solution of the embodiment of the present invention by according at least one described target change skin control it is determining with it is described at least One target changes the corresponding SkinItemBase base class of skin control;It the target is changed into the corresponding target of skin control changes skin control and refer to Needle is converted into the base class pointer of the SkinItemBase base class;It is searched and is called described based on the base class pointer Target is changed skin control pointer and is converted into base class pointer by SkinItemBase base class, this process, can be realized calling The interface of SkinItemBase base class changes skin to what target changed skin control to realize.In above-mentioned technical proposal, target changes skin control Part pointer is converted into base class pointer and solves calling when client changes skin to base class, realizes when client changes skin, reduces and compile Journey person works amount, increases code reuse, facilitates the technical effect of later maintenance.
Embodiment three
Client provided by the embodiment of the present invention, which changes skin device, can be performed client provided by any embodiment of the invention Skin change method is held, the specific structure of the device is as follows: target is changed skin control enquiry module 31, base class calling module 32 and skin and set Set module 33.
Wherein, target changes skin control enquiry module 31, for calling the switchSkin interface of SkinManager object, The target tabular array of inquiry SkinManager object obtains at least one target and changes skin control;
Base class calling module 32 calls and at least one described target for changing skin control based at least one described target Change the corresponding SkinItemBase base class of skin control, wherein it is pair that target changes the instantiation of skin subclass that the target, which changes skin control, As the target changes skin subclass and inherits SkinItemBase base class;
Skin setup module 33 is saved for calling setItemColor interface according to SkinItemBase base class The skin that at least one described target changes skin control is arranged in skin attribute.
The technical solution of the embodiment of the present invention is inquired by calling the switchSkin interface of SkinManager object The target tabular array of SkinManager object does not need so that obtaining at least one target changes skin control to each control circle Face is encoded, and using the switchSkin interface of global unified management skin switching interface SkinManager object, is reduced big Measure mistake caused by repeated workload.In turn, skin control is changed based on target and calls that with target to change skin control corresponding SkinItemBase base class changes skin subclass due to target and inherits SkinItemBase base class, changes skin by SkinItemBase Base class can manage all targets and change the corresponding skin color of skin subclass;And then by calling setItemColor interface, according to The skin that at least one described target changes skin control is arranged in the skin attribute that SkinItemBase base class is saved, i.e., SkinManager object only needs to be called operation to the base class, can be achieved with changing all inherit to the target of the base class Skin control change the control of skin function.In above-mentioned technical proposal, target changes skin control and solves programming personnel's heavy workload, generation The problems such as code reusability is low and later maintenance is difficult is realized when client changes skin, and programming personnel's workload is reduced, and increases generation Code reusability, facilitates the technical effect of later maintenance.
Based on the above technical solution, target is changed skin control enquiry module 31 and is particularly used in: traversal What is stored in the target tabular array of SkinManager object changes the corresponding target of skin control with target described at least one and changes Skin control pointer changes skin control pointer based on the target and searches and obtain at least one target and changes skin control.
Based on the above technical solution, base class calling module 32 is particularly used in:
Skin control, which is changed, according at least one described target determines that at least one described target to change skin control corresponding SkinItemBase base class;
It the target is changed into the corresponding target of skin control changes skin control pointer and be converted into the SkinItemBase base class Base class pointer;
It is searched based on the base class pointer and calls the SkinItemBase base class.
Based on the above technical solution, base class calling module 32 is particularly used in: calling dynamic_cast operation The target is changed the corresponding target of skin control and change skin control pointer and be converted into the base class of the SkinItemBase base class by symbol to be referred to Needle.
On the basis of above-mentioned each technical solution, it can also include: definition module and registration module that client, which changes skin device,. Wherein,
Definition module changes the SkinItemBase base class and SkinManager object of skin function for defining; Registration module is used for
In the base class constructed fuction of the SkinItemBase base class, the SkinManager object is called At least one described target is changed the target array column that skin control is registered to the SkinManager object by register interface In table.
On the basis of above-mentioned each technical solution, client, which changes skin device, may also include that skin attribute assignment module.Its In,
Skin attribute assignment module, for changing the subclass constructed fuction of skin subclass based on the target to described Skin attribute in SkinItemBase base class carries out assignment.
Illustratively, the skin attribute includes at least one in skin color, skin background and skin transparency It is a.
Example IV
Fig. 4 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides, as shown in figure 4, the terminal includes place Manage device 40, memory 41, input unit 42 and output device 43;The quantity of processor 40 can be one or more in terminal, In Fig. 4 by taking a processor 40 as an example;Processor 40, memory 41, input unit 42 and output device 43 in terminal can be with It is connected by bus or other modes, in Fig. 4 for being connected by bus.
Memory 41 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, if the corresponding program instruction/module of client skin change method in the embodiment of the present invention is (for example, client is changed Target in skin device changes skin control enquiry module 31, base class calling module 32 and skin setup module 33).Processor 40 passes through Software program, instruction and the module being stored in memory 41 are run, thereby executing the various function application and number of terminal According to processing, that is, realize above-mentioned client skin change method.
Memory 41 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 41 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 41 can be further Including the memory remotely located relative to processor 40, these remote memories can pass through network connection to terminal.It is above-mentioned The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
The skin that changes that input unit 42 can be used for receiving user operates, and generates the user setting and function control with terminal Make related input.Output device 43 may include that display screen etc. shows equipment.
Embodiment five
The embodiment of the present invention five also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row instruction is used to execute a kind of client skin change method when being executed by computer processor, this method comprises:
The switchSkin interface of SkinManager object is called, the target tabular array of SkinManager object is inquired It obtains at least one target and changes skin control;
Skin control, which is changed, based at least one described target calls that at least one described target to change skin control corresponding SkinItemBase base class, wherein it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, and the target changes skin Subclass inherits SkinItemBase base class;
SetItemColor interface is called, at least one is arranged according to the skin attribute that SkinItemBase base class is saved The target changes the skin of skin control.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention The method operation that executable instruction is not limited to the described above, can also be performed client provided by any embodiment of the invention and changes Relevant operation in skin method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, above-mentioned client is changed in the embodiment of skin device, included each unit and module are It is divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized;Separately Outside, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection scope being not intended to restrict the invention.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (10)

1. a kind of client skin change method characterized by comprising
The switchSkin interface of SkinManager object is called, the target tabular array of inquiry SkinManager object obtains At least one target changes skin control;
Skin control, which is changed, based at least one described target calls that at least one described target to change skin control corresponding SkinItemBase base class, wherein it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, and the target changes skin Subclass inherits SkinItemBase base class;
Call setItemColor interface, at least one is arranged according to the skin attribute that SkinItemBase base class is saved described in Target changes the skin of skin control.
2. the method according to claim 1, wherein the target array column of the inquiry SkinManager object Table obtains at least one target and changes skin control, comprising:
Traverse stored in the target tabular array of SkinManager object to change skin control with target described at least one corresponding Target change skin control pointer, skin control pointer is changed based on the target search and obtain at least one target and change skin control.
3. the method according to claim 1, wherein described change skin control calling based at least one described target The corresponding SkinItemBase base class of skin control is changed at least one described target, comprising:
Skin control, which is changed, according at least one described target determines that at least one described target to change skin control corresponding SkinItemBase base class;
The target is changed into the corresponding target of skin control and changes the base class that skin control pointer is converted into the SkinItemBase base class Pointer;
It is searched based on the base class pointer and calls the SkinItemBase base class.
4. according to the method described in claim 3, it is characterized in that, described change the corresponding target of skin control for the target and change skin Control pointer is converted into the base class pointer of the SkinItemBase base class, comprising:
Dynamic_cast operator is called to be converted into the corresponding target widget pointer of the target widget described The base class pointer of SkinItemBase base class.
5. the method according to claim 1, wherein the method also includes:
Definition is for realizing the SkinItemBase base class and SkinManager object for changing skin function;
In the base class constructed fuction of the SkinItemBase base class, the register of the SkinManager object is called At least one described target is changed skin control and is registered in the target tabular array of the SkinManager object by interface.
6. the method according to claim 1, wherein the method also includes:
The subclass constructed fuction for changing skin subclass based on the target carries out the skin attribute in the SkinItemBase base class Assignment.
7. the method according to claim 1, wherein the skin attribute include skin color, skin background, with And at least one of skin transparency.
8. a kind of client changes skin device characterized by comprising
Target changes skin control enquiry module, for calling the switchSkin interface of SkinManager object, inquires The target tabular array of SkinManager object obtains at least one target and changes skin control;
Base class calling module, for being changed based at least one described target, skin control is called and at least one described target changes skin control The corresponding SkinItemBase base class of part, wherein it is the object that target changes the instantiation of skin subclass that the target, which changes skin control, described Target changes skin subclass and inherits SkinItemBase base class;
Skin setup module, for calling setItemColor interface, the skin category that is saved according to SkinItemBase base class The skin that at least one described target changes skin control is arranged in property.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now client skin change method as described in any in claim 1-7.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The client skin change method as described in any in claim 1-7 is realized when execution.
CN201811279364.2A 2018-10-30 2018-10-30 Client skin changing method, device, equipment and computer readable storage medium Active CN109284165B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811279364.2A CN109284165B (en) 2018-10-30 2018-10-30 Client skin changing method, device, equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811279364.2A CN109284165B (en) 2018-10-30 2018-10-30 Client skin changing method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109284165A true CN109284165A (en) 2019-01-29
CN109284165B CN109284165B (en) 2021-11-09

Family

ID=65174983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811279364.2A Active CN109284165B (en) 2018-10-30 2018-10-30 Client skin changing method, device, equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109284165B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110083357A (en) * 2019-04-28 2019-08-02 博众精工科技股份有限公司 Interface construction method, device, server and storage medium
CN110096269A (en) * 2019-04-18 2019-08-06 北京奇艺世纪科技有限公司 A kind of interface rendering method, device and electronic equipment based on skin caching mechanism
CN110704035A (en) * 2019-10-17 2020-01-17 北京首贝科技发展有限公司 Plug-in type software architecture system and implementation method thereof
CN111737334A (en) * 2020-06-24 2020-10-02 深圳前海微众银行股份有限公司 Data reporting method, device, equipment and storage medium
CN112015497A (en) * 2019-05-13 2020-12-01 华为技术有限公司 Skin changing method and device
CN112269605A (en) * 2020-11-12 2021-01-26 北京百度网讯科技有限公司 Skin replacement method and device, electronic equipment and storage medium
CN112416343A (en) * 2020-11-04 2021-02-26 广州小鹏汽车科技有限公司 Batch processing method and device of user-defined controls, electronic equipment and storage medium
CN112685113A (en) * 2020-12-28 2021-04-20 金现代信息产业股份有限公司 iOS skin changing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102626A1 (en) * 2001-01-31 2005-05-12 Microsoft Corporation Methods and systems for creating and using skins
CN102200914A (en) * 2011-06-24 2011-09-28 北京神州泰岳软件股份有限公司 Method and equipment of realizing user interface on mobile terminal
US20150186132A1 (en) * 2013-12-31 2015-07-02 Wolters Kluwer United States Inc. User interface framework and tools for rapid development of web applications
CN108008997A (en) * 2017-12-22 2018-05-08 北京酷我科技有限公司 A kind of unified method replaced of APP skins
CN108228178A (en) * 2017-12-15 2018-06-29 阿里巴巴集团控股有限公司 A kind of page to APP carries out the method and apparatus for changing skin

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050102626A1 (en) * 2001-01-31 2005-05-12 Microsoft Corporation Methods and systems for creating and using skins
CN102200914A (en) * 2011-06-24 2011-09-28 北京神州泰岳软件股份有限公司 Method and equipment of realizing user interface on mobile terminal
US20150186132A1 (en) * 2013-12-31 2015-07-02 Wolters Kluwer United States Inc. User interface framework and tools for rapid development of web applications
CN108228178A (en) * 2017-12-15 2018-06-29 阿里巴巴集团控股有限公司 A kind of page to APP carries out the method and apparatus for changing skin
CN108008997A (en) * 2017-12-22 2018-05-08 北京酷我科技有限公司 A kind of unified method replaced of APP skins

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110096269A (en) * 2019-04-18 2019-08-06 北京奇艺世纪科技有限公司 A kind of interface rendering method, device and electronic equipment based on skin caching mechanism
CN110083357A (en) * 2019-04-28 2019-08-02 博众精工科技股份有限公司 Interface construction method, device, server and storage medium
CN110083357B (en) * 2019-04-28 2023-10-13 博众精工科技股份有限公司 Interface construction method, device, server and storage medium
CN112015497A (en) * 2019-05-13 2020-12-01 华为技术有限公司 Skin changing method and device
CN110704035A (en) * 2019-10-17 2020-01-17 北京首贝科技发展有限公司 Plug-in type software architecture system and implementation method thereof
CN111737334A (en) * 2020-06-24 2020-10-02 深圳前海微众银行股份有限公司 Data reporting method, device, equipment and storage medium
CN112416343A (en) * 2020-11-04 2021-02-26 广州小鹏汽车科技有限公司 Batch processing method and device of user-defined controls, electronic equipment and storage medium
CN112269605A (en) * 2020-11-12 2021-01-26 北京百度网讯科技有限公司 Skin replacement method and device, electronic equipment and storage medium
CN112685113A (en) * 2020-12-28 2021-04-20 金现代信息产业股份有限公司 iOS skin changing method and device

Also Published As

Publication number Publication date
CN109284165B (en) 2021-11-09

Similar Documents

Publication Publication Date Title
CN109284165A (en) Client skin change method, device, equipment and computer readable storage medium
Meyer et al. Internet of things-aware process modeling: integrating IoT devices as business process resources
US7774745B2 (en) Mapping of designtime to runtime in a visual modeling language environment
US8862975B2 (en) Web-based workflow service visualization and navigation
US20160072899A1 (en) System architecture for cloud-platform infrastructure layouts
US9367289B2 (en) Method and apparatus for enabling agile development of services in cloud computing and traditional environments
US9280320B2 (en) Software design sharing systems and methods
CN108038894B (en) Animation creation method, animation creation device, electronic equipment and computer-readable storage medium
Raneburger et al. Optimized GUI generation for small screens
US20120227028A1 (en) Graphical programming object population user interface autogeneration
Greifenberg et al. A comparison of mechanisms for integrating handwritten and generated code for object-oriented programming languages
Boudaa et al. An aspect-oriented model-driven approach for building adaptable context-aware service-based applications
US8990766B2 (en) Construction of object-oriented programming (OOP) patterns by behavior delegation
US20090132915A1 (en) View selection and switching
Warnars Object-oriented modelling with unified modelling language 2.0 for simple software application based on agile methodology
CN101776997A (en) Interface processing method and device
US9747080B2 (en) Software design sharing systems and methods
Deufemia et al. Visually modelling data intensive web applications to assist end-user development
US20160103857A1 (en) Maintenance Actions and User-Specific Settings of the Attribute Value Derivation Instruction Set User Interface
EP2565805A1 (en) Methods and systems for a state-based web framework architecture
EP2482185A1 (en) Flexible dual data attribute
Soni et al. Spring: Developing Java Applications for the Enterprise
Watson et al. Scalable control and monitoring of supercomputer applications using an integrated tool framework
US7716635B1 (en) Method for the generation of graphic user interfaces for computer programs
Bulajic et al. An Approach to Reducing Complexity in Abstract Factory Design Pattern

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant