summaryrefslogtreecommitdiffstats
path: root/kcoloredit/loadpalettedlg.h
blob: 3168ed68892b3b90cf7831269115b0c7433d063c (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
/***************************************************************************
                          loadpalettedlg.h  -  description
                             -------------------
    begin                : Sat Jul 8 2000
    copyright            : (C) 2000 by Artur Rataj
    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 LOADPALETTEDLG_H
#define LOADPALETTEDLG_H

#include <qcombobox.h>
#include <kdialog.h>

/**A dialog showing a list of installed palettes, with a possibility
  *of choosing a custom file
  *@author Artur Rataj
  */
class LoadPaletteDlg : public KDialogBase  {
	Q_OBJECT
	
public:
	/** constructs the dialog
	 */
	LoadPaletteDlg(QWidget *parent = 0, const char *name = 0);
	~LoadPaletteDlg();
	/** @return the fetched file name
	 */
	QString getFileName();
	
protected slots:
	/** sets fileName
	 */
	void setFileName(QString* fileName);	
	/** sets fileName to that at position index in palettesFileNames
	 */
	void setFileName(int index);	
	/** browses file names and if a file name fetched sets fileName
	 */
	void browseFileNames();	

private:
	/** A widget holding palettes names
	 */
	QComboBox* paletteBox;
	/** A list of KDE palettes file names
	 */
	QStringList palettesFileNames;
	/** A fetched palette file name
	 */
	QString fileName;
	/** whether a browse file name hab already been inserted into
	 *  palettesFilenames
	 */
	bool browseFileNameInserted;
};

#endif