filemanager/src/fmbkupenginewrapper/inc/fmbackupsettings.h
changeset 18 edd66bde63a4
parent 16 ada7962b4308
child 24 1d0c87b42e2e
equal deleted inserted replaced
16:ada7962b4308 18:edd66bde63a4
    67         ENone = 0,
    67         ENone = 0,
    68         EContents,
    68         EContents,
    69         EScheduling,
    69         EScheduling,
    70         EWeekday,
    70         EWeekday,
    71         ETime,
    71         ETime,
    72         ETarget
    72         ETarget,
       
    73         EBackupdate
    73     };
    74     };
    74 
    75 
    75 public:
    76 public:
    76     FmBackupEntry( const QString& title, const QString& tips, const TSettingType type ) :
    77     FmBackupEntry( const QString& title, const QString& tips, const TSettingType type ) :
    77         mTitle( title ), mTips( tips ), mType( type )
    78         mTitle( title ), mTips( tips ), mType( type )
   239      * @return Backup time
   240      * @return Backup time
   240      */
   241      */
   241     QString targetDrive() const;
   242     QString targetDrive() const;
   242 
   243 
   243     /**
   244     /**
       
   245      * Gets available backup target drive
       
   246      * if targetDrive exist, return targetDrive
       
   247      * otherwise return other first available backup drive
       
   248      * @return Available backup target drive, empty QString for null
       
   249      */
       
   250     QString availableTargetDrive() const;
       
   251     
       
   252     /**
   244      * Loads saved backup settings
   253      * Loads saved backup settings
   245      */
   254      */
   246     void load();
   255     void load();
   247 
   256 
   248     /**
   257     /**
   282      * @param targetDrive drive name string
   291      * @param targetDrive drive name string
   283      * @return string
   292      * @return string
   284      */
   293      */
   285     QString targetDriveToString( const QString& targetDrive );
   294     QString targetDriveToString( const QString& targetDrive );
   286     
   295     
       
   296     /**
       
   297      * Updates the backup date
       
   298      */
       
   299     void updateBackupDate();
   287 private:
   300 private:
   288     /**
   301     /**
   289      * Gets the count of contents selected
   302      * Gets the count of contents selected
   290      */
   303      */
   291     int contentsSelected() const;
   304     int contentsSelected() const;
   316     /**
   329     /**
   317      * Creates backup setting entry from time
   330      * Creates backup setting entry from time
   318      */
   331      */
   319     FmBackupEntry* createTargetDriveEntry();
   332     FmBackupEntry* createTargetDriveEntry();
   320 
   333 
       
   334     /**
       
   335      * Creates backup date entry
       
   336      */
       
   337     FmBackupEntry* createBackupDateEntry();
       
   338     
   321     void refreshList();
   339     void refreshList();
   322     void resetAndDestoryBackupEntry();
   340     void resetAndDestoryBackupEntry();
   323 private:
   341 private:
   324    /**
   342    /**
   325      * Content bitmask
   343      * Content bitmask
   346      * Backup target drive
   364      * Backup target drive
   347      */
   365      */
   348     QString mTargetDrive;
   366     QString mTargetDrive;
   349 
   367 
   350     /**
   368     /**
       
   369      * Backup date
       
   370      */
       
   371     QDate mDate;
       
   372     
       
   373     /**
   351      * Backup setting list items
   374      * Backup setting list items
   352      */
   375      */
   353     QList< FmBackupEntry* > mBackupEntryList;
   376     QList< FmBackupEntry* > mBackupEntryList;
       
   377     
   354     
   378     
   355     FmBkupEngine *mBkupEngine;
   379     FmBkupEngine *mBkupEngine;
   356 };
   380 };
   357 
   381 
   358 #endif //FMBACKUPSETTINGS_H
   382 #endif //FMBACKUPSETTINGS_H