blob: 1efd5a69173259d3a2213a1a21d84ca6c848e180 (
plain)
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
/***************************************************************************
kqifprofileeditor.h - description
-------------------
begin : Tue Dec 24 2002
copyright : (C) 2002 by Thomas Baumgart
email : [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 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef MYMONEYTQIFPROFILEEDITOR_H
#define MYMONEYTQIFPROFILEEDITOR_H
// ----------------------------------------------------------------------------
// QT Includes
#include <tqwidget.h>
#include <tqvalidator.h>
class TQListViewItem;
// ----------------------------------------------------------------------------
// KDE Includes
// ----------------------------------------------------------------------------
// Project Includes
#include "mymoneyqifprofileeditordecl.h"
#include "../converter/mymoneyqifprofile.h"
/**
* @author Thomas Baumgart
*/
class MyMoneyQifProfileNameValidator : public TQValidator
{
Q_OBJECT
TQ_OBJECT
public:
MyMoneyQifProfileNameValidator(TQObject *o, const char *name);
virtual ~MyMoneyQifProfileNameValidator();
TQValidator::State validate(TQString&, int&) const;
};
class MyMoneyQifProfileEditor : public MyMoneyQifProfileEditorDecl
{
Q_OBJECT
TQ_OBJECT
public:
MyMoneyQifProfileEditor(const bool edit = false, TQWidget *parent=0, const char *name=0);
virtual ~MyMoneyQifProfileEditor();
/**
* This method returns the currently selected profile in the list box.
*/
const TQString selectedProfile() const;
public slots:
void slotOk(void);
protected slots:
void slotLoadProfileFromConfig(const TQString& name);
void slotReset(void);
void slotRename(void);
void slotDelete(void);
void slotNew(void);
void slotAmountTypeSelected(TQListViewItem*);
void slotDecimalChanged(const TQString& val);
void slotThousandsChanged(const TQString& val);
void slotHelp(void);
private:
void loadProfileListFromConfig(void);
void loadWidgets(void);
void showProfile(void);
void addProfile(const TQString& name);
void deleteProfile(const TQString& name);
const TQString enterName(bool& ok);
private:
bool m_inEdit;
MyMoneyQifProfile m_profile;
bool m_isDirty;
bool m_isAccepted;
TQListViewItem* m_selectedAmountType;
};
#endif
|