DeferredRenderer 1.0

Application Class Reference

the main re-sizable window which contains the GLWidget More...

#include <Application.h>

Collaboration diagram for Application:

List of all members.

Public Member Functions

 Application (QWidget *parent=0)
 ctor for the application
 ~Application ()
 dtor

Private Member Functions

void keyPressEvent (QKeyEvent *)
 input response for key presses

Private Attributes

Ui::Application * m_ui
 the UI
GLWindowm_gl
 our opengl window

Detailed Description

the main re-sizable window which contains the GLWidget

Definition at line 18 of file Application.h.


Constructor & Destructor Documentation

Application::Application ( QWidget *  parent = 0) [explicit]

ctor for the application

Parameters:
[in]parent

Definition at line 4 of file Application.cpp.

References m_gl, and m_ui.

                                        :
    QMainWindow(parent),
    m_ui(new Ui::Application)
{
    m_ui->setupUi(this);
    m_gl = new GLWindow(this);
    m_ui->s_ApplicationGridLayout->addWidget(m_gl,0,0,2,1);
    connect(m_ui->m_wireFrame,SIGNAL(toggled(bool)),m_gl,SLOT(toggleWireframe(bool)));
    connect(m_ui->m_showShadowMap,SIGNAL(toggled(bool)),m_gl,SLOT(toggleShadowMap(bool)));
    connect(m_ui->m_debug,SIGNAL(toggled(bool)),m_gl,SLOT(toggleDebug(bool)));

    connect(m_ui->m_turntable,SIGNAL(toggled(bool)),m_gl,SLOT(toggleTurntable(bool)));

    connect(m_ui->m_mainDisplayCB,SIGNAL(currentIndexChanged(int)),m_gl,SLOT(setMainDisplay(int)));
    connect(m_ui->m_kaSpin,SIGNAL(valueChanged(double)),m_gl,SLOT(setKa(double)));
    connect(m_ui->m_kdSpin,SIGNAL(valueChanged(double)),m_gl,SLOT(setKd(double)));
    connect(m_ui->m_dVecX,SIGNAL(valueChanged(double)),m_gl,SLOT(setDVecX(double)));
    connect(m_ui->m_dVecY,SIGNAL(valueChanged(double)),m_gl,SLOT(setDVecY(double)));
    connect(m_ui->m_dVecZ,SIGNAL(valueChanged(double)),m_gl,SLOT(setDVecZ(double)));

    connect(m_ui->m_ambientR,SIGNAL(valueChanged(double)),m_gl,SLOT(setAmbientColourR(double)));
    connect(m_ui->m_ambientG,SIGNAL(valueChanged(double)),m_gl,SLOT(setAmbientColourG(double)));
    connect(m_ui->m_ambientB,SIGNAL(valueChanged(double)),m_gl,SLOT(setAmbientColourB(double)));

    connect(m_ui->m_dirR,SIGNAL(valueChanged(double)),m_gl,SLOT(setDColourR(double)));
    connect(m_ui->m_dirG,SIGNAL(valueChanged(double)),m_gl,SLOT(setDColourG(double)));
    connect(m_ui->m_dirB,SIGNAL(valueChanged(double)),m_gl,SLOT(setDColourB(double)));

    connect(m_ui->m_Nbarrier,SIGNAL(valueChanged(double)),m_gl,SLOT(changeNormBarrier(double)));
    connect(m_ui->m_Zbarrier,SIGNAL(valueChanged(double)),m_gl,SLOT(changeDepthBarrier(double)));
    connect(m_ui->m_Nweight,SIGNAL(valueChanged(double)),m_gl,SLOT(changeNormWeight(double)));
    connect(m_ui->m_Zweight,SIGNAL(valueChanged(double)),m_gl,SLOT(changeDepthWeight(double)));
    connect(m_ui->m_kernel,SIGNAL(valueChanged(double)),m_gl,SLOT(changeKernel(double)));
}
Application::~Application ( )

dtor

Definition at line 52 of file Application.cpp.

References m_ui.

{
    delete m_ui;
}

Member Function Documentation

void Application::keyPressEvent ( QKeyEvent *  _event) [private]

input response for key presses

Parameters:
QKeyEventpointer for retrieving the event info

Definition at line 39 of file Application.cpp.

References m_gl, and GLWindow::processKeyPress().

{
  switch (_event->key())
  {
  case Qt::Key_Escape : QApplication::exit(EXIT_SUCCESS); break;
  default : break;
  }

  m_gl->processKeyPress(_event);
}

Here is the call graph for this function:


Member Data Documentation

our opengl window

Definition at line 40 of file Application.h.

Ui::Application* Application::m_ui [private]

the UI

Definition at line 37 of file Application.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Defines