kalarm
prefdlg.cpp
  
Go to the documentation of this file.
  141         KWindowInfo info = KWindowSystem::windowInfo(mInstance->winId(), NET::WMGeometry | NET::WMDesktop);
  144         mInstance->setWindowState(mInstance->windowState() & ~Qt::WindowMinimized); // un-minimize it if necessary
  164     mMiscPageItem = new KPageWidgetItem(mMiscPage, i18nc("@title:tab General preferences", "General"));
  182     mEmailPageItem = new KPageWidgetItem(mEmailPage, i18nc("@title:tab Email preferences", "Email"));
  271     switch (KAMessageBox::questionYesNoCancel(this, i18nc("@info", "Reset all tabs to their default values, or only reset the current tab?"),
  428           "<para>This option should always be checked unless you intend to discontinue use of <application>KAlarm</application>.</para>"));
  432     mQuitWarn->setWhatsThis(i18nc("@info:whatsthis", "Check to display a warning prompt before quitting <application>KAlarm</application>."));
  440     mConfirmAlarmDeletion = new QCheckBox(i18nc("@option:check", "Confirm alarm deletions"), itemBox);
  442     mConfirmAlarmDeletion->setWhatsThis(i18nc("@info:whatsthis", "Check to be prompted for confirmation each time you delete an alarm."));
  454           "Enter the default time interval (hours & minutes) to defer alarms, used by the Defer Alarm dialog."));
  461     group->setWhatsThis(i18nc("@info:whatsthis", "Choose which application to use when a command alarm is executed in a terminal window"));
  487                 i18nc("@info:whatsthis", "Check to execute command alarms in a terminal window by <icode>%1</icode>", cmd));
  496     QRadioButton* radio = new QRadioButton(i18nc("@option:radio Other terminal window command", "Other:"), group);
  506           i18nc("@info:whatsthis", "Enter the full command line needed to execute a command in your chosen terminal window. "
  508                "See the <application>KAlarm</application> Handbook for details of special codes to tailor the command line.");
  552                 if (KAMessageBox::warningContinueCancel(topWidget(), i18nc("@info", "Command to invoke terminal window not found: <command>%1</command>", cmd))
  577         Preferences::setAutoStartChangedByUser(true);  // prevent prompting the user on quit, about start-at-login
  595                                    i18nc("@info", "You should not uncheck this option unless you intend to discontinue use of <application>KAlarm</application>"),
  659         QString languageName = KGlobal::locale()->languageCodeToName(HolidayRegion::languageCode(regionCode));
  660         QString label = languageName.isEmpty() ? name : i18nc("Holiday region, region language", "%1 (%2)", name, languageName);
  705     daybox->setWhatsThis(i18nc("@info:whatsthis", "Check the days in the week which are work days"));
  755           "<para>Enter the event duration in hours and minutes, for alarms which are copied to KOrganizer.</para>"
  782     int i = Preferences::holidays().isValid() ? mHolidays->findData(Preferences::holidays().regionCode()) : 0;
  840     QGroupBox* group = new QGroupBox(i18nc("@title:group", "New Alarms && Templates"), topWidget());
  846     mDefaultResource = new QRadioButton(i18nc("@option:radio", "Store in default calendar"), group);
  848     mDefaultResource->setWhatsThis(i18nc("@info:whatsthis", "Add all new alarms and alarm templates to the default calendars, without prompting."));
  850     mAskResource = new QRadioButton(i18nc("@option:radio", "Prompt for which calendar to store in"), group);
  853           "<para>When saving a new alarm or alarm template, prompt for which calendar to store it in, if there is more than one active calendar.</para>"
  854           "<para>Note that archived alarms are always stored in the default archived alarm calendar.</para>"));
  867           i18nc("@info:whatsthis", "Check to archive alarms after expiry or deletion (except deleted alarms which were never triggered)."));
  883     box->setWhatsThis(i18nc("@info:whatsthis", "Uncheck to store archived alarms indefinitely. Check to enter how long archived alarms should be stored."));
  890     mClearArchived->setWhatsThis((CollectionControlModel::enabledCollections(CalEvent::ARCHIVED, false).count() <= 1)
  892     mClearArchived->setWhatsThis((AlarmResources::instance()->activeCount(CalEvent::ARCHIVED, false) <= 1)
  895             : i18nc("@info:whatsthis", "Delete all existing archived alarms (from the default archived alarm calendar only)."));
  921     int days = !mKeepArchived->isChecked() ? 0 : mPurgeArchived->isChecked() ? mPurgeAfter->value() : -1;
  946              i18nc("@info", "<para>A default calendar is required in order to archive alarms, but none is currently enabled.</para>"
  947                   "<para>If you wish to keep expired alarms, please first use the calendars view to select a default "
  962     bool single = CollectionControlModel::enabledCollections(CalEvent::ARCHIVED, false).count() <= 1;
  966     if (KAMessageBox::warningContinueCancel(topWidget(), single ? i18nc("@info", "Do you really want to delete all archived alarms?")
  967                                                                 : i18nc("@info", "Do you really want to delete all alarms in the default archived alarm calendar?"))
  996     connect(mEmailClient, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotEmailClientChanged(QAbstractButton*)));
 1000           "<list><item><interface>%1</interface>: The email is sent automatically via <application>KMail</application>. <application>KMail</application> is started first if necessary.</item>"
 1001           "<item><interface>%2</interface>: The email is sent automatically. This option will only work if "
 1002           "your system is configured to use <application>sendmail</application> or a sendmail compatible mail transport agent.</item></list></para>",
 1007     mEmailCopyToKMail = new QCheckBox(i18nc("@option:check", "Copy sent emails into <application>KMail</application>'s <resource>%1</resource> folder", KAMail::i18n_sent_mail()), box);
 1008     mEmailCopyToKMail->setWhatsThis(i18nc("@info:whatsthis", "After sending an email, store a copy in <application>KMail</application>'s <resource>%1</resource> folder", KAMail::i18n_sent_mail()));
 1014     mEmailQueuedNotify = new QCheckBox(i18nc("@option:check", "Notify when remote emails are queued"), box);
 1016           i18nc("@info:whatsthis", "Display a notification message whenever an email alarm has queued an email for sending to a remote system. "
 1017                "This could be useful if, for example, you have a dial-up connection, so that you can then ensure that the email is actually transmitted."));
 1032     connect(mFromAddressGroup, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotFromAddrChanged(QAbstractButton*)));
 1041     QString whatsThis = i18nc("@info:whatsthis", "Your email address, used to identify you as the sender when sending email alarms.");
 1048     mFromCCentreButton = new RadioButton(i18nc("@option:radio", "Use address from System Settings"), group);
 1051           i18nc("@info:whatsthis", "Check to use the email address set in KDE System Settings, to identify you as the sender when sending email alarms."));
 1054     // 'From' email address to be picked from KMail's identities when the email alarm is configured
 1055     mFromKMailButton = new RadioButton(i18nc("@option:radio", "Use <application>KMail</application> identities"), group);
 1058           i18nc("@info:whatsthis", "Check to use <application>KMail</application>'s email identities to identify you as the sender when sending email alarms. "
 1059                "For existing email alarms, <application>KMail</application>'s default identity will be used. "
 1060                "For new email alarms, you will be able to pick which of <application>KMail</application>'s identities to use."));
 1068     connect(mBccAddressGroup, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotBccAddrChanged(QAbstractButton*)));
 1076     whatsThis = i18nc("@info:whatsthis", "Your email address, used for blind copying email alarms to yourself. "
 1077                      "If you want blind copies to be sent to your account on the computer which <application>KAlarm</application> runs on, you can simply enter your user login name.");
 1084     mBccCCentreButton = new RadioButton(i18nc("@option:radio", "Use address from System Settings"), group);
 1087           i18nc("@info:whatsthis", "Check to use the email address set in KDE System Settings, for blind copying email alarms to yourself."));
 1100     setEmailBccAddress((Preferences::emailBccFrom() == Preferences::MAIL_FROM_SYS_SETTINGS), Preferences::emailBccAddress());
 1120     Preferences::MailFrom bfrom = b ? Preferences::MAIL_FROM_SYS_SETTINGS : Preferences::MAIL_FROM_ADDR;;
 1138     mBccAddressGroup->setButton(useSystemSettings ? Preferences::MAIL_FROM_SYS_SETTINGS : Preferences::MAIL_FROM_ADDR);
 1164         QString errmsg = validateAddr(mFromAddressGroup, mEmailAddress, KAMail::i18n_NeedFromEmailAddress());
 1171         return validateAddr(mBccAddressGroup, mEmailBccAddress, i18nc("@info/plain", "No valid 'Bcc' email address is specified."));
 1178     QString errmsg = i18nc("@info", "<para>%1</para><para>Are you sure you want to save your changes?</para>", msg);
 1184             errmsg = i18nc("@info", "No email address is currently set in KDE System Settings. %1", errmsg);
 1189             errmsg = i18nc("@info", "No <application>KMail</application> identities currently exist. %1", errmsg);
 1207     KLocalizedString defsetting = ki18nc("@info:whatsthis", "The default setting for <interface>%1</interface> in the alarm edit dialog.");
 1228     mCopyToKOrganizer->setWhatsThis(defsetting.subs(EditAlarmDlg::i18n_chk_ShowInKOrganizer()).toString());
 1236     mLateCancel->setWhatsThis(defsetting.subs(LateCancelSelector::i18n_chk_CancelIfLate()).toString());
 1256     iBox->setWhatsThis(i18nc("@info:whatsthis", "The default setting for the recurrence rule in the alarm edit dialog."));
 1263     label = new QLabel(i18nc("@label", "In non-leap years, repeat yearly February 29th alarms on:"), vbox);
 1283           "For yearly recurrences, choose what date, if any, alarms due on February 29th should occur in non-leap years."
 1284           "<note>The next scheduled occurrence of existing alarms is not re-evaluated when you change this setting.</note>"));
 1298     mConfirmAck->setWhatsThis(defsetting.subs(EditDisplayAlarmDlg::i18n_chk_ConfirmAck()).toString());
 1303     mAutoClose->setWhatsThis(defsetting.subs(LateCancelSelector::i18n_chk_AutoCloseWin()).toString());
 1316     box->setWhatsThis(i18nc("@info:whatsthis", "The default units for the reminder in the alarm edit dialog, for alarms due soon."));
 1345           i18nc("@info:whatsthis sound file 'Repeat' checkbox", "The default setting for sound file <interface>%1</interface> in the alarm edit dialog.", SoundWidget::i18n_chk_Repeat()));
 1360     box->setWhatsThis(i18nc("@info:whatsthis", "Enter the default sound file to use in the alarm edit dialog."));
 1376     mCmdScript->setWhatsThis(defsetting.subs(EditCommandAlarmDlg::i18n_chk_EnterScript()).toString());
 1382     mCmdXterm->setWhatsThis(defsetting.subs(EditCommandAlarmDlg::i18n_radio_ExecInTermWindow()).toString());
 1394     mEmailBcc->setWhatsThis(defsetting.subs(EditEmailAlarmDlg::i18n_chk_CopyEmailToSelf()).toString());
 1402     mFontChooser = new FontColourChooser(topFontColour, QStringList(), i18nc("@title:group", "Message Font && Color"), true);
 1446         mSpecialActionsButton->setActions(Preferences::defaultPreAction(), Preferences::defaultPostAction(), opts);
 1517     Preferences::CmdLogType log = mCmdXterm->isChecked() ? Preferences::Log_Terminal : Preferences::Log_Discard;
 1544     if (feb29 >= 0  &&  static_cast<Preferences::Feb29Type>(feb29) != Preferences::defaultFeb29Type())
 1580     if (mSound->currentIndex() == soundIndex(Preferences::Sound_File)  &&  mSoundFile->text().isEmpty())
 1583         return i18nc("@info", "You must enter a sound file when <interface>%1</interface> is selected as the default sound type", SoundPicker::i18n_combo_File());;
 1610           i18nc("@info:whatsthis", "<para>Check to show <application>KAlarm</application>'s icon in the system tray."
 1619     connect(mAutoHideSystemTray, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotAutoHideSysTrayChanged(QAbstractButton*)));
 1621     QRadioButton* radio = new QRadioButton(i18nc("@option:radio Always show KAlarm icon", "Always show"), mShowInSystemTray);
 1629     radio = new QRadioButton(i18nc("@option:radio", "Automatically hide if no active alarms"), mShowInSystemTray);
 1642     radio = new QRadioButton(i18nc("@option:radio", "Automatically hide if no alarm due within time period:"), mShowInSystemTray);
 1661     mTooltipShowAlarms = new QCheckBox(i18nc("@option:check", "Show next &24 hours' alarms"), group);
 1665           i18nc("@info:whatsthis", "Specify whether to include in the system tray tooltip, a summary of alarms due in the next 24 hours."));
 1671     mTooltipMaxAlarms = new QCheckBox(i18nc("@option:check", "Maximum number of alarms to show:"), box);
 1678           i18nc("@info:whatsthis", "Uncheck to display all of the next 24 hours' alarms in the system tray tooltip. "
 1685     mTooltipShowTime->setWhatsThis(i18nc("@info:whatsthis", "Specify whether to show in the system tray tooltip, the time at which each alarm is due."));
 1691     mTooltipShowTimeTo->setWhatsThis(i18nc("@info:whatsthis", "Specify whether to show in the system tray tooltip, how long until each alarm is due."));
 1700     box->setWhatsThis(i18nc("@info:whatsthis", "Enter the text to be displayed in front of the time until the alarm, in the system tray tooltip."));
 1720     box->setWhatsThis(i18nc("@info:whatsthis", "Choose the text color in the alarm list for disabled alarms."));
 1730     box->setWhatsThis(i18nc("@info:whatsthis", "Choose the text color in the alarm list for archived alarms."));
 1744     connect(mWindowPosition, SIGNAL(buttonSet(QAbstractButton*)), SLOT(slotWindowPosChanged(QAbstractButton*)));
 1748           "<list><item>Position alarm message windows as far as possible from the current mouse cursor location, or</item>"
 1749           "<item>Position alarm message windows in the center of the screen, but disable buttons for a short time after the window is displayed.</item></list></para>");
 1750     radio = new QRadioButton(i18nc("@option:radio", "Position windows far from mouse cursor"), group);
 1754     radio = new QRadioButton(i18nc("@option:radio", "Center windows, delay activating window buttons"), group);
 1764     mWindowButtonDelayLabel = new QLabel(i18nc("@label:spinbox", "Button activation delay (seconds):"), box);
 1769                             "Enter how long its buttons should remain disabled after the alarm message window is shown."));
 1775     mModalMessages = new QCheckBox(i18nc("@option:check", "Message windows have a title bar and take keyboard focus"), group);
 1779           "<list><item>If checked, the window is a normal window with a title bar, which grabs keyboard input when it is displayed.</item>"
 1781           "it is displayed, but it has no title bar and cannot be moved or resized.</item></list></para>"));
