Update CREDITS.txt
[opentx.git] / companion / src / modeledit / mixes.h
blobc2dd54bc28c65a9cc325d515070084c0dc406b84
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #ifndef _MIXES_H_
22 #define _MIXES_H_
24 #include "modeledit.h"
25 #include "mixerslistwidget.h"
26 #include "mixerdialog.h"
27 #include "modelprinter.h"
29 class MixesPanel : public ModelPanel
31 Q_OBJECT
33 public:
34 MixesPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware);
35 virtual ~MixesPanel();
37 virtual void update();
39 private slots:
40 // TODO all slots?
41 void clearMixes();
42 void mixersDelete(bool ask=true);
43 void mixersCut();
44 void mixersCopy();
45 void mixersPaste();
46 void mixersDuplicate();
47 void mixerOpen();
48 void mixerAdd();
49 void moveMixUp();
50 void moveMixDown();
51 void mixerHighlight();
54 void mixerlistWidget_customContextMenuRequested(QPoint pos);
55 void mixerlistWidget_doubleClicked(QModelIndex index);
56 void mixerlistWidget_KeyPress(QKeyEvent *event);
58 void mimeMixerDropped(int index, const QMimeData *data, Qt::DropAction action);
59 void pasteMixerMimeData(const QMimeData * mimeData, int destIdx);
61 private:
62 MixersListWidget * mixersListWidget;
63 bool mixInserted;
64 unsigned int highlightedSource;
65 ModelPrinter modelPrinter;
67 int getMixerIndex(unsigned int dch);
68 bool gm_insertMix(int idx);
69 void gm_deleteMix(int index);
70 void gm_openMix(int index);
71 int gm_moveMix(int idx, bool dir);
72 void mixersDeleteList(QList<int> list);
73 QList<int> createMixListFromSelected();
74 void setSelectedByMixList(QList<int> list);
75 bool AddMixerLine(int dest);
76 QString getMixerText(int dest, bool * new_ch);
79 #endif // _MIXES_H_