~ubuntu-branches/ubuntu/trusty/kdepimlibs/trusty

« back to all changes in this revision

Viewing changes to akonadi/agenttypedialog.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg, Rohan Garg, Philip Muškovac
  • Date: 2013-11-23 17:36:44 UTC
  • mfrom: (1.1.102)
  • Revision ID: package-import@ubuntu.com-20131123173644-p5ow94192ezsny8g
Tags: 4:4.11.80-0ubuntu1
[ Rohan Garg ]
* New upstream beta release
  - Bump akonadi requirement to 1.10.45
  - Update install files
  - Update symbols

[ Philip Muškovac ]
* kdepimlibs-dev/-dbg breaks/replaces kdepim-runtime/-dbg (<< 4:4.11.80)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
using namespace Akonadi;
31
31
 
32
 
 
33
32
class AgentTypeDialog::Private
34
33
{
35
34
  public:
 
35
    Private(AgentTypeDialog *qq)
 
36
        : q(qq)
 
37
    {
 
38
 
 
39
    }
 
40
    void readConfig();
 
41
    void writeConfig();
36
42
    AgentTypeWidget *Widget;
37
43
    AgentType agentType;
 
44
    AgentTypeDialog *q;
38
45
};
39
46
 
 
47
void AgentTypeDialog::Private::writeConfig()
 
48
{
 
49
  KConfigGroup group( KGlobal::config(), "AgentTypeDialog" );
 
50
  group.writeEntry( "Size", q->size() );
 
51
}
 
52
 
 
53
void AgentTypeDialog::Private::readConfig()
 
54
{
 
55
  KConfigGroup group( KGlobal::config(), "AgentTypeDialog" );
 
56
  const QSize sizeDialog = group.readEntry( "Size", QSize(460, 320) );
 
57
  if ( sizeDialog.isValid() ) {
 
58
     q->resize( sizeDialog );
 
59
  }
 
60
}
 
61
 
40
62
AgentTypeDialog::AgentTypeDialog( QWidget *parent )
41
 
      : KDialog( parent ), d( new Private )
 
63
    : KDialog( parent ), d( new Private(this) )
42
64
{
43
65
  setButtons( Ok | Cancel );
44
66
  QVBoxLayout *layout = new QVBoxLayout( mainWidget() );
55
77
 
56
78
  connect( this, SIGNAL(okClicked()), this, SLOT(accept()) );
57
79
 
58
 
  resize( 460, 320 );
 
80
  d->readConfig();
59
81
 
60
82
  searchLine->lineEdit()->setFocus();
61
83
}
62
84
 
63
85
AgentTypeDialog::~AgentTypeDialog()
64
86
{
 
87
  d->writeConfig();
65
88
  delete d;
66
89
}
67
90
 
85
108
{
86
109
  return d->Widget->agentFilterProxyModel();
87
110
}
88