dlnasrv_exampleapp/inc/exampleappui.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef EXAMPLEAPPUI_H_
       
    20 #define EXAMPLEAPPUI_H_
       
    21 
       
    22 #include <qmainwindow.h>
       
    23 
       
    24 class QGroupBox;
       
    25 class QLabel;
       
    26 class QPushButton;
       
    27 class QComboBox;
       
    28 class ExampleAppEngine;
       
    29 
       
    30 class ExampleAppUi : public QMainWindow
       
    31 {
       
    32     Q_OBJECT
       
    33     
       
    34 public:
       
    35     ExampleAppUi();
       
    36     virtual ~ExampleAppUi();
       
    37     
       
    38     void construct();
       
    39     
       
    40 private:
       
    41     void createUi();
       
    42     QLayout *createApSelectionUi();
       
    43     QLayout *createRendererSelectionUi();
       
    44     QLayout *createFileSelectionUi();
       
    45     QLayout *createPlaybackUi();
       
    46     void createEngine();
       
    47     
       
    48 private slots:
       
    49     void updateState(int newState);
       
    50     void selectFile();
       
    51     void deviceSearchStarted();
       
    52     void addRenderingDevice(const QString &name, const QString &uuid);
       
    53     void removeRenderingDevice(const QString &name, const QString &uuid);
       
    54     void selectRenderingDevice(int index);
       
    55     void enablePlayback(int result = 0);
       
    56     void disablePlayback();
       
    57     void enableFileSelection();
       
    58     void disableFileSelection();
       
    59     void enableRenderingDeviceSelection(int iap = 0);
       
    60     void disableRenderingDeviceSelection();
       
    61     
       
    62 private:
       
    63     enum
       
    64     {
       
    65         RewButton,
       
    66         PlayButton,
       
    67         PauseButton,
       
    68         StopButton,
       
    69         FfButton
       
    70     };
       
    71     
       
    72 private:
       
    73     // owned
       
    74     ExampleAppEngine *mEngine;
       
    75     
       
    76     // not owned
       
    77     QLabel *mSelectedRenderer;
       
    78     QLabel *mSelectedFileLabel;
       
    79     QLabel *mPlaybackStatus;
       
    80     QComboBox *mRenderingDevices;
       
    81     QPushButton *mPlayButton;
       
    82     QPushButton *mPauseButton;
       
    83     QPushButton *mStopButton;
       
    84     QPushButton *mRewButton;
       
    85     QPushButton *mFfButton;
       
    86     QPushButton *mSelectFileButton;
       
    87     QPushButton *mSearchDevicesButton;
       
    88     QString mSelectedFile;
       
    89 };
       
    90 
       
    91 #endif /* EXAMPLEAPPUI_H_ */