better debug infos about shortcuts

This commit is contained in:
Uwe Rathmann 2017-07-26 13:21:10 +02:00
parent a01749e2ba
commit 2636c4a7af
2 changed files with 11 additions and 3 deletions

View File

@ -6,6 +6,9 @@
#include <SkinnyShortcut.h>
#include <QGuiApplication>
#include <iostream>
using namespace std;
int main( int argc, char** argv )
{
@ -29,7 +32,8 @@ int main( int argc, char** argv )
qskSetup->setSkin( "DefaultSkin" );
SkinnyShortcut::enable( SkinnyShortcut::DebugBackground | SkinnyShortcut::Quit );
cout << "CTRL-S to change the skin." << endl;
cout << "CTRL-T to change the color scheme, when the \"Default\" skin is active." << endl;
QskShortcut::addShortcut( QKeySequence( Qt::CTRL + Qt::Key_T ),
&skinFactory, SLOT( toggleScheme()), false );
@ -37,6 +41,10 @@ int main( int argc, char** argv )
QskShortcut::addShortcut( QKeySequence( Qt::CTRL + Qt::Key_S ),
&skinFactory, SLOT( rotateSkin()), false );
// With CTRL-B you can rotate a couple of visual debug modes
SkinnyShortcut::enable( SkinnyShortcut::DebugBackground |
SkinnyShortcut::DebugStatistics | SkinnyShortcut::Quit );
MainWindow mainWindow;
mainWindow.show();

View File

@ -204,8 +204,8 @@ void SkinnyShortcut::debugStatistics()
int counter[4] = {};
countItems( w->contentItem(), counter );
std::cout << w << "\n\titems:" << counter[0] << "visible" << counter[1]
<< "\n\tnodes:" << counter[2] << "visible" << counter[3] << std::endl;
qDebug() << w << "\n\titems:" << counter[0] << "visible" << counter[1]
<< "\n\tnodes:" << counter[2] << "visible" << counter[3];
}
}