Tag Archives: SLOT

Wanted: Apply for this Junior Job!

Aaron implemented in plasma master (now kdeplasma-addons in in git) the functionality to use the Apply button in the C++ applets config dialogs: when you change a setting, Apply makes the setting visible without closing the configuration dialog.
So the changes were made in some plasma files and now all the C++ applets have to be ported. It’s really a very easy job and I did it with the Picture Frame applet (so I could test my git skills and do my first push): you only need to connect all UI widgets in the configuration dialog to the slot SLOT(settingsModified())
Read the mail from Aaron
http://mail.kde.org/pipermail/plasma-devel/2011-February/014888.html
look at my commit for the Picture Frame applet
https://projects.kde.org/projects/kde/kdeplasma-addons/repository/revisions/2a2d1c167c51fd2694b5873665fd669515cc4732

Folderview also is already ported.

If you need help, we’ll be happy to provide it on IRC in #plasma or using the plasma-devel mailing list.
You can either send me the patches or push yourself if you have an account.

Please remember to add the applet you are working on and your name on
http://community.kde.org/Plasma/Tasks#config_dialogs

Thanks a lot!

PS: my first problem with git was because my distro version (1.6.4.4) was too old to support separate urls so be sure to have a recent enough git version in order to be able to push. Again thanks to the 24/24 admin support (a Saturday morning!) the problem was quickly spotted! I built git from git and it’s all OK now.

I should note that it requires master (as kdelibs and kdebase and kdeplasma-addons are on git). Master is the new term for “trunk”. …read more

Source: FULL ARTICLE at Planet KDE

OpenGL in Qt 5.1 – Part 4

This article continues our series on what is new in Qt 5.1 with respect to OpenGL. Earlier articles in this series are available at:

OpenGL Debug Output

The traditional way to debug OpenGL is to call glGetError() after every GL function call. This is tedious, clutters up our code, and doesn’t warn about performance issues or other non-error situations. In the last couple of years various debug extensions have been proposed and have proven their usefulness. These have very recently been unified into the GL_KHR_debug extension for both OpenGL and OpenGL ES.

KDAB engineer Giuseppe D’Angelo has exposed the functionlity of the GL_KHR_debug extension via the new class QOpenGLDebugLogger which will also be part of Qt 5.1. The QOpenGLDebugLogger class can be used to either request previously logged messages from OpenGL or to emit a signal each time OpenGL logs a message. The QOpenGLDebugLogger::messageLogged() signal can be connected up to a slot where you can respond to the message appropriately, say by outputting using qDebug(), handling the error etc.

The signal can be emitted either asynchronously for minimal performance impact on your running application, or synchronously and with a larger performance impact. Although the synchronous approach has a cost, it does have one massive advantage. Setting a break point in a slot connected to the messageLogged() signal will allow you to break execution and see the stack and the exact OpenGL function call that caused the error or
warning. This is incredibly useful when debugging OpenGL applications and not a glGetError() call in sight!

Using the above mechanism, OpenGL is also able to provide informational messages to us as well as errors. These may include data about where particular vertex buffer objects reside (GPU or CPU memory), if the correct usage hint has been given for a buffer object, or if we are violating it and causing the driver grief resulting in performance issues. All of these and more are now trivially available to us. It is even possible for your application or Qt to inject their own messages into the OpenGL logging system and we can filter based upon message type, severity etc.

Using the QOpenGLDebugLogger is very simple:

void Scene::initialize()
{
    m_logger = new QOpenGLDebugLogger( this );

    connect( m_logger, SIGNAL( messageLogged( QOpenGLDebugMessage ) ),
             this, SLOT( onMessageLogged( QOpenGLDebugMessage ) ),
             Qt::DirectConnection );

    if ( m_logger->initialize() ) {
        m_logger->startLogging( QOpenGLDebugLogger::SynchronousLogging );
        m_logger->enableMessages();
    }

    // Populate a buffer object
    m_positionBuffer.create();
    m_positionBuffer.setUsagePattern( QOpenGLBuffer::StreamDraw );
    m_positionBuffer.bind();
    m_positionBuffer.allocate( positionData,
                             ...read more 
Source: FULL ARTICLE at Planet KDE