LibrePCB Developers Documentation
Loading...
Searching...
No Matches
Resource Class Referencefinal

The Resource class. More...

#include <resource.h>

+ Collaboration diagram for Resource:

Public Types

enum class  Event
 
typedef Slot< Resource, EventOnEditedSlot
 

Public Member Functions

 Resource ()=delete
 
 Resource (const Resource &other) noexcept
 
 Resource (const SExpression &node)
 
 Resource (const ElementName &name, const QString &mimeType, const QUrl &url) noexcept
 
 ~Resource () noexcept
 
const ElementNamegetName () const noexcept
 
const QString & getMediaType () const noexcept
 
const QUrl & getUrl () const noexcept
 
void setName (const ElementName &name) noexcept
 
void setMediaType (const QString &type) noexcept
 
void setUrl (const QUrl &url) noexcept
 
void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node.
 
bool operator== (const Resource &rhs) const noexcept
 
bool operator!= (const Resource &rhs) const noexcept
 
Resourceoperator= (const Resource &rhs) noexcept
 

Public Attributes

Signal< Resource, EventonEdited
 

Private Attributes

ElementName mName
 
QString mMediaType
 
QUrl mUrl
 

Detailed Description

The Resource class.

Member Typedef Documentation

◆ OnEditedSlot

Member Enumeration Documentation

◆ Event

enum class Event
strong
Enumerator
NameChanged 
MediaTypeChanged 
UrlChanged 

Constructor & Destructor Documentation

◆ Resource() [1/4]

Resource ( )
delete

◆ Resource() [2/4]

Resource ( const Resource other)
noexcept

◆ Resource() [3/4]

Resource ( const SExpression node)
explicit

◆ Resource() [4/4]

Resource ( const ElementName name,
const QString &  mimeType,
const QUrl &  url 
)
noexcept

◆ ~Resource()

~Resource ( )
noexcept

Member Function Documentation

◆ getName()

const ElementName & getName ( ) const
inlinenoexcept

◆ getMediaType()

const QString & getMediaType ( ) const
inlinenoexcept

◆ getUrl()

const QUrl & getUrl ( ) const
inlinenoexcept

◆ setName()

void setName ( const ElementName name)
noexcept

◆ setMediaType()

void setMediaType ( const QString &  type)
noexcept

◆ setUrl()

void setUrl ( const QUrl &  url)
noexcept

◆ serialize()

void serialize ( SExpression root) const

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.
+ Here is the call graph for this function:

◆ operator==()

bool operator== ( const Resource rhs) const
noexcept

◆ operator!=()

bool operator!= ( const Resource rhs) const
inlinenoexcept

◆ operator=()

Resource & operator= ( const Resource rhs)
noexcept

Member Data Documentation

◆ onEdited

Signal<Resource, Event> onEdited

◆ mName

ElementName mName
private

◆ mMediaType

QString mMediaType
private

◆ mUrl

QUrl mUrl
private

The documentation for this class was generated from the following files: