void
new_mail_widget::create_actions()
{
  m_action_send_msg = new QAction(FT_MAKE_ICON(FT_ICON16_SEND),
				  tr("Send mail"), this);
  connect(m_action_send_msg, SIGNAL(activated()), this, SLOT(send()));

  m_action_attach_file = new QAction(FT_MAKE_ICON(FT_ICON16_ATTACH),
				     tr("Attach file"), this);
  connect(m_action_attach_file, SIGNAL(activated()), this, SLOT(attach_files()));

  m_action_insert_file = new QAction(FT_MAKE_ICON(FT_ICON16_OPENFILE),
				     tr("Insert text file"), this);
  connect(m_action_insert_file, SIGNAL(activated()), this, SLOT(insert_file()));

  m_action_edit_note = new QAction(FT_MAKE_ICON(FT_ICON16_EDIT_NOTE),
				   tr("Edit note"), this);
  connect(m_action_edit_note, SIGNAL(activated()), this, SLOT(edit_note()));

  m_action_add_header = new QAction(FT_MAKE_ICON(ICON16_HEADER),
				   tr("Add header field"), this);
  connect(m_action_add_header, SIGNAL(activated()), this, SLOT(add_field_editor()));

  m_action_open_notepad = new QAction(FT_MAKE_ICON(ICON16_NOTEPAD),
				   tr("Open global notepad"), this);
  connect(m_action_open_notepad, SIGNAL(activated()), this, SLOT(open_global_notepad()));

}
Exemple #2
0
header_field_editor::header_field_editor(QWidget* parent)
{
  static const char* defaults[] = {
    // the contents must be aligned with enum header_index
    QT_TR_NOOP("To"),
    QT_TR_NOOP("Cc"),
    QT_TR_NOOP("Bcc"),
    QT_TR_NOOP("ReplyTo"),
    QT_TR_NOOP("Remove...")
  };

  m_cb = new QComboBox(parent);
  for (uint i=0; i<sizeof(defaults)/sizeof(defaults[0]); i++) {
    m_cb->addItem(tr(defaults[i]));
  }
  connect(m_cb, SIGNAL(currentIndexChanged(int)), this, SLOT(cb_changed(int)));
  m_lineedit = new edit_address_widget(parent);
  m_more_button = new QPushButton(FT_MAKE_ICON(FT_ICON16_ADDRESSBOOK), "", parent);
  connect(m_more_button, SIGNAL(clicked()), this, SLOT(more_addresses()));
}