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
KRuler
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
Graphics
KRuler
Commits
5174ad92
Commit
5174ad92
authored
Jun 30, 2009
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create quit button when it's necessary
svn path=/trunk/KDE/kdegraphics/kruler/; revision=989368
parent
115c9582
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
10 deletions
+18
-10
klineal.cpp
klineal.cpp
+17
-10
klineal.h
klineal.h
+1
-0
No files found.
klineal.cpp
View file @
5174ad92
...
...
@@ -87,6 +87,7 @@ KLineal::KLineal( QWidget *parent )
mCloseButton
(
0
),
mTrayIcon
(
0
)
{
firstCreate
=
true
;
KWindowSystem
::
setType
(
winId
(),
NET
::
Override
);
// or NET::Normal
KWindowSystem
::
setState
(
winId
(),
NET
::
KeepAbove
);
...
...
@@ -253,16 +254,22 @@ KLineal::~KLineal()
void
KLineal
::
createSystemTray
()
{
KAction
*
closeAction
=
KStandardAction
::
close
(
this
,
SLOT
(
slotClose
()
),
this
);
mActionCollection
->
addAction
(
"close"
,
closeAction
);
mMenu
->
addAction
(
closeAction
);
mCloseButton
=
new
QToolButton
(
this
);
mCloseButton
->
setIcon
(
closeAction
->
icon
()
);
mCloseButton
->
setToolTip
(
closeAction
->
text
().
remove
(
'&'
)
);
connect
(
mCloseButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
slotClose
()
)
);
mTrayIcon
=
new
KRulerSystemTray
(
KIcon
(
"kruler"
),
this
,
mActionCollection
);
mTrayIcon
->
setCategory
(
Experimental
::
KNotificationItem
::
ApplicationStatus
);
if
(
firstCreate
)
{
KAction
*
closeAction
=
KStandardAction
::
close
(
this
,
SLOT
(
slotClose
()
),
this
);
mActionCollection
->
addAction
(
"close"
,
closeAction
);
mMenu
->
addAction
(
closeAction
);
mCloseButton
=
new
QToolButton
(
this
);
mCloseButton
->
setIcon
(
closeAction
->
icon
()
);
mCloseButton
->
setToolTip
(
closeAction
->
text
().
remove
(
'&'
)
);
connect
(
mCloseButton
,
SIGNAL
(
clicked
()
),
this
,
SLOT
(
slotClose
()
)
);
firstCreate
=
false
;
}
if
(
!
mTrayIcon
)
{
mTrayIcon
=
new
KRulerSystemTray
(
KIcon
(
"kruler"
),
this
,
mActionCollection
);
mTrayIcon
->
setCategory
(
Experimental
::
KNotificationItem
::
ApplicationStatus
);
}
}
...
...
klineal.h
View file @
5174ad92
...
...
@@ -98,6 +98,7 @@ private:
QToolButton
*
mCloseButton
;
KRulerSystemTray
*
mTrayIcon
;
bool
firstCreate
;
public
slots
:
void
setOrientation
(
int
);
void
setNorth
();
...
...
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