PageRenderTime 1324ms CodeModel.GetById 1310ms RepoModel.GetById 0ms app.codeStats 0ms

/clipboard.h

http://ewitool.googlecode.com/
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. #include <QListWidget>
  23. #include <QWidget>
  24. #include "ui_clipboardform.h"
  25. #include "ewi4000spatch.h"
  26. #include "patchexchange.h"
  27. /**
  28. @author Steve Merrony <merrony AT googlemail dOt com>
  29. */
  30. const QString CLIPBOARD_FILE = "/CLIPBOARD.CLP";
  31. const QString EXPORT_DIR = "/export";
  32. const int EXPORT_PATCH_NUM = 99;
  33. class Clipboard : public QWidget, private Ui::ClipboardForm
  34. {
  35. Q_OBJECT
  36. public:
  37. Clipboard( QString libraryLocation, patchExchange *main_epx, QWidget *parent = 0);
  38. ~Clipboard();
  39. public slots:
  40. void clearAll( );
  41. void load( );
  42. void save( );
  43. void appendItem( patch_t patch );
  44. void deleteItem();
  45. void renameItem();
  46. void viewHex();
  47. void exportToEPX();
  48. void exportToFile();
  49. void selectionChanged();
  50. bool onClipboard( QString pname );
  51. int count();
  52. QString getNameAt( int i );
  53. patch_t getPatchAt( int i );
  54. private:
  55. QString libraryLocation;
  56. QList<patch_t> clipboard_list;
  57. patchExchange *epx;
  58. };
  59. #endif