S60: Provide a MessageBox for starting serial communication as well.

Generalize the concept of the Bluetooth starter, extract base class
BaseCommunicationStarter that can be used to start a serial communication
without further resources (listener) as well. Introduce convenience
functions for both types.

Note: This will only work for COM-ports that are not used otherwise
by the operating system.
This commit is contained in:
Friedemann Kleint
2009-10-26 15:37:09 +01:00
parent c6e9c041a7
commit 4091efb47f
13 changed files with 291 additions and 145 deletions

View File

@@ -31,6 +31,7 @@
#define S60DEBUGGERBLUETOOTHSTARTER_H
#include "communicationstarter.h"
#include "bluetoothlistener_gui.h"
namespace Debugger {
namespace Internal {
@@ -38,15 +39,24 @@ namespace Internal {
/* S60DebuggerBluetoothStarter: Creates a listener in 'Listen' mode
* parented on the Debugger manager which outputs to the debugger window.
* Note: This is a "last resort" starter, normally, the run configuration
* should have already started a listener. */
* should have already started a listener.
* Provides a static convenience to prompt for both connection types. */
class S60DebuggerBluetoothStarter : public trk::AbstractBluetoothStarter
{
{
public:
explicit S60DebuggerBluetoothStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0);
static trk::PromptStartCommunicationResult
startCommunication(const TrkDevicePtr &trkDevice,
const QString &device,
int communicationType,
QWidget *msgBoxParent,
QString *errorMessage);
protected:
protected:
virtual trk::BluetoothListener *createListener();
private:
explicit S60DebuggerBluetoothStarter(const TrkDevicePtr& trkDevice, QObject *parent = 0);
};
} // namespace Internal