Engauge Digitizer  2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Signals | Public Member Functions | List of all members
WindowTable Class Reference

Table view class with support for both drag-and-drop and copy-and-paste. More...

#include <WindowTable.h>

Inheritance diagram for WindowTable:
Inheritance graph
Collaboration diagram for WindowTable:
Collaboration graph

Signals

void signalTableStatusChange ()
 Sent when a change occurs that should affect the Copy menu item. More...
 

Public Member Functions

 WindowTable (WindowModelBase &model)
 Single constructor. More...
 
 ~WindowTable ()
 
virtual void focusInEvent (QFocusEvent *)
 Catch this table status change. More...
 
virtual void focusOutEvent (QFocusEvent *)
 Catch this table status change. More...
 
virtual void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected)
 Catch this table status change. More...
 

Detailed Description

Table view class with support for both drag-and-drop and copy-and-paste.

Definition at line 17 of file WindowTable.h.

Constructor & Destructor Documentation

WindowTable::WindowTable ( WindowModelBase model)

Single constructor.

Definition at line 23 of file WindowTable.cpp.

24 {
25  horizontalHeader()->setStretchLastSection (true);
26  setModel (&model);
27  setSelectionMode (SELECTION_MODE);
28  // setDragEnabled (true); This is set later from MainWindowModel
29  setDragDropMode (QAbstractItemView::DragOnly);
30  horizontalHeader()->hide();
31  verticalHeader()->hide();
32  setEditTriggers (QAbstractItemView::NoEditTriggers); // Control is read only
33 
34  // No WhatsThis text is needed since this table is within a dockable widget that has the same WhatsThis text for
35  // a click anywhere in that widget
36 
37  // Connect model to view so model can access the current selection
38  model.setView (*this);
39 }
const QAbstractItemView::SelectionMode SELECTION_MODE
Definition: WindowTable.cpp:21
void setView(WindowTable &view)
Save the view so this class can access the current selection.
WindowTable::~WindowTable ( )

Definition at line 41 of file WindowTable.cpp.

42 {
43 }

Member Function Documentation

void WindowTable::focusInEvent ( QFocusEvent *  event)
virtual

Catch this table status change.

Definition at line 45 of file WindowTable.cpp.

46 {
47  QTableView::focusInEvent (event);
48 
50 }
void signalTableStatusChange()
Sent when a change occurs that should affect the Copy menu item.
void WindowTable::focusOutEvent ( QFocusEvent *  event)
virtual

Catch this table status change.

Definition at line 52 of file WindowTable.cpp.

53 {
54  QTableView::focusOutEvent (event);
55 
57 }
void signalTableStatusChange()
Sent when a change occurs that should affect the Copy menu item.
void WindowTable::selectionChanged ( const QItemSelection &  selected,
const QItemSelection &  deselected 
)
virtual

Catch this table status change.

Definition at line 59 of file WindowTable.cpp.

61 {
62  QTableView::selectionChanged (selected,
63  deselected);
64 
66 }
void signalTableStatusChange()
Sent when a change occurs that should affect the Copy menu item.
void WindowTable::signalTableStatusChange ( )
signal

Sent when a change occurs that should affect the Copy menu item.


The documentation for this class was generated from the following files: