Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
KAlarm
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PIM
KAlarm
Commits
29adb937
Commit
29adb937
authored
Dec 10, 2004
by
David Jarvie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename class KAlarmMainWindow -> MainWindow
svn path=/trunk/kdepim/; revision=369735
parent
2ec00fec
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
176 additions
and
176 deletions
+176
-176
functions.cpp
functions.cpp
+4
-4
functions.h
functions.h
+2
-2
kalarmapp.cpp
kalarmapp.cpp
+17
-17
kalarmapp.h
kalarmapp.h
+4
-4
mainwindow.cpp
mainwindow.cpp
+94
-94
mainwindow.h
mainwindow.h
+22
-22
prefdlg.cpp
prefdlg.cpp
+6
-6
traywindow.cpp
traywindow.cpp
+7
-7
traywindow.h
traywindow.h
+20
-20
No files found.
functions.cpp
View file @
29adb937
...
...
@@ -51,14 +51,14 @@ namespace KAlarm
/******************************************************************************
* Display a main window with the specified event selected.
*/
KAlarm
MainWindow
*
displayMainWindowSelected
(
const
QString
&
eventID
)
MainWindow
*
displayMainWindowSelected
(
const
QString
&
eventID
)
{
KAlarmMainWindow
*
win
=
KAlarm
MainWindow
::
firstWindow
();
MainWindow
*
win
=
MainWindow
::
firstWindow
();
if
(
!
win
)
{
if
(
theApp
()
->
checkCalendarDaemon
())
// ensure calendar is open and daemon started
{
win
=
KAlarm
MainWindow
::
create
();
win
=
MainWindow
::
create
();
win
->
show
();
}
}
...
...
@@ -348,7 +348,7 @@ void resetDaemonIfQueued()
}
}
KAlarm
MainWindow
::
refresh
();
MainWindow
::
refresh
();
if
(
!
Daemon
::
reset
())
Daemon
::
start
();
resetDaemonQueued
=
false
;
...
...
functions.h
View file @
29adb937
...
...
@@ -28,7 +28,7 @@ class KAction;
class
KActionCollection
;
namespace
KCal
{
class
Event
;
}
class
KAEvent
;
class
KAlarm
MainWindow
;
class
MainWindow
;
class
AlarmListView
;
namespace
KAlarm
...
...
@@ -36,7 +36,7 @@ namespace KAlarm
enum
FileType
{
Unknown
,
TextPlain
,
TextFormatted
,
TextApplication
,
Image
};
KAlarmMainWindow
*
displayMainWindowSelected
(
const
QString
&
eventID
=
QString
::
null
);
MainWindow
*
displayMainWindowSelected
(
const
QString
&
eventID
=
QString
::
null
);
bool
readConfigWindowSize
(
const
char
*
window
,
QSize
&
);
void
writeConfigWindowSize
(
const
char
*
window
,
const
QSize
&
);
FileType
fileType
(
const
QString
&
mimetype
);
...
...
kalarmapp.cpp
View file @
29adb937
...
...
@@ -189,13 +189,13 @@ bool KAlarmApp::restoreSession()
quitIf
(
1
,
true
);
// error opening the main calendar - quit
return
true
;
}
KAlarm
MainWindow
*
trayParent
=
0
;
MainWindow
*
trayParent
=
0
;
for
(
int
i
=
1
;
KMainWindow
::
canBeRestored
(
i
);
++
i
)
{
QString
type
=
KMainWindow
::
classNameOfToplevel
(
i
);
if
(
type
==
QString
::
fromLatin1
(
"
KAlarm
MainWindow"
))
if
(
type
==
QString
::
fromLatin1
(
"MainWindow"
))
{
KAlarmMainWindow
*
win
=
KAlarm
MainWindow
::
create
(
true
);
MainWindow
*
win
=
MainWindow
::
create
(
true
);
win
->
restore
(
i
,
false
);
if
(
win
->
isHiddenTrayParent
())
trayParent
=
win
;
...
...
@@ -217,7 +217,7 @@ bool KAlarmApp::restoreSession()
// Try to display the system tray icon if it is configured to be autostarted,
// or if we're in run-in-system-tray mode.
if
(
Preferences
::
instance
()
->
autostartTrayIcon
()
||
KAlarm
MainWindow
::
count
()
&&
wantRunInSystemTray
())
||
MainWindow
::
count
()
&&
wantRunInSystemTray
())
displayTrayIcon
(
true
,
trayParent
);
--
mActiveCount
;
...
...
@@ -673,7 +673,7 @@ int KAlarmApp::newInstance()
break
;
}
(
KAlarm
MainWindow
::
create
())
->
show
();
(
MainWindow
::
create
())
->
show
();
}
}
while
(
0
);
// only execute once
...
...
@@ -707,7 +707,7 @@ void KAlarmApp::quitIf(int exitCode, bool force)
if
(
force
)
{
// Quit regardless, except for message windows
KAlarm
MainWindow
::
closeAll
();
MainWindow
::
closeAll
();
displayTrayIcon
(
false
);
if
(
MessageWin
::
instanceCount
())
return
;
...
...
@@ -718,8 +718,8 @@ void KAlarmApp::quitIf(int exitCode, bool force)
mPendingQuit
=
false
;
if
(
mActiveCount
>
0
||
MessageWin
::
instanceCount
())
return
;
int
mwcount
=
KAlarm
MainWindow
::
count
();
KAlarmMainWindow
*
mw
=
mwcount
?
KAlarm
MainWindow
::
firstWindow
()
:
0
;
int
mwcount
=
MainWindow
::
count
();
MainWindow
*
mw
=
mwcount
?
MainWindow
::
firstWindow
()
:
0
;
if
(
mwcount
>
1
||
mwcount
&&
(
!
mw
->
isHidden
()
||
!
mw
->
isTrayParent
()))
return
;
// There are no windows left except perhaps a main window which is a hidden tray icon parent
...
...
@@ -920,7 +920,7 @@ void KAlarmApp::removeWindow(TrayWindow*)
/******************************************************************************
* Display or close the system tray icon.
*/
bool
KAlarmApp
::
displayTrayIcon
(
bool
show
,
KAlarm
MainWindow
*
parent
)
bool
KAlarmApp
::
displayTrayIcon
(
bool
show
,
MainWindow
*
parent
)
{
static
bool
creating
=
false
;
if
(
show
)
...
...
@@ -929,13 +929,13 @@ bool KAlarmApp::displayTrayIcon(bool show, KAlarmMainWindow* parent)
{
if
(
!
mKDEDesktop
)
return
false
;
if
(
!
KAlarm
MainWindow
::
count
()
&&
wantRunInSystemTray
())
if
(
!
MainWindow
::
count
()
&&
wantRunInSystemTray
())
{
creating
=
true
;
// prevent main window constructor from creating an additional tray icon
parent
=
KAlarm
MainWindow
::
create
();
parent
=
MainWindow
::
create
();
creating
=
false
;
}
mTrayWindow
=
new
TrayWindow
(
parent
?
parent
:
KAlarm
MainWindow
::
firstWindow
());
mTrayWindow
=
new
TrayWindow
(
parent
?
parent
:
MainWindow
::
firstWindow
());
connect
(
mTrayWindow
,
SIGNAL
(
deleted
()),
SIGNAL
(
trayIconToggled
()));
mTrayWindow
->
show
();
emit
trayIconToggled
();
...
...
@@ -1008,7 +1008,7 @@ bool KAlarmApp::checkSystemTray()
/******************************************************************************
* Return the main window associated with the system tray icon.
*/
KAlarm
MainWindow
*
KAlarmApp
::
trayMainWindow
()
const
MainWindow
*
KAlarmApp
::
trayMainWindow
()
const
{
return
mTrayWindow
?
mTrayWindow
->
assocMainWindow
()
:
0
;
}
...
...
@@ -1024,7 +1024,7 @@ void KAlarmApp::slotPreferencesChanged()
{
// The system tray run mode has changed
++
mActiveCount
;
// prevent the application from quitting
KAlarm
MainWindow
*
win
=
mTrayWindow
?
mTrayWindow
->
assocMainWindow
()
:
0
;
MainWindow
*
win
=
mTrayWindow
?
mTrayWindow
->
assocMainWindow
()
:
0
;
delete
mTrayWindow
;
// remove the system tray icon if it is currently shown
mTrayWindow
=
0
;
mOldRunInSystemTray
=
newRunInSysTray
;
...
...
@@ -1055,7 +1055,7 @@ void KAlarmApp::slotPreferencesChanged()
||
preferences
->
showTimeToAlarm
()
!=
mPrefsShowTimeTo
)
{
// The default alarm list time columns selection has changed
KAlarm
MainWindow
::
updateTimeColumns
(
mPrefsShowTime
,
mPrefsShowTimeTo
);
MainWindow
::
updateTimeColumns
(
mPrefsShowTime
,
mPrefsShowTimeTo
);
mPrefsShowTime
=
preferences
->
showAlarmTime
();
mPrefsShowTimeTo
=
preferences
->
showTimeToAlarm
();
}
...
...
@@ -1078,7 +1078,7 @@ void KAlarmApp::slotPreferencesChanged()
if
(
mRefreshExpiredAlarms
)
{
mRefreshExpiredAlarms
=
false
;
KAlarm
MainWindow
::
updateExpired
();
MainWindow
::
updateExpired
();
}
}
...
...
@@ -1101,7 +1101,7 @@ void KAlarmApp::changeStartOfDay()
void
KAlarmApp
::
slotExpiredPurged
()
{
mRefreshExpiredAlarms
=
false
;
KAlarm
MainWindow
::
updateExpired
();
MainWindow
::
updateExpired
();
}
/******************************************************************************
...
...
kalarmapp.h
View file @
29adb937
...
...
@@ -36,7 +36,7 @@ class DcopHandler;
class
DcopHandlerOld
;
#endif
class
AlarmCalendar
;
class
KAlarm
MainWindow
;
class
MainWindow
;
class
AlarmListView
;
class
MessageWin
;
class
TrayWindow
;
...
...
@@ -63,10 +63,10 @@ class KAlarmApp : public KUniqueApplication
void
addWindow
(
TrayWindow
*
w
)
{
mTrayWindow
=
w
;
}
void
removeWindow
(
TrayWindow
*
);
TrayWindow
*
trayWindow
()
const
{
return
mTrayWindow
;
}
KAlarmMainWindow
*
trayMainWindow
()
const
;
bool
displayTrayIcon
(
bool
show
,
KAlarm
MainWindow
*
=
0
);
MainWindow
*
trayMainWindow
()
const
;
bool
displayTrayIcon
(
bool
show
,
MainWindow
*
=
0
);
bool
trayIconDisplayed
()
const
{
return
!!
mTrayWindow
;
}
bool
editNewAlarm
(
KAlarm
MainWindow
*
=
0
);
bool
editNewAlarm
(
MainWindow
*
=
0
);
virtual
void
commitData
(
QSessionManager
&
);
void
*
execAlarm
(
KAEvent
&
,
const
KAAlarm
&
,
bool
reschedule
,
bool
allowDefer
=
true
,
bool
noPreAction
=
false
);
...
...
mainwindow.cpp
View file @
29adb937
This diff is collapsed.
Click to expand it.
mainwindow.h
View file @
29adb937
...
...
@@ -33,30 +33,30 @@ class AlarmListView;
class
TemplateDlg
;
class
KAlarm
MainWindow
:
public
MainWindowBase
class
MainWindow
:
public
MainWindowBase
{
Q_OBJECT
public:
static
KAlarm
MainWindow
*
create
(
bool
restored
=
false
);
~
KAlarm
MainWindow
();
bool
isTrayParent
()
const
;
bool
isHiddenTrayParent
()
const
{
return
mHiddenTrayParent
;
}
bool
showingExpired
()
const
{
return
mShowExpired
;
}
void
selectEvent
(
const
QString
&
eventID
);
static
MainWindow
*
create
(
bool
restored
=
false
);
~
MainWindow
();
bool
isTrayParent
()
const
;
bool
isHiddenTrayParent
()
const
{
return
mHiddenTrayParent
;
}
bool
showingExpired
()
const
{
return
mShowExpired
;
}
void
selectEvent
(
const
QString
&
eventID
);
static
void
refresh
();
static
void
updateExpired
();
static
void
updateTimeColumns
(
bool
oldTime
,
bool
oldTimeTo
);
static
void
addEvent
(
const
KAEvent
&
,
KAlarm
MainWindow
*
);
static
void
executeNew
(
KAlarm
MainWindow
*
=
0
,
KAEvent
::
Action
=
KAEvent
::
MESSAGE
,
const
AlarmText
&
=
AlarmText
());
static
void
executeDragEnterEvent
(
QDragEnterEvent
*
);
static
void
executeDropEvent
(
KAlarm
MainWindow
*
,
QDropEvent
*
);
static
void
closeAll
();
static
KAlarmMainWindow
*
toggleWindow
(
KAlarm
MainWindow
*
);
static
KAlarm
MainWindow
*
mainMainWindow
();
static
KAlarm
MainWindow
*
firstWindow
()
{
return
mWindowList
.
first
();
}
static
int
count
()
{
return
mWindowList
.
count
();
}
static
void
refresh
();
static
void
updateExpired
();
static
void
updateTimeColumns
(
bool
oldTime
,
bool
oldTimeTo
);
static
void
addEvent
(
const
KAEvent
&
,
MainWindow
*
);
static
void
executeNew
(
MainWindow
*
=
0
,
KAEvent
::
Action
=
KAEvent
::
MESSAGE
,
const
AlarmText
&
=
AlarmText
());
static
void
executeDragEnterEvent
(
QDragEnterEvent
*
);
static
void
executeDropEvent
(
MainWindow
*
,
QDropEvent
*
);
static
void
closeAll
();
static
MainWindow
*
toggleWindow
(
MainWindow
*
);
static
MainWindow
*
mainMainWindow
();
static
MainWindow
*
firstWindow
()
{
return
mWindowList
.
first
();
}
static
int
count
()
{
return
mWindowList
.
count
();
}
static
QString
i18n_a_ShowAlarmTimes
();
// text of 'Show Alarm Times' checkbox, with 'A' shortcut
static
QString
i18n_t_ShowAlarmTime
();
// text of 'Show alarm time' checkbox, with 'T' shortcut
...
...
@@ -110,7 +110,7 @@ class KAlarmMainWindow : public MainWindowBase
void
updateActionsMenu
();
private:
KAlarm
MainWindow
(
bool
restored
);
MainWindow
(
bool
restored
);
void
createListView
(
bool
recreate
);
void
initActions
();
void
setEnableText
(
bool
enable
);
...
...
@@ -118,9 +118,9 @@ class KAlarmMainWindow : public MainWindowBase
static
void
setUpdateTimer
();
static
void
enableTemplateMenuItem
(
bool
);
static
void
alarmWarnings
(
QWidget
*
parent
,
const
KAEvent
*
=
0
);
static
bool
findWindow
(
KAlarm
MainWindow
*
);
static
bool
findWindow
(
MainWindow
*
);
static
QPtrList
<
KAlarm
MainWindow
>
mWindowList
;
// active main windows
static
QPtrList
<
MainWindow
>
mWindowList
;
// active main windows
static
TemplateDlg
*
mTemplateDlg
;
// the one and only template dialogue
AlarmListView
*
mListView
;
KAction
*
mActionTemplates
;
...
...
prefdlg.cpp
View file @
29adb937
...
...
@@ -292,7 +292,7 @@ MiscPrefTab::MiscPrefTab(QVBox* frame)
QVBox
*
vbox
=
new
QVBox
(
mPage
);
// this is to control the QWhatsThis text display area
vbox
->
setSpacing
(
KDialog
::
spacingHint
());
label
=
new
QLabel
(
i18n
(
"In non-leap years, repeat yearly February 29th alarms on:"
),
vbox
);
label
->
setAlignment
(
Qt
::
WordBreak
|
alignment
);
label
->
setAlignment
(
alignment
|
Qt
::
WordBreak
);
box
=
new
QHBox
(
vbox
);
box
->
setSpacing
(
2
*
KDialog
::
spacingHint
());
mFeb29
=
new
QButtonGroup
(
box
);
...
...
@@ -990,14 +990,14 @@ ViewPrefTab::ViewPrefTab(QVBox* frame)
QBoxLayout
*
layout
=
new
QVBoxLayout
(
group
,
marginKDE2
+
KDialog
::
marginHint
(),
KDialog
::
spacingHint
());
layout
->
addSpacing
(
fontMetrics
().
lineSpacing
()
/
2
);
mListShowTime
=
new
QCheckBox
(
KAlarm
MainWindow
::
i18n_t_ShowAlarmTime
(),
group
,
"listTime"
);
mListShowTime
=
new
QCheckBox
(
MainWindow
::
i18n_t_ShowAlarmTime
(),
group
,
"listTime"
);
mListShowTime
->
setMinimumSize
(
mListShowTime
->
sizeHint
());
connect
(
mListShowTime
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slotListTimeToggled
(
bool
)));
QWhatsThis
::
add
(
mListShowTime
,
i18n
(
"Specify whether to show in the alarm list, the time at which each alarm is due"
));
layout
->
addWidget
(
mListShowTime
,
0
,
Qt
::
AlignAuto
);
mListShowTimeTo
=
new
QCheckBox
(
KAlarm
MainWindow
::
i18n_n_ShowTimeToAlarm
(),
group
,
"listTimeTo"
);
mListShowTimeTo
=
new
QCheckBox
(
MainWindow
::
i18n_n_ShowTimeToAlarm
(),
group
,
"listTimeTo"
);
mListShowTimeTo
->
setMinimumSize
(
mListShowTimeTo
->
sizeHint
());
connect
(
mListShowTimeTo
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slotListTimeToToggled
(
bool
)));
QWhatsThis
::
add
(
mListShowTimeTo
,
...
...
@@ -1032,14 +1032,14 @@ ViewPrefTab::ViewPrefTab(QVBox* frame)
"Check to enter an upper limit on the number to be displayed."
));
grid
->
addMultiCellWidget
(
box
,
2
,
2
,
1
,
2
,
Qt
::
AlignAuto
);
mTooltipShowTime
=
new
QCheckBox
(
KAlarm
MainWindow
::
i18n_m_ShowAlarmTime
(),
group
,
"tooltipTime"
);
mTooltipShowTime
=
new
QCheckBox
(
MainWindow
::
i18n_m_ShowAlarmTime
(),
group
,
"tooltipTime"
);
mTooltipShowTime
->
setMinimumSize
(
mTooltipShowTime
->
sizeHint
());
connect
(
mTooltipShowTime
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slotTooltipTimeToggled
(
bool
)));
QWhatsThis
::
add
(
mTooltipShowTime
,
i18n
(
"Specify whether to show in the system tray tooltip, the time at which each alarm is due"
));
grid
->
addMultiCellWidget
(
mTooltipShowTime
,
3
,
3
,
1
,
2
,
Qt
::
AlignAuto
);
mTooltipShowTimeTo
=
new
QCheckBox
(
KAlarm
MainWindow
::
i18n_l_ShowTimeToAlarm
(),
group
,
"tooltipTimeTo"
);
mTooltipShowTimeTo
=
new
QCheckBox
(
MainWindow
::
i18n_l_ShowTimeToAlarm
(),
group
,
"tooltipTimeTo"
);
mTooltipShowTimeTo
->
setMinimumSize
(
mTooltipShowTimeTo
->
sizeHint
());
connect
(
mTooltipShowTimeTo
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
slotTooltipTimeToToggled
(
bool
)));
QWhatsThis
::
add
(
mTooltipShowTimeTo
,
...
...
@@ -1066,7 +1066,7 @@ ViewPrefTab::ViewPrefTab(QVBox* frame)
"- If unchecked, the window does not interfere with your typing when "
"it is displayed, but it has no title bar and cannot be moved or resized."
));
mShowExpiredAlarms
=
new
QCheckBox
(
KAlarm
MainWindow
::
i18n_s_ShowExpiredAlarms
(),
mPage
,
"showExpired"
);
mShowExpiredAlarms
=
new
QCheckBox
(
MainWindow
::
i18n_s_ShowExpiredAlarms
(),
mPage
,
"showExpired"
);
mShowExpiredAlarms
->
setMinimumSize
(
mShowExpiredAlarms
->
sizeHint
());
QWhatsThis
::
add
(
mShowExpiredAlarms
,
i18n
(
"Specify whether to show expired alarms in the alarm list"
));
...
...
traywindow.cpp
View file @
29adb937
...
...
@@ -67,7 +67,7 @@ struct TipItem
= The KDE system tray window.
=============================================================================*/
TrayWindow
::
TrayWindow
(
KAlarm
MainWindow
*
parent
,
const
char
*
name
)
TrayWindow
::
TrayWindow
(
MainWindow
*
parent
,
const
char
*
name
)
:
KSystemTray
((
theApp
()
->
wantRunInSystemTray
()
?
parent
:
0
),
name
),
mAssocMainWindow
(
parent
)
{
...
...
@@ -123,7 +123,7 @@ void TrayWindow::contextMenuAboutToShow(KPopupMenu* menu)
*/
void
TrayWindow
::
slotNewAlarm
()
{
KAlarm
MainWindow
::
executeNew
();
MainWindow
::
executeNew
();
}
/******************************************************************************
...
...
@@ -163,10 +163,10 @@ void TrayWindow::mousePressEvent(QMouseEvent* e)
if
(
e
->
button
()
==
LeftButton
&&
!
theApp
()
->
wantRunInSystemTray
())
{
// Left click: display/hide the first main window
mAssocMainWindow
=
KAlarm
MainWindow
::
toggleWindow
(
mAssocMainWindow
);
mAssocMainWindow
=
MainWindow
::
toggleWindow
(
mAssocMainWindow
);
}
else
if
(
e
->
button
()
==
MidButton
)
KAlarm
MainWindow
::
executeNew
();
// display a New Alarm dialog
MainWindow
::
executeNew
();
// display a New Alarm dialog
else
KSystemTray
::
mousePressEvent
(
e
);
}
...
...
@@ -192,7 +192,7 @@ void TrayWindow::mouseReleaseEvent(QMouseEvent* e)
*/
void
TrayWindow
::
dragEnterEvent
(
QDragEnterEvent
*
e
)
{
KAlarm
MainWindow
::
executeDragEnterEvent
(
e
);
MainWindow
::
executeDragEnterEvent
(
e
);
}
/******************************************************************************
...
...
@@ -201,7 +201,7 @@ void TrayWindow::dragEnterEvent(QDragEnterEvent* e)
*/
void
TrayWindow
::
dropEvent
(
QDropEvent
*
e
)
{
KAlarm
MainWindow
::
executeDropEvent
(
0
,
e
);
MainWindow
::
executeDropEvent
(
0
,
e
);
}
/******************************************************************************
...
...
@@ -288,7 +288,7 @@ void TrayWindow::tooltipAlarmText(QString& text) const
/******************************************************************************
* Called when the associated main window is closed.
*/
void
TrayWindow
::
removeWindow
(
KAlarm
MainWindow
*
win
)
void
TrayWindow
::
removeWindow
(
MainWindow
*
win
)
{
if
(
win
==
mAssocMainWindow
)
mAssocMainWindow
=
0
;
...
...
traywindow.h
View file @
29adb937
...
...
@@ -24,45 +24,45 @@
#include <ksystemtray.h>
class
KPopupMenu
;
class
KAlarm
MainWindow
;
class
MainWindow
;
class
TrayTooltip
;
class
TrayWindow
:
public
KSystemTray
{
Q_OBJECT
public:
TrayWindow
(
KAlarm
MainWindow
*
parent
,
const
char
*
name
=
0
);
TrayWindow
(
MainWindow
*
parent
,
const
char
*
name
=
0
);
~
TrayWindow
();
void
removeWindow
(
KAlarm
MainWindow
*
);
KAlarmMainWindow
*
assocMainWindow
()
const
{
return
mAssocMainWindow
;
}
void
setAssocMainWindow
(
KAlarm
MainWindow
*
win
)
{
mAssocMainWindow
=
win
;
}
bool
inSystemTray
()
const
;
void
tooltipAlarmText
(
QString
&
text
)
const
;
void
removeWindow
(
MainWindow
*
);
MainWindow
*
assocMainWindow
()
const
{
return
mAssocMainWindow
;
}
void
setAssocMainWindow
(
MainWindow
*
win
)
{
mAssocMainWindow
=
win
;
}
bool
inSystemTray
()
const
;
void
tooltipAlarmText
(
QString
&
text
)
const
;
public
slots
:
void
slotQuit
();
void
slotQuit
();
signals:
void
deleted
();
void
deleted
();
protected:
virtual
void
contextMenuAboutToShow
(
KPopupMenu
*
);
virtual
void
mousePressEvent
(
QMouseEvent
*
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
virtual
void
dropEvent
(
QDropEvent
*
);
virtual
void
contextMenuAboutToShow
(
KPopupMenu
*
);
virtual
void
mousePressEvent
(
QMouseEvent
*
);
virtual
void
mouseReleaseEvent
(
QMouseEvent
*
);
virtual
void
dragEnterEvent
(
QDragEnterEvent
*
);
virtual
void
dropEvent
(
QDropEvent
*
);
private
slots
:
void
slotNewAlarm
();
void
slotPreferences
();
void
setEnabledStatus
(
bool
status
);
void
slotNewAlarm
();
void
slotPreferences
();
void
setEnabledStatus
(
bool
status
);
private:
friend
class
TrayTooltip
;
KAlarm
MainWindow
*
mAssocMainWindow
;
// main window associated with this, or null
QPixmap
mPixmapEnabled
,
mPixmapDisabled
;
TrayTooltip
*
mTooltip
;
MainWindow
*
mAssocMainWindow
;
// main window associated with this, or null
QPixmap
mPixmapEnabled
,
mPixmapDisabled
;
TrayTooltip
*
mTooltip
;
};
#endif // TRAYWINDOW_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment