• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ parentWidget函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中parentWidget函数的典型用法代码示例。如果您正苦于以下问题:C++ parentWidget函数的具体用法?C++ parentWidget怎么用?C++ parentWidget使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: parentWidget

XADDoc *XADView::getDocument() const
{
    XADApp *theApp=(XADApp *) parentWidget();

    return theApp->getDocument();
}
开发者ID:kaarthiks,项目名称:xad-qt,代码行数:6,代码来源:xadview.cpp


示例2: QBrush

/** Overloads default QWidget::paintEvent. Draws the actual 
 * bandwidth graph. */
void RSPermissionMatrixWidget::paintEvent(QPaintEvent *)
{
    //std::cerr << "In paint event!" << std::endl;

  /* Set current graph dimensions */
  _rec = this->frameRect();
  
  /* Start the painter */
  _painter->begin(this);
  
  /* We want antialiased lines and text */
  _painter->setRenderHint(QPainter::Antialiasing);
  _painter->setRenderHint(QPainter::TextAntialiasing);
  
  /* Fill in the background */
  _painter->fillRect(_rec, QBrush(BACK_COLOR));
  _painter->drawRect(_rec);

  // draw one line per friend.
  std::list<RsPeerId> ssllist ;
  rsPeers->getFriendList(ssllist) ;

  // sort list
  {
      // RSPermissionMatrixWidgets parent is ServicePermissionsPage which holds the checkbox
      ServicePermissionsPage *spp = dynamic_cast<ServicePermissionsPage*>(parentWidget());
      if(spp != NULL) {
          // sort out offline peers
          if(spp->isHideOfflineChecked()) {
              RsPeerDetails peerDetails;
              for(std::list<RsPeerId>::iterator it = ssllist.begin(); it != ssllist.end();) {
                  rsPeers->getPeerDetails(*it, peerDetails);

                  switch (peerDetails.connectState) {
                  case RS_PEER_CONNECTSTATE_OFFLINE:
                  case RS_PEER_CONNECTSTATE_TRYING_TCP:
                  case RS_PEER_CONNECTSTATE_TRYING_UDP:
                      it = ssllist.erase(it);
                      break;
                  default:
                      it++;
                      break;
                  }
              }
          }
      }

      // sort by name
      ssllist.sort(sortRsPeerIdByNameLocation);
  }

  RsPeerServiceInfo ownServices;
  rsServiceControl->getOwnServices(ownServices);

  // Display friend names at the beginning of each column

  const QFont& font(_painter->font()) ;
  QFontMetrics fm(font);
  int peer_name_size = 0 ;
  float line_height = 2 + fm.height() ;

  std::vector<QString> names ;

  for(std::list<RsPeerId>::const_iterator it(ssllist.begin());it!=ssllist.end();++it)
  {
      RsPeerDetails details ;
      rsPeers->getPeerDetails(*it,details) ;

      QString name = QString::fromUtf8(details.name.c_str()) + " (" + QString::fromUtf8(details.location.c_str()) + ")";
      if(name.length() > 20)
          name = name.left(20)+"..." ;

      peer_name_size = std::max(peer_name_size, fm.width(name)) ;
      names.push_back(name) ;
  }

  QPen pen ;
  pen.setWidth(2) ;
  pen.setBrush(Qt::black) ;

  _painter->setPen(pen) ;
  int i=0;
  int x=5 ;
  int y=MATRIX_START_Y ;

  for(std::list<RsPeerId>::const_iterator it(ssllist.begin());it!=ssllist.end();++it,++i)
  {
      float X = MATRIX_START_X + peer_name_size - fm.width(names[i]) ;
      float Y = MATRIX_START_Y + (i+0.5)*ROW_SIZE + line_height/2.0f-2 ;

      _painter->drawText(QPointF(X,Y),names[i]) ;

      if(*it == _current_peer_id)
          _painter->drawLine(QPointF(X,Y+3),QPointF(X+fm.width(names[i]),Y+3)) ;

      y += line_height ;
  }

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


示例3: updatePosition

void MiniMap::updatePosition()
{
	QGraphicsView* parent = static_cast<QGraphicsView*> (parentWidget());

	move(0,parent->viewport()->height() - height() + 2*frameWidth());
}
开发者ID:JurajKubelka,项目名称:Envision,代码行数:6,代码来源:MiniMap.cpp


示例4:

ScrollArea *ScrollBar::area() {
	return static_cast<ScrollArea*>(parentWidget());
}
开发者ID:4ker,项目名称:tdesktop,代码行数:3,代码来源:scrollarea.cpp


示例5: parentWidget

void ShutterFunctionDialog::closeEvent(QCloseEvent *e)
{
    m_project->nodes()->segments()->unselectAll();
    parentWidget()->repaint();
    QDialog::closeEvent(e);
}
开发者ID:Tungee,项目名称:slowmoVideo,代码行数:6,代码来源:shutterFunctionDialog.cpp


示例6: nativeWindowDeco

bool QDockWidgetLayout::nativeWindowDeco() const
{
    return nativeWindowDeco(parentWidget()->isWindow());
}
开发者ID:cdaffara,项目名称:symbiandump-mw3,代码行数:4,代码来源:qdockwidget.cpp


示例7: minimumTitleWidth

QSize QDockWidgetLayout::sizeFromContent(const QSize &content, bool floating) const
{
    QSize result = content;

    if (verticalTitleBar) {
        result.setHeight(qMax(result.height(), minimumTitleWidth()));
        result.setWidth(qMax(content.width(), 0));
    } else {
        result.setHeight(qMax(result.height(), 0));
        result.setWidth(qMax(content.width(), minimumTitleWidth()));
    }

    QDockWidget *w = qobject_cast<QDockWidget*>(parentWidget());
    const bool nativeDeco = nativeWindowDeco(floating);

    int fw = floating && !nativeDeco
            ? w->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, w)
            : 0;

    const int th = titleHeight();
    if (!nativeDeco) {
        if (verticalTitleBar)
            result += QSize(th + 2*fw, 2*fw);
        else
            result += QSize(2*fw, th + 2*fw);
    }

    result.setHeight(qMin(result.height(), (int) QWIDGETSIZE_MAX));
    result.setWidth(qMin(result.width(), (int) QWIDGETSIZE_MAX));

    if (content.width() < 0)
        result.setWidth(-1);
    if (content.height() < 0)
        result.setHeight(-1);

    int left, top, right, bottom;
    w->getContentsMargins(&left, &top, &right, &bottom);
    //we need to substract the contents margin (it will be added by the caller)
    QSize min = w->minimumSize() - QSize(left + right, top + bottom);
    QSize max = w->maximumSize() - QSize(left + right, top + bottom);

    /* A floating dockwidget will automatically get its minimumSize set to the layout's
       minimum size + deco. We're *not* interested in this, we only take minimumSize()
       into account if the user set it herself. Otherwise we end up expanding the result
       of a calculation for a non-floating dock widget to a floating dock widget's
       minimum size + window decorations. */

    uint explicitMin = 0;
    uint explicitMax = 0;
    if (w->d_func()->extra != 0) {
        explicitMin = w->d_func()->extra->explicitMinSize;
        explicitMax = w->d_func()->extra->explicitMaxSize;
    }

    if (!(explicitMin & Qt::Horizontal) || min.width() == 0)
        min.setWidth(-1);
    if (!(explicitMin & Qt::Vertical) || min.height() == 0)
        min.setHeight(-1);

    if (!(explicitMax & Qt::Horizontal))
        max.setWidth(QWIDGETSIZE_MAX);
    if (!(explicitMax & Qt::Vertical))
        max.setHeight(QWIDGETSIZE_MAX);

    return result.boundedTo(max).expandedTo(min);
}
开发者ID:cdaffara,项目名称:symbiandump-mw3,代码行数:66,代码来源:qdockwidget.cpp


