1. Technical Field
The disclosure relates to an electronic device and, more particularly, to an electronic device and a method for selecting functions based on orientations of the electronic device.
2. Description of the Related Art
Electronic devices, such as digital photo frames, mobile phones, and e-books, include a plurality of functions. However, as the number of functions increase, choosing a function becomes more complicated, such as pressing a button several times, touching a pad repetitively, and the like. Therefore, conventional electronic devices may waste a lot of time and be inconvenient to operate.
Accordingly, what is needed in the art is an electronic device and a method for selecting functions that overcomes the aforementioned deficiencies.
The components in the drawings are not necessarily drawn to scale, the emphasis instead being placed upon clearly illustrating the principles of the electronic device. Moreover, in the drawings, like reference numerals designate corresponding parts throughout the several views.
The storage unit 30 is configured for storing an orientation function list 310. The orientation function list 310 is provided to store relationships between orientations of the electronic device 1 and functions to be executed by the electronic device 1. The orientation function list 310 includes an orientation column and a function column. In this embodiment, the orientation column records a plurality of orientations any of which the electronic device 1 may be positioned. For example, a rectangular digital photo frame may be placed with the long axis aligned vertically or alternatively placed horizontally. The function column records functions associated with the orientations. For example, as shown in the orientation function list 310 below, when the electronic device 1 is in orientation a, a music playing function is activated; when the electronic device 1 is in orientation b, a photo sharing function is activated. In other embodiments an orientation may be associated with more than one function.
The central processing unit 40 is configured for controlling the electronic device 1. The central processing unit 40 further includes a fetching module 410, a recognizing module 420, and a display control module 430. The fetching module 410 is configured for fetching signals from the induction unit 10. The recognizing module 420 is configured for recognizing the current orientation of the electronic device 1 according to the fetched signals. The display control module 430 is configured for selecting a function according to the current orientation from the orientation function list 310 and controlling the display unit 20 to display the interface that corresponds to the selected function.
As shown in
As shown in
When the judging module 440 judges that the orientation is altered, the timer 450 starts measuring time. The judging module 440 is further configured for judging whether an elapsed time of the timer 450 reaches a predetermined time period before the orientation is altered again. If the elapsed time reaches the predetermined time period, the display control module 430 selects a function corresponding to the altered orientation from the orientation function list 310 and controls the display unit 20 to display a corresponding interface, and the timer 450 stops measuring time. If the elapsed time does not reach the predetermined time period before the orientation is altered again, the timer 450 starts measuring time again without selecting a function. By having a predetermined time period, unwanted function changes may be avoided in response to temporary orientation changes caused perhaps, by a user carrying the electronic device 1.
When the judging module 440 judges that the orientation is altered, in step S240, the timer 450 starts measuring time. In step S250, the judging module 440 judges whether the elapsed time of the timer 450 reaches the predetermined time period before the orientation is altered again. If the elapsed time does not reach the predetermined time period before the orientation is altered again, the procedure returns to step S240 and the timer 450 starts measuring time again without selecting a function. If the judging module 440 judges that the elapsed time reaches the predetermined time period before the orientation is altered again, in step S260, the display control module 430 selects the function corresponding to the altered orientation from the orientation function list 310 and controls the display unit 20 to display the corresponding interface, and the timer 450 stops measuring time. After step S260, the process runs all the time. When the induction unit 10 generates the inductive signals, the central processing unit 40 recognizes the current orientation according to the signals.
It is understood that the invention may be embodied in other forms without departing from the spirit thereof. Thus, the present examples and embodiments are to be considered in all respects as illustrative and not restrictive, and the invention is not to be limited to the details given herein.
Number | Date | Country | Kind |
---|---|---|---|
200810301996.4 | Jun 2008 | CN | national |