summaryrefslogtreecommitdiffstats
path: root/src/kile/usermenudialog.h
blob: 7703ee73b2741d8432b4b7f8c2d4ba1c8c3e51dc (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
/***************************************************************************
    begin                : Sun Jun 3 2001
    copyright            : (C) 2001 - 2003 by Brachet Pascal, 2003 Jeroen Wijnhout
    email                : Jeroen.Wijnhout@kdemail.net
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 USERMENUDIALOG_H
#define USERMENUDIALOG_H

#include <tqstring.h>
#include <tqstringlist.h>

#include <kdialogbase.h>

#include "kileactions.h"

class TQRadioButton;
class KTextEdit;
class TQLineEdit;
class TQComboBox;
class TQLabel;
class KPushButton;

namespace KileDialog
{

class UserTags: public KDialogBase
{
	Q_OBJECT
  

public:
	UserTags( const TQValueList<KileAction::TagData> &list, TQWidget* parent = 0, const char* name = 0, const TQString &caption = TQString());
	~UserTags();

	int index() { return m_prevIndex; }
	const TQValueList<KileAction::TagData>& result() {return m_list; }

	static TQString completeTag(const KileAction::TagData & td);
	static KileAction::TagData splitTag(const TQString & name, const TQString & tag);

private slots:
	void change(int index);
	void redraw();

	void slotAdd();
	void slotInsert();
	void slotRemove();

	void slotApply();

private:
	int 				m_prevIndex;
	KTextEdit 		*m_editTag;
	TQLineEdit 		*m_editName;
	TQComboBox 		*m_combo;
	TQLabel			*m_labelName;
	TQLabel			*m_labelTag;
	KPushButton		*m_buttonRemove, *m_buttonAdd, *m_buttonInsert;

	TQValueList<KileAction::TagData> 	m_list;
};

}

#endif // USERMENUDIALOG_H