~ubuntu-branches/ubuntu/intrepid/bibletime/intrepid

« back to all changes in this revision

Viewing changes to bibletime/frontend/searchdialog/crangechooser.h

  • Committer: Bazaar Package Importer
  • Author(s): Ralph Janke
  • Date: 2008-05-10 15:18:16 UTC
  • mfrom: (1.1.6 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080510151816-bqp8y1to705zd0fm
Tags: 1.6.5.1-1
* New upstream version (Closes: #441161, #271502)
* fixes for new autotools and gcc 4.3 (Closes: #407291)
* added poxml to Build-Depends
* No DFSG necessary anymore since biblestudy howto has 
  now Commons Licence 
* Added libclucene-dev to dev-depends (Closes: #436677)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********
 
2
*
 
3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
 
4
*
 
5
* Copyright 1999-2006 by the BibleTime developers.
 
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
 
7
*
 
8
**********/
 
9
 
 
10
 
 
11
 
 
12
#ifndef CRANGECHOOSER_H
 
13
#define CRANGECHOOSER_H
 
14
 
 
15
//BibleTime includes
 
16
#include "backend/cswordmoduleinfo.h"
 
17
#include "backend/cswordbackend.h"
 
18
 
 
19
#include "util/cpointers.h"
 
20
 
 
21
//Sword includes
 
22
 
 
23
 
 
24
//Qt includes
 
25
#include <qwidget.h>
 
26
#include <qstring.h>
 
27
#include <qcanvas.h>
 
28
#include <qdict.h>
 
29
#include <qtooltip.h>
 
30
 
 
31
//KDE includes
 
32
#include <kdialog.h>
 
33
#include <kdialogbase.h>
 
34
#include <klistview.h>
 
35
 
 
36
//forward declarations
 
37
class CSearchAnalysisItem;
 
38
class CSearchAnalysisLegendItem;
 
39
class CSearchAnalysis;
 
40
class CSearchAnalysisView; 
 
41
 
 
42
class QTextEdit;
 
43
 
 
44
namespace Search {
 
45
        namespace Options {
 
46
        
 
47
class CRangeChooserDialog : public KDialogBase {
 
48
        Q_OBJECT
 
49
public:
 
50
        CRangeChooserDialog(QWidget* parentDialog);
 
51
        ~CRangeChooserDialog();
 
52
 
 
53
protected: // Protected methods
 
54
class RangeItem : public KListViewItem {
 
55
public:
 
56
                RangeItem(QListView*, QListViewItem* afterThis = 0, const QString caption = QString::null, const QString range = QString::null);
 
57
                ~RangeItem();
 
58
                const QString& range();
 
59
                const QString caption();
 
60
                void setRange(QString range);
 
61
                void setCaption(const QString);
 
62
private:
 
63
                QString m_range;
 
64
        };
 
65
 
 
66
        /**
 
67
        * Initializes the connections of this widget.
 
68
        */
 
69
        void initConnections();
 
70
        /**
 
71
        * Initializes the view of this object.
 
72
        */
 
73
        void initView();
 
74
 
 
75
protected slots: // Protected slots
 
76
        /**
 
77
        * Adds a new range to the list.
 
78
        */
 
79
        void addNewRange();
 
80
        void editRange(QListViewItem*);
 
81
        /**
 
82
        * Parses the entered text and prints out the result in the list box below the edit area.
 
83
        */
 
84
        void parseRange();
 
85
        void nameChanged(const QString&);
 
86
        void rangeChanged();
 
87
        /**
 
88
        * Deletes the selected range.
 
89
        */
 
90
        void deleteCurrentRange();
 
91
        virtual void slotDefault();
 
92
        virtual void slotOk();
 
93
 
 
94
private:
 
95
        KListView* m_rangeList;
 
96
        KListView* m_resultList;
 
97
        QLineEdit* m_nameEdit;
 
98
        QTextEdit* m_rangeEdit;
 
99
        QPushButton* m_newRangeButton;
 
100
        QPushButton* m_deleteRangeButton;
 
101
};
 
102
 
 
103
        } //end of namespace Search.Options
 
104
} //end of namespace Search
 
105
 
 
106
#endif