12 #ifndef UI_CACHEPOLICYPAGE_H
13 #define UI_CACHEPOLICYPAGE_H
15 #include <QtCore/QVariant>
16 #include <QtGui/QAction>
17 #include <QtGui/QApplication>
18 #include <QtGui/QButtonGroup>
19 #include <QtGui/QCheckBox>
20 #include <QtGui/QGridLayout>
21 #include <QtGui/QGroupBox>
22 #include <QtGui/QHBoxLayout>
23 #include <QtGui/QHeaderView>
24 #include <QtGui/QLabel>
25 #include <QtGui/QRadioButton>
26 #include <QtGui/QSpacerItem>
27 #include <QtGui/QStackedWidget>
28 #include <QtGui/QVBoxLayout>
29 #include <QtGui/QWidget>
30 #include "keditlistwidget.h"
31 #include "knuminput.h"
35 class Ui_CachePolicyPage
38 QVBoxLayout *verticalLayout_3;
40 QCheckBox *syncOnDemand;
41 QHBoxLayout *horizontalLayout_3;
43 KIntNumInput *checkInterval;
44 QStackedWidget *stackedWidget;
46 QHBoxLayout *horizontalLayout;
47 QGroupBox *groupBox_2;
48 QGridLayout *gridLayout;
49 KEditListWidget *localParts;
51 QVBoxLayout *verticalLayout_2;
52 QGroupBox *retrievalOptionsGroupBox;
53 QVBoxLayout *verticalLayout;
54 QRadioButton *retrieveFullMessages;
55 QRadioButton *retrieveOnlyHeaders;
56 QHBoxLayout *horizontalLayout_2;
58 KIntNumInput *localCacheTimeout;
59 QSpacerItem *verticalSpacer;
61 void setupUi(QWidget *CachePolicyPage)
63 if (CachePolicyPage->objectName().isEmpty())
64 CachePolicyPage->setObjectName(QString::fromUtf8(
"CachePolicyPage"));
65 CachePolicyPage->setEnabled(
true);
66 CachePolicyPage->resize(602, 461);
67 verticalLayout_3 =
new QVBoxLayout(CachePolicyPage);
68 verticalLayout_3->setObjectName(QString::fromUtf8(
"verticalLayout_3"));
69 inherit =
new QCheckBox(CachePolicyPage);
70 inherit->setObjectName(QString::fromUtf8(
"inherit"));
71 inherit->setChecked(
false);
72 inherit->setTristate(
false);
74 verticalLayout_3->addWidget(inherit);
76 syncOnDemand =
new QCheckBox(CachePolicyPage);
77 syncOnDemand->setObjectName(QString::fromUtf8(
"syncOnDemand"));
79 verticalLayout_3->addWidget(syncOnDemand);
81 horizontalLayout_3 =
new QHBoxLayout();
82 horizontalLayout_3->setObjectName(QString::fromUtf8(
"horizontalLayout_3"));
83 label_2 =
new QLabel(CachePolicyPage);
84 label_2->setObjectName(QString::fromUtf8(
"label_2"));
86 horizontalLayout_3->addWidget(label_2);
88 checkInterval =
new KIntNumInput(CachePolicyPage);
89 checkInterval->setObjectName(QString::fromUtf8(
"checkInterval"));
90 checkInterval->setProperty(
"value", QVariant(-1));
91 checkInterval->setProperty(
"minimum", QVariant(0));
93 horizontalLayout_3->addWidget(checkInterval);
96 verticalLayout_3->addLayout(horizontalLayout_3);
98 stackedWidget =
new QStackedWidget(CachePolicyPage);
99 stackedWidget->setObjectName(QString::fromUtf8(
"stackedWidget"));
100 rawPage =
new QWidget();
101 rawPage->setObjectName(QString::fromUtf8(
"rawPage"));
102 horizontalLayout =
new QHBoxLayout(rawPage);
103 horizontalLayout->setContentsMargins(0, 0, 0, 0);
104 horizontalLayout->setObjectName(QString::fromUtf8(
"horizontalLayout"));
105 groupBox_2 =
new QGroupBox(rawPage);
106 groupBox_2->setObjectName(QString::fromUtf8(
"groupBox_2"));
107 gridLayout =
new QGridLayout(groupBox_2);
108 gridLayout->setObjectName(QString::fromUtf8(
"gridLayout"));
109 localParts =
new KEditListWidget(groupBox_2);
110 localParts->setObjectName(QString::fromUtf8(
"localParts"));
111 localParts->setEnabled(
false);
112 localParts->setButtons(KEditListWidget::Add|KEditListWidget::Remove);
114 gridLayout->addWidget(localParts, 0, 0, 1, 1);
117 horizontalLayout->addWidget(groupBox_2);
119 stackedWidget->addWidget(rawPage);
120 endUserPage =
new QWidget();
121 endUserPage->setObjectName(QString::fromUtf8(
"endUserPage"));
122 verticalLayout_2 =
new QVBoxLayout(endUserPage);
123 verticalLayout_2->setContentsMargins(0, 0, 0, 0);
124 verticalLayout_2->setObjectName(QString::fromUtf8(
"verticalLayout_2"));
125 retrievalOptionsGroupBox =
new QGroupBox(endUserPage);
126 retrievalOptionsGroupBox->setObjectName(QString::fromUtf8(
"retrievalOptionsGroupBox"));
127 verticalLayout =
new QVBoxLayout(retrievalOptionsGroupBox);
128 verticalLayout->setObjectName(QString::fromUtf8(
"verticalLayout"));
129 retrieveFullMessages =
new QRadioButton(retrievalOptionsGroupBox);
130 retrieveFullMessages->setObjectName(QString::fromUtf8(
"retrieveFullMessages"));
131 retrieveFullMessages->setChecked(
true);
133 verticalLayout->addWidget(retrieveFullMessages);
135 retrieveOnlyHeaders =
new QRadioButton(retrievalOptionsGroupBox);
136 retrieveOnlyHeaders->setObjectName(QString::fromUtf8(
"retrieveOnlyHeaders"));
138 verticalLayout->addWidget(retrieveOnlyHeaders);
140 horizontalLayout_2 =
new QHBoxLayout();
141 horizontalLayout_2->setObjectName(QString::fromUtf8(
"horizontalLayout_2"));
142 label =
new QLabel(retrievalOptionsGroupBox);
143 label->setObjectName(QString::fromUtf8(
"label"));
145 horizontalLayout_2->addWidget(label);
147 localCacheTimeout =
new KIntNumInput(retrievalOptionsGroupBox);
148 localCacheTimeout->setObjectName(QString::fromUtf8(
"localCacheTimeout"));
149 localCacheTimeout->setProperty(
"value", QVariant(-1));
150 localCacheTimeout->setProperty(
"minimum", QVariant(0));
152 horizontalLayout_2->addWidget(localCacheTimeout);
155 verticalLayout->addLayout(horizontalLayout_2);
157 verticalSpacer =
new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding);
159 verticalLayout->addItem(verticalSpacer);
162 verticalLayout_2->addWidget(retrievalOptionsGroupBox);
164 stackedWidget->addWidget(endUserPage);
166 verticalLayout_3->addWidget(stackedWidget);
169 retranslateUi(CachePolicyPage);
170 QObject::connect(inherit, SIGNAL(toggled(
bool)), localParts, SLOT(setDisabled(
bool)));
171 QObject::connect(retrieveOnlyHeaders, SIGNAL(toggled(
bool)), label, SLOT(setEnabled(
bool)));
172 QObject::connect(retrieveOnlyHeaders, SIGNAL(toggled(
bool)), localCacheTimeout, SLOT(setEnabled(
bool)));
173 QObject::connect(inherit, SIGNAL(toggled(
bool)), syncOnDemand, SLOT(setDisabled(
bool)));
174 QObject::connect(inherit, SIGNAL(toggled(
bool)), label_2, SLOT(setDisabled(
bool)));
175 QObject::connect(inherit, SIGNAL(toggled(
bool)), checkInterval, SLOT(setDisabled(
bool)));
177 stackedWidget->setCurrentIndex(1);
180 QMetaObject::connectSlotsByName(CachePolicyPage);
183 void retranslateUi(QWidget *CachePolicyPage)
185 inherit->setText(tr2i18n(
"Use options from parent folder or account", 0));
186 syncOnDemand->setText(tr2i18n(
"Synchronize when selecting this folder", 0));
187 label_2->setText(tr2i18n(
"Automatically synchronize after:", 0));
188 checkInterval->setProperty(
"suffix", QVariant(tr2i18n(
"minutes", 0)));
189 checkInterval->setProperty(
"specialValueText", QVariant(tr2i18n(
"Never",
"never check the cache")));
190 groupBox_2->setTitle(tr2i18n(
"Locally Cached Parts", 0));
191 localParts->setProperty(
"title", QVariant(tr2i18n(
"Locally Cached Parts", 0)));
192 retrievalOptionsGroupBox->setTitle(tr2i18n(
"Retrieval Options", 0));
193 retrieveFullMessages->setText(tr2i18n(
"Always retrieve full messages", 0));
194 retrieveOnlyHeaders->setText(tr2i18n(
"Retrieve message bodies on demand", 0));
195 label->setText(tr2i18n(
"Keep message bodies locally for:", 0));
196 localCacheTimeout->setProperty(
"suffix", QVariant(tr2i18n(
"minutes", 0)));
197 localCacheTimeout->setProperty(
"specialValueText", QVariant(tr2i18n(
"Forever",
"no cache timeout")));
198 Q_UNUSED(CachePolicyPage);
204 class CachePolicyPage:
public Ui_CachePolicyPage {};
209 #endif // CACHEPOLICYPAGE_H