Commit 4081dfdc authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps : missing files

parent 9096488e
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CameraDialog</class>
<widget class="QDialog" name="CameraDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>232</width>
<height>430</height>
</rect>
</property>
<property name="windowTitle">
<string>CameraDialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="addCameraButton">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="removeCameraButton">
<property name="text">
<string>Remove</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QListWidget" name="cameraList"/>
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButton">
<property name="text">
<string>OK</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
#ifndef _CAMERAVIEWDIALOG_H_
#define _CAMERAVIEWDIALOG_H_
#include "ui_cameraViewDialog.h"
class Window;
class View;
class CameraViewDialog : public QDialog, Ui::CameraViewDialog
{
Q_OBJECT
public:
CameraViewDialog(Window* window, View* view);
~CameraViewDialog();
private:
Window* m_window;
View* m_view;
public slots:
void cb_selectedCameraChanged(QListWidgetItem* current, QListWidgetItem* previous);
};
#endif
#include "cameraViewDialog.h"
#include "window.h"
#include "view.h"
#include "camera.h"
#include <QMessageBox>
#include <QMouseEvent>
CameraViewDialog::CameraViewDialog(Window* window, View* view) :
QDialog(window),
m_window(window),
m_view(view)
{
this->setupUi(this);
this->setWindowTitle(QString("Select camera for view ") + m_view->getName());
connect(cameraList, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)), this, SLOT(cb_selectedCameraChanged(QListWidgetItem*, QListWidgetItem*)));
QList<Camera*> cameras = m_window->getCamerasList();
foreach(Camera* c, cameras)
cameraList->addItem(c->getName());
}
CameraViewDialog::~CameraViewDialog()
{}
void CameraViewDialog::cb_selectedCameraChanged(QListWidgetItem* current, QListWidgetItem* previous)
{
const QString& cname = current->text();
Camera* c = m_window->getCamera(cname);
m_view->setCurrentCamera(c);
}
Markdown is supported
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