Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 202

Advertising
background image

KTD-S0057-I

Page 198 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


private:

void createActions ();

void createMenus ();

QSlider *createSlider (const char *changedSignal, const char *setterSlot);

void setPixmap (const QPixmap &pixmap);

QSize getSize ();

QWidget

*centralWidget;

QScrollArea

*glWidgetArea;

QScrollArea

*pixmapLabelArea;

GLWidget

*glWidget;

QLabel

*pixmapLabel;

QSlider

*xSlider;

QSlider

*ySlider;

QSlider

*zSlider;

QMenu

*fileMenu;

QMenu

*helpMenu;

QAction

*grabFrameBufferAct;

QAction

*renderIntoPixmapAct;

QAction

*clearPixmapAct;

QAction

*exitAct;

QAction

*aboutAct;

QAction

*aboutQtAct;

};

#endif


File mainwindow.cpp (header with Qt

TM

license see 'main.cpp'):

#include <QtGui/QtGui>

#include <QtOpenGL/QtOpenGL>

#include "glwidget.h"
#include "mainwindow.h"

MainWindow::MainWindow ()
{

centralWidget = new QWidget;

setCentralWidget

(centralWidget);

glWidget = new GLWidget;

pixmapLabel = new QLabel;

glWidgetArea = new QScrollArea;

glWidgetArea->setWidget

(glWidget);

glWidgetArea->setWidgetResizable

(true);

glWidgetArea->setHorizontalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
glWidgetArea->setVerticalScrollBarPolicy (Qt::ScrollBarAlwaysOff);
glWidgetArea->setSizePolicy

(QSizePolicy::Ignored, QSizePolicy::Ignored);

glWidgetArea->setMinimumSize (50, 50);

pixmapLabelArea = new QScrollArea;

pixmapLabelArea->setWidget

(pixmapLabel);

pixmapLabelArea->setSizePolicy

(QSizePolicy::Ignored, QSizePolicy::Ignored);

pixmapLabelArea->setMinimumSize (50, 50);

Advertising
This manual is related to the following products: