summaryrefslogtreecommitdiff
authormark <mark>2002-05-26 15:02:39 (UTC)
committer mark <mark>2002-05-26 15:02:39 (UTC)
commit2edc2f5989d07012f9936c0a70d51eae550a9ca2 (patch) (side-by-side diff)
tree03334ae0d7b4ec7866f0cb8975cb308b956dad99
parent5cfdb25137ac0006d1f7593531f9fbfb43d8ab64 (diff)
downloadopie-2edc2f5989d07012f9936c0a70d51eae550a9ca2.zip
opie-2edc2f5989d07012f9936c0a70d51eae550a9ca2.tar.gz
opie-2edc2f5989d07012f9936c0a70d51eae550a9ca2.tar.bz2
Ability to write messages offline. hope it works
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/gsmtool/gsmtool.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/unsupported/gsmtool/gsmtool.cpp b/noncore/unsupported/gsmtool/gsmtool.cpp
index e6122ad..5940b0e 100644
--- a/noncore/unsupported/gsmtool/gsmtool.cpp
+++ b/noncore/unsupported/gsmtool/gsmtool.cpp
@@ -29,97 +29,98 @@ GSMTool::GSMTool( QWidget* parent, const char* name, WFlags fl )
me = NULL;
sms_store = NULL;
setConnected(FALSE);
/* FIXME: Persistent settings for device/baudrate */
connect(ConnectButton, SIGNAL(clicked()), this, SLOT(doConnectButton()));
connect(SMSDeleteButton, SIGNAL(clicked()), this, SLOT(doSMSDeleteButton()));
connect(SMSSendButton, SIGNAL(clicked()), this, SLOT(doSMSSendButton()));
connect(NewSMSClearButton, SIGNAL(clicked()), this, SLOT(doNewSMSClearButton()));
connect(NewSMSSaveButton, SIGNAL(clicked()), this, SLOT(doNewSMSSaveButton()));
connect(NewSMSSendButton, SIGNAL(clicked()), this, SLOT(doNewSMSSendButton()));
connect(ScanButton, SIGNAL(clicked()), this, SLOT(doScanButton()));
connect(TabWidget2, SIGNAL(currentChanged(QWidget *)), this, SLOT(doTabChanged()));
connect(SMSStoreList, SIGNAL(activated(int)), this, SLOT(doSMSStoreChanged()));
connect(SMSViewType, SIGNAL(activated(int)), this, SLOT(doSMSTypeChanged()));
connect(SMSList, SIGNAL(selectionChanged(QListViewItem *)), this, SLOT(doSelectedSMSChanged(QListViewItem *)));
timerid = -1; // Is this not possible normally?
}
/*
* Destroys the object and frees any allocated resources
*/
GSMTool::~GSMTool()
{
// no need to delete child widgets, Qt does it all for us
if (devicelocked)
unlockDevice();
}
const speed_t GSMTool::baudrates[12] = {
B300, B600, B1200, B2400, B4800, B9600, B19200,
B38400, B57600, B115200, B230400, B460800
};
int GSMTool::lockDevice( )
{
devicelocked = 1;
/* FIXME */
return 0;
}
void GSMTool::unlockDevice( )
{
devicelocked = 0;
}
void GSMTool::setConnected( bool conn )
{
TabWidget2->setTabEnabled(tab_2, conn);
TabWidget2->setTabEnabled(tab_3, conn);
- TabWidget2->setTabEnabled(tab_4, conn);
+ //TabWidget2->setTabEnabled(tab_4, conn);
+ NewSMSSendButton->setEnabled(conn);
MfrLabel->setEnabled(conn);
MfrText->setEnabled(conn);
ModelLabel->setEnabled(conn);
ModelText->setEnabled(conn);
RevisionLabel->setEnabled(conn);
RevisionText->setEnabled(conn);
SerialLabel->setEnabled(conn);
SerialText->setEnabled(conn);
}
void GSMTool::doTabChanged()
{
int index = TabWidget2->currentPageIndex();
qDebug("tab changed to %d", index);
if (index == 1) {
timerid = startTimer(5000);
timerEvent(NULL);
} else if (timerid != -1) {
killTimer(timerid);
timerid = -1;
}
}
void GSMTool::timerEvent( QTimerEvent * )
{
OPInfo opi;
opi = me->getCurrentOPInfo();
if (opi._numericName == NOT_SET) {
NetStatText->setText("No network");
NetworkLabel->setEnabled(FALSE);
NetworkText->setEnabled(FALSE);
NetworkText->setText("");
SigStrText->setEnabled(FALSE);
SigStrText->setText("");
dB->setEnabled(FALSE);
SigStrLabel->setEnabled(FALSE);
} else {
// FIXME: Add 'roaming' info from AT+CFUN
qDebug("network");
NetStatText->setText("Registered");
NetworkLabel->setEnabled(TRUE);
NetworkText->setEnabled(TRUE);
NetworkText->setText(opi._longName.c_str());
SigStrText->setEnabled(TRUE);