Exemplo n.º 1
0
void
QFCItem::setup(void)
{
    FieldContainer *pFCAsp = getFC().getAspectCPtr(getAspect());

    if(!pFCAsp)
        return;

    UInt32 uiNumFields = pFCAsp->getType().getNumFieldDescs();
    
    for(UInt32  fieldId = 1; fieldId <= uiNumFields; ++fieldId)
    {
        FieldDescription *pDesc     = 
            pFCAsp->getType().getFieldDescription     (fieldId);
        Field            *pField    = pFCAsp->getField(fieldId);
        
        if(isSFFieldContainerPtr(pField))
        {
            if(stringcmp(pDesc->getCName(), "parent" ) == 0)
                continue;

            SFFieldContainerPtr *pSFFCPtr = 
                reinterpret_cast<SFFieldContainerPtr *>(pField);

            if(pSFFCPtr->getValue() != NullFC)
            {
                setExpandable(this);
                break;
            }
        }
        else if(isMFFieldContainerPtr(pField))
        {
            MFFieldContainerPtr *pMFFCPtr =
                reinterpret_cast<MFFieldContainerPtr *>(pField);

            if(stringcmp(pDesc->getCName(), "parents") == 0)
            {
                if(pMFFCPtr->size() > 1)
                {
                    setExpandable(this);
                    break;
                }
            }
            else
            {
                if(pMFFCPtr->size() > 0)
                {
                    setExpandable(this);
                    break;
                }
            }
        }
    }

    Inherited::setup();
}
Exemplo n.º 2
0
void Directory::setOpen( bool o )
{
  if ( o )
    setPixmap( 0, QPixmap( folder_open_xpm ) );
  else
    setPixmap( 0, QPixmap( folder_closed_xpm ) );

  if ( o && !childCount() ){
    QString s( fullName() );
    QDir thisDir( s );
    if ( !thisDir.isReadable() ) {
    readable = false;
    setExpandable( false );
    return;
  }

  listView()->setUpdatesEnabled( false );
  const QFileInfoList * files = thisDir.entryInfoList();
  if ( files ){
    QFileInfoListIterator it( *files );
    QFileInfo * f;
    while( (f=it.current()) != 0 ){
      ++it;
      if ( f->fileName() != "." && f->fileName() != ".." && f->isDir() )
        (void)new Directory( this, f->fileName() );
      }
    }
    listView()->setUpdatesEnabled( true );
  }
  QListViewItem::setOpen( o );
}
toTemplateSQL::toTemplateSQL(toTemplateItem *parent,
                             const QString &name, const QString &sql)
        : toTemplateItem(parent, name), Object(this), SQL(sql)
{
    Connection = NULL;
    setExpandable(true);
}
Exemplo n.º 4
0
ThreadStackItem::ThreadStackItem(FramestackWidget *parent, int threadNo, const QString &threadDesc)
        : QListViewItem(parent),
        threadNo_(threadNo)
{
    setText(0, threadDesc);
    setExpandable(true);
}
Exemplo n.º 5
0
TaskHeader::TaskHeader(const QIcon &icon, const QString &title, bool expandable, QWidget *parent)
  : BaseClass(parent),
  myExpandable(expandable),
  m_over(false),
  m_buttonOver(false),
  m_fold(true),
  m_opacity(0.1),
  myButton(0)
{
    setProperty("class", "header");

    myTitle = new ActionLabel(this);
    myTitle->setProperty("class", "header");
    myTitle->setText(title);
    myTitle->setIcon(icon);
    myTitle->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred);

    connect(myTitle, SIGNAL(clicked()), this, SLOT(fold()));

    QHBoxLayout *hbl = new QHBoxLayout();
    hbl->setMargin(2);
    setLayout(hbl);

    hbl->addWidget(myTitle);

    setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);

    setScheme(ActionPanelScheme::defaultScheme());
    //myTitle->setSchemePointer(&myLabelScheme);

    setExpandable(myExpandable);
}
Exemplo n.º 6
0
void classDriver::setOpen( bool o )
{
    if ( o && !childCount() )
	{
		setExpandable( FALSE );
    }
    QListViewItem::setOpen( o );
}
DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin,
    KListView *parent, const QString &name)
    :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin),
    isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false)
{
    setExpandable(true);
    m_plugin->addCatalog(this);
}
Exemplo n.º 8
0
KonqSidebarHistoryItem::KonqSidebarHistoryItem( const KonqHistoryEntry *entry,
				  KonqSidebarTreeItem * parentItem,
				  KonqSidebarTreeTopLevelItem *topLevelItem )
    : KonqSidebarTreeItem( parentItem, topLevelItem )
{
    setExpandable( false );
    update( entry );
}
Exemplo n.º 9
0
GlobalRoot::GlobalRoot(VariableTree *parent)
    : LazyFetchItem(parent)
{
    setText(0, i18n("Global"));
    setExpandable(true);
    setOpen(false);
	setSelectable(false);
}
Exemplo n.º 10
0
void KonqSidebarTreeItem::initItem( KonqSidebarTreeTopLevelItem *topLevelItem )
{
    m_topLevelItem = topLevelItem;
    m_bListable = true;
    m_bClickable = true;

    setExpandable( true );
}
Exemplo n.º 11
0
DivItem::DivItem(UserListBase *view, unsigned type)
        : UserViewItemBase(view)
{
    m_type = type;
    setText(0, QString::number(m_type));
    setExpandable(true);
    setSelectable(false);
}
Exemplo n.º 12
0
WorkspaceItem::WorkspaceItem( QListView *parent, Project* p )
    : QListViewItem( parent )
{
    init();
    project = p;
    t = ProjectType;
    setPixmap( 0, QPixmap::fromMimeSource( "designer_folder.png" ) );
    setExpandable( FALSE );
}
Exemplo n.º 13
0
void classPrimaryKeys::setup()
{
    setExpandable( TRUE );
#ifdef QT_V4LAYOUT
    Q3ListViewItem::setup();
#else
    QListViewItem::setup();
#endif
}
Exemplo n.º 14
0
VarFrameRoot::VarFrameRoot(VariableTree *parent, int frameNo, int threadNo)
    : LazyFetchItem(parent),
      needsVariables_(true),
      frameNo_(frameNo),
      threadNo_(threadNo),
      cache_("")
{
    setExpandable(true);
}
Exemplo n.º 15
0
classSpecialColumns::classSpecialColumns( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszLibrary )
    : classNode( pParent, pAfter, pCanvas ) , hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary )
{
  setText( 0, "SpecialColumns" );
  setText( 1, "" );
  setText( 2, "" );
  listColumns.setAutoDelete( TRUE );
  setPixmap( 0, QPixmap( id_xpm ) );
  setExpandable( TRUE );
}
Exemplo n.º 16
0
classODBC::classODBC( QListView *pParent, classCanvas *pCanvas )
#endif
    : classNode( pParent, pCanvas ) , pDrivers ( NULL ) , pDataSourcesUser( NULL ) , pDataSourcesSystem( NULL )
{
  setPixmap( 0, QPixmap(xpmODBC) );
  setText( 0, "ODBC" );
  setText( 1, "" );
  setText( 2, "Open Database Connectivity" );
  setExpandable( TRUE );
}
Exemplo n.º 17
0
void TagNodeItem::initialize(TagNode *node)
{
    setExpandable(false);

    if(node)
    {
        setText(0, node->title());
        setPixmap(0, KGlobal::iconLoader()->loadIcon(node->icon(), KIcon::Small));
    }
}
Exemplo n.º 18
0
classTable::classTable( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *pszTable, const char *pszType, const char *pszDescription, const char* pszLibrary )
#endif
  : classNode( pParent, pAfter, pCanvas ), hDbc( hDbc ), qsTable( pszTable ), qsLibrary( pszLibrary ), pPrimaryKeys( NULL ), pIndexs( NULL ), pSpecialColumns( NULL ), pBrowse( NULL )
{
  setText( 0, pszTable       );
  setText( 1, pszType        );
  setText( 2, pszDescription );
  listColumns.setAutoDelete( TRUE );
  setPixmap( 0, QPixmap( table_xpm ) );
  setExpandable( TRUE );
}
void VariablesListViewItem::showVariable() {
  setText(VariablesListView::NameCol, m_variable->name());

  VariablesListView* lv = dynamic_cast<VariablesListView*>(listView());

  if(m_variable->value()->isScalar()) {
    setText(VariablesListView::ValueCol, m_variable->value()->toString());
    setRenameEnabled(VariablesListView::ValueCol, !lv->isReadOnly());
    setExpandable(false);
  } else {
    //setText(VariablesListView::Value, m_variable->value()->typeName());
    setExpandable(true);
  }

  if(m_variable->isReference()) {
    setText(VariablesListView::TypeCol, QString("&") + m_variable->value()->typeName());
  } else {
    setText(VariablesListView::TypeCol, m_variable->value()->typeName());
  }
}
Exemplo n.º 20
0
classTables::classTables( QListViewItem *pParent, QListViewItem *pAfter, classCanvas *pCanvas, SQLHENV hDbc, const char *szLibrary )
#endif
    : classNode( pParent, pAfter, pCanvas ) , hDbc( hDbc ) , qsLibrary( szLibrary )
{
  setText( 0, qsLibrary.isEmpty() ? "Tables" : (const char*)qsLibrary );
  setText( 1, "LIBRARY  " );
  setText( 2, "" );
  listTables.setAutoDelete( TRUE );
  setPixmap( 0, QPixmap( tables_xpm ) );
  setExpandable( TRUE );
}
Exemplo n.º 21
0
Item::Item( QListViewItem *parent, const KURL &url )
    : QCheckListItem( parent, url.fileName(), QCheckListItem::CheckBox  )
    , m_lister( true )
    , m_url( url )
    , m_listed( false )
{
    m_lister.setDirOnlyMode( true );
    setExpandable( true );
    connect( &m_lister, SIGNAL(newItems( const KFileItemList& )), SLOT(newItems( const KFileItemList& )) );
    connect( &m_lister, SIGNAL(completed()), SLOT(completed()) );
    connect( &m_lister, SIGNAL(canceled()), SLOT(completed()) );
}
Exemplo n.º 22
0
DockWidget::DockWidget(QTabWidget *tabs, QWidget *parent) : DockWidget{tabs->tabText(0), parent} {
    setObjectName(tabs->widget(0)->objectName() + QStringLiteral("_dock"));
    setWindowIcon(tabs->tabIcon(0));
    setWidget(tabs->widget(0));
    setExpandable(!(objectName() == QStringLiteral("debugAutoTesterWidget_dock") ||
                    objectName() == QStringLiteral("debugCpuStatusWidget_dock") ||
                    objectName() == QStringLiteral("debugControlWidget_dock") ||
                    objectName() == QStringLiteral("debugTimerWidget_dock") ||
                    objectName() == QStringLiteral("debugMiscWidget_dock") ||
                    objectName() == QStringLiteral("settingsWidget_dock") ||
                    objectName() == QStringLiteral("captureWidget_dock"))); // TODO: lolz fixme plz
}
void
AssetChildItem::configureWidgets(const AssetVersion &ver,
                                 const std::string &msg)
{
  setText( COL_SUBTYPE, msg + ver->PrettySubtype());
  setText( COL_STATE, ver->PrettyState() );
  if ( ver->Logfile().size() != 0 )
    setPixmap( COL_LOG, uic_load_pixmap( "history.png" ) );
  setText( COL_REF, ver->GetRef().c_str() );

  setExpandable(ver->inputs.size() ||
                (!ver->IsLeaf() && ver->children.size()));
}
Exemplo n.º 24
0
//BEGIN Class PropertyEditorItem
PropertyEditorItem::PropertyEditorItem( PropertyEditorItem * par, Property * property )
	: KListViewItem( par, property->editorCaption(), property->displayString() )
{
	setExpandable( false );
	m_property=property;
	connect( m_property, SIGNAL(valueChanged( QVariant, QVariant )), this, SLOT(propertyValueChanged()) );

	updateValue();

	//3 rows per item is enough?
	setMultiLinesEnabled( true );
	setHeight(static_cast<PropertyEditor*>(listView())->baseRowHeight()*3);
}
Exemplo n.º 25
0
void FeedItem::initialize(Feed* node)
{
    setExpandable(false);
    if (node)
    {
        setText(0, node->title());
        if (!node->favicon().isNull())
            setPixmap( 0, node->favicon() );
        else
        {
            setPixmap( 0, defaultPixmap() );
            node->loadFavicon();
        }
    }
}
Exemplo n.º 26
0
void Directory::setOpen(bool o)
{
	if (o) setPixmap(folderOpen);
	else setPixmap(folderClosed);

	if (o && !childCount())
	{
		QString s(fullName());
		QDir thisDir(s);

		if (!thisDir.isReadable())
		{
			readable = FALSE;
			setExpandable(FALSE);
			return;
		}

		listView()->setUpdatesEnabled(FALSE);
        const QFileInfoList * files = thisDir.entryInfoList();
        
		if (files)
		{
			QFileInfoListIterator it(*files);
			QFileInfo * fi;
			
			while((fi = it.current()) != 0)
			{
				++it;
				if (fi->fileName() == "." || fi->fileName() == ".." ); // nothing
				else if (fi->isSymLink() && !showDirsOnly)
				{
					FileItem *item = new FileItem(this, fi->fileName(), "Symbolic Link" );
					item->setPixmap(fileNormal);
				}
				
				else if (fi->isDir()) (void)new Directory(this, fi->fileName());
				else if (!showDirsOnly)
				{
					FileItem *item = new FileItem(this, fi->fileName(), fi->isFile() ? "File" : "Special");
					item->setPixmap(fileNormal);
				}
			}
		}
		listView()->setUpdatesEnabled(TRUE);
	}
	QListViewItem::setOpen(o);
}
Exemplo n.º 27
0
void GroupItem::init(Group *grp)
{
    m_unread = 0;
    m_nContacts = 0;
    m_nContactsOnline = 0;
    setExpandable(true);
    setSelectable(true);
    ListUserData *data = (ListUserData*)(grp->getUserData(CorePlugin::m_plugin->list_data_id, false));
    if (data == NULL){
        setOpen(true);
    }else{
        if (m_bOffline){
            setOpen(data->OfflineOpen);
        }else{
            setOpen(data->OnlineOpen);
        }
    }
    update(grp, true);
}
Exemplo n.º 28
0
void classPrimaryKeys::setup()
{
    setExpandable( TRUE );
    QListViewItem::setup();
}
Exemplo n.º 29
0
void Directory::setup()
{
	setExpandable(TRUE);
	QListViewItem::setup();
}
Exemplo n.º 30
0
toTemplateSQL::toTemplateSQL(toConnection &conn, toTemplateItem *parent,
                             const QString &name, const QString &sql)
        : toTemplateItem(parent, name), Object(this), Connection(&conn), SQL(sql)
{
    setExpandable(true);
}