~ubuntu-branches/debian/jessie/ugene/jessie

« back to all changes in this revision

Viewing changes to src/corelibs/U2View/src/util_ov_annotated_dna/WindowStepSelectorWidget.h

  • Committer: Package Import Robot
  • Author(s): Steffen Moeller
  • Date: 2011-11-02 13:29:07 UTC
  • mfrom: (1.2.1) (3.1.11 natty)
  • Revision ID: package-import@ubuntu.com-20111102132907-o34gwnt0uj5g6hen
Tags: 1.9.8+repack-1
* First release to Debian
  - added README.Debian
  - increased policy version to 3.9.2
  - added URLs for version control system
* Added debug package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * UGENE - Integrated Bioinformatics Tools.
 
3
 * Copyright (C) 2008-2011 UniPro <ugene@unipro.ru>
 
4
 * http://ugene.unipro.ru
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version.
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software
 
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 
19
 * MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef _U2_WINDOW_STEP_SELECTOR_WIDGET_
 
23
#define _U2_WINDOW_STEP_SELECTOR_WIDGET_
 
24
 
 
25
#include <QtGui/QDialog>
 
26
#include <QtGui/QSpinBox>
 
27
#include <QtGui/QDoubleSpinBox>
 
28
#include <QtGui/QGroupBox>
 
29
#include <U2Core/U2Region.h>
 
30
 
 
31
namespace U2 {
 
32
 
 
33
class U2VIEW_EXPORT WindowStepSelectorWidget :  public QWidget {
 
34
    Q_OBJECT
 
35
public:
 
36
    WindowStepSelectorWidget(QWidget* p, const U2Region& winRange, int win, int step);
 
37
    QString validate() const;
 
38
 
 
39
    int getWindow() const;
 
40
    int getStep() const;
 
41
 
 
42
private:
 
43
    QSpinBox*   windowEdit;
 
44
    QSpinBox*   stepsPerWindowEdit;
 
45
};
 
46
 
 
47
class U2VIEW_EXPORT MinMaxSelectorWidget : public QWidget {
 
48
    Q_OBJECT
 
49
public:
 
50
    MinMaxSelectorWidget(QWidget* p, double min, double max, bool enabled);
 
51
    QString validate() const;
 
52
 
 
53
    double getMin() const;
 
54
    double getMax() const;
 
55
    bool getState() const;
 
56
 
 
57
private:
 
58
    QGroupBox* minmaxGroup;
 
59
    QDoubleSpinBox* minBox;
 
60
    QDoubleSpinBox* maxBox;
 
61
};
 
62
 
 
63
class U2VIEW_EXPORT WindowStepSelectorDialog : public QDialog {
 
64
    Q_OBJECT
 
65
public: 
 
66
    WindowStepSelectorDialog(QWidget* p, const U2Region& winRange, int win, int step, double min, double max, bool e);
 
67
    WindowStepSelectorWidget* getWindowStepSelector() const {return wss;}
 
68
    MinMaxSelectorWidget* getMinMaxSelector() const {return mms;}
 
69
 
 
70
private slots:
 
71
    void sl_onCancelClicked(bool);
 
72
    void sl_onOkClicked(bool);
 
73
private:
 
74
    WindowStepSelectorWidget* wss;
 
75
    MinMaxSelectorWidget* mms;
 
76
};
 
77
 
 
78
} // namespace
 
79
 
 
80
#endif