/clipboard.h
C++ Header | 67 lines | 37 code | 8 blank | 22 comment | 0 complexity | 805f1b8cd5b7434a3eb16f1a85087684 MD5 | raw file
1/*************************************************************************** 2 * Copyright (C) 2008 by Steve Merrony * 3 * steve@brahma * 4 * * 5 * This program is free software; you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation; either version 3 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program; if not, write to the * 17 * Free Software Foundation, Inc., * 18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 19 ***************************************************************************/ 20#ifndef CLIPBOARD_H 21#define CLIPBOARD_H 22 23#include <QListWidget> 24#include <QWidget> 25 26#include "ui_clipboardform.h" 27 28#include "ewi4000spatch.h" 29#include "patchexchange.h" 30 31/** 32 @author Steve Merrony <merrony AT googlemail dOt com> 33*/ 34 35const QString CLIPBOARD_FILE = "/CLIPBOARD.CLP"; 36const QString EXPORT_DIR = "/export"; 37const int EXPORT_PATCH_NUM = 99; 38 39class Clipboard : public QWidget, private Ui::ClipboardForm 40{ 41Q_OBJECT 42public: 43 Clipboard( QString libraryLocation, patchExchange *main_epx, QWidget *parent = 0); 44 ~Clipboard(); 45public slots: 46 void clearAll( ); 47 void load( ); 48 void save( ); 49 void appendItem( patch_t patch ); 50 void deleteItem(); 51 void renameItem(); 52 void viewHex(); 53 void exportToEPX(); 54 void exportToFile(); 55 void selectionChanged(); 56 bool onClipboard( QString pname ); 57 int count(); 58 QString getNameAt( int i ); 59 patch_t getPatchAt( int i ); 60 61private: 62 QString libraryLocation; 63 QList<patch_t> clipboard_list; 64 patchExchange *epx; 65}; 66 67#endif