mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-12 00:08:38 -05:00
More header file public methods comments
This commit is contained in:
@@ -45,12 +45,34 @@
|
||||
class Display : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Constructor for Display class, which manages the overall control layout including
|
||||
* monitorBox, multiple WindowControl columns, and additional controls
|
||||
*
|
||||
* \param monitorRenderBox pointer to the MonitorBox object
|
||||
* \param monitorSizeList A vector containing QRect objects containing pixel dims
|
||||
* of each monitor
|
||||
* \param nMaxWindows The maximum number of windows allowed (depends on the number
|
||||
* of monitors in the system)
|
||||
* \param winColors An array of QColor objects for window colors. The indexing of
|
||||
* this array matches the window indexing used elsewhere in the
|
||||
* class. This allows for a unique color for each window.
|
||||
*/
|
||||
Display(std::shared_ptr<MonitorBox> monitorRenderBox,
|
||||
std::vector<QRect>& monitorSizeList, unsigned int nMaxWindows,
|
||||
const std::array<QColor, 4>& winColors);
|
||||
/**
|
||||
* Returns a vector of pointers to all WindowControl objects for all windows
|
||||
*
|
||||
* \return vector of pointers of WindowControl objects
|
||||
*/
|
||||
std::vector<std::shared_ptr<WindowControl>> windowControls() const;
|
||||
/**
|
||||
* Returns the current number of windows
|
||||
*
|
||||
* \return the currently-selected number of windows in unsigned int
|
||||
*/
|
||||
unsigned int nWindows() const;
|
||||
void uncheckWebGuiOptions();
|
||||
|
||||
private slots:
|
||||
void addWindow();
|
||||
|
||||
@@ -37,9 +37,37 @@
|
||||
class Orientation : public QWidget {
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Constructor for Orientation class, which manages the overall control layout including
|
||||
* monitorBox, multiple WindowControl columns, and additional controls
|
||||
*
|
||||
* \param monitorRenderBox pointer to the MonitorBox object
|
||||
* \param monitorSizeList A vector containing QRect objects containing pixel dims
|
||||
* of each monitor
|
||||
* \param nMaxWindows The maximum number of windows allowed (depends on the number
|
||||
* of monitors in the system)
|
||||
* \param winColors An array of QColor objects for window colors. The indexing of
|
||||
* this array matches the window indexing used elsewhere in the
|
||||
* class. This allows for a unique color for each window.
|
||||
*/
|
||||
Orientation();
|
||||
void addButtonToLayout(QVBoxLayout* parentLayout);
|
||||
/**
|
||||
* Add Orientation controls to the parent layout
|
||||
*
|
||||
* \param parentLayout the layout to which the Orientation's controls will be added
|
||||
*/
|
||||
void addControlsToParentLayout(QVBoxLayout* parentLayout);
|
||||
/**
|
||||
* Gets the user-provided x,y,z orientation values (degrees)
|
||||
*
|
||||
* \return the orientation angles provided in sgct::quat object
|
||||
*/
|
||||
sgct::quat orientationValue() const;
|
||||
/**
|
||||
* Gets the value for if VSync is enabled
|
||||
*
|
||||
* \return true if the VSync option is checked/enabled
|
||||
*/
|
||||
bool vsyncValue() const;
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -36,6 +36,13 @@ class QWidget;
|
||||
class OrientationDialog : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Constructor for OrientationDialog object which contains the input text boxes for
|
||||
* orientation x,y,z values
|
||||
*
|
||||
* \param orientation x,y,z angles in degrees contained in sgct::quat object
|
||||
* \param parent pointer to Qt QWidget parent object
|
||||
*/
|
||||
OrientationDialog(sgct::quat& orientation, QWidget* parent);
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -45,15 +45,38 @@ class SgctEdit final : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
/**
|
||||
* Constructor for SgctEdit class, the underlying class for the full window
|
||||
* configuration editor
|
||||
*
|
||||
* \param parent The Qt QWidget parent object
|
||||
* \param windowList vector of sgct::config::Window objects which will be modified
|
||||
* by the user settings, and then used for writing to file in
|
||||
* the launcher code
|
||||
* \param cluster reference to sgct::config::Cluster object that contains sgct
|
||||
* objects that will be modified by the window configuration settings
|
||||
* \param screenList A QList containing a QScreen object for each monitor in the
|
||||
* system
|
||||
*/
|
||||
SgctEdit(QWidget* parent, std::vector<sgct::config::Window>& windowList,
|
||||
sgct::config::Cluster& cluster, const QList<QScreen*>& screenList);
|
||||
~SgctEdit();
|
||||
void addDisplayLayout(QHBoxLayout* layout);
|
||||
void createWidgets();
|
||||
/**
|
||||
* Used to determine if the window configuration was saved to file, or canceled
|
||||
*
|
||||
* \return true if configuration was saved to file
|
||||
*/
|
||||
bool wasSaved() const;
|
||||
/**
|
||||
* Returns the saved filename
|
||||
*
|
||||
* \return saved filename in std::string
|
||||
*/
|
||||
std::string saveFilename();
|
||||
|
||||
private:
|
||||
void addDisplayLayout(QHBoxLayout* layout);
|
||||
void createWidgets();
|
||||
void systemMonitorConfiguration(const QList<QScreen*>& screenList);
|
||||
|
||||
std::shared_ptr<MonitorBox> _monBox = nullptr;
|
||||
|
||||
@@ -66,20 +66,94 @@ public:
|
||||
* WebGUI option selected
|
||||
*/
|
||||
void setWebGuiChangeCallback(std::function<void(unsigned int)> cb);
|
||||
/**
|
||||
* Makes the window label at top of a window control column visible
|
||||
*
|
||||
* \param bool Shows the window label if true
|
||||
*/
|
||||
void showWindowLabel(bool show);
|
||||
/**
|
||||
* Initializes the layout of a window controls column, returning the Qt layout object
|
||||
*
|
||||
* \return the QVBoxLayout object that contains the entire windows control column
|
||||
*/
|
||||
QVBoxLayout* initializeLayout();
|
||||
/**
|
||||
* Returns the dimensions of the window
|
||||
*
|
||||
* \return the QRectF object that contains the windows dimensions
|
||||
*/
|
||||
QRectF& dimensions();
|
||||
/**
|
||||
* Returns the title name of the window
|
||||
*
|
||||
* \return the std::string of the window name
|
||||
*/
|
||||
std::string windowName() const;
|
||||
/**
|
||||
* Returns the user-entered window size width, height from the text line objects
|
||||
*
|
||||
* \return the user-entered window size in sgct::ivec2 object
|
||||
*/
|
||||
sgct::ivec2 windowSize() const;
|
||||
/**
|
||||
* Returns the user-entered window position in x,y pixles from the text line objects
|
||||
*
|
||||
* \return the user-entered window position in sgct::ivec2 object
|
||||
*/
|
||||
sgct::ivec2 windowPos() const;
|
||||
/**
|
||||
* Returns bool for if the window control checkbox is set to be decorated
|
||||
*
|
||||
* \return bool for if window decoration is enabled
|
||||
*/
|
||||
bool isDecorated() const;
|
||||
/**
|
||||
* Returns bool for if the window control checkbox spout selection is enabled
|
||||
*
|
||||
* \return bool for if window has spout enabled
|
||||
*/
|
||||
bool isSpoutSelected() const;
|
||||
/**
|
||||
* Returns bool for if the window control checkbox for WebGUI is enabled
|
||||
*
|
||||
* \return bool for if window has WebGUI enabled
|
||||
*/
|
||||
bool isGuiWindow() const;
|
||||
/**
|
||||
* Function called in order to disable/uncheck the WebGUI checkbox option
|
||||
*/
|
||||
void uncheckWebGuiOption();
|
||||
/**
|
||||
* Returns index number of the selected window quality value. This is an index into
|
||||
* the QualityValues array
|
||||
*
|
||||
* \return index int into the QualityValues array
|
||||
*/
|
||||
int qualitySelectedValue() const;
|
||||
/**
|
||||
* Returns index number of the monitor that this window is assigned to
|
||||
*
|
||||
* \return int index of monitor
|
||||
*/
|
||||
unsigned int monitorNum() const;
|
||||
/**
|
||||
* Returns the user-entered horizontal field-of-view (planar projection only)
|
||||
*
|
||||
* \return float value of horizontal FOV
|
||||
*/
|
||||
float fovH() const;
|
||||
/**
|
||||
* Returns the user-entered vertical field-of-view (planar projection only)
|
||||
*
|
||||
* \return float value of vertical FOV
|
||||
*/
|
||||
float fovV() const;
|
||||
/**
|
||||
* Returns the user-entered height offset (cylindrical projection only)
|
||||
*
|
||||
* \return float value of height offset
|
||||
*/
|
||||
float heightOffset() const;
|
||||
enum class ProjectionIndeces {
|
||||
Planar = 0,
|
||||
@@ -88,6 +162,11 @@ public:
|
||||
Cylindrical,
|
||||
Equirectangular
|
||||
};
|
||||
/**
|
||||
* Returns the user-selected window projection type
|
||||
*
|
||||
* \return ProjectionIndeces enum of the projection type
|
||||
*/
|
||||
ProjectionIndeces projectionSelectedIndex() const;
|
||||
|
||||
private slots:
|
||||
|
||||
@@ -161,9 +161,3 @@ void Display::initializeWindowControl() {
|
||||
}
|
||||
}
|
||||
|
||||
void Display::uncheckWebGuiOptions() {
|
||||
for (std::shared_ptr<WindowControl> w : _windowControl) {
|
||||
w->uncheckWebGuiOption();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ Orientation::Orientation()
|
||||
}
|
||||
}
|
||||
|
||||
void Orientation::addButtonToLayout(QVBoxLayout* parentLayout) {
|
||||
void Orientation::addControlsToParentLayout(QVBoxLayout* parentLayout) {
|
||||
parentLayout->addLayout(_layoutOrientationFull);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ void SgctEdit::createWidgets() {
|
||||
}
|
||||
{
|
||||
layoutMainV->addLayout(layoutMainH);
|
||||
_orientationWidget->addButtonToLayout(layoutMainV);
|
||||
_orientationWidget->addControlsToParentLayout(layoutMainV);
|
||||
_fileSupportWidget = new FileSupport(
|
||||
layoutMainV,
|
||||
_monitorSizeList,
|
||||
|
||||
Reference in New Issue
Block a user