The privl class represents the framework for all screens (central widgets) and the main application logic.
More...
Public Types |
enum | STATES {
LOGIN,
MAP,
FRIENDS,
SMS,
SETTINGS
} |
Public Slots |
void | showLoginScreen () |
| Create an instance of the login screen and show it.
|
void | showMapScreen () |
| Create an instance of the Map screen and show it.
|
void | showFriendScreen () |
| Create an instance of the friend screen and show it.
|
void | showSmsScreen () |
| Create an insatnce of the Sms Screen and show it.
|
void | showSettingScreen () |
| Create an instance of the settings screen and show it.
|
void | actionShareAll () |
| Slot called if user clicks on Share all.
|
void | actionShareFriend () |
| Slot called if user clicks on Share with one friend.
|
void | actionFindMe () |
| Slot called if user clicks on Find Me.
|
void | actionFindMeLast () |
| Slot called if user clicks on Find My Last Position.
|
void | actionFindFriends () |
| Slot called if user clicks on Find All Friends.
|
void | actionFindFriend () |
| Slot called if user clicks on Find Friend.
|
void | actionFindDistance () |
| Slot called if user clicks on Find Distance.
|
void | actionLogin () |
| Send a request to Sharing to login on the SharingService.
|
void | actionSaveCredentials () |
| Slot called to save user's credentials.
|
void | actionResetCache () |
| Slot called if user clicks on Reset Cache.
|
void | loggedAction (bool success, QString msg) |
| Slot called upon login answer.
|
void | recvLocationAction (QString source, double lat, double lng) |
| Slot called upon user location update.
|
void | recvFriendLocationAction (QString id, double lat, double lng) |
| Update Friend's Location.
|
void | logoutAction () |
| Log out.
|
void | updateAction () |
| Slot called if user clicks on update.
|
void | setError (QString err) |
| Show an error message.
|
void | setStatus (QString status) |
| Display a status message.
|
void | focusFriend (QListWidgetItem *item) |
| Slot called if an action related to a friend is selected (find, distance, share).
|
void | setShowDistance (bool show) |
| Set whether the distance to a freind should be shown.
|
void | actionSaChanged (QString id, QString action) |
| Slot called if user gets/sets/deletes SA.
|
void | actionLevelChanged (int level) |
| Slot called if user changes action level.
|
void | actionModeChanged (int mode) |
| Slot called if user changes localization method.
|
void | actionSmsSelected (QModelIndex ind) |
| Slot called if has selected an SMS.
|
void | actionTTLChanged (int val) |
| Slot called if user changes the TTL.
|
void | exit () |
| Exit the application.
|
Public Member Functions |
| Privl (QWidget *parent=0) |
| Construct the core application object.
|
void | loadUserSettings () |
| Load user settings from the file c://privl_settings.txt.
|
void | connectCallbacks () |
| Connect signals and slots.
|
void | loadMap () |
| reload map with current parameters
|
void | loadMap (QGeoCoordinate center) |
| Reload map with new center.
|
void | loadMap (QGeoCoordinate center, int zoom) |
| Reload map with new center and new zoom.
|
void | loadMap (QGeoCoordinate center, int zoom, QString selId) |
| Reload map with new center and new zoom and focus on other friend.
|
void | loadMap (int height, int width) |
| Reload map with new center and new zoom.
|
void | setFriends (QHash< QString, Friend * > fl) |
| Update the current's instance friend list.
|
void | addFriend (QString id, double lat, double lng) |
| Slot called if new friend information arrives.
|
void | clearFriends () |
| Clear the current list of friends.
|
void | setMe (QString id, double lat, double lng) |
| Update the current user's information.
|
Friend * | getMe () |
| Get an pointer to curretn user.
|
void | cleanUp () |
| Cleanup current user and friend list.
|
void | setCenter (QGeoCoordinate center) |
| Set current center.
|
void | setShowFriends (bool show) |
| Clear the current list of friends.
|
void | setSelectId (QString id) |
| Set selected friend.
|
Public Attributes |
loginscreen * | login |
mapscreen * | maps |
FriendScreen * | friends |
SmsScreen * | sms |
SettingScreen * | settings |
STATES | state |
The privl class represents the framework for all screens (central widgets) and the main application logic.
This class represents the general screen of the application. It contains the cenral widget which is set by one out of five different screens (map, settings, friends, sms, login). The class additionaly contains any information of these 5 screen that should last longer than the time that specific screen is displayed. The functions in this class are responsible for setting up the correct screen and for high level logic (user interaction, status, error, ...)