Commit Graph

294 Commits

Author SHA1 Message Date
Mathew Sutcliffe
26ef5ecd5a reverted commit:97dda0b because QMetaEnum is working fine, it just needed the Q_ENUMS macro too
made INetwork::connectionStatusToString a static method
2014-01-19 00:03:52 +00:00
Klaus Basan
1129891532 NOMINMAX fix after removal of some classes
https://dev.vatsim-germany.org/boards/22/topics/1417?r=1440#message-1440
2014-01-19 00:23:23 +01:00
Roland Winklmeier
cb112c6ddb Merge branch 'master' of dev.vatsim-germany.org:vatpilotclient/client 2014-01-18 20:38:22 +01:00
Roland Winklmeier
da6e7a58a4 Add ifdefs arround native windows code to fix linux build
- There was some native windows code not properly covered by ifdefs.
- handlePushToTalk() is not yet implemented on linux. Add a dummy.
2014-01-18 20:12:02 +01: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
Roland Winklmeier
32cfb5c10b Remove sample_logging using the obsolete logging framework
refs #90
2014-01-18 20:04:38 +01:00
Klaus Basan
233bd51bfd Fixed ATIS bug, ATIS was applyIf as IndexAtisMessage (correct IndexAtis).
Also fixed appending CR.
2014-01-18 13:41:11 +01:00
Klaus Basan
b2afdd9860 Minor GUI tweak 2014-01-18 13:29:33 +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
Roland Winklmeier
6d10543d89 Fix endless voice transmission bug
The second if condition was always false, hence the pushToTalk boolean
was never resetted to false.
Add also mandatory and recommended respectively  calls to CallNextHookEx.
Otherwise other applications might run into problems.
Change virtual key VK_LCONTROL, since VK_CONTROL did not have any effect.
2014-01-17 21:07:53 +01:00
Roland Winklmeier
ba638b8e40 Merge branch 'master' of dev.vatsim-germany.org:vatpilotclient/client 2014-01-17 20:14:37 +01:00
Klaus Basan
16dc959662 Fixed 4 gcc warnings (2x order, 1x explicit constructor, 1x GUI / from related) 2014-01-17 20:05:00 +01:00
Klaus Basan
222756e7ac Fixed 2 bugs only obvious when running with Core/DBus
* init of m_enabled in modulator missing, crashed DBus marshalling
* Need to check boundaries of voice rooms in GUI for empty list
2014-01-17 19:27:15 +01:00
Klaus Basan
72b7a7ab95 Added statusMessages (plural) as signal. This makes it easier
to send either single or multiple messages as required.

Along with the changes fixed some places where not all status
messages had been sent.

MainWindow connected with both signals (statusMessage, statusMessages)

Recreated DBus XML file
2014-01-17 18:42:34 +01:00
Klaus Basan
97dda0b499 The meta type based status to string conversion did not work,
as the metatype for the interface cannot be registered.

Changed to a simple static method, as it will be replaced by I18N
anyway sooner or later.
2014-01-17 18:38:06 +01:00
Roland Winklmeier
c384e3d12e Merge branch 'master' of dev.vatsim-germany.org:vatpilotclient/client 2014-01-17 18:20:56 +01:00
Klaus Basan
b38d90a0f1 New XML files for the sample. Fixed some errors found during testing.
* applyIf no longer returns number of changed elements
* cmd line arguments, wrong assignment in main.cpp
2014-01-17 17:11:52 +01:00
Klaus Basan
fb9e7acd8e Allows to change IP address and port in the sample. This issue was mentioned
in the 1st premerge review of MS.

Disclaimer: As this is an sample, there is no validation as for valid IP, port.
2014-01-17 15:27:29 +01:00
Klaus Basan
b20523a8f7 Fine tuning of Ident . Xpdr Ident is send for some seconds, then resets to its original value.
However, an intended changed during this time was ignored. Fixed this issue.
2014-01-17 13:44:46 +01:00
Mathew Sutcliffe
a23c9e3f07 Normalizing argument types of CEarthAngle comparison and arithmetic operators:
argument type should be same type as the this pointer.
2014-01-17 01:38:29 +00:00
Mathew Sutcliffe
f156916c0c A copy constructor is needed for CPhysicalQuantity to fix an MSVC2010 linker error introduced by the previous commit.
refs #84
2014-01-17 01:38:28 +00: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
e40c93fe1b Removed CEarthAngle::toAngle, because implicit conversion already works.
Applied a different workaround to resolve the hiding of an inherited name in CEarthAngle, same as was done in CAltitude.
refs #84
2014-01-17 01:29:03 +00:00
Klaus Basan
5ffe3dc759 Improved order and handling in MainWindow gracefulShutdown 2014-01-16 02:41:08 +01:00
Klaus Basan
bddf54d770 Merge branch 'master' of dev.vatsim-germany.org:vatpilotclient/client 2014-01-16 02:05:57 +01:00
Klaus Basan
34ef6e47ae Changed when m_updateTimer is started:
Now starts when connection is established, and stops when terminated.
Also added an extra check in update, as the session check is
not sufficient.
2014-01-16 02:03:46 +01:00
Klaus Basan
9470dc27ca #98
Changed back signal/slot connection to old style
The described problem is one of the disadvantages of the new style,
when it comes to default values or different signatures

