Fix X7 R9M power line not enabled (#5973)
[opentx.git] / companion / src / modeledit / inputs.h
blob939d0a647b9ec0d9e4b090b54eb46ae7a386f711
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 _INPUTS_H_
22 #define _INPUTS_H_
24 #include "modeledit.h"
25 #include "mixerslistwidget.h"
26 #include "modelprinter.h"
28 class InputsPanel : public ModelPanel
30 Q_OBJECT
32 public:
33 InputsPanel(QWidget *parent, ModelData & model, GeneralSettings & generalSettings, Firmware * firmware);
34 virtual ~InputsPanel();
36 virtual void update();
38 private slots:
39 void clearExpos();
40 void moveExpoList(bool down);
41 void moveExpoUp();
42 void moveExpoDown();
43 void mimeExpoDropped(int index, const QMimeData *data, Qt::DropAction action);
44 void expolistWidget_customContextMenuRequested(QPoint pos);
45 void expolistWidget_doubleClicked(QModelIndex index);
46 void expolistWidget_KeyPress(QKeyEvent *event);
47 void exposDelete(bool ask=true);
48 void exposCut();
49 void exposCopy();
50 void exposPaste();
51 void exposDuplicate();
52 void expoOpen(QListWidgetItem *item = NULL);
53 void expoAdd();
54 void maybeCopyInputName(int srcChan, int destChan);
56 private:
57 bool expoInserted;
58 MixersListWidget *ExposlistWidget;
59 int inputsCount;
60 ModelPrinter modelPrinter;
62 int getExpoIndex(unsigned int dch);
63 bool gm_insertExpo(int idx);
64 void gm_deleteExpo(int index, bool clearName = true);
65 void gm_openExpo(int index);
66 int gm_moveExpo(int idx, bool dir);
67 void exposDeleteList(QList<int> list, bool clearName = true);
68 QList<int> createExpoListFromSelected();
69 void setSelectedByExpoList(QList<int> list);
70 void pasteExpoMimeData(const QMimeData * mimeData, int destIdx);
71 void AddInputLine(int dest);
72 QString getInputText(int dest, bool newChan);
76 #endif // _INPUTS_H_