This commit is contained in:
Peter Hartmann 2025-01-29 17:18:05 +01:00
parent 333659404a
commit c3af2de74e
9 changed files with 11 additions and 29 deletions

View File

@ -90,12 +90,12 @@ namespace
}
case FileDialog:
{
auto file = qskDialog->selectFile( "select file", QDir::currentPath() );
qskDialog->selectFile( "select file", QDir::currentPath() );
break;
}
case FolderDialog:
{
auto file = qskDialog->selectDirectory( "select directory", QDir::currentPath() );
qskDialog->selectDirectory( "select directory", QDir::currentPath() );
break;
}
case FontDialog:
@ -105,8 +105,7 @@ namespace
}
case MessageDialog:
{
auto action = qskDialog->message( "message", "The quick brown fox jumps over the lazy dog" );
qDebug() << "got message action" << action;
qskDialog->message( "message", "The quick brown fox jumps over the lazy dog" );
break;
}
default:

View File

@ -37,8 +37,8 @@ class QskColorPicker : public QskBoundedControl
Q_SIGNALS:
void valueChanged( qreal );
void selectedColorChanged() const;
void positionChanged() const;
void selectedColorChanged();
void positionChanged();
protected:
void updateLayout() override;

View File

@ -18,10 +18,6 @@ namespace
class ColorPaneNode : public QskPaintedNode
{
public:
ColorPaneNode()
{
}
void paint( QPainter* p, const QSize& size, const void* nodeData ) override
{
const Q* q = static_cast< const Q* >( nodeData );

View File

@ -32,15 +32,13 @@ class QskColorPickerSkinlet : public QskSkinlet
QRectF subControlRect( const QskSkinnable*,
const QRectF&, QskAspect::Subcontrol ) const override;
QColor selectedColor() const;
protected:
QSGNode* updateSubNode( const QskSkinnable*,
quint8 nodeRole, QSGNode* ) const override;
private:
QSGNode* updateColorPaneNode( const QskColorPicker*, QSGNode* ) const;
private:
QRectF cursorRect( const QskSkinnable*, const QRectF&, int index ) const;
};

View File

@ -12,22 +12,15 @@
#include "QskSelectionSubWindow.h"
#include "QskSelectionWindow.h"
#include "QskBoxBorderColors.h"
#include "QskBoxBorderMetrics.h"
#include "QskColorSelectionWindow.h"
#include "QskFileSelectionWindow.h"
#include "QskFontSelectionWindow.h"
#include "QskEvent.h"
#include "QskFunctions.h"
#include "QskFocusIndicator.h"
#include <qfontmetrics.h>
#include <qfilesystemmodel.h>
#include <qguiapplication.h>
#include <qpointer.h>
#include <qquickwindow.h>
#include <qtimer.h>
#include <qpa/qplatformdialoghelper.h>
@ -65,10 +58,6 @@ static QskDialog::DialogCode qskExec( QskDialogWindow* dialogWindow )
return dialogWindow->exec();
}
namespace
{
}
static QQuickWindow* qskSomeQuickWindow()
{
// not the best code ever, but as it is a fallback only
@ -123,7 +112,6 @@ static void qskSetupWindow(
window->setModality( transientParent ? Qt::WindowModal : Qt::ApplicationModal );
const QSize size = window->sizeConstraint();
qDebug() << "sc:" << size;
if ( window->parent() )
{

View File

@ -8,7 +8,7 @@
#include "QskGlobal.h"
#include <qrgb.h>
#include <qcolor.h>
#include <qobject.h>
#include <memory>

View File

@ -40,7 +40,7 @@ QskFontSelectionWindow< W >::QskFontSelectionWindow( QObject* parent, const QStr
#endif
setupControls( outerBox );
loadFontInfo();
connectSignals();
Inherited::setContentItem( outerBox );
}
@ -101,7 +101,7 @@ void QskFontSelectionWindow< W >::setupControls( QQuickItem* parentItem )
}
template< typename W >
void QskFontSelectionWindow< W >::loadFontInfo()
void QskFontSelectionWindow< W >::connectSignals()
{
const auto families = QFontDatabase::families();
m_data->familyView->setEntries( families );

View File

@ -23,7 +23,7 @@ class QskFontSelectionWindow : public QskWindowOrSubWindow< W >
private:
void setupControls( QQuickItem* );
void loadFontInfo();
void connectSignals();
class PrivateData;
std::unique_ptr< PrivateData > m_data;

View File

@ -8,6 +8,7 @@
#include "QskDialogButtonBox.h"
#include "QskFocusIndicator.h"
// copied from QskDialog.cpp:
static QskDialog::Action qskActionCandidate( const QskDialogButtonBox* buttonBox )
{
// not the fastest code ever, but usually we always