[Breeze] [Bug 369158] Breeze sddm theme broken on dual monitor setup (no cursor)

2019-12-07 Thread Simone Gaiarin
https://bugs.kde.org/show_bug.cgi?id=369158

--- Comment #5 from Simone Gaiarin  ---
Works for me.

Tested using a second screen connected via HDMI using Breeze and Breadth
themes.
- Mouse cursor present
- Type cursor present
- Screen are mirrored (if I type in the password, the bullets appear on the
fields of both screens)

-- 
You are receiving this mail because:
You are the assignee for the bug.

D19312: Add tooltip for quick search

2019-03-01 Thread Simone Gaiarin
simgunz added a comment.


  @ngraham Thanks for the guidelines
  
  I landed it, and it seems I have not messed up anything.

REPOSITORY
  R111 KSysguard Library

REVISION DETAIL
  https://phabricator.kde.org/D19312

To: simgunz, #plasma, cfeck, broulik, mart
Cc: ngraham, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D19312: Add tooltip for quick search

2019-03-01 Thread Simone Gaiarin
This revision was automatically updated to reflect the committed changes.
Closed by commit R111:839be94eaf7b: Add tooltip for quick search (authored by 
simgunz).

REPOSITORY
  R111 KSysguard Library

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D19312?vs=52550=52881

REVISION DETAIL
  https://phabricator.kde.org/D19312

AFFECTED FILES
  processui/ProcessWidgetUI.ui

To: simgunz, #plasma, cfeck, broulik, mart
Cc: ngraham, plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D19312: Add tooltip for quick search

2019-02-27 Thread Simone Gaiarin
simgunz added a comment.


  I never landed a diff before because I just got my KDE developer account. 
  Few general questions:
  
  - Is it enough that one reviewer accept the revision, or all the listed ones 
should accept it? (or depends on the project?)
  - Can I directly land it once the condition above is satisfied, or is it 
always better to ask before landing it?

REPOSITORY
  R111 KSysguard Library

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19312

To: simgunz, #plasma, cfeck, broulik, mart
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


D19312: Add tooltip for quick search

2019-02-25 Thread Simone Gaiarin
simgunz created this revision.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
simgunz requested review of this revision.

REPOSITORY
  R111 KSysguard Library

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D19312

AFFECTED FILES
  processui/ProcessWidgetUI.ui

To: simgunz
Cc: plasma-devel, jraleigh, GB_2, ragreen, Pitel, ZrenBot, lesliezhai, 
ali-mohamed, jensreuterberg, abetts, sebas, apol, mart


[Breeze] [Bug 369158] Breeze sddm theme broken on dual monitor setup (no cursor)

2016-12-04 Thread Simone Gaiarin
https://bugs.kde.org/show_bug.cgi?id=369158

Simone Gaiarin <simg...@gmail.com> changed:

   What|Removed |Added

 CC||simg...@gmail.com

--- Comment #1 from Simone Gaiarin <simg...@gmail.com> ---
I also experience the lack of cursor.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Breeze] [Bug 370648] SDDM Breeze theme hardly usable on multiscreen set up with different DPIs

2016-12-04 Thread Simone Gaiarin
https://bugs.kde.org/show_bug.cgi?id=370648

Simone Gaiarin <simg...@gmail.com> changed:

   What|Removed |Added

 CC||simg...@gmail.com

--- Comment #1 from Simone Gaiarin <simg...@gmail.com> ---
I can confirm this.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Debug plasma crash when plasmoid calls serviceForSource

2016-09-06 Thread Simone Gaiarin
Hi,
the plasmoid I'm developing makes plasma crash when I call serviceForSource.
This happens sometimes, and I can reproduce it by flooding plasma with
serviceForSource requests (scrolling the mouse wheel over the plasmoid
creates a lot of this requests).
My plasmoid implements a custom dataengine.

I've tried to flood plasma with serviceForSource requests towards a
standard dataEngine (mpris) and I cannot reproduce the crash.

So I guess the crash is caused by my implementation. The point is that the
crash happens after calling serviceForSource from the plasmoid but before
reaching the dataEngine (the debug string in the dataengine is not shown
before the crash).

How can I debug this problem? Even though I've debug symbols installed,
drkonqi is not shown after the crash of plasma.

Thanks


Re: Porting C++ plasmoid and dataengine to plasma5

2016-07-14 Thread Simone Gaiarin
Thanks Marco for pointing me in the right direction.

My use case is more or less what I've explained before:
- I need to control the process for the program redshift.
- The process is controlled by a dataengine which need to be able to access
the configuration
- I want more than an instance of the plasmoid to be able to control it, so
they need to share the configuration among themselves and with the
dataengine.

In plasma 4 I was using KConfigXT with the integration in KConfigDialog as
explained here:
https://techbase.kde.org/Development/Tutorials/Using_KConfig_XT#Use_and_Dialogs
so that the configuration dialogs where all automatically in sync and the
settings were available to the data engine.


 Still I don't understand one thing:
- when I open the configuration ui how do I load the data in the ui fields
from applet.globalconfig? Is there a signal that tells me that the
configuration is about to be shown?

On documentation:
Can you point me out some references on the use of nativeinterface, the
attached plasmoid object, how you manage the configuration?
Possibly I can help in writing some documentation on this. All this plasma
mechanism are very fancy, but from my personal experience it's very
frustrating developing plasmoid that do something more than displaying
"Hello world", due to the lack of documentation for plasma 5. Information
is sparse in blog posts or outdated, most of my development has relied on
reverse engineer other plasmoids.

Thanks for the help.

On Wed, Jul 13, 2016 at 2:07 PM Simone Gaiarin <simg...@gmail.com> wrote:

> Hi all,
> time ago I've designed  a Plasma 4 plasmoid together with a dataengine to
> configure and control a process (redshift).
>
> The structure is the following:
> - The plasmoid allow the user to start and stop the process, this is done
> by running a servicejob to commmunicate the dataengine to take an action
> - The dataengine controls the process (start and stop it) [I need a custom
> dataengine and I cannot use the executable dataengine]
> - Multiple instances of the plasmoid and the dataengine share the
> configuaration via KConfigXT (Singleton) in this way when the user access
> the plasmoid configuration this is propagated to the dataengine and synced
> with other instances of the plasmoid
>
> Now I want to port this to plasma 5 but I'm facing huge difficulties. I've
> managed to port the dataengine, rewrite the CMakeFiles and I've partially
> rewritten the apple in QML.
>
> The problem now is how to manage the configuration.
>
> I know that the plasmoid configuration can be accessed  via
> plasmoid.configuration and that I can map the fields in main.xml to the ui
> elements of the config dialog. The problem is how to synchronize this
> configuration with the other instances of the plasmoid (each plasmoid has
> his own configuration in plasma 5).
> How to pass this configuration to the dataengine?
> Any idea to do this in a simple way?
>
> I've tried to extend my plasmoid with a C++ plugin so that in C++ I can
> still use the old KConfigXT system in order to share a config file between
> the plasmoid and the dataengine.
>
> My current solution is pretty ugly but it works. It's the following:
> - When the configuration of the plasmoid is edited (I check this throught
> the signal userConfiguringChanged) I get the values from
> plasmoid.configuration and send it to the plasmoid C++ plugin (with a
> custom method writeConfig)
> - The plasmoid C++ plugin use KonfigXT to save the configuration and emits
> a signal myConfigChanged
> - The plasmoid run the service job so that the dataengine can act
> - From all the instances of the plasmoid I monitor the dataengine
> onNewData signal and when it is catched I read the configuration from the
> C++ plugin (with a custom method readConfig) and the plugin read it from
> disk
>
> In the configuration of all the instances of the plasmoid and the
> dataengine one are synchronized all the time. It's overly complicated
> though compared to the plasma 4 solution.
>
> Various doubt:
> 1) The plasmoid configuration system is explained here:
> http://aseigo.blogspot.dk/2013/02/elegant-plasmoid-configuration.html. Is
> it there any other page of documentation for this?
>
> 2) Which is the proper way to extend the QML plasmoid in C++. I've seen
> two approaches.
> - plasmoid.nativeInterface as suggested
> in plasma-framework/templates/cpp-plasmoid/ (<- This should be documented
> in techbase, it's quite hidden)
> - The other as explained here
> http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html and how
> I've seen implemented in many plasmoids
>
> Regards
>
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Porting C++ plasmoid and dataengine to plasma5

2016-07-13 Thread Simone Gaiarin
Hi all,
time ago I've designed  a Plasma 4 plasmoid together with a dataengine to
configure and control a process (redshift).

The structure is the following:
- The plasmoid allow the user to start and stop the process, this is done
by running a servicejob to commmunicate the dataengine to take an action
- The dataengine controls the process (start and stop it) [I need a custom
dataengine and I cannot use the executable dataengine]
- Multiple instances of the plasmoid and the dataengine share the
configuaration via KConfigXT (Singleton) in this way when the user access
the plasmoid configuration this is propagated to the dataengine and synced
with other instances of the plasmoid

Now I want to port this to plasma 5 but I'm facing huge difficulties. I've
managed to port the dataengine, rewrite the CMakeFiles and I've partially
rewritten the apple in QML.

The problem now is how to manage the configuration.

I know that the plasmoid configuration can be accessed  via
plasmoid.configuration and that I can map the fields in main.xml to the ui
elements of the config dialog. The problem is how to synchronize this
configuration with the other instances of the plasmoid (each plasmoid has
his own configuration in plasma 5).
How to pass this configuration to the dataengine?
Any idea to do this in a simple way?

I've tried to extend my plasmoid with a C++ plugin so that in C++ I can
still use the old KConfigXT system in order to share a config file between
the plasmoid and the dataengine.

My current solution is pretty ugly but it works. It's the following:
- When the configuration of the plasmoid is edited (I check this throught
the signal userConfiguringChanged) I get the values from
plasmoid.configuration and send it to the plasmoid C++ plugin (with a
custom method writeConfig)
- The plasmoid C++ plugin use KonfigXT to save the configuration and emits
a signal myConfigChanged
- The plasmoid run the service job so that the dataengine can act
- From all the instances of the plasmoid I monitor the dataengine onNewData
signal and when it is catched I read the configuration from the C++ plugin
(with a custom method readConfig) and the plugin read it from disk

In the configuration of all the instances of the plasmoid and the
dataengine one are synchronized all the time. It's overly complicated
though compared to the plasma 4 solution.

Various doubt:
1) The plasmoid configuration system is explained here:
http://aseigo.blogspot.dk/2013/02/elegant-plasmoid-configuration.html. Is
it there any other page of documentation for this?

2) Which is the proper way to extend the QML plasmoid in C++. I've seen two
approaches.
- plasmoid.nativeInterface as suggested
in plasma-framework/templates/cpp-plasmoid/ (<- This should be documented
in techbase, it's quite hidden)
- The other as explained here
http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html and how
I've seen implemented in many plasmoids

Regards
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Porting C++ plasmoid+dataengine to plasma5

2016-07-10 Thread Simone Gaiarin
Hi all,
time ago I've designed  a Plasma 4 plasmoid together with a dataengine to
configure and control a process (redshift).

The structure is the following:
- The plasmoid allow the user to start and stop the process, this is done
by running a servicejob provided by the dataengine
- The dataengine controls the process (start and stop it) [I need a custom
dataengine and I cannot use the executable dataengine]
- Multiple instances of the plasmoid and the dataengine share the
configuaration via KConfigXT in this way when the user access the plasmoid
configuration this is propagated to the dataengine and synced with other
instances of the plasmoid

Now I want to port this to plasma 5 but I'm facing huge difficulties. I've
managed to port the dataengine, rewrite the CMakeFiles and I've partially
rewritten the apple in QML.

The problem now is how to manage the configuration.

I know that the plasmoid configuration can be accessed  via
plasmoid.configuration and that I can map the fields in main.xml to the ui
elements of the config dialog. The problem is how to synchronize this
configuration with the other instances of the plasmoid (each plasmoid has
his own configuration in plasma 5).
How to pass this configuration to the dataengine?
Any idea to do this in a simple way?

I've tried to extend my plasmoid with a C++ plugin so that in C++ I can
still use the old KConfigXT system in order to share a config file between
the plasmoid and the dataengine (somehow works) but I don't know how  to
sync this with the plasmoid configuration.
In particular how can I know when the user finished editing the settings in
the UI so that I can notify the dataengine? It seems there are no signal to
notify this.


Various doubt:
1) The plasmoid configuration system is explained here:
http://aseigo.blogspot.dk/2013/02/elegant-plasmoid-configuration.html. Is
it there any other page of documentation for this?

