Cleanup
This commit is contained in:
parent
9f5b83c776
commit
fa592bc5ed
207
SMSGui.ui
207
SMSGui.ui
@ -19,117 +19,106 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QTextBrowser" name="mConversationText">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>160</y>
|
||||
<width>481</width>
|
||||
<height>451</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QFrame" name="mSMSEditFrame">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>620</y>
|
||||
<width>521</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="mSMSSendBtn">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="mContactPic">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="baseSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QLabel" name="mContactName">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QTextBrowser" name="mConversationText"/>
|
||||
</item>
|
||||
<item row="1" column="2" rowspan="2">
|
||||
<widget class="QTreeWidget" name="mContactsTreeWidget">
|
||||
<property name="indentation">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string>Send</string>
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="2">
|
||||
<widget class="QTextEdit" name="mSMSEdit"/>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QLabel" name="mSMSMessageStatsLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QTreeWidget" name="mContactsTreeWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>520</x>
|
||||
<y>160</y>
|
||||
<width>256</width>
|
||||
<height>471</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="indentation">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<attribute name="headerVisible">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
<column>
|
||||
<property name="text">
|
||||
<string notr="true">1</string>
|
||||
</property>
|
||||
</column>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mContactPic">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>141</width>
|
||||
<height>121</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="mContactName">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>20</y>
|
||||
<width>591</width>
|
||||
<height>101</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QFrame" name="mSMSEditFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="3" column="2">
|
||||
<widget class="QPushButton" name="mSMSSendBtn">
|
||||
<property name="text">
|
||||
<string>Send</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" rowspan="2">
|
||||
<widget class="QTextEdit" name="mSMSEdit"/>
|
||||
</item>
|
||||
<item row="3" column="3">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2" colspan="2">
|
||||
<widget class="QLabel" name="mSMSMessageStatsLabel">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>200</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
@ -45,8 +45,6 @@ int CSMSClient::SetAllMsgsDatabase(QString DID, QList<CSMSMessage> *MessagesList
|
||||
if(mSMSDatabase.SetAllMessages(DID,MessagesList) == RET_OK)
|
||||
{
|
||||
mGuiHandle->FullConversationsUpdate();
|
||||
// mMainPanel->mConversationsWindow->FullConversationsUpdate();
|
||||
// mMainPanel->mConversationWindow->hide();
|
||||
}
|
||||
return RET_OK;
|
||||
}
|
||||
@ -70,60 +68,6 @@ int CSMSClient::SetContacts(QList<CContact> *ContactsList)
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
//unsigned int CSMSClient::QuitApplicationRequest()
|
||||
//{
|
||||
|
||||
// QApplication::exit(69);
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
//unsigned int CSMSClient::ShowSettingsWindowRequest()
|
||||
//{
|
||||
// mSettingsWindow->show();
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
//unsigned int CSMSClient::SaveSettings(CSettings *Settings)
|
||||
//{
|
||||
// CSettings toto;
|
||||
// toto = *Settings;
|
||||
// mSMSClientSettings = toto;
|
||||
// mSettingsManager.SaveSettings(&mSMSClientSettings);
|
||||
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
//unsigned int CSMSClient::SettingsWindowClosed()
|
||||
//{
|
||||
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
//int CSMSClient::AppToggle()
|
||||
//{
|
||||
//// if(mMainPanel->mConversationWindow->isVisible())
|
||||
//// {
|
||||
//// mMainPanel->mConversationWindow->hide();
|
||||
|
||||
//// }
|
||||
//// else if(mMainPanel->mConversationsWindow->isVisible())
|
||||
//// {
|
||||
//// mMainPanel->mConversationsWindow->hide();
|
||||
//// }
|
||||
//// else
|
||||
//// {
|
||||
//// mMainPanel->mConversationsWindow->show();
|
||||
//// }
|
||||
|
||||
// return RET_OK;
|
||||
//}
|
||||
//int CSMSClient::AppPosChanged(int NewPosX, int NewPosY)
|
||||
//{
|
||||
//// mMainPanel->mConversationsWindow->setPos(50,50);
|
||||
//// mMainPanel->mConversationWindow->setPos(50,50);
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
int CSMSClient::ShowConversation(QString Contact)
|
||||
{
|
||||
CSMSConversation* Conversation;
|
||||
@ -134,30 +78,9 @@ int CSMSClient::ShowConversation(QString Contact)
|
||||
return RET_ERROR;
|
||||
}
|
||||
|
||||
// mMainPanel->mConversationWindow->SetConversation(Conversation);
|
||||
|
||||
// mMainPanel->mConversationsWindow->hide();
|
||||
// mMainPanel->mConversationWindow->show();
|
||||
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
//int CSMSClient::CloseConversationsWindow()
|
||||
//{
|
||||
//// mMainPanel->mConversationsWindow->hide();
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
//int CSMSClient::CloseConversationWindow(CConversationWindow *Window)
|
||||
//{
|
||||
// Q_UNUSED(Window)
|
||||
|
||||
//// mMainPanel->mConversationsWindow->FullConversationsUpdate();
|
||||
//// mMainPanel->mConversationWindow->hide();
|
||||
//// mMainPanel->mConversationsWindow->show();
|
||||
|
||||
// return RET_OK;
|
||||
//}
|
||||
|
||||
int CSMSClient::SendSMSMessage(CSMSMessage Message)
|
||||
{
|
||||
@ -167,11 +90,6 @@ int CSMSClient::SendSMSMessage(CSMSMessage Message)
|
||||
|
||||
int CSMSClient::NewMessageNotification(CSMSConversation *Conversation, int MessageIndex)
|
||||
{
|
||||
// if(mMainPanel->mConversationWindow->NewMessageNotification(Conversation,MessageIndex) == true)
|
||||
// {
|
||||
// mSMSDatabase.SetConversationAsRead(Conversation);
|
||||
// }
|
||||
// mMainPanel->mConversationsWindow->UpdateConversation(Conversation);
|
||||
mGuiHandle->NewMessageNotification(Conversation,MessageIndex);
|
||||
|
||||
MessageCountChangeNotification(mSMSDatabase.GetNbUnreadMsgs());
|
||||
@ -181,18 +99,12 @@ int CSMSClient::NewMessageNotification(CSMSConversation *Conversation, int Messa
|
||||
|
||||
int CSMSClient::SyncConversations()
|
||||
{
|
||||
// mMainPanel->mConversationsWindow->FullConversationsUpdate();
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
int CSMSClient::MessageCountChangeNotification(int MsgCount)
|
||||
{
|
||||
// mMainPanel->mAppIconWidget->SetNewMsgCount(MsgCount);
|
||||
mTrayIconMgr->NewSMSMessagesPendingCount(MsgCount);
|
||||
return RET_OK;
|
||||
}
|
||||
|
||||
//int CSMSClient::NewConversationAddedToDatabase(CSMSConversation *Conversation)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
@ -22,10 +22,7 @@ public:
|
||||
~CSMSClient();
|
||||
|
||||
void Start(void);
|
||||
// CSystemTrayManager *mSystemTrayManager;
|
||||
// CSettingsWindow *mSettingsWindow;
|
||||
// CProgramSettings mSettingsManager;
|
||||
//Panel *mMainPanel;
|
||||
|
||||
CSMSMasterCtrlInterface *mMasterCtrlIF;
|
||||
CSMSDatabase mSMSDatabase;
|
||||
CContactRepository mContactRepository;
|
||||
@ -36,17 +33,6 @@ public:
|
||||
|
||||
|
||||
|
||||
// unsigned int QuitApplicationRequest();
|
||||
// unsigned int ShowSettingsWindowRequest();
|
||||
// unsigned int SaveSettings(CSettings *Settings);
|
||||
|
||||
// unsigned int SettingsWindowClosed();
|
||||
|
||||
//AppIconWidget requests
|
||||
// int AppToggle();
|
||||
// int AppPosChanged(int NewPosX, int NewPosY);
|
||||
|
||||
//MasterCtrlIngerface Requests
|
||||
int SetAllMsgsDatabase(QString DID, QList<CSMSMessage> *MessagesList);
|
||||
int SetDIDDatabase(QString DID);
|
||||
int NewMessagesEvent(QList<CSMSMessage> *MessagesList);
|
||||
@ -55,16 +41,13 @@ public:
|
||||
|
||||
//ConversationsWindow requests
|
||||
int ShowConversation(QString Contact);
|
||||
// int CloseConversationsWindow();
|
||||
|
||||
|
||||
//ConversationWindow requests
|
||||
//int CloseConversationWindow(CConversationWindow* Window);
|
||||
int SendSMSMessage(CSMSMessage Message);
|
||||
|
||||
//SMSDatabase requests
|
||||
int NewMessageNotification(CSMSConversation* Conversation, int MessageIndex);
|
||||
// void NewConversationAddedToDatabase(CSMSConversation *Conversation);
|
||||
int SyncConversations();
|
||||
int MessageCountChangeNotification(int MsgCount);
|
||||
|
||||
|
||||
62
ui_SMSGui.h
62
ui_SMSGui.h
@ -29,16 +29,17 @@ QT_BEGIN_NAMESPACE
|
||||
class Ui_CSMSGui
|
||||
{
|
||||
public:
|
||||
QGridLayout *gridLayout_2;
|
||||
QLabel *mContactPic;
|
||||
QLabel *mContactName;
|
||||
QTextBrowser *mConversationText;
|
||||
QTreeWidget *mContactsTreeWidget;
|
||||
QFrame *mSMSEditFrame;
|
||||
QGridLayout *gridLayout;
|
||||
QPushButton *mSMSSendBtn;
|
||||
QTextEdit *mSMSEdit;
|
||||
QSpacerItem *horizontalSpacer;
|
||||
QLabel *mSMSMessageStatsLabel;
|
||||
QTreeWidget *mContactsTreeWidget;
|
||||
QLabel *mContactPic;
|
||||
QLabel *mContactName;
|
||||
|
||||
void setupUi(QWidget *CSMSGui)
|
||||
{
|
||||
@ -50,12 +51,42 @@ public:
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(CSMSGui->sizePolicy().hasHeightForWidth());
|
||||
CSMSGui->setSizePolicy(sizePolicy);
|
||||
gridLayout_2 = new QGridLayout(CSMSGui);
|
||||
gridLayout_2->setObjectName(QStringLiteral("gridLayout_2"));
|
||||
mContactPic = new QLabel(CSMSGui);
|
||||
mContactPic->setObjectName(QStringLiteral("mContactPic"));
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
sizePolicy1.setHorizontalStretch(0);
|
||||
sizePolicy1.setVerticalStretch(0);
|
||||
sizePolicy1.setHeightForWidth(mContactPic->sizePolicy().hasHeightForWidth());
|
||||
mContactPic->setSizePolicy(sizePolicy1);
|
||||
mContactPic->setMinimumSize(QSize(100, 100));
|
||||
mContactPic->setBaseSize(QSize(100, 100));
|
||||
|
||||
gridLayout_2->addWidget(mContactPic, 0, 0, 1, 1);
|
||||
|
||||
mContactName = new QLabel(CSMSGui);
|
||||
mContactName->setObjectName(QStringLiteral("mContactName"));
|
||||
|
||||
gridLayout_2->addWidget(mContactName, 0, 1, 1, 2);
|
||||
|
||||
mConversationText = new QTextBrowser(CSMSGui);
|
||||
mConversationText->setObjectName(QStringLiteral("mConversationText"));
|
||||
mConversationText->setGeometry(QRect(0, 160, 481, 451));
|
||||
|
||||
gridLayout_2->addWidget(mConversationText, 1, 0, 1, 2);
|
||||
|
||||
mContactsTreeWidget = new QTreeWidget(CSMSGui);
|
||||
QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem();
|
||||
__qtreewidgetitem->setText(0, QStringLiteral("1"));
|
||||
mContactsTreeWidget->setHeaderItem(__qtreewidgetitem);
|
||||
mContactsTreeWidget->setObjectName(QStringLiteral("mContactsTreeWidget"));
|
||||
mContactsTreeWidget->setIndentation(2);
|
||||
mContactsTreeWidget->header()->setVisible(false);
|
||||
|
||||
gridLayout_2->addWidget(mContactsTreeWidget, 1, 2, 2, 1);
|
||||
|
||||
mSMSEditFrame = new QFrame(CSMSGui);
|
||||
mSMSEditFrame->setObjectName(QStringLiteral("mSMSEditFrame"));
|
||||
mSMSEditFrame->setGeometry(QRect(0, 620, 521, 121));
|
||||
mSMSEditFrame->setFrameShape(QFrame::StyledPanel);
|
||||
mSMSEditFrame->setFrameShadow(QFrame::Raised);
|
||||
gridLayout = new QGridLayout(mSMSEditFrame);
|
||||
@ -80,20 +111,9 @@ public:
|
||||
|
||||
gridLayout->addWidget(mSMSMessageStatsLabel, 2, 2, 1, 2);
|
||||
|
||||
mContactsTreeWidget = new QTreeWidget(CSMSGui);
|
||||
QTreeWidgetItem *__qtreewidgetitem = new QTreeWidgetItem();
|
||||
__qtreewidgetitem->setText(0, QStringLiteral("1"));
|
||||
mContactsTreeWidget->setHeaderItem(__qtreewidgetitem);
|
||||
mContactsTreeWidget->setObjectName(QStringLiteral("mContactsTreeWidget"));
|
||||
mContactsTreeWidget->setGeometry(QRect(520, 160, 256, 471));
|
||||
mContactsTreeWidget->setIndentation(2);
|
||||
mContactsTreeWidget->header()->setVisible(false);
|
||||
mContactPic = new QLabel(CSMSGui);
|
||||
mContactPic->setObjectName(QStringLiteral("mContactPic"));
|
||||
mContactPic->setGeometry(QRect(10, 10, 141, 121));
|
||||
mContactName = new QLabel(CSMSGui);
|
||||
mContactName->setObjectName(QStringLiteral("mContactName"));
|
||||
mContactName->setGeometry(QRect(180, 20, 591, 101));
|
||||
|
||||
gridLayout_2->addWidget(mSMSEditFrame, 2, 0, 1, 2);
|
||||
|
||||
|
||||
retranslateUi(CSMSGui);
|
||||
|
||||
@ -103,10 +123,10 @@ public:
|
||||
void retranslateUi(QWidget *CSMSGui)
|
||||
{
|
||||
CSMSGui->setWindowTitle(QApplication::translate("CSMSGui", "Form", 0));
|
||||
mSMSSendBtn->setText(QApplication::translate("CSMSGui", "Send", 0));
|
||||
mSMSMessageStatsLabel->setText(QApplication::translate("CSMSGui", "TextLabel", 0));
|
||||
mContactPic->setText(QApplication::translate("CSMSGui", "TextLabel", 0));
|
||||
mContactName->setText(QApplication::translate("CSMSGui", "TextLabel", 0));
|
||||
mSMSSendBtn->setText(QApplication::translate("CSMSGui", "Send", 0));
|
||||
mSMSMessageStatsLabel->setText(QApplication::translate("CSMSGui", "TextLabel", 0));
|
||||
} // retranslateUi
|
||||
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user