1/***************************************************************************
2 KAddStringDlg.h - description
3 -------------------
4 begin : Sat Oct 16 1999
5 copyright : (C) 1999 by François Dupoux
6 (C) 2004 Emiliano Gulmini <emi_barbarossa@yahoo.it>
7 email : dupoux@dupoux.com
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19#ifndef KADDSTRINGDLG_H
20#define KADDSTRINGDLG_H
21
22// local
23#include "kaddstringdlgs.h"
24#include "configurationclasses.h"
25/**
26 * This is the dialog used to add a list of searching/replacing strings
27 */
28class KAddStringDlg : public KAddStringDlgS
29{
30 Q_OBJECT
31 private:
32 RCOptions* m_option;
33 Q3ListView* m_sv;
34 KeyValueMap m_currentMap;
35 bool m_wantEdit;
36
37 public: //Constructors
38 KAddStringDlg(RCOptions* info, bool wantEdit, QWidget *parent=0, const char *name=0);
39
40 private slots:
41 void slotOK();
42 void slotSearchOnly();
43 void slotSearchReplace();
44 void slotAddStringToView();
45 void slotDeleteStringFromView();
46 void slotHelp();
47
48 private:
49 /**
50 * inits... the GUI :-)
51 */
52 void initGUI();
53 /**
54 * Deletes all the items of the view
55 */
56 void eraseViewItems();
57 /**
58 * Deletes all the items of the map
59 */
60 void clearMap() { KeyValueMap m; m_option->m_mapStringsView = m; }
61 /**
62 * The view is actually a stack widget that contains two different views widget
63 */
64 void raiseView();
65 /**
66 * Verifies whether 'lv' contains 's'
67 */
68 bool columnContains(Q3ListView* lv,const QString& s, int column);
69 void saveViewContentIntoMap();
70 void loadMapIntoView();
71 void whatsThis();
72};
73
74#endif // KADDSTRINGDLG_H
75
76