2) Which is the proper way to extend the QML plasmoid in C++. I've seen two
approaches.
- plasmoid.nativeInterface as suggested
in plasma-framework/templates/cpp-plasmoid/ (<- This should be documented
in techbase, it's quite hidden)
- The other as explained here
http://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html and how
I've seen implemented in many plasmoids

3) How can I catch a signal emitted by the 'plasmoid' object in QML?
Let's say I want to catch the signal '*userConfiguringChanged' how can I do
it?*

Regards
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Powerdevil] [Bug 357621] Screen cannot be turned on after it has been set to "energy saving" (goes off)

2016-04-05 Thread Simone Gaiarin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=357621

--- Comment #5 from Simone Gaiarin <simg...@gmail.com> ---
Yes that workaround works also for me. Very annoying tough.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Powerdevil] [Bug 357621] Screen cannot be turned on after it has been set to "energy saving" (goes off)

2016-04-05 Thread Simone Gaiarin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=357621

--- Comment #3 from Simone Gaiarin <simg...@gmail.com> ---
Still have this problem also after updating to Qt 5.6 and Plasma 5.6. I've
disabled the screen energy saving in "energy saving" but still the screen turn
off. What other settings can I change? How can I debug it?

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


[Powerdevil] [Bug 357621] New: Screen cannot be turned on after it has been set to "energy saving" (goes off)

2016-01-06 Thread Simone Gaiarin via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=357621

Bug ID: 357621
   Summary: Screen cannot be turned on after it has been set to
"energy saving" (goes off)
   Product: Powerdevil
   Version: 5.5.3
  Platform: Other
OS: Linux
Status: UNCONFIRMED
  Severity: normal
  Priority: NOR
 Component: general
  Assignee: plasma-devel@kde.org
  Reporter: simg...@gmail.com

When the notebook screen enters in energy saving mode and goes black, it cannot
be turned on again, which should happen when the mouse is moved or a key is
pressed.

To reenable it, I need to suspend the notebook and turn it on again.

If an external monitor is attached, this is not affected by the problem.




Reproducible: Sometimes

Steps to Reproduce:
1. Wait screen to enter energy saving mode
2. Move mouse
3.

Actual Results:  
Screen remains off

Expected Results:  
Screen turn on

Notebook: Dell E7440
Graphics card: Intel Corporation Haswell-ULT Integrated Graphics Controller
(rev 0b)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Assign plasmoid global shortcut to custom action

2014-07-21 Thread Simone Gaiarin
Yes. It's kde4.


2014-07-21 10:29 GMT+02:00 Marco Martin notm...@gmail.com:

 On Sunday 20 July 2014, Simone Gaiarin wrote:
  Hi all,
  I'm trying to use the global shortcut that the user can configure from
 the
  Shortcut configuration page of a plasma applet, to trigger a KAction
 and
  let the plasmoid do something.
 
  I've done this
 
  //Setup the action
  m_toggleAction = new KAction(ToggleAction, this);
  //Add action to the plasmoid action collection
  addAction(ToggleAction, m_toggleAction);
  m_toggleAction-setGlobalShortcut(globalShortcut());
  connect(m_toggleAction, SIGNAL(triggered(bool)), this,
 SLOT(toggle()));
 
  but nothing happens when I trigger the shortcut. Do anyone know what I'm
  missing?
  Is there any plasmoid that is using the global shortcut feature?
 
  Thanks

 hmm, that's kde4, right?

 --
 Marco Martin
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Assign plasmoid global shortcut to custom action

2014-07-20 Thread Simone Gaiarin
Hi all,
I'm trying to use the global shortcut that the user can configure from the
Shortcut configuration page of a plasma applet, to trigger a KAction and
let the plasmoid do something.

I've done this

//Setup the action
m_toggleAction = new KAction(ToggleAction, this);
//Add action to the plasmoid action collection
addAction(ToggleAction, m_toggleAction);
m_toggleAction-setGlobalShortcut(globalShortcut());
connect(m_toggleAction, SIGNAL(triggered(bool)), this, SLOT(toggle()));

but nothing happens when I trigger the shortcut. Do anyone know what I'm
missing?
Is there any plasmoid that is using the global shortcut feature?

Thanks
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Assign plasmoid global shortcut to custom action

2014-07-20 Thread Simone Gaiarin
From the documentation of Plasma Applet I've red that I need to run
addAssociatedWidget(someWidget) to make the actions work.

I've done this:

//Initialize the plasmoid using an IconWidget
m_button = new Plasma::IconWidget(this);
m_button-setIcon(KIcon(redshift-status-off));

m_layout = new QGraphicsGridLayout(this);
m_layout-setContentsMargins(0, 0, 0, 0);
m_layout-addItem(m_button, 0, 0);

m_widget = new QWidget();
m_layout-addItem(m_widget-graphicsProxyWidget(), 1, 0);

addAssociatedWidget(m_widget);

but still doesn't work.


2014-07-20 17:01 GMT+02:00 Simone Gaiarin simg...@gmail.com:

 Hi all,
 I'm trying to use the global shortcut that the user can configure from the
 Shortcut configuration page of a plasma applet, to trigger a KAction and
 let the plasmoid do something.

 I've done this

 //Setup the action
 m_toggleAction = new KAction(ToggleAction, this);
 //Add action to the plasmoid action collection
 addAction(ToggleAction, m_toggleAction);
 m_toggleAction-setGlobalShortcut(globalShortcut());
 connect(m_toggleAction, SIGNAL(triggered(bool)), this, SLOT(toggle()));

 but nothing happens when I trigger the shortcut. Do anyone know what I'm
 missing?
 Is there any plasmoid that is using the global shortcut feature?

 Thanks

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


KConfigXT: store dictionary

2012-03-18 Thread Simone Gaiarin
Hi,
I need to store with KconfigXT a value associated to each activity,
but since the number of activities is not know a priori I can't create
an entry for each activity in kcfg file. So I want to store a
dictionary (activity,value), is there a way to do this with KConfigXT
or should I fallback to KConfig?

Can I use the same kcfg file for the fields of different ui files?

Simone
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Accessing dataengine from different plasmoid

2012-02-23 Thread Simone Gaiarin
Thanks. I found the way to do it following your advise.

2012/2/22 Weng Xuetian wen...@gmail.com:
 在 2012年2月22日 星期三 12:59:58,Simone Gaiarin 写道:
 I'm writing a plasmoid to control redshift.
 Redshift is a program that change the colour temperature of the monitor.

 Here you can find the current plasmoid I wrote:
 http://kde-apps.org/content/show.php/Redshift+plasmoid?content=148737

 The current plasmoid span a redshift process from inside of it, so if
 I create two plasmoids they span two different process that create
 problems each other.

 What I want is create a plasmoid that can control this process through
 a dataengine, in such a way there is only one process running,
 controlled by multiple plasmoids.

 When the user click on the plasmoid it should be able to start and
 pause the process. So I need to create a service that perform the
 start/stop operations on the process.

 If the configuration is changed the process needs to be restarted.
 So I have to think about the correct way to connect the config changed
 event to the restart operation.

 I hope I've been clear enough.
 So, what I think about this like this:
 1. Create a dataengine, with only once source. (For your case)
 2. Abstract all your need to interact with the process as dataengine service.
 Dataengine code will be the only code that interactive with the process
 directly.
 3. Talk with the dataengine with the ServiceJob
 4. If some data need to be updated, store the data into data engine.

 You could take a look at now-playing, i
 https://projects.kde.org/projects/kde/kde-
 workspace/repository/revisions/master/show/plasma/generic/dataengines/nowplaying

 And see how the ServiceJob works.(for nowplaying case, play, pause, stop the
 player).

 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Accessing dataengine from different plasmoid

2012-02-22 Thread Simone Gaiarin
I'm writing a plasmoid to control redshift.
Redshift is a program that change the colour temperature of the monitor.

Here you can find the current plasmoid I wrote:
http://kde-apps.org/content/show.php/Redshift+plasmoid?content=148737

The current plasmoid span a redshift process from inside of it, so if
I create two plasmoids they span two different process that create
problems each other.

What I want is create a plasmoid that can control this process through
a dataengine, in such a way there is only one process running,
controlled by multiple plasmoids.

When the user click on the plasmoid it should be able to start and
pause the process. So I need to create a service that perform the
start/stop operations on the process.

If the configuration is changed the process needs to be restarted.
So I have to think about the correct way to connect the config changed
event to the restart operation.

I hope I've been clear enough.

2012/2/22 Weng Xuetian wen...@gmail.com:
 在 2012年2月22日 星期三 10:45:13,Simone Gaiarin 写道:
 Thank you. The problem was that I didn't run the plasmoid on the same
 process.

 What can be the best way to store a KProcess to the dataengine?
 Idea 1:
 Subclass the DataContainer class and store the KProcess in that class,
 like the Executable dataEngine does. When the source is requested i
 use addSource().
 Idea 2:
 Store the Kprocess as a private member of the dataengine.

  When I ask for the Service, which is the best way to act on the KProcess?
 Can I create a method to get the KProcess from the datacontainer? Or
 this will break the semantic of the datacontainer, that is supposed to
 just listen to signal updateRequested().

 Example:

 serviceForSource(const QString source)
 {
 container = query(source);
 pointerToProcess = container.getPointerToProcess();
 return new MyService(pointerToProcess,source);
 }

 The service will implement the operation start and stop that let
 to pause and resume the process.

 I think you can put KProcess in the dataengine as private member, and operate
 it only with dataengine service, not to direct get the pointer.

 What's your requirement by the way? I think there might be better solution for
 your idea.
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Accessing dataengine from different plasmoid

2012-02-21 Thread Simone Gaiarin
I need some explanation on how dataengines work. I can't understand if
the dataengine is shared among plasmoids or if every plasmoid creates
his own dataengine that retrive info.
My purpose is: I create a plasmoid, this plasmoid require a source to
a dataengine, this source is a pointer to a kprocess. After that I
create more plasmoids and they should access the same source to get
the pointer to the KProcess.
What I obtain when I call the dataEngine() method from a plasmoid is
that a new instance of a dataengine is created, so I cannot see source
requested by other plasmoid because the dataengines are distinct.

Example code:
Plasmoid:
init()
{
float num = rand();
QString source;
source.setNum(num);
dataEngine(engine)-connectSource(source,this);
qDebug()  dataEngine(engine)-sources();
}

Dataengine:
sourceRequestEvent(const QString name)
{
setData(name,Active,1);
return true;
}

I expect that when I create the second plasmoid, the output of
sources() contains two sources, the one associated to the current
plasmoid and the one associated to the previously created plasmoid.
Instead the output is only one source.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Python plasmoid and configChanged()

2012-02-05 Thread Simone Gaiarin
Hi,
I wrote a python plasmoid that needs to restart a program (redshift)
everytime that the configuration is changed by the user (the plasmoid
configChanged() function reacts to the signal). When the program is
restarted the user is aware of it, because the screen color become
white and than red again. But this is not a problem because the
configuration is likely changed only few times.
Although I've noticed that the signal configChanged() is emitted every
time every part of the desktop is changed. So everytime I add a
widget, lock/unlock widgets and so on, my plasmoid restarts the
program. Is this the normal behaviour? Shouldn't the signal be emitted
only when the configuration of my plasmoid is changed?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Python plasmoid and configChanged()

2012-02-05 Thread Simone Gaiarin
I call configChanged() once in the init function and then I connect it
to the configChanged() signal.

Here you can find the code:

https://github.com/simgunz/redshift-plasmoid/blob/master/contents/code/main.py


2012/2/5 Aaron J. Seigo ase...@kde.org:
 On Sunday, February 5, 2012 11:44:02 Simone Gaiarin wrote:
 Hi,
 I wrote a python plasmoid that needs to restart a program (redshift)
 everytime that the configuration is changed by the user (the plasmoid
 configChanged() function reacts to the signal). When the program is
 restarted the user is aware of it, because the screen color become
 white and than red again. But this is not a problem because the
 configuration is likely changed only few times.
 Although I've noticed that the signal configChanged() is emitted every
 time every part of the desktop is changed. So everytime I add a
 widget, lock/unlock widgets and so on, my plasmoid restarts the
 program. Is this the normal behaviour? Shouldn't the signal be emitted
 only when the configuration of my plasmoid is changed?

 yes, and that's how it should be working. do you call configChanged() from
 anywhere else in the plasmoid code?

 i tried just now with a C++ plasmoid, and it is not happening.

 tried again with a JS plasmoid, also not happening there either.

 so it seems this is something in your plasmoid or in the python bindings?

 --
 Aaron J. Seigo
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: KConfigXT default value code evaluation

2012-02-05 Thread Simone Gaiarin
So there is no way to compute the default value in the init function
and set it to the configuration dialog? Or I have to write the default
value to the rc file so that when the configuration dialog is showed
it reads this value?

2012/2/5 Aaron J. Seigo ase...@kde.org:
 On Sunday, February 5, 2012 00:44:47 Simone Gaiarin wrote:
 I'm writing a python plasmoid and I want to initialize a field with a
 default value from this function KSystemTimeZones::local().latitude()
 but it doesn't work.
 If I put a number in the default value it is taken correctly. I've
 also tried to add another include tag with KTimeZone.  I've tried even
 with the point insted of ::  KSystemTimeZones.local().latitude() . But
 it still doesn't work. Any idea?

 code is not supported in configxt loaded by plasmoids, as that requires
 generation, compilation and execution of C++ code. obviously, this is a no-
 go. it may be possible to run it in the runtime of the plasmoid (meaning it
 would become python in a python plasmoid, JS in a JS plasmoid, etc) but that
 would require a fair amount more work on the configxt support for plasmoids.

 --
 Aaron J. Seigo
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: KConfigXT default value code evaluation

2012-02-05 Thread Simone Gaiarin
I've solved in this way: I set as default value latitude=0 and
longitude=0 in main.xml , then in init I call configChanged and after
it I check if lat and lon are both zero. In this case I get their
default values in init and write these values to the rc file. In this
way when the dialog in opened the correct values are shown.

2012/2/5 Simone Gaiarin simg...@gmail.com:
 So there is no way to compute the default value in the init function
 and set it to the configuration dialog? Or I have to write the default
 value to the rc file so that when the configuration dialog is showed
 it reads this value?

 2012/2/5 Aaron J. Seigo ase...@kde.org:
 On Sunday, February 5, 2012 00:44:47 Simone Gaiarin wrote:
 I'm writing a python plasmoid and I want to initialize a field with a
 default value from this function KSystemTimeZones::local().latitude()
 but it doesn't work.
 If I put a number in the default value it is taken correctly. I've
 also tried to add another include tag with KTimeZone.  I've tried even
 with the point insted of ::  KSystemTimeZones.local().latitude() . But
 it still doesn't work. Any idea?

 code is not supported in configxt loaded by plasmoids, as that requires
 generation, compilation and execution of C++ code. obviously, this is a no-
 go. it may be possible to run it in the runtime of the plasmoid (meaning it
 would become python in a python plasmoid, JS in a JS plasmoid, etc) but that
 would require a fair amount more work on the configxt support for plasmoids.

 --
 Aaron J. Seigo
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Python plasmoid and configChanged()

2012-02-05 Thread Simone Gaiarin
Connecting configChanged() explicitly was the cause of the problem
apparently (I need to test it a little bit more). In many forum I've
found that the people suggest to do this connection, maybe it's old
stuff.

Another strange thing I noticed is that when I click OK in the config
dialog it does not close immediatly itself but it waits the end of the
function configChanged() and since in my case this function takes
about 10 seconds to complete the config dialog remain frozen for 10
seconds before closing.

I tried a workaround to avoid this behaviour trying to emit a custom
signal at the end of configChanged that activate the slow function,
but even in this case the config dialog waits. Any idea on how to
solve this?

2012/2/5 Aaron J. Seigo ase...@kde.org:
 On Sunday, February 5, 2012 15:16:03 Simone Gaiarin wrote:
 I call configChanged() once in the init function and then I connect it
 to the configChanged() signal.

 you don't need to connect it to any signal. i'm not sure if that's the cause
 of your problem, but it is unecessary in any case.

 and just in case something odd is going on .. the init function is indeed only
 being called once, correct?

 --
 Aaron J. Seigo
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


KConfigXT default value code evaluation

2012-02-04 Thread Simone Gaiarin
I'm writing a python plasmoid and I want to initialize a field with a
default value from this function KSystemTimeZones::local().latitude()
but it doesn't work.
If I put a number in the default value it is taken correctly. I've
also tried to add another include tag with KTimeZone.  I've tried even
with the point insted of ::  KSystemTimeZones.local().latitude() . But
it still doesn't work. Any idea?

?xml version=1.0 encoding=UTF-8?
kcfg xmlns=http://www.kde.org/standards/kcfg/1.0;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xsi:schemaLocation=http://www.kde.org/standards/kcfg/1.0
  http://www.kde.org/standards/kcfg/1.0/kcfg.xsd; 
  includeKSystemTimeZones/include
  kcfgfile name=redshiftrc/
  group name=General
entry name=latitude type=Double
  labelLatitude/label
  default code=trueKSystemTimeZones::local().latitude()/default
/entry
  /group
/kcfg
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Change activity by rolling the mouse wheel over the showActivityManager widget.

2011-12-28 Thread Simone Gaiarin
I understand and I agree with you. So I leave this work to someone
more skilled by me. I'm still a newbie kde programmer. I'll close the
review request.

Cheers

2011/12/28 Sebastian Kügler se...@kde.org:
 On Tuesday, December 27, 2011 20:00:12 Simone Gaiarin wrote:
 Summarizing:
 1)No redundant configuration interface should be added.
 2)Only cycle through active activity is fine, but the dbus interface

 I still don't like this behaviour, as, even with a tooltip, it's still kind of
 hidden. A more explicit behaviour would be nicer.

 should provide a method to get the list of active activity to simplify
 the work, or it will be necessary to make a dbus call for every
 activity to check if it is active. But what is the sense of active or
 unactive activity?
 3)The tooltip popup of the widget now says: Click to show the
 activity manager. We can add a description like: Scroll to switch
 activity.
 With this two changes who do not use activities can't do any mista
 since the widget does not do anything even if he scroll over it.
 Instead the activity aware user can know how the widget work from the
 tooltip.
 4)Later, as a final improvement an osd with the activity name can be added.

 This is really what should be done, maybe like a kwin VD switching effect?

 What do you think?

 I'm not a great fan of pushing in the wheel-switches-activity, this should be
 improved in the correct way right away. We're so far away from feature freeze
 (4.9) that we don't really need a quick thing in.

 Cheers,
 --
 sebas

 http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Review Request: Change activity by rolling the mouse wheel over the showActivityManager widget.

2011-12-27 Thread Simone Gaiarin

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103548/
---

(Updated Dec. 26, 2011, 10:46 p.m.)


Review request for Plasma and Aaron J. Seigo.


Description
---

Rolling the mouse wheel over the showActivityManager change the current 
activity. In this way it's not necessary to open the activities menu, select 
the activity and close the menu and the activity change is faster.


Diffs
-

  plasma/desktop/applets/showActivityManager/showActivityManager.h 
f58fbb71a633f7f2ee3185650a9a7cbb083ec955 
  plasma/desktop/applets/showActivityManager/showActivityManager.cpp 
e77df0d82c64562390fc922105cd3aea9af138a2 

Diff: http://git.reviewboard.kde.org/r/103548/diff/diff


Testing
---

The plasmoid works fine after the patch.


Thanks,

Simone Gaiarin

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: Change activity by rolling the mouse wheel over the showActivityManager widget.

2011-12-27 Thread Simone Gaiarin

---
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103548/
---

Review request for Plasma and Aaron J. Seigo.


Description
---

Rolling the mouse wheel over the showActivityManager change the current 
activity. In this way it's not necessary to open the activities menu, select 
the activity and close the menu and the activity change is faster.


Diffs
-

  plasma/desktop/applets/showActivityManager/showActivityManager.h 
f58fbb71a633f7f2ee3185650a9a7cbb083ec955 
  plasma/desktop/applets/showActivityManager/showActivityManager.cpp 
e77df0d82c64562390fc922105cd3aea9af138a2 

Diff: http://git.reviewboard.kde.org/r/103548/diff/diff


Testing
---

The plasmoid works fine after the patch.


Thanks,

Simone Gaiarin

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Review Request: Change activity by rolling the mouse wheel over the showActivityManager widget.

2011-12-27 Thread Simone Gaiarin
To fix the two problem it is just necessary to add a configuration
dialog to the plasmoid in a such way that the user must intentionally
enable this feature before use it. What do you think about this
solution? I'll work on it.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Mouse wheel support for the activity widget

2011-12-27 Thread Simone Gaiarin
Hi,
I've implemented the functionality for changing the activity rolling
the mouse wheel over the showActivityManager plasmoid.
I like this functionality because I can put the widget on the panel
and change the activity without doing 'show desktoproll over desktop'
or 'open activity panel  select activity  close activity panel',
I've attached a patch to the email. If you like it maybe you can merge
it upstream.
Bye

Simone Gaiarin


wheel.patch
Description: Binary data
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel