Commit 18b9c234 authored by CALKA Maxime's avatar CALKA Maxime

Correct some Windows error on the tutorials

parent 016fa41c
......@@ -31,7 +31,7 @@
using namespace camitk;
#include <MyViewer.h>
#include <TextViewer.h>
#include <QMenuBar>
/** This program demonstrates how to build a CamiTK Application with only
......@@ -50,23 +50,23 @@ int main(int argc, char* argv[]) {
// create a camitk application
Application a("textviewer-tutorial", argc, argv);
// create a myViewer instance
auto* myViewer = new MyViewer();
// create a textViewer instance
auto* textViewer = new TextViewer();
// add myViewer to the main window
a.getMainWindow()->setCentralViewer(myViewer);
a.getMainWindow()->setCentralViewer(textViewer);
// get the open action
QAction* fileOpen = Application::getAction("Open")->getQAction();
// get the edit preferences action
QAction* editPreference = new QAction("&Edit Preferences...", a.getMainWindow());
a.getMainWindow()->connect(editPreference, SIGNAL(triggered()), myViewer, SLOT(editPreference()));
a.getMainWindow()->connect(editPreference, SIGNAL(triggered()), textViewer, SLOT(editPreference()));
// create menu
QMenu* simpleMenu = new QMenu("&Simple Menu");
simpleMenu->addAction(fileOpen);
simpleMenu->addAction(editPreference);
simpleMenu->addMenu(myViewer->getMenu()); // add the viewer menu
simpleMenu->addMenu(textViewer->getMenu()); // add the viewer menu
a.getMainWindow()->menuBar()->addMenu(simpleMenu);
// open an image volume
......
......@@ -27,6 +27,8 @@
#ifndef BITMAPVIEWER_H
#define BITMAPVIEWER_H
#include "BitmapViewerAPI.h"
#include <InteractiveViewer.h>
class QToolBar;
......@@ -35,7 +37,7 @@ class QToolBar;
* @brief
* InteractiveViewer specialized in 2D bitmap (images in jpeg, png...)
*/
class BitmapViewer : public camitk::InteractiveViewer {
class BITMAP_VIEWER_API BitmapViewer : public camitk::InteractiveViewer {
Q_OBJECT
public:
......
......@@ -34,6 +34,8 @@
// -- QT stuff
#include <QColor>
#include <QAction>
class QTextEdit;
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment