#include <QMainWindow>class Scene3D; class dbViewer; class QListWidget;class QToolBar;class QAction;class QTableWidget;class MainWindow : public QMainWindow{ Q_OBJECTpublic: MainWindow();private slots: void aboutSlot(); void checkPhotoSlot(); void informationSlot();private: void createToolBar(); void createActions(); void createStatusBar(); void createCheckPointList(); void createTableWidget(); enum { COLUMN = 2 }; QTableWidget *checkpointTable; QAction *exitAction; QAction *aboutAction; QAction *nextPhotoAction; QAction *previousPhotoAction; QAction *checkerAction; QAction *informationAction; QToolBar *toolBar; Scene3D *view3D; dbViewer *viewChecker;};
#include <QtGui>#include "mainwindow.h"#include "dbViewer.h"#include "scene3D.h"#include "helpBrowser.h"MainWindow::MainWindow(){ QTextCodec::setCodecForCStrings(QTextCodec::codecForLocale()); view3D = new Scene3D; viewChecker = new dbViewer; setCentralWidget(view3D); setContextMenuPolicy(Qt::NoContextMenu); setGeometry(100, 100, 800, 600); createActions(); createToolBar(); createStatusBar(); createCheckPointList(); connect(checkpointTable, SIGNAL(cellDoubleClicked(int,int)), view3D, SLOT(getPhoto(int,int)));}...
С UML раньше не имел дело, но теперь понадобилось.
class QToolBar;class MainWindow : public QMainWindow{ Q_OBJECTpublic: MainWindow();private: QToolBar *toolBar; };
...