[svn] Added support for a PDA-sized GUI (240x320). There is now an option in prophet.pro to compile with regular GUI or for PDA. svn
authormattias
Mon, 11 Dec 2006 13:56:49 +0000
branchsvn
changeset 70972af01517e5
parent 69 bf21bafe7bfa
child 71 4aad6943f588
[svn] Added support for a PDA-sized GUI (240x320). There is now an option in prophet.pro to compile with regular GUI or for PDA.

PDA GUI is still missing the tab for reading NSIMs
x86/bundleWidget.cpp
x86/connectionWidget.cpp
x86/connectionWidget.h
x86/debugWidget.cpp
x86/debugWidget.h
x86/infoWidget.cpp
x86/infoWidget.h
x86/msgWidget.cpp
x86/prophet.pro
     1.1 --- a/x86/bundleWidget.cpp	Fri Dec 01 17:21:19 2006 +0000
     1.2 +++ b/x86/bundleWidget.cpp	Mon Dec 11 13:56:49 2006 +0000
     1.3 @@ -6,12 +6,19 @@
     1.4  BundleWidget::BundleWidget(QWidget *parent)
     1.5          : QWidget(parent)
     1.6  {
     1.7 +#ifdef PDAGUI
     1.8 +//	setFixedSize(230, 300);
     1.9 +#else
    1.10  	setFixedSize(990, 660);
    1.11 +#endif //PDAGUI
    1.12 +	
    1.13  	ReadFile conf;
    1.14  
    1.15 +#ifndef PDAGUI
    1.16  	//List group
    1.17  	QGroupBox *bundleBox = new QGroupBox("Bundle list");
    1.18 -	
    1.19 +#endif //PDAGUI
    1.20 +
    1.21  	//Bundle table
    1.22  	table = new QTableWidget(200, 9, this);
    1.23      QStringList horizontalLabels;
    1.24 @@ -22,12 +29,25 @@
    1.25  	//Final grid layout
    1.26      QGridLayout *bundleGroup = new QGridLayout;
    1.27  	bundleGroup->addWidget(table, 0, 0);
    1.28 +#ifdef PDAGUI
    1.29 +	bundleGroup->setMargin(0);
    1.30 +	bundleGroup->setSpacing(0);
    1.31 +//	bundleBox->setFixedSize(230, 270);
    1.32 +#else
    1.33  	bundleBox->setFixedSize(950, 550);
    1.34  	bundleBox->setLayout(bundleGroup);
    1.35 +#endif //PDAGUI
    1.36  
    1.37 +#ifndef PDAGUI
    1.38  	QGroupBox *buttonBox = new QGroupBox("Administration");
    1.39 +#endif //PDAGUI
    1.40 +#ifdef PDAGUI
    1.41 +	removeSelected = new QPushButton("Remove Selected");
    1.42 +	removeAll = new QPushButton("Remove All");
    1.43 +#else
    1.44  	removeSelected = new QPushButton("Remove Selected One");
    1.45  	removeAll = new QPushButton("Remove All Bundles");
    1.46 +#endif //PDAGUI
    1.47  	connect(removeSelected, SIGNAL(pressed()), this, SLOT(removeSelectedSlot()));
    1.48  	connect(removeAll, SIGNAL(pressed()), this, SLOT(removeAllSlot()));
    1.49  
    1.50 @@ -38,6 +58,26 @@
    1.51  	administrationGroup->addWidget(removeSelected, 0, 0);
    1.52  	administrationGroup->addWidget(removeAll, 0, 1);
    1.53  
    1.54 +#ifdef PDAGUI
    1.55 +	administrationGroup->setMargin(0);
    1.56 +	administrationGroup->setSpacing(0);
    1.57 +// 	buttonBox->setFixedSize(230, 30);
    1.58 +//	buttonBox->setLayout(administrationGroup);
    1.59 +	//Define final layout
    1.60 +	QVBoxLayout *layout = new QVBoxLayout;
    1.61 +	layout->setMargin(0);
    1.62 +	layout->setSpacing(0);
    1.63 +	QWidget *tempWidget1 = new QWidget(this);
    1.64 +//	table->setFixedSize(230,260);
    1.65 +//	tempWidget1->setFixedSize(230,260);
    1.66 +	tempWidget1->setLayout(bundleGroup);
    1.67 +    layout->addWidget(tempWidget1);
    1.68 +	QWidget *tempWidget2 = new QWidget(this);
    1.69 +//	tempWidget2->setFixedSize(230,40);
    1.70 +	tempWidget2->setLayout(administrationGroup);
    1.71 +	layout->addWidget(tempWidget2);
    1.72 +    setLayout(layout);
    1.73 +#else
    1.74   	buttonBox->setFixedSize(950, 60);
    1.75  	buttonBox->setLayout(administrationGroup);
    1.76  	//Define final layout
    1.77 @@ -45,6 +85,7 @@
    1.78      layout->addWidget(bundleBox);    
    1.79  	layout->addWidget(buttonBox);    
    1.80      setLayout(layout);
    1.81 +#endif //PDAGUI
    1.82  }
    1.83  
    1.84  
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/x86/connectionWidget.cpp	Mon Dec 11 13:56:49 2006 +0000
     2.3 @@ -0,0 +1,64 @@
     2.4 +#include <QtGui>
     2.5 +#include <connectionWidget.h>
     2.6 +#include <readFile.h>
     2.7 +
     2.8 +ConnectionWidget::ConnectionWidget(QWidget *parent)
     2.9 +        : QWidget(parent)
    2.10 +{
    2.11 +#ifdef PDAGUI
    2.12 +//	setFixedSize(230,300);
    2.13 +#else
    2.14 +	setFixedSize(990, 660);
    2.15 +#endif //PDAGUI
    2.16 +
    2.17 +//	QGroupBox *connectionBox = new QGroupBox("Active Connections");
    2.18 +
    2.19 +	//ConnectionsTable
    2.20 +	conTable = new QTableWidget(9, 4, this);
    2.21 +    QStringList horizontalConLabels;
    2.22 +    horizontalConLabels << "ID" << "IP" << "Alive" << "State" ;
    2.23 +	conTable->setHorizontalHeaderLabels(horizontalConLabels);
    2.24 +	conTable->setColumnWidth(0, 70);	//ID
    2.25 +	conTable->setColumnWidth(1, 70);	//IP
    2.26 +	conTable->setColumnWidth(2, 60);	//Alive
    2.27 +	conTable->setColumnWidth(3, 60);	//State
    2.28 +
    2.29 +	QGridLayout *layout = new QGridLayout();
    2.30 +	layout->setMargin(0);
    2.31 +	layout->setSpacing(0);
    2.32 +	layout->addWidget(conTable, 0, 0);
    2.33 +	setLayout(layout);
    2.34 +
    2.35 +
    2.36 +}
    2.37 +
    2.38 +//Receives a list of active connection and add them to the list
    2.39 +void ConnectionWidget:: getConnectionList(QList <ConnectionInfo> list)
    2.40 +{
    2.41 +	ConnectionInfo tempNode;
    2.42 +	conTable->clear();
    2.43 +        QStringList horizontalConLabels;
    2.44 +	horizontalConLabels << "ID" << "IP" << "Alive" << "State";
    2.45 +	conTable->setHorizontalHeaderLabels(horizontalConLabels);
    2.46 +	for (int i = 0; i < list.size(); ++i)
    2.47 +	{
    2.48 +		tempNode=list.at(i);
    2.49 +		//Adding ID
    2.50 +		QString text = QString("%1").arg((int)tempNode.id);
    2.51 +		QTableWidgetItem *newItem = new QTableWidgetItem(text);
    2.52 +		conTable->setItem(i, 0, newItem);
    2.53 +		//Adding IP
    2.54 +		text = tempNode.ip.toString();
    2.55 +		newItem = new QTableWidgetItem(text);
    2.56 +		conTable->setItem(i, 1, newItem);
    2.57 +		//Adding Alive variable
    2.58 +		text = QString("%1").arg((int)tempNode.alive);
    2.59 +		newItem = new QTableWidgetItem(text);
    2.60 +		conTable->setItem(i, 2, newItem);
    2.61 +		//Adding State of the TCP Connection
    2.62 +		int x = tempNode.tcpSocket->state();
    2.63 +		text = QString("%1").arg((int)x);
    2.64 +		newItem = new QTableWidgetItem(text);
    2.65 +		conTable->setItem(i, 3, newItem);
    2.66 +	}
    2.67 + }
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/x86/connectionWidget.h	Mon Dec 11 13:56:49 2006 +0000
     3.3 @@ -0,0 +1,25 @@
     3.4 +#ifndef CONNECTIONWIDGET_H
     3.5 +#define CONNECTIONWIDGET_H
     3.6 +#include <QtGui>
     3.7 +#include <QtNetwork>
     3.8 +#include <bundle.h>
     3.9 +#include <nodeManager.h>
    3.10 +#include <neighbourAwareness.h>
    3.11 +
    3.12 +class ConnectionWidget: public QWidget
    3.13 +{
    3.14 +
    3.15 +	Q_OBJECT
    3.16 +
    3.17 +public:
    3.18 +	ConnectionWidget(QWidget *parent = 0);
    3.19 +private:
    3.20 +	QTableWidget* conTable;
    3.21 +
    3.22 +public slots:
    3.23 +	void getConnectionList(QList <ConnectionInfo>);
    3.24 +};
    3.25 +
    3.26 +#endif
    3.27 +
    3.28 +
     4.1 --- a/x86/debugWidget.cpp	Fri Dec 01 17:21:19 2006 +0000
     4.2 +++ b/x86/debugWidget.cpp	Mon Dec 11 13:56:49 2006 +0000
     4.3 @@ -9,13 +9,21 @@
     4.4  DebugWidget::DebugWidget(NodeManager *nodeMng,BundleManager *bundleMng,QWidget *parent)
     4.5  		: QWidget(parent)
     4.6  {
     4.7 +#ifdef PDAGUI
     4.8 +	setFixedSize(240,320);
     4.9 +#else
    4.10  	setFixedSize(1000,700);
    4.11 +#endif //PDAGUI
    4.12  	ReadFile conf;
    4.13  	QString mainText = "Prophet Window - ";
    4.14  	mainText.append(conf.getNodeName());
    4.15  	setWindowTitle(mainText);
    4.16  	bundleManager=bundleMng;
    4.17  
    4.18 +#ifdef PDAGUI
    4.19 +	//Connection list tab
    4.20 +	connectionWidget = new ConnectionWidget(this);
    4.21 +#endif //PDAGUI
    4.22  
    4.23  	//Message Widget Tag
    4.24  	message = new MsgWidget(nodeMng,bundleMng);
    4.25 @@ -36,9 +44,13 @@
    4.26  	connect(this, SIGNAL(usedFileStorage(int)), infoWidget, SLOT(getUsedFileStorage(int)));
    4.27  	connect(this, SIGNAL(usedMemoryStorage(int)), infoWidget, SLOT(getUsedMemoryStorage(int)));
    4.28  	connect(this, SIGNAL(forwardConnectionList(QList <ConnectionInfo>)), infoWidget, SLOT(getConnectionList(QList <ConnectionInfo>)));
    4.29 +#ifdef PDAGUI
    4.30 +	connect(infoWidget, SIGNAL(sendConnectionList(QList <ConnectionInfo>)), 
    4.31 +			connectionWidget, SLOT(getConnectionList(QList <ConnectionInfo>)));
    4.32 +#endif //PDAGUI
    4.33  	
    4.34  	//Bundle List Tag
    4.35 -	bundleWidget = new BundleWidget;
    4.36 +	bundleWidget = new BundleWidget(this);
    4.37  	connect(this, SIGNAL(sendBundleList(QList<Bundle>)), bundleWidget, SLOT(getBundleList(QList<Bundle>)));
    4.38  	connect(bundleWidget, SIGNAL(removeBundle(int)), this, SLOT(removeBundleSlot(int)));
    4.39  	connect(bundleWidget, SIGNAL(removeAllBundles()), this, SLOT(removeAllBundlesSlot()));
    4.40 @@ -52,6 +64,7 @@
    4.41  	
    4.42  	//About Tag
    4.43  	info = new QListWidget;
    4.44 +	//info->setSelectionMode(QAbstractItemView::NoSelection);
    4.45  	QString itemText;
    4.46  	itemText.append("PRoPHET Version: 2.6.0");
    4.47      QListWidgetItem *newItem = new QListWidgetItem;
    4.48 @@ -76,9 +89,12 @@
    4.49  
    4.50  	//Tab Widget
    4.51  	tabWidget = new QTabWidget;
    4.52 -	tabWidget->addTab(infoWidget,tr("Node info"));
    4.53 +	tabWidget->addTab(infoWidget,tr("Node info"));
    4.54 +	#ifdef PDAGUI
    4.55 +	tabWidget->addTab(connectionWidget,tr("Connections"));
    4.56 +	#endif //PDAGUI
    4.57  	tabWidget->addTab(bundleWidget,tr("Bundle list"));
    4.58 -        tabWidget->addTab(message, tr("NSIM"));
    4.59 +	tabWidget->addTab(message, tr("NSIM"));
    4.60  	#ifdef DTN_INTERFACE
    4.61  	tabWidget->addTab(dtnInfo,tr("DTN Interface"));
    4.62  	#endif /*DTN_INTERFACE*/
    4.63 @@ -88,6 +104,10 @@
    4.64  	
    4.65  	//Define final layout
    4.66  	QVBoxLayout *layout = new QVBoxLayout;
    4.67 +#ifdef PDAGUI
    4.68 +	layout->setMargin(0);
    4.69 +	layout->setSpacing(0);
    4.70 +#endif //PDAGUI
    4.71      layout->addWidget(tabWidget);    
    4.72      setLayout(layout);
    4.73  
     5.1 --- a/x86/debugWidget.h	Fri Dec 01 17:21:19 2006 +0000
     5.2 +++ b/x86/debugWidget.h	Mon Dec 11 13:56:49 2006 +0000
     5.3 @@ -5,8 +5,9 @@
     5.4  #include <QtGui>
     5.5  #include <bundle.h>
     5.6  #include <node.h>
     5.7 -#include <msgWidget.h>
     5.8 -#include <infoWidget.h>
     5.9 +#include <connectionWidget.h>
    5.10 +#include <msgWidget.h>
    5.11 +#include <infoWidget.h>
    5.12  #include <bundleWidget.h>
    5.13  #include <neighbourAwareness.h>
    5.14  #include <bundleManager.h>
    5.15 @@ -20,11 +21,12 @@
    5.16  		QTableWidget *table;
    5.17  		QTableWidget *nodeTable;
    5.18  		QTableWidget *conTable;
    5.19 +		ConnectionWidget *connectionWidget;
    5.20  		MsgWidget *message;
    5.21  		QTabWidget *tabWidget;
    5.22  		QListWidget *info;
    5.23 -		QTextEdit *dtnInfo;
    5.24 -		InfoWidget *infoWidget;
    5.25 +		QTextEdit *dtnInfo;
    5.26 +		InfoWidget *infoWidget;
    5.27  		BundleWidget *bundleWidget;
    5.28  		BundleManager *bundleManager;	
    5.29  	int dtnEntery;
     6.1 --- a/x86/infoWidget.cpp	Fri Dec 01 17:21:19 2006 +0000
     6.2 +++ b/x86/infoWidget.cpp	Mon Dec 11 13:56:49 2006 +0000
     6.3 @@ -23,7 +23,11 @@
     6.4  InfoWidget::InfoWidget(NodeManager* nodeMng,QWidget *parent)
     6.5          : QWidget(parent)
     6.6  {
     6.7 +#ifdef PDAGUI
     6.8 +//	setFixedSize(230,300);
     6.9 +#else
    6.10  	setFixedSize(990, 660);
    6.11 +#endif //PDAGUI
    6.12  	ReadFile conf;
    6.13  	//Traffic timer and variables
    6.14  	trafficRate=0;
    6.15 @@ -38,6 +42,7 @@
    6.16  	connect(trafficTimer, SIGNAL(timeout()), this, SLOT(calculateTraffic()));
    6.17  	connect(yellowTimer, SIGNAL(timeout()), this, SLOT(yellowLedOff()));
    6.18  	connect(redTimer, SIGNAL(timeout()), this, SLOT(redLedOff()));
    6.19 +
    6.20  	//Load graphic
    6.21  	redOn = new QPixmap("red_on.png");
    6.22  	redOff= new QPixmap("red_off.png");
    6.23 @@ -45,8 +50,8 @@
    6.24  	yellowOff= new QPixmap("yellow_off.png");
    6.25  	greenOn= new QPixmap("green_on.png");
    6.26  	greenOff= new QPixmap("green_off.png");
    6.27 -
    6.28 -
    6.29 +
    6.30 +#ifndef PDAGUI
    6.31  	//ConnectionsTable
    6.32      QLabel *labelConnections = new QLabel(this);
    6.33      labelConnections->setText("Active connections:");
    6.34 @@ -54,11 +59,12 @@
    6.35      QStringList horizontalConLabels;
    6.36      horizontalConLabels << "ID" << "IP" << "Alive" << "State" ;
    6.37  	conTable->setHorizontalHeaderLabels(horizontalConLabels); 
    6.38 -
    6.39 -	
    6.40 -	
    6.41 +#endif //PDAGUI
    6.42 +
    6.43 +#ifndef PDAGUI
    6.44  	//Status group
    6.45  	QGroupBox *sendBox = new QGroupBox("Status");
    6.46 +#endif //PDAGUI
    6.47      //Memory resources
    6.48      QLabel *labelMemory = new QLabel(this);
    6.49      labelMemory->setText("Memory storage:");
    6.50 @@ -66,6 +72,7 @@
    6.51  	memoryBar->setMaximum (conf.getStorageSize());
    6.52  	memoryBar->setMinimum (0);
    6.53  	memoryBar->setValue (0);
    6.54 +	memoryBar->setTextVisible(true);
    6.55      //File resources
    6.56      QLabel *labelFile = new QLabel(this);
    6.57      labelFile->setText("File storage:");
    6.58 @@ -73,6 +80,7 @@
    6.59  	fileBar->setMaximum (conf.getMemoryStorageSize());
    6.60  	fileBar->setMinimum (0);
    6.61  	fileBar->setValue (0);
    6.62 +	fileBar->setTextVisible(true);
    6.63  	//Transfer speed
    6.64      QLabel *labelSpeed = new QLabel(this);
    6.65      labelSpeed->setText("Transfer speed:");
    6.66 @@ -80,6 +88,7 @@
    6.67  	speedBar->setMaximum (MAXRATE);
    6.68  	speedBar->setMinimum (0);
    6.69  	speedBar->setValue (0);
    6.70 +	speedBar->setTextVisible(true);
    6.71  	//Red label
    6.72  	labelRed = new QLabel(this);
    6.73      labelRed->setPixmap(*redOff);
    6.74 @@ -103,22 +112,44 @@
    6.75  
    6.76  	//Final grid layout
    6.77      QGridLayout *sendGroup = new QGridLayout;
    6.78 +#ifdef PDAGUI
    6.79 +	sendGroup->setMargin(5);
    6.80 +	sendGroup->setSpacing(3);
    6.81 +
    6.82 +	sendGroup->addWidget(labelMemory, 0, 0, 1, 3);
    6.83 +    sendGroup->addWidget(memoryBar, 0, 1, 1, -1);
    6.84 +	sendGroup->addWidget(labelFile, 1, 0, 1, 3);
    6.85 +    sendGroup->addWidget(fileBar, 1, 1, 1, -1);
    6.86 +	sendGroup->addWidget(labelSpeed, 2, 0, 1, 3);
    6.87 +	sendGroup->addWidget(speedBar, 2, 1, 1, -1);
    6.88 +	sendGroup->addWidget(labelRed, 3, 0, 1, 1);	sendGroup->addWidget(redLine, 3, 1, 1, -1);
    6.89 +	sendGroup->addWidget(labelGreen, 4, 0, 1, 1); sendGroup->addWidget(greenLine, 4, 1, 1, -1);
    6.90 +	sendGroup->addWidget(labelYellow, 5, 0, 1, 1); sendGroup->addWidget(yellowLine, 5, 1, 1, -1);
    6.91 +#else
    6.92  	sendGroup->addWidget(labelMemory, 0, 0);
    6.93      sendGroup->addWidget(memoryBar, 1, 0, 1,2);
    6.94  
    6.95  	sendGroup->addWidget(labelFile, 2, 0);
    6.96      sendGroup->addWidget(fileBar, 3, 0, 1,2);
    6.97 -	sendGroup->addWidget(labelSpeed, 4, 0);
    6.98 -	sendGroup->addWidget(speedBar, 5, 0, 1,2);
    6.99 -	sendGroup->addWidget(labelRed, 6, 0);	sendGroup->addWidget(redLine, 6, 1);
   6.100 -	sendGroup->addWidget(labelGreen, 7, 0); sendGroup->addWidget(greenLine, 7, 1 );
   6.101 -	sendGroup->addWidget(labelYellow, 8, 0); sendGroup->addWidget(yellowLine, 8, 1);
   6.102 +	sendGroup->addWidget(labelSpeed, 4, 0);
   6.103 +	sendGroup->addWidget(speedBar, 5, 0, 1,2);
   6.104 +	sendGroup->addWidget(labelRed, 6, 0);	sendGroup->addWidget(redLine, 6, 1);
   6.105 +	sendGroup->addWidget(labelGreen, 7, 0); sendGroup->addWidget(greenLine, 7, 1 );
   6.106 +	sendGroup->addWidget(labelYellow, 8, 0); sendGroup->addWidget(yellowLine, 8, 1);
   6.107 +
   6.108 +#endif //PDAGUI
   6.109 +
   6.110 +#ifndef PDAGUI
   6.111  	sendGroup->addWidget(labelConnections, 9, 0);
   6.112  	sendGroup->addWidget(conTable, 10, 0,1,2);
   6.113 +#endif //PDAGUI
   6.114  
   6.115 -
   6.116 +#ifdef PDAGUI
   6.117 +	//sendGroup->setFixedSize(240, 320);
   6.118 +#else
   6.119  	sendBox->setFixedSize(450, 635);
   6.120  	sendBox->setLayout(sendGroup);
   6.121 +#endif //PDAGUI
   6.122  	///////////////////////////////////////////////////
   6.123  	QGroupBox *readBox = new QGroupBox("Configuration");
   6.124  
   6.125 @@ -258,8 +289,14 @@
   6.126  	//Define final layout
   6.127  	QVBoxLayout *layout = new QVBoxLayout;
   6.128  	layout->setDirection(QBoxLayout::LeftToRight);
   6.129 -    layout->addWidget(sendBox);    
   6.130 +#ifdef PDAGUI
   6.131 +    setLayout(sendGroup);
   6.132 +#else
   6.133 +    layout->addWidget(sendBox);
   6.134 +#endif //PDAGUI
   6.135 +#ifndef PDAGUI
   6.136  	layout->addWidget(readBox);    
   6.137 +#endif //PDAGUI
   6.138      setLayout(layout);
   6.139  }
   6.140  
   6.141 @@ -455,6 +492,10 @@
   6.142  //Receives a list of active connection and add them to the list
   6.143  void InfoWidget:: getConnectionList(QList <ConnectionInfo> list)
   6.144  {
   6.145 +#ifdef PDAGUI
   6.146 +	/* send the connection list to the connection tab */
   6.147 +	emit sendConnectionList(list);
   6.148 +#else
   6.149  	ConnectionInfo tempNode;
   6.150  	conTable->clear();
   6.151          QStringList horizontalConLabels;
   6.152 @@ -481,4 +522,5 @@
   6.153  		newItem = new QTableWidgetItem(text);
   6.154  		conTable->setItem(i, 3, newItem);
   6.155  	}
   6.156 +#endif //PDAGUI
   6.157   }
     7.1 --- a/x86/infoWidget.h	Fri Dec 01 17:21:19 2006 +0000
     7.2 +++ b/x86/infoWidget.h	Mon Dec 11 13:56:49 2006 +0000
     7.3 @@ -129,6 +129,8 @@
     7.4  
     7.5  
     7.6  signals:
     7.7 +	void sendConnectionList(QList <ConnectionInfo>);
     7.8 +
     7.9  public slots:
    7.10  	void loadConfiguration();
    7.11  	void calculateTraffic();
     8.1 --- a/x86/msgWidget.cpp	Fri Dec 01 17:21:19 2006 +0000
     8.2 +++ b/x86/msgWidget.cpp	Mon Dec 11 13:56:49 2006 +0000
     8.3 @@ -7,13 +7,17 @@
     8.4  MsgWidget::MsgWidget(NodeManager* nodeMng,BundleManager* bundleMng,QWidget *parent)
     8.5          : QWidget(parent)
     8.6  {
     8.7 +#ifndef PDAGUI
     8.8  	setFixedSize(990, 660);
     8.9 +#endif //PDAGUI
    8.10  	nodeManager = nodeMng;
    8.11  	bundleManager = bundleMng;
    8.12  	connect(nodeMng,SIGNAL(updatedNodeList(NodeManager*)),this,SLOT(updatedNodeList(NodeManager*)));
    8.13  
    8.14 +#ifndef PDAGUI
    8.15  	//Send message group
    8.16  	QGroupBox *sendBox = new QGroupBox("Send message");
    8.17 +#endif //PDAGUI
    8.18      //Source
    8.19      QLabel *labelSrc = new QLabel(this);
    8.20      labelSrc->setText("Select destination:");
    8.21 @@ -23,8 +27,12 @@
    8.22  	QLabel *labelDst = new QLabel(this);
    8.23      labelDst->setText("Send message:");
    8.24  	combo = new QComboBox(this);
    8.25 +	//Message
    8.26 +	QLabel *labelMsg = new QLabel(this);
    8.27 +    labelMsg->setText("Type message here:");
    8.28 +	line = new QTextEdit();
    8.29  
    8.30 -
    8.31 +#ifndef PDAGUI
    8.32  	dst = new QLineEdit();
    8.33  	dst->setMaxLength(3); 
    8.34  	//Options
    8.35 @@ -32,10 +40,6 @@
    8.36      labelOpt->setText("Received messages:");
    8.37  	opt = new QLineEdit();
    8.38  	opt->setMaxLength(3); 
    8.39 -	//Message
    8.40 -	QLabel *labelMsg = new QLabel(this);
    8.41 -    labelMsg->setText("Type message here:");
    8.42 -	line = new QTextEdit();
    8.43  	//sourceString
    8.44  	QLabel *srcStr = new QLabel(this);
    8.45      srcStr->setText("Content:");
    8.46 @@ -44,6 +48,7 @@
    8.47  	QLabel *dstStr = new QLabel(this);
    8.48     // dstStr->setText("DestinationString");
    8.49  	dstLine = new QLineEdit();
    8.50 +#endif //PDAGUI
    8.51  	//Send
    8.52  	QPushButton *send= new QPushButton("Send", this);
    8.53  	//File
    8.54 @@ -71,9 +76,14 @@
    8.55   	//sendGroup->addWidget(line, 5, 0, 1, 3);
    8.56      //sendGroup->addWidget(send, 3, 2);
    8.57  	 //   sendGroup->addWidget(file, 6, 2);
    8.58 +#ifdef PDAGUI
    8.59 +	setLayout(sendGroup);
    8.60 +#else
    8.61  	sendBox->setFixedSize(450, 620);
    8.62  	sendBox->setLayout(sendGroup);
    8.63 +#endif //PDAGUI
    8.64  	///////////////////////////////////////////////////
    8.65 +#ifndef PDAGUI
    8.66  	QGroupBox *readBox = new QGroupBox("Read message");
    8.67  	readText = new QTextBrowser(this);
    8.68  	msgList = new QListWidget;
    8.69 @@ -85,7 +95,7 @@
    8.70  	readGroup->addWidget(readText, 3, 0);
    8.71   	readBox->setFixedSize(450, 620);
    8.72  	readBox->setLayout(readGroup);
    8.73 -	Bundle *msg = new Bundle;
    8.74 +	Bundle *msg = new Bundle; //is this used for anything???
    8.75  	//Define final layout
    8.76  	QVBoxLayout *layout = new QVBoxLayout;
    8.77  	layout->setDirection(QBoxLayout::LeftToRight);
    8.78 @@ -93,15 +103,19 @@
    8.79      layout->addWidget(readBox);    
    8.80      setLayout(layout);
    8.81  	//Define connections
    8.82 -	bool b = connect(send,SIGNAL(clicked(void)),this, SLOT(composeBundle(void)) );
    8.83  //	connect(line, SIGNAL(returnPressed ()(QString)),label,SLOT(setText(QString)));
    8.84 +#endif //PDAGUI
    8.85  	//Prepare update timer
    8.86  	timer = new QTimer();
    8.87 +#ifndef PDAGUI
    8.88  	connect(timer, SIGNAL(timeout()), this, SLOT(updateLists()));
    8.89  	connect(msgList, SIGNAL(itemClicked (QListWidgetItem *)), this, SLOT(showMsg(QListWidgetItem *)));
    8.90  	connect(msgList, SIGNAL(itemDoubleClicked  (QListWidgetItem *)), this, SLOT(showMsg(QListWidgetItem *)));
    8.91 +#endif //PDAGUI
    8.92  	connect(nodeManager, SIGNAL(updatedNodeList(NodeManager*)), this, SLOT(updatedNodeList(NodeManager* )));
    8.93  
    8.94 +	bool b = connect(send,SIGNAL(clicked(void)),this, SLOT(composeBundle(void)) );
    8.95 +
    8.96  
    8.97  
    8.98  	timer->start(5000);
     9.1 --- a/x86/prophet.pro	Fri Dec 01 17:21:19 2006 +0000
     9.2 +++ b/x86/prophet.pro	Mon Dec 11 13:56:49 2006 +0000
     9.3 @@ -2,13 +2,24 @@
     9.4  # GUI = false - generates Makefile for building without GUI support.
     9.5  GUI = true
     9.6  
     9.7 +# PDAGUI = true  - generares makefile for building with GUI for PDA
     9.8 +# PDAGUI = false - generates makefile for building without GUI for PDA
     9.9 +# PDAGUI has no effect unless GUI is set to true
    9.10 +PDAGUI = false
    9.11 +
    9.12  # DTN_INTERFACE = true  - generates Makefile for building with DTN support.
    9.13  # DTN_INTERFACE = false - generates Makefile for building without DTN support.
    9.14 -DTN_INTERFACE = true
    9.15 +DTN_INTERFACE = false
    9.16  
    9.17  contains(GUI, true) {
    9.18  	message("Creating Makefile with GUI")
    9.19  	DEFINES += GUI
    9.20 +	contains(PDAGUI, true) {
    9.21 +		message("GUI will be built for PDA use")
    9.22 +		DEFINES += PDAGUI
    9.23 +		HEADERS += connectionWidget.h
    9.24 +		SOURCES += connectionWidget.cpp
    9.25 +	}
    9.26  	HEADERS += infoWidget.h\		
    9.27  			   bundleWidget.h\		
    9.28          	   msgWidget.h \