QLayout * layout() const
QFrame(QWidget *parent, QFlags< Qt::WindowType > f)
static void setEmailAddress(MailFrom, const QString &address)
Definition: preferences.cpp:314
static int questionYesNoCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
void setMinimum(int min)
static void setCmdXTermCommand(const QString &cmd)
Definition: preferences.cpp:363
bool isValid() const
static Akonadi::Collection getStandard(CalEvent::Type, bool useDefault=false)
Return the standard collection for a specified mime type. 
Definition: collectionmodel.cpp:993
static QString i18n_combo_AtLogin()
Definition: recurrenceedit.cpp:82
void setWidget(QWidget *widget)
Definition: fontcolour.h:33
int width() const
static QString i18n_chk_EnterScript()
Definition: editdlgtypes.cpp:724
static QString i18n_chk_ConfirmAck()
Definition: editdlgtypes.cpp:108
Units
KCal::Duration period() const 
virtual QSize sizeHint() const
static QString i18n_chk_CopyEmailToSelf()
Definition: editdlgtypes.cpp:1027
void setFixedWidth(int w)
void setPeriod(const KCal::Duration &period, bool dateOnly, Units defaultUnits)
QString weekDayName(int day, const KLocale *)
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
QSize adjustSize(bool force=false)
void addButton(QAbstractButton *button)
Definition: prefdlg_p.h:201
static QString i18n_chk_CancelIfLate()
Definition: latecancel.cpp:44
static void setAutoStartChangedByUser(bool c)
Definition: preferences.h:45
virtual QByteArray text(quint32 serialNumber) const =0
void setBit(int i)
static void setConfirmAlarmDeletion(bool yes)
Definition: preferences.h:68
QStyle * style() const
virtual QSize sizeHint() const
int localeDayInWeek_to_weekDay(int index)
void setAlignment(QFlags< Qt::AlignmentFlag >)
static void setEmailQueuedNotify(bool yes)
Definition: preferences.h:72
QString from() const 
Definition: preferences.h:40
void setIcon(const QIcon &icon)
static QString browseFile(QString &initialDir, const QString &initialFile=QString())
Display a dialog to choose a sound file, initially highlighting initialFile if non-null. 
Definition: soundpicker.cpp:321
static QString i18n_combo_NoRecur()
Definition: recurrenceedit.cpp:81
int id(QAbstractButton *button) const 
void setRange(int minimum, int maximum)
void setSpacing(int spacing)
bool isNull() const
KTimeZone timeZone() const 
Definition: prefdlg_p.h:79
void initFrom(const QWidget *widget)
QWidget * widget() const 
void setBuddy(QWidget *buddy)
the KAlarm application object 
QSize size() const
void setMinimumSize(const QSize &)
const char * name() const
bool sized() const 
bool isEnabled() const
void addWidget(QWidget *widget, int stretch, QFlags< Qt::AlignmentFlag > alignment)
int count(const T &value) const
Definition: preferences.h:40
void setChecked(bool checked)
virtual QSize sizeHint() const 
static void setHolidayRegion(const QString ®ionCode)
Definition: preferences.cpp:238
int x() const
bool isEmpty() const
bool isEmpty() const
QString trimmed() const
main application window 
static QString i18n_combo_HourlyMinutely()
Definition: recurrenceedit.cpp:83
Definition: specialactions.h:36
Definition: prefdlg.h:36
static QString i18n_NeedFromEmailAddress()
Definition: kamail.cpp:88
int selectedId() const 
static QString i18n_chk_AutoCloseWin()
Definition: latecancel.cpp:45
void addButton(QAbstractButton *button)
KAEvent::ExtraActionOptions options() const 
Definition: specialactions.h:44
void setMargin(int margin)
Definition: prefdlg_p.h:52
void setFont(const QFont &, bool onlyFixed=false)
Definition: fontcolour.cpp:123
static QString i18n_combo_Monthly()
Definition: recurrenceedit.cpp:86
QLocale locale() const
Definition: prefdlg_p.h:107
int value() const 
bool blockSignals(bool block)
const QSize & size() const
void setFixedSize(const QSize &s)
const QFont & font() const
void setFocusWidget(QWidget *widget, bool enable=true)
sizeHint
void leftAlign()
virtual void setValue(int minutes)
static const KHolidays::HolidayRegion & holidays()
Definition: preferences.cpp:227
static Akonadi::Collection::List enabledCollections(CalEvent::Type, bool writable)
Return the enabled collections which contain a specified mime type. 
Definition: collectionmodel.cpp:1229
QAbstractButton * find(int id) const 
Definition: prefdlg_p.h:131
void setChecked(bool)
void addLayout(QLayout *layout, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
QString & replace(int position, int n, QChar after)
void setWhatsThis(const QString &)
int width() const
virtual QSize sizeHint() const
void setTimeZone(const KTimeZone &tz)
void setActions(const QString &pre, const QString &post, KAEvent::ExtraActionOptions)
Definition: specialactions.cpp:63
static QString i18n_radio_ExecInTermWindow()
Definition: editdlgtypes.cpp:725
static int warningYesNo(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonYes=KStandardGuiItem::yes(), const KGuiItem &buttonNo=KStandardGuiItem::no(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|Dangerous|WindowModal))
static void setEmailCopyToKMail(bool yes)
Definition: preferences.h:70
miscellaneous functions 
void setMaximumHeight(int maxh)
void addStretch(int stretch)
static void sorry(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Options(Notify|WindowModal))
static QString i18n_chk_AutoCloseWinLC()
Definition: latecancel.cpp:46
virtual void setValue(int minutes)
void setFixedHeight(int h)
void setColumnStretch(int column, int stretch)
value
void setCheckable(bool checkable)
static QString i18n_chk_ShowAlarmTime()
Definition: mainwindow.cpp:125
int heightReduction() const 
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
void setColumnMinimumWidth(int column, int minSize)
virtual QSize sizeHint() const
int height() const
static void setEmailBccAddress(bool useSystemSettings, const QString &address)
Definition: preferences.cpp:348
static int warningContinueCancel(QWidget *parent, const QString &text, const QString &caption=QString(), const KGuiItem &buttonContinue=KStandardGuiItem::cont(), const KGuiItem &buttonCancel=KStandardGuiItem::cancel(), const QString &dontAskAgainName=QString(), Options options=Options(Notify|WindowModal))
iterator insert(const Key &key, const T &value)
void setButton(int id)
virtual QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const =0
int value() const 
void setToolTip(const QString &)
static QString i18n_chk_ShowInKOrganizer()
Definition: editdlg.cpp:101
static QString shiftWhatsThis()
static QString i18n_combo_Yearly()
Definition: recurrenceedit.cpp:87
void setRowMinimumHeight(int row, int minSize)
virtual QSize sizeHint() const
Definition: prefdlg_p.h:242
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
static QString i18n_combo_Weekly()
Definition: recurrenceedit.cpp:85
bool testBit(int i) const
QAbstractButton * checkedButton() const
static QString i18n_chk_ExecInTermWindow()
Definition: editdlgtypes.cpp:726
void setWordWrap(bool on)
Definition: prefdlg_p.h:160
void setSpacing(int spacing)
bool hasNext() const
static QString i18n_chk_ShowTimeToAlarm()
Definition: mainwindow.cpp:127
void addLayout(QLayout *layout, int stretch)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
            Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:34:51 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.
 KDE API Reference
    KDE API Reference