blob: abb3880fcc6094c61ef4641ec8f8e9bc1780c0d5 (
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
|
/***************************************************************************
* Copyright (C) 2007 Nicolas Hadacek <hadacek@kde.org> *
* *
* 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 PROJECT_WIZARD_H
#define PROJECT_WIZARD_H
#include <tqbuttongroup.h>
#include <tqradiobutton.h>
#include <kwizard.h>
#include <klineedit.h>
#include <kcombobox.h>
#include "common/global/purl.h"
#include "common/gui/editlistbox.h"
#include "common/gui/key_gui.h"
namespace PURL { class DirectoryWidget; }
namespace DeviceChooser { class Button; }
namespace Tool { class Group; }
class Project;
//-----------------------------------------------------------------------------
class FileListItem : public KListViewItem
{
public:
FileListItem(KListView *view);
void setToolGroup(const Tool::Group &group) { _group = &group; }
bool copy() const { return _copy; }
void toggle();
PURL::FileGroup fileGroup() const;
virtual const TQPixmap *pixmap(int column) const;
private:
const Tool::Group *_group;
TQPixmap _pixmap;
bool _copy;
};
class FileListBox : public EditListBox
{
Q_OBJECT
public:
FileListBox(TQWidget *parent);
void setDirectory(const PURL::Directory &directory) { _directory = directory; }
void setToolGroup(const Tool::Group &group);
protected slots:
virtual void addItem();
virtual void clicked(TQListViewItem *item, const TQPoint &point, int column);
private:
PURL::Directory _directory;
virtual uint textColumn() const { return 1; }
virtual TQListViewItem *createItem();
};
//-----------------------------------------------------------------------------
class ProjectWizard : public KWizard
{
Q_OBJECT
public:
ProjectWizard(TQWidget *parent);
PURL::Url url() const;
Project *project() const { return _project; }
protected slots:
void buttonClicked(int id);
virtual void next();
virtual void done(int r);
private:
TQWidget *_first, *_second, *_third;
KLineEdit *_name;
PURL::DirectoryWidget *_directory;
DeviceChooser::Button *_device;
KeyComboBox<TQString> *_toolchain;
TQButtonGroup *_bgroup;
TQRadioButton *_templateButton, *_addButton;
FileListBox *_files;
Project *_project;
TQString device() const;
const Tool::Group &toolchain() const;
};
#endif
|