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

void ChatLoggingPage::saveSettings ( Account account  ) 

Save account information from the chat logging widget.

Calls the set-up methods from Account to change its properties, based on how the user has set the widgets of this page.

Definition at line 101 of file chatloggingpage.cpp.

References Account::EXPORT_HTML, Account::EXPORT_TEXT, and Account::setChatLoggingInformation().

{
  int directoryStructure = Account::BYMONTH;

  if( singleDirectoryRadioButton_->isChecked() )
  {
    directoryStructure = Account::SINGLEDIRECTORY;
  }
  else if( yearRadioButton_->isChecked() )
  {
    directoryStructure = Account::BYYEAR;
  }
  else if( monthRadioButton_->isChecked() )
  {
    directoryStructure = Account::BYMONTH;
  }
  else if( dayRadioButton_->isChecked() )
  {
    directoryStructure = Account::BYDAY;
  }

  Account::ChatExportFormat format;
  switch( fileFormatComboBox_->currentIndex() )
  {
    case 1:  format = Account::EXPORT_TEXT; break;
    case 0:
    default: format = Account::EXPORT_HTML; break;
  }

  account->setChatLoggingInformation( logChatsCheckBox_       ->isChecked(),
                                      saveChatsToFileCheckBox_->isChecked(),
                                      format,
                                      chatSavePathEdit_       ->text(),
                                      directoryStructure );
}


Generated by  Doxygen 1.6.0   Back to index