Skip to content
Snippets Groups Projects
Commit cd166342 authored by Giacomo Strangolino's avatar Giacomo Strangolino
Browse files

Project tdklamda-genesis imported from last version in CVS

parents
No related branches found
No related tags found
No related merge requests found
include(/usr/local/qtango/include/qtango6/qtango.pri)
SOURCES += src/tdklambda-genesis.cpp \
src/main.cpp
HEADERS += src/tdklambda-genesis.h
FORMS = src/tdklambda-genesis.ui
TARGET = bin/pstdklambda-genesis
release_14: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_13: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_12: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_11: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_09 qtango5 tango8
README 0 → 100644
assigned to: Giacomo Strangolino
hw referent: Stefano Cleva
status:
percent: 0
/***************************************************************************
* Copyright (C) 2007 by Claudio Scafuri, Giacomo Strangolino *
* claudio@hyo *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <TApplication>
#include <TSplashScreen>
// #include <EStyleLoader> /* see comment below */
//
#define CVSVERSION "$Name: $"
#include "tdklambda-genesis.h"
#include <tutil.h> /* N.B.: prima degli include di X11 */
#include <X11/Xlib.h>
#include <QX11Info>
#include <elettracolors.h>
int main( int argc, char ** argv ) {
const char *cvs_version = CVSVERSION;
TApplication a( argc, argv );
/* uncomment to set application color */
a.setPalette(EPalette("fermi"));
a.setApplicationVersion(CVSVERSION);
a.setApplicationName("PowerSupplyTDKLambda");
a.setProperty("author", "Giacomo");
a.setProperty("mail", "giacomo.strangolino@elettra.trieste.it");
a.setProperty("phone", "375-8073");
a.setProperty("office", "T2PT025");
a.setProperty("hwReferent", "Stefano C."); /* name of the referent that provides the device server */
/* load the style sheet for QTango application.
* The file is read from the "${INSTALL_ROOT}/share/qtango/stylesheets/qtango.css"
* file. You can load a custom stylesheet by exporting the environment variable
* "QTANGO_STYLESHEET" and setting it to a different path.
* Moreover, you can construct EStyleLoader with a file name as argument, to ignore
* the installed "${INSTALL_ROOT}/share/qtango/stylesheets/qtango.css" and the value
* of the environment variable.
* This does not work as expected in Qt version 4.4.x. So the following two lines are
* commented. Uncomment them when upgrading to a newer Qt version.
*/
// EStyleLoader sLoader;
// a.setStyleSheet(sLoader.styleSheet());
/* splash screen */
TSplashScreen splash;
TUtil::instance()->setLoggingTarget(argv[0]);
TdkLG mw;
QString title("pstdklambda-genesis");
if (QApplication::arguments().size() > 1)
title = QApplication::arguments()[1].split('/').last(); /* solo il member */
mw.setWindowTitle(title);
mw.show();
/* hide splash screen */
splash.finish(&mw);
/* register to window manager */
Display *disp = QX11Info::display();
Window root_win = (Window) mw.winId();
XSetCommand(disp, root_win, argv, argc);
return a.exec();
}
/***************************************************************************
* Copyright (C) 2007 by Claudio Scafuri, Giacomo Strangolino *
* claudio@hyo *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "tdklambda-genesis.h"
#include <qtango.h>
#include <TLogDialog>
#define LITTLEW 328
#define LITTLEH 450
#define BIGW 650
#define BIGH 720
TdkLG::TdkLG(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
}
TdkLG::~TdkLG()
{
}
/***************************************************************************
* Copyright (C) 2007 by Claudio Scafuri, Giacomo Strangolino *
* claudio@hyo *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include <TApplication>
#include <TSplashScreen>
// #include <EStyleLoader> /* see comment below */
//
#define CVSVERSION "$Name: $"
#include "tdklambda-genesis.h"
#include <tutil.h> /* N.B.: prima degli include di X11 */
#include <X11/Xlib.h>
#include <QX11Info>
#include <elettracolors.h>
int main( int argc, char ** argv ) {
const char *cvs_version = CVSVERSION;
TApplication a( argc, argv );
/* uncomment to set application color */
a.setPalette(EPalette("fermi"));
a.setApplicationVersion(CVSVERSION);
a.setApplicationName("PowerSupplyTDKLambda");
a.setProperty("author", "Giacomo");
a.setProperty("mail", "giacomo.strangolino@elettra.trieste.it");
a.setProperty("phone", "375-8073");
a.setProperty("office", "T2PT025");
a.setProperty("hwReferent", "Stefano C."); /* name of the referent that provides the device server */
/* load the style sheet for QTango application.
* The file is read from the "${INSTALL_ROOT}/share/qtango/stylesheets/qtango.css"
* file. You can load a custom stylesheet by exporting the environment variable
* "QTANGO_STYLESHEET" and setting it to a different path.
* Moreover, you can construct EStyleLoader with a file name as argument, to ignore
* the installed "${INSTALL_ROOT}/share/qtango/stylesheets/qtango.css" and the value
* of the environment variable.
* This does not work as expected in Qt version 4.4.x. So the following two lines are
* commented. Uncomment them when upgrading to a newer Qt version.
*/
// EStyleLoader sLoader;
// a.setStyleSheet(sLoader.styleSheet());
/* splash screen */
TSplashScreen splash;
TUtil::instance()->setLoggingTarget(argv[0]);
TdkLG mw;
QString title("pstdklambda-genesis");
if (QApplication::arguments().size() > 1)
title = QApplication::arguments()[1].split('/').last(); /* solo il member */
mw.setWindowTitle(title);
mw.show();
/* hide splash screen */
splash.finish(&mw);
/* register to window manager */
Display *disp = QX11Info::display();
Window root_win = (Window) mw.winId();
XSetCommand(disp, root_win, argv, argc);
return a.exec();
}
/***************************************************************************
* Copyright (C) 2007 by Claudio Scafuri, Giacomo Strangolino *
* claudio@hyo *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#include "tdklambda-genesis.h"
#include <qtango.h>
#include <TLogDialog>
#define LITTLEW 328
#define LITTLEH 450
#define BIGW 650
#define BIGH 720
TdkLG::TdkLG(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
}
TdkLG::~TdkLG()
{
}
/***************************************************************************
* Copyright (C) 2007 by Claudio Scafuri, Giacomo Strangolino *
* claudio@hyo *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
#ifndef tdklambdagenesis_H
#define tdklambdagenesis_H
#include "ui_tdklambda-genesis.h"
class TdkLG: public QWidget
{
Q_OBJECT
public:
TdkLG(QWidget * =NULL);
~TdkLG();
private:
Ui::TdkLG ui;
};
#endif
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>TdkLG</class>
<widget class="QWidget" name="TdkLG">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>422</width>
<height>507</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="margin">
<number>3</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="Normal">
<attribute name="title">
<string>Normal</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0" colspan="2">
<widget class="TLabel" name="tLabel">
<property name="source">
<string>$1/State</string>
</property>
</widget>
</item>
<item row="0" column="2" rowspan="8" colspan="2">
<widget class="TCircularGauge" name="tCircularGauge_2">
<property name="referenceEnabled">
<bool>false</bool>
</property>
<property name="source">
<string>$1/Current</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="TPushButton" name="tPushButton">
<property name="text">
<string>On</string>
</property>
<property name="targets">
<string>$1-&gt;On</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="TPushButton" name="tPushButton_2">
<property name="text">
<string>Off</string>
</property>
<property name="targets">
<string>$1-&gt;Off</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="TPushButton" name="tPushButton_3">
<property name="text">
<string>Reset</string>
</property>
<property name="targets">
<string>$1-&gt;ResetV;</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="2">
<widget class="TPushButton" name="tPushButton_4">
<property name="text">
<string>Cycle</string>
</property>
<property name="targets">
<string>$1-&gt;StartCycling;;</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="2">
<widget class="TPushButton" name="tPushButton_5">
<property name="text">
<string>Abort</string>
</property>
<property name="targets">
<string>$1-&gt;Abort;;</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>59</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="0" rowspan="2" colspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>72</width>
<height>68</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="2" colspan="2">
<widget class="QLabel" name="label_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Current</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="9" column="2">
<widget class="QLabel" name="labelCurSetPoint_2">
<property name="text">
<string>Set Point</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="3">
<widget class="TApplyNumeric" name="tApplyNumeric">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>45</height>
</size>
</property>
<property name="targets">
<string>$1/Current;</string>
</property>
</widget>
</item>
<item row="11" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Status:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="11" column="1" colspan="3">
<widget class="TLabel" name="tLabel_2">
<property name="source">
<string>$1/Status</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="Expert">
<attribute name="title">
<string>Expert</string>
</attribute>
<widget class="TReaderWriter" name="tReaderWriter">
<property name="geometry">
<rect>
<x>138</x>
<y>84</y>
<width>127</width>
<height>28</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>127</width>
<height>0</height>
</size>
</property>
<property name="source">
<string>$1/VoltageLimit</string>
</property>
<property name="targets">
<string/>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>9</x>
<y>7</y>
<width>124</width>
<height>19</height>
</rect>
</property>
<property name="text">
<string>Operating Mode</string>
</property>
</widget>
<widget class="TLabel" name="tLabel_5">
<property name="geometry">
<rect>
<x>138</x>
<y>44</y>
<width>125</width>
<height>30</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>125</width>
<height>30</height>
</size>
</property>
<property name="source">
<string>$1/MeasuredVoltage</string>
</property>
<property name="period">
<number>10000</number>
</property>
<property name="autoConfiguration">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>35</x>
<y>85</y>
<width>98</width>
<height>19</height>
</rect>
</property>
<property name="text">
<string>Voltage Limit</string>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>76</x>
<y>44</y>
<width>57</width>
<height>19</height>
</rect>
</property>
<property name="text">
<string>Voltage</string>
</property>
</widget>
<widget class="TLabel" name="tLabel_3">
<property name="geometry">
<rect>
<x>138</x>
<y>7</y>
<width>125</width>
<height>30</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>125</width>
<height>30</height>
</size>
</property>
<property name="source">
<string>$1/OperatingMode</string>
</property>
<property name="period">
<number>10000</number>
</property>
</widget>
</widget>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>316</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="TLogButton" name="tLogButton">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>TLabel</class>
<extends>ELabel</extends>
<header>TLabel</header>
</customwidget>
<customwidget>
<class>TCircularGauge</class>
<extends>ECircularGauge</extends>
<header>TCircularGauge</header>
</customwidget>
<customwidget>
<class>TApplyNumeric</class>
<extends>EApplyNumeric</extends>
<header>TApplyNumeric</header>
</customwidget>
<customwidget>
<class>TPushButton</class>
<extends>QPushButton</extends>
<header>TPushButton</header>
</customwidget>
<customwidget>
<class>TLogButton</class>
<extends>QPushButton</extends>
<header>TLogButton</header>
</customwidget>
<customwidget>
<class>TReaderWriter</class>
<extends>TLabel</extends>
<header>TReaderWriter</header>
</customwidget>
<customwidget>
<class>ELabel</class>
<extends>QLabel</extends>
<header>ELabel</header>
</customwidget>
<customwidget>
<class>ECircularGauge</class>
<extends>QWidget</extends>
<header>EGauge</header>
</customwidget>
<customwidget>
<class>EApplyNumeric</class>
<extends>QWidget</extends>
<header>EApplyNumeric</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
include(/usr/local/qtango/include/qtango6/qtango.pri)
SOURCES += src/tdklambda-genesis.cpp \
src/main.cpp
HEADERS += src/tdklambda-genesis.h
FORMS = src/tdklambda-genesis.ui
TARGET = bin/pstdklambda-genesis
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment