当前位置: 首页>>代码示例>>C++>>正文


C++ QTableWidgetItem::whatsThis方法代码示例

本文整理汇总了C++中QTableWidgetItem::whatsThis方法的典型用法代码示例。如果您正苦于以下问题:C++ QTableWidgetItem::whatsThis方法的具体用法?C++ QTableWidgetItem::whatsThis怎么用?C++ QTableWidgetItem::whatsThis使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QTableWidgetItem的用法示例。


在下文中一共展示了QTableWidgetItem::whatsThis方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: whatsThis

int TableWidgetItem::whatsThis ( lua_State * L )//  const QString
{
	QTableWidgetItem* lhs = ValueInstaller2<QTableWidgetItem>::check( L, 1 );
	//QString* res = ValueInstaller2<QString>::create( L );
	//*res = lhs->whatsThis();
	Util::push( L, lhs->whatsThis() );
	return 1;
}
开发者ID:Wushaowei001,项目名称:NAF,代码行数:8,代码来源:QtlTableWidgetItem.cpp

示例2: afficheInfos

void EmploiDuTemps::afficheInfos(int row, int column){
    if(ui->tableWidget->item(row, column)){ //si la case contient une programmation
        try {
            ui->stackedWidget->setHidden(false);
            QTableWidgetItem* item = ui->tableWidget->item(row, column);
            if(item->background()== QBrush(QColor(191,117,255))){
                //l'item est un evt
                ui->stackedWidget->setCurrentIndex(0);
                const Programmation* evt = ProgrammationManager::getInstance().trouverEvenement(item->whatsThis());
                ui->labelDescr->setText(evt->getEvenement()->getDescription());
                ui->labelLieu->setText(evt->getEvenement()->getLieu());
                ui->labelNom->setText(evt->getEvenement()->getNom());
                ui->labelDate->setText(evt->getDate().toString(Qt::SystemLocaleShortDate));
                ui->labelDuree->setText(evt->getDuree().stringDuree());
                ui->labelType->setText(evt->getEvenement()->getType());
                ui->labelHor->setText(evt->getTime().toString("HH:mm"));

            }
            else if (item->background()==QBrush(QColor(85,255,127))){
                //l'item est une tache
                ui->stackedWidget->setCurrentIndex(1);
                Tache* t = ProjetManager::getInstance().trouverTache(item->whatsThis());
                ui->labelId->setText(t->getId());
                ui->labelTitre_2->setText(t->getTitre());
                ui->labelProjet->setText(t->getProjet()->getNom());
                ui->labelDate_2->setText(ui->tableWidget->horizontalHeaderItem(column)->text());
                ui->labelHor_2->setText(item->text().section(" ",0,0));
                ui->labelDuree_2->setText("\n\n"+item->text().section("durée : ",1,1));

            }
        }catch(CalendarException e){
            QMessageBox::warning(this, "Erreur", e.getInfo());
        }
    }
    else //si la case est vide
        ui->stackedWidget->setHidden(true);
}
开发者ID:TheoJD,项目名称:ApplicationGestionDeProjets,代码行数:37,代码来源:emploidutemps.cpp

示例3: slot_dateSelected

 //Slot that handles the date selection in the view.
 void MonthView::slot_dateSelected(int row, int column)
 {

        QTableWidgetItem *item = ui->tblDates->item(row,column);
        emit(DateChanged(QDate::fromString(item->whatsThis())));
 }
开发者ID:NeerajDev,项目名称:GrizzlyPeak,代码行数:7,代码来源:MonthView.cpp

示例4: on_growth_animation_timer_update

         //Timer call to animate the graph bars.
         void MonthView::on_growth_animation_timer_update()
          {

             if (prev_source_name != SOURCE_OTHER )
             {
             if((opacity <= 255) && (opacity >= 20 ))
             {
                opacity -= 25;
             }else
             {
                if (opacity <= 20 )
                 {
                    opacity =20;

                }
                if (opacity >= 255)
                {
                    opacity = 255;
                }
                }
            }
             bool isAnimationinProgress = false;
            all_week_data = 0;

            int data;
             int sourceData;
             int weekly_total = 0;

             for(int row = 0; row < 6; row++)
             {
                  weekly_total = 0;
                     for(int col = 0; col < 7; col++)
                        {
                                 if ( m_vector_vector_view_selected_day_usage_values.size() != 42)
                                {
                                     break;
                                 }
                                 QTableWidgetItem *item = ui->tblDates->item(row,col);

                                 QVariant v =  item->data(0);
                                 StarRating r = v.value<StarRating>();
//                                  int data;
//                                  int sourceData;

                                  if (ResetAnimation)
                                  {
                                      data = 0;
                                      sourceData =0;
                                  }
                                 else
                                 {
                                     data =  r.data_total;
                                     sourceData = r.data_from_source;
                                }


                                 if (opacity> 20 && prev_source_name != SOURCE_OTHER )
                                 {
                                     isAnimationinProgress = true;
                                   sourceData = ((int)((qreal)(50 * ( m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][prev_source_name] )))/MaxUnit );
                                   if (opacity < 50)
                                   {
                                       sourceData =0;
                                   }
                                 }
                                 else if(data <  ((int)((qreal)(50 * ( m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][0] +  m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][1] +  m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][2] +  m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][3] +  m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][4]  )))/MaxUnit ) )
                                 {
                                         data++;
                                         isAnimationinProgress = true;
                                 }
                                 else if(sourceData <  ((int)((qreal)(50 * ( m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][currentSource] )))/MaxUnit ))
                                 {
                                         sourceData++;

                                         isAnimationinProgress= true;
                                 }

                                  QDate dt = QDate::fromString(item->whatsThis());
                                  bool isfuturedate = false;
                                  if(dt.operator <= (QDate::currentDate()))
                                   {
                                       isfuturedate = true;
                                   }


                                   item->setData(0, qVariantFromValue(StarRating(r.date, data, sourceData, currentSource,r.max_data_total,r.max_source_data, opacity, prev_source_name, (qreal)((qreal)(50 * ( m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][prev_source_name] )))/MaxUnit ,  isfuturedate)));

                                    if (opacity  <= 20)
                                    {
                                        opacity= 255;
                                        prev_source_name = SOURCE_OTHER;

                                    }
                                    if(sourceData >0 && isfuturedate)
                                    {
                                        weekly_total +=  m_vector_vector_view_selected_day_usage_values[(row * 7) + col ][currentSource] ;
                                    }
                          }

//.........这里部分代码省略.........
开发者ID:NeerajDev,项目名称:GrizzlyPeak,代码行数:101,代码来源:MonthView.cpp


注:本文中的QTableWidgetItem::whatsThis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。