예제 #1
0
GenericViewer::GenericViewer( QWidget* parent )
    : QMailViewerInterface( parent ),
      browser( new Browser(parent) ),
      message( 0 ),
      plainTextMode( false ),
      containsNumbers( false )
{
    connect(browser, SIGNAL(anchorClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
    connect(browser, SIGNAL(highlighted(QUrl)), this, SLOT(linkHighlighted(QUrl)));
    connect(browser, SIGNAL(finished()), this, SIGNAL(finished()));

    plainTextModeAction = new QAction(QIcon(":icon/txt"), tr("Plain text"), this);
    plainTextModeAction->setVisible(!plainTextMode);
    plainTextModeAction->setWhatsThis(tr("Display the message contents in Plain text format."));

    richTextModeAction = new QAction(QIcon(":icon/txt"), tr("Rich text"), this);
    richTextModeAction->setVisible(plainTextMode);
    richTextModeAction->setWhatsThis(tr("Display the message contents in Rich text format."));

    printAction = new QAction(QIcon(":icon/print"), tr("Print"), this);
    printAction->setVisible(false);
    printAction->setWhatsThis(tr("Print the message contents."));

    dialAction = new QAction(this);
    dialAction->setVisible(false);
}
예제 #2
0
/* ContactBrowser */
ContactBrowser::ContactBrowser( QWidget *parent, const char * objectName)
    : QDLBrowserClient( parent, "contactnotes" )
{
    setObjectName(objectName);

    setFrameStyle(NoFrame);
    setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
    setWordWrapMode(QTextOption::WrapAtWordBoundaryOrAnywhere);

    connect(this, SIGNAL(highlighted(QString)),
            this, SLOT(linkHighlighted(QString)));

    QSoftMenuBar::setLabel(this, Qt::Key_Back,
        QSoftMenuBar::Back, QSoftMenuBar::AnyFocus);
    QSoftMenuBar::setLabel(this, Qt::Key_Select,
        QSoftMenuBar::NoLabel, QSoftMenuBar::AnyFocus);
    mDocument = NULL;
}