GnuCash c935c2f+
Loading...
Searching...
No Matches
Public Member Functions
PageTransDeets Class Reference

Transaction Details page. More...

Public Member Functions

 PageTransDeets (GtkBuilder *builder)
 
time64 get_date_time ()
 
const char * get_description ()
 
void connect (StockAssistantModel *)
 
void prepare (StockAssistantModel *)
 

Detailed Description

Transaction Details page.

Collects the transaction date (changing of which may trigger the model to run maybe_change_txn_types if the balance on the new date is different from the balance on the prior or default date) and the transaction description.

Definition at line 1838 of file assistant-stock-transaction.cpp.

Constructor & Destructor Documentation

◆ PageTransDeets()

PageTransDeets::PageTransDeets ( GtkBuilder *  builder)

Definition at line 1852 of file assistant-stock-transaction.cpp.

1852 :
1853 m_page (get_widget (builder, "transaction_details_page")),
1854 m_date (builder),
1855 m_description (get_widget (builder, "transaction_description_entry"))
1856{
1857 m_date.attach(builder, "transaction_details_table", "transaction_date_label", 0);
1858}

Member Function Documentation

◆ connect()

void PageTransDeets::connect ( StockAssistantModel model)

Definition at line 1861 of file assistant-stock-transaction.cpp.

1862{
1863 m_date.connect(G_CALLBACK (stock_assistant_model_date_changed_cb),
1864 static_cast<void*>(model));
1865 g_signal_connect(m_description, "changed",
1866 G_CALLBACK (stock_assistant_model_description_changed_cb),
1867 static_cast<void*>(model));
1868}

◆ get_date_time()

time64 PageTransDeets::get_date_time ( )
inline

Definition at line 1846 of file assistant-stock-transaction.cpp.

1846{ return m_date.get_date_time(); }

◆ get_description()

const char * PageTransDeets::get_description ( )
inline

Definition at line 1847 of file assistant-stock-transaction.cpp.

1847{ return gtk_entry_get_text (GTK_ENTRY (m_description)); }

◆ prepare()

void PageTransDeets::prepare ( StockAssistantModel model)

Definition at line 1871 of file assistant-stock-transaction.cpp.

1872{
1873 model->set_transaction_date(get_date_time());
1874 model->set_transaction_desc(get_description());
1875 g_signal_connect(m_page, "focus", G_CALLBACK(assistant_page_set_focus), m_description);
1876}
void set_transaction_desc(const char *desc)
Setter.
void set_transaction_date(time64 date)
Setter.

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