Ticket #1139: icons.diff

File icons.diff, 6.7 KB (added by kkuphal, 18 years ago)

Adds HD, CC, and Stereo icons to ProgramInfo? and MythCenter? theme

  • myththemes/MythCenter/ui.xml

     
    15651565        <filename>type/processing.png</filename>
    15661566        <position>160,195</position>
    15671567      </image>
     1568      <image name="stereo" draworder="6">
     1569        <filename>type/stereo.png</filename>
     1570        <position>195,195</position>
     1571      </image>
     1572      <image name="cc" draworder="6">
     1573        <filename>type/cc.png</filename>
     1574        <position>230,195</position>
     1575      </image>
     1576      <image name="hdtv" draworder="6">
     1577        <filename>type/hd.png</filename>
     1578        <position>275,195</position>
     1579      </image>
    15681580
    15691581    </container>
    15701582
  • mythtv/libs/libmythtv/programinfo.h

     
    273273   
    274274    QString year;
    275275    float stars;
     276    bool stereo;
     277    bool cc;
     278    bool hd;
    276279
    277280    QDate originalAirDate;
    278281    QDateTime lastmodified;
  • mythtv/libs/libmythtv/programinfo.cpp

     
    7474    chanOutputFilters = "";
    7575    year = "";
    7676    stars = 0;
     77    stereo = 0;
     78    cc = 0;
     79    hd = 0;
    7780    availableStatus = asAvailable;   
    7881
    7982    pathname = "";
     
    216219
    217220    originalAirDate = other.originalAirDate;
    218221    stars = other.stars;
     222    stereo = other.stereo;
     223    cc = other.cc;
     224    hd = other.hd;
    219225    year = QDeepCopy<QString>(other.year);
    220226    ignoreBookmark = other.ignoreBookmark;
    221227   
     
    301307    STR_TO_LIST(programid)
    302308    DATETIME_TO_LIST(lastmodified)
    303309    FLOAT_TO_LIST(stars)
     310    INT_TO_LIST(stereo)
     311    INT_TO_LIST(cc)
     312    INT_TO_LIST(hd)
    304313    DATETIME_TO_LIST(QDateTime(originalAirDate))
    305314    INT_TO_LIST(hasAirDate)     
    306315    STR_TO_LIST((playgroup != "") ? playgroup : "Default")
     
    399408    STR_FROM_LIST(programid)
    400409    DATETIME_FROM_LIST(lastmodified)
    401410    FLOAT_FROM_LIST(stars)
     411    INT_FROM_LIST(stereo)
     412    INT_FROM_LIST(cc)
     413    INT_FROM_LIST(hd)
    402414    DATE_FROM_LIST(originalAirDate);
    403415    INT_FROM_LIST(hasAirDate);
    404416    STR_FROM_LIST(playgroup)
     
    596608    }
    597609    else
    598610        progMap["stars"] = "";
     611
     612    progMap["stereo"] = stereo;
     613    progMap["cc"] = cc;
     614    progMap["hdtv"] = hd;
    599615       
    600616    if (hasAirDate)
    601617    {
     
    699715    p->programid          = "";
    700716    p->year               = "";
    701717    p->stars              = 0.0f;
     718    p->stereo             = 0;
     719    p->cc                 = 0;
     720    p->hd                 = 0;
    702721
    703722    if (!genUnknown)
    704723        return p;
     
    39643983        "    program.airdate, program.stars, program.originalairdate, "
    39653984        "    program.category_type, oldrecstatus.recordid, "
    39663985        "    oldrecstatus.rectype, oldrecstatus.recstatus, "
    3967         "    oldrecstatus.findid "
     3986        "    oldrecstatus.findid, program.stereo, program.hdtv, "
     3987        "    program.closecaptioned "
    39683988        "FROM program "
    39693989        "LEFT JOIN channel ON program.chanid = channel.chanid "
    39703990        "LEFT JOIN oldrecorded AS oldrecstatus ON "
     
    40354055        p->rectype = RecordingType(query.value(20).toInt());
    40364056        p->recstatus = RecStatusType(query.value(21).toInt());
    40374057        p->findid = query.value(22).toInt();
     4058        p->stereo = query.value(23).toInt();
     4059        p->cc = query.value(25).toInt();
     4060        p->hd = query.value(24).toInt();
    40384061
    40394062        ProgramInfo *s;
    40404063        for (s = schedList.first(); s; s = schedList.next())
     
    40524075                p->dupin = s->dupin;
    40534076                p->dupmethod = s->dupmethod;
    40544077                p->findid = s->findid;
     4078                p->stereo = s->stereo;
     4079                p->cc = s->cc;
     4080                p->hd = s->hd;
    40554081            }
    40564082        }
    40574083
  • mythtv/programs/mythfrontend/playbackbox.cpp

     
    741741                itype->hide();
    742742        }
    743743
     744        itype = (UIImageType *)container->GetType("stereo");
     745        if (itype)
     746        {
     747            if (curitem->stereo)
     748                itype->show();
     749            else
     750                itype->hide();
     751        }
     752
     753        itype = (UIImageType *)container->GetType("cc");
     754        if (itype)
     755        {
     756            if (curitem->cc)
     757                itype->show();
     758            else
     759                itype->hide();
     760        }
     761
     762        itype = (UIImageType *)container->GetType("hdtv");
     763        if (itype)
     764        {
     765            if (curitem->hd)
     766                itype->show();
     767            else
     768                itype->hide();
     769        }
     770
    744771        container->Draw(&tmp, 6, (type == Delete) ? 1 : 0);
    745772    }
    746773
  • mythtv/programs/mythbackend/mainserver.cpp

     
    958958                       "recorded.lastmodified, recorded.findid, "
    959959                       "recorded.originalairdate, recorded.playgroup, "
    960960                       "recorded.basename, recorded.progstart, "
    961                        "recorded.progend, recorded.stars "
     961                       "recorded.progend, recorded.stars, "
     962                       "recordedprogram.stereo, recordedprogram.hdtv, "
     963                       "recordedprogram.closecaptioned "
    962964                       "FROM recorded "
    963965                       "LEFT JOIN record ON recorded.recordid = record.recordid "
    964966                       "LEFT JOIN channel ON recorded.chanid = channel.chanid "
     967                       "LEFT JOIN recordedprogram ON (recorded.chanid = recordedprogram.chanid "
     968                              "AND recorded.starttime = recordedprogram.starttime) "
    965969                       "WHERE (recorded.deletepending = 0 OR "
    966970                              "DATE_ADD(recorded.lastmodified, "
    967971                                       "INTERVAL 5 MINUTE) <= NOW()) "
     
    10861090            }
    10871091
    10881092            proginfo->stars = query.value(31).toDouble();
     1093            proginfo->stereo = query.value(32).toInt();
     1094            proginfo->cc = query.value(34).toInt();
     1095            proginfo->hd = query.value(33).toInt();
    10891096
    10901097            QString lpath = fileprefix + "/" + basename;
    10911098            PlaybackSock *slave = NULL;