~ubuntu-branches/ubuntu/lucid/kmess/lucid

« back to all changes in this revision

Viewing changes to src/chat/emoticonswidget.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2009-12-05 21:19:26 UTC
  • mfrom: (1.1.7 upstream) (0.1.8 sid)
  • Revision ID: james.westby@ubuntu.com-20091205211926-r26u8j38kysf6o2p
Tags: 2.0.2-1
* New upstream release 
  - Fixes friendly names (LP: #485640)
* Update Homepage: http://kmess.org
* Add Build-Depends: libphonon-dev | libqt4-phonon-dev (ubuntu friendly)
* kmess.1 fix lintian:hyphen-used-as-minus-sign

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
 
74
74
  // Create an initial layout for the widget
75
75
  layout_ = new QBoxLayout( QBoxLayout::LeftToRight, this );
 
76
  layout_->setContentsMargins( 0,0,0,0 );
 
77
  layout_->setSpacing( 0 );
76
78
  layout_->addWidget( list_ );
77
79
  layout_->addWidget( previewLabel_ );
78
 
  setMinimumSize( minimumSizeHint() );
79
80
 
80
 
  // Install event filter
 
81
  // Install the event filter for the preview label
81
82
  installEventFilter( this );
82
83
}
83
84
 
97
98
  setMovement( QListView::Static );
98
99
  setSelectionMode( QAbstractItemView::SingleSelection );
99
100
  setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
100
 
  setFrameShape(QFrame::NoFrame );
 
101
  setFrameShape( QFrame::NoFrame );
101
102
  setStyleSheet( "QListWidget { background-color: transparent; }" );
102
103
 
103
104
  // Install event filter
208
209
 
209
210
 
210
211
 
211
 
// Reimplement the event filter
212
 
bool EmoticonsWidget::eventFilter( QObject *obj, QEvent *e )
 
212
// Event filter for the preview label
 
213
bool EmoticonsWidget::eventFilter( QObject *obj, QEvent *event )
213
214
{
214
215
  Q_UNUSED( obj );
215
216
 
216
 
  int type = e->type();
 
217
  int type = event->type();
217
218
 
218
 
  if( type == QEvent::Hide || type == QEvent::Leave  )
 
219
  if( type == QEvent::Hide || type == QEvent::Leave )
219
220
  {
220
 
    // Stop the preview while the emoticon widget is hide
 
221
    // Stop the preview while the emoticon widget is hidden
221
222
    previewLabel_->setPixmap( QPixmap() );
222
223
    previewMovie_->stop();
223
224
  }