Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
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

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

Constructor & Destructor Documentation

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 }
long long int m_timeStamp
Timestamp, millis since epoch, typically when the item was last accessed or used. ...
Definition: recentitem.h:38
QString m_displayName
Display name of the item, suitable for showing to the user.
Definition: recentitem.h:37
QString m_key
Key, path, URL or other unique identifier for the item.
Definition: recentitem.h:36

Member Function Documentation

QString geometrize::RecentItem::getDisplayName ( ) const
38 {
39  return m_displayName;
40 }
QString m_displayName
Display name of the item, suitable for showing to the user.
Definition: recentitem.h:37

Here is the caller graph for this function:

QString geometrize::RecentItem::getKey ( ) const
33 {
34  return m_key;
35 }
QString m_key
Key, path, URL or other unique identifier for the item.
Definition: recentitem.h:36

Here is the caller graph for this function:

long long int geometrize::RecentItem::getTimeStamp ( ) const
43 {
44  return m_timeStamp;
45 }
long long int m_timeStamp
Timestamp, millis since epoch, typically when the item was last accessed or used. ...
Definition: recentitem.h:38

Here is the caller graph for this function:

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

QString geometrize::RecentItem::m_displayName
private

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

QString geometrize::RecentItem::m_key
private

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

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: