~ubuntu-branches/ubuntu/jaunty/bibletime/jaunty

« back to all changes in this revision

Viewing changes to bibletime/frontend/cmanageindiceswidget.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 CMANAGEINDICESWIDGET_H
 
13
#define CMANAGEINDICESWIDGET_H
 
14
 
 
15
#include "frontend/manageindicesform.h"  // uic generated
 
16
 
 
17
#include <qwidget.h>
 
18
 
 
19
class QCheckListItem;
 
20
 
 
21
namespace BookshelfManager {
 
22
        
 
23
/**
 
24
* This class encapsulates the "Manage search indices" page of the Bookshelf
 
25
* Manager.  It allows for creation and deletion of search indicies for each
 
26
* installed module.  It also allows for deletion of orphaned indices.
 
27
*/
 
28
class CManageIndicesWidget : public ManageIndicesForm
 
29
{
 
30
        Q_OBJECT
 
31
        
 
32
public:
 
33
        /**
 
34
        * Constructor
 
35
        */
 
36
        CManageIndicesWidget(QWidget* parent, const char* name = 0);
 
37
 
 
38
        /** 
 
39
        * Destructor
 
40
        */
 
41
        ~CManageIndicesWidget();
 
42
 
 
43
protected:
 
44
        /**
 
45
        * Initializes the look and feel of this page
 
46
        */
 
47
        void initView();
 
48
        /**
 
49
        * Populates the module list with installed modules and orphaned indices
 
50
        */
 
51
        void populateModuleList();
 
52
 
 
53
        // member variables
 
54
        QCheckListItem* m_modsWithIndices;
 
55
        QCheckListItem* m_modsWithoutIndices;
 
56
        
 
57
public slots:
 
58
        /**
 
59
        * Creates indices for selected modules if no index currently exists
 
60
        */
 
61
        void createIndices();
 
62
        /**
 
63
        * Deletes indices for selected modules
 
64
        */
 
65
        void deleteIndices();
 
66
 
 
67
public:
 
68
        /**
 
69
        * Deletes orphaned indices if the autoDeleteOrphanedIndices is true
 
70
        * Always deletes indices of existing modules where hasIndex() returns false
 
71
        */
 
72
        static void deleteOrphanedIndices();
 
73
};
 
74
 
 
75
}
 
76
 
 
77
#endif