Commit 8970a12b authored by David Jarvie's avatar David Jarvie
Browse files

Spacing

parent 75ecfceb
......@@ -40,6 +40,8 @@
#include "templatelistview.h"
#include "templatemenuaction.h"
#include "config-kdepim.h"
#include <kalarmcal/identities.h>
#include <kalarmcal/kaevent.h>
......@@ -53,13 +55,13 @@ using namespace KCalCore;
#include <KHolidays/kholidays/holidays.h>
#include <kconfiggroup.h>
#include <KSharedConfig>
#include <kaction.h>
#include <ktoggleaction.h>
#include <kactioncollection.h>
#include <kdbusservicestarter.h>
#include <kglobal.h>
#include <klocale.h>
#include <kauth.h>
#include <ksystemtimezone.h>
#include <kstandardguiitem.h>
......@@ -67,7 +69,6 @@ using namespace KCalCore;
#include <kfiledialog.h>
#include <kio/netaccess.h>
#include <kfileitem.h>
#include <qdebug.h>
#include <ktoolinvocation.h>
#if KDEPIM_HAVE_X11
......@@ -84,8 +85,8 @@ using namespace KCalCore;
#include <QtDBus/QtDBus>
#include <QTimer>
#include <qglobal.h>
#include <KSharedConfig>
#include <QStandardPaths>
#include <qdebug.h>
using namespace Akonadi;
......@@ -196,9 +197,9 @@ KToggleAction* createAlarmEnableAction(QObject* parent)
/******************************************************************************
* Create a "Stop Play" action.
*/
QAction * createStopPlayAction(QObject* parent)
QAction* createStopPlayAction(QObject* parent)
{
QAction * action = new QAction(QIcon::fromTheme(QLatin1String("media-playback-stop")), i18nc("@action", "Stop Play"), parent);
QAction* action = new QAction(QIcon::fromTheme(QLatin1String("media-playback-stop")), i18nc("@action", "Stop Play"), parent);
action->setEnabled(MessageWin::isAudioPlaying());
QObject::connect(action, SIGNAL(triggered(bool)), theApp(), SLOT(stopAudio()));
// The following line ensures that all instances are kept in the same state
......
......@@ -124,7 +124,7 @@ void editTemplate(KAEvent*, QWidget* parent = 0);
void execNewAlarmDlg(EditAlarmDlg*);
/** Create a "New From Template" QAction */
KToggleAction* createAlarmEnableAction(QObject* parent);
QAction * createStopPlayAction(QObject* parent);
QAction* createStopPlayAction(QObject* parent);
KToggleAction* createSpreadWindowsAction(QObject* parent);
/** Returns a list of all alarm templates.
* If shell commands are disabled, command alarm templates are omitted.
......
......@@ -37,7 +37,7 @@
*/
class KAMessageBox
{
public:
public:
/** KAMessageBox types.
* @li CONT_CANCEL_DEF_CONT - Continue/Cancel, with Continue as the default button.
* @li CONT_CANCEL_DEF_CANCEL - Continue/Cancel, with Cancel as the default button.
......
......@@ -52,24 +52,22 @@
using namespace KCalCore;
using namespace KCalUtils;
#include <QMenuBar>
#include <ktoolbar.h>
#include <QMenu>
#include <kaction.h>
#include <kactioncollection.h>
#include <qinputdialog.h>
#include <ksystemtrayicon.h>
#include <kstandardaction.h>
#include <kiconloader.h>
#include <kurl.h>
#include <klocale.h>
#include <KLocalizedString>
#include <kglobalsettings.h>
#include <KSharedConfig>
#include <kconfiggroup.h>
#include <kshortcutsdialog.h>
#include <kedittoolbar.h>
#include <kxmlguifactory.h>
#include <K4AboutData>
#include <qdebug.h>
#include <ktoggleaction.h>
#include <ktoolbarpopupaction.h>
#include <KTimeZone>
......@@ -83,9 +81,10 @@ using namespace KCalUtils;
#include <QResizeEvent>
#include <QCloseEvent>
#include <QDesktopWidget>
#include <KSharedConfig>
#include <KLocale>
#include <KLocalizedString>
#include <QMenuBar>
#include <QMenu>
#include <qinputdialog.h>
#include <qdebug.h>
using namespace KAlarmCal;
......@@ -432,7 +431,7 @@ void MainWindow::initActions()
mActionNew = new NewAlarmAction(false, i18nc("@action", "&New"), this);
actions->addAction(QLatin1String("new"), mActionNew);
QAction * action = mActionNew->displayAlarmAction();
QAction* action = mActionNew->displayAlarmAction();
actions->addAction(QLatin1String("newDisplay"), action);
//QT5 action->setGlobalShortcut(dummy); // actions->addAction() must be called first!
connect(action, SIGNAL(triggered(bool)), SLOT(slotNewDisplay()));
......@@ -462,23 +461,23 @@ void MainWindow::initActions()
mActionCopy = new QAction(QIcon::fromTheme(QLatin1String("edit-copy")), i18nc("@action", "&Copy..."), this);
actions->addAction(QLatin1String("copy"), mActionCopy);
actions->setDefaultShortcut(mActionCopy,QKeySequence(Qt::SHIFT + Qt::Key_Insert));
actions->setDefaultShortcut(mActionCopy, QKeySequence(Qt::SHIFT + Qt::Key_Insert));
connect(mActionCopy, SIGNAL(triggered(bool)), SLOT(slotCopy()));
mActionModify = new QAction(QIcon::fromTheme(QLatin1String("document-properties")), i18nc("@action", "&Edit..."), this);
actions->addAction(QLatin1String("modify"), mActionModify);
actions->setDefaultShortcut(mActionModify,QKeySequence(Qt::CTRL + Qt::Key_E));
actions->setDefaultShortcut(mActionModify, QKeySequence(Qt::CTRL + Qt::Key_E));
connect(mActionModify, SIGNAL(triggered(bool)), SLOT(slotModify()));
mActionDelete = new QAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18nc("@action", "&Delete"), this);
actions->addAction(QLatin1String("delete"), mActionDelete);
actions->setDefaultShortcut(mActionDelete,QKeySequence::Delete);
actions->setDefaultShortcut(mActionDelete, QKeySequence::Delete);
connect(mActionDelete, SIGNAL(triggered(bool)), SLOT(slotDeleteIf()));
// Set up Shift-Delete as a shortcut to delete without confirmation
mActionDeleteForce = new QAction(i18nc("@action", "Delete Without Confirmation"), this);
actions->addAction(QLatin1String("delete-force"), mActionDeleteForce);
actions->setDefaultShortcut(mActionDeleteForce,QKeySequence::Delete + Qt::SHIFT);
actions->setDefaultShortcut(mActionDeleteForce, QKeySequence::Delete + Qt::SHIFT);
connect(mActionDeleteForce, SIGNAL(triggered(bool)), SLOT(slotDeleteForce()));
mActionReactivate = new QAction(i18nc("@action", "Reac&tivate"), this);
......@@ -505,12 +504,12 @@ void MainWindow::initActions()
mActionShowTimeTo = new KToggleAction(i18n_o_ShowTimeToAlarms(), this);
actions->addAction(QLatin1String("showTimeToAlarms"), mActionShowTimeTo);
actions->setDefaultShortcut(mActionShowTimeTo,QKeySequence(Qt::CTRL + Qt::Key_I));
actions->setDefaultShortcut(mActionShowTimeTo, QKeySequence(Qt::CTRL + Qt::Key_I));
connect(mActionShowTimeTo, SIGNAL(triggered(bool)), SLOT(slotShowTimeTo()));
mActionShowArchived = new KToggleAction(i18nc("@action", "Show Archi&ved Alarms"), this);
actions->addAction(QLatin1String("showArchivedAlarms"), mActionShowArchived);
actions->setDefaultShortcut(mActionShowArchived,QKeySequence(Qt::CTRL + Qt::Key_P));
actions->setDefaultShortcut(mActionShowArchived, QKeySequence(Qt::CTRL + Qt::Key_P));
connect(mActionShowArchived, SIGNAL(triggered(bool)), SLOT(slotShowArchived()));
mActionToggleTrayIcon = new KToggleAction(i18nc("@action", "Show in System &Tray"), this);
......@@ -545,12 +544,12 @@ void MainWindow::initActions()
actions->addAction(QLatin1String("refreshAlarms"), action);
connect(action, SIGNAL(triggered(bool)), SLOT(slotRefreshAlarms()));
KToggleAction *toggleAction = KAlarm::createAlarmEnableAction(this);
KToggleAction* toggleAction = KAlarm::createAlarmEnableAction(this);
actions->addAction(QLatin1String("alarmsEnable"), toggleAction);
if (undoText.isNull())
{
// Get standard texts, etc., for Undo and Redo actions
QAction * act = KStandardAction::undo(this, 0, actions);
QAction* act = KStandardAction::undo(this, 0, actions);
undoShortcut = act->shortcuts();
undoText = act->text();
undoTextStripped = KLocalizedString::removeAcceleratorMarker(undoText);
......
......@@ -173,19 +173,19 @@ class MainWindow : public MainWindowBase, public KCalCore::Calendar::CalendarObs
QSplitter* mSplitter; // splits window into list and resource selector
QMap<EditAlarmDlg*, KAEvent> mEditAlarmMap; // edit alarm dialogs to be handled by this window
KToggleAction* mActionToggleResourceSel;
QAction * mActionImportAlarms;
QAction * mActionExportAlarms;
QAction * mActionExport;
QAction * mActionImportBirthdays;
QAction * mActionTemplates;
QAction* mActionImportAlarms;
QAction* mActionExportAlarms;
QAction* mActionExport;
QAction* mActionImportBirthdays;
QAction* mActionTemplates;
NewAlarmAction* mActionNew;
QAction * mActionCreateTemplate;
QAction * mActionCopy;
QAction * mActionModify;
QAction * mActionDelete;
QAction * mActionDeleteForce;
QAction * mActionReactivate;
QAction * mActionEnable;
QAction* mActionCreateTemplate;
QAction* mActionCopy;
QAction* mActionModify;
QAction* mActionDelete;
QAction* mActionDeleteForce;
QAction* mActionReactivate;
QAction* mActionEnable;
QAction* mActionFindNext;
QAction* mActionFindPrev;
KToolBarPopupAction* mActionUndo;
......
......@@ -33,10 +33,10 @@ class NewAlarmAction : public KActionMenu
public:
NewAlarmAction(bool templates, const QString& label, QObject* parent);
virtual ~NewAlarmAction() {}
QAction * displayAlarmAction() const { return mDisplayAction; }
QAction * commandAlarmAction() const { return mCommandAction; }
QAction * emailAlarmAction() const { return mEmailAction; }
QAction * audioAlarmAction() const { return mAudioAction; }
QAction* displayAlarmAction() const { return mDisplayAction; }
QAction* commandAlarmAction() const { return mCommandAction; }
QAction* emailAlarmAction() const { return mEmailAction; }
QAction* audioAlarmAction() const { return mAudioAction; }
TemplateMenuAction* fromTemplateAlarmAction() const { return mTemplateAction; }
signals:
......@@ -48,10 +48,10 @@ class NewAlarmAction : public KActionMenu
void slotCalendarStatusChanged();
private:
QAction * mDisplayAction;
QAction * mCommandAction;
QAction * mEmailAction;
QAction * mAudioAction;
QAction* mDisplayAction;
QAction* mCommandAction;
QAction* mEmailAction;
QAction* mAudioAction;
TemplateMenuAction* mTemplateAction; // New From Template action, for non-template menu only
QMap<QAction*, EditAlarmDlg::Type> mTypes;
};
......
......@@ -100,15 +100,15 @@ class ResourceSelector : public QFrame
QPushButton* mEditButton;
CalEvent::Type mCurrentAlarmType;
QMenu* mContextMenu;
QAction * mActionReload;
QAction * mActionShowDetails;
QAction * mActionSetColour;
QAction * mActionClearColour;
QAction * mActionEdit;
QAction * mActionUpdate;
QAction * mActionRemove;
QAction * mActionImport;
QAction * mActionExport;
QAction* mActionReload;
QAction* mActionShowDetails;
QAction* mActionSetColour;
QAction* mActionClearColour;
QAction* mActionEdit;
QAction* mActionUpdate;
QAction* mActionRemove;
QAction* mActionImport;
QAction* mActionExport;
KToggleAction* mActionSetDefault;
};
......
......@@ -40,23 +40,21 @@
#include <kapplication.h>
#include <klocale.h>
#include <K4AboutData>
#include <QMenu>
#include <kmessagebox.h>
#include <kstandardaction.h>
#include <kstandardguiitem.h>
#include <kiconeffect.h>
#include <kconfig.h>
#include <qdebug.h>
#include <KGlobal>
#include <KIconLoader>
#include <QList>
#include <QTimer>
#include <QMenu>
#include <qdebug.h>
#include <stdlib.h>
#include <limits.h>
#include <KLocale>
using namespace KAlarmCal;
......@@ -89,7 +87,7 @@ TrayWindow::TrayWindow(MainWindow* parent)
setStatus(KStatusNotifierItem::Active);
#if 0 //QT5
// Set up the context menu
QList<QAction *> actions = actionCollection();
QList<QAction*> actions = actionCollection();
mActionEnabled = KAlarm::createAlarmEnableAction(this);
actions.addAction(QLatin1String("tAlarmsEnable"), mActionEnabled);
contextMenu()->addAction(mActionEnabled);
......@@ -103,7 +101,7 @@ TrayWindow::TrayWindow(MainWindow* parent)
connect(mActionNew->fromTemplateAlarmAction(), SIGNAL(selected(const KAEvent*)), SLOT(slotNewFromTemplate(const KAEvent*)));
contextMenu()->addSeparator();
QAction * a = KAlarm::createStopPlayAction(this);
QAction* a = KAlarm::createStopPlayAction(this);
actions->addAction(QLatin1String("tStopPlay"), a);
contextMenu()->addAction(a);
QObject::connect(theApp(), SIGNAL(audioPlaying(bool)), a, SLOT(setVisible(bool)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment