Geometrize  1.0
An application for geometrizing images into geometric primitives
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
geometrize::RecentItem Class Reference

The RecentItem class models an item that was recently interacted with. More...

#include <recentitem.h>

Public Types

enum  Type { Type::LOCAL_IMAGE, Type::LOCAL_CHAISCRIPT, Type::REMOTE_RESOURCE, Type::UNKNOWN }
 

Public Member Functions

 RecentItem (const QString &key, const QString &displayName, const long long int timeStamp)
 
QString getKey () const
 
QString getDisplayName () const
 
long long int getTimeStamp () const
 

Static Public Member Functions

static RecentItem::Type getTypeForKey (const QString &key)
 getTypeForKey Gets the recent item type for the given recent item key. More...
 

Private Attributes

QString m_key
 Key, path, URL or other unique identifier for the item. More...
 
QString m_displayName
 Display name of the item, suitable for showing to the user. More...
 
long long int m_timeStamp
 Timestamp, millis since epoch, typically when the item was last accessed or used. More...
 

Detailed Description

The RecentItem class models an item that was recently interacted with.

Member Enumeration Documentation

◆ Type

Enumerator
LOCAL_IMAGE 
LOCAL_CHAISCRIPT 
REMOTE_RESOURCE 
UNKNOWN 
17  {
18  LOCAL_IMAGE,
19  LOCAL_CHAISCRIPT,
20  REMOTE_RESOURCE,
21  UNKNOWN
22  };

Constructor & Destructor Documentation

◆ RecentItem()

geometrize::RecentItem::RecentItem ( const QString &  key,
const QString &  displayName,
const long long int  timeStamp 
)
10  : m_key{key}, m_displayName{displayName}, m_timeStamp{timeStamp}
11 {
12 }

Member Function Documentation

◆ getDisplayName()

QString geometrize::RecentItem::getDisplayName ( ) const
38 {
39  return m_displayName;
40 }
Here is the caller graph for this function:

◆ getKey()

QString geometrize::RecentItem::getKey ( ) const
33 {
34  return m_key;
35 }
Here is the caller graph for this function:

◆ getTimeStamp()

long long int geometrize::RecentItem::getTimeStamp ( ) const
43 {
44  return m_timeStamp;
45 }
Here is the caller graph for this function:

◆ getTypeForKey()

RecentItem::Type geometrize::RecentItem::getTypeForKey ( const QString &  key)
static

getTypeForKey Gets the recent item type for the given recent item key.

Parameters
keyThe recent item key.
Returns
The recent item type.
15 {
16  const QUrl url{QUrl::fromUserInput(key)};
17  if(url.scheme() == "file") {
18  if(key.endsWith(".chai", Qt::CaseInsensitive)) {
20  } else {
22  }
23  }
24 
25  if(url.isValid()) {
27  }
28 
30 }

Member Data Documentation

◆ m_displayName

QString geometrize::RecentItem::m_displayName
private

Display name of the item, suitable for showing to the user.

◆ m_key

QString geometrize::RecentItem::m_key
private

Key, path, URL or other unique identifier for the item.

◆ m_timeStamp

long long int geometrize::RecentItem::m_timeStamp
private

Timestamp, millis since epoch, typically when the item was last accessed or used.


The documentation for this class was generated from the following files:
geometrize::RecentItem::Type::UNKNOWN
@ UNKNOWN
geometrize::RecentItem::Type::REMOTE_RESOURCE
@ REMOTE_RESOURCE
geometrize::RecentItem::m_key
QString m_key
Key, path, URL or other unique identifier for the item.
Definition: recentitem.h:36
geometrize::RecentItem::m_timeStamp
long long int m_timeStamp
Timestamp, millis since epoch, typically when the item was last accessed or used.
Definition: recentitem.h:38
geometrize::RecentItem::Type::LOCAL_CHAISCRIPT
@ LOCAL_CHAISCRIPT
geometrize::RecentItem::Type::LOCAL_IMAGE
@ LOCAL_IMAGE
geometrize::RecentItem::m_displayName
QString m_displayName
Display name of the item, suitable for showing to the user.
Definition: recentitem.h:37