Click here to Skip to main content
15,881,281 members
Articles / Desktop Programming / MFC

Writing a Platform and GUI Toolkit Independent OpenGL Class

Rate me:
Please Sign up or sign in to vote.
4.92/5 (33 votes)
1 Nov 2010CPOL13 min read 96.6K   7.5K   89  
Article showing how to write OS and GUI toolkit portable OpenGL view class
/********************************************************************************
** Form generated from reading UI file 'glviewqtapp.ui'
**
** Created: Sat Oct 23 13:36:43 2010
**      by: Qt User Interface Compiler version 4.6.3
**
** WARNING! All changes made in this file will be lost when recompiling UI file!
********************************************************************************/

#ifndef UI_GLVIEWQTAPP_H
#define UI_GLVIEWQTAPP_H

#include <QtCore/QVariant>
#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QGridLayout>
#include <QtGui/QHeaderView>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QStatusBar>
#include <QtGui/QToolBar>
#include <QtGui/QWidget>
#include "glframe.h"

QT_BEGIN_NAMESPACE

class Ui_GLViewQtAppClass
{
public:
    QAction *actionExit;
    QWidget *centralWidget;
    QGridLayout *gridLayout;
    GLFrame *glFrame;
    QMenuBar *menuBar;
    QMenu *menuFile;
    QToolBar *mainToolBar;
    QStatusBar *statusBar;

    void setupUi(QMainWindow *GLViewQtAppClass)
    {
        if (GLViewQtAppClass->objectName().isEmpty())
            GLViewQtAppClass->setObjectName(QString::fromUtf8("GLViewQtAppClass"));
        GLViewQtAppClass->resize(600, 400);
        actionExit = new QAction(GLViewQtAppClass);
        actionExit->setObjectName(QString::fromUtf8("actionExit"));
        centralWidget = new QWidget(GLViewQtAppClass);
        centralWidget->setObjectName(QString::fromUtf8("centralWidget"));
        gridLayout = new QGridLayout(centralWidget);
        gridLayout->setSpacing(6);
        gridLayout->setContentsMargins(11, 11, 11, 11);
        gridLayout->setObjectName(QString::fromUtf8("gridLayout"));
        glFrame = new GLFrame(centralWidget);
        glFrame->setObjectName(QString::fromUtf8("glFrame"));

        gridLayout->addWidget(glFrame, 0, 0, 1, 1);

        GLViewQtAppClass->setCentralWidget(centralWidget);
        menuBar = new QMenuBar(GLViewQtAppClass);
        menuBar->setObjectName(QString::fromUtf8("menuBar"));
        menuBar->setGeometry(QRect(0, 0, 600, 21));
        menuFile = new QMenu(menuBar);
        menuFile->setObjectName(QString::fromUtf8("menuFile"));
        GLViewQtAppClass->setMenuBar(menuBar);
        mainToolBar = new QToolBar(GLViewQtAppClass);
        mainToolBar->setObjectName(QString::fromUtf8("mainToolBar"));
        GLViewQtAppClass->addToolBar(Qt::TopToolBarArea, mainToolBar);
        statusBar = new QStatusBar(GLViewQtAppClass);
        statusBar->setObjectName(QString::fromUtf8("statusBar"));
        GLViewQtAppClass->setStatusBar(statusBar);

        menuBar->addAction(menuFile->menuAction());
        menuFile->addAction(actionExit);

        retranslateUi(GLViewQtAppClass);

        QMetaObject::connectSlotsByName(GLViewQtAppClass);
    } // setupUi

    void retranslateUi(QMainWindow *GLViewQtAppClass)
    {
        GLViewQtAppClass->setWindowTitle(QApplication::translate("GLViewQtAppClass", "GLView Test Qt Application", 0, QApplication::UnicodeUTF8));
        actionExit->setText(QApplication::translate("GLViewQtAppClass", "Exit", 0, QApplication::UnicodeUTF8));
        menuFile->setTitle(QApplication::translate("GLViewQtAppClass", "File", 0, QApplication::UnicodeUTF8));
    } // retranslateUi

};

namespace Ui {
    class GLViewQtAppClass: public Ui_GLViewQtAppClass {};
} // namespace Ui

QT_END_NAMESPACE

#endif // UI_GLVIEWQTAPP_H

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Product Manager Mahindra & Mahindra
India India
Sharjith is a Mechanical Engineer with strong passion for Automobiles, Aircrafts and Software development.

Comments and Discussions