GnuCash 7574033+
Loading...
Searching...
No Matches
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 1839 of file assistant-stock-transaction.cpp.

Constructor & Destructor Documentation

◆ PageTransDeets()

PageTransDeets::PageTransDeets ( GtkBuilder * builder)

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

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

Member Function Documentation

◆ connect()

void PageTransDeets::connect ( StockAssistantModel * model)

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

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

◆ get_date_time()

time64 PageTransDeets::get_date_time ( )
inline

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

1847{ return m_date.get_date_time(); }

◆ get_description()

const char * PageTransDeets::get_description ( )
inline

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

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

◆ prepare()

void PageTransDeets::prepare ( StockAssistantModel * model)

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

1873{
1874 model->set_transaction_date(get_date_time());
1875 model->set_transaction_desc(get_description());
1876 g_signal_connect(m_page, "focus", G_CALLBACK(assistant_page_set_focus), m_description);
1877}
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: