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

AccountPage::AccountPage ( QWidget *  parent = 0  ) 

Constructor

Definition at line 45 of file accountpage.cpp.

References rememberMeToggled().

: QWidget(parent)
, Ui::AccountPage()
, hasTempPicture_(false)
, userPicturesDialog_(0)
{
  // First setup the user interface
  setupUi( this );

#ifndef HAVE_XSCREENSAVER
  useIdleTimerCheckBox_ ->setEnabled( false );
  idleTimeSpinBox_      ->setEnabled( false );
  idleLabel1_           ->setEnabled( false );
  idleLabel2_           ->setEnabled( false );
#else
  needXScreensaverLabel_->setVisible( false );
#endif

  // Connect the UI signals
  connect( friendlyNameEdit_,  SIGNAL(   textChanged(const QString&)), this,  SLOT(forwardSettingsUpdate()     ) );
  connect( handleEdit_,        SIGNAL(   textChanged(const QString&)), this,  SLOT(forwardSettingsUpdate()     ) );
  connect( noPictureCheckbox_, SIGNAL(       toggled(bool)          ), this,  SLOT(   showPictureToggled(bool) ) );
  connect( registerButton_,    SIGNAL(leftClickedUrl()              ), this,  SLOT( showRegisterPassport()     ) );
  connect( verifyButton_,      SIGNAL(leftClickedUrl()              ), this,  SLOT(   showVerifyPassport()     ) );
  connect( rememberCheckbox_,  SIGNAL(       toggled(bool)          ), this,  SLOT(    rememberMeToggled(bool) ) );

  // Find the default picture
  KStandardDirs *dirs    = KGlobal::dirs();
  QString defaultPicture ( dirs->findResource( "data", "kmess/pics/kmesspic.png" ) );

  // Load the picture in the X-Server:
  defaultPixmap_ = QPixmap(defaultPicture);
  customPixmap_  = defaultPixmap_;

  // Create the "Change..." button actions
  KMenu   *browsePopup   = new KMenu( this );
  KAction *browseSimple  = new KAction( KIcon("folder-open"), i18n("Browse..."),                  this );
  KAction *browseResize  = new KAction( KIcon("edit-cut"),    i18n("Browse and Crop Picture..."), this );
  KAction *setPrevious   = new KAction( KIcon("edit-redo"),   i18n("Set Previous Image..."),     this );
  connect( browseSimple, SIGNAL(activated()), this,  SLOT(pictureBrowseSimple() ) );
  connect( browseResize, SIGNAL(activated()), this,  SLOT(pictureBrowseResize() ) );
  connect( setPrevious,  SIGNAL(activated()), this,  SLOT( pictureSetPrevious() ) );

  // Plug the items into the browse menu button
  browsePopup->addAction( browseSimple );
  browsePopup->addAction( browseResize );
  browsePopup->addAction( setPrevious  );

  // Assign the new popup to the button and detach old connection
  browseButton_->setMenu( browsePopup );
  disconnect( browseButton_, SIGNAL( clicked() ) );

  // Add the items to the initial status combo box
  QStringList states;
  states << i18n("Online")
         << i18n("Away")
         << i18n("Be Right Back")
         << i18n("Busy")
         << i18n("Out to Lunch")
         << i18n("On the Phone")
         << i18n("Invisible");
  initialStatus_->addItems( states );

  // Default the path to the display picture original
  originalPicturePath_ = QString();
}


Generated by  Doxygen 1.6.0   Back to index