summaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.h
AgeCommit message (Collapse)Author
2015-05-17Move Locationinformation to its own file.Gravatar Tomaz Canabrava
The SimpleWidgets file was getting too big, and location information will also need a new model - a good way to do not mix everything is to put things in a new file. [Dirk Hohndel: added missing include of stdint.h] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-04-24Allow images to be added via the webGravatar Robert C. Helling
This adds a new divelist context menu entry which asks for a URL. The file is retrieved and if it is an image it is added to the cache and the url is associated to dives as with local files. NB this currently only works with URLs pointing directly to images. But it should not be too hard to add the possibility to add a direction via an html file and its image tags. To test: open dives/test43.xml and delete the image and then add the URL http://euve10195.vserver.de/~robert/wreck.jpg Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-15Added warning when not all images can be added.Gravatar Jan Darowski
Added label in the ShiftImageTimesDialog which appears when not all of the selected images have timestamp in the checked range. Made cancel button in this widget actually work. Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Change the diveSiteMessage to show close or accept/rejectGravatar Dirk Hohndel
This gives us consistent behavior and allows closing the dive site management screen without editing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Clean up the UI when finished editingGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Clear after accepting / rejecting the LocationEditGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Change color / mark widget as changed correctly on LocationEditGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-03-10Clone a bit of code to mark the Location Widget changedGravatar Tomaz Canabrava
This code is the same that is used on the MainTab, but since they are different objects, I can't just call it. so I'm duplicating them for the time being. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-13Allow editing of dive sitesGravatar Dirk Hohndel
And hook things up when double clicking the globe. The user experience isn't consistent with what we do on the main tab (i.e., no coloring of fields that are changed), but it seems to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-12Correctly connect the maintab to dive site managementGravatar Dirk Hohndel
We now have a working uuid - use it. And populate the fields accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Copy the name and the coords when entering the EditDiveSite stateGravatar Tomaz Canabrava
Name and coords of the current dive are copied to the edit dive site screen. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Accept / Cancel location editGravatar Tomaz Canabrava
Make it possible to cancel or accept the location edit and get back to the mainwindow default state. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-02-11Create simple class to hold the location management.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Changed Facebook stuff to socialnetworks.h/cppGravatar Tomaz Canabrava
All Facebook related stuff now is on SocialNetworks.h/cpp this makes it much easier to implement things and looking for bugs. working: - logging in - getting user id - getting album id ( or creating it ) *much* more testing is needed, of course. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-24Create a Facebook album for SubsurfaceGravatar Tomaz Canabrava
We still need to do a lot of stuff on that part. Currently when asking for sending a profile, it will just create a private album. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-18Switch to having ui as member in MultiFilterGravatar Anton Lundin
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-12-01A widget to add a set-point changeGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-17Clarify the meaning of the values in the stats tabGravatar Dirk Hohndel
Extend the tooltips to be shown both on the labels and the values and add tooltips for all min/avg/max elements. To avoid confusion when only one dive is selected, no longer show min SAC or max SAC or min duration or max duration. Fixes #694 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-16Addded a min / max layout for the filter, and a filter countGravatar Tomaz Canabrava
But the filter count seems to be broken for some reason and I really don't know why. It seems to work for tags, but not for everything else. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13When closing the filter window also clear the filterGravatar Dirk Hohndel
The tooltip already pretended that that's what it did... Also make the tooltip wording consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-13Suits Widget created and working.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-11Added buttons to control the multi filterGravatar Tomaz Canabrava
Buttons to close, minimize and clear were added. We need better icons. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-11-03Fix position and size of the FilterGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Small random whitespace cleanupsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Implemented the LocationFilter widget.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Implement the Buddy Filter interface.Gravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Better layout for the filtering widgetGravatar Tomaz Canabrava
Fix the layout size, moved some stuff around. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31tagfilter.ui -> filterwidget.uiGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-31Added a 'MultiFilter' widget.Gravatar Tomaz Canabrava
The multifilter widget is a container with all the filter widgets inside of it. currently there's just one. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-10-02Add possibility to filter by more than one criteria at a timeGravatar Tomaz Canabrava
This new version of the TagFilterSortModel actually accepts *any* new MultiFilterInterface. So, how to use it to create a new filter: Implement a class that inherits from MultiFilterInterface Implement the filterRow method TagFilterSortModel::instance->add( myClass ); and you are done. [Dirk Hohndel: removed some debug code and did whitespace cleanup] Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Random whitespace updateGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Add the Tag Widget on the MainWindowGravatar Tomaz Canabrava
Place the TagWidget on the correct place on the main window. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Remove unused method signature.Gravatar Tomaz Canabrava
This was declared on a class definition, but never implemented. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-09-17Add skeleton to the Tag Filtering.Gravatar Tomaz Canabrava
Just the ui file and a empty class to start playing with it. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-08-16Cut'n'paste for dive data: implement copy sideGravatar Dirk Hohndel
Admittedly not very useful without working paste, but it's progress. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-30Calendar widget should hide when clicking somewhere elseGravatar Tomaz Canabrava
This patch adds a event filter to hide the calendar widget when it loses focus Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Listen to EnabledChange to gray out the DatePickerGravatar Tomaz Canabrava
This small patch listens to EnabledChange to gray out the date picker when the widget is in disabled mode, and to paint the widget colored when it's on enabled state. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Change the Star Widget to use QImage instead of QPixmapGravatar Tomaz Canabrava
Also, clean a few calls, this should make the widget a tiny bit faster. This patch also moves the grayImage function from the star widget to the global scope, so I can use it on the Calendar widget. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added keyboard navigation to the calendar date picker.Gravatar Tomaz Canabrava
Wee. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added focus handling to the Date Picker.Gravatar Tomaz Canabrava
Added focus handling for the date picker, this way the user can use the keyboard to change the date. ( still not implemented ) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added the calendar widget to change the calendar date.Gravatar Tomaz Canabrava
Added a popup widget to change the calendar date, just like the old QDateTimeEdit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Correctly sets the minimum size of the calendar widget.Gravatar Tomaz Canabrava
The old code cutted the calendar by half. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-20Added a Partly Functional Date Picker widget.Gravatar Tomaz Canabrava
This widget shows a date in a better way that it was done in the old widget, much more elegantly. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-01Override the MinMaxAvgWidget tool tips for the depth instance.Gravatar Tim Wootton
Add new methods to the MinMaxAvgWidget class to allow us to override the default tooltips of its min and max icons, and then uses these methods to make the tooltips for the Stats tab Depth instance more descriptive. See #521 Signed-off-by: Tim Wootton <tim@tee-jay.demon.co.uk> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-22Gratuitous whitespace changesGravatar Dirk Hohndel
I keep trying to get to consistenct. Completely hopeless. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-05-20Dive list: add context menu function to renumber dive(s)Gravatar Dirk Hohndel
No attempt is made to ensure that what the user does is sane. So this can result in duplicate numbers, non-consecutive numbers, non-monotonous numbers, whatever floats the users boat. You can renumber a single dive or all selected dives (with a starting number given that is applied to the oldest selected dive and then for each newer selected dive that number is incremented by one). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25simplewidgets: Include stdint for cross compatabilityGravatar Alberto Corona
Not including stdint leaves 'int64_t when' without a type and undefined when compiling for Windows with mingw Signed-off-by: Alberto Corona <albcoron@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-21Add current time and adjusted time to gui when adjusting dive's timestampGravatar Gehad
This patch adds the current dive time and the adjusted time to the time shift window. I added a function to dive.c to get the timestamp of the first selected dive. This will view the time of the first selected dive only even when multi dives are selected but it does change the times for multiple dives properly. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-27Massive automated whitespace cleanupGravatar Dirk Hohndel
I know everyone will hate it. Go ahead. Complain. Call me names. At least now things are consistent and reproducible. If you want changes, have your complaint come with a patch to scripts/whitespace.pl so that we can automate it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-17Compute dive computer/camera time offset from sample pictureGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>