~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to languages/cpp/codegen/progressdialogs.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   This file is part of KDevelop                                         *
 
3
 *   Copyright 2008 David Nolden <david.nolden.kdevelop@art-master.de>     *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU Library General Public License as       *
 
7
 *   published by the Free Software Foundation; either version 2 of the    *
 
8
 *   License, or (at your option) any later version.                       *
 
9
 *                                                                         *
 
10
 *   This program is distributed in the hope that it will be useful,       *
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
13
 *   GNU General Public License for more details.                          *
 
14
 *                                                                         *
 
15
 *   You should have received a copy of the GNU Library General Public     *
 
16
 *   License along with this program; if not, write to the                 *
 
17
 *   Free Software Foundation, Inc.,                                       *
 
18
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 
19
 ***************************************************************************/
 
20
 
 
21
#ifndef PROGRESSDIALOGS_H
 
22
#define PROGRESSDIALOGS_H
 
23
 
 
24
#include <QProgressBar>
 
25
#include <QObject>
 
26
#include <QDialog>
 
27
#include <language/duchain/indexedstring.h>
 
28
#include <language/duchain/topducontext.h>
 
29
 
 
30
namespace KDevelop {
 
31
  class UsesCollector;
 
32
}
 
33
 
 
34
class StringProgressBar : public QProgressBar {
 
35
  public:
 
36
    virtual QString text() const;
 
37
    
 
38
    void setText(KDevelop::IndexedString text);
 
39
    
 
40
  private:
 
41
    KDevelop::IndexedString m_text;
 
42
};
 
43
 
 
44
class RefactoringProgressDialog : public QDialog {
 
45
  Q_OBJECT
 
46
  public:
 
47
    RefactoringProgressDialog(QString action);
 
48
    
 
49
  public slots:
 
50
 
 
51
    void progress(uint done, uint max);
 
52
    
 
53
    void maximumProgress(uint max);
 
54
    
 
55
    void setProcessing(KDevelop::IndexedString processing);
 
56
  private:
 
57
    KDevelop::IndexedString m_processing;
 
58
    QPushButton* m_cancelButton;
 
59
    StringProgressBar* m_progressBar;
 
60
};
 
61
 
 
62
class CollectorProgressDialog : public RefactoringProgressDialog {
 
63
  Q_OBJECT
 
64
  public:
 
65
    CollectorProgressDialog(QString action, KDevelop::UsesCollector& collector);
 
66
    
 
67
  private slots:
 
68
    void processUses(KDevelop::ReferencedTopDUContext context);
 
69
    
 
70
  private:
 
71
    KDevelop::UsesCollector& m_collector;
 
72
};
 
73
 
 
74
#endif