-
Notifications
You must be signed in to change notification settings - Fork 0
/
dictmanager.h
60 lines (57 loc) · 2.8 KB
/
dictmanager.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/***************************************************************************
* Copyright (C) 2011-2012 by Marcin Nawrocki <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . *
***************************************************************************/
#pragma once
#include "QAbstractItemModel"
class IDictManager : public QObject
{
Q_OBJECT
signals:
void dictionaryChanged(int type);
public:
static IDictManager& instance();
virtual QAbstractItemModel* entriesModel() const = 0;
virtual QAbstractItemModel* dictionaryModel() const = 0;
virtual QAbstractItemModel* historyModel() const = 0;
virtual bool isTypeEqual(int type) = 0;
virtual int currentDictionaryIndex() const = 0;
virtual bool isCurrentDictValid() const = 0;
virtual void setVersion(int currentDictionaryIndex) = 0;
virtual void invertDirection() = 0;
virtual bool setType(int historyItemIndex) = 0;
virtual bool isDirectionForeign() const = 0;
virtual void initHistory() = 0;
virtual void insertHistoryItem(QString text) = 0;
virtual void initDictionary() = 0;
virtual void clearEntries() = 0;
virtual void clearDictionary() = 0;
virtual void clearHistory() = 0;
virtual void initEntries() = 0;
virtual void init() = 0;
virtual const QStringList& entries() const = 0;
virtual QString description(int index) const = 0;
virtual int entryToIndex(QString entry) const = 0;
virtual QString entriesText(int index) const = 0;
virtual QString foreignIconName() const = 0;
virtual QString tooltip() const = 0;
virtual QString wavFormat() const = 0;
virtual QString samplesPath() const = 0;
protected:
IDictManager() {}
virtual ~IDictManager() {}
};