git-svn-id: svn://db.shs.com.ru/libs@395 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -217,6 +217,12 @@ void CDCore::stop() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void CDCore::release() {
|
||||||
|
stop();
|
||||||
|
connection.removeAllDevices();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void CDCore::startX(double freq) {
|
void CDCore::startX(double freq) {
|
||||||
//piCout << "start x" << x_timer.isRunning() << freq;
|
//piCout << "start x" << x_timer.isRunning() << freq;
|
||||||
if (!x_timer.isRunning())
|
if (!x_timer.isRunning())
|
||||||
@@ -225,7 +231,7 @@ void CDCore::startX(double freq) {
|
|||||||
|
|
||||||
|
|
||||||
void CDCore::stopX() {
|
void CDCore::stopX() {
|
||||||
x_timer.stop();
|
x_timer.stop(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ public:
|
|||||||
void initPult();
|
void initPult();
|
||||||
void init(const PIString & configuration, bool pult = false);
|
void init(const PIString & configuration, bool pult = false);
|
||||||
void stop();
|
void stop();
|
||||||
|
void release();
|
||||||
void startX(double freq = 20.);
|
void startX(double freq = 20.);
|
||||||
void stopX();
|
void stopX();
|
||||||
void sendCommand(const CDType & c);
|
void sendCommand(const CDType & c);
|
||||||
|
|||||||
@@ -125,11 +125,16 @@ bool Interface::configure(const PIString & config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Interface::reinitConnection(const PIString &configuration) {
|
void Interface::reinitConnection(const PIString & configuration) {
|
||||||
core->init(configuration);
|
core->init(configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Interface::releaseConnection() {
|
||||||
|
core->release();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Interface::write(PIIODevice * d) {
|
void Interface::write(PIIODevice * d) {
|
||||||
core->cd_write(s, d);
|
core->cd_write(s, d);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ public:
|
|||||||
void setFileName(const PIString & _file);
|
void setFileName(const PIString & _file);
|
||||||
bool configure(const PIString & config);
|
bool configure(const PIString & config);
|
||||||
void reinitConnection(const PIString & configuration);
|
void reinitConnection(const PIString & configuration);
|
||||||
|
void releaseConnection();
|
||||||
void write(PIIODevice * d);
|
void write(PIIODevice * d);
|
||||||
void read(PIIODevice * d);
|
void read(PIIODevice * d);
|
||||||
void parse(PIIODevice * d);
|
void parse(PIIODevice * d);
|
||||||
|
|||||||
@@ -139,3 +139,8 @@ QSize preferredIconSize(float x) {
|
|||||||
int s = qMax<int>(8, qRound(fontHeight() * x));
|
int s = qMax<int>(8, qRound(fontHeight() * x));
|
||||||
return QSize(s, s);
|
return QSize(s, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double appScale() {
|
||||||
|
return qMax<double>(fontHeight() / 15., 1.);
|
||||||
|
}
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ QString uniqueName(QString n, const QStringList & names);
|
|||||||
int fontHeight();
|
int fontHeight();
|
||||||
int lineThickness();
|
int lineThickness();
|
||||||
QSize preferredIconSize(float x = 1.f);
|
QSize preferredIconSize(float x = 1.f);
|
||||||
|
double appScale();
|
||||||
|
|
||||||
|
|
||||||
#endif // QAD_TYPES_H
|
#endif // QAD_TYPES_H
|
||||||
|
|||||||
Reference in New Issue
Block a user