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

first import from 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/rfinp-b-sr.cpp \
src/main.cpp
HEADERS += src/rfinp-b-sr.h
FORMS = src/rfinp-b-sr.ui
TARGET = bin/rfinp-b-sr-gui
File added
/***************************************************************************
* 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. *
***************************************************************************/
#define CVSVERSION "$Name: $"
#include <TApplication>
#include "rfinp.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 ) {
TApplication a( argc, argv );
/* uncomment to set application color */
a.setPalette(EPalette("elettra"));
TUtil::instance()->setLoggingTarget(argv[0]);
RFInp mw;
QString title("rfinp");
if (a.arguments().size() > 1)
title = a.arguments()[1].split('/').last(); /* solo il member */
mw.setWindowTitle(title);
TUtil::replaceWildcards(mw.children(), a.arguments());
mw.show();
QString version(CVSVERSION);
a.setApplicationVersion(version);
/* 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 "rfinp.h"
#include <qtango.h>
#include <elettracolors.h>
#include <TLogDialog>
#define LITTLEW 328
#define LITTLEH 450
#define BIGW 650
#define BIGH 720
RFInp::RFInp(QWidget *parent) : QWidget(parent)
{
ui.setupUi(this);
QList<unsigned int> mask;
mask << 0 << 1;
ui.tTablePhSearchStat->setDisplayMask(mask);
ui.tTablePhSearchStat->setBooleanDisplay(0, "Stopped", "searching", EColor(Elettra::gray), EColor(Elettra::gray));
ui.tTablePhSearchStat->setBooleanDisplay(1, "-", "Error", EColor(Elettra::white), EColor(Elettra::red));
}
RFInp::~RFInp()
{
}
/***************************************************************************
* 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 rfinp_H
#define rfinp_H
#include "ui_rfinp.h"
class RFInp: public QWidget
{
Q_OBJECT
public:
RFInp(QWidget * =NULL);
~RFInp();
private:
Ui::RFInp ui;
};
#endif
<ui version="4.0" >
<class>RFInp</class>
<widget class="QWidget" name="RFInp" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>387</width>
<height>397</height>
</rect>
</property>
<property name="windowTitle" >
<string>RFINP</string>
</property>
<layout class="QVBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QGroupBox" name="groupBox_2" >
<property name="title" >
<string>SR Phase Shifter</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="topMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>4</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item rowspan="3" row="0" column="1" >
<widget class="QGroupBox" name="groupBoxPhase" >
<property name="sizePolicy" >
<sizepolicy vsizetype="Preferred" hsizetype="Preferred" >
<horstretch>1</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title" >
<string>Phase</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>4</number>
</property>
<property name="topMargin" >
<number>4</number>
</property>
<property name="rightMargin" >
<number>4</number>
</property>
<property name="bottomMargin" >
<number>4</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="0" column="1" >
<widget class="TLabel" name="tLabelPhase" >
<property name="source" >
<string>sr/rf/mps_a5.1/Phase</string>
</property>
</widget>
</item>
<item row="1" column="1" >
<widget class="TApplyNumeric" name="tApplyNumeric" >
<property name="maximumSize" >
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="targets" >
<string>sr/rf/mps_a5.1/Phase</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="QLabel" name="label" >
<property name="text" >
<string>Read value:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="QLabel" name="label_2" >
<property name="text" >
<string>Set Phase:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0" >
<spacer>
<property name="orientation" >
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="0" >
<widget class="TPushButton" name="tPushButtonReset" >
<property name="text" >
<string>Reset</string>
</property>
<property name="targets" >
<string>sr/rf/mps_a5.1->Reset</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="TPushButton" name="tPushButtonAbortMPS" >
<property name="text" >
<string>Abort</string>
</property>
<property name="targets" >
<string>sr/rf/mps_a5.1->Abort</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2" >
<widget class="TLabel" name="tLabel" >
<property name="source" >
<string>sr/rf/mps_a5.1/Status</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox" >
<property name="title" >
<string>Phase Search</string>
</property>
<layout class="QGridLayout" >
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<property name="horizontalSpacing" >
<number>6</number>
</property>
<property name="verticalSpacing" >
<number>6</number>
</property>
<item row="2" column="0" colspan="2" >
<widget class="TLabel" name="tLabel_2" >
<property name="source" >
<string>sr/rf/phsearch_a5.1->GetMessage</string>
</property>
</widget>
</item>
<item rowspan="2" row="0" column="1" >
<widget class="TTable" name="tTablePhSearchStat" >
<property name="numRows" >
<number>2</number>
</property>
<property name="numColumns" >
<number>1</number>
</property>
<property name="trueColors" >
<string>4284344910;4284344910</string>
</property>
<property name="falseColors" >
<string>4293342999;4293342999</string>
</property>
<property name="trueStrings" >
<string>One;One</string>
</property>
<property name="falseStrings" >
<string>Zero;Zero</string>
</property>
<property name="displayMask" >
<string>0,1</string>
</property>
<property name="source" >
<string>sr/rf/phsearch_a5.1/Stat</string>
</property>
</widget>
</item>
<item row="1" column="0" >
<widget class="TPushButton" name="tPushButtonAbortSearch_2" >
<property name="text" >
<string>Stop Searching</string>
</property>
<property name="targets" >
<string>sr/rf/phsearch_a5.1->StopSearch</string>
</property>
</widget>
</item>
<item row="0" column="0" >
<widget class="TPushButton" name="tPushButtonSearch_2" >
<property name="text" >
<string>Search</string>
</property>
<property name="targets" >
<string>sr/rf/phsearch_a5.1->StartSearch</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_3" >
<property name="title" >
<string>Phase Discriminator</string>
</property>
<layout class="QHBoxLayout" >
<property name="spacing" >
<number>6</number>
</property>
<property name="leftMargin" >
<number>9</number>
</property>
<property name="topMargin" >
<number>9</number>
</property>
<property name="rightMargin" >
<number>9</number>
</property>
<property name="bottomMargin" >
<number>9</number>
</property>
<item>
<widget class="QLabel" name="labelPhaseDiscriminator_2" >
<property name="text" >
<string>Phase Discriminator:</string>
</property>
<property name="alignment" >
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="TLabel" name="tLabel_3" >
<property name="source" >
<string>sr/rf/phdisc_a5.1/Volt</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>TLabel</class>
<extends>ELabel</extends>
<header>TLabel</header>
</customwidget>
<customwidget>
<class>TTable</class>
<extends>EFlag</extends>
<header>TTable</header>
</customwidget>
<customwidget>
<class>TApplyNumeric</class>
<extends>EApplyNumeric</extends>
<header>TApplyNumeric</header>
</customwidget>
<customwidget>
<class>TPushButton</class>
<extends>QPushButton</extends>
<header>TPushButton</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>
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