~renatofilho/ubuntu-terminal-app/ssh-mode

« back to all changes in this revision

Viewing changes to src/plugin/qmltermwidget/lib/TerminalDisplay.h

  • Committer: Tarmac
  • Author(s): Stefano Verzegnassi
  • Date: 2016-04-23 12:24:40 UTC
  • mfrom: (191.2.2 fix-1488588)
  • Revision ID: tarmac-20160423122440-2n9veym2ksf5dzw4
* Expose drag mode settings to QML
* Disabled drag support in ubuntu-terminal-app in order to workaround the missing support in Mir. Fixes: https://bugs.launchpad.net/bugs/1488588.

Approved by Jenkins Bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QQuickPaintedItem
84
84
{
85
85
   Q_OBJECT
 
86
   Q_ENUMS(DragMode)
86
87
   Q_PROPERTY(KSession* session         READ getSession      WRITE setSession     NOTIFY sessionChanged          )
87
88
   Q_PROPERTY(QFont font                READ getVTFont       WRITE setVTFont                                     )
88
89
   Q_PROPERTY(QString  colorScheme                           WRITE setColorScheme                                )
95
96
   Q_PROPERTY(int scrollbarMaximum      READ getScrollbarMaximum                  NOTIFY scrollbarParamsChanged  )
96
97
   Q_PROPERTY(int scrollbarMinimum      READ getScrollbarMinimum                  NOTIFY scrollbarParamsChanged  )
97
98
   Q_PROPERTY(QSize fontMetrics         READ getFontMetrics                       NOTIFY changedFontMetricSignal )
98
 
   Q_PROPERTY(bool enableBold                                WRITE setBoldIntense)
 
99
   Q_PROPERTY(bool enableBold                                WRITE setBoldIntense                                )
 
100
   Q_PROPERTY(DragMode dragMode         MEMBER _dragMode                          NOTIFY dragModeChanged         )
99
101
 
100
102
public:
101
103
    /** Constructs a new terminal display widget with the specified parent. */
194
196
    /** Specifies whether or not text can blink. */
195
197
    void setBlinkingTextEnabled(bool blink);
196
198
 
197
 
    void setCtrlDrag(bool enable) { _ctrlDrag=enable; }
198
 
    bool ctrlDrag() { return _ctrlDrag; }
 
199
    enum DragMode {
 
200
        NoDrag,             // drag disabled
 
201
        CtrlModifierDrag,   // require Ctrl key for drag
 
202
        NoModifierDrag      // no additional key is required
 
203
    };
199
204
 
200
205
    /** 
201
206
     *  This enum describes the methods for selecting text when
614
619
    void imagePainted();
615
620
    void scrollbarValueChanged();
616
621
    void scrollbarParamsChanged(int value);
 
622
    void dragModeChanged();
617
623
 
618
624
protected:
619
625
    virtual bool event( QEvent * );
821
827
    bool _cursorBlinking;     // hide cursor in paintEvent
822
828
    bool _hasBlinkingCursor;  // has blinking cursor enabled
823
829
    bool _allowBlinkingText;  // allow text to blink
824
 
    bool _ctrlDrag;           // require Ctrl key for drag
 
830
    DragMode _dragMode;
825
831
    TripleClickMode _tripleClickMode;
826
832
    bool _isFixedSize; //Columns / lines are locked.
827
833
    QTimer* _blinkTimer;  // active when hasBlinker