source: src-qt4/pc-softwaremanager/containers.cpp @ b898ceb

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since b898ceb was b898ceb, checked in by Ken Moore <ken@…>, 15 months ago

Fix a couple display typos in the new AppCafe?

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/***************************************************************************
2 *   Copyright (C) 2011 - iXsystems                                       *
3 *   kris@pcbsd.org  *
4 *   tim@pcbsd.org   *
5 *   ken@pcbsd.org   *
6 *                                                                         *
7 *   Permission is hereby granted, free of charge, to any person obtaining *
8 *   a copy of this software and associated documentation files (the       *
9 *   "Software"), to deal in the Software without restriction, including   *
10 *   without limitation the rights to use, copy, modify, merge, publish,   *
11 *   distribute, sublicense, and/or sell copies of the Software, and to    *
12 *   permit persons to whom the Software is furnished to do so, subject to *
13 *   the following conditions:                                             *
14 *                                                                         *
15 *   The above copyright notice and this permission notice shall be        *
16 *   included in all copies or substantial portions of the Software.       *
17 *                                                                         *
18 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
19 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
20 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
21 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
22 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
23 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
24 *   OTHER DEALINGS IN THE SOFTWARE.                                       *
25 ***************************************************************************/
26#include "containers.h"
27
28//Initialization functions for the container classes
29
30// --- INSTALLEDPBI ---
31InstalledPBI::InstalledPBI(){
32      rootInstall=FALSE; autoUpdate=FALSE; desktopIcons=FALSE; menuIcons=FALSE;
33      status = NONE;
34}
35
36void InstalledPBI::setStatus(PBISTATUS stat, QString addinfo){
37  //addinfo: additional info (download statistics or update version available)
38  status = stat;
39  if(stat == DOWNLOADING){ 
40    if(addinfo.isEmpty()){ statusString = QObject::tr("Downloading..."); }
41    else{ statusString = QString(QObject::tr("Downloading: %1")).arg(addinfo); }
42  }
43  else if(stat == INSTALLING){ statusString = QObject::tr("Installing..."); }
44  else if(stat == REMOVING){ statusString = QObject::tr("Removing..."); }
45  else if(stat == UPDATING){ 
46    if(addinfo.isEmpty()){ statusString = QObject::tr("Updating..."); }
47    else{ statusString = QString(QObject::tr("Update Downloading: %1 ")).arg(addinfo); }
48  }
49  else if(stat == PENDINGDOWNLOAD){ statusString = QObject::tr("Pending Download"); }
50  else if(stat == PENDINGINSTALL){ statusString = QObject::tr("Pending Install"); }
51  else if(stat == PENDINGREMOVAL){ statusString = QObject::tr("Pending Removal"); }
52  else if(stat == PENDINGUPDATE){ statusString = QObject::tr("Pending Update"); }
53  else if(stat == UPDATEAVAILABLE){ 
54    if(addinfo.isEmpty()){ statusString = QObject::tr("Update Available!"); }
55    else{ statusString = QString(QObject::tr("Version %1 Available")).arg(addinfo); }
56  }
57  else{ statusString = ""; }
58  //qDebug() << "Status Update:" << name << status << statusString;
59}
60
Note: See TracBrowser for help on using the repository browser.