Source Code (Use browser search to find items of interest.)

Class Index

empath'EmpathMessageMarkDialog (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.h:38)

class EmpathMessageMarkDialog : public KDialog
{
    Q_OBJECT

    public:
        
        enum MarkType { On, Off, Toggle };
        
        EmpathMessageMarkDialog(QWidget * parent = 0, const char * name = 0);

        ~EmpathMessageMarkDialog();

        MarkType markType();
        EmpathIndexRecord::Status status();

    protected slots:

        void s_OK();
        void s_Cancel();
        void s_Help();

    private:

        KButtonBox      * buttonBox_;
        
        QPushButton     * pb_OK_;
        QPushButton     * pb_Cancel_;
        QPushButton     * pb_Help_;

        QLabel          * l_tagged_;
        QLabel          * l_replied_;
        QLabel          * l_read_;
        
        QRadioButton    * rb_tagged_;
        QRadioButton    * rb_replied_;
        QRadioButton    * rb_read_;
        
        QRadioButton    * rb_on_;
        QRadioButton    * rb_off_;
        QRadioButton    * rb_toggle_;
        
        QButtonGroup    * typeButtonGroup_;
        QButtonGroup    * stateButtonGroup_;
};

#endif
// vim:ts=4:sw=4:tw=78

empath'EmpathMessageMarkDialog::EmpathMessageMarkDialog() (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.cpp:40)

