Exemplo n.º 1
0
AddDeviceToTimerDlg::AddDeviceToTimerDlg(QWidget *parent, QList<InsteonDevice> deviceList)
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
    m_deviceList = deviceList;
    layoutWindow();
    setWindowTitle("Add device");
}
Exemplo n.º 2
0
RTAutomationManager::RTAutomationManager()
    : QMainWindow()
{
    ui.setupUi(this);

    layoutWindow();

    m_dialog = NULL;

    m_client = new ManagerClient();

    connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(close()));

    connect(m_client, SIGNAL(clientConnected()), this, SLOT(clientConnected()));
    connect(m_client, SIGNAL(clientDisconnected()), this, SLOT(clientDisconnected()));
    connect(this, SIGNAL(clientRestart()), m_client, SLOT(clientRestart()));
    connect(this, SIGNAL(clientEnable(bool)), m_client, SLOT(clientEnable(bool)));

    m_client->resumeThread();

    restoreWindowState();
    initStatusBar();

    setWindowTitle(RTAutomationArgs::getAppName());
}
Exemplo n.º 3
0
StreamDialog::StreamDialog(QWidget *parent, QStringList directory, QStringList currentStreams) 
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
	m_currentStreams = currentStreams;

	parseAvailableServices(directory);

	layoutWindow();

	connect(m_addButton, SIGNAL(clicked()), this, SLOT(onAddStreams()));
	connect(m_removeButton, SIGNAL(clicked()), this, SLOT(onRemoveStreams()));

	connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept()));
	connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

	connect(m_upButton, SIGNAL(clicked()), this, SLOT(onMoveUp()));
	connect(m_downButton, SIGNAL(clicked()), this, SLOT(onMoveDown()));

	connect(m_currentList, SIGNAL(itemSelectionChanged()), this, SLOT(onCurrentStreamsSelectionChanged()));
 
	m_upButton->setEnabled(false);
	m_downButton->setEnabled(false);

	setWindowTitle("Video Stream Selection");
} 
Exemplo n.º 4
0
ConfigureDlg::ConfigureDlg(QWidget *parent)
    : QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
    layoutWindow();
    setWindowTitle("Configure RTControllerMQTT");
    connect(m_buttons, SIGNAL(accepted()), this, SLOT(saveData()));
    connect(m_buttons, SIGNAL(rejected()), this, SLOT(reject()));
}
Exemplo n.º 5
0
CameraDlg::CameraDlg(QWidget *parent)
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
	layoutWindow();
	setWindowTitle("Camera configuration");
	connect(m_buttons, SIGNAL(accepted()), this, SLOT(onOk()));
	connect(m_buttons, SIGNAL(rejected()), this, SLOT(reject()));
}
Exemplo n.º 6
0
SelectFusionDlg::SelectFusionDlg(RTIMUSettings *settings, QWidget *parent)
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
    m_settings = settings;
	layoutWindow();
    setWindowTitle("Select Fusion algorithm");
	connect(m_buttons, SIGNAL(accepted()), this, SLOT(onOk()));
    connect(m_buttons, SIGNAL(rejected()), this, SLOT(onCancel()));
 }
