~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/GUI/kcmdline.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-08-08 13:47:36 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20110808134736-8e630ivgd2c3sgg5
Tags: 1:2.4.0~beta1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
class KCMDModeButton;
51
51
 
52
 
class KrHistoryCombo: public KHistoryComboBox
 
52
class CmdLineCombo : public KHistoryComboBox
53
53
{
54
54
    Q_OBJECT
55
 
 
56
55
public:
57
 
    KrHistoryCombo(QWidget *parent): KHistoryComboBox(parent) {}
58
 
 
59
 
protected:
60
 
    void keyPressEvent(QKeyEvent *e);
 
56
    CmdLineCombo(QWidget *parent);
 
57
 
 
58
    virtual bool eventFilter(QObject *watched, QEvent *e);
 
59
 
 
60
    QString path() {
 
61
        return _path;
 
62
    }
 
63
    void setPath(QString path);
61
64
 
62
65
signals:
63
66
    void returnToPanel();
 
67
 
 
68
protected slots:
 
69
    void doLayout();
 
70
 
 
71
protected:
 
72
    virtual void resizeEvent(QResizeEvent *e);
 
73
    virtual void keyPressEvent(QKeyEvent *e);
 
74
 
 
75
    void updateLineEditGeometry();
 
76
 
 
77
    QLabel *_pathLabel;
 
78
    QString _path;
 
79
    bool _handlingLineEditResize;
64
80
};
65
81
 
 
82
 
66
83
class KCMDLine : public QWidget, KrActionBase
67
84
{
68
85
    Q_OBJECT
69
86
public:
70
87
    KCMDLine(QWidget *parent = 0);
71
88
    ~KCMDLine();
72
 
    void setCurrent(const QString &);
 
89
    void setCurrent(const QString &path);
73
90
    //virtual methods from KrActionBase
74
91
    void setText(QString text);
75
92
    QString command() const;
80
97
    bool acceptURLs() const;
81
98
    bool confirmExecution() const;
82
99
    bool doSubstitution() const;
 
100
 
83
101
signals:
84
102
    void signalRun();
 
103
 
85
104
public slots:
86
105
    void slotReturnFocus(); // returns keyboard focus to panel
87
106
    void slotRun();
97
116
    virtual void focusInEvent(QFocusEvent*) {
98
117
        cmdLine->setFocus();
99
118
    }
100
 
    virtual void resizeEvent(QResizeEvent*) {
101
 
        calcLabelSize();
102
 
    }
 
119
 
103
120
    void calcLabelSize();
104
121
 
105
122
private:
106
 
    QLabel *path;
107
 
    QString pathName;
108
 
    KrHistoryCombo *cmdLine;
 
123
    CmdLineCombo *cmdLine;
109
124
    KCMDModeButton *terminal;
110
125
    QToolButton *buttonAddPlaceholder;
111
126
    KShellCompletion completion;