[prev in list] [next in list] [prev in thread] [next in thread]
List: kstars-devel
Subject: [Kstars-devel] KDE/kdeedu/kstars/kstars/indi
From: Jasem Mutlaq <mutlaqja () ikarustech ! com>
Date: 2010-11-27 1:48:35
Message-ID: 20101127014835.30803AC8A2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1201180 by mutlaqja:
Enable BLOB handling policy to be set per property, and not per device as previously \
defined. This will enable the user to fine-tune which BLOBs to receive from drivers.
CCMAIL:kstars-devel@kde.org
CCMAIL: gerryr@rozeware.com
M +0 -17 indidevice.cpp
M +0 -4 indidevice.h
M +24 -2 indiproperty.cpp
M +2 -0 indiproperty.h
--- trunk/KDE/kdeedu/kstars/kstars/indi/indidevice.cpp #1201179:1201180
@@ -100,12 +100,6 @@
msgST_w = new KTextEdit();
msgST_w->setReadOnly(true);
- enableBLOBC = new QCheckBox(i18n("Binary Transfer"));
- enableBLOBC->setChecked(true);
- enableBLOBC->setToolTip(i18n("Enable binary data transfer from driver to KStars \
and vice-versa."));
-
- connect(enableBLOBC, SIGNAL(stateChanged(int)), this, SLOT(setBLOBOption(int)));
-
dataBuffer = (unsigned char *) malloc (1);
stdDev = new INDIStdDevice(this, parent->ksw);
@@ -116,7 +110,6 @@
deviceVBox->addWidget(groupContainer);
deviceVBox->addWidget(msgST_w);
- deviceVBox->addWidget(enableBLOBC);
parent->mainTabWidget->addTab(deviceVBox, label);
}
@@ -1107,15 +1100,5 @@
}
-void INDI_D::setBLOBOption(int state)
-{
- if (deviceManager == NULL)
- return;
- if (state == Qt::Checked)
- deviceManager->enableBLOB(true, name);
- else
- deviceManager->enableBLOB(false, name);
-}
-
#include "indidevice.moc"
--- trunk/KDE/kdeedu/kstars/kstars/indi/indidevice.h #1201179:1201180
@@ -70,7 +70,6 @@
QTabWidget *groupContainer; /* Groups within the device */
QTextEdit *msgST_w; /* scrolled text for messages */
unsigned char *dataBuffer; /* Generic buffer */
- QCheckBox *enableBLOBC;
INDIStdDevice *stdDev;
@@ -143,10 +142,7 @@
public slots:
void engageTracking();
- void setBLOBOption(int state);
-
-
};
#endif
--- trunk/KDE/kdeedu/kstars/kstars/indi/indiproperty.cpp #1201179:1201180
@@ -868,12 +868,23 @@
}
- if (perm == PP_RO)
- return 0;
+ enableBLOBC = new QCheckBox();
+ enableBLOBC->setIcon(KIcon("modem"));
+ enableBLOBC->setChecked(true);
+ enableBLOBC->setToolTip(i18n("Enable binary data transfer from this property to \
KStars and vice-versa."));
+ PHBox->addWidget(enableBLOBC);
+
+ connect(enableBLOBC, SIGNAL(stateChanged(int)), this, SLOT(setBLOBOption(int)));
+
+ if (perm != PP_RO)
+ {
setupSetButton(i18n("Upload"));
QObject::connect(set_w, SIGNAL(clicked()), this, SLOT(newBlob()));
+ }
+
+
return 0;
}
@@ -890,4 +901,15 @@
}
}
+void INDI_P::setBLOBOption(int state)
+{
+ if (pg->dp->deviceManager== NULL)
+ return;
+
+ if (state == Qt::Checked)
+ pg->dp->deviceManager->enableBLOB(true, pg->dp->name, name);
+ else
+ pg->dp->deviceManager->enableBLOB(false, pg->dp->name, name);
+}
+
#include "indiproperty.moc"
--- trunk/KDE/kdeedu/kstars/kstars/indi/indiproperty.h #1201179:1201180
@@ -51,6 +51,7 @@
KLed *light; /* state LED */
PPerm perm; /* permissions wrt client */
PGui guitype; /* type of GUI, if any */
+ QCheckBox *enableBLOBC;
int stdID; /* Standard property ID, if any */
@@ -101,6 +102,7 @@
void newAbstractButton(QAbstractButton *button);
void newComboBoxItem(const QString &item);
void newBlob();
+ void setBLOBOption(int state);
/*void actionTriggered(QAction* action);*/
signals:
_______________________________________________
Kstars-devel mailing list
Kstars-devel@kde.org
https://mail.kde.org/mailman/listinfo/kstars-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic