Logo Search packages:      
Sourcecode: kmess version File versions  Download package

AddEmoticonDialog::AddEmoticonDialog ( EmoticonTheme theme,
QWidget *  parent = 0 
) [explicit]

Constructor

The dialog is instantly shown as non-modal when the class is instantiated.

Parameters:
theme Theme to add the new emoticon to
parent Parent widget

Definition at line 44 of file addemoticondialog.cpp.

References choosePicture(), and interfaceChanged().

 : KDialog( parent )
 , Ui::AddEmoticonDialog()
 , theme_(theme)
 , isEditing_(false)
{
  // Set up the interface and the dialog
  setObjectName( "AddEmoticon" );
  QWidget *mainWidget = new QWidget( this );
  setupUi( mainWidget );
  setMainWidget( mainWidget );

  // Configure the dialog
  setWindowModality( Qt::WindowModal );
  setButtons( Help | Ok | Cancel );
  setHelp( "settings-account-emoticons" );
  setDefaultButton( Ok );
  setCaption( i18n("Add New Emoticon") );

  setMainWidget( container_ );

  resize( minimumSizeHint() );
  restoreDialogSize( KMessConfig::instance()->getGlobalConfig( "AddEmoticonDialog" ) );

  // Connect the interface's signals to manage its events
  connect( browseButton_,  SIGNAL(          clicked()               ),
           this,                         SLOT(    choosePicture()               ) );
  connect( pictureEdit_,   SIGNAL(      textChanged(const QString&) ),
           this,                         SLOT( interfaceChanged()               ) );
  connect( shortcutEdit_,  SIGNAL(      textChanged(const QString&) ),
           this,                         SLOT( interfaceChanged()               ) );

  movie_ = new QMovie();
  movie_->setCacheMode ( QMovie::CacheAll );
  
  // Force an update of the widgets (mainly to show the KMess logo as
  // the preview and to disable the Ok button)
  interfaceChanged();

  show();
}


Generated by  Doxygen 1.6.0   Back to index