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

Project shutterlhpil imported from last version in CVS

parents
No related branches found
No related tags found
No related merge requests found
release_07: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_06: porting to qtango6 (installed in /usr/local/qtango) and qt5
release_05 (branch 02): Fixed true/false logic in some flippers.
Replaced Open/Close buttons with Change for lsh_pil.01 flipper1 to flipper3
include(/usr/local/qtango/include/qtango6/qtango.pri)
SOURCES += src/shutterlhpil.cpp \
src/main.cpp
HEADERS += src/shutterlhpil.h
FORMS = src/shutterlhpil.ui
TARGET = bin/shutterlhpil
unix:QMAKE_RPATHDIR += /usr/local/qwt-5.2.1/lib
bin/shutterlhpil
/***************************************************************************
* $Id: main.cpp,v 1.1.1.1.2.2 2017-12-19 09:34:47 giacomo Exp $
* *
* Copyright (C) 2009 Claudio Scafuri *
* *
* 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 "shutterlhpil.h"
#include <tutil.h>
#include <X11/Xlib.h>
#include <QX11Info>
#include <elettracolors.h>
#include <TSplashScreen>
#define CVSVERSION "$Name: $"
int main(int argc, char ** argv) {
const char *cvs_version = CVSVERSION;
TApplication a(argc, argv);
a.setApplicationVersion(cvs_version);
a.setPalette(EPalette("fermi"));
a.setApplicationName("shutterlhpil");
a.setProperty("author", "Giacomo");
a.setProperty("mail", "giacomo.strangolino@elettra.eu");
a.setProperty("phone", "375-8073");
a.setProperty("office", "T2PT025");
TUtil::instance()->setLoggingTarget(argv[0]);
TSplashScreen splash;
Shutterlhpil mw;
mw.setWindowTitle("Pil/Lh Shutters");
mw.show();
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();
}
/***************************************************************************
* $Id: shutterlhpil.cpp,v 1.1.1.1.2.2 2017-12-21 13:38:13 giacomo Exp $
* *
* Copyright (C) 2009 by Fabio Asnicar fabio.asnicar@elettra.trieste.it *
* *
* 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 "shutterlhpil.h"
#include <QTWatcher>
Shutterlhpil::Shutterlhpil(QWidget *parent) : QWidget(parent) {
Config* config= Config::instance();
QColor orange=QColor(249,186,7);
QColor white=QColor(255,255,255);
//config->setStateColor(Tango::OPEN,white);
//config->setStateColor(Tango::CLOSE,orange);
config->setStateColor(Tango::OPEN,QColor(93, 234, 78));
config->setStateColor(Tango::CLOSE,QColor(240, 240, 0));
ui.setupUi(this);
ui.shutter_stat_lh->setEnumDisplay(0, 0, QString("MOVING"), QColor(120, 120, 255));
ui.shutter_stat_lh->setEnumDisplay(0, 1, QString("CLOSED"), QColor(240, 240, 0));
ui.shutter_stat_lh->setEnumDisplay(0, 2, QString("OPEN"), QColor(93, 234, 78));
ui.shutter_stat_lh->setEnumDisplay(0, 3, QString("FAULT"), QColor(220, 0, 0));
ui.attenuator_stat_lh->setEnumDisplay(0, 0, QString("MOVING"), QColor(120, 120, 255));
ui.attenuator_stat_lh->setEnumDisplay(0, 1, QString("INSERTED"), QColor(250, 250, 0));
ui.attenuator_stat_lh->setEnumDisplay(0, 2, QString("REMOVED"), QColor(93, 234, 78));
ui.attenuator_stat_lh->setEnumDisplay(0, 3, QString("FAULT"), QColor(220, 0, 0));
}
Shutterlhpil::~Shutterlhpil() {
}
void Shutterlhpil::usage() {
cout << "Usage:" << endl;
cout << " shutterlhpil device" << endl << endl;
}
/***************************************************************************
* $Id: shutterlhpil.h,v 1.1.1.1 2013-10-15 14:38:35 claudio Exp $
* *
* Copyright (C) 2009 by Fabio Asnicar fabio.asnicar@elettra.trieste.it *
* *
* 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 shutterlhpil_H
#define shutterlhpil_H
#include "ui_shutterlhpil.h"
#include <tango.h>
#include <readersgroup.h>
#include <device_factory.h>
class Shutterlhpil: public QWidget {
Q_OBJECT
public slots:
protected slots:
public:
Shutterlhpil(QWidget * =NULL);
~Shutterlhpil();
Ui::Shutterlhpil ui;
protected:
void usage();
};
#endif
This diff is collapsed.
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