EmpathMessageMarkDialog::EmpathMessageMarkDialog(
        QWidget * parent,
        const char * name)
    :   KDialog(parent, name, true)
{
    setCaption(i18n("Mark Messages"));

    typeButtonGroup_    = new QButtonGroup(this, "typeButtonGroup");
    
    typeButtonGroup_->hide();
    typeButtonGroup_->setExclusive(true);

    stateButtonGroup_    = new QButtonGroup(this, "stateButtonGroup");
    
    stateButtonGroup_->hide();
    stateButtonGroup_->setExclusive(true);

    // Mark type group box

    rb_tagged_    =
        new QRadioButton(i18n("Tagged"), this, "rb_tagged");
    
    QWhatsThis::add(rb_tagged_, i18n(
            "Tagging messages is for your own\n"
            "benefit. You can use this to simply\n"
            "remember which messages you are interested\n"
            "in; you can select 'tagged messages' for\n"
            "some operations."));
    
    rb_replied_    =
        new QRadioButton(i18n("Replied"), this, "rb_replied");
    
    QWhatsThis::add(rb_replied_, i18n(
            "You can mark a message as replied to\n"
            "if you wish. Why you'd want to is your\n"
            "business."));
    
    rb_read_    =
        new QRadioButton(i18n("Read"), this, "rb_read");
    
    QWhatsThis::add(rb_read_, i18n(
            "Marking messages as read is useful when\n"
            "you know you're not interested in some messages\n"
            "and don't want to read them. They'll henceforth\n"
            "be treated just the same as those you really have\n"
            "read."));

    rb_tagged_->setChecked(true);
        
    // State group box

    rb_on_    =
        new QRadioButton(i18n("On"), this, "rb_on");
    
    QWhatsThis::add(rb_on_, i18n(
            "If you select this then every selected message\n"
            "will have its state switched on. For example,\n"
            "if you select 'Tag' and 'On' then untagged messages\n"
            "will become tagged."));
    
    rb_off_    =
        new QRadioButton(i18n("Off"), this, "rb_off");
    
    QWhatsThis::add(rb_off_, i18n(
            "If you select this then every selected message\n"
            "will have its state switched off. For example,\n"
            "if you select 'Tag' and 'Off' then tagged messages\n"
            "will become untagged."));
    
    rb_toggle_    =
        new QRadioButton(i18n("Toggle"), this, "rb_toggle");
    
    QWhatsThis::add(rb_toggle_, i18n(
            "If you select this then every selected message\n"
            "will have its state toggled. For example, if you\n"
            "select 'Tag' and 'Toggle' then tagged messages\n"
            "will be untagged, and vice versa."));
    
    rb_on_->setChecked(true);
    
    l_tagged_   = new QLabel(this);
    
    l_tagged_->setPixmap(BarIcon("tree-marked"));
    
    l_replied_  = new QLabel(this);
    
    
    l_replied_->setPixmap(BarIcon("tree-replied"));
    
    l_read_     = new QLabel(this);

    l_read_->setPixmap(BarIcon("tree-read"));
    
    stateButtonGroup_->insert(rb_tagged_,   EmpathIndexRecord::Marked);
    stateButtonGroup_->insert(rb_replied_,  EmpathIndexRecord::Replied);
    stateButtonGroup_->insert(rb_read_,     EmpathIndexRecord::Read);

    typeButtonGroup_->insert(rb_on_,     On);
    typeButtonGroup_->insert(rb_off_,    Off);
    typeButtonGroup_->insert(rb_toggle_, Toggle);

    // Button box
    
    buttonBox_ = new KButtonBox(this);
    
    pb_Help_    = buttonBox_->addButton(i18n("&Help"));
    buttonBox_->addStretch();
    pb_OK_        = buttonBox_->addButton(i18n("&OK"));
    pb_Cancel_    = buttonBox_->addButton(i18n("&Cancel"));
    buttonBox_->layout();
    
    QObject::connect(pb_Help_, SIGNAL(clicked()),
            this, SLOT(s_Help()));
    
    QObject::connect(pb_OK_, SIGNAL(clicked()),
            this, SLOT(s_OK()));
    
    QObject::connect(pb_Cancel_, SIGNAL(clicked()),
            this, SLOT(s_Cancel()));
    
    // Layouts
    
    QVBoxLayout * layout = new QVBoxLayout(this, spacingHint());

    QGridLayout * layout2 = new QGridLayout(layout);

    layout2->addWidget(rb_tagged_,  0, 0);
    layout2->addWidget(rb_replied_, 1, 0);
    layout2->addWidget(rb_read_,    2, 0);

    layout2->addWidget(l_tagged_,  0, 1);
    layout2->addWidget(l_replied_, 1, 1);
    layout2->addWidget(l_read_,    2, 1);
    
    layout2->addWidget(rb_on_,      0, 2);
    layout2->addWidget(rb_off_,     1, 2);
    layout2->addWidget(rb_toggle_,  2, 2);


    layout->addStretch(10);
    layout->addWidget(new QLabel(this));

    layout->addWidget(buttonBox_);
}


empath'EmpathMessageMarkDialog::~EmpathMessageMarkDialog() (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.cpp:185)

EmpathMessageMarkDialog::~EmpathMessageMarkDialog()
{
    // Empty.
}

    void

empath'EmpathMessageMarkDialog::s_OK() (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.cpp:191)

EmpathMessageMarkDialog::s_OK()
{
    accept();
}

    void

empath'EmpathMessageMarkDialog::s_Cancel() (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.cpp:197)

EmpathMessageMarkDialog::s_Cancel()
{
    reject();
}

    void

empath'EmpathMessageMarkDialog::s_Help() (./kdepim/empath/parts/libEmpathMessageListWidget/EmpathMessageMarkDialog.cpp:203)

EmpathMessageMarkDialog::s_Help()
{
}

    EmpathMessageMarkDialog::MarkType
EmpathMessageMarkDialog::markType()
{
    return (
        (EmpathMessageMarkDialog::MarkType)
        (typeButtonGroup_->id(typeButtonGroup_->selected())));
}

    EmpathIndexRecord::Status
EmpathMessageMarkDialog::status()
{
    return (
        (EmpathIndexRecord::Status)
        (stateButtonGroup_->id(stateButtonGroup_->selected())));
}

// vim:ts=4:sw=4:tw=78