RadioControl removed from automotive example. It is not yet used and
will confuse readers. Probably becomes reverted once development of this demo continues
@ -1,6 +1,5 @@
|
||||
#include "MainWindow.h"
|
||||
#include "ButtonBar.h"
|
||||
#include "RadioControl.h"
|
||||
#include "SoundControl.h"
|
||||
#include "SkinFactory.h"
|
||||
|
||||
@ -57,10 +56,6 @@ QQuickItem* MainWindow::headerBar() const
|
||||
|
||||
QQuickItem* MainWindow::mainContent() const
|
||||
{
|
||||
// RadioControl* radioControl = new RadioControl( m_layout );
|
||||
// m_layout->setRetainSizeWhenHidden( radioControl, true );
|
||||
// radioControl->setVisible( false );
|
||||
|
||||
return new SoundControl();
|
||||
}
|
||||
|
||||
|
@ -1,67 +0,0 @@
|
||||
#include "RadioControl.h"
|
||||
|
||||
#include <QskGraphic.h>
|
||||
#include <QskGraphicLabel.h>
|
||||
#include <QskLinearBox.h>
|
||||
#include <QskPushButton.h>
|
||||
#include <QskTabBar.h>
|
||||
#include <QskTabButton.h>
|
||||
#include <QskTextLabel.h>
|
||||
|
||||
RadioControl::RadioControl( QQuickItem* parent ):
|
||||
QskControl( parent ),
|
||||
m_currentBand( "FM" )
|
||||
{
|
||||
setMargins( QMarginsF( 40, 30, 40, 30 ) );
|
||||
setAutoLayoutChildren( true );
|
||||
|
||||
QskLinearBox* outterLayout = new QskLinearBox( Qt::Vertical, this );
|
||||
outterLayout->setAutoAddChildren( true );
|
||||
|
||||
QskTabBar* favoritesBar = new QskTabBar( outterLayout );
|
||||
favoritesBar->addTab( "AM" );
|
||||
favoritesBar->addTab( "FM" );
|
||||
favoritesBar->addTab( "DAB" );
|
||||
|
||||
outterLayout->addSpacer( 80 );
|
||||
outterLayout->setMargins( QMarginsF( 150, 0, 150, 0 ) );
|
||||
outterLayout->setAlignment( 2, Qt::AlignHCenter );
|
||||
|
||||
QskPushButton* frequencyButton = new QskPushButton( outterLayout );
|
||||
frequencyButton->setAutoLayoutChildren( true );
|
||||
frequencyButton->setFlat( true );
|
||||
frequencyButton->setBackgroundColor( QColor( 183, 210, 255 ) );
|
||||
frequencyButton->setEnabled( false );
|
||||
frequencyButton->setFixedWidth( 400 );
|
||||
|
||||
QskLinearBox* frequencyLayout = new QskLinearBox( Qt::Horizontal, frequencyButton );
|
||||
frequencyLayout->setAutoAddChildren( true );
|
||||
frequencyLayout->setMargins( QMarginsF( 150, 20, 150, 20 ) );
|
||||
|
||||
QskTextLabel* bandLabel = new QskTextLabel( m_currentBand, frequencyLayout );
|
||||
QskTextLabel* frequencyLabel = new QskTextLabel( "87.50", frequencyLayout );
|
||||
QskTextLabel* hzLabel = new QskTextLabel( "MHz", frequencyLayout );
|
||||
|
||||
QskLinearBox* tuneLayout = new QskLinearBox( Qt::Horizontal, outterLayout );
|
||||
tuneLayout->setAutoLayoutChildren( true );
|
||||
|
||||
QskPushButton* prevTuneButton = new QskPushButton( tuneLayout );
|
||||
QImage prevTuneImage( ":/images/ic_skip_previous_white_18dp_2x.png" );
|
||||
QskGraphic prevTuneGraphic = QskGraphic::fromImage( prevTuneImage );
|
||||
prevTuneButton->setGraphic( prevTuneGraphic );
|
||||
|
||||
QskPushButton* prevSearchButton = new QskPushButton( tuneLayout );
|
||||
QImage prevSearchImage( ":/images/ic_fast_rewind_white_18dp_2x.png" );
|
||||
QskGraphic prevSearchGraphic = QskGraphic::fromImage( prevSearchImage );
|
||||
prevSearchButton->setGraphic( prevSearchGraphic );
|
||||
|
||||
QskPushButton* nextSearchButton = new QskPushButton( tuneLayout );
|
||||
QImage nextSearchImage( ":/images/ic_fast_forward_white_18dp_2x.png" );
|
||||
QskGraphic nextSearchGraphic = QskGraphic::fromImage( nextSearchImage );
|
||||
nextSearchButton->setGraphic( nextSearchGraphic );
|
||||
|
||||
QskPushButton* nextTuneButton = new QskPushButton( tuneLayout );
|
||||
QImage nextTuneImage( ":/images/ic_skip_next_white_18dp_1x.png" );
|
||||
QskGraphic nextTuneGraphic = QskGraphic::fromImage( nextTuneImage );
|
||||
nextTuneButton->setGraphic( nextTuneGraphic );
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#ifndef RADIOCONTROL_H
|
||||
#define RADIOCONTROL_H
|
||||
|
||||
#include <QskControl.h>
|
||||
|
||||
class RadioControl : public QskControl
|
||||
{
|
||||
public:
|
||||
RadioControl( QQuickItem* parent = nullptr );
|
||||
|
||||
private:
|
||||
QString m_currentBand;
|
||||
};
|
||||
|
||||
#endif // RADIOCONTROL_H
|
@ -4,7 +4,6 @@ TARGET = automotive
|
||||
|
||||
HEADERS += \
|
||||
ButtonBar.h \
|
||||
RadioControl.h \
|
||||
SoundControl.h \
|
||||
SkinFactory.h \
|
||||
DefaultSkin.h \
|
||||
@ -13,7 +12,6 @@ HEADERS += \
|
||||
|
||||
SOURCES += \
|
||||
ButtonBar.cpp \
|
||||
RadioControl.cpp \
|
||||
SoundControl.cpp \
|
||||
SkinFactory.cpp \
|
||||
DefaultSkin.cpp \
|
||||
|
Before Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 344 B |
Before Width: | Height: | Size: 628 B |
Before Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 273 B |
Before Width: | Height: | Size: 618 B |
Before Width: | Height: | Size: 134 B |
Before Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 305 B |