source: projects/punch-card/punch-card-editor/src/app/navigator.h @ 48

Last change on this file since 48 was 48, checked in by sven, 10 years ago
  • Fixed more bugs
  • Cardeditor is now capable of writing text live using Codecs
  • Toolbars for Cardeditor, Codec changing menu
  • etc...
File size: 1.5 KB
Line 
1#ifndef NAVIGATOR_H
2#define NAVIGATOR_H
3
4#include <QDockWidget>
5#include <QListView>
6#include <QAbstractListModel>
7#include <QVariant>
8#include <QList>
9#include <QSize>
10
11class Navigator;
12class DeckListView;
13
14#include "qpunchcard/deckmodel.h"
15#include "editorwindow.h"
16//#include "deckviewer.h"
17#include <QResizeEvent>
18#include <QDragEnterEvent>
19#include <QDragLeaveEvent>
20#include <QDropEvent>
21
22using namespace QPunchCard;
23
24/* TODO HIER:
25 *   - Bearbeiten ermoeglichen (also eigentlich
26 *     verschieben)
27 *
28 */
29class Navigator : public QDockWidget {
30        Q_OBJECT
31
32        EditorWindow* main;
33        DeckListView* view;
34        DeckModel* model;
35        friend class DeckModel;
36        friend class DeckListView;
37
38public:
39        Navigator(EditorWindow* parent);
40
41public slots:
42        void setCard(DeckIndex i);
43
44signals:
45        void cardSelected(DeckIndex i);
46
47private slots:
48        void cardSelected_translator(const QModelIndex& i) {
49                qDebug("Karte i angeklickt: r=%d, c=%d", i.row(), i.column());
50                emit cardSelected(i.row());
51        }
52
53        void setFlowOnLocationChange(Qt::DockWidgetArea new_area);
54
55protected:
56        void resizeEvent(QResizeEvent* event);
57};
58
59class DeckListView : public QListView {
60        Q_OBJECT
61
62        Navigator* navigator;
63public:
64        //static const QString item_mime_type = "binary/x-punch-card";
65
66        DeckListView(Navigator* navigator);
67protected:
68        void dragEnterEvent(QDragEnterEvent *event);
69        void dragMoveEvent(QDragMoveEvent *event);
70        void dropEvent(QDropEvent *event);
71        void startDrag(Qt::DropActions supportedActions);
72};
73
74#endif // NAVIGATOR_H
Note: See TracBrowser for help on using the repository browser.
© 2008 - 2013 technikum29 • Sven Köppel • Some rights reserved
Powered by Trac
Expect where otherwise noted, content on this site is licensed under a Creative Commons 3.0 License