Also using a minimum value and adjusting the slider to any set value.
2014-01-16 01:04:22 +01:00
Klaus Basan
2cf097ae2e Receiving errors as status message results in
a pop up message now.
2014-01-15 23:52:22 +01:00
Klaus Basan
4f94f43e0d Setting own aircraft did not start the udpate timer.
Hence no updates from the network were received.
2014-01-15 23:51:15 +01:00
Roland Winklmeier
4d6564af64 Remove member string initialization to empty string in constructor
QString always treats null strings and empty strings the same,
except in isNull, so there is no need for this.
2014-01-15 21:24:15 +01:00
Roland Winklmeier
e36448f0a1 Replaced c++ standard integer types with Qt types
In order to be consistent, all standard integer types have been
replaced by the equivalent Qt ones in voice/audio code.
Projects covered
- BlackCore
- BlackMisc
- sample_voice_client

refs #99
2014-01-15 21:12:01 +01:00
Roland Winklmeier
f50fe098e3 Fix compile error in qFatal caused by type change to QString
msg was changed from type "const char*" to QString, but qFatal is
still expecting a "const char*" as its argument. Passed the QString
value to the qPrintable macro to fix it.
2014-01-15 20:39:15 +01:00
Klaus Basan
e5eb5bc972 Added new servers in the settings.
Europe C2 is now retired, I have added new severs for testing purposes.
C2 will be kept as test case for failing connects.

Remarks: Is will be saved in the settings in the future.
But we have no persistence for objects yet.
2014-01-15 20:11:00 +01:00
Klaus Basan
9f103a35cc Changed Window pointer ui tp QScopedPointer #95
Removed some default constructors from Member initializer list
Made member m_coreRuntime QScopedPointer
2014-01-15 19:33:28 +01:00
Klaus Basan
4c711dad82 Include Order MainWindow 2014-01-15 17:37:31 +01:00
Klaus Basan
f1482558fb New signal / slot syntax
#88

Not all calls can be replaced by new sytnax
(e.g. cannot handle default value arguments)
2014-01-15 17:27:17 +01:00
Klaus Basan
437eea6918 New signal/slot syntax
#96

In this particular case also solving the ASSERT
remaining from the pair programming session:

this->connect(this->m_network, SIGNAL(connectionStatusChanged(...
2014-01-15 16:21:17 +01:00
Klaus Basan
a0a082ab98 New signal/slot syntax
#96

In this particular case also solving the ASSERT
remaining from the pair programming sessiom:

this->connect(this->m_network, SIGNAL(connectionStatusChanged(INetwork::ConnectionStatus, INetwork::ConnectionStatus)),
this, SLOT(psFsdConnectionStatusChanged(INetwork::ConnectionStatus, INetwork::ConnectionStatus)));
Q_ASSERT_X(connect, "CContextNetwork", "Cannot connect connectionStatusChanged");
2014-01-15 15:58:29 +01:00
Mathew Sutcliffe
917e1829d1 reviewed backlog INetwork and CContextNetwork changes from kbatclist
* INetwork setOwnAircraft slots
* ATIS received shimlib callback triggers separate VoiceRoom and LogoffTime signals
* INetwork statusMessage signal emitted in response to shimlib errors
* INetwork::ConnectionStatus added a DisconnectedError value and toString conversion
* INetwork::isConnected method
* Argument in CNetworkVatlib constructor to enable stealth or observer mode
* Update CLI sample, tests, and CContextNetwork accordingly
2014-01-14 23:30:21 +00:00
Mathew Sutcliffe
7f99c6d953 using qSwap in CTextMessage::toggleSenderRecipient 2014-01-14 23:30:20 +00:00
Mathew Sutcliffe
b5f1b101f6 CTransponder::setModeAsString 2014-01-14 23:30:19 +00:00
Mathew Sutcliffe
84ec984e0e removed CNetworkDummy as it was not being used 2014-01-14 23:30:00 +00:00
Klaus Basan
92276eb5bf Removed Connection state from the class,
as we have it now in INetwork. The connection state
from the shimblib should not be used in the client
code (abstraction from "drivers"), and in the past the
corresponding client state was declared here, but is now
one level deeper in INetwork.

A second change applied here is to use the signature
connectionStatusChanged(from, to), which allows the GUI
to better detect whether we login or logout without keeping
its own state.
2014-01-13 14:05:13 +01:00
Klaus Basan
cf47b670a6 Include order 2014-01-13 13:29:08 +01:00
Klaus Basan
959f171edf Changed to astyle format and added comment 2014-01-13 13:26:30 +01:00
Klaus Basan
11666da76a Mute functionality, corrected setting volume 2014-01-13 13:22:58 +01:00
Klaus Basan
cedc08eb3d Code based on Review with RW (userJoinedLeft).
Includes the discussed changes, added the mute methods,
and switchAudioOutput to enable/disable channel1/2
2014-01-13 03:19:36 +01:00
Klaus Basan
71c7318176 IsMuted method 2014-01-13 03:05:12 +01:00
Klaus Basan
3627d340b2 Enable flag for modulator. Used with the GUI for MUTE. 2014-01-13 02:43:45 +01:00
Klaus Basan
4303cb8897 Hash value 2014-01-13 02:35:33 +01:00