summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/configdialog.cpp7
-rw-r--r--noncore/apps/opie-console/file_layer.cpp3
-rw-r--r--noncore/apps/opie-console/profileeditorplugins.cpp25
-rw-r--r--noncore/apps/opie-console/profileeditorplugins.h3
4 files changed, 19 insertions, 19 deletions
diff --git a/noncore/apps/opie-console/configdialog.cpp b/noncore/apps/opie-console/configdialog.cpp
index 50512b6..8745305 100644
--- a/noncore/apps/opie-console/configdialog.cpp
+++ b/noncore/apps/opie-console/configdialog.cpp
@@ -1,55 +1,56 @@
+#include <qdialog.h>
+#include <qlistview.h>
+
#include "profile.h"
-#include "qlistview.h"
#include "configdialog.h"
-#include "profileeditordialog.h"
#include "metafactory.h"
-#include "qdialog.h"
+#include "profileeditordialog.h"
class ConfigListItem : public QListViewItem {
public:
ConfigListItem( QListView* item, const Profile& );
~ConfigListItem();
Profile profile()const;
private:
Profile m_prof;
};
ConfigListItem::ConfigListItem( QListView* item, const Profile& prof )
: QListViewItem( item ), m_prof( prof )
{
setText(0, prof.name() );
}
ConfigListItem::~ConfigListItem() {
}
Profile ConfigListItem::profile()const {
return m_prof;
}
/* Dialog */
ConfigDialog::ConfigDialog( const Profile::ValueList& lis, MetaFactory* fa,
QWidget* parent )
: ConfigureBase( parent, 0, TRUE ), m_fact( fa )
{
//init();
{
Profile::ValueList::ConstIterator it;
for (it = lis.begin(); it != lis.end(); ++it ) {
new ConfigListItem( lstView, (*it) );
}
}
}
ConfigDialog::~ConfigDialog() {
}
Profile::ValueList ConfigDialog::list()const {
/* iterate over the list */
Profile::ValueList lst;
QListViewItemIterator it(lstView);
for ( ; it.current(); ++it ) {
ConfigListItem* item = (ConfigListItem*)it.current();
lst.append( item->profile() );
}
return lst;
diff --git a/noncore/apps/opie-console/file_layer.cpp b/noncore/apps/opie-console/file_layer.cpp
index 79caa8a..43e9c8f 100644
--- a/noncore/apps/opie-console/file_layer.cpp
+++ b/noncore/apps/opie-console/file_layer.cpp
@@ -1,22 +1,23 @@
-#include "file_layer.h"
#include <qfile.h>
#include <opie/oprocess.h>
+#include "file_layer.h"
+
FileTransferLayer::FileTransferLayer(IOLayer *layer)
: QObject(), m_layer( layer )
{
}
FileTransferLayer::~FileTransferLayer() {
}
void FileTransferLayer::sendFile(const QFile& file) {
}
void FileTransferLayer::sendFile(const QString& file) {
}
IOLayer* FileTransferLayer::layer() {
return m_layer;
}
diff --git a/noncore/apps/opie-console/profileeditorplugins.cpp b/noncore/apps/opie-console/profileeditorplugins.cpp
index 937516c..45b2148 100644
--- a/noncore/apps/opie-console/profileeditorplugins.cpp
+++ b/noncore/apps/opie-console/profileeditorplugins.cpp
@@ -1,64 +1,63 @@
-#include "profileeditorplugins.h"
-#include "profile.h"
-
-#include "qframe.h"
-#include "qlabel.h"
-#include "qlineedit.h"
-#include "qlayout.h"
-#include "qcombobox.h"
-#include "qradiobutton.h"
-#include "qcheckbox.h"
-#include "qbuttongroup.h"
-#include "qhgroupbox.h"
-#include "qvbox.h"
+#include <qframe.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qlayout.h>
+#include <qcombobox.h>
+#include <qradiobutton.h>
+#include <qcheckbox.h>
+#include <qbuttongroup.h>
+#include <qhgroupbox.h>
+#include <qvbox.h>
#include "io_serial.h"
+#include "profile.h"
+#include "profileeditorplugins.h"
// Base class
ProfileEditorPlugin::ProfileEditorPlugin(QWidget *parent, Profile *p)
: QObject()
{
m_parent = parent;
m_profile = p;
m_widget = NULL;
}
ProfileEditorPlugin::~ProfileEditorPlugin()
{
if(m_widget) delete m_widget;
}
QWidget *ProfileEditorPlugin::connection_widget()
{
QWidget *root;
QVBoxLayout *lroot;
root = new QWidget();
// Build GUI
QLabel *speedlabel = new QLabel(QObject::tr("Speed"), root);
QComboBox *speed_box = new QComboBox(root);
speed_box->insertItem("115200 baud", id_baud_115200);
speed_box->insertItem("57600 baud", id_baud_57600);
speed_box->insertItem("38400 baud", id_baud_38400);
speed_box->insertItem("19200 baud", id_baud_19200);
speed_box->insertItem("9600 baud", id_baud_9600);
QButtonGroup *group_flow = new QButtonGroup(QObject::tr("Flow control"), root);
QRadioButton *flow_hw = new QRadioButton(QObject::tr("Hardware"), group_flow);
QRadioButton *flow_sw = new QRadioButton(QObject::tr("Software"), group_flow);
QButtonGroup *group_parity = new QButtonGroup(QObject::tr("Parity"), root);
QRadioButton *parity_odd = new QRadioButton(QObject::tr("Odd"), group_parity);
QRadioButton *parity_even = new QRadioButton(QObject::tr("Even"), group_parity);
// Build Layout
lroot = new QVBoxLayout(root);
lroot->add(speedlabel);
lroot->add(speed_box);
lroot->setStretchFactor(speedlabel, 1);
lroot->setStretchFactor(speed_box, 1);
diff --git a/noncore/apps/opie-console/profileeditorplugins.h b/noncore/apps/opie-console/profileeditorplugins.h
index 4ca780e..f576143 100644
--- a/noncore/apps/opie-console/profileeditorplugins.h
+++ b/noncore/apps/opie-console/profileeditorplugins.h
@@ -1,57 +1,56 @@
#ifndef PROFILE_EDITOR_PLUGINS_H
#define PROFILE_EDITOR_PLUGINS_H
-#include "profile.h"
#include <qobject.h>
class QWidget;
-
+class Profile;
class ProfileEditorPlugin : public QObject
{
Q_OBJECT
public:
ProfileEditorPlugin(QWidget *parent);
virtual ~ProfileEditorPlugin();
virtual void save() = 0;
virtual QWidget *widget() = 0;
QWidget *connection_widget();
QWidget *terminal_widget();
public slots:
void slotConnFlow(int id);
void slotConnParity(int id);
void slotConnSpeed(int id);
void slotTermTerm(int id);
void slotTermColour(int id);
void slotTermFont(int id);
void slotTermEcho(bool on);
void slotTermWrap(bool on);
void slotTermInbound(bool on);
void slotTermOutbound(bool on);
protected:
QWidget *m_parent, *m_widget;
Profile *m_profile;
private:
enum ParityIds
{
id_parity_odd,
id_parity_even
};
enum FlowIds
{
id_flow_hw,
id_flow_sw
};
enum SpeedIds
{
id_baud_115200,
id_baud_57600,