Exemplo n.º 7
0
QColorCheck::QColorCheck(QWidget *parent)
	: QMainWindow(parent)
{
	m_timeout = DEFAULT_TIMEOUT_SECONDS;

	layoutWindow();

	startTimer(1000);
}
Exemplo n.º 8
0
SerialPortDlg::SerialPortDlg(QWidget *parent, QSettings *settings)
	: QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint), m_settings(settings)
{
	layoutWindow();
	connect(m_okBtn, SIGNAL(clicked()), this, SLOT(onOK()));
	connect(m_cancelBtn, SIGNAL(clicked()), this, SLOT(onCancel()));

	setWindowTitle("Configure Gateway");
}
Exemplo n.º 9
0
DirectoryDialog::DirectoryDialog(QWidget *parent)
	: QDialog(parent)
{
	m_logTag = "DirectoryDialog";
	hide();
	layoutWindow();
	setWindowTitle("SyntroControl directory");
	m_currentDirIndex = -1;
	m_currentItem = NULL;
}
Exemplo n.º 10
0
SelectPSDlg::SelectPSDlg(RTIMUSettings *settings, QWidget *parent)
    : QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
    m_settings = settings;
    layoutWindow();
    setWindowTitle("Select Pressure sensor");
    connect(m_buttons, SIGNAL(accepted()), this, SLOT(onOk()));
    connect(m_buttons, SIGNAL(rejected()), this, SLOT(onCancel()));
    connect(m_selectPS, SIGNAL(currentIndexChanged(int)), this, SLOT(setSelectAddress(int)));
    connect(m_selectBus, SIGNAL(currentIndexChanged(int)), this, SLOT(setSelectAddress(int)));
}
Exemplo n.º 11
0
MainWindow::MainWindow(QApplication *_app)
{
	app = _app;

	window = 0;
	readSettings();
	layoutWindow();

	splitterDialog = new SplitterDialog( this );

}
Exemplo n.º 12
0
SerialDlg::SerialDlg(QWidget *parent, QString *portName) 
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
	m_portName = portName;
	layoutWindow();

	connect(m_okButton, SIGNAL(clicked()), this, SLOT(onOK()));
	connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));

	setWindowTitle("Select serial port");
} 
Exemplo n.º 13
0
SetInsteonLevelDlg::SetInsteonLevelDlg(QWidget *parent, int deviceID, QString name, int level) 
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
	layoutWindow(deviceID, name, level);

	connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept()));
	connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
    connect(m_on, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
    connect(m_off, SIGNAL(clicked(bool)), this, SLOT(offClicked(bool)));

	setWindowTitle("Set Level");
} 
Exemplo n.º 14
0
CompassCalDlg::CompassCalDlg(QWidget *parent)
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
	layoutWindow();
    setWindowTitle("Compass calibration");
	connect(m_buttons, SIGNAL(accepted()), this, SLOT(onOk()));
    connect(m_buttons, SIGNAL(rejected()), this, SLOT(onCancel()));

    m_timer = startTimer(100);

    m_compassMin = RTVector3(10000, 10000, 10000);
    m_compassMax = RTVector3(-10000, -10000, -10000);
}
Exemplo n.º 15
0
SetInsteonLevelDlg::SetInsteonLevelDlg(QWidget *parent, QString name, int level)
	: QDialog(parent, Qt::WindowCloseButtonHint | Qt::WindowTitleHint)
{
    m_parentWidth = parent->width();
    m_parentHeight = parent->height();
    layoutWindow(name, level);
#if defined(Q_OS_IOS) || defined(Q_OS_ANDROID)
    setWindowState(Qt::WindowFullScreen);
#endif

	connect(m_okButton, SIGNAL(clicked()), this, SLOT(accept()));
	connect(m_cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
    connect(m_on, SIGNAL(clicked(bool)), this, SLOT(onClicked(bool)));
    connect(m_off, SIGNAL(clicked(bool)), this, SLOT(offClicked(bool)));
    connect(m_level, SIGNAL(valueChanged(int)), this, SLOT(valueChanged(int)));
} 
Exemplo n.º 16
0
RTIMULibDemo::RTIMULibDemo()
    : QMainWindow()
{
    //  This is some normal Qt GUI stuff

    ui.setupUi(this);

    layoutWindow();
    layoutStatusBar();

    //  This code connects up signals from the GUI

    connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(close()));
    connect(ui.actionSelectFusionAlgorithm, SIGNAL(triggered()), this, SLOT(onSelectFusionAlgorithm()));
    connect(ui.actionCalibrateAccelerometers, SIGNAL(triggered()), this, SLOT(onCalibrateAccelerometers()));
    connect(ui.actionCalibrateMagnetometers, SIGNAL(triggered()), this, SLOT(onCalibrateMagnetometers()));
    connect(ui.actionSelectIMU, SIGNAL(triggered()), this, SLOT(onSelectIMU()));
    connect(m_enableGyro, SIGNAL(stateChanged(int)), this, SLOT(onEnableGyro(int)));
    connect(m_enableAccel, SIGNAL(stateChanged(int)), this, SLOT(onEnableAccel(int)));
    connect(m_enableCompass, SIGNAL(stateChanged(int)), this, SLOT(onEnableCompass(int)));
    connect(m_enableDebug, SIGNAL(stateChanged(int)), this, SLOT(onEnableDebug(int)));

    //  create the imu thread and connect up the signal

    m_imuThread = new IMUThread();

    connect(m_imuThread, SIGNAL(newIMUData(const RTIMU_DATA&)),
            this, SLOT(newIMUData(const RTIMU_DATA&)), Qt::DirectConnection);

    connect(this, SIGNAL(newIMU()), m_imuThread, SLOT(newIMU()));

    m_imuThread->resumeThread();

    //  This value allows a sample rate to be calculated

    m_sampleCount = 0;

    //  start some timers to get things going

    m_rateTimer = startTimer(RATE_TIMER_INTERVAL * 1000);

    //  Only update the display 10 times per second to keep CPU reasonable

    m_displayTimer = startTimer(100);

    m_fusionType->setText(RTFusion::fusionName(m_imuThread->getSettings()->m_fusionType));
}
Exemplo n.º 17
0
RTGPUTestBench::RTGPUTestBench(QWidget *parent)
	: QMainWindow(parent)
{
	ui.setupUi(this);

	m_thread = new RTGPUTestThread();
	m_thread->resumeThread();

	layoutWindow();

	connect(this, SIGNAL(startTest(RTGPU_SETTINGS *)), m_thread, SLOT(startTest(RTGPU_SETTINGS *)));
	connect(m_thread, SIGNAL(displayImage(QImage, int)), this, SLOT(displayImage(QImage, int)));
	connect(m_thread, SIGNAL(displayStatus(QString)), this, SLOT(displayStatus(QString)));

	connect(m_runOnce, SIGNAL(clicked()), this, SLOT(onRunOnce()));
	connect(m_runCont, SIGNAL(clicked()), this, SLOT(onRunCont()));
	connect(m_stopTest, SIGNAL(clicked()), this, SLOT(onStopTest()));
	connect(this, SIGNAL(stopTest()), m_thread, SLOT(stopTest()));
	
	connect(m_testSelect, SIGNAL(currentIndexChanged(int)), this, SLOT(onTestChanged(int)));
}
Exemplo n.º 18
0
bool CandidateWindowProxy::eventFilter(QObject *obj, QEvent *event)
{
    if (obj == window) {
        if (event->type() == QEvent::Move) {
            QWidget *widget = QApplication::focusWidget();
            if (widget) {
                QRect rect
                    = widget->inputMethodQuery(Qt::ImMicroFocus).toRect();
                QPoint p = widget->mapToGlobal(rect.topLeft());
                layoutWindow(p.x(), p.y(), rect.height());
            } else {
                QMoveEvent *moveEvent = static_cast<QMoveEvent *>(event);
                QPoint p = moveEvent->pos() - moveEvent->oldPos();
                execute("move_candwin\f" + QString::number(p.x()) + '\f'
                    + QString::number(p.y()));
            }
        }
        return false;
    }
    return QObject::eventFilter(obj, event);
}
Exemplo n.º 19
0
SyntroReview::SyntroReview(QWidget *parent)
	: QMainWindow(parent)
{
	ui.setupUi(this);

	layoutWindow();
	restoreWindowState();

	connect(ui.actionExit, SIGNAL(triggered()), this, SLOT(close()));
	connect(ui.actionAbout, SIGNAL(triggered()), this, SLOT(onAbout()));
	connect(m_slider, SIGNAL(sliderMoved(int)), this, SLOT(sliderMoved(int)));
	connect(ui.actionBasicSetup, SIGNAL(triggered()), this, SLOT(onBasicSetup()));
	connect(ui.actionCFSSelection, SIGNAL(triggered()), this, SLOT(onCFSSelection()));
	connect(ui.actionAudioSetup, SIGNAL(triggered()), this, SLOT(onAudioSetup()));
	ui.actionOpen->setEnabled(false);
	ui.actionClose->setEnabled(false);
	ui.actionCFSSelection->setEnabled(false);

	SyntroUtils::syntroAppInit();

	m_audioSize = -1;
	m_audioRate = -1;
	m_audioChannels = -1;

#if defined(Q_OS_OSX) || defined(Q_OS_WIN32)
		m_audioOut = NULL;
		m_audioOutDevice = NULL;
#else
		m_audioOutIsOpen = false;
#endif

    QSettings *settings = SyntroUtils::getSettings();

    settings->beginGroup(AUDIO_GROUP);

    if (!settings->contains(AUDIO_OUTPUT_DEVICE))

#ifdef Q_OS_OSX
        settings->setValue(AUDIO_OUTPUT_DEVICE, AUDIO_DEFAULT_DEVICE_MAC);
#else
#ifdef Q_OS_LINUX
        settings->setValue(AUDIO_OUTPUT_DEVICE, 0);

    if (!settings->contains(AUDIO_OUTPUT_CARD))
        settings->setValue(AUDIO_OUTPUT_CARD, 0);
#else
        settings->setValue(AUDIO_OUTPUT_DEVICE, AUDIO_DEFAULT_DEVICE);
#endif
#endif
    if (!settings->contains(AUDIO_ENABLE))
        settings->setValue(AUDIO_ENABLE, true);

	m_audioEnabled = settings->value(AUDIO_ENABLE).toBool();

	settings->endGroup();
	delete settings;
	m_client = new ReviewClient(this);
	connect(ui.actionOpen, SIGNAL(triggered()), this, SLOT(onOpen()));
	connect(ui.actionClose, SIGNAL(triggered()), this, SLOT(onClose()));
	connect(m_client, SIGNAL(newDirectory(QStringList)), this, SLOT(newDirectory(QStringList)), Qt::QueuedConnection);
	connect(m_client, SIGNAL(showImage(QImage, QByteArray, unsigned int, QDateTime)), 
			this, SLOT(showImage(QImage, QByteArray, unsigned int, QDateTime)), Qt::QueuedConnection);
	connect(m_client, SIGNAL(newAudio(QByteArray, int, int, int)), this, SLOT(newAudio(QByteArray, int, int, int)));
	connect(m_client, SIGNAL(newCFSState(int)), this, SLOT(newCFSState(int)), Qt::QueuedConnection);
	connect(m_client, SIGNAL(newFileLength(unsigned int)), this, SLOT(newFileLength(unsigned int)), Qt::QueuedConnection);
	connect(this, SIGNAL(openFile(QString)), m_client, SLOT(openFile(QString)), Qt::QueuedConnection);
	connect(this, SIGNAL(closeFile()), m_client, SLOT(closeFile()), Qt::QueuedConnection);
	connect(this, SIGNAL(setPlayMode(int, bool)), m_client, SLOT(setPlayMode(int, bool)), Qt::QueuedConnection);
	connect(m_client, SIGNAL(newPlayMode(int)), this, SLOT(newPlayMode(int)), Qt::QueuedConnection);
	connect(this, SIGNAL(setFrameIndex(unsigned int, int, bool)), m_client, SLOT(setFrameIndex(unsigned int, int, bool)), Qt::QueuedConnection);

	connect(m_client, SIGNAL(dirResponse(QStringList)), this, SLOT(dirResponse(QStringList)));
	connect(this, SIGNAL(requestDir()), m_client, SLOT(requestDir()));
	connect(this, SIGNAL(newCFSList()), m_client, SLOT(newCFSList()));

	m_client->resumeThread();

	m_statusTimer = startTimer(2000);
	m_directoryTimer = startTimer(10000);

	setWindowTitle(QString("%1 - %2")
		.arg(SyntroUtils::getAppType())
		.arg(SyntroUtils::getAppName()));

	setDisabledPlayControls();
}
Exemplo n.º 20
0
TimerView::TimerView(QWidget *parent)
	: QTableWidget(parent)
{
	layoutWindow();
}