示例8: refActual

/**
\return
**/
void Q19Writer::genera ( BlDbRecordSet  *curcobro, QString fileName , QStringList *idsGenerats)
{
      BL_FUNC_DEBUG
      QString refActual ( "cap rebut" );
      if (fileName.length()==0) {
          fileName = QFileDialog::getSaveFileName ( parentWidget(), _ ( "Fichero de remesa bancaria (Cuaderno 19)" ),
                       "",
                       _ ( "*.q19;;*" ) );
      }

      BlDebug::blDebug ( Q_FUNC_INFO, 0, QString(_("Nombre del fichero: '%1'")).arg(fileName) );

      if (fileName.length()>0) { // else ha apretat cancel?lar
       
	try
	{
		int cobraments=curcobro->numregistros();
		BlDbRecordSet  *curbanc;
		/*
		http://www.cam.es/1/empresas/servicios/pdf/c19.pdf
		"    Dentro de cada Cliente Ordenante, todos los registros individuales debera'n
		figurar en el soporte clasificados ascendentemente por el nu'mero de Entidad-
		Oficina de adeudo, Referencia y Co'digo de dato, terminando con un registro de
		<<Total Ordenante>>. Al final llevara' un registro de <<Total General>>.
		"
		Per'o cada idbanco (de fet cada entitat, per'o no filem tan prim) requereix un
		fitxer, perqu'e no portar'as a un banc els rebuts que vols cobrar per un altre.
		I la data de c'arrec va a la capc,alera d'ordenant, per tant hem d'ordenar primer
		per banc i data i despre's pel que demana als rebuts d'un ordenant. Farem tantes capc,aleres
		d'ordenant com dates encara que sempre sigui el mateix ordenant.

		*/
		bool bancUnic = ( curcobro->value( "idbanco",0 ) == curcobro->value( "idbanco",curcobro->numregistros()-1 ) );
		BlDebug::blDebug ( "bancUnic=",0,bancUnic?"si":"no" );
		QString idbanc ( "" );
		QFile file;
		QTextStream out ( &file );
		/*
		   http://www.cam.es/1/empresas/servicios/pdf/c19.pdf
		   - Codigo ASCII ( en mayusculas) (caracter 165= enye).
		   - Registros de longitud fija (162 bytes).
		   - Formato MS-DOS secuencial tipo texto.
		   En canvi un fitxer de mostra generat amb un programa que do'na el banc
		   te' 162 car'acters + \x0a , que no e's un salt de li'nia MSDOS. Ni se' si
		   un fitxer de registres de longitud fixa necessita  salts de li'nia per a res.
		*/
		out.setCodec ( "Q19" );
		QString sufijo;
		QDate fechaCargo = ( curcobro->eof() ?
		                     QDate()
		                     : QDate::fromString ( curcobro->value( "fechavenccobro" ),"dd/MM/yyyy" ) ) ;
		BlFixed impOrdenante ( 0,2 );
		BlFixed impPresentador ( 0,2 );
		QString resultats ( "" );
		int registrosOrdenante=0;
		int registrosPresentador=0;
		int cobramentsOrdenante=0;
		int cobramentsPresentador=0;
		int ordenants=0;
		int sensebanc=0;
		int sensevenc=0;
		while ( !curcobro->eof() )
		{
			if ( QDate::fromString ( curcobro->value( "fechavenccobro" ),"dd/MM/yyyy" ).isValid() )
			{
				if ( ( !curcobro->value( "idbanco" ).isNull() ) && ( curcobro->value( "idbanco" ).length() >0 ) )
				{

					if ( QDate::fromString ( curcobro->value( "fechavenccobro" ),"dd/MM/yyyy" ) != fechaCargo )
					{
						registrosPresentador++;
						registrosOrdenante++;
						totalOrdenante ( out, sufijo , curbanc, impOrdenante,
						                 cobramentsOrdenante, registrosOrdenante );
						ordenants++;
					}
					if ( curcobro->value( "idbanco" ) != idbanc )
					{
						// canvi de banc on cobrem els rebuts, canvi de fitxer
						idbanc=curcobro->value( "idbanco" );
						if ( file.handle() !=-1 )
						{
							registrosPresentador++;
							totalPresentador ( out, sufijo, curbanc, impPresentador, cobramentsPresentador, registrosPresentador , ordenants );
							resultats += _ ( "\n%3 : %1 recibos, %2 EUR. " ).arg ( cobramentsPresentador ).arg ( impPresentador.toQString() ).arg ( file.fileName() );
							file.close();
							delete curbanc;

						}
						curbanc = m_empresa->loadQuery ( "SELECT * FROM banco WHERE idbanco = $1",1,&idbanc );
                                                sufijo = curbanc->value("sufijobanco");
						if ( bancUnic )
						{
							file.setFileName ( fileName );
							BlDebug::blDebug ( "creare' ",0,fileName );
						}
						else
//.........这里部分代码省略.........
开发者ID:trifolio6,项目名称:Bulmages,代码行数:101,代码来源:q19writer.cpp


示例9: Q_D

/*! \reimp */
bool QDockWidget::event(QEvent *event)
{
    Q_D(QDockWidget);

    QMainWindow *win = qobject_cast<QMainWindow*>(parentWidget());
    QMainWindowLayout *layout = 0;
    if (win != 0)
        layout = qobject_cast<QMainWindowLayout*>(win->layout());

    switch (event->type()) {
#ifndef QT_NO_ACTION
    case QEvent::Hide:
        if (layout != 0)
            layout->keepSize(this);
        d->toggleViewAction->setChecked(false);
        emit visibilityChanged(false);
        break;
    case QEvent::Show:
        d->toggleViewAction->setChecked(true);
        emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
        break;
#endif
    case QEvent::ApplicationLayoutDirectionChange:
    case QEvent::LayoutDirectionChange:
    case QEvent::StyleChange:
    case QEvent::ParentChange:
        d->updateButtons();
        break;
    case QEvent::ZOrderChange: {
        bool onTop = false;
        if (win != 0) {
            const QObjectList &siblings = win->children();
            onTop = siblings.count() > 0 && siblings.last() == (QObject*)this;
        }
        if (!isFloating() && layout != 0 && onTop)
            layout->raise(this);
        break;
    }
    case QEvent::WindowActivate:
    case QEvent::WindowDeactivate:
        update(qobject_cast<QDockWidgetLayout *>(this->layout())->titleArea());
        break;
    case QEvent::ContextMenu:
        if (d->state) {
            event->accept();
            return true;
        }
        break;
        // return true after calling the handler since we don't want
        // them to be passed onto the default handlers
    case QEvent::MouseButtonPress:
        if (d->mousePressEvent(static_cast<QMouseEvent *>(event)))
            return true;
        break;
    case QEvent::MouseButtonDblClick:
        if (d->mouseDoubleClickEvent(static_cast<QMouseEvent *>(event)))
            return true;
        break;
    case QEvent::MouseMove:
        if (d->mouseMoveEvent(static_cast<QMouseEvent *>(event)))
            return true;
        break;
#ifdef Q_OS_WIN
    case QEvent::Leave:
        if (d->state != 0 && d->state->dragging && !d->state->nca) {
            // This is a workaround for loosing the mouse on Vista.
            QPoint pos = QCursor::pos();
            QMouseEvent fake(QEvent::MouseMove, mapFromGlobal(pos), pos, Qt::NoButton,
                             QApplication::mouseButtons(), QApplication::keyboardModifiers());
            d->mouseMoveEvent(&fake);
        }
        break;
#endif
    case QEvent::MouseButtonRelease:
        if (d->mouseReleaseEvent(static_cast<QMouseEvent *>(event)))
            return true;
        break;
    case QEvent::NonClientAreaMouseMove:
    case QEvent::NonClientAreaMouseButtonPress:
    case QEvent::NonClientAreaMouseButtonRelease:
    case QEvent::NonClientAreaMouseButtonDblClick:
        d->nonClientAreaMouseEvent(static_cast<QMouseEvent*>(event));
        return true;
    case QEvent::Move:
        d->moveEvent(static_cast<QMoveEvent*>(event));
        break;
    case QEvent::Resize:
        // if the mainwindow is plugging us, we don't want to update undocked geometry
        if (isFloating() && layout != 0 && layout->pluggingWidget != this)
            d->undockedGeometry = geometry();
        break;
    default:
        break;
    }
    return QWidget::event(event);
}
开发者ID:cdaffara,项目名称:symbiandump-mw3,代码行数:97,代码来源:qdockwidget.cpp


示例10: parentWidget

void Adding::OnCancel()
{
    this->close();
    parentWidget()->close();
}
开发者ID:amitbhorania,项目名称:ExpenseManager,代码行数:5,代码来源:adding.cpp


示例11: defined

void StatusBar::updateStyleSheet()
{
  #if defined(Q_OS_MAC)
  setStyleSheet(LS("QStatusBar { background: qlineargradient(x1: 1, y1: 0, x2: 1, y2: 1, stop: 0 #ededed, stop: 1 #c8c8c8); } QStatusBar::item { border-width: 0; }"));
  #else
    #if defined(Q_OS_WIN32)
    setStyleSheet(QString(LS("QStatusBar { background-color: %1; } QStatusBar::item { border-width: 0; }")).arg(parentWidget()->palette().color(QPalette::Window).name()));
    #else
    setStyleSheet(LS("QStatusBar::item { border-width: 0; }"));
    #endif
  #endif
}
开发者ID:johnbolia,项目名称:schat,代码行数:12,代码来源:StatusBar.cpp


示例12: resize

void Overlay::relayout()
{
    resize(parentWidget()->size());
    if (d.button)
        d.button->move(rect().center() - d.button->rect().center());
}
开发者ID:EldFitheach,项目名称:Mudlet,代码行数:6,代码来源:overlay.cpp


示例13: GroupIndicatorOverlayWidget

QWidget* GroupIndicatorOverlay::createWidget()
{
    QAbstractButton* const button = new GroupIndicatorOverlayWidget(parentWidget());
    button->setCursor(Qt::PointingHandCursor);
    return button;
}
开发者ID:rickysarraf,项目名称:digikam,代码行数:6,代码来源:groupindicatoroverlay.cpp


示例14: setGeometry

void QDockWidgetLayout::setGeometry(const QRect &geometry)
{
    QDockWidget *q = qobject_cast<QDockWidget*>(parentWidget());

    bool nativeDeco = nativeWindowDeco();

    int fw = q->isFloating() && !nativeDeco
            ? q->style()->pixelMetric(QStyle::PM_DockWidgetFrameWidth, 0, q)
            : 0;

    if (nativeDeco) {
        if (QLayoutItem *item = item_list[Content])
            item->setGeometry(geometry);
    } else {
        int titleHeight = this->titleHeight();

        if (verticalTitleBar) {
            _titleArea = QRect(QPoint(fw, fw),
                                QSize(titleHeight, geometry.height() - (fw * 2)));
        } else {
            _titleArea = QRect(QPoint(fw, fw),
                                QSize(geometry.width() - (fw * 2), titleHeight));
        }

        if (QLayoutItem *item = item_list[TitleBar]) {
            item->setGeometry(_titleArea);
        } else {
            QStyleOptionDockWidgetV2 opt;
            q->initStyleOption(&opt);

            if (QLayoutItem *item = item_list[CloseButton]) {
                if (!item->isEmpty()) {
                    QRect r = q->style()
                        ->subElementRect(QStyle::SE_DockWidgetCloseButton,
                                            &opt, q);
                    if (!r.isNull())
                        item->setGeometry(r);
                }
            }

            if (QLayoutItem *item = item_list[FloatButton]) {
                if (!item->isEmpty()) {
                    QRect r = q->style()
                        ->subElementRect(QStyle::SE_DockWidgetFloatButton,
                                            &opt, q);
                    if (!r.isNull())
                        item->setGeometry(r);
                }
            }
        }

        if (QLayoutItem *item = item_list[Content]) {
            QRect r = geometry;
            if (verticalTitleBar) {
                r.setLeft(_titleArea.right() + 1);
                r.adjust(0, fw, -fw, -fw);
            } else {
                r.setTop(_titleArea.bottom() + 1);
                r.adjust(fw, 0, -fw, -fw);
            }
            item->setGeometry(r);
        }
    }
}
开发者ID:cdaffara,项目名称:symbiandump-mw3,代码行数:64,代码来源:qdockwidget.cpp


示例15: colorGroup

void QToolBoxButton::drawButton( QPainter *p )
{
    QStyle::SFlags flags = QStyle::Style_Default;
    const QColorGroup &cg = colorGroup();

    if ( isEnabled() )
	flags |= QStyle::Style_Enabled;
    if ( selected )
	flags |= QStyle::Style_Selected;
    if ( hasFocus() )
	flags |= QStyle::Style_HasFocus;
    if (isDown())
	flags |= QStyle::Style_Down;
    style().drawControl( QStyle::CE_ToolBoxTab, p, parentWidget(), rect(), cg, flags );

    QPixmap pm = icon.pixmap( QIconSet::Small, isEnabled() ? QIconSet::Normal : QIconSet::Disabled );

    QRect cr = style().subRect( QStyle::SR_ToolBoxTabContents, this );
    QRect tr, ir;
    int ih = 0;
    if ( pm.isNull() ) {
	tr = cr;
	tr.addCoords( 4, 0, -8, 0 );
    } else {
	int iw = pm.width() + 4;
	ih = pm.height();
	ir = QRect( cr.left() + 4, cr.top(), iw + 2, ih );
	tr = QRect( ir.right(), cr.top(), cr.width() - ir.right() - 4, cr.height() );
    }

    if ( selected && style().styleHint( QStyle::SH_ToolBox_SelectedPageTitleBold ) ) {
	QFont f( p->font() );
	f.setBold( TRUE );
	p->setFont( f );
    }

    QString txt;
    if ( p->fontMetrics().width(label) < tr.width() ) {
	txt = label;
    } else {
	txt = label.left( 1 );
	int ew = p->fontMetrics().width( "..." );
	int i = 1;
	while ( p->fontMetrics().width( txt ) + ew +
		p->fontMetrics().width( label[i] )  < tr.width() )
	    txt += label[i++];
	txt += "...";
    }

    if ( ih )
	p->drawPixmap( ir.left(), (height() - ih) / 2, pm );

    QToolBox *tb = (QToolBox*)parentWidget();

    const QColor* fill = 0;
    if ( selected &&
	 style().styleHint( QStyle::SH_ToolBox_SelectedPageTitleBold ) &&
	 tb->backgroundMode() != NoBackground )
	fill = &cg.color( QPalette::foregroundRoleFromMode( tb->backgroundMode() ) );

    int alignment = AlignLeft | AlignVCenter | ShowPrefix;
    if (!style().styleHint(QStyle::SH_UnderlineAccelerator, this))
	alignment |= NoAccel;
    style().drawItem( p, tr, alignment, cg,
		      isEnabled(), 0, txt, -1, fill );

    if ( !txt.isEmpty() && hasFocus() )
	style().drawPrimitive( QStyle::PE_FocusRect, p, tr, cg );
}
开发者ID:AliYousuf,项目名称:abanq-port,代码行数:69,代码来源:qtoolbox.cpp


示例16: KFileDialog

void KfindWindow::saveResults()
{
  TQListViewItem *item;

  KFileDialog *dlg = new KFileDialog(TQString::null, TQString::null, this,
	"filedialog", true);
  dlg->setOperationMode (KFileDialog::Saving);

  dlg->setCaption(i18n("Save Results As"));

  TQStringList list;

  list << "text/plain" << "text/html";

  dlg->setOperationMode(KFileDialog::Saving);
  
  dlg->setMimeFilter(list, TQString("text/plain"));

  dlg->exec();

  KURL u = dlg->selectedURL();
  KMimeType::Ptr mimeType = dlg->currentFilterMimeType();
  delete dlg;

  if (!u.isValid() || !u.isLocalFile())
     return;

  TQString filename = u.path();

  TQFile file(filename);

  if ( !file.open(IO_WriteOnly) )
    KMessageBox::error(parentWidget(),
		       i18n("Unable to save results."));
  else {
    TQTextStream stream( &file );
    stream.setEncoding( TQTextStream::Locale );

    if ( mimeType->name() == "text/html") {
      stream << TQString::fromLatin1("<HTML><HEAD>\n"
				    "<!DOCTYPE %1>\n"
				    "<TITLE>%2</TITLE></HEAD>\n"
				    "<BODY><H1>%3</H1>"
				    "<DL><p>\n")
	.arg(i18n("KFind Results File"))
	.arg(i18n("KFind Results File"))
	.arg(i18n("KFind Results File"));

      item = firstChild();
      while(item != NULL)
	{
	  TQString path=((KfFileLVI*)item)->fileitem.url().url();
	  TQString pretty=((KfFileLVI*)item)->fileitem.url().htmlURL();
	  stream << TQString::fromLatin1("<DT><A HREF=\"") << path
		 << TQString::fromLatin1("\">") << pretty
		 << TQString::fromLatin1("</A>\n");

	  item = item->nextSibling();
	}
      stream << TQString::fromLatin1("</DL><P></BODY></HTML>\n");
    }
    else {
      item = firstChild();
      while(item != NULL)
      {
	TQString path=((KfFileLVI*)item)->fileitem.url().url();
	stream << path << endl;
	item = item->nextSibling();
      }
    }

    file.close();
    KMessageBox::information(parentWidget(),
			     i18n("Results were saved to file\n")+
			     filename);
  }
}
开发者ID:Fat-Zer,项目名称:tdebase,代码行数:77,代码来源:kfwin.cpp


示例17: mainWindow

MainWindow* NetworkAnalyzerPanel::mainWindow()
{
    return qobject_cast<MainWindow *>(parentWidget());
}
开发者ID:wyuka,项目名称:rekonq,代码行数:4,代码来源:analyzerpanel.cpp


示例18: QWidget

void ApplicationWindow::addTpgTab(int m_winWidth)
{
	QWidget *t = new QWidget(m_tabs);
	QVBoxLayout *vbox = new QVBoxLayout(t);
	QWidget *w = new QWidget(t);
	QCheckBox *check;
	QComboBox *combo;
	QSpinBox *spin;

	m_col = m_row = 0;
	m_cols = 4;
	for (int j = 0; j < m_cols; j++) {
		m_maxw[j] = 0;
	}

	vbox->addWidget(w);

	QGridLayout *grid = new QGridLayout(w);
	QLabel *title_tab = new QLabel("Test Pattern Generator", parentWidget());
	QFont f = title_tab->font();
	f.setBold(true);
	title_tab->setFont(f);
	grid->addWidget(title_tab, m_row, m_col, 1, m_cols, Qt::AlignLeft);
	grid->setRowMinimumHeight(m_row, 25);
	m_row++;

	QFrame *m_line = new QFrame(grid->parentWidget());
	m_line->setFrameShape(QFrame::HLine);
	m_line->setFrameShadow(QFrame::Sunken);
	grid->addWidget(m_line, m_row, m_col, 1, m_cols, Qt::AlignVCenter);
	m_row++;

	m_tabs->addTab(t, "Test Pattern Generator");
	grid->addWidget(new QWidget(w), grid->rowCount(), 0, 1, m_cols);

	addLabel(grid, "Test Pattern");
	combo = new QComboBox(w);
	for (int i = 0; tpg_pattern_strings[i]; i++)
		combo->addItem(tpg_pattern_strings[i]);
	addWidget(grid, combo);
	connect(combo, SIGNAL(activated(int)), SLOT(testPatternChanged(int)));

	m_row++;
	m_col = 0;

	addLabel(grid, "Horizontal Movement");
	combo = new QComboBox(w);
	combo->addItem("Move Left Fast");
	combo->addItem("Move Left");
	combo->addItem("Move Left Slow");
	combo->addItem("No Movement");
	combo->addItem("Move Right Slow");
	combo->addItem("Move Right");
	combo->addItem("Move Right Fast");
	combo->setCurrentIndex(3);
	addWidget(grid, combo);
	connect(combo, SIGNAL(activated(int)), SLOT(horMovementChanged(int)));

	addLabel(grid, "Video Aspect Ratio");
	combo = new QComboBox(w);
	combo->addItem("Source Width x Height");
	combo->addItem("4x3");
	combo->addItem("14x9");
	combo->addItem("16x9");
	combo->addItem("16x9 Anamorphic");
	addWidget(grid, combo);
	connect(combo, SIGNAL(activated(int)), SLOT(videoAspectRatioChanged(int)));

	addLabel(grid, "Vertical Movement");
	combo = new QComboBox(w);
	combo->addItem("Move Up Fast");
	combo->addItem("Move Up");
	combo->addItem("Move Up Slow");
	combo->addItem("No Movement");
	combo->addItem("Move Down Slow");
	combo->addItem("Move Down");
	combo->addItem("Move Down Fast");
	combo->setCurrentIndex(3);
	addWidget(grid, combo);
	connect(combo, SIGNAL(activated(int)), SLOT(vertMovementChanged(int)));

	addLabel(grid, "Show Border");
	check = new QCheckBox(w);
	addWidget(grid, check);
	connect(check, SIGNAL(stateChanged(int)), SLOT(showBorderChanged(int)));

	addLabel(grid, "Insert SAV Code in Image");
	check = new QCheckBox(w);
	addWidget(grid, check);
	connect(check, SIGNAL(stateChanged(int)), SLOT(insSAVChanged(int)));

	addLabel(grid, "Show Square");
	check = new QCheckBox(w);
	addWidget(grid, check);
	connect(check, SIGNAL(stateChanged(int)), SLOT(showSquareChanged(int)));

	addLabel(grid, "Insert EAV Code in Image");
	check = new QCheckBox(w);
	addWidget(grid, check);
	connect(check, SIGNAL(stateChanged(int)), SLOT(insEAVChanged(int)));
//.........这里部分代码省略.........
开发者ID:Distrotech,项目名称:v4l-utils,代码行数:101,代码来源:tpg-tab.cpp


示例19: parentWidget

void TitleBar::showSmall()
{
    parentWidget()->parentWidget()->showMinimized();
}
开发者ID:evgeny,项目名称:psi,代码行数:4,代码来源:titlebar.cpp


示例20: parentWidget

void QIMainDialog::polishEvent(QShowEvent*)
{
    /* Explicit centering according to our parent: */
    if (m_fIsAutoCentering)
        VBoxGlobal::centerWidget(this, parentWidget(), false);
}
开发者ID:miguelinux,项目名称:vbox,代码行数:6,代码来源:QIMainDialog.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ parent_ino函数代码示例发布时间:2022-05-30
下一篇:
C++ parentProcessConnection函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap