kde

How to load default settings with KConfig on kdelib?

橙三吉。 提交于 2020-01-01 19:59:28
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

How to load default settings with KConfig on kdelib?

荒凉一梦 提交于 2020-01-01 19:59:15
问题 I've a question about KConfig usage. I'm able to write and read settings in my .kde4/share/config/_appname_rc configuration file like that KConfig basicconf; KConfigGroup conf = KConfigGroup(basicconf.group("Settings")); conf.writeEntry("filepath",QString("/path/")); basicconf.sync(); But I don't understand how to use a "default" configuration file to read at first time i run my application, or in case if application settings needs reset. I prefer do not use KConfig XT because my project is

2D Kernel Density Estimate in Matlab

喜欢而已 提交于 2020-01-01 19:18:28
问题 I am using this function to estimate kernel density in 2D. I am slightly confused by the parameters of this function however. Here is an example, viewed from directly above, where density is being calculated at each point (O) in the figure. i.e: over very small areas. I want to change the KDE function parameters so that density is computed over a larger area (for example, the area circled in red). Which parameters do I need to change? I presume it is one (or both) of these: "n: size of the n

Very frustrating problem with cmake

我只是一个虾纸丫 提交于 2020-01-01 11:56:48
问题 I am having a frustrating problem with cmake on windows. i have the kde libs installed. when i am trying to compile my project with cmake . this shoots up again and again. Found Qt-Version 4.7.0 (using C:/Qt/2010.05/qt/bin/qmake.exe) CMake Error at c:/Program Files/KDE/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE): Did not find automoc4 (Automoc4Config.cmake, part of kdesupport). (missing: AUTOMOC4_EXECUTABLE) Call Stack (most recent call first): c:/Program Files

Detect if qt is running a debug build at runtime

别说谁变了你拦得住时间么 提交于 2020-01-01 04:02:10
问题 How can I detect from within a QObject at runtime whether or not the Qt it's linked against is a debug build or release build? I know about the QT_NO_DEBUG macro, but that is resolved at build time for Qt. Example 1 of when this would be useful: I have a plugin that acts as a crash handler, providing a backtrace. I only want this plugin to attempt to do all this work if the qt debug symbols are available. Example 2: I have a command line argument parser written in pyqt. It wants to print

How to set my application's desktop icon for Linux: KDE, Gnome etc?

自作多情 提交于 2019-12-31 21:25:26
问题 I have a cross platform program that runs on Windows, Linux and Macintosh. My windows version has an Icon but I don't know how to make have one for my Linux build. Is there a standard format for KDE, Gnome etc. or will I have to do something special for each one? My app is in c++ and distributed as source so the end user will compile it with gcc. If I can have the icon embedded directly inside my exe binary that would be the best. 回答1: For Gnome and Kde, you would probably want to include a

Python-Application .desktop-shortcut causing malfunction

谁说我不能喝 提交于 2019-12-25 14:50:00
问题 I wanted to create a desktop launcher for my Python application. The application executes various ssh operations over pexpect with publickey-authentication. The problem is however, when I start my app with the .desktop launcher it doesn't work properly. The ssh connections ask for a password and don't use the publickeys. But it works fine via commandline execution. The .desktop File looks like this: [Desktop Entry] Version=1.0 Name=SSH-Manager Comment=XYZ Exec=python /home/userx/SSH-Manager

Python-Application .desktop-shortcut causing malfunction

半腔热情 提交于 2019-12-25 14:49:08
问题 I wanted to create a desktop launcher for my Python application. The application executes various ssh operations over pexpect with publickey-authentication. The problem is however, when I start my app with the .desktop launcher it doesn't work properly. The ssh connections ask for a password and don't use the publickeys. But it works fine via commandline execution. The .desktop File looks like this: [Desktop Entry] Version=1.0 Name=SSH-Manager Comment=XYZ Exec=python /home/userx/SSH-Manager

starting and stopping a daemon at user login logout

巧了我就是萌 提交于 2019-12-24 10:57:57
问题 I have a daemon script written in ruby which responds to commands like daemon start and daemon stop . It's executable with shebang #!/usr/bin/env ruby and it works invoked from terminal. I need to start the daemon on login and stop it on logout. Background info: KDE, zsh. I already tried to make two separate shell scripts with daemon start and daemon stop and place them in ~/.kde4/Autostart | ~/.kde4/shutdown . The scripts start.sh and stop.sh are working in terminal, but no luck in autostart

Gaussian summation for 2D scatter plots using python

你离开我真会死。 提交于 2019-12-24 03:30:53
问题 I am trying to establish what people would loosely refer to as a homemade KDE - I suppose. I am trying to evaluate a density of a rather huge set of datapoints. In particular, having many data points for a scatter, I want to indicate the density using a color gradient (see link below). For exemplification, I provide a random pair of (x,y) data below. The real data will be spread on different scales, hence the difference in X and Y grid point spacing. import numpy as np from matplotlib import