Show
Ignore:
Timestamp:
02/20/08 04:08:08 (10 months ago)
Author:
flynd
Message:

Allow size hint on mledit based on font size and default chat dialog input to three lines of text.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/src/widgets/mledit.h

    r5580 r6064  
    6767  bool checkSpellingEnabled() const; 
    6868 
     69  /** 
     70   * Caclulate height for widget to fit a specified number of lines with 
     71   * current font 
     72   * 
     73   * @param lines Number of text lines to calculate for 
     74   * @return Widget height in pixels 
     75   */ 
     76  int heightForLines(int lines) const; 
     77 
     78  /** 
     79   * Set size hint as number of lines of text 
     80   * 
     81   * @param lines Lines of text that should be visible 
     82   */ 
     83  void setSizeHintLines(int lines); 
     84 
     85  /** 
     86   * Get recommended widget size 
     87   * 
     88   * @return Recommended size 
     89   */ 
     90  QSize sizeHint() const; 
     91 
    6992signals: 
    7093  void ctrlEnterPressed(); 
     
    7497  bool myFixSetTextNewlines; 
    7598  bool myLastKeyWasReturn; 
     99  int myFontHeight; 
     100  int myLinesHint; 
    76101 
    77102  virtual void keyPressEvent(QKeyEvent* event);