Changeset 9474a65


Ignore:
Timestamp:
02/26/14 09:53:54 (5 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.1, releng/10.0.2
Children:
7e41a70
Parents:
316d4d3 (diff), 0ba50005 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of github.com:pcbsd/pcbsd

Location:
src-qt4/pc-softwaremanager
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-softwaremanager/pc-softwaremanager.pro

    r2d980cf r0ba50005  
    44CONFIG  += qt warn_on release 
    55 
    6 LIBS    += -L../../../libpcbsd 
     6LIBS    += -L../libpcbsd 
    77LIBS    += -lQtSolutions_SingleApplication-head -lpcbsd-utils 
    88 
  • src-qt4/pc-softwaremanager/mainUI.cpp

    rc4ff3c1 r316d4d3  
    784784  connect(ui->tool_browse_search,SIGNAL(clicked()),this,SLOT(slotGoToSearch()) ); 
    785785  connect(ui->line_browse_searchbar,SIGNAL(returnPressed()),this,SLOT(slotGoToSearch()) ); 
     786  connect(ui->tool_browse_gotocat, SIGNAL(clicked()), this, SLOT(slotGoToCatBrowser()) ); 
    786787} 
    787788 
     
    804805 
    805806void MainUI::slotUpdateBrowserHome(){ 
    806   //Load the Categories 
    807   QStringList cats = PBI->browserCategories(); 
    808     cats.sort(); 
    809     QMenu *catmenu = new QMenu(this); 
    810     QStringList info; info << "name" << "shortdescription" << "icon"; 
    811     for(int i=0; i<cats.length(); i++){ 
    812       QStringList data = PBI->CatInfo(cats[i],info); 
    813       if(!data.isEmpty()){ 
    814       QAction *act = new QAction(QIcon(data[2]), data[0], this); 
    815         act->setToolTip(data[1]); 
    816         act->setWhatsThis(cats[i]); 
    817         catmenu->addAction(act); 
    818       } 
    819     } 
    820     connect(catmenu, SIGNAL(triggered(QAction*)), this, SLOT(slotGoToCatClicked(QAction*)) ); 
    821     ui->tool_browse_gotocat->setMenu(catmenu); 
    822807  //Load the Recommendations 
    823808  clearScrollArea(ui->scroll_br_home_rec); 
    824809  QVBoxLayout *reclayout = new QVBoxLayout; 
    825810  QStringList recList = PBI->getRecommendations(); 
    826   info.clear(); info << "name" << "shortdescription" << "icon" << "type"; 
     811  QStringList info; info << "name" << "shortdescription" << "icon" << "type"; 
    827812  for(int i=0; i<recList.length(); i++){ 
    828813    QStringList data = PBI->AppInfo(recList[i],info); 
     
    865850  ui->tool_browse_app->setVisible(FALSE);  
    866851   
     852  //Now update the category browser page (since it only needs to be done once like the home menu) 
     853  //Load the Categories 
     854  QStringList cats = PBI->browserCategories(); 
     855    cats.sort(); 
     856    clearScrollArea(ui->scroll_br_cats); 
     857    QVBoxLayout *catlayout = new QVBoxLayout; 
     858    info.clear(); info << "name" << "description" << "icon"; 
     859    for(int i=0; i<cats.length(); i++){ 
     860      QStringList data = PBI->CatInfo(cats[i],info); 
     861      if(!data.isEmpty()){ 
     862        LargeItemWidget *item = new LargeItemWidget(cats[i],data[0],data[1],data[2]); 
     863        connect(item,SIGNAL(appClicked(QString)),this,SLOT(slotGoToCategory(QString)) ); 
     864        catlayout->addWidget(item); 
     865      } 
     866    } 
     867    catlayout->addStretch(); //add a spacer to the end 
     868    ui->scroll_br_cats->widget()->setLayout(catlayout); 
    867869} 
    868870 
     
    874876  ui->tool_browse_app->setVisible(false); 
    875877  ui->tool_browse_gotocat->setVisible(true); 
     878} 
     879 
     880void MainUI::slotGoToCatBrowser(){ 
     881  ui->tabWidget->setCurrentWidget(ui->tab_browse); 
     882  ui->stacked_browser->setCurrentWidget(ui->page_browsecats); 
     883  //Make sure the shortcut buttons are diabled 
     884  ui->tool_browse_cat->setVisible(false); 
     885  ui->tool_browse_app->setVisible(false); 
     886  ui->tool_browse_gotocat->setVisible(false); 
    876887} 
    877888 
  • src-qt4/pc-softwaremanager/mainUI.h

    rfdad871 r316d4d3  
    9595  void slotUpdateBrowserHome(); 
    9696  void slotGoToHome(); 
     97  void slotGoToCatBrowser(); 
    9798  void slotGoToCategory(QString); 
    9899  void slotGoToCatClicked(QAction* act); 
  • src-qt4/pc-softwaremanager/mainUI.ui

    rfdad871 r316d4d3  
    759759         <widget class="QStackedWidget" name="stacked_browser"> 
    760760          <property name="styleSheet"> 
    761            <string notr="true">QWidget#page_home, QWidget#page_cat, QWidget#page_app, QWidget#page_search{ 
     761           <string notr="true">QWidget#page_home, QWidget#page_cat, QWidget#page_app, QWidget#page_search, QWidget#page_browsecats{ 
    762762background-image: url(:/browserBackground.png); 
    763763background-position: left bottom; 
     
    935935                 <x>0</x> 
    936936                 <y>0</y> 
    937                  <width>98</width> 
    938                  <height>28</height> 
     937                 <width>435</width> 
     938                 <height>386</height> 
    939939                </rect> 
    940940               </property> 
    941941               <layout class="QVBoxLayout" name="verticalLayout_23"/> 
     942              </widget> 
     943             </widget> 
     944            </item> 
     945           </layout> 
     946          </widget> 
     947          <widget class="QWidget" name="page_browsecats"> 
     948           <layout class="QVBoxLayout" name="verticalLayout_7"> 
     949            <item> 
     950             <widget class="QScrollArea" name="scroll_br_cats"> 
     951              <property name="widgetResizable"> 
     952               <bool>true</bool> 
     953              </property> 
     954              <widget class="QWidget" name="scrollAreaWidgetContents_5"> 
     955               <property name="geometry"> 
     956                <rect> 
     957                 <x>0</x> 
     958                 <y>0</y> 
     959                 <width>435</width> 
     960                 <height>386</height> 
     961                </rect> 
     962               </property> 
     963               <layout class="QVBoxLayout" name="verticalLayout_24"/> 
    942964              </widget> 
    943965             </widget> 
Note: See TracChangeset for help on using the changeset viewer.