homescreenapp/stateplugins/hsmenuworkerstateplugin/inc/hscollectionnamedialog.h
changeset 71 1db7cc813a4e
parent 46 23b5d6a29cce
equal deleted inserted replaced
69:87476091b3f5 71:1db7cc813a4e
    33 
    33 
    34     HsCollectionNameDialog(const int &itemId = 0);
    34     HsCollectionNameDialog(const int &itemId = 0);
    35 
    35 
    36     virtual ~HsCollectionNameDialog();
    36     virtual ~HsCollectionNameDialog();
    37 
    37 
    38     void open(QObject* receiver, const char* member );
    38     void open(QObject* receiver, const char* member);
    39     
    39 
    40     QString newName(const QString &name, bool addLastName = false);
    40     QString uniqueCollectionName() const;
    41 
    41 
    42 protected:
    42 protected:
    43     void closeEvent( QCloseEvent * event );
    43     void closeEvent( QCloseEvent * event );
    44 private:
    44 private:
    45 
    45 
    46     void makeConnect();
    46     void makeConnect();
    47 
    47 
    48     void makeDisconnect();
    48     void makeDisconnect();
       
    49 
       
    50     QString suggestedCollectionName(const QString &name);
       
    51 
       
    52     QString generateUniqueCollectionName(const QString &name) const;
    49 
    53 
    50 private slots:
    54 private slots:
    51 
    55 
    52     void onTextChanged(const QString &text);
    56     void onTextChanged(const QString &text);
    53 
    57 
    56 private:
    60 private:
    57 
    61 
    58     /*
    62     /*
    59      * Collections names list from data model.
    63      * Collections names list from data model.
    60      */
    64      */
    61     QStringList mCollectionsNames;
    65     QStringList mOtherCollectionsNames;
    62 
    66 
    63     /*
    67     /*
    64      * Last found collection name.
    68      * Already suggested names.
    65      */
    69      */
    66     QString mLastCollectionName;
    70     QStringList mSuggestedNames;
    67 
       
    68 };
    71 };
    69 
    72 
    70 #endif /* HS_INPUT_DIALOG_H */
    73 #endif /* HS_INPUT_DIALOG_H */