better debug infos about shortcuts
This commit is contained in:
parent
a01749e2ba
commit
2636c4a7af
@ -6,6 +6,9 @@
|
|||||||
#include <SkinnyShortcut.h>
|
#include <SkinnyShortcut.h>
|
||||||
|
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
int main( int argc, char** argv )
|
int main( int argc, char** argv )
|
||||||
{
|
{
|
||||||
@ -29,7 +32,8 @@ int main( int argc, char** argv )
|
|||||||
|
|
||||||
qskSetup->setSkin( "DefaultSkin" );
|
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 ),
|
QskShortcut::addShortcut( QKeySequence( Qt::CTRL + Qt::Key_T ),
|
||||||
&skinFactory, SLOT( toggleScheme()), false );
|
&skinFactory, SLOT( toggleScheme()), false );
|
||||||
@ -37,6 +41,10 @@ int main( int argc, char** argv )
|
|||||||
QskShortcut::addShortcut( QKeySequence( Qt::CTRL + Qt::Key_S ),
|
QskShortcut::addShortcut( QKeySequence( Qt::CTRL + Qt::Key_S ),
|
||||||
&skinFactory, SLOT( rotateSkin()), false );
|
&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 mainWindow;
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
|
|
||||||
|
@ -204,8 +204,8 @@ void SkinnyShortcut::debugStatistics()
|
|||||||
int counter[4] = {};
|
int counter[4] = {};
|
||||||
countItems( w->contentItem(), counter );
|
countItems( w->contentItem(), counter );
|
||||||
|
|
||||||
std::cout << w << "\n\titems:" << counter[0] << "visible" << counter[1]
|
qDebug() << w << "\n\titems:" << counter[0] << "visible" << counter[1]
|
||||||
<< "\n\tnodes:" << counter[2] << "visible" << counter[3] << std::endl;
|
<< "\n\tnodes:" << counter[2] << "visible" << counter[3];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user