Commit Graph

49 Commits

Author SHA1 Message Date
Mathew Sutcliffe
50bf5690f9 refs #356 Moved CPropertyIndexVariantMap/CValueObject operators from CValueObject to CPropertyIndexVariantMap. 2015-03-27 19:08:48 +00:00
Mathew Sutcliffe
6ebe4913f6 refs #356 Removed IsQuantity trait, no longer used. 2015-03-27 19:08:46 +00:00
Mathew Sutcliffe
f23b3da1ae refs #356 parseFromString is public in derived classes, so it should be public in the base class. 2015-03-27 19:08:45 +00:00
Mathew Sutcliffe
599068e25b refs #247 Removed code which is no longer used. 2014-12-13 01:42:02 +00:00
Mathew Sutcliffe
48f04a4750 refs #247 Using CVariant in property index system. 2014-12-13 01:41:58 +00:00
Mathew Sutcliffe
befa5892a5 refs #247 CValueObject: Added missing convertFromCVariant method to complement toCVariant. 2014-12-13 01:41:54 +00:00
Mathew Sutcliffe
155b957cee refs #247 CVariant can inherit from CValueObjectStdTuple.
But if valueobject.h includes variant.h then it would create a circular dependency.
2014-12-13 01:41:49 +00:00
Mathew Sutcliffe
c5b463fafb refs #247 Created a facility to register our own custom metatype metadata. 2014-12-13 01:41:46 +00:00
Mathew Sutcliffe
57b2a6b588 refs #247 Removed methods which were missed in refs #345. 2014-12-13 01:38:45 +00:00
Mathew Sutcliffe
2b9d4098d4 refs #345 Extending CValueObjectStdTuple with policy classes to enable it to be used by classes which have different requirements. 2014-11-10 20:45:07 +00:00
Mathew Sutcliffe
79e401887c refs #345 A second template parameter in CValueObjectStdTuple allows to select the base class, for inheritance hierarchies. 2014-11-10 20:44:36 +00:00
Mathew Sutcliffe
8f7c10f306 refs #345 Symmetric equality operators complete the original implementation of CValueObjectStdTuple. 2014-11-10 20:43:33 +00:00
Mathew Sutcliffe
798b198d4e refs #345 Style and doxygen. 2014-11-10 20:42:31 +00:00
Klaus Basan
7304d8bd3e refs #325, name variant pair allows test for existing values
* equal value updates can be skipped
* equalsQVariant in CValueObject
* resizing parameter for views
2014-10-07 13:10:43 +02:00
Klaus Basan
ef5f5bde0f Formatting, new icons, minor tweaks 2014-10-07 13:10:37 +02:00
Klaus Basan
4b50134d2a refs #325, refs #330 fixed apply method to return list of changed properties
* changed CValueObject apply
* created CIndexPropertyList
* renamed CIndexVariantMap to CPropertyIndexVariantMap
2014-10-07 13:10:33 +02:00
Klaus Basan
6aba823f4f refs #327, CRTP for CValueObject classes
* using toMetaTuple, no jsonMembers function
* no un/equal operator as discussed
2014-09-11 18:34:27 +02:00
Klaus Basan
a6ebfc0e0b Bug fixes and improvements for PropertyIndex discovered during refs #319, mainly contributing to refs #314
* Start index 10 instead 0 for CValueObject (easier to detect bugs)
* Fixed wrong indexes
* Asserts in CPropertyIndex
* Used Icon instead of QPixpmap with indexes, icons are sortable and have a tooltip
* Removed redundant toQVariant methods
2014-09-04 01:38:10 +02:00
Klaus Basan
40b428a315 refs #314, renamed convertFromQVariant, convertFromJson
discussion: https://dev.vatsim-germany.org/issues/314#note-19
2014-08-24 02:47:16 +02:00
Klaus Basan
407a1409da refs #314, remove copy assignment operator 2014-08-24 02:47:07 +02:00
Klaus Basan
290abe3693 refs #314, fromQVariant / location of toQVariant
* renamed fromQVariant to convertFromQVariant, the "from" methods imply the object is changed (fromJson, fromString ..)
* implemented fromQVariant - changing the object by QVariant
* moved toQVariant into PQ template
* free function setFromQVariant
2014-08-24 02:47:05 +02:00
Klaus Basan
e109d73ba2 refs #314, new propertyBy methods (nested indexes) 2014-08-24 02:46:59 +02:00
Klaus Basan
3fb5087ea8 Renaming, header, Doxygen, formatting (during refs #314) 2014-08-24 02:45:52 +02:00
Klaus Basan
5873ec9359 refs #304, centralized icons
* icons which can be rotated
* provide metadata
* integrated in CValueObjects
* added SVG support
2014-08-05 23:31:54 +02:00
Klaus Basan
ae5c677cfe Formatting: Icon names, headers, Doxygen 2014-08-05 23:31:39 +02:00
Klaus Basan
0547b2847e refs #275, own info window component
* added to CVariant for value object
* signal in text message to indicate overlay messages
* info window component (currently not runtme aware, maybe changed in future)
* removed old window, adjusted GUI
2014-06-23 01:19:28 +02:00
Mathew Sutcliffe
18453225bd preparatory to refs #230, need to replace QSet with QOrderedSet
(which is our own custom class) in order to support standard algorithms.
This also means adding generic comparison operators for CValueObject.
2014-05-06 18:13:10 +01:00
Klaus Basan
adfeeba19d Formatting, comments, typos only 2014-04-28 20:35:38 +02:00
Klaus Basan
e474671ead refs #207, renamed CValueMap to CIndexVariantMap.
* The map will be used with CSimulaorInfo to transfer a variable number of setting information about the flight simulator. It is being used, because it is already DBus and tupel compliant. The new name better fits its purpose.
* Add == operator for CIndexVariantMap (ambiguity error with tupels)
2014-04-17 00:10:04 +02:00
Klaus Basan
d6191e97a0 refs #199 , moved operator for enum/DBus to own file. This operator is not CValueObject specific. 2014-04-17 00:05:42 +02:00
Mathew Sutcliffe
f601334ffa refs #192 tweaking include order and moving some JSON things into global namespace
so that we invoke ADL instead of relying on a particular include order
2014-03-31 23:48:39 +01:00
Klaus Basan
586e1e4053 refs #192 , enabled CValueObject for JSON
* operators
* from/toJson method
2014-03-26 20:11:34 +01:00
Klaus Basan
a38385e6e6 refs #184 , moved template into global namespace, see https://dev.vatsim-germany.org/issues/184#note-2 2014-03-26 19:50:51 +01:00
Klaus Basan
0d306861f0 refs #140, removed MACRO DBUS_ENUM_MARSHALLING, changed to template
discussed in https://dev.vatsim-germany.org/issues/140#change-864
2014-03-11 21:08:59 +01:00
Mathew Sutcliffe
fcd3dc09ef refs #140 framework for using std::tuple to reduce repetitive coding in value classes 2014-03-07 23:01:25 +01:00
Klaus Basan
2db876844c refs #91 & #124 Doxygen, override, and comment fixes 2014-02-12 20:14:32 +01:00
Klaus Basan
116db9a425 refs #91 & #124 doxygen fixes, style/comment changes, typos, and override / nullptr keywords
Remark: Doxygen <70 warnings
2014-02-07 01:09:31 +01:00
Klaus Basan
526cd916a8 refs #91 & #124 doxygen fixes, style/comment changes, typos, and override keywords 2014-02-06 03:22:42 +01:00
Klaus Basan
fda587994d CValueObject virtual method toIcon, reprsenting the object as icon where applicable.
Currently used for status messages (severity), will be used for CAtcStation and others as well.
2014-02-05 23:16:14 +00:00
Roland Winklmeier
08302c23bb Remove obsolete logging framework
This changes removes classes of the obsolete logging frame work and
all its references. It was not used anywhere, but included in several
headers.
Had to add header QDateTime in some places, which was not correctly
included and now missing.

refs #90
2014-01-18 20:09:03 +01:00
Klaus Basan
f883babc20 Only Doxygen fixes in order to answer
https://dev.vatsim-germany.org/boards/22/topics/1417?r=1432#message-1432

Fixed some Doxygen warnings along with it
No code changes!
2014-01-17 22:53:37 +01:00
Mathew Sutcliffe
db4c05dd9f refs #84 removed the CValueObject::compare method and added a friend function BlackMisc::compare to replace it.
The new compare is implemented using "multimethods" described in the book Advanced C++ Programming Styles and Idioms by James Coplien.

First, the isA method is used to determine which of the values being compared is the most general. (For example, CLength is more general than CAltitude.)
Then the compareImpl method is called on the most general value, with the other value as an argument.
If there is not a direct inheritance relation between the two values (or they are the same class) then the comparison is invalid and a assert is triggered.
2014-01-17 01:38:27 +00:00
Mathew Sutcliffe
bc611263e9 slight change to how we declare our qHash overload for CValueObject,
which fixes some include order dependency shenanigans when compiling with GCC,
which was caused by the requirement to overload qHash for CCollection
and the way qHash interacts with the dreaded two-phase lookup for C++ templates

refs #81
2014-01-09 01:16:02 +00:00
Klaus Basan
bb61654a29 style and consistency:
* rename CStatusMessages to CStatusMessageList
* rename NetworkVatlib to CNetworkVatlib
* replace all occurrences of Realname with RealName (correct camel case)
* CSequence method corresponding to CList::append is push_back
* don't compile the qdbuscpp2xml metadata plugin by default
* CAircraftIcao string members always trimmed and capitalized
* added CComSystem::roundTo25KHz
* using epsilon comparison in a couple of places

refs #81
2014-01-09 01:15:56 +00:00
Mathew Sutcliffe
a57e640398 generic type-erased container types CSequence and CCollection, including predicate-based algorithms
refs #81
2014-01-08 00:59:31 +00:00
Klaus Basan
bf1837b414 CValueMap generic representation of a value object as a map of QVariants
refs #81
2014-01-08 00:59:03 +00:00
Klaus Basan
a280d239e6 using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
2014-01-08 00:59:00 +00:00
Klaus Basan
67a5dbfe48 converting value objects to/from QVariant
refs #81
2014-01-08 00:58:56 +00:00
Klaus Basan
ded6fc012e rename CStreamable to CValueObject
refs #81
2014-01-08 00:58:50 +00:00