File: mailconfigbase.cpp

package info (click to toggle)
aethera 0.9.3-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 8,588 kB
  • ctags: 7,282
  • sloc: cpp: 64,544; sh: 9,913; perl: 1,756; makefile: 1,680; python: 258
file content (121 lines) | stat: -rw-r--r-- 4,760 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/****************************************************************************
** Form implementation generated from reading ui file 'uic/mailconfigbase.ui'
**
** Created: Sun Nov 26 00:34:25 2000
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "mailconfigbase.h"

#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a MailConfigBase which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 */
MailConfigBase::MailConfigBase( QWidget* parent,  const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "MailConfigBase" );
    resize( 549, 480 ); 
    setCaption( tr( "Mail"  ) );
    MailConfigBaseLayout = new QGridLayout( this ); 
    MailConfigBaseLayout->setSpacing( 6 );
    MailConfigBaseLayout->setMargin( 11 );

    moveCheck = new QCheckBox( this, "moveCheck" );
    moveCheck->setText( tr( "Move the messages in the \"Trash\" folder on deletion"  ) );

    MailConfigBaseLayout->addMultiCellWidget( moveCheck, 3, 3, 1, 5 );

    forwardCombo = new QComboBox( FALSE, this, "forwardCombo" );
    forwardCombo->insertItem( tr( "Inline" ) );
    forwardCombo->insertItem( tr( "Quoted" ) );
    forwardCombo->insertItem( tr( "As attachment" ) );

    MailConfigBaseLayout->addMultiCellWidget( forwardCombo, 4, 4, 2, 5 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    MailConfigBaseLayout->addItem( spacer, 5, 3 );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    MailConfigBaseLayout->addItem( spacer_2, 1, 0 );

    TextLabel3 = new QLabel( this, "TextLabel3" );
    TextLabel3->setText( tr( "Forward messages:"  ) );

    MailConfigBaseLayout->addWidget( TextLabel3, 4, 1 );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    MailConfigBaseLayout->addItem( spacer_3, 2, 6 );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setText( tr( "Mark messages as read after"  ) );
    TextLabel1->setMaximumSize( QSize( 170, 32767 ) );

    MailConfigBaseLayout->addMultiCellWidget( TextLabel1, 2, 2, 1, 2 );

    secondsEdit = new QLineEdit( this, "secondsEdit" );
    secondsEdit->setMinimumSize( QSize( 40, 0 ) );
    secondsEdit->setMaximumSize( QSize( 40, 32767 ) );

    MailConfigBaseLayout->addWidget( secondsEdit, 2, 3 );

    TextLabel2 = new QLabel( this, "TextLabel2" );
    TextLabel2->setText( tr( "seconds."  ) );
    TextLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)1, TextLabel2->sizePolicy().hasHeightForWidth() ) );

    MailConfigBaseLayout->addWidget( TextLabel2, 2, 4 );
    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    MailConfigBaseLayout->addItem( spacer_4, 2, 5 );

    receivedCheck = new QCheckBox( this, "receivedCheck" );
    receivedCheck->setText( tr( "Display received time instead of send time"  ) );

    MailConfigBaseLayout->addMultiCellWidget( receivedCheck, 1, 1, 1, 5 );
    QSpacerItem* spacer_5 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    MailConfigBaseLayout->addItem( spacer_5, 0, 2 );

    // signals and slots connections
    connect( receivedCheck, SIGNAL( clicked() ), this, SLOT( receivedClicked() ) );
    connect( secondsEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( secondsChanged(const QString &) ) );
    connect( moveCheck, SIGNAL( clicked() ), this, SLOT( moveClicked() ) );
    connect( forwardCombo, SIGNAL( highlighted(const QString&) ), this, SLOT( forwardChanged(const QString &) ) );
    connect( forwardCombo, SIGNAL( activated(const QString&) ), this, SLOT( forwardChanged(const QString &) ) );
}

/*  
 *  Destroys the object and frees any allocated resources
 */
MailConfigBase::~MailConfigBase()
{
    // no need to delete child widgets, Qt does it all for us
}

void MailConfigBase::moveClicked()
{
    qWarning( "MailConfigBase::moveClicked(): Not implemented yet!" );
}

void MailConfigBase::forwardChanged(const QString &)
{
    qWarning( "MailConfigBase::forwardChanged(const QString &): Not implemented yet!" );
}

void MailConfigBase::receivedClicked()
{
    qWarning( "MailConfigBase::receivedClicked(): Not implemented yet!" );
}

void MailConfigBase::secondsChanged(const QString &)
{
    qWarning( "MailConfigBase::secondsChanged(const QString &): Not implemented yet!" );
}