[KLF Application]
[KLF Tools]
[KLF Backend]
[KLF Home]
KLatexFormula Project
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
klflibentryeditor.h
Go to the documentation of this file.
1
/***************************************************************************
2
* file klflibentryeditor.h
3
* This file is part of the KLatexFormula Project.
4
* Copyright (C) 2011 by Philippe Faist
5
* philippe.faist at bluewin.ch
6
* *
7
* This program is free software; you can redistribute it and/or modify *
8
* it under the terms of the GNU General Public License as published by *
9
* the Free Software Foundation; either version 2 of the License, or *
10
* (at your option) any later version. *
11
* *
12
* This program is distributed in the hope that it will be useful, *
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15
* GNU General Public License for more details. *
16
* *
17
* You should have received a copy of the GNU General Public License *
18
* along with this program; if not, write to the *
19
* Free Software Foundation, Inc., *
20
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21
***************************************************************************/
22
/* $Id: klflibentryeditor.h 603 2011-02-26 23:14:55Z phfaist $ */
23
24
#ifndef KLFLIBENTRYEDITOR_H
25
#define KLFLIBENTRYEDITOR_H
26
27
#include <QWidget>
28
#include <QComboBox>
29
30
#include <
klflib.h
>
31
32
33
34
namespace
Ui {
class
KLFLibEntryEditor
; }
35
36
class
KLF_EXPORT
KLFLibEntryEditor
:
public
QWidget
37
{
38
Q_OBJECT
39
public
:
40
KLFLibEntryEditor
(
QWidget
*parent = NULL);
41
virtual
~
KLFLibEntryEditor
();
42
43
void
addCategorySuggestions(
const
QStringList
& categorylist);
44
45
virtual
bool
eventFilter(
QObject
*
object
,
QEvent
*event);
46
47
inline
bool
metaInfoModified
()
const
{
return
pMetaInfoModified; }
48
49
signals:
50
54
void
metaInfoChanged(
const
QMap<int,QVariant>
& props);
55
56
void
restoreStyle(
const
KLFStyle
& style);
57
58
public
slots:
59
60
void
displayEntry(
const
KLFLibEntry
& entry);
61
64
void
displayEntries(
const
QList<KLFLibEntry>
& entries);
65
71
void
setInputEnabled(
bool
enabled);
72
73
void
retranslateUi(
bool
alsoBaseUi =
true
);
74
75
protected
slots:
76
77
void
slotUpdateFromCbx(
QComboBox
*cbx);
78
79
void
on_btnApplyChanges_clicked();
80
void
on_btnRestoreStyle_clicked();
84
void
slotApplyChanges
() {
slotApplyChanges
(
true
,
true
); }
85
void
slotApplyChanges(
bool
category,
bool
tags);
86
87
void
slotModified(
bool
modif =
true
);
88
89
void
slotCbxSaveCurrentCompletion(
QComboBox
*cbx);
90
void
slotCbxCleanUpCompletions(
QComboBox
*cbx);
91
92
private
:
93
Ui::KLFLibEntryEditor *u;
94
95
bool
pInputEnabled;
96
97
bool
pMetaInfoModified;
98
99
KLFStyle
pCurrentStyle;
100
101
// void updateEditText(QComboBox *editWidget, const QString& newText);
102
void
displayStyle(
bool
valid,
const
KLFStyle
& style);
103
};
104
105
106
107
108
109
110
111
#endif
QEvent
QWidget
KLFLibEntryEditor::metaInfoModified
bool metaInfoModified() const
Definition:
klflibentryeditor.h:47
KLFLibEntryEditor
Definition:
klflibentryeditor.h:36
QMap
KLFLibEntryEditor::slotApplyChanges
void slotApplyChanges()
Definition:
klflibentryeditor.h:84
QObject
klflib.h
QList< KLFLibEntry >
QStringList
KLFStyle
KLFLibEntry
An entry (single formula) in the library.
Definition:
klflib.h:55
QComboBox
Generated by
doxygen
1.8.6