//VOXOX - JRT - 2009.07.26 void CUserProfile::sendFax( const std::string& contactId, const std::string & faxNumberIn ) { std::string faxNumber = faxNumberIn; if ( faxNumber.empty() ) { Contact* contact = getCContactList().getContactById( contactId ); if ( contact ) { faxNumber = contact->getFax(); } } if ( !faxNumber.empty() ) { sendFax( faxNumber ); } }
FaxPanel::FaxPanel(QWidget *parent) : XLet(parent), m_mainwindow(parent) { // qDebug() << Q_FUNC_INFO << parent; setTitle( tr("Fax") ); QVBoxLayout * vlayout = new QVBoxLayout(this); // QGroupBox * groupBox1 = new QGroupBox( tr("Choose Destination Number") ); groupBox1->setAlignment( Qt::AlignLeft ); QHBoxLayout * hbox1 = new QHBoxLayout( groupBox1 ); QLabel * lblfax = new QLabel(tr("Fax Number"), this); m_destination = new QLineEdit(this); QPushButton * directory = new QPushButton( tr("Directory"), this); connect(directory, SIGNAL(clicked()), this, SLOT(dirLookup())); connect(m_destination, SIGNAL(textChanged(const QString &)), this, SLOT(destNumberChanged(const QString &))); hbox1->addWidget(lblfax); hbox1->addWidget(m_destination); hbox1->addWidget(directory); lblfax->setObjectName("fax"); // QGroupBox * groupBox2 = new QGroupBox( tr("Choose File to Send") ); groupBox2->setAlignment( Qt::AlignLeft ); QHBoxLayout * hbox2 = new QHBoxLayout( groupBox2 ); m_openFileNameLabel = new FileNameLineEdit(this); connect(m_openFileNameLabel, SIGNAL(textChanged(const QString &)), this, SLOT(fileNameChanged(const QString &))); QPushButton * openFileNamesButton = new QPushButton( tr("Browse"), this); connect(openFileNamesButton, SIGNAL(clicked()), this, SLOT(setOpenFileName())); hbox2->addWidget(m_openFileNameLabel); hbox2->addWidget(openFileNamesButton); // QGroupBox * groupBox3 = new QGroupBox( tr("Hide the Number ?") ); groupBox3->setAlignment( Qt::AlignLeft ); QHBoxLayout * hbox3 = new QHBoxLayout( groupBox3 ); m_maskornot = new QCheckBox(tr("Hide Number"), this); //int previous_hide = b_engine->getSettings()->value("faxhistory/hidenumber", 0).toUInt(); //m_maskornot->setCheckState((Qt::CheckState)previous_hide); m_maskornot->setCheckState(Qt::Unchecked); hbox3->addStretch(1); hbox3->addWidget(m_maskornot); hbox3->addStretch(1); // QGroupBox * groupBox4 = new QGroupBox( tr("Send your File") ); groupBox4->setAlignment( Qt::AlignLeft ); QHBoxLayout * hbox4 = new QHBoxLayout( groupBox4 ); m_sendButton = new QPushButton( tr("Send"), this); m_sendButton->setEnabled(false); connect(m_sendButton, SIGNAL(clicked()), this, SLOT(sendFax())); hbox4->addStretch(1); hbox4->addWidget(m_sendButton); hbox4->addStretch(1); vlayout->addWidget(groupBox1); vlayout->addWidget(groupBox2); //vlayout->addWidget(groupBox3); vlayout->addWidget(groupBox4); vlayout->addStretch(1); // connect signals / slots connect( b_engine, SIGNAL(ackFax(const QString &, const QString &)), this, SLOT(popupMsg(const QString &, const QString &)) ); }