src/hbwidgets/editors/hblineedit.h
changeset 1 f7ac710697a9
parent 0 16d8024aca5e
child 7 923ff622b8b9
equal deleted inserted replaced
0:16d8024aca5e 1:f7ac710697a9
    47     Q_PROPERTY(int selectionStart READ selectionStart)
    47     Q_PROPERTY(int selectionStart READ selectionStart)
    48     Q_PROPERTY(int maxRows READ maxRows WRITE setMaxRows)
    48     Q_PROPERTY(int maxRows READ maxRows WRITE setMaxRows)
    49     Q_PROPERTY(int minRows READ minRows WRITE setMinRows)
    49     Q_PROPERTY(int minRows READ minRows WRITE setMinRows)
    50     Q_PROPERTY(bool expandable READ isExpandable)
    50     Q_PROPERTY(bool expandable READ isExpandable)
    51     Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode)
    51     Q_PROPERTY(EchoMode echoMode READ echoMode WRITE setEchoMode)
       
    52     Q_PROPERTY(bool adjustFontSizeToFitHeight READ adjustFontSizeToFitHeight WRITE setAdjustFontSizeToFitHeight)
    52 
    53 
    53 public:
    54 public:
    54 
    55 
    55     explicit HbLineEdit(QGraphicsItem *parent = 0);
    56     explicit HbLineEdit(QGraphicsItem *parent = 0);
    56     explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0);
    57     explicit HbLineEdit(const QString &text, QGraphicsItem *parent = 0);
    88     void setEchoMode(EchoMode);
    89     void setEchoMode(EchoMode);
    89 
    90 
    90     void setCapitalization ( QFont::Capitalization caps );
    91     void setCapitalization ( QFont::Capitalization caps );
    91     QFont::Capitalization capitalization () const;
    92     QFont::Capitalization capitalization () const;
    92 
    93 
       
    94     bool adjustFontSizeToFitHeight() const;
       
    95     void setAdjustFontSizeToFitHeight(bool active);
       
    96 
    93 public slots:
    97 public slots:
    94     void setText(const QString &text);
    98     void setText(const QString &text);
    95 
    99 
    96 signals:
   100 signals:
    97     void editingFinished();
   101     void editingFinished();
   103 
   107 
   104     void inputMethodEvent(QInputMethodEvent *event);
   108     void inputMethodEvent(QInputMethodEvent *event);
   105     void keyPressEvent(QKeyEvent *event);
   109     void keyPressEvent(QKeyEvent *event);
   106     void keyReleaseEvent(QKeyEvent *event);
   110     void keyReleaseEvent(QKeyEvent *event);
   107 
   111 
   108     void resizeEvent(QGraphicsSceneResizeEvent *event);
       
   109 
       
   110     bool canInsertFromMimeData(const QMimeData *source) const;
   112     bool canInsertFromMimeData(const QMimeData *source) const;
   111     void insertFromMimeData(const QMimeData *source);
   113     void insertFromMimeData(const QMimeData *source);
   112 
   114 
   113     void focusOutEvent ( QFocusEvent * event );
   115     void focusOutEvent ( QFocusEvent * event );
   114     void focusInEvent ( QFocusEvent * event );
   116     void focusInEvent ( QFocusEvent * event );
       
   117 
       
   118     bool eventFilter(QObject *, QEvent *);
       
   119 
   115 private:
   120 private:
   116     Q_DISABLE_COPY(HbLineEdit)
   121     Q_DISABLE_COPY(HbLineEdit)
   117     Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
   122     Q_DECLARE_PRIVATE_D(d_ptr, HbLineEdit)
   118     Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
   123     Q_PRIVATE_SLOT(d_func(), void _q_textChanged())
   119     Q_PRIVATE_SLOT(d_func(), void _q_textChange(int,int,int))
   124     Q_PRIVATE_SLOT(d_func(), void _q_textChange(int,int,int))