#ifndef SampleTable_h
#define SampleTable_h

#include <QTableWidget>

class QMenu;
class QAction;
class ButtonEditor;

// A SampleTable is used to display the samples for one button.
//
class SampleTable : public QTableWidget {

   Q_OBJECT

public:

   SampleTable(QWidget * parent = 0);

   SampleTable(int rows, int columns, QWidget * parent = 0);

   virtual
   ~SampleTable();

   void
   SetButtonEditor(ButtonEditor * new_button_editor);

protected slots:

   void
   customContextMenuRequested(const QPoint& pos);

private slots:

   void
   doSend();

   void
   doDelete();

private:

   QMenu *
   getContextMenu();

   void
   InitTable();

   QMenu * ctx_menu;
   QAction * send_act;
   QAction * delete_act;

   int  context_row;
   int  context_col;

   ButtonEditor * button_editor;
};

#endif // SampleTable_h
